Lines Matching refs:z
228 static void output_quoted_string(FILE *out, const char *z){ in output_quoted_string() argument
231 for(i=0; z[i]; i++){ in output_quoted_string()
232 if( z[i]=='\'' ) nSingle++; in output_quoted_string()
235 fprintf(out,"'%s'",z); in output_quoted_string()
238 while( *z ){ in output_quoted_string()
239 for(i=0; z[i] && z[i]!='\''; i++){} in output_quoted_string()
242 z++; in output_quoted_string()
243 }else if( z[i]=='\'' ){ in output_quoted_string()
244 fprintf(out,"%.*s''",i,z); in output_quoted_string()
245 z += i+1; in output_quoted_string()
247 fprintf(out,"%s",z); in output_quoted_string()
259 static void output_html_string(FILE *out, const char *z){ in output_html_string() argument
261 while( *z ){ in output_html_string()
262 for(i=0; z[i] && z[i]!='<' && z[i]!='&'; i++){} in output_html_string()
264 fprintf(out,"%.*s",i,z); in output_html_string()
266 if( z[i]=='<' ){ in output_html_string()
268 }else if( z[i]=='&' ){ in output_html_string()
273 z += i + 1; in output_html_string()
365 char *z = azArg[i]; in callback() local
366 if( z==0 ) z = p->nullvalue; in callback()
367 fprintf(p->out, "%s", z); in callback()
425 char *z; in set_table_name() local
440 z = p->zDestTable = malloc( n+1 ); in set_table_name()
441 if( z==0 ){ in set_table_name()
446 if( needQuote ) z[n++] = '\''; in set_table_name()
448 z[n++] = zName[i]; in set_table_name()
449 if( zName[i]=='\'' ) z[n++] = '\''; in set_table_name()
451 if( needQuote ) z[n++] = '\''; in set_table_name()
452 z[n] = 0; in set_table_name()
626 char *z = azArg[1]; in do_meta_command() local
628 for(j=0; z[j]; j++){ in do_meta_command()
629 if( isupper(z[j]) ) z[j] = tolower(z[j]); in do_meta_command()
631 if( strcmp(z,"on")==0 ){ in do_meta_command()
633 }else if( strcmp(z,"yes")==0 ){ in do_meta_command()
645 char *z = nArg>=2 ? azArg[1] : "1"; in do_meta_command() local
646 int val = atoi(z); in do_meta_command()
647 for(j=0; z[j]; j++){ in do_meta_command()
648 if( isupper(z[j]) ) z[j] = tolower(z[j]); in do_meta_command()
650 if( strcmp(z,"on")==0 ){ in do_meta_command()
652 }else if( strcmp(z,"yes")==0 ){ in do_meta_command()
689 char *z = azArg[1]; in do_meta_command() local
691 for(j=0; z[j]; j++){ in do_meta_command()
692 if( isupper(z[j]) ) z[j] = tolower(z[j]); in do_meta_command()
694 if( strcmp(z,"on")==0 ){ in do_meta_command()
696 }else if( strcmp(z,"yes")==0 ){ in do_meta_command()
973 static int _ends_with_semicolon(const char *z, int N){ in _ends_with_semicolon() argument
974 while( N>0 && isspace(z[N-1]) ){ N--; } in _ends_with_semicolon()
975 return N>0 && z[N-1]==';'; in _ends_with_semicolon()
981 static int _all_whitespace(const char *z){ in _all_whitespace() argument
982 for(; *z; z++){ in _all_whitespace()
983 if( isspace(*z) ) continue; in _all_whitespace()
984 if( *z=='/' && z[1]=='*' ){ in _all_whitespace()
985 z += 2; in _all_whitespace()
986 while( *z && (*z!='*' || z[1]!='/') ){ z++; } in _all_whitespace()
987 if( *z==0 ) return 0; in _all_whitespace()
988 z++; in _all_whitespace()
991 if( *z=='-' && z[1]=='-' ){ in _all_whitespace()
992 z += 2; in _all_whitespace()
993 while( *z && *z!='\n' ){ z++; } in _all_whitespace()
994 if( *z==0 ) return 1; in _all_whitespace()
1127 char *z = malloc( strlen(home_dir)+1 ); in find_home_dir() local
1128 if( z ) strcpy(z, home_dir); in find_home_dir()
1129 home_dir = z; in find_home_dir()
1286 char *z = argv[i]; in main() local
1287 if( strcmp(z,"-init")==0 || strcmp(z,"-key")==0 ){ in main()
1289 }else if( strcmp(z,"-html")==0 ){ in main()
1291 }else if( strcmp(z,"-list")==0 ){ in main()
1293 }else if( strcmp(z,"-line")==0 ){ in main()
1295 }else if( strcmp(z,"-column")==0 ){ in main()
1297 }else if( strcmp(z,"-separator")==0 ){ in main()
1300 }else if( strcmp(z,"-nullvalue")==0 ){ in main()
1303 }else if( strcmp(z,"-header")==0 ){ in main()
1305 }else if( strcmp(z,"-noheader")==0 ){ in main()
1307 }else if( strcmp(z,"-echo")==0 ){ in main()
1309 }else if( strcmp(z,"-version")==0 ){ in main()
1312 }else if( strcmp(z,"-help")==0 ){ in main()
1315 fprintf(stderr,"%s: unknown option: %s\n", Argv0, z); in main()