<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: szg The Calculator</title>
	<atom:link href="http://linux.subogero.com/projects/szg-command-line-calculator/feed/" rel="self" type="application/rss+xml" />
	<link>http://linux.subogero.com</link>
	<description>#!/bin/bash</description>
	<lastBuildDate>Sun, 28 Dec 2014 22:29:39 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Scott</title>
		<link>http://linux.subogero.com/projects/szg-command-line-calculator/comment-page-1/#comment-1180</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Sat, 11 Aug 2012 12:02:58 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?page_id=1127#comment-1180</guid>
		<description>Ah, that makes sense about quoting. 

I only did the &quot;make install&quot; after &quot;make w64&quot; for the 64-bit version. There was no &quot;.bin/szg.exe&quot; at this time, only &quot;.w64/szg.exe&quot;</description>
		<content:encoded><![CDATA[<p>Ah, that makes sense about quoting. </p>
<p>I only did the &#8220;make install&#8221; after &#8220;make w64&#8243; for the 64-bit version. There was no &#8220;.bin/szg.exe&#8221; at this time, only &#8220;.w64/szg.exe&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: subogero</title>
		<link>http://linux.subogero.com/projects/szg-command-line-calculator/comment-page-1/#comment-1179</link>
		<dc:creator>subogero</dc:creator>
		<pubDate>Fri, 10 Aug 2012 23:08:54 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?page_id=1127#comment-1179</guid>
		<description>A short excerpt from the szg manual page:
&lt;pre&gt;
When using the szg -e expr form, be careful with shell expansion
taking place before  passing  expr  to  szg. Quote when necessary.

Examples with Bourne compatible shells:

szg -e 6 * 7 will fail spectacularly, as your current dir listing
will be substituted for *.

szg -e 6*7 may work, except if you have a file called 617 in your
current dir, resulting in 617 instead of 42.
&lt;/pre&gt;

In other words, always quote when you multiply:
&lt;pre&gt;
szg -e &quot;12 * 43&quot;
&lt;/pre&gt;

As to installation, did you &#039;make&#039; before &#039;make install&#039;?
The normal make compiles the Cygwin target (.bin/szg.exe), which is copied to /usr/bin/ when you install.</description>
		<content:encoded><![CDATA[<p>A short excerpt from the szg manual page:</p>
<pre>
When using the szg -e expr form, be careful with shell expansion
taking place before  passing  expr  to  szg. Quote when necessary.

Examples with Bourne compatible shells:

szg -e 6 * 7 will fail spectacularly, as your current dir listing
will be substituted for *.

szg -e 6*7 may work, except if you have a file called 617 in your
current dir, resulting in 617 instead of 42.
</pre>
<p>In other words, always quote when you multiply:</p>
<pre>
szg -e "12 * 43"
</pre>
<p>As to installation, did you &#8216;make&#8217; before &#8216;make install&#8217;?<br />
The normal make compiles the Cygwin target (.bin/szg.exe), which is copied to /usr/bin/ when you install.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott</title>
		<link>http://linux.subogero.com/projects/szg-command-line-calculator/comment-page-1/#comment-1178</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Fri, 10 Aug 2012 19:42:22 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?page_id=1127#comment-1178</guid>
		<description>Correct about the Cygwin Bash attempts. I was using the Win64 binary. So I went into Bash, ran make (no options), cd to .bin, ran szg.exe

$ ./szg.exe -e 4 * 3
syntax error
unable to parse number
unable to parse number
unable to parse number
3

./szg -e XffD - Works
Interactive is also fine.


I made one of my common mistakes and hit Ctrl-Z to exit szg. Which put szg into the background. So I ran fg to get it back into the foreground so I could quit properly, and got this:

$ fg
./szg
input in flex scanner failed

OK, that was a stupid user error, so feel free to ignore it if you wish.</description>
		<content:encoded><![CDATA[<p>Correct about the Cygwin Bash attempts. I was using the Win64 binary. So I went into Bash, ran make (no options), cd to .bin, ran szg.exe</p>
<p>$ ./szg.exe -e 4 * 3<br />
syntax error<br />
unable to parse number<br />
unable to parse number<br />
unable to parse number<br />
3</p>
<p>./szg -e XffD &#8211; Works<br />
Interactive is also fine.</p>
<p>I made one of my common mistakes and hit Ctrl-Z to exit szg. Which put szg into the background. So I ran fg to get it back into the foreground so I could quit properly, and got this:</p>
<p>$ fg<br />
./szg<br />
input in flex scanner failed</p>
<p>OK, that was a stupid user error, so feel free to ignore it if you wish.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott</title>
		<link>http://linux.subogero.com/projects/szg-command-line-calculator/comment-page-1/#comment-1177</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Fri, 10 Aug 2012 19:07:27 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?page_id=1127#comment-1177</guid>
		<description>OK, I&#039;m not a real programmer, so it took a bit to figure out what Mingw stuff to install. NOTE: You also need flex and bison.

Anyway, got everything installed, ran make w64, got a error:

patterns.l: In function ‘yylex’:
patterns.l:25:25: warning: assignment makes pointer from integer without a cast

No biggee, .w64 directory contained szg.exe. 


This hangs until ^C
c:\pktemp\szg-0.5\.w64&gt;szg -e 3600*24
^C

But AHA, this works:
c:\pktemp\szg-0.5\.w64&gt;szg -e 3600 * 24
86400

Could that have been the original problem all along?
Gotta add some code to require (or put) spaces around the operator? 


&quot;szg -e XffD&quot; - also works.


But, in a Cygwin Bash shell...
./szg -e 3600 * 24 - Hangs until ^C
./szg -e 3600*24 - Same

But this works:
$ ./szg -e XffD
255

A little weird...


Anyway, interactively it work in both Windows and Bash.


BTW, &quot;make install&quot; does not install.

c:\pktemp\szg-0.5&gt;make install
cp: cannot stat `.bin/szg.exe&#039;: No such file or directory
makefile:114: recipe for target `install&#039; failed
make: *** [install] Error 1</description>
		<content:encoded><![CDATA[<p>OK, I&#8217;m not a real programmer, so it took a bit to figure out what Mingw stuff to install. NOTE: You also need flex and bison.</p>
<p>Anyway, got everything installed, ran make w64, got a error:</p>
<p>patterns.l: In function ‘yylex’:<br />
patterns.l:25:25: warning: assignment makes pointer from integer without a cast</p>
<p>No biggee, .w64 directory contained szg.exe. </p>
<p>This hangs until ^C<br />
c:\pktemp\szg-0.5\.w64&gt;szg -e 3600*24<br />
^C</p>
<p>But AHA, this works:<br />
c:\pktemp\szg-0.5\.w64&gt;szg -e 3600 * 24<br />
86400</p>
<p>Could that have been the original problem all along?<br />
Gotta add some code to require (or put) spaces around the operator? </p>
<p>&#8220;szg -e XffD&#8221; &#8211; also works.</p>
<p>But, in a Cygwin Bash shell&#8230;<br />
./szg -e 3600 * 24 &#8211; Hangs until ^C<br />
./szg -e 3600*24 &#8211; Same</p>
<p>But this works:<br />
$ ./szg -e XffD<br />
255</p>
<p>A little weird&#8230;</p>
<p>Anyway, interactively it work in both Windows and Bash.</p>
<p>BTW, &#8220;make install&#8221; does not install.</p>
<p>c:\pktemp\szg-0.5&gt;make install<br />
cp: cannot stat `.bin/szg.exe&#8217;: No such file or directory<br />
makefile:114: recipe for target `install&#8217; failed<br />
make: *** [install] Error 1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: subogero</title>
		<link>http://linux.subogero.com/projects/szg-command-line-calculator/comment-page-1/#comment-1170</link>
		<dc:creator>subogero</dc:creator>
		<pubDate>Mon, 06 Aug 2012 22:42:06 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?page_id=1127#comment-1170</guid>
		<description>Done.
&lt;pre&gt;
make w64
&lt;/pre&gt;
After that .w64/szg.exe is the native Windows x64 executable.
You need to install Cygwin&#039;s x64 Mingw cross-compiler beforehand.
The Cygwin executable is also fixed: .bin/szg</description>
		<content:encoded><![CDATA[<p>Done.</p>
<pre>
make w64
</pre>
<p>After that .w64/szg.exe is the native Windows x64 executable.<br />
You need to install Cygwin&#8217;s x64 Mingw cross-compiler beforehand.<br />
The Cygwin executable is also fixed: .bin/szg</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: subogero</title>
		<link>http://linux.subogero.com/projects/szg-command-line-calculator/comment-page-1/#comment-1167</link>
		<dc:creator>subogero</dc:creator>
		<pubDate>Sun, 05 Aug 2012 08:21:01 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?page_id=1127#comment-1167</guid>
		<description>Now I&#039;ve compiled szg for both 64bit Linux and 64bit Windows 7.
Spotted 2 bugs:
- the Win32 executable from &#039;make win&#039; does not run correctly in Win64
- the internal string buffer for &#039;-e XXXX&#039; was not initialized

The latter strangely did not cause any problems on 32bit platforms.

There will be a new target &#039;make w64&#039; to produce a proper Win64 executable.
Update hopefully until tonight.
And I owe you a beer. :-)</description>
		<content:encoded><![CDATA[<p>Now I&#8217;ve compiled szg for both 64bit Linux and 64bit Windows 7.<br />
Spotted 2 bugs:<br />
- the Win32 executable from &#8216;make win&#8217; does not run correctly in Win64<br />
- the internal string buffer for &#8216;-e XXXX&#8217; was not initialized</p>
<p>The latter strangely did not cause any problems on 32bit platforms.</p>
<p>There will be a new target &#8216;make w64&#8242; to produce a proper Win64 executable.<br />
Update hopefully until tonight.<br />
And I owe you a beer. <img src='http://linux.subogero.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: subogero</title>
		<link>http://linux.subogero.com/projects/szg-command-line-calculator/comment-page-1/#comment-1166</link>
		<dc:creator>subogero</dc:creator>
		<pubDate>Sat, 04 Aug 2012 08:23:28 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?page_id=1127#comment-1166</guid>
		<description>I&#039;ve never tried szg on a 64-bit machine, as I don&#039;t have any.
But I&#039;ll try to get hold of one and fix it.

Is it just the -e option that crashes, or the interactive mode as well?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve never tried szg on a 64-bit machine, as I don&#8217;t have any.<br />
But I&#8217;ll try to get hold of one and fix it.</p>
<p>Is it just the -e option that crashes, or the interactive mode as well?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott</title>
		<link>http://linux.subogero.com/projects/szg-command-line-calculator/comment-page-1/#comment-1165</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Sat, 04 Aug 2012 02:28:49 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?page_id=1127#comment-1165</guid>
		<description>On Win 7 64-bit:

Hangs: szg -e 3600*24
AppCrash: szg -e XffD

Running Cygwin on the same machine:
$ ./szg -e XffD
Segmentation fault</description>
		<content:encoded><![CDATA[<p>On Win 7 64-bit:</p>
<p>Hangs: szg -e 3600*24<br />
AppCrash: szg -e XffD</p>
<p>Running Cygwin on the same machine:<br />
$ ./szg -e XffD<br />
Segmentation fault</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Accessory Geeks</title>
		<link>http://linux.subogero.com/projects/szg-command-line-calculator/comment-page-1/#comment-1082</link>
		<dc:creator>Accessory Geeks</dc:creator>
		<pubDate>Wed, 16 May 2012 14:11:34 +0000</pubDate>
		<guid isPermaLink="false">http://linux.subogero.com/?page_id=1127#comment-1082</guid>
		<description>&lt;strong&gt;read more...&lt;/strong&gt;

[...]just below, are some totally unrelated sites to ours, however, they are definitely worth checking out[...]...</description>
		<content:encoded><![CDATA[<p><strong>read more&#8230;</strong></p>
<p>[...]just below, are some totally unrelated sites to ours, however, they are definitely worth checking out[...]&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
