From d990bbbb9975a5f90182357085bfd290f7ab2506 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 28 Sep 2011 19:43:11 +0000 Subject: [PATCH] Eliminate all unnecessary uses of L and _T Originally committed to SVN as r5611. --- aegisub/src/aegisublocale.cpp | 56 +++--- aegisub/src/ass_attachment.cpp | 22 +-- aegisub/src/ass_dialogue.cpp | 186 +++++++++---------- aegisub/src/ass_entry.cpp | 10 +- aegisub/src/ass_file.cpp | 132 ++++++------- aegisub/src/ass_file.h | 4 +- aegisub/src/ass_override.cpp | 158 ++++++++-------- aegisub/src/ass_style.cpp | 78 ++++---- aegisub/src/ass_style_storage.cpp | 6 +- aegisub/src/ass_time.cpp | 26 +-- aegisub/src/audio_controller.cpp | 8 +- aegisub/src/audio_display.cpp | 12 +- aegisub/src/audio_player.cpp | 8 +- aegisub/src/audio_player_dsound.cpp | 6 +- aegisub/src/audio_player_dsound2.cpp | 44 ++--- aegisub/src/audio_player_openal.cpp | 10 +- aegisub/src/audio_player_oss.cpp | 8 +- aegisub/src/audio_player_portaudio.cpp | 8 +- aegisub/src/audio_player_pulse.cpp | 12 +- aegisub/src/audio_provider_avs.cpp | 4 +- aegisub/src/audio_provider_hd.cpp | 10 +- aegisub/src/auto4_base.cpp | 44 ++--- aegisub/src/auto4_lua.cpp | 32 ++-- aegisub/src/auto4_lua.h | 2 +- aegisub/src/auto4_lua_assfile.cpp | 54 +++--- aegisub/src/auto4_lua_dialog.cpp | 42 ++--- aegisub/src/auto4_lua_scriptreader.cpp | 6 +- aegisub/src/avisynth_wrap.cpp | 8 +- aegisub/src/browse_button.cpp | 8 +- aegisub/src/browse_button.h | 2 +- aegisub/src/charset_detect.cpp | 2 +- aegisub/src/colorspace.cpp | 4 +- aegisub/src/command/app.cpp | 2 +- aegisub/src/command/audio.cpp | 12 +- aegisub/src/command/automation.cpp | 4 +- aegisub/src/command/edit.cpp | 2 +- aegisub/src/command/help.cpp | 16 +- aegisub/src/command/keyframe.cpp | 10 +- aegisub/src/command/subtitle.cpp | 6 +- aegisub/src/command/timecode.cpp | 8 +- aegisub/src/command/video.cpp | 8 +- aegisub/src/dialog_about.cpp | 108 +++++------ aegisub/src/dialog_attachments.cpp | 16 +- aegisub/src/dialog_automation.cpp | 34 ++-- aegisub/src/dialog_colorpicker.cpp | 38 ++-- aegisub/src/dialog_dummy_video.cpp | 56 +++--- aegisub/src/dialog_export.cpp | 30 +-- aegisub/src/dialog_fonts_collector.cpp | 22 +-- aegisub/src/dialog_kara_timing_copy.cpp | 16 +- aegisub/src/dialog_paste_over.cpp | 2 +- aegisub/src/dialog_resample.cpp | 24 +-- aegisub/src/dialog_search_replace.cpp | 10 +- aegisub/src/dialog_spellchecker.cpp | 1 + aegisub/src/dialog_style_editor.cpp | 36 ++-- aegisub/src/dialog_style_manager.cpp | 60 +++--- aegisub/src/dialog_timing_processor.cpp | 16 +- aegisub/src/dialog_version_check.cpp | 60 +++--- aegisub/src/export_clean_info.cpp | 2 +- aegisub/src/ffmpegsource_common.cpp | 38 ++-- aegisub/src/fft.cpp | 2 +- aegisub/src/font_file_lister.cpp | 16 +- aegisub/src/frame_main.cpp | 4 +- aegisub/src/gl_text.cpp | 4 +- aegisub/src/help_button.cpp | 58 +++--- aegisub/src/help_button.h | 2 +- aegisub/src/include/aegisub/video_provider.h | 2 +- aegisub/src/main.cpp | 79 ++++---- aegisub/src/mkv_wrap.cpp | 50 ++--- aegisub/src/preferences.cpp | 10 +- aegisub/src/spellchecker.cpp | 6 +- aegisub/src/spline.cpp | 26 +-- aegisub/src/standard_paths.cpp | 28 +-- aegisub/src/string_codec.cpp | 8 +- aegisub/src/subs_edit_box.cpp | 58 +++--- aegisub/src/subs_edit_ctrl.cpp | 154 +++++++-------- aegisub/src/subs_grid.cpp | 10 +- aegisub/src/subs_preview.cpp | 2 +- aegisub/src/subtitle_format.cpp | 28 +-- aegisub/src/subtitle_format.h | 4 +- aegisub/src/subtitle_format_ass.cpp | 42 ++--- aegisub/src/subtitle_format_dvd.cpp | 14 +- aegisub/src/subtitle_format_encore.cpp | 12 +- aegisub/src/subtitle_format_microdvd.cpp | 24 +-- aegisub/src/subtitle_format_mkv.cpp | 12 +- aegisub/src/subtitle_format_srt.cpp | 28 +-- aegisub/src/subtitle_format_transtation.cpp | 34 ++-- aegisub/src/subtitle_format_ttxt.cpp | 128 ++++++------- aegisub/src/subtitle_format_txt.cpp | 36 ++-- aegisub/src/subtitle_format_txt.h | 2 +- aegisub/src/subtitles_provider.cpp | 8 +- aegisub/src/subtitles_provider_csri.cpp | 6 +- aegisub/src/subtitles_provider_libass.cpp | 8 +- aegisub/src/text_file_reader.h | 2 +- aegisub/src/text_file_writer.cpp | 4 +- aegisub/src/timeedit_ctrl.cpp | 26 +-- aegisub/src/timeedit_ctrl.h | 2 +- aegisub/src/utils.cpp | 52 +++--- aegisub/src/variable_data.cpp | 30 +-- aegisub/src/video_context.cpp | 40 ++-- aegisub/src/video_display.cpp | 34 ++-- aegisub/src/video_provider_dummy.cpp | 8 +- aegisub/src/video_provider_dummy.h | 2 +- aegisub/src/video_provider_ffmpegsource.cpp | 2 +- aegisub/src/video_provider_ffmpegsource.h | 2 +- aegisub/src/video_provider_yuv4mpeg.cpp | 2 +- aegisub/src/video_provider_yuv4mpeg.h | 2 +- aegisub/src/visual_tool.cpp | 38 ++-- aegisub/src/visual_tool.h | 2 +- aegisub/src/visual_tool_clip.cpp | 10 +- aegisub/src/visual_tool_cross.cpp | 6 +- aegisub/src/visual_tool_drag.cpp | 18 +- aegisub/src/visual_tool_rotatexy.cpp | 6 +- aegisub/src/visual_tool_rotatez.cpp | 8 +- aegisub/src/visual_tool_scale.cpp | 8 +- aegisub/src/visual_tool_vector_clip.cpp | 2 +- 115 files changed, 1426 insertions(+), 1434 deletions(-) diff --git a/aegisub/src/aegisublocale.cpp b/aegisub/src/aegisublocale.cpp index f0368738d..bdf214347 100644 --- a/aegisub/src/aegisublocale.cpp +++ b/aegisub/src/aegisublocale.cpp @@ -82,13 +82,13 @@ void AegisubLocale::Init(int language) { locale = new wxLocale(language); #ifdef __WINDOWS__ - locale->AddCatalogLookupPathPrefix(StandardPaths::DecodePath(_T("?data/locale/"))); - locale->AddCatalog(_T("aegisub")); + locale->AddCatalogLookupPathPrefix(StandardPaths::DecodePath("?data/locale/")); + locale->AddCatalog("aegisub"); #else - locale->AddCatalog(_T(GETTEXT_PACKAGE)); + locale->AddCatalog(GETTEXT_PACKAGE); #endif - locale->AddCatalog(_T("wxstd")); + locale->AddCatalog("wxstd"); setlocale(LC_NUMERIC, "C"); setlocale(LC_CTYPE, "C"); } @@ -124,7 +124,7 @@ int AegisubLocale::PickLanguage() { if (langs.Count() == 0) return -1; // Popup - int picked = wxGetSingleChoiceIndex(_T("Please choose a language:"),_T("Language"),langNames,NULL,-1,-1,true,300,400); + int picked = wxGetSingleChoiceIndex("Please choose a language:","Language",langNames,NULL,-1,-1,true,300,400); if (picked == -1) return -1; return langs[picked]; } @@ -140,15 +140,15 @@ wxArrayInt AegisubLocale::GetAvailableLanguages() { wxString temp1; // Open directory - wxString folder = StandardPaths::DecodePath(_T("?data/locale/")); + wxString folder = StandardPaths::DecodePath("?data/locale/"); wxDir dir; if (!dir.Exists(folder)) return final; if (!dir.Open(folder)) return final; // Enumerate folders - for (bool cont = dir.GetFirst(&temp1,_T(""),wxDIR_DIRS);cont;cont = dir.GetNext(&temp1)) { + for (bool cont = dir.GetFirst(&temp1,"",wxDIR_DIRS);cont;cont = dir.GetNext(&temp1)) { // Check if .so exists inside folder - wxFileName file(folder + temp1 + _T("/aegisub.mo")); + wxFileName file(folder + temp1 + "/aegisub.mo"); if (file.FileExists()) { const wxLanguageInfo *lang = wxLocale::FindLanguageInfo(temp1); if (lang) { @@ -159,33 +159,33 @@ wxArrayInt AegisubLocale::GetAvailableLanguages() { #else - const wchar_t* langs[] = { - _T("ca"), - _T("cs"), - _T("da"), - _T("de"), - _T("el"), - _T("es"), - _T("fi"), - _T("fr_FR"), - _T("hu"), - _T("it"), - _T("ja"), - _T("ko"), - _T("pt_BR"), - _T("ru"), - _T("vi"), - _T("zh_CN"), - _T("zh_TW") + const char* langs[] = { + "ca", + "cs", + "da", + "de", + "el", + "es", + "fi", + "fr_FR", + "hu", + "it", + "ja", + "ko", + "pt_BR", + "ru", + "vi", + "zh_CN", + "zh_TW" }; - size_t len = sizeof(langs)/sizeof(wchar_t*); + size_t len = sizeof(langs)/sizeof(char*); for (size_t i=0; iLanguage); } #endif diff --git a/aegisub/src/ass_attachment.cpp b/aegisub/src/ass_attachment.cpp index bb8a969f7..36d6d6d68 100644 --- a/aegisub/src/ass_attachment.cpp +++ b/aegisub/src/ass_attachment.cpp @@ -57,8 +57,8 @@ AssAttachment::AssAttachment(wxString _name) { wxFileName fname(GetFileName()); wxString ext = fname.GetExt().Lower(); wxString name; - if (ext == _T("ttf")) { - name = fname.GetName() + _T("_0.") + ext; + if (ext == "ttf") { + name = fname.GetName() + "_0." + ext; } else name = _name; @@ -133,9 +133,9 @@ const wxString AssAttachment::GetEntryData() const { // Write header wxString entryData; - if (group == _T("[Fonts]")) entryData = _T("fontname: "); - else entryData = _T("filename: "); - entryData += filename + _T("\r\n"); + if (group == "[Fonts]") entryData = "fontname: "; + else entryData = "filename: "; + entryData += filename + "\r\n"; // Read three bytes while (pos < size) { @@ -162,13 +162,13 @@ const wxString AssAttachment::GetEntryData() const { // Convert to text for (int i=0;i"),_T("{\\i1}")); - total += Text.Replace(_T(""),_T("{\\i0}")); - total += Text.Replace(_T(""),_T("{\\b1}")); - total += Text.Replace(_T(""),_T("{\\b0}")); - total += Text.Replace(_T(""),_T("{\\u1}")); - total += Text.Replace(_T(""),_T("{\\u0}")); - total += Text.Replace(_T(""),_T("{\\s1}")); - total += Text.Replace(_T(""),_T("{\\s0}")); + total += Text.Replace("","{\\i1}"); + total += Text.Replace("","{\\i0}"); + total += Text.Replace("","{\\b1}"); + total += Text.Replace("","{\\b0}"); + total += Text.Replace("","{\\u1}"); + total += Text.Replace("","{\\u0}"); + total += Text.Replace("","{\\s1}"); + total += Text.Replace("","{\\s0}"); // Process tag wxString work = Text; @@ -266,8 +266,8 @@ void AssDialogue::ParseSRTTags () { bool isOpen; // Iterate - pos_open = work.find(_T(""),start)+1; + end = work.find(">",start)+1; //if (end == wxString::npos) continue; // Open tag @@ -286,17 +286,17 @@ void AssDialogue::ParseSRTTags () { wxString replaced; // Color tag - if ((pos = work.find(_T("COLOR=\""),start)) != wxString::npos) { + if ((pos = work.find("COLOR=\"",start)) != wxString::npos) { if (pos < end) { pos += 7; - size_t end_tag = Text.find(_T("\""),pos); + size_t end_tag = Text.find("\"",pos); if (end_tag != wxString::npos) { if (end_tag-pos == 7) { - replaced += _T("{\\c&H"); + replaced += "{\\c&H"; replaced += work.substr(pos+5,2); replaced += work.substr(pos+3,2); replaced += work.substr(pos+1,2); - replaced += _T("&}"); + replaced += "&}"; total++; } } @@ -304,28 +304,28 @@ void AssDialogue::ParseSRTTags () { } // Face tag - if ((pos = work.find(_T("FACE=\""),start)) != wxString::npos) { + if ((pos = work.find("FACE=\"",start)) != wxString::npos) { if (pos < end) { pos += 6; - size_t end_tag = work.find(_T("\""),pos); + size_t end_tag = work.find("\"",pos); if (end_tag != wxString::npos) { - replaced += _T("{\\fn"); + replaced += "{\\fn"; replaced += work.substr(pos,end_tag-pos); - replaced += _T("}"); + replaced += "}"; total++; } } } // Size tag - if ((pos = work.find(_T("SIZE=\""),start)) != wxString::npos) { + if ((pos = work.find("SIZE=\"",start)) != wxString::npos) { if (pos < end) { pos += 6; - size_t end_tag = Text.find(_T("\""),pos); + size_t end_tag = Text.find("\"",pos); if (end_tag != wxString::npos) { - replaced += _T("{\\fs"); + replaced += "{\\fs"; replaced += work.substr(pos,end_tag-pos); - replaced += _T("}"); + replaced += "}"; total++; } } @@ -343,18 +343,18 @@ void AssDialogue::ParseSRTTags () { // Find if it's italic, bold, underline, and strikeout wxString prev = Text.Left(start); bool isItalic=false,isBold=false,isUnder=false,isStrike=false; - if (CountMatches(prev,_T("{\\i1}")) > CountMatches(prev,_T("{\\i0}"))) isItalic = true; - if (CountMatches(prev,_T("{\\b1}")) > CountMatches(prev,_T("{\\b0}"))) isBold = true; - if (CountMatches(prev,_T("{\\u1}")) > CountMatches(prev,_T("{\\u0}"))) isUnder = true; - if (CountMatches(prev,_T("{\\s1}")) > CountMatches(prev,_T("{\\s0}"))) isStrike = true; + if (CountMatches(prev,"{\\i1}") > CountMatches(prev,"{\\i0}")) isItalic = true; + if (CountMatches(prev,"{\\b1}") > CountMatches(prev,"{\\b0}")) isBold = true; + if (CountMatches(prev,"{\\u1}") > CountMatches(prev,"{\\u0}")) isUnder = true; + if (CountMatches(prev,"{\\s1}") > CountMatches(prev,"{\\s0}")) isStrike = true; // Generate new tag, by reseting and then restoring flags - wxString replaced = _T("{\\r"); - if (isItalic) replaced += _T("\\i1"); - if (isBold) replaced += _T("\\b1"); - if (isUnder) replaced += _T("\\u1"); - if (isStrike) replaced += _T("\\s1"); - replaced += _T("}"); + wxString replaced = "{\\r"; + if (isItalic) replaced += "\\i1"; + if (isBold) replaced += "\\b1"; + if (isUnder) replaced += "\\u1"; + if (isStrike) replaced += "\\s1"; + replaced += "}"; // Replace //Text = Text.substr(0,start) + replaced + Text.substr(end); @@ -366,12 +366,12 @@ void AssDialogue::ParseSRTTags () { // Get next work = Text; work.UpperCase(); - pos_open = work.find(_T("::iterator curTag; for (curTag = block->Tags.begin();curTag != block->Tags.end();curTag++) { - if ((*curTag)->Name == L"\\p") { + if ((*curTag)->Name == "\\p") { drawingLevel = (*curTag)->Params[0]->Get(0); } } @@ -428,7 +428,7 @@ void AssDialogue::ParseASSTags () { // Plain-text/drawing block else { wxString work; - end = Text.find(_T("{"),cur); + end = Text.find("{",cur); if (end == wxString::npos) { work = Text.substr(cur); end = len; @@ -457,7 +457,7 @@ void AssDialogue::ParseASSTags () { // Empty line, make an empty block if (len == 0) { AssDialogueBlockPlain *block = new AssDialogueBlockPlain; - block->text = _T(""); + block->text = ""; Blocks.push_back(block); } } @@ -482,7 +482,7 @@ void AssDialogue::StripTag (wxString tagName) { } // Insert - if (!temp.IsEmpty()) final += _T("{") + temp + _T("}"); + if (!temp.IsEmpty()) final += "{" + temp + "}"; } else final += (*cur)->GetText(); } @@ -497,7 +497,7 @@ void AssDialogue::ConvertTagsToSRT () { AssDialogueBlockOverride* curBlock; AssDialogueBlockPlain *curPlain; AssOverrideTag* curTag; - wxString final = _T(""); + wxString final = ""; bool isItalic=false,isBold=false,isUnder=false,isStrike=false; bool temp; @@ -511,54 +511,54 @@ void AssDialogue::ConvertTagsToSRT () { curTag = curBlock->Tags.at(j); if (curTag->IsValid()) { // Italics - if (curTag->Name == _T("\\i")) { + if (curTag->Name == "\\i") { temp = curTag->Params.at(0)->Get(); if (temp && !isItalic) { isItalic = true; - final += _T(""); + final += ""; } if (!temp && isItalic) { isItalic = false; - final += _T(""); + final += ""; } } // Underline - if (curTag->Name == _T("\\u")) { + if (curTag->Name == "\\u") { temp = curTag->Params.at(0)->Get(); if (temp && !isUnder) { isUnder = true; - final += _T(""); + final += ""; } if (!temp && isUnder) { isUnder = false; - final += _T(""); + final += ""; } } // Strikeout - if (curTag->Name == _T("\\s")) { + if (curTag->Name == "\\s") { temp = curTag->Params.at(0)->Get(); if (temp && !isStrike) { isStrike = true; - final += _T(""); + final += ""; } if (!temp && isStrike) { isStrike = false; - final += _T(""); + final += ""; } } // Bold - if (curTag->Name == _T("\\b")) { + if (curTag->Name == "\\b") { temp = curTag->Params.at(0)->Get(); if (temp && !isBold) { isBold = true; - final += _T(""); + final += ""; } if (!temp && isBold) { isBold = false; - final += _T(""); + final += ""; } } } @@ -576,13 +576,13 @@ void AssDialogue::ConvertTagsToSRT () { // Ensure all tags are closed if (isBold) - final += _T(""); + final += ""; if (isItalic) - final += _T(""); + final += ""; if (isUnder) - final += _T(""); + final += ""; if (isStrike) - final += _T(""); + final += ""; Text = final; ClearBlocks(); @@ -593,9 +593,9 @@ void AssDialogue::UpdateText () { Text.clear(); for (std::vector::iterator cur=Blocks.begin();cur!=Blocks.end();cur++) { if ((*cur)->GetType() == BLOCK_OVERRIDE) { - Text += _T("{"); + Text += "{"; Text += (*cur)->GetText(); - Text += _T("}"); + Text += "}"; } else Text += (*cur)->GetText(); } @@ -607,7 +607,7 @@ void AssDialogue::SetMarginString(const wxString origvalue,int which) { // Make it numeric wxString strvalue = origvalue; if (!strvalue.IsNumber()) { - strvalue = _T(""); + strvalue = ""; for (size_t i=0;i= 4) throw Aegisub::InvalidMarginIdError(); int value = Margin[which]; - if (pad) return wxString::Format(_T("%04i"),value); - else return wxString::Format(_T("%i"),value); + if (pad) return wxString::Format("%04i",value); + else return wxString::Format("%i",value); } void AssDialogue::ProcessParameters(AssDialogueBlockOverride::ProcessParametersCallback callback,void *userData) { @@ -657,9 +657,9 @@ bool AssDialogue::CollidesWith(AssDialogue *target) { } wxString AssDialogue::GetStrippedText() const { - static wxRegEx reg(_T("\\{[^\\{]*\\}"),wxRE_ADVANCED); + static wxRegEx reg("\\{[^\\{]*\\}",wxRE_ADVANCED); wxString txt(Text); - reg.Replace(&txt,_T("")); + reg.Replace(&txt,""); return txt; } @@ -670,7 +670,7 @@ AssEntry *AssDialogue::Clone() const { void AssDialogueBlockDrawing::TransformCoords(int mx,int my,double x,double y) { // HACK: Implement a proper parser ffs!! // Could use Spline but it'd be slower and this seems to work fine - wxStringTokenizer tkn(GetText(),_T(" "),wxTOKEN_DEFAULT); + wxStringTokenizer tkn(GetText()," ",wxTOKEN_DEFAULT); wxString cur; wxString final; bool isX = true; @@ -688,7 +688,7 @@ void AssDialogueBlockDrawing::TransformCoords(int mx,int my,double x,double y) { else temp = (long int)((temp+my)*y + 0.5); // Write back to list - final += wxString::Format(_T("%i "),temp); + final += wxString::Format("%i ",temp); // Toggle X/Y isX = !isX; @@ -696,8 +696,8 @@ void AssDialogueBlockDrawing::TransformCoords(int mx,int my,double x,double y) { // Text else { - if (cur == _T("m") || cur == _T("n") || cur == _T("l") || cur == _T("b") || cur == _T("s") || cur == _T("p") || cur == _T("c")) isX = true; - final += cur + _T(" "); + if (cur == "m" || cur == "n" || cur == "l" || cur == "b" || cur == "s" || cur == "p" || cur == "c") isX = true; + final += cur + " "; } } diff --git a/aegisub/src/ass_entry.cpp b/aegisub/src/ass_entry.cpp index 39b3a1288..4e351d309 100644 --- a/aegisub/src/ass_entry.cpp +++ b/aegisub/src/ass_entry.cpp @@ -68,11 +68,11 @@ AssEntry::~AssEntry() { /// wxString AssEntry::GetSSAText() const { // Special cases - if (data.Lower() == _T("[v4+ styles]")) return wxString(_T("[V4 Styles]")); - if (data.Lower() == _T("scripttype: v4.00+")) return wxString(_T("ScriptType: v4.00")); - if (data.Lower().Left(7) == _T("format:")) { - if (group.Lower() == _T("[events]")) return wxString(_T("Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text")); - if (group.Lower() == _T("[v4+ styles]")) return wxString(_T("Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding")); + if (data.Lower() == "[v4+ styles]") return wxString("[V4 Styles]"); + if (data.Lower() == "scripttype: v4.00+") return wxString("ScriptType: v4.00"); + if (data.Lower().Left(7) == "format:") { + if (group.Lower() == "[events]") return wxString("Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text"); + if (group.Lower() == "[v4+ styles]") return wxString("Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding"); } return GetEntryData(); } diff --git a/aegisub/src/ass_file.cpp b/aegisub/src/ass_file.cpp index 7086ade0f..c0f024929 100644 --- a/aegisub/src/ass_file.cpp +++ b/aegisub/src/ass_file.cpp @@ -91,7 +91,7 @@ void AssFile::Load(const wxString &_filename,wxString charset,bool addToRecent) SubtitleFormat *reader = SubtitleFormat::GetReader(_filename); if (!reader) { - wxMessageBox(L"Unknown file type","Error loading file",wxICON_ERROR | wxOK); + wxMessageBox("Unknown file type","Error loading file",wxICON_ERROR | wxOK); return; } @@ -104,25 +104,25 @@ void AssFile::Load(const wxString &_filename,wxString charset,bool addToRecent) catch (agi::UserCancelException const&) { return; } - catch (const wchar_t *except) { - wxMessageBox(except,_T("Error loading file"),wxICON_ERROR | wxOK); + catch (const char *except) { + wxMessageBox(except,"Error loading file",wxICON_ERROR | wxOK); return; } catch (wxString &except) { - wxMessageBox(except,_T("Error loading file"),wxICON_ERROR | wxOK); + wxMessageBox(except,"Error loading file",wxICON_ERROR | wxOK); return; } // Real exception catch (agi::Exception &e) { - wxMessageBox(wxString(e.GetChainedMessage().c_str(), wxConvUTF8), L"Error loading file", wxICON_ERROR|wxOK); + wxMessageBox(wxString(e.GetChainedMessage().c_str(), wxConvUTF8), "Error loading file", wxICON_ERROR|wxOK); return; } // Other error catch (...) { - wxMessageBox(_T("Unknown error"),_T("Error loading file"),wxICON_ERROR | wxOK); + wxMessageBox("Unknown error","Error loading file",wxICON_ERROR | wxOK); return; } @@ -156,8 +156,8 @@ void AssFile::Load(const wxString &_filename,wxString charset,bool addToRecent) // Add comments and set vars AddComment(wxString("Script generated by Aegisub ") + GetAegisubLongVersionString()); - AddComment(_T("http://www.aegisub.org/")); - SetScriptInfo(_T("ScriptType"),_T("v4.00+")); + AddComment("http://www.aegisub.org/"); + SetScriptInfo("ScriptType","v4.00+"); // Push the initial state of the file onto the undo stack UndoStack.clear(); @@ -195,8 +195,8 @@ void AssFile::Save(wxString filename, bool setfilename, bool addToRecent, wxStri void AssFile::SaveMemory(std::vector &dst,const wxString encoding) { // Set encoding wxString enc = encoding; - if (enc.IsEmpty()) enc = _T("UTF-8"); - if (enc != _T("UTF-8")) throw _T("Memory writer only supports UTF-8 for now."); + if (enc.IsEmpty()) enc = "UTF-8"; + if (enc != "UTF-8") throw "Memory writer only supports UTF-8 for now."; // Check if subs contain at least one style // Add a default style if they don't for compatibility with libass/asa @@ -215,7 +215,7 @@ void AssFile::SaveMemory(std::vector &dst,const wxString encoding) { wxCharBuffer buffer; for (cur=Line.begin();cur!=Line.end();cur++) { // Convert - wxString temp = (*cur)->GetEntryData() + _T("\r\n"); + wxString temp = (*cur)->GetEntryData() + "\r\n"; buffer = temp.mb_str(wxConvUTF8); lineSize = strlen(buffer); @@ -237,16 +237,16 @@ void AssFile::SaveMemory(std::vector &dst,const wxString encoding) { void AssFile::Export(wxString _filename) { AssExporter exporter(this); exporter.AddAutoFilters(); - exporter.Export(_filename,_T("UTF-8")); + exporter.Export(_filename,"UTF-8"); } bool AssFile::CanSave() { // ASS format? wxString ext = filename.Lower().Right(4); - if (ext == _T(".ass")) return true; + if (ext == ".ass") return true; // Never save texts - if (ext == _T(".txt")) return false; + if (ext == ".txt") return false; // Check if it's a known extension SubtitleFormat *writer = SubtitleFormat::GetWriter(filename); @@ -254,7 +254,7 @@ bool AssFile::CanSave() { // Check if format supports timing bool canTime = true; - //if (filename.Lower().Right(4) == _T(".txt")) canTime = false; + //if (filename.Lower().Right(4) == ".txt") canTime = false; // Scan through the lines AssStyle defstyle; @@ -305,7 +305,7 @@ void AssFile::AddLine(wxString data,wxString group,int &version,wxString *outGro wxString lowGroup = group.Lower(); // Attachment - if (lowGroup == _T("[fonts]") || lowGroup == _T("[graphics]")) { + if (lowGroup == "[fonts]" || lowGroup == "[graphics]") { // Check if it's valid data size_t dataLen = data.Length(); bool validData = (dataLen > 0) && (dataLen <= 80); @@ -314,7 +314,7 @@ void AssFile::AddLine(wxString data,wxString group,int &version,wxString *outGro } // Is the filename line? - bool isFilename = (data.StartsWith(_T("fontname: ")) || data.StartsWith(_T("filename: "))); + bool isFilename = (data.StartsWith("fontname: ") || data.StartsWith("filename: ")); // The attachment file is static, since it is built through several calls to this // After it's done building, it's reset to NULL @@ -361,54 +361,54 @@ void AssFile::AddLine(wxString data,wxString group,int &version,wxString *outGro } // Dialogue - else if (lowGroup == _T("[events]")) { - if (data.StartsWith(_T("Dialogue:")) || data.StartsWith(_T("Comment:"))) { + else if (lowGroup == "[events]") { + if (data.StartsWith("Dialogue:") || data.StartsWith("Comment:")) { AssDialogue *diag = new AssDialogue(data,version); //diag->ParseASSTags(); entry = diag; entry->group = group; } - else if (data.StartsWith(_T("Format:"))) { - entry = new AssEntry(_T("Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text")); + else if (data.StartsWith("Format:")) { + entry = new AssEntry("Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text"); entry->group = group; } } // Style - else if (lowGroup == _T("[v4+ styles]")) { - if (data.StartsWith(_T("Style:"))) { + else if (lowGroup == "[v4+ styles]") { + if (data.StartsWith("Style:")) { AssStyle *style = new AssStyle(data,version); entry = style; entry->group = group; } - if (data.StartsWith(_T("Format:"))) { - entry = new AssEntry(_T("Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding")); + if (data.StartsWith("Format:")) { + entry = new AssEntry("Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding"); entry->group = group; } } // Script info - else if (lowGroup == _T("[script info]")) { + else if (lowGroup == "[script info]") { // Comment - if (data.StartsWith(_T(";"))) { + if (data.StartsWith(";")) { // Skip stupid comments added by other programs // Of course, we'll add our own in place later... ;) return; } // Version - if (data.StartsWith(_T("ScriptType:"))) { + if (data.StartsWith("ScriptType:")) { wxString versionString = data.Mid(11); versionString.Trim(true); versionString.Trim(false); versionString.MakeLower(); int trueVersion; - if (versionString == _T("v4.00")) trueVersion = 0; - else if (versionString == _T("v4.00+")) trueVersion = 1; - else if (versionString == _T("v4.00++")) trueVersion = 2; - else throw _T("Unknown SSA file format version"); + if (versionString == "v4.00") trueVersion = 0; + else if (versionString == "v4.00+") trueVersion = 1; + else if (versionString == "v4.00++") trueVersion = 2; + else throw "Unknown SSA file format version"; if (trueVersion != version) { - if (!(trueVersion == 2 && version == 1)) wxLogMessage(_T("Warning: File has the wrong extension.")); + if (!(trueVersion == 2 && version == 1)) wxLogMessage("Warning: File has the wrong extension."); version = trueVersion; } } @@ -447,25 +447,25 @@ void AssFile::LoadDefault(bool defline) { // Write headers AssStyle defstyle; int version = 1; - AddLine(_T("[Script Info]"),_T("[Script Info]"),version); - AddLine(_T("Title: Default Aegisub file"),_T("[Script Info]"),version); - AddLine(_T("ScriptType: v4.00+"),_T("[Script Info]"),version); - AddLine(_T("WrapStyle: 0"), _T("[Script Info]"),version); - AddLine(_T("PlayResX: 640"),_T("[Script Info]"),version); - AddLine(_T("PlayResY: 480"),_T("[Script Info]"),version); - AddLine(_T("ScaledBorderAndShadow: yes"),_T("[Script Info]"),version); - AddLine(_T("Collisions: Normal"),_T("[Script Info]"),version); - AddLine("",_T("[Script Info]"),version); - AddLine(_T("[V4+ Styles]"),_T("[V4+ Styles]"),version); - AddLine(_T("Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding"),_T("[V4+ Styles]"),version); - AddLine(defstyle.GetEntryData(),_T("[V4+ Styles]"),version); - AddLine("",_T("[V4+ Styles]"),version); - AddLine(_T("[Events]"),_T("[Events]"),version); - AddLine(_T("Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text"),_T("[Events]"),version); + AddLine("[Script Info]","[Script Info]",version); + AddLine("Title: Default Aegisub file","[Script Info]",version); + AddLine("ScriptType: v4.00+","[Script Info]",version); + AddLine("WrapStyle: 0", "[Script Info]",version); + AddLine("PlayResX: 640","[Script Info]",version); + AddLine("PlayResY: 480","[Script Info]",version); + AddLine("ScaledBorderAndShadow: yes","[Script Info]",version); + AddLine("Collisions: Normal","[Script Info]",version); + AddLine("","[Script Info]",version); + AddLine("[V4+ Styles]","[V4+ Styles]",version); + AddLine("Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding","[V4+ Styles]",version); + AddLine(defstyle.GetEntryData(),"[V4+ Styles]",version); + AddLine("","[V4+ Styles]",version); + AddLine("[Events]","[Events]",version); + AddLine("Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text","[Events]",version); if (defline) { AssDialogue def; - AddLine(def.GetEntryData(),_T("[Events]"),version); + AddLine(def.GetEntryData(),"[Events]",version); } Commit("", COMMIT_NEW); @@ -507,7 +507,7 @@ void AssFile::InsertStyle (AssStyle *style) { // Look for insert position for (cur=Line.begin();cur!=Line.end();cur++) { curEntry = *cur; - if (curEntry->GetType() == ENTRY_STYLE || (lastGroup == _T("[V4+ Styles]") && curEntry->GetEntryData().substr(0,7) == _T("Format:"))) { + if (curEntry->GetType() == ENTRY_STYLE || (lastGroup == "[V4+ Styles]" && curEntry->GetEntryData().substr(0,7) == "Format:")) { lastStyle = cur; } lastGroup = curEntry->group; @@ -521,17 +521,17 @@ void AssFile::InsertStyle (AssStyle *style) { Line.push_back(curEntry); // Add header - curEntry = new AssEntry(_T("[V4+ Styles]")); - curEntry->group = _T("[V4+ Styles]"); + curEntry = new AssEntry("[V4+ Styles]"); + curEntry->group = "[V4+ Styles]"; Line.push_back(curEntry); // Add format line - curEntry = new AssEntry(_T("Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding")); - curEntry->group = _T("[V4+ Styles]"); + curEntry = new AssEntry("Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding"); + curEntry->group = "[V4+ Styles]"; Line.push_back(curEntry); // Add style - style->group = _T("[V4+ Styles]"); + style->group = "[V4+ Styles]"; Line.push_back(style); } @@ -590,20 +590,20 @@ void AssFile::InsertAttachment (wxString filename) { // Insert wxString ext = filename.Right(4).Lower(); - if (ext == _T(".ttf") || ext == _T(".ttc") || ext == _T(".pfb")) newAttach->group = _T("[Fonts]"); - else newAttach->group = _T("[Graphics]"); + if (ext == ".ttf" || ext == ".ttc" || ext == ".pfb") newAttach->group = "[Fonts]"; + else newAttach->group = "[Graphics]"; InsertAttachment(newAttach); } wxString AssFile::GetScriptInfo(const wxString _key) { wxString key = _key;; key.Lower(); - key += _T(":"); + key += ":"; std::list::iterator cur; bool GotIn = false; for (cur=Line.begin();cur!=Line.end();cur++) { - if ((*cur)->group == _T("[Script Info]")) { + if ((*cur)->group == "[Script Info]") { GotIn = true; wxString curText = (*cur)->GetEntryData(); curText.Lower(); @@ -639,7 +639,7 @@ void AssFile::SetScriptInfo(wxString const& key, wxString const& value) { bool found_script_info = false; for (std::list::iterator cur = Line.begin(); cur != Line.end(); ++cur) { - if ((*cur)->group == _T("[Script Info]")) { + if ((*cur)->group == "[Script Info]") { found_script_info = true; wxString cur_text = (*cur)->GetEntryData().Left(key_size).Lower(); @@ -667,7 +667,7 @@ void AssFile::SetScriptInfo(wxString const& key, wxString const& value) { } void AssFile::GetResolution(int &sw,int &sh) { - wxString temp = GetScriptInfo(_T("PlayResY")); + wxString temp = GetScriptInfo("PlayResY"); if (temp.IsEmpty() || !temp.IsNumber()) { sh = 0; } @@ -677,7 +677,7 @@ void AssFile::GetResolution(int &sw,int &sh) { sh = templ; } - temp = GetScriptInfo(_T("PlayResX")); + temp = GetScriptInfo("PlayResX"); if (temp.IsEmpty() || !temp.IsNumber()) { sw = 0; } @@ -706,17 +706,17 @@ void AssFile::GetResolution(int &sw,int &sh) { } void AssFile::AddComment(const wxString _comment) { - wxString comment = _T("; "); + wxString comment = "; "; comment += _comment; std::list::iterator cur; int step = 0; for (cur=Line.begin();cur!=Line.end();cur++) { // Start of group - if (step == 0 && (*cur)->group == _T("[Script Info]")) step = 1; + if (step == 0 && (*cur)->group == "[Script Info]") step = 1; // First line after a ; - else if (step == 1 && !(*cur)->GetEntryData().StartsWith(_T(";"))) { + else if (step == 1 && !(*cur)->GetEntryData().StartsWith(";")) { AssEntry *prev = *cur; AssEntry *comm = new AssEntry(comment); comm->group = prev->group; @@ -755,7 +755,7 @@ void AssFile::AddToRecent(wxString file) { wxString AssFile::GetWildcardList(int mode) { if (mode == 0) return SubtitleFormat::GetWildcards(0); - else if (mode == 1) return _T("Advanced Substation Alpha (*.ass)|*.ass"); + else if (mode == 1) return "Advanced Substation Alpha (*.ass)|*.ass"; else if (mode == 2) return SubtitleFormat::GetWildcards(1); else return ""; } diff --git a/aegisub/src/ass_file.h b/aegisub/src/ass_file.h index dc9e9f8f2..844809c67 100644 --- a/aegisub/src/ass_file.h +++ b/aegisub/src/ass_file.h @@ -128,10 +128,10 @@ public: /// @param setfilename Should the filename be changed to the passed path? /// @param addToRecent Should the file be added to the MRU list? /// @param encoding Encoding to use, or empty to let the writer decide (which usually means "App/Save Charset") - void Save(wxString file,bool setfilename=false,bool addToRecent=true,const wxString encoding=_T("")); + void Save(wxString file,bool setfilename=false,bool addToRecent=true,const wxString encoding=""); /// @brief Save to a memory buffer. Used for subtitle providers which support it /// @param[out] dst Destination vector - void SaveMemory(std::vector &dst,const wxString encoding=_T("")); + void SaveMemory(std::vector &dst,const wxString encoding=""); /// @brief Saves exported copy, with effects applied /// @param file Path to save to; file name is never set to this void Export(wxString file); diff --git a/aegisub/src/ass_override.cpp b/aegisub/src/ass_override.cpp index 41faf50f4..5a2b91a07 100644 --- a/aegisub/src/ass_override.cpp +++ b/aegisub/src/ass_override.cpp @@ -74,21 +74,21 @@ AssDialogueBlockOverride::~AssDialogueBlockOverride() { void AssDialogueBlockOverride::ParseTags() { delete_clear(Tags); - wxStringTokenizer tkn(text, L"\\", wxTOKEN_STRTOK); + wxStringTokenizer tkn(text, "\\", wxTOKEN_STRTOK); wxString curTag; - if (text.StartsWith(L"\\")) curTag = L"\\"; + if (text.StartsWith("\\")) curTag = "\\"; while (tkn.HasMoreTokens()) { curTag += tkn.GetNextToken(); // Check for parenthesis matching for \t - while (curTag.Freq(L'(') > curTag.Freq(L')') && tkn.HasMoreTokens()) { - curTag << L"\\" << tkn.GetNextToken(); + while (curTag.Freq('(') > curTag.Freq(')') && tkn.HasMoreTokens()) { + curTag << "\\" << tkn.GetNextToken(); } Tags.push_back(new AssOverrideTag(curTag)); - curTag = L"\\"; + curTag = "\\"; } } void AssDialogueBlockOverride::AddTag(wxString const& tag) { @@ -149,17 +149,17 @@ static void load_protos() { // Longer tag names must appear before shorter tag names - proto[0].Set(L"\\alpha", VARDATA_TEXT); // \alpha - proto[++i].Set(L"\\bord", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \bord - proto[++i].Set(L"\\xbord", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \xbord - proto[++i].Set(L"\\ybord", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \ybord - proto[++i].Set(L"\\shad", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \shad - proto[++i].Set(L"\\xshad", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \xshad - proto[++i].Set(L"\\yshad", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \yshad + proto[0].Set("\\alpha", VARDATA_TEXT); // \alpha + proto[++i].Set("\\bord", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \bord + proto[++i].Set("\\xbord", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \xbord + proto[++i].Set("\\ybord", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \ybord + proto[++i].Set("\\shad", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \shad + proto[++i].Set("\\xshad", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \xshad + proto[++i].Set("\\yshad", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \yshad // \fade(,,,,,,) i++; - proto[i].name = L"\\fade"; + proto[i].name = "\\fade"; proto[i].AddParam(VARDATA_INT); proto[i].AddParam(VARDATA_INT); proto[i].AddParam(VARDATA_INT); @@ -170,7 +170,7 @@ static void load_protos() { // \move(,,,[,,]) i++; - proto[i].name = L"\\move"; + proto[i].name = "\\move"; proto[i].AddParam(VARDATA_FLOAT,PARCLASS_ABSOLUTE_POS_X); proto[i].AddParam(VARDATA_FLOAT,PARCLASS_ABSOLUTE_POS_Y); proto[i].AddParam(VARDATA_FLOAT,PARCLASS_ABSOLUTE_POS_X); @@ -181,7 +181,7 @@ static void load_protos() { // If these are rearranged, keep rect clip and vector clip adjacent in this order // \clip(,,,) i++; - proto[i].name = L"\\clip"; + proto[i].name = "\\clip"; proto[i].AddParam(VARDATA_INT,PARCLASS_ABSOLUTE_POS_X); proto[i].AddParam(VARDATA_INT,PARCLASS_ABSOLUTE_POS_Y); proto[i].AddParam(VARDATA_INT,PARCLASS_ABSOLUTE_POS_X); @@ -189,13 +189,13 @@ static void load_protos() { // \clip([,]) i++; - proto[i].name = L"\\clip"; + proto[i].name = "\\clip"; proto[i].AddParam(VARDATA_INT,PARCLASS_NORMAL,OPTIONAL_2); proto[i].AddParam(VARDATA_TEXT,PARCLASS_DRAWING); // \iclip(,,,) i++; - proto[i].name = L"\\iclip"; + proto[i].name = "\\iclip"; proto[i].AddParam(VARDATA_INT,PARCLASS_ABSOLUTE_POS_X); proto[i].AddParam(VARDATA_INT,PARCLASS_ABSOLUTE_POS_Y); proto[i].AddParam(VARDATA_INT,PARCLASS_ABSOLUTE_POS_X); @@ -203,71 +203,71 @@ static void load_protos() { // \iclip([,]) i++; - proto[i].name = L"\\iclip"; + proto[i].name = "\\iclip"; proto[i].AddParam(VARDATA_INT,PARCLASS_NORMAL,OPTIONAL_2); proto[i].AddParam(VARDATA_TEXT,PARCLASS_DRAWING); - proto[++i].Set(L"\\fscx", VARDATA_FLOAT,PARCLASS_RELATIVE_SIZE_X); // \fscx - proto[++i].Set(L"\\fscy", VARDATA_FLOAT,PARCLASS_RELATIVE_SIZE_Y); // \fscy + proto[++i].Set("\\fscx", VARDATA_FLOAT,PARCLASS_RELATIVE_SIZE_X); // \fscx + proto[++i].Set("\\fscy", VARDATA_FLOAT,PARCLASS_RELATIVE_SIZE_Y); // \fscy // \pos(,) i++; - proto[i].name = L"\\pos"; + proto[i].name = "\\pos"; proto[i].AddParam(VARDATA_FLOAT,PARCLASS_ABSOLUTE_POS_X); proto[i].AddParam(VARDATA_FLOAT,PARCLASS_ABSOLUTE_POS_Y); // \org(,) i++; - proto[i].name = L"\\org"; + proto[i].name = "\\org"; proto[i].AddParam(VARDATA_INT,PARCLASS_ABSOLUTE_POS_X); proto[i].AddParam(VARDATA_INT,PARCLASS_ABSOLUTE_POS_Y); - proto[++i].Set(L"\\pbo", VARDATA_INT,PARCLASS_ABSOLUTE_POS_Y); // \pbo + proto[++i].Set("\\pbo", VARDATA_INT,PARCLASS_ABSOLUTE_POS_Y); // \pbo // \fad(,) i++; - proto[i].name = L"\\fad"; + proto[i].name = "\\fad"; proto[i].AddParam(VARDATA_INT,PARCLASS_RELATIVE_TIME_START); proto[i].AddParam(VARDATA_INT,PARCLASS_RELATIVE_TIME_END); - proto[++i].Set(L"\\fsp", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \fsp - proto[++i].Set(L"\\frx", VARDATA_FLOAT); // \frx - proto[++i].Set(L"\\fry", VARDATA_FLOAT); // \fry - proto[++i].Set(L"\\frz", VARDATA_FLOAT); // \frz - proto[++i].Set(L"\\fr", VARDATA_FLOAT); // \fr - proto[++i].Set(L"\\fax", VARDATA_FLOAT); // \fax - proto[++i].Set(L"\\fay", VARDATA_FLOAT); // \fay - proto[++i].Set(L"\\1c", VARDATA_TEXT); // \1c&H& - proto[++i].Set(L"\\2c", VARDATA_TEXT); // \2c&H& - proto[++i].Set(L"\\3c", VARDATA_TEXT); // \3c&H& - proto[++i].Set(L"\\4c", VARDATA_TEXT); // \4c&H& - proto[++i].Set(L"\\1a", VARDATA_TEXT); // \1a&H& - proto[++i].Set(L"\\2a", VARDATA_TEXT); // \2a&H& - proto[++i].Set(L"\\3a", VARDATA_TEXT); // \3a&H& - proto[++i].Set(L"\\4a", VARDATA_TEXT); // \4a&H& - proto[++i].Set(L"\\fe", VARDATA_TEXT); // \fe - proto[++i].Set(L"\\ko", VARDATA_INT,PARCLASS_KARAOKE); // \ko - proto[++i].Set(L"\\kf", VARDATA_INT,PARCLASS_KARAOKE); // \kf - proto[++i].Set(L"\\be", VARDATA_INT); // \be - proto[++i].Set(L"\\blur", VARDATA_FLOAT); // \blur - proto[++i].Set(L"\\fn", VARDATA_TEXT); // \fn - proto[++i].Set(L"\\fs+", VARDATA_FLOAT); // \fs+ - proto[++i].Set(L"\\fs-", VARDATA_FLOAT); // \fs- - proto[++i].Set(L"\\fs", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \fs - proto[++i].Set(L"\\an", VARDATA_INT); // \an - proto[++i].Set(L"\\c", VARDATA_TEXT); // \c&H& - proto[++i].Set(L"\\b", VARDATA_INT); // \b<0/1/weight> - proto[++i].Set(L"\\i", VARDATA_BOOL); // \i<0/1> - proto[++i].Set(L"\\u", VARDATA_BOOL); // \u<0/1> - proto[++i].Set(L"\\s", VARDATA_BOOL); // \s<0/1> - proto[++i].Set(L"\\a", VARDATA_INT); // \a - proto[++i].Set(L"\\k", VARDATA_INT,PARCLASS_KARAOKE); // \k - proto[++i].Set(L"\\K", VARDATA_INT,PARCLASS_KARAOKE); // \K - proto[++i].Set(L"\\q", VARDATA_INT); // \q<0-3> - proto[++i].Set(L"\\p", VARDATA_INT); // \p - proto[++i].Set(L"\\r", VARDATA_TEXT); // \r[] + proto[++i].Set("\\fsp", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \fsp + proto[++i].Set("\\frx", VARDATA_FLOAT); // \frx + proto[++i].Set("\\fry", VARDATA_FLOAT); // \fry + proto[++i].Set("\\frz", VARDATA_FLOAT); // \frz + proto[++i].Set("\\fr", VARDATA_FLOAT); // \fr + proto[++i].Set("\\fax", VARDATA_FLOAT); // \fax + proto[++i].Set("\\fay", VARDATA_FLOAT); // \fay + proto[++i].Set("\\1c", VARDATA_TEXT); // \1c&H& + proto[++i].Set("\\2c", VARDATA_TEXT); // \2c&H& + proto[++i].Set("\\3c", VARDATA_TEXT); // \3c&H& + proto[++i].Set("\\4c", VARDATA_TEXT); // \4c&H& + proto[++i].Set("\\1a", VARDATA_TEXT); // \1a&H& + proto[++i].Set("\\2a", VARDATA_TEXT); // \2a&H& + proto[++i].Set("\\3a", VARDATA_TEXT); // \3a&H& + proto[++i].Set("\\4a", VARDATA_TEXT); // \4a&H& + proto[++i].Set("\\fe", VARDATA_TEXT); // \fe + proto[++i].Set("\\ko", VARDATA_INT,PARCLASS_KARAOKE); // \ko + proto[++i].Set("\\kf", VARDATA_INT,PARCLASS_KARAOKE); // \kf + proto[++i].Set("\\be", VARDATA_INT); // \be + proto[++i].Set("\\blur", VARDATA_FLOAT); // \blur + proto[++i].Set("\\fn", VARDATA_TEXT); // \fn + proto[++i].Set("\\fs+", VARDATA_FLOAT); // \fs+ + proto[++i].Set("\\fs-", VARDATA_FLOAT); // \fs- + proto[++i].Set("\\fs", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \fs + proto[++i].Set("\\an", VARDATA_INT); // \an + proto[++i].Set("\\c", VARDATA_TEXT); // \c&H& + proto[++i].Set("\\b", VARDATA_INT); // \b<0/1/weight> + proto[++i].Set("\\i", VARDATA_BOOL); // \i<0/1> + proto[++i].Set("\\u", VARDATA_BOOL); // \u<0/1> + proto[++i].Set("\\s", VARDATA_BOOL); // \s<0/1> + proto[++i].Set("\\a", VARDATA_INT); // \a + proto[++i].Set("\\k", VARDATA_INT,PARCLASS_KARAOKE); // \k + proto[++i].Set("\\K", VARDATA_INT,PARCLASS_KARAOKE); // \K + proto[++i].Set("\\q", VARDATA_INT); // \q<0-3> + proto[++i].Set("\\p", VARDATA_INT); // \p + proto[++i].Set("\\r", VARDATA_TEXT); // \r[] // \t([,,][,]