X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fxio.c;h=9e59c19945c595c9af846ff61a972695a7c98ef3;hp=1ac0e2362295a0cb2b5a69fc83cc53a6aab59dd9;hb=c2847bb7511b0cf8472ba3a0a170a4fedd3b2861;hpb=7a96c3323abd4aabe6e4258b9b457c909d1ec2a2 diff --git a/src/xio.c b/src/xio.c index 1ac0e23..9e59c19 100644 --- a/src/xio.c +++ b/src/xio.c @@ -13,9 +13,14 @@ * 1. Button pushes should be able to insert commands at the buffer's * current insertion point. * 2. When a user finishes a command with Return, a callback should - * receive the line of input types. + * receive the line of input typed. + * + * All the input passed to the game in back of this will be lines full + * of commands generated either by typing into the text buffer directly + * or by button presses that generate text unto the buffer. */ #include +#include #include #include #include @@ -23,7 +28,9 @@ #include #include #include -#include "sst.h" +//#include "sst.h" +#define OPTION_PLANETS 1 +#define OPTION_PROBE 2 static XtAppContext app_context; static Widget toplevel, text, form; @@ -173,7 +180,7 @@ static void instantiate_main(int argc, char **argv) misclabel = XtVaCreateManagedWidget("misclabel", labelWidgetClass, misc, NULL); - for (cp = commands; cp < commands + sizeof(commands)/sizeof(commands[0]); cp++) { + for (cp = commands; cp < commands + ARRAY_SIZE(commands); cp++) { cp->widget = XtVaCreateManagedWidget(cp->name, commandWidgetClass, *cp->parent,