File flabc-fltk.patch of Package flabc
diff -up flabc-1.0.12/src/dialogs.cpp.orig flabc-1.0.12/src/dialogs.cpp
--- flabc-1.0.12/src/dialogs.cpp.orig 2013-05-22 15:44:10.000000000 +0200
+++ flabc-1.0.12/src/dialogs.cpp 2013-05-22 15:57:29.625400527 +0200
@@ -229,7 +229,7 @@ void OptionsLook::style2gui(Fl_Button* c
else italic->value(false);
}
-// copies GUI widget values into config setting
+// copies GUI widget values into config setting
void OptionsLook::gui2style(Fl_Button* color,
Fl_Check_Button* bold, Fl_Check_Button* italic,
Fl_Text_Display::Style_Table_Entry* stylent,
@@ -489,7 +489,7 @@ AbcFormatList::AbcFormatList(MainWin* mw
// load format parameters into browser
// the optional second argument is a NULL terminated list of filter
// strings; when provided only matching parameters are loaded
-void AbcFormatList::load_data(const char* abctab2psoutput,
+void AbcFormatList::load_data(const char* abctab2psoutput,
char** filter /* = NULL */) {
char* formats = strdup(abctab2psoutput);
char* format;
@@ -701,7 +701,7 @@ MidiList::MidiList(MainWin* mw) : MidiLi
void MidiList::filter_out(int* tohidelist) {
int i;
int* chide; // current number to hide
-
+
browser->deselect();
i = 1; // current number in browser
for (chide = tohidelist; *chide > -1; chide++) {
@@ -786,8 +786,8 @@ CommandOutput::CommandOutput(MainWin* mw
// skipbegin must contain the first skipped line number and
// skiplines the number of skipped lines so that nexterror later
// returns the correct line numbers
-void CommandOutput::load_data(const char* output, const char* cmd,
- int skipbegin /* = 0 */,
+void CommandOutput::load_data(const char* output, const char* cmd,
+ int skipbegin /* = 0 */,
int skiplines /* = 0 */)
{
char* lines = strdup(output);
@@ -805,7 +805,7 @@ void CommandOutput::load_data(const char
free(lines);
}
-// returns index of next error line in the browser or 0 when no
+// returns index of next error line in the browser or 0 when no
// further error is found. line and col are filled with the line and column
// number in the abc source file. When line or col are not given, they are
// set to -1
@@ -954,7 +954,7 @@ void HelpAbout::buttonlicense_cb()
textfile = find_file(mainwin->config->docdirs.c_str(), basename, ";");
if (textfile == "") {
- string msg = "Could not find '" + (string)basename +
+ string msg = "Could not find '" + (string)basename +
"' in directories\n'" + mainwin->config->docdirs + "'";
message_box(msg.c_str());
return;
@@ -1096,7 +1096,7 @@ int TemplatePicker::get_template(string*
*rcfile = "";
window->show();
while (buttonpressed == -1) Fl::wait();
- if (buttonpressed == 0)
+ if (buttonpressed == 0)
return 0;
if (browser->value())
@@ -1121,7 +1121,7 @@ FontPicker::FontPicker(int nfonts)
// fill display text with all characters
for (c = ' '+1; c < 127; c++) {
- if (!(c&0x1f)) displaytext[i++]='\n';
+ if (!(c&0x1f)) displaytext[i++]='\n';
if (c=='@') displaytext[i++]=c;
displaytext[i++]=c;
}
@@ -1144,7 +1144,7 @@ FontPicker::FontPicker(int nfonts)
if (t) {
if (t & FL_BOLD) namestr = "@b" + namestr;
if (t & FL_ITALIC) namestr = "@i" + namestr;
- }
+ }
fontbrowser->add(namestr.c_str());
// check whether font is proportional or monospaced
fl_font((Fl_Font)i, 12);
@@ -1164,7 +1164,7 @@ FontPicker::FontPicker(int nfonts)
FontPicker::~FontPicker() {}
// actualize text display when font changed
-void FontPicker::fontbrowser_cb()
+void FontPicker::fontbrowser_cb()
{
int i;
Fl_Font f;
@@ -1219,7 +1219,7 @@ int FontPicker::get_monospaced_font(stri
buttonpressed = -1;
window->show();
while (buttonpressed == -1) Fl::wait();
- if (buttonpressed == 0)
+ if (buttonpressed == 0)
return 0;
if (fontbrowser->value()) {
diff -up flabc-1.0.12/src/flabc.cpp.orig flabc-1.0.12/src/flabc.cpp
--- flabc-1.0.12/src/flabc.cpp.orig 2013-05-22 15:44:10.000000000 +0200
+++ flabc-1.0.12/src/flabc.cpp 2013-05-22 15:52:24.583815566 +0200
@@ -54,7 +54,7 @@ int cb_next_window(int event) {
if (!(fw = Fl::first_window())) return 1;
if (!(fw = Fl::next_window(fw))) return 1;
// fw now contains the window that shall get the focus
- // before showing it, we must get the window stack in right order
+ // before showing it, we must get the window stack in right order
// (current first_window must move to bottom)
nw = fw;
do {
@@ -138,7 +138,7 @@ int main(int argc, char** argv)
if (Fl::h() < mainwin->window->h() + 50)
mainwin->window->size(mainwin->window->w(), Fl::h() - 50);
// show window screen centered
- mainwin->window->position((Fl::w() - mainwin->window->w())/2,
+ mainwin->window->position((Fl::w() - mainwin->window->w())/2,
(Fl::h() - mainwin->window->h())/2);
#ifdef __APPLE__
diff -up flabc-1.0.12/src/fltkextensions.cpp.orig flabc-1.0.12/src/fltkextensions.cpp
--- flabc-1.0.12/src/fltkextensions.cpp.orig 2013-05-22 15:44:10.000000000 +0200
+++ flabc-1.0.12/src/fltkextensions.cpp 2013-05-22 15:53:22.959161932 +0200
@@ -181,7 +181,7 @@ static void kill_selection(Fl_Text_Edito
}
custom_Fl_Text_Editor::custom_Fl_Text_Editor(int X, int Y, int W, int H, const char* l) :
- Fl_Text_Editor(X,Y,W,H,l)
+ Fl_Text_Editor(X,Y,W,H,l)
{
deadkeystate = 0;
deadkeycolor = fl_rgb_color('\xff','\xcc','\x55');
@@ -203,7 +203,7 @@ int custom_Fl_Text_Editor::handle(int ev
if (key == '\x5e' && !Fl::event_state(FL_SHIFT)) {
to_insert = '^';
rc = 1;
- }
+ }
// tilde
else if (Fl::event_state(FL_ALT) && key == '\x6e') {
to_insert = '~';
@@ -249,7 +249,7 @@ int custom_Fl_Text_Editor::handle(int ev
// second part of compose character: mark pending accent for deletion
buffer()->select(insert_position()-del, insert_position());
} else if (deadkeystate) {
- // remove highlighting from first part of compose character
+ // remove highlighting from first part of compose character
buffer()->unselect();
}
kill_selection(this);
@@ -295,7 +295,7 @@ int custom_Fl_Text_Editor::handle_old(in
if (key == '\x5e' && !Fl::event_state(FL_SHIFT)) {
to_insert = '^';
rc = 1;
- }
+ }
// tilde
else if (Fl::event_state(FL_ALT) && key == '\x6e') {
to_insert = '~';
@@ -329,13 +329,13 @@ int custom_Fl_Text_Editor::handle_old(in
void macroman_to_latin1(char* text)
{
static uchar roman2latin[128] = {
- 0xc4, 0xc5, 0xc7, 0xc9, 0xd1,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a1, 0xac, 0xbf, 0x83, 0xbf, 0xbf, 0xab, 0xbb, 0x85, 0xa0, 0xc0, 0xc3, 0xd5, 0x8c, 0x9c,
+ 0x96, 0x97, 0x93, 0x94, 0x91, 0x92, 0xf7, 0xbf, 0xff, 0x9f, 0xbf, 0x80, 0x8b, 0x9b, 0xbf, 0xbf,
+ 0x87, 0xb7, 0x82, 0x84, 0x89, 0xc2, 0xca, 0xc1, 0xcb, 0xc8, 0xcd, 0xce, 0xcf, 0xcc, 0xd3, 0xd4,
0xbf, 0xd2, 0xda, 0xdb, 0xd9, 0xbf, 0x88, 0x98, 0xaf, 0xbf, 0xbf, 0xbf, 0xb8, 0xbf, 0xbf, 0xbf
};
char* p;
@@ -351,13 +351,13 @@ void macroman_to_latin1(char* text)
void latin1_to_macroman(char* text)
{
static uchar latin2roman[128] = {
- 0xdb, 0xc0, 0xe2, 0xc4, 0xe3, 0xc9, 0xa0, 0xe0, 0xf6, 0xe4, 0xc0, 0xdc, 0xce, 0xc0, 0xc0, 0xc0,
- 0xc0, 0xd4, 0xd5, 0xd2, 0xd3, 0xa5, 0xd0, 0xd1, 0xf7, 0xaa, 0xc0, 0xdd, 0xcf, 0xc0, 0xc0, 0xd9,
- 0xca, 0xc1, 0xa2, 0xa3, 0xc0, 0xb4, 0xc0, 0xa4, 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0xc0, 0xa8, 0xf8,
- 0xa1, 0xb1, 0xc0, 0xc0, 0xab, 0xb5, 0xa6, 0xe1, 0xfc, 0xc0, 0xbc, 0xc8, 0xc0, 0xc0, 0xc0, 0xc0,
- 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec,
- 0xc0, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0xc0, 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0xc0, 0xc0, 0xa7,
- 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95,
+ 0xdb, 0xc0, 0xe2, 0xc4, 0xe3, 0xc9, 0xa0, 0xe0, 0xf6, 0xe4, 0xc0, 0xdc, 0xce, 0xc0, 0xc0, 0xc0,
+ 0xc0, 0xd4, 0xd5, 0xd2, 0xd3, 0xa5, 0xd0, 0xd1, 0xf7, 0xaa, 0xc0, 0xdd, 0xcf, 0xc0, 0xc0, 0xd9,
+ 0xca, 0xc1, 0xa2, 0xa3, 0xc0, 0xb4, 0xc0, 0xa4, 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0xc0, 0xa8, 0xf8,
+ 0xa1, 0xb1, 0xc0, 0xc0, 0xab, 0xb5, 0xa6, 0xe1, 0xfc, 0xc0, 0xbc, 0xc8, 0xc0, 0xc0, 0xc0, 0xc0,
+ 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec,
+ 0xc0, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0xc0, 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0xc0, 0xc0, 0xa7,
+ 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95,
0xc0, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0xc0, 0xc0, 0xd8
};
char* p;
diff -up flabc-1.0.12/src/mainwin.cpp.orig flabc-1.0.12/src/mainwin.cpp
--- flabc-1.0.12/src/mainwin.cpp.orig 2013-05-22 15:44:10.000000000 +0200
+++ flabc-1.0.12/src/mainwin.cpp 2013-05-22 15:56:14.065246323 +0200
@@ -269,7 +269,7 @@ void MainWin::goto_bar(int bar, string v
&& spos == textbuffer->line_start(spos))) {
message_box("No tune found.\nDid you forget the X: field?");
return;
- }
+ }
if (textbuffer->search_forward(0, bnumfirst, &pos, 1 /*matchCase*/)
&& pos == textbuffer->line_start(pos)
&& pos < spos) {
@@ -285,7 +285,7 @@ void MainWin::goto_bar(int bar, string v
// assumption: stylebuffer is correctly filled from SyntaxHighlighter
// possible states of variable "found":
// 0 = no special meaning
- // 1 = bar found at end of previous line
+ // 1 = bar found at end of previous line
// => increment of bar counter is pending until music found
// 2 = searched bar number found
found = 0;
@@ -356,7 +356,7 @@ void MainWin::goto_bar(int bar, string v
if (*p == 'A' && !strchr(" \t\r\n\\",*q)) {
found = 0; break;
}
- p++; q++; spos++;
+ p++; q++; spos++;
}
if (found == 0) {
cbar++; pos = spos;
@@ -445,7 +445,7 @@ int MainWin::save_current_tune(const cha
f = fopen(filename, "w");
if (!f) {
- string msg = "Cannot write to '" + (string)filename +
+ string msg = "Cannot write to '" + (string)filename +
"':\n" + (string)strerror(errno);
message_box(msg.c_str());
return 1;
@@ -618,7 +618,7 @@ void MainWin::cbmenu_file_save()
bool saveas = false;
if (exampleloaded) {
int rc;
- rc = choice_box("Marning: This will overwrite example file!",
+ rc = choice_box("Marning: This will overwrite example file!",
"Cancel", "Save as...", "Overwrite", "Saving Example");
if (rc == 0 || rc > 2) return;
else if (rc == 1) saveas = true;
@@ -790,10 +790,10 @@ void MainWin::cbmenu_search_replace()
replace_dialog->show();
// moval of mouse pointer into replace dialog no longer necessary
// because nonmodal dialogs have been fixed since fltk-1.1-svn-20061030
- //set_mouse_position(replace_dialog->window->x() +
+ //set_mouse_position(replace_dialog->window->x() +
// replace_dialog->search->x() +
// 3 * replace_dialog->search->w() / 4,
- // replace_dialog->window->y() +
+ // replace_dialog->window->y() +
// replace_dialog->search->y() +
// replace_dialog->search->h() / 2);
}
@@ -977,7 +977,7 @@ void MainWin::cbmenu_abc_previewtune()
}
if (!commandoutput_dialog)
commandoutput_dialog = new CommandOutput(this);
- commandoutput_dialog->load_data(result.c_str(),
+ commandoutput_dialog->load_data(result.c_str(),
"abctab2ps", skipbegin, skiplines);
if (rc || commandoutput_dialog->nexterror(&line, &col) > 0) {
commandoutput_dialog->show();
@@ -995,7 +995,7 @@ void MainWin::cbmenu_abc_previewtune()
msg += "with '" + config->psviewer + "'";
}
message_box(msg.c_str());
- }
+ }
}
void MainWin::cbmenu_abc_listentune()
@@ -1013,7 +1013,7 @@ void MainWin::cbmenu_abc_listentune()
}
if (!commandoutput_dialog)
commandoutput_dialog = new CommandOutput(this);
- commandoutput_dialog->load_data(result.c_str(),
+ commandoutput_dialog->load_data(result.c_str(),
"abc2midi", skipbegin, skiplines);
if (rc || commandoutput_dialog->nexterror(&line, &col) > 0) {
commandoutput_dialog->show();
@@ -1029,7 +1029,7 @@ void MainWin::cbmenu_abc_listentune()
msg += "with '" + config->midiplayer + "'";
}
message_box(msg.c_str());
- }
+ }
}
void MainWin::cbmenu_abc_marktune()
@@ -1092,10 +1092,10 @@ void MainWin::cbmenu_abc_fixupxrefs()
textbuffer->replace(pos+2,lineendpos,newxref);
} else { // allow gaps and non digit postfix
// look for appendix like in "X:2a"
- xpostfix = xval;
+ xpostfix = xval;
while (*xpostfix && (isdigit(*xpostfix) || isspace(*xpostfix)))
xpostfix++;
- if (thisx < lastx ||
+ if (thisx < lastx ||
(thisx == lastx && (!*xpostfix || lastpostfix > xpostfix))) {
thisx = lastx + 1;
sprintf(newxref,"%d",thisx);
@@ -1269,7 +1269,7 @@ void MainWin::cbmenu_help_usersguide()
userguide = find_file(config->docdirs.c_str(), basename, ";");
if (userguide == "") {
- string msg = "Could not find '" + (string)basename +
+ string msg = "Could not find '" + (string)basename +
"' in directories\n'" + config->docdirs + "'";
message_box(msg.c_str());
return;
@@ -1287,7 +1287,7 @@ void MainWin::cbmenu_help_manpage()
userguide = find_file(config->docdirs.c_str(), basename, ";");
if (userguide == "") {
- string msg = "Could not find '" + (string)basename +
+ string msg = "Could not find '" + (string)basename +
"' in directories\n'" + config->docdirs + "'";
message_box(msg.c_str());
return;
@@ -1305,7 +1305,7 @@ void MainWin::cbmenu_help_flabc()
userguide = find_file(config->docdirs.c_str(), basename, ";");
if (userguide == "") {
- string msg = "Could not find '" + (string)basename +
+ string msg = "Could not find '" + (string)basename +
"' in directories\n'" + config->docdirs + "'";
message_box(msg.c_str());
return;
@@ -1323,7 +1323,7 @@ void MainWin::cbmenu_help_flabcchanges()
textfile = find_file(config->docdirs.c_str(), basename, ";");
if (textfile == "") {
- string msg = "Could not find '" + (string)basename +
+ string msg = "Could not find '" + (string)basename +
"' in directories\n'" + config->docdirs + "'";
message_box(msg.c_str());
return;
@@ -1334,7 +1334,7 @@ void MainWin::cbmenu_help_flabcchanges()
textview_dialog->show();
} else {
string msg = "Error while reading '" + textfile + "'";
- message_box(msg.c_str());
+ message_box(msg.c_str());
}
}
diff -up flabc-1.0.12/src/os.cpp.orig flabc-1.0.12/src/os.cpp
--- flabc-1.0.12/src/os.cpp.orig 2013-05-22 15:44:10.000000000 +0200
+++ flabc-1.0.12/src/os.cpp 2013-05-22 16:03:07.117623687 +0200
@@ -52,7 +52,7 @@ int pipe_command(const char* command, st
startinfo.wShowWindow = SW_HIDE;
startinfo.hStdOutput = hpwrite;
startinfo.hStdError = hpwrite;
- if (!CreateProcess(NULL, (char*)command, NULL, NULL,
+ if (!CreateProcess(NULL, (char*)command, NULL, NULL,
TRUE /*inherit handles*/, 0, NULL, NULL,
&startinfo, &procinfo)) {
CloseHandle(hpread); CloseHandle(hpwrite);
@@ -139,10 +139,10 @@ int win32_open_file(const char* filename
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = "open";
ShExecInfo.lpFile = filecopy;
- ShExecInfo.lpParameters = NULL;
+ ShExecInfo.lpParameters = NULL;
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOWNORMAL;
- ShExecInfo.hInstApp = NULL;
+ ShExecInfo.hInstApp = NULL;
if (ShellExecuteEx(&ShExecInfo)) {
return 0;
} else {
@@ -208,7 +208,7 @@ int open_ps(const char* psfile, const ch
return win32_open_file(psfile, error);
//if (32 >= (long)ShellExecute(NULL, "open", psfile,
// NULL, NULL, SW_SHOWNORMAL)) return 1;
- //else return 0;
+ //else return 0;
#else
string command;
command = (string) psviewer + " '" + psfile + "' &";
@@ -230,7 +230,7 @@ int open_midi(const char* midifile, cons
return win32_open_file(midifile, error);
//if (32 >= (long)ShellExecute(NULL, "open", midifile,
// NULL, NULL, SW_SHOWNORMAL)) return 1;
- //else return 0;
+ //else return 0;
#else
command = (string) midiplayer + " '" + midifile + "' &";
#endif