diff --git a/contrib/elinks.spec.in b/contrib/elinks.spec.in index 991a53964..335135dfc 100644 --- a/contrib/elinks.spec.in +++ b/contrib/elinks.spec.in @@ -117,7 +117,7 @@ install \ contrib/perl/hooks.pl \ $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/perl install \ - doc/*.txt doc/*.html \ + doc/*.txt \ $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/ %find_lang %{name} @@ -133,14 +133,17 @@ rm -rf $RPM_BUILD_ROOT # date +"%a %b %d %Y" %changelog +* Fri Feb 17 2006 Witold Filipczyk +- typo + * Thu Dec 29 2005 Miciah Dashiel Butler Masters - elinks.or.cz -> elinks.cz -*Tue Jun 14 2005 Witold Filipczyk +* Tue Jun 14 2005 Witold Filipczyk - removed unused texi2html dependency - removed unused libdir directory -*Mon Sep 27 2004 Witold Filipczyk +* Mon Sep 27 2004 Witold Filipczyk - by default build feature rich ELinks * Thu Mar 25 2004 Witold Filipczyk @@ -150,7 +153,7 @@ rm -rf $RPM_BUILD_ROOT * Wed Dec 10 2003 Witold Filipczyk - enabled leds and local-cgi -* Sun 0ct 26 2003 Witold Filipczyk +* Sun Oct 26 2003 Witold Filipczyk - revert to version from 5 October * Sat Oct 25 2003 Witold Filipczyk diff --git a/src/bfu/menu.c b/src/bfu/menu.c index 1b25f1cf1..a7e1fb064 100644 --- a/src/bfu/menu.c +++ b/src/bfu/menu.c @@ -1146,7 +1146,7 @@ mainmenu_handler(struct window *win, struct term_event *ev) /* For dynamic menus the last (cleared) item is used to mark the end. */ #define realloc_menu_items(mi_, size) \ - mem_align_alloc(mi_, size, (size) + 2, struct menu_item, 0xF) + mem_align_alloc(mi_, size, (size) + 2, 0xF) struct menu_item * new_menu(enum menu_item_flags flags) diff --git a/src/bfu/text.c b/src/bfu/text.c index 63f00f4d9..e4e9d438f 100644 --- a/src/bfu/text.c +++ b/src/bfu/text.c @@ -83,7 +83,7 @@ split_line(unsigned char *text, int max_width) #undef is_unsplitable #define LINES_GRANULARITY 0x7 -#define realloc_lines(x, o, n) mem_align_alloc(x, o, n, unsigned char *, LINES_GRANULARITY) +#define realloc_lines(x, o, n) mem_align_alloc(x, o, n, LINES_GRANULARITY) /* Find the start of each line with the current max width */ static unsigned char ** diff --git a/src/document/docdata.h b/src/document/docdata.h index f898db3c4..1606966f6 100644 --- a/src/document/docdata.h +++ b/src/document/docdata.h @@ -8,12 +8,12 @@ #define LINE_GRANULARITY 0x0F #define LINK_GRANULARITY 0x7F -#define ALIGN_LINES(x, o, n) mem_align_alloc(x, o, n, struct line, LINES_GRANULARITY) -#define ALIGN_LINE(x, o, n) mem_align_alloc(x, o, n, struct screen_char, LINE_GRANULARITY) -#define ALIGN_LINK(x, o, n) mem_align_alloc(x, o, n, struct link, LINK_GRANULARITY) +#define ALIGN_LINES(x, o, n) mem_align_alloc(x, o, n, LINES_GRANULARITY) +#define ALIGN_LINE(x, o, n) mem_align_alloc(x, o, n, LINE_GRANULARITY) +#define ALIGN_LINK(x, o, n) mem_align_alloc(x, o, n, LINK_GRANULARITY) #define realloc_points(link, size) \ - mem_align_alloc(&(link)->points, (link)->npoints, size, struct point, 0) + mem_align_alloc(&(link)->points, (link)->npoints, size, 0) struct line *realloc_lines(struct document *document, int y); diff --git a/src/document/html/parser/forms.c b/src/document/html/parser/forms.c index 6e63f96d0..dc2ddbfa9 100644 --- a/src/document/html/parser/forms.c +++ b/src/document/html/parser/forms.c @@ -424,7 +424,7 @@ abort: preselect = order; value = get_attr_val(t_attr, "value", html_context->options); - if (!mem_align_alloc(&values, order, order + 1, unsigned char *, 0xFF)) + if (!mem_align_alloc(&values, order, order + 1, 0xFF)) goto abort; values[order++] = value; diff --git a/src/document/html/parser/parse.c b/src/document/html/parser/parse.c index 0fafd0475..922433277 100644 --- a/src/document/html/parser/parse.c +++ b/src/document/html/parser/parse.c @@ -126,7 +126,7 @@ end: } -#define realloc_chrs(x, l) mem_align_alloc(x, l, (l) + 1, unsigned char, 0xFF) +#define realloc_chrs(x, l) mem_align_alloc(x, l, (l) + 1, 0xFF) #define add_chr(s, l, c) \ do { \ diff --git a/src/document/html/parser/table.c b/src/document/html/parser/table.c index 1275cfb23..00e1a4600 100644 --- a/src/document/html/parser/table.c +++ b/src/document/html/parser/table.c @@ -31,7 +31,7 @@ #define INIT_REAL_ROWS 2 #define realloc_bad_html(bad_html, size) \ - mem_align_alloc(bad_html, size, (size) + 1, struct html_start_end, 0xFF) + mem_align_alloc(bad_html, size, (size) + 1, 0xFF) static void add_table_bad_html_start(struct table *table, unsigned char *start) diff --git a/src/document/html/renderer.c b/src/document/html/renderer.c index 7ec24e72f..63915faf4 100644 --- a/src/document/html/renderer.c +++ b/src/document/html/renderer.c @@ -134,7 +134,7 @@ void put_chars(struct html_context *, unsigned char *, int); #define SPACES_GRANULARITY 0x7F -#define ALIGN_SPACES(x, o, n) mem_align_alloc(x, o, n, unsigned char, SPACES_GRANULARITY) +#define ALIGN_SPACES(x, o, n) mem_align_alloc(x, o, n, SPACES_GRANULARITY) static inline void set_screen_char_color(struct screen_char *schar, diff --git a/src/dom/stack.c b/src/dom/stack.c index 5546757d6..4b750454f 100644 --- a/src/dom/stack.c +++ b/src/dom/stack.c @@ -24,7 +24,6 @@ static inline struct dom_stack_state * realloc_dom_stack_states(struct dom_stack_state **states, size_t size) { return mem_align_alloc(states, size, size + 1, - struct dom_stack_state, DOM_STACK_STATE_GRANULARITY); } @@ -32,7 +31,6 @@ static inline struct dom_stack_state * realloc_dom_stack_context(struct dom_stack_context ***contexts, size_t size) { return mem_align_alloc(contexts, size, size + 1, - struct dom_stack_context *, DOM_STACK_STATE_GRANULARITY); } diff --git a/src/main/event.c b/src/main/event.c index 5b8bab760..27f63bfae 100644 --- a/src/main/event.c +++ b/src/main/event.c @@ -65,7 +65,7 @@ static struct hash *event_hash = NULL; #define EVENT_GRANULARITY 0x07 #define realloc_events(ptr, size) \ - mem_align_alloc(ptr, (size), (size) + 1, struct event, EVENT_GRANULARITY) + mem_align_alloc(ptr, (size), (size) + 1, EVENT_GRANULARITY) static inline int invalid_event_id(register int id) diff --git a/src/protocol/uri.c b/src/protocol/uri.c index 45dae8c2e..c42723e27 100644 --- a/src/protocol/uri.c +++ b/src/protocol/uri.c @@ -1406,7 +1406,7 @@ decode_uri_string_for_display(struct string *string) #define realloc_uri_list(list) \ mem_align_alloc(&(list)->uris, (list)->size, (list)->size + 1, \ - struct uri *, URI_LIST_GRANULARITY) + URI_LIST_GRANULARITY) struct uri * add_to_uri_list(struct uri_list *list, struct uri *uri) diff --git a/src/terminal/kbd.c b/src/terminal/kbd.c index 3326fa4bf..c084d0fd8 100644 --- a/src/terminal/kbd.c +++ b/src/terminal/kbd.c @@ -770,12 +770,19 @@ set_kbd_event(struct term_event *ev, int key, int modifier) case ASCII_TAB: key = KBD_TAB; break; - +#if defined(HAVE_SYS_CONSIO_H) || defined(HAVE_MACHINE_CONSOLE_H) /* BSD */ + case ASCII_BS: + key = KBD_BS; + break; + case ASCII_DEL: + key = KBD_DEL; + break; +#else case ASCII_BS: case ASCII_DEL: key = KBD_BS; break; - +#endif case ASCII_LF: case ASCII_CR: key = KBD_ENTER; diff --git a/src/util/memory.h b/src/util/memory.h index 2864408b4..87cf2cc40 100644 --- a/src/util/memory.h +++ b/src/util/memory.h @@ -152,11 +152,11 @@ mem_align_alloc__( } #ifdef DEBUG_MEMLEAK -#define mem_align_alloc(ptr, old, new, obj, mask) \ - mem_align_alloc__(__FILE__, __LINE__, (void **) ptr, old, new, sizeof(obj), mask) +#define mem_align_alloc(ptr, old, new, mask) \ + mem_align_alloc__(__FILE__, __LINE__, (void **) ptr, old, new, sizeof(**ptr), mask) #else -#define mem_align_alloc(ptr, old, new, obj, mask) \ - mem_align_alloc__((void **) ptr, old, new, sizeof(obj), mask) +#define mem_align_alloc(ptr, old, new, mask) \ + mem_align_alloc__((void **) ptr, old, new, sizeof(**ptr), mask) #endif diff --git a/src/util/string.h b/src/util/string.h index 7390061c9..1b069efdc 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -184,7 +184,7 @@ squeezastring(struct string *string) #define realloc_string(str, size) \ mem_align_alloc(&(str)->source, (str)->length, (size) + 1, \ - unsigned char, STRING_GRANULARITY) + STRING_GRANULARITY) #ifdef DEBUG_MEMLEAK diff --git a/src/viewer/text/form.c b/src/viewer/text/form.c index 296ee990c..90b809f13 100644 --- a/src/viewer/text/form.c +++ b/src/viewer/text/form.c @@ -206,10 +206,8 @@ find_form_state(struct document_view *doc_view, struct form_control *fc) if (n >= vs->form_info_len) { int nn = n + 1; - fs = mem_realloc(vs->form_info, nn * sizeof(*fs)); + fs = mem_align_alloc(&vs->form_info, vs->form_info_len, nn, 0); if (!fs) return NULL; - memset(fs + vs->form_info_len, 0, - (nn - vs->form_info_len) * sizeof(*fs)); vs->form_info = fs; vs->form_info_len = nn; } @@ -630,7 +628,7 @@ encode_controls(struct list_head *l, struct string *data, #define BOUNDARY_LENGTH 32 #define realloc_bound_ptrs(bptrs, bptrs_size) \ - mem_align_alloc(bptrs, bptrs_size, bptrs_size + 1, int, 0xFF) + mem_align_alloc(bptrs, bptrs_size, bptrs_size + 1, 0xFF) struct boundary_info { int count; diff --git a/src/viewer/text/search.c b/src/viewer/text/search.c index 259de2570..2d61b929d 100644 --- a/src/viewer/text/search.c +++ b/src/viewer/text/search.c @@ -539,7 +539,7 @@ is_in_range(struct document *document, int y, int height, } #define realloc_points(pts, size) \ - mem_align_alloc(pts, size, (size) + 1, struct point, 0xFF) + mem_align_alloc(pts, size, (size) + 1, 0xFF) static void get_searched_plain(struct document_view *doc_view, struct point **pt, int *pl, diff --git a/src/viewer/text/textarea.c b/src/viewer/text/textarea.c index f8e66ded7..6d5b512ea 100644 --- a/src/viewer/text/textarea.c +++ b/src/viewer/text/textarea.c @@ -45,7 +45,7 @@ struct line_info { /* We add two extra entries to the table so the ending info can be added * without reallocating. */ #define realloc_line_info(info, size) \ - mem_align_alloc(info, size, (size) + 3, struct line_info, 0xFF) + mem_align_alloc(info, size, (size) + 3, 0xFF) /* Allocates a line_info table describing the layout of the textarea buffer. *