d1aafb0904765d2abfbb8b7eb92826460962b0ed
angie
  Fri May 1 16:26:50 2015 -0700
Libifying hgTables' code that parses user's region input, so I can use
it to add support for user regions to hgIntegrator.
refs #14579

diff --git src/hg/inc/userRegions.h src/hg/inc/userRegions.h
new file mode 100644
index 0000000..7a0849a
--- /dev/null
+++ src/hg/inc/userRegions.h
@@ -0,0 +1,21 @@
+/* userRegions: parse user regions entered as BED3, BED4 or chr:start-end
+ * optionally followed by name. */
+
+/* Copyright (C) 2015 The Regents of the University of California
+ * See README in this or parent directory for licensing information. */
+
+#ifndef USERREGIONS_H
+#define USERREGIONS_H
+
+char *userRegionsParse(char *db, char *regionsText, int maxRegions, int maxErrs,
+                       int *retRegionCount, char **retWarnText);
+/* Parse user regions entered as BED3, BED4 or chr:start-end optionally followed by name.
+ * Return name of trash file containing BED for parsed regions if regionsText contains
+ * valid regions; otherwise NULL.
+ * If maxRegions <= 0, it is ignored; likewise for maxErrs.
+ * If retRegionCount is non-NULL, it will be set to the number of valid parsed regions
+ * in the trash file.
+ * If retWarnText is non-NULL, it will be set to a string containing warning and error
+ * messages encountered while parsing input. */
+
+#endif /* USERREGIONS_H */