martin      2003/05/28 07:05:50

  Modified:    util     iconv.c
  Log:
  [Porting] fix type
  
  Revision  Changes    Path
  1.6       +7 -3      apr-iconv/util/iconv.c
  
  Index: iconv.c
  ===================================================================
  RCS file: /home/cvs/apr-iconv/util/iconv.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -u -r1.5 -r1.6
  --- iconv.c   28 Jun 2001 05:54:23 -0000      1.5
  +++ iconv.c   28 May 2003 14:05:50 -0000      1.6
  @@ -81,7 +81,7 @@
   int
   main(int argc, char * const *argv)
   {
  -     iconv_t cd;
  +     apr_iconv_t cd;
        iconv_stream *is;
        char *from = NULL, *to = NULL, *input = NULL;
        int opt;
  @@ -98,6 +98,10 @@
                        break;
                    case 's':
                        input = optarg;
  +                     break;
  +                 default:
  +                     fprintf(stderr, "Usage: iconv -f <name> -t <name> [-s 
<input>]\n");
  +                     exit(3);
                }
        }
        if (from == NULL) {
  @@ -118,9 +122,9 @@
        }
   
        /* Use it */
  -     status = apr_iconv_open(to, from,ctx, &cd);
  +     status = apr_iconv_open(to, from, ctx, &cd);
        if (status) {
  -             fprintf(stderr, "unable to open specified convertor\n");
  +             fprintf(stderr, "unable to open specified converter\n");
                exit(6);
                }
        if (!(is = iconv_ostream_fopen(cd, stdout))) {
  
  
  

Reply via email to