Exemple #1
0
int Walk::start()
{
	lift=5;
	dribble();
	lift=10;
	dribble();
	lift=20;
	dribble();
	lift=30;
	dribble();
	
}
Exemple #2
0
void main(int argc, char *argv[]){
    initWicBasics(argc, argv, 1.1); // 3-rd dummy argument is to include
                                    // floating point library

    forAllInSLList(g_opt.fileNameList, doConversion);
    dribble();
    wicExit(0);
}
Exemple #3
0
float Walk::turnleft(float theta)
{
	if(theta==0)
	{
		legRotfi=0;
		supLegRotfi=0;
		dribble();
		return 0;
	}
	if(theta>15)
		legRotfi=((int)leg)*15;
	else
		legRotfi=((int)leg)*theta;
	supLegRotfi=0;
	dribble();	
	theta=theta-legRotfi;
	turnleft(theta);	
}
Exemple #4
0
static void getNextChar(void)
{
    static unsigned long counter = 0;
    enum { COUNTER_STEP = 1024 };

    if (counter++ % COUNTER_STEP == 0) {
        dribble();
    }

    if ((char) NEXT_CHAR == (char) EOF){
        printf("INTERNAL ERROR in getNextChar: Attempted to read beyond EOF!\n");
        return;
    }

    if (NEXT_CHAR == '\t'){
        COL_NUM += getTabSize(COL_NUM);
    } else if (NEXT_CHAR != '\n') {
        COL_NUM++;
    } else {
        g_totalNumLines++;
        LINE_NUM++;
        orderLineNum++;
        COL_NUM = 0;
        TOK_NUM_AFTER_NEW_LINE = 0;
    }

    NEXT_CHAR = _NEXT_NEXT_CHAR;
    if ((char) NEXT_CHAR != (char) EOF){
        _NEXT_NEXT_CHAR = fgetc(TOK_FILE);
        if (STATE != TS_COMMENT) {
            while (_NEXT_NEXT_CHAR == '\n' && NEXT_CHAR == '\\'){
                g_totalNumLines++;
                NEXT_CHAR = fgetc(TOK_FILE);
                _NEXT_NEXT_CHAR = fgetc(TOK_FILE);
                LINE_NUM++;
                COL_NUM = 0;
            }
        }
        if ((char) _NEXT_NEXT_CHAR == (char) EOF && NEXT_CHAR == '\\'){
            NEXT_CHAR = (char) EOF;
        }
    }
}
Exemple #5
0
void TestSax()
{
    for (unsigned int i=0; i<TESTS; ++i)
    {
        util::StringStream ss(saxtests[i].xml);
        size_t len = ss.str().length();

        for (size_t j=len; j; --j)
        {
//	    TRACE << "j=" << j << "\n";
            util::DribbleStream dribble(&ss, j);

            SaxTestObserver sto(saxtests[i].events);
            xml::SaxParser saxp(&sto);
            unsigned int rc = saxp.Parse(&dribble);
            assert(rc == 0);
        }
    }
}
Exemple #6
0
static int _advanceNextOUnit(void) {
    PrintType min;
    int pushFiles;
    pOUnit nextOUnit;
    static unsigned long counter = 0;

    if (counter++ % 1024 == 0) {
        dribble();
    }
    min = _findMinOUnit();
    nextOUnit = printData[min].nextOUnit;
    if (nextOUnit != NULL) {
        pushFiles = nextOUnit->pos.fileLevel - currOUnit->pos.fileLevel;
        assert(pushFiles <= 1);
        if (pushFiles == 1) {
            _pushFileStack(nextOUnit->pos.fileName);
        } else if (pushFiles < 0) {
            while (pushFiles < 0) {
                _popFileStack();
                pushFiles++;
            }
        }
        linesLeftToSkip = nextOUnit->pos.linesBefore;
        if (currOUnit->type == OUT_NEWLINE) {
            if (linesLeftToSkip > 0) {
                linesLeftToSkip--;
            }
        }
        zapOUnit(currOUnit);
        currOUnit = nextOUnit;
        printData[min].nextOUnit = getNextCTreeOUnit(min);
        return 1;
    } else {
        return 0;
    }
}