aboutsummaryrefslogtreecommitdiffstats
path: root/src/term.c
diff options
context:
space:
mode:
authorJuanma Barranquero2010-07-05 12:36:06 +0200
committerJuanma Barranquero2010-07-05 12:36:06 +0200
commitd3da34e0dab1404e80dba5413b3c449a6ea8fa0c (patch)
treec24d736f75b63d4abb1b8ddd49b088632ccd8aee /src/term.c
parent00be444c737e95c7455aa1808d9da75d4affd51f (diff)
downloademacs-d3da34e0dab1404e80dba5413b3c449a6ea8fa0c.tar.gz
emacs-d3da34e0dab1404e80dba5413b3c449a6ea8fa0c.zip
Convert most remaining function definitions to standard C.
* buffer.c, cm.c, eval.c, keyboard.c, process.c, term.c, vm-limit.c, * xdisp.c: Convert function definitions to standard C. * cm.c (cmputc): Arg C is now int, not char. * process.c (Fmake_network_process): Cast sockaddr_in* to sockaddr*.
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c65
1 files changed, 21 insertions, 44 deletions
diff --git a/src/term.c b/src/term.c
index 275dfa98adc..fb64ca5d6b3 100644
--- a/src/term.c
+++ b/src/term.c
@@ -181,7 +181,7 @@ static int system_uses_terminfo;
181 181
182char *tparam (); 182char *tparam ();
183 183
184extern char *tgetstr (); 184extern char *tgetstr (char *, char **);
185 185
186 186
187#ifdef HAVE_GPM 187#ifdef HAVE_GPM
@@ -558,10 +558,7 @@ static int encode_terminal_dst_size;
558 sequence, and return a pointer to that byte sequence. */ 558 sequence, and return a pointer to that byte sequence. */
559 559
560unsigned char * 560unsigned char *
561encode_terminal_code (src, src_len, coding) 561encode_terminal_code (struct glyph *src, int src_len, struct coding_system *coding)
562 struct glyph *src;
563 int src_len;
564 struct coding_system *coding;
565{ 562{
566 struct glyph *src_end = src + src_len; 563 struct glyph *src_end = src + src_len;
567 unsigned char *buf; 564 unsigned char *buf;
@@ -836,10 +833,8 @@ tty_write_glyphs (struct frame *f, struct glyph *string, int len)
836#ifdef HAVE_GPM /* Only used by GPM code. */ 833#ifdef HAVE_GPM /* Only used by GPM code. */
837 834
838static void 835static void
839tty_write_glyphs_with_face (f, string, len, face_id) 836tty_write_glyphs_with_face (register struct frame *f, register struct glyph *string,
840 register struct frame *f; 837 register int len, register int face_id)
841 register struct glyph *string;
842 register int len, face_id;
843{ 838{
844 unsigned char *conversion_buffer; 839 unsigned char *conversion_buffer;
845 struct coding_system *coding; 840 struct coding_system *coding;
@@ -1366,16 +1361,14 @@ static struct fkey_table keys[] =
1366 1361
1367static char **term_get_fkeys_address; 1362static char **term_get_fkeys_address;
1368static KBOARD *term_get_fkeys_kboard; 1363static KBOARD *term_get_fkeys_kboard;
1369static Lisp_Object term_get_fkeys_1 (); 1364static Lisp_Object term_get_fkeys_1 (void);
1370 1365
1371/* Find the escape codes sent by the function keys for Vinput_decode_map. 1366/* Find the escape codes sent by the function keys for Vinput_decode_map.
1372 This function scans the termcap function key sequence entries, and 1367 This function scans the termcap function key sequence entries, and
1373 adds entries to Vinput_decode_map for each function key it finds. */ 1368 adds entries to Vinput_decode_map for each function key it finds. */
1374 1369
1375static void 1370static void
1376term_get_fkeys (address, kboard) 1371term_get_fkeys (char **address, KBOARD *kboard)
1377 char **address;
1378 KBOARD *kboard;
1379{ 1372{
1380 /* We run the body of the function (term_get_fkeys_1) and ignore all Lisp 1373 /* We run the body of the function (term_get_fkeys_1) and ignore all Lisp
1381 errors during the call. The only errors should be from Fdefine_key 1374 errors during the call. The only errors should be from Fdefine_key
@@ -1392,7 +1385,7 @@ term_get_fkeys (address, kboard)
1392} 1385}
1393 1386
1394static Lisp_Object 1387static Lisp_Object
1395term_get_fkeys_1 () 1388term_get_fkeys_1 (void)
1396{ 1389{
1397 int i; 1390 int i;
1398 1391
@@ -1529,8 +1522,7 @@ static void produce_composite_glyph (struct it *);
1529 IT->pixel_width > 1. */ 1522 IT->pixel_width > 1. */
1530 1523
1531static void 1524static void
1532append_glyph (it) 1525append_glyph (struct it *it)
1533 struct it *it;
1534{ 1526{
1535 struct glyph *glyph, *end; 1527 struct glyph *glyph, *end;
1536 int i; 1528 int i;
@@ -1609,8 +1601,7 @@ append_glyph (it)
1609 instead they use the macro PRODUCE_GLYPHS. */ 1601 instead they use the macro PRODUCE_GLYPHS. */
1610 1602
1611void 1603void
1612produce_glyphs (it) 1604produce_glyphs (struct it *it)
1613 struct it *it;
1614{ 1605{
1615 /* If a hook is installed, let it do the work. */ 1606 /* If a hook is installed, let it do the work. */
1616 1607
@@ -1728,8 +1719,7 @@ produce_glyphs (it)
1728 to reach HPOS, a value in canonical character units. */ 1719 to reach HPOS, a value in canonical character units. */
1729 1720
1730static void 1721static void
1731produce_stretch_glyph (it) 1722produce_stretch_glyph (struct it *it)
1732 struct it *it;
1733{ 1723{
1734 /* (space :width WIDTH ...) */ 1724 /* (space :width WIDTH ...) */
1735 Lisp_Object prop, plist; 1725 Lisp_Object prop, plist;
@@ -1798,8 +1788,7 @@ produce_stretch_glyph (it)
1798 face. */ 1788 face. */
1799 1789
1800static void 1790static void
1801append_composite_glyph (it) 1791append_composite_glyph (struct it *it)
1802 struct it *it;
1803{ 1792{
1804 struct glyph *glyph; 1793 struct glyph *glyph;
1805 1794
@@ -1863,8 +1852,7 @@ append_composite_glyph (it)
1863 correctly. */ 1852 correctly. */
1864 1853
1865static void 1854static void
1866produce_composite_glyph (it) 1855produce_composite_glyph (struct it *it)
1867 struct it *it;
1868{ 1856{
1869 int c; 1857 int c;
1870 1858
@@ -1894,9 +1882,7 @@ produce_composite_glyph (it)
1894 face_id, c, len of IT are left untouched. */ 1882 face_id, c, len of IT are left untouched. */
1895 1883
1896void 1884void
1897produce_special_glyphs (it, what) 1885produce_special_glyphs (struct it *it, enum display_element_type what)
1898 struct it *it;
1899 enum display_element_type what;
1900{ 1886{
1901 struct it temp_it; 1887 struct it temp_it;
1902 Lisp_Object gc; 1888 Lisp_Object gc;
@@ -1970,9 +1956,7 @@ produce_special_glyphs (it, what)
1970 FACE_ID is a realized face ID number, in the face cache. */ 1956 FACE_ID is a realized face ID number, in the face cache. */
1971 1957
1972static void 1958static void
1973turn_on_face (f, face_id) 1959turn_on_face (struct frame *f, int face_id)
1974 struct frame *f;
1975 int face_id;
1976{ 1960{
1977 struct face *face = FACE_FROM_ID (f, face_id); 1961 struct face *face = FACE_FROM_ID (f, face_id);
1978 long fg = face->foreground; 1962 long fg = face->foreground;
@@ -2069,9 +2053,7 @@ turn_on_face (f, face_id)
2069/* Turn off appearances of face FACE_ID on tty frame F. */ 2053/* Turn off appearances of face FACE_ID on tty frame F. */
2070 2054
2071static void 2055static void
2072turn_off_face (f, face_id) 2056turn_off_face (struct frame *f, int face_id)
2073 struct frame *f;
2074 int face_id;
2075{ 2057{
2076 struct face *face = FACE_FROM_ID (f, face_id); 2058 struct face *face = FACE_FROM_ID (f, face_id);
2077 struct tty_display_info *tty = FRAME_TTY (f); 2059 struct tty_display_info *tty = FRAME_TTY (f);
@@ -2124,10 +2106,8 @@ turn_off_face (f, face_id)
2124 colors FG and BG. */ 2106 colors FG and BG. */
2125 2107
2126int 2108int
2127tty_capable_p (tty, caps, fg, bg) 2109tty_capable_p (struct tty_display_info *tty, unsigned int caps,
2128 struct tty_display_info *tty; 2110 unsigned long fg, unsigned long bg)
2129 unsigned caps;
2130 unsigned long fg, bg;
2131{ 2111{
2132#define TTY_CAPABLE_P_TRY(tty, cap, TS, NC_bit) \ 2112#define TTY_CAPABLE_P_TRY(tty, cap, TS, NC_bit) \
2133 if ((caps & (cap)) && (!(TS) || !MAY_USE_WITH_COLORS_P(tty, NC_bit))) \ 2113 if ((caps & (cap)) && (!(TS) || !MAY_USE_WITH_COLORS_P(tty, NC_bit))) \
@@ -2267,9 +2247,7 @@ tty_setup_colors (struct tty_display_info *tty, int mode)
2267} 2247}
2268 2248
2269void 2249void
2270set_tty_color_mode (tty, f) 2250set_tty_color_mode (struct tty_display_info *tty, struct frame *f)
2271 struct tty_display_info *tty;
2272 struct frame *f;
2273{ 2251{
2274 Lisp_Object tem, val; 2252 Lisp_Object tem, val;
2275 Lisp_Object color_mode; 2253 Lisp_Object color_mode;
@@ -2333,8 +2311,7 @@ get_tty_terminal (Lisp_Object terminal, int throw)
2333 Returns NULL if the named terminal device is not opened. */ 2311 Returns NULL if the named terminal device is not opened. */
2334 2312
2335struct terminal * 2313struct terminal *
2336get_named_tty (name) 2314get_named_tty (char *name)
2337 char *name;
2338{ 2315{
2339 struct terminal *t; 2316 struct terminal *t;
2340 2317
@@ -2664,7 +2641,7 @@ term_show_mouse_face (enum draw_glyphs_face draw)
2664} 2641}
2665 2642
2666static void 2643static void
2667term_clear_mouse_face () 2644term_clear_mouse_face (void)
2668{ 2645{
2669 if (!NILP (mouse_face_window)) 2646 if (!NILP (mouse_face_window))
2670 term_show_mouse_face (DRAW_NORMAL_TEXT); 2647 term_show_mouse_face (DRAW_NORMAL_TEXT);
@@ -4072,7 +4049,7 @@ mark_ttys (void)
4072 4049
4073 4050
4074void 4051void
4075syms_of_term () 4052syms_of_term (void)
4076{ 4053{
4077 DEFVAR_BOOL ("system-uses-terminfo", &system_uses_terminfo, 4054 DEFVAR_BOOL ("system-uses-terminfo", &system_uses_terminfo,
4078 doc: /* Non-nil means the system uses terminfo rather than termcap. 4055 doc: /* Non-nil means the system uses terminfo rather than termcap.