summaryrefslogtreecommitdiff
path: root/src/termcap.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2011-07-10 10:20:10 +0200
committerAndreas Schwab <schwab@linux-m68k.org>2011-07-10 10:20:10 +0200
commit1dae0f0aadd0e0fe51893aff89bb3220cba953db (patch)
tree771e2250c7fad12abc3bace5f91fd7e7963fdc55 /src/termcap.c
parent99033785c7adac8711cc7c56a99c4e3b441648b1 (diff)
downloademacs-1dae0f0aadd0e0fe51893aff89bb3220cba953db.tar.gz
Protoize
* src/buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge) (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Protoize. * src/data.c (fmod): Likewise. * src/dispnew.c (swap_glyphs_in_rows): Likewise. * src/emacs.c (memory_warning_signal): Likewise. * src/floatfns.c (float_error): Likewise. * src/font.c (check_gstring, check_otf_features, otf_tag_symbol) (otf_open, font_otf_capability, generate_otf_features) (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor): Likewise. * src/image.c (pbm_read_file): Likewise. * src/indent.c (string_display_width): Likewise. * src/intervals.c (check_for_interval, search_for_interval) (inc_interval_count, count_intervals, root_interval) (adjust_intervals_for_insertion, make_new_interval): Likewise. * src/lread.c (defalias): Likewise. * src/regex.c (set_image_of_range_1, set_image_of_range) (regex_grow_registers): Likewise. * src/sysdep.c (strerror): Likewise. * src/termcap.c (valid_filename_p, tprint, main): Likewise. * src/tparam.c (main): Likewise. * src/unexhp9k800.c (run_time_remap, save_data_space) (update_file_ptrs, read_header, write_header, calculate_checksum) (copy_file, copy_rest, display_header): Likewise. * src/widget.c (mark_shell_size_user_specified, create_frame_gcs): Likewise. * src/xdisp.c (check_it): Likewise. * src/xfaces.c (register_color, unregister_color, unregister_colors): Likewise. * src/xfns.c (print_fontset_result): Likewise. * src/xrdb.c (member, fatal, main): Likewise.
Diffstat (limited to 'src/termcap.c')
-rw-r--r--src/termcap.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/termcap.c b/src/termcap.c
index e191f6b3af3..96b9303d62d 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -338,8 +338,7 @@ static int name_match (char *line, char *name);
#ifdef MSDOS /* MW, May 1993 */
static int
-valid_filename_p (fn)
- char *fn;
+valid_filename_p (char *fn)
{
return *fn == '/' || fn[1] == ':';
}
@@ -669,9 +668,29 @@ gobble_line (int fd, register struct termcap_buffer *bufp, char *append_end)
#include <stdio.h>
-main (argc, argv)
- int argc;
- char **argv;
+static void
+tprint (char *cap)
+{
+ char *x = tgetstr (cap, 0);
+ register char *y;
+
+ printf ("%s: ", cap);
+ if (x)
+ {
+ for (y = x; *y; y++)
+ if (*y <= ' ' || *y == 0177)
+ printf ("\\%0o", *y);
+ else
+ putchar (*y);
+ free (x);
+ }
+ else
+ printf ("none");
+ putchar ('\n');
+}
+
+int
+main (int argc, char **argv)
{
char *term;
char *buf;
@@ -693,27 +712,8 @@ main (argc, argv)
printf ("co: %d\n", tgetnum ("co"));
printf ("am: %d\n", tgetflag ("am"));
-}
-
-tprint (cap)
- char *cap;
-{
- char *x = tgetstr (cap, 0);
- register char *y;
- printf ("%s: ", cap);
- if (x)
- {
- for (y = x; *y; y++)
- if (*y <= ' ' || *y == 0177)
- printf ("\\%0o", *y);
- else
- putchar (*y);
- free (x);
- }
- else
- printf ("none");
- putchar ('\n');
+ return 0;
}
#endif /* TEST */