bin/160386: [patch] invert Z axis movement via moused(8)

2011-09-02 Thread h h

>Number: 160386
>Category:   bin
>Synopsis:   [patch] invert Z axis movement via moused(8)
>Confidential:   no
>Severity:   non-critical
>Priority:   low
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 02 08:50:04 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: h h
>Release:FreeBSD 9.0-BETA2 amd64
>Organization:
>Environment:
moused_flags="-a -1 -z -z" # invert X,Y,Z axes
>Description:
Provide a more predictable way to invert Z axis.

cf. http://forums.freebsd.org/showthread.php?t=2377
>How-To-Repeat:
>Fix:
--- a.diff begins here ---
Index: usr.sbin/moused/moused.8
===
--- usr.sbin/moused/moused.8(revision 225315)
+++ usr.sbin/moused/moused.8(working copy)
@@ -491,6 +491,8 @@ maybe:
 .It Ar x
 .It Ar y
 X or Y axis movement will be reported when the Z axis movement is detected.
+.It Ar -z
+Invert Z axis movement.
 .It Ar N
 Report down events for the virtual buttons
 .Ar N
Index: usr.sbin/moused/moused.c
===
--- usr.sbin/moused/moused.c(revision 225315)
+++ usr.sbin/moused/moused.c(working copy)
@@ -88,6 +88,7 @@ __FBSDID("$FreeBSD$");
 
 #define MOUSE_XAXIS(-1)
 #define MOUSE_YAXIS(-2)
+#define MOUSE_IZAXIS   (-3)
 
 /* Logitech PS2++ protocol */
 #define MOUSE_PS2PLUS_CHECKBITS(b) \
@@ -705,6 +706,8 @@ main(int argc, char *argv[])
rodent.zmap[0] = MOUSE_XAXIS;
else if (strcmp(optarg, "y") == 0)
rodent.zmap[0] = MOUSE_YAXIS;
+   else if (strcmp(optarg, "-z") == 0)
+   rodent.zmap[0] = MOUSE_IZAXIS;
else {
i = atoi(optarg);
/*
@@ -2522,6 +2525,10 @@ r_map(mousestatus_t *act1, mousestatus_t *act2)
act2->dz = 0;
}
break;
+case MOUSE_IZAXIS:
+   if (act1->dz != 0)
+   act2->dz = -act1->dz;
+   break;
 default:   /* buttons */
pbuttons &= ~(rodent.zmap[0] | rodent.zmap[1]
| rodent.zmap[2] | rodent.zmap[3]);
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/160692: FreeBSD must consider shipping with SC_PIXEL_MODE on (possibility of > 80x25 resolution)

2011-09-13 Thread h h
The following reply was made to PR kern/160692; it has been noted by GNATS.

From: h h 
To: "Wojciech A. Koszek" 
Cc: bug-follo...@freebsd.org
Subject: Re: kern/160692: FreeBSD must consider shipping with SC_PIXEL_MODE on 
(possibility of > 80x25 resolution)
Date: Tue, 13 Sep 2011 15:23:51 +0400

 "Wojciech A. Koszek"  writes:
 
 >>Description:
 > In my private opinion we should seriously consider enabling
 > SC_PIXEL_MODE by default in FreeBSD or, in the worst case, making it a
 > tunable.
 
 Can you be more specific? It's in GENERIC since r221743 (2011-05-10).
 
   $ fgrep -i pixel /usr/src/sys/{i386,amd64}/conf/GENERIC
   /usr/src/sys/i386/conf/GENERIC:optionsSC_PIXEL_MODE   # add support 
for the raster text mode
   /usr/src/sys/amd64/conf/GENERIC:options   SC_PIXEL_MODE   # add support 
for the raster text mode
 
 And more graphic modes are available after kldload'ing vesa.ko.
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: misc/160964: Kernel panic with OSS [9.0-BETA2]

2011-09-23 Thread h h
The following reply was made to PR misc/160964; it has been noted by GNATS.

From: h h 
To: Jonathan Calmels 
Cc: bug-follo...@freebsd.org
Subject: Re: misc/160964: Kernel panic with OSS [9.0-BETA2]
Date: Sat, 24 Sep 2011 05:40:22 +0400

 Jonathan Calmels  writes:
 
 >>Description:
 > I tried to install OSS on my system. It results in a kernel panic if I
 > add `oss_enable="YES"` to my rc.conf. However if I try to load it with
 > kldload, my system freeze irremediably. I tried to recompile my kernel
 > with intern sound drivers disabled, unsuccessfully. I tested it on
 > FreeBSD 8.2 RELEASE and all worked.
 
 Since r222980 9.0 includes sound(4) support by default. Disable it in
 order to use OSS from 4Front Tech.
 
 ref. http://svn.freebsd.org/changeset/base/222980
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: bin/114465: [patch] [request] script(1): add really cool -d, -p & -r options from NetBSD

2011-09-27 Thread h h
The following reply was made to PR bin/114465; it has been noted by GNATS.

From: h h 
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: bin/114465: [patch] [request] script(1): add really cool -d, -p & 
-r options from NetBSD
Date: Wed, 28 Sep 2011 01:45:41 +

 misc/ttyrec seems to provide more control over playback.
 And it has a youtube-like service - playterm.org, unlike
 youterm.com which is no longer available. Anyway, ...
 
 - resolve conflict with r225809
 - apply script.c@r1.19 and script.1@r1.12 from NetBSD
 - mention in the manpage that the flags first appeared in NetBSD 2.0
 
 --- script_replay.diff begins here ---
 Index: usr.bin/script/script.1
 ===
 --- usr.bin/script/script.1(revision 225817)
 +++ usr.bin/script/script.1(working copy)
 @@ -36,7 +36,7 @@
  .Nd make typescript of terminal session
  .Sh SYNOPSIS
  .Nm
 -.Op Fl akq
 +.Op Fl adkpqr
  .Op Fl t Ar time
  .Op Ar file Op Ar command ...
  .Sh DESCRIPTION
 @@ -72,10 +72,20 @@ Append the output to
  or
  .Pa typescript ,
  retaining the prior contents.
 +.It Fl d
 +When playing back a session with the
 +.Fl p
 +flag, don't sleep between records when playing back a timestamped session.
  .It Fl k
  Log keys sent to program as well as output.
 +.It Fl p
 +Play back a session recorded with the
 +.Fl r
 +flag in real time.
  .It Fl q
 -Run in quiet mode, omit the start and stop status messages.
 +Run in quiet mode, omit the start, stop and command status messages.
 +.It Fl r
 +Record a session with input, output, and timestamping.
  .It Fl t Ar time
  Specify time interval between flushing script output file.
  A value of 0
 @@ -148,6 +158,14 @@ The
  .Nm
  command appeared in
  .Bx 3.0 .
 +.Pp
 +The
 +.Fl d ,
 +.Fl p
 +and
 +.Fl r
 +first appeared in
 +.Nx 2.0 .
  .Sh BUGS
  The
  .Nm
 Index: usr.bin/script/script.c
 ===
 --- usr.bin/script/script.c(revision 225817)
 +++ usr.bin/script/script.c(working copy)
 @@ -46,6 +46,9 @@ static const char sccsid[] = "@(#)script.c   8.1 (Be
  #include 
  #include 
  #include 
 +#include 
 +#include 
 +#include 
  
  #include 
  #include 
 @@ -59,11 +62,21 @@ static const char sccsid[] = "@(#)script.c 8.1 (Be
  #include 
  #include 
  
 +#define DEF_BUF 65536
 +
 +struct stamp {
 +  uint64_t scr_len;   /* amount of data */
 +  uint64_t scr_sec;   /* time it arrived in seconds... */
 +  uint32_t scr_usec;  /* ...and microseconds */
 +  uint32_t scr_direction; /* 'i', 'o', etc (also indicates endianness) */
 +};
 +
  static FILE *fscript;
  static int master, slave;
  static int child;
  static const char *fname;
  static int qflg, ttyflg;
 +static int usesleep, rawout;
  
  static struct termios tt;
  
 @@ -71,6 +84,9 @@ static void done(int) __dead2;
  static void doshell(char **);
  static void fail(void);
  static void finish(void);
 +static void record(FILE *, char *, size_t, int);
 +static void consume(FILE *, off_t, char *, int);
 +static void playback(FILE *);
  static void usage(void);
  
  int
 @@ -79,7 +95,7 @@ main(int argc, char *argv[])
int cc;
struct termios rtt, stt;
struct winsize win;
 -  int aflg, kflg, ch, n;
 +  int aflg, kflg, pflg, ch, n;
struct timeval tv, *tvp;
time_t tvec, start;
char obuf[BUFSIZ];
 @@ -87,19 +103,32 @@ main(int argc, char *argv[])
fd_set rfd;
int flushtime = 30;
int readstdin;
 +  int k;
  
 -  aflg = kflg = 0;
 -  while ((ch = getopt(argc, argv, "aqkt:")) != -1)
 +  aflg = kflg = pflg = 0;
 +  usesleep = 1;
 +  rawout = 0;
 + 
 +  while ((ch = getopt(argc, argv, "adkpqrt:")) != -1)
switch(ch) {
case 'a':
aflg = 1;
break;
 -  case 'q':
 -  qflg = 1;
 +  case 'd':
 +  usesleep = 0;
break;
case 'k':
kflg = 1;
break;
 +  case 'p':
 +  pflg = 1;
 +  break;
 +  case 'q':
 +  qflg = 1;
 +  break;
 +  case 'r':
 +  rawout = 1;
 +  break;
case 't':
flushtime = atoi(optarg);
if (flushtime < 0)
 @@ -119,9 +148,12 @@ main(int argc, char *argv[])
} else
fname = "typescript";
  
 -  if ((fscript = fopen(fname, aflg ? "a" : "w")) == NULL)
 +  if ((fscript = fopen(fname, pflg ? "r" : aflg ? "a" : "w")) == NULL)

Re: bin/114465: [patch] [request] script(1): add really cool -d, -p & -r options from NetBSD

2011-09-28 Thread h h
The following reply was made to PR bin/114465; it has been noted by GNATS.

From: h h 
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: bin/114465: [patch] [request] script(1): add really cool -d, -p & 
-r options from NetBSD
Date: Wed, 28 Sep 2011 09:26:41 +

 a few cosmetic changes
 - wrap long lines, also reduces diff with script.c from NetBSD
 - mark playback() as __dead2, it uses exit(3) and err(3)
 - add forgotten word after `the' in the manpage
 
 Also, the previous followup got revisions wrong
 
  - script.c@1.19 -> script.c@1.20
  - script.1@1.12 -> script.1@1.13
 
 --- a.diff begins here ---
 --- usr.bin/script/script.1~
 +++ usr.bin/script/script.1
 @@ -164,7 +164,7 @@ The
  .Fl p
  and
  .Fl r
 -first appeared in
 +options first appeared in
  .Nx 2.0 .
  .Sh BUGS
  The
 --- usr.bin/script/script.c~
 +++ usr.bin/script/script.c
 @@ -86,7 +86,7 @@ static void fail(void);
  static void finish(void);
  static void record(FILE *, char *, size_t, int);
  static void consume(FILE *, off_t, char *, int);
 -static void playback(FILE *);
 +static void playback(FILE *) __dead2;
  static void usage(void);
  
  int
 @@ -108,7 +108,7 @@ main(int argc, char *argv[])
aflg = kflg = pflg = 0;
usesleep = 1;
rawout = 0;
 - 
 +
while ((ch = getopt(argc, argv, "adkpqrt:")) != -1)
switch(ch) {
case 'a':
 @@ -173,11 +173,13 @@ main(int argc, char *argv[])
tvec = time(NULL);
(void)printf("Script started, output file is %s\n", fname);
if (!rawout) {
 -  (void)fprintf(fscript, "Script started on %s", 
ctime(&tvec));
 +  (void)fprintf(fscript, "Script started on %s",
 +ctime(&tvec));
if (argv[0]) {
fprintf(fscript, "command: ");
for (k = 0 ; argv[k] ; ++k)
 -  fprintf(fscript, "%s%s", k ? " " : "", 
argv[k]);
 +  fprintf(fscript, "%s%s", k ? " " : "",
 +  argv[k]);
fprintf(fscript, "\n");
}
}
 @@ -325,7 +327,8 @@ done(int eno)
record(fscript, NULL, 0, 'e');
if (!qflg) {
if (!rawout)
 -  (void)fprintf(fscript,"\nScript done on %s", 
ctime(&tvec));
 +  (void)fprintf(fscript,"\nScript done on %s",
 +ctime(&tvec));
(void)printf("\nScript done, output file is %s\n", fname);
}
(void)fclose(fscript);
 @@ -333,7 +336,6 @@ done(int eno)
exit(eno);
  }
  
 -
  static void
  record(FILE *fp, char *buf, size_t cc, int direction)
  {
 @@ -421,13 +423,15 @@ playback(FILE *fp)
switch (stamp.scr_direction) {
case 's':
if (!qflg)
 -  (void)printf("Script started on %s", 
ctime(&tclock));
 +  (void)printf("Script started on %s",
 +  ctime(&tclock));
tsi = tso;
(void)consume(fp, stamp.scr_len, buf, reg);
break;
case 'e':
if (!qflg)
 -  (void)printf("\nScript done on %s", 
ctime(&tclock));
 +  (void)printf("\nScript done on %s",
 +  ctime(&tclock));
(void)consume(fp, stamp.scr_len, buf, reg);
break;
case 'i':
 --- a.diff ends here ---
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"