commit-gnue
[Top][All Lists]
Advanced

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

gnue/geas lib/classdefs/classdata.c lib/classde...


From: Neil Tiffin
Subject: gnue/geas lib/classdefs/classdata.c lib/classde...
Date: Fri, 25 May 2001 12:34:53 -0700

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Neil Tiffin <address@hidden>    01/05/25 12:34:52

Modified files:
        geas/lib/classdefs: classdata.c classdata.h yparser.y 
        geas/tools     : gcdverifier.c 

Log message:
        Add int16, int32, and int64 bit types to parser.  Stuff must be added 
in geas-server before they work though.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/lib/classdefs/classdata.c.diff?cvsroot=OldCVS&tr1=1.49&tr2=1.50&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/lib/classdefs/classdata.h.diff?cvsroot=OldCVS&tr1=1.26&tr2=1.27&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/lib/classdefs/yparser.y.diff?cvsroot=OldCVS&tr1=1.26&tr2=1.27&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/tools/gcdverifier.c.diff?cvsroot=OldCVS&tr1=1.18&tr2=1.19&r1=text&r2=text

Patches:
Index: gnue/geas/lib/classdefs/classdata.c
diff -u gnue/geas/lib/classdefs/classdata.c:1.49 
gnue/geas/lib/classdefs/classdata.c:1.50
--- gnue/geas/lib/classdefs/classdata.c:1.49    Thu May 24 18:06:14 2001
+++ gnue/geas/lib/classdefs/classdata.c Fri May 25 12:34:52 2001
@@ -22,7 +22,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
 
-   $Id: classdata.c,v 1.49 2001/05/25 01:06:14 ntiffin Exp $
+   $Id: classdata.c,v 1.50 2001/05/25 19:34:52 ntiffin Exp $
    
 */
 
@@ -344,6 +344,12 @@
       return ("char");
     case DT_int:
       return ("int");
+    case DT_int16:
+      return ("int16");
+    case DT_int32:
+      return ("int32");
+    case DT_int64:
+      return ("int64");
     case DT_text:
       return ("text");
     case DT_date:
@@ -382,34 +388,23 @@
 #ifdef DEBUG
   assert (name != NULL);
 #endif
-  if (g_strcasecmp (name, "char") == 0)
-    return (DT_char);
-  if (g_strcasecmp (name, "int") == 0)
-    return (DT_int);
-  if (g_strcasecmp (name, "text") == 0)
-    return (DT_text);
-  if (g_strcasecmp (name, "class") == 0)
-    return (DT_class);
-  if (g_strcasecmp (name, "date") == 0)
-    return (DT_date);
-  if (g_strcasecmp (name, "time") == 0)
-    return (DT_time);
-  if (g_strcasecmp (name, "datetime") == 0)
-    return (DT_datetime);
-  if (g_strcasecmp (name, "bool") == 0)
-    return (DT_bool);
-  if (g_strcasecmp (name, "float") == 0)
-    return (DT_float);
-  if (g_strcasecmp (name, "void") == 0)
-    return (DT_void);
-  if (g_strcasecmp (name, "object") == 0)
-    return (DT_object);
-  if (g_strcasecmp (name, "enum") == 0)
-    return (DT_enum);
-  if (g_strcasecmp (name, "unsignedint") == 0)
-    return (DT_unsignedint);
-  if (g_strcasecmp (name, "type") == 0)
-    return (DT_type);
+  if (g_strcasecmp (name, "char") == 0) return (DT_char);
+  if (g_strcasecmp (name, "int") == 0) return (DT_int);
+  if (g_strcasecmp (name, "int16") == 0) return (DT_int16);
+  if (g_strcasecmp (name, "int32") == 0) return (DT_int32);
+  if (g_strcasecmp (name, "int64") == 0) return (DT_int64);
+  if (g_strcasecmp (name, "text") == 0) return (DT_text);
+  if (g_strcasecmp (name, "class") == 0) return (DT_class);
+  if (g_strcasecmp (name, "date") == 0) return (DT_date);
+  if (g_strcasecmp (name, "time") == 0) return (DT_time);
+  if (g_strcasecmp (name, "datetime") == 0) return (DT_datetime);
+  if (g_strcasecmp (name, "bool") == 0) return (DT_bool);
+  if (g_strcasecmp (name, "float") == 0) return (DT_float);
+  if (g_strcasecmp (name, "void") == 0) return (DT_void);
+  if (g_strcasecmp (name, "object") == 0) return (DT_object);
+  if (g_strcasecmp (name, "enum") == 0) return (DT_enum);
+  if (g_strcasecmp (name, "unsignedint") == 0) return (DT_unsignedint);
+  if (g_strcasecmp (name, "type") == 0) return (DT_type);
   return (DT_unknown);
 }
 
Index: gnue/geas/lib/classdefs/classdata.h
diff -u gnue/geas/lib/classdefs/classdata.h:1.26 
gnue/geas/lib/classdefs/classdata.h:1.27
--- gnue/geas/lib/classdefs/classdata.h:1.26    Thu May 24 11:59:01 2001
+++ gnue/geas/lib/classdefs/classdata.h Fri May 25 12:34:52 2001
@@ -121,7 +121,10 @@
 {
    DT_unknown = 0,
    DT_char, /* Character */
-   DT_int, /* Integer */
+   DT_int, /* Integer same as DT_int32 */
+   DT_int16, /* 16 bit integer */
+   DT_int32, /* 32 bit integer */
+   DT_int64, /* 64 bit integer */
    DT_text, /* Arbitrary length  */
    DT_class, /* placeholder - must also store the name of the class */
    DT_date, /* YYYY-MM-DD */
Index: gnue/geas/lib/classdefs/yparser.y
diff -u gnue/geas/lib/classdefs/yparser.y:1.26 
gnue/geas/lib/classdefs/yparser.y:1.27
--- gnue/geas/lib/classdefs/yparser.y:1.26      Thu May 24 18:05:23 2001
+++ gnue/geas/lib/classdefs/yparser.y   Fri May 25 12:34:52 2001
@@ -42,6 +42,7 @@
     char                  *string;
     signed long int        integer;
     unsigned long int      uint;
+    gint64                 int64;
     double                 floating;
     gboolean               bool_value;
     struct _odl_argument   *arg;
Index: gnue/geas/tools/gcdverifier.c
diff -u gnue/geas/tools/gcdverifier.c:1.18 gnue/geas/tools/gcdverifier.c:1.19
--- gnue/geas/tools/gcdverifier.c:1.18  Thu May 24 18:06:14 2001
+++ gnue/geas/tools/gcdverifier.c       Fri May 25 12:34:52 2001
@@ -20,7 +20,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
  
-   $Id: gcdverifier.c,v 1.18 2001/05/25 01:06:14 ntiffin Exp $
+   $Id: gcdverifier.c,v 1.19 2001/05/25 19:34:52 ntiffin Exp $
 */
 
 #include <glib.h>
@@ -141,7 +141,7 @@
           else if (strcmp (argv[i], "--version") == 0)
             {
               GString *revision;
-              revision = g_string_new ("$Revision: 1.18 $");
+              revision = g_string_new ("$Revision: 1.19 $");
               if (revision->len > 14)
                 {
                   revision = g_string_erase (revision, 0, 11);  /* remove the 
'$Revsion:' part */
@@ -173,6 +173,10 @@
       if (number_entries > 0)
         {
           /* load the files that have been tagged */
+          if (G_HAVE_GINT64 != 1)
+            {
+              printf("**** Platform does not support 64 bit integers.\n");
+            }
           t = odl_load_files (fl, NULL);
           if (t != NULL)
             {



reply via email to

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