HDTenEightyP/NetNews huggingface dataset:
From: CRJ14530@acuvax.acu.edu (Christopher Judd)
Subject: C for Macintosh
Organization: Danger Maus' World
Date: Thu, 28 Jan 1993 20:32:29 GMT
X-News-Reader: VMS NEWS 1.20

I was just looking for a possible C compiler for the Macintosh.  Any input via
e-mail would be great!.
thanks in advance

dm
++  _     _   +-------------------------+
|| //\___/\\  | Danger Maus             |
|| \_ O * _/  | aka: Christopher Judd   |
||   \   /    |       T.G.S.A.I.T.W.    |
||    \ /     |       (915)673-6228     |
++     ^      +-------------------------+


.


++  _     _   +-------------------------+
|| //\___/\\  | Danger Maus             |
|| \_ O * _/  | aka: Christopher Judd   |
||   \   /    |       T.G.S.A.I.T.W.    |
||    \ /     |       (915)673-6228     |
++     ^      +-------------------------+


.
Xref: sparky comp.lang.c:20038 comp.lang.fortran:5119
From: law40003@nusunix1.nus.sg (TAN YEW KEONG)
Subject: Legal Discussion
Organization: National University of Singapore
X-Newsreader: TIN [version 1.1 PL6]
Date: Mon, 25 Jan 1993 16:51:02 GMT



Please ignore ALL my previous postings on the subject.

I am a final year law student planning to specialise in law regarding
all aspects of computing. I am computer literate and will be able to
understand most computer jargon except highly technical subjects like
Huffman coding etc.

It would be interesting for me to get to know real world legal problems 
regarding computers. If you have any legal problems or experiences,
post to me, and I will be glad to discuss them with you. The experience will
prove invaluable to me.

Disclaimers :

I will not be liable for any prosecution, both civil and criminal,
arising in any way connected to our discussion, whether it may be
your reliance on our discussion, or our discussion leading to criminal 
behaviour.

Nobody should regard our discussions as final and conclusive, and I do not
profess any expert knowledge whatsoever.

I disclaim responsibility for any losses you incur by relying on our 
discussions, and if any of our discussions lead to criminal behaviour,
let it be known that I have no knowledge of collaboration with any
criminal.

I wonder if this disclaimer works, but it sure sounds legal. But I mean
all this mumbo jumbo, and if my drafting skills leave much to be
desired, read it in spirit, not in form.
--

_________________________________________________________________________
Michael Tan Yew Keong | law40003@nusunix1.nus.sg | law40003@nusvm.nus.sg|
Final Year Law student - OH GOD, IT'S BEEN A HELLUVA LONG TIME!!!       |
________________________________________________________________________|
--

_________________________________________________________________________
Michael Tan Yew Keong | law40003@nusunix1.nus.sg | law40003@nusvm.nus.sg|
Final Year Law student - OH GOD, IT'S BEEN A HELLUVA LONG TIME!!!       |
________________________________________________________________________|
Xref: sparky comp.lang.c:20084 comp.lang.c++:19776
From: cs89rdb@brunel.ac.uk (Roger D Binns)
Newsgroups: comp.lang.c,comp.lang.c++
Subject: Re: C/C++ Correctness (was: Re: C/C++ Speed)
Date: 22 Jan 93 18:48:07 GMT
Followup-To: comp.lang.c,comp.lang.c++
Organization: Brunel University, Uxbridge, UK
X-Newsreader: TIN [version 1.1 PL8]

Thomas M. Breuel (tmb@arolla.idiap.ch) wrote:
: But, in my experience, you can't do both: once you start taking full
: advantage of C++'s convenience and safety features (memory management,
: virtual functions, etc.) you pay a hefty price in terms of
: performance. In fact, I find that the price I pay for these features
: in C++ is often larger than in other languages.

You will only take full advantage of features if they give you some gain.
Usually, it is less debugging time, and quicker development.  The question
is what would you rather have:

- A product early to market that is correct, and runs at a performance
  'penalty'
- A product early to market that is incorrect, and has no penalty
- A product late to market that is correct and has no performance penalty

I suspect the case is the first one.  The second one seems to be common
practice.  The last one will give you the warm fuzzy feeling you desire
when having no performance penalty.

Roger
-- 
+=============================================================================+
| cs89rdb@brunel.ac.uk     Roger Binns    Brunel University - UK              |
|:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|
| Do your bit to destroy the American economy by overwhelming their legal     |
| system - buy an Intel chip to run your Lotus software TODAY.                |
+=============================================================================+
From: bobp@msi.com (Bob Pitha)
Subject: Re: calling a Fortran subroutine from a C program
Followup-To: comp.lang.c,comp.lang.fortran
Organization: Molecular Simulations, Inc.
Date: Fri, 22 Jan 1993 20:08:39 GMT
X-Newsreader: TIN [version 1.1 PL8]
X-Posted-From: phoenix.msi.com
NNTP-Posting-Host: sol.ctr.columbia.edu

Michael Lemke (michael@chpc.utexas.edu) wrote:
: In article <1993Jan22.130743.27130@sol.ctr.columbia.edu> bobp@msi.com (Bob Pitha) writes:
   (edited a bit for brevity's sake)
: >
: >4) Character arrays: For each character array in the argument list, there
:               ^^^^^^

: You are not talking about character arrays at all in your post.  A 
: character array is something you declare as

: 	character*(*) string(10)

: which is an array of strings.  You talked just about plain character
: strings.  Keep the terms clear.  Passing of character arrays is a bit
: harder than what you described I believe (I might be wrong) but I don't
: have my Sun manual handy to point out the differences.  Someone else
: might.  But as you have suggested (which I deleted for brevity) reading
: the Sun Fortran manual is worth doing.  It deals with all these issues.

  This is really just an issue of semantics, but you're right that I wasn't
very clear.  I was thinking in terms of an "array of type char" in C, so
I just wrote what I was thinking.  As you point out, to a person who only
knows Fortran the phrase "character array" may by misleading.  Unfortunately,
this is an area where the concepts don't map well between the two worlds,
since c doesn't have an official "string" type; a string is just a null-
terminated array of characters.

  Passing "arrays of strings" (is that clear enough?) is perhaps a little
bit harder, but not a whole lot.  I didn't touch on null-termination and
blank-filling in my previous post because I didn't know whether the
original questioner cared and it would have taken lots more space.  I
stuck to the simple case of passing an array of characters to the Fortran
routine.  If the Fortran routine were going to try to pass a string back
to C, or if an array of strings were being passed, you have to deal with
these issues.

-----------------------------------------------------------------------
Bob Pitha                      Molecular Simulations Inc.
bobp@msi.com                   16 New England Executive Park
(617) 229-9800 x242            Burlington, MA 01803-5297
From: mcastle@cs.umr.edu (Michael R Castle)
Subject: Re: 32 bit C-compilers for i386/486
Date: Sat, 23 Jan 1993 01:31:44 GMT
Organization: University of Missouri - Rolla, Rolla, MO

In article <765366d6621043t9@roofus.ann-arbor.mi.us> empath@ais.org (Tim Triemstra) writes:
>In <k3JPXB2w165w@wozzle.linet.org>, alane@wozzle.linet.org (J. Alan Eldridge)  wrote:
>>pen@lysator.liu.se (Peter Eriksson) writes:
>>
>>> No. Your program would only be subject to the GNU "bylaws" if your program
>>> would include portions of the compiler sources itself. Programs compiled
>>> from your own sources have no such restrictions.
>>
>>Or if you link in any portion of the GNU runtime library.
>
>I remember something like that, that is why I stopped using it.  I can't
>think of a time when you wouldn't use SOME of the run-time library in
>an application (although I'm sure it is feasable.)  Has anyone ever written
>a program that doesn't use ANY runtime library (I mean a program big enough
>to actually DO something)?

DISCLAIMER:  Some of this information may be incorrect.  If anyone knows
of any mistaks, PLEASE correct them!

There are 2 sets of code: FSF and UCB.  The UCB code, has been released 
for public use.  FSF code is LGPLed.  UCB code includes things like
printf(), malloc(), and the like.  FSF code includes obstack(), and all
c++ classes.  In the djgpp distribution, they are separated into libc.a
and libgcc.a, repsectively.  

There is a little bit of startup code in libc.a (xyzzy() stuff) that I'm
unsure about.  Anyone help there?

If you use libgcc.a, you must supply (or make arrangements to supply, for
a possible fee) the source for libgcc.a.  You must also at least supply
object versions of your code (perhaps in the form of a *.a file) that 
can be relinked with newer (or their own modified versions) of functions
out of libgcc.a.  I *think* you can put stipulations in your licensing
agreement such that, if they request your object files for relinking, you
reserve the right to discontinue support for them.

So, in this case, you don't have to make your source available, just make 
it easier for some of the users to update their programs easily.

Again, I maybe wrong on some of these points.  Feel free to correct me.

regards,
mrc
-- 
Mike Castle .-=NEXUS=-.  Life is like a clock:  You can work constantly
  mcastle@cs.umr.edu     and be right all the time, or not work at all
S087891@UMRVMA.UMR.EDU   and be right at least twice a day.  -- mrc
    We are all of us living in the shadow of Manhattan.  -- Watchmen
From: hartman@ulogic.UUCP (Richard M. Hartman)
Newsgroups: comp.lang.c
Subject: Re: initialized extern variables, coded in 1 file, used in many
Date: 27 Jan 93 18:53:42 GMT
Organization: negligable

In article <1993Jan26.015543.23671@netcom.com> pdh@netcom.com (Phil Howard ) writes:
>I want to define a large set of extern variables and I want to define
>them in just one place (one file) so that I don't have any problems
>with things out of sync as I change them (changes of type for existing
>variables, or adding and deleting variables).
>
>For the above would create variables in a header like:
>
>EXTERN long var1;
>EXTERN int var2;
>
>and do
>
>#define EXTERN extern
>
>in all files but the one where they are being exported from.  In that
>one file I would do
>
>#define EXTERN

Rather than this, which requires an extra #define in every file
I prefer to put this in the globals.h include file:

	#ifdef __MAIN
	#define EXTERN
	#else
	#define EXTERN extern
	#endif

and place a "#define __MAIN" in one of my files prior to including
the globals.h.

>and include the header before the first block.  The choice of symbol
>name EXTERN is arbitrary; some other name may be used if consistent.
>
>---------------- NOW HERE IS THE CATCH ----------------
>
>I want to initialize many (its ok to be required to initialize all)
>of these variables.  The problem is that initializers are inconsistent
>with the extern storage class.  But the initializers would have to be
>coded in the same file as the types of the variables are coded, i.e.
>the header.  That means the initializers would be there for those modules
>using the variables with the extern class.

	EXTERN int uninitialized;

	#ifdef EXTERN
	extern int initialized1;
	extern float initialized2;
	extern int initialzed3[];
	#else
	int initialized1 = 50;
	float initialized2 = 3.14;
	int initialzed3[] = { 2, 4, 6 };
	#endif



		-Richard Hartman
		hartman@ulogic.COM

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Who knows what evil lurks in the hearts of men?"
From: Dean_Wagner@aldhfn.akron.oh.us (Dean_Wagner)
Subject: More help (mostly os2/dos specific)
Newsgroups: comp.lang.c
Summary: 
Keywords: 
X-Newsreader: TIN [version 1.1 PL8]
Date: 20 Jan 93 21:56:55 EST
Organization: Auldhaefen Associates

Thanks to all who responded to my question about text entry.  I was looking
for a way to have the cursor not enable a person to enter more than
MAX_LENGTH characters.  My actual problem was lack of a null ending my
string.

Here's some more things I could use some help with:

1)   do Microsoft C DOS graph functions work with os2?  I was trying to
use clearscreen, but got an unresolved external from inside the library
function.  I don't have the exact error here, but it said something like
(..\gr\something.asm: ___somevar).  Does this mean the graphics library
uses something defined in the asm file (which obviously isn't there)?  I
reinstalled the compiler, but got no option to load that file, or anything
in a gr directory.

2)   This was a problem I had at work, and it was solved, but the
solution required changing the question - I was curious about the solution
to the question as it originally was:
     Given a 2-dimensional array, how is it possible to dynamically
allocate memory for the first dimension?  In other words, I wanted to
changed the declaration from
record[56][5] to
*record[5] or record[][5]

I tried several ways to allocate memory for this definition, but couldn't
figure out what I was doing wrong.  Here were the suggestions from co-
workers...
     Change the second dimension to a structure (works, but I didn't
     want to rewrite the program, just make it more versatile)

     record = malloc(sizeof(int)*5*number) - it wouldn't let me, saying
     that record must be an lvalue.

     allocate 4k, since that's the smallest size possible with os2
     anyways.  

The final solution, which was "why bother?  the largest number possible is
64", made me beat myself over the head many, many times.  Anyways, I'm
still wondering how I would have allocated the memory, given the
declarations mentioned above.

3)   Can anyone suggest a good manual for programming software to be
used ona BBS?  That's what I'm doing now, and it's something I never did in
school or elsewhere.

4)   Is there any representation for the delete key in printf?  Right
now, I use "\b \b", which backspaces, spaces, and backspaces again.  It's
functional, but certainly not efficient.

Thanks in advance,

--
Dean Wagner                        Nothing matters but the weekend
Dean_Wagner@aldhfn.akron.oh.us    From a Tuesday point of view
bx451@cleveland.freenet.edu             -Switch into Glide, The Kings
From: dave@cs.arizona.edu (Dave Schaumann)
Newsgroups: comp.lang.c
Subject: Re: Legal Discussion
Date: 26 Jan 93 03:24:52 GMT
Reply-To: dave@cs.arizona.edu (Dave Schaumann)
Organization: University of Arizona

In article <1993Jan25.165102.19959@nuscc.nus.sg>, law40003@nusunix1 (TAN YEW KEONG) writes:
>Please ignore ALL my previous postings on the subject.

Oh, man.  I gotta save this.  Classic usenet quote, that.

>I am a final year law student planning to specialise in law regarding
>all aspects of computing. I am computer literate and will be able to
>understand most computer jargon except highly technical subjects like
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Huffman coding etc.
 ^^^^^^^^^^^^^^^^^^

Don't tell me, let me guess.  The basis of your "computer literate" claim
is that you took one "intro to programming" course, or some such.

I hate to break it to you, but outside of sophomore CS students, Huffman
encoding is not widely considered "highly technical".

>It would be interesting for me to get to know real world legal problems 
>regarding computers.

IMHO, you need to go back, and at least get a minor in CS, if not a full
degree.  If you think that Huffman encoding is a highly technical subject
beyond your understanding, you simply don't have the depth of field to
participate in a discussion that *really is* technical.

[...]
>I wonder if this disclaimer works, but it sure sounds legal.
                                        ^^^^^^^^^^^^^^^^^^^^^

And you're supposed to be a "Final Year Law student"?  Yeah, right.

-- 
What I've learned from reading net news #2:
  Surely the most ignored phrase to be posted to the net is "'nuff said".
Newsgroups: comp.lang.c
From: roy@spectrum.cs.unsw.oz.au (Prabal Kumar Roy)
Subject: =======Problem with mmap command on DECStation========
Reply-To: roy@spectrum.cs.unsw.oz.au (Prabal Kumar Roy)
Organization: none
Date: Wed, 27 Jan 1993 06:53:49 GMT

 Greetings:

  I am trying to use the mmap command on DECStation 5000.  In the following test 
program I am trying to reserve 1000 bytes of memory and trying to write some stuff
in that area.

However, at the statement    *intptr = 1; I am getting the following error.
pid 10810 (a.out) was killed on kernel access, at pc 0x400284.  Bus error (core 
dumped).  

So the statement result = (caddr_t) mmap(0,..............) has got me some
memory which is in the kernel area, so when I am trying to access it later I am 
getting a core dump.  Any help will be greatly appreciated.

Prabal K. Roy
AI Lab
U. of New South Wales
Sydney 2033
AUSTRALIA
----------

#include <sys/types.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <string.h>
#include <limits.h>
#define PERMS 0666
#define TRUE 1
#define FALSE 0

main ()
{
  int fd;
  caddr_t result;
  int *intptr;
  char *charptr;

  fd = creat("myfile", PERMS);

  result = (caddr_t) mmap(0, 1000, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
  close(fd);

  intptr = (int *) result;
  *intptr = 1;
  result = result + sizeof(int);
  charptr = (char *) result;
  strcpy(charptr, "hello world");

}
Newsgroups: comp.lang.c
From: leary@progress.COM (Jim Leary)
Subject: Re: Microsoft library access from Turbo C?
Organization: Progress Software Corp.
Date: Fri, 22 Jan 1993 17:52:32 GMT

sullivan@kenyon.edu writes:

>I have some DOS hardware with a software library to use it written for
>Microsoft C (ver 4.00). Is there a way to link code I write in Turbo C++ (ver
>2.00, I think) to this library?

>Thanks for any help,

>Tim Sullivan   (sullivan@kenyon.edu)


at one time, I contacted Borland Tech Support about this very same question.
I think they gave me a legitimate answer, which stated that because of
differences between Microsoft and Borland involving segments (CODE and DATA),
unless you had the source code from Microsoft for the .OBJ's in the
lib, there really wasn't a way to link Microsoft libs with Borland.

Obvious answer.  I never really delved into it again.  I think that the
other issue involves the startup code that each compiler uses to generate
an executable.  There might be stubs in the Microsoft lib's that refer to
the startup code that in Borland's version do not exist or are stubbed
differently.

I don't know if this answers your question, but just some info to pass along.

Jim

--
------------------------------------------------------------------------------
Jim Leary             | My opinions are mine and do not reflect the opinions
Progress Software     | of my employer.
------------------------------------------------------------------------------ 
Newsgroups: comp.lang.c
From: david@oahu.cs.ucla.edu (David Dantowitz)
Subject: Result of y = (y++) % 3;
Organization: UCLA, Computer Science Department
Date: Sun, 24 Jan 93 15:30:17 GMT



A beginner C programmer wrote the following:

main()
{
  int i, y;

  y = 0;

  for (i=0; i < 10; i++)
    {
      y = (y++) % 3;
      printf("%d\n", y);
    }
}

When they really intended y = (y+1) % 3;  (Yes it is faster to avoid the
'%' operator all together.)

Most compilers produce code that does the following:

temp = y;
y += 1;
y = temp % 3;

Thus, 0 is always printed.  

The IBM's RISC 6000 compiler produces 1, 2, 3, 1, 2, 3.

So, even though 3/4 tested compilers produce 0, I'd like to
get some second opinions...

Please reply by email and I'll summarize.

David

-- 
David Dantowitz
david@cs.ucla.edu

Singing Barbershop when I'm not doing parallel simulation
Newsgroups: comp.lang.c,comp.lang.fortran
From: shenkin@still3.chem.columbia.edu (Peter Shenkin)
Subject: Re: calling a Fortran subroutine from a C program
Organization: Dept. of Chem, Columbia U, New York
Date: Tue, 26 Jan 1993 16:06:22 GMT
Distribution: na
X-Posted-From: still3.chem.columbia.edu
NNTP-Posting-Host: sol.ctr.columbia.edu

In article <ig25.728061129@fg30> ig25@fg30.rz.uni-karlsruhe.de (Thomas Koenig) writes:
>An implementation might very well choose to start every character
>variable on a word boundary, for speed reasons.
>
>      CHARACTER*1 STRING(100)
>
>would then appear to C to be an array of ints, instead of chars.

I think Cray in fact does this, while placing CHARACTER*1 scalars
on byte boundaries.

	-P.
-- 
************************f*u*cn*rd*ths*u*cn*gt*a*gd*jb************************
Peter S. Shenkin, Box 768 Havemeyer Hall, Dept. of Chemistry, Columbia Univ.,
New York, NY  10027;  shenkin@still3.chem.columbia.edu;  (212) 854-5143
******************** Wodeheads!  Wodeheads!  Wodeheads! *********************
Newsgroups: comp.lang.c
From: md@sco.COM (Michael Davidson)
Subject: Re: Could someone answer my question....thanks
Organization: The Santa Cruz Operation, Inc.
Date: Mon, 25 Jan 1993 19:27:55 GMT


csc5840@hertz.njit.edu (Sekhar Chitti) writes:

>		puts("%d - %s",i,arg2[i]);

puts() is used to write a string followed by a linefeed character
to standard output - it does not support multiple arguments and
formatted output - try using printf() instead ....
Newsgroups: comp.lang.c
From: g2yantc@cdf.toronto.edu (Wilfred)
Subject: C/UNIX BOOK
Originator: g2yantc@eddie.cdf.toronto.edu
Organization: University of Toronto Computing Disciplines Facility
Date: Wed, 27 Jan 1993 19:53:29 GMT


I am looking for a reference book about Advance C in Unix, like
using <socket.h> pipe <user.h> ... anything that is close to the
system level, tracking users info etc.

any help would be great.

Thanks
					       Wilfred

-- 
                                                     
                                      |\              
  O                         __________|_\______      
  \_.______________________| * * * * * * * * */   
Newsgroups: comp.lang.c
From: niu@prancer.eche.ualberta.ca (Shaohua Niu)
Subject: Source codes for lp
Organization: University Of Alberta, Edmonton Canada
X-Newsreader: Tin 1.1 PL3
Date: Sat, 23 Jan 1993 00:36:12 GMT


Hi, I am doing a project which requires to rewrite the `lp' (and the
related lpr, lpstat, lpq) commands under unix.  Can anybody out there
kindly tell me where I can find the C source codes for these commands?
(or rather, are theses C source codes avaible to Unix users?) 

I am using HP900-850 machine.

Thanks in advance.
--

-\------/------------------------------------------------------------  
  (_--_)  Shaohua Niu           |  `Have a nice day, and take care'
  ( oo )  Dept. of Chem. Eng.   |  Email: niu@prancer.eche.ualberta.ca  
   )  (   Univ. of Alberta      |  Phone: (403) 432-7803 (Home)         
   (__)   Canada, T6G 2G6       |         (403) 492-2971 (Office)
----------------------------------------------------------------------