// -*- C++ -*-
/* This file is part of
- * ======================================================
+ * ======================================================
*
* LyX, The Document Processor
*
* Copyright 1995 Matthias Ettrich
* Copyright 1995-1999 The LyX Team.
*
- * ======================================================*/
+ * ====================================================== */
#include <config.h>
}
}
if (fd_form_toc->browser_toc->visible) {
- TocUpdateCB(0,0);
+ TocUpdateCB(0, 0);
}
#ifdef ALWAYS_UPDATE_REF
// Ideally, the RefUpdateCB should be modified so that if the
// of course a compromise and an annoyance for users switching
// between separate documents. ARRae 241198
if (fd_form_ref->form_ref->visible) {
- RefUpdateCB(0,0);
+ RefUpdateCB(0, 0);
}
#endif
if (current_view->buffer()->isReadonly()) {
const char* flyx_shortcut_extract(const char*sc)
{
// Find '|' in the sc and return the string after that.
- register const char *sd = sc;
- while(sd[0]!=0 && sd[0] != '|') sd++;
+ register char const *sd = sc;
+ while(sd[0]!= 0 && sd[0] != '|') sd++;
- if (sd[0]=='|') {
+ if (sd[0] == '|') {
sd++;
//lyxerr << sd << endl;
return sd;
}
// Extract identifier from <ident>|<shortcut> string
-const char* flyx_ident_extract(const char *sc)
+const char* flyx_ident_extract(char const *sc)
{
- register const char *se = sc;
- while(se[0]!=0 && se[0] != '|') se++;
+ register char const *se = sc;
+ while(se[0]!= 0 && se[0] != '|') se++;
- if (se[0]==0) return sc;
+ if (se[0] == 0) return sc;
char * sb = new char[se-sc + 1];
int index = 0;
- register const char *sd = sc;
+ register char const *sd = sc;
while (sd != se) {
sb[index] = sd[0];
index++; sd++;
}
- sb[index]=0;
+ sb[index] = 0;
return sb;
}
// Asks for a text
string askForText(string const & msg, string const & dflt)
{
- string tmp;
+ const char * tmp;
fl_set_resource("flInput.cancel.label", idex(_("Cancel|^[")));
fl_set_resource("flInput.ok.label", idex(_("OK|#O")));
fl_set_resource("flInput.clear.label", idex(_("Clear|#e")));
tmp = fl_show_input(msg.c_str(), dflt.c_str());
- return tmp;
+ if (tmp != 0)
+ return tmp;
+ else
+ return string();
}
// Inform the user that the buffer is read-only, and that changes in the