Digital Research
This commit is contained in:
2020-11-06 18:50:37 +01:00
parent 621ed8ccaf
commit 31738079c4
8481 changed files with 1888323 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
/**************************************************************************
*
* f p u t s F u n c t i o n
* ---------------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* "fputs" copies a null terminated string to a stream file.
* To be compatible with Unix, it does NOT append a newline.
*
* Calling sequence:
* ret = fputs(s,stream)
* Where:
* ret = last char out, on error FAILURE
* s = string to put
* stream -> stream (FILE *)
*
*****************************************************************************/
#include <stdio.h>
WORD fputs(s,f) /****************************/
REG BYTE *s; /* null term string */
REG FILE *f; /* stream file pointer */
{ /****************************/
REG WORD rv; /* return val */
rv = ZERO; /* init for *s==NULL */
while(*s) /* for all chars in s */
if((rv=putc(*s++,f)) == FAILURE) /* if putc fouls up */
return(FAILURE); /* give up */
return(rv); /* it worked */
} /****************************/