mescc: Bugfix for merging objects.

* mlibc/libc-mes.c (main): Declare.
* mlibc/mini-libc-mes.c (g_stdin): Define.
  (main): Declare.
* module/language/c99/compiler.mes (alist-add): Thinko.  Fixes merging
  objects when first declares function of next.
This commit is contained in:
Jan Nieuwenhuizen 2017-06-04 22:44:21 +02:00
parent 5267247991
commit 86b891ecb6
3 changed files with 6 additions and 2 deletions

View File

@ -45,7 +45,7 @@ write ()
asm (".byte 0x8b 0x5d 0x08"); // mov 0x8(%ebp),%ebx
asm (".byte 0x8b 0x4d 0x0c"); // mov 0xc(%ebp),%ecx
asm (".byte 0x8b 0x55 0x10"); // mov 0x10(%ebp),%edx
asm (".byte 0xb8 0x04 0x00 0x00 0x00"); // mov $0x4,%eax
asm (".byte 0xcd 0x80"); // int $0x80
}
@ -360,6 +360,7 @@ _env (char **e)
return e;
}
int main(int,char*[]);
int
_start ()
{

View File

@ -18,6 +18,8 @@
* along with Mes. If not, see <http://www.gnu.org/licenses/>.
*/
int g_stdin = 0;
void
exit ()
{
@ -60,6 +62,7 @@ _env (char **e)
return e;
}
int main(int,char*[]);
int
_start ()
{

View File

@ -2452,6 +2452,6 @@
(define (alist-add a b)
(let* ((b-keys (map car b))
(a (filter (lambda (f) (or (cdr f) (not (member f b-keys)))) a))
(a (filter (lambda (f) (or (cdr f) (not (member (car f) b-keys)))) a))
(a-keys (map car a)))
(append a (filter (lambda (e) (not (member (car e) a-keys))) b))))