Lines Matching refs:zLine
444 static char *local_getline(char *zLine, FILE *in){ in local_getline() argument
445 int nLine = zLine==0 ? 0 : 100; in local_getline()
451 zLine = realloc(zLine, nLine); in local_getline()
452 if( zLine==0 ) return 0; in local_getline()
454 if( fgets(&zLine[n], nLine - n, in)==0 ){ in local_getline()
456 free(zLine); in local_getline()
459 zLine[n] = 0; in local_getline()
462 while( zLine[n] ) n++; in local_getline()
463 if( n>0 && zLine[n-1]=='\n' ){ in local_getline()
465 if( n>0 && zLine[n-1]=='\r' ) n--; in local_getline()
466 zLine[n] = 0; in local_getline()
470 return zLine; in local_getline()
2617 static int do_meta_command(char *zLine, ShellState *p){ in do_meta_command() argument
2626 while( zLine[h] && nArg<ArraySize(azArg) ){ in do_meta_command()
2627 while( IsSpace(zLine[h]) ){ h++; } in do_meta_command()
2628 if( zLine[h]==0 ) break; in do_meta_command()
2629 if( zLine[h]=='\'' || zLine[h]=='"' ){ in do_meta_command()
2630 int delim = zLine[h++]; in do_meta_command()
2631 azArg[nArg++] = &zLine[h]; in do_meta_command()
2632 while( zLine[h] && zLine[h]!=delim ){ in do_meta_command()
2633 if( zLine[h]=='\\' && delim=='"' && zLine[h+1]!=0 ) h++; in do_meta_command()
2636 if( zLine[h]==delim ){ in do_meta_command()
2637 zLine[h++] = 0; in do_meta_command()
2641 azArg[nArg++] = &zLine[h]; in do_meta_command()
2642 while( zLine[h] && !IsSpace(zLine[h]) ){ h++; } in do_meta_command()
2643 if( zLine[h] ) zLine[h++] = 0; in do_meta_command()
4111 static int line_is_command_terminator(const char *zLine){ in line_is_command_terminator() argument
4112 while( IsSpace(zLine[0]) ){ zLine++; }; in line_is_command_terminator()
4113 if( zLine[0]=='/' && _all_whitespace(&zLine[1]) ){ in line_is_command_terminator()
4116 if( ToLower(zLine[0])=='g' && ToLower(zLine[1])=='o' in line_is_command_terminator()
4117 && _all_whitespace(&zLine[2]) ){ in line_is_command_terminator()
4147 char *zLine = 0; /* A single input line */ in process_input() local
4161 zLine = one_input_line(in, zLine, nSql>0); in process_input()
4162 if( zLine==0 ){ in process_input()
4172 if( nSql==0 && _all_whitespace(zLine) ){ in process_input()
4173 if( p->echoOn ) printf("%s\n", zLine); in process_input()
4176 if( zLine && zLine[0]=='.' && nSql==0 ){ in process_input()
4177 if( p->echoOn ) printf("%s\n", zLine); in process_input()
4178 rc = do_meta_command(zLine, p); in process_input()
4186 if( line_is_command_terminator(zLine) && line_is_complete(zSql, nSql) ){ in process_input()
4187 memcpy(zLine,";",2); in process_input()
4189 nLine = strlen30(zLine); in process_input()
4201 for(i=0; zLine[i] && IsSpace(zLine[i]); i++){} in process_input()
4203 memcpy(zSql, zLine+i, nLine+1-i); in process_input()
4208 memcpy(zSql+nSql, zLine, nLine+1); in process_input()
4253 free(zLine); in process_input()