| 1 |
! UIMX ascii 2.0 key: 779 |
| 2 |
|
| 3 |
*Helper.class: Project |
| 4 |
*Helper.PjName: Helper |
| 5 |
*Helper.PjDoMain: 1 |
| 6 |
*Helper.PjDoMake: 1 |
| 7 |
*Helper.PjWriteAll: 0 |
| 8 |
*Helper.PjRunMake: 1 |
| 9 |
*Helper.PjWriteCDir: /midas/test/gui/XDo/src |
| 10 |
*Helper.PjMode: 0 |
| 11 |
*Helper.PjAppClassName: Tempdo |
| 12 |
|
| 13 |
*ApplicWindow_PJinterface.class: PJinterface |
| 14 |
*ApplicWindow_PJinterface.PjName: ApplicWindow_PJinterface |
| 15 |
*ApplicWindow_PJinterface.PjSwName: ApplicWindow |
| 16 |
*ApplicWindow_PJinterface.PjParent: Helper |
| 17 |
*ApplicWindow_PJinterface.PjFileName: ApplicWindow.i |
| 18 |
*ApplicWindow_PJinterface.PjShowFlag: 2 |
| 19 |
*ApplicWindow_PJinterface.PjDate: 811165727 |
| 20 |
*ApplicWindow_PJinterface.PjMode: 0 |
| 21 |
*ApplicWindow_PJinterface.PjCFileName: ApplicWindow.c |
| 22 |
|
| 23 |
*transientShell3_PJinterface.class: PJinterface |
| 24 |
*transientShell3_PJinterface.PjName: transientShell3_PJinterface |
| 25 |
*transientShell3_PJinterface.PjSwName: transientShell3 |
| 26 |
*transientShell3_PJinterface.PjParent: Helper |
| 27 |
*transientShell3_PJinterface.PjFileName: transientShell3.i |
| 28 |
*transientShell3_PJinterface.PjShowFlag: 2 |
| 29 |
*transientShell3_PJinterface.PjDate: 823525686 |
| 30 |
*transientShell3_PJinterface.PjMode: 0 |
| 31 |
*transientShell3_PJinterface.PjCFileName: transientShell3.c |
| 32 |
|
| 33 |
*transientShell8_PJinterface.class: PJinterface |
| 34 |
*transientShell8_PJinterface.PjName: transientShell8_PJinterface |
| 35 |
*transientShell8_PJinterface.PjSwName: transientShell8 |
| 36 |
*transientShell8_PJinterface.PjParent: Helper |
| 37 |
*transientShell8_PJinterface.PjFileName: transientShell8.i |
| 38 |
*transientShell8_PJinterface.PjShowFlag: 0 |
| 39 |
*transientShell8_PJinterface.PjDate: 811165728 |
| 40 |
*transientShell8_PJinterface.PjMode: 0 |
| 41 |
*transientShell8_PJinterface.PjCFileName: transientShell8.c |
| 42 |
|
| 43 |
*transientShell1_PJinterface.class: PJinterface |
| 44 |
*transientShell1_PJinterface.PjName: transientShell1_PJinterface |
| 45 |
*transientShell1_PJinterface.PjSwName: transientShell1 |
| 46 |
*transientShell1_PJinterface.PjParent: Helper |
| 47 |
*transientShell1_PJinterface.PjFileName: transientShell1.i |
| 48 |
*transientShell1_PJinterface.PjShowFlag: 0 |
| 49 |
*transientShell1_PJinterface.PjDate: 811165729 |
| 50 |
*transientShell1_PJinterface.PjMode: 0 |
| 51 |
*transientShell1_PJinterface.PjCFileName: transientShell1.c |
| 52 |
|
| 53 |
*SelectFrame_PJinterface.class: PJinterface |
| 54 |
*SelectFrame_PJinterface.PjName: SelectFrame_PJinterface |
| 55 |
*SelectFrame_PJinterface.PjSwName: SelectFrame |
| 56 |
*SelectFrame_PJinterface.PjParent: Helper |
| 57 |
*SelectFrame_PJinterface.PjFileName: SelectFrame.i |
| 58 |
*SelectFrame_PJinterface.PjShowFlag: 0 |
| 59 |
*SelectFrame_PJinterface.PjDate: 811165729 |
| 60 |
*SelectFrame_PJinterface.PjMode: 0 |
| 61 |
*SelectFrame_PJinterface.PjCFileName: SelectFrame.c |
| 62 |
|
| 63 |
*SelectDescrTable_PJinterface.class: PJinterface |
| 64 |
*SelectDescrTable_PJinterface.PjName: SelectDescrTable_PJinterface |
| 65 |
*SelectDescrTable_PJinterface.PjSwName: SelectDescrTable |
| 66 |
*SelectDescrTable_PJinterface.PjParent: Helper |
| 67 |
*SelectDescrTable_PJinterface.PjFileName: SelectDescrTable.i |
| 68 |
*SelectDescrTable_PJinterface.PjShowFlag: 0 |
| 69 |
*SelectDescrTable_PJinterface.PjDate: 811165729 |
| 70 |
*SelectDescrTable_PJinterface.PjMode: 0 |
| 71 |
*SelectDescrTable_PJinterface.PjCFileName: SelectDescrTable.c |
| 72 |
|
| 73 |
*SelectInstrument_PJinterface.class: PJinterface |
| 74 |
*SelectInstrument_PJinterface.PjName: SelectInstrument_PJinterface |
| 75 |
*SelectInstrument_PJinterface.PjSwName: SelectInstrument |
| 76 |
*SelectInstrument_PJinterface.PjParent: Helper |
| 77 |
*SelectInstrument_PJinterface.PjFileName: SelectInstrument.i |
| 78 |
*SelectInstrument_PJinterface.PjShowFlag: 0 |
| 79 |
*SelectInstrument_PJinterface.PjDate: 811165730 |
| 80 |
*SelectInstrument_PJinterface.PjMode: 0 |
| 81 |
*SelectInstrument_PJinterface.PjCFileName: SelectInstrument.c |
| 82 |
|
| 83 |
*applicationClas_PJinterface.class: PJinterface |
| 84 |
*applicationClas_PJinterface.PjName: applicationClas_PJinterface |
| 85 |
*applicationClas_PJinterface.PjSwName: applicationClas |
| 86 |
*applicationClas_PJinterface.PjParent: Helper |
| 87 |
*applicationClas_PJinterface.PjFileName: applicationShell1.i |
| 88 |
*applicationClas_PJinterface.PjShowFlag: 2 |
| 89 |
*applicationClas_PJinterface.PjDate: 811165730 |
| 90 |
*applicationClas_PJinterface.PjMode: 0 |
| 91 |
*applicationClas_PJinterface.PjCFileName: applicationShell1.c |
| 92 |
|
| 93 |
*Classify_PJinterface.class: PJinterface |
| 94 |
*Classify_PJinterface.PjName: Classify_PJinterface |
| 95 |
*Classify_PJinterface.PjSwName: Classify |
| 96 |
*Classify_PJinterface.PjParent: Helper |
| 97 |
*Classify_PJinterface.PjFileName: applicationShell2.i |
| 98 |
*Classify_PJinterface.PjShowFlag: 2 |
| 99 |
*Classify_PJinterface.PjDate: 823540147 |
| 100 |
*Classify_PJinterface.PjMode: 0 |
| 101 |
*Classify_PJinterface.PjCFileName: Classify.c |
| 102 |
|
| 103 |
*Associate_PJinterface.class: PJinterface |
| 104 |
*Associate_PJinterface.PjName: Associate_PJinterface |
| 105 |
*Associate_PJinterface.PjSwName: Associate |
| 106 |
*Associate_PJinterface.PjParent: Helper |
| 107 |
*Associate_PJinterface.PjFileName: Associate.i |
| 108 |
*Associate_PJinterface.PjShowFlag: 0 |
| 109 |
*Associate_PJinterface.PjDate: 811165732 |
| 110 |
*Associate_PJinterface.PjMode: 0 |
| 111 |
*Associate_PJinterface.PjCFileName: Associate.c |
| 112 |
|
| 113 |
*errorDialog1_PJinterface.class: PJinterface |
| 114 |
*errorDialog1_PJinterface.PjName: errorDialog1_PJinterface |
| 115 |
*errorDialog1_PJinterface.PjSwName: errorDialog1 |
| 116 |
*errorDialog1_PJinterface.PjParent: Helper |
| 117 |
*errorDialog1_PJinterface.PjFileName: errorDialog1.i |
| 118 |
*errorDialog1_PJinterface.PjShowFlag: 0 |
| 119 |
*errorDialog1_PJinterface.PjDate: 811165732 |
| 120 |
*errorDialog1_PJinterface.PjMode: 0 |
| 121 |
*errorDialog1_PJinterface.PjCFileName: errorDialog1.c |
| 122 |
|
| 123 |
*Association_PJinterface.class: PJinterface |
| 124 |
*Association_PJinterface.PjName: Association_PJinterface |
| 125 |
*Association_PJinterface.PjSwName: Association |
| 126 |
*Association_PJinterface.PjParent: Helper |
| 127 |
*Association_PJinterface.PjFileName: transientShell2.i |
| 128 |
*Association_PJinterface.PjShowFlag: 0 |
| 129 |
*Association_PJinterface.PjDate: 811165732 |
| 130 |
*Association_PJinterface.PjMode: 0 |
| 131 |
*Association_PJinterface.PjCFileName: Association.c |
| 132 |
|
| 133 |
*Warning_PJinterface.class: PJinterface |
| 134 |
*Warning_PJinterface.PjName: Warning_PJinterface |
| 135 |
*Warning_PJinterface.PjSwName: Warning |
| 136 |
*Warning_PJinterface.PjParent: Helper |
| 137 |
*Warning_PJinterface.PjFileName: Warning.i |
| 138 |
*Warning_PJinterface.PjShowFlag: 0 |
| 139 |
*Warning_PJinterface.PjDate: 811165733 |
| 140 |
*Warning_PJinterface.PjMode: 0 |
| 141 |
*Warning_PJinterface.PjCFileName: Warning.c |
| 142 |
|
| 143 |
*HelpDo_PJinterface.class: PJinterface |
| 144 |
*HelpDo_PJinterface.PjName: HelpDo_PJinterface |
| 145 |
*HelpDo_PJinterface.PjSwName: HelpDo |
| 146 |
*HelpDo_PJinterface.PjParent: Helper |
| 147 |
*HelpDo_PJinterface.PjFileName: topLevelShell1.i |
| 148 |
*HelpDo_PJinterface.PjShowFlag: 0 |
| 149 |
*HelpDo_PJinterface.PjDate: 811165733 |
| 150 |
*HelpDo_PJinterface.PjMode: 0 |
| 151 |
*HelpDo_PJinterface.PjCFileName: HelpDo.c |
| 152 |
|
| 153 |
*ColAttribute_PJinterface.class: PJinterface |
| 154 |
*ColAttribute_PJinterface.PjName: ColAttribute_PJinterface |
| 155 |
*ColAttribute_PJinterface.PjSwName: ColAttribute |
| 156 |
*ColAttribute_PJinterface.PjParent: Helper |
| 157 |
*ColAttribute_PJinterface.PjFileName: ColAttribute.i |
| 158 |
*ColAttribute_PJinterface.PjShowFlag: 0 |
| 159 |
*ColAttribute_PJinterface.PjDate: 811165733 |
| 160 |
*ColAttribute_PJinterface.PjMode: 0 |
| 161 |
*ColAttribute_PJinterface.PjCFileName: ColAttribute.c |
| 162 |
|
| 163 |
*uxmain.class: PJuxmain |
| 164 |
*uxmain.PjName: uxmain |
| 165 |
*uxmain.PjParent: Helper |
| 166 |
*uxmain.PjFileName: XDo.c |
| 167 |
*uxmain.PjDate: 823540147 |
| 168 |
*uxmain.PjMode: 0 |
| 169 |
*uxmain.PjBody: /*------------------------------------------------------------\ |
| 170 |
* This is the project main program file for Ux generated \ |
| 171 |
* code. You may add application dependent source code\ |
| 172 |
* at the appropriate places. \ |
| 173 |
* \ |
| 174 |
* Do not modify the statements preceded by the dollar\ |
| 175 |
* sign ($), these statements will be replaced with\ |
| 176 |
* the appropriate source code when the main program is\ |
| 177 |
* automatically generated. \ |
| 178 |
* \ |
| 179 |
* $Date: 2003-06-04 14:49:21 $ $Revision: 1.1.1.1 $ \ |
| 180 |
*-----------------------------------------------------------*/\ |
| 181 |
\ |
| 182 |
#ifdef XOPEN_CATALOG\ |
| 183 |
#include <locale.h>\ |
| 184 |
#endif\ |
| 185 |
\ |
| 186 |
#include <UxLib.h>\ |
| 187 |
#include <midas_def.h>\ |
| 188 |
#include <tbldef.h>\ |
| 189 |
#include <signal.h>\ |
| 190 |
\ |
| 191 |
\ |
| 192 |
\ |
| 193 |
\ |
| 194 |
\ |
| 195 |
\ |
| 196 |
/*----------------------------------------------\ |
| 197 |
* Insert application global declarations here\ |
| 198 |
*---------------------------------------------*/\ |
| 199 |
\ |
| 200 |
#include <StdResources.h>\ |
| 201 |
char *osmmget();\ |
| 202 |
static void reread();\ |
| 203 |
char session[3];\ |
| 204 |
char ostchoice[60],claschoice[60],assochoice[60],*colchoice,*coltemp,*rowtext[256];\ |
| 205 |
char commerr[180];\ |
| 206 |
int tidost,tidclas,tidasso,colno,itemsize,do8,doI,rowno,arowno,MonitorPid;\ |
| 207 |
int msgvalue,coltempno,collabchan;\ |
| 208 |
int tidcomm;\ |
| 209 |
Widget row1[40],row2[40],row3[40],rowrule[256][2];\ |
| 210 |
Widget arow1[20],arow2[20],arow3[20],arow4[20];\ |
| 211 |
Widget FileListWidget,sb;\ |
| 212 |
swidget pb, save, crea, ctx, hist, srch, klist,clist,flist,olist,dlist,ilist;\ |
| 213 |
swidget classi,clashaupt,assohaupt,asso,myerror,mymsg,help,attri;\ |
| 214 |
extern swidget create_transientShell3(), \ |
| 215 |
create_transientShell8(),\ |
| 216 |
create_transientShell1(),\ |
| 217 |
create_applicationClas(),\ |
| 218 |
create_Classify(), \ |
| 219 |
create_SelectFrame(),\ |
| 220 |
create_SelectDescrTable(),\ |
| 221 |
create_SelectInstrument(),\ |
| 222 |
create_Association(),\ |
| 223 |
create_Associate(),\ |
| 224 |
create_Warning(),\ |
| 225 |
create_errorDialog1(), \ |
| 226 |
create_HelpDo(),\ |
| 227 |
create_ColAttribute(); \ |
| 228 |
main(argc,argv)\ |
| 229 |
int argc;\ |
| 230 |
char *argv[];\ |
| 231 |
{\ |
| 232 |
/*-----------------------------------------------------------\ |
| 233 |
* Declarations.\ |
| 234 |
* The default identifier - mainIface will only be declared \ |
| 235 |
* if the interface function is global and of type swidget. \ |
| 236 |
* To change the identifier to a different name, modify the\ |
| 237 |
* string mainIface in the file "main.dat". If "mainIface"\ |
| 238 |
* is declared, it will be used below where the return value \ |
| 239 |
* of PJ_INTERFACE_FUNCTION_CALL will be assigned to it.\ |
| 240 |
*-----------------------------------------------------------*/ \ |
| 241 |
\ |
| 242 |
$PJ_INTERFACE_RETVAL_TYPE\ |
| 243 |
int i_cnt,nbytes,i,InterPid;\ |
| 244 |
char mycomm[128]; \ |
| 245 |
\ |
| 246 |
\ |
| 247 |
/*--------------------------------\ |
| 248 |
* Interface function declaration\ |
| 249 |
*-------------------------------*/ \ |
| 250 |
\ |
| 251 |
$PJ_INTERFACE_FUNCTION_DECL\ |
| 252 |
$PJ_INTERFACE_FUNCTION_ARG_DECL\ |
| 253 |
\ |
| 254 |
/*---------------------\ |
| 255 |
* Initialize Program\ |
| 256 |
*--------------------*/\ |
| 257 |
\ |
| 258 |
#ifdef XOPEN_CATALOG\ |
| 259 |
setlocale(LC_ALL, "");\ |
| 260 |
#endif\ |
| 261 |
\ |
| 262 |
UxTopLevel = UxInitialize("$PJ_APP_CLASS_NAME", &argc, argv);\ |
| 263 |
\ |
| 264 |
/*------------------------------------------------------\ |
| 265 |
* Insert initialization code for your application here\ |
| 266 |
*-----------------------------------------------------*/\ |
| 267 |
/*\ |
| 268 |
\ |
| 269 |
*/ \ |
| 270 |
\ |
| 271 |
MonitorPid = atoi(argv[1]);\ |
| 272 |
strcpy(session, argv[2]);\ |
| 273 |
session[2] = '\0'; \ |
| 274 |
\ |
| 275 |
\ |
| 276 |
\ |
| 277 |
/* printf("Version: %s, Mail: %s, Print: %s\nContext: %s\nMidwork: %s\nContexts: %s\n",\ |
| 278 |
midvers, mid_mail, print_com, mid_ctx, mid_work, contxt); */\ |
| 279 |
\ |
| 280 |
SCSPRO("-1"); \ |
| 281 |
osscatch(SIGUSR1,reread); \ |
| 282 |
nbytes = (TBL_LABLEN+1) * 256;\ |
| 283 |
colchoice = osmmget(nbytes);\ |
| 284 |
/* strcpy(colchoice,"IDENT");\ |
| 285 |
\ |
| 286 |
colno = 1;*/\ |
| 287 |
oscfill(colchoice,'\0',nbytes);\ |
| 288 |
for (i=0; i<60; i++) ostchoice[i] = '\0'; \ |
| 289 |
\ |
| 290 |
msgvalue = 1; \ |
| 291 |
nbytes = (TBL_LABLEN+1) * 20;\ |
| 292 |
coltemp = osmmget(nbytes);\ |
| 293 |
\ |
| 294 |
crea = create_transientShell3(); \ |
| 295 |
\ |
| 296 |
klist = create_transientShell8(); \ |
| 297 |
clist = create_transientShell1(); \ |
| 298 |
flist = create_SelectFrame();\ |
| 299 |
dlist = create_SelectDescrTable();\ |
| 300 |
ilist = create_SelectInstrument();\ |
| 301 |
classi = create_applicationClas();\ |
| 302 |
clashaupt = create_Classify();\ |
| 303 |
assohaupt = create_Association(); \ |
| 304 |
myerror = create_errorDialog1(); \ |
| 305 |
asso = create_Associate(); \ |
| 306 |
mymsg = create_Warning();\ |
| 307 |
help = create_HelpDo();\ |
| 308 |
attri = create_ColAttribute();\ |
| 309 |
for (i=0; i<256; i++) {\ |
| 310 |
rowrule[i][0] = (Widget )0;\ |
| 311 |
rowrule[i][1] = (Widget )0; \ |
| 312 |
} \ |
| 313 |
for (i=0; i<40; i++) {\ |
| 314 |
row1[i] = (Widget )0;\ |
| 315 |
row2[i] = (Widget )0;\ |
| 316 |
row3[i] = (Widget )0;\ |
| 317 |
}\ |
| 318 |
for (i=0; i<20; i++) {\ |
| 319 |
arow1[i] = (Widget )0;\ |
| 320 |
arow2[i] = (Widget )0;\ |
| 321 |
arow3[i] = (Widget )0;\ |
| 322 |
arow4[i] = (Widget )0;\ |
| 323 |
}\ |
| 324 |
tidclas = -1;\ |
| 325 |
tidost = -1;\ |
| 326 |
tidasso = -1; \ |
| 327 |
tidcomm = -1;\ |
| 328 |
initmytable();\ |
| 329 |
\ |
| 330 |
\ |
| 331 |
\ |
| 332 |
/*----------------------------------------------------------------\ |
| 333 |
* Create and popup the first window of the interface. The \ |
| 334 |
* return value can be used in the popdown or destroy functions.\ |
| 335 |
* The swidget return value of PJ_INTERFACE_FUNCTION_CALL will\ |
| 336 |
* be assigned to "mainIface" from PJ_INTERFACE_RETVAL_TYPE. \ |
| 337 |
*---------------------------------------------------------------*/\ |
| 338 |
\ |
| 339 |
$PJ_INTERFACE_FUNCTION_CALL\ |
| 340 |
$PJ_POPUP_CALL\ |
| 341 |
\ |
| 342 |
/*-------------------------\ |
| 343 |
* Enter the event loop \ |
| 344 |
*------------------------*/\ |
| 345 |
\ |
| 346 |
$PJ_EVENT_LOOP\ |
| 347 |
\ |
| 348 |
}\ |
| 349 |
\ |
| 350 |
static void reread()\ |
| 351 |
{\ |
| 352 |
extern int tidost,tidcomm ;\ |
| 353 |
extern char ostchoice[60];\ |
| 354 |
int openflag,null;\ |
| 355 |
char command[60];\ |
| 356 |
osscatch(SIGUSR1,reread);\ |
| 357 |
if (tidost != -1 ) { \ |
| 358 |
TCTCLO(tidost);\ |
| 359 |
tidost = -1 ;\ |
| 360 |
}\ |
| 361 |
TCTOPN("TAB_COMM.tbl",F_I_MODE,&tidcomm);\ |
| 362 |
TCERDI(tidcomm,1,4,&openflag,&null);\ |
| 363 |
\ |
| 364 |
if (openflag == 1) {\ |
| 365 |
TCTOPN(ostchoice,F_I_MODE,&tidost);\ |
| 366 |
\ |
| 367 |
add_ident_table(UxGetWidget(UxFindSwidget("identlist"))); \ |
| 368 |
add_col_table(UxGetWidget(UxFindSwidget("readtable")));\ |
| 369 |
} \ |
| 370 |
else { \ |
| 371 |
strcpy(ostchoice,"ost.tbl"); \ |
| 372 |
if (read_ost_table()) display_ident_table(UxGetWidget(UxFindSwidget("identlist")));\ |
| 373 |
}\ |
| 374 |
TCTCLO(tidcomm);\ |
| 375 |
}\ |
| 376 |
\ |
| 377 |
\ |
| 378 |
\ |
| 379 |
|
| 380 |
*uxmain.PjExplicitEventLoop: {\ |
| 381 |
\ |
| 382 |
XEvent event;\ |
| 383 |
\ |
| 384 |
for (;;)\ |
| 385 |
{\ |
| 386 |
UxNextEvent(&event);\ |
| 387 |
\ |
| 388 |
switch (event.type)\ |
| 389 |
{\ |
| 390 |
\ |
| 391 |
/*----------------------------------------------------\ |
| 392 |
* Insert code here to handle any events that you do\ |
| 393 |
* not wish to be handled by the interface.\ |
| 394 |
*----------------------------------------------------*/\ |
| 395 |
\ |
| 396 |
default:\ |
| 397 |
UxDispatchEvent(&event);\ |
| 398 |
break;\ |
| 399 |
}\ |
| 400 |
}\ |
| 401 |
} |
| 402 |
*uxmain.PjEdited: 1 |
| 403 |
*uxmain.PjHasImplicitLoop: 1 |
| 404 |
*uxmain.PjHasExplicitLoop: 0 |
| 405 |
|
| 406 |
*xtmain.class: PJxtmain |
| 407 |
*xtmain.PjName: xtmain |
| 408 |
*xtmain.PjParent: Helper |
| 409 |
*xtmain.PjFileName: XHelp.c |
| 410 |
*xtmain.PjDate: 717121044 |
| 411 |
*xtmain.PjMode: 1 |
| 412 |
*xtmain.PjBody: /*-----------------------------------------------------------\ |
| 413 |
* This is the project main program file for Xt generated \ |
| 414 |
* code. You may add application dependent source code \ |
| 415 |
* at the appropriate places. \ |
| 416 |
* \ |
| 417 |
* Do not modify the statements preceded by the dollar\ |
| 418 |
* sign ($), these statements will be replaced with\ |
| 419 |
* the appropriate source code when the main program is \ |
| 420 |
* generated. \ |
| 421 |
*\ |
| 422 |
* $Date: 2003-06-04 14:49:21 $ $Revision: 1.1.1.1 $ \ |
| 423 |
*-----------------------------------------------------------*/ \ |
| 424 |
\ |
| 425 |
#ifdef XOPEN_CATALOG\ |
| 426 |
#include <locale.h>\ |
| 427 |
#endif\ |
| 428 |
\ |
| 429 |
#include <X11/Intrinsic.h>\ |
| 430 |
#include <X11/StringDefs.h>\ |
| 431 |
\ |
| 432 |
/*---------------------------------------------------- \ |
| 433 |
* UxXt.h needs to be included only when compiling a \ |
| 434 |
* stand-alone application. \ |
| 435 |
*---------------------------------------------------*/\ |
| 436 |
#ifndef DESIGN_TIME\ |
| 437 |
#include "UxXt.h"\ |
| 438 |
#endif /* DESIGN_TIME */\ |
| 439 |
\ |
| 440 |
XtAppContext UxAppContext;\ |
| 441 |
Widget UxTopLevel;\ |
| 442 |
Display *UxDisplay;\ |
| 443 |
int UxScreen;\ |
| 444 |
\ |
| 445 |
/*----------------------------------------------\ |
| 446 |
* Insert application global declarations here\ |
| 447 |
*---------------------------------------------*/\ |
| 448 |
\ |
| 449 |
char contxt[100];\ |
| 450 |
\ |
| 451 |
main(argc,argv)\ |
| 452 |
int argc;\ |
| 453 |
char *argv[];\ |
| 454 |
{\ |
| 455 |
/*-----------------------------------------------------------\ |
| 456 |
* Declarations.\ |
| 457 |
* The default identifier - mainIface will only be declared \ |
| 458 |
* if the interface function is global and of type swidget.\ |
| 459 |
* To change the identifier to a different name, modify the\ |
| 460 |
* string mainIface in the file "xtmain.dat". If "mainIface"\ |
| 461 |
* is declared, it will be used below where the return value\ |
| 462 |
* of PJ_INTERFACE_FUNCTION_CALL will be assigned to it.\ |
| 463 |
*----------------------------------------------------------*/ \ |
| 464 |
\ |
| 465 |
$PJ_INTERFACE_RETVAL_TYPE\ |
| 466 |
int i_cnt;\ |
| 467 |
\ |
| 468 |
/*---------------------------------\ |
| 469 |
* Interface function declaration\ |
| 470 |
*--------------------------------*/ \ |
| 471 |
\ |
| 472 |
$PJ_INTERFACE_FUNCTION_DECL\ |
| 473 |
$PJ_INTERFACE_FUNCTION_ARG_DECL\ |
| 474 |
\ |
| 475 |
/*---------------------\ |
| 476 |
* Initialize program\ |
| 477 |
*--------------------*/\ |
| 478 |
\ |
| 479 |
#ifdef XOPEN_CATALOG\ |
| 480 |
setlocale(LC_ALL, "");\ |
| 481 |
#endif\ |
| 482 |
\ |
| 483 |
UxTopLevel = XtAppInitialize(&UxAppContext, "$PJ_APP_CLASS_NAME",\ |
| 484 |
NULL, 0, &argc, argv, NULL, NULL, 0);\ |
| 485 |
\ |
| 486 |
UxDisplay = XtDisplay(UxTopLevel);\ |
| 487 |
UxScreen = XDefaultScreen(UxDisplay);\ |
| 488 |
\ |
| 489 |
/* We set the geometry of UxTopLevel so that dialogShells\ |
| 490 |
that are parented on it will get centered on the screen\ |
| 491 |
(if defaultPosition is true). */\ |
| 492 |
\ |
| 493 |
XtVaSetValues(UxTopLevel,\ |
| 494 |
XtNx, 0,\ |
| 495 |
XtNy, 0,\ |
| 496 |
XtNwidth, DisplayWidth(UxDisplay, UxScreen),\ |
| 497 |
XtNheight, DisplayHeight(UxDisplay, UxScreen),\ |
| 498 |
NULL);\ |
| 499 |
\ |
| 500 |
/*-------------------------------------------------------\ |
| 501 |
* Insert initialization code for your application here \ |
| 502 |
*------------------------------------------------------*/\ |
| 503 |
\ |
| 504 |
strcpy(contxt,"");\ |
| 505 |
if (argc > 1) {\ |
| 506 |
for (i_cnt=2; i_cnt<=argc; i_cnt++) {\ |
| 507 |
strcat(contxt,argv[i_cnt-1]);\ |
| 508 |
strcat(contxt," ");\ |
| 509 |
contxt[(i_cnt-1)*8] = '\0';\ |
| 510 |
}\ |
| 511 |
}\ |
| 512 |
\ |
| 513 |
strcat(contxt," ");\ |
| 514 |
\ |
| 515 |
/*----------------------------------------------------------------\ |
| 516 |
* Create and popup the first window of the interface. The \ |
| 517 |
* return value can be used in the popdown or destroy functions.\ |
| 518 |
* The Widget return value of PJ_INTERFACE_FUNCTION_CALL will \ |
| 519 |
* be assigned to "mainIface" from PJ_INTERFACE_RETVAL_TYPE. \ |
| 520 |
*---------------------------------------------------------------*/\ |
| 521 |
\ |
| 522 |
$PJ_INTERFACE_FUNCTION_CALL\ |
| 523 |
$PJ_POPUP_CALL\ |
| 524 |
\ |
| 525 |
/*-----------------------\ |
| 526 |
* Enter the event loop \ |
| 527 |
*----------------------*/\ |
| 528 |
\ |
| 529 |
$PJ_EVENT_LOOP\ |
| 530 |
\ |
| 531 |
}\ |
| 532 |
|
| 533 |
*xtmain.PjExplicitEventLoop: {\ |
| 534 |
\ |
| 535 |
XEvent event;\ |
| 536 |
\ |
| 537 |
for (;;)\ |
| 538 |
{\ |
| 539 |
XtAppNextEvent(UxAppContext, &event);\ |
| 540 |
\ |
| 541 |
switch (event.type)\ |
| 542 |
{\ |
| 543 |
\ |
| 544 |
/*---------------------------------------------------\ |
| 545 |
* Insert code here to handle any events that you do\ |
| 546 |
* not wish to be handled by the interface.\ |
| 547 |
*---------------------------------------------------*/\ |
| 548 |
\ |
| 549 |
default:\ |
| 550 |
XtDispatchEvent(&event);\ |
| 551 |
break;\ |
| 552 |
}\ |
| 553 |
}\ |
| 554 |
} |
| 555 |
*xtmain.PjEdited: 1 |
| 556 |
*xtmain.PjHasImplicitLoop: 1 |
| 557 |
*xtmain.PjHasExplicitLoop: 0 |
| 558 |
|
| 559 |
*uxmake.class: PJuxmake |
| 560 |
*uxmake.PjName: uxmake |
| 561 |
*uxmake.PjParent: Helper |
| 562 |
*uxmake.PjFileName: makefile |
| 563 |
*uxmake.PjDate: 823540148 |
| 564 |
*uxmake.PjMode: 0 |
| 565 |
*uxmake.PjBody: ########################################################################\ |
| 566 |
# \ |
| 567 |
# MAKEFILE FOR STAND-ALONE UX CODE APPLICATION.\ |
| 568 |
#\ |
| 569 |
# EXECUTABLE is the name of the executable to be created \ |
| 570 |
# MAIN is the .c file containing your main() function\ |
| 571 |
# INTERFACES is a list of the generated C code files \ |
| 572 |
# APP_OBJS is a (possibly empty) list of the object code\ |
| 573 |
# files that form the non-interface portion of\ |
| 574 |
# your application \ |
| 575 |
#\ |
| 576 |
# In the first three statements, the variables on the right \ |
| 577 |
# of the equal sign will be replaced with their corresponding \ |
| 578 |
# values when the makefile is automatically generated. \ |
| 579 |
#\ |
| 580 |
# $Date: 2003-06-04 14:49:21 $ $Revision: 1.1.1.1 $\ |
| 581 |
#########################################################################\ |
| 582 |
\ |
| 583 |
\ |
| 584 |
include ../../../local/default.mk\ |
| 585 |
\ |
| 586 |
CMAIN = $PJ_MAIN_SRC\ |
| 587 |
CINTERFACES = $PJ_INTERFACES_SRC\ |
| 588 |
EXEC = do\ |
| 589 |
EXECUTABLE = ../../exec/$(EXEC).exe\ |
| 590 |
\ |
| 591 |
MAIN = $(CMAIN:.c=.o)\ |
| 592 |
INTERFACES = $(CINTERFACES:.c=.o)\ |
| 593 |
\ |
| 594 |
APPL_OBJS = alloc.o applic.o splib.o\ |
| 595 |
UX_DIR = ../../GraphLib/libsrc/$(UIMX)\ |
| 596 |
LINC = ../../incl\ |
| 597 |
\ |
| 598 |
UX_LIBPATH = -L../../lib\ |
| 599 |
ST_LIBPATH = ../../../stdred/lib\ |
| 600 |
\ |
| 601 |
X_CFLAGS =\ |
| 602 |
MOTIF_CFLAGS =\ |
| 603 |
\ |
| 604 |
CFLAGS = $(C_OPT) $(DEBUG) $(GUI_OPT) \\ |
| 605 |
-I$(LINC) -I$(INC) -I$(UX_DIR)/include \\ |
| 606 |
$(X_CFLAGS) $(MOTIF_CFLAGS) -DXOPEN_CATALOG \\ |
| 607 |
$(XMINC) $(X11INC)\ |
| 608 |
\ |
| 609 |
# The following object files are provided to work around a motif bug.\ |
| 610 |
# They are not necessarily needed to compile your application.\ |
| 611 |
LIBPATH = $(X11_LIBPATH) $(MOTIF_LIBPATH)\ |
| 612 |
XLIB = $(LIBPATH) $(X_LIBS) $(XOPEN_LIBS)\ |
| 613 |
\ |
| 614 |
LLIB = $(UX_LIBPATH) -luimx -lcom -L$(ST_LIBPATH) -ldo -L$(LIBDIR) -lxcon -lctab -ltw -ltc3 -lmidas\ |
| 615 |
LIBS = $(LIBDIR)/libxcon.a \\ |
| 616 |
$(ST_LIBPATH)/libdo.a \\ |
| 617 |
$(LIBDIR)/libmidas.a\ |
| 618 |
\ |
| 619 |
OBJS = $(MAIN) $(INTERFACES) $(APPL_OBJS) \ |
| 620 |
\ |
| 621 |
all: tmp_makefile $(EXECUTABLE) \ |
| 622 |
\ |
| 623 |
$(EXECUTABLE): $(OBJS) $(LIBS)\ |
| 624 |
$(LDCC) $(OBJS) $(LLIB) $(XLIB) $(MLIB) $(SLIB) -o $(EXECUTABLE)\ |
| 625 |
$(STRIP) $(EXECUTABLE)\ |
| 626 |
@echo "done"\ |
| 627 |
\ |
| 628 |
clean:\ |
| 629 |
$(RM) $(OBJS)\ |
| 630 |
\ |
| 631 |
clean_exec:\ |
| 632 |
$(RM) $(EXECUTABLE)\ |
| 633 |
\ |
| 634 |
\ |
| 635 |
tmp_makefile: makefile\ |
| 636 |
sed -e 's/^MAIN.*//' \\ |
| 637 |
-e 's/^INTERFACES.*//' \\ |
| 638 |
-e 's/^CMAIN/MAIN/' \\ |
| 639 |
-e 's/^CINTERFACES/INTERFACES/' \\ |
| 640 |
-e 's/\([^^]\)\.c/\1\.o/g' \\ |
| 641 |
-e 's/^all: tmp_makefile/all:/' makefile > tmp_makefile\ |
| 642 |
rm -f makefile\ |
| 643 |
mv tmp_makefile makefile\ |
| 644 |
\ |
| 645 |
\ |
| 646 |
\ |
| 647 |
\ |
| 648 |
\ |
| 649 |
\ |
| 650 |
\ |
| 651 |
\ |
| 652 |
|
| 653 |
*uxmake.PjEdited: 1 |
| 654 |
|
| 655 |
*xtmake.class: PJxtmake |
| 656 |
*xtmake.PjName: xtmake |
| 657 |
*xtmake.PjParent: Helper |
| 658 |
*xtmake.PjFileName: makefile |
| 659 |
*xtmake.PjDate: 717121044 |
| 660 |
*xtmake.PjMode: 1 |
| 661 |
*xtmake.PjBody: #########################################################################\ |
| 662 |
#\ |
| 663 |
# MAKEFILE FOR STAND-ALONE XT CODE APPLICATION. \ |
| 664 |
#\ |
| 665 |
# EXECUTABLE is the name of the executable to be created \ |
| 666 |
# MAIN is the .c file containing your main() function \ |
| 667 |
# INTERFACES is a list of the generated C code files\ |
| 668 |
# APP_OBJS is a (possibly empty) list of the object code\ |
| 669 |
# files that form the non-interface portion of\ |
| 670 |
# your application\ |
| 671 |
#\ |
| 672 |
# In the first three statements, the variables on the right \ |
| 673 |
# of the equal sign will be replaced with their corresponding\ |
| 674 |
# values when the makefile is automatically generated.\ |
| 675 |
#\ |
| 676 |
# This template is used for makefiles which do not reference \ |
| 677 |
# the Ux runtime library.\ |
| 678 |
#\ |
| 679 |
# $Date: 2003-06-04 14:49:21 $ $Revision: 1.1.1.1 $\ |
| 680 |
#########################################################################\ |
| 681 |
\ |
| 682 |
CC = cc\ |
| 683 |
EXECUTABLE = ../../exec/Xhelp.exe\ |
| 684 |
# before : $PJ_EXECUTABLE\ |
| 685 |
MAIN = $PJ_MAIN_SRC\ |
| 686 |
INTERFACES = $PJ_INTERFACES_SRC\ |
| 687 |
APPL_OBJS = UxXt.o\ |
| 688 |
UX_DIR = ../..\ |
| 689 |
UX_LIBPATH = $(UX_DIR)/lib\ |
| 690 |
X_LIBS = -lXm -lXt -lX11\ |
| 691 |
LINC = ../../incl\ |
| 692 |
MINC = ../../../incl\ |
| 693 |
\ |
| 694 |
#DEBUG = -g\ |
| 695 |
STRIP = strip\ |
| 696 |
DEBUG = \ |
| 697 |
REPAIR = ../utils/lex.yy\ |
| 698 |
\ |
| 699 |
X_LIBPATH = $(MIDASHOME)/$(MIDVERS)/gui/libX11\ |
| 700 |
MOTIF_LIBPATH = $(MIDASHOME)/$(MIDVERS)/gui/libXm\ |
| 701 |
X_CFLAGS = \ |
| 702 |
MOTIF_CFLAGS = \ |
| 703 |
\ |
| 704 |
CFLAGS = -D_NO_PROTO -I$(LINC) -I$(MINC) -I$(UX_DIR)/include \\ |
| 705 |
$(X_CFLAGS) $(MOTIF_CFLAGS)\ |
| 706 |
\ |
| 707 |
LIBPATH = -L$(X_LIBPATH) -L$(MOTIF_LIBPATH)\ |
| 708 |
\ |
| 709 |
# The following object files are provided to work around a motif bug.\\ |
| 710 |
# They are not necessarily needed to compile your application.\\ |
| 711 |
#LIBS = $(UX_LIBPATH)/Destroy.o $(UX_LIBPATH)/Desktop.o \\ |
| 712 |
# $(X_LIBS)\ |
| 713 |
\ |
| 714 |
LIBS = $(X_LIBS)\ |
| 715 |
\ |
| 716 |
MIDASMON = ../../../monit\ |
| 717 |
MIDASLIB = ../../../lib\ |
| 718 |
MIDASLB = $(MIDASMON)/dspout.o $(MIDASMON)/helpme.o \\ |
| 719 |
$(MIDASLIB)/midaslib.a -lm\ |
| 720 |
INTERFACE_SRC = $PJ_INTERFACES_SRC\ |
| 721 |
INTERFACE_OBJ = $(INTERFACES:.c=.o)\ |
| 722 |
OBJS = $(MAIN:.c=.o) $(INTERFACES:.c=.o) $(APPL_OBJS)\ |
| 723 |
\ |
| 724 |
.SUFFIXES: .o .c\ |
| 725 |
\ |
| 726 |
.c.o:\ |
| 727 |
$(CC) -c $(DEBUG) $(CFLAGS) $< -o $@\ |
| 728 |
\ |
| 729 |
$(EXECUTABLE): $(OBJS)\ |
| 730 |
$(CC) $(OBJS) $(LIBPATH) $(LIBS) $(MIDASLB) -o $(EXECUTABLE)\ |
| 731 |
$(STRIP) $(EXECUTABLE)\ |
| 732 |
@echo "done"\ |
| 733 |
\ |
| 734 |
$(INTERFACE_OBJ):\ |
| 735 |
$(REPAIR) <$(INTERFACE_SRC) > .tmp\ |
| 736 |
mv .tmp $(INTERFACE_SRC)\ |
| 737 |
$(CC) -c $(DEBUG) $(CFLAGS) $(INTERFACE_SRC) -o $@\ |
| 738 |
\ |
| 739 |
\ |
| 740 |
clean:\ |
| 741 |
rm -f $(OBJS)\ |
| 742 |
\ |
| 743 |
clean_exec:\ |
| 744 |
rm -f $(EXECUTABLE)\ |
| 745 |
|
| 746 |
*xtmake.PjEdited: 1 |