LUSHAPI int main(int argc, char **argv) { /* Skip options and define quiet mode if there are remaining arguments. */ int i = 1; int quiet = FALSE; if (i<argc && argv[i][0]=='@') i++; while (i<argc && argv[i][0]=='-') i++; if (i < argc) quiet = TRUE; lush_argc = argc; lush_argv = argv; /* Setup locale */ #if HAVE_SETLOCALE && defined(LC_ALL) setlocale(LC_ALL,""); setlocale(LC_NUMERIC,"C"); #endif /* Message */ if (! quiet) { FMODE_TEXT(stderr); fprintf(stderr,"LUSH Lisp Universal Shell" #ifdef __DATE__ " (compiled on " __DATE__ ")" #endif "\n"); fprintf(stderr, " Copyright (C) 2002 Leon Bottou, Yann LeCun, AT&T, NECI.\n" " Includes parts of TL3:\n" " Copyright (C) 1987-1999 Leon Bottou and Neuristique.\n" " Includes selected parts of SN3.2:\n" " Copyright (C) 1991-2001 AT&T Corp.\n" "This program is free software distributed under the terms\n" "of the GNU Public Licence (GPL) with ABSOLUTELY NO WARRANTY.\n" "Type `(helptool)' for details.\n"); } /* Start */ FMODE_BINARY(stderr); init_lush(argv[0]); start_lisp(argc, argv, quiet); return 0; }
LUSHAPI int main(int argc, char **argv) { /* Call inits of support code */ api_init_tables(); /* Define quiet mode. */ bool quiet = false; int i = 1; if (i<argc && argv[i][0]=='@') i++; while (i<argc && argv[i][0]=='-') i++; if (i < argc) quiet = true; lush_argc = argc; lush_argv = argv; /* Setup locale */ #if HAVE_SETLOCALE && defined(LC_ALL) setlocale(LC_ALL,""); setlocale(LC_NUMERIC,"C"); #endif /* Message */ if (! quiet) { FMODE_TEXT(stderr); fprintf(stderr, "\n"); fprintf(stderr, " LUSH Lisp Universal Shell " PACKAGE_VERSION #ifdef __DATE__ " (built " __DATE__ ")" #endif "\n" " Copyright (C) 2010 Leon Bottou, Yann LeCun, Ralf Juengling.\n" " Copyright (C) 2002 Leon Bottou, Yann LeCun, AT&T Corp, NECI.\n" " Includes parts of TL3:\n" " Copyright (C) 1987-1999 Leon Bottou and Neuristique.\n" " Includes selected parts of SN3.2:\n" " Copyright (C) 1991-2001 AT&T Corp.\n" "\n" "This program is free software distributed under the terms of\n" "the Lesser GNU Public Licence (LGPL) with ABSOLUTELY NO WARRANTY.\n" "\n" "Type '(helptool)' to get started.\n"); } /* Start */ FMODE_BINARY(stderr); //FILE *mmlog = fopen("lushmm.log", "w"); FILE *mmlog = NULL; MM_INIT((1<<12) * sizeof(struct at), (notify_func_t *)run_notifiers, mmlog); MM_ENTER; init_lush(argv[0]); register_poll_functions(mm_spoll, 0, 0, 0, 0); start_lisp(argc, argv, quiet); MM_EXIT; if (mmlog) fclose(mmlog); return 0; }