Re: [vi] moving by sentences is inconsistent
> Theo de Raadt hat am 4. Oktober 2018 um 19:35 > geschrieben: > > > Could be defacto standardized. You need to compare the past. > > Your finger memory has surely discovered this fairly recently. Messing > with older people's finger memory is a very dangerous proposition. > > So go do the work of discovering where there are divergences, and where/ > when they occured. > Dear Theo, I understand your concern, I already made a quick check with all available vi clones in ports because is was expecting a correct implementation among all these (vim, elvis, nvi2, vise), but to my surprise they all behaved differently (also when going forward a sentence). Whenever I have a working patch, I'll post a complete analysis with it. Nils
[vi] moving by sentences is inconsistent
Hi, there is a flaw in base vi when moving by sentences, going forward is not equal to going backward. Here's what man vi says: [count] ( [count] ) Move count sentences backward or forward, respectively. A sentence is an area of text that begins with the first nonblank character following the previous sentence, paragraph, or section boundary and continues until the next period, exclamation mark, or question mark character, followed by any number of closing parentheses, brackets, double or single quote characters, followed by either an end-of-line or two whitespace characters. ^^ Groups of empty lines (or lines containing only whitespace characters) are treated as a single sentence. Going forward a sentence follows this rule, but going backwards stops at a single space before a punctuation mark. Here's an example: A sentence. A sentence containing !, ? and . A third sentence! )) ) (( ( ( When the double spaces are condensed to one, the whole line is regarded as one large sentence going forward, but the same pattern as above is shown when going backwards. With skippable characters, it is even more different: A sentence. A sentence containing [!'], '?' and . A third sentence! )) ) (( ( ( ( Again, with single spaces, the whole line is regarded as one going forwards, and the same behavior as above is shown when going backwards. Now, before doing any work, is there even any interest in fixing this, i.e. that moving for- and backwards produce the same results? If so, which behavior is desired? -- Nils
Re: [ed] fixing the list command
> Nils Reuße <n.reu...@hxgn.net> hat am 27. Februar 2018 um 11:27 geschrieben: > > > Hi there, > > the 'l' command in base ed currently does not mark the end of line with a > '$'. This is documented in the man page (POSIX wants each '$' escaped, and a > final '$' at EOL). Interestingly, the code to mark EOL is already there, > just hidden by the BACKWARDS flag ed is compiled with. Here is a small diff > that removes the BACKWARDS guard around the EOL marker. The resulting > behavior is equal to GNU ed, base vi and vim (:set list). > > Removing the BACKWARDS flag would fix it as well, but i don't see the need > for that. There is some code that could be deleted in that case, though > (mostly different error messages). > > Any comments? > > Kind regards > Nils Now that both 6.3 and "Ed Mastery" by Michael W Lucas have been released, could this go in? Nils
[ed] fixing the list command
Hi there, the 'l' command in base ed currently does not mark the end of line with a '$'. This is documented in the man page (POSIX wants each '$' escaped, and a final '$' at EOL). Interestingly, the code to mark EOL is already there, just hidden by the BACKWARDS flag ed is compiled with. Here is a small diff that removes the BACKWARDS guard around the EOL marker. The resulting behavior is equal to GNU ed, base vi and vim (:set list). Removing the BACKWARDS flag would fix it as well, but i don't see the need for that. There is some code that could be deleted in that case, though (mostly different error messages). Any comments? Kind regards Nils Index: ed.1 === RCS file: /cvs/src/bin/ed/ed.1,v retrieving revision 1.69 diff -u -p -r1.69 ed.1 --- ed.1 5 Jul 2017 12:23:46 - 1.69 +++ ed.1 27 Feb 2018 10:11:52 - @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: July 5 2017 $ +.Dd $Mdocdate: February 27 2018 $ .Dt ED 1 .Os .Sh NAME @@ -812,13 +812,10 @@ The .St -p1003.1-2008 specification says the .Ic l -command should mark the ends of lines with a -.Sq $ -character, -and that +command should precede .Sq $ characters -within the text should be output preceded by a backslash; +within the text by a backslash; this implementation does not support that. .Sh HISTORY An Index: io.c === RCS file: /cvs/src/bin/ed/io.c,v retrieving revision 1.20 diff -u -p -r1.20 io.c --- io.c 26 Apr 2017 21:25:43 - 1.20 +++ io.c 27 Feb 2018 10:11:52 - @@ -348,10 +348,8 @@ put_tty_line(char *s, int l, int n, int } else putchar(*s); } -#ifndef BACKWARDS if (gflag & GLS) putchar('$'); -#endif putchar('\n'); return 0; }
Re: xenocara fontconfig: make slight hinting the default
> Matthieu Herrb <matth...@herrb.eu> hat am 16. Januar 2017 um 23:42 > geschrieben: > > > On Sun, Jan 15, 2017 at 10:37:20AM +0100, Nils Reuße wrote: > > On 01/04/2017 01:19 PM, Nils Reuße wrote: > > > Dear all, > > > > > > fontconfig made slight hinting the default in version 2.11.95 (see commit > > > at [1]). > > > > > > xenocara currently ships, but does not install the new hinting conf files: > > > > > > $ cd /usr/xenocara/dist/fontconfig/conf.d/ > > > $ for file in *conf; do if ! test -f /etc/fonts/conf.avail/$file; then > > > echo "$file not found"; fi; done > > > 10-hinting-full.conf not found > > > 10-hinting-medium.conf not found > > > 10-hinting-none.conf not found > > > 10-hinting-slight.conf not found > > > > > > The patch below installs the missing files and makes slight hinting the > > > default. > > > > > > Any comments? > > Hmm right, I forgot to add the new files. > I'm committing the diff that installs them to conf.avail. > I'll wait a bit until more people have tried the new default 'slight' > anti-aliasing do decide if OpenBSD wants this as a default or not. > > Most developpers are quite conservative and don't like the > anti-aliased fonts... > Hi Matthieu, thanks for looking into it. FWIW, the meaning of slight hinting changed as well [1]: In the past, setting ‘slight’ hinting via FontConfig or configuration GUIs meant that native hints within a font were ignored; FreeType’s auto-hinter would analyze the font on the fly and automatically do what the font designer would have to do at least semi-manually. [..] Setting ‘slight’ hinting usually leads to FT_LOAD_TARGET_LIGHT. This mode implied the auto-hinter before and has now been changed to mean “Use native vertical-grid-only-snapping if driver and font supports it and vertical-grid-only auto-hinter otherwise”. Right now, only the OpenType/CFF driver is supported. In the future, this will hopefully include the TrueType engine once full support for ClearType arrives. (ClearType is available since 2.7) Bitmap fonts are unaffected, of course. [1] https://www.freetype.org/freetype2/docs/text-rendering-general.html > > > > > > Kind regards > > > Nils > > > > > > [1] > > > https://cgit.freedesktop.org/fontconfig/commit/?id=98434b3392172233094cac25ade7225c93da9f1c > > > > > > > > > Index: distrib/sets/lists/xetc/mi > > > === > > > RCS file: /cvs/xenocara/distrib/sets/lists/xetc/mi,v > > > retrieving revision 1.31 > > > diff -u -p -u -r1.31 mi > > > --- distrib/sets/lists/xetc/mi 28 Oct 2015 00:46:31 - 1.31 > > > +++ distrib/sets/lists/xetc/mi 4 Jan 2017 11:21:03 - > > > @@ -12,6 +12,7 @@ > > > ./etc/X11/xdm/xdm-config > > > ./etc/X11/xinit/xinitrc > > > ./etc/X11/xsm/system.xsm > > > +./etc/fonts/conf.d/10-hinting-slight.conf > > > ./etc/fonts/conf.d/10-scale-bitmap-fonts.conf > > > ./etc/fonts/conf.d/20-unhint-small-dejavu-sans-mono.conf > > > ./etc/fonts/conf.d/20-unhint-small-dejavu-sans.conf > > > Index: lib/fontconfig/conf.d/Makefile > > > === > > > RCS file: /cvs/xenocara/lib/fontconfig/conf.d/Makefile,v > > > retrieving revision 1.10 > > > diff -u -p -u -r1.10 Makefile > > > --- lib/fontconfig/conf.d/Makefile 19 Nov 2016 08:45:51 - 1.10 > > > +++ lib/fontconfig/conf.d/Makefile 4 Jan 2017 11:21:03 - > > > @@ -9,6 +9,7 @@ DOC_FILES= \ > > > README > > > > > > CONF_LINKS = \ > > > + 10-hinting-slight.conf \ > > > 10-scale-bitmap-fonts.conf \ > > > 20-unhint-small-vera.conf \ > > > 30-lucida-aliases.conf \ > > > @@ -29,6 +30,10 @@ CONF_LINKS = \ > > > > > > AVAIL_FILES = \ > > > 10-autohint.conf\ > > > + 10-hinting-full.conf\ > > > + 10-hinting-medium.conf \ > > > + 10-hinting-none.conf\ > > > + 10-hinting-slight.conf \ > > > 10-no-sub-pixel.conf\ > > > 10-scale-bitmap-fonts.conf \ > > > 10-sub-pixel-bgr.conf \ > > > > > > > Any comment? > > -- > Matthieu Herrb
Re: [patch] Enable support for Subpixel Antialiasing / LCD Filter
On 01/15/2017 03:04 PM, Stuart Henderson wrote: Other Linux/BSD systems have this option enabled for a long time now, under them Ubuntu, Debian [2], Freebsd [3], Arch Linux [4] and more. There has been a privious discussion on this list on this topic [5] where tedu@ mentions, that this issue is irrelevant once you get a decent display with a higher DPI (or use bitmap fonts), which is of course true [6]. But at least for me, at work we still have (and buy) new monitors that have a DPI of 96 (e.g. Dell U2412M). On these displays, bitmap fonts are too tiny for me and don't scale well, so subpixel rendering with enabled lcd filter really makes a difference. Hi Stuart, thanks for your reply. btw it is "li...@wrant.com" not tedu writing that. good for him/her to have a 27" high DPI display but I agree with you here. True, i misread that. Sorry for confusing the two. [1] https://www.freetype.org/patents.html "A survey from June 2007 shows no less than nine patents from Microsoft that cover ClearType." "Does FreeType Implement Any of the Patented Techniques? Technically, no. The patents cover the whole process of generating and displaying sub-pixel images. Since the font engine doesn't do the display part, it cannot infringe." ... but xenocara as a whole does display. Indeed. [2] http://metadata.ftp-master.debian.org/changelogs/main/f/freetype/freetype_2.5.2-3+deb8u1_changelog " * debian/patches-freetype/enable-subpixel-rendering.patch: enable subpixel rendering features, used by libcairo and xft to provide LCD colour filtering. This is considered no more or less evil than the bytecode interpreter which we also enable." this doesn't strike me as a robust evaluation of the patent situation. [3] http://www.freshports.org/print/freetype2/ "The following configuration options are available for freetype2-2.6.3: LCD_FILTERING=on: Sub-pixel rendering (patented)" optional and a warning about patents in the description. And FreeBSD's inclusion of CDDL code (e.g. ZFS) shows they have a different approach to patents than OpenBSD. [4] https://git.archlinux.org/svntogit/packages.git/tree/trunk/0002-Enable-subpixel-rendering.patch?h=packages/freetype2 https://wiki.archlinux.org/index.php/Talk:Font_configuration - "does not require patching FreeType and Fontconfig because Arch Linux already does this. However, Arch Linux does not enable the patent encumbered settings by default" - I don't really understand what arch are doing here. With the patch that all systems use, freetype is compiled with support for sub-pixel rendering, which is patent encumbered. Tools like fontconfig can then use this functionality from freetype to render fonts with subpixel rendering, but the setting is disabled by default in fontconfig. So even if support is compiled in, it is not used by default, and users have to create a config file. Is there a chance to get this enabled in xenocara? I don't think there's really been enough analysis of the patent situation to give us the information to know whether enabling this by default is going to get users or OpenBSD into patent-related problems or not. Ok, i can't really help/decide on this issue, all i could do is to show what others are doing ;) So i guess i just recompile freetype on each update. Here's how you do it on -current (needs /usr/src and /usr/xenocara set up and patched, of course): $ cd /usr/xenocara/lib/freetype $ doas make clean $ doas make $ doas make install
Re: xenocara fontconfig: make slight hinting the default
On 01/04/2017 01:19 PM, Nils Reuße wrote: Dear all, fontconfig made slight hinting the default in version 2.11.95 (see commit at [1]). xenocara currently ships, but does not install the new hinting conf files: $ cd /usr/xenocara/dist/fontconfig/conf.d/ $ for file in *conf; do if ! test -f /etc/fonts/conf.avail/$file; then echo "$file not found"; fi; done 10-hinting-full.conf not found 10-hinting-medium.conf not found 10-hinting-none.conf not found 10-hinting-slight.conf not found The patch below installs the missing files and makes slight hinting the default. Any comments? Kind regards Nils [1] https://cgit.freedesktop.org/fontconfig/commit/?id=98434b3392172233094cac25ade7225c93da9f1c Index: distrib/sets/lists/xetc/mi === RCS file: /cvs/xenocara/distrib/sets/lists/xetc/mi,v retrieving revision 1.31 diff -u -p -u -r1.31 mi --- distrib/sets/lists/xetc/mi 28 Oct 2015 00:46:31 - 1.31 +++ distrib/sets/lists/xetc/mi 4 Jan 2017 11:21:03 - @@ -12,6 +12,7 @@ ./etc/X11/xdm/xdm-config ./etc/X11/xinit/xinitrc ./etc/X11/xsm/system.xsm +./etc/fonts/conf.d/10-hinting-slight.conf ./etc/fonts/conf.d/10-scale-bitmap-fonts.conf ./etc/fonts/conf.d/20-unhint-small-dejavu-sans-mono.conf ./etc/fonts/conf.d/20-unhint-small-dejavu-sans.conf Index: lib/fontconfig/conf.d/Makefile === RCS file: /cvs/xenocara/lib/fontconfig/conf.d/Makefile,v retrieving revision 1.10 diff -u -p -u -r1.10 Makefile --- lib/fontconfig/conf.d/Makefile 19 Nov 2016 08:45:51 - 1.10 +++ lib/fontconfig/conf.d/Makefile 4 Jan 2017 11:21:03 - @@ -9,6 +9,7 @@ DOC_FILES= \ README CONF_LINKS = \ + 10-hinting-slight.conf \ 10-scale-bitmap-fonts.conf \ 20-unhint-small-vera.conf \ 30-lucida-aliases.conf \ @@ -29,6 +30,10 @@ CONF_LINKS = \ AVAIL_FILES = \ 10-autohint.conf\ + 10-hinting-full.conf\ + 10-hinting-medium.conf \ + 10-hinting-none.conf\ + 10-hinting-slight.conf \ 10-no-sub-pixel.conf\ 10-scale-bitmap-fonts.conf \ 10-sub-pixel-bgr.conf \ Any comment?
xenocara fontconfig: make slight hinting the default
Dear all, fontconfig made slight hinting the default in version 2.11.95 (see commit at [1]). xenocara currently ships, but does not install the new hinting conf files: $ cd /usr/xenocara/dist/fontconfig/conf.d/ $ for file in *conf; do if ! test -f /etc/fonts/conf.avail/$file; then echo "$file not found"; fi; done 10-hinting-full.conf not found 10-hinting-medium.conf not found 10-hinting-none.conf not found 10-hinting-slight.conf not found The patch below installs the missing files and makes slight hinting the default. Any comments? Kind regards Nils [1] https://cgit.freedesktop.org/fontconfig/commit/?id=98434b3392172233094cac25ade7225c93da9f1c Index: distrib/sets/lists/xetc/mi === RCS file: /cvs/xenocara/distrib/sets/lists/xetc/mi,v retrieving revision 1.31 diff -u -p -u -r1.31 mi --- distrib/sets/lists/xetc/mi 28 Oct 2015 00:46:31 - 1.31 +++ distrib/sets/lists/xetc/mi 4 Jan 2017 11:21:03 - @@ -12,6 +12,7 @@ ./etc/X11/xdm/xdm-config ./etc/X11/xinit/xinitrc ./etc/X11/xsm/system.xsm +./etc/fonts/conf.d/10-hinting-slight.conf ./etc/fonts/conf.d/10-scale-bitmap-fonts.conf ./etc/fonts/conf.d/20-unhint-small-dejavu-sans-mono.conf ./etc/fonts/conf.d/20-unhint-small-dejavu-sans.conf Index: lib/fontconfig/conf.d/Makefile === RCS file: /cvs/xenocara/lib/fontconfig/conf.d/Makefile,v retrieving revision 1.10 diff -u -p -u -r1.10 Makefile --- lib/fontconfig/conf.d/Makefile 19 Nov 2016 08:45:51 - 1.10 +++ lib/fontconfig/conf.d/Makefile 4 Jan 2017 11:21:03 - @@ -9,6 +9,7 @@ DOC_FILES= \ README CONF_LINKS = \ + 10-hinting-slight.conf \ 10-scale-bitmap-fonts.conf \ 20-unhint-small-vera.conf \ 30-lucida-aliases.conf \ @@ -29,6 +30,10 @@ CONF_LINKS = \ AVAIL_FILES = \ 10-autohint.conf\ + 10-hinting-full.conf\ + 10-hinting-medium.conf \ + 10-hinting-none.conf\ + 10-hinting-slight.conf \ 10-no-sub-pixel.conf\ 10-scale-bitmap-fonts.conf \ 10-sub-pixel-bgr.conf \
mention ext4 in mount.8 and mount_ext2fs.8
Hi tech, i was a bit confused when i tried to mount my ext4-drive; it was not obvious to me that i had to pass the -r/-o ro option to mount the disk. The FAQ is also not very explicit about that: "Some of them have limited support; for instance read-only. " http://www.openbsd.org/faq/faq14.html#foreignfs So i tried the man pages, but they don't mention that ext4 is mountable at all. A # mount -t ext2fs /dev/sdb6i /mnt did not return any error and just did nothing. Maybe this is obvious that you have to pass the ro-flag, but i thought it would "just work". That was wrong, obviously, but here is my proposal to add a little information to the manpages. Any comments? Index: mount.8 === RCS file: /cvs/src/sbin/mount/mount.8,v retrieving revision 1.77 diff -u -p -r1.77 mount.8 --- mount.8 8 Sep 2014 04:40:30 - 1.77 +++ mount.8 1 Oct 2015 17:06:08 - @@ -381,6 +381,12 @@ with option .Dq dev : .Pp .Dl # mount -u -o dev /var +.Pp +Mount an ext4 device with DUID 3eb7f9da875cb9ee on node +.Pa /mnt/ext4 : +.Pp +.Dl # mount -t ext2fs -r 3eb7f9da875cb9ee.i /mnt/ext4 +.Pp .Sh SEE ALSO .Xr mount 2 , .Xr fstab 5 , Index: mount_ext2fs.8 === RCS file: /cvs/src/sbin/mount_ext2fs/mount_ext2fs.8,v retrieving revision 1.14 diff -u -p -r1.14 mount_ext2fs.8 --- mount_ext2fs.8 14 Oct 2010 07:05:43 - 1.14 +++ mount_ext2fs.8 1 Oct 2015 17:02:27 - @@ -33,7 +33,7 @@ .Os .Sh NAME .Nm mount_ext2fs -.Nd mount an ext2fs file system +.Nd mount an ext2/3/4 file system .Sh SYNOPSIS .Nm mount_ext2fs .Op Fl o Ar options @@ -42,10 +42,12 @@ .Sh DESCRIPTION The .Nm -command attaches an ext2fs file system +command attaches an ext2/3/4 file system .Ar special device on to the file system tree at the point .Ar node . +Filesystems of type ext3/4 are only supported in read-only +mode. This command is invoked by .Xr mount 8 when using the syntax