HDTenEightyP/NetNews huggingface dataset:
From: mdw@theory.TC.Cornell.EDU (Matt Welsh)
Subject: Help needed writing a simple Imakefile
Organization: Cornell Theory Center
Date: Sun, 27 Sep 1992 02:16:25 GMT

I've been trying to write an Imakefile for a small X-Windows program
that I'm working on, to no avail. Yes, I have RTFM but I can't seem
to translate the instructions into to workable Imakefile. I'd really
appreciate it if someone out there could write up a quick generic
file for me.... this program has, say, two C source files (foo.c and
bar.c) which are (of course) compiled to foo.o and bar.o respectively,
then linked together, against libm.a and libX11.a (-lm and -lX11) to
the executable baz. A normal Makefile for this would of course look like

baz: foo.o bar.o
	cc -o baz foo.o bar.o -lm -lX11

And what I need to do is express this kind of operation in an Imakefile.
Also, do I need some other file (like an Imake.temp)? If so, what
would I put in that file for this (simple) program? 

Thanks a lot for any help.

mdw

-- 
Matt Welsh    mdw@tc.cornell.edu        +1 607 253 2737
Systems Programmer, Cornell Theory Center
  "Yow! Up ahead! It's a DONUT HUT!!"
Xref: sparky comp.unix.programmer:4862 comp.unix.sysv386:15227
From: derek@carroll1.cc.edu (Derek Inksetter)
Newsgroups: comp.unix.programmer,comp.unix.sysv386
Subject: Running X386 under 386BSD 0.1
Date: 5 Oct 92 15:54:26 GMT
Followup-To: comp.unix.programmer
Organization: Carroll College Dept. of Artificial Stupidity


	hi.

	Perhaps this isn't the correct forum for this, but I'm sure I'll be
	flamed into correctness soon enough.

	I'm having problems getting X386 working with 386bsd 0.1. I FTPd
	the X386 port from agate.berkeley.edu, and installed it according
	to any README I found, but it apparently is looking for /dev/vga,
	which I don't have.  I wish I had some sourcs to look thru, but I
	just don't have the room for it all.

	If anyone here can help, or point me to anyone who can help, I'd
	appreciate it.

	derek

	PS. Is there a 386BSD newsgroup? There's not one at this site, but
	I'm not too sure about much at this site.

Newsgroups: comp.unix.programmer,comp.unix.internals,comp.unix.wizards
From: avalon@coombs.anu.edu.au (Darren Reed)
Subject: Bug ??
Organization: Computer Services Centre, Australian National University
Date:  1 Oct 92 09:24:47 GMT

Has anyone experienced any problems when using setrlimit or similar
to reduce the max. number of files you are allowed to have open with
sockets ?

On SunOS 4.1.2, if I (say) set the max. number of fd's I can have open
to 5, don't close my tty fd's, open a socket to listen on, I can accept
one connection successfully and that works fine.  No hassles.  The
next one, however, is where the fun starts.  If I connect to that
socket yet again, the connection is formed BUT accept() returns an error
(ENFILE - no more files or whatever it actually is).  This is fine too.
However, the socket is still connected!  And the other end just sits there
waiting for something to happen.  I can't close the socket either (accept
returns -1 and I don't have any other handles).

There seems to be some suggestion that I might want to call accept()
again, when I have closed some other file but to me this isnt really
an acceptable alternative since I have no idea how long the inbound
will have to wait.

Can anyone help with a way to avoid these problems ? (Other than
increasing the fd limit on that process).

thanks,
Darren
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.unix.programmer
Subject: Re: Question about Internet Services
Date: 6 Oct 1992 23:44:44 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: telecaster.think.com

In article <4619@moscom.com> jmp@moscom.com (Joe Palumbos) writes:
>When you bind to a port using Internet protocol, and specify zero as
>your port-number in your local address, the system will assign you an
>unused port (between 1024 - 5000).  The port-number is not filled in
>in the address structure, however.  
>
>Is there a function that will return an unused port-number, or allow
>you to find out which port-number was assigned as described above?

The former wouldn't be a good idea.  Between the time that you call it and
the time you bind the socket, another process could bind to that port.  You
would have to write a loop that got a port number and tried to bind to it,
repeating this until it succeeds.

The use of a 0 port in the bind(2) call simplifies this, since the kernel
can pick the port and bind to it in an atomic operation.  Getsockname(2)
should tell you the port it chose.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Newsgroups: comp.unix.programmer
From: mcnab@dinsdale.nas.nasa.gov (David McNab)
Subject: Re: Library linking on Unix + Question
Organization: NAS Program (CSC), NASA/Ames Res. Ctr.
Date: Fri, 2 Oct 92 00:22:52 GMT

In article <1992Oct1.171348.29897@jarvis.csri.toronto.edu>, jwang@white.toronto.edu (Jingwen Wang) writes:
> 
>     We developped a library for distribute applications in unix environment.
> The library is quite big in size. A typical application may only need to
> use a couple of calls of the library. Linking the application with the
> library produces an unreasonably big binary, even for very small
> applications.
> 
>     Is there a simple way of handling this so that only those routines that
> are really referenced by the application are actually linked?

This is a difficult question to answer when you don't mention
what hardware or species of UNIX you're using, but in general
UNIX linkers already do what you're asking.  That is, `ld' scans
the library and extracts code only when it's needed to resolve an
external reference.  (I know that's true under IRIX 4.0.1 and
SunOS 4.1.1, anyway.)

If your OS provides shared libraries you may want to use them.
That will keep your executable small, at least until you actually
execute it.

Which brings up my question.  The SunOS 4.1.1 man page for `ld'
[quoted without permission] says this:

    "When ld.so is given control on program startup, it finds all
     .so  files  specified  when the program was constructed (and
     all .so's on which they depend), and  loads  them  into  the
     address  space."

Does ld.so really load the entire shared library file into memory,
or does it also only load the code for unresolved references?

David McNab
Parallel Systems Support
NAS Program (CSC), NASA/Ames Research Ctr.
mcnab@nas.nasa.gov
Newsgroups: comp.unix.programmer
From: kaleb@thyme.jpl.nasa.gov (Kaleb Keithley)
Subject: Re: anything similar to FIONREAD for sockets?
Organization: Jet Propulsion Laboratory, Pasadena, CA
Date: Mon, 5 Oct 92 15:52:35 GMT

In article <BvHBLt.JGs@undergrad.math.waterloo.edu> bbobak@napier.uwaterloo.ca (Brad Bobak) writes:
> I'm looking for some way to find other the number of available
>characters waiting to be read on a socket. Right now, I'm working on
>a Sun 4, and that ioctl() isn't supported on sockets.
>

FIONREAD not supported on sockets?   I don't think so!

W. Richard Stevens book "UNIX Network Programming" says (quoted without
permission):

 ioctl System Call
   [...]
   FIONREAD  [...] This feature works for files, pipes, terminals, and 
             sockets.


Even the Sun man page says:

  IOCTLS for Files
   FIONREAD  [...] This works for files, pipes, sockets, and terminals.


-- 

Kaleb Keithley                          kaleb@thyme.jpl.nasa.gov

Not authorized, in any way, shape, or form, to speak for anyone.
Newsgroups: comp.unix.programmer
From: jwang@white.toronto.edu (Jingwen Wang)
Subject: Library linking on Unix
Organization: CSRI, University of Toronto
Date: 1 Oct 92 21:13:48 GMT


    We developped a library for distribute applications in unix environment.
The library is quite big in size. A typical application may only need to
use a couple of calls of the library. Linking the application with the
library produces an unreasonably big binary, even for very small
applications.

    Is there a simple way of handling this so that only those routines that
are really referenced by the application are actually linked?

Thanks.


-- 
  {}
{}(){} -----> Jingwen Wang, Univ. of Toronto       (416)-978-1675 (office)
  {}          jwang@snow.white.toronto.edu         1-800-ASK-wang (home)

--
  {}
{}(){} -----> Jingwen Wang, Univ. of Toronto       (416)-978-1675 (office)
  {}          jwang@snow.white.toronto.edu         1-800-ASK-wang (home)
From: phardie@nastar.uucp (Pete Hardie)
Newsgroups: comp.unix.programmer
Subject: Imake template question
Date: 1 Oct 92 15:23:20 GMT
Distribution: na
Organization: Digital Transmission Systems, Inc.

Hello all,

Has anyone developed an Imake target for multiple distinct executables in
one directory?  Our project has several cases where we would like to keep
a set of related, but distinct, programs in the same directory, but we do
not have a valid Imake target that will allow such things.  We might have
several for a *specific* number of executables, but we'd like a generic
solution.

email replies ok, I'll summarize if requested.

Thanks,

-- 
Pete Hardie:  phardie@nastar  (voice) (404) 497-0101
Digital Transmission Systems, Inc., Duluth GA
Member, DTS Dart Team           |  cat * | egrep -v "signature virus|infection" 
Position:  Goalie               |
From: nancyp@hathor.CSS.GOV (Nancy Provoncha)
Newsgroups: comp.unix.programmer
Subject: SCCS TEXT
Keywords: SCCS
Date: 2 Oct 92 19:23:20 GMT
Distribution: usa
Organization: ENSCO, Inc., Melbourne, FL


    Can anyone recommend a good comprehensive text on the 
Source Code Control System (SCCS)?

    Send replies email please. Thank You!
From: vick@Oslo.docs.uu.se (Mikael Lundgren)
Newsgroups: comp.unix.programmer
Subject: Question concerning the Andrew Console
Date: 30 Sep 92 15:38:21 GMT
Organization: Uppsala University
NNTP-Posting-Host: oslo.docs.uu.se

I don't know whether this is the proper group, but
I'll give it a try anyway.

I run the Andrew Console service, with my own setup of
load curves etc. The problem arises when I'm trying to 
design my own instruments, which should be processes
run by the console on starting it, delivering data
to it. How is this done? I may be stupid, but writing
things to stdout don't work. (I figured maybe they
spawned the process and monitored stdout, but no).

How should I do this? The documentation is poor on the subject.

Thanx in advance!



--
() University of Uppsala ,Sweden   |  Mikael (Vick) Lundgren      ____       ()
() Department of Computer Science  |  vick@bern.docs.uu.se       /..  \/|    ()
() Remember:Four bananas always add up to a plectrum.           (----)  | )) ()
() Neither more nor less and definitely not the other way around.\____/\|    ()
Newsgroups: comp.unix.programmer
From: leisner@eso.mc.xerox.com (Marty Leisner)
Subject: what is a socket file?
Organization: Xerox
Reply-To: leisner.henr801c@xerox.com
Date: Wed, 30 Sep 1992 09:41:59 PDT
X-Received: by usenet.pa.dec.com; id AA08884; Wed, 30 Sep 92 09:43:45 -0700
X-Received: by inet-gw-1.pa.dec.com; id AA29582; Wed, 30 Sep 92 09:43:08 -0700
X-Received: from zombi ([13.1.189.45]) by alpha.xerox.com with SMTP id <11893>; Wed, 30 Sep 1992 09:42:49 PDT
X-Received: from annapurna.wbst147.xerox.com by zombi (4.1/SMI-4.1)id AA15241; Wed, 30 Sep 92 12:42:47 EDT
X-Received: by annapurna.wbst147.xerox.com (4.1/SMI-4.1)id AA16925; Wed, 30 Sep 92 12:41:59 EDT
X-To: comp.unix.programmer.usenet%decwrl.dec.com@eso.mc.xerox.com
X-Cc: leisner@eso.mc.xerox.com


Socket files have the = magic charecter in ls appended to it.

I'm running on a Sparcstation with SunOS 4.1.x, and the man page for stat(2)
talks about:
 #define    S_IFSOCK       0140000  /* socket */

What is this, how do I make one and what do I use it for?

Marty    leisner.henr801c@xerox.com 
          Member of the League for Programming Freedom 
 The Feynman Problem Solving Algorithm:
 1) Write down the problem
 2) Think very hard
 3) Write down the answer     -- Murray Gell-mann
From: melby@dove.yk.Fujitsu.CO.JP (John B. Melby)
Newsgroups: comp.unix.programmer
Subject: Re: "&" sign and DEC C compiler
Date: 6 Oct 92 03:09:18 GMT
Followup-To: comp.lang.c
Organization: Open Systems Dept. Div. 2 Sect. 1, FUJITSU LTD.
In-reply-to: lu@m2c.org's message of 6 Oct 92 03:00:08 JST

>     for(gen = lsStart(argList);
>        (lsNext(gen, (lsGeneric *) &((lsGeneric) newArg),(lsHandle *) 0) == 0)
>        || ((void) lsFinish(gen), 0); )

>     Clearly, DEC C compiler does not like the "&" sign, but the Sun C
>     compiler take it.  Any help is appreciate !  Thank you !

This is a C problem ("the value has been cast").  To avoid crossing the
Rubicon (so that you can reliably obtain the pointer value of the expression),

	(lsGeneric *) &((lsGeneric) newArg)

should be replaced by something along the following lines:

	(lsGeneric *) &newArg

(Followups to comp.lang.c.)

-----
John B. Melby
Fujitsu Limited, Yokohama
melby%yk.fujitsu.co.jp@fai.com
Xref: sparky comp.unix.programmer:4843 comp.unix.misc:3873 comp.unix.questions:11694
From: imran@Apple.COM (Imran Sayeed)
Newsgroups: comp.unix.programmer,comp.unix.misc,comp.unix.questions
Subject: Localizing Unix Software
Keywords: Localization, Internationalization, Unix
Date: 1 Oct 92 01:56:09 GMT
Organization: Apple Computer Inc., Cupertino, CA

Hi, I was wondering wheter anybody out there knows of a standard unix package or set of protocols for localizing a unix program. I have seen proprietary ones like HP's Native Language Support but is there some standard method or set of calls that can be used to make a program language independent, which also does not 
depend on the particular unix OS (like HP-UX for NLS). Thanx a lot. Please reply to imran@apple.com.

Imran Sayeed.
From: andrew@airs.com (Andrew Evans)
Newsgroups: comp.unix.programmer
Subject: Re: is there a coff spec available?
Keywords: coff manual
Date: 28 Sep 92 22:59:24 GMT

assela@marcus.its.rpi.edu (A. Andre Asselin) sez:

>I'm looking for documentation on the COFF file format.  Does anybody know
>where I could find any info. on it?  Thanks.....

O'Reilly has a good book on the subject.  I had to write a utility
that could parse COFF object and archive files, and this is where I
got most of my information.  It's a lot easier than trying to figure
it out from the meager system documentation and header files.
-- 
Andrew Evans (andrew@airs.com) - Infinity Development Systems - Waltham, MA
From: ib89mose@htlulx.htl-bw.ch (Moser Stefan)
Newsgroups: comp.unix.programmer
Subject: Setting tabulator default
Date: 1 Oct 92 13:58:40 GMT
Organization: HTL Brugg-Windisch, Switzerland


Is there anyone out there who can explain me how to set the tabulator
spacing default in a terminal session under Unix/Xenix? I'm programming
a user interface in C and I really need to know this. However, I couldn't
find anything related to the topic in the doc (at least nothing that worked).

Please reply by mail.

(Sorry if this is a FAQ, I'm new to the net)

Thanks a lot
--Steve
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.unix.programmer
Subject: Re: transferring data between processes (sockets??)
Date: 1 Oct 1992 08:15:32 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com
Keywords: XProperties sockets communication

In article <BvEzn9.57M@news.cso.uiuc.edu> jrpg8255@uxa.cso.uiuc.edu (Jeremy Payne ) writes:
>I need to move large amounts of data between X clients and their common
>parent (children are created that signal their need for data by passing
>around property atoms).  How do I get data from the parent down to its
>children?

If these are indeed parent and child processes that are communicating with
each other, you should be able to use pipes rather than sockets.

In either case, good examples of both pipe and socket communications are in
"Unix Network Programming" by W. Richard Stevens.  (This is at least the
third time I've recommended this book in the past 24 hours -- I think I
should create a crontab script that posts something about it every day :-)
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Newsgroups: comp.unix.programmer
From: "Stefan Berg" <sgberg@peach.ucs.indiana.edu>
Subject: How can I do pure I/O? no buffer, echo, translations, etc...
Organization: Computer Science, Indiana University
Date: Sat, 26 Sep 1992 16:30:30 -0500

I want to do something like this:

main() {
  int c;
  while((c=getchar()) != EOF)
    putchar(c);
}

However I don`t want all the side effect, which come with getchar and
putchar. These are: entered characters are echoed back, entered and
display characters are kept in a buffer until a RETURN, CTRL-C will
interrupt the program, etc...

If I send a character of value x through my terminal program (assuming
I`m logged on remotely), I want the variable c to contain the value x
as soon as I read from the keyboard buffer. This includes all possible
8 bit values (0 - 255). When I write to the screen I want the character
to be send immediately back to me. This has to be very strict... it would
defeat the purpose, if some characters are translated in a weird way or
if a CTRL-C would interrupt my program.

I almost got a solution, when I tried to use curses. Something like this:

#include <curses.h>
#include <signal.h>
main() {
  int c=0;
  initscr();
  raw();
  noecho();
  while(c != 3) {   /* stop program when CTRL-C is entered */
    c = getch();
    addch(c);
    refresh();
  }
  endwin();
}

This program echo`s everything back to me. The only problem with this
is, that curses are oriented toward a window and if I typed around 80
characters, I`ll get an additional CR/LF with my character stream.
And there are also some other characters, which get translated in a
funny way.

Oh yes... I also need to be able to check if characters are present
in the keyboard buffer, so that I don`t stop my program if no characters
were entered from the keyboard.

I have been working on this for quite some time and it really doesn`t
seem to be very easy. Maybe somebody has a solution for me. Something
like this must have been implemented in the program "sz" and "rz",
because both can read binary input from the keyboard.

Thanks to anybody, who can help me,

Stefan



































-- 
,--------------------------------------------------------------------,
| Usenet   sgberg@charon.bloomington.in.us            Stefan G. Berg |
| Internet sgberg@ucs.indiana.edu        GE Mail: s.berg5            |
| Bitnet   sgberg@iubacs  NeXT Mail: sgberg@arapahoe.ucs.indiana.edu |
`--------------------------------------------------------------------'
Xref: sparky comp.unix.programmer:4813 alt.sources:2134 comp.lang.c++:14288
From: moudgill@cs.cornell.edu ( Mayan Moudgill)
Newsgroups: comp.unix.programmer,alt.sources,comp.lang.c++
Subject: C++ sockstream library ftp'able
Date: 29 Sep 92 15:13:02 GMT
Article-I.D.: cs.1992Sep29.151302.5996
Organization: Cornell Univ. CS Dept, Ithaca NY 14853

I've made the latest revision of my  sockstream library ftp'able from
   ftp.cs.cornell.edu
in directory
   pub/sockets
as two files:
   sstream1.shar
   sstream2.shar

For those of you who are using an older version: please switch to this
version. It cleans up an extremely ugly bug related to re-using buffered
sockets.

For those who've never used it before -- here's an overview:

   Overview:
   --------
   The C++ Socket Stream Library was developed with two aims in mind -- to
   provide an iostream-based interface for sockets, and to facilitate using
   the event driven features provided by BSD-sockets (i.e. SIGURG and SIGIO).

   Both have been accomplished.  Included are 3 demo sets.

   Also included are an efficient interface to fd_set and select.

As always, send bug reports and requests for enhancements to
   moudgill@cs.cornell.edu

And PLEASE, PLEASE drop me a line about what you're using it for, what
you do and what you don't like about it.
:)
Mayan
Xref: sparky comp.unix.programmer:4832 comp.windows.x:17324
From: klute@tommy.informatik.uni-dortmund.de (Rainer Klute)
Newsgroups: comp.unix.programmer,comp.windows.x
Subject: Re: Help needed writing a simple Imakefile
Date: 1 Oct 1992 08:30:27 GMT
Organization: CS Department, Dortmund University, Germany
Distribution: world
NNTP-Posting-Host: tommy

In article <1adb6jINNd3d@uakari.primate.wisc.edu>, bin@primate.wisc.edu
(Brain in Neutral) writes:
|> I don't understand this.  I saw no mention of any need for Motif in the
|> original posting. (-lm != -lXm)

You are right, of course. Stupidly I didn't look careful enough.

-- 
  Dipl.-Inform. Rainer Klute      klute@irb.informatik.uni-dortmund.de
  Univ. Dortmund, IRB
  Postfach 500500         |)|/    Tel.: +49 231 755-4663
D-W4600 Dortmund 50       |\|\    Fax : +49 231 755-2386
Newsgroups: comp.unix.programmer,alt.sources,comp.lang.c++
From: moudgill@cs.cornell.edu ( Mayan Moudgill)
Subject: Re: C++ sockstream library ftp'able
Organization: Cornell Univ. CS Dept, Ithaca NY 14853
Date: Wed, 30 Sep 1992 16:17:46 GMT

The internet address for ftp.cs.cornell.edu is:
 128.84.218.75
For those of you who wanted to know.

There have been a couple of bug fixes since my last posting.
You may want to pick up the latest version.
:)
Mayan

Newsgroups: comp.unix.programmer
From: cmlow@iti.gov.sg (Low Chee Meng (KSL))
Subject: Help needed -- Reading/writing serial ports
Keywords: serial port, unix, RS232
Organization: Information Technology Institute, National Computer Board, S'pore
Date: Mon, 5 Oct 1992 12:36:16 GMT

Hi,

I need to write a program (on a Sun Sparcstation) that would read and write
ascii characters from/to the workstation's RS232 port. So far, I have
been unable to find any reference manual that can describe how to do it
in a simple enough way. The man pages for TERMIO and ZS seems too
complicated for me to grasp, and there were no examples to follow.

Can someone recommend a good book or a good source where I can get 
a quick intro to serial port programming on Unix? Example code would
be most useful.

Thanks in advance,

C.M. Low

PS: Please email replies to cmlow@iti.gov.sg
-- 
---------------------------------------------------------------------
Chee-Meng Low (cmlow@iti.gov.sg) (fax: 65-777-3043)
Knowledge Systems Lab, Information Technology Institute, Singapore
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Xref: sparky comp.unix.programmer:4817 comp.unix.sys5.r4:79
From: usbill@ustores.ustores.missouri.edu (Bill Canning)
Newsgroups: comp.unix.programmer,comp.unix.sys5.r4
Subject: Manipulating `ps -ef' output in SVR4 environment
Followup-To: poster
Date: 29 Sep 1992 22:42:00 -0500
Organization: University of Missouri, Columbia
NNTP-Posting-Host: ustores.ustores.missouri.edu

I am trying to write a program that will display its state when the user
types in `ps -ef' for a process status listing.  I recall doing this on an
HP-UX system (BSD based), by manipulating the argv array, but I can't seem
to get it to work under System V, Rel. 4.

Does anyone have a piece of code that could demonstrate how this is done in
this environment?  Any help would be appreciated.

Please reply via email if you have any suggestions/hints/answers.

Thanks in advance,
-- 
Bill Canning			usbill@ustores.ustores.missouri.edu (Internet)
(314) 882-2131			muccgw.usbill@ssgate.missouri.edu (cc:Mail)
[314] 882=4699 (Fax)		CSPECWC@MIZZOU1 (BITNET)
Newsgroups: comp.unix.programmer
From: jgibson@ucs.indiana.edu (JOHN COOPER GIBSON)
Subject: graphics.h and Unix
Summary: Using libraries for unix programming.
Keywords: graphics
Organization: Indiana University
Date: Thu, 1 Oct 1992 00:27:20 GMT

I was wondering if anyone could give me a brief an overview of how easily I 
can use the libraries in Unix.  This may sound ridiculous at first, but
I have done programming in turbo C and a little in Turbo C++.
I'm now starting to delve into graphics, and I wondered how the graphics.h
library works in the unix environment.  Any special cases, funny ways the
thingy reacts...etc.

		_jcg

__

	Once you have started down the Dark Path, there is no turning back...

				B.K.
__