one of them is freememapplet[_tray] source .
Today i discovered on a Puppy 5 installation a folder i had nearly forgotten about where i had several source tarballs of freememapplet .
The problem is that since Lupu 5.1.1
playdays somehow shifted the Puppy df wrapper,
that substitutes "/dev/root" with `rdev' output for full installs,
this source had been altered to
Code: Select all
else if (pupmode==2) fp = (FILE *)popen("df -m | grep '/dev/root' | tr -s ' '| cut -f 2,4 -d ' '","r");
It is easy to alter the code to
Code: Select all
else if (pupmode==2) fp = (FILE *)popen("df -m | grep -m1 -w '/' | tr -s ' '| cut -f 2,4 -d ' '","r");
But i wanted to create a fall back line if fp still stays NULL somehow .
I tried this
Code: Select all
if (!fp) fp=-1;
and is incorrect, since fd should contain 2 values// freememapplet_tray.c: In function ‘Update’:
// freememapplet_tray.c:71: Warnung: assignment makes pointer from integer without a cast
and freememapplet still segfaults
and tried
Code: Select all
if (!fp) (char *) fp = "0 0";
I am guessing i need a C command to parse a string of two values to the fd variable .// freememapplet_tray.c: In function ‘Update’:
// freememapplet_tray.c:71: Fehler: lvalue required as left operand of assignment