diff options
Diffstat (limited to 'mixlib')
-rw-r--r-- | mixlib/Makefile.am | 11 | ||||
-rw-r--r-- | mixlib/mix.c | 2 | ||||
-rw-r--r-- | mixlib/mix.h | 20 | ||||
-rw-r--r-- | mixlib/mix_code_file.c | 4 | ||||
-rw-r--r-- | mixlib/mix_config.c | 4 | ||||
-rw-r--r-- | mixlib/mix_config.h | 12 | ||||
-rw-r--r-- | mixlib/mix_eval_scanner.l | 4 | ||||
-rw-r--r-- | mixlib/mix_predicate.c | 34 | ||||
-rw-r--r-- | mixlib/mix_types.c | 4 | ||||
-rw-r--r-- | mixlib/mix_vm_clock.c | 14 | ||||
-rw-r--r-- | mixlib/mix_vm_command.c | 2 | ||||
-rw-r--r-- | mixlib/mix_vm_command.h | 12 | ||||
-rw-r--r-- | mixlib/testsuite/Makefile.am | 11 | ||||
-rw-r--r-- | mixlib/xmix_vm.h | 4 | ||||
-rw-r--r-- | mixlib/xmix_vm_command.c | 14 | ||||
-rw-r--r-- | mixlib/xmix_vm_handlers.c | 4 | ||||
-rw-r--r-- | mixlib/xmix_vm_handlers.h | 12 |
17 files changed, 68 insertions, 100 deletions
diff --git a/mixlib/Makefile.am b/mixlib/Makefile.am index b925ff5..8b7160e 100644 --- a/mixlib/Makefile.am +++ b/mixlib/Makefile.am @@ -1,19 +1,18 @@ ## Process this file with automake to produce Makefile.in -# Copyright (C) 2000, 2001 Free Software Foundation, Inc. -# +# Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. +# # This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without +# unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# +# # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# $Id: Makefile.am,v 1.6 2002/12/08 01:36:49 jao Exp $ SUBDIRS = testsuite -INCLUDES = -I$(includedir) -I$(top_srcdir) -DG_LOG_DOMAIN=\"libmix\" +INCLUDES = -I$(includedir) -I$(top_srcdir) -DG_LOG_DOMAIN=\"libmix\" noinst_LIBRARIES = libmix.a libmix_a_SOURCES = gettext.h mix.h mix.c \ diff --git a/mixlib/mix.c b/mixlib/mix.c index f5b2c0f..3039f07 100644 --- a/mixlib/mix.c +++ b/mixlib/mix.c @@ -1,8 +1,6 @@ /* -*-c-*- -------------- mix.c : * Implementation of the functions declared in mix.h * ------------------------------------------------------------------ - * $Id: mix.c,v 1.8 2006/03/16 00:26:11 jao Exp $ - * ------------------------------------------------------------------ * Copyright (C) 2000, 2001, 2002, 2005, 2006 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify diff --git a/mixlib/mix.h b/mixlib/mix.h index 6a3fd1d..31269fb 100644 --- a/mixlib/mix.h +++ b/mixlib/mix.h @@ -1,24 +1,22 @@ /* -*-c-*- ---------------- mix.h : * Initialisation of the mix library * ------------------------------------------------------------------ - * $Id: mix.h,v 1.7 2005/09/20 19:43:13 jao Exp $ - * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * + * */ @@ -31,7 +29,7 @@ # warning "config.h not found, package misconfigured." # define PACKAGE "mdk" # define VERSION "0.0" -#endif +#endif #ifdef HAVE_LOCALE_H # include <locale.h> @@ -43,7 +41,7 @@ # define gettext_noop(String) (String) #else # include <intl/libgettext.h> -#endif +#endif */ #include "gettext.h" @@ -53,11 +51,11 @@ #include <glib.h> /* This function must be called before using the library */ -extern void +extern void mix_init_lib (void); /* This function must be called for deallocating the lib resources - when it is no longer in use + when it is no longer in use */ extern void mix_release_lib (void); diff --git a/mixlib/mix_code_file.c b/mixlib/mix_code_file.c index ab67812..b6841e0 100644 --- a/mixlib/mix_code_file.c +++ b/mixlib/mix_code_file.c @@ -1,9 +1,7 @@ /* -*-c-*- -------------- mix_code_file.c : * Implementation of the functions declared in mix_code_file.h * ------------------------------------------------------------------ - * $Id: mix_code_file.c,v 1.6 2005/09/20 19:43:13 jao Exp $ - * ------------------------------------------------------------------ - * Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. + * Copyright (C) 2000, 2002, 2003, 2006 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/mixlib/mix_config.c b/mixlib/mix_config.c index 694b18b..c9668e5 100644 --- a/mixlib/mix_config.c +++ b/mixlib/mix_config.c @@ -1,9 +1,7 @@ /* -*-c-*- -------------- mix_config.c : * Implementation of the functions declared in mix_config.h * ------------------------------------------------------------------ - * $Id: mix_config.c,v 1.12 2005/09/20 19:43:13 jao Exp $ - * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/mixlib/mix_config.h b/mixlib/mix_config.h index 9d2af32..7dfbce1 100644 --- a/mixlib/mix_config.h +++ b/mixlib/mix_config.h @@ -1,24 +1,22 @@ /* -*-c-*- ---------------- mix_config.h : * Basic config storage utility. * ------------------------------------------------------------------ - * $Id: mix_config.h,v 1.6 2005/09/20 19:43:13 jao Exp $ - * ------------------------------------------------------------------ - * Copyright (C) 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2006 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * + * */ diff --git a/mixlib/mix_eval_scanner.l b/mixlib/mix_eval_scanner.l index 8d0d3bd..bc7687a 100644 --- a/mixlib/mix_eval_scanner.l +++ b/mixlib/mix_eval_scanner.l @@ -1,9 +1,7 @@ /* -*-c-*- ------------------ mix_eval_scanner.l : * scanner used by mix_eval_t * ------------------------------------------------------------------ - * $Id: mix_eval_scanner.l,v 1.4 2005/09/20 19:43:13 jao Exp $ - * ------------------------------------------------------------------ - * Copyright (C) 2000, 2004 Free Software Foundation, Inc. + * Copyright (C) 2000, 2004, 2006 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/mixlib/mix_predicate.c b/mixlib/mix_predicate.c index 2143757..5d28799 100644 --- a/mixlib/mix_predicate.c +++ b/mixlib/mix_predicate.c @@ -1,31 +1,29 @@ /* -*-c-*- -------------- mix_predicate.c : * Implementation of the functions declared in mix_predicate.h * ------------------------------------------------------------------ - * $Id: mix_predicate.c,v 1.6 2005/09/20 19:43:13 jao Exp $ - * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * + * */ #include "mix_vm.h" #include "mix_predicate.h" /* predicate data */ -typedef union pred_data_t +typedef union pred_data_t { mix_word_t regA; mix_word_t regX; @@ -49,7 +47,7 @@ struct mix_predicate_t /* predicate funcs */ static gboolean -pred_func_rA (mix_predicate_t *pred, const mix_vm_t *vm) +pred_func_rA (mix_predicate_t *pred, const mix_vm_t *vm) { mix_word_t val = mix_vm_get_rA (vm); if (pred->data.regA == val) return FALSE; @@ -58,7 +56,7 @@ pred_func_rA (mix_predicate_t *pred, const mix_vm_t *vm) } static gboolean -pred_func_rX (mix_predicate_t *pred, const mix_vm_t *vm) +pred_func_rX (mix_predicate_t *pred, const mix_vm_t *vm) { mix_word_t val = mix_vm_get_rX (vm); if (pred->data.regX == val) return FALSE; @@ -67,7 +65,7 @@ pred_func_rX (mix_predicate_t *pred, const mix_vm_t *vm) } static gboolean -pred_func_rI (mix_predicate_t *pred, const mix_vm_t *vm) +pred_func_rI (mix_predicate_t *pred, const mix_vm_t *vm) { mix_short_t val = (pred->control == 0) ? mix_vm_get_rJ (vm) : mix_vm_get_rI (vm, pred->control); @@ -76,8 +74,8 @@ pred_func_rI (mix_predicate_t *pred, const mix_vm_t *vm) return TRUE; } -static gboolean -pred_func_mem (mix_predicate_t *pred, const mix_vm_t *vm) +static gboolean +pred_func_mem (mix_predicate_t *pred, const mix_vm_t *vm) { mix_word_t val = mix_vm_get_addr_contents (vm, (mix_address_t)pred->control); @@ -87,7 +85,7 @@ pred_func_mem (mix_predicate_t *pred, const mix_vm_t *vm) } static gboolean -pred_func_cmp (mix_predicate_t *pred, const mix_vm_t *vm) +pred_func_cmp (mix_predicate_t *pred, const mix_vm_t *vm) { mix_cmpflag_t val = mix_vm_get_cmpflag (vm); if (pred->data.cmp == val) return FALSE; @@ -96,7 +94,7 @@ pred_func_cmp (mix_predicate_t *pred, const mix_vm_t *vm) } static gboolean -pred_func_over (mix_predicate_t *pred, const mix_vm_t *vm) +pred_func_over (mix_predicate_t *pred, const mix_vm_t *vm) { gboolean val = mix_vm_get_overflow (vm); if (pred->data.over == val) return FALSE; @@ -106,7 +104,7 @@ pred_func_over (mix_predicate_t *pred, const mix_vm_t *vm) static mix_predicate_fun_t PRED_FUNCS_[] = { pred_func_rA, pred_func_rX, pred_func_rI, pred_func_rI, pred_func_rI, - pred_func_rI, pred_func_rI, pred_func_rI, pred_func_rI, + pred_func_rI, pred_func_rI, pred_func_rI, pred_func_rI, pred_func_over, pred_func_cmp, pred_func_mem }; @@ -167,7 +165,7 @@ mix_predicate_get_message (const mix_predicate_t *predicate) enum {SIZE = 256}; static gchar BUFFER[SIZE]; static const gchar *CMP_STRINGS[] = { "L", "E", "G"}; - + g_return_val_if_fail (predicate != NULL, NULL); switch (predicate->type) @@ -187,7 +185,7 @@ mix_predicate_get_message (const mix_predicate_t *predicate) mix_short_magnitude (predicate->data.regI)); break; case MIX_PRED_REG_I1: case MIX_PRED_REG_I2: case MIX_PRED_REG_I3: - case MIX_PRED_REG_I4: case MIX_PRED_REG_I5: case MIX_PRED_REG_I6: + case MIX_PRED_REG_I4: case MIX_PRED_REG_I5: case MIX_PRED_REG_I6: g_snprintf (BUFFER, SIZE, _("Register I%d changed to %s%d"), predicate->control, mix_short_is_negative (predicate->data.regI)? "-" : "+", diff --git a/mixlib/mix_types.c b/mixlib/mix_types.c index f87247a..70c5770 100644 --- a/mixlib/mix_types.c +++ b/mixlib/mix_types.c @@ -1,9 +1,7 @@ /* -*-c-*- ------------------ mix_types.c : * Implementation file for mix_types.h declarations. * ------------------------------------------------------------------ - * $Id: mix_types.c,v 1.5 2005/09/20 19:43:13 jao Exp $ - * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2002, 2004, 2006 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/mixlib/mix_vm_clock.c b/mixlib/mix_vm_clock.c index cc39992..a1c3df6 100644 --- a/mixlib/mix_vm_clock.c +++ b/mixlib/mix_vm_clock.c @@ -1,31 +1,29 @@ /* -*-c-*- -------------- mix_vm_clock.c : * Implementation of the functions declared in mix_vm_clock.h * ------------------------------------------------------------------ - * $Id: mix_vm_clock.c,v 1.3 2005/09/20 19:43:13 jao Exp $ - * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * + * */ #include "mix_vm_clock.h" static const mix_time_t exec_times_[] = { - 1, 2, 2, 10, 12, 10, 2, 1, + 1, 2, 2, 10, 12, 10, 2, 1, 2, 2, 2, 2 , 2, 2, 2, 2, 2, 2, 2, 2 , 2, 2, 2, 2, 2, 2, 2, 2 , 2, 2, 2, 2, diff --git a/mixlib/mix_vm_command.c b/mixlib/mix_vm_command.c index a038e40..29a0754 100644 --- a/mixlib/mix_vm_command.c +++ b/mixlib/mix_vm_command.c @@ -1,8 +1,6 @@ /* -*-c-*- -------------- mix_vm_command.c : * Implementation of the functions declared in mix_vm_command.h * ------------------------------------------------------------------ - * $Id: mix_vm_command.c,v 1.30 2005/09/20 19:43:13 jao Exp $ - * ------------------------------------------------------------------ * Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify diff --git a/mixlib/mix_vm_command.h b/mixlib/mix_vm_command.h index 1ff561f..8b5d6bd 100644 --- a/mixlib/mix_vm_command.h +++ b/mixlib/mix_vm_command.h @@ -1,24 +1,22 @@ /* -*-c-*- ---------------- mix_vm_command.h : * declarations for mix_vm_command_t, describing commands issued to a vm * ------------------------------------------------------------------ - * $Id: mix_vm_command.h,v 1.15 2005/09/20 19:43:13 jao Exp $ - * ------------------------------------------------------------------ - * Copyright (C) 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2006 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * + * */ diff --git a/mixlib/testsuite/Makefile.am b/mixlib/testsuite/Makefile.am index 834f833..330a3e1 100644 --- a/mixlib/testsuite/Makefile.am +++ b/mixlib/testsuite/Makefile.am @@ -1,19 +1,18 @@ ## Process this file with automake to produce Makefile.in -# Copyright (C) 2000, 2001 Free Software Foundation, Inc. -# +# Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. +# # This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without +# unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# +# # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# $Id: Makefile.am,v 1.2 2001/09/29 01:53:51 jao Exp $ INCLUDES = -I$(includedir) -I$(top_srcdir) -I$(top_srcdir)/mixlib -LDADD = $(top_builddir)/mixlib/libmix.a +LDADD = $(top_builddir)/mixlib/libmix.a check_PROGRAMS = mixtypest mixinstest mixvminstest mixparsertest mixdevtest mixevaltest TESTS = $(check_PROGRAMS) diff --git a/mixlib/xmix_vm.h b/mixlib/xmix_vm.h index 7a634d4..63f3683 100644 --- a/mixlib/xmix_vm.h +++ b/mixlib/xmix_vm.h @@ -2,9 +2,7 @@ * This file contains internal declarations used in the implementation * of the mix_vm_t type. * ------------------------------------------------------------------ - * $Id: xmix_vm.h,v 1.10 2005/09/20 19:43:13 jao Exp $ - * ------------------------------------------------------------------ - * Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc. + * Copyright (C) 2000, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/mixlib/xmix_vm_command.c b/mixlib/xmix_vm_command.c index 370ffb7..3a15cf0 100644 --- a/mixlib/xmix_vm_command.c +++ b/mixlib/xmix_vm_command.c @@ -1,24 +1,22 @@ /* -*-c-*- -------------- xmix_vm_command.c : * Implementation of the functions declared in xmix_vm_command.h * ------------------------------------------------------------------ - * $Id: xmix_vm_command.c,v 1.4 2005/09/20 19:43:13 jao Exp $ - * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * + * */ #include <stdarg.h> @@ -52,7 +50,7 @@ log_error_ (mix_vm_cmd_dispatcher_t *dis, const gchar *fmt, ...) { enum {BUFF_SIZE = 256}; static gchar BUFFER[256]; - + if (dis && fmt && dis->err) { va_list args; diff --git a/mixlib/xmix_vm_handlers.c b/mixlib/xmix_vm_handlers.c index ba7052b..1172ec4 100644 --- a/mixlib/xmix_vm_handlers.c +++ b/mixlib/xmix_vm_handlers.c @@ -1,9 +1,7 @@ /* -*-c-*- -------------- xmix_vm_handlers.c : * Implementation of the functions declared in xmix_vm_handlers.h * ------------------------------------------------------------------ - * $Id: xmix_vm_handlers.c,v 1.10 2005/09/20 19:43:13 jao Exp $ - * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/mixlib/xmix_vm_handlers.h b/mixlib/xmix_vm_handlers.h index b3258f9..51b24c3 100644 --- a/mixlib/xmix_vm_handlers.h +++ b/mixlib/xmix_vm_handlers.h @@ -1,24 +1,22 @@ /* -*-c-*- ---------------- xmix_vm_handlers.h : * mix_vm_cmd_dispatcher command handlers * ------------------------------------------------------------------ - * $Id: xmix_vm_handlers.h,v 1.4 2005/09/20 19:43:13 jao Exp $ - * ------------------------------------------------------------------ - * Copyright (C) 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2006 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * + * */ |