From d3298e21fbb4359ec3ff42d9e12c4ea27c29d057 Mon Sep 17 00:00:00 2001 From: musil Date: Thu, 10 Dec 2009 11:35:49 +0000 Subject: only temporary svn path=/trunk/externals/iemlib/; revision=12824 --- iemlib2/src/iem_pbank_temp.c | 102 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 iemlib2/src/iem_pbank_temp.c (limited to 'iemlib2/src') diff --git a/iemlib2/src/iem_pbank_temp.c b/iemlib2/src/iem_pbank_temp.c new file mode 100644 index 0000000..0a9e970 --- /dev/null +++ b/iemlib2/src/iem_pbank_temp.c @@ -0,0 +1,102 @@ +// 1.) allow only readable ASCII (0x0a, 0x0d, 0x20...0x7e), else drop + txvec_src = txbuf1; + txvec_dst = txbuf2; + txlen1 = txalloc; + p = 0; + for(l=0; l= ' ') && (*txvec_src <= '~')) || (*txvec_src == 0x0a) || (*txvec_src == 0x0d)) + { + *txvec_dst++ = *txvec_src++;// copy the same char + p++; + } + else + txvec_src++;// drop anything else + } + txlen = p - 1; // dst is 2 + + // 2.) unify windows return + txvec_src = txbuf2; + txvec_dst = txbuf1; + p = 0; + for(l=0; l