~javier-lopez/ubuntu/quantal/cdo/sru-1023329

« back to all changes in this revision

Viewing changes to src/namelist.h

  • Committer: Bazaar Package Importer
  • Author(s): Alastair McKinstry
  • Date: 2010-09-22 15:58:09 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100922155809-u1d3vlmlqj02uxjt
Tags: 1.4.6.dfsg.1-1
New upstream release. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
  This file is part of CDO. CDO is a collection of Operators to
3
3
  manipulate and analyse Climate model Data.
4
4
 
5
 
  Copyright (C) 2003-2009 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
 
5
  Copyright (C) 2003-2010 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
6
6
  See COPYING file for copying and redistribution conditions.
7
7
 
8
8
  This program is free software; you can redistribute it and/or modify
37
37
 
38
38
#define MAX_LINE_LEN  4096
39
39
 
40
 
struct _NML_LINE
 
40
typedef struct
41
41
{
42
42
  int nptype, namitf, namitl;
43
43
  char lineac[MAX_LINE_LEN], lineuc[MAX_LINE_LEN], linelc[MAX_LINE_LEN];
44
 
};
 
44
} nml_line_t;
45
45
 
46
 
struct _NML_ENTRY
 
46
typedef struct
47
47
{
48
 
  char *name;
49
 
  void *ptr;
50
 
  int type;
51
 
  int occ;
52
 
  int dis;
 
48
  char  *name;
 
49
  void  *ptr;
 
50
  int    type;
 
51
  int    occ;
 
52
  int    dis;
53
53
  size_t size;
54
 
};
55
 
 
56
 
typedef struct _NML_LINE   NML_LINE;
57
 
typedef struct _NML_ENTRY  NML_ENTRY;
58
 
 
59
 
struct _NAMELIST
 
54
} nml_entry_t;
 
55
 
 
56
typedef struct
60
57
{
61
 
  int size;
62
 
  int dis;
63
 
  char *name;
64
 
  NML_LINE line;
65
 
  NML_ENTRY *entry[MAX_NML_ENTRY];
66
 
};
67
 
 
68
 
typedef struct _NAMELIST   NAMELIST;
69
 
 
70
 
NAMELIST *namelistNew(const char *name);
71
 
void namelistDelete(NAMELIST *nml);
72
 
void namelistClear(NAMELIST *nml);
73
 
void namelistDebug(int debug);
74
 
int  namelistAdd(NAMELIST *nml, const char *name, int type, int dis, void *ptr, size_t size);
75
 
void namelistPrint(NAMELIST *nml);
76
 
void namelistRead(FILE *nmlfp, NAMELIST *nml);
77
 
int  namelistNum(NAMELIST *nml, const char *name);
 
58
  int          size;
 
59
  int          dis;
 
60
  char        *name;
 
61
  nml_line_t   line;
 
62
  nml_entry_t *entry[MAX_NML_ENTRY];
 
63
} namelist_t;
 
64
 
 
65
 
 
66
namelist_t *namelistNew(const char *name);
 
67
void namelistDelete(namelist_t *nml);
 
68
void namelistReset(namelist_t *nml);
 
69
int  namelistAdd(namelist_t *nml, const char *name, int type, int dis, void *ptr, size_t size);
 
70
void namelistPrint(namelist_t *nml);
 
71
void namelistRead(FILE *nmlfp, namelist_t *nml);
 
72
int  namelistNum(namelist_t *nml, const char *name);
78
73
 
79
74
#endif  /* _NAMELIST_H */