src/lib/asParse.c 1.8
1.8 2009/04/17 23:22:37 kent
Adding asTypesIsInt and asTypesIsFloating
Index: src/lib/asParse.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/asParse.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -b -B -U 4 -r1.7 -r1.8
--- src/lib/asParse.c 17 Mar 2009 18:25:47 -0000 1.7
+++ src/lib/asParse.c 17 Apr 2009 23:22:37 -0000 1.8
@@ -249,8 +249,39 @@
return objList;
}
+boolean asTypesIsInt(enum asTypes type)
+/* Return TRUE if it's any integer type - short, long, unsigned, etc. */
+{
+switch (type)
+ {
+ case t_int:
+ case t_uint:
+ case t_short:
+ case t_ushort:
+ case t_byte:
+ case t_ubyte:
+ case t_off:
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
+
+boolean asTypesIsFloating(enum asTypes type)
+/* Return TRUE if it's any floating point type - float or double. */
+{
+switch (type)
+ {
+ case t_float:
+ case t_double:
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
+
static struct asObject *asParseLineFile(struct lineFile *lf)
/* Parse open line file. Closes lf as a side effect. */
{
struct tokenizer *tkz = tokenizerOnLineFile(lf);