#include <corecrt_internal_mbstring.h>
#include <locale.h>
#include <string.h>
Go to the source code of this file.
◆ _mbsnbset()
Definition at line 127 of file mbsnbset.cpp.
132{
136}
GLuint GLuint GLsizei count
#define _BEGIN_SECURE_CRT_DEPRECATION_DISABLE
#define _END_SECURE_CRT_DEPRECATION_DISABLE
unsigned char *__cdecl _mbsnbset_l(unsigned char *string, unsigned int val, size_t count, _locale_t plocinfo)
◆ _mbsnbset_l()
Definition at line 56 of file mbsnbset.cpp.
62{
64 unsigned char highval, lowval;
66
68 if (_loc_update.GetLocaleT()->mbcinfo->ismbcodepage == 0)
71
72
74
75
76
77
78
79
80 highval =
static_cast<unsigned char>(
val >> 8);
81 if (highval)
82 {
83
84
85 lowval = (
unsigned char)(
val & 0x00ff);
86
87 if(lowval=='\0')
88 {
89 _ASSERTE((
"invalid MBCS pair passed to mbsnbset",0));
90
91
92
93
94
95
96
97
99 lowval=highval=' ';
100 }
101
102 while ((
count--) && *
string) {
103
104
105 if ((!
count--) || (!*(
string+1))) {
106 *string = ' ';
107 break;
108 }
109
110 *string++ = highval;
111 *string++ = lowval;
112 }
113 }
114
115 else {
116
117
118 while (
count-- && *
string) {
119 *
string++ = (
unsigned char)
val;
120 }
121
122 }
123
125}
#define _VALIDATE_RETURN(expr, errorcode, retexpr)
Referenced by _mbsnbset().