mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-04-09 17:22:32 +00:00
Use FLUID_SNPRINTF into all remaining files
This commit is contained in:
parent
1c0419c4c3
commit
9321dda281
7 changed files with 19 additions and 19 deletions
|
@ -393,7 +393,7 @@ fluid_get_userconf(char* buf, int len)
|
|||
if (home == NULL) {
|
||||
return NULL;
|
||||
} else {
|
||||
snprintf(buf, len, "%s/.fluidsynth", home);
|
||||
FLUID_SNPRINTF (buf, len, "%s/.fluidsynth", home);
|
||||
return buf;
|
||||
}
|
||||
#endif
|
||||
|
@ -411,7 +411,7 @@ fluid_get_sysconf(char* buf, int len)
|
|||
#if defined(WIN32) || defined(MACOS9)
|
||||
return NULL;
|
||||
#else
|
||||
snprintf(buf, len, "/etc/fluidsynth.conf");
|
||||
FLUID_SNPRINTF (buf, len, "/etc/fluidsynth.conf");
|
||||
return buf;
|
||||
#endif
|
||||
}
|
||||
|
@ -1845,17 +1845,17 @@ char*
|
|||
fluid_expand_path(char* path, char* new_path, int len)
|
||||
{
|
||||
#if defined(WIN32) || defined(MACOS9)
|
||||
snprintf(new_path, len - 1, "%s", path);
|
||||
FLUID_SNPRINTF (new_path, len - 1, "%s", path);
|
||||
#else
|
||||
if ((path[0] == '~') && (path[1] == '/')) {
|
||||
char* home = getenv("HOME");
|
||||
if (home == NULL) {
|
||||
snprintf(new_path, len - 1, "%s", path);
|
||||
FLUID_SNPRINTF (new_path, len - 1, "%s", path);
|
||||
} else {
|
||||
snprintf(new_path, len - 1, "%s%s", home, &path[1]);
|
||||
FLUID_SNPRINTF (new_path, len - 1, "%s%s", home, &path[1]);
|
||||
}
|
||||
} else {
|
||||
snprintf(new_path, len - 1, "%s", path);
|
||||
FLUID_SNPRINTF (new_path, len - 1, "%s", path);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -309,10 +309,10 @@ fluid_LADSPA_handle_start(fluid_synth_t* synth, int ac, char** av, fluid_ostream
|
|||
fluid_LADSPA_clear(FxUnit);
|
||||
return(PrintErrorMessage);
|
||||
}; /* if no LADSPA_PATH */
|
||||
snprintf(LibFullPath,FLUID_LADSPA_MaxPathLength,"%s/%s",LADSPA_Path,LibraryFilename);
|
||||
FLUID_SNPRINTF (LibFullPath,FLUID_LADSPA_MaxPathLength,"%s/%s",LADSPA_Path,LibraryFilename);
|
||||
/* If no slash in filename */
|
||||
} else {
|
||||
snprintf(LibFullPath,FLUID_LADSPA_MaxPathLength,"%s",LibraryFilename);
|
||||
FLUID_SNPRINTF (LibFullPath,FLUID_LADSPA_MaxPathLength,"%s",LibraryFilename);
|
||||
};
|
||||
|
||||
L(fluid_ostream_printf(out,"Full Library path name: %s",LibFullPath));
|
||||
|
|
|
@ -726,12 +726,12 @@ static char* fluid_alsa_seq_full_id(char* id, char* buf, int len)
|
|||
{
|
||||
if (id != NULL) {
|
||||
if (FLUID_STRCMP(id, "pid") == 0) {
|
||||
snprintf(buf, len, "FLUID Synth (%d)", getpid());
|
||||
FLUID_SNPRINTF (buf, len, "FLUID Synth (%d)", getpid());
|
||||
} else {
|
||||
snprintf(buf, len, "FLUID Synth (%s)", id);
|
||||
FLUID_SNPRINTF (buf, len, "FLUID Synth (%s)", id);
|
||||
}
|
||||
} else {
|
||||
snprintf(buf, len, "FLUID Synth");
|
||||
FLUID_SNPRINTF (buf, len, "FLUID Synth");
|
||||
}
|
||||
|
||||
return buf;
|
||||
|
@ -741,12 +741,12 @@ static char* fluid_alsa_seq_full_name(char* id, int port, char* buf, int len)
|
|||
{
|
||||
if (id != NULL) {
|
||||
if (FLUID_STRCMP(id, "pid") == 0) {
|
||||
snprintf(buf, len, "Synth input port (%d:%d)", getpid(), port);
|
||||
FLUID_SNPRINTF (buf, len, "Synth input port (%d:%d)", getpid(), port);
|
||||
} else {
|
||||
snprintf(buf, len, "Synth input port (%s:%d)", id, port);
|
||||
FLUID_SNPRINTF (buf, len, "Synth input port (%s:%d)", id, port);
|
||||
}
|
||||
} else {
|
||||
snprintf(buf, len, "Synth input port");
|
||||
FLUID_SNPRINTF (buf, len, "Synth input port");
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
|
|
@ -112,9 +112,9 @@ new_fluid_coremidi_driver(fluid_settings_t* settings, handle_midi_event_func_t h
|
|||
memset (clientid, 0, sizeof(clientid));
|
||||
if (id != NULL) {
|
||||
if (FLUID_STRCMP (id, "pid") == 0) {
|
||||
snprintf (clientid, sizeof(clientid), " (%d)", getpid());
|
||||
FLUID_SNPRINTF (clientid, sizeof(clientid), " (%d)", getpid());
|
||||
} else {
|
||||
snprintf (clientid, sizeof(clientid), " (%s)", id);
|
||||
FLUID_SNPRINTF (clientid, sizeof(clientid), " (%s)", id);
|
||||
}
|
||||
FLUID_FREE (id); /* -- free id string */
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ new_fluid_jack_client (fluid_settings_t *settings, int isaudio, void *driver)
|
|||
: "midi.jack.id", &client_name);
|
||||
|
||||
if (client_name != NULL && client_name[0] != 0)
|
||||
snprintf(name, 64, "%s", client_name);
|
||||
FLUID_SNPRINTF (name, 64, "%s", client_name);
|
||||
else strcpy (name, "fluidsynth");
|
||||
|
||||
name[63] = '\0';
|
||||
|
|
|
@ -4946,7 +4946,7 @@ fluid_synth_tuning_dump(fluid_synth_t* synth, int bank, int prog,
|
|||
{
|
||||
if (name)
|
||||
{
|
||||
snprintf (name, len - 1, "%s", fluid_tuning_get_name (tuning));
|
||||
FLUID_SNPRINTF (name, len - 1, "%s", fluid_tuning_get_name (tuning));
|
||||
name[len - 1] = 0; /* make sure the string is null terminated */
|
||||
}
|
||||
|
||||
|
|
|
@ -834,7 +834,7 @@ fluid_istream_readline (fluid_istream_t in, fluid_ostream_t out, char* prompt,
|
|||
if (line == NULL)
|
||||
return -1;
|
||||
|
||||
snprintf(buf, len, "%s", line);
|
||||
FLUID_SNPRINTF (buf, len, "%s", line);
|
||||
buf[len - 1] = 0;
|
||||
|
||||
free(line);
|
||||
|
|
Loading…
Reference in a new issue