cSvn-UI for SVN Repositories

cGit-UI – is a web interface for Subversion (SVN) Repositories. cSvn CGI script is writen in C and therefore it's fast enough

6 Commits   0 Branches   2 Tags
author: kx <kx@radix.pro> 2023-03-24 03:55:33 +0300 committer: kx <kx@radix.pro> 2023-03-24 03:55:33 +0300 commit: bfc1508d26c89c9a36d2d9a827fe2c4ed128884d parent: c836ae3775cf72f17e0b7e3792d156fdb389bee3
Commit Summary:
Version 0.1.4
Diffstat:
1 file changed, 65 insertions, 0 deletions
diff --git a/csvncgi/repolist.h b/csvncgi/repolist.h
new file mode 100644
index 0000000..a4c76ad
--- /dev/null
+++ b/csvncgi/repolist.h
@@ -0,0 +1,85 @@
+
+#ifndef    __REPO_LIST_H
+#define    __REPO_LIST_H
+
+#ifndef __DEBUG__
+#define __DEBUG__  0
+#endif
+
+#ifndef ST_GLOBAL
+#define ST_GLOBAL 1
+#endif
+#ifndef ST_REPOS
+#define ST_REPOS  2
+#endif
+
+#ifndef DT_NUMERICAL
+#define DT_NUMERICAL  0x01
+#endif
+#ifndef DT_PATH
+#define DT_PATH       0x02
+#endif
+#ifndef DT_STRING
+#define DT_STRING     0x04
+#endif
+
+struct section
+{
+  int type;
+  unsigned char *name;
+  struct dlist  *list;
+};
+
+struct variable
+{
+  unsigned char *name;
+  union
+  {
+    int val;
+    unsigned char *vptr;
+  } _v;
+  unsigned int type;
+};
+
+struct repo
+{
+  unsigned char *path;
+  struct dlist  *list;
+};
+
+extern struct dlist *config;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void (*rlist_errfunc)( const char *fmt, ... );
+
+extern void rlist_error( const char *fmt, ... ) __attribute__((format (printf,1,2)));
+extern rlist_errfunc rlist_fatal; /* Default Fatal Error Function == rlist_error() */
+
+
+extern struct dlist *read_config( void );
+extern void print_config( struct strbuf *sb, struct dlist *list );
+extern struct variable *lookup( struct repo *repo, struct variable *variable );
+extern struct variable *lookup_global( struct section *section, struct variable *variable );
+extern struct repo *lookup_repo( struct dlist *config, const char *path );
+extern struct section *lookup_section( struct dlist *config, const char *name );
+extern struct section *lookup_global_section( struct dlist *config );
+
+extern int repolist_length( struct dlist *config );
+extern struct repo *repolist_nth( struct dlist *config, int n );
+extern int repo_position( struct dlist *config, struct repo *repo );
+
+extern struct dlist *parent_section_node_repolist_nth( struct dlist *config, int n );
+extern struct dlist *parent_rlist_node_repolist_nth( struct dlist *config, int n );
+
+extern void free_config( void );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /* __REPO_LIST_H */