summaryrefslogtreecommitdiffstats
path: root/private/crt32/mbstring/strninc.c
blob: 211fdbc993c1b667ad74ccd06bc82b030a01e0c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*** 
*strninc.c - Increment non-MBCS string pointer by specified char count.
*
*	Copyright (c) 1987-1993, Microsoft Corporation.  All rights reserved.
*
*Purpose:
*	Increment non-MBCS string pointer by specified char count.
*
*Revision History:
*	11-19-92  KRS	Ported from 16-bit sources.
*	06-03-93  KRS	Remove NULL pointer check.
*	08-03-93  KRS	Fix return value arithmetic.
*
*******************************************************************************/

#ifdef _MBCS
#include <cruntime.h>
#include <mbdata.h>
#include <mbstring.h>
#include <stddef.h>

/*** 
*_strninc - Increment a SBCS string pointer by specified char count, used
*	for mapping _[f]mbsninc to the non-MBCS case.
*
*Purpose:
*	Increment the supplied string pointer by the specified number
*	of characters.
*
*Entry:
*	const unsigned char *string = pointer to string
*	unsigned int ccnt = number of char to advance the pointer
*
*Exit:
*	Returns pointer after advancing it.
*
*Exceptions:
*
*******************************************************************************/

unsigned char * _CRTAPI1 _strninc(string, ccnt)
const unsigned char *string;
size_t ccnt;
{
	return((char *)string + (unsigned)ccnt);
}
#endif	/* _MBCS */