Add a patchset for glibc 2_9. Vampirised from the gentoo repository.
/trunk/patches/glibc/2_9/500-ppc-glibc-2.9-atomic.patch | 414 414 0 0 ++++++++++
/trunk/patches/glibc/2_9/140-regex-BZ9697.patch | 111 111 0 0 +++
/trunk/patches/glibc/2_9/190-queue-header-updates.patch | 89 89 0 0 ++
/trunk/patches/glibc/2_9/370-hppa_glibc-2.7-hppa-nptl-carlos.patch | 249 249 0 0 ++++++
/trunk/patches/glibc/2_9/450-alpha-glibc-2.5-no-page-header.patch | 32 32 0 0 +
/trunk/patches/glibc/2_9/270-ldbl-nexttowardf.patch | 68 68 0 0 ++
/trunk/patches/glibc/2_9/330-2.3.3-china.patch | 35 35 0 0 +
/trunk/patches/glibc/2_9/340-new-valencian-locale.patch | 120 120 0 0 +++
/trunk/patches/glibc/2_9/410-2.9-fnmatch.patch | 64 64 0 0 ++
/trunk/patches/glibc/2_9/350-2.4-undefine-__i686.patch | 47 47 0 0 +
/trunk/patches/glibc/2_9/160-i386-x86_64-revert-clone-cfi.patch | 53 53 0 0 +
/trunk/patches/glibc/2_9/420-dont-build-timezone.patch | 19 19 0 0 +
/trunk/patches/glibc/2_9/150-regex-BZ697.patch | 28 28 0 0 +
/trunk/patches/glibc/2_9/290-no-inline-gmon.patch | 38 38 0 0 +
/trunk/patches/glibc/2_9/280-section-comments.patch | 29 29 0 0 +
/trunk/patches/glibc/2_9/180-math-tests.patch | 72 72 0 0 ++
/trunk/patches/glibc/2_9/120-_nss_dns_gethostbyaddr2_r-check-and-adjust-the-buffer-alignment.patch | 35 35 0 0 +
/trunk/patches/glibc/2_9/250-resolv-dynamic.patch | 44 44 0 0 +
/trunk/patches/glibc/2_9/300-2.9-check_native-headers.patch | 22 22 0 0 +
/trunk/patches/glibc/2_9/310-2.3.6-fix-pr631.patch | 50 50 0 0 +
/trunk/patches/glibc/2_9/130-add_prio-macros.patch | 26 26 0 0 +
/trunk/patches/glibc/2_9/260-fadvise64_64.patch | 30 30 0 0 +
/trunk/patches/glibc/2_9/440-alpha-glibc-2.4-xstat.patch | 249 249 0 0 ++++++
/trunk/patches/glibc/2_9/170-2.10-dns-no-gethostbyname4.patch | 35 35 0 0 +
/trunk/patches/glibc/2_9/230-2.3.3-localedef-fix-trampoline.patch | 74 74 0 0 ++
/trunk/patches/glibc/2_9/360-2.8-nscd-one-fork.patch | 45 45 0 0 +
/trunk/patches/glibc/2_9/480-alpha-glibc-2.8-cache-shape.patch | 18 18 0 0 +
/trunk/patches/glibc/2_9/210-2.9-strlen-hack.patch | 109 109 0 0 +++
/trunk/patches/glibc/2_9/320-2.9-assume-pipe2.patch | 59 59 0 0 +
/trunk/patches/glibc/2_9/100-ssp-compat.patch | 193 193 0 0 +++++
/trunk/patches/glibc/2_9/110-respect-env-CPPFLAGS.patch | 30 30 0 0 +
/trunk/patches/glibc/2_9/220-manual-no-perl.patch | 29 29 0 0 +
/trunk/patches/glibc/2_9/390-2.3.3_pre20040117-pt_pax.patch | 35 35 0 0 +
/trunk/patches/glibc/2_9/460-alpha-glibc-2.5-no-asm-elf-header.patch | 38 38 0 0 +
/trunk/patches/glibc/2_9/400-tests-sandbox-libdl-paths.patch | 198 198 0 0 +++++
/trunk/patches/glibc/2_9/240-i386-LOAD_PIC_REG.patch | 23 23 0 0 +
/trunk/patches/glibc/2_9/200-awk-in-C-locale.patch | 23 23 0 0 +
/trunk/patches/glibc/2_9/430-2.7-cross-compile-nptl.patch | 57 57 0 0 +
/trunk/patches/glibc/2_9/380-2.3.6-dl_execstack-PaX-support.patch | 71 71 0 0 ++
/trunk/patches/glibc/2_9/490-ptr-mangling.patch | 114 114 0 0 +++
/trunk/patches/glibc/2_9/470-alpha-glibc-2.8-creat.patch | 19 19 0 0 +
41 files changed, 3094 insertions(+)
2 * textbox.c -- implements the text box
4 * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
5 * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com)
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 static void back_lines(int n);
25 static void print_page(WINDOW * win, int height, int width);
26 static void print_line(WINDOW * win, int row, int width);
27 static char *get_line(void);
28 static void print_position(WINDOW * win);
31 static int begin_reached, end_reached, page_length;
32 static const char *buf;
33 static const char *page;
36 * refresh window content
38 static void refresh_text_box(WINDOW *dialog, WINDOW *box, int boxh, int boxw,
41 print_page(box, boxh, boxw);
42 print_position(dialog);
43 wmove(dialog, cur_y, cur_x); /* Restore cursor position */
49 * Display text from a file in a dialog box.
51 int dialog_textbox(const char *title, const char *tbuf,
52 int initial_height, int initial_width)
54 int i, x, y, cur_x, cur_y, key = 0;
55 int height, width, boxh, boxw;
64 page = buf; /* page is pointer to start of page to be displayed */
67 getmaxyx(stdscr, height, width);
68 if (height < 8 || width < 8)
69 return -ERRDISPLAYTOOSMALL;
70 if (initial_height != 0)
71 height = initial_height;
77 if (initial_width != 0)
78 width = initial_width;
85 /* center dialog box on screen */
86 x = (COLS - width) / 2;
87 y = (LINES - height) / 2;
89 draw_shadow(stdscr, y, x, height, width);
91 dialog = newwin(height, width, y, x);
94 /* Create window for box region, used for scrolling text */
97 box = subwin(dialog, boxh, boxw, y + 1, x + 1);
98 wattrset(box, dlg.dialog.atr);
99 wbkgdset(box, dlg.dialog.atr & A_COLOR);
103 /* register the new window, along with its borders */
104 draw_box(dialog, 0, 0, height, width,
105 dlg.dialog.atr, dlg.border.atr);
107 wattrset(dialog, dlg.border.atr);
108 mvwaddch(dialog, height - 3, 0, ACS_LTEE);
109 for (i = 0; i < width - 2; i++)
110 waddch(dialog, ACS_HLINE);
111 wattrset(dialog, dlg.dialog.atr);
112 wbkgdset(dialog, dlg.dialog.atr & A_COLOR);
113 waddch(dialog, ACS_RTEE);
115 print_title(dialog, title, width);
117 print_button(dialog, gettext(" Exit "), height - 2, width / 2 - 4, TRUE);
118 wnoutrefresh(dialog);
119 getyx(dialog, cur_y, cur_x); /* Save cursor position */
121 /* Print first page of text */
122 attr_clear(box, boxh, boxw, dlg.dialog.atr);
123 refresh_text_box(dialog, box, boxh, boxw, cur_y, cur_x);
125 while ((key != KEY_ESC) && (key != '\n')) {
126 key = wgetch(dialog);
135 case 'g': /* First page */
137 if (!begin_reached) {
140 refresh_text_box(dialog, box, boxh, boxw,
144 case 'G': /* Last page */
148 /* point to last char in buf */
149 page = buf + strlen(buf);
151 refresh_text_box(dialog, box, boxh, boxw,
154 case 'K': /* Previous line */
157 if (!begin_reached) {
158 back_lines(page_length + 1);
160 /* We don't call print_page() here but use
161 * scrolling to ensure faster screen update.
162 * However, 'end_reached' and 'page_length'
163 * should still be updated, and 'page' should
164 * point to start of next page. This is done
165 * by calling get_line() in the following
168 wscrl(box, -1); /* Scroll box region down one line */
169 scrollok(box, FALSE);
172 for (i = 0; i < boxh; i++) {
174 /* print first line of page */
175 print_line(box, 0, boxw);
178 /* Called to update 'end_reached' and 'page' */
182 if (end_reached && !passed_end)
186 print_position(dialog);
187 wmove(dialog, cur_y, cur_x); /* Restore cursor position */
191 case 'B': /* Previous page */
196 back_lines(page_length + boxh);
197 refresh_text_box(dialog, box, boxh, boxw,
200 case 'J': /* Next line */
206 scroll(box); /* Scroll box region up one line */
207 scrollok(box, FALSE);
208 print_line(box, boxh - 1, boxw);
210 print_position(dialog);
211 wmove(dialog, cur_y, cur_x); /* Restore cursor position */
215 case KEY_NPAGE: /* Next page */
221 refresh_text_box(dialog, box, boxh, boxw,
224 case '0': /* Beginning of line */
225 case 'H': /* Scroll left */
235 /* Reprint current page to scroll horizontally */
236 back_lines(page_length);
237 refresh_text_box(dialog, box, boxh, boxw,
240 case 'L': /* Scroll right */
243 if (hscroll >= MAX_LEN)
246 /* Reprint current page to scroll horizontally */
247 back_lines(page_length);
248 refresh_text_box(dialog, box, boxh, boxw,
252 key = on_key_esc(dialog);
264 return key; /* ESC pressed */
268 * Go back 'n' lines in text. Called by dialog_textbox().
269 * 'page' will be updated to point to the desired line in 'buf'.
271 static void back_lines(int n)
276 /* Go back 'n' lines */
277 for (i = 0; i < n; i++) {
295 } while (*page != '\n');
301 * Print a new page of text. Called by dialog_textbox().
303 static void print_page(WINDOW * win, int height, int width)
305 int i, passed_end = 0;
308 for (i = 0; i < height; i++) {
309 print_line(win, i, width);
312 if (end_reached && !passed_end)
319 * Print a new line of text. Called by dialog_textbox() and print_page().
321 static void print_line(WINDOW * win, int row, int width)
327 line += MIN(strlen(line), hscroll); /* Scroll horizontally */
328 wmove(win, row, 0); /* move cursor to correct line */
330 waddnstr(win, line, MIN(strlen(line), width - 2));
333 /* Clear 'residue' of previous line */
337 for (i = 0; i < width - x; i++)
346 * Return current line of text. Called by dialog_textbox() and print_line().
347 * 'page' should point to start of current line before calling, and will be
348 * updated to point to start of next line.
350 static char *get_line(void)
353 static char line[MAX_LEN + 1];
356 while (*page != '\n') {
362 } else if (i < MAX_LEN)
363 line[i++] = *(page++);
365 /* Truncate lines longer than MAX_LEN characters */
374 page++; /* move pass '\n' */
380 * Print current position
382 static void print_position(WINDOW * win)
386 wattrset(win, dlg.position_indicator.atr);
387 wbkgdset(win, dlg.position_indicator.atr & A_COLOR);
388 percent = (page - buf) * 100 / strlen(buf);
389 wmove(win, getmaxy(win) - 3, getmaxx(win) - 9);
390 wprintw(win, "(%3d%%)", percent);