-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchar.h
More file actions
92 lines (72 loc) · 2.2 KB
/
Copy pathchar.h
File metadata and controls
92 lines (72 loc) · 2.2 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// Copyright © 2014-2015 Inria, Written by Lénaïc Bagnères, lenaic.bagneres@inria.fr
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef GHO_CHAR_H
#define GHO_CHAR_H
#include <stdio.h>
#include <stdbool.h>
#include "string.h"
#include "any.h"
// Consider C char type as a class in Doxygen
#ifdef DOXYGEN
/// @brief C char type (char)
struct gho_char_t { };
#else
// C string type
typedef char gho_char_t;
#endif
// Create & destroy
static inline
char gho_char_create();
static inline
void gho_char_destroy(char* c);
static inline
void gho_char_reset(char* c);
// Output
static inline
void gho_char_fprinti(FILE* file, const char* const c,
const unsigned int indent);
static inline
void gho_char_fprint(FILE* file, const char* const c);
static inline
void gho_char_print(const char* const c);
static inline
void gho_char_sprinti(char** c_str, const char* const c,
const unsigned int indent);
static inline
void gho_char_sprint(char** c_str, const char* const c);
// Input
static inline
char gho_char_fread(FILE* file);
static inline
char gho_char_sread(const char** c_str);
// Copy & comparisons
static inline
char gho_char_copy(const char* const c);
static inline
void gho_char_copy_(const char* const c, char* copy);
static inline
bool gho_char_equal(const char* const a, const char* const b);
static inline
int gho_char_compare(const char* const a, const char* const b);
// Conversion
static inline
gho_string_t gho_char_to_string(const char* const c);
static inline
gho_any_t gho_char_to_any(const char* const c);
// Peek
static inline
char gho_char_fpeek(FILE* file);
static inline
char gho_char_speek(const char** c_str);
#include "implementation/char.h"
#endif