source: buchla-68k/orig/CLIBRARY/STRFILL.C@ ee49131

Last change on this file since ee49131 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago

Imported original source code.

  • Property mode set to 100755
File size: 639 bytes
RevLine 
[3ae31e9]1/*
2 =============================================================================
3 strfill() -- fill a string with a constant byte and zero terminate it
4 Version 1 -- 1988-08-19 -- D.N. Lynx Crowe
5
6 Where:
7 s = string pointer
8 c = constant byte
9 n = string length (not including the trailing zero)
10
11 Returns a pointer to the string.
12 =============================================================================
13*/
14
15char *
16strfill(s, c, n)
17register char *s;
18register char c;
19register unsigned n;
20{
21 register unsigned i;
22 char *p;
23
24 p = s;
25
26 for (i = n; i--; )
27 *s++ = c;
28
29 *s = '\0';
30 return(p);
31}
32
Note: See TracBrowser for help on using the repository browser.