Author: ed Date: Tue May 26 19:01:07 2009 New Revision: 192840 URL: http://svn.freebsd.org/changeset/base/192840
Log: Vendor import of ee 1.4.7. Modified: vendor/ee/dist/Changes vendor/ee/dist/README.ee vendor/ee/dist/ee.c vendor/ee/dist/ee_version.h vendor/ee/dist/new_curse.c Modified: vendor/ee/dist/Changes ============================================================================== --- vendor/ee/dist/Changes Tue May 26 18:59:20 2009 (r192839) +++ vendor/ee/dist/Changes Tue May 26 19:01:07 2009 (r192840) @@ -1,3 +1,9 @@ +version 1.4.7 (2/10/2009) +- changed how strings are terminated from the old usage of NULL to the current + use of character zero, '\0' +- changed the licensing since the Artistic License is now considered + restrictive + version 1.4.6 - modified new_curse.c to handle different subdirectory naming in terminfo directory; first noted on Mac OS 10.2 Modified: vendor/ee/dist/README.ee ============================================================================== --- vendor/ee/dist/README.ee Tue May 26 18:59:20 2009 (r192839) +++ vendor/ee/dist/README.ee Tue May 26 19:01:07 2009 (r192840) @@ -1,26 +1,29 @@ - THIS MATERIAL IS PROVIDED "AS IS". THERE ARE NO WARRANTIES OF - ANY KIND WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE. Neither Hewlett-Packard nor - Hugh Mahon shall be liable for errors contained herein, nor for - incidental or consequential damages in connection with the - furnishing, performance or use of this material. Neither - Hewlett-Packard nor Hugh Mahon assumes any responsibility for - the use or reliability of this software or documentation. This - software and documentation is totally UNSUPPORTED. There is no - support contract available. Hewlett-Packard has done NO - Quality Assurance on ANY of the program or documentation. You - may find the quality of the materials inferior to supported - materials. +Copyright (c) 2009, Hugh Mahon +All rights reserved. - This software may be distributed under the terms of Larry Wall's - Artistic license, a copy of which is included in this distribution. - - This notice must be included with this software and any - derivatives. - - Any modifications to this software by anyone but the original author - must be so noted. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. The editor 'ee' (easy editor) is intended to be a simple, easy to use @@ -51,7 +54,7 @@ completely replaced by graphical user in years, I'd like to do what I can to make using computers with less glamorous interfaces as easy to use as possible. If terminal interfaces are still used in ten years, I hope neophytes won't still be stuck with -only vi. +only vi. For a text editor to be easy to use requires a certain set of abilities. In order for ee to work, a terminal must have the ability to position the cursor @@ -110,7 +113,7 @@ are: people. Hugh Mahon |___| -h_ma...@fc.hp.com | | +hugh4...@yahoo.com | | |\ /| | \/ | Modified: vendor/ee/dist/ee.c ============================================================================== --- vendor/ee/dist/ee.c Tue May 26 18:59:20 2009 (r192839) +++ vendor/ee/dist/ee.c Tue May 26 19:01:07 2009 (r192840) @@ -5,34 +5,35 @@ | | written by Hugh Mahon | - | THIS MATERIAL IS PROVIDED "AS IS". THERE ARE - | NO WARRANTIES OF ANY KIND WITH REGARD TO THIS - | MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE - | IMPLIED WARRANTIES OF MERCHANTABILITY AND - | FITNESS FOR A PARTICULAR PURPOSE. Neither - | Hewlett-Packard nor Hugh Mahon shall be liable - | for errors contained herein, nor for - | incidental or consequential damages in - | connection with the furnishing, performance or - | use of this material. Neither Hewlett-Packard - | nor Hugh Mahon assumes any responsibility for - | the use or reliability of this software or - | documentation. This software and - | documentation is totally UNSUPPORTED. There - | is no support contract available. Hewlett- - | Packard has done NO Quality Assurance on ANY - | of the program or documentation. You may find - | the quality of the materials inferior to - | supported materials. | - | This software is not a product of Hewlett-Packard, Co., or any - | other company. No support is implied or offered with this software. - | You've got the source, and you're on your own. + | Copyright (c) 2009, Hugh Mahon + | All rights reserved. + | + | Redistribution and use in source and binary forms, with or without + | modification, are permitted provided that the following conditions + | are met: + | + | * Redistributions of source code must retain the above copyright + | notice, this list of conditions and the following disclaimer. + | * Redistributions in binary form must reproduce the above + | copyright notice, this list of conditions and the following + | disclaimer in the documentation and/or other materials provided + | with the distribution. + | + | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + | POSSIBILITY OF SUCH DAMAGE. | - | This software may be distributed under the terms of Larry Wall's - | Artistic license, a copy of which is included in this distribution. - | - | This notice must be included with this software and any derivatives. + | -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | | This editor was purposely developed to be simple, both in | interface and implementation. This editor was developed to @@ -54,13 +55,7 @@ */ char *ee_copyright_message = -"Copyright (c) 1986, 1990, 1991, 1992, 1993, 1994, 1995, 1996 Hugh Mahon "; - -char *ee_long_notice[] = { - "This software and documentation contains", - "proprietary information which is protected by", - "copyright. All rights are reserved." - }; +"Copyright (c) 1986, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2009 Hugh Mahon "; #include "ee_version.h" @@ -300,7 +295,7 @@ void finish P_((void)); int quit P_((int noverify)); void edit_abort P_((int arg)); void delete_text P_((void)); -int write_file P_((char *file_name)); +int write_file P_((char *file_name, int warn_if_exists)); int search P_((int display_message)); void search_prompt P_((void)); void del_char P_((void)); @@ -562,7 +557,7 @@ char *argv[]; signal(SIGINT, edit_abort); d_char = malloc(3); /* provide a buffer for multi-byte chars */ d_word = malloc(150); - *d_word = (char) NULL; + *d_word = '\0'; d_line = NULL; dlt_line = txtalloc(); dlt_line->line = d_line; @@ -806,7 +801,7 @@ int disp; d_char[0] = *point; d_char[1] = *(point + 1); } - d_char[del_width] = (unsigned char) NULL; + d_char[del_width] = '\0'; } while (temp_pos <= curr_line->line_length) { @@ -834,7 +829,7 @@ int disp; if (in == 8) { d_char[0] = '\n'; - d_char[1] = (unsigned char) NULL; + d_char[1] = '\0'; } tp = point; temp_pos = 1; @@ -846,7 +841,7 @@ int disp; tp++; temp2++; } - *tp = (char) NULL; + *tp = '\0'; free(temp_buff->line); free(temp_buff); temp_buff = curr_line; @@ -972,7 +967,7 @@ int column; waddch(window, (char)character); return(1); } - for (i2 = 0; (string[i2] != (char) NULL) && (((column+i2+1)-horiz_offset) < last_col); i2++) + for (i2 = 0; (string[i2] != '\0') && (((column+i2+1)-horiz_offset) < last_col); i2++) waddch(window, string[i2]); return(strlen(string)); } @@ -1097,13 +1092,13 @@ int disp; temp++; } temp=point; - *temp = (char) NULL; + *temp = '\0'; temp = resiz_line((1 - temp_nod->line_length), curr_line, position); curr_line->line_length = 1 + temp - curr_line->line; } curr_line->line_length = position; curr_line = temp_nod; - *extra = (char) NULL; + *extra = '\0'; position = 1; point= curr_line->line; if (disp) @@ -1146,9 +1141,9 @@ struct files *name_alloc() /* allocate s unsigned char *next_word(string) /* move to next word in string */ unsigned char *string; { - while ((*string != (char) NULL) && ((*string != 32) && (*string != 9))) + while ((*string != '\0') && ((*string != 32) && (*string != 9))) string++; - while ((*string != (char) NULL) && ((*string == 32) || (*string == 9))) + while ((*string != '\0') && ((*string == 32) || (*string == 9))) string++; return(string); } @@ -1182,7 +1177,7 @@ control() /* use control for commands if (in == 1) /* control a */ { string = get_string(ascii_code_str, TRUE); - if (*string != (char) NULL) + if (*string != '\0') { in = atoi(string); wmove(text_win, scr_vert, (scr_horz - horiz_offset)); @@ -1290,7 +1285,7 @@ emacs_control() else if (in == 15) /* control o */ { string = get_string(ascii_code_str, TRUE); - if (*string != (char) NULL) + if (*string != '\0') { in = atoi(string); wmove(text_win, scr_vert, (scr_horz - horiz_offset)); @@ -1689,12 +1684,12 @@ char *cmd_str1; return; } cmd_str = next_word(cmd_str); - if (*cmd_str == (char) NULL) + if (*cmd_str == '\0') { cmd_str = cmd_str2 = get_string(file_write_prompt_str, TRUE); } tmp_file = resolve_name(cmd_str); - write_file(tmp_file); + write_file(tmp_file, 1); if (tmp_file != cmd_str) free(tmp_file); } @@ -1705,7 +1700,7 @@ char *cmd_str1; return; } cmd_str = next_word(cmd_str); - if (*cmd_str == (char) NULL) + if (*cmd_str == '\0') { cmd_str = cmd_str2 = get_string(file_read_prompt_str, TRUE); } @@ -1916,9 +1911,9 @@ int advance; /* if true, skip leading s } wrefresh(com_win); if (esc_flag) - in = (char) NULL; + in = '\0'; } while ((in != '\n') && (in != '\r')); - *nam_str = (char) NULL; + *nam_str = '\0'; nam_str = tmp_string; if (((*nam_str == ' ') || (*nam_str == 9)) && (advance)) nam_str = next_word(nam_str); @@ -1943,7 +1938,7 @@ int sensitive; strng1 = string1; strng2 = string2; tmp = 0; - if ((strng1 == NULL) || (strng2 == NULL) || (*strng1 == (char) NULL) || (*strng2 == (char) NULL)) + if ((strng1 == NULL) || (strng2 == NULL) || (*strng1 == '\0') || (*strng2 == '\0')) return(FALSE); equal = TRUE; while (equal) @@ -1960,7 +1955,7 @@ int sensitive; } strng1++; strng2++; - if ((*strng1 == (char) NULL) || (*strng2 == (char) NULL) || (*strng1 == ' ') || (*strng2 == ' ')) + if ((*strng1 == '\0') || (*strng2 == '\0') || (*strng1 == ' ') || (*strng2 == ' ')) break; tmp++; } @@ -2116,13 +2111,13 @@ char *arguments[]; temp_names = temp_names->next_name; } ptr = temp_names->name = malloc(strlen(buff) + 1); - while (*buff != (char) NULL) + while (*buff != '\0') { *ptr = *buff; buff++; ptr++; } - *ptr = (char) NULL; + *ptr = '\0'; temp_names->next_name = NULL; input_file = TRUE; recv_file = TRUE; @@ -2204,7 +2199,7 @@ check_fp() /* open or close files accor wmove(com_win, 0, 0); wclrtoeol(com_win); text_changes = TRUE; - if ((tmp_file != NULL) && (*tmp_file != (char) NULL)) + if ((tmp_file != NULL) && (*tmp_file != '\0')) wprintw(com_win, file_read_fin_msg, tmp_file); } wrefresh(com_win); @@ -2343,7 +2338,7 @@ int *append; /* TRUE if must append more point++; str1++; } - *point = (char) NULL; + *point = '\0'; *append = FALSE; if ((num == length) && (*str2 != '\n')) *append = TRUE; @@ -2381,10 +2376,10 @@ finish() /* prepare to exit edit session | portion of file_op() */ - if ((file_name == NULL) || (*file_name == (char) NULL)) + if ((file_name == NULL) || (*file_name == '\0')) file_name = get_string(save_file_name_prompt, TRUE); - if ((file_name == NULL) || (*file_name == (char) NULL)) + if ((file_name == NULL) || (*file_name == '\0')) { wmove(com_win, 0, 0); wprintw(com_win, file_not_saved_msg); @@ -2401,7 +2396,7 @@ finish() /* prepare to exit edit session file_name = tmp_file; } - if (write_file(file_name)) + if (write_file(file_name, 1)) { text_changes = FALSE; quit(0); @@ -2468,7 +2463,7 @@ delete_text() free(curr_line->next_line); } curr_line->next_line = NULL; - *curr_line->line = (char) NULL; + *curr_line->line = '\0'; curr_line->line_length = 1; curr_line->line_number = 1; point = curr_line->line; @@ -2477,8 +2472,9 @@ delete_text() } int -write_file(file_name) +write_file(file_name, warn_if_exists) char *file_name; +int warn_if_exists; { char cr; char *tmp_point; @@ -2488,7 +2484,8 @@ char *file_name; int write_flag = TRUE; charac = lines = 0; - if ((in_file_name == NULL) || strcmp(in_file_name, file_name)) + if (warn_if_exists && + ((in_file_name == NULL) || strcmp(in_file_name, file_name))) { if ((temp_fp = fopen(file_name, "r"))) { @@ -2558,7 +2555,7 @@ int display_message; int iter; int found; - if ((srch_str == NULL) || (*srch_str == (char) NULL)) + if ((srch_str == NULL) || (*srch_str == '\0')) return(FALSE); if (display_message) { @@ -2583,7 +2580,7 @@ int display_message; if (case_sen) /* if case sensitive */ { srch_3 = srch_str; - while ((*srch_2 == *srch_3) && (*srch_3 != (char) NULL)) + while ((*srch_2 == *srch_3) && (*srch_3 != '\0')) { found = TRUE; srch_2++; @@ -2593,14 +2590,14 @@ int display_message; else /* if not case sensitive */ { srch_3 = u_srch_str; - while ((toupper(*srch_2) == *srch_3) && (*srch_3 != (char) NULL)) + while ((toupper(*srch_2) == *srch_3) && (*srch_3 != '\0')) { found = TRUE; srch_2++; srch_3++; } } /* end else */ - if (!((*srch_3 == (char) NULL) && (found))) + if (!((*srch_3 == '\0') && (found))) { found = FALSE; if (iter < srch_line->line_length) @@ -2668,19 +2665,19 @@ search_prompt() /* prompt and read sear { if (srch_str != NULL) free(srch_str); - if ((u_srch_str != NULL) && (*u_srch_str != (char) NULL)) + if ((u_srch_str != NULL) && (*u_srch_str != '\0')) free(u_srch_str); srch_str = get_string(search_prompt_str, FALSE); gold = FALSE; srch_3 = srch_str; srch_1 = u_srch_str = malloc(strlen(srch_str) + 1); - while (*srch_3 != (char) NULL) + while (*srch_3 != '\0') { *srch_1 = toupper(*srch_3); srch_1++; srch_3++; } - *srch_1 = (char) NULL; + *srch_1 = '\0'; search(TRUE); } @@ -2717,7 +2714,7 @@ undel_char() /* undelete last deleted { in = d_char[0]; insert(in); - if (d_char[1] != (unsigned char) NULL) + if (d_char[1] != '\0') { in = d_char[1]; insert(in); @@ -2759,7 +2756,7 @@ del_word() /* delete word in front of d_word2++; d_word3++; } - *d_word2 = (char) NULL; + *d_word2 = '\0'; d_wrd_len = difference = d_word2 - d_word; d_word2 = point; while (tposit < curr_line->line_length) @@ -2770,7 +2767,7 @@ del_word() /* delete word in front of d_word3++; } curr_line->line_length -= difference; - *d_word2 = (char) NULL; + *d_word2 = '\0'; draw_line(scr_vert, scr_horz,point,position,curr_line->line_length); d_char[0] = tmp_char[0]; d_char[1] = tmp_char[1]; @@ -2823,7 +2820,7 @@ undel_word() /* undelete last deleted w } curr_line->line_length += d_wrd_len; tmp_old_ptr = point; - *tmp_ptr = (char) NULL; + *tmp_ptr = '\0'; tmp_ptr = tmp_space; tposit = 1; /* @@ -2836,7 +2833,7 @@ undel_word() /* undelete last deleted w tmp_ptr++; tmp_old_ptr++; } - *tmp_old_ptr = (char) NULL; + *tmp_old_ptr = '\0'; free(tmp_space); draw_line(scr_vert, scr_horz, point, position, curr_line->line_length); } @@ -2862,8 +2859,8 @@ del_line() /* delete from cursor to en tposit++; } dlt_line->line_length = 1 + tposit - position; - *dl1 = (char) NULL; - *point = (char) NULL; + *dl1 = '\0'; + *point = '\0'; curr_line->line_length = position; wclrtoeol(text_win); if (curr_line->next_line != NULL) @@ -2898,7 +2895,7 @@ undel_line() /* undelete last deleted ud1++; ud2++; } - *ud1 = (char) NULL; + *ud1 = '\0'; draw_line(scr_vert, scr_horz,point,position,curr_line->line_length); } @@ -3044,7 +3041,7 @@ char *string; /* string containing user if (!(path = getenv("SHELL"))) path = "/bin/sh"; last_slash = temp_point = path; - while (*temp_point != (char) NULL) + while (*temp_point != '\0') { if (*temp_point == '/') last_slash = ++temp_point; @@ -3734,7 +3731,7 @@ int arg; { string = get_string(file_write_prompt_str, TRUE); tmp_file = resolve_name(string); - write_file(tmp_file); + write_file(tmp_file, 1); if (tmp_file != string) free(tmp_file); free(string); @@ -3751,9 +3748,9 @@ int arg; flag = FALSE; string = in_file_name; - if ((string == NULL) || (*string == (char) NULL)) + if ((string == NULL) || (*string == '\0')) string = get_string(save_file_name_prompt, TRUE); - if ((string == NULL) || (*string == (char) NULL)) + if ((string == NULL) || (*string == '\0')) { wmove(com_win, 0, 0); wprintw(com_win, file_not_saved_msg); @@ -3771,7 +3768,7 @@ int arg; string = tmp_file; } } - if (write_file(string)) + if (write_file(string, 1)) { in_file_name = string; text_changes = FALSE; @@ -3788,7 +3785,7 @@ shell_op() char *string; if (((string = get_string(shell_prompt, TRUE)) != NULL) && - (*string != (char) NULL)) + (*string != '\0')) { sh_command(string); free(string); @@ -3914,14 +3911,14 @@ Format() /* format the paragraph accordi offset -= position; counter = position; line = temp1 = point; - while ((*temp1 != (char) NULL) && (*temp1 != ' ') && (*temp1 != '\t') && (counter < curr_line->line_length)) + while ((*temp1 != '\0') && (*temp1 != ' ') && (*temp1 != '\t') && (counter < curr_line->line_length)) { *temp2 = *temp1; temp2++; temp1++; counter++; } - *temp2 = (char) NULL; + *temp2 = '\0'; if (position != 1) bol(); while (!Blank_Line(curr_line->prev_line)) @@ -4113,7 +4110,7 @@ ee_init() /* check for init file and rea str1 = str2 = string; while (*str2 != '\n') str2++; - *str2 = (char) NULL; + *str2 = '\0'; if (unique_test(string, init_strings) != 1) continue; @@ -4144,7 +4141,7 @@ ee_init() /* check for init file and rea else if (compare(str1, Echo, FALSE)) { str1 = next_word(str1); - if (*str1 != (char) NULL) + if (*str1 != '\0') echo_string(str1); } else if (compare(str1, PRINTCOMMAND, FALSE)) @@ -4268,7 +4265,7 @@ dump_ee_conf() while ((string = fgets(buffer, 512, old_init_file)) != NULL) { length = strlen(string); - string[length - 1] = (char) NULL; + string[length - 1] = '\0'; if (unique_test(string, init_strings) == 1) { @@ -4315,7 +4312,7 @@ char *string; int Counter; temp = string; - while (*temp != (char) NULL) + while (*temp != '\0') { if (*temp == '\\') { @@ -4382,17 +4379,24 @@ spell_op() /* check spelling of words in void ispell_op() { - char name[128]; + char template[128], *name; char string[256]; - int pid; + int fd; if (restrict_mode()) { return; } - pid = getpid(); - sprintf(name, "/tmp/ee.%d", pid); - if (write_file(name)) + (void)sprintf(template, "/tmp/ee.XXXXXXXX"); + fd = mkstemp(template); + if (fd < 0) { + wmove(com_win, 0, 0); + wprintw(com_win, create_file_fail_msg, name); + wrefresh(com_win); + return; + } + close(fd); + if (write_file(name, 0)) { sprintf(string, "ispell %s", name); sh_command(string); @@ -4415,7 +4419,7 @@ struct text *test_line; return(0); pnt = test_line->line; - if ((pnt == NULL) || (*pnt == (char) NULL) || + if ((pnt == NULL) || (*pnt == '\0') || (*pnt == '.') || (*pnt == '>')) return(0); @@ -4424,16 +4428,16 @@ struct text *test_line; pnt = next_word(pnt); } - if (*pnt == (char) NULL) + if (*pnt == '\0') return(0); counter = 0; - while ((*pnt != (char) NULL) && ((*pnt != ' ') && (*pnt != '\t'))) + while ((*pnt != '\0') && ((*pnt != ' ') && (*pnt != '\t'))) { pnt++; counter++; } - while ((*pnt != (char) NULL) && ((*pnt == ' ') || (*pnt == '\t'))) + while ((*pnt != '\0') && ((*pnt == ' ') || (*pnt == '\t'))) { pnt++; counter++; @@ -4484,7 +4488,7 @@ Auto_Format() /* format the paragraph ac d_line = NULL; auto_format = FALSE; offset = position; - if ((position != 1) && ((*point == ' ') || (*point == '\t') || (position == curr_line->line_length) || (*point == (char) NULL))) + if ((position != 1) && ((*point == ' ') || (*point == '\t') || (position == curr_line->line_length) || (*point == '\0'))) prev_word(); temp_dword = d_word; temp_dwl = d_wrd_len; @@ -4499,14 +4503,14 @@ Auto_Format() /* format the paragraph ac offset -= position; counter = position; line = temp1 = point; - while ((*temp1 != (char) NULL) && (*temp1 != ' ') && (*temp1 != '\t') && (counter < curr_line->line_length)) + while ((*temp1 != '\0') && (*temp1 != ' ') && (*temp1 != '\t') && (counter < curr_line->line_length)) { *temp2 = *temp1; temp2++; temp1++; counter++; } - *temp2 = (char) NULL; + *temp2 = '\0'; if (position != 1) bol(); while (!Blank_Line(curr_line->prev_line)) @@ -4808,9 +4812,9 @@ char * string, *substring; { char *full, *sub; - for (sub = substring; (sub != NULL) && (*sub != (char)NULL); sub++) + for (sub = substring; (sub != NULL) && (*sub != '\0'); sub++) { - for (full = string; (full != NULL) && (*full != (char)NULL); + for (full = string; (full != NULL) && (*full != '\0'); full++) { if (*sub == *full) @@ -4853,7 +4857,7 @@ char *name; slash = strchr(name, '/'); if (slash == NULL) return(name); - *slash = (char) NULL; + *slash = '\0'; user = (struct passwd *) getpwnam((name + 1)); *slash = '/'; } @@ -4873,10 +4877,10 @@ char *name; tmp = buffer; index = 0; - while ((*tmp != (char) NULL) && (index < 1024)) + while ((*tmp != '\0') && (index < 1024)) { - while ((*tmp != (char) NULL) && (*tmp != '$') && + while ((*tmp != '\0') && (*tmp != '$') && (index < 1024)) { long_buffer[index] = *tmp; @@ -4892,7 +4896,7 @@ char *name; if (*tmp == '{') /* } */ /* bracketed variable name */ { tmp++; /* { */ - while ((*tmp != (char) NULL) && + while ((*tmp != '\0') && (*tmp != '}') && (counter < 128)) { @@ -4905,7 +4909,7 @@ char *name; } else { - while ((*tmp != (char) NULL) && + while ((*tmp != '\0') && (*tmp != '/') && (*tmp != '$') && (counter < 128)) @@ -4915,7 +4919,7 @@ char *name; tmp++; } } - short_buffer[counter] = (char) NULL; + short_buffer[counter] = '\0'; if ((slash = getenv(short_buffer)) != NULL) { offset = strlen(slash); @@ -4938,7 +4942,7 @@ char *name; if (index == 1024) return(buffer); else - long_buffer[index] = (char) NULL; + long_buffer[index] = '\0'; if (name != buffer) free(buffer); Modified: vendor/ee/dist/ee_version.h ============================================================================== --- vendor/ee/dist/ee_version.h Tue May 26 18:59:20 2009 (r192839) +++ vendor/ee/dist/ee_version.h Tue May 26 19:01:07 2009 (r192840) @@ -2,5 +2,5 @@ | provide a version number for ee */ -#define EE_VERSION "1.4.6" +#define EE_VERSION "1.4.7" #define DATE_STRING "$Date: 2002/09/21 00:50:54 $" Modified: vendor/ee/dist/new_curse.c ============================================================================== --- vendor/ee/dist/new_curse.c Tue May 26 18:59:20 2009 (r192839) +++ vendor/ee/dist/new_curse.c Tue May 26 19:01:07 2009 (r192840) @@ -5,43 +5,41 @@ | | written by Hugh Mahon | - | THIS MATERIAL IS PROVIDED "AS IS". THERE ARE - | NO WARRANTIES OF ANY KIND WITH REGARD TO THIS - | MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE - | IMPLIED WARRANTIES OF MERCHANTABILITY AND - | FITNESS FOR A PARTICULAR PURPOSE. Neither - | Hewlett-Packard nor Hugh Mahon shall be liable - | for errors contained herein, nor for - | incidental or consequential damages in - | connection with the furnishing, performance or - | use of this material. Neither Hewlett-Packard - | nor Hugh Mahon assumes any responsibility for - | the use or reliability of this software or - | documentation. This software and - | documentation is totally UNSUPPORTED. There - | is no support contract available. Hewlett- - | Packard has done NO Quality Assurance on ANY - | of the program or documentation. You may find - | the quality of the materials inferior to - | supported materials. + | Copyright (c) 1986, 1987, 1988, 1991, 1992, 1993, 1994, 1995, 2009 Hugh Mahon + | All rights reserved. + | + | Redistribution and use in source and binary forms, with or without + | modification, are permitted provided that the following conditions + | are met: + | + | * Redistributions of source code must retain the above copyright + | notice, this list of conditions and the following disclaimer. + | * Redistributions in binary form must reproduce the above + | copyright notice, this list of conditions and the following + | disclaimer in the documentation and/or other materials provided + | with the distribution. + | + | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + | POSSIBILITY OF SUCH DAMAGE. | - | This software is not a product of Hewlett-Packard, Co., or any - | other company. No support is implied or offered with this software. - | You've got the source, and you're on your own. - | - | This software may be distributed under the terms of Larry Wall's - | Artistic license, a copy of which is included in this distribution. - | - | This notice must be included with this software and any derivatives. - | - | Copyright (c) 1986, 1987, 1988, 1991, 1992, 1993, 1994, 1995 Hugh Mahon + | | All are rights reserved. | | $Header: /home/hugh/sources/old_ae/RCS/new_curse.c,v 1.54 2002/09/21 00:47:14 hugh Exp $ | */ -char *copyright_message[] = { "Copyright (c) 1986, 1987, 1988, 1991, 1992, 1993, 1994, 1995 Hugh Mahon", +char *copyright_message[] = { "Copyright (c) 1986, 1987, 1988, 1991, 1992, 1993, 1994, 1995, 2009 Hugh Mahon", "All rights are reserved."}; char * new_curse_name= "@(#) new_curse.c $Revision: 1.54 $"; @@ -1113,7 +1111,7 @@ INFO_PARSE() /* parse off the data in t Num_bools--; Booleans[counter++] = *TERM_data_ptr++; } - if (((unsigned int) TERM_data_ptr) & 1) /* force alignment */ + if ((unsigned long)TERM_data_ptr & 1) /* force alignment */ TERM_data_ptr++; counter = 0; while (Num_ints) @@ -1476,13 +1474,13 @@ int columns; for (i = 0; i < columns; i++) { tmp->row[i] = ' '; - tmp->attributes[i] = (char) NULL; + tmp->attributes[i] = '\0'; } tmp->scroll = tmp->changed = FALSE; - tmp->row[0] = (char) NULL; - tmp->attributes[0] = (char) NULL; - tmp->row[columns] = (char) NULL; - tmp->attributes[columns] = (char) NULL; + tmp->row[0] = '\0'; + tmp->attributes[0] = '\0'; + tmp->row[columns] = '\0'; + tmp->attributes[columns] = '\0'; tmp->last_char = 0; return(tmp); } @@ -1867,7 +1865,7 @@ int place; } delay = 0; Otemp = string; - while (*Otemp != (char) NULL) + while (*Otemp != '\0') { if (*Otemp == '%') { @@ -1885,7 +1883,7 @@ int place; | find the end of the | conditional statement */ - while ((strncmp(Otemp, "%t", 2)) && (*Otemp != (char) NULL)) + while ((strncmp(Otemp, "%t", 2)) && (*Otemp != '\0')) { /* | move past '%' @@ -1913,12 +1911,12 @@ int place; | find 'else' or end | of if statement */ - while ((strncmp(Otemp, "%e", 2)) && (strncmp(Otemp, "%;", 2)) && (*Otemp != (char) NULL)) + while ((strncmp(Otemp, "%e", 2)) && (strncmp(Otemp, "%;", 2)) && (*Otemp != '\0')) Otemp++; /* | if an 'else' found */ - if ((*Otemp != (char) NULL) && (!strncmp(Otemp, "%e", 2))) + if ((*Otemp != '\0') && (!strncmp(Otemp, "%e", 2))) { Otemp++; Otemp++; @@ -1926,12 +1924,12 @@ int place; /* | check for 'then' part */ - while ((*tchar != (char) NULL) && (strncmp(tchar, "%t", 2)) && (strncmp(tchar, "%;", 2))) + while ((*tchar != '\0') && (strncmp(tchar, "%t", 2)) && (strncmp(tchar, "%;", 2))) tchar++; /* | if end of string */ - if (*tchar == (char) NULL) + if (*tchar == '\0') { EVAL = FALSE; Cond_FLAG = FALSE; @@ -1955,7 +1953,7 @@ int place; | get out of if | statement */ - else if ((*Otemp != (char) NULL) && (!strncmp(Otemp, "%;", 2))) + else if ((*Otemp != '\0') && (!strncmp(Otemp, "%;", 2))) { EVAL = FALSE; Otemp++; @@ -1975,9 +1973,9 @@ int place; Cond_FLAG = FALSE; if (*Otemp != ';') { - while ((*Otemp != (char) NULL) && (strncmp(Otemp, "%;", 2))) + while ((*Otemp != '\0') && (strncmp(Otemp, "%;", 2))) Otemp++; - if (*Otemp != (char) NULL) + if (*Otemp != '\0') { Otemp++; Otemp++; @@ -2046,12 +2044,12 @@ int cols; for (j = line->last_char; j < column; j++) { line->row[j] = ' '; - line->attributes[j] = (char) NULL; + line->attributes[j] = '\0'; } } line->last_char = column; - line->row[column] = (char) NULL; - line->attributes[column] = (char) NULL; + line->row[column] = '\0'; + line->attributes[column] = '\0'; line->changed = TRUE; } @@ -2183,14 +2181,14 @@ WINDOW *window; virt_col++, user_col++) { virtual_line->row[virt_col] = ' '; - virtual_line->attributes[virt_col] = (char) NULL; + virtual_line->attributes[virt_col] = '\0'; } } if (virtual_scr->Num_cols != window->Num_cols) { if (virtual_line->last_char < (user_line->last_char + window->SC)) { - if (virtual_line->row[virtual_line->last_char] == (char) NULL) + if (virtual_line->row[virtual_line->last_char] == '\0') virtual_line->row[virtual_line->last_char] = ' '; virtual_line->last_char = min(virtual_scr->Num_cols, @@ -2199,7 +2197,7 @@ WINDOW *window; } else virtual_line->last_char = user_line->last_char; - virtual_line->row[virtual_line->last_char] = (char) NULL; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"