assert(endoffile !=
NULL);
102#ifndef NO_REMOVE_HISTORY 103 returnhistory_length;
115#ifndef NO_REMOVE_HISTORY 118entry = remove_history(pos);
124#if RL_VERSION_MAJOR >= 5 125(void)free_history_entry(entry);
129free((
void*)entry->line);
141 const char* filename
144 intretval = write_history(filename);
164assert(dialoghdlr !=
NULL);
168assert(endoffile !=
NULL);
178printf(
"%s", prompt);
182assert(result !=
NULL);
228 const char* filename
231assert(filename !=
NULL);
245assert(linelist !=
NULL);
257assert(linelist !=
NULL);
259 while( *linelist !=
NULL)
265*linelist = nextline;
277assert(dialoghdlr !=
NULL);
281assert(endoffile !=
NULL);
323assert(dialog !=
NULL);
327 if( dialog->dialogcopy !=
NULL)
341#ifdef SCIP_WITH_READLINE 342 charreadlineversion[20];
346assert(dialoghdlr !=
NULL);
349(*dialoghdlr)->rootdialog =
NULL;
350(*dialoghdlr)->inputlist =
NULL;
351(*dialoghdlr)->inputlistptr = &(*dialoghdlr)->inputlist;
353(*dialoghdlr)->nprotectedhistelems = -1;
358#ifdef SCIP_WITH_READLINE 359(void)
SCIPsnprintf(readlineversion, (
int)
sizeof(readlineversion),
"Readline %s", rl_library_version);
372assert(dialoghdlr !=
NULL);
373 if( *dialoghdlr ==
NULL)
392assert(dialoghdlr !=
NULL);
400 while( dialog !=
NULL)
419assert(dialoghdlr !=
NULL);
429 if( dialog !=
NULL)
440assert(dialoghdlr !=
NULL);
450assert(dialoghdlr !=
NULL);
452dialoghdlr->
buffer[0] =
'\0';
461assert(dialoghdlr !=
NULL);
481assert(dialoghdlr !=
NULL);
484assert(inputline !=
NULL);
494 if( prompt ==
NULL)
509 while( isspace((
unsigned char)dialoghdlr->
buffer[dialoghdlr->
bufferpos+ len - 1]) )
527 while( isspace((
unsigned char)dialoghdlr->
buffer[dialoghdlr->
bufferpos]) )
559assert(dialoghdlr !=
NULL);
562assert(inputword !=
NULL);
563assert(endoffile !=
NULL);
575 if( prompt ==
NULL)
590 while( isspace((
unsigned char)dialoghdlr->
buffer[dialoghdlr->
bufferpos+ len - 1]) )
608 while( isspace((
unsigned char)dialoghdlr->
buffer[dialoghdlr->
bufferpos]) )
615assert(pos <= dialoghdlr->bufferpos);
675assert(pos <= dialoghdlr->bufferpos);
682 if( dialoghdlr->
buffer[pos] !=
'\0')
683dialoghdlr->
buffer[pos] =
'\0';
686 while( isspace((
unsigned char)dialoghdlr->
buffer[dialoghdlr->
bufferpos]) )
689*inputword = firstword;
699 const char* inputline
705assert(dialoghdlr !=
NULL);
708assert(inputline !=
NULL);
729 const char* command,
737assert(dialoghdlr !=
NULL);
740cleanuphistory = (dialog !=
NULL);
745 if( command !=
NULL)
764dialog = dialog->
parent;
768 if( cleanuphistory )
785 if( cleanuphistory )
808assert(dialog !=
NULL);
818assert(num <= dialog->subdialogssize);
838assert(dialog !=
NULL);
839assert(name !=
NULL);
844(*dialog)->dialogcopy = dialogcopy;
845(*dialog)->dialogexec = dialogexec;
846(*dialog)->dialogdesc = dialogdesc;
847(*dialog)->dialogfree = dialogfree;
855(*dialog)->desc =
NULL;
857(*dialog)->issubmenu = issubmenu;
858(*dialog)->parent =
NULL;
859(*dialog)->subdialogs =
NULL;
860(*dialog)->nsubdialogs = 0;
861(*dialog)->subdialogssize = 0;
862(*dialog)->nuses = 0;
863(*dialog)->dialogdata = dialogdata;
887assert(dialog !=
NULL);
888assert(*dialog !=
NULL);
889assert((*dialog)->nuses == 0);
892 if( (*dialog)->dialogfree !=
NULL)
898 for( i = 0; i < (*dialog)->nsubdialogs; ++i )
916assert(dialog !=
NULL);
927assert(dialog !=
NULL);
930 if( (*dialog)->nuses == 0 )
946assert(dialog !=
NULL);
947assert(dialog->dialogexec !=
NULL);
949assert(nextdialog !=
NULL);
951 SCIP_CALL( dialog->dialogexec(
set->scip, dialog, dialoghdlr, nextdialog) );
970assert(dialog !=
NULL);
971assert(subdialog !=
NULL);
976 SCIPerrorMessage(
"dialog entry with name <%s> already exists in dialog <%s>\n",
986subdialog->
parent= dialog;
997 const char* entryname
1004assert(dialog !=
NULL);
1005assert(entryname !=
NULL);
1010 for( i = 0; i < nsubdialogs; ++i )
1030 const char* entryname,
1035 unsigned intnamelen;
1040assert(dialog !=
NULL);
1041assert(entryname !=
NULL);
1042assert(subdialog !=
NULL);
1049namelen = (
unsignedint) strlen(entryname);
1051 for( i = 0; i < nsubdialogs; ++i )
1056*subdialog = subdialogs[i];
1079assert(dialog !=
NULL);
1113assert(dialog !=
NULL);
1121 if( strlen(name) > 21 )
1128 if( dialog->dialogdesc !=
NULL)
1143 const char* entryname
1147 unsigned intnamelen;
1151assert(dialog !=
NULL);
1152assert(entryname !=
NULL);
1157namelen = (
unsignedint) strlen(entryname);
1158 for( i = 0; i < nsubdialogs; ++i )
1179assert(dialog !=
NULL);
1183dialog = dialog->
parent;
1184 while( dialog !=
NULL)
1188dialog = dialog->
parent;
1197assert(dialog !=
NULL);
1199 returndialog->
name;
1207assert(dialog !=
NULL);
1209 returndialog->
desc;
1217assert(dialog !=
NULL);
1227assert(dialog !=
NULL);
1237assert(dialog !=
NULL);
1247assert(dialog !=
NULL);
1257assert(dialog !=
NULL);
1268assert(dialog !=
NULL);
1275 const char* filename
common defines and data types used in all packages of SCIP
#define SCIP_ALLOC_TERMINATE(retcode, x, TERM)
static SCIP_RETCODE readLine(SCIP_DIALOGHDLR *dialoghdlr, const char *prompt, SCIP_Bool *endoffile)
static SCIP_DECL_SORTPTRCOMP(dialogComp)
static SCIP_RETCODE addHistory(const char *s)
void SCIPdialogCapture(SCIP_DIALOG *dialog)
static int getHistoryLength(void)
static SCIP_RETCODE ensureSubdialogMem(SCIP_DIALOG *dialog, SCIP_SET *set, int num)
static void linelistFreeAll(SCIP_LINELIST **linelist)
SCIP_RETCODE SCIPdialogCreate(SCIP_DIALOG **dialog, SCIP_DECL_DIALOGCOPY((*dialogcopy)), SCIP_DECL_DIALOGEXEC((*dialogexec)), SCIP_DECL_DIALOGDESC((*dialogdesc)), SCIP_DECL_DIALOGFREE((*dialogfree)), const char *name, const char *desc, SCIP_Bool issubmenu, SCIP_DIALOGDATA *dialogdata)
SCIP_RETCODE SCIPdialogExec(SCIP_DIALOG *dialog, SCIP_SET *set, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG **nextdialog)
SCIP_RETCODE SCIPdialoghdlrCreate(SCIP_SET *set, SCIP_DIALOGHDLR **dialoghdlr)
static SCIP_RETCODE readInputLine(SCIP_DIALOGHDLR *dialoghdlr, const char *prompt, SCIP_Bool *endoffile)
static void linelistFree(SCIP_LINELIST **linelist)
SCIP_RETCODE SCIPdialoghdlrFree(SCIP *scip, SCIP_DIALOGHDLR **dialoghdlr)
static SCIP_RETCODE dialogFree(SCIP *scip, SCIP_DIALOG **dialog)
static SCIP_RETCODE removeHistory(int pos)
SCIP_RETCODE SCIPdialogCopyInclude(SCIP_DIALOG *dialog, SCIP_SET *set)
SCIP_RETCODE SCIPdialogAddEntry(SCIP_DIALOG *dialog, SCIP_SET *set, SCIP_DIALOG *subdialog)
static SCIP_RETCODE writeHistory(const char *filename)
SCIP_RETCODE SCIPdialoghdlrExec(SCIP_DIALOGHDLR *dialoghdlr, SCIP_SET *set)
SCIP_RETCODE SCIPdialoghdlrSetRoot(SCIP *scip, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog)
SCIP_RETCODE SCIPdialogRelease(SCIP *scip, SCIP_DIALOG **dialog)
internal methods for user interface dialog
void SCIPdialogMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPdialoghdlrClearBuffer(SCIP_DIALOGHDLR *dialoghdlr)
SCIP_DIALOG * SCIPdialoghdlrGetRoot(SCIP_DIALOGHDLR *dialoghdlr)
SCIP_Bool SCIPdialogHasEntry(SCIP_DIALOG *dialog, const char *entryname)
const char * SCIPdialogGetName(SCIP_DIALOG *dialog)
SCIP_RETCODE SCIPdialoghdlrAddHistory(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *command, SCIP_Bool escapecommand)
SCIP_Bool SCIPdialoghdlrIsBufferEmpty(SCIP_DIALOGHDLR *dialoghdlr)
void SCIPdialogSetData(SCIP_DIALOG *dialog, SCIP_DIALOGDATA *dialogdata)
SCIP_RETCODE SCIPdialoghdlrAddInputLine(SCIP_DIALOGHDLR *dialoghdlr, const char *inputline)
SCIP_RETCODE SCIPdialoghdlrGetWord(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *prompt, char **inputword, SCIP_Bool *endoffile)
const char * SCIPdialogGetDesc(SCIP_DIALOG *dialog)
SCIP_DIALOG ** SCIPdialogGetSubdialogs(SCIP_DIALOG *dialog)
SCIP_DIALOGDATA * SCIPdialogGetData(SCIP_DIALOG *dialog)
SCIP_RETCODE SCIPdialogDisplayCompletions(SCIP_DIALOG *dialog, SCIP *scip, const char *entryname)
int SCIPdialogGetNSubdialogs(SCIP_DIALOG *dialog)
SCIP_RETCODE SCIPdialogDisplayMenuEntry(SCIP_DIALOG *dialog, SCIP *scip)
SCIP_RETCODE SCIPdialogWriteHistory(const char *filename)
int SCIPdialogFindEntry(SCIP_DIALOG *dialog, const char *entryname, SCIP_DIALOG **subdialog)
SCIP_Bool SCIPdialogIsSubmenu(SCIP_DIALOG *dialog)
SCIP_RETCODE SCIPdialoghdlrGetLine(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *prompt, char **inputline, SCIP_Bool *endoffile)
SCIP_DIALOG * SCIPdialogGetParent(SCIP_DIALOG *dialog)
SCIP_RETCODE SCIPdialogDisplayMenu(SCIP_DIALOG *dialog, SCIP *scip)
void SCIPdialogGetPath(SCIP_DIALOG *dialog, const char sepchar, char *path)
void SCIPsortedvecInsertPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), void *keyval, int *len, int *pos)
int SCIPsnprintf(char *t, int len, const char *s,...)
void SCIPescapeString(char *t, int bufsize, const char *s)
int SCIPstrncpy(char *t, const char *s, int size)
memory allocation routines
#define BMSfreeMemory(ptr)
#define BMSreallocMemoryArray(ptr, num)
#define BMSduplicateMemoryArray(ptr, source, num)
#define BMSallocMemoryArray(ptr, num)
#define BMSfreeMemoryArray(ptr)
#define BMSfreeMemoryArrayNull(ptr)
#define BMSallocMemory(ptr)
public data structures and miscellaneous methods
int SCIPsetCalcMemGrowSize(SCIP_SET *set, int num)
SCIP_RETCODE SCIPsetIncludeExternalCode(SCIP_SET *set, const char *name, const char *description)
internal methods for global SCIP settings
SCIP_DIALOG ** subdialogs
SCIP_DIALOGDATA * dialogdata
SCIP_LINELIST * inputlist
SCIP_LINELIST ** inputlistptr
data structures for user interface dialog
#define SCIP_DECL_DIALOGCOPY(x)
#define SCIP_DECL_DIALOGEXEC(x)
struct SCIP_DialogData SCIP_DIALOGDATA
#define SCIP_DECL_DIALOGFREE(x)
#define SCIP_DECL_DIALOGDESC(x)
enum SCIP_Retcode SCIP_RETCODE
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4