#FIG 3.2 Landscape Center Inches A4 100.00 Single -2 1200 2 2 4 0 1 0 7 0 0 -1 0.000 0 0 7 0 0 5 12900 9300 12900 300 300 300 300 9300 12900 9300 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 3 900 7500 900 1500 5700 1500 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 3 6600 4200 6600 1500 12075 1500 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 3 6600 8100 6600 4800 12000 4800 4 1 0 0 0 18 24 0.0000 4 360 6465 6600 900 Utilisation directe de setjmp/longjmp\001 4 0 0 100 0 14 18 0.0000 4 180 2145 900 1425 interaction.c\001 4 0 0 100 0 14 18 0.0000 4 255 3135 1200 2100 #include \001 4 0 0 100 0 14 18 0.0000 4 240 3630 1200 2700 static jmp_buf errbuf;\001 4 0 0 100 0 14 18 0.0000 4 180 660 1200 3300 void\001 4 0 0 100 0 14 18 0.0000 4 240 3300 1200 3600 fatal(char *message)\001 4 0 0 100 0 14 18 0.0000 4 225 165 1200 3900 {\001 4 0 0 100 0 14 18 0.0000 4 240 4455 1200 4200 fprintf(stderr, message);\001 4 0 0 100 0 14 18 0.0000 4 240 2970 1200 4500 longjmp(errbuf);\001 4 0 0 100 0 14 18 0.0000 4 225 165 1200 4800 }\001 4 0 0 100 0 14 18 0.0000 4 180 660 1200 5400 void\001 4 0 0 100 0 14 18 0.0000 4 240 2310 1200 5700 cmd_loop(void)\001 4 0 0 100 0 14 18 0.0000 4 225 165 1200 6000 {\001 4 0 0 100 0 14 18 0.0000 4 240 2805 1200 6300 setjmp(errbuf);\001 4 0 0 100 0 14 18 0.0000 4 225 1650 1200 6600 while(1)\001 4 0 0 100 0 14 18 0.0000 4 225 165 1200 7200 }\001 4 0 0 100 0 14 18 0.0000 4 240 3630 1200 6900 execute_command();\001 4 0 0 100 0 14 18 0.0000 4 180 1485 6600 1425 command.c\001 4 0 0 100 0 14 18 0.0000 4 180 660 6900 2100 void\001 4 0 0 100 0 14 18 0.0000 4 240 3465 6900 2400 execute_command(void)\001 4 0 0 100 0 14 18 0.0000 4 225 165 6900 2700 {\001 4 0 0 100 0 14 18 0.0000 4 30 825 6900 3000 ...\001 4 0 0 100 0 14 18 0.0000 4 240 3465 6900 3300 advance_one_char();\001 4 0 0 100 0 14 18 0.0000 4 30 825 6900 3600 ...\001 4 0 0 100 0 14 18 0.0000 4 225 165 6900 3900 }\001 4 0 0 100 0 14 18 0.0000 4 180 2310 6600 4725 charcommands.c\001 4 0 0 100 0 14 18 0.0000 4 180 660 6900 5400 void\001 4 0 0 100 0 14 18 0.0000 4 240 3630 6900 5700 advance_one_char(void)\001 4 0 0 100 0 14 18 0.0000 4 225 165 6900 6000 {\001 4 0 0 100 0 14 18 0.0000 4 240 4455 6900 6300 if(beginning_of_buffer())\001 4 0 0 100 0 14 18 0.0000 4 180 990 6900 6900 else\001 4 0 0 100 0 14 18 0.0000 4 240 3465 6900 7200 point_location--;\001 4 0 0 100 0 14 18 0.0000 4 240 5280 6900 6600 fatal("begining of buffer");\001 4 0 0 100 0 14 18 0.0000 4 30 825 6900 7500 ...\001 4 0 0 100 0 14 18 0.0000 4 225 165 6900 7800 }\001 4 0 0 100 0 14 18 0.0000 4 30 495 6900 8100 ...\001 4 0 0 100 0 14 18 0.0000 4 30 495 6900 4200 ...\001 4 0 0 100 0 14 18 0.0000 4 30 495 6900 5100 ...\001 4 0 0 100 0 14 18 0.0000 4 30 495 6900 1800 ...\001 4 0 0 100 0 14 18 0.0000 4 30 495 1200 7500 ...\001