|
|
1.1 root 1: /*
2: * UAE - The Un*x Amiga Emulator
1.1.1.3 root 3: *
4: * Main program
5: *
6: * Copyright 1995 Ed Hanway
7: * Copyright 1995, 1996, 1997 Bernd Schmidt
1.1 root 8: */
9: #include "sysconfig.h"
10: #include "sysdeps.h"
11: #include <assert.h>
12:
13: #include "config.h"
14: #include "options.h"
1.1.1.15 root 15: #include "threaddep/thread.h"
1.1.1.2 root 16: #include "uae.h"
1.1.1.3 root 17: #include "gensound.h"
1.1.1.13 root 18: #include "audio.h"
1.1.1.3 root 19: #include "sounddep/sound.h"
1.1.1.2 root 20: #include "events.h"
1.1 root 21: #include "memory.h"
22: #include "custom.h"
23: #include "serial.h"
24: #include "newcpu.h"
25: #include "disk.h"
26: #include "debug.h"
27: #include "xwin.h"
1.1.1.3 root 28: #include "joystick.h"
1.1 root 29: #include "keybuf.h"
30: #include "gui.h"
31: #include "zfile.h"
32: #include "autoconf.h"
1.1.1.2 root 33: #include "osemu.h"
1.1.1.3 root 34: #include "osdep/exectasks.h"
1.1 root 35: #include "compiler.h"
1.1.1.3 root 36: #include "picasso96.h"
1.1.1.6 root 37: #include "bsdsocket.h"
1.1.1.3 root 38: #include "uaeexe.h"
1.1.1.8 root 39: #include "native2amiga.h"
40: #include "scsidev.h"
1.1 root 41:
1.1.1.15 root 42: #ifdef USE_SDL
43: #include "SDL.h"
44: #endif
45:
1.1.1.4 root 46: long int version = 256*65536L*UAEMAJOR + 65536L*UAEMINOR + UAESUBREV;
1.1.1.3 root 47:
1.1.1.6 root 48: struct uae_prefs currprefs, changed_prefs;
1.1.1.4 root 49:
1.1.1.6 root 50: int no_gui = 0;
1.1.1.4 root 51: int joystickpresent = 0;
52: int cloanto_rom = 0;
53:
1.1.1.11 root 54: struct gui_info gui_data;
55:
1.1.1.4 root 56: char warning_buffer[256];
57:
58: char optionsfile[256];
59:
60: /* If you want to pipe printer output to a file, put something like
61: * "cat >>printerfile.tmp" above.
62: * The printer support was only tested with the driver "PostScript" on
63: * Amiga side, using apsfilter for linux to print ps-data.
64: *
65: * Under DOS it ought to be -p LPT1: or -p PRN: but you'll need a
66: * PostScript printer or ghostscript -=SR=-
67: */
68:
69: /* Slightly stupid place for this... */
70: /* ncurses.c might use quite a few of those. */
71: char *colormodes[] = { "256 colors", "32768 colors", "65536 colors",
72: "256 colors dithered", "16 colors dithered", "16 million colors",
73: "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
74: "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
75: "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
76: "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
77: "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""
78: };
79:
1.1.1.6 root 80: void discard_prefs (struct uae_prefs *p)
1.1.1.3 root 81: {
1.1.1.6 root 82: struct strlist **ps = &p->unknown_lines;
83: while (*ps) {
84: struct strlist *s = *ps;
85: *ps = s->next;
86: free (s->str);
87: free (s);
88: }
89: free_mountinfo (p->mountinfo);
90: }
91:
92: void default_prefs (struct uae_prefs *p)
93: {
94: strcpy (p->description, "UAE default configuration");
95:
96: p->start_gui = 1;
97: p->start_debugger = 0;
98:
99: p->unknown_lines = 0;
1.1.1.4 root 100: /* Note to porters: please don't change any of these options! UAE is supposed
101: * to behave identically on all platforms if possible. */
1.1.1.6 root 102: p->illegal_mem = 0;
103: p->no_xhair = 0;
104: p->use_serial = 0;
105: p->serial_demand = 0;
106: p->parallel_demand = 0;
107:
108: p->jport0 = 2;
109: p->jport1 = 0;
110: p->keyboard_lang = KBD_LANG_US;
111: p->emul_accuracy = 2;
112: p->test_drawing_speed = 0;
113:
114: p->produce_sound = 0;
115: p->stereo = 0;
116: p->sound_bits = DEFAULT_SOUND_BITS;
117: p->sound_freq = DEFAULT_SOUND_FREQ;
118: p->sound_minbsiz = DEFAULT_SOUND_MINB;
119: p->sound_maxbsiz = DEFAULT_SOUND_MAXB;
1.1.1.9 root 120: p->sound_interpol = 0;
1.1.1.6 root 121:
1.1.1.8 root 122: p->gfx_framerate = 1;
1.1.1.6 root 123: p->gfx_width = 800;
124: p->gfx_height = 600;
125: p->gfx_lores = 0;
1.1.1.15 root 126: p->gfx_linedbl = 2;
1.1.1.6 root 127: p->gfx_afullscreen = 0;
128: p->gfx_pfullscreen = 0;
129: p->gfx_correct_aspect = 0;
130: p->gfx_xcenter = 0;
131: p->gfx_ycenter = 0;
132: p->color_mode = 0;
133:
134: p->x11_use_low_bandwidth = 0;
135: p->x11_use_mitshm = 0;
136: p->x11_hide_cursor = 1;
137:
1.1.1.8 root 138: p->svga_no_linear = 0;
139:
1.1.1.10 root 140: p->curses_reverse_video = 0;
141:
1.1.1.8 root 142: p->win32_middle_mouse = 0;
143: p->win32_logfile = 0;
144: p->win32_iconified_nospeed = 0;
145: p->win32_iconified_nosound = 0;
1.1.1.16 root 146: p->win32_no_overlay = 0;
1.1.1.8 root 147:
1.1.1.6 root 148: p->immediate_blits = 0;
1.1.1.14 root 149: p->collision_level = 1;
150: p->fast_copper = 1;
1.1.1.6 root 151:
152: strcpy (p->df[0], "df0.adf");
153: strcpy (p->df[1], "df1.adf");
154: strcpy (p->df[2], "df2.adf");
155: strcpy (p->df[3], "df3.adf");
156:
157: strcpy (p->romfile, "kick.rom");
158: strcpy (p->keyfile, "");
159: strcpy (p->prtname, DEFPRTNAME);
160:
161: strcpy (p->path_rom, "./");
162: strcpy (p->path_floppy, "./");
163: strcpy (p->path_hardfile, "./");
164:
1.1.1.15 root 165: strcpy (p->prtname, "");
166: strcpy (p->sername, "");
167:
1.1.1.11 root 168: p->m68k_speed = 0;
1.1.1.6 root 169: p->cpu_level = 2;
170: p->cpu_compatible = 0;
171: p->address_space_24 = 0;
172:
173: p->fastmem_size = 0x00000000;
174: p->a3000mem_size = 0x00000000;
175: p->z3fastmem_size = 0x00000000;
176: p->chipmem_size = 0x00200000;
177: p->bogomem_size = 0x00000000;
178: p->gfxmem_size = 0x00000000;
1.1 root 179:
1.1.1.11 root 180: p->nr_floppies = 4;
181:
1.1.1.6 root 182: p->mountinfo = alloc_mountinfo ();
1.1.1.4 root 183: }
1.1 root 184:
1.1.1.4 root 185: void fixup_prefs_dimensions (struct uae_prefs *prefs)
186: {
187: if (prefs->gfx_width < 320)
188: prefs->gfx_width = 320;
189: if (prefs->gfx_height < 200)
190: prefs->gfx_height = 200;
191: if (prefs->gfx_height > 300 && ! prefs->gfx_linedbl)
192: prefs->gfx_height = 300;
193: if (prefs->gfx_height > 600)
194: prefs->gfx_height = 600;
1.1 root 195:
1.1.1.4 root 196: prefs->gfx_width += 7; /* X86.S wants multiples of 4 bytes, might be 8 in the future. */
197: prefs->gfx_width &= ~7;
198: }
1.1.1.3 root 199:
1.1.1.4 root 200: static void fix_options (void)
1.1.1.2 root 201: {
1.1.1.3 root 202: int err = 0;
203:
1.1.1.4 root 204: if ((currprefs.chipmem_size & (currprefs.chipmem_size - 1)) != 0
205: || currprefs.chipmem_size < 0x80000
206: || currprefs.chipmem_size > 0x800000)
1.1.1.3 root 207: {
1.1.1.4 root 208: currprefs.chipmem_size = 0x200000;
1.1.1.16 root 209: write_log ("Unsupported chipmem size!\n");
1.1.1.3 root 210: err = 1;
211: }
1.1.1.4 root 212: if ((currprefs.fastmem_size & (currprefs.fastmem_size - 1)) != 0
213: || (currprefs.fastmem_size != 0 && (currprefs.fastmem_size < 0x100000 || currprefs.fastmem_size > 0x800000)))
1.1.1.3 root 214: {
1.1.1.4 root 215: currprefs.fastmem_size = 0;
1.1.1.16 root 216: write_log ("Unsupported fastmem size!\n");
1.1.1.3 root 217: err = 1;
218: }
1.1.1.4 root 219: if ((currprefs.gfxmem_size & (currprefs.gfxmem_size - 1)) != 0
1.1.1.16 root 220: || (currprefs.gfxmem_size != 0 && (currprefs.gfxmem_size < 0x100000 || currprefs.gfxmem_size > 0x2000000)))
1.1.1.3 root 221: {
1.1.1.16 root 222: write_log ("Unsupported graphics card memory size %lx!\n", currprefs.gfxmem_size);
1.1.1.4 root 223: currprefs.gfxmem_size = 0;
1.1.1.3 root 224: err = 1;
225: }
1.1.1.4 root 226: if ((currprefs.z3fastmem_size & (currprefs.z3fastmem_size - 1)) != 0
227: || (currprefs.z3fastmem_size != 0 && (currprefs.z3fastmem_size < 0x100000 || currprefs.z3fastmem_size > 0x4000000)))
1.1.1.3 root 228: {
1.1.1.4 root 229: currprefs.z3fastmem_size = 0;
1.1.1.16 root 230: write_log ("Unsupported Zorro III fastmem size!\n");
1.1.1.3 root 231: err = 1;
232: }
1.1.1.4 root 233: if (currprefs.address_space_24 && (currprefs.gfxmem_size != 0 || currprefs.z3fastmem_size != 0)) {
234: currprefs.z3fastmem_size = currprefs.gfxmem_size = 0;
1.1.1.16 root 235: write_log ("Can't use a graphics card or Zorro III fastmem when using a 24 bit\n"
1.1.1.3 root 236: "address space - sorry.\n");
237: }
1.1.1.4 root 238: if ((currprefs.bogomem_size & (currprefs.bogomem_size - 1)) != 0
239: || (currprefs.bogomem_size != 0 && (currprefs.bogomem_size < 0x80000 || currprefs.bogomem_size > 0x100000)))
1.1.1.3 root 240: {
1.1.1.4 root 241: currprefs.bogomem_size = 0;
1.1.1.16 root 242: write_log ("Unsupported bogomem size!\n");
1.1.1.3 root 243: err = 1;
244: }
245:
1.1.1.4 root 246: if (currprefs.chipmem_size > 0x200000 && currprefs.fastmem_size != 0) {
1.1.1.16 root 247: write_log ("You can't use fastmem and more than 2MB chip at the same time!\n");
1.1.1.4 root 248: currprefs.fastmem_size = 0;
1.1.1.3 root 249: err = 1;
250: }
1.1.1.13 root 251: #if 0
1.1.1.4 root 252: if (currprefs.m68k_speed < -1 || currprefs.m68k_speed > 20) {
1.1.1.16 root 253: write_log ("Bad value for -w parameter: must be -1, 0, or within 1..20.\n");
1.1.1.3 root 254: currprefs.m68k_speed = 4;
255: err = 1;
256: }
1.1.1.13 root 257: #endif
258:
1.1.1.3 root 259: if (currprefs.produce_sound < 0 || currprefs.produce_sound > 3) {
1.1.1.16 root 260: write_log ("Bad value for -S parameter: enable value must be within 0..3\n");
1.1.1.3 root 261: currprefs.produce_sound = 0;
262: err = 1;
263: }
1.1.1.4 root 264: if (currprefs.cpu_level < 2 && currprefs.z3fastmem_size > 0) {
1.1.1.16 root 265: write_log ("Z3 fast memory can't be used with a 68000/68010 emulation. It\n"
1.1.1.3 root 266: "requires a 68020 emulation. Turning off Z3 fast memory.\n");
1.1.1.4 root 267: currprefs.z3fastmem_size = 0;
1.1.1.3 root 268: err = 1;
269: }
1.1.1.8 root 270: if (currprefs.gfxmem_size > 0 && (currprefs.cpu_level < 2 || currprefs.address_space_24)) {
1.1.1.16 root 271: write_log ("Picasso96 can't be used with a 68000/68010 or 68EC020 emulation. It\n"
1.1.1.3 root 272: "requires a 68020 emulation. Turning off Picasso96.\n");
1.1.1.4 root 273: currprefs.gfxmem_size = 0;
1.1.1.3 root 274: err = 1;
275: }
1.1.1.8 root 276: #ifndef BSDSOCKET_SUPPORTED
277: if (currprefs.socket_emu) {
1.1.1.16 root 278: write_log ("Compile-time option of BSDSOCKET_SUPPORTED was not enabled. You can't use bsd-socket emulation.\n");
1.1.1.8 root 279: currprefs.socket_emu = 0;
280: err = 1;
281: }
282: #endif
1.1.1.3 root 283:
1.1.1.11 root 284: if (currprefs.nr_floppies < 1 || currprefs.nr_floppies > 4) {
1.1.1.16 root 285: write_log ("Invalid number of floppies. Using 4.\n");
1.1.1.11 root 286: currprefs.nr_floppies = 4;
287: err = 1;
288: }
1.1.1.14 root 289: if (currprefs.collision_level < 0 || currprefs.collision_level > 3) {
1.1.1.16 root 290: write_log ("Invalid collision support level. Using 1.\n");
1.1.1.14 root 291: currprefs.collision_level = 1;
292: err = 1;
293: }
1.1.1.11 root 294:
1.1.1.3 root 295: if (err)
1.1.1.16 root 296: write_log ("Please use \"uae -h\" to get usage information.\n");
1.1.1.3 root 297: }
298:
299: int quit_program = 0;
300:
301: void uae_reset (void)
302: {
1.1.1.4 root 303: if (quit_program == 0)
1.1.1.3 root 304: quit_program = -2;
305: }
306:
307: void uae_quit (void)
308: {
309: if (quit_program != -1)
310: quit_program = -1;
1.1.1.2 root 311: }
1.1 root 312:
1.1.1.3 root 313: const char *gameport_state (int nr)
1.1 root 314: {
1.1.1.6 root 315: if (JSEM_ISJOY0 (nr, &currprefs) && nr_joysticks > 0)
1.1.1.3 root 316: return "using joystick #0";
1.1.1.6 root 317: else if (JSEM_ISJOY1 (nr, &currprefs) && nr_joysticks > 1)
1.1.1.3 root 318: return "using joystick #1";
1.1.1.6 root 319: else if (JSEM_ISMOUSE (nr, &currprefs))
1.1.1.3 root 320: return "using mouse";
1.1.1.6 root 321: else if (JSEM_ISNUMPAD (nr, &currprefs))
1.1.1.3 root 322: return "using numeric pad as joystick";
1.1.1.6 root 323: else if (JSEM_ISCURSOR (nr, &currprefs))
1.1.1.3 root 324: return "using cursor keys as joystick";
1.1.1.6 root 325: else if (JSEM_ISSOMEWHEREELSE (nr, &currprefs))
1.1.1.3 root 326: return "using T/F/H/B/Alt as joystick";
327:
328: return "not connected";
329: }
330:
1.1.1.6 root 331: #ifndef DONT_PARSE_CMDLINE
1.1.1.3 root 332:
1.1.1.6 root 333: void usage (void)
334: {
1.1.1.3 root 335: }
336:
1.1.1.6 root 337: void parse_cmdline (int argc, char **argv)
338: {
1.1.1.8 root 339: int i;
340: for (i = 1; i < argc; i++) {
341: if (strncmp (argv[i], "-config=", 8) == 0)
342: cfgfile_load (&currprefs, argv[i] + 8);
343: /* Check for new-style "-f xxx" argument, where xxx is config-file */
344: else if (strcmp (argv[i], "-f") == 0) {
345: if (i + 1 == argc)
1.1.1.17! root 346: write_log ("Missing argument for '-f' option.\n");
1.1.1.8 root 347: else
348: cfgfile_load (&currprefs, argv[++i]);
349: } else if (strcmp (argv[i], "-s") == 0) {
350: if (i + 1 == argc)
1.1.1.17! root 351: write_log ("Missing argument for '-s' option.\n");
1.1.1.8 root 352: else
353: cfgfile_parse_line (&currprefs, argv[++i]);
354: } else if (strcmp (argv[i], "-h") == 0 || strcmp (argv[i], "-help") == 0) {
1.1.1.6 root 355: usage ();
356: exit (0);
1.1.1.9 root 357: } else {
358: if (argv[i][0] == '-' && argv[i][1] != '\0') {
359: const char *arg = argv[i] + 2;
1.1.1.10 root 360: int extra_arg = *arg == '\0';
361: if (extra_arg)
1.1.1.9 root 362: arg = i + 1 < argc ? argv[i + 1] : 0;
1.1.1.10 root 363: if (parse_cmdline_option (argv[i][1], arg) && extra_arg)
364: i++;
1.1.1.9 root 365: }
1.1.1.3 root 366: }
1.1 root 367: }
368: }
369: #endif
370:
1.1.1.4 root 371: static void parse_cmdline_and_init_file (int argc, char **argv)
1.1 root 372: {
1.1.1.3 root 373: char *home;
1.1 root 374:
1.1.1.6 root 375: strcpy (optionsfile, "");
1.1 root 376:
1.1.1.3 root 377: #ifdef OPTIONS_IN_HOME
1.1.1.4 root 378: home = getenv ("HOME");
379: if (home != NULL && strlen (home) < 240)
1.1 root 380: {
1.1.1.4 root 381: strcpy (optionsfile, home);
382: strcat (optionsfile, "/");
1.1 root 383: }
384: #endif
385:
1.1.1.4 root 386: strcat (optionsfile, OPTIONSFILENAME);
1.1 root 387:
1.1.1.6 root 388: if (! cfgfile_load (&currprefs, optionsfile)) {
1.1.1.3 root 389: #ifdef OPTIONS_IN_HOME
1.1.1.6 root 390: /* sam: if not found in $HOME then look in current directory */
1.1.1.3 root 391: strcpy (optionsfile, OPTIONSFILENAME);
1.1.1.6 root 392: cfgfile_load (&currprefs, optionsfile);
1.1.1.2 root 393: #endif
1.1.1.17! root 394: }
1.1.1.2 root 395:
1.1.1.6 root 396: parse_cmdline (argc, argv);
1.1 root 397: }
398:
1.1.1.4 root 399: void reset_all_systems (void)
400: {
1.1.1.14 root 401: init_eventtab ();
402:
403: memory_reset ();
1.1.1.6 root 404: bsdlib_reset ();
1.1.1.4 root 405: filesys_reset ();
406: filesys_start_threads ();
1.1.1.8 root 407: scsidev_reset ();
408: scsidev_start_threads ();
1.1.1.4 root 409: }
410:
1.1.1.2 root 411: /* Okay, this stuff looks strange, but it is here to encourage people who
412: * port UAE to re-use as much of this code as possible. Functions that you
413: * should be using are do_start_program() and do_leave_program(), as well
414: * as real_main(). Some OSes don't call main() (which is braindamaged IMHO,
415: * but unfortunately very common), so you need to call real_main() from
416: * whatever entry point you have. You may want to write your own versions
417: * of start_program() and leave_program() if you need to do anything special.
418: * Add #ifdefs around these as appropriate.
419: */
420:
1.1.1.4 root 421: void do_start_program (void)
1.1.1.2 root 422: {
1.1.1.3 root 423: /* Do a reset on startup. Whether this is elegant is debatable. */
424: quit_program = 2;
1.1.1.4 root 425: m68k_go (1);
1.1.1.2 root 426: }
427:
1.1.1.4 root 428: void do_leave_program (void)
1.1.1.2 root 429: {
1.1.1.4 root 430: graphics_leave ();
431: close_joystick ();
432: close_sound ();
433: dump_counts ();
434: serial_exit ();
435: zfile_exit ();
436: if (! no_gui)
437: gui_exit ();
1.1.1.15 root 438: #ifdef USE_SDL
439: SDL_Quit ();
440: #endif
441: expansion_cleanup ();
442: memory_cleanup ();
1.1.1.2 root 443: }
444:
1.1.1.4 root 445: void start_program (void)
1.1.1.2 root 446: {
1.1.1.4 root 447: do_start_program ();
1.1.1.2 root 448: }
449:
1.1.1.4 root 450: void leave_program (void)
1.1.1.2 root 451: {
1.1.1.4 root 452: do_leave_program ();
1.1.1.2 root 453: }
454:
1.1.1.4 root 455: void real_main (int argc, char **argv)
1.1 root 456: {
457: FILE *hf;
458:
1.1.1.15 root 459: #ifdef USE_SDL
460: SDL_Init (SDL_INIT_EVERYTHING | SDL_INIT_NOPARACHUTE);
461: #endif
462:
1.1.1.6 root 463: default_prefs (&currprefs);
1.1.1.3 root 464:
1.1.1.4 root 465: if (! graphics_setup ()) {
466: exit (1);
1.1 root 467: }
1.1.1.2 root 468:
1.1 root 469: rtarea_init ();
470: hardfile_install ();
1.1.1.8 root 471: scsidev_install ();
1.1.1.13 root 472: ahi_install ();
1.1 root 473:
1.1.1.4 root 474: parse_cmdline_and_init_file (argc, argv);
1.1.1.2 root 475:
1.1.1.4 root 476: machdep_init ();
1.1.1.3 root 477:
1.1.1.4 root 478: if (! setup_sound ()) {
1.1.1.16 root 479: write_log ("Sound driver unavailable: Sound output disabled\n");
1.1.1.3 root 480: currprefs.produce_sound = 0;
1.1 root 481: }
1.1.1.4 root 482: init_joystick ();
1.1 root 483:
1.1.1.15 root 484: changed_prefs = currprefs;
1.1.1.6 root 485: no_gui = ! currprefs.start_gui;
1.1.1.4 root 486: if (! no_gui) {
487: int err = gui_init ();
1.1.1.15 root 488: currprefs = changed_prefs;
1.1.1.2 root 489: if (err == -1) {
1.1.1.16 root 490: write_log ("Failed to initialize the GUI\n");
1.1.1.2 root 491: } else if (err == -2) {
1.1.1.4 root 492: exit (0);
1.1.1.2 root 493: }
1.1 root 494: }
1.1.1.13 root 495: if (sound_available && currprefs.produce_sound > 1 && ! init_audio ()) {
1.1.1.16 root 496: write_log ("Sound driver unavailable: Sound output disabled\n");
1.1.1.3 root 497: currprefs.produce_sound = 0;
498: }
1.1.1.2 root 499:
1.1.1.4 root 500: fix_options ();
1.1.1.3 root 501: changed_prefs = currprefs;
502:
1.1.1.2 root 503: /* Install resident module to get 8MB chipmem, if requested */
1.1.1.4 root 504: rtarea_setup ();
1.1.1.3 root 505:
1.1.1.4 root 506: keybuf_init (); /* Must come after init_joystick */
1.1.1.3 root 507:
1.1 root 508: expansion_init ();
1.1.1.4 root 509: memory_init ();
510:
511: filesys_install ();
512: gfxlib_install ();
513: emulib_install ();
514: uaeexe_install ();
1.1.1.8 root 515: native2amiga_install ();
1.1.1.4 root 516:
517: custom_init (); /* Must come after memory_init */
518: serial_init ();
519: DISK_init ();
520:
521: reset_frame_rate_hack ();
522: init_m68k(); /* must come after reset_frame_rate_hack (); */
1.1 root 523:
1.1.1.4 root 524: compiler_init ();
525: gui_update ();
1.1.1.2 root 526:
1.1.1.3 root 527: if (graphics_init ()) {
528: setup_brkhandler ();
1.1.1.6 root 529: if (currprefs.start_debugger && debuggable ())
1.1.1.3 root 530: activate_debugger ();
531:
532: start_program ();
1.1 root 533: }
1.1.1.3 root 534: leave_program ();
1.1.1.2 root 535: }
536:
1.1.1.3 root 537: #ifndef NO_MAIN_IN_MAIN_C
1.1.1.4 root 538: int main (int argc, char **argv)
1.1.1.2 root 539: {
1.1.1.4 root 540: real_main (argc, argv);
1.1 root 541: return 0;
542: }
1.1.1.3 root 543: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.