MCPcopy Create free account
hub / github.com/NetHack/NetHack / ask_restring

Function ask_restring

outdated/sys/mac/macmenu.c:258–269  ·  view source on GitHub ↗

Convert a mixed-case C string to a Capitalized Pascal string */

Source from the content-addressed store, hash-verified

256
257/* Convert a mixed-case C string to a Capitalized Pascal string */
258static void
259ask_restring(const char *cstr, unsigned char *pstr)
260{
261 int i;
262
263 for (i = 0; *cstr && (i < 255); i++)
264 pstr[i + 1] = *cstr++;
265 pstr[0] = i;
266 if ((pstr[1] >= 'a') && (pstr[1] <= 'z'))
267 pstr[1] += 'A' - 'a';
268 return;
269}
270
271/* Enable the dialog item with the given index */
272static void

Callers 1

mac_asknameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected