axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ros...@apache.org
Subject cvs commit: ws-axis/c/src/xml/txpp/examples test2.c test1.c
Date Thu, 08 Apr 2004 10:40:25 GMT
roshan      2004/04/08 03:40:25

  Modified:    c/src/xml/txpp/examples test2.c test1.c
  Log:
  Applied Coding Conventions
  
  Revision  Changes    Path
  1.2       +35 -17    ws-axis/c/src/xml/txpp/examples/test2.c
  
  Index: test2.c
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/xml/txpp/examples/test2.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- test2.c	19 Mar 2004 13:45:58 -0000	1.1
  +++ test2.c	8 Apr 2004 10:40:25 -0000	1.2
  @@ -1,32 +1,50 @@
  +/*
  + *   Copyright 2003-2004 The Apache Software Foundation.
  + *
  + *   Licensed under the Apache License, Version 2.0 (the "License");
  + *   you may not use this file except in compliance with the License.
  + *   You may obtain a copy of the License at
  + *
  + *       http://www.apache.org/licenses/LICENSE-2.0
  + *
  + *   Unless required by applicable law or agreed to in writing, software
  + *   distributed under the License is distributed on an "AS IS" BASIS,
  + *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + *   See the License for the specific language governing permissions and
  + *   limitations under the License.
  + */
  +
   #include "../lib/xpp.h"
   
   char *tn[] = {"START_TAG", "END_TAG", "EMPTY_ELEMENT_TAG", "PCDATA"};
   
   int main()
   {
  -        //xpp_context_t* ct = (xpp_context_t*) parser_create("ISO-8859-1");
  +        /* xpp_context_t* ct = (xpp_context_t*) parser_create("ISO-8859-1"); */
           xpp_context_t* ct = (xpp_context_t*) parser_create("UTF-8");
  -        //xpp_context_t* ct = (xpp_context_t*) parser_create(NULL);
  -        //xpp_context_t* ct = (xpp_context_t*) parser_create("UTF-16");
  +        /* xpp_context_t* ct = (xpp_context_t*) parser_create(NULL); */
  +        /* xpp_context_t* ct = (xpp_context_t*) parser_create("UTF-16"); */
   
   
           data_t* data;
  -	int* intError = (int*) malloc(sizeof(int));
  -	
  -	data = (data_t*) next(ct);
  -	data = (data_t*) next(ct);
  -        //printf("\n%s\n", tn[data->type]);	
  -	data = (data_t*) next(ct);
  -        //printf("\n%s\n", tn[data->type]);	
  -	data = (data_t*) next(ct);
  -        //printf("\n%s\n", tn[data->type]);	
  -	data = (data_t*) next(ct);
  -        //printf("\n%s\n", tn[data->type]);	
  -	int intTemp = get_next_element_as_int(ct, intError);
  -	printf("intTemp:%d\n", intTemp);
  +    int* intError = (int*) malloc(sizeof(int));
  +    
  +    data = (data_t*) next(ct);
  +    data = (data_t*) next(ct);
  +        /* printf("\n%s\n", tn[data->type]); */
  +    data = (data_t*) next(ct);
  +        /* printf("\n%s\n", tn[data->type]); */
  +    data = (data_t*) next(ct);
  +        /* printf("\n%s\n", tn[data->type]); */
  +    data = (data_t*) next(ct);
  +        /* printf("\n%s\n", tn[data->type]); */
  +    int intTemp = get_next_element_as_int(ct, intError);
  +    printf("intTemp:%d\n", intTemp);
   
   
  -        //free(buff);
  +        /* free(buff); */
           parser_free(ct);
           return 1;
   }
  +
  +
  
  
  
  1.2       +23 -6     ws-axis/c/src/xml/txpp/examples/test1.c
  
  Index: test1.c
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/xml/txpp/examples/test1.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- test1.c	19 Mar 2004 13:45:58 -0000	1.1
  +++ test1.c	8 Apr 2004 10:40:25 -0000	1.2
  @@ -1,13 +1,29 @@
  +/*
  + *   Copyright 2003-2004 The Apache Software Foundation.
  + *
  + *   Licensed under the Apache License, Version 2.0 (the "License");
  + *   you may not use this file except in compliance with the License.
  + *   You may obtain a copy of the License at
  + *
  + *       http://www.apache.org/licenses/LICENSE-2.0
  + *
  + *   Unless required by applicable law or agreed to in writing, software
  + *   distributed under the License is distributed on an "AS IS" BASIS,
  + *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + *   See the License for the specific language governing permissions and
  + *   limitations under the License.
  + */
  +
   #include "../lib/xpp.h"
   
   char *tn[] = {"START_TAG", "END_TAG", "EMPTY_ELEMENT_TAG", "PCDATA"};
   
   int main()
   {
  -        //xpp_context_t* ct = (xpp_context_t*) parser_create("ISO-8859-1");
  +        /* xpp_context_t* ct = (xpp_context_t*) parser_create("ISO-8859-1"); */
           xpp_context_t* ct = (xpp_context_t*) parser_create("UTF-8");
  -        //xpp_context_t* ct = (xpp_context_t*) parser_create(NULL);
  -        //xpp_context_t* ct = (xpp_context_t*) parser_create("UTF-16");
  +        /* xpp_context_t* ct = (xpp_context_t*) parser_create(NULL); */
  +        /* xpp_context_t* ct = (xpp_context_t*) parser_create("UTF-16"); */
   
   
           data_t* data;
  @@ -16,9 +32,9 @@
           {
                   printf("\n%s\n", tn[data->type]);
                   int ii = 0;
  -		char temp;
  +        char temp;
                   while (ii < data->num_ptrs_utf8) 
  -		{
  +                {
                           temp = data->utf8ptrs[ii+1][1];
                           data->utf8ptrs[ii+1][1] = '\0';
                           printf("%s\n", data->utf8ptrs[ii]);
  @@ -34,7 +50,8 @@
   
   
   
  -        //free(buff);
  +        /* free(buff); */
           parser_free(ct);
           return 1;
   }
  +
  
  
  

Mime
View raw message