[alt.sources.d] Multi-user chat program

darcy@druid.uucp (D'Arcy J.M. Cain) (10/10/90)

In article <1990Oct5.142605.9037@druid.uucp> I wrote:
>I have already done this.  It is called chat and it uses curses to control
>the screen.  I have it set up as a message based IPC but the IPC parts
>are in separate files so that other schemes could be implemented relativly
>easily.  The code was posted to comp.sources.unix.black.hole a few months
>back.  If anyone would like to get a copy of this send me mail.  I will
>mail it out to you or find some other group to post to if there is enough
>response.

Well there was plenty of response so I am posting the code to alt.sources

-- 
D'Arcy J.M. Cain (darcy@druid)     |
D'Arcy Cain Consulting             |   MS-DOS:  The Andrew Dice Clay
West Hill, Ontario, Canada         |   of operating systems.
+ 416 281 6094                     |

gl8f@astsun9.astro.Virginia.EDU (Greg Lindahl) (10/11/90)

For a system with expanded functionality, namely multiple servers and
networked operation, you can try IRC, Internet Relay Chat. FTP it from
tolsun.oulu.fi.


--
"Restraint, hell. I'm just too fucking busy." -- Bill Wisner

bwhite@oucsace.cs.OHIOU.EDU (Bill White) (10/11/90)

In article <1990Oct10.140454.11361@druid.uucp> darcy@druid.uucp (D'Arcy J.M. Cain) writes:

>Well there was plenty of response so I am posting the code to alt.sources

	I tried to mail you once, but it didn't get through.  Our site
does not carry alt.sources.  If you would be so kind as to mail to me, I
would greatly appreciate it.

	Internet:	bwhite@oucsace.cs.ohiou.edu
	UUCP:		...!att!oucsace!bwhite (works sometimes)

>D'Arcy J.M. Cain (darcy@druid)     |


-- 
|   Bill White			Internet: bwhite@oucsace.cs.ohiou.edu	|
|	MURPHY'S LAW, QUANTIZED REVISION:				|
|		Everything goes wrong all at once.			|

mpd@anomaly.sbs.com (Michael P. Deignan) (10/13/90)

In article <1990Oct10.140454.11361@druid.uucp> 
	darcy@druid.uucp (D'Arcy J.M. Cain) writes:

>Well there was plenty of response so I am posting the code to alt.sources

The header file "chat.h" seemed to be missing when I unshared the archive.

MD
-- 
-- Michael P. Deignan, President     -- Small Business Systems, Inc. --
-- Domain: mpd@anomaly.sbs.com       -- Box 17220, Esmond, RI 02917  --
-- UUCP: ...uunet!rayssd!anomaly!mpd -- Telebit:  +1 401 455 0347    --
-- XENIX Archives: login: xxcp, password: xenix  Index: ~/SOFTLIST   --

darcy@druid.uucp (D'Arcy J.M. Cain) (10/24/90)

In article <1990Oct22.172500.26286@agate.berkeley.edu> vreed@sandstorm.Berkeley.EDU (Vincent Reed) writes:
>I grabbed your Multi-User Chat to use on our system, but we are missing a few 
>of the header files necessary. Could you please send me your stdlib.h process.h
>and getopt.h header files? The copies of these we do have seem to be program 
>specific. I'm posting this to the net because I was unable to get mail 
>directly to you.
>
I assumed these were ANSI standard header files but except for stdlib.h I
can't find mention of them in my K&R2.  On my system, stdlib.h is just a
link to unistd.h.  That file is obviously OS specific so I try to avoid it.
I can't send you a copy because it is copyright AT&T.  Your best bet is to
remove the include directive for this and see what prototypes you are
missing.

I would think that getopt.h would be obvious from the name but here it is:

------------------------- getopt.h -------------------------------
/*
declarations for getopt
*/

#ifndef		_GETOPT_H
#define		_GETOPT_H

extern int getopt(int argc, char **argv, const char *opts);
extern int optind, opterr;
extern char *optarg;

#endif
------------------------ end of getopt.h ----------------------------

The file process.h holds mainly prototypes fork() and exec() calls as well
as wait().  I have built up this file from various files and although I
have modified it to an unrecognizable form I hesitate to send out the whole
thing.  Here are the relevant prototypes:

---------------------------- process.h -------------------------------
/*
	process.h
*/

#ifndef		_PROCESS_H
#define		_PROCESS_H

int		execlp(const char *path, const char *arg0, ...);
int		fork(void);
int		getpid(void);
int		system(const char *command);
int		wait(int *stat_loc);

#endif
--------------------------- end of process.h -------------------------

Was I wrong to assume that these files would be available under a standard
compiler?

BTW:  This belongs in alt.sources.d where followups are directed.

-- 
D'Arcy J.M. Cain (darcy@druid)     |
D'Arcy Cain Consulting             |   I support gun control.
West Hill, Ontario, Canada         |   Let's start with the government!
+ 416 281 6094                     |

rhys@batserver.cs.uq.oz.au (Rhys Weatherley) (10/26/90)

There still seems to be lots of requests for the missing files for this
program.  Maybe D'Arcy J.M. Cain could re-post the program with all files,
including the replacement process.h and getopt.h files for people who
don't have them?

Rhys.

+===============================+==============================+
||  Rhys Weatherley             |  University of Queensland,  ||
||  rhys@batserver.cs.uq.oz.au  |  Australia.  G'day!!        ||
+===============================+==============================+

darcy@druid.uucp (D'Arcy J.M. Cain) (10/27/90)

In article <5429@uqcspe.cs.uq.oz.au> rhys@batserver.cs.uq.oz.au writes:
>There still seems to be lots of requests for the missing files for this
>program.  Maybe D'Arcy J.M. Cain could re-post the program with all files,
>including the replacement process.h and getopt.h files for people who
>don't have them?
>
I just did this.  Besides including the missing chat.h I replaced the
include directive for getopt.h with the actual prototype and declarations.
As for process.h, I think that should be included with any ANSI compiler
on a Unix system.  Although it isn't in the table of standard headers
I believe that is only because it is OS specific and will exist on a
Unix system.  In any case the only things you need from it are fork(2),
execlp(2) and wait(2).  I suggest you create a process.h with these and
related functions.  Anyone happen to know what is officially required
in this file?


-- 
D'Arcy J.M. Cain (darcy@druid)     |
D'Arcy Cain Consulting             |   I support gun control.
West Hill, Ontario, Canada         |   Let's start with the government!
+ 416 281 6094                     |