… | |
… | |
51 | #include <uudeview.h> |
51 | #include <uudeview.h> |
52 | #include <uuint.h> |
52 | #include <uuint.h> |
53 | #include <fptools.h> |
53 | #include <fptools.h> |
54 | #include <uustring.h> |
54 | #include <uustring.h> |
55 | |
55 | |
56 | char * uucheck_id = "$Id: uucheck.c,v 1.14 2007/03/25 00:18:07 root Exp $"; |
56 | char * uucheck_id = "$Id: uucheck.c,v 1.15 2008/10/10 16:54:45 root Exp $"; |
57 | |
57 | |
58 | /* |
58 | /* |
59 | * Arbitrary number. This is the maximum number of part numbers we |
59 | * Arbitrary number. This is the maximum number of part numbers we |
60 | * store for our have-parts and missing-parts lists |
60 | * store for our have-parts and missing-parts lists |
61 | */ |
61 | */ |
… | |
… | |
751 | if (uu_dumbness <= 1) |
751 | if (uu_dumbness <= 1) |
752 | result->subfname = UUGetFileName (data->subject, where, whend); |
752 | result->subfname = UUGetFileName (data->subject, where, whend); |
753 | else |
753 | else |
754 | result->subfname = NULL; |
754 | result->subfname = NULL; |
755 | |
755 | |
|
|
756 | result->yefilesize = data->yefilesize; |
756 | result->mimeid = _FP_strdup (data->mimeid); |
757 | result->mimeid = _FP_strdup (data->mimeid); |
757 | result->mimetype = _FP_strdup (data->mimetype); |
758 | result->mimetype = _FP_strdup (data->mimetype); |
758 | |
759 | |
759 | if (result->partno == -1 && |
760 | if (result->partno == -1 && |
760 | (data->uudet == PT_ENCODED || data->uudet == QP_ENCODED)) |
761 | (data->uudet == PT_ENCODED || data->uudet == QP_ENCODED)) |
761 | result->partno = 1; |
762 | result->partno = 1; |
762 | |
763 | |
… | |
… | |
1001 | * (a) Not both parts have a begin line |
1002 | * (a) Not both parts have a begin line |
1002 | * (b) Not both parts have an end line |
1003 | * (b) Not both parts have an end line |
1003 | * (c) Both parts don't have different MIME-IDs |
1004 | * (c) Both parts don't have different MIME-IDs |
1004 | * (d) Both parts don't encode different files |
1005 | * (d) Both parts don't encode different files |
1005 | * (e) The other part wants to stay alone (FL_SINGLE) |
1006 | * (e) The other part wants to stay alone (FL_SINGLE) |
|
|
1007 | * (g) The yencode file size matches. |
1006 | */ |
1008 | */ |
1007 | |
1009 | |
1008 | /* |
1010 | /* |
1009 | * check if this part wants to be left alone. If so, don't bother |
1011 | * check if this part wants to be left alone. If so, don't bother |
1010 | * to do all the checks |
1012 | * to do all the checks |
… | |
… | |
1012 | |
1014 | |
1013 | while (iter) { |
1015 | while (iter) { |
1014 | if (data->data->flags & FL_SINGLE) { |
1016 | if (data->data->flags & FL_SINGLE) { |
1015 | /* this space intentionally left blank */ |
1017 | /* this space intentionally left blank */ |
1016 | } |
1018 | } |
1017 | else if ((data->mimeid && iter->mimeid && |
1019 | else if ((data->mimeid && iter->mimeid && strcmp (data->mimeid, iter->mimeid) == 0) |
1018 | strcmp (data->mimeid, iter->mimeid) == 0) || |
1020 | || |
1019 | (_FP_stricmp (data->subfname, iter->subfname) == 0 && |
1021 | (_FP_stricmp (data->subfname, iter->subfname) == 0 |
|
|
1022 | && !(iter->thisfile && iter->thisfile->yefilesize != data->yefilesize) |
1020 | !(iter->begin && data->data->begin) && |
1023 | && !(iter->begin && data->data->begin) |
1021 | !(iter->end && data->data->end) && |
1024 | && !(iter->end && data->data->end) |
1022 | !(data->mimeid && iter->mimeid && |
1025 | && !(data->mimeid && iter->mimeid && strcmp (data->mimeid, iter->mimeid) != 0) |
1023 | strcmp (data->mimeid, iter->mimeid) != 0) && |
1026 | && !(data->filename && iter->filename && strcmp (data->filename, iter->filename) != 0) |
1024 | !(data->filename && iter->filename && |
|
|
1025 | strcmp (data->filename, iter->filename) != 0) && |
|
|
1026 | !(iter->flags & FL_SINGLE))) { |
1027 | && !(iter->flags & FL_SINGLE))) { |
1027 | |
1028 | |
1028 | /* |
1029 | /* |
1029 | * Don't insert a part that is already there. |
1030 | * Don't insert a part that is already there. |
1030 | * |
1031 | * |
1031 | * Also don't add a part beyond the "end" marker (unless we |
1032 | * Also don't add a part beyond the "end" marker (unless we |