mfranz
3fbb11b27a
scanf: don't bark on empty test string if format ends with number element
2008-10-02 00:58:57 +00:00
mfranz
5fd89049bb
add field width to %s & coding style
2008-10-01 19:51:44 +00:00
tat
04d90bae5a
Added: %s support for scanf
2008-10-01 18:36:09 +00:00
mfranz
df90d69de9
string.scanf(): return elements in vector given as argument; function
...
only returns success (0: no match, 1: extensible match, 2: safe match)
2008-09-29 10:06:16 +00:00
mfranz
3197bc3f24
string.scanf(): more efficient and (more :) correct %f detection
2008-09-28 20:23:14 +00:00
mfranz
13a5e62995
scanf: '+' or '-' alone aren't really numbers
2008-09-28 16:20:49 +00:00
mfranz
3f4df41fc7
add simple scanf function (a.k.a. poor man's regex)
2008-09-26 12:04:57 +00:00
mfranz
917cace77c
string.nas: remove forgotten debug message
...
props.nas: replace some "arg[*]" by named args
aircraft.nas: load aircraft data only if the file exists (to avoid warning)
debug.nas: no space before colon & fixed comment & cosmetics
2008-08-14 22:13:25 +00:00
mfranz
ae40faf4e5
cosmetics (comment fixes & improvements, variable name)
2008-07-27 22:00:58 +00:00
mfranz
fee6139da5
partly revert last change: thisfunc() isn't safe enough for this purpose
2008-07-23 00:41:18 +00:00
mfranz
7bbbfa6a8e
use thisfunc() instead of caller(0)[1]
2008-07-22 23:26:46 +00:00
mfranz
8b6ff24167
make sure functions used by the security code are tamper-proof
2008-07-22 21:22:59 +00:00
mfranz
86475efa5e
fixpath: handle empty strings
2008-07-11 15:23:23 +00:00
mfranz
b8ba3c5f66
cosmetics (no braces for one-liner functions; looks nicer, IMHO)
2008-07-03 16:24:52 +00:00
mfranz
cf9f30cb11
fixpath(): simplify by using new join() and replace() functions
2008-06-22 11:33:13 +00:00
mfranz
d86b1b9c74
string.nas: new functions string.join() and string.replace()
...
debug.nas: let benchmark() repeat tested function
io.nas: cosmetics
aircraft.nas: initialize time property only once
2008-06-21 07:10:32 +00:00
mfranz
4d17687f12
move fixpath back to string.nas. It *is* about strings, after all, and also
...
usable for property paths, so io.nas doesn't seem the right place.
2008-06-13 13:01:38 +00:00
mfranz
7d9bd68742
- move fixpath() from "string" to "io" module
...
- first stab at Nasal security model: allow writing files only to authorized
dirs. (Most of the debug messages will be removed later.)
2008-06-13 11:35:55 +00:00
mfranz
2866043c3d
- prop_key_handler: limitate history to history-max-size on loading
...
- string/debug: cosmetics
2008-06-08 11:14:57 +00:00
mfranz
4b5550520b
character class fixes (isfoo())
2007-11-26 09:50:18 +00:00
mfranz
9dfa8830a7
more isfoo() functions (yes, I intend to use them :-)
2007-11-16 17:16:42 +00:00
mfranz
dfd21c722d
- add more "var" keywords, fix indentation, drop some parentheses,
...
fix comments, consistency fixes, ...
- aircraft.nas: angular_lowpass -> minor speedup
2007-10-07 15:12:05 +00:00
mfranz
43d6e707bb
minus can't be delimiter in a [] range
2007-06-22 20:41:00 +00:00
mfranz
cfd9c1b48f
pointless spelling fixes
2007-06-22 18:49:38 +00:00
mfranz
248d4fcf60
- fix behavior for broken input
...
- more documentation
2007-06-22 17:52:37 +00:00
mfranz
f827653668
- create new Nasal module string.nas with simple shell style pattern matching
...
algorithm (needed for the file selector and useful for other purposes, like
assembling lists of livery or screenshot files etc.)
- io.nas: move fixpath to string.nas (it's not only useful for file paths
but can also be used for property paths)
- screen.nas: move trim to string.nas (used by screen.nas and nasal-console.xml)
- gui.nas: add pattern matching to FileSelctor
- ufo.nas: use patterm matching (only *.ac and *.xml files shall be listed)
2007-06-22 14:13:30 +00:00