HDTenEightyP/NetNews huggingface dataset:
From: hjv@phil.ruu.nl (Hendrik Jan Veenstra)
Subject: Re: Conversion of BASIC code to "C"
Organization: Department of Philosophy, University of Utrecht, The Netherlands
Date: Mon, 11 Jan 1993 13:43:36 GMT

camp5@csbina.csubak.edu writes:

>In article <1993Jan8.183821.20711@adobe.com>, (Scott Sivi) writes:
>> Does there exist a method or application by which BASIC files can be
>> converted 
>> to "C".

>You probably couldn't even do it by hand unless the BASIC program was 
>completely flowed and never used a GOTO! The way BASIC programmers spaghetti-
>code programs, I doubt it's possible. (I'm assuming you won't use goto in C.
>I wouldn't.)

Ignoring the fact that the above is a rather simplified outlook on day-to-day
practice, it isn't true either.  There _do_ exist programs that translate
Basic to C -- I know of at least one such package; it's a program for
translating GFA Basic (Atari ST and PC platforms) to C.  I've never used it
and assume that the output of such a program will be a bit crude -- and
probably the input source will have to meet some tight constraints as well,
but in principle it _can_ be done.

And on the spaghetti statement:  I agree that there are lots of hobby-basic-
programmers who write terrible code, but probably the same holds for every
language.  The only difference being the fact that more hobby-programmers
use basic than C, Lisp or SmallTalk... :)  However, I started with Basic
myself (quite some time ago, fortunately :) and have always tried to write
as structured and clear as possible (which isn't too hard with modern basics).
No GOTO's, no GOSUB's, as little global vars as possible, etc.  and several
of these programs _were_ hand-converted to C later on -- without too much
trouble and without ending up with horrible Basic-like C.  And I know quite
some programmers who write serious applications (commercial apps) in Basic.
And no spaghetti-code...  The days of the "GOTO 1250" are long ago...

But hey, I don't want to start another language-war... :)  And besides, I
don't mean to _defend_ Basic (why do you think I switched to C...?).  I
just wanted to say that IMO it's not _that_ difficult to translate Basic to
C, provided the Basic-source was indeed written a bit 'decent' (y'all know
what I mean by _that_ :).


--
Hendrik Jan Veenstra    hjv@phil.ruu.nl  *  How can I save my dreams
Dept. of Philosophy                      *  in the nightmare, in the flood
University of Utrecht                    *  But I try.
The Netherlands                          *
From: smahn@vx.cis.umn.edu (Seokmin Ahn)
Newsgroups: comp.lang.c
Subject: HELP : Need a Crossreferencing program
Date: 13 Jan 93 01:37:45 GMT
Article-I.D.: news2.C0rr6y.LIo
Organization: University of Minnesota
X-Xxmessage-Id: <A778CF69DE01C378@me51-3-120.me.umn.edu>
X-Xxdate: Tue, 12 Jan 93 19:41:29 GMT
X-Useragent: Nuntius v1.1.1d17

Hi, netters,

I am looking for a cross reference program.
I work on Apollo which has a cross reference program for Pascal but not
for C.
Can you direct me where I can get those kind of program?
Preferably source program, so I can compile on Apollo.
If only executable program exist, I don't mind to move those files
to VX, SUN, IRIS, PC, EPX or NVE.  I don't have any access other
than those machines.  "xref" I downloaded didn't do a very good job.

Thank you.
From: erwin#m#_mike.ast_-_tac_mail_server@msgate.corp.apple.com (Mike Erwin)
Newsgroups: comp.lang.c
Subject: DOS Networking Primitives Needed!
Date: 4 Jan 93 20:08:42 GMT
Organization: Apple Computer, Inc.


Network Software: Lantastic
Language:  I'm using TC 2.0, but any code for DOS is fine

Does anyone have any primitives that deal with the DOS record locking scheme?
 I have tried for three days now to implement a system whereby all users have
read access to the file until someone wishes to update a record; at that
time, the file is locked, the user makes changes, then the file is unlocked;
but, to no avail.  

Would anyone who has tackled a similar situation please mail me any code or
personal comments that deal with this? 

I have a few minor questions concerning what is happening at an operating
system level:

1>  How does the TC lock() function actually work (low level)?  And...  Say
you lock the whole file, does your process (the one that made the lock) still
have RW access to the file? (apparently you do).

2>  What DOS system calls are being made to negotiate the file sharing
functions?

Thanks

|  "From the lightning in the sky, as it passed me flying by,
|   From the thunder and the storm, and the cloud that took the form,
|   (When the rest of heaven was blue), of a demon in my view." 
|       {10010 | 0111}  ? Veritas Aut Nihil! ? Heads- heads... heads?  heads!
| 
|  Mike Erwin,       UNIX Systems Administrator       Apple Computer, Inc.
|  erwin#m#_mike.ast_-_tac_mail_server@msgate.corp.apple.com
|    Apple: 512-919-2223      TT: 512-345-3573
From: banshee@cats.ucsc.edu (Wailer at the Gates of Dawn)
Newsgroups: comp.lang.c
Subject: Re: HELP Please Please (malloc on an array)
Date: 6 Jan 1993 21:09:41 GMT
Organization: University of California, Santa Cruz
Distribution: World
NNTP-Posting-Host: am.ucsc.edu


Matt@chchp.ac.nz (Matt Thompson) writes:


>Code using standard char array
>------------------------------
>main()
>{
>char array1[1000][11];
>int temp;

>for(temp=0;temp<999;temp++)
>   sprintf(array1[temp],"Test %d",temp);

>printf("\n\nEnter a number :");
>scanf("%d",&temp);
>printf("\n%s",array1[temp]);
>}

>Code using malloc etc
>---------------------
main()
{
    char    *array1[1000];
    int      i;

    for (i = 0; i < 999; i++) {
        array1[i] = malloc(11);
        sprintf(array1[i], "Test %d", i);
    }

    printf("\n\nEnter a number: ");
    scanf(" %d", &i);
    printf("\n%s\n", array1[i]);
} 

-- 
The Wailer at the Gates of Dawn              | banshee@cats.UCSC.EDU       |
Just who ARE you calling a FROOFROO Head?    |                             |
DoD#0667  "Just a friend of the beast."      | banshee@ucscb.UCSC.EDU      |
2,3,5,7,13,17,19,31,61,89,107,127,521,607....| banshee@ucscb.BITNET        |
From: wietse@wzv.win.tue.nl (Wietse Venema)
Newsgroups: comp.lang.c
Subject: Re: Hex escaping in strings, (porting from gcc to cc)
Date: 10 Jan 93 18:20:24 GMT
Organization: Eindhoven University of Technology, The Netherlands

chrisp@grace.cri.nz writes:

>  I have a problem with porting from gcc to cc (on a sun sparc station)
>		
>	puts("\x1b=");		/* set's the terminals keypad mode */

You can save yourself a lot of work by using my unproto program. It
allows you to compile ANSI C with a traditional C compiler like the
one that comes with SunOS. The conversion is done on the fly.

Besides prototypes, it does string concatenation, \x character stuff
and stdarg.h magic.  ftp.win.tue.nl:/pub/programming/unproto4.shar.Z

	Wietse
From: nider@mavenry.UUCP
Newsgroups: comp.lang.c
Subject: adding strings together
X-CitNet-ID: 83017
Date: Sun, 03 Jan 93 13:52:42 GMT

 can't you just add strings together with a +, like:
 
 string3=string1+string2
  
Newsgroups: comp.lang.c
From: dzouak@watserv1.uwaterloo.ca (Driss Zouak)
Subject: Source Code to load a PCX, GIF, ...
Keywords: PCX, GIF, SOURCE
Organization: University of Waterloo
Distribution: na
Date: Tue, 5 Jan 1993 22:56:29 GMT

   I need to be able to load up some kind of graphics image (to use in the
background of my program).  I need to use a file format that there is a good
drawing or painting program for.

   Any ideas ?

   I need the source, but anything is a start.

////////////////////////
// Driss Zouak
// dzouak@watserv1.uwaterloo.ca
////////////////////////
// There is a world of knowledge out there, I'm just not sure where that
// world is ?   DZouak
/////////////////////////

Newsgroups: comp.lang.c
From:  (Scott Sivi)
Subject: Conversion of BASIC code to "C"
Followup-To: comp.lang.c
Organization: Adobe Systems Incorporated
Date: Fri, 8 Jan 1993 18:38:21 GMT

Does there exist a method or application by which BASIC files can be
converted 
to "C".
Newsgroups: comp.lang.c
From: dschmitz@iastate.edu (Daniel C Schmitz)
Subject: Re: ** Ack! Help again! **
Organization: Iowa State University, Ames IA
Date: Tue, 5 Jan 1993 19:17:32 GMT

In <kaNTwB1w165w@tradent.wimsey.bc.ca> lord@tradent.wimsey.bc.ca (Jason Cooper) writes:

>time I use scanf or gets, and I ask for more than one input of a string 
>in a row, like this:
>gets(string1)
>gets(string2)
>or however that works (the point being they are seperate lines), C will 
>skip some of the inputs for apparently no reason at all. 

I have often had problems with scanf followed by a gets.  The first gets
that follows any series scanf's always returns an empty string.
A hack that has worked for me on some systems is to put a dummy gets between
scanf's and gets's.

scanf(...)
scanf(...)
gets(..)	/* this is a dummy, to fix problems that I've experienced */
get(...)	/* legitimate gets, use the results */
scanf(...)
gets(...)	/* dummy */
gets(...)	/* useful value */

dschmitz
dschmitz@iastate.edu
From: hartman@ulogic.UUCP (Richard M. Hartman)
Newsgroups: comp.lang.c
Subject: Re: Problem with string processing.
Date: 7 Jan 93 23:32:43 GMT
Distribution: usa
Organization: negligable

SCAS?  I'll have to check it out when I get a moment or two,
a strcpy() w/ SCAS & MOVSW (or whatever the block move instruction
is) may be a lot quicker than the two loops, (find end, copy chars).

otoh, thinking about it, w/ higher level instructions you only
need two loops (find end of string one, copy from string 2 
until you hit NULL), the CISC version would be "find end of
string 1, find length (end) of string 2, move block at string2
of [length] to end:string1"  Two SCAS & one MOVSB, plus maybe
a little math....  It would be interesting to check out the
results....  Does anybody know how Borland, Microsoft or Zortech
implement strcpy()?  (actually they probably write it in C instead
of asm anyway....)

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Between the silence of the mountains	|
and the crashing of the sea 		|	-Richard Hartman	
there lies a land I once lived in	|	hartman@uLogic.COM
and she's waiting there for me.		|
Newsgroups: comp.lang.c
From: dzouak@watserv1.uwaterloo.ca (Driss Zouak)
Subject: Finding Directories,  need I use "findnext ?"
Keywords: findnext, directories
Organization: University of Waterloo
Distribution: na
Date: Wed, 6 Jan 1993 15:17:51 GMT

  I am trying to write a function that will return what subdirectories exist
within a given directory.  I know that findfirst and findnext return any
file I'm looking for, but can they return directories ?

  Is there any other command ?

Driss Zouak
dzouak@watserv1.uwaterloo.ca

/////////
//  When you bet your head against the wall for this long, it almost becomes fun/////////

Newsgroups: comp.lang.c
From: lgolding@netcom.com (Laurence J. Golding)
Subject: Re: enum checking using C compiler
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Mon, 11 Jan 1993 22:22:33 GMT

paul@terminus.ericsson.se writes:

>Does anyone out there know where I can get hold of a prog that
>will check for integers being assigned to enumerated data types.

>eg

>typedef enum {
>	fred,
>	joe,
>	harry
>} PEOPLE;

>int i=2;
>PEOPLE names;
>names=i;       <----- Want it to find this

Try Flexe-Lint from Gimpel software.  Very reasonably priced,
extremely powerful, _incredibly_ flexible and customizable,
distributed in shrouded source form so should run on any :-) Unix
platform.  Sorry to sound like a commercial, but it's been a real
help to me. Contact

	Gimpel Software
	3207 Hogarth Lane
	Collegeville, PA 19426
	(215)584-4261
	(215)584-4266 (fax)

P.S. Flexe-Lint has _three_ different "strictness" options for dealing
with enums.
-- 
Laurence J. Golding
lgolding@netcom.com
(510)490-3663
Newsgroups: comp.lang.c,rec.humor
From: schwartz@ipx22 (Privataccount Roman Schwartz)
Subject: Re: Program to convert .EXE to a "C" source file?  I really need one!!
Reply-To: schwartz@ppgfr.uucp
Organization: PPG Hellige, Freiburg, GERMANY
X-Newsreader: Tin 1.1 PL4
Date: Tue, 12 Jan 1993 10:18:49 GMT

ahoekstr@cs.utwente.nl (Andre D. Hoekstra) writes:
: In article <1993Jan4.022241.4493@pony.Ingres.COM> mikes@Ingres.COM (Mike Schilling) writes:
: >From article <1993Jan2.203527.27050@news2.cis.umn.edu>, by dutc0006@student.tc.umn.edu ():
: >> In article <1993Jan1.225604.964@blurt.oswego.edu> ch_ind05@blurt.oswego.edu (Greg Fuller (SUNY Oswego, Oswego New York)) writes:
: >>>Hello. 
: >>>	I am looking for a program that will take a .EXE or .COM file and
: >>>convert it into a "C" source file.  I saw one on one of the FTP sites today,
: >> [Stuff deleted]
: >> 	I am looking for a program of that nature too.  If someone knows 
: >> where one can be FTP'd I would appreciate E-Mail telling me.  
: >> 				Thanks,
: >> 				dutc0006@student.tc.umn.edu			
: >> 
: Have you seen that tool that compiles all this output into the new version
: of the package? I once saw someone use a few commands to decompile
: WordPerfect 2.0 and bring it in successive stages to WP 5.1!!
: (I believe this was called reveng.com (reverse engineering) and upgrade.exe?)
: 
: Andre++
: -- 
: There is no reason for any individual to have a computer in    | Andre Hoekstra
: their home. (Ken Olson, Ex-President Digital Equipment, 1977)  | Enschede -- NL

Yes, I've got such a program.
Hm, I should say I had had it. When I tried to post it here, unfortunatly
a virus destroyed it. - I have a backup, but I need a little time to find
it, so please watch this newsgroup for the next time.
Note: 
My version is not able to do any documentations. (Maybe a later version.)

--
Roman Schwartz                      		 email: schwartz@ppgfr.uucp
Ein lustiger Spruch! ...[kratzkratz].. wo nehme ich einen lustigen Spruch her? 
          Will someone translate my signum into another langue?
Xref: sparky comp.lang.c:19402 comp.lang.c++:18826
Organization: University of Illinois at Chicago
Date: Thu, 7 Jan 1993 23:05:24 CST
From: T J Furstenau <U10139@uicvm.uic.edu>
Newsgroups: comp.lang.c,comp.lang.c++
Subject:    Dynamic Mem Help

    I hope someone on the net can help me with this problem.  I'm trying
to teach myself C and while working on dynamic memory allocation, I've
run into a problem with the 'calloc' function.  When I try to run the
following code, taken straight from the 'help' example with the
compiler,

#include <stdio.h>
#include <alloc.h>
#include <string.h>

int main(void)
{
    char *str = NULL;

    /* allocate memory for string */
    str = calloc(10, sizeof(char));

    /* copy "Hello" into string */
    strcpy(str, "Hello");

    /* display string */
    printf("String is %s\n", str);

    /* free memory */
    free(str);

    return 0;
}

I get the following error message:

Error D:\BC\BIN\WORK\NONAME00.CPP 10: Cannot assign 'void near*' to
'char near*' in function main().

Any ideas in what I or my system are doing wrong?  Are my compiler options
set wrong?  Any answers, here or mailed, would be greatly appreciated.


***************************************************************************
*  T J Furstenau          | Your clever saying | Looking for a position   *
*  Grad May 92 BS-Math/CS |  could fill this   | as a programmer.  Anyone *
*  U10139@UICVM.UIC.EDU   |      space         | hiring?                  *
***************************************************************************
From: mccall@mksol.dseg.ti.com (fred j mccall 575-3539)
Newsgroups: comp.lang.c
Subject: Re: Exact-sized types (was Re: Typedefing builtin... thanks.)
Date: 7 Jan 93 16:58:30 GMT
Organization: Texas Instruments Inc

In <F9I0BER@math.fu-berlin.de> rene@hamel.uucp (Rene Mueller) writes:

>In article <84931@ut-emx.uucp>, jamshid@ut-emx.uucp (Jamshid Afshar) writes:
>|> In article <1992Nov30.204147.7955@cimage.com> ejd@cimage.com (Ed Driscoll) writes:
>|> |The typedefs I proposed
>|> |would all specify size in bits, either exactly or at least that many bits.
>|> |Using your example, there might be an at-least-18-bits type and an
>|> |exactly-18-bits type (both with variations for signed and unsigned, I 
>|> |suppose).  So there'd be no way to get confused about how many bits you
>|> |were getting unless the typedefs themselves were incorrect.
>|> 
>|> 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?
>You are'nt correct:
>int is as long as a single machine word on the machine (on some machines this means 12bit), on this machines also a short is 12bit long and a long is 24bits long...
>The same is with characters
>Some compilers will give you only the original ASCII-Characterset and a char-value with this machines is 7bit long, all other bits stored in memory for this value will be ignored...

The behaviour you describe is not allowed in an ANSI compiler, which
must provide the minimum sizes that Ed describes.

[Please hit return every 72 characters or so -- it makes things like
inclusions and following the attributions much easier.]

-- 
"Insisting on perfect safety is for people who don't have the balls to live
 in the real world."   -- Mary Shafer, NASA Ames Dryden
------------------------------------------------------------------------------
Fred.McCall@dseg.ti.com - I don't speak for others and they don't speak for me.
From: alien@acheron.amigans.gen.nz (Ross Smith)
Newsgroups: comp.lang.c
Subject: Re:  Pattern Matching for Spelling Correction
Date: 12 Jan 93 12:13:05 GMT+12
Distribution: world
Organization: Muppet Labs

In article <726524557snz@panache.demon.co.uk> raph@panache.demon.co.uk (Raphael mankin) writes:
>In article <1993Jan7.054651.25174@spartan.ac.BrockU.CA> tmc@spartan.ac.BrockU.CA writes:
>
>>I'm currently working on the front-end to an information retrieval
>>package and would like to incorporate a facility to provide for
>>spelling correction. Does anyone have any recommendations for an
>>efficient pattern matching algorithm which could be used in this
>>capacity?
>>
>>The dictionary is rather large (but static) and I would prefer having
>>the option to search the entries either on disk or through a table
>>in memory.
>>
>Sorry to be so short tempered, but does no-one ever read the journals?
>
>CommACM Oct 1992 Vol 35 No 10. pp74-91
>and a whole host of others. Try your university library.

Sorry to be so short tempered, but try to remember that not everyone is at
a university or has access to journals. Some of us occasionally work in the
real world.

--
...... Ross Smith (Wanganui, NZ) ...... alien@acheron.amigans.gen.nz ......

"I blame you for the moonlit sky and the dream that died with the Eagle's flight
I blame you for the moonlit nights when I wonder why are the seas still dry
Don't blame me, sleeping satellite"                              (Tasmin Archer)

--
From: shoroff@ccwf.cc.utexas.edu (Srihari Shoroff)
Newsgroups: comp.lang.c
Subject: Re: Program to convert .EXE to a "C" source file?  I really need one!!
Date: 4 Jan 93 21:17:12 GMT
Organization: Univ of Texas at Austin

In article <C0B6x5.DA6@ulowell.ulowell.edu> mbrousse@cs.ulowell.edu (Marc Brousseau) writes:
<>>>Hello. 
<>>>	I am looking for a program that will take a .EXE or .COM file and
<>>>convert it into a "C" source file.  I saw one on one of the FTP sites today,
<>> [Stuff deleted]
<>> 	I am looking for a program of that nature too.  If someone knows 
<>> where one can be FTP'd I would appreciate E-Mail telling me.  
<>> 				Thanks,
<>> 				dutc0006@student.tc.umn.edu			
<>> 
<>I'd prefer a program that generates the RCS or SCCS archives the program was 
<>developed in, plus a makefile.  Architectural and design documents would be 
<>nice too.
<>----------------------------------------------------------------------------
<I want a printer that will run in reverse, taking in a document, and
<converting it to a word processor file. Word for Windows out of a
<newspaper would be nize.

That's a good question to ask a genie! But with the new OCR (Optical Character
Recognition ?) systems that might not be as impossible as it might seem.  
You might not call it a "printer" but some "scanner", but what's 
in a name?! Now if you could take a playboy centerspread "photo" and generate
the person ("touchable", not virtual reality!) it came from, that's 
engineering!

Srihari
-- 
|A very creative .sig has been ordered.                                      |
|			Will take 4 to 6 weeks for delivery.                 |
|----------------------------------------------------------------------------|
|Wanna get in touch?                                                         | 
|If you're    -serious: 512 371 7409   -miserly: shoroff@ccwf.cc.utexas.edu  |
|                 -nuts   : 4413 Speedway #207; Austin, TX 78751          |
Newsgroups: comp.lang.c
Subject: Hex escaping in strings, (porting from gcc to cc)
From: chrisp@grace.cri.nz
Date: Tue,  5 Jan 93 23:21:59 GMT
Organization: Industrial Research Ltd., New Zealand.
NNTP-Posting-Host: grv.grace.cri.nz

Hi,
  I have a problem with porting from gcc to cc (on a sun sparc station)
		
	puts("\x1b=");		/* set's the terminals keypad mode */

 Works fine with gcc, the "\x1b" is interpreted as ascii 27, escape.  But
 on cc it just prints "x1b=".

 Is the hex code escape an ansii extension,  how else can I do it?, I would
 rather avoid:
	sprintf(tmp,"%c=",27);

				Thanks,  Chris.	   chrisp@grv.grace.cri.nz
Newsgroups: comp.lang.c
From: raph@panache.demon.co.uk (Raphael mankin)
Subject: Re: Pattern Matching for Spelling Correction 
Distribution: world
Organization: Solvfield Ltd.
Reply-To: raph@panache.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Date: Sun, 10 Jan 1993 22:04:32 +0000

In article <1993Jan10.010049.3467@spartan.ac.BrockU.CA> tmc@spartan.ac.BrockU.CA writes:

>In article <726524557snz@panache.demon.co.uk> raph@panache.demon.co.uk writes:
>
>>Sorry to be so short tempered, but does no-one ever read the journals?
>>CommACM Oct 1992 Vol 35 No 10. pp74-91
>>and a whole host of others. Try your university library.
>
>Not all of us can readily access these journals, and asking for the
>insights of others is a little more practical than going for a 75 minute
>drive.
>
Then join the ACM and have the journals come to you. That's what the ACM is 
for.

-- 
--------------
Raphael Mankin			Nil taurus excretum
Newsgroups: comp.lang.c
From: cpcahil@vti.com (Conor P. Cahill)
Subject: Re: Unsolveable bug
Organization: Virtual Technologies Inc.
Date: Thu, 7 Jan 1993 11:34:05 GMT

In article <204@zurich.spectrospin.ch>, gegu@zurich.spectrospin.ch (Gerry Gucher) writes:
> 
> If you are working on a Sun workstation do yourself a favor and
> use "malloc_debug" and if this not sufficient get a copy of the "Purify" 
> package from Pure Software (CA +(408) 720-1600). Price is approx. ~1900
> UK pounds. I don't know the price in US$. 

Two other solutions include:

	dbmalloc 	Posted to comp.sources.misc in Sept 1992

	SENTINEL	Commercial memory access debugger (Priced from $195
			to $795 in the US, available on Sun (Solaris 1.x and
			Solaris 2.x), HP, DECstation, RS/6000, I386/486 SVR3.2
			and SVR4.0, Sequent, DG AViiON, NCR 3xxx). Send email
			if you would like more information.

I do have an interest in both dbmalloc and SENTINEL.

-- 
*** SENTINEL(tm) The ultimate Debugging Environment - email for more info ***

Conor P. Cahill              (703)430-9247            cpcahil@virtech.vti.com
Virtual Technologies, Inc.  46030 Manekin Plaza          Dulles, VA 20166 
Newsgroups: comp.lang.c