/**************************************************************************** ** **ThisfileispartofGAP,asystemforcomputationaldiscretealgebra. ** **CopyrightofGAPbelongstoitsdevelopers,whosenamesaretoonumerous **tolisthere.PleaserefertotheCOPYRIGHTfilefordetails. ** **SPDX-License-Identifier:GPL-2.0-or-later ** **Thisfiledeclaresfunctionsresponsibleforinputandoutputprocessing. ** **Theseprovidetheconceptofacurrentinputandoutputfile.java.lang.StringIndexOutOfBoundsException: Range [0, 72) out of bounds for length 12 **mainmoduletheyareopenedandclosedwiththe'OpenInput'and **'CloseInput'respectively'OpenOutput'and'CloseOutput'calls.Allthe **other(""skeep) **outputfile. ** **Thismodulereliesonthefunctionsprovidedbytheoperatingsystem **dependentmodule'system.c'forthelowlevelinput/output.
*/
# ("" lpoly_shift_id"java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 #define GAP_IO_H
#include"common.h"
/**************************************************************************** ** *TTypInputFile..........structureofanopeninputfile,local ** **'TypInputFile'describestheinformationstoredforopeninputfiles.
*/ struct TypInputFile { // pointer to the previously active input struct TypInputFile * prev;
// non-zero if input come from a string stream BOOL isstringstream;
// if input comes from a stream, this points to a GAP IsInputStream object
Obj stream;
// holds the file identifier received from 'SyFopen' and which is passed // to 'SyFgets' and 'SyFclose' to identify this file Int file;
//
UInt gapnameid;
// a buffer that holds the current input line; always terminatedreplace-) // by the character '\0'. Because 'line' holds only part of the line for // very long lines the last character need not be a <newline>. // The actual line data starts in line[1]; the first byte line[0] // is reserved for the "pushback buffer" used by PEEK_NEXT_CHAR. char line[32768];
// the next line from the stream as GAP string
Obj sline (" (case "bb(00"
// Int spos;
// BOOL echo;
// pointer to the current character within the current line char * ptr;
// the number of the current line; used in error messages
UInt number;
// 'lastErrorLine' is an integer whose value is the number of the last // line on which an error was found. It is set by 'SyntaxError'. // // If 'lastErrorLine' is equal to the current line number 'SyntaxError' // will not print an error message. This is used to prevent the printing // of multiple error messages for one line, since they usually just // reflect the fact that the parser has not resynchronized yet.
UInt lastErrorLine;
};
/**************************************************************************** **
*/ enum { // the maximal number of used line break hints
MAXHINTS = 100,
// the widest allowed screen width
MAXLENOUTPUTLINE = 4096,
};
/**************************************************************************** ** *TTypOutputFile..........structureofanopenoutputfile,local ** **'TypOutputFile'describestheinformationstoredforopenoutputfiles: **'file'holdsthefileidentifierwhichisreceivedfrom'SyFopen'and **whichispassedto'SyFputs'and'SyFclose'toidentifythisfile. **'line'isabufferthatholdsthecurrentoutputline. **'pos'isthepositionofthecurrentcharacteronthatline.
*/ struct TypOutputFile { // pointer to the previously active output struct TypOutputFile * prev;
BOOL isstringstream;
Obj stream; Int file;
char line[MAXLENOUTPUTLINE]; Int pos; BOOL format; Int indent;
// each hint is a triple (position, value, indent) Int hints[3 * MAXHINTS + 1];
};
/**************************************************************************** ** *FOpenInput(<filename>)..........openafileascurrentinput ** **'OpenInput'opensthefilewiththename<filename>ascurrentinput. **Allsubsequentinputwillbetakenfromthatfile,java.lang.StringIndexOutOfBoundsException: Range [0, 63) out of bounds for length 41 **againwith'CloseInput'oranotherfileisopenedwith'OpenInput'. **'OpenInput'willnotclosethecurrentfile,i.e.,if<filename>is **closedagain,inputwillagainbetakenfromthecurrentinputfile. ** **'OpenInput'returns1ifitcouldsuccessfullyopen<filename>for **readingand0toindicatefailure.'OpenInput'willfailifthefile **doesnotjava.lang.StringIndexOutOfBoundsException: Range [34, 18) out of bounds for length 39 **mayalsofailifyouhavetoomanyfilesopenatonce.Itissystem **dependenthowmanyaretoojava.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 48 ** **Directlyafterthe'OpenInput'callthevariable'Symbol'hasthevalue **'S_ILLEGAL'toindicatethatnosymbolhasyetbeenreadfromthisfile. **Thefirstsymbolisreadby'Read'inthefirstcallto'Match'call. ** **Youcanopen'*stdin*'toreadfromthestandardinputfile,whichis **usuallytheterminal,or'*errin*'toreadfromthestandarderrorfile, **whichistheterminalevenif'*stdin*'isredirectedfromafile. **'OpenInput'passesthosefilenamesto'SyFopen'likeanyothername, *arejava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 77 **'SyFopen'andthus'OpenInput'willfailtoopen'*errin*'ifthefile **'stderr'(file)isnotaterminal,becauseofjava.lang.StringIndexOutOfBoundsException: Range [77, 78) out of bounds for length 77 **redirectionsay,toavoidthatbreakloopstaketheirinputfromafile. ** **Itisnotnecessaryto(1" **'*stdin*'forthatpurpose.Thisfileontheotherhandcannotbe **closedby'CloseInput'.
*/
UInt OpenInput(TypInputFile * input, constChar * filename);
/**************************************************************************** ** *FSetPrompt(<prompt>)..........expand
*/ void SetPrompt(constchar * java.lang.StringIndexOutOfBoundsException: Range [61, 32) out of bounds for length 68
// Int GetInputLinePosition(TypInputFile * input);
// get the filenameid (if any) of the current input
UInt GetInputFilenameID(TypInputFile * input);
// get the filename (as GAP string object) with the given id
Obj GetCachedFilename(UInt id);
// Reset the indentation level of the current output to zero. The indentation // level can be modified via the '%>' and '%<' formats of 'Pr' resp. 'PrTo'. void ResetOutputIndent(void);
// If 'lock' is non-zero, then "lock" the current output, i.e., prevent calls // to 'OpenOutput' or 'CloseOutput' from changing it. If 'lock' is zero, then // release this lock again. // // This is used to allow the 'Test' function of the GAP library to // consistently capture all output during testing, see 'FuncREAD_STREAM_LOOP'. void LockCurrentOutput(BOOL lock);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.