/[MITgcm]/MITgcm/tools/mpack-1.6/part.c
ViewVC logotype

Diff of /MITgcm/tools/mpack-1.6/part.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2 by jmc, Sat Feb 23 01:28:27 2008 UTC revision 1.3 by jmc, Sat Feb 23 03:30:03 2008 UTC
# Line 27  Line 27 
27   */   */
28    
29  #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  
30  #include <string.h>  #include <string.h>
31    
32  #include "part.h"  #include "part.h"
# Line 59  struct part *part_init(FILE *infile) Line 58  struct part *part_init(FILE *infile)
58  /*  /*
59   * Close and free 'part'.   * Close and free 'part'.
60   */   */
61  void part_close(struct part *part)  int part_close(struct part *part)
62  {  {
63      fclose(part->infile);      fclose(part->infile);
64      if (part->buf) free(part->buf);      if (part->buf) free(part->buf);
# Line 78  part_depth(struct part *part) Line 77  part_depth(struct part *part)
77  /*  /*
78   * Add to 'part' the multipart boundary 'boundary'.   * Add to 'part' the multipart boundary 'boundary'.
79   */   */
80  void part_addboundary(struct part *part, char *boundary)  int
81    part_addboundary(struct part *part, char *boundary)
82  {  {
83      /* Grow boundary array if necessary */      /* Grow boundary array if necessary */
84      if (part->boundary_num == part->boundary_alloc) {      if (part->boundary_num == part->boundary_alloc) {
# Line 165  part_gets(char *s, int n, struct part *p Line 165  part_gets(char *s, int n, struct part *p
165   * Leaves room in the input buffer to push back an additional single   * Leaves room in the input buffer to push back an additional single
166   * character using the prot_ungetc() macro.   * character using the prot_ungetc() macro.
167   */   */
168  void part_ungets(char *s, struct part *part)  int
169    part_ungets(char *s, struct part *part)
170  {  {
171      int len = strlen(s);      int len = strlen(s);
172      int i;      int i;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22