MCPcopy Create free account
hub / github.com/audacity/audacity / one_input_line

Function one_input_line

lib-src/sqlite/shell.c:725–743  ·  view source on GitHub ↗

** Retrieve a single line of input text. ** ** If in==0 then read from standard input and prompt before each line. ** If isContinuation is true, then a continuation prompt is appropriate. ** If isContinuation is zero, then the main prompt should be used. ** ** If zPrior is not NULL then it is a buffer from a prior call to this ** routine that can be reused. ** ** The result is stored in space obta

Source from the content-addressed store, hash-verified

723** zPrior argument for reuse.
724*/
725static char *one_input_line(FILE *in, char *zPrior, int isContinuation){
726 char *zPrompt;
727 char *zResult;
728 if( in!=0 ){
729 zResult = local_getline(zPrior, in);
730 }else{
731 zPrompt = isContinuation ? continuePrompt : mainPrompt;
732#if SHELL_USE_LOCAL_GETLINE
733 printf("%s", zPrompt);
734 fflush(stdout);
735 zResult = local_getline(zPrior, stdin);
736#else
737 free(zPrior);
738 zResult = shell_readline(zPrompt);
739 if( zResult && *zResult ) shell_add_history(zResult);
740#endif
741 }
742 return zResult;
743}
744
745
746/*

Callers 1

process_inputFunction · 0.85

Calls 2

local_getlineFunction · 0.85
freeFunction · 0.85

Tested by

no test coverage detected