Fixed UUE multisection decoding
This commit is contained in:
parent
67194e2060
commit
5ed68936ee
@ -10,6 +10,12 @@ _____________________________________________________________________________
|
||||
‡ ¬¥âª¨ ¤«ï GoldED+ 1.1.5, /snapshot/
|
||||
_____________________________________________________________________________
|
||||
|
||||
- uudecoder: ⥯¥àì ¡ã¤¥â ¯à®¨£®à¨à®¢ ® ¢á¥ ¯®á«¥ áâப ¯® ¬ ᪥
|
||||
"sum -r/size [0-9]+/[0-9]+ section.*" ¨«¨ "section [0-9]+ end.*"
|
||||
! § 票¥ ¯® 㬮«ç ¨î ¤«ï UseTZUTC ¨§¬¥¥® "yes".
|
||||
|
||||
‘ ¯è®â ®â 16 ®ï¡àï 2006.
|
||||
|
||||
+ ’¥¯¥àì ª§è¨àã¥âáï ¯®á«¥¤¨© ®âªàëâë© âàí¤, çâ® á¨«ì® ¯®¢ëᨫ® ᪮à®áâì
|
||||
¯®¢â®à®£® ¥£® ®âªàëâ¨ï. Žá®¡¥® íâ® § ¬¥â® READGotoThNextUnread.
|
||||
+ Š®£¤ á®®¡é¥¨¥ ¯¥à¥¬¥é ¥âáï ¨§ ª®à§¨ë, â® ¢ë¡¨à ¥âáï ¯® 㬮«ç ¨î à¨ï
|
||||
|
@ -10,6 +10,9 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
- uudecoder: now are skipped all lines which follows lines with mask
|
||||
"sum -r/size [0-9]+/[0-9]+ section.*" or "section [0-9]+ end.*"
|
||||
|
||||
! UseTZUTC default value changed from "no" to "yes".
|
||||
|
||||
= Snapshot for the Nov 16, 2006.
|
||||
|
@ -54,6 +54,7 @@
|
||||
#include <gdefs.h>
|
||||
#include <gctype.h>
|
||||
#include <gcrcall.h>
|
||||
#include <gregex.h>
|
||||
#include <uudeview.h>
|
||||
#include <uuint.h>
|
||||
#include <fptools.h>
|
||||
@ -942,6 +943,10 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
|
||||
*state = BEGIN;
|
||||
}
|
||||
|
||||
gregex regexp1, regexp2;
|
||||
regexp1.compile("sum -r/size [0-9]+/[0-9]+ section.*", gregex::extended | gregex::icase);
|
||||
regexp2.compile("section [0-9]+ end.*", gregex::extended | gregex::icase);
|
||||
|
||||
bool endsection = false;
|
||||
|
||||
while (!feof(datain) && (*state != DONE) &&
|
||||
@ -959,7 +964,7 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
|
||||
return UURET_IOERR;
|
||||
}
|
||||
|
||||
if ((method == UU_ENCODED) && !strncmp(line, "sum -r/size ", 12))
|
||||
if ((method == UU_ENCODED) && (regexp1.match(line) || regexp2.match(line)))
|
||||
{
|
||||
endsection = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user