Commit Graph

100 Commits

Author SHA1 Message Date
Renaud f13ae3957c Replace mlreply by newmlarg in eval, allowing user variable length to exceed 255 bytes. 2015-09-29 11:43:30 +08:00
Renaud cfa5c7fb65 Review getnewtoken, introduce getnewtokval and rewrite function evaluation accordingly. 2015-09-27 21:11:51 +08:00
Renaud 2c9cbbfb1e write-message buffer adjust to full width of the terminal. 2015-09-18 17:55:35 +08:00
Renaud c3f4666ff3 Review usage of mlreply/ macarg/ gettokval according to execution context. 2015-09-01 11:29:08 +08:00
Renaud 8d412dc388 Review file scope of functions dealing with token extraction and token evaluation. 2015-08-25 16:34:15 +08:00
Renaud 51967939b8 Harmonize usage of mlreply, mlreplyt and nextarg based on actual needs (input always terminated either on meta or newline characters). 2015-08-25 09:17:41 +08:00
Renaud 1ab601071e In order to support # as comment indicator, buffer content prefix is changed to '='. #buffername becomes =buffername. 2015-08-19 15:46:40 +08:00
Renaud 84bf4de212 Review function name table search in eval.c:gtfun. 2015-07-24 10:21:37 +08:00
Renaud 4d19ef668a Literals starting with '-' were interpreted as command token instead of literal token, "-3 set %i" failed as -3 was tried as command instead of an argument to set. 2015-06-12 21:06:18 +08:00
Renaud 26f0f2eb8b Offer va_list version of mlwrite. 2015-06-12 17:05:43 +08:00
Renaud 90c170e200 FIX: 'insert-string &add -1 -2147483647' was '-./,),(-*,(' instead of '-2147483648'. 2015-06-06 08:25:44 +08:00
Renaud 6dfc2f057e Add 2 as a valid value of tab length. {2, 4, 8} 2015-05-05 19:42:53 +08:00
Renaud 8502fb66c6 Use binary search to locate function in sorted function name list. 2015-03-20 15:07:47 +08:00
Renaud 70a5812928 Review function table format. 2015-03-19 22:37:41 +08:00
Renaud d57257d653 FIX: User variable names first 10 characters are now significant.
Also CID 39927 Unbounded source buffer, 39933 Copy into fixed size buffer.
2015-03-19 20:52:55 +08:00
Renaud 8de64f81be Use strncpy instead of strcpy. (CID 39928 eval, 39931 file, 39932 exec, 39938 bind). 2015-03-19 12:42:47 +08:00
Renaud eb7217f8ec Fix CID 39910: &rnd 0 return a pseudo-random number instead of triggering a zero divide crash. 2015-03-18 12:27:55 +08:00
Renaud d01649bf3a Return error if &div or &mod by 0. 2015-03-17 09:04:22 +08:00
Renaud f97746a87b CID 39914: Fallthrough in switch was altering value of $gflags when assigning to $line. 2015-03-16 13:47:03 +08:00
Renaud 80cbd37f5c Add extra warning check and fix signed to unsigned comparison issues. 2015-02-28 20:29:00 +08:00
Renaud 61f5fe7e2d Fix off by one buffer access.
Minor variable scope review.
2015-02-22 14:58:25 +08:00
Renaud e2be62323b Review scope of exported variables and functions for bind, eval, file,fileio, random. 2015-02-16 11:39:16 +08:00
Renaud 2b8992350d Avoid unnecessary sprintf & buffers when updating message or status line. 2015-02-15 16:10:44 +08:00
Renaud c10c550bdd Valid compilation when CLEAN is set.
Use assert() and robust fallback instead of exit() to handle 'impossible' cases.
2015-02-15 14:41:35 +08:00
Renaud bb44fc57ad Limit the scope of mlforce to eval. 2015-02-13 17:46:42 +08:00
Renaud e13bc9ca7e Version 4.2
Consistent display of µEMACS as program name among
- ue --version
- on status bar
- insert-string $progname
- write-message $progname (FIX).
2015-02-12 13:15:45 +08:00
Renaud bdbd2d5437 Assert that unicode are limited to 0-10FFFF. 2015-02-08 14:26:07 +08:00
Renaud 4cbf1e9ae1 Review cursor movement in presence of mixed latin1/unicode encoding. 2015-02-04 12:37:57 +08:00
Renaud 91455a2e5a Insure &asc &chr 128 equals 128.
Insert-string can't handle character code > 0xFF.
2015-02-02 12:50:52 +08:00
Renaud 36f24332c2 Review mkupper and ltos in eval. 2015-01-17 14:45:50 +08:00
Renaud 434c9ba7ab Review mlforce to avoid necessity to double '%' in input string, thus avoiding potential buffer overflow in caller functions (mdbugout and write-message). 2015-01-15 17:57:12 +08:00
Renaud 01a84a3ac0 Insure debug output fits inside terminal and buffer width. 2015-01-15 16:46:45 +08:00
Renaud e3c8805260 Unify macro debugging code in eval and exec. 2015-01-15 14:36:19 +08:00
Renaud 84919039a5 Hide details of token extraction inside exec. 2015-01-13 16:42:14 +08:00
Renaud a634ae5087 Retest gflags and limit implementation details to eval. 2015-01-10 16:23:19 +08:00
Renaud f8c405f501 Limit visibility of token types to eval. 2015-01-09 17:53:29 +08:00
Renaud 63776bb3f8 Restrict to local scope some internal funtions of eval. 2015-01-09 16:00:11 +08:00
Renaud 3ce31669ae Clean up eval: local scope for gtfun, gtenv, gtusr. Review initial allocation of result buffer returned by gtfun. 2015-01-09 15:35:03 +08:00
Renaud 57e5338ebd Insure &low and &upp don't point to the stack. 2015-01-09 09:46:03 +08:00
Renaud 4070a97fc9 Review buffer usage in & function evaluation. 2015-01-08 17:36:25 +08:00
Renaud a6669903b2 Double maximum size of a user variable (128 -> 256). 2015-01-08 14:57:02 +08:00
Renaud 8ddc8676ef More dynamic argument string size as parameters to predefined functions. 2015-01-08 14:16:15 +08:00
Renaud b596a3a09c macarg takes buffer length as parameter instead of assuming all buffer have NSTRING size. 2015-01-08 12:46:46 +08:00
Renaud d2d3581e74 Redimension result char array when doing &lef, &mid, &rig. 2015-01-07 14:47:13 +08:00
Renaud 5756354dd5 Redimension result char array when doing &cat.
Intermediary step in supporting longer string retuns in functions.
2015-01-07 14:11:58 +08:00
Renaud 534da43d08 Insure strings created by &lef and &mid are properly terminated. 2015-01-06 17:55:11 +08:00
Renaud 3be85dec65 Recompile under MinGW32 with base framework for implementing kbd/screen (mingw32 + wscreen). 2014-12-22 20:58:10 +08:00
Renaud 94d21c96f3 Move globals defines out of estruct.h. 2014-12-22 17:44:31 +08:00
Renaud 2fe2d9c153 Finish move of globals into input and random.
Remove globals.
2014-12-22 17:43:53 +08:00
Renaud bd14ff374f Move globals rval and tabmask to eval and line. 2014-12-22 17:43:01 +08:00