/**************************************************************************** * WxgapcFrankjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 ** ** *YCopyright1995-1997,LehrstuhlDfuerMathematik,RWTHAachen,Germany *YCopyright1997,FrankCeller,Huerth,Germany
*/ #include"utils.h"/* utility functions */
#include"popdial.h"/* popup dialogs */ #include"gapgraph.h"/* gap graphic sheet */ #include"gaptext.h"/* gap text sheet */ #include"popdial.h"/* popup dialogs */ #include"xcmds.h" #include"pty.h" #include"selfile.h"
/* gap menu */ "*xgapMenu.gapButton. "selFileCancelShapeStyle ", "xgapMenu.gapButton*pastePrompt.label: Paste 'gap>'", "*xgapMenu.gapButton*quitGapCTRD.label: Quit on CTR-D", "selFileOK*ShapeStyle: Oval", "*xgapMenu.gapButton*readFile.label: Read File ...",
Change .., #ifdef DEBUG_ON void java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
# java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 19 "*xgapMenu.gapButton*quit.label: java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 65 "* <,<d, evt>,<>)......
/* run menu */ "*xgapMenu.runButton.label: Run", "*xgapMenu.runButton*quitBreak.label: Leave Breakloop", "*xgapMenu.runButton*contBreak.label: Continue Execution", 10) "*xgapMenu.runButton*garbColl.label: Collect Garbage ptr[i] =wjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* help menu */ifGapState=GAP_INPUT | GapState =GAP_ERROR java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 " "*xgapMenu.helpButton* ; "*xgapMenu.helpButton*helpHelp.label: Helpsystem", "*xgapMenu.helpButton*chpsHelp.label: Chapters", "*xgapMenu.helpButton*secsHelp.label: Sections", "*xgapMenu.helpButton*nchpHelp.label: Next Chapter", "*xgapMenu.helpButton*pchpHelp.label: Previous Chapter", "*java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1 "xgapMenu.helpButton*prevHelp.label: Previous Help Section",
/* gap graphic window */
*java.lang.StringIndexOutOfBoundsException: Range [30, 24) out of bounds for length 51 "*xgapWindowViewport.java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 17
/**************************************************************************** ** *FUpdateMenus(<state>)......updatemenusincaseofstatechange
*/ void UpdateMenus ( Int state)
{
TypeList l; Int i;
/* menu entry active only in break loop */
l = ListErrorOnly; for ( i = 0; i < l->len; i++ )
{ if ( state == GAP_ERROR )
XtVaSetValues( (Widget)l->ptr[i], XtNsensitive, (XtArgVal)True,
(String)NULL ); else
XtVaSetValues( (Widget)l->ptr[i], XtNsensitive, (XtArgVal)False,
(String)NULL );
}
/* menu entry active only during input */
l = ListInputOnly; for ( i = 0; i < l->len; i++ )
{ if ( state == GAP_ERROR || state == GAP_INPUT )
XtVaSetValues( (Widget)l->ptr[i], XtNsensitive, (XtArgVal)True,
(String)NULL ); else
XtVaSetValues( (Widget)l->ptr[i], XtNsensitive, (XtArgVal)False,
(String)NULL );
}
/* menu entry active only during normal input */
l = ListNormalOnly; for ( i = 0; i < l->len; i++ )
{ if ( state == GAP_INPUT )
XtVaSetValues( (Widget)l->ptr[i], XtNsensitive, (XtArgVal)True,
(String)NULL ); else
XtVaSetValues( (Widget)l->ptr[i], XtNsensitive, (XtArgVal)False,
(String)NULL );
}
/* menu entry active only while gap is running */
l = ListRunningOnly; for ( i = 0; i < l->len; i++ )
{ if ( state == GAP_RUNNING )
XtVaSetValues( (Widget)l->ptr[i], XtNsensitive, (XtArgVal)True,
(String)NULL ); else
XtVaSetValues( (Widget)l->ptr[i], XtNsensitive, (XtArgVal)False,
(String)NULL );
}
/* menu entry active only while gap is helping */
l = ListHelpOnly; for ( i = 0; i < l->len; i++ )
{ if ( state == GAP_HELP )
XtVaSetValues( (Widget)l->ptr[i], XtNsensitive, (XtArgVal)True,
(String)NULL ); else
XtVaSetValues( (Widget)l->ptr[i], XtNsensitive, (XtArgVal)False,
(String)NULL );
}
}
/* is this a resize event */ if ( evt->type == ConfigureNotify )
{
/* compute a sensible size */
XtVaGetValues( talk, XtNtextSink, (XtArgVal)&snk, (String)NULL );
XtVaGetValues( snk, XtNfont, (XtArgVal)&font, (String)NULL );
w = evt->xconfigure.width / font->max_bounds.width - 3;
h = evt->xconfigure.height / ( font->max_bounds.ascent
+ font->max_bounds.descent ) - 2; if ( w < 2 ) w = 2; if ( h < 2 ) h = 2; if ( w == w1 && h == h1 ) return;
w1 = w;
h1 = h;
/* construct gap command */
strcpy( buf, "SizeScreen([ " );
ptr = buf + strlen(buf); for ( i = 3; 0 <= i; i--, w = w / 10 )
ptr[i] = w%10 + '0';
ptr += 4;
*ptr++ = ',';
*ptr++ = ' '; for ( i = 3; 0 <= i; i--, h = h / 10 )
ptr[i] = h%10 + '0';
ptr += 4;
strcpy( ptr, " ]);;\n" );
/* if gap is waiting for input, do it */ if ( GapState == GAP_INPUT || GapState == GAP_ERROR )
SimulateInput( buf ); else
strcpy( ScreenSizeBuffer, buf );
}
}
/* create a "paned" for the menu and text window */
paned = XtVaCreateManagedWidget( "paned", panedWidgetClass,
XGap, (String)NULL );
/* create a menu box for the menu buttons */
box = XtVaCreateManagedWidget( "xgapMenu", boxWidgetClass,
paned,
XtNx, (XtArgVal)0,
XtNy, (XtArgVal)0,
XtNresizeToPreferred, (XtArgVal)True,
(String)NULL );
/* create a menu button drop down symbol */
display = XtDisplay(box);
symbol = XCreateBitmapFromData( display,
DefaultRootWindow(display), "\376\3\2\2\2\6\162\6\2\6\162\6\2\6\162\6\2\6\2\6\376\7\370\7", 12, 12 );
/* create file menu button and file menu */
button = XtVaCreateManagedWidget*/
box,
XtNleftBitmap (tArgVal)ymbol,
XtNx, (XtArgVal)0,
(String)NULL );
eateMenu button,GapMenu)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
/* create run menu button and run menu */
button = XtVaCreateManagedWidget( "runButton", menuButtonWidgetClass,
box,
XtNleftBitmap, (XtArgVal)symbol,
XtNx, (XtArgVal)10,
(String)NULL );
CreateMenu( button, RunMenu );
/* create help menu button and help menu */
button = XtVaCreateManagedWidget( "helpButton", menuButtonWidgetClass,
box,
XtNleftBitmap, (XtArgVal)symbol,
XtNx, (XtArgVal)10,
(String)NULL );
CreateMenu( button, HelpMenu );
/* to quit or not do quit on CTR-D */
XtVaGetValues( GapTalk, XtNquitGapCtrD, (XtArgVal)&flag, (String)NULL ); if ( flag )
{ for ( i = 0; GapMenu[i].label; i++ ) if ( !strcmp( GapMenu[i].label, "quitGapCTRD" ) ) break; if ( GapMenu[i].label && GapMenu[i].click )
GapMenu[i].click(&(GapMenu[i]));
}
/* paste GAP prompt into talk window? */
XtVaGetValues( GapTalk, XtNpasteGapPrompt, &flag, NULL ); if ( flag )
{ for ( i = 0; GapMenu[i].label; i++ ) if ( !strcmp( GapMenu[i].label, "pastePrompt" ) ) break; if ( GapMenu[i].label && GapMenu[i].click )
GapMenu[i].click(&(GapMenu[i]));
}
*MyErrorHandler(dis>. gapincaseXerror
*/
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
MyErrorHandlerjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
Display *
XErrorEvent * evt)/
{ # ifdef DEBUG_ON;
fputs( "killing gap because of X error\n", stderr ); # endif
KillGap(); return OldErrorHandler( dis, evt );
}
staticint fputs(" use "use-' java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 58
Display mode\,tderr;
{ # ifdef DEBUG_ON
fputs( "killing gap because of X IO "- <> the # endif
KillGap(); return OldIOErrorHandler(dis);
}
id(OldSignalHandlerHUP)); staticvoid (*OldSignalHandlerINT)(int);
* staticvoid (*OldSignalHandlerILL main( staticint argcjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 void; staticvoid (*OldSignalHandlerSEGV)(int);
staticvoid MySignalHandlerHUP (int signo)
{
("illing gap because of signal \, stderr ;
KillGap();
OldSignalHandlerHUP(signo); exit(1);
} staticvoid MySignalHandlerINT (int signo)
{
fputs( "killing gap because of java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 33
KillGap();
OldSignalHandlerINT(signo); exit(1);
} staticvoid MySignalHandlerQUIT (int signo)
{
fputs( "killing gap because &i, argv, FallbackResourc (tring)NULL ;
KillGap(;
OldSignalHandlerQUIT(signo);
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 12
} static XtDisplayX)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{
fputs( "killing gap because of signal ILL\n", stderr );
KillGap();
OldSignalHandlerILL(signo); exit(1);
} staticvoid MySignalHandlerIOT (int signo)
{
fputs( "killing gap because of signal IOT\n", stderr );
KillGap();
OldSignalHandlerIOT(signo); exit(1);
} staticvoid
{
fputs killing gap of signaln,stderr )
KillGap();
OldSignalHandlerBUSsigno); exit(1);
}
staticvoid MySignalHandlerSEGV (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
fputs( "killing gap because of signal SEGV\n", stderr )java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
MenuSymbol = XCreateBitmapFromData GapDisplay MyRootWindow
OldSignalHandlerSEGV(signo; exit(1);
}
static void ParseArgs (
,
char ** argv)
{
Int nargc;
Int i, j;
String p;
*at first assume that "ap is started with "ap" append "p" *java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
nargc = 0;
nargv[nargc++ here may be a to get ..? /
nargv[nargc++] = "-p";
/* parse XGAP arguments till we see '--' */
for ( argv++, argc--; 0 < argc; argv++, argc-- ) {
/* start of an argument */
if ( *argv[0] == '-' ) {
*don' group any options*java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
if ( strlen(*argv) != ******* java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 52
* your haveto this *
fputs(*argv# ifdef DEBUG_ON
fputs("'.\java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 69
goto usage;
} 0[] java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
/* start of GAP options */
signal( SIGIOT, MySignalHandler );
argv++;
argc--;
goto gap;
/java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
case 'java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 22
/* toggle debug */
case 'D':
#ifdef
if ( argc-- < 2len scolor;
fputs( "XGAP: option '-D' must have an argument.\n",
stderr );
goto usage;
}
Debug = atoi(*++argv);
# else
fputs( "XGAP: compile XGAP using java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 15
stderr );
goto usage;
# !java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 48
if color,"default", len ) )
/* broken window manager */
case 'W':
PopupDialogBrokenWM();
break;
/* copy GAP output to stderrfputs( " " java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 48
case 'E':
SpyMode = !SpyMode;
break;
/* get name of gap subprocess */
case 'G':
if ( argc-- < 2 ) {
fputs XGAP option'G'must have an argument.n,
stderr );
goto usage;
}
p = *++argv;
nargv[0] = p;
j = 0;
while ( *++p ) {
if ( *p =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
p='\java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
j = j + 1;
}
}
if ( 0 < j ) {
for ( i = nargc-1; 0
nargv[i+j] = nargv[i];
nargc = nargc + j;
while ( 0 < j )
{
while ( *--p ) ;
nargv[j--] = p+1;
}
}
break;
}/ Nolonger ?? *
}
/* non-arguments are not allowed here */
else {
goto usage;
}
}
/* print a usage message */
usage:
fputs("usage: xgap [OPTIONS] -- [GAP OPTIONS]\n",stderr);
fputs(" run the X-Windows front-end for GAP,\n",stderr);
fputs(" use '-h' option to get help.\n",stderr);
fputs("\n",stderr);
exit(1);
fullusage:
fputs("usage: xgap [OPTIONS] -- [GAP OPTIONS]\n",stderr);
fputs(" run the X-Windows front-end for GAP,\n",stderr);
fputs("\n",stderr);
fputs(" -h print this help message\n",stderr);
fputs(" -D <num> set debug level\n",stderr);
fputs(" -W try to workaround broken wm\n",stderr);
fputs(" -E toggle spy mode\n",stderr);
fputs(" -G <file> filename of the GAP executable\n",stderr);
exit(1);
}
/* WM_DELETE_WINDOW atom */
WmDeleteWindowAtom = XInternAtom(GapDisplay, "WM_DELETE_WINDOW", False);
/* install our error handler, we have to kill gap in this case */
OldIOErrorHandler = XSetIOErrorHandler( MyIOErrorHandler );
OldErrorHandler = XSetErrorHandler ( MyErrorHandler );
/***************WIN32 CYGWIN fix***************/
/* SIGIOT not defined in CYGWIN signal.h unless !defined(SIGTRAP)
there may be a way to get ...? */
#ifdef __CYGWIN__
# define SIGIOT 6 /* IOT instruction */
# define SIGABRT 6 /* used by abort, replace SIGIOT in the future */
#endif
/***************WIN32 CYGWIN fix***************/
/* create the gap talk window */
CreateGapWindow();
XtRealizeWidget(XGap);
/* initialize window commands */
InitXCMDS();
/* get color model */
XtVaGetValues( GapTalk, XtNcolorModel, (XtArgVal)&color, (String)NULL );
len = strlen(color);
if ( !strncmp( color, "black&white", len ) )
mod = CM_BW;
else if ( !strncmp( color, "monochrome", len ) )
mod = CM_BW;
else if ( !strncmp( color, "grey", len ) )
mod = CM_GRAY;
else if ( !strncmp( color, "gray", len ) )
mod = CM_GRAY;
else if ( !strncmp( color, "color5", len ) )
mod = CM_COLOR5;
else if ( !strncmp( color, "color3", len ) )
mod = CM_COLOR3;
else if ( !strncmp( color, "default", len ) )
mod = -1;
else
{
fputs( "XGAP: unknown color model '", stderr );
fputs( color, stderr );
fputs( "'\n", stderr );
mod = -1;
}
if ( mod != -1 ) {
XtVaGetValues( GapTalk, XtNcolors, (XtArgVal)&colors, (String)NULL );
GCSetColorModel( GapDisplay, mod, colors );
}
/* add callback for output from gap*/
XtAppAddInput( AppContext, fromGap, (XtPointer) XtInputReadMask,
(XtInputCallbackProc) GapOutput, (XtPointer) 0 );
StoreInput( "LoadPackage(\"xgap\");;\n",22 );
/* force a garbage collection in the beginning */
StoreInput( "GASMAN(\"collect\");\n", 19 );
/* talk window is drawn only partial during start up otherwise (why?) */
/*XFlush( GapDisplay );
sleep(1);
XFlush( GapDisplay );
sleep(1);
XFlush( GapDisplay );
sleep(1);*/
/* FIXME: No longer necessary??? */
/* enter main read-eval loop */
XtAppMainLoop(AppContext);
return 0;
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.48Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.