diff options
author | Vanilla I. Shu <vanilla@FreeBSD.org> | 2011-09-09 09:16:37 +0800 |
---|---|---|
committer | Vanilla I. Shu <vanilla@FreeBSD.org> | 2011-09-09 09:16:37 +0800 |
commit | 4e347ced58ba2809d0631b34db81e001c577c360 (patch) | |
tree | 532e1e1d495ab6744da0c594b4c5a6320bfa4550 /sysutils/44bsd-more | |
parent | 96677f674de0a496737a62abf22b9b3409054a2d (diff) | |
download | freebsd-ports-gnome-4e347ced58ba2809d0631b34db81e001c577c360.tar.gz freebsd-ports-gnome-4e347ced58ba2809d0631b34db81e001c577c360.tar.zst freebsd-ports-gnome-4e347ced58ba2809d0631b34db81e001c577c360.zip |
Fix build with clang.
Diffstat (limited to 'sysutils/44bsd-more')
-rw-r--r-- | sysutils/44bsd-more/files/patch-ch.c | 27 | ||||
-rw-r--r-- | sysutils/44bsd-more/files/patch-command.c | 73 | ||||
-rw-r--r-- | sysutils/44bsd-more/files/patch-linenum.c | 44 | ||||
-rw-r--r-- | sysutils/44bsd-more/files/patch-main.c | 55 | ||||
-rw-r--r-- | sysutils/44bsd-more/files/patch-marks.c | 18 | ||||
-rw-r--r-- | sysutils/44bsd-more/files/patch-ncommand.c | 16 | ||||
-rw-r--r-- | sysutils/44bsd-more/files/patch-prim.c | 64 | ||||
-rw-r--r-- | sysutils/44bsd-more/files/patch-signal.c | 10 | ||||
-rw-r--r-- | sysutils/44bsd-more/files/patch-tags.c | 31 |
9 files changed, 326 insertions, 12 deletions
diff --git a/sysutils/44bsd-more/files/patch-ch.c b/sysutils/44bsd-more/files/patch-ch.c new file mode 100644 index 000000000000..78700d419db7 --- /dev/null +++ b/sysutils/44bsd-more/files/patch-ch.c @@ -0,0 +1,27 @@ +--- ch.c.orig 2011-09-08 01:03:22.000000000 +0800 ++++ ch.c 2011-09-08 01:04:33.000000000 +0800 +@@ -48,6 +48,7 @@ static const char rcsid[] = + */ + + #include <sys/types.h> ++#include <stdlib.h> + #include <sys/file.h> + #include <unistd.h> + #include <stdio.h> +@@ -391,6 +392,7 @@ ch_back_get() + * keep==1 means keep the data in the current buffers; + * otherwise discard the old data. + */ ++void + ch_init(want_nbufs, keep) + int want_nbufs; + int keep; +@@ -436,7 +438,7 @@ ch_addbuf(nnew) + { + register struct buf *bp; + register struct buf *newbufs; +- char *calloc(); ++ // char *calloc(); + + /* + * We don't have enough buffers. diff --git a/sysutils/44bsd-more/files/patch-command.c b/sysutils/44bsd-more/files/patch-command.c new file mode 100644 index 000000000000..54225cdcac8d --- /dev/null +++ b/sysutils/44bsd-more/files/patch-command.c @@ -0,0 +1,73 @@ +--- command.c.orig 2011-09-08 01:05:11.000000000 +0800 ++++ command.c 2011-09-08 01:09:16.000000000 +0800 +@@ -50,11 +50,13 @@ static const char rcsid[] = + + #include <sys/param.h> + ++#include <stdio.h> ++#include <stdlib.h> + #include <assert.h> + #include <ctype.h> + #include <stdarg.h> +-#include <stdio.h> + #include <string.h> ++#include <unistd.h> + + #include "less.h" + #include "pathnames.h" +@@ -77,6 +79,7 @@ extern int screen_trashed; /* The screen + static int cmd_col; /* Current screen column when accepting input */ + + static cmd_char(), cmd_erase(), getcc(); ++void error(char *); + + + /***************************************************************************** +@@ -448,6 +451,7 @@ SETERRSTR(enum error e, const char *s, . + /* + * Prints an error message and clears the current error. + */ ++void + handle_error() + { + if (erreur == E_OK) +@@ -465,6 +469,7 @@ handle_error() + /* + * Clears any error messages and pretends they never occurred. + */ ++void + clear_error() + { + erreur = E_OK; +@@ -480,6 +485,7 @@ static char return_to_continue[] = "(pre + * and wait for carriage return. + */ + /* static */ ++void + error(s) + char *s; + { +@@ -553,6 +559,7 @@ error(s) + * + * Accept and execute commands until a quit command, then return. + */ ++void + commands() + { + enum runmacro runmacro(); +@@ -646,6 +653,7 @@ commands() + * + */ + ++void + editfile() + { + off_t position(); +@@ -707,6 +715,7 @@ editfile() + lsystem(buf); + } + ++void + showlist() + { + extern int sc_width; diff --git a/sysutils/44bsd-more/files/patch-linenum.c b/sysutils/44bsd-more/files/patch-linenum.c new file mode 100644 index 000000000000..5efc8bed1f38 --- /dev/null +++ b/sysutils/44bsd-more/files/patch-linenum.c @@ -0,0 +1,44 @@ +--- linenum.c.orig 2011-09-08 01:09:35.000000000 +0800 ++++ linenum.c 2011-09-08 01:11:21.000000000 +0800 +@@ -134,7 +134,7 @@ clr_linenum() + /* + * Calculate the gap for an entry. + */ +-static ++static void + calcgap(p) + register struct linenum *p; + { +@@ -154,6 +154,7 @@ calcgap(p) + * The specified position (pos) should be the file position of the + * FIRST character in the specified line. + */ ++void + add_lnum(line, pos) + int line; + off_t pos; +@@ -248,7 +249,7 @@ add_lnum(line, pos) + * If we get stuck in a long loop trying to figure out the + * line number, print a message to tell the user what we're doing. + */ +-static ++static void + longloopmessage() + { + ierror("Calculating line numbers"); +@@ -264,6 +265,7 @@ longloopmessage() + * Find the line number associated with a given position. + * Return 0 if we can't figure it out. + */ ++int + find_linenum(pos) + off_t pos; + { +@@ -384,6 +386,7 @@ find_linenum(pos) + * The argument "where" tells which line is to be considered + * the "current" line (e.g. TOP, BOTTOM, MIDDLE, etc). + */ ++int + currline(where) + int where; + { diff --git a/sysutils/44bsd-more/files/patch-main.c b/sysutils/44bsd-more/files/patch-main.c index 00662f7f75d1..a2110df1be9c 100644 --- a/sysutils/44bsd-more/files/patch-main.c +++ b/sysutils/44bsd-more/files/patch-main.c @@ -1,5 +1,5 @@ ---- ./main.c.orig 2007-06-22 14:48:44.602177005 +0800 -+++ ./main.c 2007-06-22 14:48:44.620758150 +0800 +--- main.c.orig 2011-09-08 01:02:56.000000000 +0800 ++++ main.c 2011-09-08 01:17:47.000000000 +0800 @@ -33,9 +33,9 @@ */ @@ -12,20 +12,65 @@ Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ -@@ -68,6 +68,8 @@ +@@ -68,6 +68,10 @@ static const char rcsid[] = #include "less.h" #include "pathnames.h" +static int str_read(void *, char *, size_t); ++void rcfiles(); ++void readrc(FILE *); + int ispipe; char *current_file, *previous_file, *current_name, *next_name; int any_display; -@@ -410,7 +412,6 @@ +@@ -214,6 +218,7 @@ edit(filename, force_open) + /* + * Edit the next file in the command line list. + */ ++void + next_file(n) + int n; + { +@@ -281,7 +286,7 @@ main(argc, argv) + * Process command line arguments and MORE environment arguments. + * Command line arguments override environment arguments. + */ +- if (envargv[1] = getenv("MORE")) { ++ if ((envargv[1] = getenv("MORE"))) { + envargc = 2; + envargv[0] = "more"; + envargv[2] = NULL; +@@ -403,14 +408,14 @@ quit() + * Read in from each of the three rc files - default, system, user. + * Calls handle_error() directly to report errors. + */ ++void + rcfiles() + { + FILE *fd; + char fbuf[MAXPATHLEN + 1]; char *c; - int readrc(); +- int readrc(); ++ // int readrc(); int savederrno; - static int str_read(); /* The default builtin rc file */ if ((c = getenv("HOME")) && +@@ -480,6 +485,7 @@ use_builtin_defrc: + * This really belongs in ncommand.c, but that file is already 33292 bytes + * long. + */ ++void + readrc(fd) + FILE *fd; + { +@@ -489,7 +495,7 @@ readrc(fd) + + buf = NULL; + strlenbuf = 0; +- while (bufptr = fgetln(fd, &len)) { ++ while ((bufptr = fgetln(fd, &len))) { + if (!len) + continue; /* ??? */ + if (*bufptr == '#') diff --git a/sysutils/44bsd-more/files/patch-marks.c b/sysutils/44bsd-more/files/patch-marks.c new file mode 100644 index 000000000000..9878ff5b832e --- /dev/null +++ b/sysutils/44bsd-more/files/patch-marks.c @@ -0,0 +1,18 @@ +--- marks.c.orig 2011-09-08 01:18:08.000000000 +0800 ++++ marks.c 2011-09-08 01:18:34.000000000 +0800 +@@ -129,6 +129,7 @@ badmark(c) + /* + * Set a bookmark. + */ ++void + setmark(c) + int c; /* user identifier for bookmark to set */ + { +@@ -318,6 +319,7 @@ fprintf_error: + /* + * Go to a previously set mark. + */ ++void + gomark(c) + int c; + { diff --git a/sysutils/44bsd-more/files/patch-ncommand.c b/sysutils/44bsd-more/files/patch-ncommand.c index 39167e12cf95..25c8e9b40006 100644 --- a/sysutils/44bsd-more/files/patch-ncommand.c +++ b/sysutils/44bsd-more/files/patch-ncommand.c @@ -1,6 +1,6 @@ ---- ./ncommand.c.orig 2007-06-22 14:48:44.603814341 +0800 -+++ ./ncommand.c 2007-06-22 14:48:44.631081101 +0800 -@@ -231,6 +231,7 @@ +--- ncommand.c.orig 2011-09-08 01:02:56.000000000 +0800 ++++ ncommand.c 2011-09-08 01:19:11.000000000 +0800 +@@ -231,6 +231,7 @@ donextcommand: */ static char *readvar(); @@ -8,7 +8,15 @@ #define NCTXTS 128 void *getstr_ctxts[NCTXTS]; /* could easily be made dynamic... */ -@@ -613,7 +614,6 @@ +@@ -580,6 +581,7 @@ gettog(const char **line, int nopts, ... + * also be set to a corresponding value. The optnumb argument had better + * be within the correct range (between 0 and 2 in the above example)!! + */ ++void + settog(const char *varname, int optval, int nargs, ...) + { + va_list opts; +@@ -613,7 +615,6 @@ readvar(line) { int vlength; char *vstart; diff --git a/sysutils/44bsd-more/files/patch-prim.c b/sysutils/44bsd-more/files/patch-prim.c new file mode 100644 index 000000000000..718fd27b1cb4 --- /dev/null +++ b/sysutils/44bsd-more/files/patch-prim.c @@ -0,0 +1,64 @@ +--- prim.c.orig 2011-09-08 01:21:48.000000000 +0800 ++++ prim.c 2011-09-08 01:23:17.000000000 +0800 +@@ -66,11 +66,12 @@ extern int retain_below; + + off_t position(), forw_line(), back_line(), forw_raw_line(), back_raw_line(); + off_t ch_length(), ch_tell(); ++void jump_loc(off_t); + + /* + * Check to see if the end of file is currently "displayed". + */ +-static ++static void + eof_check() + { + off_t pos; +@@ -256,6 +257,7 @@ back(n, pos, only_last) + * Display n more lines, forward. + * Start just after the line currently displayed at the bottom of the screen. + */ ++void + forward(n, only_last) + int n; + int only_last; +@@ -284,6 +286,7 @@ forward(n, only_last) + * Display n more lines, backward. + * Start just before the line currently displayed at the top of the screen. + */ ++void + backward(n, only_last) + int n; + int only_last; +@@ -328,6 +331,7 @@ repaint() + * It is more convenient to paint the screen backward, + * from the end of the file toward the beginning. + */ ++void + jump_forw() + { + off_t pos; +@@ -348,6 +352,7 @@ jump_forw() + /* + * Jump to line n in the file. + */ ++void + jump_back(n) + register int n; + { +@@ -393,6 +398,7 @@ jump_back(n) + * This is a poor compensation for not being able to + * quickly jump to a specific line number. + */ ++void + jump_percent(percent) + int percent; + { +@@ -427,6 +433,7 @@ jump_percent(percent) + /* + * Jump to a specified position in the file. + */ ++void + jump_loc(pos) + off_t pos; + { diff --git a/sysutils/44bsd-more/files/patch-signal.c b/sysutils/44bsd-more/files/patch-signal.c new file mode 100644 index 000000000000..12818806c21c --- /dev/null +++ b/sysutils/44bsd-more/files/patch-signal.c @@ -0,0 +1,10 @@ +--- signal.c.orig 2011-09-08 01:24:01.000000000 +0800 ++++ signal.c 2011-09-08 01:24:09.000000000 +0800 +@@ -160,6 +160,7 @@ init_signals(on) + * Process any signals we have received. + * A received signal cause a bit to be set in "sigs". + */ ++void + psignals() + { + register int tsignals; diff --git a/sysutils/44bsd-more/files/patch-tags.c b/sysutils/44bsd-more/files/patch-tags.c index 5bbe5154e613..bfb198062f70 100644 --- a/sysutils/44bsd-more/files/patch-tags.c +++ b/sysutils/44bsd-more/files/patch-tags.c @@ -1,6 +1,6 @@ ---- tags.c.orig Fri Jan 12 15:52:49 2001 -+++ tags.c Fri Jan 12 15:55:10 2001 -@@ -42,7 +42,7 @@ +--- tags.c.orig 2011-09-08 01:02:56.000000000 +0800 ++++ tags.c 2011-09-08 01:25:14.000000000 +0800 +@@ -42,7 +42,7 @@ static const char rcsid[] = #endif /* not lint */ #include <sys/types.h> @@ -9,3 +9,28 @@ #include <ctype.h> #include <stdio.h> +@@ -67,6 +67,7 @@ static ctagsearch(), gtagsearch(); + * loading the file named by tagfile, tagsearch() should be called to + * set the current position to the tag. + */ ++void + findtag(tag) + char *tag; /* The tag to load */ + { +@@ -143,6 +144,7 @@ prevtag(number) + * succesfully passed to findtag() or chosen with nexttag() and prevtag(). + * An error message will be printed if unsuccessful. + */ ++void + tagsearch() + { + switch(tagstyle) { +@@ -426,7 +428,7 @@ findgtag(tag) + /* Get our data from global(1) */ + snprintf(command, sizeof(command), + "(global -x '%s'; global -xr '%s') 2>/dev/null", tag, tag); +- if (fp = popen(command, "r")) { ++ if ((fp = popen(command, "r"))) { + while (fgets(buf, sizeof(buf), fp)) { + char *name, *file, *line; + |