small fixes

This commit is contained in:
Alexander S. Aganichev
2002-06-14 06:46:39 +00:00
parent 87b1a01de7
commit 43d19f3954
5 changed files with 28 additions and 11 deletions

View File

@@ -1285,8 +1285,6 @@ void IEclass::Newline() {
// wrapped
Undo->PushItem(EDIT_UNDO_WRAP_TEXT|BATCH_MODE, currline->prev, _quotelen, _splitbuf.length() - _quotelen);
setlinetype(currline);
}
else {
currline = currline->next;
@@ -1295,6 +1293,7 @@ void IEclass::Newline() {
Undo->PushItem(EDIT_UNDO_WRAP_TEXT|BATCH_MODE, currline->prev, _quotelen1, _splitbuf.length() - _quotelen1);
}
setlinetype(currline);
// Move down the cursor
col = 0;

View File

@@ -29,9 +29,13 @@
// ------------------------------------------------------------------
char* GetRandomLine(char* __buf, size_t __bufsize, const char* __file) {
char* GetRandomLine(char* __buf, size_t __bufsize, const char* file) {
Path indexfile;
Path __file;
strxcpy(__file, file, sizeof(Path));
strschg_environ(__file);
replaceextension(indexfile, __file, ".sdx");

View File

@@ -512,6 +512,7 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
(mode != MODE_WRITEHEADER) and
(mode != MODE_WRITE) and
(mode != MODE_HEADER)))) {
indexfile[0] = '\0';
strtrim(ptr);
ptr = strskip_wht(strskip_txt(ptr));
if(*ptr) {
@@ -536,7 +537,9 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
strcpy(textfile, "random.txt");
}
replaceextension(indexfile, textfile, ".mdx");
if(indexfile[0] == '\0') {
replaceextension(indexfile, textfile, ".mdx");
}
MakePathname(textfile, CFG->cookiepath, textfile);
MakePathname(indexfile, CFG->cookiepath, indexfile);