[GRASS-SVN] r33409 - grass/branches/develbranch_6/swig/python/interfaces

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Sep 12 03:07:45 EDT 2008


Author: hamish
Date: 2008-09-12 03:07:44 -0400 (Fri, 12 Sep 2008)
New Revision: 33409

Modified:
   grass/branches/develbranch_6/swig/python/interfaces/dig_types.i
   grass/branches/develbranch_6/swig/python/interfaces/gis.i
   grass/branches/develbranch_6/swig/python/interfaces/imagedefs.i
   grass/branches/develbranch_6/swig/python/interfaces/imagery.i
Log:
indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 -nbbo -nbc -nbfda -nbfde -ncdb -ncdw -nce -nfca -npcs -nprs -npsl -nsc -nsob -saf -sai -saw -sbi0 -ss -ts8 -ut


Modified: grass/branches/develbranch_6/swig/python/interfaces/dig_types.i
===================================================================
--- grass/branches/develbranch_6/swig/python/interfaces/dig_types.i	2008-09-11 10:49:14 UTC (rev 33408)
+++ grass/branches/develbranch_6/swig/python/interfaces/dig_types.i	2008-09-12 07:07:44 UTC (rev 33409)
@@ -11,4 +11,3 @@
 
 #define GV_POINTS (GV_POINT | GV_CENTROID )
 #define GV_LINES (GV_LINE | GV_BOUNDARY )
-

Modified: grass/branches/develbranch_6/swig/python/interfaces/gis.i
===================================================================
--- grass/branches/develbranch_6/swig/python/interfaces/gis.i	2008-09-11 10:49:14 UTC (rev 33408)
+++ grass/branches/develbranch_6/swig/python/interfaces/gis.i	2008-09-12 07:07:44 UTC (rev 33409)
@@ -28,8 +28,8 @@
 #define G_VAR_GISRC    0
 #define G_VAR_MAPSET   1
 
-#define G_GISRC_MODE_FILE     0   
-#define G_GISRC_MODE_MEMORY   1   
+#define G_GISRC_MODE_FILE     0
+#define G_GISRC_MODE_MEMORY   1
 
 #define TYPE_INTEGER  1
 #define TYPE_DOUBLE   2
@@ -37,22 +37,23 @@
 #define YES           1
 #define NO            0
 
-typedef enum {
-    G_OPT_WHERE,   
-    G_OPT_R_INPUT, 
+typedef enum
+{
+    G_OPT_WHERE,
+    G_OPT_R_INPUT,
     G_OPT_R_OUTPUT,
-    G_OPT_R_MAP,   
-    G_OPT_V_INPUT, 
+    G_OPT_R_MAP,
+    G_OPT_V_INPUT,
     G_OPT_V_OUTPUT,
-    G_OPT_V_MAP,   
-    G_OPT_V_TYPE,  
-    G_OPT_V_FIELD, 
-    G_OPT_V_CAT,   
-    G_OPT_V_CATS   
+    G_OPT_V_MAP,
+    G_OPT_V_TYPE,
+    G_OPT_V_FIELD,
+    G_OPT_V_CAT,
+    G_OPT_V_CATS
 } STD_OPT;
 
-#define G_INFO_FORMAT_STANDARD 0  
-#define G_INFO_FORMAT_GUI      1  
+#define G_INFO_FORMAT_STANDARD 0
+#define G_INFO_FORMAT_GUI      1
 
 #define G_ICON_CROSS  0
 #define G_ICON_BOX    1
@@ -65,27 +66,28 @@
 typedef int CELL;
 typedef double DCELL;
 typedef float FCELL;
+
 /*extern CELL CELL_NODATA; Sajith */
 
 typedef int RASTER_MAP_TYPE;
 
 struct Cell_head
 {
-    int format;     
-    int compressed; 
-    int rows;	    
-    int rows3;	    
-    int cols;	    
-    int cols3;	    
-    int depths;     
-    int proj;	    
-    int zone;	    
-    double ew_res;  
-    double ew_res3; 
-    double ns_res;  
-    double ns_res3; 
-    double tb_res;  
-    double north;   
+    int format;
+    int compressed;
+    int rows;
+    int rows3;
+    int cols;
+    int cols3;
+    int depths;
+    int proj;
+    int zone;
+    double ew_res;
+    double ew_res3;
+    double ns_res;
+    double ns_res3;
+    double tb_res;
+    double north;
     double south;
     double east;
     double west;
@@ -97,21 +99,21 @@
 {
     struct
     {
-    	DCELL value;
+	DCELL value;
 	unsigned char red;
 	unsigned char grn;
 	unsigned char blu;
-    }  high;
+    } high;
     struct
     {
-    	DCELL value;
+	DCELL value;
 	unsigned char red;
 	unsigned char grn;
 	unsigned char blu;
-    }  low;
+    } low;
 
-/*    struct _Color_Rule_ *next;
-    struct _Color_Rule_ *prev;  Commented By sajith I am confued here....*/
+    /*    struct _Color_Rule_ *next;
+       struct _Color_Rule_ *prev;  Commented By sajith I am confued here.... */
 };
 
 struct _Color_Info_
@@ -121,7 +123,7 @@
 
     struct
     {
-    	unsigned char *red;
+	unsigned char *red;
 	unsigned char *grn;
 	unsigned char *blu;
 	unsigned char *set;
@@ -131,7 +133,7 @@
 
     struct
     {
-        DCELL *vals;
+	DCELL *vals;
 	struct _Color_Rule_ **rules;
 	int nalloc;
 	int active;
@@ -142,15 +144,15 @@
 
 struct Colors
 {
-    int version;	
+    int version;
     DCELL shift;
     int invert;
-    int is_float;   	    
-    int null_set;   	    
+    int is_float;
+    int null_set;
     unsigned char null_red;
     unsigned char null_grn;
     unsigned char null_blu;
-    int undef_set;  	   
+    int undef_set;
     unsigned char undef_red;
     unsigned char undef_grn;
     unsigned char undef_blu;
@@ -162,44 +164,44 @@
 
 struct Reclass
 {
-    char name[50];  	   
-    char mapset[50]; 	   
-    int type;	    	   
-    int num;	    	   
-    CELL min;	    	   
-    CELL max;	    	   
-    CELL *table;    	   
-} ;
+    char name[50];
+    char mapset[50];
+    int type;
+    int num;
+    CELL min;
+    CELL max;
+    CELL *table;
+};
 
 struct FPReclass_table
 {
-    DCELL dLow;     
-    DCELL dHigh;    
-    DCELL rLow;     
-    DCELL rHigh;    
+    DCELL dLow;
+    DCELL dHigh;
+    DCELL rLow;
+    DCELL rHigh;
 };
 
 struct FPReclass
 {
-    int defaultDRuleSet;   
-    int defaultRRuleSet;   
-    int infiniteLeftSet;   
-    int infiniteRightSet;  
-    int rRangeSet;  	   
-    int maxNofRules; 
+    int defaultDRuleSet;
+    int defaultRRuleSet;
+    int infiniteLeftSet;
+    int infiniteRightSet;
+    int rRangeSet;
+    int maxNofRules;
     int nofRules;
-    DCELL defaultDMin;     
-    DCELL defaultDMax;     
-    DCELL defaultRMin;     
-    DCELL defaultRMax;     
-    DCELL infiniteDLeft;   
-    DCELL infiniteDRight;  
-    DCELL infiniteRLeft;   
-    DCELL infiniteRRight;  
-    DCELL dMin;     	   
-    DCELL dMax;     	   
-    DCELL rMin;     	   
-    DCELL rMax;     	   
+    DCELL defaultDMin;
+    DCELL defaultDMax;
+    DCELL defaultRMin;
+    DCELL defaultRMax;
+    DCELL infiniteDLeft;
+    DCELL infiniteDRight;
+    DCELL infiniteRLeft;
+    DCELL infiniteRRight;
+    DCELL dMin;
+    DCELL dMax;
+    DCELL rMin;
+    DCELL rMax;
     struct FPReclass_table *table;
 };
 
@@ -243,43 +245,43 @@
 	struct Quant_table **rules;
 	int nalloc;
 	int active;
-	DCELL inf_dmin; 
-	DCELL inf_dmax; 
-	CELL inf_min; 
-	CELL inf_max; 
+	DCELL inf_dmin;
+	DCELL inf_dmax;
+	CELL inf_min;
+	CELL inf_max;
     } fp_lookup;
 };
 
 struct Categories
 {
-    CELL ncats;     	    
-    CELL num;	    	    
-    char *title;    	    
-    char *fmt;	    	    
-    float m1;	    	    
-    float a1;	    	    
-    float m2;	    	    
-    float a2;	    	    
-    struct Quant q; 	    
-    char **labels;  	    
-    int *marks;    	    
+    CELL ncats;
+    CELL num;
+    char *title;
+    char *fmt;
+    float m1;
+    float a1;
+    float m2;
+    float a2;
+    struct Quant q;
+    char **labels;
+    int *marks;
     int nalloc;
     int last_marked_rule;
-   
+
 };
 
 struct History
 {
-    char    mapid[RECORD_LEN];
-    char    title[RECORD_LEN];
-    char    mapset[RECORD_LEN];
-    char    creator[RECORD_LEN];
-    char    maptype[RECORD_LEN];
-    char    datsrc_1[RECORD_LEN];
-    char    datsrc_2[RECORD_LEN];
-    char    keywrd[RECORD_LEN];
-    int     edlinecnt;
-    char    edhist[MAXEDLINES][RECORD_LEN];
+    char mapid[RECORD_LEN];
+    char title[RECORD_LEN];
+    char mapset[RECORD_LEN];
+    char creator[RECORD_LEN];
+    char maptype[RECORD_LEN];
+    char datsrc_1[RECORD_LEN];
+    char datsrc_2[RECORD_LEN];
+    char keywrd[RECORD_LEN];
+    int edlinecnt;
+    char edhist[MAXEDLINES][RECORD_LEN];
 };
 
 struct Cell_stats
@@ -290,19 +292,19 @@
 	long *count;
 	int left;
 	int right;
-    } *node ;    
- 
-    int tlen ;   
-    int N;       
+    } *node;
+
+    int tlen;
+    int N;
     int curp;
-    long null_data_count;   
+    long null_data_count;
     int curoffset;
 };
 
 struct Histogram
 {
     int num;
-    
+
     struct Histogram_list
     {
 	CELL cat;
@@ -312,40 +314,40 @@
 
 struct Range
 {
-    CELL min;		
-    CELL max;	
-    int first_time;   
+    CELL min;
+    CELL max;
+    int first_time;
 };
 
 struct FPRange
 {
-    DCELL min;		
-    DCELL max;	
-    int first_time;  
+    DCELL min;
+    DCELL max;
+    int first_time;
 };
 
 struct G_3dview
 {
-    char pgm_id[40];        
-    float from_to[2][3];    
-    float fov;              
-    float twist;            
-    float exag;             
-    int mesh_freq;  	    
-    int poly_freq;   	    
-    int display_type;       
-    int lightson;   	    
-    int dozero;   	    
-    int colorgrid;   	    
-    int shading;   	    
-    int fringe;   	    
-    int surfonly;   	    
-    int doavg;   	    
-    char grid_col[40];	    
-    char bg_col[40];	    
-    char other_col[40];     
-    float lightpos[4];	    
-    float lightcol[3];      
+    char pgm_id[40];
+    float from_to[2][3];
+    float fov;
+    float twist;
+    float exag;
+    int mesh_freq;
+    int poly_freq;
+    int display_type;
+    int lightson;
+    int dozero;
+    int colorgrid;
+    int shading;
+    int fringe;
+    int surfonly;
+    int doavg;
+    char grid_col[40];
+    char bg_col[40];
+    char other_col[40];
+    float lightpos[4];
+    float lightcol[3];
     float ambient;
     float shine;
     struct Cell_head vwin;
@@ -359,47 +361,46 @@
     char **value;
 };
 
-struct Option                	   
+struct Option
 {
-    char *key;                    
-    int type;                     
-    int required;                 
-    int multiple;                 
-    char *options;                
-    char **opts;                  
-    char *key_desc;               
-    char *label;                  
-    char *description;            
-    char *descriptions;           
-    char **descs;                 
-    char *answer;                 
-    char *def;                    
-    char **answers;               
-    struct Option *next_opt;      
-    char *gisprompt;              
-    int (*checker)();             
+    char *key;
+    int type;
+    int required;
+    int multiple;
+    char *options;
+    char **opts;
+    char *key_desc;
+    char *label;
+    char *description;
+    char *descriptions;
+    char **descs;
+    char *answer;
+    char *def;
+    char **answers;
+    struct Option *next_opt;
+    char *gisprompt;
+    int (*checker) ();
     int count;
 };
 
-struct Flag                 	   
+struct Flag
 {
-    char key;                      
-    char answer;                   
-    char *label;                   
-    char *description;             
-    struct Flag *next_flag;        
+    char key;
+    char answer;
+    char *label;
+    char *description;
+    struct Flag *next_flag;
 };
 
-struct GModule                     
+struct GModule
 {
-    char *label;                   
-    char *description;             
+    char *label;
+    char *description;
     int overwrite;
 };
 
 struct TimeStamp
 {
-    DateTime dt[2];   
+    DateTime dt[2];
     int count;
 };
-

Modified: grass/branches/develbranch_6/swig/python/interfaces/imagedefs.i
===================================================================
--- grass/branches/develbranch_6/swig/python/interfaces/imagedefs.i	2008-09-11 10:49:14 UTC (rev 33408)
+++ grass/branches/develbranch_6/swig/python/interfaces/imagedefs.i	2008-09-12 07:07:44 UTC (rev 33409)
@@ -9,15 +9,19 @@
 int I_free_double2(double **);
 double ***I_alloc_double3(int, int, int);
 int I_free_double3(double ***);
+
 /* ask_group.c */
 int I_ask_group_old(char *, char *);
+
 /* eol.c */
 int I_get_to_eol(char *, int, FILE *);
+
 /* find.c */
 int I_find_group(char *);
 int I_find_group_file(char *, char *);
 int I_find_subgroup(char *, char *);
 int I_find_subgroup_file(char *, char *, char *);
+
 /* fopen.c */
 FILE *I_fopen_group_file_new(char *, char *);
 FILE *I_fopen_group_file_append(char *, char *);
@@ -25,9 +29,12 @@
 FILE *I_fopen_subgroup_file_new(char *, char *, char *);
 FILE *I_fopen_subgroup_file_append(char *, char *, char *);
 FILE *I_fopen_subgroup_file_old(char *, char *, char *);
+
 /* georef.c */
-int I_compute_georef_equations(struct Control_Points *, double [3], double [3], double [3], double [3]);
-int I_georef(double, double, double *, double *, double [3], double [3]);
+int I_compute_georef_equations(struct Control_Points *, double[3], double[3],
+			       double[3], double[3]);
+int I_georef(double, double, double *, double *, double[3], double[3]);
+
 /* group.c */
 int I_get_group(char *);
 int I_put_group(char *);
@@ -42,26 +49,34 @@
 int I_transfer_group_ref_file(struct Ref *, int, struct Ref *);
 int I_init_group_ref(struct Ref *);
 int I_free_group_ref(struct Ref *);
+
 /* list_gp.c */
 int I_list_group(char *, struct Ref *, FILE *);
 int I_list_group_simple(struct Ref *, FILE *);
+
 /* list_subgp.c */
 int I_list_subgroup(char *, char *, struct Ref *, FILE *);
 int I_list_subgroup_simple(struct Ref *, FILE *);
+
 /* loc_info.c */
 int I_location_info(char *, char *);
+
 /* ls_groups.c */
 int I_list_groups(int);
 int I_list_subgroups(char *, int);
+
 /* points.c */
-int I_new_control_point(struct Control_Points *, double, double, double, double, int);
+int I_new_control_point(struct Control_Points *, double, double, double,
+			double, int);
 int I_get_control_points(char *, struct Control_Points *);
 int I_put_control_points(char *, struct Control_Points *);
+
 /* ref.c */
 FILE *I_fopen_group_ref_new(char *);
 FILE *I_fopen_group_ref_old(char *);
 FILE *I_fopen_subgroup_ref_new(char *, char *);
 FILE *I_fopen_subgroup_ref_old(char *, char *);
+
 /* sig.c */
 int I_init_signatures(struct Signature *, int);
 int I_new_signature(struct Signature *);
@@ -69,9 +84,11 @@
 int I_read_one_signature(FILE *, struct Signature *);
 int I_read_signatures(FILE *, struct Signature *);
 int I_write_signatures(FILE *, struct Signature *);
+
 /* sigfile.c */
 FILE *I_fopen_signature_file_new(char *, char *, char *);
 FILE *I_fopen_signature_file_old(char *, char *, char *);
+
 /* sigset.c */
 int I_SigSetNClasses(struct SigSet *);
 struct ClassData *I_AllocClassData(struct SigSet *, struct ClassSig *, int);
@@ -85,50 +102,68 @@
 int I_SetClassTitle(struct ClassSig *, char *);
 char *I_GetClassTitle(struct ClassSig *);
 int I_WriteSigSet(FILE *, struct SigSet *);
+
 /* sigsetfile.c */
 FILE *I_fopen_sigset_file_new(char *, char *, char *);
 FILE *I_fopen_sigset_file_old(char *, char *, char *);
+
 /* target.c */
 int I_get_target(char *, char *, char *);
 int I_put_target(char *, char *, char *);
+
 /* title.c */
 int I_get_group_title(char *, char *, int);
 int I_put_group_title(char *, char *);
+
 /* var.c */
 double I_variance(double, double, int);
 double I_stddev(double, double, int);
 
 /* c_assign.c */
 int I_cluster_assign(struct Cluster *, int *);
+
 /* c_begin.c */
 int I_cluster_begin(struct Cluster *, int);
+
 /* c_clear.c */
 int I_cluster_clear(struct Cluster *);
+
 /* c_distinct.c */
 int I_cluster_distinct(struct Cluster *, double);
+
 /* c_exec.c */
-int I_cluster_exec(struct Cluster *, int, int, double, double, int, int (*)(), int *);
+int I_cluster_exec(struct Cluster *, int, int, double, double, int, int (*)(),
+		   int *);
 /* c_execmem.c */
 int I_cluster_exec_allocate(struct Cluster *);
 int I_cluster_exec_free(struct Cluster *);
+
 /* c_means.c */
 int I_cluster_means(struct Cluster *);
+
 /* c_merge.c */
 int I_cluster_merge(struct Cluster *);
+
 /* c_nclasses.c */
 int I_cluster_nclasses(struct Cluster *, int);
+
 /* c_point.c */
 int I_cluster_point(struct Cluster *, CELL *);
 int I_cluster_begin_point_set(struct Cluster *, int);
 int I_cluster_point_part(struct Cluster *, register CELL, int, int);
 int I_cluster_end_point_set(struct Cluster *, int);
+
 /* c_reassign.c */
 int I_cluster_reassign(struct Cluster *, int *);
+
 /* c_reclass.c */
 int I_cluster_reclass(struct Cluster *, int);
+
 /* c_sep.c */
 double I_cluster_separation(struct Cluster *, int, int);
+
 /* c_sig.c */
 int I_cluster_signatures(struct Cluster *);
+
 /* c_sum2.c */
 int I_cluster_sum2(struct Cluster *);

Modified: grass/branches/develbranch_6/swig/python/interfaces/imagery.i
===================================================================
--- grass/branches/develbranch_6/swig/python/interfaces/imagery.i	2008-09-11 10:49:14 UTC (rev 33408)
+++ grass/branches/develbranch_6/swig/python/interfaces/imagery.i	2008-09-12 07:07:44 UTC (rev 33409)
@@ -1,17 +1,17 @@
 #define INAME_LEN 30
 struct Ref_Files
 {
-    char name[30]; 
+    char name[30];
     char mapset[30];
 };
 struct Ref_Color
 {
-    unsigned char *table      ;  
-    unsigned char *index      ;  
-    unsigned char *buf        ;  
-    int fd                    ;  
-    CELL min, max             ;  
-    int n                     ;  
+    unsigned char *table;
+    unsigned char *index;
+    unsigned char *buf;
+    int fd;
+    CELL min, max;
+    int n;
 };
 
 struct Ref
@@ -19,34 +19,34 @@
     int nfiles;
     struct Ref_Files *file;
     struct Ref_Color red, grn, blu;
-} ;
+};
 
 struct Tape_Info
 {
     char title[75];
     char id[2][75];
     char desc[5][75];
-} ;
+};
 
 struct Control_Points
 {
-    int  count;
+    int count;
     double *e1;
     double *n1;
     double *e2;
     double *n2;
     int *status;
-} ;
-    struct One_Sig
-    {
-	char desc[100];
-	int npoints;
-	double *mean;	
-	double **var;   
-	int status;     
-	float r,g,b;	
-	int have_color;
-    }; 
+};
+struct One_Sig
+{
+    char desc[100];
+    int npoints;
+    double *mean;
+    double **var;
+    int status;
+    float r, g, b;
+    int have_color;
+};
 struct Signature
 {
     int nbands;
@@ -54,61 +54,61 @@
     char title[100];
     struct One_Sig *sig;
 
-} ;
+};
 
 struct Cluster
 {
     int nbands;
     int npoints;
-    CELL **points ;
+    CELL **points;
     int np;
 
-    double *band_sum     ; 
-    double *band_sum2    ; 
+    double *band_sum;
+    double *band_sum2;
 
-    int    *class        ; 
-    int    *reclass      ; 
-    int    *count        ; 
-    int    *countdiff    ; 
-    double **sum         ; 
-    double **sumdiff     ; 
-    double **sum2        ; 
-    double **mean        ; 
-    struct Signature S   ; 
+    int *class;
+    int *reclass;
+    int *count;
+    int *countdiff;
+    double **sum;
+    double **sumdiff;
+    double **sum2;
+    double **mean;
+    struct Signature S;
 
     int nclasses;
     int merge1, merge2;
     int iteration;
     double percent_stable;
-} ;
-    struct SubSig
-        {
-            double N;
-	    double pi;
-            double *means;
-            double **R;
-            double **Rinv;
-	    double cnst;
-            int used;
-        } ;
-        struct ClassData
-        {
-	    int npixels;
-	    int count;
-	    double **x;   
-	    double **p;   
-        };
+};
+struct SubSig
+{
+    double N;
+    double pi;
+    double *means;
+    double **R;
+    double **Rinv;
+    double cnst;
+    int used;
+};
+struct ClassData
+{
+    int npixels;
+    int count;
+    double **x;
+    double **p;
+};
 
-    struct ClassSig
-    {
-	long classnum;
-        char *title;
-        int used;
-	int type;
-        int nsubclasses;
+struct ClassSig
+{
+    long classnum;
+    char *title;
+    int used;
+    int type;
+    int nsubclasses;
     struct SubSig *SubSig;
-        struct ClassData ClassData;
-    };
+    struct ClassData ClassData;
+};
 
 struct SigSet
 {



More information about the grass-commit mailing list