* Alpha Xlib Problem
@ 1993-07-23 18:35 Robert Benites
0 siblings, 0 replies; only message in thread
From: Robert Benites @ 1993-07-23 18:35 UTC (permalink / raw)
I have a program that runs fine on Ultrix 4.3 but when I
compile and run the same program on OSF/1 on an alpha it
blows. The following excerpt from the program is simply
trying to take an X parameter name and value from the
command line and print it. I have determined that
there is some kind of alignment problem with the
"database" argument to one of the Xrm* (ParseCommand,
GetResource) calls. If an int variable (chgcount
below) is defined before the commandlineDB variable
the program will bomb.
When I run lint on the source using the -Q option I get
the following warnings:
"llib-lc.c", line 452: warning: function memccpy type
inconsistent
"llib-lc.c", line 453: warning: function memchr type
inconsistent
These bring to mind comments made by tsnee@gibbs.oit.unc.edu
regarding problems with dbm and gdbm in a recent post.
Anyone have any ideas about what to do or how to
proceed from here?
Thanks!
Bob Benites
benites@cs.unca.edu
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>
#include <stdio.h>
#include <strings.h>
static XrmOptionDescRec opTable[] =
{
{ "-font", "*font", XrmoptionSepArg,
(XPointer) "default?"},
{ "-display", ".display", XrmoptionSepArg,
(XPointer) NULL}
} ;
void main(int argc, char **argv)
{
#ifdef BOMB
int chgcount;
#endif
XrmDatabase commandlineDB ;
XrmValue value;
char resource_name[100] ;
char *str_type[20];
resource_name[0] = '\0' ;
printf("doing XrmInitialize\n");
XrmInitialize() ;
printf("doing XrmParseCommand\n");
XrmParseCommand(&commandlineDB, opTable, 2,
argv[0], &argc, argv) ;
printf("XrmGetResource (display) from cmdline\n");
if (XrmGetResource(commandlineDB, "mandel.display",
"Mandel.Display",
str_type, &value) == True)
(void) strncpy(resource_name, value.addr,
(int) value.size) ;
printf("%s\n",resource_name);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1993-07-23 18:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-07-23 18:35 Alpha Xlib Problem Robert Benites
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox