コード例 #1
0
int main() 
{
	setup();
	
	char* shortestPath = phase_one();
	return_to_origin();
	phase_two(shortestPath);

	set_motors(0,0);
	printf("Finished!\n");
	return 0;
}
コード例 #2
0
int main P2C(int,ac,char**,av)
#line 95 "./cwebdir/ctangle.w"
{
argc= ac;argv= av;
program= ctangle;
/*17:*/
#line 167 "./cwebdir/ctangle.w"

text_info->tok_start= tok_ptr= tok_mem;
text_ptr= text_info+1;text_ptr->tok_start= tok_mem;


/*:17*//*19:*/
#line 177 "./cwebdir/ctangle.w"

name_dir->equiv= (char*)text_info;

/*:19*//*23:*/
#line 230 "./cwebdir/ctangle.w"
last_unnamed= text_info;text_info->text_link= 0;

/*:23*//*38:*/
#line 512 "./cwebdir/ctangle.w"

cur_out_file= end_output_files= output_files+max_files;

/*:38*//*51:*/
#line 713 "./cwebdir/ctangle.w"

{
int i;
for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned)(128+i));
}

/*:51*//*56:*/
#line 792 "./cwebdir/ctangle.w"
{
int c;
for(c= 0;c<256;c++)ccode[c]= ignore;
ccode[' ']= ccode['\t']= ccode['\n']= ccode['\v']= ccode['\r']= ccode['\f']
= ccode['*']= new_section;
ccode['@']= '@';ccode['=']= string;
ccode['d']= ccode['D']= definition;
ccode['f']= ccode['F']= ccode['s']= ccode['S']= format_code;
ccode['c']= ccode['C']= ccode['p']= ccode['P']= begin_C;
ccode['^']= ccode[':']= ccode['.']= ccode['t']= ccode['T']= 
ccode['q']= ccode['Q']= control_text;
ccode['h']= ccode['H']= output_defs_code;
ccode['l']= ccode['L']= translit_code;
ccode['&']= join;
ccode['<']= ccode['(']= section_name;
ccode['\'']= ord;
}

/*:56*//*70:*/
#line 1116 "./cwebdir/ctangle.w"
section_text[0]= ' ';

/*:70*/
#line 98 "./cwebdir/ctangle.w"
;
common_init();
#line 76 "./cwebdir/ctang-w2c.ch"
if(show_banner){
printf("%s%s\n",banner,versionstring);
}
#line 101 "./cwebdir/ctangle.w"
phase_one();
phase_two();
return wrap_up();
}