MCPcopy Create free account
hub / github.com/TheOfficialFloW/VitaShell / getString

Function getString

config.c:88–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88static char *getString(const char *str) {
89 if (str[0] != '"')
90 return NULL;
91
92 char *p = strchr(str + 1, '"');
93 if (!p)
94 return NULL;
95
96 int len = p - (str + 1);
97
98 char *out = malloc(len + 1);
99 strncpy(out, str + 1, len);
100 out[len] = '\0';
101
102 int i;
103 for (i = 0; i < len; i++) {
104 if (out[i] == '\\')
105 out[i] = '\n';
106 }
107
108 return out;
109}
110
111static int readEntry(const char *line, ConfigEntry *entries, int n_entries) {
112 // Trim at beginning

Callers 1

readEntryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected