Anonymous
public text v1 · immutableint pc_formatprompt(char *sounddir, char *file, char *prompt) {
/* allocated the necessary memory amount */
size_t sl,fl;
sl=strlen(sounddir);
fl=strlen(file);
prompt = realloc(prompt,sl + fl + 1);
/* format the sound prompt */
memcpy(prompt, sounddir, sl);
memcpy(prompt + sl, file, fl + 1);
return 1;
}