Lines Matching refs:inf

949   struct file_data inf[2];
971 bzero (inf, sizeof (inf));
976 inf[0].desc = name0 == 0 ? -1 : -2;
977 inf[1].desc = name1 == 0 ? -1 : -2;
986 inf[0].name = dir0 == 0 ? name0 : (free0 = dir_file_pathname (dir0, name0));
987 inf[1].name = dir1 == 0 ? name1 : (free1 = dir_file_pathname (dir1, name1));
993 if (inf[i].desc != -1)
997 if (i && filename_cmp (inf[i].name, inf[0].name) == 0)
999 inf[i].stat = inf[0].stat;
1002 else if (strcmp (inf[i].name, "-") == 0)
1004 inf[i].desc = STDIN_FILENO;
1005 stat_result = fstat (STDIN_FILENO, &inf[i].stat);
1006 if (stat_result == 0 && S_ISREG (inf[i].stat.st_mode))
1013 if (pos <= inf[i].stat.st_size)
1014 inf[i].stat.st_size -= pos;
1016 inf[i].stat.st_size = 0;
1018 time (&inf[i].stat.st_mtime);
1023 stat_result = stat (inf[i].name, &inf[i].stat);
1027 perror_with_name (inf[i].name);
1032 inf[i].dir_p = S_ISDIR (inf[i].stat.st_mode) && inf[i].desc != 0;
1033 if (inf[1 - i].desc == -1)
1035 inf[1 - i].dir_p = inf[i].dir_p;
1036 inf[1 - i].stat.st_mode = inf[i].stat.st_mode;
1042 if (! failed && depth == 0 && inf[0].dir_p != inf[1].dir_p)
1047 int fnm_arg = inf[0].dir_p;
1049 char const *fnm = inf[fnm_arg].name;
1050 char const *dir = inf[dir_arg].name;
1052 char const *filename = inf[dir_arg].name
1058 if (stat (filename, &inf[dir_arg].stat) != 0)
1064 inf[dir_arg].dir_p = S_ISDIR (inf[dir_arg].stat.st_mode);
1075 else if ((same_files = inf[0].desc != -1 && inf[1].desc != -1
1076 && 0 < same_file (&inf[0].stat, &inf[1].stat))
1084 else if (inf[0].dir_p & inf[1].dir_p)
1096 inf[0].name, inf[1].name);
1101 val = diff_dirs (inf, compare_files, depth);
1105 else if ((inf[0].dir_p | inf[1].dir_p)
1107 && (! S_ISREG (inf[0].stat.st_mode)
1108 || ! S_ISREG (inf[1].stat.st_mode))))
1113 if (inf[0].desc == -1 || inf[1].desc == -1)
1115 if ((inf[0].dir_p | inf[1].dir_p)
1118 || (unidirectional_new_file_flag && inf[0].desc == -1)))
1119 val = diff_dirs (inf, compare_files, depth);
1122 char const *dir = (inf[0].desc == -1) ? dir1 : dir0;
1134 inf[0].name, filetype (&inf[0].stat),
1135 inf[1].name, filetype (&inf[1].stat));
1142 && inf[0].stat.st_size != inf[1].stat.st_size
1143 && (inf[0].desc == -1 || S_ISREG (inf[0].stat.st_mode))
1144 && (inf[1].desc == -1 || S_ISREG (inf[1].stat.st_mode)))
1146 message ("Files %s and %s differ\n", inf[0].name, inf[1].name);
1155 if (inf[0].desc == -2)
1156 if ((inf[0].desc = open (inf[0].name, O_RDONLY, 0)) < 0)
1158 perror_with_name (inf[0].name);
1161 if (inf[1].desc == -2)
1164 inf[1].desc = inf[0].desc;
1165 else if ((inf[1].desc = open (inf[1].name, O_RDONLY, 0)) < 0)
1167 perror_with_name (inf[1].name);
1175 if (0 <= inf[i].desc)
1176 setmode (inf[i].desc, O_BINARY);
1181 val = failed ? 2 : diff_2_files (inf, depth);
1185 if (inf[0].desc >= 0 && close (inf[0].desc) != 0)
1187 perror_with_name (inf[0].name);
1190 if (inf[1].desc >= 0 && inf[0].desc != inf[1].desc
1191 && close (inf[1].desc) != 0)
1193 perror_with_name (inf[1].name);
1201 if (val == 0 && !inf[0].dir_p)
1205 inf[0].name, inf[1].name);