Mercurial > emacs
diff lib-src/ntlib.c @ 109480:d12162869c07
Convert some more functions to standard C.
* lib-src/emacsclient.c (get_current_dir_name, w32_get_resource)
(w32_getenv, w32_set_user_model_id, w32_window_app, w32_execvp)
(close_winsock, initialize_sockets, w32_find_emacs_process)
(w32_give_focus):
* lib-src/ntlib.c (getlogin, getuid, getgid, getegid):
* nt/addpm.c (add_registry, main):
* nt/cmdproxy.c (get_env_size):
* nt/ddeclient.c (main):
* nt/runemacs.c (set_user_model_id):
* src/alloc.c (emacs_blocked_free, emacs_blocked_malloc)
(emacs_blocked_realloc, uninterrupt_malloc):
* src/fringe.c (w32_reset_fringes):
* src/image.c (convert_mono_to_color_image, lookup_rgb_color)
(init_color_table, XPutPixel, jpeg_resync_to_restart_wrapper):
* src/sound.c (be2hs, do_play_sound):
* src/vm-limit.c (get_lim_data, ret_lim_data):
* src/w32term.c (x_free_frame_resources):
* src/xfaces.c (x_create_gc, x_free_gc):
Convert definitions to standard C.
| author | Juanma Barranquero <lekktu@gmail.com> |
|---|---|
| date | Tue, 20 Jul 2010 22:21:03 +0200 |
| parents | 65405dd90a72 |
| children | 417b1e4d63cd |
line wrap: on
line diff
--- a/lib-src/ntlib.c Tue Jul 20 21:15:01 2010 +0200 +++ b/lib-src/ntlib.c Tue Jul 20 22:21:03 2010 +0200 @@ -38,7 +38,7 @@ would necessitate including windows.h in the files that used it. This is much easier. */ void -sleep(unsigned long seconds) +sleep (unsigned long seconds) { Sleep (seconds * 1000); } @@ -56,7 +56,7 @@ static int getppid_ppid; int -getppid(void) +getppid (void) { char *ppid; DWORD result; @@ -64,7 +64,7 @@ ppid = getenv ("EM_PARENT_PROCESS_ID"); if (!ppid) { - printf("no pid.\n"); + printf ("no pid.\n"); return 0; } else @@ -74,11 +74,11 @@ if (!getppid_parent) { - getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi(ppid)); + getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi (ppid)); if (!getppid_parent) { printf ("Failed to open handle to parent process: %d\n", - GetLastError()); + GetLastError ()); exit (1); } } @@ -94,13 +94,13 @@ return 1; case WAIT_FAILED: default: - printf ("Checking parent status failed: %d\n", GetLastError()); + printf ("Checking parent status failed: %d\n", GetLastError ()); exit (1); } } char * -getlogin () +getlogin (void) { static char user_name[256]; DWORD length = sizeof (user_name); @@ -120,19 +120,19 @@ } unsigned -getuid () +getuid (void) { return 0; } unsigned -getgid () +getgid (void) { return 0; } unsigned -getegid () +getegid (void) { return 0; } @@ -219,7 +219,7 @@ } FILE * -sys_fopen(const char * path, const char * mode) +sys_fopen (const char * path, const char * mode) { return fopen (path, mode); }
