xref: /csrg-svn/old/talk/talkd/print.c (revision 66683)
1*66683Sbostic /*-
2*66683Sbostic  * Copyright (c) 1983, 1985
3*66683Sbostic  *	The Regents of the University of California.  All rights reserved.
4*66683Sbostic  *
5*66683Sbostic  * %sccs.include.redist.c%
656578Sbostic  */
756578Sbostic 
856578Sbostic #ifndef lint
956578Sbostic static char sccsid[] = "@(#)print.c	5.1 (Berkeley) 6/6/85";
1056578Sbostic #endif not lint
1156578Sbostic 
1256578Sbostic /* debug print routines */
1356578Sbostic 
1456578Sbostic #include <stdio.h>
1556578Sbostic #include "ctl.h"
1656578Sbostic 
print_request(request)1756578Sbostic print_request(request)
1856578Sbostic 	CTL_MSG *request;
1956578Sbostic {
2056578Sbostic     	extern FILE *debugout;
2156578Sbostic 
2256578Sbostic 	fprintf(debugout
2356578Sbostic 		, "type is %d, l_user %s, r_user %s, r_tty %s\n"
2456578Sbostic 		, request->type, request->l_name, request->r_name
2556578Sbostic 		, request->r_tty);
2656578Sbostic 	fprintf(debugout, "		id = %d\n", request->id_num);
2756578Sbostic 	fflush(debugout);
2856578Sbostic }
2956578Sbostic 
print_response(response)3056578Sbostic print_response(response)
3156578Sbostic 	CTL_RESPONSE *response;
3256578Sbostic {
3356578Sbostic     	extern FILE *debugout;
3456578Sbostic 
3556579Sbostic 	fprintf(debugout
3656578Sbostic 		, "type is %d, answer is %d, id = %d\n\n", response->type
3756578Sbostic 		, response->answer, response->id_num);
3856578Sbostic 	fflush(debugout);
3956578Sbostic }
40