source: buchla-68k/libsm/strfill.c@ f40a309

Last change on this file since f40a309 was f40a309, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Unix line breaks.

  • Property mode set to 100644
File size: 607 bytes
Line 
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.