[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/geas/lib/classdefs classdata.c classdata.h...
From: |
Neil Tiffin |
Subject: |
gnue/geas/lib/classdefs classdata.c classdata.h... |
Date: |
Sun, 27 May 2001 16:00:26 -0700 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Neil Tiffin <address@hidden> 01/05/27 16:00:26
Modified files:
geas/lib/classdefs: classdata.c classdata.h gcdparser.c
gcdparser.h yparser.y
Log message:
Add structures for help files [T190]. Add boolean type and complete
[T162].
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/lib/classdefs/classdata.c.diff?cvsroot=OldCVS&tr1=1.53&tr2=1.54&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/lib/classdefs/classdata.h.diff?cvsroot=OldCVS&tr1=1.28&tr2=1.29&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/lib/classdefs/gcdparser.c.diff?cvsroot=OldCVS&tr1=1.35&tr2=1.36&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/lib/classdefs/gcdparser.h.diff?cvsroot=OldCVS&tr1=1.24&tr2=1.25&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/lib/classdefs/yparser.y.diff?cvsroot=OldCVS&tr1=1.28&tr2=1.29&r1=text&r2=text
Patches:
Index: gnue/geas/lib/classdefs/classdata.c
diff -u gnue/geas/lib/classdefs/classdata.c:1.53
gnue/geas/lib/classdefs/classdata.c:1.54
--- gnue/geas/lib/classdefs/classdata.c:1.53 Sat May 26 15:13:57 2001
+++ gnue/geas/lib/classdefs/classdata.c Sun May 27 16:00:26 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.53 2001/05/26 22:13:57 ntiffin Exp $
+ $Id: classdata.c,v 1.54 2001/05/27 23:00:26 ntiffin Exp $
*/
@@ -350,6 +350,8 @@
return ("int32");
case DT_int64:
return ("int64");
+ case DT_boolean:
+ return ("boolean");
case DT_text:
return ("text");
case DT_date:
@@ -393,6 +395,7 @@
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, "boolean") == 0) return (DT_boolean);
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);
Index: gnue/geas/lib/classdefs/classdata.h
diff -u gnue/geas/lib/classdefs/classdata.h:1.28
gnue/geas/lib/classdefs/classdata.h:1.29
--- gnue/geas/lib/classdefs/classdata.h:1.28 Sat May 26 15:13:57 2001
+++ gnue/geas/lib/classdefs/classdata.h Sun May 27 16:00:26 2001
@@ -125,6 +125,7 @@
DT_int16, /* 16 bit integer */
DT_int32, /* 32 bit integer */
DT_int64, /* 64 bit integer */
+ DT_boolean, /* boolean */
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/gcdparser.c
diff -u gnue/geas/lib/classdefs/gcdparser.c:1.35
gnue/geas/lib/classdefs/gcdparser.c:1.36
--- gnue/geas/lib/classdefs/gcdparser.c:1.35 Sat May 26 15:13:57 2001
+++ gnue/geas/lib/classdefs/gcdparser.c Sun May 27 16:00:26 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: gcdparser.c,v 1.35 2001/05/26 22:13:57 ntiffin Exp $
+ $Id: gcdparser.c,v 1.36 2001/05/27 23:00:26 ntiffin Exp $
*/
@@ -233,6 +233,40 @@
/* TODO - there must be something to do here, neilt */
}
+/* ------------------------------------------------------------------------- *\
+ * Allocate and make defaults for help structure.
+\* ------------------------------------------------------------------------- */
+struct _odl_help *
+alloc_odl_help ()
+{
+ struct _odl_help *help_entry = g_new0 (struct _odl_help, 1);
+ g_assert (help_entry != NULL);
+ if (help_entry)
+ {
+ help_entry->module = NULL;
+ help_entry->class = NULL;
+ help_entry->field = NULL;
+ help_entry->fullname = NULL;
+ help_entry->language_code = NULL;
+ help_entry->dialect_code = NULL;
+ help_entry->help_text = NULL;
+ help_entry->help_keywords = NULL;
+ help_entry->tool_tip = NULL;
+ help_entry->label = NULL;
+ help_entry->default_text = NULL;
+ }
+ return help_entry;
+}
+
+/* ------------------------------------------------------------------------- *\
+ *
+\* ------------------------------------------------------------------------- */
+void
+free_odl_help (struct _odl_item *help)
+{
+ g_assert( help != NULL);
+ /* TODO */
+}
/* ------------------------------------------------------------------------- *\
*
Index: gnue/geas/lib/classdefs/gcdparser.h
diff -u gnue/geas/lib/classdefs/gcdparser.h:1.24
gnue/geas/lib/classdefs/gcdparser.h:1.25
--- gnue/geas/lib/classdefs/gcdparser.h:1.24 Thu May 24 18:06:14 2001
+++ gnue/geas/lib/classdefs/gcdparser.h Sun May 27 16:00:26 2001
@@ -21,7 +21,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: gcdparser.h,v 1.24 2001/05/25 01:06:14 ntiffin Exp $
+ $Id: gcdparser.h,v 1.25 2001/05/27 23:00:26 ntiffin Exp $
*/
@@ -125,6 +125,7 @@
struct _odl_tree
{
struct _odl_container *root;
+ GList * help_list;
};
/** \struct _odl_datatype
@@ -162,6 +163,25 @@
}
_odl_index;
+/** \struct _odl_help
+ * \brief For saving the help text in GCD files.
+ * This structure mirrors language::help GCD file.
+ */
+struct _odl_help
+{
+ struct _odl_base * module;
+ struct _odl_base * class;
+ struct _odl_base * field;
+ char * fullname; /* fully qualified name to field this help represents */
+ char * language_code;
+ char * dialect_code;
+ char * help_text;
+ char * help_keywords;
+ char * tool_tip;
+ char * label;
+ char * default_text;
+};
+
/** \brief Create new ODL data type.
* \param unsignedval ?.
* \param name Name of datatype.
@@ -185,6 +205,8 @@
void free_odl_item (struct _odl_item *item);
struct _odl_argument *alloc_odl_argument ();
void free_odl_argument (struct _odl_argument *argument);
+struct _odl_help *alloc_odl_help ();
+void free_odl_help (struct _odl_item *help);
void free_odl_unknown_item (struct _odl_base *base);
void init_odl_base (struct _odl_base *base);
void free_odl_base (struct _odl_base *base);
Index: gnue/geas/lib/classdefs/yparser.y
diff -u gnue/geas/lib/classdefs/yparser.y:1.28
gnue/geas/lib/classdefs/yparser.y:1.29
--- gnue/geas/lib/classdefs/yparser.y:1.28 Sat May 26 15:13:57 2001
+++ gnue/geas/lib/classdefs/yparser.y Sun May 27 16:00:26 2001
@@ -43,6 +43,7 @@
signed long int integer;
unsigned long int uint;
gint64 int64;
+ gboolean boolean;
double floating;
gboolean bool_value;
struct _odl_argument *arg;