shithub: riscv

Download patch

ref: 4da9e8aa4f2301bd9611d9d09cdc3f5c55284b6d
parent: b4fb5e238452052cd058a15240f5097135bfba35
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Sun Nov 6 10:33:59 EST 2011

mothra: add USERFL

--- a/sys/src/cmd/mothra/forms.c
+++ b/sys/src/cmd/mothra/forms.c
@@ -344,7 +344,7 @@
 		f->p=plentry(0, 0, f->size*chrwidth, f->value, h_submittype);
 		break;
 	case PASSWD:
-		f->p=plentry(0, 1, f->size*chrwidth, f->value, h_submittype);
+		f->p=plentry(0, USERFL, f->size*chrwidth, f->value, h_submittype);
 		break;
 	case CHECK:
 		f->p=plcheckbutton(0, 0, "", h_checkinput);
@@ -441,7 +441,7 @@
 		plinitentry(f->p, 0, f->size*chrwidth, f->value, 0);
 		break;
 	case PASSWD:
-		plinitentry(f->p, 1, f->size*chrwidth, f->value, 0);
+		plinitentry(f->p, USERFL, f->size*chrwidth, f->value, 0);
 		break;
 	case CHECK:
 	case RADIO:
--- a/sys/src/cmd/mothra/libpanel/entry.c
+++ b/sys/src/cmd/mothra/libpanel/entry.c
@@ -23,7 +23,7 @@
 	ep=p->data;
 	r=pl_box(p->b, p->r, p->state);
 	s=ep->entry;
-	if(p->flags & 1){
+	if(p->flags & USERFL){
 		char *p;
 		s=strdup(s);
 		for(p=s; *p; p++)
--- a/sys/src/cmd/mothra/libpanel/panel.h
+++ b/sys/src/cmd/mothra/libpanel/panel.h
@@ -85,6 +85,8 @@
 #define	MAXX	0x1000		/* make x size as big as biggest sibling's */
 #define	MAXY	0x2000		/* make y size as big as biggest sibling's */
 #define	BITMAP	0x4000		/* text argument is a bitmap, not a string */
+#define USERFL	0x100000	/* user flag */
+
 /*
  * An extra bit in Mouse.buttons
  */