xref: /csrg-svn/old/talk/talkd/print.c (revision 56579)
156578Sbostic /*
256578Sbostic  * Copyright (c) 1983 Regents of the University of California.
356578Sbostic  * All rights reserved.  The Berkeley software License Agreement
456578Sbostic  * specifies the terms and conditions for redistribution.
556578Sbostic  */
656578Sbostic 
756578Sbostic #ifndef lint
856578Sbostic static char sccsid[] = "@(#)print.c	5.1 (Berkeley) 6/6/85";
956578Sbostic #endif not lint
1056578Sbostic 
1156578Sbostic /* debug print routines */
1256578Sbostic 
1356578Sbostic #include <stdio.h>
1456578Sbostic #include "ctl.h"
1556578Sbostic 
1656578Sbostic print_request(request)
1756578Sbostic 	CTL_MSG *request;
1856578Sbostic {
1956578Sbostic     	extern FILE *debugout;
2056578Sbostic 
2156578Sbostic 	fprintf(debugout
2256578Sbostic 		, "type is %d, l_user %s, r_user %s, r_tty %s\n"
2356578Sbostic 		, request->type, request->l_name, request->r_name
2456578Sbostic 		, request->r_tty);
2556578Sbostic 	fprintf(debugout, "		id = %d\n", request->id_num);
2656578Sbostic 	fflush(debugout);
2756578Sbostic }
2856578Sbostic 
2956578Sbostic print_response(response)
3056578Sbostic 	CTL_RESPONSE *response;
3156578Sbostic {
3256578Sbostic     	extern FILE *debugout;
3356578Sbostic 
34*56579Sbostic 	fprintf(debugout
3556578Sbostic 		, "type is %d, answer is %d, id = %d\n\n", response->type
3656578Sbostic 		, response->answer, response->id_num);
3756578Sbostic 	fflush(debugout);
3856578Sbostic }
39