changeset 750:8d6675fff39e

Mods for irix 5 lint.
author neelin <neelin>
date Thu, 09 Feb 1995 13:51:26 +0000
parents 0b0c6b420f63
children 28c78bdbca44
files conversion/gcomserver/Makefile conversion/gcomserver/gcom_prototypes.h conversion/gcomserver/gcomserver.c conversion/gcomserver/minc_file.c conversion/gcomserver/open_connection.c conversion/gcomserver/save_transferred_object.c
diffstat 6 files changed, 57 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/conversion/gcomserver/Makefile
+++ b/conversion/gcomserver/Makefile
@@ -53,7 +53,7 @@
 $(PROG_OBJ) $(LINT_LIST) $(EXTRA_OBJS) $(LINT_EXTRA) : Makefile
 
 .c.ln:#                                   defines the rule for creating .ln
-	lint $(LINTFLAGS) -c $< -o $@
+	$(LINT) $(LINTFLAGS) -c $< -o $@
 
 .c.o:#                                    defines the rule for creating .o
 	$(CC) $(CFLAGS) -c $< -o $@
@@ -74,7 +74,8 @@
 lint: $(LINT_LIST_EXE)
 
 $(LINT_LIST_EXE) : $(TARGET_IN_DEPENDENCY)ln $(LINT_EXTRA) $(LINT_ACR_LIB) $(LINT_PROG_LIB) $(LINT_MINC_LIB)
-	lint -u $(LINTFLAGS) $@ln $(LINT_EXTRA) $(LINT_ACR_LIB) $(LINT_PROG_LIB) $(LINT_MINC_LIB)
+	$(LINT) $(LINT_PROGOPTS) $(LINTFLAGS) $@ln $(LINT_EXTRA) \
+	      $(LINT_ACR_LIB) $(LINT_PROG_LIB) $(LINT_MINC_LIB)
 
 # how to make man pages
 .man1.1:
--- a/conversion/gcomserver/gcom_prototypes.h
+++ b/conversion/gcomserver/gcom_prototypes.h
@@ -1,8 +1,8 @@
 public void cleanup_files(int num_files, char *file_list[]);
 public void free_list(int num_files, char **file_list, 
                       Data_Object_Info *file_info_list);
-public int open_connection(int argc, char *argv[], 
-                           Acr_File **afpin, Acr_File **afpout);
+public void open_connection(int argc, char *argv[], 
+                            Acr_File **afpin, Acr_File **afpout);
 public Acr_Message gcbegin_reply(Acr_Message input_message, int *num_files);
 public Acr_Message ready_reply(Acr_Message input_message);
 public Acr_Message send_reply(Acr_Message input_message);
--- a/conversion/gcomserver/gcomserver.c
+++ b/conversion/gcomserver/gcomserver.c
@@ -4,11 +4,14 @@
 @GLOBALS    : 
 @CREATED    : November 22, 1993 (Peter Neelin)
 @MODIFIED   : $Log: gcomserver.c,v $
-@MODIFIED   : Revision 2.1  1994-10-20 13:48:02  neelin
-@MODIFIED   : Write out direction cosines to support rotated volumes.
-@MODIFIED   : Store single slices as 1-slice volumes (3D instead of 2D).
-@MODIFIED   : Changed storing of minc history (get args for gyrotominc).
+@MODIFIED   : Revision 2.2  1995-02-09 13:51:26  neelin
+@MODIFIED   : Mods for irix 5 lint.
 @MODIFIED   :
+ * Revision 2.1  1994/10/20  13:48:02  neelin
+ * Write out direction cosines to support rotated volumes.
+ * Store single slices as 1-slice volumes (3D instead of 2D).
+ * Changed storing of minc history (get args for gyrotominc).
+ *
  * Revision 2.0  94/09/28  10:35:21  neelin
  * Release of minc version 0.2
  * 
@@ -79,7 +82,7 @@
 ---------------------------------------------------------------------------- */
 
 #ifndef lint
-static char rcsid[]="$Header: /private-cvsroot/minc/conversion/gcomserver/gcomserver.c,v 2.1 1994-10-20 13:48:02 neelin Exp $";
+static char rcsid[]="$Header: /private-cvsroot/minc/conversion/gcomserver/gcomserver.c,v 2.2 1995-02-09 13:51:26 neelin Exp $";
 #endif
 
 #include <gcomserver.h>
@@ -143,7 +146,7 @@
    /* Re-open stderr if we are logging */
    if (Do_logging > NO_LOGGING) {
       (void) freopen("gcomserver.log", "w", stderr);
-      (void) setbuf(stderr, NULL);
+      setbuf(stderr, NULL);
    }
 
 #ifdef DO_INPUT_TRACING
@@ -425,7 +428,7 @@
    if ((status != ACR_OK) && (status != ACR_END_OF_INPUT)) {
       if (SYSTEM_LOG != NULL) {
          if ((fptemp = fopen(SYSTEM_LOG, "w")) != NULL) {
-            if (strlen(last_file_name) > 0) {
+            if ((int) strlen(last_file_name) > 0) {
                (void) fprintf(fptemp, "%s: File \"%s\"\n",
                               pname, last_file_name);
             }
--- a/conversion/gcomserver/minc_file.c
+++ b/conversion/gcomserver/minc_file.c
@@ -6,11 +6,14 @@
 @CALLS      : 
 @CREATED    : November 26, 1993 (Peter Neelin)
 @MODIFIED   : $Log: minc_file.c,v $
-@MODIFIED   : Revision 2.2  1994-11-21 08:08:01  neelin
-@MODIFIED   : Modified code to properly calculate start from centre locations, then
-@MODIFIED   : changed calculation back to old way because it worked.
-@MODIFIED   : Added a ncsetfill(mincid, NC_NOFILL).
+@MODIFIED   : Revision 2.3  1995-02-09 13:51:26  neelin
+@MODIFIED   : Mods for irix 5 lint.
 @MODIFIED   :
+ * Revision 2.2  1994/11/21  08:08:01  neelin
+ * Modified code to properly calculate start from centre locations, then
+ * changed calculation back to old way because it worked.
+ * Added a ncsetfill(mincid, NC_NOFILL).
+ *
  * Revision 2.1  94/10/20  13:50:15  neelin
  * Write out direction cosines to support rotated volumes.
  * Store single slices as 1-slice volumes (3D instead of 2D).
@@ -83,6 +86,9 @@
 static char *mri_dim_names[] = {
    NULL, "echo_time", MItime, "phase_number", "chemical_shift", NULL};
 
+/* Macros */
+#define STRLEN(s) ((int) strlen(s))
+
 /* ----------------------------- MNI Header -----------------------------------
 @NAME       : create_minc_file
 @INPUT      : minc_file - name of file to create. If NULL, a name is 
@@ -131,7 +137,7 @@
       /* Get patient name */
       string_to_filename(general_info->patient.name, patient_name,
                          sizeof(patient_name));
-      if (strlen(patient_name) == 0) {
+      if (STRLEN(patient_name) == 0) {
          (void) strcpy(patient_name, "unknown");
       }
 
@@ -329,24 +335,24 @@
 
    /* Create image max and min variables */
    varid = micreate_std_variable(mincid, MIimagemin, NC_DOUBLE, ndims-2, dim);
-   if (strlen(general_info->units) > 0)
+   if (STRLEN(general_info->units) > 0)
       (void) miattputstr(mincid, varid, MIunits, general_info->units);
    varid = micreate_std_variable(mincid, MIimagemax, NC_DOUBLE, ndims-2, dim);
-   if (strlen(general_info->units) > 0)
+   if (STRLEN(general_info->units) > 0)
       (void) miattputstr(mincid, varid, MIunits, general_info->units);
 
    /* Create the patient variable */
    varid = micreate_group_variable(mincid, MIpatient);
-   if (strlen(general_info->patient.name) > 0)
+   if (STRLEN(general_info->patient.name) > 0)
       (void) miattputstr(mincid, varid, MIfull_name, 
                          general_info->patient.name);
-   if (strlen(general_info->patient.identification) > 0)
+   if (STRLEN(general_info->patient.identification) > 0)
       (void) miattputstr(mincid, varid, MIidentification, 
                          general_info->patient.identification);
-   if (strlen(general_info->patient.birth_date) > 0)
+   if (STRLEN(general_info->patient.birth_date) > 0)
       (void) miattputstr(mincid, varid, MIbirthdate, 
                          general_info->patient.birth_date);
-   if (strlen(general_info->patient.sex) > 0)
+   if (STRLEN(general_info->patient.sex) > 0)
       (void) miattputstr(mincid, varid, MIsex, 
                          general_info->patient.sex);
    if (general_info->patient.weight != -DBL_MAX) 
@@ -355,34 +361,34 @@
 
    /* Create the study variable */
    varid = micreate_group_variable(mincid, MIstudy);
-   if (strlen(general_info->study.start_time) > 0)
+   if (STRLEN(general_info->study.start_time) > 0)
       (void) miattputstr(mincid, varid, MIstart_time, 
                          general_info->study.start_time);
-   if (strlen(general_info->study.modality) > 0)
+   if (STRLEN(general_info->study.modality) > 0)
       (void) miattputstr(mincid, varid, MImodality, 
                          general_info->study.modality);
-   if (strlen(general_info->study.institution) > 0)
+   if (STRLEN(general_info->study.institution) > 0)
       (void) miattputstr(mincid, varid, MIinstitution, 
                          general_info->study.institution);
-   if (strlen(general_info->study.station_id) > 0)
+   if (STRLEN(general_info->study.station_id) > 0)
       (void) miattputstr(mincid, varid, MIstation_id, 
                          general_info->study.station_id);
-   if (strlen(general_info->study.ref_physician) > 0)
+   if (STRLEN(general_info->study.ref_physician) > 0)
       (void) miattputstr(mincid, varid, MIreferring_physician, 
                          general_info->study.ref_physician);
-   if (strlen(general_info->study.procedure) > 0)
+   if (STRLEN(general_info->study.procedure) > 0)
       (void) miattputstr(mincid, varid, MIprocedure, 
                          general_info->study.procedure);
-   if (strlen(general_info->study.study_id) > 0)
+   if (STRLEN(general_info->study.study_id) > 0)
       (void) miattputstr(mincid, varid, MIstudy_id, 
                          general_info->study.study_id);
-   if (strlen(general_info->study.acquisition_id) > 0)
+   if (STRLEN(general_info->study.acquisition_id) > 0)
       (void) miattputstr(mincid, varid, "acquisition_id", 
                          general_info->study.acquisition_id);
 
    /* Create acquisition variable */
    varid = micreate_group_variable(mincid, MIacquisition);
-   if (strlen(general_info->acq.scan_seq) > 0)
+   if (STRLEN(general_info->acq.scan_seq) > 0)
       (void) miattputstr(mincid, varid, MIscanning_sequence, 
                          general_info->acq.scan_seq);
    if (general_info->acq.rep_time != -DBL_MAX)
@@ -404,10 +410,10 @@
    if (general_info->acq.imaging_freq != -DBL_MAX)
       (void) miattputdbl(mincid, varid, MIimaging_frequency, 
                          general_info->acq.imaging_freq);
-   if (strlen(general_info->acq.imaged_nucl) > 0)
+   if (STRLEN(general_info->acq.imaged_nucl) > 0)
       (void) miattputstr(mincid, varid, MIimaged_nucleus, 
                          general_info->acq.imaged_nucl);
-   if (strlen(general_info->acq.comments) > 0)
+   if (STRLEN(general_info->acq.comments) > 0)
       (void) miattputstr(mincid, varid, MIcomments, 
                          general_info->acq.comments);
 
@@ -417,7 +423,7 @@
    (void) miattputstr(mincid, varid, MIvarid, "MNI SPI information variable");
    (void) miadd_child(mincid, ncvarid(mincid, MIrootvariable), varid);
    (void) miattputint(mincid, varid, "rec_num", general_info->rec_num);
-   if (strlen(general_info->image_type_string) > 0)
+   if (STRLEN(general_info->image_type_string) > 0)
       (void) miattputstr(mincid, varid, "image_type", 
                          general_info->image_type_string);
    (void) miattputdbl(mincid, varid, "window_min", general_info->window_min);
--- a/conversion/gcomserver/open_connection.c
+++ b/conversion/gcomserver/open_connection.c
@@ -4,9 +4,12 @@
 @GLOBALS    : 
 @CREATED    : November 22, 1993 (Peter Neelin)
 @MODIFIED   : $Log: open_connection.c,v $
-@MODIFIED   : Revision 2.3  1995-02-08 19:31:47  neelin
-@MODIFIED   : Moved ARGSUSED statements for irix 5 lint.
+@MODIFIED   : Revision 2.4  1995-02-09 13:51:26  neelin
+@MODIFIED   : Mods for irix 5 lint.
 @MODIFIED   :
+ * Revision 2.3  1995/02/08  19:31:47  neelin
+ * Moved ARGSUSED statements for irix 5 lint.
+ *
  * Revision 2.2  1994/12/07  09:45:59  neelin
  * Fixed called to ioctl to get rid of type mismatch warning messages.
  *
@@ -140,8 +143,8 @@
 @CREATED    : November 22, 1993 (Peter Neelin)
 @MODIFIED   : 
 ---------------------------------------------------------------------------- */
-public int open_connection(int argc, char *argv[], 
-                           Acr_File **afpin, Acr_File **afpout)
+public void open_connection(int argc, char *argv[], 
+                            Acr_File **afpin, Acr_File **afpout)
      /* ARGSUSED */
 {
    SessionData sd;
--- a/conversion/gcomserver/save_transferred_object.c
+++ b/conversion/gcomserver/save_transferred_object.c
@@ -6,9 +6,12 @@
 @CALLS      : 
 @CREATED    : November 24, 1993 (Peter Neelin)
 @MODIFIED   : $Log: save_transferred_object.c,v $
-@MODIFIED   : Revision 2.0  1994-09-28 10:35:33  neelin
-@MODIFIED   : Release of minc version 0.2
+@MODIFIED   : Revision 2.1  1995-02-09 13:51:26  neelin
+@MODIFIED   : Mods for irix 5 lint.
 @MODIFIED   :
+ * Revision 2.0  1994/09/28  10:35:33  neelin
+ * Release of minc version 0.2
+ *
  * Revision 1.6  94/09/28  10:34:58  neelin
  * Pre-release
  * 
@@ -161,7 +164,7 @@
       }
 
       /* Close the file */
-      (void) acr_file_free(afp);
+      acr_file_free(afp);
       (void) fclose(fp);
    }