Regular expression support. Argument passing by name option. New FML
[egate.git] / fml / fmlmem.c
index 3300b20..eabd8ad 100644 (file)
@@ -2,7 +2,11 @@
  * FML interpreter. Europagate, 1995
  *
  * $Log: fmlmem.c,v $
- * Revision 1.8  1995/02/23 08:32:05  adam
+ * Revision 1.9  1995/02/27 09:01:20  adam
+ * Regular expression support. Argument passing by name option. New FML
+ * function strlen.
+ *
+ * Revision 1.8  1995/02/23  08:32:05  adam
  * Changed header.
  *
  * Revision 1.6  1995/02/10  18:15:52  adam
@@ -188,6 +192,21 @@ void fml_atom_strx (struct fml_atom *a, char *str, int max)
     str[len+FML_ATOM_BUF-1] = '\0';
 }
 
+int fml_atom_len (struct fml_atom *a)
+{
+    int len = 0;
+    if (a)
+    {
+        while (a->next)
+        {
+            len += FML_ATOM_BUF;
+            a = a->next;
+        }
+        len += strlen (a->buf);
+    } 
+    return len;
+}
+
 int fml_atom_val (struct fml_atom *a)
 {
     static char arg[256];