-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better Bookmarking #28
Comments
We could use "syntax" similar to Vim's marks: m starts a mark and a letter names it; so to create bookmark |
I haven't looked at the current parsing code yet, but if we aren't loading the presentation into memory (as a single block of memory) we could use Bookmarks themselves should be implemented as a hash table where the bookmark name is the key and the file offset, pointer, or whatever is the value. |
Currently the program is set to use
Interesting. I need to look into these functions as they may come in handy in the future. As for DSS I don't think they'd be applicable as DSS loads the presentation into memory and closes the file. So for now it is just easier to jump to a slide by using the slides's number.
I worked on this issue this morning actually, and the solution I have implemented now changes the bookmark array from If you believe that this could be done better than what I did in the above commit please let me know and we can collaborate on a better solution. I'll leave this issue open for now. side note: I just saw your comment on the buffer overflow issue. The solution for that was increasing the display's current slide counter to accommodate more digits. I don't like how that counter is implemented so I'm going to post an issue on it. But for now the buffer overflow issue is fixed. |
An alternative approach would be to load each slide by memory address; then we could just store bookmarks as the memory address of whatever slide they point to.
I think a more dynamic (memory) approach would be better, something growable, but it can happen later down the road.
This wednesday I'll catch my fork up with yours and work on replacing some of the static memory allocations with dynamic ones--where appropriate. I think the slideCount is already dynamic in my fork. Edit: I won't be able to dig into furthering my fork until later this week, unfortunately. |
Better Bookmarking
Currently DSS supports bookmarking using an array to store slide - register pairs. This array is 5x2 in length.
I think that there could be a better solution for storing bookmarks. If anyone wants to theorize on this that would be great.
Hint: check out this ascii table http://www.asciitable.com/ notice that there are 128 potential values. Can this somehow be useful in our solution?
The text was updated successfully, but these errors were encountered: