Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/editors/ed.c


Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/editors/ed.c

    r3232 r3621  
    88 */
    99
     10//config:config ED
     11//config:   bool "ed"
     12//config:   default y
     13//config:   help
     14//config:     The original 1970's Unix text editor, from the days of teletypes.
     15//config:     Small, simple, evil. Part of SUSv3. If you're not already using
     16//config:     this, you don't need it.
     17
     18//kbuild:lib-$(CONFIG_ED) += ed.o
     19
     20//applet:IF_ED(APPLET(ed, BB_DIR_BIN, BB_SUID_DROP))
     21
    1022//usage:#define ed_trivial_usage ""
    1123//usage:#define ed_full_usage ""
    1224
    1325#include "libbb.h"
     26#include "common_bufsiz.h"
    1427
    1528typedef struct LINE {
     
    2437
    2538enum {
    26     USERSIZE = sizeof(searchString) > 1024 ? 1024
    27              : sizeof(searchString) - 1, /* max line length typed in by user */
     39    USERSIZE = COMMON_BUFSIZE > 1024 ? 1024
     40             : COMMON_BUFSIZE - 1, /* max line length typed in by user */
    2841    INITBUF_SIZE = 1024, /* initial buffer size */
    2942};
     
    5568#define marks              (G.marks             )
    5669#define INIT_G() do { \
     70    setup_common_bufsiz(); \
    5771    SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
    5872} while (0)
     
    195209                    printf("\"%s\"\n", fileName);
    196210                else
    197                     printf("No file name\n");
     211                    puts("No file name");
    198212                break;
    199213            }
     
    721735        bufUsed += cc;
    722736        bufPtr = bufBase;
    723 
    724737    } while (cc > 0);
    725738
Note: See TracChangeset for help on using the changeset viewer.