Skip to content

global variable and structure project #121

Description

@RenOpSo2

I tried exploring this codebase, I found global variables everywhere

and there are many side effects

localhost:~/joe/joe# grep -n "^[a-z].*;" *.c | grep -v "static" | heads -20
EngNotation.c:68:const int prefix_count = NUM_PREFIX;
EngNotation.c:69:const int prefix_start = PREFIX_START;
EngNotation.c:70:const int prefix_end = PREFIX_START + 3 * ( NUM_PREFIX - 1 );
b.c:31:char stdbuf[stdsiz];
b.c:33:bool guesscrlf = 0;
b.c:34:bool guessindent = 0;
b.c:36:int error;
b.c:37:bool force = 0;
b.c:40:bool nodeadjoe = 0;
b.c:764:struct ansi_entry *ansi_table;
b.c:765:int ansi_siz;
b.c:766:int ansi_len;
b.c:2362:bool guess_utf16;
b.c:2642:int found_space;
b.c:2643:int found_tab;
b.c:3194:bool break_links; /
Set to break hard links on writes /
b.c:3195:bool break_symlinks; /
Set to break symbolic links and hard links on writes */
bw.c:11:int bg_linum = 0;
bw.c:12:int bg_curlinum = 0;
bw.c:13:int bg_curlin = 0;

To be honest, this codebase is too legacy and messy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions