|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T o
Length: 2835 (0xb13) Types: TextFile Names: »out_utils.c«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit └─⟦4fd8323b9⟧ »EurOpenD3/mail/elm2.3.tar.Z« └─⟦698c4f91f⟧ └─⟦this⟧ »src/out_utils.c«
static char rcsid[] = "@(#)$Id: out_utils.c,v 4.1 90/04/28 22:43:40 syd Exp $"; /******************************************************************************* * The Elm Mail System - $Revision: 4.1 $ $State: Exp $ * * Copyright (c) 1986, 1987 Dave Taylor * Copyright (c) 1988, 1989, 1990 USENET Community Trust ******************************************************************************* * Bug reports, patches, comments, suggestions should be sent to: * * Syd Weinstein, Elm Coordinator * elm@DSI.COM dsinc!elm * ******************************************************************************* * $Log: out_utils.c,v $ * Revision 4.1 90/04/28 22:43:40 syd * checkin of Elm 2.3 as of Release PL0 * * ******************************************************************************/ /** This file contains routines used for output in the ELM program. **/ #include "headers.h" static char err_buffer[SLEN]; /* store last error message */ static char central_message_buffer[SLEN]; char *strcpy(); show_last_error() { /** rewrite last error message! **/ error(err_buffer); } clear_error() { MoveCursor(LINES,0); CleartoEOLN(); err_buffer[0] = '\0'; } set_error(s) char *s; { strcpy(err_buffer, s); } error(s) char *s; { /** outputs error 's' to screen at line 22, centered! **/ if(batch_only) printf("%s\n\r", s); else { MoveCursor(LINES,0); CleartoEOLN(); PutLine0(LINES,(COLUMNS-strlen(s))/2,s); fflush(stdout); } strcpy(err_buffer, s); /* save it too! */ } /*VARARGS1*/ error1(s, a) char *s, *a; { /** same as error, but with a 'printf' argument **/ char buffer[SLEN]; sprintf(buffer,s,a); error(buffer); } /*VARARGS1*/ error2(s, a1, a2) char *s, *a1, *a2; { /** same as error, but with two 'printf' arguments **/ char buffer[SLEN]; sprintf(buffer,s, a1, a2); error(buffer); } /*VARARGS1*/ error3(s, a1, a2, a3) char *s, *a1, *a2, *a3; { /** same as error, but with three 'printf' arguments **/ char buffer[SLEN]; sprintf(buffer,s, a1, a2, a3); error(buffer); } lower_prompt(s) char *s; { /** prompt user for input on LINES-1 line, left justified **/ PutLine0(LINES-1,0,s); CleartoEOLN(); } prompt(s) char *s; { /** prompt user for input on LINES-3 line, left justified **/ PutLine0(LINES-3,0,s); CleartoEOLN(); } set_central_message(string, arg) char *string, *arg; { /** set up the given message to be displayed in the center of the current window **/ sprintf(central_message_buffer, string, arg); } display_central_message() { /** display the message if set... **/ if (central_message_buffer[0] != '\0') { ClearLine(LINES-15); Centerline(LINES-15, central_message_buffer); fflush(stdout); } } clear_central_message() { /** clear the central message buffer **/ central_message_buffer[0] = '\0'; }