Fix for latinXX codepages, EditExportText fix.

This commit is contained in:
Alexander S. Aganichev 2000-05-23 17:54:09 +00:00
parent dd6801476f
commit e0d61b7139
3 changed files with 13 additions and 12 deletions

View File

@ -12,6 +12,9 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.4.5, May XX 2000
______________________________________________________________________
- EditExportText now saves whole the message to file, this is more
predictable behaviour than before.
- Fixed incorrect lines chain after insertion from file/clipboard.
- Function that builds full pathname bit adjusted for non-UNIX

View File

@ -163,9 +163,10 @@ char* mime_header_encode(char* dest, const char* source, GMsg* msg) {
if(not inmime) {
if(msg->charset) {
bp = stpcpy(bp, "=?");
if(strneql(msg->charset, "latin-", 6)) {
if(strneql(msg->charset, "latin", 5)) {
static const char *isono[] = { "15", "1", "2", "3", "4", "9", "10", "13", "14", "15" };
int chsno = atoi(msg->charset+6);
int chsno = atoi(msg->charset+5);
if(chsno < 0) chsno = -chsno; // support for both latin-1 and latin1
chsno = chsno > sizeof(isono)/sizeof(const char *) ? 0 : chsno;
bp = strxmerge(bp, 12, "iso-8859-", isono[chsno]);
}

View File

@ -1227,8 +1227,8 @@ void IEclass::editexport(Line* __exportline, int __endat) {
fputc('\n', _fp);
while((__endat ? __exportline != currline : 1) and __exportline) {
fputs(__exportline->txt.c_str(), _fp);
if(__exportline->txt.find('\n') != __exportline->txt.npos)
fwrite(__exportline->txt.c_str(), 1, __exportline->txt.length(), _fp);
if(__exportline->txt.find('\n') == __exportline->txt.npos)
fputc('\n', _fp);
__exportline = __exportline->next;
}
@ -1270,15 +1270,12 @@ void IEclass::ExportText() {
GFTRK("EditExportText");
int endat = NO;
Line* exportline = Edit__pastebuf;
// Line* exportline = findanchor();
if(not exportline) {
exportline = findanchor();
if(exportline)
endat = YES;
else
exportline = findfirstline();
}
// if(exportline)
// endat = YES;
// else
Line* exportline = findfirstline();
editexport(exportline, endat);