This commit is contained in:
tTh 2022-11-27 10:29:55 +01:00
parent 690eb06973
commit 34ed1e8121
4 changed files with 9 additions and 12 deletions

View File

@ -51,8 +51,7 @@ hexdiff: Makefile $(OBJECTS)
install:
cp hexdiff hexdiff.install
strip hexdiff.install
cp hexdiff.install $(OU_LE_METTRE)/bin/hexdiff
rm hexdiff.install
mv hexdiff.install $(OU_LE_METTRE)/bin/hexdiff
cp hexdiff.1 $(OU_LE_METTRE)/man/man1/hexdiff.1
@echo "you can copy hexdiff.rc in your HOME as .hexdiffrc"

View File

@ -28,9 +28,9 @@
static void prtime(time_t t, char *pstr)
{
struct tm *ptm;
int foo;
ptm = gmtime(&t);
foo = strftime(pstr, 99, "%Y-%m-%d %H:%M:%S", ptm);
strftime(pstr, 99, "%Y-%m-%d %H:%M:%S", ptm);
}
/*----------------------------------------------------------------*/
#define W_FILEINFO 48

View File

@ -33,17 +33,14 @@ struct stat statbuf;
Fichier *fichier;
long offset;
if ( (fd=open(nom, O_RDONLY)) < 0)
{
if ( (fd=open(nom, O_RDONLY)) < 0) {
return 0;
}
if (fenetre_active==0)
{
if (fenetre_active==0) {
fichier = &f1; offset = f2.offset;
}
else
{
else {
fichier = &f2; offset = f1.offset;
}
@ -57,6 +54,7 @@ close(fichier->fd);
*/
strncpy(fichier->nom, nom, T_NOM);
foo = fstat(fd, &statbuf);
if (foo) perror(__func__);
fichier->fd = fd;
fichier->taille = statbuf.st_size;
fichier->offset = offset;

View File

@ -45,6 +45,7 @@ static int teste_dirent(const struct dirent *de, struct stat *pstat)
int foo;
foo = stat(de->d_name, pstat);
if (foo) perror(__func__);
if (S_ISDIR(pstat->st_mode))
return 0;
@ -109,7 +110,6 @@ static int liste_fichiers(WINDOW *win, int flag)
DIR *dir;
struct dirent *de;
struct stat statbuf;
int foo;
/*
* initializing local vars, for list-of-files
@ -154,7 +154,7 @@ while ( (de=readdir(dir)) != NULL)
}
}
foo = closedir(dir);
closedir(dir);
return nombre;
}