ReactOS 0.4.16-dev-106-g10b08aa
utascii.c File Reference
#include "acpi.h"
#include "accommon.h"
Include dependency graph for utascii.c:

Go to the source code of this file.

Functions

BOOLEAN AcpiUtValidNameseg (char *Name)
 
BOOLEAN AcpiUtValidNameChar (char Character, UINT32 Position)
 
void AcpiUtCheckAndRepairAscii (UINT8 *Name, char *RepairedName, UINT32 Count)
 

Function Documentation

◆ AcpiUtCheckAndRepairAscii()

void AcpiUtCheckAndRepairAscii ( UINT8 Name,
char RepairedName,
UINT32  Count 
)

Definition at line 140 of file utascii.c.

144{
145 UINT32 i;
146
147
148 for (i = 0; i < Count; i++)
149 {
150 RepairedName[i] = (char) Name[i];
151
152 if (!Name[i])
153 {
154 return;
155 }
156 if (!isprint (Name[i]))
157 {
158 RepairedName[i] = ' ';
159 }
160 }
161}
unsigned int UINT32
#define isprint(c)
Definition: acclib.h:73
unsigned char
Definition: typeof.h:29
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
int Count
Definition: noreturn.cpp:7

◆ AcpiUtValidNameChar()

BOOLEAN AcpiUtValidNameChar ( char  Character,
UINT32  Position 
)

Definition at line 102 of file utascii.c.

105{
106
107 if (!((Character >= 'A' && Character <= 'Z') ||
108 (Character >= '0' && Character <= '9') ||
109 (Character == '_')))
110 {
111 /* Allow a '!' in the last position */
112
113 if (Character == '!' && Position == 3)
114 {
115 return (TRUE);
116 }
117
118 return (FALSE);
119 }
120
121 return (TRUE);
122}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static COORD Position
Definition: mouse.c:34

Referenced by AcpiExNameSegment(), AcpiUtRepairName(), and AcpiUtValidNameseg().

◆ AcpiUtValidNameseg()

BOOLEAN AcpiUtValidNameseg ( char Name)

Definition at line 63 of file utascii.c.

65{
66 UINT32 i;
67
68
69 /* Validate each character in the signature */
70
71 for (i = 0; i < ACPI_NAMESEG_SIZE; i++)
72 {
73 if (!AcpiUtValidNameChar (Name[i], i))
74 {
75 return (FALSE);
76 }
77 }
78
79 return (TRUE);
80}
#define ACPI_NAMESEG_SIZE
Definition: actypes.h:415
BOOLEAN AcpiUtValidNameChar(char Character, UINT32 Position)
Definition: utascii.c:102

Referenced by AcpiTbFindTable(), and AcpiTbVerifyTempTable().