Changeset 40 for trunk/src/sh_hash.c
- Timestamp:
- May 31, 2006, 9:38:30 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_hash.c
r34 r40 1998 1998 p.linkmode = (UINT32) buf->linkmode; 1999 1999 p.hardlinks = (UINT32) buf->hardlinks; 2000 p.dev = (UINT64) buf->dev; 2001 p.rdev = (UINT64) buf->rdev; 2000 2002 p.mode = (UINT32) buf->mode; 2001 2003 p.ino = (UINT32) buf->ino; … … 2059 2061 #endif 2060 2062 2061 #ifndef PRIi64 2062 #define PRIi64 "lld" 2063 #ifndef PRIu64 2064 #ifdef HAVE_LONG_32 2065 #define PRIu64 "llu" 2066 #else 2067 #define PRIu64 "lu" 2068 #endif 2063 2069 #endif 2064 2070 … … 2072 2078 #ifdef SH_USE_XML 2073 2079 sl_snprintf(form_rval, 80, _("%s%s%s%s%s"), 2074 _("size_old=\"%"), PRI i64, _("\" size_new=\"%"), PRIi64, "\" ");2080 _("size_old=\"%"), PRIu64, _("\" size_new=\"%"), PRIu64, "\" "); 2075 2081 #else 2076 2082 sl_snprintf(form_rval, 80, _("%s%s%s%s%s"), 2077 _("size_old=<%"), PRI i64, _(">, size_new=<%"), PRIi64, ">, ");2083 _("size_old=<%"), PRIu64, _(">, size_new=<%"), PRIu64, ">, "); 2078 2084 #endif 2079 2085 … … 2124 2130 2125 2131 if (is_new) 2126 format = _("hardlinks_new=\"%l d\" ");2127 else 2128 format = _("hardlinks_old=\"%l d\" ");2132 format = _("hardlinks_new=\"%lu\" "); 2133 else 2134 format = _("hardlinks_old=\"%lu\" "); 2129 2135 sl_snprintf(tmp, SH_BUFSIZE, format, 2130 2136 (unsigned long) theFile->hardlinks); … … 2133 2139 2134 2140 if (is_new) 2135 format = _("idevice_new=\"%l d\" ");2136 else 2137 format = _("idevice_old=\"%l d\" ");2141 format = _("idevice_new=\"%lu\" "); 2142 else 2143 format = _("idevice_old=\"%lu\" "); 2138 2144 sl_snprintf(tmp, SH_BUFSIZE, format, (unsigned long) theFile->rdev); 2139 2145 sl_strlcat(msg, tmp, SH_BUFSIZE); … … 2141 2147 2142 2148 if (is_new) 2143 format = _("inode_new=\"%l d\" ");2144 else 2145 format = _("inode_old=\"%l d\" ");2149 format = _("inode_new=\"%lu\" "); 2150 else 2151 format = _("inode_old=\"%lu\" "); 2146 2152 sl_snprintf(tmp, SH_BUFSIZE, format, (unsigned long) theFile->ino); 2147 2153 sl_strlcat(msg, tmp, SH_BUFSIZE); 2154 2155 /* 2156 * also report device for prelude 2157 */ 2158 #if defined(HAVE_LIBPRELUDE) && defined(HAVE_LIBPRELUDE_9) 2159 if (is_new) 2160 format = _("dev_new=\"%lu,%lu\" "); 2161 else 2162 format = _("dev_old=\"%lu,%lu\" "); 2163 sl_snprintf(tmp, SH_BUFSIZE, format, 2164 (unsigned long) major(theFile->dev), 2165 (unsigned long) minor(theFile->dev)); 2166 sl_strlcat(msg, tmp, SH_BUFSIZE); 2167 #endif 2148 2168 2149 2169 … … 2261 2281 2262 2282 if (is_new) 2263 format = _("hardlinks_new=<%l d>, ");2264 else 2265 format = _("hardlinks_old=<%l d>, ");2283 format = _("hardlinks_new=<%lu>, "); 2284 else 2285 format = _("hardlinks_old=<%lu>, "); 2266 2286 sl_snprintf(tmp, SH_BUFSIZE, format, 2267 2287 (unsigned long) theFile->hardlinks); … … 2270 2290 2271 2291 if (is_new) 2272 format = _("idevice_new=<%l d>, ");2273 else 2274 format = _("idevice_old=<%l d>, ");2292 format = _("idevice_new=<%lu>, "); 2293 else 2294 format = _("idevice_old=<%lu>, "); 2275 2295 sl_snprintf(tmp, SH_BUFSIZE, format, (unsigned long) theFile->rdev); 2276 2296 sl_strlcat(msg, tmp, SH_BUFSIZE); … … 2278 2298 2279 2299 if (is_new) 2280 format = _("inode_new=<%l d>, ");2281 else 2282 format = _("inode_old=<%l d>, ");2300 format = _("inode_new=<%lu>, "); 2301 else 2302 format = _("inode_old=<%lu>, "); 2283 2303 sl_snprintf(tmp, SH_BUFSIZE, format, (unsigned long) theFile->ino); 2284 2304 sl_strlcat(msg, tmp, SH_BUFSIZE); 2285 2305 2306 2307 /* 2308 * also report device for prelude 2309 */ 2310 #if defined(HAVE_LIBPRELUDE) && defined(HAVE_LIBPRELUDE_9) 2311 if (is_new) 2312 format = _("dev_new=<%lu,%lu>, "); 2313 else 2314 format = _("dev_old=<%lu,%lu>, "); 2315 sl_snprintf(tmp, SH_BUFSIZE, format, 2316 (unsigned long) major(theFile->dev), 2317 (unsigned long) minor(theFile->dev)); 2318 sl_strlcat(msg, tmp, SH_BUFSIZE); 2319 #endif 2286 2320 2287 2321 if (is_new) … … 2729 2763 sl_snprintf(tmp, SH_BUFSIZE, 2730 2764 #ifdef SH_USE_XML 2731 _("hardlinks_old=\"%l d\" hardlinks_new=\"%ld\" "),2732 #else 2733 _("hardlinks_old=<%l d>, hardlinks_new=<%ld>, "),2765 _("hardlinks_old=\"%lu\" hardlinks_new=\"%lu\" "), 2766 #else 2767 _("hardlinks_old=<%lu>, hardlinks_new=<%lu>, "), 2734 2768 #endif 2735 2769 (unsigned long) p->theFile.hardlinks, … … 2746 2780 sl_snprintf(tmp, SH_BUFSIZE, 2747 2781 #ifdef SH_USE_XML 2748 _("device_old=\"%l d,%ld\" device_new=\"%ld,%ld\" idevice_old=\"%ld\" idevice_new=\"%ld\" "),2749 #else 2750 _("device_old=<%l d,%ld>, device_new=<%ld,%ld>, "),2782 _("device_old=\"%lu,%lu\" device_new=\"%lu,%lu\" idevice_old=\"%lu\" idevice_new=\"%lu\" "), 2783 #else 2784 _("device_old=<%lu,%lu>, device_new=<%lu,%lu>, "), 2751 2785 #endif 2752 2786 (unsigned long) major(p->theFile.rdev), … … 2770 2804 sl_snprintf(tmp, SH_BUFSIZE, 2771 2805 #ifdef SH_USE_XML 2772 _("inode_old=\"%l d\" inode_new=\"%ld\" "),2773 #else 2774 _("inode_old=<%l d>, inode_new=<%ld>, "),2806 _("inode_old=\"%lu\" inode_new=\"%lu\" "), 2807 #else 2808 _("inode_old=<%lu>, inode_new=<%lu>, "), 2775 2809 #endif 2776 2810 (unsigned long) p->theFile.ino, … … 2779 2813 #ifdef REPLACE_OLD 2780 2814 if (sh.flag.reportonce == S_TRUE && sh.flag.update == S_FALSE) 2781 p->theFile.ino = theFile->ino; 2782 #endif 2783 } 2815 { 2816 p->theFile.ino = theFile->ino; 2817 p->theFile.dev = theFile->dev; 2818 } 2819 #endif 2820 } 2821 2822 2823 /* 2824 * also report device for prelude 2825 */ 2826 #if defined(HAVE_LIBPRELUDE) && defined(HAVE_LIBPRELUDE_9) 2827 if ((modi_mask & MODI_INO) != 0) 2828 { 2829 sl_snprintf(tmp, SH_BUFSIZE, 2830 #ifdef SH_USE_XML 2831 _("dev_old=\"%lu,%lu\" dev_new=\"%lu,%lu\" "), 2832 #else 2833 _("dev_old=<%lu,%lu>, dev_new=<%lu,%lu>, "), 2834 #endif 2835 (unsigned long) major(p->theFile.dev), 2836 (unsigned long) minor(p->theFile.dev), 2837 (unsigned long) major(theFile->dev), 2838 (unsigned long) minor(theFile->dev) 2839 ); 2840 sl_strlcat(msg, tmp, SH_BUFSIZE); 2841 #ifdef REPLACE_OLD 2842 if (sh.flag.reportonce == S_TRUE && sh.flag.update == S_FALSE) 2843 p->theFile.dev = theFile->dev; 2844 #endif 2845 } 2846 #endif 2784 2847 2785 2848 if ( ((modi_mask & MODI_USR) != 0) … … 2790 2853 { 2791 2854 #ifdef SH_USE_XML 2792 sl_snprintf(tmp, SH_BUFSIZE, _("owner_old=\"%s\" owner_new=\"%s\" iowner_old=\"%ld\" iowner_new=\"%ld\" "),2793 #else 2794 sl_snprintf(tmp, SH_BUFSIZE, _("owner_old=<%s>, owner_new=<%s>, "), 2795 #endif 2796 p->theFile.c_owner, theFile->c_owner2797 # ifdef SH_USE_XML2798 , (long) p->theFile.owner, (long) theFile->owner2799 #endif 2855 sl_snprintf(tmp, SH_BUFSIZE, 2856 _("owner_old=\"%s\" owner_new=\"%s\" iowner_old=\"%ld\" iowner_new=\"%ld\" "), 2857 #else 2858 sl_snprintf(tmp, SH_BUFSIZE, 2859 _("owner_old=<%s>, owner_new=<%s>, iowner_old=<%ld>, iowner_new=<%ld>, "), 2860 #endif 2861 p->theFile.c_owner, theFile->c_owner, 2862 (long) p->theFile.owner, (long) theFile->owner 2800 2863 ); 2801 2864 sl_strlcat(msg, tmp, SH_BUFSIZE); … … 2818 2881 { 2819 2882 #ifdef SH_USE_XML 2820 sl_snprintf(tmp, SH_BUFSIZE, _("group_old=\"%s\" group_new=\"%s\" igroup_old=\"%ld\" igroup_new=\"%ld\" "), 2883 sl_snprintf(tmp, SH_BUFSIZE, 2884 _("group_old=\"%s\" group_new=\"%s\" igroup_old=\"%ld\" igroup_new=\"%ld\" "), 2821 2885 p->theFile.c_group, theFile->c_group, 2822 2886 (long) p->theFile.group, (long) theFile->group); 2823 2887 #else 2824 sl_snprintf(tmp, SH_BUFSIZE, _("group_old=<%s>, group_new=<%s>, "), 2825 p->theFile.c_group, theFile->c_group); 2888 sl_snprintf(tmp, SH_BUFSIZE, 2889 _("group_old=<%s>, group_new=<%s>, igroup_old=<%ld>, igroup_new=<%ld>, "), 2890 p->theFile.c_group, theFile->c_group, 2891 (long) p->theFile.group, (long) theFile->group); 2826 2892 #endif 2827 2893 … … 3153 3219 if (ListWithDelimiter == S_TRUE) 3154 3220 { 3155 printf(_("%7ld, % 10s, %5d, %12s, %5d, %3d, %-8s, %5d, %-8s, %5d, "),3156 (unsigned long) p->theFile.ino, 3221 printf(_("%7ld, %7ld, %10s, %5d, %12s, %5d, %3d, %-8s, %5d, %-8s, %5d, "), 3222 (unsigned long) p->theFile.ino, (unsigned long) p->theFile.dev, 3157 3223 p->theFile.c_mode, (int) p->theFile.mode, 3158 3224 p->theFile.c_attributes, (int) p->theFile.attributes, … … 3163 3229 else 3164 3230 { 3165 printf(_("%7ld % 10s %5d %12s %5d %3d %-8s %5d %-8s %5d "),3166 (unsigned long) p->theFile.ino, 3231 printf(_("%7ld %7ld %10s %5d %12s %5d %3d %-8s %5d %-8s %5d "), 3232 (unsigned long) p->theFile.ino, (unsigned long) p->theFile.dev, 3167 3233 p->theFile.c_mode, (int) p->theFile.mode, 3168 3234 p->theFile.c_attributes, (int) p->theFile.attributes, … … 3173 3239 3174 3240 if ('c' == p->theFile.c_mode[0] || 'b' == p->theFile.c_mode[0]) 3175 sl_snprintf(str, 80, "%"PRI i64, p->theFile.rdev);3176 else 3177 sl_snprintf(str, 80, "%"PRI i64, p->theFile.size);3241 sl_snprintf(str, 80, "%"PRIu64, p->theFile.rdev); 3242 else 3243 sl_snprintf(str, 80, "%"PRIu64, p->theFile.size); 3178 3244 3179 3245 printf( _(" %8s"), str);
Note:
See TracChangeset
for help on using the changeset viewer.