anon faec45bcfa | 9 months ago | |
---|---|---|
ass | 10 months ago | |
config | 9 months ago | |
docs | 10 months ago | |
obj | 10 months ago | |
src | 9 months ago | |
.gdb_history | 9 months ago | |
.gitignore | 9 months ago | |
Makefile | 9 months ago | |
README.md | 9 months ago |
Fork of Cscope version 15.9, with various improvements, because cscope is good and shall not be forgotten. While the original's mainentence seems abandoned and as far as I can tell you need a PhD in autoconf to compile the latest version, Csope is alive and well.
TODO: fill in
TODO: fill in
<-- Tab -->
+--Version-----------------Case--+ +--------------------------------+
A |+--------------+---------------+| |+------------------------------+|
| || Input Window | Result window || || ||
| |+--------------+ || ? || ||
|| Mode Window | || ----> || Help ||
% || | || <---- || ||
|| | || ... || ||
| || | || || ||
| || | || || ||
V |+--------------+---------------+| |+------------------------------+|
+---------------------Tool Tips--+ +--------------------------------+
Csope shines at exploring stranger and obsecure code bases due to its TUI. It sometimes gets mislabeled as a code navigation tool, but the original documentation describes it best as a “code browsing tool”. Many tools can jump you to a definition or grep for patterns, but Csope is unqie in that it allows for those and many other functionalities while providing you with a very comprehansible list of all results, ready to fire up your editor at just the spot. An example of its excelence is this project. The Cscope codebase used to be a total mess, fixing it would have been a lost cause, if not for Cscope itself. Well, Csope now.
You will have to compile from source. After you made sure you have the following (dev) libraries installed: ncurses GNU Readline GNU History (should come with Readline) Just run: make This will yield the executable “scope”, which you are free to do whatever with.
The readline integratoin should be complete -please let us know if not-, except for your prompt being used, which could easily break the TUIs display.
The rl_readline_name variable will be set to “Csope”, so you may have conditional configurations in your .inputrc with the following format: $if Csope # $endif
All can be configured sucklessly under “config/colors.h”. Hopefully the comments are self evident.
...
Component | Purpose |
---|---|
main.c | generic init functions, main() and primary event loops (and junk) |
display.c | all functions directly dealing with NCurses |
input.c | top layer of functions dealing with user input; migth dispatch to readline |
find.c | searching functions |
globals.h | an inherited curse; global var/prototype hell |
readline.c | all functions directly dealing with GNU Readline; responsible for line editing in input mode |
help.c | all functions dealing with help messages |
Global | Role |
---|---|
int input_mode | Responsible of keeping track how current input should be handled. Not only does the readline handler depend on it, its also used to determine what types of inputs all legal (e.g. swapping to another window). Takes up on of the values of the INPUT_* macros. |
int window_change | Bit mask type of the CH_* macros. Keeps track of the windows to be refresed on the next run of display(). Could be better utalized. |