Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b84194b133 | ||
|
|
2993551efc | ||
|
|
ab4caf099c | ||
|
|
1c3bcfc79f | ||
|
|
096ccd6a69 | ||
|
|
d674b2e2ae | ||
|
|
abe8fc3663 | ||
|
|
981c0b109d | ||
|
|
6673497d3b | ||
|
|
7236b6d717 |
No files matched your search
@@ -1,6 +1,6 @@
|
||||
VERSION = 1
|
||||
PATCHLEVEL = 29
|
||||
SUBLEVEL = 0
|
||||
SUBLEVEL = 3
|
||||
EXTRAVERSION =
|
||||
NAME = Unnamed
|
||||
|
||||
|
||||
+6
-6
@@ -333,12 +333,6 @@ struct globals {
|
||||
/* DECLARE(Pos, head, 1<<HASH_BITS); */
|
||||
#define head (G1.prev + WSIZE) /* hash head (see deflate.c) */
|
||||
|
||||
/* =========================================================================== */
|
||||
/* all members below are zeroed out in pack_gzip() for each next file */
|
||||
|
||||
uint32_t crc; /* shift register contents */
|
||||
/*uint32_t *crc_32_tab;*/
|
||||
|
||||
#if ENABLE_FEATURE_GZIP_LEVELS
|
||||
unsigned max_chain_length;
|
||||
unsigned max_lazy_match;
|
||||
@@ -350,6 +344,12 @@ struct globals {
|
||||
#define nice_match (G1.nice_match)
|
||||
#endif
|
||||
|
||||
/* =========================================================================== */
|
||||
/* all members below are zeroed out in pack_gzip() for each next file */
|
||||
|
||||
uint32_t crc; /* shift register contents */
|
||||
/*uint32_t *crc_32_tab;*/
|
||||
|
||||
/* window position at the beginning of the current output block. Gets
|
||||
* negative when the window is moved backwards.
|
||||
*/
|
||||
|
||||
@@ -47,7 +47,9 @@ char* FAST_FUNC bb_get_chunk_from_file(FILE *file, size_t *end)
|
||||
/* Get line, including trailing \n if any */
|
||||
char* FAST_FUNC xmalloc_fgets(FILE *file)
|
||||
{
|
||||
return bb_get_chunk_from_file(file, NULL);
|
||||
size_t i;
|
||||
|
||||
return bb_get_chunk_from_file(file, &i);
|
||||
}
|
||||
/* Get line. Remove trailing \n */
|
||||
char* FAST_FUNC xmalloc_fgetline(FILE *file)
|
||||
|
||||
@@ -173,7 +173,7 @@ static char *angle_address(char *str)
|
||||
char *s, *e;
|
||||
|
||||
e = trim(str);
|
||||
if (e != str && e[-1] == '>') {
|
||||
if (e != str && *--e == '>') {
|
||||
s = strrchr(str, '<');
|
||||
if (s) {
|
||||
*e = '\0';
|
||||
|
||||
+4
-1
@@ -153,7 +153,8 @@ static void redraw(unsigned cursor)
|
||||
i++;
|
||||
}
|
||||
|
||||
printf(ESC"[%u;%uH", 1 + cursor / 16, 1 + pos + (cursor & 0xf) * 3);
|
||||
G.row = cursor / 16;
|
||||
printf(ESC"[%u;%uH", 1 + G.row, 1 + pos + (cursor & 0xf) * 3);
|
||||
}
|
||||
|
||||
static void redraw_cur_line(void)
|
||||
@@ -367,6 +368,8 @@ int hexedit_main(int argc UNUSED_PARAM, char **argv)
|
||||
if (G.current_byte > G.eof_byte) {
|
||||
/* _after_ eof - don't allow this */
|
||||
G.current_byte -= 16;
|
||||
if (G.current_byte < G.baseaddr)
|
||||
move_mapping_lower();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1335,6 +1335,7 @@ However, in real world it was observed that some web servers
|
||||
/* server.user remains untouched */
|
||||
free(server.allocated);
|
||||
server.allocated = NULL;
|
||||
server.protocol = target.protocol;
|
||||
server.host = target.host;
|
||||
/* strip_ipv6_scope_id(target.host); - no! */
|
||||
/* we assume remote never gives us IPv6 addr with scope id */
|
||||
|
||||
+50
-49
@@ -169,9 +169,9 @@ typedef unsigned long long ullong;
|
||||
* do not support more than 2^32 sectors
|
||||
*/
|
||||
typedef uint32_t sector_t;
|
||||
#if UINT_MAX == 4294967295
|
||||
#if UINT_MAX == 0xffffffff
|
||||
# define SECT_FMT ""
|
||||
#elif ULONG_MAX == 4294967295
|
||||
#elif ULONG_MAX == 0xffffffff
|
||||
# define SECT_FMT "l"
|
||||
#else
|
||||
# error Cant detect sizeof(uint32_t)
|
||||
@@ -426,7 +426,7 @@ struct globals {
|
||||
unsigned sector_offset; // = 1;
|
||||
unsigned g_heads, g_sectors, g_cylinders;
|
||||
smallint /* enum label_type */ current_label_type;
|
||||
smallint display_in_cyl_units; // = 1;
|
||||
smallint display_in_cyl_units;
|
||||
#if ENABLE_FEATURE_OSF_LABEL
|
||||
smallint possibly_osf_label;
|
||||
#endif
|
||||
@@ -488,7 +488,6 @@ struct globals {
|
||||
sector_size = DEFAULT_SECTOR_SIZE; \
|
||||
sector_offset = 1; \
|
||||
g_partitions = 4; \
|
||||
display_in_cyl_units = 1; \
|
||||
units_per_sector = 1; \
|
||||
dos_compatible_flag = 1; \
|
||||
} while (0)
|
||||
@@ -639,25 +638,6 @@ seek_sector(sector_t secno)
|
||||
}
|
||||
|
||||
#if ENABLE_FEATURE_FDISK_WRITABLE
|
||||
/* Read line; return 0 or first printable char */
|
||||
static int
|
||||
read_line(const char *prompt)
|
||||
{
|
||||
int sz;
|
||||
|
||||
sz = read_line_input(NULL, prompt, line_buffer, sizeof(line_buffer));
|
||||
if (sz <= 0)
|
||||
exit(EXIT_SUCCESS); /* Ctrl-D or Ctrl-C */
|
||||
|
||||
if (line_buffer[sz-1] == '\n')
|
||||
line_buffer[--sz] = '\0';
|
||||
|
||||
line_ptr = line_buffer;
|
||||
while (*line_ptr != '\0' && (unsigned char)*line_ptr <= ' ')
|
||||
line_ptr++;
|
||||
return *line_ptr;
|
||||
}
|
||||
|
||||
static void
|
||||
set_all_unchanged(void)
|
||||
{
|
||||
@@ -680,6 +660,25 @@ write_part_table_flag(char *b)
|
||||
b[511] = 0xaa;
|
||||
}
|
||||
|
||||
/* Read line; return 0 or first printable non-space char */
|
||||
static int
|
||||
read_line(const char *prompt)
|
||||
{
|
||||
int sz;
|
||||
|
||||
sz = read_line_input(NULL, prompt, line_buffer, sizeof(line_buffer));
|
||||
if (sz <= 0)
|
||||
exit(EXIT_SUCCESS); /* Ctrl-D or Ctrl-C */
|
||||
|
||||
if (line_buffer[sz-1] == '\n')
|
||||
line_buffer[--sz] = '\0';
|
||||
|
||||
line_ptr = line_buffer;
|
||||
while (*line_ptr != '\0' && (unsigned char)*line_ptr <= ' ')
|
||||
line_ptr++;
|
||||
return *line_ptr;
|
||||
}
|
||||
|
||||
static char
|
||||
read_nonempty(const char *mesg)
|
||||
{
|
||||
@@ -1614,53 +1613,54 @@ read_int(sector_t low, sector_t dflt, sector_t high, sector_t base, const char *
|
||||
|
||||
if (*line_ptr == '+' || *line_ptr == '-') {
|
||||
int minus = (*line_ptr == '-');
|
||||
int absolute = 0;
|
||||
unsigned scale_shift;
|
||||
|
||||
value = atoi(line_ptr + 1);
|
||||
if (sizeof(value) <= sizeof(long))
|
||||
value = strtoul(line_ptr + 1, NULL, 10);
|
||||
else
|
||||
value = strtoull(line_ptr + 1, NULL, 10);
|
||||
|
||||
/* (1) if 2nd char is digit, use_default = 0.
|
||||
* (2) move line_ptr to first non-digit. */
|
||||
* (2) move line_ptr to first non-digit.
|
||||
*/
|
||||
while (isdigit(*++line_ptr))
|
||||
use_default = 0;
|
||||
|
||||
switch (*line_ptr) {
|
||||
case 'c':
|
||||
case 'C':
|
||||
if (!display_in_cyl_units)
|
||||
value *= g_heads * g_sectors;
|
||||
break;
|
||||
case 'K':
|
||||
absolute = 1024;
|
||||
break;
|
||||
scale_shift = 0;
|
||||
switch (*line_ptr | 0x20) {
|
||||
case 'k':
|
||||
absolute = 1000;
|
||||
scale_shift = 10; /* 1024 */
|
||||
break;
|
||||
case 'm':
|
||||
case 'M':
|
||||
absolute = 1000000;
|
||||
scale_shift = 20; /* 1024*1024 */
|
||||
break;
|
||||
case 'g':
|
||||
case 'G':
|
||||
absolute = 1000000000;
|
||||
scale_shift = 30; /* 1024*1024*1024 */
|
||||
break;
|
||||
case 't':
|
||||
scale_shift = 40; /* 1024*1024*1024*1024 */
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (absolute) {
|
||||
if (scale_shift) {
|
||||
ullong bytes;
|
||||
unsigned long unit;
|
||||
|
||||
bytes = (ullong) value * absolute;
|
||||
bytes = (ullong) value << scale_shift;
|
||||
unit = sector_size * units_per_sector;
|
||||
bytes += unit/2; /* round */
|
||||
bytes /= unit;
|
||||
value = bytes;
|
||||
value = (bytes != 0 ? bytes - 1 : 0);
|
||||
}
|
||||
if (minus)
|
||||
value = -value;
|
||||
value += base;
|
||||
} else {
|
||||
value = atoi(line_ptr);
|
||||
if (sizeof(value) <= sizeof(long))
|
||||
value = strtoul(line_ptr, NULL, 10);
|
||||
else
|
||||
value = strtoull(line_ptr, NULL, 10);
|
||||
while (isdigit(*line_ptr)) {
|
||||
line_ptr++;
|
||||
use_default = 0;
|
||||
@@ -2526,8 +2526,9 @@ add_partition(int n, int sys)
|
||||
stop = limit;
|
||||
} else {
|
||||
snprintf(mesg, sizeof(mesg),
|
||||
"Last %s or +size or +sizeM or +sizeK",
|
||||
str_units(SINGULAR));
|
||||
"Last %s or +size{,K,M,G,T}",
|
||||
str_units(SINGULAR)
|
||||
);
|
||||
stop = read_int(cround(start), cround(limit), cround(limit), cround(start), mesg);
|
||||
if (display_in_cyl_units) {
|
||||
stop = stop * units_per_sector - 1;
|
||||
@@ -2611,9 +2612,9 @@ new_partition(void)
|
||||
} else {
|
||||
char c, line[80];
|
||||
snprintf(line, sizeof(line),
|
||||
"Command action\n"
|
||||
" %s\n"
|
||||
" p primary partition (1-4)\n",
|
||||
"Partition type\n"
|
||||
" p primary partition (1-4)\n"
|
||||
" %s\n",
|
||||
(extended_offset ?
|
||||
"l logical (5 or over)" : "e extended"));
|
||||
while (1) {
|
||||
|
||||
@@ -623,7 +623,7 @@ sgi_change_sysid(int i, int sys)
|
||||
"retrieve from its directory standalone tools like sash and fx.\n"
|
||||
"Only the \"SGI volume\" entire disk section may violate this.\n"
|
||||
"Type YES if you are sure about tagging this partition differently.\n");
|
||||
if (strcmp(line_ptr, "YES\n") != 0)
|
||||
if (strcmp(line_ptr, "YES") != 0)
|
||||
return;
|
||||
}
|
||||
sgilabel->partitions[i].id = SGI_SSWAP32(sys);
|
||||
|
||||
@@ -606,7 +606,7 @@ sun_change_sysid(int i, int sys)
|
||||
"there may destroy your partition table and bootblock.\n"
|
||||
"Type YES if you're very sure you would like that partition\n"
|
||||
"tagged with 82 (Linux swap): ");
|
||||
if (strcmp (line_ptr, "YES\n"))
|
||||
if (strcmp(line_ptr, "YES") != 0)
|
||||
return;
|
||||
}
|
||||
switch (sys) {
|
||||
|
||||
Reference in new issue
Block a user