diff options
author | Vanilla I. Shu <vanilla@FreeBSD.org> | 2011-09-09 01:16:37 +0000 |
---|---|---|
committer | Vanilla I. Shu <vanilla@FreeBSD.org> | 2011-09-09 01:16:37 +0000 |
commit | 4e347ced58ba2809d0631b34db81e001c577c360 (patch) | |
tree | 532e1e1d495ab6744da0c594b4c5a6320bfa4550 | |
parent | 96677f674de0a496737a62abf22b9b3409054a2d (diff) |
Notes
-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 | ||||
-rw-r--r-- | x11/9box/files/patch-src__9box.c | 30 | ||||
-rw-r--r-- | x11/9box/files/patch-src__buttons.c | 11 | ||||
-rw-r--r-- | x11/9box/files/patch-src__fns.h | 35 | ||||
-rw-r--r-- | x11/9box/files/patch-src__manage.c | 33 | ||||
-rw-r--r-- | x11/9box/files/patch-src__menu.c | 10 | ||||
-rw-r--r-- | x11/9box/files/patch-src__utils.c | 13 | ||||
-rw-r--r-- | x11/9box/files/patch-src__wm.c | 11 |
16 files changed, 469 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; + diff --git a/x11/9box/files/patch-src__9box.c b/x11/9box/files/patch-src__9box.c new file mode 100644 index 000000000000..a3346b656043 --- /dev/null +++ b/x11/9box/files/patch-src__9box.c @@ -0,0 +1,30 @@ +--- src/9box.c.orig 2002-12-05 07:13:33.000000000 +0800 ++++ src/9box.c 2011-09-08 14:37:25.000000000 +0800 +@@ -20,6 +20,7 @@ + /* $Id: 9box.c,v 1.14 2002/07/29 13:02:59 benj Exp $ */ + + #include <stdio.h> ++#include <stdlib.h> + #include <X11/Xlib.h> + #include <X11/X.h> + #include <X11/cursorfont.h> +@@ -186,8 +187,8 @@ main (int argc, char ** argv) + Window root_return; + int x_return, y_return, width_return, height_return, border_width_return, depth_return; + XGetGeometry(box.dpy, box.win, &root_return, &x_return, +- &y_return, &width_return, &height_return, +- &border_width_return, &depth_return); ++ &y_return, (unsigned int *)&width_return, (unsigned int *)&height_return, ++ (unsigned int *)&border_width_return, (unsigned int *)&depth_return); + XMoveWindow(box.dpy, + box.boxed_windows[i]->button, i*BUTTON_DEFAULT_WIDTH, height_return-20); + XResizeWindow(box.dpy, box.boxed_windows[i]->client, +@@ -435,7 +436,7 @@ XButtonEvent *e; + + + +-Window ++void + reparent_window(Box * box) + { + Window win, win2; diff --git a/x11/9box/files/patch-src__buttons.c b/x11/9box/files/patch-src__buttons.c new file mode 100644 index 000000000000..15f47a1b2602 --- /dev/null +++ b/x11/9box/files/patch-src__buttons.c @@ -0,0 +1,11 @@ +--- src/buttons.c.orig 2003-01-06 21:25:41.000000000 +0800 ++++ src/buttons.c 2011-09-08 14:25:06.000000000 +0800 +@@ -21,6 +21,8 @@ + + #include "dat.h" + #include "fns.h" ++#include <stdio.h> ++#include <string.h> + #include <X11/cursorfont.h> + + void diff --git a/x11/9box/files/patch-src__fns.h b/x11/9box/files/patch-src__fns.h new file mode 100644 index 000000000000..8825ecb6abb8 --- /dev/null +++ b/x11/9box/files/patch-src__fns.h @@ -0,0 +1,35 @@ +--- src/fns.h.orig 2003-01-06 18:23:16.000000000 +0800 ++++ src/fns.h 2011-09-08 14:36:30.000000000 +0800 +@@ -7,7 +7,8 @@ + Window selectwin(Box *); + Window dump_tree(Box *, Window, int); + char * getprop(Box *, Window, Atom); +-Window reparent_window(Box *); ++void reparent_window(Box *); ++int nobuttons(XButtonEvent *); + + + /* grab.c */ +@@ -21,9 +22,14 @@ void select_window(BoxedWindow *); + void remove_window(BoxedWindow *); + void release_window(BoxedWindow *); + void update_buttons_position(Box *); ++void destroy_window(BoxedWindow *); + ++/* menu.c */ ++int menu(Box *, char **, int); ++void b2menu(Box *); + + /* buttons.c */ ++void move_button(Box *); + void draw_button(BoxedWindow *); + int button_height(); + void move_button_to(Box *, int); +@@ -32,6 +38,7 @@ void move_button_to(Box *, int); + BoxedWindow * search_boxedwindow(Box *, Window); + BoxedWindow * search_boxedwindow_client(Box *, Window); + BoxedWindow * search_boxedwindow_button(Box *, Window); ++void resize_box_for_client(Box *, int); + + /* wm.c */ + void set_title(Box *, char *); diff --git a/x11/9box/files/patch-src__manage.c b/x11/9box/files/patch-src__manage.c new file mode 100644 index 000000000000..99c73334bbea --- /dev/null +++ b/x11/9box/files/patch-src__manage.c @@ -0,0 +1,33 @@ +--- src/manage.c.orig 2002-12-05 05:44:23.000000000 +0800 ++++ src/manage.c 2011-09-08 14:33:13.000000000 +0800 +@@ -21,6 +21,8 @@ + + #include "dat.h" + #include "fns.h" ++#include <stdio.h> ++#include <stdlib.h> + + void + resize_window(BoxedWindow * window) +@@ -30,8 +32,8 @@ resize_window(BoxedWindow * window) + + XGetGeometry(window->box->dpy, window->box->win, + &root_return, &x_return, &y_return, +- &width_return, &height_return, +- &border_width_return, &depth_return); ++ (unsigned int *)&width_return, (unsigned int *)&height_return, ++ (unsigned int *)&border_width_return, (unsigned int *)&depth_return); + XMoveWindow(window->box->dpy, window->button, + window->number * BUTTON_DEFAULT_WIDTH, height_return - button_height()); + printf(">> %d; %d\n", width_return, height_return); +@@ -144,8 +146,8 @@ update_buttons_position(Box * box) + + XGetGeometry(box->dpy, box->win, + &root_return, &x_return, &y_return, +- &width_return, &height_return, +- &border_width_return, &depth_return); ++ (unsigned int *)&width_return, (unsigned int *)&height_return, ++ (unsigned int *)&border_width_return, (unsigned int *)&depth_return); + + for (i=0; i<MAX_BOXED_WINDOWS && box->boxed_windows[i]; i++) + { diff --git a/x11/9box/files/patch-src__menu.c b/x11/9box/files/patch-src__menu.c new file mode 100644 index 000000000000..edbf5b2147a6 --- /dev/null +++ b/x11/9box/files/patch-src__menu.c @@ -0,0 +1,10 @@ +--- src/menu.c.orig 2003-01-06 21:27:35.000000000 +0800 ++++ src/menu.c 2011-09-08 14:29:36.000000000 +0800 +@@ -20,6 +20,7 @@ + /* $Id$ */ + #include "dat.h" + #include "fns.h" ++#include <string.h> + + char * b2items[4] = + { diff --git a/x11/9box/files/patch-src__utils.c b/x11/9box/files/patch-src__utils.c new file mode 100644 index 000000000000..83ca5fb0ae55 --- /dev/null +++ b/x11/9box/files/patch-src__utils.c @@ -0,0 +1,13 @@ +--- src/utils.c.orig 2002-10-30 19:30:09.000000000 +0800 ++++ src/utils.c 2011-09-08 14:27:51.000000000 +0800 +@@ -89,8 +89,8 @@ resize_box_for_client(Box * box, int cli + + XGetGeometry(box->dpy, box->boxed_windows[client]->client, + &root_return, &x_return, &y_return, +- &width_return, &height_return, +- &border_width_return, &depth_return); ++ (unsigned int *)&width_return, (unsigned int*)&height_return, ++ (unsigned int *)&border_width_return, (unsigned int *)&depth_return); + + XResizeWindow(box->dpy, box->win, width_return, height_return+button_height()); + box->box_width = width_return; diff --git a/x11/9box/files/patch-src__wm.c b/x11/9box/files/patch-src__wm.c new file mode 100644 index 000000000000..d08da87ae270 --- /dev/null +++ b/x11/9box/files/patch-src__wm.c @@ -0,0 +1,11 @@ +--- src/wm.c.orig 2011-09-08 14:25:35.000000000 +0800 ++++ src/wm.c 2011-09-08 14:25:46.000000000 +0800 +@@ -19,6 +19,8 @@ + + /* $Id: wm.c,v 1.1 2002/04/23 23:42:36 benj Exp $ */ + ++#include <stdio.h> ++#include <stdlib.h> + #include <X11/Xlib.h> + #include <X11/Xutil.h> + |