home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
r
/
ril.zip
/
ril_main.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-09-08
|
2KB
|
80 lines
/* -*- Mode: C -*-
* main.c
*
* Description : Demo program using RIL and WCL
*
* Author : roger
* Created On : Fri Apr 24 19:42:25 1992
*
* Configuration Management
*
* @(#)ril_main.c 1.1 6/17/92
*
* VERSION SPR MODIFIER DATE AND TIME
* 1.3 0 rogerr Tue Jul 28 14:11:13 1992
* use basename of file for class name
* 1.2 0 rogerr Tue Jul 14 16:43:17 1992
* fix up
*
*/
#include <stdio.h>
#include <Xm/Xm.h>
#include <X11/Wc/WcCreate.h>
extern void MriRegisterMotif();
#include <ril.h>
Widget appShell;
XtAppContext appContext;
main ( argc, argv )
int argc;
char* argv[];
{
char *appClass, *appName, filename[80];
XtActionsRec actions;
if ((appName = (char*)strrchr(argv[0], '/')) != NULL)
++appName;
else
appName = argv[0];
if (argv[1] == NULL)
{
fprintf (stderr, "ril file name required\n");
exit(-1);
}
if ((appClass = (char*)strrchr(argv[1], '/')) != NULL)
++appClass;
else
appClass = argv[1];
#if 1
appShell = rilInitialize(&appContext, appClass, NULL, 0,
&argc, argv, NULL,
NULL, 0);
#else
appShell = XtAppInitialize(&appContext, appClass, NULL, 0,
&argc, argv, NULL,
NULL, 0);
#endif
/* -- Register all Motif classes and constructors */
MriRegisterMotif (appContext);
/* -- Create widget tree below toplevel shell using Xrm database */
WcWidgetCreation (appShell);
/* -- Realize the widget tree and enter the main application loop */
XtRealizeWidget (appShell);
XtAppMainLoop (appContext);
}