mirror of
				git://git.code.sf.net/p/cdesktopenv/code
				synced 2025-03-09 15:50:02 +00:00 
			
		
		
		
	libtt: Resolve all remaining format-security warnings.
This commit is contained in:
		
							parent
							
								
									8c8a5380ca
								
							
						
					
					
						commit
						8479d150e2
					
				
					 7 changed files with 21 additions and 21 deletions
				
			
		| 
						 | 
				
			
			@ -157,7 +157,7 @@ print(FILE *f) const
 | 
			
		|||
			(char *)_sel_filename);
 | 
			
		||||
	}
 | 
			
		||||
	if (_sel_objid_p) {
 | 
			
		||||
		fprintf(f,catgets(_ttcatd, 6, 8, "Select by objid key:"));
 | 
			
		||||
		fprintf(f, "%s", catgets(_ttcatd, 6, 8, "Select by objid key:"));
 | 
			
		||||
		_sel_objid_key->print(f);
 | 
			
		||||
		fprintf(f,"\n");
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -166,25 +166,25 @@ print(FILE *f) const
 | 
			
		|||
			(char *)_sel_type);
 | 
			
		||||
	}
 | 
			
		||||
	if (_diag_badform_p) {
 | 
			
		||||
		fprintf(f,catgets(_ttcatd, 6, 10,
 | 
			
		||||
		fprintf(f, "%s", catgets(_ttcatd, 6, 10,
 | 
			
		||||
				  "Diagnose badly formed entities\n"));
 | 
			
		||||
	}
 | 
			
		||||
	if (_diag_exist_p) {
 | 
			
		||||
		fprintf(f,catgets(_ttcatd, 6, 11, "Diagnose references to "
 | 
			
		||||
		fprintf(f, "%s", catgets(_ttcatd, 6, 11, "Diagnose references to "
 | 
			
		||||
				  "non-existent entities\n"));
 | 
			
		||||
	}
 | 
			
		||||
	if (_disp_id_p) {
 | 
			
		||||
		fprintf(f,catgets(_ttcatd, 6, 12, "Display ids\n"));
 | 
			
		||||
		fprintf(f, "%s", catgets(_ttcatd, 6, 12, "Display ids\n"));
 | 
			
		||||
	}
 | 
			
		||||
	if (_disp_mand_p) {
 | 
			
		||||
		fprintf(f,catgets(_ttcatd, 6, 13, "Display mandatory data\n"));
 | 
			
		||||
		fprintf(f, "%s", catgets(_ttcatd, 6, 13, "Display mandatory data\n"));
 | 
			
		||||
	}
 | 
			
		||||
	if (_disp_prop_p) {
 | 
			
		||||
		fprintf(f,catgets(_ttcatd, 6, 14,
 | 
			
		||||
		fprintf(f, "%s", catgets(_ttcatd, 6, 14,
 | 
			
		||||
				  "Display properties and values data\n"));
 | 
			
		||||
	}
 | 
			
		||||
	if (_repair_netisam_p) {
 | 
			
		||||
		fprintf(f,catgets(_ttcatd, 6, 15,
 | 
			
		||||
		fprintf(f, "%s", catgets(_ttcatd, 6, 15,
 | 
			
		||||
				  "Invoke NetISAM isrepair() function before "
 | 
			
		||||
				  "inspecting\n"));
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -194,7 +194,7 @@ print(FILE *f) const
 | 
			
		|||
			(char *)_repair_type);
 | 
			
		||||
	}	
 | 
			
		||||
	if (_repair_delete_p) {
 | 
			
		||||
		fprintf(f,catgets(_ttcatd, 6, 17, "Repair by deleting\n"));
 | 
			
		||||
		fprintf(f, "%s", catgets(_ttcatd, 6, 17, "Repair by deleting\n"));
 | 
			
		||||
	}
 | 
			
		||||
	fprintf(f,catgets(_ttcatd, 6, 18, "Debugging printout level %d\n"),
 | 
			
		||||
		_debug_level);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -280,11 +280,11 @@ process_spec()
 | 
			
		|||
	        // way through and put the spec on the repair list.
 | 
			
		||||
 | 
			
		||||
		if ((bad_flags & BAD_NOFILE)!=0) {
 | 
			
		||||
			printf(catgets(_ttcatd, 6, 20,
 | 
			
		||||
			printf("%s", catgets(_ttcatd, 6, 20,
 | 
			
		||||
				       "Error: no file for spec.\n"));
 | 
			
		||||
		}
 | 
			
		||||
		if ((bad_flags & BAD_NOTYPE)!=0) {
 | 
			
		||||
			printf(catgets(_ttcatd, 6, 21,
 | 
			
		||||
			printf("%s", catgets(_ttcatd, 6, 21,
 | 
			
		||||
				       "Error: no type for spec.\n"));
 | 
			
		||||
		}
 | 
			
		||||
		if ((bad_flags & BAD_TYPE)!=0) {
 | 
			
		||||
| 
						 | 
				
			
			@ -293,16 +293,16 @@ process_spec()
 | 
			
		|||
			       type.operator const char *());
 | 
			
		||||
		}
 | 
			
		||||
		if ((bad_flags & BAD_MULTITYPE)!=0) {
 | 
			
		||||
			printf(catgets(_ttcatd, 6, 23,"Error: spec has multiple "
 | 
			
		||||
			printf("%s", catgets(_ttcatd, 6, 23,"Error: spec has multiple "
 | 
			
		||||
				       "values for type property.\n"));
 | 
			
		||||
		}
 | 
			
		||||
		if ((bad_flags & BAD_FILE_STAT)!=0) {
 | 
			
		||||
			printf(catgets(_ttcatd, 6, 24,"Error: "));
 | 
			
		||||
			printf("%s", catgets(_ttcatd, 6, 24,"Error: "));
 | 
			
		||||
			printf("%s: %s", (char *)filename, strerror(save_errno));
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if ((bad_flags & BAD_TYPED_FILESPEC)!=0) {
 | 
			
		||||
			printf(catgets(_ttcatd, 6, 26,"Error: "));
 | 
			
		||||
			printf("%s", catgets(_ttcatd, 6, 26,"Error: "));
 | 
			
		||||
			printf("%s: internal spec for file has an otype.\n",
 | 
			
		||||
			       (char *)filename);
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -142,7 +142,7 @@ main(int argc, char **argv)
 | 
			
		|||
 | 
			
		||||
	if (!opts->set_opts(argc, argv))
 | 
			
		||||
	{
 | 
			
		||||
		fprintf(stderr, catgets(_ttcatd, 6, 2,
 | 
			
		||||
		fprintf(stderr, "%s", catgets(_ttcatd, 6, 2,
 | 
			
		||||
"Usage:\n"
 | 
			
		||||
"ttdbck [-f file] [-k objkey] [-t type] [-bx] \n"
 | 
			
		||||
"[-impa] [-IZ] [-F newfilename] [-T newtype] [mountpoints]\n"));
 | 
			
		||||
| 
						 | 
				
			
			@ -156,7 +156,7 @@ main(int argc, char **argv)
 | 
			
		|||
	if (opts->repairing_p() &&
 | 
			
		||||
	    !opts->selecting_p() &&
 | 
			
		||||
	    !opts->diagnosing_p()) {
 | 
			
		||||
		fprintf(stderr,
 | 
			
		||||
		fprintf(stderr, "%s",
 | 
			
		||||
			catgets(_ttcatd, 6, 3,
 | 
			
		||||
				"ttdbck: you must specify a selection "
 | 
			
		||||
				"[-fkt] option or a diagnosis [-bx] option\n"
 | 
			
		||||
| 
						 | 
				
			
			@ -201,7 +201,7 @@ main(int argc, char **argv)
 | 
			
		|||
	// already been output.
 | 
			
		||||
 | 
			
		||||
	if (status==0) {
 | 
			
		||||
		fprintf(stderr,
 | 
			
		||||
		fprintf(stderr, "%s",
 | 
			
		||||
			catgets(_ttcatd, 6, 25,
 | 
			
		||||
				"ttdbck: no errors found.\n"));
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -592,7 +592,7 @@ pisamerr(const char *func, const char *name)
 | 
			
		|||
	}
 | 
			
		||||
	switch (iserrno) {
 | 
			
		||||
	      case EBADFILE:
 | 
			
		||||
		fprintf(stderr,
 | 
			
		||||
		fprintf(stderr, "%s",
 | 
			
		||||
			catgets(_ttcatd, 6, 6,
 | 
			
		||||
				"ttdbck: try 'ttdbck -I'.\n"));
 | 
			
		||||
		break;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -466,7 +466,7 @@ usage(FILE *fs) const
 | 
			
		|||
			 "       %s -h\n"),
 | 
			
		||||
		 (char *)_prog_name, (char *)_prog_name, (char *)_prog_name,
 | 
			
		||||
		 (char *)_prog_name );
 | 
			
		||||
	fprintf( fs,
 | 
			
		||||
	fprintf( fs, "%s",
 | 
			
		||||
		 catgets(_ttcatd, 8, 14,
 | 
			
		||||
			 "\t-L      do not perform a cp(1)\n"
 | 
			
		||||
			 "\t-v      print the version number and quit\n"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -382,7 +382,7 @@ usage(FILE *fs) const
 | 
			
		|||
			 "       %s -h\n"),
 | 
			
		||||
		 (char *)_prog_name, (char *)_prog_name, (char *)_prog_name,
 | 
			
		||||
		 (char *)_prog_name );
 | 
			
		||||
	fprintf( fs,
 | 
			
		||||
	fprintf( fs, "%s",
 | 
			
		||||
		 catgets(_ttcatd, 8, 6,
 | 
			
		||||
			 "\t-L      do not perform a mv(1)\n"
 | 
			
		||||
			 "\t-v      print the version number and quit\n"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -474,7 +474,7 @@ check_cycle(_Tt_otype_ptr otype, _Tt_otype **path, int top)
 | 
			
		|||
		} else {
 | 
			
		||||
			for (int i = 0; i <= top-1; i++) {
 | 
			
		||||
				if (path[i] == anc_otype.c_pointer()) {
 | 
			
		||||
					fprintf(stderr,
 | 
			
		||||
					fprintf(stderr, "%s",
 | 
			
		||||
						catgets(_ttcatd, 4, 38, "cyclic otype inheritance hierarchy -\n  {"));
 | 
			
		||||
					for (int j = i; j <= top-1; j++) {
 | 
			
		||||
						fprintf(stderr,"  %s", (char *) path[j]->otid());
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -551,7 +551,7 @@ usage( FILE *fs ) const
 | 
			
		|||
			 "       %s -h\n"),
 | 
			
		||||
		 (char *)_prog_name, (char *)_prog_name, (char *)_prog_name,
 | 
			
		||||
		 (char *)_prog_name );
 | 
			
		||||
	fprintf( fs,
 | 
			
		||||
	fprintf( fs, "%s",
 | 
			
		||||
		 catgets(_ttcatd, 7, 3,
 | 
			
		||||
			 "\tc       create an archive\n"
 | 
			
		||||
			 "\tt       list an archive's contents\n"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue