HDTenEightyP/NetNews huggingface dataset:
From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
Subject: Re: FLEX question
Organization: Motorola Codex, Canton, Massachusetts
Date: Wed, 18 Nov 1992 17:32:22 GMT

dave@cs.arizona.edu (Dave Schaumann) writes:

>In article <1992Nov16.171445.26227@tc.cornell.edu>, elan@tasha (Elan Feingold) writes:
>>How does one match things regardless of case? i.e If I want to match 
>>the keyword COOKIE, and I don't care what combination of upper and lower 
>>letters the person used...
>>
>>Anything but
>>
>>COOKIE		CreateCookie();
>>cOOKIE		CreateCookie();

>There are two approaches you can take:

>1: Brute force

...

>2: 2-level recognition

...

3: Use the -i option, which makes the whole scanner case-insensitive.

Michael.
Newsgroups: comp.unix.programmer
From: lopi@cli.di.unipi.it (Lopi)
Subject: How Unbind a Socket ??
Keywords: socket bind
Organization: Dipartimento di Informatica, Universita' di Pisa
Date: Fri, 20 Nov 1992 10:51:46 GMT

hi,

I'm trying some experiences with sockets , connections and similar things...
I create a socket with the socket() call, I bind it , listen and accept
a connection ( made using 'telnet host port' ) then I allow both the parts
to write something in a very rudimental talk.
The problem is closing the connection, I use shutdown() for both the sockets
given by socket() and accept(), but the name of the first socket remains
reserved for a certain time and I cannot run again the program until system
frees the first socket... (errno 48 : address already in use) this happens
only when I close the connection, if
is 'telnet' to close ,obviously, all works properly and I soon can run again
the prg. 
I think that shutdown doesn't suffice to destruct the socket, but manuals
don't talk about any other system calls.
Does anybody knows anything about that ?

Fabio Lopiano.

lopiano@athena.di.unipi.it
lopiano@cli.di.unipi.it 
   lopi@dipisa.di.unipi.it

P.S.
Please answer on this group, I'm not sure that mail works properly on my host...

code follows :

------------------8<--------------------8<---------------------8<---------------

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <errno.h>

main() {
int s,ns;

	struct sockaddr_in addr,raddr;
	int rlen;
	int i;
	int b,l;
	
	addr.sin_family 	= AF_INET;
	addr.sin_port   	= 1999;
	addr.sin_addr.s_net	= 131;
	addr.sin_addr.s_host	= 114;
	addr.sin_addr.s_lh	= 4;
	addr.sin_addr.s_impno	= 38;
	
	s = socket( AF_INET , SOCK_STREAM , 6 );
	if( s<0 ) exit();
	b = bind( s, &addr , sizeof(addr) );
	if( b<0 ) { 
		printf("Err n. : %d\n",errno);
		printf("Try later...\n");
		shutdown(s);
		exit();
		}
	l = listen( s , 5 );
	printf("Let's wait....\n");
	ns = accept( s , &raddr , &rlen);
	printf("Ok!\n");
	if( fork() ) connection_1(ns);
		else connection_2(ns);
	shutdown(ns);
	shutdown(s);
}

#define SEND(s)	write( sock, s, strlen(s) )
#define GET(c) read( sock, &c, 1 )
#define PUT(c) write( sock, &c, 1 )

connection_1(sock)	/* remote -> local 	(father) */
int sock;
{
	char c;
	SEND( "connected to Athena.di.unipi.it\n");
	SEND( "please, write something ... \n");
	SEND( "> ");
	while( c != '*' ){
		GET(c);
		printf("%c",c);
		if(c=='\n') SEND( "> ");
	}	
	printf("Connection closed .\n");
}
connection_2(sock)	/* local -> remote 	(son) */
int sock;
{
	char c;
	printf("please write something ... \n> ");
	while( c!= '*'){
		c=getchar();
		PUT(c); 	
		if(c=='\n') printf("> ");
	}
}


Newsgroups: comp.unix.programmer
From: farrow@ucsu.Colorado.EDU (J. Scott Farrow)
Subject: Debugging a forked process under Ultrix
Organization: University of Colorado, Boulder
Date: Tue, 17 Nov 1992 21:20:48 GMT

I posted this to comp.unix.ultrix and didn't get any replies, so...

Is there a way to debug a forked process under Ultrix? Ultrix's dbx does
not support the "-a" argument for attaching to a running process that
AIX's dbx does.

I have heard that xdbx is able to do this, but can't figure out how, since
it takes the same debugger arguments that dbx does. GNU gdb also does not
seem to support this. I also grabbed xxgdb, but it needs some library or
toolkit that I do not have, so I can't compile it.

There must be some way to debug a forked process under Ultrix, but I can't
find it. If you know, please mail me.

Thanks,

Scott

--
************* Repeal Amendment 2! - Shame On You, Colorado. ******************
J. Scott Farrow-Student SysAdmin/Programmer, University of Colorado at Boulder
Computing & Network Services, Boulder, Colorado, USA, phone: (303) 492-4428
Internet: farrow@spot.colorado.edu, farrow@cs.colorado.edu
Newsgroups: comp.unix.programmer
From: reza@loki.peri.jsc.nasa.gov (Reza Razavipour)
Subject: sockets and non blocking reads
Organization: Lockheed Eng & Sci
Date: Fri, 20 Nov 1992 17:56:16 GMT

Can a kind soul e-mail me how to create a non blocking 
socket, i.e. if no message is to be read go on and
don't wait.
Any help is greatly appreciated.
thanx in advance.
Reza.
From: robert.pinchbeck@factory.com (Robert Pinchbeck)
Newsgroups: comp.unix.programmer
Subject: GOOD OL' YACC
Date: 17 Nov 92 19:08:00 GMT
Reply-To: robert.pinchbeck@factory.com (Robert Pinchbeck)
Organization: Invention Factory's BBS - New York City, NY - 212-274-8298v.32bis

I am currently trying to locate documentation for YACC.  I was able to
find and download LEX documentation but YACC has eluded me so far.

If anyone knows where to get a full breakdown of the YACC grammar
syntax in text form, I would appreciate your posting it here.

Thanx,

-Bob  :)
                                                                                                   
Newsgroups: comp.unix.programmer
From: hykok@nyx.cs.du.edu (Herbie Husker)
Subject: gnu software, Linux, etc.
Organization: University of Denver, Dept. of Math & Comp. Sci.
Date: Sat, 21 Nov 92 17:01:39 GMT

Hi guys/gals:

    If any of you have info on getting a copy of UNIX operating system,     
X-Windows, or some gcc compilers, I appreciate if you can e-mail the
answers to me.

    I have hear a lot about Linux capability to run in both MS-DOS and 
UNIX environment and it is FREEWARE too, so if anyone can tell me where
I can get the latest version and what is the latest version, I'll 
certainly appreciate it.  Any other suggestions as to the above requests
will also be appreciated.

                       Hon-Yin dude.
                       -------------
From: sivap-s@acsu.buffalo.edu (Suresh .S)
Newsgroups: comp.unix.programmer
Subject: Re: heap status
Date: 19 Nov 92 06:30:22 GMT
Organization: UB
X-Newsreader: TIN [version 1.1 PL6]

ChianHwa Yang (star@ra.cs.umb.edu) wrote:
: 
: 
: Fellow C programmers,
: 
: 	I'm trying to find out how much dynamic heap storage my program
: is taking during its run.  The only command I know of that does this is
: ps -aux (on bsd).  However, I think it only displays the data and text
: space because the value does not change even though the program frees 
: a lot of space.  Does anyone out there have an idea?  Any C library function,
: system call, or unix commands?

In UNIX we have a system call mallinfo(), which will tell you how much
of dynamic  memory you have  consumed, provided you  have  malloced at
least once.

-- 
Suresh Sivaprakasam                    
Department of Computer Science,    SUNY Buffalo,    Amherst,   NY - 14260-0001
Internet :sivap-s@cs.Buffalo.EDU               Bitnet : sivap-s@SUNYBCS.BITNET
Newsgroups: comp.unix.programmer,comp.sys.sun.misc
From: casper@fwi.uva.nl (Casper H.S. Dik)
Subject: Re: Installing a shared library without screwing up.
Keywords: libc.so replacing
Organization: FWI, University of Amsterdam
Date: Wed, 18 Nov 1992 10:18:40 GMT

mark@coombs.anu.edu.au (Mark) writes:

>On SunOS 4.x.x:
>I've heard a lot of horror stories about mistakes with libc.so replacing and
>how dynamic library loading programs die real quick if you tamper with their
>library.

>What is the right/best way to replace a libc.so with your site customised
>version? I dont want to have to go find the installation tape everytime
>I attempt it. Do I use 'cp' or 'cat mylib > /usr/lib/libc.so' or what? Im a
>bit worried that a context switch will happen halfway through it and bugger
>it all up.

>How would you guys replace it?

The best way is probably to install the new library with the
next highest tiny revision number. E.g., if you have libc.so.1.7.1,
you install the new lib as libc.so.1.7.2. Rember that you MUST also
install a new version of libc.sa as libc.sa.1.7.2. (link or copy
the old one, if you haven't changed anything).

Never cp or cat over the current version of libc.so, all programs
using it will crash (even if the old and the new libc are
byte for byte identical, there is a high probabliity. There's a 100%
chance of this happening when both libraries aren't identical)
Even removing the old one after this steps is not safe when /usr is shared
over NFS.

What we do is:

	cp mylib /usr/lib/newlibc.so
	mv /usr/lib/newlibc.so /usr/lib/libc.so.X.Y.Z
	ln /usr/lib/libc.sa.X.Y /usr/lib/libc.sa.X.Y.Z
	ldconfig


You can copy to the new name in one step, but using a cp followed by
a move will never give you an invalid libc.so in /usr/lib while just
a cp gives you a small period in which a invalid libc.so exists which
could give soe of your users problems. But usually, the ld.so cache
prevents problems like that.

Casper
From: patters@gkok.eecs.nwu.edu (Sean K. Patterson)
Newsgroups: comp.unix.programmer
Subject: Creating custom XDR streams
Date: 19 Nov 92 17:56:44 GMT
Article-I.D.: eecs.1992Nov19.175644.13263
Organization: EECS Department, Northwestern University

Does anyone know how to create custom XDR streams?  None of the standard
types of streams (standard I/O, memory, record) fit my needs exactly.
According to "The Art of Distributed Applications" by Corbin, it is possible
to create custom streams, but I have not been able to find the documentation
on how to do it.

Here is my reason for wanting to do this.  I need to be able to encode
arbitrary data types into XDR form (in memory).  Prior to the encoding
operation I will not know how much memory will be required for the XDR
representation (especially for dynamic data structures such as trees
and linked lists) so if I use the regular XDR memory stream, I will just
have to guess at how much memory to allocate in the xdrmem_create() call.
Of course, I could make the xdrmem_create() call with a reasonable guess as
to the memory required, then try to do the XDR encoding, and if it fails
call xdrmem_create() again with a larger block of memory, etc. until
the encoding operation succeeds.  But this would waste time because I
would have to redo all the encoding work each time I started over.

What I would like to do is create a custom XDR stream that, instead of failing
when it runs out of memory during XDR encoding, allocates more memory and
continues the encoding process.  It looks to me like this is possible.
Can anyone give me some help?


Thanks


Sean Patterson
Northwestern University
s-patterson@nwu.edu
From: mdm@stegosaur.cis.ohio-state.edu (Michael Moore)
Newsgroups: comp.unix.programmer
Subject: pseudo-tty's -- info
Date: 16 Nov 92 00:52:26 GMT
Article-I.D.: cis.1992Nov16.005226.9079
Organization: The Ohio State University Dept. of Computer and Info. Science


	Could anyone recommend a good document or book which 
explains the implementation of a pseudo-tty?   Also, I recall
someone has written a program which will run a given command
with a pseudo-tty.  Could anyone point me to its location?

	Thanks in advance,

	-Michael

-- 
|\  Michael  Delbert  Moore     _   /|     Home   : (614) 471-1937         /|
| \ OSU Student  Programmer     \`o_O'     Office : (614) 292-7161        / |
| / Undergraduate CIS major       ( )      Email  : mdm@cis.ohio-state.edu\ |
|/-------------------------        U       --------------------------------\|
Newsgroups: comp.unix.programmer
From: isc40038@nusunix1.nus.sg (LIM FANG HOW)
Subject: How to extract file descriptor
Organization: National University of Singapore
X-Newsreader: TIN [version 1.1 PL6]
Date: Sat, 21 Nov 1992 06:35:24 GMT

I am trying to lock a file which is open using fopen. As what I know,
fopen returns a file pointer which points to a structure that contains
information about the file.But the flock function only takes a file
descriptor and not a file pointer.

Qn1 : Does the structure pointed by file pointer contains the file
      descriptor ? I could not find the file descriptor in the stdio.h
      in my system (SUN sparc using 4.3BSD)

Qn2 : If yes, how to extract it from the structure ?
      I tried the following and it returns fd not defined :
              
               FILE *fp;
                   :
                   :
               fp=fopen("A","r");
                   :
                   :
               fdes=fp->fd;

Qn3 : Is there any way to lock a file using the file pointer instead of
      file descriptor ?

 
Xref: sparky comp.unix.programmer:5380 comp.lang.c:16899
From: richard@crowded-house.den.mmc.com (Richard Armstrong)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: How do you shell out of a C program
Date: 20 Nov 92 19:02:23 GMT
Organization: Martin Marietta

Look-up exec and fork in the man pages.

-- 
My company never said any of this... I didn't either.
Richard Armstrong, Software Engineer, Martin Marietta
Email->>>> richard@crowded-house.den.mmc.com <<<<-Email 
Newsgroups: comp.unix.programmer
From: mpeppler@itf.ch (Michael Peppler)
Subject: gmon.out format
Organization: ITF Management SA, Geneva, Switzerland
Date: Tue, 17 Nov 1992 07:39:22 GMT

System: Sun 4/65, SunOS 4.1.x

I've looked in the manuals, but I can't seem to find any information
regarding the format of the prof(1)/gprof(1) gmon.out files. Could
someone point me in the right direction ?

Thanks!

Michael
-- 
Michael Peppler	             mpeppler@itf.ch {uunet,mcsun}!chsun!itf1!mpeppler
ITF Management SA            BIX:   mpeppler                         
13 Rue de la Fontaine        Phone: (+4122) 312 1311  
CH-1204 Geneva, Switzerland  Fax:   (+4122) 312 1322  
Newsgroups: comp.unix.programmer
From: isc40038@nusunix1.nus.sg (LIM FANG HOW)
Subject: How to implement mandatory locking
Organization: National University of Singapore
X-Newsreader: TIN [version 1.1 PL6]
Date: Tue, 24 Nov 1992 02:23:27 GMT

I am working on a interprocess communication project. It consists of a
set of concurrent processes accessing a set of files. To achieve
consistency, I had tried to use advisory locking with the following
command :
        for (x=1;x<=2000;++x) {
           if ((flock(fd,LOCK_EX|LOCK_NB))==-1)
              print error messages;
            else break;
        }

However, it gives me a deadlock situation.

Thank you all.

Xref: sparky comp.unix.programmer:5330 comp.sys.sun.misc:5312
From: n8743196@henson.cc.wwu.edu (Jeff Wandling)
Newsgroups: comp.unix.programmer,comp.sys.sun.misc
Subject: Re: Installing a shared library without screwing up.
Keywords: libc.so replacing
Date: 18 Nov 92 09:50:17 GMT
Article-I.D.: henson.1992Nov18.095017.14952
Organization: Howling Dog

mark@coombs.anu.edu.au (Mark) writes:

>On SunOS 4.x.x:
>I've heard a lot of horror stories about mistakes with libc.so replacing and
>how dynamic library loading programs die real quick if you tamper with their
>library.

>What is the right/best way to replace a libc.so with your site customised
>version? I dont want to have to go find the installation tape everytime
>I attempt it. Do I use 'cp' or 'cat mylib > /usr/lib/libc.so' or what? Im a
>bit worried that a context switch will happen halfway through it and bugger
>it all up.

>How would you guys replace it?

One way to test it without mucking up your system is to set the 
environment variable LD_LIBRARY_PATH to the directory where your
newly created libc.so lives.. Like:

example--

% cd /usr/lib/shlib.etc
% setenv LD_LIBRARY_PATH `pwd`

Then you can run programs that will exercise the lib you've created.

If you find a problem with your lib, and are able to

% unsetenv LD_LIBRARY_PATH

you'll be using the default libs and running with a clean lib once again.

Once you are certain that aspects of your site-custom lib are ok, then you
(as root) could cp it to /usr/lib, give it 755 perms and run ldconfig.

By using the environment variable, you can at least test your lib without
worrying about trashing other users's processes. 

I don't recommend doing this at times where a "crash" would be a *bad
thing*.  Also, keep track of the names of libc.so's in /usr/lib.  Once
I had a bad lib and had to remove it in single user mode.  Leave the old
libs alone. 

(See Also trace(1) and ldconfig(1))

-- 
perl -e '$a="Japhuneasorcttlk h eae r r ,";$]=0;$s=$];while($s<4){do{$_ .= pack
("c",vec($a,$],8));$]+=4;}while($]<length($a)&&vec($a,$],8)!=32);$s++;$]=$s;$_
.= ' ';}chop;print;' Jeff Wandling  <jdw@physics.wwu.edu>  "will hack for food"
Xref: sparky comp.unix.programmer:5337 comp.sys.sun.apps:2509 comp.unix.questions:13580
From: fjs@mrst.uucp (Fred J. Sena)
Newsgroups: comp.unix.programmer,comp.sys.sun.apps,comp.unix.questions
Subject: SCCS to RCS Conversion
Date: 17 Nov 92 23:26:53 GMT
Followup-To: comp.unix.programmer
Organization: MRS Technology, Inc.

hi,

I want to convert a bunch of source files from SCCS to RCS.  I have a tool
called "sccstorcs" that came out around 1982, but I tried it on some files
and it broke (on some branches, I think).  I would try and fix it, but first
I thought that it would be a good idea to see if there is another version
available.

I hope that there is a more up-to-date version available, that presumably
would have this fixed.  If you have any information or know where I can
obtain a good copy, I would really appreciate hearing from you.  Please
email if possible, and I will post a summary to all of those who are
interested.

	thanks,
	-fred
From: dave@cs.arizona.edu (Dave Schaumann)
Newsgroups: comp.unix.programmer
Subject: Re: GOOD OL' YACC
Date: 18 Nov 92 20:57:06 GMT
Reply-To: dave@cs.arizona.edu (Dave Schaumann)
Organization: University of Arizona

In article <1688.1931.uupcb@factory.com>, robert.pinchbeck@factory (Robert Pinchbeck) writes:
>I am currently trying to locate documentation for YACC.  I was able to
>find and download LEX documentation but YACC has eluded me so far.
>
>If anyone knows where to get a full breakdown of the YACC grammar
>syntax in text form, I would appreciate your posting it here.

A recent article in comp.compilers indicated there's a new "O'Reilly" book
available on lex and yacc.  It's not PD, and it's not machine readable, but
perhaps it's good enough anyway...

(included article follows)

From: johnl@iecc.cambridge.ma.us (John R. Levine)
Newsgroups: comp.compilers
Subject: New lex & yacc book from O'Reilly
Keywords: lex, yacc, books, tools
Date: 15 Nov 92 06:11:34 GMT
Reply-To: John R. Levine <johnl@iecc.cambridge.ma.us>
Organization: Compilers Central

I'm pleased to report that the new version of the O'Reilly ``lex & yacc''
is now available:

Levine, Mason, and Brown, ``lex & yacc,'' 2nd edition, O'Reilly &
Associates, 1992, 366 pp., ISBN 1-56592-000-7, $29.95.

I think it's a big improvement, but since I wrote a lot of it, my opinion
is hardly unbiased.  Changes include:

-- Rewritten introductory chapters, with more detailed examples
-- New example chapter with a SQL parser
-- Greatly expanded reference sections, with details on grotty things like
   how to munge symbols in generated lexers with sed so you can include
   several of them in the same program.
-- Expanded section on ambigity, conflicts, and error handling
-- Exercises at the ends of the chapters for self-study and textbook use
-- All the examples actually work

It should be available at technical bookstores.  Outside North America,
Addison-Wesley distributes it.

Regards,
John Levine, johnl@iecc.cambridge.ma.us, {spdcc|ima|world}!iecc!johnl
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.

-- 
Hey, everybody -- somebody said `mattress' to Mr. Lambert!  *TWICE*!
Newsgroups: comp.unix.programmer
From: comen@interlan.interlan.com (Jim Comen)
Subject: Software Control Systems
Organization: Racal Datacom, Inc., Boxborough, MA (1-800-LAN-TALK)
Date: Thu, 19 Nov 1992 20:11:34 GMT

My group is at the point of looking for a good software control system for
a sun 3/50 systems running SunOS 4.1.1.  Currently we are evaluating PVCS 
from Intersolv.  We are currently using sccs.  Does anyone have any 
information on the two which would assist me in this choice?  Has anyone
else switched from sccs to another?  Any suggestions?
Any info is appreciated!
Thanks,

Jim Comen
Racal Datacom
From: duane@intermec.com (Duane Charron)
Newsgroups: comp.unix.programmer
Subject: Using LPI-C Under interactive Unix 3.2 version 3.0.1
Date: 21 Nov 92 00:27:37 GMT
Article-I.D.: intermec.2008
Reply-To: duane@intermec.com ()
Distribution: world
Organization: Intermec Corporation, Everett, Wa.

Hello Net,

  Hey, has anyone out there tried to use the LPI ansi 'C' development
system that is included with interactive Unix?  I am having a heck
of a time trying to get it going.  If so please write Back.  I
tried a simple program to read in a file.  I wrote it so both the
standard 'C' compiler(cc) and the LPI 'C' compiler could compile
and link it.  The Standard one worked fine but the LPI one
gave erroneous errors.  Also How do I get the LPI to include the
Machine specific 'h' files(fcntl.h) and (/sys/*.h)?  Then
also How do I get the anis Library to link.  I have a program
I am porting to Unix and a couple of functions are allready done
in Ansi.  

				Thanks in advance
				Duane
From: jem@sunSITE.unc.edu (Jonathan Magid)
Newsgroups: comp.unix.programmer
Subject: Re: PASCAL rules
Date: 22 Nov 92 19:26:17 GMT
Organization: University of North Carolina, Chapel Hill

In article <If3nOE200axfAQXUMa@andrew.cmu.edu> aw36+@andrew.cmu.edu (Andrew N. Westmeyer) writes:
>Hey guys,
>
>     What's going down?  I am in a comp sci class which utilizes Object
>Pascal Genie, a graphically interfaced Pascal environment.  It's
>user-friendly.  I am thoroughly convinced that Pascal is THE best
>computer language, and those who think otherwise can go to hell.

Okay, who let Roger Carasso onto their account?

Cut it out!


-- 
Jonathan Magid     jem@sunSITE.unc.edu       sunSITE Administrator
Virtual pizza Delivery (tm)::faxed in 30 cycles or less or you get it
----------------------------------------FREE!!!-----------------------
From: sivap-s@acsu.buffalo.edu (Suresh .S)
Newsgroups: comp.unix.programmer
Subject: Re: UNIX SPREADSHEETS?
Date: 19 Nov 92 08:16:34 GMT
Organization: UB
X-Newsreader: TIN [version 1.1 PL6]

David Martland (David.Martland@brunel.ac.uk) wrote:
: I am interested in decent spreadsheet programs which run under Unix - preferably with
: X or OpenLook.
[ deleted ]

A group  of soft-eng students  in Univ  Of  Wisconsin,  Milwaukee, had
built a X interface to SC 6.1. It is great, I had  installed it in our
systems. It is available from ftp.cs.uwm.edu:/pub/soft-eng/xspread*

It is also available from export.lcs.mit.edu:contrib/xspread*



-- 
Suresh Sivaprakasam                    
Department of Computer Science,    SUNY Buffalo,    Amherst,   NY - 14260-0001
Internet :sivap-s@cs.Buffalo.EDU               Bitnet : sivap-s@SUNYBCS.BITNET