*BSD News Article 44311


Return to BSD News archive

Xref: sserve comp.unix.bsd.misc:67 comp.unix.programmer:25689
Newsgroups: comp.unix.bsd.misc,comp.unix.programmer
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.uwa.edu.au!classic.iinet.com.au!news.uoknor.edu!news.ecn.uoknor.edu!paladin.american.edu!gatech!howland.reston.ans.net!spool.mu.edu!uwm.edu!uwvax!uchinews!twpierce
From: Tim Pierce <twpierce@midway.uchicago.edu>
Subject: ctype.h in BSD: isspecial bug?
X-Nntp-Posting-Host: kimbark.uchicago.edu
Message-ID: <D8uzq4.7nx@midway.uchicago.edu>
Sender: news@midway.uchicago.edu (News Administrator)
Organization: Vinegar Cabal
Date: Sat, 20 May 1995 04:15:16 GMT
Lines: 32

My apologies if this is a FAQ; I checked several
obvious-looking places and saw nothing on the subject.

I'm running FreeBSD 2.0 and came across some interesting
potential bogosity in ctype.h.  Excerpts follow:

  /*
   * Copyright (c) 1989, 1993
   *	The Regents of the University of California.  All rights reserved.
   * (c) UNIX System Laboratories, Inc.
   * ...
   *	@(#)ctype.h	8.4 (Berkeley) 1/21/94
   */

  #define	_T	0x00100000L		/* Special */
  #define	_Q	0x00200000L		/* Phonogram */

  #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
  #define	isphonogram(c)	__istype((c), _T)
  #define	isspecial(c)	__istype((c), _Q)

Now, this looks to *me* as though the definitions for
isspecial and isphonogram were reversed.  I have no man page
on these particular ctype macros and have neither seen nor
heard of them before, so it's hard for me to say.

Any ideas?

-- 
By sending unsolicited commercially-oriented e-mail to this address, the 
sender agrees to pay a $100 flat fee to the recipient for proofreading 
services.