Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#662 set print/table $datablock

Version 5
closed-accepted
None
5
2014-05-23
2014-03-09
No

Datablocks are one of the highlights of the upcoming version 5. This is a first patch which intends to extend their usefulness even further by using them as in-memory-data. This can help to avoid temporary files.

This patch implements set print $datablock [append], i.e. print output is not written to a file but to a in-memory datablock. The update to fitmulti.dem included in the patch demonstrates a possible use.

I intend to apply this idea to implement set table $datablock and fit parameter files. save/load commands for datablocks will complete this functionality.

These commands could also help to implement the idea of [patches:#427].

1 Attachments

Related

Patches: #427

Discussion

  • Ethan Merritt
    Ethan Merritt
    2014-03-22

    Maybe also useful to replace the current test_palette()?

     
    • status: open --> pending-accepted
    • Group: -->
     
  • Patch now in CVS. I'll look into 'test palette' later.

     
  • Ethan Merritt
    Ethan Merritt
    2014-03-23

    I look forward to the "set table $FOO" extension. That strikes me as being the more important part.

    By the way - I originally implemented a routine to dump a datablock to a file but then I realized it is not necessary. "set print 'foo.dat'; print $FOO" already does this. I'm not certain whether a separate load command is needed. It may be that this will be handled by "set table $FOO; plot 'foo.dat' with table". That was not the original idea behind the "plot with table" patch but it might work for this.

     
  • This patch implements set table $datablock. Comments appreciated.

     
    • Ethan Merritt
      Ethan Merritt
      2014-04-01

      from a log of valgrind run on vector.dem

      ==2715== Conditional jump or move depends on uninitialised value(s)
      ==2715== at 0xD9847AA: vfprintf (in /usr/lib64/libc-2.18.so)
      ==2715== by 0xD9ACAC8: vsnprintf (in /usr/lib64/libc-2.18.so)
      ==2715== by 0xD98A991: snprintf (in /usr/lib64/libc-2.18.so)
      ==2715== by 0x4C1AC6: print_3dtable (tabulate.c:458)
      ==2715== by 0x495AC1: plot3drequest (plot3d.c:2203)
      ==2715== by 0x4389E4: replotrequest (command.c:2347)
      ==2715== by 0x439A24: do_line (command.c:615)
      ==2715== by 0x4765F8: load_file (misc.c:376)
      ==2715== by 0x4288D2: main (plot.c:653)
      ==2715==

      ==2715== 19 bytes in 2 blocks are definitely lost in loss record 72 of 291
      ==2715== at 0x4C266ED: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==2715== by 0xD9BDCB9: strdup (in /usr/lib64/libc-2.18.so)
      ==2715== by 0x4ACC2B: set_command (set.c:4572)
      ==2715== by 0x439A24: do_line (command.c:615)
      ==2715== by 0x4765F8: load_file (misc.c:376)
      ==2715== by 0x4288D2: main (plot.c:653)
      ==2715==

       
    • summary: set print $datablock --> set print/table $datablock
    • assigned_to: Bastian Märkisch
     
    • status: pending-accepted --> closed-accepted
    • Group: --> Version 5