masqmail-0.2

diff src/readtest.c @ 0:08114f7dcc23

this is masqmail-0.2.21 from oliver kurth
author meillo@marmaro.de
date Fri, 26 Sep 2008 17:05:23 +0200
parents
children 26e34ae9a3e3
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/readtest.c	Fri Sep 26 17:05:23 2008 +0200
     1.3 @@ -0,0 +1,19 @@
     1.4 +
     1.5 +#include "masqmail.h"
     1.6 +#include "readsock.h"
     1.7 +
     1.8 +int main()
     1.9 +{
    1.10 +  char *buf = g_malloc(20);
    1.11 +  int size = 20, ret;
    1.12 +
    1.13 +  ret = read_sockline1(stdin, &buf, &size, 60, READSOCKL_CVT_CRLF);
    1.14 +  //  ret = read_sockline(stdin, buf, size, 60, READSOCKL_CHUG);
    1.15 +
    1.16 +  printf("%s\n", buf);
    1.17 +  printf("ret = %d, size = %d, strlen = %d\n", ret, size, strlen(buf));
    1.18 +
    1.19 +  return 0;
    1.20 +}
    1.21 +
    1.22 +