comparison src/emacs.c @ 78:c7528f8e288d r20-0b34

Import from CVS: tag r20-0b34
author cvs
date Mon, 13 Aug 2007 09:05:42 +0200
parents 131b0175ea99
children 1ce6082ce73f
comparison
equal deleted inserted replaced
77:6cb4f478e7bc 78:c7528f8e288d
1555 int *options = (int *) xmalloc (sizeof (int) * argc); 1555 int *options = (int *) xmalloc (sizeof (int) * argc);
1556 int *priority = (int *) xmalloc (sizeof (int) * argc); 1556 int *priority = (int *) xmalloc (sizeof (int) * argc);
1557 int to = 1; 1557 int to = 1;
1558 int from; 1558 int from;
1559 int i; 1559 int i;
1560 int end_of_options_p = 0;
1560 1561
1561 /* Categorize all the options, 1562 /* Categorize all the options,
1562 and figure out which argv elts are option arguments. */ 1563 and figure out which argv elts are option arguments. */
1563 for (from = 1; from < argc; from++) 1564 for (from = 1; from < argc; from++)
1564 { 1565 {
1565 options[from] = -1; 1566 options[from] = -1;
1566 priority[from] = 0; 1567 priority[from] = 0;
1567 if (argv[from][0] == '-') 1568 /* Pseudo options "--" and "run-temacs" indicate end of options */
1569 if (!strcmp (argv[from], "--") ||
1570 !strcmp (argv[from], "run-temacs"))
1571 end_of_options_p = 1;
1572 if (!end_of_options_p && argv[from][0] == '-')
1568 { 1573 {
1569 int match, thislen; 1574 int match, thislen;
1570 char *equals; 1575 char *equals;
1571 1576
1572 /* Look for a match with a known old-fashioned option. */ 1577 /* Look for a match with a known old-fashioned option. */
1758 #endif /* QUANTIFY */ 1763 #endif /* QUANTIFY */
1759 1764
1760 suppress_early_backtrace = 0; 1765 suppress_early_backtrace = 0;
1761 lim_data = 0; /* force reinitialization of this variable */ 1766 lim_data = 0; /* force reinitialization of this variable */
1762 1767
1763 if (sizeof (Lisp_Object) != sizeof (void *)) 1768 /* Lisp_Object must fit in a word; check VALBITS and GCTYPEBITS */
1764 abort (); /* Lisp_Object must fit in a word; 1769 assert (sizeof (Lisp_Object) == sizeof (void *));
1765 check VALBITS and GCTYPEBITS */ 1770
1766 if (!initialized) 1771 if (!initialized)
1767 { 1772 {
1768 run_temacs_argc = 0; 1773 run_temacs_argc = 0;
1769 if (! SETJMP (run_temacs_catch)) 1774 if (! SETJMP (run_temacs_catch))
1770 main_1 (vol_argc, vol_argv, vol_envp); 1775 main_1 (vol_argc, vol_argv, vol_envp);
1771 /* run-emacs-from-temacs called */ 1776 /* run-emacs-from-temacs called */
1772 vol_argc = run_temacs_argc; 1777 vol_argc = run_temacs_argc;
1773 run_temacs_argc = 0; 1778 vol_argv = run_temacs_argv;
1774 vol_argv = run_temacs_argv;
1775 #ifdef _SCO_DS 1779 #ifdef _SCO_DS
1776 /* 1780 /* This makes absolutely no sense to anyone involved. There are
1777 This makes absolutely no sense to anyone involved. 1781 several people using this stuff. We've compared versions on
1778 There are several people using this stuff. We've 1782 everything we can think of. We can find no difference.
1779 compared versions on everything we can think of. We 1783 However, on both my systems environ is a plain old global
1780 can find no difference. However, on both my systems 1784 variable initialized to zero. _environ is the one that
1781 environ is a plain old global variable initialized to 1785 contains pointers to the actual environment.
1782 zero. _environ is the one that contains pointers to 1786
1783 the actual environment. 1787 Since we can't figure out the difference (and we're hours
1784 Since we can't figure out the difference (and we're 1788 away from a release), this takes a very cowardly approach and
1785 hours away from a release), this takes a very cowardly 1789 is bracketed with both a system specific preprocessor test
1786 approach and is bracketed with both a system specific 1790 and a runtime "do you have this problem" test
1787 preprocessor test and a runtime "do you have this 1791
1788 problem" test 1792 06/20/96 robertl@dgii.com */
1789 06/20/96 robertl@dgii.com 1793 {
1790 */ 1794 extern char *_environ;
1791 { 1795 if ((unsigned) environ == 0)
1792 extern char *_environ ; 1796 environ=_environ;
1793 if ((unsigned) environ == 0) 1797 }
1794 environ=_environ;
1795 }
1796 #endif /* _SCO_DS */ 1798 #endif /* _SCO_DS */
1797 vol_envp = environ; 1799 vol_envp = environ;
1798 } 1800 }
1799 run_temacs_argc = -1; 1801 run_temacs_argc = -1;
1800 1802