diff --git a/src/dbusbind.c b/src/dbusbind.c
a
|
b
|
|
1247 | 1247 | CHECK_STRING (service); |
1248 | 1248 | GCPRO3 (bus, serial, service); |
1249 | 1249 | |
1250 | | XD_DEBUG_MESSAGE ("%d %s ", XUINT (serial), SDATA (service)); |
| 1250 | XD_DEBUG_MESSAGE ("%ld %s ", XUINT (serial), SDATA (service)); |
1251 | 1251 | |
1252 | 1252 | /* Open a connection to the bus. */ |
1253 | 1253 | connection = xd_initialize (bus); |
… |
… |
|
1341 | 1341 | CHECK_STRING (service); |
1342 | 1342 | GCPRO3 (bus, serial, service); |
1343 | 1343 | |
1344 | | XD_DEBUG_MESSAGE ("%d %s ", XUINT (serial), SDATA (service)); |
| 1344 | XD_DEBUG_MESSAGE ("%ld %s ", XUINT (serial), SDATA (service)); |
1345 | 1345 | |
1346 | 1346 | /* Open a connection to the bus. */ |
1347 | 1347 | connection = xd_initialize (bus); |
diff --git a/src/font.c b/src/font.c
a
|
b
|
|
1357 | 1357 | { |
1358 | 1358 | f[XLFD_AVGWIDTH_INDEX] = alloca (11); |
1359 | 1359 | len += sprintf (f[XLFD_AVGWIDTH_INDEX], |
1360 | | "%d", XINT (AREF (font, FONT_AVGWIDTH_INDEX))) + 1; |
| 1360 | "%ld", XINT (AREF (font, FONT_AVGWIDTH_INDEX))) + 1; |
1361 | 1361 | } |
1362 | 1362 | else |
1363 | 1363 | f[XLFD_AVGWIDTH_INDEX] = "*", len += 2; |
… |
… |
|
1673 | 1673 | } |
1674 | 1674 | |
1675 | 1675 | if (INTEGERP (AREF (font, FONT_DPI_INDEX))) |
1676 | | len += sprintf (work, ":dpi=%d", XINT (AREF (font, FONT_DPI_INDEX))); |
| 1676 | len += sprintf (work, ":dpi=%ld", XINT (AREF (font, FONT_DPI_INDEX))); |
1677 | 1677 | if (INTEGERP (AREF (font, FONT_SPACING_INDEX))) |
1678 | 1678 | len += strlen (":spacing=100"); |
1679 | 1679 | if (INTEGERP (AREF (font, FONT_AVGWIDTH_INDEX))) |
… |
… |
|
1686 | 1686 | if (STRINGP (val)) |
1687 | 1687 | len += SBYTES (val); |
1688 | 1688 | else if (INTEGERP (val)) |
1689 | | len += sprintf (work, "%d", XINT (val)); |
| 1689 | len += sprintf (work, "%ld", XINT (val)); |
1690 | 1690 | else if (SYMBOLP (val)) |
1691 | 1691 | len += (NILP (val) ? 5 : 4); /* for "false" or "true" */ |
1692 | 1692 | } |
… |
… |
|
1713 | 1713 | p += sprintf (p, ":%s=%s", style_names[i], |
1714 | 1714 | SDATA (SYMBOL_NAME (styles[i]))); |
1715 | 1715 | if (INTEGERP (AREF (font, FONT_DPI_INDEX))) |
1716 | | p += sprintf (p, ":dpi=%d", XINT (AREF (font, FONT_DPI_INDEX))); |
| 1716 | p += sprintf (p, ":dpi=%ld", XINT (AREF (font, FONT_DPI_INDEX))); |
1717 | 1717 | if (INTEGERP (AREF (font, FONT_SPACING_INDEX))) |
1718 | | p += sprintf (p, ":spacing=%d", XINT (AREF (font, FONT_SPACING_INDEX))); |
| 1718 | p += sprintf (p, ":spacing=%ld", XINT (AREF (font, FONT_SPACING_INDEX))); |
1719 | 1719 | if (INTEGERP (AREF (font, FONT_AVGWIDTH_INDEX))) |
1720 | 1720 | { |
1721 | 1721 | if (XINT (AREF (font, FONT_AVGWIDTH_INDEX)) == 0) |
diff --git a/src/nsfns.m b/src/nsfns.m
a
|
b
|
|
1772 | 1772 | { |
1773 | 1773 | check_ns (); |
1774 | 1774 | #ifdef NS_IMPL_COCOA |
1775 | | PSFlush (); |
| 1775 | /*PSFlush ();*/ |
1776 | 1776 | #endif |
1777 | 1777 | /*ns_delete_terminal (dpyinfo->terminal); */ |
1778 | 1778 | [NSApp terminate: NSApp]; |
diff --git a/src/nsfont.m b/src/nsfont.m
a
|
b
|
|
245 | 245 | return w; |
246 | 246 | } |
247 | 247 | #endif |
248 | | w = [sfont widthOfString: cstr]; |
| 248 | NSDictionary *attrsDictionary = |
| 249 | [NSDictionary dictionaryWithObject:sfont |
| 250 | forKey:NSFontAttributeName]; |
| 251 | w = [cstr sizeWithAttributes:attrsDictionary].width; |
249 | 252 | return max (w, 2.0); |
250 | 253 | } |
251 | 254 | |
diff --git a/src/nsgui.h b/src/nsgui.h
a
|
b
|
|
129 | 129 | } XRectangle; |
130 | 130 | |
131 | 131 | #ifndef __OBJC__ |
132 | | typedef struct _NSPoint { float x, y; } NSPoint; |
133 | | typedef struct _NSSize { float width, height; } NSSize; |
| 132 | typedef double CGFloat; |
| 133 | typedef struct _NSPoint { CGFloat x, y; } NSPoint; |
| 134 | typedef struct _NSSize { CGFloat width, height; } NSSize; |
134 | 135 | typedef struct _NSRect { NSPoint origin; NSSize size; } NSRect; |
135 | 136 | #endif |
136 | 137 | |
137 | | #define NativeRectangle struct _NSRect |
| 138 | #define NativeRectangle NSRect |
138 | 139 | |
139 | 140 | #define CONVERT_TO_XRECT(xr, nr) \ |
140 | 141 | ((xr).x = (nr).origin.x, \ |
diff --git a/src/nsterm.m b/src/nsterm.m
a
|
b
|
|
1481 | 1481 | Convert a color to a lisp string with the RGB equivalent |
1482 | 1482 | -------------------------------------------------------------------------- */ |
1483 | 1483 | { |
1484 | | float red, green, blue, alpha, gray; |
| 1484 | CGFloat red, green, blue, alpha, gray; |
1485 | 1485 | char buf[1024]; |
1486 | 1486 | const char *str; |
1487 | 1487 | NSTRACE (ns_color_to_lisp); |
… |
… |
|
1523 | 1523 | and set color_def pixel to the resulting index. |
1524 | 1524 | -------------------------------------------------------------------------- */ |
1525 | 1525 | { |
1526 | | float r, g, b, a; |
| 1526 | CGFloat r, g, b, a; |
1527 | 1527 | |
1528 | 1528 | [((NSColor *)col) getRed: &r green: &g blue: &b alpha: &a]; |
1529 | 1529 | color_def->red = r * 65535; |
… |
… |
|
5833 | 5833 | em_portion = portion; |
5834 | 5834 | em_whole = whole; |
5835 | 5835 | |
5836 | | if (portion >= whole) |
5837 | | [self setFloatValue: 0.0 knobProportion: 1.0]; |
| 5836 | if (portion >= whole) { |
| 5837 | [self setDoubleValue: 0.0]; |
| 5838 | [self setKnobProportion: 1.0]; |
| 5839 | } |
5838 | 5840 | else |
5839 | 5841 | { |
5840 | 5842 | float pos, por; |
5841 | 5843 | portion = max ((float)whole*min_portion/pixel_height, portion); |
5842 | 5844 | pos = (float)position / (whole - portion); |
5843 | 5845 | por = (float)portion/whole; |
5844 | | [self setFloatValue: pos knobProportion: por]; |
| 5846 | [self setDoubleValue: pos]; |
| 5847 | [self setKnobProportion: por]; |
5845 | 5848 | } |
5846 | 5849 | #ifdef NS_IMPL_GNUSTEP |
5847 | 5850 | [self display]; |
… |
… |
|
5946 | 5949 | case NSScrollerKnobSlot: /* GNUstep-only */ |
5947 | 5950 | last_hit_part = scroll_bar_move_ratio; break; |
5948 | 5951 | default: /* NSScrollerNoPart? */ |
5949 | | fprintf (stderr, "EmacsScoller-mouseDown: unexpected part %d\n", part); |
| 5952 | fprintf (stderr, "EmacsScoller-mouseDown: unexpected part %ld\n", part); |
5950 | 5953 | return; |
5951 | 5954 | } |
5952 | 5955 | |
diff --git a/src/process.c b/src/process.c
a
|
b
|
|
1522 | 1522 | insert_string ("?"); |
1523 | 1523 | if (INTEGERP (speed)) |
1524 | 1524 | { |
1525 | | sprintf (tembuf, " at %d b/s", XINT (speed)); |
| 1525 | sprintf (tembuf, " at %ld b/s", XINT (speed)); |
1526 | 1526 | insert_string (tembuf); |
1527 | 1527 | } |
1528 | 1528 | insert_string (")\n"); |