diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2010-07-20 22:21:03 +0200 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2010-07-20 22:21:03 +0200 |
commit | 7c3320d8b9d3beaf952b20cfe1843181c1c7af65 (patch) | |
tree | 188ab3f0c3582c2890365bd92939e32a6b01d44c /lib-src/ntlib.c | |
parent | af4b9ae58662d50080a7661631ce6861dc6b6aa9 (diff) | |
download | emacs-7c3320d8b9d3beaf952b20cfe1843181c1c7af65.tar.gz |
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.
Diffstat (limited to 'lib-src/ntlib.c')
-rw-r--r-- | lib-src/ntlib.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c index c815f32d51d..c24b35d9a19 100644 --- a/lib-src/ntlib.c +++ b/lib-src/ntlib.c @@ -38,7 +38,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 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 HANDLE getppid_parent; static int getppid_ppid; int -getppid(void) +getppid (void) { char *ppid; DWORD result; @@ -64,7 +64,7 @@ getppid(void) ppid = getenv ("EM_PARENT_PROCESS_ID"); if (!ppid) { - printf("no pid.\n"); + printf ("no pid.\n"); return 0; } else @@ -74,11 +74,11 @@ getppid(void) 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 @@ getppid(void) 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 @@ cuserid (char * s) } unsigned -getuid () +getuid (void) { return 0; } unsigned -getgid () +getgid (void) { return 0; } unsigned -getegid () +getegid (void) { return 0; } @@ -219,7 +219,7 @@ sys_ctime (const time_t *t) } FILE * -sys_fopen(const char * path, const char * mode) +sys_fopen (const char * path, const char * mode) { return fopen (path, mode); } |