diff options
| author | Stefan Monnier | 2010-08-11 07:42:48 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-08-11 07:42:48 +0200 |
| commit | c566235d981eba73c88bbff00b6a1d88360b6e9f (patch) | |
| tree | f8d653add3570fe750a83d1123ed35022e0bf4ef /lib-src | |
| parent | 0bfdb86f425a88fe43ebc88851c6f9a6418e1862 (diff) | |
| parent | 490b89acab3e759426ede25c31c94268df55e925 (diff) | |
| download | emacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.tar.gz emacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.zip | |
Merge from trunk
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 52 | ||||
| -rw-r--r-- | lib-src/b2m.c | 2 | ||||
| -rw-r--r-- | lib-src/ebrowse.c | 3 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 52 | ||||
| -rw-r--r-- | lib-src/etags.c | 6 | ||||
| -rw-r--r-- | lib-src/fakemail.c | 2 | ||||
| -rw-r--r-- | lib-src/hexl.c | 2 | ||||
| -rw-r--r-- | lib-src/make-docfile.c | 11 | ||||
| -rw-r--r-- | lib-src/movemail.c | 6 | ||||
| -rw-r--r-- | lib-src/ntlib.h | 12 | ||||
| -rw-r--r-- | lib-src/update-game-score.c | 2 |
11 files changed, 96 insertions, 54 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 1b6a16dd524..6ac9bf19a24 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,47 @@ | |||
| 1 | 2010-08-07 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * ebrowse.c (usage, version, mark_virtual): | ||
| 4 | Remove duplicate declarations. | ||
| 5 | |||
| 6 | 2010-08-06 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 7 | |||
| 8 | * emacsclient.c: Move socket related #includes together with the | ||
| 9 | rest of the #includes. Move a WINDOWSNT includes closer together. | ||
| 10 | (HAVE_CONFIG_H): Remove. | ||
| 11 | (NO_RETURN): Remove, defined in config.h. | ||
| 12 | (main): Convert definition to standard C. | ||
| 13 | |||
| 14 | 2010-07-29 Juanma Barranquero <lekktu@gmail.com> | ||
| 15 | |||
| 16 | * make-docfile.c (write_c_args): Warn for old-style empty arglist (). | ||
| 17 | |||
| 18 | 2010-07-25 Juanma Barranquero <lekktu@gmail.com> | ||
| 19 | |||
| 20 | * emacsclient.c (getcwd): Fix previous change: make getcwd | ||
| 21 | conditional on HAVE_GETCWD and declare with the correct POSIX | ||
| 22 | profile (for some reason MinGW headers define its 2nd arg as int, | ||
| 23 | not size_t; but getcwd is not used on Windows nonetheless). | ||
| 24 | |||
| 25 | 2010-07-25 Juanma Barranquero <lekktu@gmail.com> | ||
| 26 | |||
| 27 | * emacsclient.c (getcwd, w32_getenv): | ||
| 28 | * ntlib.h (getlogin, getuid, getegid, getgid): Fix prototypes. | ||
| 29 | |||
| 30 | 2010-07-24 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 31 | |||
| 32 | * update-game-score.c (usage): Add NO_RETURN specifier. | ||
| 33 | * movemail.c (fatal, pfatal_with_name, pfatal_and_delete): | ||
| 34 | * make-docfile.c (fatal): | ||
| 35 | * hexl.c (usage): | ||
| 36 | * fakemail.c (fatal): | ||
| 37 | * etags.c (fatal, suggest_asking_for_help, pfatal): | ||
| 38 | * emacsclient.c (fatal): | ||
| 39 | * b2m.c (fatal): Likewise. | ||
| 40 | |||
| 41 | 2010-07-23 Juanma Barranquero <lekktu@gmail.com> | ||
| 42 | |||
| 43 | * make-docfile.c (write_c_args): Correctly handle prefixes of "defalt". | ||
| 44 | |||
| 1 | 2010-07-20 Juanma Barranquero <lekktu@gmail.com> | 45 | 2010-07-20 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 46 | ||
| 3 | * emacsclient.c (get_current_dir_name, w32_get_resource) | 47 | * emacsclient.c (get_current_dir_name, w32_get_resource) |
| @@ -775,7 +819,7 @@ | |||
| 775 | 819 | ||
| 776 | 2008-02-01 Jason Rumney <jasonr@gnu.org> | 820 | 2008-02-01 Jason Rumney <jasonr@gnu.org> |
| 777 | 821 | ||
| 778 | * makefile.w32-in (obj): Sync with src/Makefile.in | 822 | * makefile.w32-in (obj): Sync with src/Makefile.in. |
| 779 | (TOOLTIP_SUPPORT, WINDOW_SUPPORT): New definitions. | 823 | (TOOLTIP_SUPPORT, WINDOW_SUPPORT): New definitions. |
| 780 | (WINNT_SUPPORT): Add term/w32-win.elc. | 824 | (WINNT_SUPPORT): Add term/w32-win.elc. |
| 781 | (lisp1, lisp2): Sync with lisp in src/Makefile.in. | 825 | (lisp1, lisp2): Sync with lisp in src/Makefile.in. |
| @@ -2471,7 +2515,7 @@ | |||
| 2471 | 2515 | ||
| 2472 | * makefile.w32-in (WINNT_SUPPORT, MOUSE_SUPPORT, lisp): Revert to | 2516 | * makefile.w32-in (WINNT_SUPPORT, MOUSE_SUPPORT, lisp): Revert to |
| 2473 | using .elc files. | 2517 | using .elc files. |
| 2474 | (lisp): Sync with list in src/Makefile.in | 2518 | (lisp): Sync with list in src/Makefile.in. |
| 2475 | (VMS_SUPPORT, MSDOS_SUPPORT): Define, so DOC files can be shared. | 2519 | (VMS_SUPPORT, MSDOS_SUPPORT): Define, so DOC files can be shared. |
| 2476 | 2520 | ||
| 2477 | 2002-02-10 Paul Eggert <eggert@twinsun.com> | 2521 | 2002-02-10 Paul Eggert <eggert@twinsun.com> |
| @@ -6313,7 +6357,7 @@ | |||
| 6313 | (TOKEN): Member linestart removed. | 6357 | (TOKEN): Member linestart removed. |
| 6314 | (linepos, prev_linepos, lb1): Deleted. | 6358 | (linepos, prev_linepos, lb1): Deleted. |
| 6315 | (main): Call initbuffer on lbs array instead of lb1. | 6359 | (main): Call initbuffer on lbs array instead of lb1. |
| 6316 | (init): Removed the initialisation of the logical _gd array; | 6360 | (init): Removed the initialisation of the logical _gd array. |
| 6317 | (find_entries): A .sa suffix means assembler file. | 6361 | (find_entries): A .sa suffix means assembler file. |
| 6318 | (C_create_stab): "auto", "void", "extern", "static" are st_C_typespec. | 6362 | (C_create_stab): "auto", "void", "extern", "static" are st_C_typespec. |
| 6319 | All C state machines rewritten. | 6363 | All C state machines rewritten. |
| @@ -7177,7 +7221,7 @@ | |||
| 7177 | * etags.c: Changes for VMS. | 7221 | * etags.c: Changes for VMS. |
| 7178 | Always define ETAGS on VMS. | 7222 | Always define ETAGS on VMS. |
| 7179 | Define macros GOOD and BAD for success and failure exit codes. | 7223 | Define macros GOOD and BAD for success and failure exit codes. |
| 7180 | (begtk, intk): Allow `$' in identifiers | 7224 | (begtk, intk): Allow `$' in identifiers. |
| 7181 | (main): Don't support -B, -F or -u on VMS. | 7225 | (main): Don't support -B, -F or -u on VMS. |
| 7182 | Alternate loop for scanning filename arguments. | 7226 | Alternate loop for scanning filename arguments. |
| 7183 | (system): Delete definition of this function. | 7227 | (system): Delete definition of this function. |
diff --git a/lib-src/b2m.c b/lib-src/b2m.c index 733cd276653..f31b33f9780 100644 --- a/lib-src/b2m.c +++ b/lib-src/b2m.c | |||
| @@ -70,7 +70,7 @@ long *xmalloc (unsigned int size); | |||
| 70 | long *xrealloc (char *ptr, unsigned int size); | 70 | long *xrealloc (char *ptr, unsigned int size); |
| 71 | char *concat (char *s1, char *s2, char *s3); | 71 | char *concat (char *s1, char *s2, char *s3); |
| 72 | long readline (struct linebuffer *linebuffer, register FILE *stream); | 72 | long readline (struct linebuffer *linebuffer, register FILE *stream); |
| 73 | void fatal (char *message); | 73 | void fatal (char *message) NO_RETURN; |
| 74 | 74 | ||
| 75 | /* | 75 | /* |
| 76 | * xnew -- allocate storage. SYNOPSIS: Type *xnew (int n, Type); | 76 | * xnew -- allocate storage. SYNOPSIS: Type *xnew (int n, Type); |
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index a9f7ba4f3a7..40e72939429 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c | |||
| @@ -492,8 +492,6 @@ void register_namespace_alias (char *, struct link *); | |||
| 492 | void insert_keyword (char *, int); | 492 | void insert_keyword (char *, int); |
| 493 | void re_init_scanner (void); | 493 | void re_init_scanner (void); |
| 494 | void init_scanner (void); | 494 | void init_scanner (void); |
| 495 | void usage (int); | ||
| 496 | void version (void); | ||
| 497 | void process_file (char *); | 495 | void process_file (char *); |
| 498 | void add_search_path (char *); | 496 | void add_search_path (char *); |
| 499 | FILE *open_file (char *); | 497 | FILE *open_file (char *); |
| @@ -504,7 +502,6 @@ int dump_tree (FILE *, struct sym *); | |||
| 504 | struct member *find_member (struct sym *, char *, int, int, unsigned); | 502 | struct member *find_member (struct sym *, char *, int, int, unsigned); |
| 505 | struct member *add_member (struct sym *, char *, int, int, unsigned); | 503 | struct member *add_member (struct sym *, char *, int, int, unsigned); |
| 506 | void mark_virtual (struct sym *); | 504 | void mark_virtual (struct sym *); |
| 507 | void mark_virtual (struct sym *); | ||
| 508 | struct sym *make_namespace (char *, struct sym *); | 505 | struct sym *make_namespace (char *, struct sym *); |
| 509 | char *sym_scope (struct sym *); | 506 | char *sym_scope (struct sym *); |
| 510 | char *sym_scope_1 (struct sym *); | 507 | char *sym_scope_1 (struct sym *); |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index bafc7e02720..cbc1dfe3f6a 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -18,9 +18,7 @@ You should have received a copy of the GNU General Public License | |||
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | #ifdef HAVE_CONFIG_H | ||
| 22 | #include <config.h> | 21 | #include <config.h> |
| 23 | #endif | ||
| 24 | 22 | ||
| 25 | #ifdef WINDOWSNT | 23 | #ifdef WINDOWSNT |
| 26 | 24 | ||
| @@ -32,6 +30,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 32 | # include <stdlib.h> | 30 | # include <stdlib.h> |
| 33 | # include <windows.h> | 31 | # include <windows.h> |
| 34 | # include <commctrl.h> | 32 | # include <commctrl.h> |
| 33 | # include <io.h> | ||
| 34 | # include <winsock2.h> | ||
| 35 | 35 | ||
| 36 | # define NO_SOCKETS_IN_FILE_SYSTEM | 36 | # define NO_SOCKETS_IN_FILE_SYSTEM |
| 37 | 37 | ||
| @@ -45,8 +45,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 45 | 45 | ||
| 46 | # ifdef HAVE_INET_SOCKETS | 46 | # ifdef HAVE_INET_SOCKETS |
| 47 | # include <netinet/in.h> | 47 | # include <netinet/in.h> |
| 48 | # ifdef HAVE_SOCKETS | ||
| 49 | # include <sys/types.h> | ||
| 50 | # include <sys/socket.h> | ||
| 51 | # include <sys/un.h> | ||
| 52 | # endif /* HAVE_SOCKETS */ | ||
| 48 | # endif | 53 | # endif |
| 49 | |||
| 50 | # include <arpa/inet.h> | 54 | # include <arpa/inet.h> |
| 51 | 55 | ||
| 52 | # define INVALID_SOCKET -1 | 56 | # define INVALID_SOCKET -1 |
| @@ -67,25 +71,23 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 67 | #include <stdio.h> | 71 | #include <stdio.h> |
| 68 | #include "getopt.h" | 72 | #include "getopt.h" |
| 69 | #ifdef HAVE_UNISTD_H | 73 | #ifdef HAVE_UNISTD_H |
| 70 | #include <unistd.h> | 74 | # include <unistd.h> |
| 71 | #endif | 75 | #endif |
| 72 | 76 | ||
| 73 | #ifdef WINDOWSNT | 77 | #include <pwd.h> |
| 74 | # include <io.h> | ||
| 75 | #else /* not WINDOWSNT */ | ||
| 76 | # include <pwd.h> | ||
| 77 | #endif /* not WINDOWSNT */ | ||
| 78 | #include <sys/stat.h> | 78 | #include <sys/stat.h> |
| 79 | |||
| 80 | #include <signal.h> | 79 | #include <signal.h> |
| 81 | #include <errno.h> | 80 | #include <errno.h> |
| 82 | 81 | ||
| 82 | |||
| 83 | 83 | ||
| 84 | char *getenv (const char *), *getwd (char *); | 84 | char *getenv (const char *), *getwd (char *); |
| 85 | char *(getcwd) (); | 85 | #ifdef HAVE_GETCWD |
| 86 | char *(getcwd) (char *, size_t); | ||
| 87 | #endif | ||
| 86 | 88 | ||
| 87 | #ifdef WINDOWSNT | 89 | #ifdef WINDOWSNT |
| 88 | char *w32_getenv (); | 90 | char *w32_getenv (char *); |
| 89 | #define egetenv(VAR) w32_getenv(VAR) | 91 | #define egetenv(VAR) w32_getenv(VAR) |
| 90 | #else | 92 | #else |
| 91 | #define egetenv(VAR) getenv(VAR) | 93 | #define egetenv(VAR) getenv(VAR) |
| @@ -112,10 +114,6 @@ char *w32_getenv (); | |||
| 112 | #define TRUE 1 | 114 | #define TRUE 1 |
| 113 | #endif | 115 | #endif |
| 114 | 116 | ||
| 115 | #ifndef NO_RETURN | ||
| 116 | #define NO_RETURN | ||
| 117 | #endif | ||
| 118 | |||
| 119 | /* Additional space when allocating buffers for filenames, etc. */ | 117 | /* Additional space when allocating buffers for filenames, etc. */ |
| 120 | #define EXTRA_SPACE 100 | 118 | #define EXTRA_SPACE 100 |
| 121 | 119 | ||
| @@ -158,6 +156,8 @@ char *server_file = NULL; | |||
| 158 | int emacs_pid = 0; | 156 | int emacs_pid = 0; |
| 159 | 157 | ||
| 160 | void print_help_and_exit (void) NO_RETURN; | 158 | void print_help_and_exit (void) NO_RETURN; |
| 159 | void fail (void) NO_RETURN; | ||
| 160 | |||
| 161 | 161 | ||
| 162 | struct option longopts[] = | 162 | struct option longopts[] = |
| 163 | { | 163 | { |
| @@ -400,7 +400,7 @@ w32_set_user_model_id (void) | |||
| 400 | /* On Windows 7 and later, we need to set the user model ID | 400 | /* On Windows 7 and later, we need to set the user model ID |
| 401 | to associate emacsclient launched files with Emacs frames | 401 | to associate emacsclient launched files with Emacs frames |
| 402 | in the UI. */ | 402 | in the UI. */ |
| 403 | shell = LoadLibrary("shell32.dll"); | 403 | shell = LoadLibrary ("shell32.dll"); |
| 404 | if (shell) | 404 | if (shell) |
| 405 | { | 405 | { |
| 406 | set_user_model | 406 | set_user_model |
| @@ -430,7 +430,7 @@ w32_window_app (void) | |||
| 430 | nonconsole apps. Testing for the console title seems to work. */ | 430 | nonconsole apps. Testing for the console title seems to work. */ |
| 431 | window_app = (GetConsoleTitleA (szTitle, MAX_PATH) == 0); | 431 | window_app = (GetConsoleTitleA (szTitle, MAX_PATH) == 0); |
| 432 | if (window_app) | 432 | if (window_app) |
| 433 | InitCommonControls(); | 433 | InitCommonControls (); |
| 434 | } | 434 | } |
| 435 | 435 | ||
| 436 | return window_app; | 436 | return window_app; |
| @@ -481,7 +481,7 @@ ttyname (int fd) | |||
| 481 | void | 481 | void |
| 482 | message (int is_error, char *message, ...) | 482 | message (int is_error, char *message, ...) |
| 483 | { | 483 | { |
| 484 | char msg [2048]; | 484 | char msg[2048]; |
| 485 | va_list args; | 485 | va_list args; |
| 486 | 486 | ||
| 487 | va_start (args, message); | 487 | va_start (args, message); |
| @@ -698,9 +698,7 @@ fail (void) | |||
| 698 | #if !defined (HAVE_SOCKETS) || !defined (HAVE_INET_SOCKETS) | 698 | #if !defined (HAVE_SOCKETS) || !defined (HAVE_INET_SOCKETS) |
| 699 | 699 | ||
| 700 | int | 700 | int |
| 701 | main (argc, argv) | 701 | main (int argc, char **argv) |
| 702 | int argc; | ||
| 703 | char **argv; | ||
| 704 | { | 702 | { |
| 705 | main_argv = argv; | 703 | main_argv = argv; |
| 706 | progname = argv[0]; | 704 | progname = argv[0]; |
| @@ -712,14 +710,6 @@ main (argc, argv) | |||
| 712 | 710 | ||
| 713 | #else /* HAVE_SOCKETS && HAVE_INET_SOCKETS */ | 711 | #else /* HAVE_SOCKETS && HAVE_INET_SOCKETS */ |
| 714 | 712 | ||
| 715 | #ifdef WINDOWSNT | ||
| 716 | # include <winsock2.h> | ||
| 717 | #else | ||
| 718 | # include <sys/types.h> | ||
| 719 | # include <sys/socket.h> | ||
| 720 | # include <sys/un.h> | ||
| 721 | #endif | ||
| 722 | |||
| 723 | #define AUTH_KEY_LENGTH 64 | 713 | #define AUTH_KEY_LENGTH 64 |
| 724 | #define SEND_BUFFER_SIZE 4096 | 714 | #define SEND_BUFFER_SIZE 4096 |
| 725 | 715 | ||
| @@ -1468,7 +1458,7 @@ start_daemon_and_retry_set_socket (void) | |||
| 1468 | pid_t w; | 1458 | pid_t w; |
| 1469 | w = waitpid (dpid, &status, WUNTRACED | WCONTINUED); | 1459 | w = waitpid (dpid, &status, WUNTRACED | WCONTINUED); |
| 1470 | 1460 | ||
| 1471 | if ((w == -1) || !WIFEXITED (status) || WEXITSTATUS(status)) | 1461 | if ((w == -1) || !WIFEXITED (status) || WEXITSTATUS (status)) |
| 1472 | { | 1462 | { |
| 1473 | message (TRUE, "Error: Could not start the Emacs daemon\n"); | 1463 | message (TRUE, "Error: Could not start the Emacs daemon\n"); |
| 1474 | exit (EXIT_FAILURE); | 1464 | exit (EXIT_FAILURE); |
diff --git a/lib-src/etags.c b/lib-src/etags.c index 79475fe9922..b78686dde57 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -406,9 +406,9 @@ static void analyse_regex (char *); | |||
| 406 | static void free_regexps (void); | 406 | static void free_regexps (void); |
| 407 | static void regex_tag_multiline (void); | 407 | static void regex_tag_multiline (void); |
| 408 | static void error (const char *, const char *); | 408 | static void error (const char *, const char *); |
| 409 | static void suggest_asking_for_help (void); | 409 | static void suggest_asking_for_help (void) NO_RETURN; |
| 410 | void fatal (char *, char *); | 410 | void fatal (char *, char *) NO_RETURN; |
| 411 | static void pfatal (char *); | 411 | static void pfatal (char *) NO_RETURN; |
| 412 | static void add_node (node *, node **); | 412 | static void add_node (node *, node **); |
| 413 | 413 | ||
| 414 | static void init (void); | 414 | static void init (void); |
diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c index f4d978b7d11..72e1b7179c0 100644 --- a/lib-src/fakemail.c +++ b/lib-src/fakemail.c | |||
| @@ -147,6 +147,8 @@ static line_list file_preface; | |||
| 147 | static stream_list the_streams; | 147 | static stream_list the_streams; |
| 148 | static boolean no_problems = true; | 148 | static boolean no_problems = true; |
| 149 | 149 | ||
| 150 | static void fatal (char *s1) NO_RETURN; | ||
| 151 | |||
| 150 | extern FILE *popen (const char *, const char *); | 152 | extern FILE *popen (const char *, const char *); |
| 151 | extern int fclose (FILE *), pclose (FILE *); | 153 | extern int fclose (FILE *), pclose (FILE *); |
| 152 | 154 | ||
diff --git a/lib-src/hexl.c b/lib-src/hexl.c index d730cac6814..b31ab812534 100644 --- a/lib-src/hexl.c +++ b/lib-src/hexl.c | |||
| @@ -49,7 +49,7 @@ int base = DEFAULT_BASE, un_flag = FALSE, iso_flag = FALSE, endian = 1; | |||
| 49 | int group_by = DEFAULT_GROUPING; | 49 | int group_by = DEFAULT_GROUPING; |
| 50 | char *progname; | 50 | char *progname; |
| 51 | 51 | ||
| 52 | void usage(void); | 52 | void usage(void) NO_RETURN; |
| 53 | 53 | ||
| 54 | int | 54 | int |
| 55 | main (int argc, char **argv) | 55 | main (int argc, char **argv) |
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 51c30f91d8f..7fe63bed506 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c | |||
| @@ -70,6 +70,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 70 | int scan_file (char *filename); | 70 | int scan_file (char *filename); |
| 71 | int scan_lisp_file (char *filename, char *mode); | 71 | int scan_lisp_file (char *filename, char *mode); |
| 72 | int scan_c_file (char *filename, char *mode); | 72 | int scan_c_file (char *filename, char *mode); |
| 73 | void fatal (char *s1, char *s2) NO_RETURN; | ||
| 73 | 74 | ||
| 74 | #ifdef MSDOS | 75 | #ifdef MSDOS |
| 75 | /* s/msdos.h defines this as sys_chdir, but we're not linking with the | 76 | /* s/msdos.h defines this as sys_chdir, but we're not linking with the |
| @@ -441,7 +442,7 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs) | |||
| 441 | register char *p; | 442 | register char *p; |
| 442 | int in_ident = 0; | 443 | int in_ident = 0; |
| 443 | char *ident_start; | 444 | char *ident_start; |
| 444 | int ident_length; | 445 | int ident_length = 0; |
| 445 | 446 | ||
| 446 | fprintf (out, "(fn"); | 447 | fprintf (out, "(fn"); |
| 447 | 448 | ||
| @@ -475,6 +476,12 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs) | |||
| 475 | identifier. */ | 476 | identifier. */ |
| 476 | if (c == ',' || c == ')') | 477 | if (c == ',' || c == ')') |
| 477 | { | 478 | { |
| 479 | if (ident_length == 0) | ||
| 480 | { | ||
| 481 | error ("empty arg list for `%s' should be (void), not ()", func); | ||
| 482 | continue; | ||
| 483 | } | ||
| 484 | |||
| 478 | if (strncmp (ident_start, "void", ident_length) == 0) | 485 | if (strncmp (ident_start, "void", ident_length) == 0) |
| 479 | continue; | 486 | continue; |
| 480 | 487 | ||
| @@ -488,7 +495,7 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs) | |||
| 488 | 495 | ||
| 489 | /* In C code, `default' is a reserved word, so we spell it | 496 | /* In C code, `default' is a reserved word, so we spell it |
| 490 | `defalt'; unmangle that here. */ | 497 | `defalt'; unmangle that here. */ |
| 491 | if (strncmp (ident_start, "defalt", ident_length) == 0) | 498 | if (ident_length == 6 && strncmp (ident_start, "defalt", 6) == 0) |
| 492 | fprintf (out, "DEFAULT"); | 499 | fprintf (out, "DEFAULT"); |
| 493 | else | 500 | else |
| 494 | while (ident_length-- > 0) | 501 | while (ident_length-- > 0) |
diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 541edf545df..bb4a922014c 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c | |||
| @@ -147,10 +147,10 @@ static char *mail_spool_name (); | |||
| 147 | char *strerror (int); | 147 | char *strerror (int); |
| 148 | #endif | 148 | #endif |
| 149 | 149 | ||
| 150 | static void fatal (char *s1, char *s2, char *s3); | 150 | static void fatal (char *s1, char *s2, char *s3) NO_RETURN; |
| 151 | static void error (char *s1, char *s2, char *s3); | 151 | static void error (char *s1, char *s2, char *s3); |
| 152 | static void pfatal_with_name (char *name); | 152 | static void pfatal_with_name (char *name) NO_RETURN; |
| 153 | static void pfatal_and_delete (char *name); | 153 | static void pfatal_and_delete (char *name) NO_RETURN; |
| 154 | static char *concat (char *s1, char *s2, char *s3); | 154 | static char *concat (char *s1, char *s2, char *s3); |
| 155 | static long *xmalloc (unsigned int size); | 155 | static long *xmalloc (unsigned int size); |
| 156 | #ifdef MAIL_USE_POP | 156 | #ifdef MAIL_USE_POP |
diff --git a/lib-src/ntlib.h b/lib-src/ntlib.h index fd51269fdfd..4dd6a32ee32 100644 --- a/lib-src/ntlib.h +++ b/lib-src/ntlib.h | |||
| @@ -30,14 +30,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | #ifdef sleep | 30 | #ifdef sleep |
| 31 | #undef sleep | 31 | #undef sleep |
| 32 | #endif | 32 | #endif |
| 33 | void sleep(unsigned long seconds); | 33 | void sleep (unsigned long seconds); |
| 34 | char *getwd (char *dir); | 34 | char *getwd (char *dir); |
| 35 | int getppid(void); | 35 | int getppid (void); |
| 36 | char * getlogin (); | 36 | char * getlogin (void); |
| 37 | char * cuserid (char * s); | 37 | char * cuserid (char * s); |
| 38 | unsigned getuid (); | 38 | unsigned getuid (void); |
| 39 | unsigned getegid (); | 39 | unsigned getegid (void); |
| 40 | unsigned getgid (); | 40 | unsigned getgid (void); |
| 41 | int setuid (unsigned uid); | 41 | int setuid (unsigned uid); |
| 42 | int setegid (unsigned gid); | 42 | int setegid (unsigned gid); |
| 43 | char * getpass (const char * prompt); | 43 | char * getpass (const char * prompt); |
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index a96422a09a9..30208d5c8d2 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c | |||
| @@ -60,6 +60,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 60 | extern char *optarg; | 60 | extern char *optarg; |
| 61 | extern int optind, opterr; | 61 | extern int optind, opterr; |
| 62 | 62 | ||
| 63 | int usage (int err) NO_RETURN; | ||
| 64 | |||
| 63 | #define MAX_ATTEMPTS 5 | 65 | #define MAX_ATTEMPTS 5 |
| 64 | #define MAX_SCORES 200 | 66 | #define MAX_SCORES 200 |
| 65 | #define MAX_DATA_LEN 1024 | 67 | #define MAX_DATA_LEN 1024 |