Ticket #34 (new enhancement)
Support folder names in the "External data variable" name and the "Compress program" name fields
| Reported by: | debrouxl | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | Version 1.00 |
| Component: | project | Version: | 0.96 |
| Keywords: | Cc: |
Description (last modified by debrouxl) (diff)
Feature request posted by Ranman (David Randall) at http://tifreakware.ath.cx/index.php?showtopic=1393
While we're at it, we should also fix the glitches of lower-level tools that we notice during coding or tests (see comments).
Attachments
Change History
Changed 3 years ago by debrouxl
-
attachment
0001-Partial-implementation-of-ticket-34-in-the-Delphi.patch
added
comment:1 Changed 3 years ago by debrouxl
The patch I've just attached (it was edited to remove all occurrences of "trunk/") is enough for third-party testing. Recompiled binaries are available at:
- http://tict.ticalc.org/misc/IDE2.exe (warning, unlike http://tict.ticalc.org/misc/IDE.exe , this one doesn't have VTI support: I implemented the new feature on the trunk, which does not currently have the VTI support patches)
- http://tict.ticalc.org/misc/TiGcc.exe
- http://tict.ticalc.org/misc/pstarter.o
I sent those three links to David Randall, as well as the link of the patch on tict.ticalc.org, but not the link of this ticket.
In its current state, the patch is incomplete:
- it doesn't deal with the KTIGCC 1 & 2 part of the feature. KTIGCC 1 & 2 need more work for adding this feature: not only both edit fields are limited to 8 characters (fix in KTIGCC 1 + 2 is four lines total, in projectoptions.ui files), but unlike the Delphi IDE, KTIGCC 1 & 2 don't check the validity of user-supplied paths. It would be best if someone already knowledgeable in C++/Qt programming tackled the problem (it's in trunk/ktigcc/projectoptions*).
- user-supplied paths must be checked by the low-level tools called by the IDEs and tprbuilder. Currently, invalid paths such as a
a
a are not rejected by the C tigcc. - tprbuilder doesn't surround AMS paths (such as variable names containing folder name) sent to tigcc with "'", so it's currently necessary to write "a
a" to get an "a" variable in the "a" folder. That should be fixed (around line 860 of tprbuilder.c) and, while at it, the tools should be checked for other possible problems with escape sequences.
Changed 3 years ago by debrouxl
-
attachment
0001-ld-tigcc-check-validity-of-the-names-passed-to-d-a.patch
added
Patch to reject "a
a
a"-type variable names
Changed 3 years ago by debrouxl
-
attachment
0002-tprbuilder-under-nix-escape-shell-metacharacters.patch
added
Patch to escape shell metacharacters when launching external programs
comment:2 Changed 3 years ago by debrouxl
- Description modified (diff)
The two patches I've just attached take care of the second and third items of the list posted in my previous comment.
comment:3 Changed 3 years ago by debrouxl
Hmm, tprbuilder doesn't work properly after 0002-tprbuilder-under-nix-escape-shell-metacharacters. This needs more work. If the escaping is to be left in that state, then the pair of " around the argument of the TIGCC -o option should be removed.
The list of things that need to be modified for folder name handling, variable name checking and/or argument escaping is longer than I thought at first... Brain dump:
- tigcc (C version + Delphi version), --pack <[folder\]name>: folder support + name checking;
- pstarter patching (C version + Delphi version): folder support;
- ld-tigcc, -n <[folder\]name> and -d <[folder\]name>: name checking;
- tprbuilder: argument escaping;
- Delphi IDE: folder support (but it has name checking, I refactored it in 0001-Partial-implementation-of-ticket-34-in-the-Delphi);
- KTIGCC: folder support + name checking, possibly argument escaping;
- TIGCC Tools Suite (some bits are used in TIGCC/GCC4TI): name checking.

Partial patch for specifying a folder name for compressed programs