Search the web
Sign In
New User? Sign Up
wcalc · Wcalc Users
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Manual is missleading about Prefs   Message List  
Reply | Forward Message #110 of 114 |
Re: [wcalc] Manual is missleading about Prefs

On Monday, March 31 at 12:44 AM, quoth Jérémie Blaser:
> in the manual is written:
> Assignments are of the form: key=value
>
> but that didn't work for me. i downloaded the source and had a look at
> the example rc.
> there, every pair is "key = value" with spaces between the equal sign.
> that worked.
> i think that this should be corrected.

Ahh, good find! Attached is a patch to fix the problem. The fix has
been committed to CVS, and will be included in the next release.
(http://w-calc.cvs.sourceforge.net/w-calc/Wcalc/main.c?r1=1.90&r2=1.91)

> also, the online manual page is missing keys, or at least one:
> use_radians

Hmmm, it looks like it's in the actual manual... But it seems to be
missing from the HTML version of the manual for some reason. That's
very odd. man2html (what I used to convert the man page to HTML) would
appear to have a few bugs in it. I fixed the pref-file omissions by
hand... if you notice any more, please let me know!

> greetings from switzerland

Greetings!

~Kyle
--
The truth is rarely pure and never simple.
-- Oscar Wilde


Mon Mar 31, 2008 4:51 am

m3m0ryh0l3
Offline Offline
Send Email Send Email

Index: main.c
===================================================================
RCS file: /cvsroot/w-calc/Wcalc/main.c,v
retrieving revision 1.90
diff -u -3 -p -r1.90 main.c
--- main.c 20 Feb 2008 20:09:06 -0000 1.90
+++ main.c 31 Mar 2008 04:24:00 -0000
@@ -812,26 +812,22 @@ static int read_prefs(char *filename)
while (retval == 1 && curs < BIG_STRING) {
retval = read(fd, &(key[curs]), 1);
if ((!quoted && isspace((int)(key[curs]))) ||
+ (!quoted && key[curs] == '=') ||
(quoted && key[curs] != '\''))
break;
++curs;
}
if (retval != 1)
break;
+ junk = key[curs];
key[curs] = 0;
- // read in the =
- junk = 0;
- while (retval == 1 && junk != '=') {
- retval = read(fd, &junk, 1);
- }
- if (retval != 1)
- break;
+ // eat the equals sign (and any surrounding space)
while (retval == 1 && (isspace((int)junk) || junk == '=')) {
retval = read(fd, &junk, 1);
}
if (retval != 1)
break;
- value[0] = junk;
+ value[0] = junk; // junk now contains the next non-junk character
curs = 0;
// read in the value
quoted = 1;


Attachment
attachment
Type:
application/pgp-signature
Forward
Message #110 of 114 |
Expand Messages Author Sort by Date

hi in the manual is written: Assignments are of the form: key=value but that didn't work for me. i downloaded the source and had a look at the example rc. ...
Jérémie Blaser
jblaser@...
Send Email
Mar 31, 2008
12:23 am

... Ahh, good find! Attached is a patch to fix the problem. The fix has been committed to CVS, and will be included in the next release. ...
Kyle Wheeler
m3m0ryh0l3
Offline Send Email
Mar 31, 2008
4:51 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help