| 297 | } |
| 298 | |
| 299 | static void |
| 300 | maybe_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 */ |
no outgoing calls
no test coverage detected