[8843] in Athena Bugs

home help back first fref pref prev next nref lref last post

Re: dsgrep

daemon@ATHENA.MIT.EDU (lwvanels@Athena.MIT.EDU)
Thu Jan 16 13:51:46 1992

From: lwvanels@Athena.MIT.EDU
Date: Thu, 16 Jan 92 13:50:16 -0500
To: bugs@Athena.MIT.EDU
Cc: bug-discuss@Athena.MIT.EDU
In-Reply-To: [8807]
Reply-To: lwvanels@mit.edu

This patch to discus/dsgrep/dsgrep.c will fix it:

*** /tmp/T0PCMBiI	Thu Jan 16 13:49:15 1992
--- dsgrep.c	Thu Jan 16 13:30:42 1992
***************
*** 62,67 ****
--- 62,69 ----
    char *tmp_buf;
    struct stat statb;
    
+   initialize_dsc_error_table();
+ 
    n_to_look = 50;
    print_trans = 0;
    search_trans = 0;
***************
*** 159,165 ****
  	continue;
        }
        if (result != 0) {
! 	fprintf(stderr,"dsgrep: error %d expanding meeting %s\n",result,argv[i]);
  	exit(1);
        }
        bcopy((char *)tmp_mtg,(char *)&meetings[cur_meeting],sizeof(name_blk));
--- 161,168 ----
  	continue;
        }
        if (result != 0) {
! 	fprintf(stderr,"dsgrep: error expanding meeting %s: %s\n",
! 		argv[i],error_message(result));
  	exit(1);
        }
        bcopy((char *)tmp_mtg,(char *)&meetings[cur_meeting],sizeof(name_blk));
***************
*** 177,184 ****
    for(i=0;i<cur_meeting;i++) {
      dsc_get_mtg_info(&meetings[i],&meeting_info[i],&result);
       if (result != 0) {
!        fprintf(stderr,"dsgrep: error %d getting meeting info for meeting %s:%s\n",
!              result, meetings[i].hostname, meetings[i].pathname);
       }
      if (trans_num != 0) {
        low = trans_num;
--- 180,189 ----
    for(i=0;i<cur_meeting;i++) {
      dsc_get_mtg_info(&meetings[i],&meeting_info[i],&result);
       if (result != 0) {
!        fprintf(stderr,"dsgrep: error getting meeting info for meeting '%s:%s': %s\n",
! 	       meetings[i].hostname, meetings[i].pathname,
! 	       error_message(result));
!        continue;
       }
      if (trans_num != 0) {
        low = trans_num;
***************
*** 191,199 ****
      for(j=low;j<=high;j++)
        {
  	dsc_get_trn_info2(&meetings[i],j,&ti,&result);
! 	if ((result != 0) && verbose_errors) {
! 	  fprintf(stderr,"dsgrep: error %d getting transaction info for %s[%d]\n",
! 		  result, (char *) (rindex(meetings[i].pathname,'/')+1),j);
  	}
  	if (!search_deleted && (ti.flags & TRN_FDELETED))
  	  continue;
--- 196,207 ----
      for(j=low;j<=high;j++)
        {
  	dsc_get_trn_info2(&meetings[i],j,&ti,&result);
! 	if (result != 0) {
! 	  if (verbose_errors)
! 	    fprintf(stderr,"dsgrep: error getting transaction info for %s[%d]: %s\n",
! 		    (char *) (rindex(meetings[i].pathname,'/')+1), j,
! 		    error_message(result));
! 	  continue;
  	}
  	if (!search_deleted && (ti.flags & TRN_FDELETED))
  	  continue;
***************
*** 206,213 ****
  	  if (print_trans) {
  	    dsc_get_trn(&meetings[i],j,tf,&result);
  	    if ((result != 0) && verbose_errors)
! 	      fprintf(stderr,"dsgrep: error %d getting transaction %s[%d]\n",
! 		      result,(char *) (rindex(meetings[i].pathname,'/')+1),j );
  	    printf("*** End of Transaction ***\n");
  	  }
  	}
--- 214,222 ----
  	  if (print_trans) {
  	    dsc_get_trn(&meetings[i],j,tf,&result);
  	    if ((result != 0) && verbose_errors)
! 	      fprintf(stderr,"dsgrep: error getting transaction %s[%d]: %s\n",
! 		      (char *) (rindex(meetings[i].pathname,'/')+1), j,
! 		      error_message(result));
  	    printf("*** End of Transaction ***\n");
  	  }
  	}
***************
*** 240,247 ****
    tf = mem_tfile(buffer,bsize);
    dsc_get_trn(&nbp,trans_no,tf,&result);
    if ((result != 0) && verbose_errors){
!     fprintf(stderr,"dsgrep: error %d getting transation %s[%d]\n", result,
! 	    (char *) (rindex(nbp.pathname,'/')+1),trans_no);
    }
    tdestroy(tf);
    buffer[n_chars-1] = '\0';
--- 249,257 ----
    tf = mem_tfile(buffer,bsize);
    dsc_get_trn(&nbp,trans_no,tf,&result);
    if ((result != 0) && verbose_errors){
!     fprintf(stderr,"dsgrep: error getting transation %s[%d]: %s\n",
! 	    (char *) (rindex(nbp.pathname,'/')+1),trans_no,
! 	    error_message(result));
    }
    tdestroy(tf);
    buffer[n_chars-1] = '\0';

home help back first fref pref prev next nref lref last post