comparison src/objects-msw.c @ 578:190b164ddcac

[xemacs-hg @ 2001-05-25 11:26:50 by ben] device-msw.c, eldap.c, emodules.c, hpplay.c, process-unix.c, sound.h, tooltalk.c, win32.c: Revert Martin's attempted compile-warnings fix. It does fix the warnings, but not the right way. We are trying to eliminate the raw use of `char' and `unsigned char' absolutely everywhere. There is never an occasion to reintroduce these. buffer.h: Instead, we fix these macros so they don't care about the type of their lvalues. We already do this for the non-C-string equivalents of these, and it's correct because it should be OK to pass in an SBufbyte *, for example. In any case, we do not need any type-correctness checking here -- errors will be caught for sure as soon as we remove the -Wno-sign-compare switch. mule-charset.c: Use invalid_argument, not generic signal_error (Qerror, ). alloc.c, chartab.c, console-gtk.c, console-msw.c, console-stream.c, console-stream.h, console-tty.c, console-tty.h, console-x.c, console.c, console.h, device-x.c, device.c, elhash.c, eval.c, faces.c, faces.h, fns.c, glyphs.c, glyphs.h, gui.c, gui.h, lisp.h, lread.c, nt.c, objects-gtk.c, objects-gtk.h, objects-msw.c, objects-tty.c, objects-x.c, objects.c, process-unix.c, rangetab.c, search.c, specifier.c, toolbar.c, window.c, window.h: Rename Error_behavior to Error_Behavior, to be consistent with general naming practices (Lisp_Object, Char_Binary, etc.).
author ben
date Fri, 25 May 2001 11:27:01 +0000
parents 183866b06e0b
children 5fd7ba8b56e7
comparison
equal deleted inserted replaced
577:910449c92002 578:190b164ddcac
1167 /* methods */ 1167 /* methods */
1168 /************************************************************************/ 1168 /************************************************************************/
1169 1169
1170 static int 1170 static int
1171 mswindows_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name, 1171 mswindows_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name,
1172 Lisp_Object device, Error_behavior errb) 1172 Lisp_Object device, Error_Behavior errb)
1173 { 1173 {
1174 const char *extname; 1174 const char *extname;
1175 COLORREF color; 1175 COLORREF color;
1176 1176
1177 TO_EXTERNAL_FORMAT (LISP_STRING, name, 1177 TO_EXTERNAL_FORMAT (LISP_STRING, name,
1262 * msprinter_initialize_font_instance. 1262 * msprinter_initialize_font_instance.
1263 */ 1263 */
1264 static int 1264 static int
1265 initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name, 1265 initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name,
1266 Lisp_Object device_font_list, HDC hdc, 1266 Lisp_Object device_font_list, HDC hdc,
1267 Error_behavior errb) 1267 Error_Behavior errb)
1268 { 1268 {
1269 const char *extname; 1269 const char *extname;
1270 LOGFONT logfont; 1270 LOGFONT logfont;
1271 int fields, i; 1271 int fields, i;
1272 int pt; 1272 int pt;
1535 return 1; 1535 return 1;
1536 } 1536 }
1537 1537
1538 static int 1538 static int
1539 mswindows_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name, 1539 mswindows_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name,
1540 Lisp_Object device, Error_behavior errb) 1540 Lisp_Object device, Error_Behavior errb)
1541 { 1541 {
1542 HDC hdc = CreateCompatibleDC (NULL); 1542 HDC hdc = CreateCompatibleDC (NULL);
1543 Lisp_Object font_list = DEVICE_MSWINDOWS_FONTLIST (XDEVICE (device)); 1543 Lisp_Object font_list = DEVICE_MSWINDOWS_FONTLIST (XDEVICE (device));
1544 int res = initialize_font_instance (f, name, font_list, hdc, errb); 1544 int res = initialize_font_instance (f, name, font_list, hdc, errb);
1545 DeleteDC (hdc); 1545 DeleteDC (hdc);
1546 return res; 1546 return res;
1547 } 1547 }
1548 1548
1549 static int 1549 static int
1550 msprinter_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name, 1550 msprinter_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name,
1551 Lisp_Object device, Error_behavior errb) 1551 Lisp_Object device, Error_Behavior errb)
1552 { 1552 {
1553 HDC hdc = DEVICE_MSPRINTER_HDC (XDEVICE (device)); 1553 HDC hdc = DEVICE_MSPRINTER_HDC (XDEVICE (device));
1554 Lisp_Object font_list = DEVICE_MSPRINTER_FONTLIST (XDEVICE (device)); 1554 Lisp_Object font_list = DEVICE_MSPRINTER_FONTLIST (XDEVICE (device));
1555 return initialize_font_instance (f, name, font_list, hdc, errb); 1555 return initialize_font_instance (f, name, font_list, hdc, errb);
1556 } 1556 }
1620 * A maximal mswindows font spec looks like: 1620 * A maximal mswindows font spec looks like:
1621 * Courier New:Bold Italic:10:underline strikeout:Western 1621 * Courier New:Bold Italic:10:underline strikeout:Western
1622 * Missing parts of the font spec should be filled in with these values: 1622 * Missing parts of the font spec should be filled in with these values:
1623 * Courier New:Regular:10::Western */ 1623 * Courier New:Regular:10::Western */
1624 static Lisp_Object 1624 static Lisp_Object
1625 mswindows_font_instance_truename (Lisp_Font_Instance *f, Error_behavior errb) 1625 mswindows_font_instance_truename (Lisp_Font_Instance *f, Error_Behavior errb)
1626 { 1626 {
1627 int nsep=0; 1627 int nsep=0;
1628 char *name = (char *) XSTRING_DATA (f->name); 1628 char *name = (char *) XSTRING_DATA (f->name);
1629 char* ptr = name; 1629 char* ptr = name;
1630 char* extname = (char*) alloca (strlen (name) + 19); 1630 char* extname = (char*) alloca (strlen (name) + 19);