Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!tuvie!inst182 From: inst182@tuvie (Inst.f.Techn.Informatik) Newsgroups: comp.sys.apollo Subject: trouble with cc Message-ID: <1047@tuvie> Date: 4 Jan 90 11:10:52 GMT Organization: TU Vienna EDP-Center, Vienna, AUSTRIA Lines: 151 Th Apollo C Compiler seems to have problems when initializing typedef'd structures. This is especialliy disturbing when compiling X-programs, since initializing structures becomes virtually impossible. Has anybody had a similar problem and found a solution ? Michael K. Gschwind ...!uunet!mcsun!tuvie!vlsivie!gschwind -------------------------------------------------------------------------------- /* * SCCS ID : @(#)xpclock.h 1.2 11/1/89 * * xpclock.h - Header for Pendulum Clock for X11 * * Author: Kazuhiko Shutoh, 1989. * * Permission to use, copy, modify and distribute without charge this software, * documentation, images, etc. is granted, provided that this comment and the * author's name is retained. The author assumes no responsibility for lost * sleep as a consequence of use of this software. * * Send any comments, bug reports, etc. to: shutoh@isl.yamaha.co.jp or, for * oversea: shutoh%isl.yamaha.co.jp%kddlab@uunet.uu.net * */ #define PI 3.141592654 #define ON 1 #define OFF 0 #define CLOCKFACE_UPDATE 5000 /* Number vector :-) fonts */ typedef struct { double x1; double y1; double x2; double y2; } NumberSegment; typedef struct { NumberSegment segment[5]; } NumberSegmentRec; NumberSegmentRec num_segments[12] = { { {0, 0, 0, 2}, /* 1 */ {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} }, { {0, 0, 0, 2}, /* 2 */ {1, 0, 1, 2}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} }, { {0, 0, 0, 2}, /* 3 */ {1, 0, 1, 2}, {2, 0, 2, 2}, {0, 0, 0, 0}, {0, 0, 0, 0} }, { {0, 0, 0, 2}, /* 4 */ {1, 0, 1.5, 2}, {1.5, 2, 2, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} }, { {0, 0, 0.5, 2}, /* 5 */ {0.5, 2, 1, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} }, { {0, 0, 0.5, 2}, /* 6 */ {0.5, 2, 1, 0}, {2, 0, 2, 2}, {0, 0, 0, 0}, {0, 0, 0, 0} }, { {0, 0, 0.5, 2}, /* 7 */ {0.5, 2, 1, 0}, {2, 0, 2, 2}, {3, 0, 3, 2}, {0, 0, 0, 0} }, { {0, 0, 0.5, 2}, /* 8 */ {0.5, 2, 1, 0}, {2, 0, 2, 2}, {3, 0, 3, 2}, {4, 0, 4, 2} }, { {0, 0, 0, 2}, /* 9 */ {1, 0, 2, 2}, {2, 0, 1, 2}, {0, 0, 0, 0}, {0, 0, 0, 0} }, { {0, 0, 1, 2}, /* 10 */ {0, 2, 1, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} }, { {0, 0, 1, 2}, /* 11 */ {0, 2, 1, 0}, {2, 0, 2, 2}, {0, 0, 0, 0}, {0, 0, 0, 0} }, { {0, 0, 1, 2}, /* 12 */ {0, 2, 1, 0}, {2, 0, 2, 2}, {3, 0, 3, 2}, {0, 0, 0, 0} } }; /* Resource for Clock Widget */ static XrmOptionDescRec options[] = { {"-chime", "*clock.chime", XrmoptionNoArg, "TRUE"}, {"-hd", "*clock.hands", XrmoptionSepArg, NULL}, {"-hands", "*clock.hands", XrmoptionSepArg, NULL}, {"-hl", "*clock.highlight", XrmoptionSepArg, NULL}, {"-highlight", "*clock.highlight", XrmoptionSepArg, NULL}, {"-update", "*clock.update", XrmoptionSepArg, NULL}, {"-padding", "*clock.padding", XrmoptionSepArg, NULL}, {"-d", "*clock.analog", XrmoptionNoArg, "FALSE"}, {"-digital", "*clock.analog", XrmoptionNoArg, "FALSE"}, {"-analog", "*clock.analog", XrmoptionNoArg, "TRUE"}, }; --------------------------------------------------------------------------------