Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
ed3751c8
Commit
ed3751c8
authored
Jul 07, 2010
by
Juanma Barranquero
Browse files
Fix whitespace to follow coding guidelines.
parent
cf84bb53
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
167 additions
and
167 deletions
+167
-167
src/image.c
src/image.c
+29
-29
src/process.c
src/process.c
+11
-11
src/w32.c
src/w32.c
+58
-58
src/w32console.c
src/w32console.c
+3
-3
src/w32fns.c
src/w32fns.c
+1
-1
src/w32font.c
src/w32font.c
+2
-2
src/w32inevt.c
src/w32inevt.c
+2
-2
src/w32menu.c
src/w32menu.c
+1
-1
src/w32proc.c
src/w32proc.c
+5
-5
src/w32select.c
src/w32select.c
+7
-7
src/w32term.c
src/w32term.c
+9
-9
src/w32uniscribe.c
src/w32uniscribe.c
+5
-5
src/w32xfns.c
src/w32xfns.c
+1
-1
src/window.c
src/window.c
+3
-3
src/xdisp.c
src/xdisp.c
+6
-6
src/xfaces.c
src/xfaces.c
+1
-1
src/xterm.c
src/xterm.c
+23
-23
No files found.
src/image.c
View file @
ed3751c8
...
...
@@ -157,7 +157,7 @@ XGetImage (Display *display, Pixmap pixmap, int x, int y,
unsigned long plane_mask, int format)
{
/* TODO: not sure what this function is supposed to do.. */
ns_retain_object(pixmap);
ns_retain_object
(pixmap);
return pixmap;
}
...
...
@@ -165,7 +165,7 @@ XGetImage (Display *display, Pixmap pixmap, int x, int y,
unsigned long
XGetPixel (XImagePtr ximage, int x, int y)
{
return ns_get_pixel(ximage, x, y);
return ns_get_pixel
(ximage, x, y);
}
/* use with imgs created by ns_image_for_XPM; alpha set to 1;
...
...
@@ -173,7 +173,7 @@ XGetPixel (XImagePtr ximage, int x, int y)
void
XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel)
{
ns_put_pixel(ximage, x, y, pixel);
ns_put_pixel
(ximage, x, y, pixel);
}
#endif /* HAVE_NS */
...
...
@@ -274,7 +274,7 @@ x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsi
#endif /* HAVE_NTGUI */
#ifdef HAVE_NS
void *bitmap = ns_image_from_XBM(bits, width, height);
void *bitmap = ns_image_from_XBM
(bits, width, height);
if (!bitmap)
return -1;
#endif
...
...
@@ -319,7 +319,7 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
#ifdef HAVE_NS
int id;
void *bitmap = ns_image_from_file(file);
void *bitmap = ns_image_from_file
(file);
if (!bitmap)
return -1;
...
...
@@ -330,8 +330,8 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
dpyinfo->bitmaps[id - 1].refcount = 1;
dpyinfo->bitmaps[id - 1].file = (char *) xmalloc (SBYTES (file) + 1);
dpyinfo->bitmaps[id - 1].depth = 1;
dpyinfo->bitmaps[id - 1].height = ns_image_width(bitmap);
dpyinfo->bitmaps[id - 1].width = ns_image_height(bitmap);
dpyinfo->bitmaps[id - 1].height = ns_image_width
(bitmap);
dpyinfo->bitmaps[id - 1].width = ns_image_height
(bitmap);
strcpy (dpyinfo->bitmaps[id - 1].file, SDATA (file));
return id;
#endif
...
...
@@ -399,7 +399,7 @@ free_bitmap_record (Display_Info *dpyinfo, Bitmap_Record *bm)
#endif /* HAVE_NTGUI */
#ifdef HAVE_NS
ns_release_object(bm->img);
ns_release_object
(bm->img);
#endif
if (bm->file)
...
...
@@ -1211,10 +1211,10 @@ four_corners_best (XImagePtr_or_DC ximg, int *corners,
#elif defined (HAVE_NS)
#define Destroy_Image(ximg, dummy) \
ns_release_object(ximg)
ns_release_object
(ximg)
#define Free_Pixmap(display, pixmap) \
ns_release_object(pixmap)
ns_release_object
(pixmap)
#else
...
...
@@ -2099,7 +2099,7 @@ x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth,
#endif /* HAVE_NTGUI */
#ifdef HAVE_NS
*pixmap = ns_image_for_XPM(width, height, depth);
*pixmap = ns_image_for_XPM
(width, height, depth);
if (*pixmap == 0)
{
*ximg = NULL;
...
...
@@ -2131,7 +2131,7 @@ x_destroy_x_image (XImagePtr ximg)
xfree (ximg);
#endif /* HAVE_NTGUI */
#ifdef HAVE_NS
ns_release_object(ximg);
ns_release_object
(ximg);
#endif /* HAVE_NS */
}
}
...
...
@@ -2162,7 +2162,7 @@ x_put_x_image (struct frame *f, XImagePtr ximg, Pixmap pixmap, int width, int he
#ifdef HAVE_NS
xassert (ximg == pixmap);
ns_retain_object(ximg);
ns_retain_object
(ximg);
#endif
}
...
...
@@ -2619,7 +2619,7 @@ Create_Pixmap_From_Bitmap_Data (struct frame *f, struct image *img, char *data,
convert_mono_to_color_image (f, img, fg, bg);
#elif defined (HAVE_NS)
img->pixmap = ns_image_from_XBM(data, img->width, img->height);
img->pixmap = ns_image_from_XBM
(data, img->width, img->height);
#else
img->pixmap
...
...
@@ -2982,7 +2982,7 @@ xbm_load (struct frame *f, struct image *img)
invertedBits = bits;
nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR
* img->height;
bits = (char *) alloca(nbytes);
bits = (char *) alloca
(nbytes);
for (i = 0; i < nbytes; i++)
bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]);
}
...
...
@@ -3859,7 +3859,7 @@ xpm_load_image (f, img, contents, end)
if (!(end - s >= 9 && memcmp (s, "/* XPM */", 9) == 0))
goto failure;
s += 9;
match();
match
();
expect_ident ("static");
expect_ident ("char");
expect ('*');
...
...
@@ -4009,8 +4009,8 @@ xpm_load_image (f, img, contents, end)
(!EQ (color_val, Qt) ? PIX_MASK_DRAW
: (have_mask = 1, PIX_MASK_RETAIN)));
#else
if (EQ(color_val, Qt))
ns_set_alpha(ximg, x, y, 0);
if (EQ
(color_val, Qt))
ns_set_alpha
(ximg, x, y, 0);
#endif
}
if (y + 1 < height)
...
...
@@ -4897,7 +4897,7 @@ x_build_heuristic_mask (struct frame *f, struct image *img, Lisp_Object how)
? PIX_MASK_DRAW : PIX_MASK_RETAIN));
#else
if (XGetPixel (ximg, x, y) == bg)
ns_set_alpha(ximg, x, y, 0);
ns_set_alpha
(ximg, x, y, 0);
#endif /* HAVE_NS */
#ifndef HAVE_NS
/* Fill in the background_transparent field while we have the mask handy. */
...
...
@@ -6485,9 +6485,9 @@ jpeg_load (struct frame *f, struct image *img)
static int
jpeg_load (struct frame *f, struct image *img)
{
return ns_load_image(f, img,
image_spec_value (img->spec, QCfile, NULL),
image_spec_value (img->spec, QCdata, NULL));
return ns_load_image
(f, img,
image_spec_value (img->spec, QCfile, NULL),
image_spec_value (img->spec, QCdata, NULL));
}
#endif /* HAVE_NS */
...
...
@@ -6912,9 +6912,9 @@ tiff_load (struct frame *f, struct image *img)
static int
tiff_load (struct frame *f, struct image *img)
{
return ns_load_image(f, img,
image_spec_value (img->spec, QCfile, NULL),
image_spec_value (img->spec, QCdata, NULL));
return ns_load_image
(f, img,
image_spec_value (img->spec, QCfile, NULL),
image_spec_value (img->spec, QCdata, NULL));
}
#endif /* HAVE_NS */
...
...
@@ -7342,9 +7342,9 @@ gif_load (struct frame *f, struct image *img)
static int
gif_load (struct frame *f, struct image *img)
{
return ns_load_image(f, img,
image_spec_value (img->spec, QCfile, NULL),
image_spec_value (img->spec, QCdata, NULL));
return ns_load_image
(f, img,
image_spec_value (img->spec, QCfile, NULL),
image_spec_value (img->spec, QCdata, NULL));
}
#endif /* HAVE_NS */
...
...
@@ -7666,7 +7666,7 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. *
background.pixel = FRAME_BACKGROUND_PIXEL (f);
x_query_color (f, &background);
#else
ns_query_color(FRAME_BACKGROUND_COLOR (f), &background, 1);
ns_query_color
(FRAME_BACKGROUND_COLOR (f), &background, 1);
#endif
}
...
...
src/process.c
View file @
ed3751c8
...
...
@@ -3003,7 +3003,7 @@ usage: (make-serial-process &rest ARGS) */)
p->inherit_coding_system_flag
= !(!NILP (tem) || NILP (buffer) || !inherit_process_coding_system);
Fserial_process_configure(nargs, args);
Fserial_process_configure
(nargs, args);
specpdl_ptr = specpdl + specpdl_count;
...
...
@@ -3401,7 +3401,7 @@ usage: (make-network-process &rest ARGS) */)
ret = getaddrinfo (SDATA (host), portstring, &hints, &res);
if (ret)
#ifdef HAVE_GAI_STRERROR
error ("%s/%s %s", SDATA (host), portstring, gai_strerror(ret));
error ("%s/%s %s", SDATA (host), portstring, gai_strerror
(ret));
#else
error ("%s/%s getaddrinfo error %d", SDATA (host), portstring, ret);
#endif
...
...
@@ -3900,7 +3900,7 @@ format; see the description of ADDRESS in `make-network-process'. */)
again:
ifaces += 25;
buf_size = ifaces * sizeof(ifreqs[0]);
buf_size = ifaces * sizeof
(ifreqs[0]);
ifreqs = (struct ifreq *)xrealloc(ifreqs, buf_size);
if (!ifreqs)
{
...
...
@@ -4362,7 +4362,7 @@ server_accept_connection (Lisp_Object server, int channel)
int i;
args[0] = build_string ("%x:%x:%x:%x:%x:%x:%x:%x");
for (i = 0; i < 8; i++)
args[i+1] = make_number (ntohs(ip6[i]));
args[i+1] = make_number (ntohs
(ip6[i]));
host = Fformat (9, args);
service = make_number (ntohs (saddr.in.sin_port));
...
...
@@ -5164,23 +5164,23 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
/* getsockopt(,,SO_ERROR,,) is said to hang on some systems.
So only use it on systems where it is known to work. */
{
int xlen = sizeof(xerrno);
if (getsockopt(channel, SOL_SOCKET, SO_ERROR, &xerrno, &xlen))
int xlen = sizeof
(xerrno);
if (getsockopt
(channel, SOL_SOCKET, SO_ERROR, &xerrno, &xlen))
xerrno = errno;
}
#else
{
struct sockaddr pname;
int pnamelen = sizeof(pname);
int pnamelen = sizeof
(pname);
/* If connection failed, getpeername will fail. */
xerrno = 0;
if (getpeername(channel, &pname, &pnamelen) < 0)
if (getpeername
(channel, &pname, &pnamelen) < 0)
{
/* Obtain connect failure code through error slippage. */
char dummy;
xerrno = errno;
if (errno == ENOTCONN && read(channel, &dummy, 1) < 0)
if (errno == ENOTCONN && read
(channel, &dummy, 1) < 0)
xerrno = errno;
}
}
...
...
@@ -6336,7 +6336,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
CHECK_SYMBOL (sigcode);
name = SDATA (SYMBOL_NAME (sigcode));
if (!strncmp(name, "SIG", 3) || !strncmp(name, "sig", 3))
if (!strncmp
(name, "SIG", 3) || !strncmp
(name, "sig", 3))
name += 3;
if (0)
...
...
@@ -7252,7 +7252,7 @@ init_process (void)
processes. As such, we only change the default value. */
if (initialized)
{
char *release = get_operating_system_release();
char *release = get_operating_system_release
();
if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION
&& release[1] == '.')) {
Vprocess_connection_type = Qnil;
...
...
src/w32.c
View file @
ed3751c8
...
...
@@ -315,8 +315,8 @@ is_windows_9x (void)
if (g_b_init_is_windows_9x == 0)
{
g_b_init_is_windows_9x = 1;
ZeroMemory
(
&
os_ver
,
sizeof
(
OSVERSIONINFO
));
os_ver
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFO
);
ZeroMemory
(&os_ver, sizeof
(OSVERSIONINFO));
os_ver.dwOSVersionInfoSize = sizeof
(OSVERSIONINFO);
if (GetVersionEx (&os_ver))
{
s_b_ret = (os_ver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS);
...
...
@@ -334,7 +334,7 @@ w32_get_internal_run_time (void)
if (get_process_times_fn)
{
FILETIME create, exit, kernel, user;
HANDLE
proc
=
GetCurrentProcess
();
HANDLE proc = GetCurrentProcess
();
if ((*get_process_times_fn) (proc, &create, &exit, &kernel, &user))
{
LARGE_INTEGER user_int, kernel_int, total;
...
...
@@ -753,7 +753,7 @@ void WINAPI get_native_system_info (
lpSystemInfo->dwNumberOfProcessors = -1;
}
BOOL
WINAPI
get_system_times
(
BOOL WINAPI get_system_times
(
LPFILETIME lpIdleTime,
LPFILETIME lpKernelTime,
LPFILETIME lpUserTime)
...
...
@@ -1634,7 +1634,7 @@ init_environment (char ** argv)
{"LANG", NULL},
};
#define N_ENV_VARS sizeof(dflt_envvars)/sizeof(dflt_envvars[0])
#define N_ENV_VARS sizeof
(dflt_envvars)/sizeof
(dflt_envvars[0])
/* We need to copy dflt_envvars[] and work on the copy because we
don't want the dumped Emacs to inherit the values of
...
...
@@ -1707,7 +1707,7 @@ init_environment (char ** argv)
for (p = modname; *p; p++)
if (*p == '\\') *p = '/';
_snprintf
(
buf
,
sizeof
(
buf
)
-
1
,
"emacs_dir=%s"
,
modname
);
_snprintf (buf, sizeof
(buf)-1, "emacs_dir=%s", modname);
_putenv (strdup (buf));
}
/* Handle running emacs from the build directory: src/oo-spd/i386/ */
...
...
@@ -1731,7 +1731,7 @@ init_environment (char ** argv)
for (p = modname; *p; p++)
if (*p == '\\') *p = '/';
_snprintf
(
buf
,
sizeof
(
buf
)
-
1
,
"emacs_dir=%s"
,
modname
);
_snprintf (buf, sizeof
(buf)-1, "emacs_dir=%s", modname);
_putenv (strdup (buf));
}
}
...
...
@@ -1759,12 +1759,12 @@ init_environment (char ** argv)
char buf1[SET_ENV_BUF_SIZE], buf2[SET_ENV_BUF_SIZE];
if (dwType == REG_EXPAND_SZ)
ExpandEnvironmentStrings
((
LPSTR
)
lpval
,
buf1
,
sizeof
(
buf1
));
ExpandEnvironmentStrings ((LPSTR) lpval, buf1, sizeof
(buf1));
else if (dwType == REG_SZ)
strcpy (buf1, lpval);
if (dwType == REG_EXPAND_SZ || dwType == REG_SZ)
{
_snprintf
(
buf2
,
sizeof
(
buf2
)
-
1
,
"%s=%s"
,
env_vars
[
i
].
name
,
_snprintf (buf2, sizeof
(buf2)-1, "%s=%s", env_vars[i].name,
buf1);
_putenv (strdup (buf2));
}
...
...
@@ -2107,7 +2107,7 @@ GetCachedVolumeInformation (char * root_dir)
involve network access, and so is extremely quick). */
/* Map drive letter to UNC if remote. */
if (
isalpha
(
root_dir[0]
) && !fixed[
DRIVE_INDEX
(
root_dir[0]
) ]
)
if (isalpha
(
root_dir[0]) && !fixed[DRIVE_INDEX
(
root_dir[0]
)]
)
{
char remote_name[ 256 ];
char drive[3] = { root_dir[0], ':' };
...
...
@@ -2506,8 +2506,8 @@ open_unc_volume (const char *path)
nr.lpComment = NULL;
nr.lpProvider = NULL;
result
=
WNetOpenEnum
(
RESOURCE_GLOBALNET
,
RESOURCETYPE_DISK
,
RESOURCEUSAGE_CONNECTABLE
,
&
nr
,
&
henum
);
result = WNetOpenEnum
(RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
RESOURCEUSAGE_CONNECTABLE, &nr, &henum);
if (result == NO_ERROR)
return henum;
...
...
@@ -2770,7 +2770,7 @@ sys_link (const char * old, const char * new)
data.wid.dwStreamId = BACKUP_LINK;
data.wid.dwStreamAttributes = 0;
data
.
wid
.
Size
.
LowPart
=
wlen
*
sizeof
(
WCHAR
);
data.wid.Size.LowPart = wlen * sizeof
(WCHAR);
data.wid.Size.HighPart = 0;
data.wid.dwStreamNameSize = 0;
...
...
@@ -3183,7 +3183,7 @@ get_name_and_id (PSECURITY_DESCRIPTOR psd, const char *fname,
char name[UNLEN+1];
DWORD name_len = sizeof (name);
char domain[1024];
DWORD
domain_len
=
sizeof
(
domain
);
DWORD domain_len = sizeof
(domain);
char *mp = NULL;
int use_dflt = 0;
int result;
...
...
@@ -3658,7 +3658,7 @@ utime (const char *name, struct utimbuf *times)
/* Helper wrapper functions. */
HANDLE
WINAPI
create_toolhelp32_snapshot
(
HANDLE WINAPI create_toolhelp32_snapshot
(
DWORD Flags,
DWORD Ignored)
{
...
...
@@ -3678,7 +3678,7 @@ HANDLE WINAPI create_toolhelp32_snapshot(
return (s_pfn_Create_Toolhelp32_Snapshot (Flags, Ignored));
}
BOOL
WINAPI
process32_first
(
BOOL WINAPI process32_first
(
HANDLE hSnapshot,
LPPROCESSENTRY32 lppe)
{
...
...
@@ -3698,7 +3698,7 @@ BOOL WINAPI process32_first(
return (s_pfn_Process32_First (hSnapshot, lppe));
}
BOOL
WINAPI
process32_next
(
BOOL WINAPI process32_next
(
HANDLE hSnapshot,
LPPROCESSENTRY32 lppe)
{
...
...
@@ -4006,8 +4006,8 @@ process_times (HANDLE h_proc, Lisp_Object *ctime, Lisp_Object *etime,
if (!h_proc
|| !get_process_times_fn
||
!
(
*
get_process_times_fn
)(
h_proc
,
&
ft_creation
,
&
ft_exit
,
&
ft_kernel
,
&
ft_user
))
|| !(*get_process_times_fn)
(h_proc, &ft_creation, &ft_exit,
&ft_kernel, &ft_user))
return 0;
GetSystemTimeAsFileTime (&ft_current);
...
...
@@ -4448,34 +4448,34 @@ init_winsock (int load_now)
if ((pfn_##fn = (void *) GetProcAddress (winsock_lib, #fn)) == NULL) \
goto fail;
LOAD_PROC
(
WSAStartup
);
LOAD_PROC
(
WSASetLastError
);
LOAD_PROC
(
WSAGetLastError
);
LOAD_PROC
(
WSAEventSelect
);
LOAD_PROC
(
WSACreateEvent
);
LOAD_PROC
(
WSACloseEvent
);
LOAD_PROC
(
socket
);
LOAD_PROC
(
bind
);
LOAD_PROC
(
connect
);
LOAD_PROC
(
ioctlsocket
);
LOAD_PROC
(
recv
);
LOAD_PROC
(
send
);
LOAD_PROC
(
closesocket
);
LOAD_PROC
(
shutdown
);
LOAD_PROC
(
htons
);
LOAD_PROC
(
ntohs
);
LOAD_PROC
(
inet_addr
);
LOAD_PROC
(
gethostname
);
LOAD_PROC
(
gethostbyname
);
LOAD_PROC
(
getservbyname
);
LOAD_PROC
(
getpeername
);
LOAD_PROC
(
WSACleanup
);
LOAD_PROC
(
setsockopt
);
LOAD_PROC
(
listen
);
LOAD_PROC
(
getsockname
);
LOAD_PROC
(
accept
);
LOAD_PROC
(
recvfrom
);
LOAD_PROC
(
sendto
);
LOAD_PROC
(
WSAStartup);
LOAD_PROC
(
WSASetLastError);
LOAD_PROC
(
WSAGetLastError);
LOAD_PROC
(
WSAEventSelect);
LOAD_PROC
(
WSACreateEvent);
LOAD_PROC
(
WSACloseEvent);
LOAD_PROC
(
socket);
LOAD_PROC
(
bind);
LOAD_PROC
(
connect);
LOAD_PROC
(
ioctlsocket);
LOAD_PROC
(
recv);
LOAD_PROC
(
send);
LOAD_PROC
(
closesocket);
LOAD_PROC
(
shutdown);
LOAD_PROC
(
htons);
LOAD_PROC
(
ntohs);
LOAD_PROC
(
inet_addr);
LOAD_PROC
(
gethostname);
LOAD_PROC
(
gethostbyname);
LOAD_PROC
(
getservbyname);
LOAD_PROC
(
getpeername);
LOAD_PROC
(
WSACleanup);
LOAD_PROC
(
setsockopt);
LOAD_PROC
(
listen);
LOAD_PROC
(
getsockname);
LOAD_PROC
(
accept);
LOAD_PROC
(
recvfrom);
LOAD_PROC
(
sendto);
#undef LOAD_PROC
/* specify version 1.1 of winsock */
...
...
@@ -4620,7 +4620,7 @@ struct {
};
char *
sys_strerror
(
int
error_no
)
sys_strerror
(int error_no)
{
int i;
static char unknown_msg[40];
...
...
@@ -4632,7 +4632,7 @@ sys_strerror(int error_no)
if (_wsa_errlist[i].errnum == error_no)
return _wsa_errlist[i].msg;
sprintf
(
unknown_msg
,
"Unidentified error: %d"
,
error_no
);
sprintf
(unknown_msg, "Unidentified error: %d", error_no);
return unknown_msg;
}
...
...
@@ -4651,7 +4651,7 @@ sys_strerror(int error_no)
int socket_to_fd (SOCKET s);
int
sys_socket
(
int
af
,
int
type
,
int
protocol
)
sys_socket
(int af, int type, int protocol)
{
SOCKET s;
...
...
@@ -4854,7 +4854,7 @@ sys_gethostname (char * name, int namelen)
}
struct hostent *
sys_gethostbyname
(
const
char
*
name
)
sys_gethostbyname
(const char * name)
{
struct hostent * host;
...
...
@@ -4872,7 +4872,7 @@ sys_gethostbyname(const char * name)
}
struct servent *
sys_getservbyname
(
const
char
*
name
,
const
char
*
proto
)
sys_getservbyname
(const char * name, const char * proto)
{
struct servent * serv;
...
...
@@ -5525,8 +5525,8 @@ sys_read (int fd, char * buffer, unsigned int count)
int res = pfn_recv (SOCK_HANDLE (fd), buffer, count, 0);
if (res == SOCKET_ERROR)
{
DebPrint
((
"sys_read.recv failed with error %d on socket %ld
\n
"
,
pfn_WSAGetLastError
(),
SOCK_HANDLE
(
fd
)));
DebPrint
(("sys_read.recv failed with error %d on socket %ld\n",
pfn_WSAGetLastError (), SOCK_HANDLE (fd)));
set_errno ();
return -1;
}
...
...
@@ -5682,8 +5682,8 @@ sys_write (int fd, const void * buffer, unsigned int count)
if (nchars == SOCKET_ERROR)
{
DebPrint
((
"sys_write.send failed with error %d on socket %ld
\n
"
,
pfn_WSAGetLastError
(),
SOCK_HANDLE
(
fd
)));
DebPrint
(("sys_write.send failed with error %d on socket %ld\n",
pfn_WSAGetLastError (), SOCK_HANDLE (fd)));
set_errno ();
}
}
...
...
@@ -5898,7 +5898,7 @@ init_ntproc (void)
up to date when the user logs off, or the system shuts down.
*/
BOOL WINAPI
shutdown_handler
(
DWORD
type
)
shutdown_handler
(DWORD type)
{
/* Ctrl-C and Ctrl-Break are already suppressed, so don't handle them. */
if (type == CTRL_CLOSE_EVENT /* User closes console window. */
...
...
@@ -5957,7 +5957,7 @@ globals_of_w32 (void)
console apps. This actually applies to Emacs in both console and
GUI modes, since we had to fool windows into thinking emacs is a
console application to get console mode to work. */
SetConsoleCtrlHandler
(
shutdown_handler
,
TRUE
);
SetConsoleCtrlHandler
(shutdown_handler, TRUE);
/* "None" is the default group name on standalone workstations. */
strcpy (dflt_group_name, "None");
...
...
src/w32console.c
View file @
ed3751c8
...
...
@@ -493,7 +493,7 @@ w32con_set_terminal_window (struct frame *f, int size)
***********************************************************************/
void
sys_tputs
(
char
*
str
,
int
nlines
,
int
(
*
outfun
)(
int
))
sys_tputs
(
char
*
str
,
int
nlines
,
int
(
*
outfun
)
(
int
))
{
}
...
...
@@ -671,8 +671,8 @@ initialize_w32_display (struct terminal *term)
/* Respect setting of LINES and COLUMNS environment variables. */
{
char
*
lines
=
getenv
(
"LINES"
);
char
*
columns
=
getenv
(
"COLUMNS"
);
char
*
lines
=
getenv
(
"LINES"
);
char
*
columns
=
getenv
(
"COLUMNS"
);
if
(
lines
!=
NULL
&&
columns
!=
NULL
)
{
...
...
src/w32fns.c
View file @
ed3751c8
...
...
@@ -3094,7 +3094,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
wmsg.dwModifiers = w32_get_key_modifiers (wParam, lParam);
/* Get buffer size. */
size = get_composition_string_fn (context, GCS_RESULTSTR, buffer, 0);
buffer = alloca(size);
buffer = alloca
(size);
size = get_composition_string_fn (context, GCS_RESULTSTR,
buffer, size);
release_ime_context_fn (hwnd, context);
...
...
src/w32font.c
View file @
ed3751c8
...
...
@@ -549,7 +549,7 @@ w32font_draw (struct glyph_string *s, int from, int to,
/* Save clip region for later restoration. */
orig_clip
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
if
(
!
GetClipRgn
(
s
->
hdc
,
orig_clip
))
if
(
!
GetClipRgn
(
s
->
hdc
,
orig_clip
))
{
DeleteObject
(
orig_clip
);
orig_clip
=
NULL
;
...
...
@@ -1785,7 +1785,7 @@ w32_registry (LONG w32_charset, DWORD font_type)
return
font_type
==
TRUETYPE_FONTTYPE
?
Qiso10646_1
:
Qunknown
;
charset
=
w32_to_x_charset
(
w32_charset
,
NULL
);
return
font_intern_prop
(
charset
,
strlen
(
charset
),
1
);
return
font_intern_prop
(
charset
,
strlen
(
charset
),
1
);
}
static
int
...
...
src/w32inevt.c
View file @
ed3751c8
...
...
@@ -582,8 +582,8 @@ w32_console_mouse_position (FRAME_PTR *f,
*
part
=
0
;
SELECTED_FRAME
()
->
mouse_moved
=
0
;
XSETINT
(
*
x
,
movement_pos
.
X
);
XSETINT
(
*
y
,
movement_pos
.
Y
);
XSETINT
(
*
x
,
movement_pos
.
X
);
XSETINT
(
*
y
,
movement_pos
.
Y
);
*
time
=
movement_time
;
UNBLOCK_INPUT
;
...
...
src/w32menu.c
View file @
ed3751c8
...
...
@@ -1118,7 +1118,7 @@ w32_dialog_show (FRAME_PTR f, int keymaps,
/* Frame title: 'Q' = Question, 'I' = Information.
Can also have 'E' = Error if, one day, we want
a popup for errors. */
if
(
NILP
(
header
))
if
(
NILP
(
header
))
dialog_name
[
0
]
=
'Q'
;
else
dialog_name
[
0
]
=
'I'
;
...
...
src/w32proc.c
View file @
ed3751c8
...
...
@@ -46,7 +46,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <windows.h>
#ifdef __GNUC__
/* This definition is missing from mingw32 headers. */
extern
BOOL
WINAPI
IsValidLocale
(
LCID
,
DWORD
);
extern
BOOL
WINAPI
IsValidLocale
(
LCID
,
DWORD
);
#endif
#ifdef HAVE_LANGINFO_CODESET
...
...
@@ -130,7 +130,7 @@ _DebPrint (const char *fmt, ...)
}
#endif
typedef
void
(
_CALLBACK_
*
signal_handler
)(
int
);
typedef
void
(
_CALLBACK_
*
signal_handler
)
(
int
);
/* Signal handlers...SIG_DFL == 0 so this is initialized correctly. */
static
signal_handler
sig_handlers
[
NSIG
];
...
...
@@ -176,7 +176,7 @@ new_child (void)
cp
=
&
child_procs
[
child_proc_count
++
];
Initialise:
memset
(
cp
,
0
,
sizeof
(
*
cp
));
memset
(
cp
,
0
,
sizeof
(
*
cp
));
cp
->
fd
=
-
1
;
cp
->
pid
=
-
1
;
cp
->
procinfo
.
hProcess
=
NULL
;
...
...
@@ -399,7 +399,7 @@ create_child (char *exe, char *cmdline, char *env, int is_gui_app,
return
TRUE
;
EH_Fail:
DebPrint
((
"create_child.CreateProcess failed: %ld
\n
"
,
GetLastError
()););
DebPrint
((
"create_child.CreateProcess failed: %ld
\n
"
,
GetLastError
()););
return
FALSE
;
}
...
...
@@ -2015,7 +2015,7 @@ int_from_hex (char * s)
static
char
hex
[]
=
"0123456789abcdefABCDEF"
;
char
*
p
;
while
(
*
s
&&
(
p
=
strchr
(
hex
,
*
s
))
!=
NULL
)
while
(
*
s
&&
(
p
=
strchr
(
hex
,
*
s
))
!=
NULL
)