55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
int nArg;
int mxArg = 0;
int n, i;
char **azArg = 0;
int fDebug;
pid_t childPid;
char *zLine = 0;
fDebug = find_option("debug", 0, 0)!=0;
db_find_and_open_repository(OPEN_ANY_SCHEMA|OPEN_OK_NOT_FOUND, 0);
db_close(0);
sqlite3_shutdown();
linenoiseSetMultiLine(1);
while( (free(zLine), zLine = linenoise("fossil> ")) ){
/* Remember shell history within the current session */
linenoiseHistoryAdd(zLine);
/* Parse the line of input */
n = (int)strlen(zLine);
for(i=0, nArg=1; i<n; i++){
while( fossil_isspace(zLine[i]) ){ i++; }
|
>
>
|
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
int nArg;
int mxArg = 0;
int n, i;
char **azArg = 0;
int fDebug;
pid_t childPid;
char *zLine = 0;
char *zPrompt = 0;
fDebug = find_option("debug", 0, 0)!=0;
db_find_and_open_repository(OPEN_ANY_SCHEMA|OPEN_OK_NOT_FOUND, 0);
zPrompt = mprintf("fossil (%z)> ", db_get("project-name","no repo"));
db_close(0);
sqlite3_shutdown();
linenoiseSetMultiLine(1);
while( (free(zLine), zLine = linenoise(zPrompt)) ){
/* Remember shell history within the current session */
linenoiseHistoryAdd(zLine);
/* Parse the line of input */
n = (int)strlen(zLine);
for(i=0, nArg=1; i<n; i++){
while( fossil_isspace(zLine[i]) ){ i++; }
|
115
116
117
118
119
120
121
122
123
|
exit(0);
}else{
/* The parent process */
int status;
waitpid(childPid, &status, 0);
}
}
#endif
}
|
>
|
117
118
119
120
121
122
123
124
125
126
|
exit(0);
}else{
/* The parent process */
int status;
waitpid(childPid, &status, 0);
}
}
free(zPrompt);
#endif
}
|