patchPSPP - Patches: patch #5704, Data New/Open/Save

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5704: Data New/Open/Save

Submitter:  John Darrington <jmd>
Submitted:  Tue 23 Jan 2007 12:28:23 PM UTC
   
 
Category:  None Item Group:  None
Status:  Done Assigned to:  None
Open/Closed:  Closed

Tue 23 Jan 2007 05:16:44 PM UTC, comment #1: 

I'd suggest adding a function, analogous to the "quote" function in gnulib, that returns its argument as a quoted string in syntax format.  It could return it in single quotes if it doesn't contain a single quote, in double quotes if it doesn't contain a double quote, or in single quotes with doubled single quotes otherwise.  If we don't do something like this, then we end up with little ticking time bombs of code like this:


+      sss = create_syntax_string_source ("EXPORT OUTFILE='%s'.",
+                                        de->file_name);


Otherwise, looks good.

Ben Pfaff <blp>
Group administrator
Tue 23 Jan 2007 12:28:23 PM UTC, original submission:  

This patch re-enables the data new, open and save items in the data editor's file menu.  This time, they simply call the relevant syntax, rather than using their own nefarious code like before.

Things to note:

  1. As discussed previously, I've changed the signature of parse_cmd and added a parse_cmd_in_state function.


  1. The gui now has its own function (in helper.c) for executing syntax.  It does a couple of special things after running any syntax: a) if there's no source (eg because the final command was NEW FILE), it generates an empty one; b) it appends an implicit EXECUTE command.  These things ensure that there is always a source, and that the source is a flexifile and not any other kind of source.
John Darrington <jmd>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #11824:  new-file.patch added by jmd (64KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by blp (Posted a comment)
  • -email is unavailable- added by jmd (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-01-24 jmd StatusWorks For Me Done
        Assigned tojmd None
        Open/ClosedOpen Closed
    2007-01-23 blp StatusReady For Test/Review Works For Me
        Assigned toblp jmd
    2007-01-23 jmd Attached File- Added new-file.patch, #11824

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code