source: trunk/athena/lib/Xj/StrToOrient.c @ 12350

Revision 12350, 1.1 KB checked in by ghudson, 26 years ago (diff)
Some RCS ID cleanup: delete $Log$ and replace other RCS keywords with $Id$.
Line 
1/*
2 * $Id: StrToOrient.c,v 1.2 1999-01-22 23:17:00 ghudson Exp $
3 *
4 * Copyright 1990, 1991 by the Massachusetts Institute of Technology.
5 *
6 * For copying and distribution information, please see the file
7 * <mit-copyright.h>.
8 *
9 */
10
11#if  (!defined(lint))  &&  (!defined(SABER))
12static char *rcsid =
13"$Id: StrToOrient.c,v 1.2 1999-01-22 23:17:00 ghudson Exp $";
14#endif
15
16#include "mit-copyright.h"
17#include "Jets.h"
18
19/*
20 * String to Orientation conversion
21 */
22int StrToOrientation(display, window, where, resource, type, address)
23     Display *display;
24     Window window;
25     caddr_t where;
26     XjResource *resource;
27     char *type;
28     caddr_t address;
29{
30  if (strcasecmp(address, XjVertical) == 0)
31    {
32      *((int *)((char *)where + resource->resource_offset)) = Vertical;
33      return 0;
34    }
35
36  if (strcasecmp(address, XjHorizontal) == 0)
37    {
38      *((int *)((char *)where + resource->resource_offset)) = Horizontal;
39      return 0;
40    }
41
42  *((int *)((char *)where + resource->resource_offset)) = Vertical;
43
44  {
45    char errtext[100];
46    sprintf(errtext, "bad orientation value: %s", address);
47    XjWarning(errtext);
48  }
49  return 0;
50}
Note: See TracBrowser for help on using the repository browser.