diff options
author | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
---|---|---|
committer | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
commit | 02d7aa8915f9c3a3288dab01f321eb94ba219e3b (patch) | |
tree | f053238978479e408a2b83571443e132f30586ab /src/cmd/upas/nfs/decode.c | |
parent | c0c9d8f883dfd3a7f5a74499d91bb95884b15873 (diff) | |
parent | 3d1382b98a502d0c34d5ba2c462396acc515016e (diff) | |
download | plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.gz plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.bz2 plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/cmd/upas/nfs/decode.c')
-rw-r--r-- | src/cmd/upas/nfs/decode.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/upas/nfs/decode.c b/src/cmd/upas/nfs/decode.c index 3f8c4c68..0ad78ec4 100644 --- a/src/cmd/upas/nfs/decode.c +++ b/src/cmd/upas/nfs/decode.c @@ -25,7 +25,7 @@ _decqp(uchar *out, int lim, char *in, int n, int underscores) { char *p, *ep; uchar *eout, *out0; - + out0 = out; eout = out+lim; for(p=in, ep=in+n; p<ep && out<eout; ){ @@ -73,7 +73,7 @@ decode(int kind, char *s, int *len) *len = l; t[l] = 0; return t; - + case Base64: l = strlen(s)+1; t = emalloc(l); @@ -127,7 +127,7 @@ static void twriter(void *v) { Writeargs *w; - + w = v; write(w->fd, w->s, strlen(w->s)); close(w->fd); @@ -216,13 +216,13 @@ unrfc2047(char *s) int len; Rune r; Fmt fmt; - + if(s == nil) return nil; if(strstr(s, "=?") == nil) return s; - + fmtstrinit(&fmt); for(p=s; *p; ){ /* =?charset?e?text?= */ @@ -270,7 +270,7 @@ unrfc2047(char *s) } #ifdef TEST -char *test[] = +char *test[] = { "hello world", "hello =?iso-8859-1?q?this is some text?=", @@ -288,7 +288,7 @@ void threadmain(int argc, char **argv) { int i; - + for(i=0; i<nelem(test); i++) print("%s\n\t%s\n", test[i], unrfc2047(estrdup(test[i]))); threadexitsall(0); |