chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/configuration.c, lib/home.c: Introduce environment variables.
[disorder]
/
lib
/
mime.c
diff --git
a/lib/mime.c
b/lib/mime.c
index 48354b3d7ed636958bc2765cbfa3f1c97f99da44..99dac39b1d1d939abaa32ca2cb77f64575f75617 100644
(file)
--- a/
lib/mime.c
+++ b/
lib/mime.c
@@
-1,6
+1,6
@@
/*
* This file is part of DisOrder
/*
* This file is part of DisOrder
- * Copyright (C) 2005, 2007
, 2008
Richard Kettlewell
+ * Copyright (C) 2005, 2007
-10, 2013
Richard Kettlewell
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-30,6
+30,7
@@
#include "log.h"
#include "base64.h"
#include "kvp.h"
#include "log.h"
#include "base64.h"
#include "kvp.h"
+#include "printf.h"
/** @brief Match whitespace characters */
static int whitespace(int c) {
/** @brief Match whitespace characters */
static int whitespace(int c) {
@@
-173,6
+174,7
@@
const char *mime_parse_word(const char *s, char **valuep,
case '\\':
if(!(c = *s++))
return 0;
case '\\':
if(!(c = *s++))
return 0;
+ /* else fall through ... */
default:
dynstr_append(value, c);
break;
default:
dynstr_append(value, c);
break;
@@
-712,7
+714,7
@@
char *mime_to_qp(const char *text) {
++linelength;
} else {
/* Anything else that needs encoding */
++linelength;
} else {
/* Anything else that needs encoding */
- snprintf(buffer, sizeof buffer, "=%02X", c);
+
byte_
snprintf(buffer, sizeof buffer, "=%02X", c);
dynstr_append_string(d, buffer);
linelength += 3;
}
dynstr_append_string(d, buffer);
linelength += 3;
}