//grafikstart.cc #define VERSION "Version 0.0" #include #include #ifndef GCC_VERSION #define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) #endif #if GCC_VERSION>=3000 #include using namespace std; #else #include #endif #ifdef AMIGA #include #else #include #endif const int XMAX=640,YMAX=512,TIEFE=4; static int breite,hoehe,tiefe,visklasse; //Globale Variablen static double xmin= -0.1, ymin=0.0, xmax=1.1, ymax=1.0; static int exitflag=0; void menu_exit() {exitflag=1;} void grafik_zeichnen() {plot(0.,0.,PENUP); plot(1.,1.,PENDOWN);} main(int argc,char *argv[]) { //tek_setdebug(1);//test if(argc>1 && *argv[1]=='?') {printf("programmname %s\n",VERSION); exit(0);} getmaxsize(&breite,&hoehe,&tiefe,&visklasse); if(breite>XMAX) breite=XMAX; if(hoehe>YMAX) hoehe=YMAX; if(tiefe>TIEFE) tiefe=TIEFE; setsize(breite,hoehe,tiefe); setmenu(1,"File"); setmenu(1,"Exit",&menu_exit); inital(xmin,ymin,xmax,ymax); /* Grafikfenster oeffnen */ grafik_zeichnen(); term_refresh(); while(exitflag==0 && waitmenu(1)==0) ;// auf Benutzereingaben warten inital_new(); term_exit(); return 0; }// ende von main