XmacII color name lookup problems

X Windows x at springer.Apple.COM
Fri Oct 12 07:56:27 AEST 1990


In article <2463 at root44.co.uk>, kieron at root.co.uk (Kieron Drake) writes:
|> 
|> DESCRIPTION:
|> 
|>     As above for symptoms. The problem was that under this version of A/UX
|>     the documentation, and implementation, of the dbm routines differ
|>     from almost everybody else's. The normal (non-NDBM) version has fetch
|>     defined as:
|> 	datum fetch(datum key);
|>     but A/UX has it as:
|> 	datum *fetch(datum key);
|> 
|>     Note that the man page and the implementation agree on the latter
|>     interpretation but the declaration of fetch() in /usr/include/dbm.h
|>     is in the former style!
|> 

Actually the man page is wrong, /usr/include/dbm.h and the source for
fetch in our dbm.c agree:

datum
fetch(key)
        datum key;
{
...
}

As for your problem, I think the fault is in rgb.c where the compiler
errs :-( . To wit --

springer.x 203% rlog rgb.c

RCS file:        RCS/rgb.c,v;   Working file:    rgb.c
head:            1.2
locks:           ;  strict
access list:     x  mgchow  peters  davep
symbolic names:  v2_1d3: 1.2;  GoldenMaster: 1.2;  R4UpdateAlpha1: 1.2;
comment leader:  " * "
total revisions: 2;    selected revisions: 2
description:
Initial Apple Check In.
----------------------------
revision 1.2
date: 90/01/08 21:43:17;  author: x;  state: Exp;  lines added/del: 3/3
pcc blows code generation for e.g. rgb.red = (red * 65535)/255,
emitting a divs.w. Forced assignement to a long to fix it. SCP.
----------------------------
revision 1.1
date: 90/01/08 21:30:16;  author: x;  state: Exp;
Initial revision
========================================================================
======
springer.x 204% rcsdiff -c -r1.1 rgb.c
RCS file: RCS/rgb.c,v
retrieving revision 1.1
diff -c -r1.1 rgb.c
*** /tmp/,RCSt1a03577   Thu Oct 11 15:09:46 1990
--- rgb.c       Tue May 29 14:10:15 1990
***************
*** 118,126 ****
                name[i] = tolower (name[i]);
        }
        key.dsize = n;
!       rgb.red = (red * 65535) / 255;
!       rgb.green = (green * 65535) / 255;
!       rgb.blue = (blue * 65535) / 255;
        if (dbm_store (rgb_dbm, key, content, DBM_REPLACE)) {
            fprintf (stderr, "%s:  store of entry \"%s\" failed\n",
                     ProgramName, name);
--- 118,126 ----
                name[i] = tolower (name[i]);
        }
        key.dsize = n;
!       rgb.red = red = (red * 65535) / 255;
!       rgb.green = green = (green * 65535) / 255;
!       rgb.blue = blue = (blue * 65535) / 255;
        if (dbm_store (rgb_dbm, key, content, DBM_REPLACE)) {
            fprintf (stderr, "%s:  store of entry \"%s\" failed\n",
                     ProgramName, name);


Steve Peters
X Project Leader
Apple Computer, Inc.
peters at apple.apple.com



More information about the Comp.unix.aux mailing list