HDTenEightyP/NetNews huggingface dataset:
From: "peter curran" <peter.curran@canrem.com>
Subject: Re: Questions about token merging and trigraphs
Reply-To: "peter curran" <peter.curran@canrem.com>
Organization: Canada Remote Systems
Distribution: comp
Date: 19 Dec 92 19:41:38 EST


tanner@cdis-1.compu.com (Dr. T. Andrews) write (in part) ...

DT>Second, utility: the most commonly-cited character set for  which
DT>trigraphs are ``justified'', EBCDIC, certainly has the characters
DT>in question.  Disagreement on  print-train  convention  may  mean
DT>that  some  people  see  different  characters  in place of their
DT>expected, on some of their printers.  A  similar  problem  exists
DT>for  people  whose  terminals  replace  certain  ASCII characters
DT>according to local preference.

DT>This means that, without trigraphs, some  people  would  have  to
DT>accept  what  their printers give; others would have to configure
DT>terminals to show the ASCII characters when writing C.  It is not
DT>clear that trigraphs are preferable.

A written language, such as C, is *defined* in terms of its
*appearance*, not by the magic numbers used in some environments,
such as computers, to encode that appearance.  A program that
does not appear correctly is *wrong*, regardless of whether or
not some compiler manages to make sense of it.

Trigraphs allow a C program to appear correctly on a much larger
set of display devices that would be possible without them (or
some comparable facility).  Admittedly, that appearance may be
ugly, but it can still be correct.  This facility is essential
to a language intended for international use, and that was
clearly (and correctly, IMHO) the committee's intent.  ISO could
never have accepted the standard without such a facility.

I would have liked to have seen some feature, similar to a
standardized "#pragma," to enable the use of trigraphs (although
a #pragma statement could not be used, since '#' is one of the
characters that requires a trigraph).  That would have avoided
breaking existing code, and would not have complicated life
much for those forced to use trigraphs.  (It would not have
broken existing code that used trigraphs, since there was none
before the standard was written.)  However, regardless of the
details, trigraphs, or something similar, are a necessary evil.

Peter Curran
Usenet: peter.curran@canrem.com     RIME: CRS (#118)
---
  DeLuxe 1.25 #12339  
--
Canada Remote Systems  - Toronto, Ontario
World's Largest PCBOARD System - 416-629-7000/629-7044
From: scjones@thor.sdrc.com (Larry Jones)
Newsgroups: comp.lang.c
Subject: Re: Interesting bug
Date: 19 Dec 92 19:11:58 GMT

In article <92353.203941SML108@psuvm.psu.edu>, SML108@psuvm.psu.edu writes:
> void routine (x)
> int *x;
> {
>   int x;
> }
> 
> My compiler did not trap this as an error...  Shouldn't it?  Or at least
> give a warning?

If it claims to be an ANSI compiler, then it should have produced some
kind of diagnostic.  Most pre-ANSI compilers, however, considered the
parameters to be at an outer scope level than the local variables which
makes this a perfectly valid override.
----
Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH  45150-2789  513-576-2070
larry.jones@sdrc.com  or  ...uunet!sdrc!larry.jones
I've got to start listening to those quiet, nagging doubts. -- Calvin
From: John.Gibney@f386.n632.z3.fidonet.org (John Gibney)
Newsgroups: comp.lang.c
Subject: Re: barchart.c using bcc
Date: Sat, 12 Dec 1992 16:28:04

 -=> Quoting Srk106@psuvm.psu.edu to All <=-

 Sr> From: Senthil Ramas Kumar <SRK106@psuvm.psu.edu>
 Sr> Organization: Penn State University

[... text deleted ...]

 Sr> It compiles well from the IDE, but with the command line version I get
 Sr> the *linker* error saying that calls like "getmaxx, getmaxy, bar3d et
 Sr> al" are not to be found or something equivalent.

The functions you quote are in the GRAPHICS.LIB library, so
you need to specify them on the command line, viz:-

   C:\>bcc prog.cpp mylib.lib graphics.lib

Hope this helps.


John  :-)

... RAM DISK is NOT an installation procedure!
___ Blue Wave/QWK v2.10

 * Origin: Eastern Mail Centre [PEP] OZ. +61-3-725-1621 (3:632/386)
Newsgroups: comp.lang.c
From: alex@mips.complang.tuwien.ac.at (Alexander Forst)
Subject: Re: RFD: splitting comp.lang.c
Organization: Technical University of Vienna
Date: Thu, 17 Dec 1992 11:16:19 GMT

Wuuuaaaaaaahhhh.......

	comp.lang.c.helpmekeepmyjob
and
	comp.lang.c.nuke.sub.commander

are my favourites!!
That statements made me laugh all day!!! Great!!


Perhaps
	comp.lang.c.canyoudomyworkforme

should be another one.
 
-----------------------------------------------------------------------------
"Dad! You shot the Flanders-Zombie!"       |          Alexander Forst
              "He was a Zombie?"           |  alex@mips.complang.tuwien.ac.at
                                           |  University of Technology Vienna
                    Bart & Homer Simpson   |  Institute of Computer Languages
-----------------------------------------------------------------------------
From: John.Gibney@f386.n632.z3.fidonet.org (John Gibney)
Newsgroups: comp.lang.c
Subject: Re: c programming questi
Date: Sat, 12 Dec 1992 21:51:08

 -=> Quoting Daniel.seewerC programming question undrc.com to All <=-

 Da> From: daniel.seewer@sdrc.com (Dan Seewer)
 Da> Organization: SDRC

 Da> How can I, in C under VMS, truncate a file but preserve the 
 Da> version number (I want to preserve all the filesystem specifics about
 Da> the file).  I trying to using fopen() and have tried the following

[... text deleted ...]

 Da> This really seems like a simple thing to do but I have yet to come up
 Da> with an elegant solution for it under VMS (under UNIX it works just
 Da> fine).

Do you *have* to maintain the version number for a specific
reason?  Can you let RMS do it for you?; i.e.

        $ set file/version_limit=1 DATA.DAT

I don't have access to the doc set but I'd imagine you'd be
able to use RMS/RTL routines or the system services to do
what you want...  Using good ol' FORTRAN and BASIC doesn't
cause any problems here! ;-)


John  :-)

... The VMS MasterHarper!
___ Blue Wave/QWK v2.10

 * Origin: Eastern Mail Centre [PEP] OZ. +61-3-725-1621 (3:632/386)
From: d_north@ondec.lonestar.org (David G. North, CCP)
Newsgroups: comp.lang.c
Subject: Re^2: What do you say.
Date: 9 Dec 92 03:28:47 GMT
Distribution: na
Organization: onDEC systems, Dallas, TX

In article <1992Dec7.233600.20693@kpc.com>,
 hollasch@kpc.com (Steve Hollasch) writes:
> droelke@spirit.aud.alcatel.com (Daniel R. Oelke) writes:
> | 
> | What do you say to a co-worker who asks you "What is the difference 
> | between equals and equals equals?"  
> | 
> | (and this guy was hired especially for software developement in C)
> | 
> | 
> |    :-(   :-(   :-(   :-(   :-(   :-(   :-(   :-(   :-(   :-(   :-(   :-(
> 
>     Hmmmm, I'm surprised this has stumped you.
> 
>     You say "equals is used in C to denote assignment, and equals equals is
> used to denote a comparison between objects for equality."
> 
>     Seems easy enough to me; how long have you been writing code?
Steve... am _I_ taking you too seriously, or did you misinterpret the original
question?  I'd guess that one or both of us missed a level of indirection here.

How about a counter-question:

  'Do you know where the door is?'

     -- well don't let it hit you on the butt on the way out...
-- 
David G. North, CCP
d_north@ondec.lonestar.org {...!texsun!montagar!ondec!d_north}
onDEC systems                                 "Everyone's crazy but you & me...
P.O.Box 795848, Dallas TX  75379-5848          and come to think about it, I'm
(214)985-1316 ... (214)902-3957                not so sure about you either!"
Xref: sparky comp.lang.c:18534 comp.lang.c++:18127 comp.lang.pascal:7550
From: CT80@music.mus.polymtl.ca (Steph)
Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.pascal
Subject: Re: Encryption algorythm/code needed...
Date: 13 Dec 92 21:32:59 GMT
Organization: Ecole Polytechnique de Montreal

In article <1992Dec8.131745.13670@ncsu.edu> jlnance@eos.ncsu.edu (JAMES LEWIS NANCE) writes:
>
>In article <1992Dec7.160128.18678@sbcs.sunysb.edu>, clane@csws2.ic.sunysb.edu (Charles F Lane) writes:
>|>
>|> >the usernames and passwords.  The code need not be extravagent...  I only
>|> >need to encrypt single words (letters and numbers both).
>|> >
>
>|> A very easy way to encrypt data is to use a random number generator.  Suppose
>|> you have a string "CHAIR".  Assign a value to your random number generator's
>|> seed.  Then add random(256) to the ord of the first character (C, in this
>|> case), then random(256) + ord("H"), random(256) + ord("A"), etc.  When adding
>|> the random number you should wrap around if the sum is > 255.  In tp just
>|> disable range checking.  Decrypting is just as easy -- reassign the original
>|> seed value and subtract the "random" number rather than adding.  Code (TP) to
>|> encrypt/decrypt a string follows:
>|>
>
>Be careful if you use this, as it is not secure encode multiple things using
>the same starting seed.  For example, if you keep your entries like this:
>
>myusername:mypasswd
>urusername:urpasswd
>
>And you encrypt each line using this method, starting with the same initial
>seed, then I can take my username and password, which I know and figure out
>what you added to them to encrypt them.  Then I can subtract these numbers
>from your username and your passwd.  Since they were encrypted with the same
>method and the same key, this will give me your unencrypted name and password.
>
>
>
>Jim
>.
>.
I used the same method, with a variant : I would seed a new value to
my random number generator, based on the current letter.  So, you
start the same way (one seed), but then the encrypted data will not
be the same at all after but a few letters since the random number
generator will be shooting 'totally' different numbers.

<


Steph.
Who needs a .sig?
From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
Newsgroups: comp.lang.c
Subject: Re: Question to test general C knowledge
Date: 12 Dec 92 22:45:41 GMT
Organization: McGill Research Centre for Intelligent Machines

In article <1992Dec11.175620.20308@crd.ge.com>, volpe@bart.NoSubdomain.NoDomain (Christopher R Volpe) writes:
> In article <PTmLVB4w165w@quest.UUCP>, kdq@quest.UUCP (Kevin D. Quitt) writes:
>> jfw@ksr.com (John F. Woods) writes:

>>> 	int i = 2;
>>> 	i = ++i;
>> If they say other than "it's undefined", *then* don't hire them.
> This is an interesting question.  Is the value of I really being
> modified more than once?  There are two assignment operations going
> on, true.  But, does assigning a variable the value that it already
> has constitute a modification?

It may not have that value yet, if the increment side-effect is
deferred.

					der Mouse

			    mouse@larry.mcrcim.mcgill.edu
Newsgroups: comp.lang.c
From: scott@sae.com (Scott Mansfield)
Subject: Re: ISAM routines
Reply-To: scott@sae.com
Organization: Template Software
Date: Wed, 16 Dec 1992 13:39:39 GMT

Informix has a product called C-ISAM.  It is relatively cheap ~$500.

---
________________________________________________________________________________
      Scott A. Mansfield                Template Software
      (703) 318-1000                    13100 Worldgate Drive, Suite 340
      uunet!template!scott              Herndon, VA 22070-4382
      scott@template.com                Fax: (703) 318-7378
________________________________________________________________________________

Newsgroups: comp.lang.c
From: scs@adam.mit.edu (Steve Summit)
Subject: Re: Exact-sized types
Organization: none, at the moment
Date: Sun, 13 Dec 1992 21:57:23 GMT

In article <1992Dec8.174127.3244@thunder.mcrcim.mcgill.edu>, mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
> In article <84931@ut-emx.uucp>, jamshid@ut-emx.uucp (Jamshid Afshar) writes:
>> I don't understand the purpose of the "at-least-N-bits" types.  C
>> already has those -- char (>=8), short (>=16), int (>=16), and long
>> (>=32).  What does your extra level of indirection buy you?
> 
> Suppose I need at-least-20-bits.  If I follow your advice, I have to
> simply use long int.  However, when porting to a machine with 32-bit
> ints and 64-bit longs, this wastes lots of space...
> It might also be reasonable to have different types optimized for speed
> and space: "atleast20b_fast" and "atleast20b_small"...

I suppose that in an ideal world we'd have a popular language
which gave us this kind of fine control in declarations and yet
did not have a few of PL/I's other problems.

It's safe to say that the number of times one actually needs a
20-bit type is greatly exceeded by the number of times unwitting
programmers use int16 and the like and end up diminishing the
maintainability of their programs.  (For example: how do you
printf an atleast20b_small? [1])

Nine times out of ten [2], advice such as Jamshid's is entirely
appropriate.

					Steve Summit
					scs@adam.mit.edu

Note 1.  The answer, of course, is

	atleast20b_small x;
	printf("%ld\n", (long int)x);

, but nine times out of ten this will instead be written as

	printf("%ld\n", x);
or
	printf("%d\n", x);

, depending on the definition of the atleast20b_small type on the
initial development machine.

Note 2.  possibly much higher.
From: alane@wozzle.linet.org (J. Alan Eldridge)
Newsgroups: comp.lang.c
Subject: Re: PD C Compiler for PC?
Date: 15 Dec 92 00:55:14 GMT
Organization: Disorganization

g0pereir@cdf.toronto.edu (Rui M. Pereira) writes:

> Let's see (for MSDOS):
> 
> GCC - Gnu's C compiler, needs 386 and above (for 286's use djgcc
> (sp?)).  Everything you wanted on a C compiler and more, plus
> portability.

djgcc IS gcc. it doesn't run on a 286.

alane@wozzle.linet.org (J. Alan Eldridge)
Fido: The University of Walamaloo 1:272/38.473
Organization: Penn State University
Date: Fri, 18 Dec 1992 20:39:41 EST
From: <SML108@psuvm.psu.edu>
Newsgroups: comp.lang.c
Subject: Interesting bug

I had a program with code like

void routine (x)
int *x;
{
  int x;


}

My compiler did not trap this as an error...  Shouldn't it?  Or at least
give a warning?

Scott
From: mueller@b30news.b30.ingr.com ( Phil Mueller )
Subject: Re: a question about if and case
Organization: Intergraph
Date: Mon, 14 Dec 1992 17:52:49 GMT

In article <1992Dec14.165638.9597@b30.ingr.com> mueller@b30news.b30.ingr.com ( Phil Mueller ) writes:
>In article <1gi6poINN3lv@nz12.rz.uni-karlsruhe.de> "hans friedrich steffani" <GM08@DKAUNI2.BITNET> writes:
>>
>>i have something like
>>
>>int i;
>>
>>if( i == 1 || i == 25 || i == 125 )
>> {
>>  /* do something sophisticated */
>> }
>>if( i == 2 || i == 30 || i == 244 )
>> {
>>  /* do something different */
>> }
>>
>>or should i use
>>
>>switch( i )
>> {
>>  case 1:
>>  case 25:
>>  case 125:
>>  /* do something sophisticated */
>>  break;
>>
>>  case 2:
>>  case 30
>>  case 244:
>>  /* do something different */
>>  break;
>>
>>  default:
>>  break
>> }
>>
>
>I would do this
>
>  switch( ii ) {
>    case   1:
>    case  25:
>    case 125:
>      /* something */
>    break; /* 1,25,125 */
>
>
>    case   2:
>    case  30:
>    case 244:
>      /* something */
>    break; /* 2,30,244 */
>
>    default:
>      error( "%s, ii has value %d, should be on of %s, in %s:%d",
>             "internal error", ii, "{1,2,25,30,125,244}", __FILE__, __LINE__ );
>    break;
>  } /* switch ii */
>
>
>1) I can just scan down the line to see the values.
>2) defensive error message gives me all the info I have so I can fix.
>
>( I split up the error line to fit on one line.  You should get the idea. )
>
>I hard-coded in the valid values.  Does anyone know a way to make that 
>automatic?

Ooooh, sorry about that, bad post.
 
I should have asked, "Why are these values hard-coded?"
-- 
Phil Mueller    mueller@b30news.b30.ingr.com
The preceeding opinions are not necessarily those of Intergraph Corporation.
Xref: sparky comp.lang.c:18285 comp.software-eng:4914
From: pls@cup.portal.com (Paul L Schauble)
Newsgroups: comp.lang.c,comp.software-eng
Subject: Re: Will we keep ignoring this productivity issue?
Date: Sat, 12 Dec 92 23:52:27 PST
Organization: The Portal System (TM)
  <1992Nov17.142332.8286@saifr00.cfsat.honeywell.com>
  <Bxvq7z.DKs@cs.uiuc.edu>
  <1992Nov18.144451.14000@saifr00.cfsat.honeywell.com>
  <BxxoHu.Lpz@cs.uiuc.edu>

Does anyone still have an online copy of Ed Yourdin's Superprogrammer article?
This circulated on the net about 10 years ago and is very relevant to this
discussion. If it can be located it should be posted.

    ++PLS
Newsgroups: comp.lang.c
From: msb@sq.sq.com (Mark Brader)
Subject: Re: find the number difference of dates
Organization: SoftQuad Inc., Toronto, Canada
Date: Tue, 15 Dec 92 19:26:11 GMT

> regardless of leapyears, days in the month, etc: there are always 24 hours
> in a day and 3600 sec in a day.

I haven't seen a followup correcting this yet -- perhaps several others
are on their way here.  But in case someone archived the quoted article
and in the future is going to mindlessly copy that conversion factor,
I point out that the last word "day" should be *hour*.  There are 86400
seconds in a day.  (Except for days with leap seconds, but those are
irrelevant to this calculation.)

We now return you to Klah. :-)
-- 
Mark Brader, SoftQuad Inc., Toronto	    "Beware the Calends of April also."
utzoo!sq!msb, msb@sq.com				-- Peter G. Neumann

This article is in the public domain.
Newsgroups: comp.lang.c
From: sja@snakemail.hut.fi (Sakari Jalovaara)
Subject: Re: Questions about token merging and trigraphs
Organization: Helsinki University of Technology, Finland
Date: 18 Dec 92 13:03:57 GMT


>     Trigraphs are the *only* way to represent certain critical
> characters on machines that do not support the ASCII character set.

There are multibyte characters.  Simple solution: the standard could
have mentioned in a footnote: "EBCDIC machines are recommended to
represent # with $= (etc)" (or whatever - with a suitable ASCII to
EBCDIC converter even ??= could be used.  This all assuming that said
machines don't already have single characters that are traditionally
used to represent the missing ones.)

National characters don't need, and never did need, trigraphs.

> after all, *code* isn't going to break.

Except for a certain dusty deck program that tried to write
trigraph-containing escape sequences to a display device.  Didn't
work too well :-(

Trigraphs are unnecessary in a language definition.  Just an ugly
kludge to fix something that was never broken in the first place.
									++sja
Newsgroups: comp.lang.c
From: msjle@uxa.ecn.bgu.edu (Joi L. Ellis)
Subject: Re: Turbo C with built-in assembler??????
Organization: Educational Computing Network
Date: Thu, 17 Dec 1992 05:27:18 GMT

chelf@lunatix.uucp (Chad Helfenberger) writes:

>I seem to have gotten a bad copy of Turbo C++ (v3.0).  On the _box_, it says 
>'built-in assembler' along with the other 'features'.  However, when I try 
>to compile a program with inline asm code (as in #pragma inline), it aborts 
>with 'TASM not found'.  Any insight on this?  If it has a built-in 
>assembler, why would it be trying to call tasm?  

The 'built in assembler' is *not* the same assembler as Tasm.  It takes
either in-line code or source files with a different extension.  It also
doesn't follow the same syntax rules, so it often won't compile a Tasm
source.

Tasm comes as part of Borland C, not Turbo C.  (*frown*)

>Another question.  The manual that came with it is very sparse, and doesn't 
>list the function call prototypes or *anything*.  All it is, basically, is a 
>guide to use the stupid integrated environment (which is nice as a debugger, 
>but NOT an editor).  I know the online help provides all this, but I'd 
>rather have a book that I can use, WHILE I'm in my favorite editor.  :) 

>Thanks for any help!!

I've gathered from my reading of the manuals, that the
built-in-assembler is not intended as a serious tool but a quick hack to
be able to accomplish something that may not be easily accessible
directly from C. 

I'm still trying to get a copy of Tasm from my dealer, but the twit isn't
returning my  calls.  Maybe it's not available separately?


>-- 
>Chad Helfenberger
>(chelf@lunatix.uucp) 
-- 
Joi Ellis                      msjle@uxa.ecn.bgu.edu
Student Residential Programs   Western Illinois University

Newsgroups: comp.lang.c
From: paulk@garfield.cs.mun.ca (Paul E. King)
Subject: Getting input from the keyboard
Organization: CS Dept., Memorial University of Newfoundland
Date: Mon, 14 Dec 1992 21:26:11 GMT

I am beginner in the C language, and was wondering if anyone is willing to
help me on what seems to be an unsolvable problem(so far).

I am familiar with PASCAL, FORTRAN, and many versions of BASIC, 
including QuickBASIC.

I want to know how C  can obtain input from the keyboard directly, without
my having to type a carriage return. I know that the vi editor works on this
principle (that is what I am using now). 

In QuickBASIC, I understand that both INKEY$ and INPUT$(1) do not need a 
carriage return to obtain input from the keyboard and run statements resulting
from such input. I have used them in several programs already. Is there

I am told by one of the profs that what I seem to be asking is how to enter
CBREAK mode. Apparently this seems to have something to do  with a 
function called ioctl(), and "orring" one hex constant into another.
However, I am told that there are less complicated ways of doing this, but
nobody could think of what it  was. Can anybody here suggest anything?
I am using a UNIX-based System V Berekley C compiler.  Some of the compilers 
on campus also use AT&T System V as well. For what it's worth, I have access
to the Sparc stations as well as Atari-ST, XL87, vt100 terminals, if  that
is an issue (I don't know). Thanks in advance.

paulk@odie.cs.mun.ca

Newsgroups: comp.lang.c
From: steveg@cadkey.com (Steve Gallichio)
Subject: Re: RFD: splitting comp.lang.c
Organization: cadkey
Date: Wed, 16 Dec 1992 15:38:43 GMT

In article <1992Dec16.151243.12903@cadkey.com> eric@cadkey.com (Eric Holtman) writes:
>Therefore, I propose the following splits for this newsgroup

Eric, you ignorant slut... :-)
 
How about comp.lang.c.howdoigetunbufferedinputwhenusinggetchar ?
-- 
Steve Gallichio       |"Have you ever heard of Plato? Aristotle? Socrates?
Cadkey, Inc.          |             ...Morons!"
steveg@cadkey.com     |
Newsgroups: comp.lang.c
From: goudreau@batman.rtp.dg.com (Bob Goudreau)
Subject: Re: Is this ANSI?
Date: Wed, 16 Dec 92 19:48:15 GMT
Organization: Data General Corporation, RTP, NC

In article <1992Dec15.204100.4293@thinkage.on.ca> atbowler@thinkage.on.ca (Alan Bowler) writes:
>>|> 
>>|> True.  The compiler is not free to juggle the order withing a
>>|> struct, but as a rule of thumb you you program as if it did have
>>|> that freedom.  
>>
>>Huh?  Why should you do this?  What do you gain by doing so?  ...
>>
>Because at a later time you may want to reorder the structure so that
>it gives you better performance on a different machine.

But doing this would appear to break your aforementioned "rule of
thumb".  You can't have it both ways.


----------------------------------------------------------------------
Bob Goudreau			Data General Corporation
goudreau@dg-rtp.dg.com		62 Alexander Drive	
+1 919 248 6231			Research Triangle Park, NC  27709, USA