]> andersk Git - splint.git/blobdiff - src/general.c
Merged this branch with the one in the splint.sf.net repository.
[splint.git] / src / general.c
index 5a2e090a6daa7668ee502557655eeb5ecc2c500a..c6595dcfb44d8e888f7fec1ff5ea350db0cd3ac2 100644 (file)
@@ -192,8 +192,8 @@ char *FormatInt (int i)
 {
   char temp[255]; /* assume the integer has at most 254 digits */
   char *outs;
-  int sres = snprintf (temp, 255, "%i", i);
-  check (sres >= 0 && sres <= 255);
+
+  sprintf (temp, "%i", i);
   outs = (char *) dmalloc (sizeof (*outs) * (1 + strlen (temp)));
   strcpy (outs, temp);
 
@@ -485,3 +485,28 @@ bool mstring_equal (/*@null@*/ const char *s1, /*@null@*/ const char *s2)
     }
 }
 
+/*drl added 4-15-2002 intened to be called on file names*/
+bool cstring_isDotH (cstring name)
+{
+  char lastCh;
+
+  /* fix this function.*/
+  
+  char * waste = malloc(10); /*remove this line*/
+    
+  DPRINTF((message("cstrint_isDotH: %s ", name) ) );
+  
+  lastCh = cstring_lastChar(name);
+  // Fix this
+  
+  if ( (lastCh == 'h') || (lastCh == 'r') )
+    {
+      DPRINTF((message("cstrint_isDotH: %s is .h ", name) ) );
+      return TRUE;
+    }
+  else
+    {
+      DPRINTF((message("cstrint_isDotH: %s is not .h", name) ) );
+      return FALSE;
+    }
+}
This page took 0.026423 seconds and 4 git commands to generate.