75 lines
1.8 KiB
C
75 lines
1.8 KiB
C
/**
|
|
* @PROJECT CGI Bash Shell Interface
|
|
* @COPYRIGHT See COPYING in the top level directory
|
|
* @FILE cbsi.h
|
|
* @PURPOSE Common CBSI
|
|
* @DEVELOPERS Nathan Angelacos <nangel@users.sourceforge.net>
|
|
* Rafal Kupiec <belliash@asiotec.eu.org>
|
|
*/
|
|
|
|
#ifndef __CBSI_H
|
|
#define __CBSI_H
|
|
|
|
typedef struct {
|
|
unsigned long uploadkb;
|
|
char* shell;
|
|
char* langdir;
|
|
char* translation;
|
|
char* uploaddir;
|
|
char* uploadhandler;
|
|
char* file_prefix;
|
|
char* filename_prefix;
|
|
char* get_prefix;
|
|
char* post_prefix;
|
|
char* cookie_prefix;
|
|
char* null_prefix;
|
|
char* cbsi_prefix;
|
|
token_t* uploadlist;
|
|
int debug;
|
|
int acceptall;
|
|
int silent;
|
|
} cbsi_t;
|
|
|
|
typedef struct lstr {
|
|
char* msgid;
|
|
char* msgstr;
|
|
struct lstr* next;
|
|
} lstr;
|
|
|
|
cbsi_t global;
|
|
char buffer[TRANS_BUF];
|
|
char* language;
|
|
lstr* ltable[HASH_BUF];
|
|
int translations;
|
|
|
|
int argc_argv(char* instr, argv_t** argv);
|
|
void assignGlobalStartupValues(void);
|
|
int BecomeUser(uid_t uid, gid_t gid);
|
|
void cbsiflags(list_t* env);
|
|
void cleanup(void);
|
|
void CookieVars(list_t* env);
|
|
int count_lines(char* instr, size_t len, char* where);
|
|
char* find_whitespace (char* instr);
|
|
void free_list_chain(list_t* env);
|
|
unsigned short generateHash(char* str);
|
|
void loadDictionary(const char* filename);
|
|
void lowercase(char* instr);
|
|
list_t* myputenv(list_t* cur, char* str, char* prefix);
|
|
int parseCommandLine(int argc, char* argv[]);
|
|
void prepareDictionary();
|
|
int ReadCGIPOSTValues(list_t* env);
|
|
int ReadCGIQueryString(list_t* env);
|
|
void readenv(list_t* env);
|
|
void sessionid(list_t* env);
|
|
char* skip_whitespace (char* instr);
|
|
char* trim(char* str);
|
|
void unescape_url(char* url);
|
|
void unlink_uploadlist(void);
|
|
void uppercase(char* instr);
|
|
list_t* wcversion(list_t* env);
|
|
char x2c(char* what);
|
|
void* xmalloc(size_t size);
|
|
void* xrealloc(void* buf, size_t size);
|
|
|
|
#endif
|