]> andersk Git - splint.git/commitdiff
Integrated Herbert Martin Dietze's changes for OS/2.
authorevans1629 <evans1629>
Tue, 19 Feb 2002 00:52:41 +0000 (00:52 +0000)
committerevans1629 <evans1629>
Tue, 19 Feb 2002 00:52:41 +0000 (00:52 +0000)
Makefile.in
configure
configure.ac
src/Headers/splintMacros.nf
src/Makefile.in
src/context.c
src/lcllib.c
src/messageLog.c
src/mtDeclarationNode.c
src/osd.c
src/usymtab.c

index b48371b8d7e14a4f72a814018f02694503fec93b..1ab931ebd465e62f02d202cd33655b932c9a3828 100644 (file)
@@ -111,10 +111,10 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
        uninstall-info-recursive all-recursive install-data-recursive \
        install-exec-recursive installdirs-recursive install-recursive \
        uninstall-recursive check-recursive installcheck-recursive
-DIST_COMMON = README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
-       acinclude.m4 aclocal.m4 config.hin config/config.guess \
-       config/config.sub config/depcomp config/install-sh \
-       config/missing config/mkinstalldirs configure configure.ac
+DIST_COMMON = README ./stamp-h.in Makefile.am Makefile.in acinclude.m4 \
+       aclocal.m4 config.hin config/config.guess config/config.sub \
+       config/depcomp config/install-sh config/missing \
+       config/mkinstalldirs configure configure.ac
 DIST_SUBDIRS = $(SUBDIRS)
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-recursive
index 1fe90aa8124dae2bfb68008351f820b28d311e9e..f230cb57ace7cceb4f9787041bc32045af7cd94d 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by Autoconf 2.52 for Splint 3.0.1.6.
+# Generated by Autoconf 2.52 for Splint 3.0.1.7.
 #
 # Report bugs to <splint-bug@splint.org>.
 #
@@ -149,8 +149,8 @@ mandir='${prefix}/man'
 # Identity of this package.
 PACKAGE_NAME='Splint'
 PACKAGE_TARNAME='splint'
-PACKAGE_VERSION='3.0.1.6'
-PACKAGE_STRING='Splint 3.0.1.6'
+PACKAGE_VERSION='3.0.1.7'
+PACKAGE_STRING='Splint 3.0.1.7'
 PACKAGE_BUGREPORT='splint-bug@splint.org'
 
 ac_prev=
@@ -567,7 +567,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<EOF
-\`configure' configures Splint 3.0.1.6 to adapt to many kinds of systems.
+\`configure' configures Splint 3.0.1.7 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -634,7 +634,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Splint 3.0.1.6:";;
+     short | recursive ) echo "Configuration of Splint 3.0.1.7:";;
    esac
   cat <<\EOF
 
@@ -704,7 +704,7 @@ fi
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\EOF
-Splint configure 3.0.1.6
+Splint configure 3.0.1.7
 generated by GNU Autoconf 2.52
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -719,7 +719,7 @@ cat >&5 <<EOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by Splint $as_me 3.0.1.6, which was
+It was created by Splint $as_me 3.0.1.7, which was
 generated by GNU Autoconf 2.52.  Invocation command line was
 
   $ $0 $@
@@ -1299,7 +1299,7 @@ fi
 
 # Define the identity of the package.
 PACKAGE=splint
-VERSION=3.0.1.6
+VERSION=3.0.1.7
 
 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
 # the ones we care about.
@@ -3088,7 +3088,7 @@ cat >>confdefs.h <<EOF
 EOF
 
 # These used to be in herald.h
-LCL_PARSE_VERSION="Splint 3.0.1.6"
+LCL_PARSE_VERSION="Splint 3.0.1.7"
 
 cat >>confdefs.h <<EOF
 #define SPLINT_VERSION "$LCL_PARSE_VERSION --- `date +"%d %b %Y"`"
@@ -3385,7 +3385,7 @@ EOF
 
 cat >>$CONFIG_STATUS <<EOF
 ac_cs_version="\\
-Splint config.status 3.0.1.6
+Splint config.status 3.0.1.7
 configured by $0, generated by GNU Autoconf 2.52,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -3468,7 +3468,7 @@ cat >&5 << _ACEOF
 ## Running config.status.  ##
 ## ----------------------- ##
 
-This file was extended by $as_me (Splint 3.0.1.6) 2.52, executed with
+This file was extended by $as_me (Splint 3.0.1.7) 2.52, executed with
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
   CONFIG_LINKS    = $CONFIG_LINKS
index 5b4b8b32f87b9c42f96583fd303c469f6f16bac6..40c2f209031896ee07508060f2ce3dca034b172d 100644 (file)
@@ -1,7 +1,7 @@
 dnl Process with autoconf to create a configure script  -*- Autoconf -*-
 AC_PREREQ(2.50)
 
-AC_INIT([Splint], [3.0.1.6], [splint-bug@splint.org], [splint])
+AC_INIT([Splint], [3.0.1.7], [splint-bug@splint.org], [splint])
 
 dnl This MUST precede any other macro
 AC_CONFIG_AUX_DIR([config])
index 200a06f9f437e13c8360a90cef63e514ba37cf83..f441a1d0a952142564de02152b481f1643e9432f 100644 (file)
        (void)printf arg; printf("\n"); /*@=formatconst@*/ /*@=mustfree@*/ /*@=null@*/ (void) fflush (stdout); \
        } while (FALSE)
 
+/*
+** DPRINTF does nothing, just a marker to save TPRINTF's
+*/
 
-# if DEBUGPRINT
-/*@notfunction@*/
-# define DPRINTF(s) /*@access cstring@*/ TPRINTF(s) /*@noaccess cstring@*/
-# else
 /*@notfunction@*/
 # define DPRINTF(s)   
-# endif
 
 /*@notfunction@*/
 # define INTCOMPARERETURN(x,y) \
index 7cd206af97b63edd53a777fd1373cfab14cbd8a3..7f4070a44b00fed42352c52212bff6293afb1e32 100644 (file)
@@ -581,7 +581,7 @@ CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 CFLAGS = @CFLAGS@
 DIST_SOURCES = $(lcl_SOURCES) $(splint_SOURCES)
-DIST_COMMON = Makefile.am Makefile.in
+DIST_COMMON = ChangeLog Makefile.am Makefile.in
 SOURCES = $(lcl_SOURCES) $(splint_SOURCES)
 
 all: $(BUILT_SOURCES)
index d91d0ab09ad495fab2ca263738194c9d3feb8c89..d4755345ccc5db2e22eab7c3d4c173a194cfbc01 100644 (file)
@@ -1745,14 +1745,14 @@ void context_enterTrueClause (exprNode e)
 
 void context_enterSwitch (exprNode e)
 {
-  
+  DPRINTF (("Enter switch: %s", exprNode_unparse (e)));
   usymtab_switchBranch (e);
   context_enterCondClauseAux (SWITCHCLAUSE);
 }
 
 void context_exitSwitch (exprNode e, bool allpaths)
 {
-    usymtab_exitSwitch (e, allpaths);
+  usymtab_exitSwitch (e, allpaths);
   
   while (clause_isCase (clauseStack_top (gc.clauses)))
     {
index bd157fcfff9840060126b85587ab72030d489427..04e2a34d43d00e81a29a52b617739ce75e8ced15 100644 (file)
 **
 */
 
+/*
+ * Herbert 02/17/2002:
+ * - fixed the recognition of Posix headers for OS/2
+ */
+
 # include "splintMacros.nf"
 # include "llbasic.h"
 # include "osd.h"
@@ -124,7 +129,16 @@ lcllib_isSkipHeader (cstring sname)
 
   /*@access cstring@*/
   llassert (cstring_isDefined (xname));
+# if defined (OS2)
+  {
+    /* Posixlibs use forward slashes, so we use them here, too */
+    cstring_replaceAll (xname, '\\', '/');
+    libname = strrchr (xname, '/');
+    DPRINTF (("libname: %s", libname));
+  }
+# else
   libname = strrchr (xname, CONNECTCHAR);
+# endif
   matchname = libname;
 
   if (libname == NULL) 
@@ -170,10 +184,15 @@ lcllib_isSkipHeader (cstring sname)
 
   for (i = 0; i < NUMPOSIXLIBS; i++)
     {
-      if (strchr (posixlibs[i], CONNECTCHAR) != NULL)
+      if (strchr (posixlibs[i], CONNECTCHAR) != NULL
+# if defined (OS2)
+         || strchr (posixlibs[i], ALTCONNECTCHAR) != NULL
+# endif
+         )
        {
          char *ptr;
          
+         DPRINTF (("xname: %s, posix: %s", xname, posixlibs[i]));
          if ((ptr = strstr (xname, posixlibs[i])) != NULL) 
            {
              if (ptr[strlen (posixlibs[i])] == '\0')
index 4bc12d56b5eb81b870efe8d153d60919fbd513ee..15254925631cf653ca6ea7b3d392870850bea886 100644 (file)
@@ -159,9 +159,6 @@ bool messageLog_add (messageLog s, fileloc fl, cstring mess)
     {
       if (msgentry_equal (msg, s->elements[ind + 1]))
        {
-         DPRINTF (("Messages equivalent: %s / %s",
-                   msgentry_unparse (msg),
-                   msgentry_unparse (s->elements[ind+1])));
          msgentry_free (msg);
          return FALSE;
        }
index 19c4d8f226c7d7472a80cf7944f5d33111c78ad2..9ac26f1ffd55ae2b8d31bf187ad44cb49b24a1c7 100644 (file)
@@ -378,10 +378,6 @@ extern void mtDeclarationNode_process (mtDeclarationNode node, bool isglobal)
        } end_mtLoseReferenceList_elements ;
     }
   
-  /*@-usedef@*/
-  DPRINTF (("metastate: %s", metaStateInfo_unparse (msinfo)));
-  /*@=usedef@*/
-
   tmerge = stateCombinationTable_create (nvalues);
 
   /* Default merge is to make all incompatible mergers errors. */
index 5a352667ee239433d4b7ff41259a50fa6741b9c8..17f5a0f28eb064099dda8bae526c8a3b9cf1e67c 100644 (file)
--- a/src/osd.c
+++ b/src/osd.c
@@ -37,6 +37,8 @@
  * Herbert 06/12/2000:
  * - added OS/2 specific includes before osd_getPid()
  * - handle files like in WIN32 for OS/2 in osd_fileExists()
+ * Herbert 02/17/2002:
+ * - added OS/2 support to absolute file names
  */
 
 /*@-allmacros*/
 # include <sys/stat.h>
 /* Fix suggested by Lars Rasmussen */
 # include <errno.h>
-# ifdef WIN32
-# include <direct.h>
-# define getcwd _getcwd
-# endif
 
 /* POSIX platforms should defined getpid in unistd.h */
 # if defined (WIN32) || (defined(OS2) && defined(__IBMC__))
 # include <process.h>
+# include <direct.h>
+# define getcwd _getcwd
 # else
 # include <unistd.h>
 # endif
@@ -776,7 +776,7 @@ osd_dirAbsolute (char *str)
   
   DPRINTF (("Absolute for: %s", str));
 
-# ifdef WIN32
+# if defined (WIN32) || defined (OS2) || defined (MSDOS)
   if (strlen (str) > 1 && str[1] == ':')
     {
       /*
@@ -861,7 +861,7 @@ static /*@only@*/ cstring osd_cwd = cstring_undefined;
 
 static void osd_setWorkingDirectory (void)
 {
-# ifdef UNIX
+# if defined (UNIX) || defined (OS2)
   char *buf = dmalloc (sizeof (*buf) * MAXPATHLEN);
   char *cwd = getcwd (buf, MAXPATHLEN);
 
@@ -890,7 +890,7 @@ void osd_initMod (void)
 
 cstring osd_absolutePath (cstring cwd, cstring filename)
 {
-# ifdef UNIX
+# if defined (UNIX) || defined (OS2)
   /* Setup the current working directory as needed.  */
   cstring cwd2 = cstring_isDefined (cwd) ? cwd : osd_cwd;
   char *abs_buffer;
@@ -911,7 +911,11 @@ cstring osd_absolutePath (cstring cwd, cstring filename)
   {
     const char *src_p;
 
-    if (filename[0] != '/')
+    if (!osd_isConnectChar (filename[0])
+# ifdef OS2
+       && !(isalpha (filename[0]) && filename[1] == ':')
+# endif
+       )
       {
         src_p = cwd2;
 
@@ -920,7 +924,7 @@ cstring osd_absolutePath (cstring cwd, cstring filename)
            continue;
          }
 
-        *(endp-1) = '/';                        /* overwrite null */
+        *(endp-1) = CONNECTCHAR;                        /* overwrite null */
       }
 
     src_p = filename;
@@ -946,29 +950,29 @@ cstring osd_absolutePath (cstring cwd, cstring filename)
        {
          break;
        }
-      else if (inp[0] == '/' && outp[-1] == '/')
+      else if (osd_isConnectChar (inp[0]) && osd_isConnectChar (outp[-1]))
        {
          inp++;
          continue;
        }
-      else if (inp[0] == '.' && outp[-1] == '/')
+      else if (inp[0] == '.' && osd_isConnectChar (outp[-1]))
        {
          if (inp[1] == '\0')
            {
              break;
            }
-         else if (inp[1] == '/')
+         else if (osd_isConnectChar (inp[1]))
            {
              inp += 2;
              continue;
            }
          else if ((inp[1] == '.') 
-                  && (inp[2] == '\0' || inp[2] == '/'))
+                  && (inp[2] == '\0' || osd_isConnectChar (inp[2])))
            {
-             inp += (inp[2] == '/') ? 3 : 2;
+             inp += (osd_isConnectChar (inp[2])) ? 3 : 2;
              outp -= 2;
        
-             while (outp >= abs_buffer && *outp != '/')
+             while (outp >= abs_buffer && !osd_isConnectChar (*outp))
                {
                  outp--;
                }
@@ -1002,7 +1006,7 @@ cstring osd_absolutePath (cstring cwd, cstring filename)
      the last character of the returned string is *not* a slash.  */
   
   *outp = '\0';
-  if (outp[-1] == '/')
+  if (osd_isConnectChar (outp[-1]))
     *--outp  = '\0';
   
   /*@noaccess cstring@*/
@@ -1029,7 +1033,7 @@ cstring osd_absolutePath (cstring cwd, cstring filename)
 
 cstring osd_outputPath (cstring filename)
 {
-# ifdef UNIX
+# if defined (UNIX) || defined (OS2)
   char *rel_buffer;
   char *rel_buf_p;
   cstring cwd_p = osd_cwd;
@@ -1051,7 +1055,7 @@ cstring osd_outputPath (cstring filename)
       path_p++;
     }
   
-  if ((*cwd_p == '\0') && (*path_p == '\0' || *path_p == '/'))  /* whole pwd matched */
+  if ((*cwd_p == '\0') && (*path_p == '\0' || osd_isConnectChar (*path_p)))  /* whole pwd matched */
     {
       if (*path_p == '\0')             /* input *is* the current path! */
        return cstring_makeLiteral (".");
@@ -1072,7 +1076,7 @@ cstring osd_outputPath (cstring filename)
         {
           --cwd_p;
           --path_p;
-          while (*cwd_p != '/')         /* backup to last slash */
+          while (!osd_isConnectChar (*cwd_p))         /* backup to last slash */
             {
               --cwd_p;
               --path_p;
@@ -1085,7 +1089,7 @@ cstring osd_outputPath (cstring filename)
       /* Find out how many directory levels in cwd were *not* matched.  */
       while (*cwd_p != '\0')
        {
-         if (*cwd_p++ == '/')
+         if (osd_isConnectChar (*cwd_p++))
            unmatched_slash_count++;
        }
       
@@ -1110,7 +1114,7 @@ cstring osd_outputPath (cstring filename)
 
           *rel_buf_p++ = '.';
           *rel_buf_p++ = '.';
-          *rel_buf_p++ = '/';
+          *rel_buf_p++ = CONNECTCHAR;
         }
       
       /* Then tack on the unmatched part of the desired file's name.  */
@@ -1127,7 +1131,7 @@ cstring osd_outputPath (cstring filename)
       /*@=usereleased@*/ /*@i523! shouldn't need these */
       --rel_buf_p;
 
-      if (*(rel_buf_p-1) == '/')
+      if (osd_isConnectChar (*(rel_buf_p-1)))
         *--rel_buf_p = '\0';
 
       return rel_buffer;
index 9ab042699c0a299fbf0fe5751d7c2b5af0844044..3b60b2195453dfc9024739353985a0f7729e0b62 100644 (file)
@@ -758,8 +758,6 @@ usymtab_supEntryAux (/*@notnull@*/ usymtab st,
     }
   }
 
-  DPRINTF (("Using symtab: %s", usymtab_unparseLocalAux (st)));
-
   eindex = usymtab_getIndex (st, ename);
       
   if (eindex != NOT_FOUND)
@@ -2586,6 +2584,8 @@ usymtab_newCase (/*@unused@*/ exprNode pred, exprNode last)
   bool mustReturn = usymtab_mustEscape (utab);
   usymtab stab = utab;
 
+  DPRINTF (("New case!"));
+
   /*
   ** Find last case (or outer switch)
   */
@@ -2595,9 +2595,7 @@ usymtab_newCase (/*@unused@*/ exprNode pred, exprNode last)
       stab = stab->env;
       llassert (stab != GLOBAL_ENV);
     }
-
-  /* ??? */
-
+  
   while (stab->kind == US_CBRANCH)
     {
       stab = stab->env;
This page took 0.071596 seconds and 5 git commands to generate.