aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-utils.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-10-31 00:58:53 +0800
committerDan Winship <danw@src.gnome.org>2000-10-31 00:58:53 +0800
commitabe39be1720a9ae3fd3402a5a8b777473319fbdb (patch)
tree1c421910915f0c083e8a7d51488af68564ef5342 /camel/camel-mime-utils.c
parent45915f89e2279d67b0bf29ce3126cd4dabd61f9f (diff)
downloadgsoc2013-evolution-abe39be1720a9ae3fd3402a5a8b777473319fbdb.tar.gz
gsoc2013-evolution-abe39be1720a9ae3fd3402a5a8b777473319fbdb.tar.zst
gsoc2013-evolution-abe39be1720a9ae3fd3402a5a8b777473319fbdb.zip
Take an additional argument, "break_lines", saying whether or not to add
* camel-mime-utils.c (base64_encode_step, base64_encode_close): Take an additional argument, "break_lines", saying whether or not to add '\n's to the output. * camel-multipart.c (set_boundary): * camel-mime-filter-basic.c (filter, complete): Update for base64 api change. svn path=/trunk/; revision=6271
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r--camel/camel-mime-utils.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 8b6194763d..cc5fa813dd 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -273,13 +273,13 @@ int main(int argc, char **argv)
/* call this when finished encoding everything, to
flush off the last little bit */
int
-base64_encode_close(unsigned char *in, int inlen, unsigned char *out, int *state, int *save)
+base64_encode_close(unsigned char *in, int inlen, gboolean break_lines, unsigned char *out, int *state, int *save)
{
int c1, c2;
unsigned char *outptr = out;
if (inlen>0)
- outptr += base64_encode_step(in, inlen, outptr, state, save);
+ outptr += base64_encode_step(in, inlen, break_lines, outptr, state, save);
c1 = ((char *)save)[1];
c2 = ((char *)save)[2];
@@ -297,7 +297,8 @@ base64_encode_close(unsigned char *in, int inlen, unsigned char *out, int *state
outptr += 4;
break;
}
- *outptr++ = '\n';
+ if (break_lines)
+ *outptr++ = '\n';
*save = 0;
*state = 0;
@@ -311,7 +312,7 @@ base64_encode_close(unsigned char *in, int inlen, unsigned char *out, int *state
0 on first invocation).
*/
int
-base64_encode_step(unsigned char *in, int len, unsigned char *out, int *state, int *save)
+base64_encode_step(unsigned char *in, int len, gboolean break_lines, unsigned char *out, int *state, int *save)
{
register unsigned char *inptr, *outptr;
@@ -348,7 +349,7 @@ base64_encode_step(unsigned char *in, int len, unsigned char *out, int *state, i
*outptr++ = base64_alphabet [ ( (c2 &0x0f) << 2 ) | (c3 >> 6) ];
*outptr++ = base64_alphabet [ c3 & 0x3f ];
/* this is a bit ugly ... */
- if ((++already)>=19) {
+ if (break_lines && (++already)>=19) {
*outptr++='\n';
already = 0;
}
it/x11/kdebase3?id=b51b253c1eb5352819047cf54e01fbd7500f988c'>Move <sys/types.h> higher up in the include list to fix build on current.alane2002-10-121-0/+18 * add warning about backported keramikalane2002-10-111-0/+7 * 1. Removed comments from pkg-plist files per will's request.alane2002-10-111-98/+0 * 1. Remove QT warning from kde3. It's been there long enough.alane2002-10-116-12/+120 * mi's patch to use gettext as BUILD_DEPEND. If there's a PR I don't havealane2002-09-211-1/+1 * Update to 3.0.3. Not much changed here: [1] i18n PKGNAMEs converted towill2002-08-253-41/+8 * Bump PORTREVISION. KDE is fragile enough in its dependencies; we don'talane2002-08-021-1/+1 * Chase shlib rev of devel/gettextade2002-08-021-1/+1 * Fixed obnoxious bug where a new ~/Desktop dir would be created with read-onlyalane2002-07-182-0/+23 * Update to 3.0.2 -- full log available in ports/x11/kde3/Makefile,v 1.51.will2002-07-053-4/+39 * Patch out the 'sshd' user from being shown (add to HiddenUsers).alane2002-06-291-1/+1 * Add smmsp (mail submitter) to list of hidden users in kdm.conf.alane2002-06-291-2/+11 * Fixed bad patch. Missed it when we moved to the rerolled tarball apparently.alane2002-06-271-5/+5 * Upgrade to KDE 3.0.1. The delay in this upgrade is mainly due to thewill2002-06-1615-516/+402 * Fix build on alpha.will2002-05-203-0/+53 * Fix missing %%MOTIF%% substitutions.petef2002-05-091-8/+8 * Update to 3.0. Sigh.will2002-04-231-0/+2527 * Oops, fix miscommit of patch.will2002-04-221-11/+11 * Fix kdm config file upon install.will2002-04-221-0/+11 * Please welcome Qt3/KDE3 to our ports tree. This includes work since thewill2002-04-2230-4244/+530 * gettext upgrade uber-patch (stage 3)ade2002-04-131-2/+2 * Fix the KDE ports to not use objprelink, if OSVERSION >= 500029. This iswill2002-03-301-2/+6 * Stage 1 of gettext update.ade2002-03-161-1/+1 * Make the "default" target failback on KDE if the user doesn't have apetef2002-03-032-3/+13 * Use ${ECHO_CMD} instead of ${ECHO} where you mean the echo command;knu2002-01-291-2/+2 * Bring in a few changes to the KDE ports infrastructure, and some fixes.will2002-01-111-15/+2 * If !WANT_KDE_NDEBUG and !PARALLEL_PACKAGE_BUILDING, also addwill2002-01-081-0/+3 * Fix problem where KDM doesn't cause the login records to be updated whenwill2002-01-062-6/+10 * Conditionalize use of objprelink based on whether we're running onwill2002-01-051-3/+8 * If not building WITH_MOTIF (required for Netscape plugins), don't try to loadpetef2001-12-251-0/+6 * - better kdmrc config file handling:petef2001-12-145-16/+45 * Fix a problem with auto{conf,make}: some build magic was introduced topetef2001-12-071-1/+1 * Upgrade KDE to 2.2.2:will2001-12-0417-32/+1423 * Remove stale files from share/config/kdm.olgeni2001-11-031-7/+1 * Bite the bullet and make kcheckpass setuid root by default so the lockwill2001-11-012-22/+2 * Upgrade to 2.2.1.demon2001-10-274-9/+175 * Fix pkg-plistkevlo2001-10-201-0/+3 * Set DIST_SUBDIR=KDEdemon2001-09-112-1/+2 * Add a message to the port/package warning users about kcheckpass'swill2001-09-042-1/+25 * Remove bogus file that I introduced in revision 1.40 (pointy hat).olgeni2001-09-021-1/+0 * Support the Motif-dependent files in pkg-plist, add some missing @dirrmolgeni2001-08-312-5/+49 * Make CATEGORIES and MAINTAINER overridable for japanese/kde*.knu2001-08-311-2/+2 * Reassign MAINTAINER to kde@FreeBSD.org, a group formed specifically towill2001-08-251-1/+1 * Argh! Get this plist right, for the last time...will2001-08-231-1/+0 * Remove the extra Worm.desktop screensaver entry. Leave only the screensaverolgeni2001-08-211-1/+0 * Add @exec/@unexec lines to pkg-plist, to handle the "emptydir" template.olgeni2001-08-201-0/+3 * Add a simple post-extract target: it overwrites ${WRKSRC}/mkpamserv with aolgeni2001-08-191-0/+4 * Disable kappfinder_install execution at install time. This will avoid theolgeni2001-08-192-28/+1 * Add forgotten emptydir which is required to create new directorieswill2001-08-182-0/+2 * *sigh* They changed the path to the tarballs again. This was verifiedwill2001-08-161-1/+1 * Update to KDE 2.2:will2001-08-156-1016/+753 * Remove three files:asami2001-08-121-3/+0 * Overhaul QT/KDE support:will2001-04-032-13/+4 * Thought I removed these PTHREAD_* things from the Makefile. FWIW, thewill2001-03-271-2/+2 * Bring in my fixes for KDE2 for users of XFree86 4.0.x. Basically, whatwill2001-03-251-34/+5 * Bring in my KDE 2.1 + X 4.0.2 + threads "fixes". WARNING: Doesn't quitewill2001-03-131-4/+34 * Fix plist. Kevin!!!! ;-)will2001-03-111-79/+0 * Disable OpenLDAP support by defaultkevlo2001-03-081-0/+1 * Fix pkg-plistkevlo2001-03-081-17/+89 * Fix build problem with kio_ldap where it was including <time.h> insteadwill2001-03-052-0/+109 * Attempt to fix conflicts with a local getopt.h (specifically, the fix iswill2001-03-051-1/+1 * Lo and behold, welcome KDE 2.1 to our ports tree. As a direct result ofwill2001-02-277-487/+718 * Style fixes for ports/x11.olgeni2001-02-061-1/+1 * Update to allow ksysguard to compile from KDE 2.0 using -CURRENTcokane2001-01-281-0/+80 * Upgrade to 2.0.1kevlo2000-12-125-17/+227 * Fix eject device.kevlo2000-12-011-0/+12 * Resign as maintainer of KDE2 ports, having brought them up from inceptionwill2000-11-181-1/+1 * Add patch to fix konsole crashes. Has been submitted to the KDE team.will2000-11-031-0/+11 * Remove 8 files that aren't build on everyone's systems.asami2000-11-021-8/+0 * Oops, forgot to remove -lqt2 along with -L${X11BASE}/lib, to allow peoplewill2000-10-291-1/+1 * Implement fix for configure scripts in regards to finding X libs onwill2000-10-291-2/+2 * Fix KDE2 PLISTs and build for kdelibs.will2000-10-291-0/+14 * Update to QT 2.2.1 / KDE 2.0 final release. At last! What a long road...will2000-10-253-175/+292 * Fix PLIST bogons.will2000-09-231-5/+0 * Update to KDE 1.94, the fifth and final beta release of KDE 2.0. If youwill2000-09-163-180/+171 * Update to 20000829A snapshot. Disable kdenetwork2 for the time being sowill2000-08-303-319/+304 * (1) Add new variable, XFREE86_VERSION, to specify which version ofasami2000-08-031-1/+1 * Update to 20000724A (custom-rolled snapshot). Rejoice, because nowwill2000-07-293-457/+746 * Mark these BROKEN, they don't compile/run properly.asami2000-07-201-0/+2 * Rename INSTALLS_SHLIBS to INSTALLS_SHLIB. (There was a typo in theasami2000-06-171-1/+1 * Fourth round of INSTALLS_SHLIBS conversion.sobomax2000-06-162-2/+1 * Mark FORBIDDEN due to local buffer overflow in kdesud yieldingkris2000-06-051-0/+2 * Fix for RELENG_3 systems. Also remove unnecessary USE_XLIB (because it'swill2000-05-241-2/+0 * Update to KDEBASE 1.90 (aka KDE2 beta).will2000-05-173-2404/+1748 * Update to use PORTNAME/PORTVERSIONcpiazza2000-04-141-2/+2