🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.codewarrior
Article #1362

Re: MSL C.PPC.Lib (pro 5 -> pro 6)

#1362
From: Steve Roy
Date: Wed, 01 Nov 2000 19:47
44 lines
2496 bytes
Eric Albert <ejalbert@stanford.edu> wrote:

> Hmph...that explains exactly why our CS department's libraries don't
> work with Pro 6.  Thanks for diagnosing the problem for me. :)
> 
> -Eric, who doesn't know how he can solve the problem because he might
> not have source for those libraries....

The solution to my problem was suggested by someone at Metrowerks. I created
a file containing the following code borrowed from MSL and built it as a
library. This satisfied the linker for my old third-party library.

#include <eof.h>

#ifdef __cplusplus
extern "C" {
#endif

int tolower(int c);
int toupper(int c);

#ifdef __cplusplus
}
#endif

extern  unsigned char   __lower_map[];
extern  unsigned char   __upper_map[];

#define __zero_fill(c)     ((int) (unsigned char) (c))

int tolower(int c)
{
    return ((c == EOF) ? EOF : ((int)__lower_map[__zero_fill(c)]));
}

int toupper(int c)
{
    return ((c == EOF) ? EOF : ((int)__upper_map[__zero_fill(c)]));
}

Steve

-- 
Steve Roy <sroy@mac.com>
Technical Details
Message-ID: <B625DD7A.B159%sroy@mac.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!xfer13.netnews.com!netnews.com!howland.erols.net!sunqbc.risq.qc.ca!wesley.videotron.net!wagner.videotron.net.POSTED!not-for-mail
References: <8tk79f$2lr$1@mserv2.dl.ac.uk> <301020000939458133%hawkfish@spam.invalid> <mwron-3010001520420001@c243286-a.bcreek1.mi.home.com> <311020000806020209%hawkfish@spam.invalid> <mwron-3110001625120001@c243286-a.bcreek1.mi.home.com> <B624F315.7277%sroy@mac.com> <mwron-3110002339040001@c243286-a.bcreek1.mi.home.com> <B6258DA8.B01F%sroy@mac.com> <ejalbert-054A94.11063801112000@nntp.stanford.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bcce,9cbd3180af8f803b
X-Google-Attributes: gid10bcce,public
X-Google-Thread: f635e,9cbd3180af8f803b
X-Google-Attributes: gidf635e,public
X-Google-ArrivalTime: 2000-11-01 11:51:40 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!xfer13.netnews.com!netnews.com!howland.erols.net!sunqbc.risq.qc.ca!wesley.videotron.net!wagner.videotron.net.POSTED!not-for-mail
User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022
Subject: Re: MSL C.PPC.Lib  (pro 5 -> pro 6)
From: Steve Roy <sroy@mac.com>
Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac
Message-ID: <B625DD7A.B159%sroy@mac.com>
References: <8tk79f$2lr$1@mserv2.dl.ac.uk> <301020000939458133%hawkfish@spam.invalid> <mwron-3010001520420001@c243286-a.bcreek1.mi.home.com> <311020000806020209%hawkfish@spam.invalid> <mwron-3110001625120001@c243286-a.bcreek1.mi.home.com> <B624F315.7277%sroy@mac.com> <mwron-3110002339040001@c243286-a.bcreek1.mi.home.com> <B6258DA8.B01F%sroy@mac.com> <ejalbert-054A94.11063801112000@nntp.stanford.edu>
Mime-version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit
Lines: 46
Date: Wed, 01 Nov 2000 14:47:22 -0500
NNTP-Posting-Host: 24.201.139.60
X-Complaints-To: abuse@videotron.net
X-Trace: wagner.videotron.net 973108043 24.201.139.60 (Wed, 01 Nov 2000 14:47:23 EST)
NNTP-Posting-Date: Wed, 01 Nov 2000 14:47:23 EST