/** * @brief Generates a reference-type argument. * * A reference argument is identified by a '&', and contains a * \c Node::lookupNode() compatible string. * * Parsing starts on the '&' marker, and ends just after the end of the * reference string. */ void NepParser::genArgReference(Nepeta::Node& data) { iterCur(); size_t start = getCurPos(); size_t stLine=getCurLine(), stCol=getCurCol(); while( true ) { char ch = getCur(); if( checkReference(ch) ) iterCur(); else { mRef.push_back( Reference(&data, getSubString(start,getCurPos()), stLine, stCol) ); return; } } }
xType2 ehnExecSelect(int thisCursor) { char Work[40],theHandle=0; int wasCode,value=OK,thisConnect=thisContext.path; long sqlErrD5; unsigned sqlcaSize,sqlSize; if (debug >= 5000) {fwrite(sqlBuffer,MAX_SQL_TEXT-sqlBufferCapacity,1,debugFile); fwrite("\n",1,1,debugFile); if (debug >= 201) return(OK); } if (!thisHit) {if (RQ_OK != (wasCode=EHNRQSELECT(sqlBuffer,0,&theHandle))) {ehnError(wasCode,"EHNRQSELECT",thisContext.path); if (thisSQLstate->sqlcode == 7908) wasCode = RQ_OK ; else {if (thisSQLstate->sqlcode == 100) wasCode = RQ_LASTROW; else {xsqlLogPrint("PCS Code 2.1: %d",wasCode); dump: if (!thisHit) dumpSQL(sqlBuffer); else dumpSQL(thisHit->prototype); } } } thisContext.actualHandle = theHandle; } else {if (!thisContext.prepared) {if (RQ_OK != (wasCode=EHNRQSELECTPM(thisHit->prototype,&theHandle))) {xsqlLogPrint("PCS Error 2.2: %d in SQL #%ld-",wasCode,thisHit->fullHash); ehnError(wasCode,"EHNRQSELECTPM",thisContext.path); thisHit->preparedNtimes++; if (thisSQLstate->sqlcode == 7908) wasCode = RQ_OK ; else goto dump; } thisHit->preparedNtimes++; thisContext.actualHandle = theHandle; } if (wasCode=bindCursor(thisCursor)) return(wasCode); { if (!state->pointerCheckingDisabled && state->debugCode > 100 ) {int nthColumn,validPointer; char **thisParm=thisContext.parameters; for(nthColumn=0;nthColumn<thisHit->nParms;nthColumn++,thisParm++) { checkRefWithSize(*thisParm,thisHit->parmLength[nthColumn],validPointer); if (!validPointer) {xsqlLogPrint("Parameter %d is invalid!",nthColumn+1); exit(1); } } checkReference(thisContext.format,validPointer); if (validPointer) {if (state->debugCode > 501) xsqlLogPrint("Format: %s",thisContext.format); } else {xsqlLogPrint("Invalid format!!!!!!!"); exit(1); } } if (RQ_OK !=(wasCode= EHNRQSELECTVAL(thisContext.actualHandle, thisContext.format,thisContext.parameters,FALSE)) ) {ehnError(wasCode,"EHNRQSELECTVAL",(int)thisContext.path); if (thisSQLstate->sqlcode == 7908) wasCode = RQ_OK ; else {if (thisSQLstate->sqlcode == 100) wasCode = RQ_LASTROW; else {xsqlLogPrint("PCS Code 2.3: %d in SQL #%ld-", wasCode,thisHit->fullHash); goto dump; } } } } } //ehnError(wasCode,"EHNRQSELECTVAL",(int)thisContext.path); return(wasCode); }