thanks, committed.

On 2012/03/17 13:19, Donovan Watteau wrote:
> Hello,
> 
> I happen to use editors/elvis quite often, so here's the diff which
> renames the local function getline() to get_line(). It also drops
> USE_GROFF (which was set in the middle of a flavor...?) which seemed
> unnecessary.
> 
> Tested OK on loongson.
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/editors/elvis/Makefile,v
> retrieving revision 1.19
> diff -u -p -r1.19 Makefile
> --- Makefile  2 Dec 2011 14:36:14 -0000       1.19
> +++ Makefile  17 Mar 2012 12:06:55 -0000
> @@ -4,7 +4,7 @@ COMMENT=      clone of the ex/vi text editor
>  
>  DISTNAME=    elvis-2.2_0
>  PKGNAME=     ${DISTNAME:S/_/./}
> -REVISION=    0
> +REVISION=    1
>  CATEGORIES=  editors
>  HOMEPAGE=    http://elvis.the-little-red-haired-girl.org/
>  
> @@ -33,7 +33,6 @@ CONFIGURE_ARGS+= --with-x \
>               --x-includes=${X11BASE}/include \
>               --x-libraries=${X11BASE}/lib
>  CFLAGS+=     -I${X11BASE}/include/freetype2
> -USE_GROFF =  Yes
>  WANTLIB+=    X11 Xft Xpm pthread-stubs xcb
>  .endif
>  
> Index: patches/patch-ref_c
> ===================================================================
> RCS file: patches/patch-ref_c
> diff -N patches/patch-ref_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-ref_c       17 Mar 2012 12:06:55 -0000
> @@ -0,0 +1,48 @@
> +$OpenBSD$
> +--- ref.c.orig       Tue Oct 21 04:32:25 2003
> ++++ ref.c    Sat Mar 17 12:28:41 2012
> +@@ -42,7 +42,7 @@ typedef enum
> + 
> + #if USE_PROTOTYPES
> + static void usage(char *argv0);
> +-static char *getline(FILE *fp);
> ++static char *get_line(FILE *fp);
> + static void store(char *line, char **list);
> + static LINECLS classify(char *line, LINECLS prev);
> + static void lookup(TAG *tag);
> +@@ -171,7 +171,7 @@ ELVBOOL ioclose()
> + /* This function reads a single line, and replaces the terminating newline 
> with
> +  * a '\0' byte.  The string will be in a static buffer.  Returns NULL at 
> EOF.
> +  */
> +-static char *getline(fp)
> ++static char *get_line(fp)
> +     FILE    *fp;
> + {
> +     int     ch;
> +@@ -348,7 +348,7 @@ static void lookup(tag)
> +     }
> + 
> +     /* for each line... */
> +-    for (lnum = 1, lc = LC_COMPLETE; (line = getline(fp)) != NULL; lnum++)
> ++    for (lnum = 1, lc = LC_COMPLETE; (line = get_line(fp)) != NULL; lnum++)
> +     {
> +             /* is this the tag definition? */
> +             if (taglnum > 0 ? taglnum == lnum : !strncmp(tagline, line, 
> len))
> +@@ -377,7 +377,7 @@ static void lookup(tag)
> +                     {
> +                             if (strchr(line, '(') != NULL)
> +                             {
> +-                                    while ((line = getline(fp)) != NULL
> ++                                    while ((line = get_line(fp)) != NULL
> +                                         && *line
> +                                         && ((*line != '#' && *line != '{')
> +                                             || line[strlen(line) - 1] == 
> '\\'))
> +@@ -387,7 +387,7 @@ static void lookup(tag)
> +                             }
> +                             else if ((lc = classify(line, lc)) == 
> LC_PARTIAL)
> +                             {
> +-                                    while ((line = getline(fp)) != NULL
> ++                                    while ((line = get_line(fp)) != NULL
> +                                         && (lc = classify(line, lc)) == 
> LC_PARTIAL)
> +                                     {
> +                                             puts(line);
> 

Reply via email to