diff options
| author | Juanma Barranquero | 2010-07-07 11:45:28 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2010-07-07 11:45:28 +0200 |
| commit | ed3751c8245cbf523caf4975f654d459f070ea9a (patch) | |
| tree | 1bc6a7e69181867c76389dbaca292f8d29af351a /src | |
| parent | cf84bb53567cf64b3dade9e9abeaef289371f0cc (diff) | |
| download | emacs-ed3751c8245cbf523caf4975f654d459f070ea9a.tar.gz emacs-ed3751c8245cbf523caf4975f654d459f070ea9a.zip | |
Fix whitespace to follow coding guidelines.
Diffstat (limited to 'src')
| -rw-r--r-- | src/image.c | 58 | ||||
| -rw-r--r-- | src/process.c | 22 | ||||
| -rw-r--r-- | src/w32.c | 116 | ||||
| -rw-r--r-- | src/w32console.c | 6 | ||||
| -rw-r--r-- | src/w32fns.c | 2 | ||||
| -rw-r--r-- | src/w32font.c | 4 | ||||
| -rw-r--r-- | src/w32inevt.c | 4 | ||||
| -rw-r--r-- | src/w32menu.c | 2 | ||||
| -rw-r--r-- | src/w32proc.c | 10 | ||||
| -rw-r--r-- | src/w32select.c | 14 | ||||
| -rw-r--r-- | src/w32term.c | 18 | ||||
| -rw-r--r-- | src/w32uniscribe.c | 10 | ||||
| -rw-r--r-- | src/w32xfns.c | 2 | ||||
| -rw-r--r-- | src/window.c | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 12 | ||||
| -rw-r--r-- | src/xfaces.c | 2 | ||||
| -rw-r--r-- | src/xterm.c | 46 |
17 files changed, 167 insertions, 167 deletions
diff --git a/src/image.c b/src/image.c index adc28ba8d38..be40d1c7b4b 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -157,7 +157,7 @@ XGetImage (Display *display, Pixmap pixmap, int x, int y, | |||
| 157 | unsigned long plane_mask, int format) | 157 | unsigned long plane_mask, int format) |
| 158 | { | 158 | { |
| 159 | /* TODO: not sure what this function is supposed to do.. */ | 159 | /* TODO: not sure what this function is supposed to do.. */ |
| 160 | ns_retain_object(pixmap); | 160 | ns_retain_object (pixmap); |
| 161 | return pixmap; | 161 | return pixmap; |
| 162 | } | 162 | } |
| 163 | 163 | ||
| @@ -165,7 +165,7 @@ XGetImage (Display *display, Pixmap pixmap, int x, int y, | |||
| 165 | unsigned long | 165 | unsigned long |
| 166 | XGetPixel (XImagePtr ximage, int x, int y) | 166 | XGetPixel (XImagePtr ximage, int x, int y) |
| 167 | { | 167 | { |
| 168 | return ns_get_pixel(ximage, x, y); | 168 | return ns_get_pixel (ximage, x, y); |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | /* use with imgs created by ns_image_for_XPM; alpha set to 1; | 171 | /* use with imgs created by ns_image_for_XPM; alpha set to 1; |
| @@ -173,7 +173,7 @@ XGetPixel (XImagePtr ximage, int x, int y) | |||
| 173 | void | 173 | void |
| 174 | XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel) | 174 | XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel) |
| 175 | { | 175 | { |
| 176 | ns_put_pixel(ximage, x, y, pixel); | 176 | ns_put_pixel (ximage, x, y, pixel); |
| 177 | } | 177 | } |
| 178 | #endif /* HAVE_NS */ | 178 | #endif /* HAVE_NS */ |
| 179 | 179 | ||
| @@ -274,7 +274,7 @@ x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsi | |||
| 274 | #endif /* HAVE_NTGUI */ | 274 | #endif /* HAVE_NTGUI */ |
| 275 | 275 | ||
| 276 | #ifdef HAVE_NS | 276 | #ifdef HAVE_NS |
| 277 | void *bitmap = ns_image_from_XBM(bits, width, height); | 277 | void *bitmap = ns_image_from_XBM (bits, width, height); |
| 278 | if (!bitmap) | 278 | if (!bitmap) |
| 279 | return -1; | 279 | return -1; |
| 280 | #endif | 280 | #endif |
| @@ -319,7 +319,7 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file) | |||
| 319 | 319 | ||
| 320 | #ifdef HAVE_NS | 320 | #ifdef HAVE_NS |
| 321 | int id; | 321 | int id; |
| 322 | void *bitmap = ns_image_from_file(file); | 322 | void *bitmap = ns_image_from_file (file); |
| 323 | 323 | ||
| 324 | if (!bitmap) | 324 | if (!bitmap) |
| 325 | return -1; | 325 | return -1; |
| @@ -330,8 +330,8 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file) | |||
| 330 | dpyinfo->bitmaps[id - 1].refcount = 1; | 330 | dpyinfo->bitmaps[id - 1].refcount = 1; |
| 331 | dpyinfo->bitmaps[id - 1].file = (char *) xmalloc (SBYTES (file) + 1); | 331 | dpyinfo->bitmaps[id - 1].file = (char *) xmalloc (SBYTES (file) + 1); |
| 332 | dpyinfo->bitmaps[id - 1].depth = 1; | 332 | dpyinfo->bitmaps[id - 1].depth = 1; |
| 333 | dpyinfo->bitmaps[id - 1].height = ns_image_width(bitmap); | 333 | dpyinfo->bitmaps[id - 1].height = ns_image_width (bitmap); |
| 334 | dpyinfo->bitmaps[id - 1].width = ns_image_height(bitmap); | 334 | dpyinfo->bitmaps[id - 1].width = ns_image_height (bitmap); |
| 335 | strcpy (dpyinfo->bitmaps[id - 1].file, SDATA (file)); | 335 | strcpy (dpyinfo->bitmaps[id - 1].file, SDATA (file)); |
| 336 | return id; | 336 | return id; |
| 337 | #endif | 337 | #endif |
| @@ -399,7 +399,7 @@ free_bitmap_record (Display_Info *dpyinfo, Bitmap_Record *bm) | |||
| 399 | #endif /* HAVE_NTGUI */ | 399 | #endif /* HAVE_NTGUI */ |
| 400 | 400 | ||
| 401 | #ifdef HAVE_NS | 401 | #ifdef HAVE_NS |
| 402 | ns_release_object(bm->img); | 402 | ns_release_object (bm->img); |
| 403 | #endif | 403 | #endif |
| 404 | 404 | ||
| 405 | if (bm->file) | 405 | if (bm->file) |
| @@ -1211,10 +1211,10 @@ four_corners_best (XImagePtr_or_DC ximg, int *corners, | |||
| 1211 | #elif defined (HAVE_NS) | 1211 | #elif defined (HAVE_NS) |
| 1212 | 1212 | ||
| 1213 | #define Destroy_Image(ximg, dummy) \ | 1213 | #define Destroy_Image(ximg, dummy) \ |
| 1214 | ns_release_object(ximg) | 1214 | ns_release_object (ximg) |
| 1215 | 1215 | ||
| 1216 | #define Free_Pixmap(display, pixmap) \ | 1216 | #define Free_Pixmap(display, pixmap) \ |
| 1217 | ns_release_object(pixmap) | 1217 | ns_release_object (pixmap) |
| 1218 | 1218 | ||
| 1219 | #else | 1219 | #else |
| 1220 | 1220 | ||
| @@ -2099,7 +2099,7 @@ x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth, | |||
| 2099 | #endif /* HAVE_NTGUI */ | 2099 | #endif /* HAVE_NTGUI */ |
| 2100 | 2100 | ||
| 2101 | #ifdef HAVE_NS | 2101 | #ifdef HAVE_NS |
| 2102 | *pixmap = ns_image_for_XPM(width, height, depth); | 2102 | *pixmap = ns_image_for_XPM (width, height, depth); |
| 2103 | if (*pixmap == 0) | 2103 | if (*pixmap == 0) |
| 2104 | { | 2104 | { |
| 2105 | *ximg = NULL; | 2105 | *ximg = NULL; |
| @@ -2131,7 +2131,7 @@ x_destroy_x_image (XImagePtr ximg) | |||
| 2131 | xfree (ximg); | 2131 | xfree (ximg); |
| 2132 | #endif /* HAVE_NTGUI */ | 2132 | #endif /* HAVE_NTGUI */ |
| 2133 | #ifdef HAVE_NS | 2133 | #ifdef HAVE_NS |
| 2134 | ns_release_object(ximg); | 2134 | ns_release_object (ximg); |
| 2135 | #endif /* HAVE_NS */ | 2135 | #endif /* HAVE_NS */ |
| 2136 | } | 2136 | } |
| 2137 | } | 2137 | } |
| @@ -2162,7 +2162,7 @@ x_put_x_image (struct frame *f, XImagePtr ximg, Pixmap pixmap, int width, int he | |||
| 2162 | 2162 | ||
| 2163 | #ifdef HAVE_NS | 2163 | #ifdef HAVE_NS |
| 2164 | xassert (ximg == pixmap); | 2164 | xassert (ximg == pixmap); |
| 2165 | ns_retain_object(ximg); | 2165 | ns_retain_object (ximg); |
| 2166 | #endif | 2166 | #endif |
| 2167 | } | 2167 | } |
| 2168 | 2168 | ||
| @@ -2619,7 +2619,7 @@ Create_Pixmap_From_Bitmap_Data (struct frame *f, struct image *img, char *data, | |||
| 2619 | convert_mono_to_color_image (f, img, fg, bg); | 2619 | convert_mono_to_color_image (f, img, fg, bg); |
| 2620 | 2620 | ||
| 2621 | #elif defined (HAVE_NS) | 2621 | #elif defined (HAVE_NS) |
| 2622 | img->pixmap = ns_image_from_XBM(data, img->width, img->height); | 2622 | img->pixmap = ns_image_from_XBM (data, img->width, img->height); |
| 2623 | 2623 | ||
| 2624 | #else | 2624 | #else |
| 2625 | img->pixmap | 2625 | img->pixmap |
| @@ -2982,7 +2982,7 @@ xbm_load (struct frame *f, struct image *img) | |||
| 2982 | invertedBits = bits; | 2982 | invertedBits = bits; |
| 2983 | nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR | 2983 | nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR |
| 2984 | * img->height; | 2984 | * img->height; |
| 2985 | bits = (char *) alloca(nbytes); | 2985 | bits = (char *) alloca (nbytes); |
| 2986 | for (i = 0; i < nbytes; i++) | 2986 | for (i = 0; i < nbytes; i++) |
| 2987 | bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]); | 2987 | bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]); |
| 2988 | } | 2988 | } |
| @@ -3859,7 +3859,7 @@ xpm_load_image (f, img, contents, end) | |||
| 3859 | if (!(end - s >= 9 && memcmp (s, "/* XPM */", 9) == 0)) | 3859 | if (!(end - s >= 9 && memcmp (s, "/* XPM */", 9) == 0)) |
| 3860 | goto failure; | 3860 | goto failure; |
| 3861 | s += 9; | 3861 | s += 9; |
| 3862 | match(); | 3862 | match (); |
| 3863 | expect_ident ("static"); | 3863 | expect_ident ("static"); |
| 3864 | expect_ident ("char"); | 3864 | expect_ident ("char"); |
| 3865 | expect ('*'); | 3865 | expect ('*'); |
| @@ -4009,8 +4009,8 @@ xpm_load_image (f, img, contents, end) | |||
| 4009 | (!EQ (color_val, Qt) ? PIX_MASK_DRAW | 4009 | (!EQ (color_val, Qt) ? PIX_MASK_DRAW |
| 4010 | : (have_mask = 1, PIX_MASK_RETAIN))); | 4010 | : (have_mask = 1, PIX_MASK_RETAIN))); |
| 4011 | #else | 4011 | #else |
| 4012 | if (EQ(color_val, Qt)) | 4012 | if (EQ (color_val, Qt)) |
| 4013 | ns_set_alpha(ximg, x, y, 0); | 4013 | ns_set_alpha (ximg, x, y, 0); |
| 4014 | #endif | 4014 | #endif |
| 4015 | } | 4015 | } |
| 4016 | if (y + 1 < height) | 4016 | if (y + 1 < height) |
| @@ -4897,7 +4897,7 @@ x_build_heuristic_mask (struct frame *f, struct image *img, Lisp_Object how) | |||
| 4897 | ? PIX_MASK_DRAW : PIX_MASK_RETAIN)); | 4897 | ? PIX_MASK_DRAW : PIX_MASK_RETAIN)); |
| 4898 | #else | 4898 | #else |
| 4899 | if (XGetPixel (ximg, x, y) == bg) | 4899 | if (XGetPixel (ximg, x, y) == bg) |
| 4900 | ns_set_alpha(ximg, x, y, 0); | 4900 | ns_set_alpha (ximg, x, y, 0); |
| 4901 | #endif /* HAVE_NS */ | 4901 | #endif /* HAVE_NS */ |
| 4902 | #ifndef HAVE_NS | 4902 | #ifndef HAVE_NS |
| 4903 | /* Fill in the background_transparent field while we have the mask handy. */ | 4903 | /* Fill in the background_transparent field while we have the mask handy. */ |
| @@ -6485,9 +6485,9 @@ jpeg_load (struct frame *f, struct image *img) | |||
| 6485 | static int | 6485 | static int |
| 6486 | jpeg_load (struct frame *f, struct image *img) | 6486 | jpeg_load (struct frame *f, struct image *img) |
| 6487 | { | 6487 | { |
| 6488 | return ns_load_image(f, img, | 6488 | return ns_load_image (f, img, |
| 6489 | image_spec_value (img->spec, QCfile, NULL), | 6489 | image_spec_value (img->spec, QCfile, NULL), |
| 6490 | image_spec_value (img->spec, QCdata, NULL)); | 6490 | image_spec_value (img->spec, QCdata, NULL)); |
| 6491 | } | 6491 | } |
| 6492 | #endif /* HAVE_NS */ | 6492 | #endif /* HAVE_NS */ |
| 6493 | 6493 | ||
| @@ -6912,9 +6912,9 @@ tiff_load (struct frame *f, struct image *img) | |||
| 6912 | static int | 6912 | static int |
| 6913 | tiff_load (struct frame *f, struct image *img) | 6913 | tiff_load (struct frame *f, struct image *img) |
| 6914 | { | 6914 | { |
| 6915 | return ns_load_image(f, img, | 6915 | return ns_load_image (f, img, |
| 6916 | image_spec_value (img->spec, QCfile, NULL), | 6916 | image_spec_value (img->spec, QCfile, NULL), |
| 6917 | image_spec_value (img->spec, QCdata, NULL)); | 6917 | image_spec_value (img->spec, QCdata, NULL)); |
| 6918 | } | 6918 | } |
| 6919 | #endif /* HAVE_NS */ | 6919 | #endif /* HAVE_NS */ |
| 6920 | 6920 | ||
| @@ -7342,9 +7342,9 @@ gif_load (struct frame *f, struct image *img) | |||
| 7342 | static int | 7342 | static int |
| 7343 | gif_load (struct frame *f, struct image *img) | 7343 | gif_load (struct frame *f, struct image *img) |
| 7344 | { | 7344 | { |
| 7345 | return ns_load_image(f, img, | 7345 | return ns_load_image (f, img, |
| 7346 | image_spec_value (img->spec, QCfile, NULL), | 7346 | image_spec_value (img->spec, QCfile, NULL), |
| 7347 | image_spec_value (img->spec, QCdata, NULL)); | 7347 | image_spec_value (img->spec, QCdata, NULL)); |
| 7348 | } | 7348 | } |
| 7349 | #endif /* HAVE_NS */ | 7349 | #endif /* HAVE_NS */ |
| 7350 | 7350 | ||
| @@ -7666,7 +7666,7 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * | |||
| 7666 | background.pixel = FRAME_BACKGROUND_PIXEL (f); | 7666 | background.pixel = FRAME_BACKGROUND_PIXEL (f); |
| 7667 | x_query_color (f, &background); | 7667 | x_query_color (f, &background); |
| 7668 | #else | 7668 | #else |
| 7669 | ns_query_color(FRAME_BACKGROUND_COLOR (f), &background, 1); | 7669 | ns_query_color (FRAME_BACKGROUND_COLOR (f), &background, 1); |
| 7670 | #endif | 7670 | #endif |
| 7671 | } | 7671 | } |
| 7672 | 7672 | ||
diff --git a/src/process.c b/src/process.c index 75bc59a30ab..0807a0e17cb 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -3003,7 +3003,7 @@ usage: (make-serial-process &rest ARGS) */) | |||
| 3003 | p->inherit_coding_system_flag | 3003 | p->inherit_coding_system_flag |
| 3004 | = !(!NILP (tem) || NILP (buffer) || !inherit_process_coding_system); | 3004 | = !(!NILP (tem) || NILP (buffer) || !inherit_process_coding_system); |
| 3005 | 3005 | ||
| 3006 | Fserial_process_configure(nargs, args); | 3006 | Fserial_process_configure (nargs, args); |
| 3007 | 3007 | ||
| 3008 | specpdl_ptr = specpdl + specpdl_count; | 3008 | specpdl_ptr = specpdl + specpdl_count; |
| 3009 | 3009 | ||
| @@ -3401,7 +3401,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3401 | ret = getaddrinfo (SDATA (host), portstring, &hints, &res); | 3401 | ret = getaddrinfo (SDATA (host), portstring, &hints, &res); |
| 3402 | if (ret) | 3402 | if (ret) |
| 3403 | #ifdef HAVE_GAI_STRERROR | 3403 | #ifdef HAVE_GAI_STRERROR |
| 3404 | error ("%s/%s %s", SDATA (host), portstring, gai_strerror(ret)); | 3404 | error ("%s/%s %s", SDATA (host), portstring, gai_strerror (ret)); |
| 3405 | #else | 3405 | #else |
| 3406 | error ("%s/%s getaddrinfo error %d", SDATA (host), portstring, ret); | 3406 | error ("%s/%s getaddrinfo error %d", SDATA (host), portstring, ret); |
| 3407 | #endif | 3407 | #endif |
| @@ -3900,7 +3900,7 @@ format; see the description of ADDRESS in `make-network-process'. */) | |||
| 3900 | 3900 | ||
| 3901 | again: | 3901 | again: |
| 3902 | ifaces += 25; | 3902 | ifaces += 25; |
| 3903 | buf_size = ifaces * sizeof(ifreqs[0]); | 3903 | buf_size = ifaces * sizeof (ifreqs[0]); |
| 3904 | ifreqs = (struct ifreq *)xrealloc(ifreqs, buf_size); | 3904 | ifreqs = (struct ifreq *)xrealloc(ifreqs, buf_size); |
| 3905 | if (!ifreqs) | 3905 | if (!ifreqs) |
| 3906 | { | 3906 | { |
| @@ -4362,7 +4362,7 @@ server_accept_connection (Lisp_Object server, int channel) | |||
| 4362 | int i; | 4362 | int i; |
| 4363 | args[0] = build_string ("%x:%x:%x:%x:%x:%x:%x:%x"); | 4363 | args[0] = build_string ("%x:%x:%x:%x:%x:%x:%x:%x"); |
| 4364 | for (i = 0; i < 8; i++) | 4364 | for (i = 0; i < 8; i++) |
| 4365 | args[i+1] = make_number (ntohs(ip6[i])); | 4365 | args[i+1] = make_number (ntohs (ip6[i])); |
| 4366 | host = Fformat (9, args); | 4366 | host = Fformat (9, args); |
| 4367 | service = make_number (ntohs (saddr.in.sin_port)); | 4367 | service = make_number (ntohs (saddr.in.sin_port)); |
| 4368 | 4368 | ||
| @@ -5164,23 +5164,23 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, | |||
| 5164 | /* getsockopt(,,SO_ERROR,,) is said to hang on some systems. | 5164 | /* getsockopt(,,SO_ERROR,,) is said to hang on some systems. |
| 5165 | So only use it on systems where it is known to work. */ | 5165 | So only use it on systems where it is known to work. */ |
| 5166 | { | 5166 | { |
| 5167 | int xlen = sizeof(xerrno); | 5167 | int xlen = sizeof (xerrno); |
| 5168 | if (getsockopt(channel, SOL_SOCKET, SO_ERROR, &xerrno, &xlen)) | 5168 | if (getsockopt (channel, SOL_SOCKET, SO_ERROR, &xerrno, &xlen)) |
| 5169 | xerrno = errno; | 5169 | xerrno = errno; |
| 5170 | } | 5170 | } |
| 5171 | #else | 5171 | #else |
| 5172 | { | 5172 | { |
| 5173 | struct sockaddr pname; | 5173 | struct sockaddr pname; |
| 5174 | int pnamelen = sizeof(pname); | 5174 | int pnamelen = sizeof (pname); |
| 5175 | 5175 | ||
| 5176 | /* If connection failed, getpeername will fail. */ | 5176 | /* If connection failed, getpeername will fail. */ |
| 5177 | xerrno = 0; | 5177 | xerrno = 0; |
| 5178 | if (getpeername(channel, &pname, &pnamelen) < 0) | 5178 | if (getpeername (channel, &pname, &pnamelen) < 0) |
| 5179 | { | 5179 | { |
| 5180 | /* Obtain connect failure code through error slippage. */ | 5180 | /* Obtain connect failure code through error slippage. */ |
| 5181 | char dummy; | 5181 | char dummy; |
| 5182 | xerrno = errno; | 5182 | xerrno = errno; |
| 5183 | if (errno == ENOTCONN && read(channel, &dummy, 1) < 0) | 5183 | if (errno == ENOTCONN && read (channel, &dummy, 1) < 0) |
| 5184 | xerrno = errno; | 5184 | xerrno = errno; |
| 5185 | } | 5185 | } |
| 5186 | } | 5186 | } |
| @@ -6336,7 +6336,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */) | |||
| 6336 | CHECK_SYMBOL (sigcode); | 6336 | CHECK_SYMBOL (sigcode); |
| 6337 | name = SDATA (SYMBOL_NAME (sigcode)); | 6337 | name = SDATA (SYMBOL_NAME (sigcode)); |
| 6338 | 6338 | ||
| 6339 | if (!strncmp(name, "SIG", 3) || !strncmp(name, "sig", 3)) | 6339 | if (!strncmp (name, "SIG", 3) || !strncmp (name, "sig", 3)) |
| 6340 | name += 3; | 6340 | name += 3; |
| 6341 | 6341 | ||
| 6342 | if (0) | 6342 | if (0) |
| @@ -7252,7 +7252,7 @@ init_process (void) | |||
| 7252 | processes. As such, we only change the default value. */ | 7252 | processes. As such, we only change the default value. */ |
| 7253 | if (initialized) | 7253 | if (initialized) |
| 7254 | { | 7254 | { |
| 7255 | char *release = get_operating_system_release(); | 7255 | char *release = get_operating_system_release (); |
| 7256 | if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION | 7256 | if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION |
| 7257 | && release[1] == '.')) { | 7257 | && release[1] == '.')) { |
| 7258 | Vprocess_connection_type = Qnil; | 7258 | Vprocess_connection_type = Qnil; |
| @@ -315,8 +315,8 @@ is_windows_9x (void) | |||
| 315 | if (g_b_init_is_windows_9x == 0) | 315 | if (g_b_init_is_windows_9x == 0) |
| 316 | { | 316 | { |
| 317 | g_b_init_is_windows_9x = 1; | 317 | g_b_init_is_windows_9x = 1; |
| 318 | ZeroMemory(&os_ver, sizeof(OSVERSIONINFO)); | 318 | ZeroMemory (&os_ver, sizeof (OSVERSIONINFO)); |
| 319 | os_ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); | 319 | os_ver.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); |
| 320 | if (GetVersionEx (&os_ver)) | 320 | if (GetVersionEx (&os_ver)) |
| 321 | { | 321 | { |
| 322 | s_b_ret = (os_ver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS); | 322 | s_b_ret = (os_ver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS); |
| @@ -334,7 +334,7 @@ w32_get_internal_run_time (void) | |||
| 334 | if (get_process_times_fn) | 334 | if (get_process_times_fn) |
| 335 | { | 335 | { |
| 336 | FILETIME create, exit, kernel, user; | 336 | FILETIME create, exit, kernel, user; |
| 337 | HANDLE proc = GetCurrentProcess(); | 337 | HANDLE proc = GetCurrentProcess (); |
| 338 | if ((*get_process_times_fn) (proc, &create, &exit, &kernel, &user)) | 338 | if ((*get_process_times_fn) (proc, &create, &exit, &kernel, &user)) |
| 339 | { | 339 | { |
| 340 | LARGE_INTEGER user_int, kernel_int, total; | 340 | LARGE_INTEGER user_int, kernel_int, total; |
| @@ -753,7 +753,7 @@ void WINAPI get_native_system_info ( | |||
| 753 | lpSystemInfo->dwNumberOfProcessors = -1; | 753 | lpSystemInfo->dwNumberOfProcessors = -1; |
| 754 | } | 754 | } |
| 755 | 755 | ||
| 756 | BOOL WINAPI get_system_times( | 756 | BOOL WINAPI get_system_times ( |
| 757 | LPFILETIME lpIdleTime, | 757 | LPFILETIME lpIdleTime, |
| 758 | LPFILETIME lpKernelTime, | 758 | LPFILETIME lpKernelTime, |
| 759 | LPFILETIME lpUserTime) | 759 | LPFILETIME lpUserTime) |
| @@ -1634,7 +1634,7 @@ init_environment (char ** argv) | |||
| 1634 | {"LANG", NULL}, | 1634 | {"LANG", NULL}, |
| 1635 | }; | 1635 | }; |
| 1636 | 1636 | ||
| 1637 | #define N_ENV_VARS sizeof(dflt_envvars)/sizeof(dflt_envvars[0]) | 1637 | #define N_ENV_VARS sizeof (dflt_envvars)/sizeof (dflt_envvars[0]) |
| 1638 | 1638 | ||
| 1639 | /* We need to copy dflt_envvars[] and work on the copy because we | 1639 | /* We need to copy dflt_envvars[] and work on the copy because we |
| 1640 | don't want the dumped Emacs to inherit the values of | 1640 | don't want the dumped Emacs to inherit the values of |
| @@ -1707,7 +1707,7 @@ init_environment (char ** argv) | |||
| 1707 | for (p = modname; *p; p++) | 1707 | for (p = modname; *p; p++) |
| 1708 | if (*p == '\\') *p = '/'; | 1708 | if (*p == '\\') *p = '/'; |
| 1709 | 1709 | ||
| 1710 | _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname); | 1710 | _snprintf (buf, sizeof (buf)-1, "emacs_dir=%s", modname); |
| 1711 | _putenv (strdup (buf)); | 1711 | _putenv (strdup (buf)); |
| 1712 | } | 1712 | } |
| 1713 | /* Handle running emacs from the build directory: src/oo-spd/i386/ */ | 1713 | /* Handle running emacs from the build directory: src/oo-spd/i386/ */ |
| @@ -1731,7 +1731,7 @@ init_environment (char ** argv) | |||
| 1731 | for (p = modname; *p; p++) | 1731 | for (p = modname; *p; p++) |
| 1732 | if (*p == '\\') *p = '/'; | 1732 | if (*p == '\\') *p = '/'; |
| 1733 | 1733 | ||
| 1734 | _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname); | 1734 | _snprintf (buf, sizeof (buf)-1, "emacs_dir=%s", modname); |
| 1735 | _putenv (strdup (buf)); | 1735 | _putenv (strdup (buf)); |
| 1736 | } | 1736 | } |
| 1737 | } | 1737 | } |
| @@ -1759,12 +1759,12 @@ init_environment (char ** argv) | |||
| 1759 | char buf1[SET_ENV_BUF_SIZE], buf2[SET_ENV_BUF_SIZE]; | 1759 | char buf1[SET_ENV_BUF_SIZE], buf2[SET_ENV_BUF_SIZE]; |
| 1760 | 1760 | ||
| 1761 | if (dwType == REG_EXPAND_SZ) | 1761 | if (dwType == REG_EXPAND_SZ) |
| 1762 | ExpandEnvironmentStrings ((LPSTR) lpval, buf1, sizeof(buf1)); | 1762 | ExpandEnvironmentStrings ((LPSTR) lpval, buf1, sizeof (buf1)); |
| 1763 | else if (dwType == REG_SZ) | 1763 | else if (dwType == REG_SZ) |
| 1764 | strcpy (buf1, lpval); | 1764 | strcpy (buf1, lpval); |
| 1765 | if (dwType == REG_EXPAND_SZ || dwType == REG_SZ) | 1765 | if (dwType == REG_EXPAND_SZ || dwType == REG_SZ) |
| 1766 | { | 1766 | { |
| 1767 | _snprintf (buf2, sizeof(buf2)-1, "%s=%s", env_vars[i].name, | 1767 | _snprintf (buf2, sizeof (buf2)-1, "%s=%s", env_vars[i].name, |
| 1768 | buf1); | 1768 | buf1); |
| 1769 | _putenv (strdup (buf2)); | 1769 | _putenv (strdup (buf2)); |
| 1770 | } | 1770 | } |
| @@ -2107,7 +2107,7 @@ GetCachedVolumeInformation (char * root_dir) | |||
| 2107 | involve network access, and so is extremely quick). */ | 2107 | involve network access, and so is extremely quick). */ |
| 2108 | 2108 | ||
| 2109 | /* Map drive letter to UNC if remote. */ | 2109 | /* Map drive letter to UNC if remote. */ |
| 2110 | if ( isalpha( root_dir[0] ) && !fixed[ DRIVE_INDEX( root_dir[0] ) ] ) | 2110 | if (isalpha (root_dir[0]) && !fixed[DRIVE_INDEX (root_dir[0])]) |
| 2111 | { | 2111 | { |
| 2112 | char remote_name[ 256 ]; | 2112 | char remote_name[ 256 ]; |
| 2113 | char drive[3] = { root_dir[0], ':' }; | 2113 | char drive[3] = { root_dir[0], ':' }; |
| @@ -2506,8 +2506,8 @@ open_unc_volume (const char *path) | |||
| 2506 | nr.lpComment = NULL; | 2506 | nr.lpComment = NULL; |
| 2507 | nr.lpProvider = NULL; | 2507 | nr.lpProvider = NULL; |
| 2508 | 2508 | ||
| 2509 | result = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_DISK, | 2509 | result = WNetOpenEnum (RESOURCE_GLOBALNET, RESOURCETYPE_DISK, |
| 2510 | RESOURCEUSAGE_CONNECTABLE, &nr, &henum); | 2510 | RESOURCEUSAGE_CONNECTABLE, &nr, &henum); |
| 2511 | 2511 | ||
| 2512 | if (result == NO_ERROR) | 2512 | if (result == NO_ERROR) |
| 2513 | return henum; | 2513 | return henum; |
| @@ -2770,7 +2770,7 @@ sys_link (const char * old, const char * new) | |||
| 2770 | 2770 | ||
| 2771 | data.wid.dwStreamId = BACKUP_LINK; | 2771 | data.wid.dwStreamId = BACKUP_LINK; |
| 2772 | data.wid.dwStreamAttributes = 0; | 2772 | data.wid.dwStreamAttributes = 0; |
| 2773 | data.wid.Size.LowPart = wlen * sizeof(WCHAR); | 2773 | data.wid.Size.LowPart = wlen * sizeof (WCHAR); |
| 2774 | data.wid.Size.HighPart = 0; | 2774 | data.wid.Size.HighPart = 0; |
| 2775 | data.wid.dwStreamNameSize = 0; | 2775 | data.wid.dwStreamNameSize = 0; |
| 2776 | 2776 | ||
| @@ -3183,7 +3183,7 @@ get_name_and_id (PSECURITY_DESCRIPTOR psd, const char *fname, | |||
| 3183 | char name[UNLEN+1]; | 3183 | char name[UNLEN+1]; |
| 3184 | DWORD name_len = sizeof (name); | 3184 | DWORD name_len = sizeof (name); |
| 3185 | char domain[1024]; | 3185 | char domain[1024]; |
| 3186 | DWORD domain_len = sizeof(domain); | 3186 | DWORD domain_len = sizeof (domain); |
| 3187 | char *mp = NULL; | 3187 | char *mp = NULL; |
| 3188 | int use_dflt = 0; | 3188 | int use_dflt = 0; |
| 3189 | int result; | 3189 | int result; |
| @@ -3658,7 +3658,7 @@ utime (const char *name, struct utimbuf *times) | |||
| 3658 | 3658 | ||
| 3659 | /* Helper wrapper functions. */ | 3659 | /* Helper wrapper functions. */ |
| 3660 | 3660 | ||
| 3661 | HANDLE WINAPI create_toolhelp32_snapshot( | 3661 | HANDLE WINAPI create_toolhelp32_snapshot ( |
| 3662 | DWORD Flags, | 3662 | DWORD Flags, |
| 3663 | DWORD Ignored) | 3663 | DWORD Ignored) |
| 3664 | { | 3664 | { |
| @@ -3678,7 +3678,7 @@ HANDLE WINAPI create_toolhelp32_snapshot( | |||
| 3678 | return (s_pfn_Create_Toolhelp32_Snapshot (Flags, Ignored)); | 3678 | return (s_pfn_Create_Toolhelp32_Snapshot (Flags, Ignored)); |
| 3679 | } | 3679 | } |
| 3680 | 3680 | ||
| 3681 | BOOL WINAPI process32_first( | 3681 | BOOL WINAPI process32_first ( |
| 3682 | HANDLE hSnapshot, | 3682 | HANDLE hSnapshot, |
| 3683 | LPPROCESSENTRY32 lppe) | 3683 | LPPROCESSENTRY32 lppe) |
| 3684 | { | 3684 | { |
| @@ -3698,7 +3698,7 @@ BOOL WINAPI process32_first( | |||
| 3698 | return (s_pfn_Process32_First (hSnapshot, lppe)); | 3698 | return (s_pfn_Process32_First (hSnapshot, lppe)); |
| 3699 | } | 3699 | } |
| 3700 | 3700 | ||
| 3701 | BOOL WINAPI process32_next( | 3701 | BOOL WINAPI process32_next ( |
| 3702 | HANDLE hSnapshot, | 3702 | HANDLE hSnapshot, |
| 3703 | LPPROCESSENTRY32 lppe) | 3703 | LPPROCESSENTRY32 lppe) |
| 3704 | { | 3704 | { |
| @@ -4006,8 +4006,8 @@ process_times (HANDLE h_proc, Lisp_Object *ctime, Lisp_Object *etime, | |||
| 4006 | 4006 | ||
| 4007 | if (!h_proc | 4007 | if (!h_proc |
| 4008 | || !get_process_times_fn | 4008 | || !get_process_times_fn |
| 4009 | || !(*get_process_times_fn)(h_proc, &ft_creation, &ft_exit, | 4009 | || !(*get_process_times_fn) (h_proc, &ft_creation, &ft_exit, |
| 4010 | &ft_kernel, &ft_user)) | 4010 | &ft_kernel, &ft_user)) |
| 4011 | return 0; | 4011 | return 0; |
| 4012 | 4012 | ||
| 4013 | GetSystemTimeAsFileTime (&ft_current); | 4013 | GetSystemTimeAsFileTime (&ft_current); |
| @@ -4448,34 +4448,34 @@ init_winsock (int load_now) | |||
| 4448 | if ((pfn_##fn = (void *) GetProcAddress (winsock_lib, #fn)) == NULL) \ | 4448 | if ((pfn_##fn = (void *) GetProcAddress (winsock_lib, #fn)) == NULL) \ |
| 4449 | goto fail; | 4449 | goto fail; |
| 4450 | 4450 | ||
| 4451 | LOAD_PROC( WSAStartup ); | 4451 | LOAD_PROC (WSAStartup); |
| 4452 | LOAD_PROC( WSASetLastError ); | 4452 | LOAD_PROC (WSASetLastError); |
| 4453 | LOAD_PROC( WSAGetLastError ); | 4453 | LOAD_PROC (WSAGetLastError); |
| 4454 | LOAD_PROC( WSAEventSelect ); | 4454 | LOAD_PROC (WSAEventSelect); |
| 4455 | LOAD_PROC( WSACreateEvent ); | 4455 | LOAD_PROC (WSACreateEvent); |
| 4456 | LOAD_PROC( WSACloseEvent ); | 4456 | LOAD_PROC (WSACloseEvent); |
| 4457 | LOAD_PROC( socket ); | 4457 | LOAD_PROC (socket); |
| 4458 | LOAD_PROC( bind ); | 4458 | LOAD_PROC (bind); |
| 4459 | LOAD_PROC( connect ); | 4459 | LOAD_PROC (connect); |
| 4460 | LOAD_PROC( ioctlsocket ); | 4460 | LOAD_PROC (ioctlsocket); |
| 4461 | LOAD_PROC( recv ); | 4461 | LOAD_PROC (recv); |
| 4462 | LOAD_PROC( send ); | 4462 | LOAD_PROC (send); |
| 4463 | LOAD_PROC( closesocket ); | 4463 | LOAD_PROC (closesocket); |
| 4464 | LOAD_PROC( shutdown ); | 4464 | LOAD_PROC (shutdown); |
| 4465 | LOAD_PROC( htons ); | 4465 | LOAD_PROC (htons); |
| 4466 | LOAD_PROC( ntohs ); | 4466 | LOAD_PROC (ntohs); |
| 4467 | LOAD_PROC( inet_addr ); | 4467 | LOAD_PROC (inet_addr); |
| 4468 | LOAD_PROC( gethostname ); | 4468 | LOAD_PROC (gethostname); |
| 4469 | LOAD_PROC( gethostbyname ); | 4469 | LOAD_PROC (gethostbyname); |
| 4470 | LOAD_PROC( getservbyname ); | 4470 | LOAD_PROC (getservbyname); |
| 4471 | LOAD_PROC( getpeername ); | 4471 | LOAD_PROC (getpeername); |
| 4472 | LOAD_PROC( WSACleanup ); | 4472 | LOAD_PROC (WSACleanup); |
| 4473 | LOAD_PROC( setsockopt ); | 4473 | LOAD_PROC (setsockopt); |
| 4474 | LOAD_PROC( listen ); | 4474 | LOAD_PROC (listen); |
| 4475 | LOAD_PROC( getsockname ); | 4475 | LOAD_PROC (getsockname); |
| 4476 | LOAD_PROC( accept ); | 4476 | LOAD_PROC (accept); |
| 4477 | LOAD_PROC( recvfrom ); | 4477 | LOAD_PROC (recvfrom); |
| 4478 | LOAD_PROC( sendto ); | 4478 | LOAD_PROC (sendto); |
| 4479 | #undef LOAD_PROC | 4479 | #undef LOAD_PROC |
| 4480 | 4480 | ||
| 4481 | /* specify version 1.1 of winsock */ | 4481 | /* specify version 1.1 of winsock */ |
| @@ -4620,7 +4620,7 @@ struct { | |||
| 4620 | }; | 4620 | }; |
| 4621 | 4621 | ||
| 4622 | char * | 4622 | char * |
| 4623 | sys_strerror(int error_no) | 4623 | sys_strerror (int error_no) |
| 4624 | { | 4624 | { |
| 4625 | int i; | 4625 | int i; |
| 4626 | static char unknown_msg[40]; | 4626 | static char unknown_msg[40]; |
| @@ -4632,7 +4632,7 @@ sys_strerror(int error_no) | |||
| 4632 | if (_wsa_errlist[i].errnum == error_no) | 4632 | if (_wsa_errlist[i].errnum == error_no) |
| 4633 | return _wsa_errlist[i].msg; | 4633 | return _wsa_errlist[i].msg; |
| 4634 | 4634 | ||
| 4635 | sprintf(unknown_msg, "Unidentified error: %d", error_no); | 4635 | sprintf (unknown_msg, "Unidentified error: %d", error_no); |
| 4636 | return unknown_msg; | 4636 | return unknown_msg; |
| 4637 | } | 4637 | } |
| 4638 | 4638 | ||
| @@ -4651,7 +4651,7 @@ sys_strerror(int error_no) | |||
| 4651 | int socket_to_fd (SOCKET s); | 4651 | int socket_to_fd (SOCKET s); |
| 4652 | 4652 | ||
| 4653 | int | 4653 | int |
| 4654 | sys_socket(int af, int type, int protocol) | 4654 | sys_socket (int af, int type, int protocol) |
| 4655 | { | 4655 | { |
| 4656 | SOCKET s; | 4656 | SOCKET s; |
| 4657 | 4657 | ||
| @@ -4854,7 +4854,7 @@ sys_gethostname (char * name, int namelen) | |||
| 4854 | } | 4854 | } |
| 4855 | 4855 | ||
| 4856 | struct hostent * | 4856 | struct hostent * |
| 4857 | sys_gethostbyname(const char * name) | 4857 | sys_gethostbyname (const char * name) |
| 4858 | { | 4858 | { |
| 4859 | struct hostent * host; | 4859 | struct hostent * host; |
| 4860 | 4860 | ||
| @@ -4872,7 +4872,7 @@ sys_gethostbyname(const char * name) | |||
| 4872 | } | 4872 | } |
| 4873 | 4873 | ||
| 4874 | struct servent * | 4874 | struct servent * |
| 4875 | sys_getservbyname(const char * name, const char * proto) | 4875 | sys_getservbyname (const char * name, const char * proto) |
| 4876 | { | 4876 | { |
| 4877 | struct servent * serv; | 4877 | struct servent * serv; |
| 4878 | 4878 | ||
| @@ -5525,8 +5525,8 @@ sys_read (int fd, char * buffer, unsigned int count) | |||
| 5525 | int res = pfn_recv (SOCK_HANDLE (fd), buffer, count, 0); | 5525 | int res = pfn_recv (SOCK_HANDLE (fd), buffer, count, 0); |
| 5526 | if (res == SOCKET_ERROR) | 5526 | if (res == SOCKET_ERROR) |
| 5527 | { | 5527 | { |
| 5528 | DebPrint(("sys_read.recv failed with error %d on socket %ld\n", | 5528 | DebPrint (("sys_read.recv failed with error %d on socket %ld\n", |
| 5529 | pfn_WSAGetLastError (), SOCK_HANDLE (fd))); | 5529 | pfn_WSAGetLastError (), SOCK_HANDLE (fd))); |
| 5530 | set_errno (); | 5530 | set_errno (); |
| 5531 | return -1; | 5531 | return -1; |
| 5532 | } | 5532 | } |
| @@ -5682,8 +5682,8 @@ sys_write (int fd, const void * buffer, unsigned int count) | |||
| 5682 | 5682 | ||
| 5683 | if (nchars == SOCKET_ERROR) | 5683 | if (nchars == SOCKET_ERROR) |
| 5684 | { | 5684 | { |
| 5685 | DebPrint(("sys_write.send failed with error %d on socket %ld\n", | 5685 | DebPrint (("sys_write.send failed with error %d on socket %ld\n", |
| 5686 | pfn_WSAGetLastError (), SOCK_HANDLE (fd))); | 5686 | pfn_WSAGetLastError (), SOCK_HANDLE (fd))); |
| 5687 | set_errno (); | 5687 | set_errno (); |
| 5688 | } | 5688 | } |
| 5689 | } | 5689 | } |
| @@ -5898,7 +5898,7 @@ init_ntproc (void) | |||
| 5898 | up to date when the user logs off, or the system shuts down. | 5898 | up to date when the user logs off, or the system shuts down. |
| 5899 | */ | 5899 | */ |
| 5900 | BOOL WINAPI | 5900 | BOOL WINAPI |
| 5901 | shutdown_handler(DWORD type) | 5901 | shutdown_handler (DWORD type) |
| 5902 | { | 5902 | { |
| 5903 | /* Ctrl-C and Ctrl-Break are already suppressed, so don't handle them. */ | 5903 | /* Ctrl-C and Ctrl-Break are already suppressed, so don't handle them. */ |
| 5904 | if (type == CTRL_CLOSE_EVENT /* User closes console window. */ | 5904 | if (type == CTRL_CLOSE_EVENT /* User closes console window. */ |
| @@ -5957,7 +5957,7 @@ globals_of_w32 (void) | |||
| 5957 | console apps. This actually applies to Emacs in both console and | 5957 | console apps. This actually applies to Emacs in both console and |
| 5958 | GUI modes, since we had to fool windows into thinking emacs is a | 5958 | GUI modes, since we had to fool windows into thinking emacs is a |
| 5959 | console application to get console mode to work. */ | 5959 | console application to get console mode to work. */ |
| 5960 | SetConsoleCtrlHandler(shutdown_handler, TRUE); | 5960 | SetConsoleCtrlHandler (shutdown_handler, TRUE); |
| 5961 | 5961 | ||
| 5962 | /* "None" is the default group name on standalone workstations. */ | 5962 | /* "None" is the default group name on standalone workstations. */ |
| 5963 | strcpy (dflt_group_name, "None"); | 5963 | strcpy (dflt_group_name, "None"); |
diff --git a/src/w32console.c b/src/w32console.c index c2fe6e7db5c..d3c677ae0be 100644 --- a/src/w32console.c +++ b/src/w32console.c | |||
| @@ -493,7 +493,7 @@ w32con_set_terminal_window (struct frame *f, int size) | |||
| 493 | ***********************************************************************/ | 493 | ***********************************************************************/ |
| 494 | 494 | ||
| 495 | void | 495 | void |
| 496 | sys_tputs (char *str, int nlines, int (*outfun)(int)) | 496 | sys_tputs (char *str, int nlines, int (*outfun) (int)) |
| 497 | { | 497 | { |
| 498 | } | 498 | } |
| 499 | 499 | ||
| @@ -671,8 +671,8 @@ initialize_w32_display (struct terminal *term) | |||
| 671 | 671 | ||
| 672 | /* Respect setting of LINES and COLUMNS environment variables. */ | 672 | /* Respect setting of LINES and COLUMNS environment variables. */ |
| 673 | { | 673 | { |
| 674 | char * lines = getenv("LINES"); | 674 | char * lines = getenv ("LINES"); |
| 675 | char * columns = getenv("COLUMNS"); | 675 | char * columns = getenv ("COLUMNS"); |
| 676 | 676 | ||
| 677 | if (lines != NULL && columns != NULL) | 677 | if (lines != NULL && columns != NULL) |
| 678 | { | 678 | { |
diff --git a/src/w32fns.c b/src/w32fns.c index ddb8e76d7fc..b5af95cca13 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -3094,7 +3094,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 3094 | wmsg.dwModifiers = w32_get_key_modifiers (wParam, lParam); | 3094 | wmsg.dwModifiers = w32_get_key_modifiers (wParam, lParam); |
| 3095 | /* Get buffer size. */ | 3095 | /* Get buffer size. */ |
| 3096 | size = get_composition_string_fn (context, GCS_RESULTSTR, buffer, 0); | 3096 | size = get_composition_string_fn (context, GCS_RESULTSTR, buffer, 0); |
| 3097 | buffer = alloca(size); | 3097 | buffer = alloca (size); |
| 3098 | size = get_composition_string_fn (context, GCS_RESULTSTR, | 3098 | size = get_composition_string_fn (context, GCS_RESULTSTR, |
| 3099 | buffer, size); | 3099 | buffer, size); |
| 3100 | release_ime_context_fn (hwnd, context); | 3100 | release_ime_context_fn (hwnd, context); |
diff --git a/src/w32font.c b/src/w32font.c index d86fb3b792c..d4dd3e75a7f 100644 --- a/src/w32font.c +++ b/src/w32font.c | |||
| @@ -549,7 +549,7 @@ w32font_draw (struct glyph_string *s, int from, int to, | |||
| 549 | 549 | ||
| 550 | /* Save clip region for later restoration. */ | 550 | /* Save clip region for later restoration. */ |
| 551 | orig_clip = CreateRectRgn (0, 0, 0, 0); | 551 | orig_clip = CreateRectRgn (0, 0, 0, 0); |
| 552 | if (!GetClipRgn(s->hdc, orig_clip)) | 552 | if (!GetClipRgn (s->hdc, orig_clip)) |
| 553 | { | 553 | { |
| 554 | DeleteObject (orig_clip); | 554 | DeleteObject (orig_clip); |
| 555 | orig_clip = NULL; | 555 | orig_clip = NULL; |
| @@ -1785,7 +1785,7 @@ w32_registry (LONG w32_charset, DWORD font_type) | |||
| 1785 | return font_type == TRUETYPE_FONTTYPE ? Qiso10646_1 : Qunknown; | 1785 | return font_type == TRUETYPE_FONTTYPE ? Qiso10646_1 : Qunknown; |
| 1786 | 1786 | ||
| 1787 | charset = w32_to_x_charset (w32_charset, NULL); | 1787 | charset = w32_to_x_charset (w32_charset, NULL); |
| 1788 | return font_intern_prop (charset, strlen(charset), 1); | 1788 | return font_intern_prop (charset, strlen (charset), 1); |
| 1789 | } | 1789 | } |
| 1790 | 1790 | ||
| 1791 | static int | 1791 | static int |
diff --git a/src/w32inevt.c b/src/w32inevt.c index aa9fe09d857..1ab0546d44f 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c | |||
| @@ -582,8 +582,8 @@ w32_console_mouse_position (FRAME_PTR *f, | |||
| 582 | *part = 0; | 582 | *part = 0; |
| 583 | SELECTED_FRAME ()->mouse_moved = 0; | 583 | SELECTED_FRAME ()->mouse_moved = 0; |
| 584 | 584 | ||
| 585 | XSETINT(*x, movement_pos.X); | 585 | XSETINT (*x, movement_pos.X); |
| 586 | XSETINT(*y, movement_pos.Y); | 586 | XSETINT (*y, movement_pos.Y); |
| 587 | *time = movement_time; | 587 | *time = movement_time; |
| 588 | 588 | ||
| 589 | UNBLOCK_INPUT; | 589 | UNBLOCK_INPUT; |
diff --git a/src/w32menu.c b/src/w32menu.c index 37be0bd028d..8def7237ba0 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -1118,7 +1118,7 @@ w32_dialog_show (FRAME_PTR f, int keymaps, | |||
| 1118 | /* Frame title: 'Q' = Question, 'I' = Information. | 1118 | /* Frame title: 'Q' = Question, 'I' = Information. |
| 1119 | Can also have 'E' = Error if, one day, we want | 1119 | Can also have 'E' = Error if, one day, we want |
| 1120 | a popup for errors. */ | 1120 | a popup for errors. */ |
| 1121 | if (NILP(header)) | 1121 | if (NILP (header)) |
| 1122 | dialog_name[0] = 'Q'; | 1122 | dialog_name[0] = 'Q'; |
| 1123 | else | 1123 | else |
| 1124 | dialog_name[0] = 'I'; | 1124 | dialog_name[0] = 'I'; |
diff --git a/src/w32proc.c b/src/w32proc.c index 9eef228292f..eccdcc30553 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -46,7 +46,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 46 | #include <windows.h> | 46 | #include <windows.h> |
| 47 | #ifdef __GNUC__ | 47 | #ifdef __GNUC__ |
| 48 | /* This definition is missing from mingw32 headers. */ | 48 | /* This definition is missing from mingw32 headers. */ |
| 49 | extern BOOL WINAPI IsValidLocale(LCID, DWORD); | 49 | extern BOOL WINAPI IsValidLocale (LCID, DWORD); |
| 50 | #endif | 50 | #endif |
| 51 | 51 | ||
| 52 | #ifdef HAVE_LANGINFO_CODESET | 52 | #ifdef HAVE_LANGINFO_CODESET |
| @@ -130,7 +130,7 @@ _DebPrint (const char *fmt, ...) | |||
| 130 | } | 130 | } |
| 131 | #endif | 131 | #endif |
| 132 | 132 | ||
| 133 | typedef void (_CALLBACK_ *signal_handler)(int); | 133 | typedef void (_CALLBACK_ *signal_handler) (int); |
| 134 | 134 | ||
| 135 | /* Signal handlers...SIG_DFL == 0 so this is initialized correctly. */ | 135 | /* Signal handlers...SIG_DFL == 0 so this is initialized correctly. */ |
| 136 | static signal_handler sig_handlers[NSIG]; | 136 | static signal_handler sig_handlers[NSIG]; |
| @@ -176,7 +176,7 @@ new_child (void) | |||
| 176 | cp = &child_procs[child_proc_count++]; | 176 | cp = &child_procs[child_proc_count++]; |
| 177 | 177 | ||
| 178 | Initialise: | 178 | Initialise: |
| 179 | memset (cp, 0, sizeof(*cp)); | 179 | memset (cp, 0, sizeof (*cp)); |
| 180 | cp->fd = -1; | 180 | cp->fd = -1; |
| 181 | cp->pid = -1; | 181 | cp->pid = -1; |
| 182 | cp->procinfo.hProcess = NULL; | 182 | cp->procinfo.hProcess = NULL; |
| @@ -399,7 +399,7 @@ create_child (char *exe, char *cmdline, char *env, int is_gui_app, | |||
| 399 | return TRUE; | 399 | return TRUE; |
| 400 | 400 | ||
| 401 | EH_Fail: | 401 | EH_Fail: |
| 402 | DebPrint (("create_child.CreateProcess failed: %ld\n", GetLastError());); | 402 | DebPrint (("create_child.CreateProcess failed: %ld\n", GetLastError ());); |
| 403 | return FALSE; | 403 | return FALSE; |
| 404 | } | 404 | } |
| 405 | 405 | ||
| @@ -2015,7 +2015,7 @@ int_from_hex (char * s) | |||
| 2015 | static char hex[] = "0123456789abcdefABCDEF"; | 2015 | static char hex[] = "0123456789abcdefABCDEF"; |
| 2016 | char * p; | 2016 | char * p; |
| 2017 | 2017 | ||
| 2018 | while (*s && (p = strchr(hex, *s)) != NULL) | 2018 | while (*s && (p = strchr (hex, *s)) != NULL) |
| 2019 | { | 2019 | { |
| 2020 | unsigned digit = p - hex; | 2020 | unsigned digit = p - hex; |
| 2021 | if (digit > 15) | 2021 | if (digit > 15) |
diff --git a/src/w32select.c b/src/w32select.c index 4ecd926ed79..020d272479c 100644 --- a/src/w32select.c +++ b/src/w32select.c | |||
| @@ -224,7 +224,7 @@ convert_to_handle_as_coded (Lisp_Object coding_system) | |||
| 224 | SDATA (SYMBOL_NAME (coding_system)))); | 224 | SDATA (SYMBOL_NAME (coding_system)))); |
| 225 | 225 | ||
| 226 | setup_windows_coding_system (coding_system, &coding); | 226 | setup_windows_coding_system (coding_system, &coding); |
| 227 | coding.dst_bytes = SBYTES(current_text) * 2; | 227 | coding.dst_bytes = SBYTES (current_text) * 2; |
| 228 | coding.destination = (unsigned char *) xmalloc (coding.dst_bytes); | 228 | coding.destination = (unsigned char *) xmalloc (coding.dst_bytes); |
| 229 | encode_coding_object (&coding, current_text, 0, 0, | 229 | encode_coding_object (&coding, current_text, 0, 0, |
| 230 | SCHARS (current_text), SBYTES (current_text), Qnil); | 230 | SCHARS (current_text), SBYTES (current_text), Qnil); |
| @@ -290,7 +290,7 @@ render (Lisp_Object oformat) | |||
| 290 | 290 | ||
| 291 | if (SetClipboardData (format, htext) == NULL) | 291 | if (SetClipboardData (format, htext) == NULL) |
| 292 | { | 292 | { |
| 293 | GlobalFree(htext); | 293 | GlobalFree (htext); |
| 294 | return Qnil; | 294 | return Qnil; |
| 295 | } | 295 | } |
| 296 | 296 | ||
| @@ -314,7 +314,7 @@ render_locale (void) | |||
| 314 | 314 | ||
| 315 | if ((lcid_ptr = (LCID *) GlobalLock (hlocale)) == NULL) | 315 | if ((lcid_ptr = (LCID *) GlobalLock (hlocale)) == NULL) |
| 316 | { | 316 | { |
| 317 | GlobalFree(hlocale); | 317 | GlobalFree (hlocale); |
| 318 | return Qnil; | 318 | return Qnil; |
| 319 | } | 319 | } |
| 320 | 320 | ||
| @@ -323,7 +323,7 @@ render_locale (void) | |||
| 323 | 323 | ||
| 324 | if (SetClipboardData (CF_LOCALE, hlocale) == NULL) | 324 | if (SetClipboardData (CF_LOCALE, hlocale) == NULL) |
| 325 | { | 325 | { |
| 326 | GlobalFree(hlocale); | 326 | GlobalFree (hlocale); |
| 327 | return Qnil; | 327 | return Qnil; |
| 328 | } | 328 | } |
| 329 | 329 | ||
| @@ -380,7 +380,7 @@ render_all (Lisp_Object ignore) | |||
| 380 | automatic conversions anywhere else, so to get consistent | 380 | automatic conversions anywhere else, so to get consistent |
| 381 | results, we probably don't want to rely on it here either. */ | 381 | results, we probably don't want to rely on it here either. */ |
| 382 | 382 | ||
| 383 | render_locale(); | 383 | render_locale (); |
| 384 | 384 | ||
| 385 | if (current_clipboard_type == CF_UNICODETEXT) | 385 | if (current_clipboard_type == CF_UNICODETEXT) |
| 386 | render (make_number (CF_TEXT)); | 386 | render (make_number (CF_TEXT)); |
| @@ -744,7 +744,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, | |||
| 744 | /* If we have something non-ASCII we may want to set a locale. We | 744 | /* If we have something non-ASCII we may want to set a locale. We |
| 745 | do that directly (non-delayed), as it's just a small bit. */ | 745 | do that directly (non-delayed), as it's just a small bit. */ |
| 746 | if (ok) | 746 | if (ok) |
| 747 | ok = !NILP(render_locale()); | 747 | ok = !NILP (render_locale ()); |
| 748 | 748 | ||
| 749 | if (ok) | 749 | if (ok) |
| 750 | { | 750 | { |
| @@ -753,7 +753,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, | |||
| 753 | /* If for some reason we don't have a clipboard_owner, we | 753 | /* If for some reason we don't have a clipboard_owner, we |
| 754 | just set the text format as chosen by the configuration | 754 | just set the text format as chosen by the configuration |
| 755 | and than forget about the whole thing. */ | 755 | and than forget about the whole thing. */ |
| 756 | ok = !NILP(render (make_number (current_clipboard_type))); | 756 | ok = !NILP (render (make_number (current_clipboard_type))); |
| 757 | current_text = Qnil; | 757 | current_text = Qnil; |
| 758 | current_coding_system = Qnil; | 758 | current_coding_system = Qnil; |
| 759 | } | 759 | } |
diff --git a/src/w32term.c b/src/w32term.c index 5dfe6a363d3..1a953be944b 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -2359,7 +2359,7 @@ x_draw_glyph_string (struct glyph_string *s) | |||
| 2359 | 2359 | ||
| 2360 | /* Draw strike-through. */ | 2360 | /* Draw strike-through. */ |
| 2361 | if (s->face->strike_through_p | 2361 | if (s->face->strike_through_p |
| 2362 | && !FONT_TEXTMETRIC(s->font).tmStruckOut) | 2362 | && !FONT_TEXTMETRIC (s->font).tmStruckOut) |
| 2363 | { | 2363 | { |
| 2364 | unsigned long h = 1; | 2364 | unsigned long h = 1; |
| 2365 | unsigned long dy = (s->height - h) / 2; | 2365 | unsigned long dy = (s->height - h) / 2; |
| @@ -3294,7 +3294,7 @@ w32_set_scroll_bar_thumb (struct scroll_bar *bar, | |||
| 3294 | BLOCK_INPUT; | 3294 | BLOCK_INPUT; |
| 3295 | si.cbSize = sizeof (si); | 3295 | si.cbSize = sizeof (si); |
| 3296 | si.fMask = SIF_POS | SIF_PAGE; | 3296 | si.fMask = SIF_POS | SIF_PAGE; |
| 3297 | GetScrollInfo(w, SB_CTL, &si); | 3297 | GetScrollInfo (w, SB_CTL, &si); |
| 3298 | near_bottom_p = si.nPos + si.nPage >= range; | 3298 | near_bottom_p = si.nPos + si.nPage >= range; |
| 3299 | UNBLOCK_INPUT; | 3299 | UNBLOCK_INPUT; |
| 3300 | if (!near_bottom_p) | 3300 | if (!near_bottom_p) |
| @@ -4169,7 +4169,7 @@ w32_read_socket (struct terminal *terminal, int expected, | |||
| 4169 | temp_index = 0; | 4169 | temp_index = 0; |
| 4170 | temp_buffer[temp_index++] = msg.msg.wParam; | 4170 | temp_buffer[temp_index++] = msg.msg.wParam; |
| 4171 | inev.kind = MULTIMEDIA_KEY_EVENT; | 4171 | inev.kind = MULTIMEDIA_KEY_EVENT; |
| 4172 | inev.code = GET_APPCOMMAND_LPARAM(msg.msg.lParam); | 4172 | inev.code = GET_APPCOMMAND_LPARAM (msg.msg.lParam); |
| 4173 | inev.modifiers = msg.dwModifiers; | 4173 | inev.modifiers = msg.dwModifiers; |
| 4174 | XSETFRAME (inev.frame_or_window, f); | 4174 | XSETFRAME (inev.frame_or_window, f); |
| 4175 | inev.timestamp = msg.msg.time; | 4175 | inev.timestamp = msg.msg.time; |
| @@ -4217,7 +4217,7 @@ w32_read_socket (struct terminal *terminal, int expected, | |||
| 4217 | selected now and last mouse movement event was | 4217 | selected now and last mouse movement event was |
| 4218 | not in it. Minibuffer window will be selected | 4218 | not in it. Minibuffer window will be selected |
| 4219 | only when it is active. */ | 4219 | only when it is active. */ |
| 4220 | if (WINDOWP(window) | 4220 | if (WINDOWP (window) |
| 4221 | && !EQ (window, last_window) | 4221 | && !EQ (window, last_window) |
| 4222 | && !EQ (window, selected_window) | 4222 | && !EQ (window, selected_window) |
| 4223 | /* For click-to-focus window managers | 4223 | /* For click-to-focus window managers |
| @@ -5344,8 +5344,8 @@ x_set_window_size (struct frame *f, int change_gravity, int cols, int rows) | |||
| 5344 | rect.right = pixelwidth; | 5344 | rect.right = pixelwidth; |
| 5345 | rect.bottom = pixelheight; | 5345 | rect.bottom = pixelheight; |
| 5346 | 5346 | ||
| 5347 | AdjustWindowRect(&rect, f->output_data.w32->dwStyle, | 5347 | AdjustWindowRect (&rect, f->output_data.w32->dwStyle, |
| 5348 | FRAME_EXTERNAL_MENU_BAR (f)); | 5348 | FRAME_EXTERNAL_MENU_BAR (f)); |
| 5349 | 5349 | ||
| 5350 | my_set_window_pos (FRAME_W32_WINDOW (f), | 5350 | my_set_window_pos (FRAME_W32_WINDOW (f), |
| 5351 | NULL, | 5351 | NULL, |
| @@ -5587,8 +5587,8 @@ x_make_frame_visible (struct frame *f) | |||
| 5587 | 5587 | ||
| 5588 | /* Adjust vertical window position in order to avoid being | 5588 | /* Adjust vertical window position in order to avoid being |
| 5589 | covered by a task bar placed at the bottom of the desktop. */ | 5589 | covered by a task bar placed at the bottom of the desktop. */ |
| 5590 | SystemParametersInfo(SPI_GETWORKAREA, 0, &workarea_rect, 0); | 5590 | SystemParametersInfo (SPI_GETWORKAREA, 0, &workarea_rect, 0); |
| 5591 | GetWindowRect(FRAME_W32_WINDOW(f), &window_rect); | 5591 | GetWindowRect (FRAME_W32_WINDOW(f), &window_rect); |
| 5592 | if (window_rect.bottom > workarea_rect.bottom | 5592 | if (window_rect.bottom > workarea_rect.bottom |
| 5593 | && window_rect.top > workarea_rect.top) | 5593 | && window_rect.top > workarea_rect.top) |
| 5594 | f->top_pos = max (window_rect.top | 5594 | f->top_pos = max (window_rect.top |
| @@ -6145,7 +6145,7 @@ x_delete_display (struct w32_display_info *dpyinfo) | |||
| 6145 | } | 6145 | } |
| 6146 | dpyinfo->color_list = NULL; | 6146 | dpyinfo->color_list = NULL; |
| 6147 | if (dpyinfo->palette) | 6147 | if (dpyinfo->palette) |
| 6148 | DeleteObject(dpyinfo->palette); | 6148 | DeleteObject (dpyinfo->palette); |
| 6149 | } | 6149 | } |
| 6150 | xfree (dpyinfo->w32_id_name); | 6150 | xfree (dpyinfo->w32_id_name); |
| 6151 | 6151 | ||
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index d7aeb7046c8..f1e5c886b4d 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c | |||
| @@ -165,7 +165,7 @@ uniscribe_otf_capability (struct font *font) | |||
| 165 | 165 | ||
| 166 | f = XFRAME (selected_frame); | 166 | f = XFRAME (selected_frame); |
| 167 | context = get_frame_dc (f); | 167 | context = get_frame_dc (f); |
| 168 | old_font = SelectObject (context, FONT_HANDLE(font)); | 168 | old_font = SelectObject (context, FONT_HANDLE (font)); |
| 169 | 169 | ||
| 170 | features = otf_features (context, "GSUB"); | 170 | features = otf_features (context, "GSUB"); |
| 171 | XSETCAR (capability, features); | 171 | XSETCAR (capability, features); |
| @@ -276,7 +276,7 @@ uniscribe_shape (Lisp_Object lgstring) | |||
| 276 | passed in. */ | 276 | passed in. */ |
| 277 | f = XFRAME (selected_frame); | 277 | f = XFRAME (selected_frame); |
| 278 | context = get_frame_dc (f); | 278 | context = get_frame_dc (f); |
| 279 | old_font = SelectObject (context, FONT_HANDLE(font)); | 279 | old_font = SelectObject (context, FONT_HANDLE (font)); |
| 280 | 280 | ||
| 281 | result = ScriptShape (context, &(uniscribe_font->cache), | 281 | result = ScriptShape (context, &(uniscribe_font->cache), |
| 282 | chars + items[i].iCharPos, nchars_in_run, | 282 | chars + items[i].iCharPos, nchars_in_run, |
| @@ -311,7 +311,7 @@ uniscribe_shape (Lisp_Object lgstring) | |||
| 311 | /* Cache not complete... */ | 311 | /* Cache not complete... */ |
| 312 | f = XFRAME (selected_frame); | 312 | f = XFRAME (selected_frame); |
| 313 | context = get_frame_dc (f); | 313 | context = get_frame_dc (f); |
| 314 | old_font = SelectObject (context, FONT_HANDLE(font)); | 314 | old_font = SelectObject (context, FONT_HANDLE (font)); |
| 315 | 315 | ||
| 316 | result = ScriptPlace (context, &(uniscribe_font->cache), | 316 | result = ScriptPlace (context, &(uniscribe_font->cache), |
| 317 | glyphs, nglyphs, attributes, &(items[i].a), | 317 | glyphs, nglyphs, attributes, &(items[i].a), |
| @@ -386,7 +386,7 @@ uniscribe_shape (Lisp_Object lgstring) | |||
| 386 | /* Cache incomplete... */ | 386 | /* Cache incomplete... */ |
| 387 | f = XFRAME (selected_frame); | 387 | f = XFRAME (selected_frame); |
| 388 | context = get_frame_dc (f); | 388 | context = get_frame_dc (f); |
| 389 | old_font = SelectObject (context, FONT_HANDLE(font)); | 389 | old_font = SelectObject (context, FONT_HANDLE (font)); |
| 390 | result = ScriptGetGlyphABCWidth (context, | 390 | result = ScriptGetGlyphABCWidth (context, |
| 391 | &(uniscribe_font->cache), | 391 | &(uniscribe_font->cache), |
| 392 | glyphs[j], &char_metric); | 392 | glyphs[j], &char_metric); |
| @@ -496,7 +496,7 @@ uniscribe_encode_char (struct font *font, int c) | |||
| 496 | the frame. */ | 496 | the frame. */ |
| 497 | f = XFRAME (selected_frame); | 497 | f = XFRAME (selected_frame); |
| 498 | context = get_frame_dc (f); | 498 | context = get_frame_dc (f); |
| 499 | old_font = SelectObject (context, FONT_HANDLE(font)); | 499 | old_font = SelectObject (context, FONT_HANDLE (font)); |
| 500 | result = ScriptShape (context, &(uniscribe_font->cache), | 500 | result = ScriptShape (context, &(uniscribe_font->cache), |
| 501 | ch, len, 2, &(items[0].a), | 501 | ch, len, 2, &(items[0].a), |
| 502 | glyphs, clusters, attrs, &nglyphs); | 502 | glyphs, clusters, attrs, &nglyphs); |
diff --git a/src/w32xfns.c b/src/w32xfns.c index a929e45cf6d..f57903dc68c 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c | |||
| @@ -214,7 +214,7 @@ get_next_msg (W32Msg * lpmsg, BOOL bWait) | |||
| 214 | if (!UnionRect (&(lpmsg->rect), &(lpmsg->rect), | 214 | if (!UnionRect (&(lpmsg->rect), &(lpmsg->rect), |
| 215 | &(lpCur->w32msg.rect))) | 215 | &(lpCur->w32msg.rect))) |
| 216 | { | 216 | { |
| 217 | SetRectEmpty(&(lpmsg->rect)); | 217 | SetRectEmpty (&(lpmsg->rect)); |
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | myfree (lpCur); | 220 | myfree (lpCur); |
diff --git a/src/window.c b/src/window.c index 774fec255ec..28dfc635682 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -683,7 +683,7 @@ of just the text area, use `window-inside-absolute-pixel-edges'. */) | |||
| 683 | { | 683 | { |
| 684 | register struct window *w = decode_any_window (window); | 684 | register struct window *w = decode_any_window (window); |
| 685 | int add_x, add_y; | 685 | int add_x, add_y; |
| 686 | calc_absolute_offset(w, &add_x, &add_y); | 686 | calc_absolute_offset (w, &add_x, &add_y); |
| 687 | 687 | ||
| 688 | return Fcons (make_number (WINDOW_LEFT_EDGE_X (w) + add_x), | 688 | return Fcons (make_number (WINDOW_LEFT_EDGE_X (w) + add_x), |
| 689 | Fcons (make_number (WINDOW_TOP_EDGE_Y (w) + add_y), | 689 | Fcons (make_number (WINDOW_TOP_EDGE_Y (w) + add_y), |
| @@ -761,7 +761,7 @@ display margins, fringes, header line, and/or mode line. */) | |||
| 761 | { | 761 | { |
| 762 | register struct window *w = decode_any_window (window); | 762 | register struct window *w = decode_any_window (window); |
| 763 | int add_x, add_y; | 763 | int add_x, add_y; |
| 764 | calc_absolute_offset(w, &add_x, &add_y); | 764 | calc_absolute_offset (w, &add_x, &add_y); |
| 765 | 765 | ||
| 766 | return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) | 766 | return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) |
| 767 | + WINDOW_LEFT_MARGIN_WIDTH (w) | 767 | + WINDOW_LEFT_MARGIN_WIDTH (w) |
| @@ -3009,7 +3009,7 @@ adjust_window_margins (struct window *w) | |||
| 3009 | a specific window, it will attempt to strictly resize that window | 3009 | a specific window, it will attempt to strictly resize that window |
| 3010 | proportionally, even at the expense of deleting smaller windows. */ | 3010 | proportionally, even at the expense of deleting smaller windows. */ |
| 3011 | static int * | 3011 | static int * |
| 3012 | shrink_windows (int total, int size, int nchildren, int shrinkable, | 3012 | shrink_windows (int total, int size, int nchildren, int shrinkable, |
| 3013 | int resize_fixed_p, Lisp_Object forward, int width_p, int safe_p) | 3013 | int resize_fixed_p, Lisp_Object forward, int width_p, int safe_p) |
| 3014 | { | 3014 | { |
| 3015 | int available_resize = 0; | 3015 | int available_resize = 0; |
diff --git a/src/xdisp.c b/src/xdisp.c index 14a1cf6bb15..1ae2ce97030 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -12933,7 +12933,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 12933 | point. */ | 12933 | point. */ |
| 12934 | if (/* previous candidate is a glyph in TEXT_AREA of that row */ | 12934 | if (/* previous candidate is a glyph in TEXT_AREA of that row */ |
| 12935 | w->cursor.hpos >= 0 | 12935 | w->cursor.hpos >= 0 |
| 12936 | && w->cursor.hpos < MATRIX_ROW_USED(matrix, w->cursor.vpos) | 12936 | && w->cursor.hpos < MATRIX_ROW_USED (matrix, w->cursor.vpos) |
| 12937 | && BUFFERP (g1->object) | 12937 | && BUFFERP (g1->object) |
| 12938 | && (g1->charpos == pt_old /* an exact match always wins */ | 12938 | && (g1->charpos == pt_old /* an exact match always wins */ |
| 12939 | || (BUFFERP (glyph->object) | 12939 | || (BUFFERP (glyph->object) |
| @@ -22309,7 +22309,7 @@ x_produce_glyphs (struct it *it) | |||
| 22309 | it->pixel_width = 0; | 22309 | it->pixel_width = 0; |
| 22310 | it->nglyphs = 0; | 22310 | it->nglyphs = 0; |
| 22311 | 22311 | ||
| 22312 | height = get_it_property(it, Qline_height); | 22312 | height = get_it_property (it, Qline_height); |
| 22313 | /* Split (line-height total-height) list */ | 22313 | /* Split (line-height total-height) list */ |
| 22314 | if (CONSP (height) | 22314 | if (CONSP (height) |
| 22315 | && CONSP (XCDR (height)) | 22315 | && CONSP (XCDR (height)) |
| @@ -22318,7 +22318,7 @@ x_produce_glyphs (struct it *it) | |||
| 22318 | total_height = XCAR (XCDR (height)); | 22318 | total_height = XCAR (XCDR (height)); |
| 22319 | height = XCAR (height); | 22319 | height = XCAR (height); |
| 22320 | } | 22320 | } |
| 22321 | height = calc_line_height_property(it, height, font, boff, 1); | 22321 | height = calc_line_height_property (it, height, font, boff, 1); |
| 22322 | 22322 | ||
| 22323 | if (it->override_ascent >= 0) | 22323 | if (it->override_ascent >= 0) |
| 22324 | { | 22324 | { |
| @@ -22368,11 +22368,11 @@ x_produce_glyphs (struct it *it) | |||
| 22368 | it->ascent = XINT (height) - it->descent; | 22368 | it->ascent = XINT (height) - it->descent; |
| 22369 | 22369 | ||
| 22370 | if (!NILP (total_height)) | 22370 | if (!NILP (total_height)) |
| 22371 | spacing = calc_line_height_property(it, total_height, font, boff, 0); | 22371 | spacing = calc_line_height_property (it, total_height, font, boff, 0); |
| 22372 | else | 22372 | else |
| 22373 | { | 22373 | { |
| 22374 | spacing = get_it_property(it, Qline_spacing); | 22374 | spacing = get_it_property (it, Qline_spacing); |
| 22375 | spacing = calc_line_height_property(it, spacing, font, boff, 0); | 22375 | spacing = calc_line_height_property (it, spacing, font, boff, 0); |
| 22376 | } | 22376 | } |
| 22377 | if (INTEGERP (spacing)) | 22377 | if (INTEGERP (spacing)) |
| 22378 | { | 22378 | { |
diff --git a/src/xfaces.c b/src/xfaces.c index 79978f4665b..9a6bbd18f8f 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -764,7 +764,7 @@ x_create_gc (f, mask, xgcv) | |||
| 764 | { | 764 | { |
| 765 | GC gc = xmalloc (sizeof (*gc)); | 765 | GC gc = xmalloc (sizeof (*gc)); |
| 766 | if (gc) | 766 | if (gc) |
| 767 | bcopy(xgcv, gc, sizeof(XGCValues)); | 767 | bcopy (xgcv, gc, sizeof (XGCValues)); |
| 768 | return gc; | 768 | return gc; |
| 769 | } | 769 | } |
| 770 | 770 | ||
diff --git a/src/xterm.c b/src/xterm.c index bcb52274a94..49c2ed6299d 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -481,7 +481,7 @@ x_set_frame_alpha (struct frame *f) | |||
| 481 | if (FRAME_X_DISPLAY_INFO (f)->root_window != FRAME_X_OUTPUT (f)->parent_desc) | 481 | if (FRAME_X_DISPLAY_INFO (f)->root_window != FRAME_X_OUTPUT (f)->parent_desc) |
| 482 | /* Since the WM decoration lies under the FRAME_OUTER_WINDOW, | 482 | /* Since the WM decoration lies under the FRAME_OUTER_WINDOW, |
| 483 | we must treat the former instead of the latter. */ | 483 | we must treat the former instead of the latter. */ |
| 484 | win = FRAME_X_OUTPUT(f)->parent_desc; | 484 | win = FRAME_X_OUTPUT (f)->parent_desc; |
| 485 | 485 | ||
| 486 | if (dpyinfo->x_highlight_frame == f) | 486 | if (dpyinfo->x_highlight_frame == f) |
| 487 | alpha = f->alpha[0]; | 487 | alpha = f->alpha[0]; |
| @@ -510,10 +510,10 @@ x_set_frame_alpha (struct frame *f) | |||
| 510 | unsigned long n, left; | 510 | unsigned long n, left; |
| 511 | 511 | ||
| 512 | x_catch_errors (dpy); | 512 | x_catch_errors (dpy); |
| 513 | rc = XGetWindowProperty(dpy, win, XInternAtom(dpy, OPACITY, False), | 513 | rc = XGetWindowProperty (dpy, win, XInternAtom(dpy, OPACITY, False), |
| 514 | 0L, 1L, False, XA_CARDINAL, | 514 | 0L, 1L, False, XA_CARDINAL, |
| 515 | &actual, &format, &n, &left, | 515 | &actual, &format, &n, &left, |
| 516 | &data); | 516 | &data); |
| 517 | 517 | ||
| 518 | if (rc == Success && actual != None) | 518 | if (rc == Success && actual != None) |
| 519 | if (*(unsigned long *)data == opac) | 519 | if (*(unsigned long *)data == opac) |
| @@ -2259,7 +2259,7 @@ x_draw_image_relief (struct glyph_string *s) | |||
| 2259 | 2259 | ||
| 2260 | extra = s->face->id == TOOL_BAR_FACE_ID | 2260 | extra = s->face->id == TOOL_BAR_FACE_ID |
| 2261 | ? XINT (Vtool_bar_button_margin) : 0; | 2261 | ? XINT (Vtool_bar_button_margin) : 0; |
| 2262 | 2262 | ||
| 2263 | x0 = x - thick - extra; | 2263 | x0 = x - thick - extra; |
| 2264 | y0 = y - thick - extra; | 2264 | y0 = y - thick - extra; |
| 2265 | x1 = x + s->slice.width + thick - 1 + extra; | 2265 | x1 = x + s->slice.width + thick - 1 + extra; |
| @@ -2879,7 +2879,7 @@ x_clear_frame (struct frame *f) | |||
| 2879 | redisplay, do it here. */ | 2879 | redisplay, do it here. */ |
| 2880 | gtk_widget_queue_draw (FRAME_GTK_WIDGET (f)); | 2880 | gtk_widget_queue_draw (FRAME_GTK_WIDGET (f)); |
| 2881 | #endif | 2881 | #endif |
| 2882 | 2882 | ||
| 2883 | XFlush (FRAME_X_DISPLAY (f)); | 2883 | XFlush (FRAME_X_DISPLAY (f)); |
| 2884 | 2884 | ||
| 2885 | UNBLOCK_INPUT; | 2885 | UNBLOCK_INPUT; |
| @@ -3086,7 +3086,7 @@ static void | |||
| 3086 | XTtoggle_invisible_pointer (FRAME_PTR f, int invisible) | 3086 | XTtoggle_invisible_pointer (FRAME_PTR f, int invisible) |
| 3087 | { | 3087 | { |
| 3088 | BLOCK_INPUT; | 3088 | BLOCK_INPUT; |
| 3089 | if (invisible) | 3089 | if (invisible) |
| 3090 | { | 3090 | { |
| 3091 | if (FRAME_X_DISPLAY_INFO (f)->invisible_cursor != 0) | 3091 | if (FRAME_X_DISPLAY_INFO (f)->invisible_cursor != 0) |
| 3092 | XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 3092 | XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
| @@ -4553,7 +4553,7 @@ x_create_toolkit_scroll_bar (f, bar) | |||
| 4553 | if (f->output_data.x->scroll_bar_top_shadow_pixel == -1) | 4553 | if (f->output_data.x->scroll_bar_top_shadow_pixel == -1) |
| 4554 | { | 4554 | { |
| 4555 | pixel = f->output_data.x->scroll_bar_background_pixel; | 4555 | pixel = f->output_data.x->scroll_bar_background_pixel; |
| 4556 | if (pixel != -1) | 4556 | if (pixel != -1) |
| 4557 | { | 4557 | { |
| 4558 | if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f), | 4558 | if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f), |
| 4559 | FRAME_X_COLORMAP (f), | 4559 | FRAME_X_COLORMAP (f), |
| @@ -4565,7 +4565,7 @@ x_create_toolkit_scroll_bar (f, bar) | |||
| 4565 | if (f->output_data.x->scroll_bar_bottom_shadow_pixel == -1) | 4565 | if (f->output_data.x->scroll_bar_bottom_shadow_pixel == -1) |
| 4566 | { | 4566 | { |
| 4567 | pixel = f->output_data.x->scroll_bar_background_pixel; | 4567 | pixel = f->output_data.x->scroll_bar_background_pixel; |
| 4568 | if (pixel != -1) | 4568 | if (pixel != -1) |
| 4569 | { | 4569 | { |
| 4570 | if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f), | 4570 | if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f), |
| 4571 | FRAME_X_COLORMAP (f), | 4571 | FRAME_X_COLORMAP (f), |
| @@ -5729,10 +5729,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventp, int *finish, | |||
| 5729 | EVENT_INIT (inev.ie); | 5729 | EVENT_INIT (inev.ie); |
| 5730 | inev.ie.kind = NO_EVENT; | 5730 | inev.ie.kind = NO_EVENT; |
| 5731 | inev.ie.arg = Qnil; | 5731 | inev.ie.arg = Qnil; |
| 5732 | 5732 | ||
| 5733 | if (pending_event_wait.eventtype == event.type) | 5733 | if (pending_event_wait.eventtype == event.type) |
| 5734 | pending_event_wait.eventtype = 0; /* Indicates we got it. */ | 5734 | pending_event_wait.eventtype = 0; /* Indicates we got it. */ |
| 5735 | 5735 | ||
| 5736 | switch (event.type) | 5736 | switch (event.type) |
| 5737 | { | 5737 | { |
| 5738 | case ClientMessage: | 5738 | case ClientMessage: |
| @@ -6652,7 +6652,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventp, int *finish, | |||
| 6652 | event.xconfigure.height); | 6652 | event.xconfigure.height); |
| 6653 | f = 0; | 6653 | f = 0; |
| 6654 | } | 6654 | } |
| 6655 | #endif | 6655 | #endif |
| 6656 | if (f) | 6656 | if (f) |
| 6657 | { | 6657 | { |
| 6658 | #ifndef USE_X_TOOLKIT | 6658 | #ifndef USE_X_TOOLKIT |
| @@ -8386,7 +8386,7 @@ do_ewmh_fullscreen (struct frame *f) | |||
| 8386 | set_wm_state (frame, 0, fs, NULL); | 8386 | set_wm_state (frame, 0, fs, NULL); |
| 8387 | set_wm_state (frame, 0, fh, NULL); | 8387 | set_wm_state (frame, 0, fh, NULL); |
| 8388 | set_wm_state (frame, 0, fw, NULL); | 8388 | set_wm_state (frame, 0, fw, NULL); |
| 8389 | 8389 | ||
| 8390 | /* If there are _NET_ atoms we assume we have extended window manager | 8390 | /* If there are _NET_ atoms we assume we have extended window manager |
| 8391 | hints. */ | 8391 | hints. */ |
| 8392 | switch (f->want_fullscreen) | 8392 | switch (f->want_fullscreen) |
| @@ -8459,7 +8459,7 @@ x_handle_net_wm_state (struct frame *f, XPropertyEvent *event) | |||
| 8459 | for (i = 0; i < actual_size; ++i) | 8459 | for (i = 0; i < actual_size; ++i) |
| 8460 | { | 8460 | { |
| 8461 | Atom a = ((Atom*)tmp_data)[i]; | 8461 | Atom a = ((Atom*)tmp_data)[i]; |
| 8462 | if (a == dpyinfo->Xatom_net_wm_state_maximized_horz) | 8462 | if (a == dpyinfo->Xatom_net_wm_state_maximized_horz) |
| 8463 | { | 8463 | { |
| 8464 | if (value == FULLSCREEN_HEIGHT) | 8464 | if (value == FULLSCREEN_HEIGHT) |
| 8465 | value = FULLSCREEN_MAXIMIZED; | 8465 | value = FULLSCREEN_MAXIMIZED; |
| @@ -8480,7 +8480,7 @@ x_handle_net_wm_state (struct frame *f, XPropertyEvent *event) | |||
| 8480 | } | 8480 | } |
| 8481 | 8481 | ||
| 8482 | lval = Qnil; | 8482 | lval = Qnil; |
| 8483 | switch (value) | 8483 | switch (value) |
| 8484 | { | 8484 | { |
| 8485 | case FULLSCREEN_WIDTH: | 8485 | case FULLSCREEN_WIDTH: |
| 8486 | lval = Qfullwidth; | 8486 | lval = Qfullwidth; |
| @@ -8495,7 +8495,7 @@ x_handle_net_wm_state (struct frame *f, XPropertyEvent *event) | |||
| 8495 | lval = Qmaximized; | 8495 | lval = Qmaximized; |
| 8496 | break; | 8496 | break; |
| 8497 | } | 8497 | } |
| 8498 | 8498 | ||
| 8499 | store_frame_param (f, Qfullscreen, lval); | 8499 | store_frame_param (f, Qfullscreen, lval); |
| 8500 | store_frame_param (f, Qsticky, sticky ? Qt : Qnil); | 8500 | store_frame_param (f, Qsticky, sticky ? Qt : Qnil); |
| 8501 | 8501 | ||
| @@ -8533,7 +8533,7 @@ x_check_fullscreen (struct frame *f) | |||
| 8533 | case FULLSCREEN_HEIGHT: | 8533 | case FULLSCREEN_HEIGHT: |
| 8534 | height = x_display_pixel_height (dpyinfo); | 8534 | height = x_display_pixel_height (dpyinfo); |
| 8535 | } | 8535 | } |
| 8536 | 8536 | ||
| 8537 | if (FRAME_COLS (f) != width || FRAME_LINES (f) != height) | 8537 | if (FRAME_COLS (f) != width || FRAME_LINES (f) != height) |
| 8538 | { | 8538 | { |
| 8539 | change_frame_size (f, height, width, 0, 1, 0); | 8539 | change_frame_size (f, height, width, 0, 1, 0); |
| @@ -8661,7 +8661,7 @@ x_wait_for_event (struct frame *f, int eventtype) | |||
| 8661 | 8661 | ||
| 8662 | FD_ZERO (&fds); | 8662 | FD_ZERO (&fds); |
| 8663 | FD_SET (fd, &fds); | 8663 | FD_SET (fd, &fds); |
| 8664 | 8664 | ||
| 8665 | EMACS_GET_TIME (time_now); | 8665 | EMACS_GET_TIME (time_now); |
| 8666 | EMACS_SUB_TIME (tmo, tmo_at, time_now); | 8666 | EMACS_SUB_TIME (tmo, tmo_at, time_now); |
| 8667 | 8667 | ||
| @@ -8751,7 +8751,7 @@ x_set_window_size (struct frame *f, int change_gravity, int cols, int rows) | |||
| 8751 | if (NILP (tip_frame) || XFRAME (tip_frame) != f) | 8751 | if (NILP (tip_frame) || XFRAME (tip_frame) != f) |
| 8752 | { | 8752 | { |
| 8753 | int r, c; | 8753 | int r, c; |
| 8754 | 8754 | ||
| 8755 | /* When the frame is maximized/fullscreen or running under for | 8755 | /* When the frame is maximized/fullscreen or running under for |
| 8756 | example Xmonad, x_set_window_size_1 will be a no-op. | 8756 | example Xmonad, x_set_window_size_1 will be a no-op. |
| 8757 | In that case, the right thing to do is extend rows/cols to | 8757 | In that case, the right thing to do is extend rows/cols to |
| @@ -9790,7 +9790,7 @@ my_log_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar * | |||
| 9790 | fprintf (stderr, "%s-WARNING **: %s\n", log_domain, message); | 9790 | fprintf (stderr, "%s-WARNING **: %s\n", log_domain, message); |
| 9791 | } | 9791 | } |
| 9792 | #endif | 9792 | #endif |
| 9793 | 9793 | ||
| 9794 | /* Open a connection to X display DISPLAY_NAME, and return | 9794 | /* Open a connection to X display DISPLAY_NAME, and return |
| 9795 | the structure that describes the open display. | 9795 | the structure that describes the open display. |
| 9796 | If we cannot contact the display, return null. */ | 9796 | If we cannot contact the display, return null. */ |
| @@ -10211,7 +10211,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 10211 | = XInternAtom (dpyinfo->display, "_NET_WM_ICON_NAME", False); | 10211 | = XInternAtom (dpyinfo->display, "_NET_WM_ICON_NAME", False); |
| 10212 | dpyinfo->Xatom_net_wm_name | 10212 | dpyinfo->Xatom_net_wm_name |
| 10213 | = XInternAtom (dpyinfo->display, "_NET_WM_NAME", False); | 10213 | = XInternAtom (dpyinfo->display, "_NET_WM_NAME", False); |
| 10214 | 10214 | ||
| 10215 | dpyinfo->cut_buffers_initialized = 0; | 10215 | dpyinfo->cut_buffers_initialized = 0; |
| 10216 | 10216 | ||
| 10217 | dpyinfo->x_dnd_atoms_size = 8; | 10217 | dpyinfo->x_dnd_atoms_size = 8; |
| @@ -10340,7 +10340,7 @@ x_delete_display (struct x_display_info *dpyinfo) | |||
| 10340 | #ifdef HAVE_X_SM | 10340 | #ifdef HAVE_X_SM |
| 10341 | /* Close X session management when we close its display. */ | 10341 | /* Close X session management when we close its display. */ |
| 10342 | if (t->id == 1 && x_session_have_connection ()) | 10342 | if (t->id == 1 && x_session_have_connection ()) |
| 10343 | x_session_close(); | 10343 | x_session_close (); |
| 10344 | #endif | 10344 | #endif |
| 10345 | delete_terminal (t); | 10345 | delete_terminal (t); |
| 10346 | break; | 10346 | break; |