Fixing some tab damage from Jay's commit
This commit is contained in:
parent
28946a0a43
commit
c64704742c
|
@ -379,12 +379,12 @@ dlmmap_locked (void *start, size_t length, int prot, int flags, off_t offset)
|
||||||
close (execfd);
|
close (execfd);
|
||||||
goto retry_open;
|
goto retry_open;
|
||||||
}
|
}
|
||||||
if (ftruncate (execfd, offset)) {
|
if (ftruncate (execfd, offset)) {
|
||||||
// FIXME: Should fail "even worse" because the truncate failed
|
// FIXME: Should fail "even worse" because the truncate failed
|
||||||
return MFAIL;
|
return MFAIL;
|
||||||
} else {
|
} else {
|
||||||
return MFAIL;
|
return MFAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!offset
|
else if (!offset
|
||||||
&& open_temp_exec_file_opts[open_temp_exec_file_opts_idx].repeat)
|
&& open_temp_exec_file_opts[open_temp_exec_file_opts_idx].repeat)
|
||||||
|
@ -395,11 +395,11 @@ dlmmap_locked (void *start, size_t length, int prot, int flags, off_t offset)
|
||||||
if (start == MFAIL)
|
if (start == MFAIL)
|
||||||
{
|
{
|
||||||
munmap (ptr, length);
|
munmap (ptr, length);
|
||||||
if (ftruncate (execfd, offset)) {
|
if (ftruncate (execfd, offset)) {
|
||||||
// FIXME: Should return failure, but how to recover work we've done?
|
// FIXME: Should return failure, but how to recover work we've done?
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
return start;
|
return start;
|
||||||
}
|
}
|
||||||
|
|
||||||
mmap_exec_offset ((char *)start, length) = (char*)ptr - (char*)start;
|
mmap_exec_offset ((char *)start, length) = (char*)ptr - (char*)start;
|
||||||
|
|
|
@ -335,7 +335,7 @@ GC_collect_end_callback_Proc GC_set_collect_end_callback(GC_collect_end_callback
|
||||||
GC_bool GC_try_to_collect_inner(GC_stop_func stop_func)
|
GC_bool GC_try_to_collect_inner(GC_stop_func stop_func)
|
||||||
{
|
{
|
||||||
CLOCK_TYPE start_time = CLOCK_ZERO;
|
CLOCK_TYPE start_time = CLOCK_ZERO;
|
||||||
CLOCK_TYPE current_time;
|
CLOCK_TYPE current_time;
|
||||||
if (GC_dont_gc) return FALSE;
|
if (GC_dont_gc) return FALSE;
|
||||||
/* PLTSCHEME */
|
/* PLTSCHEME */
|
||||||
if (GC_collect_start_callback)
|
if (GC_collect_start_callback)
|
||||||
|
@ -483,10 +483,10 @@ GC_bool GC_stopped_mark(GC_stop_func stop_func)
|
||||||
unsigned i;
|
unsigned i;
|
||||||
int dummy;
|
int dummy;
|
||||||
CLOCK_TYPE start_time = CLOCK_ZERO;
|
CLOCK_TYPE start_time = CLOCK_ZERO;
|
||||||
CLOCK_TYPE current_time;
|
CLOCK_TYPE current_time;
|
||||||
|
|
||||||
if (GC_print_stats)
|
if (GC_print_stats)
|
||||||
GET_TIME(start_time);
|
GET_TIME(start_time);
|
||||||
|
|
||||||
# if !defined(REDIRECT_MALLOC) && (defined(MSWIN32) || defined(MSWINCE))
|
# if !defined(REDIRECT_MALLOC) && (defined(MSWIN32) || defined(MSWINCE))
|
||||||
GC_add_current_malloc_heap();
|
GC_add_current_malloc_heap();
|
||||||
|
|
|
@ -617,11 +617,11 @@ void GC_mark_overflow_recover(void *p)
|
||||||
*/
|
*/
|
||||||
mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack, mse *mark_stack_limit)
|
mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack, mse *mark_stack_limit)
|
||||||
{
|
{
|
||||||
signed_word credit = HBLKSIZE; /* Remaining credit for marking work */
|
signed_word credit = HBLKSIZE; /* Remaining credit for marking work */
|
||||||
ptr_t current_p; /* Pointer to current candidate ptr. */
|
ptr_t current_p; /* Pointer to current candidate ptr. */
|
||||||
word current; /* Candidate pointer. */
|
word current; /* Candidate pointer. */
|
||||||
ptr_t limit = NULL; /* (Incl) limit of current candidate */
|
ptr_t limit = NULL; /* (Incl) limit of current candidate */
|
||||||
/* range */
|
/* range */
|
||||||
word descr;
|
word descr;
|
||||||
ptr_t greatest_ha = GC_greatest_plausible_heap_addr;
|
ptr_t greatest_ha = GC_greatest_plausible_heap_addr;
|
||||||
ptr_t least_ha = GC_least_plausible_heap_addr;
|
ptr_t least_ha = GC_least_plausible_heap_addr;
|
||||||
|
|
|
@ -369,7 +369,7 @@ ptr_t GC_approx_sp(void)
|
||||||
# ifdef _MSC_VER
|
# ifdef _MSC_VER
|
||||||
# pragma warning(disable:4172)
|
# pragma warning(disable:4172)
|
||||||
# endif
|
# endif
|
||||||
ptr_t addr = ((ptr_t)(&dummy));
|
ptr_t addr = ((ptr_t)(&dummy));
|
||||||
return addr;
|
return addr;
|
||||||
# ifdef _MSC_VER
|
# ifdef _MSC_VER
|
||||||
# pragma warning(default:4172)
|
# pragma warning(default:4172)
|
||||||
|
|
|
@ -118,55 +118,55 @@ ptr_t GC_build_fl(struct hblk *h, size_t sz, GC_bool clear, ptr_t list)
|
||||||
/* If we were more serious about it, these should go inside */
|
/* If we were more serious about it, these should go inside */
|
||||||
/* the loops. But write prefetches usually don't seem to */
|
/* the loops. But write prefetches usually don't seem to */
|
||||||
/* matter much. */
|
/* matter much. */
|
||||||
PREFETCH_FOR_WRITE((ptr_t)h);
|
PREFETCH_FOR_WRITE((ptr_t)h);
|
||||||
PREFETCH_FOR_WRITE((ptr_t)h + 128);
|
PREFETCH_FOR_WRITE((ptr_t)h + 128);
|
||||||
PREFETCH_FOR_WRITE((ptr_t)h + 256);
|
PREFETCH_FOR_WRITE((ptr_t)h + 256);
|
||||||
PREFETCH_FOR_WRITE((ptr_t)h + 378);
|
PREFETCH_FOR_WRITE((ptr_t)h + 378);
|
||||||
/* Handle small objects sizes more efficiently. For larger objects */
|
/* Handle small objects sizes more efficiently. For larger objects */
|
||||||
/* the difference is less significant. */
|
/* the difference is less significant. */
|
||||||
# ifndef SMALL_CONFIG
|
# ifndef SMALL_CONFIG
|
||||||
switch (sz) {
|
switch (sz) {
|
||||||
case 2: if (clear) {
|
case 2: if (clear) {
|
||||||
return GC_build_fl_clear2(h, list);
|
return GC_build_fl_clear2(h, list);
|
||||||
} else {
|
} else {
|
||||||
return GC_build_fl2(h, list);
|
return GC_build_fl2(h, list);
|
||||||
}
|
|
||||||
case 4: if (clear) {
|
|
||||||
return GC_build_fl_clear4(h, list);
|
|
||||||
} else {
|
|
||||||
return GC_build_fl4(h, list);
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
case 4: if (clear) {
|
||||||
|
return GC_build_fl_clear4(h, list);
|
||||||
|
} else {
|
||||||
|
return GC_build_fl4(h, list);
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
# endif /* !SMALL_CONFIG */
|
# endif /* !SMALL_CONFIG */
|
||||||
|
|
||||||
/* Clear the page if necessary. */
|
/* Clear the page if necessary. */
|
||||||
if (clear) BZERO(h, HBLKSIZE);
|
if (clear) BZERO(h, HBLKSIZE);
|
||||||
|
|
||||||
/* Add objects to free list */
|
/* Add objects to free list */
|
||||||
p = (word *)(h -> hb_body) + sz; /* second object in *h */
|
p = (word *)(h -> hb_body) + sz; /* second object in *h */
|
||||||
prev = (word *)(h -> hb_body); /* One object behind p */
|
prev = (word *)(h -> hb_body); /* One object behind p */
|
||||||
last_object = (word *)((char *)h + HBLKSIZE);
|
last_object = (word *)((char *)h + HBLKSIZE);
|
||||||
last_object -= sz;
|
last_object -= sz;
|
||||||
/* Last place for last object to start */
|
/* Last place for last object to start */
|
||||||
|
|
||||||
/* make a list of all objects in *h with head as last object */
|
/* make a list of all objects in *h with head as last object */
|
||||||
while (p <= last_object) {
|
while (p <= last_object) {
|
||||||
/* current object's link points to last object */
|
/* current object's link points to last object */
|
||||||
obj_link(p) = (ptr_t)prev;
|
obj_link(p) = (ptr_t)prev;
|
||||||
prev = p;
|
prev = p;
|
||||||
p += sz;
|
p += sz;
|
||||||
}
|
}
|
||||||
p -= sz; /* p now points to last object */
|
p -= sz; /* p now points to last object */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* put p (which is now head of list of objects in *h) as first
|
* put p (which is now head of list of objects in *h) as first
|
||||||
* pointer in the appropriate free list for this size.
|
* pointer in the appropriate free list for this size.
|
||||||
*/
|
*/
|
||||||
word *tmp = (word *)h->hb_body;
|
word *tmp = (word *)h->hb_body;
|
||||||
obj_link(tmp) = list;
|
obj_link(tmp) = list;
|
||||||
return ((ptr_t)p);
|
return ((ptr_t)p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1217,7 +1217,7 @@ ptr_t GC_get_main_stack_base(void)
|
||||||
# if defined(HEURISTIC1) || defined(HEURISTIC2)
|
# if defined(HEURISTIC1) || defined(HEURISTIC2)
|
||||||
MAYBE_UNUSED word dummy;
|
MAYBE_UNUSED word dummy;
|
||||||
# endif
|
# endif
|
||||||
MAYBE_UNUSED ptr_t result;
|
MAYBE_UNUSED ptr_t result;
|
||||||
|
|
||||||
# define STACKBOTTOM_ALIGNMENT_M1 ((word)STACK_GRAN - 1)
|
# define STACKBOTTOM_ALIGNMENT_M1 ((word)STACK_GRAN - 1)
|
||||||
|
|
||||||
|
|
|
@ -223,7 +223,7 @@ void GC_suspend_handler_inner(ptr_t sig_arg, void *context)
|
||||||
void GC_restart_handler(int sig)
|
void GC_restart_handler(int sig)
|
||||||
{
|
{
|
||||||
MAYBE_UNUSED pthread_t my_thread = pthread_self();
|
MAYBE_UNUSED pthread_t my_thread = pthread_self();
|
||||||
MAYBE_UNUSED GC_thread me;
|
MAYBE_UNUSED GC_thread me;
|
||||||
|
|
||||||
if (sig != SIG_THR_RESTART) ABORT("Bad signal in suspend_handler");
|
if (sig != SIG_THR_RESTART) ABORT("Bad signal in suspend_handler");
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
$* 2>&1 | awk '/^ar: creating / || /^[ar] \-/ { print } ! ( /ar: creating / || /^[ar] \-/ ) { print | "cat 1>&2" }'
|
$* 2>&1 | awk '/^ar: creating / || /^[ar] \-/ { print } ! ( /ar: creating / || /^[ar] \-/ ) { print | "cat 1>&2" }'
|
||||||
|
|
||||||
|
|
|
@ -385,13 +385,13 @@ xpmGetCmt(mdata, cmt)
|
||||||
|
|
||||||
xpmDataType xpmDataTypes[] =
|
xpmDataType xpmDataTypes[] =
|
||||||
{
|
{
|
||||||
{"", "!", "\n", '\0', '\n', "", "", "", ""}, /* Natural type */
|
{"", "!", "\n", '\0', '\n', "", "", "", ""}, /* Natural type */
|
||||||
{"C", "/*", "*/", '"', '"', ",\n", "static char *", "[] = {\n", "};\n"},
|
{"C", "/*", "*/", '"', '"', ",\n", "static char *", "[] = {\n", "};\n"},
|
||||||
{"Lisp", ";", "\n", '"', '"', "\n", "(setq ", " '(\n", "))\n"},
|
{"Lisp", ";", "\n", '"', '"', "\n", "(setq ", " '(\n", "))\n"},
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
NULL
|
NULL
|
||||||
#else
|
#else
|
||||||
{NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL}
|
{NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL}
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -190,7 +190,7 @@ xpmParseData(data, image, info)
|
||||||
info->extensions = NULL;
|
info->extensions = NULL;
|
||||||
info->nextensions = 0;
|
info->nextensions = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* store found informations in the XpmImage structure
|
* store found informations in the XpmImage structure
|
||||||
|
@ -335,7 +335,7 @@ ParseColors(data, ncolors, cpp, colorTablePtr, hashtable)
|
||||||
XpmColor **colorTablePtr;
|
XpmColor **colorTablePtr;
|
||||||
xpmHashTable *hashtable;
|
xpmHashTable *hashtable;
|
||||||
{
|
{
|
||||||
uintptr_t a;
|
uintptr_t a;
|
||||||
unsigned int key, l, b;
|
unsigned int key, l, b;
|
||||||
unsigned int curkey; /* current color key */
|
unsigned int curkey; /* current color key */
|
||||||
unsigned int lastwaskey; /* key read */
|
unsigned int lastwaskey; /* key read */
|
||||||
|
|
|
@ -396,7 +396,7 @@ ScanOtherColors(display, colors, ncolors, pixels, mask, cpp, attributes)
|
||||||
XColor *xcolors = NULL, *xcolor;
|
XColor *xcolors = NULL, *xcolor;
|
||||||
char *colorname, *s;
|
char *colorname, *s;
|
||||||
XpmColor *colorTable = NULL;
|
XpmColor *colorTable = NULL;
|
||||||
XpmColor **oldColorTable = NULL;
|
XpmColor **oldColorTable = NULL;
|
||||||
unsigned int ancolors = 0;
|
unsigned int ancolors = 0;
|
||||||
Pixel *apixels = NULL;
|
Pixel *apixels = NULL;
|
||||||
unsigned int mask_pixel = 0;
|
unsigned int mask_pixel = 0;
|
||||||
|
|
|
@ -498,19 +498,19 @@ Bool wxListBox::Selected(int n)
|
||||||
|
|
||||||
void wxListBox::SetClientData(int n, char *_client_data)
|
void wxListBox::SetClientData(int n, char *_client_data)
|
||||||
{
|
{
|
||||||
if (0 <= n && n < num_choices)
|
if (0 <= n && n < num_choices)
|
||||||
client_data[n] = _client_data;
|
client_data[n] = _client_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::SetSelection(int n, Bool select)
|
void wxListBox::SetSelection(int n, Bool select)
|
||||||
{
|
{
|
||||||
if (0 <= n && n < num_choices) {
|
if (0 <= n && n < num_choices) {
|
||||||
if (select) {
|
if (select) {
|
||||||
XfwfMultiListHighlightItem(MULTILIST, n);
|
XfwfMultiListHighlightItem(MULTILIST, n);
|
||||||
} else {
|
} else {
|
||||||
XfwfMultiListUnhighlightItem(MULTILIST, n);
|
XfwfMultiListUnhighlightItem(MULTILIST, n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::SetOneSelection(int n)
|
void wxListBox::SetOneSelection(int n)
|
||||||
|
@ -524,12 +524,12 @@ void wxListBox::SetOneSelection(int n)
|
||||||
|
|
||||||
Bool wxListBox::SetStringSelection(char *s)
|
Bool wxListBox::SetStringSelection(char *s)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
if ((n = FindString(s)) > -1) {
|
if ((n = FindString(s)) > -1) {
|
||||||
SetOneSelection(n);
|
SetOneSelection(n);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::SetString(int n, char *s)
|
void wxListBox::SetString(int n, char *s)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user