Lines Matching refs:zLine

439 ** If zLine is not NULL then it is a malloced buffer returned from
442 static char *local_getline(char *zLine, FILE *in){
443 int nLine = zLine==0 ? 0 : 100;
449 zLine = realloc(zLine, nLine);
450 if( zLine==0 ) return 0;
452 if( fgets(&zLine[n], nLine - n, in)==0 ){
454 free(zLine);
457 zLine[n] = 0;
460 while( zLine[n] ) n++;
461 if( n>0 && zLine[n-1]=='\n' ){
463 if( n>0 && zLine[n-1]=='\r' ) n--;
464 zLine[n] = 0;
468 return zLine;
2638 static int do_meta_command(char *zLine, ShellState *p){
2647 while( zLine[h] && nArg<ArraySize(azArg) ){
2648 while( IsSpace(zLine[h]) ){ h++; }
2649 if( zLine[h]==0 ) break;
2650 if( zLine[h]=='\'' || zLine[h]=='"' ){
2651 int delim = zLine[h++];
2652 azArg[nArg++] = &zLine[h];
2653 while( zLine[h] && zLine[h]!=delim ){
2654 if( zLine[h]=='\\' && delim=='"' && zLine[h+1]!=0 ) h++;
2657 if( zLine[h]==delim ){
2658 zLine[h++] = 0;
2662 azArg[nArg++] = &zLine[h];
2663 while( zLine[h] && !IsSpace(zLine[h]) ){ h++; }
2664 if( zLine[h] ) zLine[h++] = 0;
4150 static int line_is_command_terminator(const char *zLine){
4151 while( IsSpace(zLine[0]) ){ zLine++; };
4152 if( zLine[0]=='/' && _all_whitespace(&zLine[1]) ){
4155 if( ToLower(zLine[0])=='g' && ToLower(zLine[1])=='o'
4156 && _all_whitespace(&zLine[2]) ){
4186 char *zLine = 0; /* A single input line */
4200 zLine = one_input_line(in, zLine, nSql>0);
4201 if( zLine==0 ){
4211 if( nSql==0 && _all_whitespace(zLine) ){
4212 if( p->echoOn ) printf("%s\n", zLine);
4215 if( zLine && zLine[0]=='.' && nSql==0 ){
4216 if( p->echoOn ) printf("%s\n", zLine);
4217 rc = do_meta_command(zLine, p);
4225 if( line_is_command_terminator(zLine) && line_is_complete(zSql, nSql) ){
4226 memcpy(zLine,";",2);
4228 nLine = strlen30(zLine);
4240 for(i=0; zLine[i] && IsSpace(zLine[i]); i++){}
4242 memcpy(zSql, zLine+i, nLine+1-i);
4247 memcpy(zSql+nSql, zLine, nLine+1);
4292 free(zLine);