diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/vi.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/editors/vi.c b/editors/vi.c index 553561b21..bf537ee62 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -347,7 +347,7 @@ extern int vi_main(int argc, char **argv) | |||
347 | (void) srand((long) my_pid); | 347 | (void) srand((long) my_pid); |
348 | #endif /* CONFIG_FEATURE_VI_CRASHME */ | 348 | #endif /* CONFIG_FEATURE_VI_CRASHME */ |
349 | 349 | ||
350 | status_buffer = STATUS_BUFFER; | 350 | status_buffer = (Byte *)STATUS_BUFFER; |
351 | last_status_cksum = 0; | 351 | last_status_cksum = 0; |
352 | 352 | ||
353 | #ifdef CONFIG_FEATURE_VI_READONLY | 353 | #ifdef CONFIG_FEATURE_VI_READONLY |
@@ -729,7 +729,7 @@ static void colon(Byte * buf) | |||
729 | while (isblnk(*buf)) | 729 | while (isblnk(*buf)) |
730 | buf++; | 730 | buf++; |
731 | strcpy((char *) args, (char *) buf); | 731 | strcpy((char *) args, (char *) buf); |
732 | buf1 = last_char_is((char *)cmd, '!'); | 732 | buf1 = (Byte*)last_char_is((char *)cmd, '!'); |
733 | if (buf1) { | 733 | if (buf1) { |
734 | useforce = TRUE; | 734 | useforce = TRUE; |
735 | *buf1 = '\0'; // get rid of ! | 735 | *buf1 = '\0'; // get rid of ! |
@@ -763,7 +763,7 @@ static void colon(Byte * buf) | |||
763 | place_cursor(rows - 1, 0, FALSE); // go to Status line | 763 | place_cursor(rows - 1, 0, FALSE); // go to Status line |
764 | clear_to_eol(); // clear the line | 764 | clear_to_eol(); // clear the line |
765 | cookmode(); | 765 | cookmode(); |
766 | system(orig_buf+1); // run the cmd | 766 | system((char*)(orig_buf+1)); // run the cmd |
767 | rawmode(); | 767 | rawmode(); |
768 | Hit_Return(); // let user see results | 768 | Hit_Return(); // let user see results |
769 | (void) alarm(3); // done waiting for input | 769 | (void) alarm(3); // done waiting for input |
@@ -787,10 +787,10 @@ static void colon(Byte * buf) | |||
787 | psbs("No write since last change (:edit! overrides)"); | 787 | psbs("No write since last change (:edit! overrides)"); |
788 | goto vc1; | 788 | goto vc1; |
789 | } | 789 | } |
790 | if (strlen(args) > 0) { | 790 | if (strlen((char*)args) > 0) { |
791 | // the user supplied a file name | 791 | // the user supplied a file name |
792 | fn= args; | 792 | fn= args; |
793 | } else if (cfn != 0 && strlen(cfn) > 0) { | 793 | } else if (cfn != 0 && strlen((char*)cfn) > 0) { |
794 | // no user supplied name- use the current filename | 794 | // no user supplied name- use the current filename |
795 | fn= cfn; | 795 | fn= cfn; |
796 | goto vc5; | 796 | goto vc5; |
@@ -2397,7 +2397,7 @@ static Byte *get_input_line(Byte * prompt) // get input line- use "status line" | |||
2397 | last_status_cksum = 0; // force status update | 2397 | last_status_cksum = 0; // force status update |
2398 | place_cursor(rows - 1, 0, FALSE); // go to Status line, bottom of screen | 2398 | place_cursor(rows - 1, 0, FALSE); // go to Status line, bottom of screen |
2399 | clear_to_eol(); // clear the line | 2399 | clear_to_eol(); // clear the line |
2400 | write1(prompt); // write out the :, /, or ? prompt | 2400 | write1((char *) prompt); // write out the :, /, or ? prompt |
2401 | 2401 | ||
2402 | for (i = strlen((char *) buf); i < BUFSIZ;) { | 2402 | for (i = strlen((char *) buf); i < BUFSIZ;) { |
2403 | c = get_one_char(); // read user input | 2403 | c = get_one_char(); // read user input |
@@ -2430,7 +2430,7 @@ static int file_size(const Byte * fn) // what is the byte size of "fn" | |||
2430 | struct stat st_buf; | 2430 | struct stat st_buf; |
2431 | int cnt, sr; | 2431 | int cnt, sr; |
2432 | 2432 | ||
2433 | if (fn == 0 || strlen(fn) <= 0) | 2433 | if (fn == 0 || strlen((char *)fn) <= 0) |
2434 | return (-1); | 2434 | return (-1); |
2435 | cnt = -1; | 2435 | cnt = -1; |
2436 | sr = stat((char *) fn, &st_buf); // see if file exists | 2436 | sr = stat((char *) fn, &st_buf); // see if file exists |
@@ -2586,7 +2586,7 @@ static void place_cursor(int row, int col, int opti) | |||
2586 | strcat(cm2, "\r"); // start at col 0 | 2586 | strcat(cm2, "\r"); // start at col 0 |
2587 | // just send out orignal source char to get to correct place | 2587 | // just send out orignal source char to get to correct place |
2588 | screenp = &screen[row * columns]; // start of screen line | 2588 | screenp = &screen[row * columns]; // start of screen line |
2589 | strncat(cm2, screenp, col); | 2589 | strncat(cm2, (char* )screenp, col); |
2590 | 2590 | ||
2591 | //----- 3. Try some other way of moving cursor | 2591 | //----- 3. Try some other way of moving cursor |
2592 | //--------------------------------------------- | 2592 | //--------------------------------------------- |
@@ -2657,10 +2657,10 @@ static void screen_erase(void) | |||
2657 | memset(screen, ' ', screensize); // clear new screen | 2657 | memset(screen, ' ', screensize); // clear new screen |
2658 | } | 2658 | } |
2659 | 2659 | ||
2660 | static int bufsum(char *buf, int count) | 2660 | static int bufsum(unsigned char *buf, int count) |
2661 | { | 2661 | { |
2662 | int sum = 0; | 2662 | int sum = 0; |
2663 | char *e = buf + count; | 2663 | unsigned char *e = buf + count; |
2664 | while (buf < e) | 2664 | while (buf < e) |
2665 | sum += *buf++; | 2665 | sum += *buf++; |
2666 | return sum; | 2666 | return sum; |
@@ -2680,10 +2680,10 @@ static void show_status_line(void) | |||
2680 | if (have_status_msg || ((cnt > 0 && last_status_cksum != cksum))) { | 2680 | if (have_status_msg || ((cnt > 0 && last_status_cksum != cksum))) { |
2681 | last_status_cksum= cksum; // remember if we have seen this line | 2681 | last_status_cksum= cksum; // remember if we have seen this line |
2682 | place_cursor(rows - 1, 0, FALSE); // put cursor on status line | 2682 | place_cursor(rows - 1, 0, FALSE); // put cursor on status line |
2683 | write1(status_buffer); | 2683 | write1((char*)status_buffer); |
2684 | clear_to_eol(); | 2684 | clear_to_eol(); |
2685 | if (have_status_msg) { | 2685 | if (have_status_msg) { |
2686 | if (((int)strlen(status_buffer) - (have_status_msg - 1)) > | 2686 | if (((int)strlen((char*)status_buffer) - (have_status_msg - 1)) > |
2687 | (columns - 1) ) { | 2687 | (columns - 1) ) { |
2688 | have_status_msg = 0; | 2688 | have_status_msg = 0; |
2689 | Hit_Return(); | 2689 | Hit_Return(); |
@@ -2937,7 +2937,7 @@ static void refresh(int full_screen) | |||
2937 | // write line out to terminal | 2937 | // write line out to terminal |
2938 | { | 2938 | { |
2939 | int nic = ce-cs+1; | 2939 | int nic = ce-cs+1; |
2940 | char *out = sp+cs; | 2940 | char *out = (char*)sp+cs; |
2941 | 2941 | ||
2942 | while(nic-- > 0) { | 2942 | while(nic-- > 0) { |
2943 | putchar(*out); | 2943 | putchar(*out); |