// No unistd.h in Borland C++
extern int access(const char *, int);
#define X_OK 1
+
#endif
//REMOVE ME!!!
#if !OPT_DISABLE_PIC
&pic14_port,
#endif
+#if !OPT_DISABLE_I186
+ &i186_port,
+#endif
+#if !OPT_DISABLE_TLCS900H
+ &tlcs900h_port,
+#endif
};
#define NUM_PORTS (sizeof(_ports)/sizeof(_ports[0]))
exit(1);
}
+static void _validatePorts(void)
+{
+ int i;
+ for (i=0; i<NUM_PORTS; i++) {
+ if (_ports[i]->magic != PORT_MAGIC) {
+ printf("Error: port %s is incomplete.\n", _ports[i]->target);
+ wassert(0);
+ }
+ }
+}
+
void buildCmdLine(char *into, char **args, const char **cmds,
const char *p1, const char *p2,
const char *p3, const char **list)
static void _findPort(int argc, char **argv)
{
+ _validatePorts();
+
argc--;
while (argc) {
if (!strncmp(*argv, "-m", 2)) {