Update of /cvsroot/refdb/refdb/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1584
Modified Files:
refdbd.c
Log Message:
added config option to count from 0 or 1; always uppercase encoding names to make them case-insensitive
Index: refdbd.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/refdbd.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -U2 -r1.72 -r1.73
--- refdbd.c 31 Jan 2004 14:50:22 -0000 1.72
+++ refdbd.c 7 Feb 2004 14:47:29 -0000 1.73
@@ -62,5 +62,5 @@
#endif
-Prefs prefs[21] = {
+Prefs prefs[22] = {
{"serverip", ""},
{"timeout", ""},
@@ -83,4 +83,5 @@
{"remoteconnect", ""},
{"in_encoding", ""},
+ {"nongeek_offset", ""},
{"", ""}
};
@@ -112,4 +113,5 @@
char default_input_encoding[PREFS_BUF_LEN] = "ISO-8859-1"; /* default char encoding for input data */
char keyword_scan[PREFS_BUF_LEN] = ""; /* run automatic keyword scan if 't' */
+char ng_offset[PREFS_BUF_LEN] = "1"; /* 0 for geeks, 1 for humans */
char confdir[_POSIX_PATH_MAX+1] = ""; /* path to the config files */
@@ -131,4 +133,5 @@
int gotchldsig = 0; /* set to 1 if SIGCHLD received */
int n_cgi = 0; /* if 1, data are requested for cgi output */
+int nongeek_offset = 1; /* 0 for geeks, 1 for humans */
FILE* fp_log_file = NULL; /* a FILE pointer to a custom log file */
dbi_result dbi_style_res = NULL; /* used by backends to load style information */
@@ -233,4 +236,5 @@
prefs[18].varvalue = remote_connect;
prefs[19].varvalue = default_input_encoding;
+ prefs[20].varvalue = ng_offset;
*dbi_driver_dir = '\0';
@@ -368,4 +372,9 @@
n_remote_admin = (*remote_admin == 't') ? 1:0;
n_remote_connect = (*remote_connect == 't') ? 1:0;
+ nongeek_offset = atoi(ng_offset);
+
+ /* uppercase the encoding names */
+ strup(default_db_encoding);
+ strup(default_input_encoding);
if (!strcmp(ptr_clrequest->dbserver, "sqlite") && *ip_or_path) {
@@ -803,6 +812,6 @@
/* use one of the following options to debug the child process */
- /* printf("child sleeps PID=%d\n", getpid()); */
- /* sleep(10); */
+/* printf("child sleeps PID=%d\n", getpid()); */
+/* sleep(10); */
/* alternatively you can sleep until */
/* an explicit user action (i.e., kill -CONT or "gdb, c"), */
@@ -971,4 +980,5 @@
strncpy(db_encoding, optarg, PREFS_BUF_LEN);
db_encoding[PREFS_BUF_LEN-1] = '\0';
+ strup(db_encoding);
break;
case 'G':
@@ -1715,4 +1725,5 @@
if (strncmp(child_inbuffer1, positive.text, positive.length) != 0) {
LOG_PRINT(LOG_WARNING, "no positive ack from client");
+ LOG_PRINT(LOG_DEBUG, child_inbuffer1);
}
|