summaryrefslogtreecommitdiff
path: root/lib-src/emacsclient.c
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2010-07-20 22:21:03 +0200
committerJuanma Barranquero <lekktu@gmail.com>2010-07-20 22:21:03 +0200
commitd24dff2b4044ead9c61b0705d31041c705782756 (patch)
treeea4acf5795079ec6cf0872be9fbcbe92b0fd765b /lib-src/emacsclient.c
parent1e877b177153a9df6e0ced86dceffafa803dec5d (diff)
downloademacs-d24dff2b4044ead9c61b0705d31041c705782756.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/emacsclient.c')
-rw-r--r--lib-src/emacsclient.c32
1 files changed, 12 insertions, 20 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 79143ff7a34..bafc7e02720 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -235,7 +235,7 @@ xstrdup (const char *s)
Any other returned value must be freed with free. This is used
only when get_current_dir_name is not defined on the system. */
char*
-get_current_dir_name ()
+get_current_dir_name (void)
{
char *buf;
char *pwd;
@@ -311,10 +311,7 @@ get_current_dir_name ()
Return NULL if the variable was not found, or it was empty.
This code is based on w32_get_resource (w32.c). */
char *
-w32_get_resource (predefined, key, type)
- HKEY predefined;
- char *key;
- LPDWORD type;
+w32_get_resource (HKEY predefined, char *key, LPDWORD type)
{
HKEY hrootkey = NULL;
char *result = NULL;
@@ -347,8 +344,7 @@ w32_get_resource (predefined, key, type)
variables in the registry if they don't appear in the environment.
*/
char *
-w32_getenv (envvar)
- char *envvar;
+w32_getenv (char *envvar)
{
char *value;
DWORD dwType;
@@ -396,7 +392,7 @@ w32_getenv (envvar)
}
void
-w32_set_user_model_id ()
+w32_set_user_model_id (void)
{
HMODULE shell;
HRESULT (WINAPI * set_user_model) (wchar_t * id);
@@ -423,7 +419,7 @@ w32_set_user_model_id ()
}
int
-w32_window_app ()
+w32_window_app (void)
{
static int window_app = -1;
char szTitle[MAX_PATH];
@@ -446,13 +442,11 @@ w32_window_app ()
This is necessary due to the broken implementation of exec* routines in
the Microsoft libraries: they concatenate the arguments together without
quoting special characters, and pass the result to CreateProcess, with
- predictably bad results. By contrast, Posix execvp passes the arguments
+ predictably bad results. By contrast, POSIX execvp passes the arguments
directly into the argv array of the child process.
*/
int
-w32_execvp (path, argv)
- char *path;
- char **argv;
+w32_execvp (const char *path, char **argv)
{
int i;
@@ -900,15 +894,15 @@ file_name_absolute_p (const unsigned char *filename)
#ifdef WINDOWSNT
/* Wrapper to make WSACleanup a cdecl, as required by atexit. */
-void
-__cdecl close_winsock ()
+void __cdecl
+close_winsock (void)
{
WSACleanup ();
}
/* Initialize the WinSock2 library. */
void
-initialize_sockets ()
+initialize_sockets (void)
{
WSADATA wsaData;
@@ -1408,9 +1402,7 @@ FARPROC set_fg; /* Pointer to AllowSetForegroundWindow. */
FARPROC get_wc; /* Pointer to RealGetWindowClassA. */
BOOL CALLBACK
-w32_find_emacs_process (hWnd, lParam)
- HWND hWnd;
- LPARAM lParam;
+w32_find_emacs_process (HWND hWnd, LPARAM lParam)
{
DWORD pid;
char class[6];
@@ -1438,7 +1430,7 @@ w32_find_emacs_process (hWnd, lParam)
* process id = emacs_pid. If found, allow it to grab the focus.
*/
void
-w32_give_focus ()
+w32_give_focus (void)
{
HANDLE user32;