Hi, On Fri, Mar 18, 2005 at 11:14:47AM +0100, Joachim Breitner wrote: > tags 299442 +help > thanks > > Hi Georg, > > thanks for your bug report. It is a pretty good report even, but since I > have no powerpc machine availabe, I don't really know what to do, so I > tagged the bug as "help", hoping that someone can indeed help. > > I also CCed the powerpc mailing list, maybe someone there can have a > look at it[1]. > > Thanks for using Debian and trying to use osdsh :-) The problem is, that from the C/C++ specs it is not clear wether char is signed or unsigned. This means it depends on the implementation of your C/C++ compiler. gcc has signed char on most architectures, but on ppc it is unsigned. getopt_long gives -1 if there are no more options, which is not mapped properly to char on ppc. In src/osdsh/osdsh.c you have in parse_args (): char c; ... while ((c = getopt_long(argc, argv, "hm:f:c:p:d:o:a:n:", opts, &opt_index)) >= 0) { switch(c) { case 'h': usage(0, NULL, NULL); exit(0); ... default: usage(1, NULL, NULL); exit(1); } This means if you giv -h then it prints its usage and exits with 0, if you give nothing it does the default and exits with 1. The other options are set correctly, but you don't notice it since the loop ends in default. The solution is to write int c; instead of char c; With best regards, Wolfi > > Joachim > > [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=299442 or here: > > Am Montag, den 14.03.2005, 06:28 +0100 schrieb Georg Drees: > > Package: osdsh > > Version: 0.7.0-5 > > Severity: important > > > > > > Hi, > > when I try to start osdsh, all I get is: > > ---snip--- > > georg@host:~$ osdsh > > osdsh 0.7.0 > > usage: osdsh [options] > > > > -h display usage > > -m mixer set mixer /dev/mixer > > -f font set font -*-lucidatypewriter-bold-*-*-*-*-240-*-*-*-*-*-* > > -c color set color green > > -d int set OSD delay 5 > > -o int set Shadow Offset 0 > > -p <0|1> position of the osd, 0 for bottom, > > 1 for top. Default 1 (top). > > -a <0|1|2> align of the osd. left,center or right. > > -n number set the nice number so osdsh won't eat your cpu > > ---snap--- > > Even with some options specified it only shows the usage screen. > > This is on an Apple PowerBook G4. > > > > libxosd2 is working ok, since I can use it via the python-osd package. > > > > I additionally tested osdsh 0.7.0-5 on my second computer -i686,Debian3.1- via > > ssh with X11-forwarding. There it worked fine and even drew the osdctl-message > > I gave it on my local screen. > > > > For any additional information you need, just tell me how to get it :-) > > > > greetings > > Georg > > > > -- System Information: > > Debian Release: 3.1 > > APT prefers testing > > APT policy: (500, 'testing') > > Architecture: powerpc (ppc) > > Kernel: Linux 2.6.11-custom > > Locale: LANG=de_DE@euro, LC_CTYPE=de_DE@euro (charmap=ISO-8859-15) > > > > Versions of packages osdsh depends on: > > ii libapm1 3.2.2-2 Library for interacting with APM d > > ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an > > ii libxosd2 2.2.14-1 X On-Screen Display library - runt > > ii tk8.4 [wish] 8.4.9-1 Tk toolkit for Tcl and X11, v8.4 - > > > > -- no debconf information > > -- > Joachim "nomeata" Breitner > Debian Developer > nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C > JID: joachimbreitner@amessage.de | http://people.debian.org/~nomeata > > > -- > To UNSUBSCRIBE, email to debian-powerpc-REQUEST@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Attachment:
signature.asc
Description: Digital signature