Mercurial > audlegacy-plugins
changeset 2050:2ffc6a69fcd1
string API calls -> vtable
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Sat, 13 Oct 2007 19:55:04 -0500 |
parents | 9550e809dc12 |
children | d8e453d09ee4 |
files | src/aac/libmp4.c src/aosd/aosd_trigger.c src/cue/cuesheet.c src/m3u/m3u.c src/madplug/fileinfo.c src/madplug/input.c src/madplug/plugin.c src/modplug/gui/main.cxx src/modplug/modplugbmp.cxx src/pls/pls.c src/scrobbler/plugin.c src/sid/xmms-sid.c src/song_change/song_change.c src/stdio/stdio.c src/tta/libtta.c src/vorbis/fileinfo.c src/vorbis/vorbis.c src/vtx/vtx.c |
diffstat | 18 files changed, 52 insertions(+), 52 deletions(-) [+] |
line wrap: on
line diff
--- a/src/aac/libmp4.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/aac/libmp4.c Sat Oct 13 19:55:04 2007 -0500 @@ -312,7 +312,7 @@ { } -static Tuple *mp4_get_song_aud_tuple_base(char *filename, VFSFile *mp4fh) +static Tuple *mp4_get_song_tuple_base(char *filename, VFSFile *mp4fh) { mp4ff_callback_t *mp4cb = g_malloc0(sizeof(mp4ff_callback_t)); mp4ff_t *mp4file; @@ -434,12 +434,12 @@ { Tuple *tuple; VFSFile *mp4fh; - gboolean remote = str_has_prefix_nocase(filename, "http:") || - str_has_prefix_nocase(filename, "https:"); + gboolean remote = aud_str_has_prefix_nocase(filename, "http:") || + aud_str_has_prefix_nocase(filename, "https:"); mp4fh = remote ? aud_vfs_buffered_file_new_from_uri(filename) : aud_vfs_fopen(filename, "rb"); - tuple = mp4_get_song_aud_tuple_base(filename, mp4fh); + tuple = mp4_get_song_tuple_base(filename, mp4fh); return tuple; } @@ -624,8 +624,8 @@ gchar *ttemp = NULL, *stemp = NULL; gchar *temp = g_strdup(filename); gchar *xmmstitle = NULL; - gboolean remote = str_has_prefix_nocase(filename, "http:") || - str_has_prefix_nocase(filename, "https:"); + gboolean remote = aud_str_has_prefix_nocase(filename, "http:") || + aud_str_has_prefix_nocase(filename, "https:"); aud_vfs_rewind(file); if((decoder = faacDecOpen()) == NULL){
--- a/src/aosd/aosd_trigger.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/aosd/aosd_trigger.c Sat Oct 13 19:55:04 2007 -0500 @@ -157,7 +157,7 @@ aosd_trigger_utf8convert ( gchar * str ) { if ( global_config->osd->text.utf8conv_disable == FALSE ) - return str_to_utf8( str ); + return aud_str_to_utf8( str ); else return g_strdup( str ); }
--- a/src/cue/cuesheet.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/cue/cuesheet.c Sat Oct 13 19:55:04 2007 -0500 @@ -773,7 +773,7 @@ if(strcasecmp(line+q, "GENRE") == 0) { fix_cue_argument(line+p); if (last_cue_track == 0) - cue_genre = str_to_utf8(line + p); + cue_genre = aud_str_to_utf8(line + p); } if(strcasecmp(line+q, "DATE") == 0) { gchar *tmp; @@ -790,9 +790,9 @@ fix_cue_argument(line+q); if (last_cue_track == 0) - cue_performer = str_to_utf8(line + q); + cue_performer = aud_str_to_utf8(line + q); else - cue_tracks[last_cue_track - 1].performer = str_to_utf8(line + q); + cue_tracks[last_cue_track - 1].performer = aud_str_to_utf8(line + q); } else if (strcasecmp(line+p, "FILE") == 0) { gchar *tmp = g_path_get_dirname(f); @@ -803,9 +803,9 @@ else if (strcasecmp(line+p, "TITLE") == 0) { fix_cue_argument(line+q); if (last_cue_track == 0) - cue_title = str_to_utf8(line + q); + cue_title = aud_str_to_utf8(line + q); else - cue_tracks[last_cue_track-1].title = str_to_utf8(line + q); + cue_tracks[last_cue_track-1].title = aud_str_to_utf8(line + q); } else if (strcasecmp(line+p, "TRACK") == 0) { gint track;
--- a/src/m3u/m3u.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/m3u/m3u.c Sat Oct 13 19:55:04 2007 -0500 @@ -51,7 +51,7 @@ *title = NULL; *length = -1; - if (!str_has_prefix_nocase(info, "#EXTINF:")) { + if (!aud_str_has_prefix_nocase(info, "#EXTINF:")) { g_message("Invalid m3u metadata (%s)", info); return; } @@ -105,13 +105,13 @@ line[strlen(line) - 1] == '\n') line[strlen(line) - 1] = '\0'; - if (str_has_prefix_nocase(line, "#EXTM3U")) { + if (aud_str_has_prefix_nocase(line, "#EXTM3U")) { is_extm3u = TRUE; continue; } - if (is_extm3u && str_has_prefix_nocase(line, "#EXTINF:")) { - str_replace_in(&ext_info, g_strdup(line)); + if (is_extm3u && aud_str_has_prefix_nocase(line, "#EXTINF:")) { + aud_str_replace_in(&ext_info, g_strdup(line)); continue; } @@ -134,7 +134,7 @@ playlist_load_ins_file(playlist, uri ? uri : line, filename, pos, ext_title, ext_len); g_free(uri); - str_replace_in(&ext_title, NULL); + aud_str_replace_in(&ext_title, NULL); ext_len = -1; if (pos >= 0)
--- a/src/madplug/fileinfo.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/madplug/fileinfo.c Sat Oct 13 19:55:04 2007 -0500 @@ -589,7 +589,7 @@ gchar *realfn = NULL; #ifdef DEBUG { - tmp = str_to_utf8(fileurl); + tmp = aud_str_to_utf8(fileurl); g_message("f: audmad_get_file_info: %s", tmp); g_free(tmp); tmp = NULL; @@ -609,7 +609,7 @@ } realfn = g_filename_from_uri(fileurl, NULL, NULL); - utf_filename = str_to_utf8(realfn ? realfn : fileurl); + utf_filename = aud_str_to_utf8(realfn ? realfn : fileurl); g_free(realfn); realfn = NULL; create_window();
--- a/src/madplug/input.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/madplug/input.c Sat Oct 13 19:55:04 2007 -0500 @@ -306,7 +306,7 @@ switch (encoding) { case ID3_FIELD_TEXTENCODING_ISO_8859_1: rtn0 = (gchar *)id3_ucs4_latin1duplicate(string); - rtn = str_to_utf8(rtn0); + rtn = aud_str_to_utf8(rtn0); g_free(rtn0); break; case ID3_FIELD_TEXTENCODING_UTF_8: @@ -460,7 +460,7 @@ metadata = TRUE; gchar *scratch; - scratch = str_to_utf8(tmp); + scratch = aud_str_to_utf8(tmp); aud_tuple_associate_string(info->tuple, FIELD_TITLE, NULL, scratch); g_free(scratch); @@ -473,7 +473,7 @@ metadata = TRUE; gchar *scratch; - scratch = str_to_utf8(tmp); + scratch = aud_str_to_utf8(tmp); aud_tuple_associate_string(info->tuple, FIELD_ALBUM, NULL, scratch); aud_tuple_associate_string(info->tuple, -1, "stream", scratch); g_free(scratch); @@ -487,7 +487,7 @@ else { gchar *realfn = g_filename_from_uri(info->filename, NULL, NULL); gchar *tmp2 = g_path_get_basename(realfn ? realfn : info->filename); // info->filename is uri. --yaz - tmp = str_to_utf8(tmp2); + tmp = aud_str_to_utf8(tmp2); g_free(tmp2); tmp2 = NULL; g_free(realfn); realfn = NULL; // tmp = g_strdup(g_basename(info->filename)); //XXX maybe ok. --yaz
--- a/src/madplug/plugin.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/madplug/plugin.c Sat Oct 13 19:55:04 2007 -0500 @@ -647,7 +647,7 @@ gboolean local_fd = FALSE; #ifdef DEBUG - string = str_to_utf8(filename); + string = aud_str_to_utf8(filename); g_message("f: mad: audmad_get_song_tuple: %s", string); g_free(string); string = NULL; @@ -666,7 +666,7 @@ if(tmp){ gchar *scratch; - scratch = str_to_utf8(tmp); + scratch = aud_str_to_utf8(tmp); aud_tuple_associate_string(tuple, FIELD_TITLE, NULL, scratch); g_free(tmp); g_free(scratch); @@ -677,7 +677,7 @@ if(tmp){ gchar *scratch; - scratch = str_to_utf8(tmp); + scratch = aud_str_to_utf8(tmp); aud_tuple_associate_string(tuple, FIELD_TITLE, NULL, scratch); g_free(tmp); g_free(scratch);
--- a/src/modplug/gui/main.cxx Sun Oct 14 01:33:02 2007 +0300 +++ b/src/modplug/gui/main.cxx Sat Oct 13 19:55:04 2007 -0500 @@ -179,7 +179,7 @@ lInfo = lShortFN; lInfo += '\n'; - tmps = str_to_utf8(lSoundFile->GetTitle()); + tmps = aud_str_to_utf8(lSoundFile->GetTitle()); lInfo += tmps; g_free(tmps); lInfo += '\n'; @@ -279,7 +279,7 @@ for(i = 0; i < lNumSamples; i++) { lSoundFile->GetSampleName(i, lBuffer); - tmps = str_to_utf8(lBuffer); + tmps = aud_str_to_utf8(lBuffer); lInfo += tmps; g_free(tmps); lInfo += '\n'; @@ -290,7 +290,7 @@ for(i = 0; i < lNumInstruments; i++) { lSoundFile->GetInstrumentName(i, lBuffer); - tmps = str_to_utf8(lBuffer); + tmps = aud_str_to_utf8(lBuffer); lInfo += tmps; g_free(tmps); lInfo += '\n'; @@ -304,7 +304,7 @@ //gtk_text_backward_delete(textbox, length); length = lSoundFile->GetSongComments(message, MAX_MESSAGE_LENGTH, 80); if (length != 0) { - tmps = str_to_utf8(message); + tmps = aud_str_to_utf8(message); gtk_label_set_text((GtkLabel*)lookup_widget(InfoWin, "info_message"), tmps); g_free(tmps); }
--- a/src/modplug/modplugbmp.cxx Sun Oct 14 01:33:02 2007 +0300 +++ b/src/modplug/modplugbmp.cxx Sat Oct 13 19:55:04 2007 -0500 @@ -551,7 +551,7 @@ * an arbitrary module file uses .. typically it is some DOS CP-variant, * except for true Amiga modules. */ - gchar *tmps2 = str_to_utf8(lSoundFile->GetTitle()); + gchar *tmps2 = aud_str_to_utf8(lSoundFile->GetTitle()); aud_tuple_associate_string(ti, FIELD_TITLE, NULL, tmps2); g_free(tmps2);
--- a/src/pls/pls.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/pls/pls.c Sat Oct 13 19:55:04 2007 -0500 @@ -48,7 +48,7 @@ g_return_if_fail(filename != NULL); - if (!str_has_suffix_nocase(filename, ".pls")) + if (!aud_str_has_suffix_nocase(filename, ".pls")) return; INIFile *inifile = open_ini_file(filename);
--- a/src/scrobbler/plugin.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/scrobbler/plugin.c Sat Oct 13 19:55:04 2007 -0500 @@ -65,7 +65,7 @@ static gboolean ishttp(const char *a) { g_return_val_if_fail(a != NULL, FALSE); - return str_has_prefix_nocase(a, "http://") || str_has_prefix_nocase(a, "https://"); + return aud_str_has_prefix_nocase(a, "http://") || aud_str_has_prefix_nocase(a, "https://"); } static void hook_playback_begin(gpointer hook_data, gpointer user_data)
--- a/src/sid/xmms-sid.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/sid/xmms-sid.c Sat Oct 13 19:55:04 2007 -0500 @@ -87,7 +87,7 @@ XS_MUTEX(xs_status); static XS_THREAD_T xs_decode_thread; -void xs_get_song_aud_tuple_info(Tuple *pResult, t_xs_tuneinfo *pInfo, gint subTune); +void xs_get_song_tuple_info(Tuple *pResult, t_xs_tuneinfo *pInfo, gint subTune); /* * Error messages @@ -396,7 +396,7 @@ xs_status.sidPlayer->plrUpdateSIDInfo(&xs_status); XS_MUTEX_UNLOCK(xs_status); tmpTuple = aud_tuple_new_from_filename(tmpTune->sidFilename); - xs_get_song_aud_tuple_info(tmpTuple, tmpTune, xs_status.currSong); + xs_get_song_tuple_info(tmpTuple, tmpTune, xs_status.currSong); tmpTitle = aud_tuple_formatter_process_string(tmpTuple, xs_cfg.titleOverride ? xs_cfg.titleFormat : get_gentitle_format()); @@ -591,7 +591,7 @@ /* * Return song information Tuple */ -void xs_get_song_aud_tuple_info(Tuple *pResult, t_xs_tuneinfo *pInfo, gint subTune) +void xs_get_song_tuple_info(Tuple *pResult, t_xs_tuneinfo *pInfo, gint subTune) { gchar *tmpStr, tmpStr2[64]; @@ -676,7 +676,7 @@ if (!tmpInfo) return tmpResult; - xs_get_song_aud_tuple_info(tmpResult, tmpInfo, tmpTune); + xs_get_song_tuple_info(tmpResult, tmpInfo, tmpTune); xs_tuneinfo_free(tmpInfo); return tmpResult; @@ -721,7 +721,7 @@ if (!tmpInfo) return tmpResult; - xs_get_song_aud_tuple_info(tmpResult, tmpInfo, tmpTune); + xs_get_song_tuple_info(tmpResult, tmpInfo, tmpTune); xs_tuneinfo_free(tmpInfo); return tmpResult;
--- a/src/song_change/song_change.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/song_change/song_change.c Sat Oct 13 19:55:04 2007 -0500 @@ -84,11 +84,11 @@ } /* - * escape_shell_chars() + * aud_escape_shell_chars() * * Escapes characters that are special to the shell inside double quotes. */ -static char* escape_shell_chars(const char *string) +static char* aud_escape_shell_chars(const char *string) { const char *special = "$`\"\\"; /* Characters to escape */ const char *in = string; @@ -146,7 +146,7 @@ str = audacious_drct_pl_get_title(pos); if (str) { - temp = escape_shell_chars(str); + temp = aud_escape_shell_chars(str); formatter_associate(formatter, 's', temp); formatter_associate(formatter, 'n', temp); g_free(str); @@ -160,7 +160,7 @@ if (current_file) { - temp = escape_shell_chars(current_file); + temp = aud_escape_shell_chars(current_file); formatter_associate(formatter, 'f', temp); g_free(temp); }
--- a/src/stdio/stdio.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/stdio/stdio.c Sat Oct 13 19:55:04 2007 -0500 @@ -37,12 +37,12 @@ if (!encoded_path) return NULL; - if (!str_has_prefix_nocase(encoded_path, "file:")) + if (!aud_str_has_prefix_nocase(encoded_path, "file:")) return NULL; cur = encoded_path + 5; - if (str_has_prefix_nocase(cur, "//localhost")) + if (aud_str_has_prefix_nocase(cur, "//localhost")) cur += 11; if (*cur == '/')
--- a/src/tta/libtta.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/tta/libtta.c Sat Oct 13 19:55:04 2007 -0500 @@ -406,7 +406,7 @@ gtk_widget_show_all (window); } realfn = g_filename_from_uri(filename, NULL, NULL); - utf_filename = str_to_utf8(realfn ? realfn : filename); + utf_filename = aud_str_to_utf8(realfn ? realfn : filename); g_free(realfn); realfn = NULL; title = g_strdup_printf(_("File Info - %s"), g_basename(utf_filename)); gtk_window_set_title(GTK_WINDOW(window), title); @@ -787,7 +787,7 @@ } else { rtn = (gchar *)id3_ucs4_latin1duplicate(string); - rtn2 = str_to_utf8(rtn); + rtn2 = aud_str_to_utf8(rtn); free(rtn); rtn = rtn2; }
--- a/src/vorbis/fileinfo.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/vorbis/fileinfo.c Sat Oct 13 19:55:04 2007 -0500 @@ -1014,7 +1014,7 @@ { gchar *realfn = NULL; realfn = g_filename_from_uri(vte.filename, NULL, NULL); - filename_utf8 = filename_to_utf8(realfn ? realfn : vte.filename); + filename_utf8 = aud_filename_to_utf8(realfn ? realfn : vte.filename); g_free(realfn); realfn = NULL; }
--- a/src/vorbis/vorbis.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/vorbis/vorbis.c Sat Oct 13 19:55:04 2007 -0500 @@ -718,7 +718,7 @@ static void _aud_tuple_associate_string(Tuple *tuple, const gint nfield, const gchar *field, const gchar *string) { if (string) { - gchar *str = str_to_utf8(string); + gchar *str = aud_str_to_utf8(string); aud_tuple_associate_string(tuple, nfield, field, str); g_free(str); }
--- a/src/vtx/vtx.c Sun Oct 14 01:33:02 2007 +0300 +++ b/src/vtx/vtx.c Sat Oct 13 19:55:04 2007 -0500 @@ -93,7 +93,7 @@ } Tuple * -vtx_get_song_aud_tuple_from_vtx(const gchar *filename, ayemu_vtx_t *in) +vtx_get_song_tuple_from_vtx(const gchar *filename, ayemu_vtx_t *in) { Tuple *out = aud_tuple_new_from_filename(filename); gchar *string; @@ -123,7 +123,7 @@ if (ayemu_vtx_open (&tmp, filename)) { - Tuple *ti = vtx_get_song_aud_tuple_from_vtx(filename, &tmp); + Tuple *ti = vtx_get_song_tuple_from_vtx(filename, &tmp); ayemu_vtx_free(&tmp); return ti; } @@ -233,7 +233,7 @@ playback->eof = FALSE; seek_to = -1; - ti = vtx_get_song_aud_tuple_from_vtx(playback->filename, &vtx); + ti = vtx_get_song_tuple_from_vtx(playback->filename, &vtx); buf = aud_tuple_formatter_make_title_string(ti, get_gentitle_format()); playback->set_params (playback, buf, vtx.hdr.regdata_size / 14 * 1000 / 50, @@ -296,7 +296,7 @@ (*title) = NULL; if (ayemu_vtx_open (&tmp, filename)) { - Tuple *ti = vtx_get_song_aud_tuple_from_vtx(filename, &tmp); + Tuple *ti = vtx_get_song_tuple_from_vtx(filename, &tmp); *title = aud_tuple_formatter_process_string(ti, get_gentitle_format()); *length = aud_tuple_get_int(ti, FIELD_LENGTH, NULL);