DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T t

⟦4e3fff895⟧ TextFile

    Length: 2437 (0x985)
    Types: TextFile
    Names: »talk_c.c«

Derivation

└─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6
    └─ ⟦0c25cb74a⟧ »DATA« 
        └─⟦038380b96⟧ 
└─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7
    └─ ⟦f494b5154⟧ »DATA« 
        └─⟦038380b96⟧ 
            └─ ⟦this⟧ »talk_c.c« 
└─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6
    └─ ⟦0c25cb74a⟧ »DATA« 
        └─⟦0732ea0cf⟧ 
└─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7
    └─ ⟦f494b5154⟧ »DATA« 
        └─⟦0732ea0cf⟧ 
            └─ ⟦this⟧ »../../dtia/release_apollo_2.1/talk_c.c« 
└─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6
    └─ ⟦0c25cb74a⟧ »DATA« 
        └─⟦25fab149a⟧ 
└─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7
    └─ ⟦f494b5154⟧ »DATA« 
        └─⟦25fab149a⟧ 
            └─ ⟦this⟧ »../../dtia/release_sun_2.1/talk_c.c« 
└─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6
    └─ ⟦0c25cb74a⟧ »DATA« 
        └─⟦be254d495⟧ 
└─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7
    └─ ⟦f494b5154⟧ »DATA« 
        └─⟦be254d495⟧ 
            └─ ⟦this⟧ »../../dtia/release_aix_2.1/talk_c.c« 
└─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6
    └─ ⟦0c25cb74a⟧ »DATA« 
        └─⟦c67979795⟧ 
└─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7
    └─ ⟦f494b5154⟧ »DATA« 
        └─⟦c67979795⟧ 
            └─ ⟦this⟧ »../../dtia/release_hp_2.1/talk_c.c« 

TextFile

#ifndef	lint
#ifndef	DEBUG
static char SCCS_id[] = "@(#)talk_c.c 2.1 90/08/02 19:04:02  Copyright(c) 1990 by Rational.";
#else
static char SCCS_id[] = "@(#)talk_c.c DEBUG 2.1 90/08/02 19:04:02  Copyright(c) 1990 by Rational.";
#endif
#endif

#define	TALK_C
#include	"talk.h"
#define	TALK_C

static	jmp_buf env;
static	check_eof(e)	int	e;	
{
	switch(e){
	case	E_CONNECTION:
		longjmp(env,-1);
	case	E_INTERNAL_ERROR:
		longjmp(env,-2);
	default:
		return;
	}
}
static	check(e)	int	e;	
{
	switch(e){
	case	E_CONNECTION:
		longjmp(env,e);
	case	E_INTERNAL_ERROR:
		longjmp(env,-2);
	default:
		return;
	}
}

int	talk_connection(in,out)	int	in,out;	
{
	int	error,i;
	switch(error=setjmp(env)){
	case	0:
		error=chdir(get_user_home());
		if (error==0)	error=setgid(get_user_gid());
		if (error==0)	error=setuid(get_user_uid());
		if (error)	return	E_INTERNAL_ERROR;
		break;
	case	-1:
		kill_remote_shell();
		return E_OK;
	case	-2:
		kill_remote_shell();
		return E_INTERNAL_ERROR;
	default:
		kill_remote_shell();
		return error;
	}
	for (;;){
		check_eof(rw_read_int(in,&i));
		if (i==F_DISCONNECT)	longjmp(env,-1);
		check((i==F_DELIMITOR)?E_OK:E_INTERNAL_ERROR);
		check(rw_read_int(in,&i));
		switch (i){
		case	R_CREATE:
			check(create_r_read(in));
			check(create_r_write(out));
			break;
		case	R_PUT:
			check(put_r_read(in));
			check(put_r_write(out));
			break;
		case	R_GET:
			check(get_r_read(in));
			check(get_r_write(out));
			break;
		case	R_LAST_UPDATE:
			check(last_update_r_read(in));
			check(last_update_r_write(out));
			break;
		case	R_FILE_EXISTS:
			check(file_exists_r_read(in));
			check(file_exists_r_write(out));
			break;
		case	R_COPY:
			check(copy_r_read(in));
			check(copy_r_write(out));
			break;
		case	R_EXPUNGE:
			check(expunge_r_read(in));
			check(expunge_r_write(out));
			break;
		case	R_DELETE:
			check(delete_r_read(in));
			check(delete_r_write(out));
			break;
		case	R_MOVE:
			check(move_r_read(in));
			check(move_r_write(out));
			break;
		case	R_LS:
			check(ls_r_read(in));
			check(ls_r_write(out));
			break;
		case	R_INPUT_TO_SHELL:
			check(input_to_shell_r_read(in));
			check(input_to_shell_r_write(in,out));
			/* Why in and out? because an exchange of*/
			/* arguments can happen in this function */
			break;
		case	R_SIGNAL_TO_SHELL:
			check(signal_to_shell_r_read(in));
			check(signal_to_shell_r_write(out));
			break;
		default:
			check(E_INTERNAL_ERROR);
		}
	}
}