ReactOS 0.4.15-dev-7918-g2a2556c
binary2cstr.cpp File Reference
#include "binary2cstr.h"
Include dependency graph for binary2cstr.cpp:

Go to the source code of this file.

Functions

string binary2cstr (const string &src)
 

Function Documentation

◆ binary2cstr()

string binary2cstr ( const string src)

Definition at line 11 of file binary2cstr.cpp.

12{
13 string dst;
14 for ( int i = 0; i < src.size(); i++ )
15 {
16 char c = src[i];
17 switch ( c )
18 {
19 case '\n':
20 dst += "\\n";
21 break;
22 case '\r':
23 dst += "\\r";
24 break;
25 case '\t':
26 dst += "\\t";
27 break;
28 case '\v':
29 dst += "\\v";
30 break;
31 case '\"':
32 dst += "\x22";
33 break;
34 default:
35 if ( isprint ( c ) )
36 dst += c;
37 else
38 {
39 dst += "\\x";
40 char tmp[16];
41 _snprintf ( tmp, sizeof(tmp)-1, "%02X", (unsigned)(unsigned char)c );
42 tmp[sizeof(tmp)-1] = '\0';
43 dst += tmp;
44 }
45 break;
46 }
47 }
48 return dst;
49}
#define isprint(c)
Definition: acclib.h:73
GLenum src
Definition: glext.h:6340
const GLubyte * c
Definition: glext.h:8905
GLenum GLenum dst
Definition: glext.h:6340
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define c
Definition: ke_i.h:80
#define _snprintf
Definition: xmlstorage.h:200