commit-gnue
[Top][All Lists]
Advanced

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

gnue geas/lib/classdefs/classdata.c geas/src/ge...


From: Neil Tiffin
Subject: gnue geas/lib/classdefs/classdata.c geas/src/ge...
Date: Tue, 25 Sep 2001 15:48:44 -0400

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Neil Tiffin <address@hidden>    01/09/25 15:48:44

Modified files:
        geas/lib/classdefs: classdata.c 
        geas/src       : geas-server.c 
        geas/src/methods: methods_python.c 
        geas/tools     : gcdverifier.c 
        gnue-config    : README 
Added files:
        geas/examples/businessobjects/methods: addrbook.geas.py 
                                               test.geas.py 
        gnue-config/accounting/ar/methods: ar_header.geas.py 
        gnue-config/accounting/gl/methods: gl_acct.geas.py 
        gnue-config/base/currency/methods: currency.geas.py 
        gnue-config/base/units/methods: conversion.geas.py 
        gnue-config/test: gcd_pass_test.geas.py 
Removed files:
        geas/examples/businessobjects/methods: addrbook.py test.py 
        gnue-config/accounting/ar/methods: ar_header.py 
        gnue-config/accounting/gl/methods: gl_acct.py 
        gnue-config/base/currency/methods: currency.py 
        gnue-config/base/units/methods: conversion.py 
        gnue-config/test: gcd_pass_test.py 

Log message:
        Change filename for python methods from *.py to *.geas.py.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/examples/businessobjects/methods/addrbook.geas.py?cvsroot=OldCVS&rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/examples/businessobjects/methods/test.geas.py?cvsroot=OldCVS&rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/lib/classdefs/classdata.c.diff?cvsroot=OldCVS&tr1=1.71&tr2=1.72&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/geas-server.c.diff?cvsroot=OldCVS&tr1=1.109&tr2=1.110&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/methods/methods_python.c.diff?cvsroot=OldCVS&tr1=1.17&tr2=1.18&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/tools/gcdverifier.c.diff?cvsroot=OldCVS&tr1=1.26&tr2=1.27&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-config/README.diff?cvsroot=OldCVS&tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-config/accounting/ar/methods/ar_header.geas.py?cvsroot=OldCVS&rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-config/accounting/gl/methods/gl_acct.geas.py?cvsroot=OldCVS&rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-config/base/currency/methods/currency.geas.py?cvsroot=OldCVS&rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-config/base/units/methods/conversion.geas.py?cvsroot=OldCVS&rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-config/test/gcd_pass_test.geas.py?cvsroot=OldCVS&rev=1.1

Patches:
Index: gnue/geas/lib/classdefs/classdata.c
diff -u gnue/geas/lib/classdefs/classdata.c:1.71 
gnue/geas/lib/classdefs/classdata.c:1.72
--- gnue/geas/lib/classdefs/classdata.c:1.71    Tue Sep 25 09:56:42 2001
+++ gnue/geas/lib/classdefs/classdata.c Tue Sep 25 15:48:43 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.71 2001/09/25 13:56:42 ntiffin Exp $
+   $Id: classdata.c,v 1.72 2001/09/25 19:48:43 ntiffin Exp $
    
 */
 
@@ -2775,8 +2775,7 @@
  *  files that match the extension.
  *
  * name - beginning directory name
- * ext  - the extension to search for "gcd" or "py" no dot required
- *        although the dot is assumed.
+ * ext  - the extension to search for ".gcd" or ".py".
 \* ------------------------------------------------------------------------- */
 odl_filenamelist *
 odl_get_files_from_dir (odl_filenamelist * filelist, const char *name, const 
char *ext)
@@ -2935,11 +2934,10 @@
      printf( "ext     : '%s' (%d)\n" , ext      , strlen(ext) ); printf( *
      "compare(%s,%s)\n" , &filename[flen - elen], ext ); */
 
-  if ((elen + 1) > flen)
-    return (FALSE);
-  if (g_strcasecmp (&filename[flen - elen], ext) == 0 &&
-      filename[flen - elen - 1] == '.')
-    return (TRUE);
-
+  if (g_strcasecmp (&filename[flen - elen], ext) == 0 && (elen < flen))
+    {
+      /* && filename[flen - elen - 1] == '.') */
+      return (TRUE);
+    }
   return (FALSE);
 }
Index: gnue/geas/src/geas-server.c
diff -u gnue/geas/src/geas-server.c:1.109 gnue/geas/src/geas-server.c:1.110
--- gnue/geas/src/geas-server.c:1.109   Sun Sep 23 08:17:51 2001
+++ gnue/geas/src/geas-server.c Tue Sep 25 15:48:43 2001
@@ -19,7 +19,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: geas-server.c,v 1.109 2001/09/23 12:17:51 ntiffin Exp $
+  $Id: geas-server.c,v 1.110 2001/09/25 19:48:43 ntiffin Exp $
  
 */
 
@@ -1549,7 +1549,7 @@
       exit (-1);
     }
 
-  fl = odl_get_files_from_dir (fl, name, "gcd");
+  fl = odl_get_files_from_dir (fl, name, ".gcd");
 
   if (!fl)
     {
Index: gnue/geas/src/methods/methods_python.c
diff -u gnue/geas/src/methods/methods_python.c:1.17 
gnue/geas/src/methods/methods_python.c:1.18
--- gnue/geas/src/methods/methods_python.c:1.17 Tue Sep 25 10:51:11 2001
+++ gnue/geas/src/methods/methods_python.c      Tue Sep 25 15:48:43 2001
@@ -19,7 +19,7 @@
   along with GEAS; if not, write to the Free Software Foundation, Inc.,
   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-  $Id: methods_python.c,v 1.17 2001/09/25 14:51:11 ntiffin Exp $
+  $Id: methods_python.c,v 1.18 2001/09/25 19:48:43 ntiffin Exp $
 */
 
 /*
@@ -273,7 +273,7 @@
       return (FALSE);
     }
   /* get a list of all files with .py extension */
-  fl = odl_get_files_from_dir (fl, dirname, "py");
+  fl = odl_get_files_from_dir (fl, dirname, ".geas.py");
   filename_list = (GList *) fl;
   while (filename_list)
     {
Index: gnue/geas/tools/gcdverifier.c
diff -u gnue/geas/tools/gcdverifier.c:1.26 gnue/geas/tools/gcdverifier.c:1.27
--- gnue/geas/tools/gcdverifier.c:1.26  Sun Sep 23 08:17:51 2001
+++ gnue/geas/tools/gcdverifier.c       Tue Sep 25 15:48:44 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.26 2001/09/23 12:17:51 ntiffin Exp $
+   $Id: gcdverifier.c,v 1.27 2001/09/25 19:48:44 ntiffin Exp $
 */
 
 #include <glib.h>
@@ -74,7 +74,7 @@
           else if (strcmp (argv[i], "--version") == 0)
             {
               GString *revision;
-              revision = g_string_new ("$Revision: 1.26 $");
+              revision = g_string_new ("$Revision: 1.27 $");
               
               if (revision->len > 14)
                 {
@@ -91,7 +91,7 @@
                 ("There is NO warranty; not even for MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.\n");
               g_string_free (revision, TRUE);
             }
-          else if (odl_is_extension (argv[i], "gcd"))       /* has an 
extension of '.gcd. */
+          else if (odl_is_extension (argv[i], ".gcd"))       /* has an 
extension of '.gcd. */
             {
               number_entries++;
               fl = odl_filenamelist_add (fl, argv[i]);
@@ -101,7 +101,7 @@
               /* must be a directory */
               /* means directories with .gcd at the end will not work */
               number_entries++;
-              fl = odl_get_files_from_dir (fl, argv[i], "gcd");
+              fl = odl_get_files_from_dir (fl, argv[i], ".gcd");
             }
         }
       if (number_entries > 0)
Index: gnue/gnue-config/README
diff -u gnue/gnue-config/README:1.7 gnue/gnue-config/README:1.8
--- gnue/gnue-config/README:1.7 Sun Sep 23 10:18:11 2001
+++ gnue/gnue-config/README     Tue Sep 25 15:48:44 2001
@@ -6,7 +6,7 @@
 #
 # This file originally written by Neil Tiffin (address@hidden).
 #
-# $Id: README,v 1.7 2001/09/23 14:18:11 ntiffin Exp $
+# $Id: README,v 1.8 2001/09/25 19:48:44 ntiffin Exp $
 #
 
 gnue-config Directory
@@ -14,9 +14,11 @@
 This directory contains the various files used to configure GNUe to
 perform as enterprise software.
 
-See note below for converting .geas files to .sql.  All .py files
+See note below for converting .geas files to .sql.  All *.geas.py files
 are loaded as class methods (business rules).  If you don't wish
-this to happen don't put .py files in this directory tree.
+this to happen don't put *.geas.py files in this directory tree. Simply
+calling a file *.py should not cause a problem as geas now checks for
+the file name to end with ".geas.py".
 
 Directory Structure
 ===================
@@ -44,7 +46,7 @@
 
                    
 Each module-name folder contains the following folders:
-    methods - directory for method files.  All .py files are loaded
+    methods - directory for method files.  All *.geas.py files are loaded
                into GEAS if python methods are selected.
     reports - contains report definitions (.grd)
     forms - contains form definitions (.gfd)



reply via email to

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