about summary refs log tree commit diff stats
path: root/src/teliva.c
Commit message (Collapse)AuthorAgeFilesLines
* don't perturb cursor when drawing menuKartik K. Agaram2022-02-041-0/+3
|
* include keys typed into audit logKartik K. Agaram2022-02-011-0/+7
| | | | | This will help people cross-correlate when the app performs specific calls.
* file permissions: decide based on calling functionKartik K. Agaram2022-02-011-10/+24
|
* try to get by with one feature macroKartik K. Agaram2022-01-291-3/+0
| | | | | | | | | | | | | | | | | I fucking hate feature macros. Egregious discharge of our division-of-labor-obsessed society. People should be able to introduce names. People should be able to give up names to lower levels of abstraction when they encounter conflicts. Feature macros seem to exist[1] to support more than two levels of abstraction. You try to build, one of your libraries fails to build because of a conflict between it and one level down. You don't want to modify this library. Just fucking https://catern.com/change_code.html already. But no, I have to litter my code with feature macros even though I just want the abstraction the original library provides. [1] https://man7.org/linux/man-pages/man7/feature_test_macros.7.html https://lwn.net/Articles/590381
* bugfix: editor was no longer saving anythingKartik K. Agaram2022-01-271-4/+2
| | | | | | I made the changes reverted here out of a mistaken sense that big-picture edits would interfere with Teliva's memory of what is currently being edited (teliva_editor_state).
* redo lua vs proseKartik K. Agaram2022-01-261-9/+5
| | | | | Previously we weren't dynamically selecting how to highlight a buffer after navigating with ctrl-g. That should work now.
* rename the custom big picture view to doc:mainKartik K. Agaram2022-01-251-1/+2
|
* override big picture view with doc:bp if it existsKartik K. Agaram2022-01-251-2/+18
| | | | | | | | | | | Going to big picture from doc:bp still goes to the default auto-generated big picture view. While doc:bp provides some programmability, it's also far klunkier than the default view. Rendering is worse, and it's always in edit mode because I'm trying to avoid complicating the UX with a notion of rendered markup. That means cursor movement is less convenient. It's also easy to accidentally edit the big-picture view.
* disable Lua colors in proseKartik K. Agaram2022-01-251-2/+6
|
* renameKartik K. Agaram2022-01-251-4/+4
|
* new section in big picture: prose (non-code)Kartik K. Agaram2022-01-251-4/+33
| | | | I've always found "Documentation" too pretentious.
* optimization: stop saving identical definitionsKartik K. Agaram2022-01-251-0/+7
| | | | This is long overdue.
* save doc: buffers to .tlv imagesKartik K. Agaram2022-01-251-2/+16
|
* delete a redundant function prototypeKartik K. Agaram2022-01-251-2/+1
|
* rename a functionKartik K. Agaram2022-01-251-4/+4
|
* start supporting non-code "buffers"Kartik K. Agaram2022-01-251-0/+6
| | | | | First step: when a "definition" starts with "doc:" it's not a definition, just a buffer. Stop trying to interpret it as Lua.
* get Teliva running on NetBSDKartik K. Agaram2022-01-241-0/+4
| | | | | | | | NetBSD still uses curses by default. One _could_ install ncurses, but I don't have access to a NetBSD box with permissions to install ncurses, so I'm experimenting to see how far we can get with just curses. So far most of the apps seem to work, with the exception of one bug that I'll commit next.
* file permissions: clear stale errorsKartik K. Agaram2022-01-161-0/+1
|
* some heuristic guidance on permissions screenKartik K. Agaram2022-01-041-2/+59
|
* try running permissions advice after editingKartik K. Agaram2022-01-041-3/+21
| | | | | This implies it must be side-effect free. We still need to figure out how to convey that to the computer owner.
* slightly better error messageKartik K. Agaram2022-01-041-1/+6
|
* reorgKartik K. Agaram2022-01-041-17/+17
|
* extract functionKartik K. Agaram2022-01-041-23/+14
|
* load permissions properly in a third placeKartik K. Agaram2022-01-041-2/+9
|
* when editing a function, show its callersKartik K. Agaram2022-01-031-6/+50
| | | | | | No way to select between them. That complicates the UI too much when we do so much with the cursor. But it's still useful to suggest things to type in after ctrl-g.
* start saving callers of functionsKartik K. Agaram2022-01-031-0/+50
| | | | | I think this is significantly slowing things down. Perhaps we should sample or something.
* commentKartik K. Agaram2022-01-031-1/+1
|
* extract a functionKartik K. Agaram2022-01-031-0/+22
|
* events view: jump to a functionKartik K. Agaram2022-01-031-7/+27
|
* rendering improvementKartik K. Agaram2022-01-021-3/+2
|
* bugfix: policies must end in newlineKartik K. Agaram2022-01-021-3/+3
| | | | I believe kilo kinda naturally enforces that. We'll see.
* start on a view of audit eventsKartik K. Agaram2022-01-021-2/+67
|
* editing file permissionsKartik K. Agaram2022-01-021-41/+54
|
* editable file permissionsKartik K. Agaram2022-01-021-48/+178
| | | | | | | | | | | | | | | | | | | | | Extremely cruddy implementation: - I'm still unclear on how to represent the advice function: - How to handle errors when loading user configuration? Currently I refuse to start. - Whole function? More errors to handle in header and so on. What if the function is renamed? - Just body? Needs more structured editing support. - Lots of duplication, particularly between the permissions in the menu and the permissions screen. I don't know how to show the hostname at the time of connect() or bind(), so networking is going to remain a boolean for now. It's also unclear what effective constraints we can impose on what gets discussed with a specific hostname. Everything outside the computer is out of one's control. One trick I learned is for consistently grabbing ASan logs on abort: It's always safe to redirect stderr with ncurses!
* fork a new editor widget for non-codeKartik K. Agaram2022-01-021-2/+2
|
* better follow kilo's naming conventionsKartik K. Agaram2022-01-021-3/+3
|
* copy tweakKartik K. Agaram2022-01-021-3/+4
|
* renameKartik K. Agaram2022-01-021-25/+25
|
* sandbox: tweaks to warning copyKartik K. Agaram2022-01-021-7/+8
|
* spacingKartik K. Agaram2021-12-261-0/+2
|
* start persisting sandboxing settingsKartik K. Agaram2021-12-251-0/+86
| | | | Zero guarantees of compatibility at this point.
* reorgKartik K. Agaram2021-12-251-24/+24
|
* file open() is now sandboxedKartik K. Agaram2021-12-251-12/+21
| | | | | | | In the process we now also have a mechanism for Teliva to overlay errors while apps run. Might make sense to make that available to apps as well. But I'm starting to realize that any app access to the Teliva areas of the screen is fraught with risk.
* flesh out very preliminary UIKartik K. Agaram2021-12-251-8/+128
| | | | | | | Our sandboxing model is a blunt caricature, just two booleans. But let's see how far this gets us. Still doesn't persist, and definitely has no effect.
* delete a couple more hacky function prototypesKartik K. Agaram2021-12-251-1/+0
|
* .Kartik K. Agaram2021-12-251-2/+8
|
* mock sandbox status and some initial colorsKartik K. Agaram2021-12-251-1/+18
| | | | | | | | Current plan: - two booleans to gate file and network access, respectively - false shows as green, true shows as orange - if _both_ booleans are true, then both show as red to indicate that there are no protections.
* fix menu colors in all color schemesKartik K. Agaram2021-12-251-1/+2
| | | | | | | | It looks like attron doesn't actually enable colors near 256, even though https://linux.die.net/man/3/attron suggests it does. > COLOR_PAIR values can only be OR'd with attributes if the pair > number is less than 256.
* reorg: pull Teliva-specific stuff out of lua.cKartik K. Agaram2021-12-251-0/+1008
It should now be easier to diff against the Lua 5.1 sources upstream.