#include "support/syscall.h"
#include "gettext.h"
+using std::endl;
+
/* Prototypes */
bool sendfax(string const &fname, string const &sendcmd);
/* init Phone-Book */
string phone_book_name;
- if (lyxrc->phone_book.empty()) {
+ if (lyxrc.phone_book.empty()) {
phone_book_name = "phonebook";
} else
- phone_book_name = lyxrc->phone_book;
+ phone_book_name = lyxrc.phone_book;
phone_book= FileSearch(user_lyxdir, phone_book_name);
if (phone_book.empty())
phone_book = AddName(user_lyxdir, phone_book_name);
char *buf = new char [strlen(line)+1];
strcpy(buf, line);
- for(i = LEN_PHONE;(i>0) && (buf[i] == ' ');i--)
+ for(i = LEN_PHONE; (i > 0) && (buf[i] == ' '); --i)
;
- buf[i+1] = 0;
- for(i = LEN_PHONE+LEN_NAME+1;(i>LEN_PHONE) && (buf[i] == ' ');i--)
+ buf[i + 1] = 0;
+ for(i = LEN_PHONE + LEN_NAME + 1; (i > LEN_PHONE) && (buf[i] == ' '); --i)
;
- buf[i+1] = 0;
+ buf[i + 1] = 0;
fl_set_input(fd_xsendfax->Input_Phone, buf);
fl_set_input(fd_xsendfax->Input_Name, buf+LEN_PHONE+1);
fl_set_input(fd_xsendfax->Input_Enterprise, buf+LEN_PHONE+LEN_NAME+2);
if (!strlen(phone))
return;
- char *buf = new char [50+strlen(enterprise)];
+ char * buf = new char [50 + strlen(enterprise)];
sprintf(buf, "%-*.*s %-*.*s %s",
LEN_PHONE, LEN_PHONE, phone,
n = 0;
}
}
- for(i = 1; i <= n; i++) {
+ for(i = 1; i <= n; ++i) {
line = fl_get_browser_line(fd_phonebook->browser, i);
if (!strncmp(buf, line, 46))
break;
n = 0;
}
}
- for(i= 1;i<= n;i++) {
+ for(i = 1; i <= n; ++i) {
line = fl_get_browser_line(fd_phonebook->browser, i);
if (!strncmp(buf, line, 46))
break;
n = 0;
}
}
- for(i= 1;i<= n;i++) {
+ for(i = 1; i <= n; ++i) {
line = fl_get_browser_line(fd_phonebook->browser, i);
fprintf(fp, "%s\n", line);
}