/************************************************************************ ** ** FILE : stewinok.c ** ** ZWECK : ** ** AUTOR : Michael C. Ancutici ** Universitaet Stuttgart, Fakultaet Informatik ** ** DATUM : 14.03.93 ** *************************************************************************/ #include "stewin.H" #include "haste.h" #include #include "simfire.h" extern void HaSteON(); #define TestOnCompareSign() *t!=GROESSER && *t!=KLEINER && \ *t!=GLEICH && *t!=UNGLEICH /************************************************************************* ** FUNKTION: SteWinSayOK ** ZWECK: ** EINGABE: ** AUSGABE: ** RETURN: ** ANMERK: *************************************************************************/ void SteWinSayOK( w, client_data, call_data) Widget w; XtPointer client_data, call_data; { String text; int i = SteWinStelle->Marke; char BreakCond = 'e'; int BreakValue = -2; register char *t; XtVaGetValues( SteNameText, XtNstring, &text, NULL); if (strlen( text) <= 10) HaSteNRepl( SteWinNr, text); XtVaGetValues( SteMarkeText, XtNstring, &text, NULL); if (text[ 0] == EOL) { HaSteMRepl( SteWinNr, 0); SimTouch(); } else if ( (sscanf( text, "%d",&i)) && (i>=0) && (i<1000) ) { HaSteMRepl( SteWinNr, i); SimTouch(); } XtVaGetValues( SteBreakText, XtNstring, &text, NULL); if (*(t=text)==EOL) BreakCond = KEINE; else { for (t=text; *t!=EOL && TestOnCompareSign() ; t++); if (*t!=EOL) { BreakCond = *t; for (++t; *t!=EOL && *t == ' '; t++); if (*t == 'a') BreakValue = ALTE_MARKE; else if (sscanf( t, "%d",&i)) BreakValue = i; } } if (BreakValue != -2) { SteWinStelle->BreakCond = BreakCond; SteWinStelle->BreakValue = BreakValue; } SteWinPopdown(); HaSteON(); }