apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apr/test client.c server.c testfile.c testpipe.c testproc.c testsf.c
Date Sun, 03 Dec 2000 17:47:41 GMT
rbb         00/12/03 09:47:41

  Modified:    test     client.c server.c testfile.c testpipe.c testproc.c
                        testsf.c
  Log:
  Fix a bunch of type mis-matches in the test code.
  Submitted by:	Sam TH <sam@uchicago.edu>
  Reviewed by:	Ryan Bloom
  
  Revision  Changes    Path
  1.22      +1 -1      apr/test/client.c
  
  Index: client.c
  ===================================================================
  RCS file: /home/cvs/apr/test/client.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- client.c	2000/11/21 19:15:27	1.21
  +++ client.c	2000/12/03 17:47:40	1.22
  @@ -64,7 +64,7 @@
   {
       apr_pool_t *context;
       apr_socket_t *sock;
  -    apr_ssize_t length;
  +    apr_size_t length;
       apr_status_t stat;
       char datasend[STRLEN] = "Send data test";
       char datarecv[STRLEN];
  
  
  
  1.23      +1 -1      apr/test/server.c
  
  Index: server.c
  ===================================================================
  RCS file: /home/cvs/apr/test/server.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- server.c	2000/12/03 06:50:31	1.22
  +++ server.c	2000/12/03 17:47:40	1.23
  @@ -65,7 +65,7 @@
       apr_pool_t *context;
       apr_socket_t *sock;
       apr_socket_t *sock2;
  -    apr_ssize_t length;
  +    apr_size_t length;
       apr_int32_t rv;
       apr_pollfd_t *sdset;
       char datasend[STRLEN];
  
  
  
  1.19      +11 -11    apr/test/testfile.c
  
  Index: testfile.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testfile.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- testfile.c	2000/11/15 21:46:38	1.18
  +++ testfile.c	2000/12/03 17:47:40	1.19
  @@ -77,7 +77,7 @@
       apr_pollfd_t *sdset = NULL;
       apr_status_t status = 0;
       apr_int32_t flag = APR_READ | APR_WRITE | APR_CREATE;
  -    apr_ssize_t nbytes = 0;
  +    apr_size_t nbytes = 0;
       apr_int32_t rv;
       apr_off_t zer = 0;
       char *buf;
  @@ -126,12 +126,12 @@
   
       fprintf(stdout, "\tWriting to file.......");
       
  -    nbytes = (apr_ssize_t)strlen("this is a test");
  +    nbytes = strlen("this is a test");
       if (apr_write(thefile, "this is a test", &nbytes) != APR_SUCCESS) {
           perror("something's wrong");
           exit(-1);
       }
  -    if (nbytes != (apr_ssize_t)strlen("this is a test")) {
  +    if (nbytes != strlen("this is a test")) {
           fprintf(stderr, "didn't write properly.\n");
           exit(-1);
       }
  @@ -175,13 +175,13 @@
   
   
       fprintf(stdout, "\tReading from the file.......");
  -    nbytes = (apr_ssize_t)strlen("this is a test");
  +    nbytes = strlen("this is a test");
       buf = (char *)apr_palloc(context, nbytes + 1);
       if (apr_read(thefile, buf, &nbytes) != APR_SUCCESS) {
           perror("something's wrong");
           exit(-1);
       }
  -    if (nbytes != (apr_ssize_t)strlen("this is a test")) {
  +    if (nbytes != strlen("this is a test")) {
           fprintf(stderr, "didn't read properly.\n");
           exit(-1);
       }
  @@ -277,7 +277,7 @@
   {
       apr_dir_t *temp;  
       apr_file_t *file = NULL;
  -    apr_ssize_t bytes;
  +    apr_size_t bytes;
       apr_filetype_e type;
       char *fname;
   
  @@ -346,7 +346,7 @@
   
       fprintf(stdout, "\t\tFile size.......");
       apr_dir_entry_size(&bytes, temp);
  -    if (bytes != (apr_ssize_t)strlen("Another test!!!")) {
  +    if (bytes != strlen("Another test!!!")) {
           fprintf(stderr, "Got wrong file size %d\n", bytes);
           return -1;
       }
  @@ -394,7 +394,7 @@
       apr_file_t *f = NULL;
       apr_status_t rv;
       char buf[TESTREAD_BLKSIZE];
  -    apr_ssize_t nbytes;
  +    apr_size_t nbytes;
   
       /* Create a test file with known content.
        */
  @@ -423,7 +423,7 @@
     char bytes[3];
     apr_status_t rv;
     static int counter = 0;
  -  apr_ssize_t nbytes;
  +  apr_size_t nbytes;
   
     counter += 1;
   
  @@ -448,7 +448,7 @@
   {
       apr_file_t *f = NULL;
       apr_status_t rv;
  -    apr_ssize_t nbytes;
  +    apr_size_t nbytes;
       char buf[1024];
       int i;
   
  @@ -533,7 +533,7 @@
       apr_file_t *f = NULL;
       apr_status_t rv;
       char buf[APR_BUFFERSIZE * 2];
  -    apr_ssize_t nbytes;
  +    apr_size_t nbytes;
   
       /* Create a test file with known content.
        */
  
  
  
  1.11      +1 -1      apr/test/testpipe.c
  
  Index: testpipe.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testpipe.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- testpipe.c	2000/08/06 06:07:29	1.10
  +++ testpipe.c	2000/12/03 17:47:40	1.11
  @@ -104,7 +104,7 @@
       }        
   
       fprintf(stdout, "\tReading from the pipe.......");
  -    nbytes = (apr_ssize_t)strlen("this is a test");
  +    nbytes = strlen("this is a test");
       buf = (char *)apr_palloc(context, nbytes + 1);
       if (apr_read(readp, buf, &nbytes) == APR_TIMEUP) {
           fprintf(stdout, "OK\n");
  
  
  
  1.22      +1 -1      apr/test/testproc.c
  
  Index: testproc.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testproc.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- testproc.c	2000/11/29 00:25:23	1.21
  +++ testproc.c	2000/12/03 17:47:40	1.22
  @@ -75,7 +75,7 @@
       apr_proc_t newproc;
       apr_procattr_t *attr;
       apr_file_t *testfile = NULL;
  -    apr_ssize_t length;
  +    apr_size_t length;
       char *buf;
       const char *args[3];
       char *teststr;
  
  
  
  1.18      +3 -3      apr/test/testsf.c
  
  Index: testsf.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testsf.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- testsf.c	2000/11/29 00:22:05	1.17
  +++ testsf.c	2000/12/03 17:47:40	1.18
  @@ -209,13 +209,13 @@
       apr_pool_t *p;
       char buf[120];
       apr_file_t *f = NULL;
  -    apr_ssize_t len;
  +    apr_size_t len;
       apr_size_t expected_len;
       apr_off_t current_file_offset;
       apr_hdtr_t hdtr;
       struct iovec headers[3];
       struct iovec trailers[3];
  -    apr_ssize_t bytes_read;
  +    apr_size_t bytes_read;
       apr_pollfd_t *pfd;
       apr_int32_t nsocks;
       int i;
  @@ -348,7 +348,7 @@
           current_file_offset = 0;
           len = FILE_LENGTH;
           do {
  -            apr_ssize_t tmplen;
  +            apr_size_t tmplen;
   
               tmplen = len; /* bytes remaining to send from the file */
               printf("Calling apr_sendfile()...\n");
  
  
  

Mime
View raw message