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

Function maybe_preinsert_directory

sound/windsound/windsound.c:299–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299static void
300maybe_preinsert_directory(int32_t findsound_approach, char *exedir, char *buf, size_t sz)
301{
302 int largest_basename = 35;
303
304 /* findsound_approach = sff_havdir_append_rest means a directory name will be
305 * inserted into the beginning of buf and the remaining parts of the
306 * resource/file name will be appended by
307 * get_sound_effect_filename(seid, buf, sizeof buf, findsound_approach)
308 * when it sees the sff_havedir_append_rest indicator.
309 */
310
311 if (findsound_approach == sff_havedir_append_rest) {
312 if (exedir) {
313 if (strlen(exedir) < (sz - largest_basename))
314 Strcpy(buf, exedir);
315 else
316 *buf = '\0';
317 }
318 }
319}
320#endif /* SND_LIB_WINDSOUND */

Callers 3

windsound_achievementFunction · 0.85
windsound_soundeffectFunction · 0.85
windsound_hero_playnotesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected