1 /* $MirOS: contrib/code/jupp/blocks.h,v 1.4 2012/06/08 16:55:27 tg Exp $ */
3 * Fast block move/copy subroutines
5 * (C) 1992 Joseph H. Allen
7 * This file is part of JOE (Joe's Own Editor)
10 #define _JOE_BLOCKS_H 1
14 /* char *mmove(char *d,char *s,int sz); Copy 'sz' bytes from 's' to 'd'.
15 * Chooses either mbkwd or mfwrd to do this such that the data won't get
18 void *mmove PARAMS((void *d, const void *s, int sz));
20 /* char *mset(char *d,char c,int sz); Set 'sz' bytes at 'd' to 'c'.
21 * If 'sz'==0 nothing happens
22 * Return original value of 'd'
24 unsigned char *mset PARAMS((void *dest, unsigned char c, int sz));
26 /* int *msetI(int *d,int c,int sz); Set 'sz' ints at 'd' to 'c'.
27 * If 'sz'==0 nothing happens
28 * Returns orininal value of 'd'
30 int *msetI PARAMS((void *dest, int c, int sz));
32 /* void **msetP(void **d,void *c,int sz); Set 'sz' pointers at 'd' to 'c'.
33 * If 'sz'==0 nothing happens
34 * Returns orininal value of 'd'
36 void **msetP PARAMS((void **dest, void *c, int sz));
38 /* int mcnt(char *blk,char c,int size);
40 * Count the number of occurances a character appears in a block
42 int mcnt PARAMS((unsigned char *blk, unsigned char c, int size));