groff-commit
[Top][All Lists]
Advanced

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

[Groff-commit] groff/contrib/groffer ChangeLog groffer.sh grof...


From: Bernd Warken
Subject: [Groff-commit] groff/contrib/groffer ChangeLog groffer.sh grof...
Date: Sun, 01 Oct 2006 12:27:01 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Changes by:     Bernd Warken <bwarken>  06/10/01 12:27:01

Modified files:
        contrib/groffer: ChangeLog groffer.sh groffer2.sh version.sh 

Log message:
        Update groffer 0.9.28

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/groffer/ChangeLog?cvsroot=groff&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/groffer/groffer.sh?cvsroot=groff&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/groffer/groffer2.sh?cvsroot=groff&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/groffer/version.sh?cvsroot=groff&r1=1.4&r2=1.5

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/contrib/groffer/ChangeLog,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- ChangeLog   26 Sep 2006 21:10:24 -0000      1.40
+++ ChangeLog   1 Oct 2006 12:27:01 -0000       1.41
@@ -1,3 +1,21 @@
+2006-10-01  Bernd Warken
+       ________________________________________________________________
+       * release of groffer 0.9.28
+
+       * groffer.sh:
+       - Change all directories to end with `/'.
+       - In the state before the run of `make', make the script runnable
+       from each directory using $0 and `pwd'.
+
+       * groffer2.sh:
+       - main_init(): Change the umask to 0077 to allow only access for
+       the file owner for the temporary files.  This is done for security
+       reasons.
+       - version(): Put the whole output under `<<EOF'.
+       - usage(): Add information on filespec arguments.
+       - main_do_fileargs(): Rewrite the handling of filespec
+       parameters.  Fix filespec man:name.section.
+
 2006-09-26  Bernd Warken
        ________________________________________________________________
        * release of groffer 0.9.27
@@ -2038,3 +2056,10 @@
 
        This file is part of `groffer', which is part of the `groff'
        project.
+
+
+       Emacs settings
+
+       Local Variables:
+       mode: change-log
+       End:

Index: groffer.sh
===================================================================
RCS file: /cvsroot/groff/groff/contrib/groffer/groffer.sh,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- groffer.sh  11 Sep 2006 16:06:18 -0000      1.36
+++ groffer.sh  1 Oct 2006 12:27:01 -0000       1.37
@@ -9,7 +9,7 @@
 # Free Software Foundation, Inc.
 # Written by Bernd Warken
 
-# Last update: 14 Aug 2006
+# Last update: 1 Oct 2006
 
 # This file is part of `groffer', which is part of `groff'.
 
@@ -72,22 +72,50 @@
 export _GROFFER_LIBDIR;
 case "${_BEFORE_MAKE}" in
 yes)
-  _AT_BINDIR_AT='.';
+  self="$0";
+  case "${self}" in
+  /*) :; ;;
+  *)
+    curdir="$(pwd)";
+    case "${curdir}" in
+    */)
+      self="${curdir}${self}";
+      ;;
+    *)
+      self="${curdir}/${self}";
+      ;;
+    esac;
+    ;;
+  esac;
+  groffer_shell_dir="$(dirname ${self})";
+  case "${groffer_shell_dir}" in
+  */) :; ;;
+  *) groffer_shell_dir="${groffer_shell_dir}/";
+  esac;
   _AT_G_AT='';
-  _AT_LIBDIR_AT='';
-  _GROFFER_LIBDIR='.';
+  _AT_BINDIR_AT="${groffer_shell_dir}";
+  _AT_LIBDIR_AT="${groffer_shell_dir}";
+  _GROFFER_LIBDIR="${_AT_LIBDIR_AT}";
   ;;
 no)
-  _AT_BINDIR_AT='@BINDIR@';
   _AT_G_AT='@g@';
+  _AT_BINDIR_AT='@BINDIR@';
+  case "${_AT_BINDIR_AT}" in
+  */) :; ;;
+  *) _AT_BINDIR_AT="${_AT_BINDIR_AT}/";
+  esac;
   _AT_LIBDIR_AT='@libdir@';
-  _GROFFER_LIBDIR="${_AT_LIBDIR_AT}"'/groff/groffer';
+  case "${_AT_LIBDIR_AT}" in
+  */) :; ;;
+  *) _AT_LIBDIR_AT="${_AT_LIBDIR_AT}/";
+  esac;
+  _GROFFER_LIBDIR="${_AT_LIBDIR_AT}"'groff/groffer/';
   ;;
 esac;
 
-if test -f "${_GROFFER_LIBDIR}"/version.sh
+if test -f "${_GROFFER_LIBDIR}"'version.sh'
 then
-  . "${_GROFFER_LIBDIR}"/version.sh;
+  . "${_GROFFER_LIBDIR}"'version.sh';
 fi;
 
 export _GROFF_VERSION;
@@ -101,13 +129,12 @@
 esac;
 
 export _GROFFER2_SH;           # file name of the script that follows up
-_GROFFER2_SH="${_GROFFER_LIBDIR}"/groffer2.sh;
+_GROFFER2_SH="${_GROFFER_LIBDIR}"'groffer2.sh';
 
 export _GROFFER_SH;            # file name of this shell script
 case "$0" in
 *groffer*)
   _GROFFER_SH="$0";
-  # was: _GROFFER_SH="${_AT_BINDIR_AT}/groffer";
   ;;
 *)
   echo 'The groffer script should be started directly.' >&2

Index: groffer2.sh
===================================================================
RCS file: /cvsroot/groff/groff/contrib/groffer/groffer2.sh,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- groffer2.sh 26 Sep 2006 21:10:24 -0000      1.8
+++ groffer2.sh 1 Oct 2006 12:27:01 -0000       1.9
@@ -12,7 +12,7 @@
 # Free Software Foundation, Inc.
 # Written by Bernd Warken
 
-# Last update: 26 Sep 2006
+# Last update: 1 Oct 2006
 
 # This file is part of `groffer', which is part of `groff'.
 
@@ -4600,11 +4600,15 @@
 "filespec" is one of
   "filename"       name of a readable file
   "-"              for standard input
+  "man:name(n)"    man page "name" in section "n"
   "man:name.n"     man page "name" in section "n"
   "man:name"       man page "name" in first section found
+  "name(n)"        man page "name" in section "n"
   "name.n"         man page "name" in section "n"
+  "n name"         man page "name" in section "n"
   "name"           man page "name" in first section found
-and some more (see groffer(1) for details).
+where `section' is a single character out of [1-9on], optionally followed
+by some more letters that are called the `extension'.
 
 -h --help         print this usage message.
 -Q --source       output as roff source.
@@ -4689,11 +4693,11 @@
 version()
 {
   func_check version = 0 "$@";
-  echo1 "groffer ${_PROGRAM_VERSION} of ${_LAST_UPDATE}";
-  echo1 "is part of groff version ${_GROFF_VERSION}";
   y="$(echo "${_LAST_UPDATE}" | sed -e 's/^.* //')";
-  echo1 "Copyright (C) $y Free Software Foundation, Inc."
   cat <<EOF
+groffer ${_PROGRAM_VERSION} of ${_LAST_UPDATE} (shell version)
+is part of groff version ${_GROFF_VERSION}.
+Copyright (C) $y Free Software Foundation, Inc.
 GNU groff and groffer come with ABSOLUTELY NO WARRANTY.
 You may redistribute copies of groff and its subprograms
 under the terms of the GNU General Public License.
@@ -5149,7 +5153,7 @@
   trap_set;
 
   # create temporary directory
-  umask 0022;
+  umask 0077;
   _TMP_DIR='';
   for d in "${GROFF_TMPDIR}" "${TMPDIR}" "${TMP}" "${TEMP}" \
            "${TEMPDIR}" "${HOME}"'/tmp' '/tmp' "${HOME}" '.'
@@ -6385,9 +6389,11 @@
         fi;
       fi;
       ;;
-      # now it must be a man page pattern
     esac;
 ### main_do_fileargs()
+
+    # now it must be a man page pattern
+
     if obj _MACRO_PKG is_not_empty && obj _MACRO_PKG is_not_equal '-man'
     then
       echo2 "${mdfa_filespec} is not a file, man pages are ignored "\
@@ -6411,80 +6417,64 @@
     man_setup;
     _FILESPEC_IS_MAN='yes';
 
-    # check whether filespec is a man page
-    if obj mdfa_filespec man_is_man
-    then
-      obj mdfa_filespec man_get;
-      continue;
-    fi;
-
     # test filespec with `man:...' or `...(...)' on man page
     mdfa_name='';
     mdfa_section='';
     mdfa_ext='';
+
+    mdfa_names="${mdfa_filespec}";
     case "${mdfa_filespec}" in
-    *\(*\))
-      mdfa_section="$(obj mdfa_filespec echo1 | \
-        sed -e 's/^[^(]*(\(.\).*)$/\1/')";
-      if list_has_not _MAN_AUTO_SEC_LIST "${mdfa_section}"
-      then
-        echo2 "${mdfa_section} in ${mdfa_filespec} is not a man page section."
-        continue;
-      fi;
-      mdfa_name="$(obj mdfa_filespec echo1 | \
-        sed -e 's/^\([^(]*\)(.*)$/\1/')";
-      if obj mdfa_name is_empty
-      then
-        echo2 "${mdfa_filespec} ${mdfa_errmsg}";
-        continue;
-      fi;
-      mdfa_ext="$(obj mdfa_filespec echo1 | \
-        sed -e 's/^[^(]*(.\(.*\))$/\1/')";
-      if man_is_man "${mdfa_name}" "${mdfa_section}" "${mdfa_ext}"
+    man:*)
+        mdfa_names="${mdfa_names} "\
+"$(obj mdfa_filespec echo1 | sed -e 's/^man://')";
+        ;;
+    esac;
+
+    mdfa_continue='no';
+    for i in ${mdfa_names}
+    do
+      mdfa_i=$i;
+      if obj mdfa_i man_is_man
       then
-        man_get "${mdfa_name}" "${mdfa_section}" "${mdfa_ext}";
-        continue;
+        obj mdfa_i man_get;
+        mdfa_continue='yes';
+        break;
       fi;
-### main_do_fileargs()
-      case "${mdfa_name}" in
-      man:*)
-        mdfa_name="$(obj mdfa_name echo1 | sed -e 's/^man://')";
+      case "${mdfa_i}" in
+      *\(${_MAN_AUTO_SEC_CHARS}*\))
+        mdfa_section="$(obj mdfa_i echo1 | sed -e 's/^[^(]*(\(.\).*)$/\1/')";
+        mdfa_name="$(obj mdfa_i echo1 | sed -e 's/^\([^(]*\)(.*)$/\1/')";
+        mdfa_ext="$(obj mdfa_i echo1 | sed -e 's/^[^(]*(.\(.*\))$/\1/')";
         if man_is_man "${mdfa_name}" "${mdfa_section}" "${mdfa_ext}"
         then
           man_get "${mdfa_name}" "${mdfa_section}" "${mdfa_ext}";
-          continue;
-        fi;
-        ;;
-      esac;
-      echo2 "${mdfa_filespec} ${mdfa_errmsg}";
-      continue;
-      ;;
-    man:*)
-      mdfa_name="$(obj mdfa_filespec echo1 | sed -e 's/^man://')";
-      if man_is_man "${mdfa_name}"
-      then
-        man_get "${mdfa_name}";
-        continue;
+          mdfa_continue='yes';
+          break;
       fi;
-      echo2 "${mdfa_name} ${mdfa_errmsg}";
-      continue;
       ;;
     *.${_MAN_AUTO_SEC_CHARS}*)
-      mdfa_name="$(obj mdfa_filespec echo1 | \
+        mdfa_name="$(obj mdfa_i echo1 | \
         sed -e 's/^\(.*\)\.'"${_MAN_AUTO_SEC_CHARS}"'.*$/\1/')";
-      mdfa_section="$(obj mdfa_filespec echo1 | \
+        mdfa_section="$(obj mdfa_i echo1 | \
         sed -e 's/^.*\.\('"${_MAN_AUTO_SEC_CHARS}"'\).*$/\1/')";
-      mdfa_ext="$(obj mdfa_filespec echo1 | \
+        mdfa_ext="$(obj mdfa_i echo1 | \
         sed -e 's/^.*\.'"${_MAN_AUTO_SEC_CHARS}"'\(.*\)$/\1/')";
       if man_is_man "${mdfa_name}" "${mdfa_section}" "${mdfa_ext}"
       then
         man_get "${mdfa_name}" "${mdfa_section}" "${mdfa_ext}";
-        continue;
+          mdfa_continue='yes';
+          break;
       fi;
       ;;
     esac;
-### main_do_fileargs()
+    done;
+
+    if obj mdfa_continue is_yes
+    then
+      continue;
+    fi;
 
+### main_do_fileargs()
     # check on "s name", where "s" is a section with or without an extension
     if is_not_empty "$1"
     then
@@ -6522,7 +6512,9 @@
 
   obj _TMP_STDIN rm_file_with_debug;
   eval ${_UNSET} mdfa_filespec;
+  eval ${_UNSET} mdfa_i;
   eval ${_UNSET} mdfa_name;
+  eval ${_UNSET} mdfa_names;
   eval "${return_ok}";
 } # main_do_fileargs()
 

Index: version.sh
===================================================================
RCS file: /cvsroot/groff/groff/contrib/groffer/version.sh,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- version.sh  26 Sep 2006 21:10:24 -0000      1.4
+++ version.sh  1 Oct 2006 12:27:01 -0000       1.5
@@ -32,8 +32,8 @@
 export _PROGRAM_VERSION;
 export _LAST_UPDATE;
 
-_PROGRAM_VERSION='0.9.27';
-_LAST_UPDATE='26 Sep 2006';
+_PROGRAM_VERSION='0.9.28';
+_LAST_UPDATE='1 Oct 2006';
 
 # this setting of the groff version is only used before make is run,
 # otherwise @VERSION@ will set it, see groffer.sh.




reply via email to

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