aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.h
diff options
context:
space:
mode:
authorJason Woodward2004-05-19 23:14:20 +0000
committerJason Woodward2004-05-19 23:14:20 +0000
commit90d0c4aff2016d57de72ddf39be26a3929ada5c8 (patch)
tree06365b953355f9ef5a6aa79e01d0670a777f53ef /src/common.h
parenta7188e9eb1cc9ae295699614bc2090853411f58d (diff)
downloadslapt-get-90d0c4aff2016d57de72ddf39be26a3929ada5c8.tar.gz
added files for file_open and regex operations
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
new file mode 100644
index 0000000..3df6857
--- /dev/null
+++ b/src/common.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2004 Jason Woodward <woodwardj at jaos dot org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+#define MAX_REGEX_PARTS 10
+#define SLACK_BASE_SET_REGEX "^./slackware/a$"
+
+
+struct _sg_regex {
+ regex_t regex;
+ size_t nmatch;
+ regmatch_t pmatch[MAX_REGEX_PARTS];
+ int reg_return;
+};
+typedef struct _sg_regex sg_regex;
+
+
+FILE *open_file(const char *file_name,const char *mode);
+void init_regex(sg_regex *regex_t, const char *regex_string);
+void execute_regex(sg_regex *regex_t,const char *string);
+void free_regex(sg_regex *regex_t);