Dan Espen wrote:
> Thomas Funk <[email protected]> writes:
>
>> Hi!
>>
>> I'm working on a composite configurator with FvwmScript and getting an
>> issue with WriteToFile command. It only writes '#end' into the file.
>>
>> First I thought I've done something wrong but I do the same as in
>> FvwmScript-BaseConfig. So I started a test with FvwmScript-BaseConfig
>> and the same happens. Used FVWM is 2.6.5. This happens under Fedora 19,
>> too.
>>
>> My next thought was something has changed in WriteToFile source since
>> creation of FvwmScript-BaseConfig - 2007-08-07. So I compared the code
>> from 2.5.22 and CVS but nothing has changed.
>>
>> So, what could be the problem?
>
> We'd probably have to see the script but you could always resort to
> adding printfs in Instructions.c.
>
> Start with determining if it gets NbArg right.
> Just seeing #end is an indication that it doesn't
> see the args after the filename.
I have checked different VMs with different FVWM versions with
FvwmScript-BaseConfig:
Debian 4.x (2007) with FVWM 2.5.22 - ok, creates full config
Debian 6.x (2011) with FVWM 2.6.0 - ok, creates full config
Debian 7.1 (2013) with FVWM 2.6.6 - ok, creates full config
Debian 7.1 (2013) with FVWM 2.6.5 - ok, creates full config
Debian 8 (testing, 2013) with FVWM 2.6.5 - nok, creates '#end'
Fedora 19 (2013) with FVWM 2.6.5 - nok, creates '#end'
Dominique Michel wrote:
> I get the same issue yesterday.
> This is with fvwm-2.6.6 from cvs and gentoo.
So, it seems it's not a script problem.
Therefore I've starting your suggestion with 'printfs' in instructions.c
under my Fedora VM. I used this FvwmScript with one WriteToFile:
#WindowTitle {Test WriteToFile}
#WindowSize 470 415 # Taille
#
#Init
#Begin
# Set $userDir = (GetOutput {echo "$FVWM_USERDIR"} 1 -1)
# Set $configPath = $userDir{/bla}
#
# WriteToFile $configPath {This is a test}
# Quit
#End
As I didn't knew what you meant with 'printfs' I used printf first and
hoped that output went into .xsession-errors. No output appeared but
WriteToFile worked. So I removed printf and compiled code suddenly
worked!
Same code, different behaviors...
Therefore I did the same on my Debian 8 system and the compiled version
of FvwmScript works also.
Under Debian 8 and Fedora 19 I have distribution packages installed.
All others are self compiled.
Could it be a problem of code optimization? Because the FvwmScript
executables has huge different sizes:
package: 380K
compiled: 1,5M
The only thing that not fit in this theory is Dominiques issue because
his code is self compiled, too ...
- Thomas -