groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] GNU troff version 1.22.3


From: Ulrich Lauther
Subject: Re: [Groff] GNU troff version 1.22.3
Date: Thu, 6 Nov 2014 19:06:54 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Nov 05, 2014 at 11:00:50AM +0100, Werner LEMBERG wrote:
> 
> >> groff 1.22.3 has been released.
> >> 
> > First, thanks a lot!
> > 
> > Should groff compile with gcc version 4.6.3 without warnings?
> 
> I guess the answer is no.  There are some warnings here and there, and
> I haven't found the time (and interest) to fix them.  Patches are
> welcomed :-)
> 
> 
>    Werner

I tried to fix it. Please find my attempt at patching below.

While working on this, I found that "make clean" does not work on my 
system (Ubuntu 12.4). I get

        make[1]: Entering directory
        `/usr/local/src/groff-1.22.3/src/libs/gnulib'
        CDPATH="${ZSH_VERSION+.}:" && cd . && aclocal-1.14 -I m4
        /bin/bash: aclocal-1.14: command not found
        make[1]: *** [aclocal.m4] Error 127
and when I type
        aclocal-1.14
I get
   No command 'aclocal-1.14' found, did you mean:
   Command 'aclocal-1.4' from package 'automake1.4' (main)
   Command 'aclocal-1.10' from package 'automake1.10' (main)
   Command 'aclocal-1.11' from package 'automake' (main)
   aclocal-1.14: command not found

aclocal --version 
gives
  aclocal (GNU automake) 1.12.2

So the question: 
Is that specific version of aclocal-1.14 needed, or would just aclocal do
as well?

Cheers,

  ulrich

-- 
# patch to avoid warnings from gcc 4.6.3
# 
# To apply this patch:
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'applypatch' program with this patch file as input.
#
# If you do not have 'applypatch', it is part of the 'makepatch' package
# that you can fetch from the Comprehensive Perl Archive Network:
# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
# In the above URL, 'x' should be 2 or higher.
#
# To apply this patch without the use of 'applypatch':
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'patch' program with this file as input.
#
#### End of Preamble ####

#### Patch data follows ####
diff -c 'groff-1.22.3/src/devices/grohtml/post-html.cpp' 
'/tmp/groff-1.22.3/src/devices/grohtml/post-html.cpp'
Index: ./src/devices/grohtml/post-html.cpp
*** ./src/devices/grohtml/post-html.cpp Thu Nov  6 18:44:17 2014
--- ./src/devices/grohtml/post-html.cpp Tue Nov  4 09:38:35 2014
***************
*** 5002,5008 ****
        string split_file = file_list.file_name();
        split_file += '\0';
        fflush(stdout);
!       FILE* foo = freopen(split_file.contents(), "w", stdout);
        fragment_no++;
        if (dialect == xhtml)
        writeHeadMetaStyle();
--- 5002,5008 ----
        string split_file = file_list.file_name();
        split_file += '\0';
        fflush(stdout);
!       freopen(split_file.contents(), "w", stdout);
        fragment_no++;
        if (dialect == xhtml)
        writeHeadMetaStyle();
diff -c 'groff-1.22.3/src/libs/libgroff/Makefile.sub' 
'/tmp/groff-1.22.3/src/libs/libgroff/Makefile.sub'
Index: ./src/libs/libgroff/Makefile.sub
*** ./src/libs/libgroff/Makefile.sub    Thu Nov  6 18:11:54 2014
--- ./src/libs/libgroff/Makefile.sub    Tue Nov  4 09:38:35 2014
***************
*** 146,152 ****
        @echo Making version.cpp
        @echo const char \*version_string = \"$(src_version)\"\; >$@
        @echo const char \*revision_string = \"$(src_revision)\"\; >>$@
!       @echo const char \*Version_string = 
\"$(src_version).$(src_revision)\"\; \
          | sed -e 's/\.0\"/\"/' >>$@
  
  # We have to avoid $(COMPILE.c) since we must not use groff's `assert.h'
--- 146,152 ----
        @echo Making version.cpp
        @echo const char \*version_string = \"$(src_version)\"\; >$@
        @echo const char \*revision_string = \"$(src_revision)\"\; >>$@
!       @echo extern \"C\" const char \*Version_string = 
\"$(src_version).$(src_revision)\"\; \
          | sed -e 's/\.0\"/\"/' >>$@
  
  # We have to avoid $(COMPILE.c) since we must not use groff's `assert.h'
diff -c 'groff-1.22.3/src/libs/libgroff/font.cpp' 
'/tmp/groff-1.22.3/src/libs/libgroff/font.cpp'
Index: ./src/libs/libgroff/font.cpp
*** ./src/libs/libgroff/font.cpp        Thu Nov  6 16:18:39 2014
--- ./src/libs/libgroff/font.cpp        Tue Nov  4 09:38:35 2014
***************
*** 740,746 ****
      if (test_file) {
        FILE *f = fopen(p, "r");
        if (f) {
!       char* foo = fgets(line, 254, f);
        fclose(f);
        test_file = 0;
        char *linep = strchr(line, '\0');
--- 740,746 ----
      if (test_file) {
        FILE *f = fopen(p, "r");
        if (f) {
!       fgets(line, 254, f);
        fclose(f);
        test_file = 0;
        char *linep = strchr(line, '\0');
diff -c 'groff-1.22.3/src/libs/libgroff/new.cpp' 
'/tmp/groff-1.22.3/src/libs/libgroff/new.cpp'
Index: ./src/libs/libgroff/new.cpp
*** ./src/libs/libgroff/new.cpp Thu Nov  6 16:29:01 2014
--- ./src/libs/libgroff/new.cpp Tue Nov  4 09:38:35 2014
***************
*** 28,34 ****
  
  static void ewrite(const char *s)
  {
!   ssize_t foo = write(2, s, strlen(s));
  }
  
  void *operator new(size_t size)
--- 28,34 ----
  
  static void ewrite(const char *s)
  {
!   write(2, s, strlen(s));
  }
  
  void *operator new(size_t size)
diff -c 'groff-1.22.3/src/preproc/grn/hdb.cpp' 
'/tmp/groff-1.22.3/src/preproc/grn/hdb.cpp'
Index: ./src/preproc/grn/hdb.cpp
*** ./src/preproc/grn/hdb.cpp   Thu Nov  6 16:15:12 2014
--- ./src/preproc/grn/hdb.cpp   Tue Nov  4 09:38:35 2014
***************
*** 82,88 ****
    register int done;          /* flag for input exhausted */
    register double nx;         /* x holder so x is not set before orienting */
    int type;                   /* element type */
-   int result = 0;               /* not needed, makes compiler happy */
    ELT *elist;                 /* pointer to the file's elements */
    POINT *plist;                       /* pointer for reading in points */
    char string[MAXSTRING], *txt;
--- 82,87 ----
***************
*** 92,98 ****
  
    SUNFILE = FALSE;
    elist = DBInit();
!   result = fscanf(file, "%" MAXSTRING_S "s%*[^\n]\n", string);
    if (strcmp(string, "gremlinfile")) {
      if (strcmp(string, "sungremlinfile")) {
        error("`%1' is not a gremlin file", gremlinfile);
--- 91,97 ----
  
    SUNFILE = FALSE;
    elist = DBInit();
!   (void) fscanf(file, "%" MAXSTRING_S "s%*[^\n]\n", string);
    if (strcmp(string, "gremlinfile")) {
      if (strcmp(string, "sungremlinfile")) {
        error("`%1' is not a gremlin file", gremlinfile);
***************
*** 101,107 ****
      SUNFILE = TRUE;
    }
  
!   result = fscanf(file, "%d%lf%lf\n", &size, &x, &y);
    /* ignore orientation and file positioning point */
  
    done = FALSE;
--- 100,106 ----
      SUNFILE = TRUE;
    }
  
!   (void) fscanf(file, "%d%lf%lf\n", &size, &x, &y);
    /* ignore orientation and file positioning point */
  
    done = FALSE;
***************
*** 119,127 ****
        done = TRUE;
      } else {
  #ifdef UW_FASTSCAN
!       result = xscanf(file, &x, &y);          /* always one point */
  #else
!       result = fscanf(file, "%lf%lf\n", &x, &y);      /* always one point */
  #endif        /* UW_FASTSCAN */
        plist = PTInit();               /* NULL point list */
  
--- 118,126 ----
        done = TRUE;
      } else {
  #ifdef UW_FASTSCAN
!       (void) xscanf(file, &x, &y);            /* always one point */
  #else
!       (void) fscanf(file, "%lf%lf\n", &x, &y);        /* always one point */
  #endif        /* UW_FASTSCAN */
        plist = PTInit();               /* NULL point list */
  
***************
*** 141,147 ****
  #else
        lastpoint = FALSE;
        do {
!         char* foo = fgets(string, MAXSTRING, file);
          if (string[0] == '*') {       /* SUN gremlin file */
            lastpoint = TRUE;
          } else {
--- 140,146 ----
  #else
        lastpoint = FALSE;
        do {
!         fgets(string, MAXSTRING, file);
          if (string[0] == '*') {       /* SUN gremlin file */
            lastpoint = TRUE;
          } else {
***************
*** 171,177 ****
          (void) PTMakePoint(nx, y, &plist);
          savebounds(nx, y);
  
!         char* foo = fgets(string, MAXSTRING, file);
          if (string[0] == '*') {       /* SUN gremlin file */
            lastpoint = TRUE;
          } else {
--- 170,176 ----
          (void) PTMakePoint(nx, y, &plist);
          savebounds(nx, y);
  
!         fgets(string, MAXSTRING, file);
          if (string[0] == '*') {       /* SUN gremlin file */
            lastpoint = TRUE;
          } else {
***************
*** 182,190 ****
        }
  #endif        /* UW_FASTSCAN */
        }
!       result = fscanf(file, "%d%d\n", &brush, &size);
!       result = fscanf(file, "%d", &len);      /* text length */
!       result = getc(file);            /* eat blank */
        txt = (char *) malloc((unsigned) len + 1);
        for (i = 0; i < len; ++i) {     /* read text */
          int c = getc(file);
--- 181,189 ----
        }
  #endif        /* UW_FASTSCAN */
        }
!       (void) fscanf(file, "%d%d\n", &brush, &size);
!       (void) fscanf(file, "%d", &len);        /* text length */
!       (void) getc(file);              /* eat blank */
        txt = (char *) malloc((unsigned) len + 1);
        for (i = 0; i < len; ++i) {     /* read text */
          int c = getc(file);
diff -c 'groff-1.22.3/src/preproc/pic/pic.y' 
'/tmp/groff-1.22.3/src/preproc/pic/pic.y'
Index: ./src/preproc/pic/pic.y
*** ./src/preproc/pic/pic.y     Thu Nov  6 16:46:09 2014
--- ./src/preproc/pic/pic.y     Tue Nov  4 09:38:35 2014
***************
*** 357,368 ****
                { delim_flag = 1; }
          DELIMITED
                {
-                   int foo;
                  delim_flag = 0;
                  if (safer_flag)
                    lex_error("unsafe to run command `%1'", $3);
                  else
!                   foo = system($3); 
                  a_delete $3;
                }
        | COPY TEXT
--- 357,367 ----
                { delim_flag = 1; }
          DELIMITED
                {
                  delim_flag = 0;
                  if (safer_flag)
                    lex_error("unsafe to run command `%1'", $3);
                  else
!                   system($3);
                  a_delete $3;
                }
        | COPY TEXT
#### End of Patch data ####

#### ApplyPatch data follows ####
# Data version        : 1.0
# Date generated      : Thu Nov  6 18:50:16 2014
# Generated by        : makepatch 2.03
# Recurse directories : Yes
# Excluded files      : (\A|/).*\~\Z
#                       (\A|/).*\.a\Z
#                       (\A|/).*\.bak\Z
#                       (\A|/).*\.BAK\Z
#                       (\A|/).*\.elc\Z
#                       (\A|/).*\.exe\Z
#                       (\A|/).*\.gz\Z
#                       (\A|/).*\.ln\Z
#                       (\A|/).*\.o\Z
#                       (\A|/).*\.obj\Z
#                       (\A|/).*\.olb\Z
#                       (\A|/).*\.old\Z
#                       (\A|/).*\.orig\Z
#                       (\A|/).*\.rej\Z
#                       (\A|/).*\.so\Z
#                       (\A|/).*\.Z\Z
#                       (\A|/)\.del\-.*\Z
#                       (\A|/)\.make\.state\Z
#                       (\A|/)\.nse_depinfo\Z
#                       (\A|/)core\Z
#                       (\A|/)tags\Z
#                       (\A|/)TAGS\Z
# p 'src/devices/grohtml/post-html.cpp' 145248 1415090315 0100644
# p 'src/libs/libgroff/Makefile.sub' 6336 1415090315 0100644
# p 'src/libs/libgroff/font.cpp' 28492 1415090315 0100644
# p 'src/libs/libgroff/new.cpp' 1653 1415090315 0100644
# p 'src/preproc/grn/hdb.cpp' 8508 1415090315 0100644
# p 'src/preproc/pic/pic.y' 37663 1415090315 0100644
#### End of ApplyPatch data ####

#### End of Patch kit [created: Thu Nov  6 18:50:16 2014] ####
#### Patch checksum: 277 9075 35881 ####
#### Checksum: 295 9738 25276 ####



reply via email to

[Prev in Thread] Current Thread [Next in Thread]