Graphviz
13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
stresc.c
Go to the documentation of this file.
1
/*************************************************************************
2
* Copyright (c) 2011 AT&T Intellectual Property
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* https://www.eclipse.org/legal/epl-v10.html
7
*
8
* Contributors: Details at https://graphviz.org
9
*************************************************************************/
10
11
/*
12
* Glenn Fowler
13
* AT&T Bell Laboratories
14
*
15
* convert \x character constants in s in place
16
*/
17
18
#include <
ast/ast.h
>
19
20
void
stresc
(
char
*
s
)
21
{
22
char
*t;
23
int
c;
24
char
*p;
25
26
t =
s
;
27
for
(;;) {
28
switch
(c = *
s
++) {
29
case
'\\'
:
30
c =
chresc
(
s
- 1, &p);
31
s
= p;
32
break
;
33
case
0:
34
*t = 0;
35
return
;
36
default
:
// nothing required
37
break
;
38
}
39
*t++ = c;
40
}
41
}
ast.h
chresc
int chresc(const char *, char **)
Definition
chresc.c:22
stresc
void stresc(char *s)
Definition
stresc.c:20
s
Definition
grammar.c:93
lib
ast
stresc.c
Generated by
1.9.8