+# include <wchar.h>
+# endif
+
- /* A `struct linebuffer' holds a line of text. */
+ /* A 'struct linebuffer' holds a line of text. */
struct linebuffer
@@ -28,6 +33,9 @@ struct linebuffer
static void getoptarg (char *arg, char switch_char, char *character,
+ int *character_length, int *character_width,
int *number);
- void usage (int status);
static void print_files (int number_of_files, char **av);
+ static void init_parameters (int number_of_files);
@@ -439,7 +491,6 @@ static void store_char (char c);
static void pad_down (int lines);
static void read_rest_of_line (COLUMN *p);
{
width = TAB_WIDTH (chars_per_c, input_position);
-@@ -2741,6 +2942,154 @@ char_to_clump (char c)
+@@ -2741,6 +2942,155 @@ char_to_clump (char c)
return chars;
}
+static int
+char_to_clump_multi (char c)
+{
++ unsigned char uc = c;
+ static size_t mbc_pos = 0;
+ static char mbc[MB_LEN_MAX] = {'\0'};
+ static mbstate_t state = {'\0'};
+ width += 4;
+ chars += 4;
+ *s++ = '\\';
-+ sprintf (esc_buff, "%03o", c);
++ sprintf (esc_buff, "%03o", uc);
+ for (j = 0; j <= 2; ++j)
+ *s++ = (int) esc_buff[j];
+ }
+ width += 4;
+ chars += 4;
+ *s++ = '\\';
-+ sprintf (esc_buff, "%03o", c);
++ sprintf (esc_buff, "%03o", uc);
+ for (j = 0; j <= 2; ++j)
+ *s++ = (int) esc_buff[j];
+ }
+}
+#endif /* HAV_EMBRTOWC */
+
- static int
- general_numcompare (char const *sa, char const *sb)
- {
+ /* Work around a problem whereby the long double value returned by glibc's
+ strtold ("NaN", ...) contains uninitialized bits: clear all bytes of
+ A and B before calling strtold. FIXME: remove this function once
@@ -1942,7 +2305,7 @@ general_numcompare (char const *sa, char
Return 0 if the name in S is not recognized. */
+Change the SELinux security context of each FILE to CONTEXT.\n\
With --reference, change the security context of each FILE to that of RFILE.\n\
\n\
- -h, --no-dereference affect symbolic links instead of any referenced file\n\
+ "), stdout);
diff -urNp coreutils-8.13-orig/src/copy.c coreutils-8.13/src/copy.c
--- coreutils-8.13-orig/src/copy.c 2011-07-28 12:38:27.000000000 +0200
+++ coreutils-8.13/src/copy.c 2011-09-09 10:30:39.564562214 +0200
};
/* Display letters and indicators for each filetype.
-@@ -283,6 +284,7 @@ static void queue_directory (char const
+@@ -282,6 +283,7 @@
+ bool command_line_arg);
static void sort_files (void);
static void parse_ls_color (void);
- void usage (int status);
+static void print_scontext_format (const struct fileinfo *f);
/* Initial size of hash table.
default:
usage (LS_FAILURE);
}
-@@ -2714,8 +2738,10 @@ clear_files (void)
- struct fileinfo *f = sorted_file[i];
- free (f->name);
- free (f->linkname);
-- if (f->scontext != UNKNOWN_SECURITY_CONTEXT)
-- freecon (f->scontext);
-+ if (f->scontext != UNKNOWN_SECURITY_CONTEXT) {
-+ freecon (f->scontext);
-+ f->scontext = NULL;
-+ }
- }
-
- cwd_n_used = 0;
@@ -2757,6 +2783,7 @@ gobble_file (char const *name, enum file
memset (f, '\0', sizeof *f);
f->stat.st_ino = inode;