fix include file case
[reactos.git] / rosapps / mc / slang / slmemset.c
1 /* Copyright (c) 1992, 1995 John E. Davis
2 * All rights reserved.
3 *
4 * You may distribute under the terms of either the GNU General Public
5 * License or the Perl Artistic License.
6 */
7
8
9 /* These routines are fast memcpy, memset routines. When available, I
10 use system rouines. For msdos, I use inline assembly. */
11
12 /* The current versions only work in the forward direction only!! */
13
14 #include "config.h"
15
16 #include <stdio.h>
17
18
19 #include "slang.h"
20 #include "_slang.h"
21
22 void SLmemset(char *p, char space, int n)
23 {
24 #if defined(msdos) && !defined(__WIN32__) && !defined(__GO32__)
25 asm mov al, space
26 asm mov dx, di
27 asm mov cx, n
28 asm les di, p
29 asm cld
30 asm rep stosb
31 asm mov di, dx
32 #else
33 register char *pmax;
34
35 pmax = p + (n - 4);
36 n = n % 4;
37 while (p <= pmax)
38 {
39 *p++ = space; *p++ = space; *p++ = space; *p++= space;
40 }
41 while (n--) *p++ = space;
42 #endif
43 }