codestudy/oed/files/main.c/main

main

dz / codestudy / oed / files / main.c / main

Node Tree

Nodes

01_pledge
content call to pledge, for systems that have it
parents codestudy/oed/files/main.c/main
file reference codestudy/oed/main.c:132-135
location codestudy/dz/oed/files.dz:18

02_home_envar
content Get the home environment variable
parents codestudy/oed/files/main.c/main
file reference codestudy/oed/main.c:137
location codestudy/dz/oed/files.dz:23

03_top
content "top" label
parents codestudy/oed/files/main.c/main
file reference codestudy/oed/main.c:139
location codestudy/dz/oed/files.dz:28

04_getopt_parsing
content getopt parsing
parents codestudy/oed/files/main.c/main
file reference codestudy/oed/main.c:140-154
location codestudy/dz/oed/files.dz:33

2025-01-04 13:47 weird while loop structure.c/main/04_getopt_parsing

In C, you don't need braces for a while loop if there is one statement. In this loop, they cram a switch statement inside of a while loop. Since the switch statement is only one statement. --- Perhaps this is done to minimize indentation?
05_optind_argv
content optind (optional index)? pointer arithmetic
parents codestudy/oed/files/main.c/main
file reference codestudy/oed/main.c:155-156
location codestudy/dz/oed/files.dz:38

06_parse_flags
content parse flags
parents codestudy/oed/files/main.c/main
file reference codestudy/oed/main.c:157-165
location codestudy/dz/oed/files.dz:43

07_set_interactive_mode
content set up interactive mode
parents codestudy/oed/files/main.c/main
file reference codestudy/oed/main.c:167-177
location codestudy/dz/oed/files.dz:48

08_set_up_signals
content set up signals
parents codestudy/oed/files/main.c/main
file reference codestudy/oed/main.c:179-186
location codestudy/dz/oed/files.dz:53

09_attempt_to_load_file
content initialize buffers and attempt to load in file
parents codestudy/oed/files/main.c/main
file reference codestudy/oed/main.c:192-206
location codestudy/dz/oed/files.dz:59

10_loop
content main interactive loop
parents codestudy/oed/files/main.c/main
file reference codestudy/oed/main.c:208-286

2025-01-04 14:09 inner loop next thing to dig into.c/main/10_loop

This is the meat of the program after the initial setup, and where most of the program logic seems to be.