Re: [9fans] 9term, insta scroll to bottom?

2020-10-24 Thread Jeremy O'Brien
On Sat, Oct 24, 2020, at 14:06, Ethan Gardener wrote:
> On Sat, Oct 24, 2020, at 2:01 AM, nydldm...@mail.com wrote:
> > Hi, I am an idiot and sometimes I cat huge files in 9term (on 9front)
> > 
> > The result of this is a mess I cannot seem to scroll to the bottom of,  how 
> > can I instantly scroll to the bottom in 9term? 
> 
> Enable scroll. When at the bottom, disable it if desired. I did this
> all the time, especially with man pages.

You can use the scroll-lock key as an alternative to the scroll/noscroll menu 
item as well. 

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T13b7a14fa28da183-M0a2f68a8297eb6ee5d52f5e3
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] iOS drawterm

2020-03-25 Thread Jeremy O'Brien
On Wed, Mar 25, 2020, at 07:19, Kim Lassila wrote:
> 
> 
>> On Mar 25, 2020, at 8:19 AM, Anthony Sorace  wrote:
>> 
>> With iOS getting first-class mouse pointer support, I’m looking at the iOS 
>> drawterm port again. Has anyone touched this since the old GSoC project bit 
>> rotted out?
> 
> Drawterm is quite slow at reading and writing pixels on the screen. I learned 
> this when I started recording screen in Plan 9 
> (https://github.com/9d0/screencast). 
> 
> Instead of porting drawterm to different platforms I would like to see vncs 
> improved to support the latest version of the Remote Framebuffer Protocol 
> (RFC 6143). This would allow a standard VNC client to connect to a Plan 9 
> terminal, support screen resizing, local mouse cursor, and deliver all key 
> strokes and mouse chords accurately. VNC is optimized to work over a large 
> variety of different networks including high latency links and it will 
> therefore offer a better user experience than drawterm, especially over 
> wireless. 
> 
> Kim

http://man.9front.org/1/vnc ?

Unless you're talking about legacy Plan 9?

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T69dec3540d033863-M393f67e39d014a280db69389
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Don't Plan 9 C compiler initialize the rest of member of a struct?

2019-04-01 Thread Jeremy O'Brien
On Mon, Apr 1, 2019, at 11:33, Kyohei Kadota wrote:
> Hi, 9fans. I use 9legacy.
> 
> About below program, I expected that flags field will initialize to
> zero but the value of flags was a garbage, ex, "f8f7".
> Is this expected?
> 
> ```
> #include 
> 
> struct option {
> int n;
> char *s;
> int flags;
> };
> 
> int
> main(void)
> {
> struct option opt = {1, "test"};
> printf("%d %s %x\n", opt.n, opt.s, opt.flags);
> return 0;
> }
> ```
> 
>

According to C99: "If an object that has automatic storage duration is not 
initialized explicitly, its value is indeterminate."

Stack variable == automatic storage duration. This appears to be correct 
behavior to me.



Re: [9fans] microsoft's plan 9 distribution

2019-02-15 Thread Jeremy O'Brien
On Fri, Feb 15, 2019, at 19:48, hiro wrote:
> https://blogs.msdn.microsoft.com/commandline/2019/02/15/whats-new-for-wsl-in-windows-10-version-1903/
> 
>

oh man. a coworker of mine was just poking fun at me last week asking when 
Windows was gonna get a Plan9 subsystem. definitely showing him this.



[9fans] [PATCH] Persist 'k' command in mothra and add matching -k flag

2018-06-23 Thread Jeremy O'Brien
I sometimes find myself on either slow or data-capped network links where 
downloading images isn't ideal. Attached is a simple patch to mothra that 
changes the 'k' command to not only remove already-downloaded images from a 
page, but also toggle a state such that mothra won't attempt to download images 
on future visited sites until 'k' is toggled again. This also adds a '-k' flag 
to mothra which enables the flag at startup. 
diff -r 65adb71807cf sys/man/1/mothra
--- a/sys/man/1/mothra	Fri Jun 22 14:49:18 2018 +0200
+++ b/sys/man/1/mothra	Sat Jun 23 09:56:12 2018 -0400
@@ -56,6 +56,8 @@
 Alt display. Starts in alt display mode, see menu
 commands table below.
 .TP
+.B -k
+Kill images. Don't fetch/display images.
 .B -m
 Specify the
 .IR webfs (4)
@@ -132,7 +134,7 @@
 from the list of previously viewed pages.
 .TP
 .BI k
-Kill images on the current page.
+Toggle killing of images.
 .TP
 .BI m
 Enter or exit moth mode.
diff -r 65adb71807cf sys/src/cmd/mothra/mothra.c
--- a/sys/src/cmd/mothra/mothra.c	Fri Jun 22 14:49:18 2018 +0200
+++ b/sys/src/cmd/mothra/mothra.c	Sat Jun 23 09:56:12 2018 -0400
@@ -14,6 +14,7 @@
 #include "rtext.h"
 int debug=0;
 int verbose=0;		/* -v flag causes html errors to be written to file-descriptor 2 */
+int killimgs=0;	/* should mothra kill images? */
 int defdisplay=1;	/* is the default (initial) display visible? */
 int visxbar=0;	/* horizontal scrollbar visible? */
 int topxbar=0;	/* horizontal scrollbar at top? */
@@ -306,6 +307,7 @@
 	ARGBEGIN{
 	case 'd': debug=1; break;
 	case 'v': verbose=1; break;
+	case 'k': killimgs=1; break;
 	case 'm':
 		if(mtpt = ARGF())
 			break;
@@ -329,7 +331,7 @@
 	switch(argc){
 	default:
 	Usage:
-		fprint(2, "Usage: %s [-dva] [-m mtpt] [url]\n", argv0);
+		fprint(2, "Usage: %s [-dvak] [-m mtpt] [url]\n", argv0);
 		exits("usage");
 	case 0:
 		url=getenv("url");
@@ -687,7 +689,9 @@
 		mothon(current, !mothmode);
 		break;
 	case 'k':
-		killpix(current);
+		killimgs = !killimgs;
+		if (killimgs)
+			killpix(current);
 		break;
 	case 'w':
 	case 'W':
@@ -837,7 +841,7 @@
 		break;
 	case 0:
 		if(type==HTML)
-			plrdhtml(w->url->fullname, fd, w);
+			plrdhtml(w->url->fullname, fd, w, killimgs);
 		else
 			plrdplain(w->url->fullname, fd, w);
 		_exits(0);
diff -r 65adb71807cf sys/src/cmd/mothra/mothra.h
--- a/sys/src/cmd/mothra/mothra.h	Fri Jun 22 14:49:18 2018 +0200
+++ b/sys/src/cmd/mothra/mothra.h	Sat Jun 23 09:56:12 2018 -0400
@@ -78,7 +78,7 @@
 };
 
 void finish(Www *w);
-void plrdhtml(char *, int, Www *);
+void plrdhtml(char *, int, Www *, int);
 void plrdplain(char *, int, Www *);
 void htmlerror(char *, int, char *, ...);	/* user-supplied routine */
 void seturl(Url *, char *, char *);
diff -r 65adb71807cf sys/src/cmd/mothra/rdhtml.c
--- a/sys/src/cmd/mothra/rdhtml.c	Fri Jun 22 14:49:18 2018 +0200
+++ b/sys/src/cmd/mothra/rdhtml.c	Sat Jun 23 09:56:12 2018 -0400
@@ -704,7 +704,7 @@
 	plaintext();
 	finish(dst);
 }
-void plrdhtml(char *name, int fd, Www *dst){
+void plrdhtml(char *name, int fd, Www *dst, int killimgs){
 	int tagerr;
 	Stack *sp;
 	char buf[20];
@@ -1222,7 +1222,8 @@
 		}
 		pl_popstate(g.state);
 		*g.tp='\0';
-		getpix(dst->text, dst);
+		if (!killimgs)
+			getpix(dst->text, dst);
 		finish(dst);
 		return;
 	}