Lines Matching +full:num +full:- +full:strings

1 /*-
2 * Copyright (c) 2009-2012,2014 Michihiro NAKAJIMA
3 * Copyright (c) 2003-2007 Tim Kientzle
105 return (a->archive_error_number);
112 if (a->error != NULL && *a->error != '\0')
113 return (a->error);
121 return (a->file_count);
127 return (a->archive_format);
133 return (a->archive_format_name);
156 return archive_filter_bytes(a, -1);
171 archive_string_empty(&a->error_string);
172 a->error = NULL;
173 a->archive_error_number = 0;
181 a->archive_error_number = error_number;
183 a->error = NULL;
187 archive_string_empty(&(a->error_string));
189 archive_string_vsprintf(&(a->error_string), fmt, ap);
191 a->error = a->error_string.s;
197 dest->archive_error_number = src->archive_error_number;
199 archive_string_copy(&dest->error_string, &src->error_string);
200 dest->error = dest->error_string.s;
227 * non-Administrator creates temporary files.
236 static const wchar_t num[] = {
256 fd = -1;
284 temp_name.s[temp_name.length-1] != L'/')
290 if (attr == (DWORD)-1) {
301 if (attr == (DWORD)-1) {
317 xp = ep - wcslen(suffix);
354 (DWORD)(ep - p)*sizeof(wchar_t), 0))) {
359 if (!CryptGenRandom(hProv, (DWORD)(ep - p)*sizeof(wchar_t),
366 *p = num[((DWORD)*p) % (sizeof(num)/sizeof(num[0]))];
410 if (fd == -1) {
458 if (temppath->length == 0 || temppath->s[temppath->length-1] != '/')
473 int fd = -1;
482 temp_name.s[temp_name.length-1] != '/')
504 int fd = -1;
520 static const char num[] = {
535 fd = -1;
543 if (temp_name.length > 0 && temp_name.s[temp_name.length-1] == '/') {
544 temp_name.s[temp_name.length-1] = '\0';
545 temp_name.length --;
572 archive_random(p, ep - p);
574 int d = *((unsigned char *)p) % sizeof(num);
575 *p++ = num[d];
614 * merely declares those macros, especially Linux 2.6.18 - 2.6.24 do it.
626 if (flags != -1 && (flags & FD_CLOEXEC) == 0)
633 * Utility function to sort a group of strings using quicksort.
636 archive_utility_string_sort_helper(char **strings, unsigned int n)
648 pivot = strings[0];
651 if (strcmp(strings[i], pivot) < 0)
661 lesser[lesser_count - 1] = strings[i];
673 greater[greater_count - 1] = strings[i];
680 strings[i] = lesser[i];
684 strings[lesser_count] = pivot;
689 strings[lesser_count + 1 + i] = greater[i];
696 archive_utility_string_sort(char **strings)
699 while (strings[size] != NULL)
701 return archive_utility_string_sort_helper(strings, size);