diff options
| author | Kenichi Handa | 2010-07-12 11:28:50 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-07-12 11:28:50 +0900 |
| commit | 2300368463c9719839a0289cd6dccaa93d3274cf (patch) | |
| tree | d3e5e3b91444fb135bdedf40d0b4f597d47b40de /lib-src | |
| parent | 892dd5657e548f66bbcfb07a9556cc5fc9f17b8d (diff) | |
| parent | f479ef6e6f5c77ba0f1f6b60c1146f324d604e92 (diff) | |
| download | emacs-2300368463c9719839a0289cd6dccaa93d3274cf.tar.gz emacs-2300368463c9719839a0289cd6dccaa93d3274cf.zip | |
merge trunk
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 20 | ||||
| -rw-r--r-- | lib-src/Makefile.in | 2 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 6 | ||||
| -rw-r--r-- | lib-src/make-docfile.c | 103 | ||||
| -rw-r--r-- | lib-src/makefile.w32-in | 8 | ||||
| -rw-r--r-- | lib-src/movemail.c | 10 | ||||
| -rw-r--r-- | lib-src/pop.c | 4 |
7 files changed, 74 insertions, 79 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 4cbf5dd50f1..d0410f4c080 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | 2010-07-11 Andreas Schwab <schwab@linux-m68k.org> | ||
| 2 | |||
| 3 | * emacsclient.c (set_local_socket): Use strchr, strrchr instead of | ||
| 4 | index, rindex. | ||
| 5 | * movemail.c (mail_spool_name, popmail): Likewise. | ||
| 6 | * pop.c (pop_list): Likewise. | ||
| 7 | |||
| 8 | 2010-07-11 Eli Zaretskii <eliz@gnu.org> | ||
| 9 | |||
| 10 | * makefile.w32-in (obj): Add menu.o, bidi.o, w32uniscrobe.o, | ||
| 11 | and unexw32.o. (Bug#6603) | ||
| 12 | |||
| 13 | 2010-07-10 Eli Zaretskii <eliz@gnu.org> | ||
| 14 | |||
| 15 | * Makefile.in ($(DESTDIR)${archlibdir}): Convert spaces to TABs. | ||
| 16 | |||
| 17 | 2010-07-09 Andreas Schwab <schwab@linux-m68k.org> | ||
| 18 | |||
| 19 | * make-docfile.c (write_c_args): Restructure scanning loop. | ||
| 20 | |||
| 1 | 2010-07-09 Dan Nicolaescu <dann@ics.uci.edu> | 21 | 2010-07-09 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 22 | ||
| 3 | * make-docfile.c (write_c_args): Deal with type names in DEFUN | 23 | * make-docfile.c (write_c_args): Deal with type names in DEFUN |
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 264f14b1d49..b5c557d8c7b 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -245,7 +245,7 @@ $(DESTDIR)${archlibdir}: all | |||
| 245 | chown ${gameuser} $(DESTDIR)${gamedir}; \ | 245 | chown ${gameuser} $(DESTDIR)${gamedir}; \ |
| 246 | chmod u=rwx,g=rwx,o=rx $(DESTDIR)${gamedir}; \ | 246 | chmod u=rwx,g=rwx,o=rx $(DESTDIR)${gamedir}; \ |
| 247 | fi | 247 | fi |
| 248 | if [ `(cd $(DESTDIR)${archlibdir} && /bin/pwd)` \ | 248 | if [ `(cd $(DESTDIR)${archlibdir} && /bin/pwd)` \ |
| 249 | != `(cd ${srcdir} && /bin/pwd)` ]; then \ | 249 | != `(cd ${srcdir} && /bin/pwd)` ]; then \ |
| 250 | for file in ${SCRIPTS}; do \ | 250 | for file in ${SCRIPTS}; do \ |
| 251 | $(INSTALL_SCRIPT) ${srcdir}/$$file $(DESTDIR)${archlibdir}/$$file; \ | 251 | $(INSTALL_SCRIPT) ${srcdir}/$$file $(DESTDIR)${archlibdir}/$$file; \ |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index cb8a4ebcaf8..79143ff7a34 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -1234,8 +1234,10 @@ set_local_socket (void) | |||
| 1234 | char *server_name = "server"; | 1234 | char *server_name = "server"; |
| 1235 | char *tmpdir; | 1235 | char *tmpdir; |
| 1236 | 1236 | ||
| 1237 | if (socket_name && !index (socket_name, '/') && !index (socket_name, '\\')) | 1237 | if (socket_name && !strchr (socket_name, '/') |
| 1238 | { /* socket_name is a file name component. */ | 1238 | && !strchr (socket_name, '\\')) |
| 1239 | { | ||
| 1240 | /* socket_name is a file name component. */ | ||
| 1239 | server_name = socket_name; | 1241 | server_name = socket_name; |
| 1240 | socket_name = NULL; | 1242 | socket_name = NULL; |
| 1241 | default_sock = 1; /* Try both UIDs. */ | 1243 | default_sock = 1; /* Try both UIDs. */ |
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 3df7ec607d9..51c30f91d8f 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c | |||
| @@ -440,8 +440,8 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs) | |||
| 440 | { | 440 | { |
| 441 | register char *p; | 441 | register char *p; |
| 442 | int in_ident = 0; | 442 | int in_ident = 0; |
| 443 | int just_spaced = 0; | 443 | char *ident_start; |
| 444 | int need_space = 1; | 444 | int ident_length; |
| 445 | 445 | ||
| 446 | fprintf (out, "(fn"); | 446 | fprintf (out, "(fn"); |
| 447 | 447 | ||
| @@ -450,25 +450,9 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs) | |||
| 450 | 450 | ||
| 451 | for (p = buf; *p; p++) | 451 | for (p = buf; *p; p++) |
| 452 | { | 452 | { |
| 453 | char c; | 453 | char c = *p; |
| 454 | int ident_start = 0; | ||
| 455 | 454 | ||
| 456 | /* FIXME: this must be made a bit more robust*/ | 455 | /* Notice when a new identifier starts. */ |
| 457 | |||
| 458 | /* Skip "register Lisp_Object", this can be removed when we get | ||
| 459 | rid of "register" for DEFUNs. */ | ||
| 460 | if (strncmp ("register Lisp_Object", p, 20) == 0) | ||
| 461 | p += 20; | ||
| 462 | |||
| 463 | if (strncmp ("Lisp_Object", p, 11) == 0) | ||
| 464 | p += 11; | ||
| 465 | |||
| 466 | if (strncmp ("void", p, 4) == 0) | ||
| 467 | p += 4; | ||
| 468 | |||
| 469 | c = *p; | ||
| 470 | |||
| 471 | /* Notice when we start printing a new identifier. */ | ||
| 472 | if ((('A' <= c && c <= 'Z') | 456 | if ((('A' <= c && c <= 'Z') |
| 473 | || ('a' <= c && c <= 'z') | 457 | || ('a' <= c && c <= 'z') |
| 474 | || ('0' <= c && c <= '9') | 458 | || ('0' <= c && c <= '9') |
| @@ -478,55 +462,50 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs) | |||
| 478 | if (!in_ident) | 462 | if (!in_ident) |
| 479 | { | 463 | { |
| 480 | in_ident = 1; | 464 | in_ident = 1; |
| 481 | ident_start = 1; | 465 | ident_start = p; |
| 482 | |||
| 483 | if (need_space) | ||
| 484 | putc (' ', out); | ||
| 485 | |||
| 486 | if (minargs == 0 && maxargs > 0) | ||
| 487 | fprintf (out, "&optional "); | ||
| 488 | just_spaced = 1; | ||
| 489 | |||
| 490 | minargs--; | ||
| 491 | maxargs--; | ||
| 492 | } | 466 | } |
| 493 | else | 467 | else |
| 494 | in_ident = 0; | 468 | { |
| 469 | in_ident = 0; | ||
| 470 | ident_length = p - ident_start; | ||
| 471 | } | ||
| 495 | } | 472 | } |
| 496 | 473 | ||
| 497 | /* Print the C argument list as it would appear in lisp: | 474 | /* Found the end of an argument, write out the last seen |
| 498 | print underscores as hyphens, and print commas and newlines | 475 | identifier. */ |
| 499 | as spaces. Collapse adjacent spaces into one. */ | 476 | if (c == ',' || c == ')') |
| 500 | if (c == '_') | ||
| 501 | c = '-'; | ||
| 502 | else if (c == ',' || c == '\n') | ||
| 503 | c = ' '; | ||
| 504 | |||
| 505 | /* In C code, `default' is a reserved word, so we spell it | ||
| 506 | `defalt'; unmangle that here. */ | ||
| 507 | if (ident_start | ||
| 508 | && strncmp (p, "defalt", 6) == 0 | ||
| 509 | && ! (('A' <= p[6] && p[6] <= 'Z') | ||
| 510 | || ('a' <= p[6] && p[6] <= 'z') | ||
| 511 | || ('0' <= p[6] && p[6] <= '9') | ||
| 512 | || p[6] == '_')) | ||
| 513 | { | ||
| 514 | fprintf (out, "DEFAULT"); | ||
| 515 | p += 5; | ||
| 516 | in_ident = 0; | ||
| 517 | just_spaced = 0; | ||
| 518 | } | ||
| 519 | else if (c != ' ' || !just_spaced) | ||
| 520 | { | 477 | { |
| 521 | if (c >= 'a' && c <= 'z') | 478 | if (strncmp (ident_start, "void", ident_length) == 0) |
| 522 | /* Upcase the letter. */ | 479 | continue; |
| 523 | c += 'A' - 'a'; | 480 | |
| 524 | putc (c, out); | 481 | putc (' ', out); |
| 525 | } | 482 | |
| 483 | if (minargs == 0 && maxargs > 0) | ||
| 484 | fprintf (out, "&optional "); | ||
| 526 | 485 | ||
| 527 | just_spaced = c == ' '; | 486 | minargs--; |
| 528 | need_space = 0; | 487 | maxargs--; |
| 488 | |||
| 489 | /* In C code, `default' is a reserved word, so we spell it | ||
| 490 | `defalt'; unmangle that here. */ | ||
| 491 | if (strncmp (ident_start, "defalt", ident_length) == 0) | ||
| 492 | fprintf (out, "DEFAULT"); | ||
| 493 | else | ||
| 494 | while (ident_length-- > 0) | ||
| 495 | { | ||
| 496 | c = *ident_start++; | ||
| 497 | if (c >= 'a' && c <= 'z') | ||
| 498 | /* Upcase the letter. */ | ||
| 499 | c += 'A' - 'a'; | ||
| 500 | else if (c == '_') | ||
| 501 | /* Print underscore as hyphen. */ | ||
| 502 | c = '-'; | ||
| 503 | putc (c, out); | ||
| 504 | } | ||
| 505 | } | ||
| 529 | } | 506 | } |
| 507 | |||
| 508 | putc (')', out); | ||
| 530 | } | 509 | } |
| 531 | 510 | ||
| 532 | /* Read through a c file. If a .o file is named, | 511 | /* Read through a c file. If a .o file is named, |
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index cad3b838208..fbcab0183ce 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in | |||
| @@ -143,11 +143,11 @@ $(BLD)/ctags.$(O): ctags.c | |||
| 143 | # | 143 | # |
| 144 | obj = dosfns.o msdos.o \ | 144 | obj = dosfns.o msdos.o \ |
| 145 | xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \ | 145 | xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \ |
| 146 | fontset.o \ | 146 | fontset.o menu.o \ |
| 147 | w32.o w32console.o w32fns.o w32heap.o w32inevt.o \ | 147 | w32.o w32console.o w32fns.o w32heap.o w32inevt.o \ |
| 148 | w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \ | 148 | w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \ |
| 149 | font.o w32font.o \ | 149 | font.o w32font.o w32uniscribe.o \ |
| 150 | dispnew.o frame.o scroll.o xdisp.o window.o \ | 150 | dispnew.o frame.o scroll.o xdisp.o window.o bidi.o \ |
| 151 | charset.o coding.o category.o ccl.o character.o chartab.o \ | 151 | charset.o coding.o category.o ccl.o character.o chartab.o \ |
| 152 | cm.o term.o terminal.o xfaces.o \ | 152 | cm.o term.o terminal.o xfaces.o \ |
| 153 | emacs.o keyboard.o macros.o keymap.o sysdep.o \ | 153 | emacs.o keyboard.o macros.o keymap.o sysdep.o \ |
| @@ -157,7 +157,7 @@ obj = dosfns.o msdos.o \ | |||
| 157 | alloc.o data.o doc.o editfns.o callint.o \ | 157 | alloc.o data.o doc.o editfns.o callint.o \ |
| 158 | eval.o floatfns.o fns.o print.o lread.o \ | 158 | eval.o floatfns.o fns.o print.o lread.o \ |
| 159 | syntax.o bytecode.o \ | 159 | syntax.o bytecode.o \ |
| 160 | process.o callproc.o \ | 160 | process.o callproc.o unexw32.o \ |
| 161 | region-cache.o sound.o atimer.o \ | 161 | region-cache.o sound.o atimer.o \ |
| 162 | doprnt.o strftime.o intervals.o textprop.o composite.o md5.o | 162 | doprnt.o strftime.o intervals.o textprop.o composite.o md5.o |
| 163 | 163 | ||
diff --git a/lib-src/movemail.c b/lib-src/movemail.c index dfa4a92d057..541edf545df 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c | |||
| @@ -146,12 +146,6 @@ static char *mail_spool_name (); | |||
| 146 | #ifndef HAVE_STRERROR | 146 | #ifndef HAVE_STRERROR |
| 147 | char *strerror (int); | 147 | char *strerror (int); |
| 148 | #endif | 148 | #endif |
| 149 | #ifdef HAVE_INDEX | ||
| 150 | extern char *index (const char *, int); | ||
| 151 | #endif | ||
| 152 | #ifdef HAVE_RINDEX | ||
| 153 | extern char *rindex (const char *, int); | ||
| 154 | #endif | ||
| 155 | 149 | ||
| 156 | static void fatal (char *s1, char *s2, char *s3); | 150 | static void fatal (char *s1, char *s2, char *s3); |
| 157 | static void error (char *s1, char *s2, char *s3); | 151 | static void error (char *s1, char *s2, char *s3); |
| @@ -564,7 +558,7 @@ mail_spool_name (inname) | |||
| 564 | char *indir, *fname; | 558 | char *indir, *fname; |
| 565 | int status; | 559 | int status; |
| 566 | 560 | ||
| 567 | if (! (fname = rindex (inname, '/'))) | 561 | if (! (fname = strrchr (inname, '/'))) |
| 568 | return NULL; | 562 | return NULL; |
| 569 | 563 | ||
| 570 | fname++; | 564 | fname++; |
| @@ -714,7 +708,7 @@ popmail (char *mailbox, char *outfile, int preserve, char *password, int reverse | |||
| 714 | char *user, *hostname; | 708 | char *user, *hostname; |
| 715 | 709 | ||
| 716 | user = mailbox; | 710 | user = mailbox; |
| 717 | if ((hostname = index(mailbox, ':'))) | 711 | if ((hostname = strchr (mailbox, ':'))) |
| 718 | *hostname++ = '\0'; | 712 | *hostname++ = '\0'; |
| 719 | 713 | ||
| 720 | server = pop_open (hostname, user, password, POP_NO_GETPASS); | 714 | server = pop_open (hostname, user, password, POP_NO_GETPASS); |
diff --git a/lib-src/pop.c b/lib-src/pop.c index 9eaefa4cb83..26a992fa0b0 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c | |||
| @@ -465,7 +465,7 @@ pop_list (popserver server, int message, int **IDs, int **sizes) | |||
| 465 | return (-1); | 465 | return (-1); |
| 466 | } | 466 | } |
| 467 | (*IDs)[0] = atoi (&fromserver[4]); | 467 | (*IDs)[0] = atoi (&fromserver[4]); |
| 468 | fromserver = index (&fromserver[4], ' '); | 468 | fromserver = strchr (&fromserver[4], ' '); |
| 469 | if (! fromserver) | 469 | if (! fromserver) |
| 470 | { | 470 | { |
| 471 | strcpy (pop_error, | 471 | strcpy (pop_error, |
| @@ -496,7 +496,7 @@ pop_list (popserver server, int message, int **IDs, int **sizes) | |||
| 496 | return (-1); | 496 | return (-1); |
| 497 | } | 497 | } |
| 498 | (*IDs)[i] = atoi (fromserver); | 498 | (*IDs)[i] = atoi (fromserver); |
| 499 | fromserver = index (fromserver, ' '); | 499 | fromserver = strchr (fromserver, ' '); |
| 500 | if (! fromserver) | 500 | if (! fromserver) |
| 501 | { | 501 | { |
| 502 | strcpy (pop_error, | 502 | strcpy (pop_error, |