xaizek / pinfo (License: GPLv2 only) (since 2018-12-07)
Console-based info and manual pages reader, which adds interactive navigation to man pages.
Commit 62753a5f6b67844f6fc27beff7e64d8be1e8a6e3

Put a hack in video.c (info_addstr) to solve Debian bug 288877 (mostly). Couldn't get the whole thing because tabs are embedded in some hyperlinks (which is a bug elsewhere in pinfo).
Also, fix a typo.


git-svn-id: svn://svn.debian.org/svn/pinfo/pinfo/trunk@28 ea4b0d59-4df7-0310-a9f9-bf8cbe41ce66
Author: neroden-guest
Author date (UTC): 2005-08-11 14:26
Committer name: neroden-guest
Committer date (UTC): 2005-08-11 14:26
Parent(s): 8d41eb3d0d4d8572c18b391aa411896faf944418
Signing key:
Tree: 471c9251318709622e3e8f1bcc688026f9fda823
File Lines added Lines deleted
src/video.c 12 3
File src/video.c changed (mode: 100644) (index 2649a00..c80ac5f)
3 3 * *
4 4 * Copyright (C) 1999 Przemek Borys <pborys@dione.ids.pl> * Copyright (C) 1999 Przemek Borys <pborys@dione.ids.pl>
5 5 * Copyright (C) 2005 Bas Zoetekouw <bas@debian.org> * Copyright (C) 2005 Bas Zoetekouw <bas@debian.org>
6 * Copyright 2005 Nathanael Nerode <neroden@gcc.gnu.org>
6 7 * *
7 8 * This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
8 9 * it under the terms of version 2 of the GNU General Public License as * it under the terms of version 2 of the GNU General Public License as
 
... ... showscreen(char **message, char *type, long lines, long pos, long cursor, int co
120 121 /* /*
121 122 * prints a line, taking care for the horizontal scrolling. * prints a line, taking care for the horizontal scrolling.
122 123 * if the string fits in the window, it is drawn. If not, * if the string fits in the window, it is drawn. If not,
123 * it is either cut, or completely ommited.
124 * it is either cut, or completely omitted.
124 125 */ */
125 126 void void
126 127 info_addstr(int y, int x, char *txt, int column, int txtlen) info_addstr(int y, int x, char *txt, int column, int txtlen)
127 128 { {
129 int maxy, maxx;
130 getmaxyx(stdscr, maxy, maxx);
131 /* Use maxx and mvaddnstr to force clipping.
132 * Fairly blunt instrument, but the best I could come up with.
133 * Breaks in the presence of tabs; I don't see how to handle them. */
128 134 if (x>column) if (x>column)
129 mvaddstr(y,x-column,txt);
135 mvaddnstr(y,x-column,txt, maxx-(x-column) );
130 136 else if (x+txtlen>column) else if (x+txtlen>column)
131 mvaddstr(y,0,txt+(column-x));
137 mvaddnstr(y,0,txt+(column-x), maxx );
138 #ifdef __DEBUG__
139 refresh();
140 #endif /* __DEBUG__ */
132 141 } }
133 142
134 143 void void
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/pinfo

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/pinfo

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master