2 * Fast block move/copy subroutines
4 * (C) 1992 Joseph H. Allen
6 * This file is part of JOE (Joe's Own Editor)
9 #define _JOE_BLOCKS_H 1
12 __IDSTRING(rcsid_blocks_h, "$MirOS: contrib/code/jupp/blocks.h,v 1.6 2017/12/02 17:00:48 tg Exp $");
15 /* char *mmove(char *d,char *s,int sz); Copy 'sz' bytes from 's' to 'd'.
16 * Chooses either mbkwd or mfwrd to do this such that the data won't get
19 void *mmove PARAMS((void *d, const void *s, int sz));
21 /* char *mset(char *d,char c,int sz); Set 'sz' bytes at 'd' to 'c'.
22 * If 'sz'==0 nothing happens
23 * Return original value of 'd'
25 unsigned char *mset PARAMS((void *dest, unsigned char c, int sz));
27 /* int *msetI(int *d,int c,int sz); Set 'sz' ints at 'd' to 'c'.
28 * If 'sz'==0 nothing happens
29 * Returns orininal value of 'd'
31 int *msetI PARAMS((void *dest, int c, int sz));
33 /* void **msetP(void **d,void *c,int sz); Set 'sz' pointers at 'd' to 'c'.
34 * If 'sz'==0 nothing happens
35 * Returns orininal value of 'd'
37 void **msetP PARAMS((void **dest, void *c, int sz));
39 /* int mcnt(char *blk,char c,int size);
41 * Count the number of occurances a character appears in a block
43 int mcnt PARAMS((unsigned char *blk, unsigned char c, int size));