From d6b247e85f35583a0e10c5000a3f93063c4b807c Mon Sep 17 00:00:00 2001 From: Jose A Ortega Ruiz Date: Mon, 25 Jun 2007 23:20:06 +0000 Subject: GPL v3 notices git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-43 --- mixlib/gettext.h | 4 ++-- mixlib/mix.c | 4 ++-- mixlib/mix.h | 4 ++-- mixlib/mix_code_file.c | 4 ++-- mixlib/mix_code_file.h | 20 ++++++++--------- mixlib/mix_config.c | 4 ++-- mixlib/mix_config.h | 4 ++-- mixlib/mix_device.c | 22 +++++++++--------- mixlib/mix_device.h | 4 ++-- mixlib/mix_eval.c | 28 +++++++++++------------ mixlib/mix_eval.h | 16 ++++++-------- mixlib/mix_eval_scanner.l | 4 ++-- mixlib/mix_file.c | 26 +++++++++++----------- mixlib/mix_file.h | 18 +++++++-------- mixlib/mix_ins.c | 4 ++-- mixlib/mix_ins.h | 4 ++-- mixlib/mix_io.c | 4 ++-- mixlib/mix_io.h | 4 ++-- mixlib/mix_parser.c | 4 ++-- mixlib/mix_parser.h | 4 ++-- mixlib/mix_predicate.c | 4 ++-- mixlib/mix_predicate.h | 14 +++++------- mixlib/mix_predicate_list.c | 18 +++++++-------- mixlib/mix_predicate_list.h | 14 +++++------- mixlib/mix_scanner.l | 4 ++-- mixlib/mix_src_file.c | 32 +++++++++++++-------------- mixlib/mix_src_file.h | 14 +++++------- mixlib/mix_symbol_table.c | 4 ++-- mixlib/mix_symbol_table.h | 4 ++-- mixlib/mix_types.c | 4 ++-- mixlib/mix_types.h | 4 ++-- mixlib/mix_vm.c | 4 ++-- mixlib/mix_vm.h | 4 ++-- mixlib/mix_vm_clock.c | 4 ++-- mixlib/mix_vm_clock.h | 14 +++++------- mixlib/mix_vm_command.c | 4 ++-- mixlib/mix_vm_command.h | 4 ++-- mixlib/mix_vm_dump.c | 54 ++++++++++++++++++++++----------------------- mixlib/mix_vm_dump.h | 18 +++++++-------- mixlib/xmix_device.c | 6 ++--- mixlib/xmix_device.h | 6 ++--- mixlib/xmix_eval.h | 18 +++++++-------- mixlib/xmix_io.c | 20 ++++++++--------- mixlib/xmix_io.h | 14 ++++++------ mixlib/xmix_parser.h | 4 ++-- mixlib/xmix_vm.c | 4 ++-- mixlib/xmix_vm.h | 4 ++-- mixlib/xmix_vm_command.c | 4 ++-- mixlib/xmix_vm_command.h | 6 ++--- mixlib/xmix_vm_handlers.c | 4 ++-- mixlib/xmix_vm_handlers.h | 4 ++-- 51 files changed, 239 insertions(+), 263 deletions(-) (limited to 'mixlib') diff --git a/mixlib/gettext.h b/mixlib/gettext.h index fa3622f..3933224 100644 --- a/mixlib/gettext.h +++ b/mixlib/gettext.h @@ -1,9 +1,9 @@ /* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2002, 2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 2, or (at your option) + by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix.c b/mixlib/mix.c index 3039f07..d1f95ac 100644 --- a/mixlib/mix.c +++ b/mixlib/mix.c @@ -1,11 +1,11 @@ /* -*-c-*- -------------- mix.c : * Implementation of the functions declared in mix.h * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001, 2002, 2005, 2006 Free Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2002, 2005, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix.h b/mixlib/mix.h index 31269fb..3ad0786 100644 --- a/mixlib/mix.h +++ b/mixlib/mix.h @@ -1,11 +1,11 @@ /* -*-c-*- ---------------- mix.h : * Initialisation of the mix library * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_code_file.c b/mixlib/mix_code_file.c index b6841e0..56ac340 100644 --- a/mixlib/mix_code_file.c +++ b/mixlib/mix_code_file.c @@ -1,11 +1,11 @@ /* -*-c-*- -------------- mix_code_file.c : * Implementation of the functions declared in mix_code_file.h * ------------------------------------------------------------------ - * Copyright (C) 2000, 2002, 2003, 2006 Free Software Foundation, Inc. + * Copyright (C) 2000, 2002, 2003, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_code_file.h b/mixlib/mix_code_file.h index 84b89fb..054bc42 100644 --- a/mixlib/mix_code_file.h +++ b/mixlib/mix_code_file.h @@ -1,23 +1,23 @@ /* -*-c-*- ---------------- mix_code_file.h : - * Declaration of mix_code_file_t, a file containing compiled mix + * Declaration of mix_code_file_t, a file containing compiled mix * instructions. * ------------------------------------------------------------------ - * Copyright (C) 2000 Free Software Foundation, Inc. - * + * Copyright (C) 2000, 2007 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 + * the Free Software Foundation; either version 3 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. - * + * */ @@ -35,7 +35,7 @@ typedef struct mix_code_file_t mix_code_file_t; source line numbers */ typedef struct mix_ins_desc_t mix_ins_desc_t; -struct mix_ins_desc_t +struct mix_ins_desc_t { mix_word_t ins; /* a mix instruction coded into a word */ mix_address_t address; /* the address of this instruction */ @@ -91,7 +91,7 @@ extern gboolean mix_code_file_write_ins(mix_code_file_t *file, const mix_ins_desc_t *desc); extern gboolean -mix_code_file_write_next_ins(mix_code_file_t *file, mix_word_t ins, +mix_code_file_write_next_ins(mix_code_file_t *file, mix_word_t ins, guint lineno); extern gboolean @@ -100,7 +100,7 @@ mix_code_file_set_address(mix_code_file_t *file, mix_address_t address); /* get details about the source file */ extern const gchar * mix_code_file_get_source_path (const mix_code_file_t *file); - + #endif /* MIX_CODE_FILE_H */ diff --git a/mixlib/mix_config.c b/mixlib/mix_config.c index c9668e5..ec8bdb2 100644 --- a/mixlib/mix_config.c +++ b/mixlib/mix_config.c @@ -1,11 +1,11 @@ /* -*-c-*- -------------- mix_config.c : * Implementation of the functions declared in mix_config.h * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2004, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_config.h b/mixlib/mix_config.h index 7dfbce1..60ec0b3 100644 --- a/mixlib/mix_config.h +++ b/mixlib/mix_config.h @@ -1,11 +1,11 @@ /* -*-c-*- ---------------- mix_config.h : * Basic config storage utility. * ------------------------------------------------------------------ - * Copyright (C) 2001, 2006 Free Software Foundation, Inc. + * Copyright (C) 2001, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_device.c b/mixlib/mix_device.c index 6a99e8a..5d3927c 100644 --- a/mixlib/mix_device.c +++ b/mixlib/mix_device.c @@ -1,22 +1,22 @@ /* -*-c-*- -------------- mix_device.c : * Implementation of the functions declared in mix_device.h * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2000, 2001, 2007 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 + * the Free Software Foundation; either version 3 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_file.h" @@ -63,7 +63,7 @@ mix_device_new_with_name (mix_device_type_t type, const gchar *name) mix_device_t *result = NULL; g_return_val_if_fail (name != NULL, NULL); g_return_val_if_fail (type < mix_dev_INVALID, NULL); - result = g_new (mix_device_t, 1); + result = g_new (mix_device_t, 1); construct_device_with_name_ (result, type, name); return result; } @@ -120,7 +120,7 @@ mix_device_block_size (const mix_device_t *dev) Get the device io mode */ mix_device_mode_t -mix_device_mode (const mix_device_t *dev) +mix_device_mode (const mix_device_t *dev) { g_return_val_if_fail (dev != NULL, 0); return MODES_[dev->type]; @@ -130,7 +130,7 @@ mix_device_mode (const mix_device_t *dev) Write a block to the device. */ gboolean -mix_device_write (mix_device_t *dev, const mix_word_t *block) +mix_device_write (mix_device_t *dev, const mix_word_t *block) { g_return_val_if_fail (dev != NULL, FALSE); g_return_val_if_fail (block != NULL, FALSE); @@ -139,7 +139,7 @@ mix_device_write (mix_device_t *dev, const mix_word_t *block) } gboolean -mix_device_read (mix_device_t *dev, mix_word_t *block) +mix_device_read (mix_device_t *dev, mix_word_t *block) { g_return_val_if_fail (dev != NULL, FALSE); g_return_val_if_fail (block != NULL, FALSE); @@ -148,7 +148,7 @@ mix_device_read (mix_device_t *dev, mix_word_t *block) } gboolean -mix_device_ioc (mix_device_t *dev, mix_short_t arg) +mix_device_ioc (mix_device_t *dev, mix_short_t arg) { g_return_val_if_fail (dev != NULL, FALSE); g_assert (dev->vtable != NULL); diff --git a/mixlib/mix_device.h b/mixlib/mix_device.h index 7830dfe..1273f18 100644 --- a/mixlib/mix_device.h +++ b/mixlib/mix_device.h @@ -1,11 +1,11 @@ /* -*-c-*- ---------------- mix_device.h : * Declaration of mix_device_t and associated methods. * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2004, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_eval.c b/mixlib/mix_eval.c index f6f816a..64ae476 100644 --- a/mixlib/mix_eval.c +++ b/mixlib/mix_eval.c @@ -1,24 +1,22 @@ /* -*-c-*- -------------- mix_eval.c : * Implementation of the functions declared in mix_eval.h * ------------------------------------------------------------------ - * Last change: Time-stamp: "01/02/20 00:23:58 jose" - * ------------------------------------------------------------------ - * Copyright (C) 2000 Free Software Foundation, Inc. - * + * Copyright (C) 2000, 2007 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 + * the Free Software Foundation; either version 3 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. - * + * */ @@ -37,7 +35,7 @@ static const gchar *errors_[] = { /* create a new evaluator */ mix_eval_t * -mix_eval_new (void) +mix_eval_new (void) { mix_eval_t *result = g_new (mix_eval_t, 1); result->table = mix_symbol_table_new (); @@ -80,7 +78,7 @@ mix_eval_expression_with_loc (mix_eval_t *eval, const gchar *expr, mix_short_t loc) { mix_eval_data_ data; - + if (expr == NULL || eval == NULL) return MIX_EVAL_INTERN; data.expr = g_strdup_printf ("%s\n", expr); @@ -96,21 +94,21 @@ mix_eval_expression_with_loc (mix_eval_t *eval, const gchar *expr, eval->errpos = data.errpos; } g_free (data.expr); - + return eval->result; } /* get the result of the last evaluation */ mix_word_t -mix_eval_value (const mix_eval_t *eval) +mix_eval_value (const mix_eval_t *eval) { g_return_val_if_fail (eval != NULL, MIX_WORD_ZERO); return eval->value; } /* get the last eval result code */ -mix_eval_result_t -mix_eval_last_error (const mix_eval_t *eval) +mix_eval_result_t +mix_eval_last_error (const mix_eval_t *eval) { g_return_val_if_fail (eval != NULL, MIX_EVAL_INTERN); return eval->result; @@ -118,7 +116,7 @@ mix_eval_last_error (const mix_eval_t *eval) /* get the last error string */ const gchar* -mix_eval_last_error_string (const mix_eval_t *eval) +mix_eval_last_error_string (const mix_eval_t *eval) { g_return_val_if_fail (eval != NULL, errors_[MIX_EVAL_INTERN]); return errors_[eval->result]; diff --git a/mixlib/mix_eval.h b/mixlib/mix_eval.h index c1c1243..2a1672e 100644 --- a/mixlib/mix_eval.h +++ b/mixlib/mix_eval.h @@ -1,24 +1,22 @@ /* -*-c-*- ---------------- mix_eval.h : * mix_eval_t is an evaluator of MIX W-expressions * ------------------------------------------------------------------ - * Last change: Time-stamp: <01/02/20 00:23:58 jose> - * ------------------------------------------------------------------ - * Copyright (C) 2000 Free Software Foundation, Inc. - * + * Copyright (C) 2000, 2007 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 + * the Free Software Foundation; either version 3 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. - * + * */ @@ -76,7 +74,7 @@ extern mix_word_t mix_eval_value (const mix_eval_t *eval); /* get the last eval result code */ -extern mix_eval_result_t +extern mix_eval_result_t mix_eval_last_error (const mix_eval_t *eval); /* get the last error string */ diff --git a/mixlib/mix_eval_scanner.l b/mixlib/mix_eval_scanner.l index bc7687a..0f0e40a 100644 --- a/mixlib/mix_eval_scanner.l +++ b/mixlib/mix_eval_scanner.l @@ -1,11 +1,11 @@ /* -*-c-*- ------------------ mix_eval_scanner.l : * scanner used by mix_eval_t * ------------------------------------------------------------------ - * Copyright (C) 2000, 2004, 2006 Free Software Foundation, Inc. + * Copyright (C) 2000, 2004, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_file.c b/mixlib/mix_file.c index 383d3b4..07aa783 100644 --- a/mixlib/mix_file.c +++ b/mixlib/mix_file.c @@ -1,22 +1,22 @@ /* -*-c-*- -------------- mix_file.c : * Implementation of the functions declared in mix_file.h * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2000, 2001, 2007 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 + * the Free Software Foundation; either version 3 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 @@ -24,7 +24,7 @@ #include "xmix_io.h" #include "mix_file.h" -const gchar *MIX_SRC_DEFEXT = ".mixal", +const gchar *MIX_SRC_DEFEXT = ".mixal", *MIX_LIST_DEFEXT = ".mls", *MIX_CODE_DEFEXT = ".mix"; /* file names completions */ @@ -35,7 +35,7 @@ const gchar *MIX_SRC_DEFEXT = ".mixal", g_strconcat(name, defext, NULL) /* The actual definition of mix_file_t */ -struct mix_file_t +struct mix_file_t { mix_iochannel_t parent; gchar *base_name; @@ -56,7 +56,7 @@ open_file_(const gchar *name, mix_fmode_t mode) fmode = "r+"; fclose (file); } - + result = g_new(mix_file_t, 1); file = fopen(name, fmode); if ( file == NULL ) { @@ -66,7 +66,7 @@ open_file_(const gchar *name, mix_fmode_t mode) io_init_from_file_(MIX_IOCHANNEL(result), file); return result; } - + mix_file_t * mix_file_new(const gchar *name, mix_fmode_t mode) { @@ -89,15 +89,15 @@ mix_file_new(const gchar *name, mix_fmode_t mode) /* creates a file adding to its name the defext if missing */ mix_file_t * -mix_file_new_with_def_ext(const gchar *name, mix_fmode_t mode, +mix_file_new_with_def_ext(const gchar *name, mix_fmode_t mode, const gchar *defext) { const gchar *real_name; mix_file_t *result; - + if ( name == NULL ) return NULL; if ( defext == NULL ) return mix_file_new(name, mode); - real_name = needs_completion_(name, defext) ? + real_name = needs_completion_(name, defext) ? add_completion_(name, defext) : name; result = open_file_(real_name, mode); if ( real_name != name ) g_free((void *)real_name); diff --git a/mixlib/mix_file.h b/mixlib/mix_file.h index 059eebb..122b815 100644 --- a/mixlib/mix_file.h +++ b/mixlib/mix_file.h @@ -1,22 +1,22 @@ /* -*-c-*- ---------------- mix_file.h : * Declarations for the mix_file_t type. * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2000, 2001, 2007 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 + * the Free Software Foundation; either version 3 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. - * + * */ @@ -25,8 +25,8 @@ #include "mix_io.h" -/* The mix_file_t type, deriving from mix_iochannel_t and - representing a disk file +/* The mix_file_t type, deriving from mix_iochannel_t and + representing a disk file */ typedef struct mix_file_t mix_file_t; @@ -36,7 +36,7 @@ mix_file_new(const gchar *name, mix_fmode_t mode); /* creates a file adding to its name the defext if missing */ extern mix_file_t * -mix_file_new_with_def_ext(const gchar *name, mix_fmode_t mode, +mix_file_new_with_def_ext(const gchar *name, mix_fmode_t mode, const gchar *defext); extern void diff --git a/mixlib/mix_ins.c b/mixlib/mix_ins.c index 1aa3f70..871a7f7 100644 --- a/mixlib/mix_ins.c +++ b/mixlib/mix_ins.c @@ -1,11 +1,11 @@ /* -*-c-*- ------------------ mix_ins.c : * Implementation of the functions declared in mix_ins.h * ------------------------------------------------------------------ - * Copyright (C) 1999, 2003 Free Software Foundation, Inc. + * Copyright (C) 1999, 2003, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_ins.h b/mixlib/mix_ins.h index 3060f1c..7a4d028 100644 --- a/mixlib/mix_ins.h +++ b/mixlib/mix_ins.h @@ -2,11 +2,11 @@ * This file declares types and functions for manipulating MIX * instructions * ------------------------------------------------------------------ - * Copyright (C) 2000, 2006 Free Software Foundation, Inc. + * Copyright (C) 2000, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_io.c b/mixlib/mix_io.c index 526b5b6..e82f910 100644 --- a/mixlib/mix_io.c +++ b/mixlib/mix_io.c @@ -1,11 +1,11 @@ /* -*-c-*- --------------- mix_io.c : * Implementation of the functions declared in mix_io.h * ------------------------------------------------------------------ - * Copyright (C) 2000, 2004, 2006 Free Software Foundation, Inc. + * Copyright (C) 2000, 2004, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_io.h b/mixlib/mix_io.h index 0e79d67..58cbd0a 100644 --- a/mixlib/mix_io.h +++ b/mixlib/mix_io.h @@ -1,11 +1,11 @@ /* -*-c-*- ------------------ mix_io.h : * Declarations for mix_iochannel_t and mix_file_t * ------------------------------------------------------------------ - * Copyright (C) 2000, 2004 Free Software Foundation, Inc. + * Copyright (C) 2000, 2004, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_parser.c b/mixlib/mix_parser.c index edda2b2..142b245 100644 --- a/mixlib/mix_parser.c +++ b/mixlib/mix_parser.c @@ -2,11 +2,11 @@ * Implementation of the functions declared in mix_parser.h and * xmix_parser.h * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001, 2003, 2004, 2006 Free Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2003, 2004, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_parser.h b/mixlib/mix_parser.h index 2335fb1..7599f07 100644 --- a/mixlib/mix_parser.h +++ b/mixlib/mix_parser.h @@ -2,11 +2,11 @@ * Declarations for mix_parser_t, which compiles a source file into * a mix code file. * ------------------------------------------------------------------ - * Copyright (C) 2000, 2003, 2004 Free Software Foundation, Inc. + * Copyright (C) 2000, 2003, 2004, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_predicate.c b/mixlib/mix_predicate.c index 5d28799..a5b2b09 100644 --- a/mixlib/mix_predicate.c +++ b/mixlib/mix_predicate.c @@ -1,11 +1,11 @@ /* -*-c-*- -------------- mix_predicate.c : * Implementation of the functions declared in mix_predicate.h * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_predicate.h b/mixlib/mix_predicate.h index 903de57..92b7da9 100644 --- a/mixlib/mix_predicate.h +++ b/mixlib/mix_predicate.h @@ -1,24 +1,22 @@ /* -*-c-*- ---------------- mix_predicate.h : * Predicates and lists of predicates testing vm status. * ------------------------------------------------------------------ - * Last change: Time-stamp: <2001-07-13 22:32:42 jao> - * ------------------------------------------------------------------ - * Copyright (C) 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2007 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 + * the Free Software Foundation; either version 3 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_predicate_list.c b/mixlib/mix_predicate_list.c index 1b68d35..06468b3 100644 --- a/mixlib/mix_predicate_list.c +++ b/mixlib/mix_predicate_list.c @@ -1,31 +1,29 @@ /* -*-c-*- -------------- mix_predicate_list.c : * Implementation of the functions declared in mix_predicate_list.h * ------------------------------------------------------------------ - * Last change: Time-stamp: "01/07/18 23:02:26 jao" - * ------------------------------------------------------------------ - * Copyright (C) 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2007 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 + * the Free Software Foundation; either version 3 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_predicate_list.h" /* the predicate list type */ -struct mix_predicate_list_t +struct mix_predicate_list_t { GSList *predicates; const mix_vm_t *vm; @@ -58,7 +56,7 @@ gboolean mix_predicate_list_eval (mix_predicate_list_t *list) { GSList *node; - + g_return_val_if_fail (list != NULL, FALSE); node = list->predicates; while (node) { diff --git a/mixlib/mix_predicate_list.h b/mixlib/mix_predicate_list.h index d651df7..f2b8d3c 100644 --- a/mixlib/mix_predicate_list.h +++ b/mixlib/mix_predicate_list.h @@ -1,24 +1,22 @@ /* -*-c-*- ---------------- mix_predicate_list.h : * A list of predicates. * ------------------------------------------------------------------ - * Last change: Time-stamp: <01/07/18 23:02:40 jao> - * ------------------------------------------------------------------ - * Copyright (C) 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2007 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 + * the Free Software Foundation; either version 3 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_scanner.l b/mixlib/mix_scanner.l index db76057..8002996 100644 --- a/mixlib/mix_scanner.l +++ b/mixlib/mix_scanner.l @@ -1,11 +1,11 @@ /* -*-c-*- -------------- mix_scanner.l : * Lexical scanner used by mix_parser_t * ------------------------------------------------------------------ - * Copyright (C) 2000, 2003, 2004, 2006 Free Software Foundation, Inc. + * Copyright (C) 2000, 2003, 2004, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_src_file.c b/mixlib/mix_src_file.c index b376643..6a77649 100644 --- a/mixlib/mix_src_file.c +++ b/mixlib/mix_src_file.c @@ -1,24 +1,22 @@ /* -*-c-*- -------------- mix_src_file.c : * Implementation of the functions declared in mix_src_file.h * ------------------------------------------------------------------ - * Last change: Time-stamp: "01/03/10 15:23:46 jose" - * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2000, 2001, 2007 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 + * the Free Software Foundation; either version 3 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 @@ -28,7 +26,7 @@ #include "mix_src_file.h" /* the MIXAL source file type */ -struct mix_src_file_t +struct mix_src_file_t { gchar *path; /* the path to the disk file */ GPtrArray *lines; /* an array of the file lines */ @@ -41,11 +39,11 @@ format_line_ (gchar *line) { const gchar *label, *op, *rest; gint k = 0; - + if (!line) return line; if (line[0] == '*' || strlen(line) == 0) return g_strdup (line); - + if (isspace (line[0])) { label = " "; @@ -57,7 +55,7 @@ format_line_ (gchar *line) while (line[k] && !isspace (line[k])) ++k; while (line[k] && isspace (line[k])) ++k; } - + if (line[k]) { line[k - 1] = 0; @@ -71,8 +69,8 @@ format_line_ (gchar *line) { op = rest = ""; } - - + + return g_strdup_printf ("%-11s %-5s %s", label, op, rest); } @@ -87,17 +85,17 @@ load_file_ (mix_src_file_t *file) { enum {BUFFER_SIZE = 256}; static gchar BUFFER[BUFFER_SIZE]; - + FILE *f = mix_file_to_FILE (mf); file->lines = g_ptr_array_new (); file->lineno = 0; - + while (fgets (BUFFER, BUFFER_SIZE, f) == BUFFER) { g_ptr_array_add (file->lines, (gpointer) format_line_ (BUFFER)); file->lineno++; } - + mix_file_delete (mf); return TRUE; } diff --git a/mixlib/mix_src_file.h b/mixlib/mix_src_file.h index d3a7461..df5f5e3 100644 --- a/mixlib/mix_src_file.h +++ b/mixlib/mix_src_file.h @@ -2,24 +2,22 @@ * Declaration of mix_src_file_t, a type representing a MIXAL source * file. * ------------------------------------------------------------------ - * Last change: Time-stamp: <01/02/20 00:23:58 jose> - * ------------------------------------------------------------------ - * Copyright (C) 2000 Free Software Foundation, Inc. - * + * Copyright (C) 2000, 2007 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 + * the Free Software Foundation; either version 3 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_symbol_table.c b/mixlib/mix_symbol_table.c index 5153c73..69bbd30 100644 --- a/mixlib/mix_symbol_table.c +++ b/mixlib/mix_symbol_table.c @@ -1,11 +1,11 @@ /* -*-c-*- -------------- mix_symbol_table.c : * Implementation of the functions declared in mix_symbol_table.h * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001, 2004, 2006 Free Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2004, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_symbol_table.h b/mixlib/mix_symbol_table.h index c54c3f8..904c828 100644 --- a/mixlib/mix_symbol_table.h +++ b/mixlib/mix_symbol_table.h @@ -1,11 +1,11 @@ /* -*-c-*- ---------------- mix_symbol_table.h : * Type mix_symbol_table_t and functions to manipulate it. * ------------------------------------------------------------------ - * Copyright (C) 2000, 2004 Free Software Foundation, Inc. + * Copyright (C) 2000, 2004, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_types.c b/mixlib/mix_types.c index 70c5770..46e87a2 100644 --- a/mixlib/mix_types.c +++ b/mixlib/mix_types.c @@ -1,11 +1,11 @@ /* -*-c-*- ------------------ mix_types.c : * Implementation file for mix_types.h declarations. * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001, 2002, 2004, 2006 Free Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2002, 2004, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_types.h b/mixlib/mix_types.h index c628e05..9473b00 100644 --- a/mixlib/mix_types.h +++ b/mixlib/mix_types.h @@ -2,11 +2,11 @@ * This file contains declarations for the basic types used in MIX: * mix_byte_t, mix_char_t, mix_short_t and mix_word_t. * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2004, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_vm.c b/mixlib/mix_vm.c index 71c8bae..d2959f2 100644 --- a/mixlib/mix_vm.c +++ b/mixlib/mix_vm.c @@ -1,11 +1,11 @@ /* -*-c-*- ------------------ mix_vm.c : * Implementation of the functions declared in mix_vm.h * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2004, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_vm.h b/mixlib/mix_vm.h index 12b082a..0f4e690 100644 --- a/mixlib/mix_vm.h +++ b/mixlib/mix_vm.h @@ -1,11 +1,11 @@ /* ---------------------- mix_vm.h : * Types and functions implementing the MIX virtual machine * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2004, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_vm_clock.c b/mixlib/mix_vm_clock.c index a1c3df6..c34e10f 100644 --- a/mixlib/mix_vm_clock.c +++ b/mixlib/mix_vm_clock.c @@ -1,11 +1,11 @@ /* -*-c-*- -------------- mix_vm_clock.c : * Implementation of the functions declared in mix_vm_clock.h * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_vm_clock.h b/mixlib/mix_vm_clock.h index 3c19973..366d7d2 100644 --- a/mixlib/mix_vm_clock.h +++ b/mixlib/mix_vm_clock.h @@ -1,24 +1,22 @@ /* -*-c-*- ---------------- mix_vm_clock.h : * Declaration of mix_vm_clock_t, a clock for the MIX virtual machine. * ------------------------------------------------------------------ - * Last change: Time-stamp: <01/02/20 00:23:58 jose> - * ------------------------------------------------------------------ - * Copyright (C) 2000 Free Software Foundation, Inc. - * + * Copyright (C) 2000, 2007 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 + * the Free Software Foundation; either version 3 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_vm_command.c b/mixlib/mix_vm_command.c index 29a0754..e144d30 100644 --- a/mixlib/mix_vm_command.c +++ b/mixlib/mix_vm_command.c @@ -1,11 +1,11 @@ /* -*-c-*- -------------- mix_vm_command.c : * Implementation of the functions declared in mix_vm_command.h * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2004, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_vm_command.h b/mixlib/mix_vm_command.h index 8b5d6bd..65b78e9 100644 --- a/mixlib/mix_vm_command.h +++ b/mixlib/mix_vm_command.h @@ -1,11 +1,11 @@ /* -*-c-*- ---------------- mix_vm_command.h : * declarations for mix_vm_command_t, describing commands issued to a vm * ------------------------------------------------------------------ - * Copyright (C) 2001, 2006 Free Software Foundation, Inc. + * Copyright (C) 2001, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/mix_vm_dump.c b/mixlib/mix_vm_dump.c index 5c0bc32..7ffb1dc 100644 --- a/mixlib/mix_vm_dump.c +++ b/mixlib/mix_vm_dump.c @@ -1,22 +1,22 @@ /* ---------------------- mix_vm_dump.c : * Implementation of the functions declared in mix_vm_dump.h * ------------------------------------------------------------------ -** Copyright (C) 2000 Free Software Foundation, Inc. -** +** Copyright (C) 2000, 2007 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 +** the Free Software Foundation; either version 3 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.h" @@ -30,9 +30,9 @@ mix_dump_context_new(FILE *fd, mix_address_t begin, mix_address_t end, guint32 options) { mix_dump_context_t *result = NULL; - + g_return_val_if_fail (fd != NULL, NULL); - + if ( begin > end ) begin = end; if ( end >= MEM_CELLS_NO_ ) end = MEM_CELLS_NO_; @@ -41,7 +41,7 @@ mix_dump_context_new(FILE *fd, mix_address_t begin, mix_address_t end, result->begin = begin; result->end = end; result->channel = fd; - + return result; } @@ -56,7 +56,7 @@ mix_dump_context_delete (mix_dump_context_t *dc) #define WORD_FMT_ "%s %02d %02d %02d %02d %02d (%010ld)" #define SHORT_FMT_ "%s %02d %02d (%04d)" #define WORD_SIGN_(w) mix_word_is_negative (w)? "-":"+" -#define SHORT_SIGN_(s) mix_short_is_negative (s)? "-":"+" +#define SHORT_SIGN_(s) mix_short_is_negative (s)? "-":"+" #define WORD_ABS_(w) mix_word_magnitude (w) #define SHORT_ABS_(s) mix_short_magnitude (s) #define WORD_BYTE_(w,i) mix_byte_new (mix_word_magnitude (w)>>(6*(5-i))) @@ -71,33 +71,33 @@ mix_vm_dump (const mix_vm_t *vm, const mix_dump_context_t *dc) { guint j, i; FILE *f; - + g_return_if_fail (vm != NULL); g_return_if_fail (dc != NULL); - + f = dc->channel; - - if ( (dc->options & MIX_DUMP_rA) == MIX_DUMP_rA ) + + if ( (dc->options & MIX_DUMP_rA) == MIX_DUMP_rA ) { mix_word_t rA = get_rA_ (vm); fprintf (f, "rA: " WORD_FMT_ "\n", WORD_ARGS_ (rA)); } - if ( (dc->options & MIX_DUMP_rX) == MIX_DUMP_rX ) + if ( (dc->options & MIX_DUMP_rX) == MIX_DUMP_rX ) { mix_word_t rX = get_rX_ (vm); fprintf (f, "rX: " WORD_FMT_ "\n", WORD_ARGS_ (rX)); } - if ( (dc->options & MIX_DUMP_rJ) == MIX_DUMP_rJ ) + if ( (dc->options & MIX_DUMP_rJ) == MIX_DUMP_rJ ) { mix_short_t rJ = get_rJ_ (vm); fprintf (f, "rJ: " SHORT_FMT_ "\n", SHORT_ARGS_ (rJ)); } - - for (j = 0, i = 0; j < IREG_NO_; ++j) + + for (j = 0, i = 0; j < IREG_NO_; ++j) { - if ( (dc->options & (MIX_DUMP_rI1<options & (MIX_DUMP_rI1<options & MIX_DUMP_OVER) == MIX_DUMP_OVER ) + + if ( (dc->options & MIX_DUMP_OVER) == MIX_DUMP_OVER ) { fprintf (f, _("Overflow: %s\n"), get_over_ (vm)? "T":"F"); } - - if ( (dc->options & MIX_DUMP_CMP) == MIX_DUMP_CMP ) + + if ( (dc->options & MIX_DUMP_CMP) == MIX_DUMP_CMP ) { const gchar *val = "?"; - switch (get_cmp_ (vm)) + switch (get_cmp_ (vm)) { case mix_LESS: val = "L"; @@ -133,10 +133,10 @@ mix_vm_dump (const mix_vm_t *vm, const mix_dump_context_t *dc) } fprintf (f, _("Cmp: %s\n"), val); } - - if ( (dc->options & MIX_DUMP_CELLS) == MIX_DUMP_CELLS ) + + if ( (dc->options & MIX_DUMP_CELLS) == MIX_DUMP_CELLS ) { - for (j = dc->begin; j < dc->end; ++j) + for (j = dc->begin; j < dc->end; ++j) { mix_word_t cell = get_cell_ (vm,j); fprintf (f, "%04d: " WORD_FMT_ "\n", j, WORD_ARGS_ (cell)); diff --git a/mixlib/mix_vm_dump.h b/mixlib/mix_vm_dump.h index 7f8b0c3..0fd4218 100644 --- a/mixlib/mix_vm_dump.h +++ b/mixlib/mix_vm_dump.h @@ -2,22 +2,22 @@ * This file declares types and functions for dumping the contents * of a mix virtual machine. * ------------------------------------------------------------------ -** Copyright (C) 2000, 2001 Free Software Foundation, Inc. -** +** Copyright (C) 2000, 2001, 2007 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 +** the Free Software Foundation; either version 3 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. -** +** */ @@ -29,7 +29,7 @@ /* Dump context: a structure defining the properties of dumping */ typedef struct mix_dump_context_t mix_dump_context_t; -struct mix_dump_context_t +struct mix_dump_context_t { /* flags activating dumps (see enum below) */ guint32 options; @@ -52,7 +52,7 @@ struct mix_dump_context_t #define MIX_DUMP_rI5 (1<<7) #define MIX_DUMP_rI6 (1<<8) #define MIX_DUMP_rIa MIX_DUMP_rI1|MIX_DUMP_rI2|MIX_DUMP_rI3 \ - |MIX_DUMP_rI4|MIX_DUMP_rI5|MIX_DUMP_rI6 + |MIX_DUMP_rI4|MIX_DUMP_rI5|MIX_DUMP_rI6 #define MIX_DUMP_rALL MIX_DUMP_rA|MIX_DUMP_rX|MIX_DUMP_rJ|MIX_DUMP_rIa #define MIX_DUMP_OVER (1<<9) #define MIX_DUMP_CMP (1<<10) @@ -86,6 +86,6 @@ do { \ extern void mix_vm_dump(const mix_vm_t *vm, const mix_dump_context_t *dc); - + #endif /* MIX_VM_DUMP_H */ diff --git a/mixlib/xmix_device.c b/mixlib/xmix_device.c index c61ab55..0c07549 100644 --- a/mixlib/xmix_device.c +++ b/mixlib/xmix_device.c @@ -1,13 +1,11 @@ /* -*-c-*- -------------- xmix_device.c : * Implementation of the functions declared in xmix_device.h * ------------------------------------------------------------------ - * Last change: Time-stamp: "2001-05-10 01:10:25 jao" - * ------------------------------------------------------------------ - * Copyright (C) 2001, 2004 Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/xmix_device.h b/mixlib/xmix_device.h index 0eb3fa8..13950c9 100644 --- a/mixlib/xmix_device.h +++ b/mixlib/xmix_device.h @@ -1,13 +1,11 @@ /* -*-c-*- ---------------- xmix_device.h : * Protected declarations for mix_device_t * ------------------------------------------------------------------ - * Last change: Time-stamp: <2001-05-07 23:59:35 jao> - * ------------------------------------------------------------------ - * Copyright (C) 2001, 2004 Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/xmix_eval.h b/mixlib/xmix_eval.h index 7516ed3..0bd79f0 100644 --- a/mixlib/xmix_eval.h +++ b/mixlib/xmix_eval.h @@ -1,24 +1,22 @@ /* -*-c-*- ---------------- xmix_eval.h : * Definition of opaque types in mix_eval.h * ------------------------------------------------------------------ - * Last change: Time-stamp: <01/02/20 00:25:14 jose> - * ------------------------------------------------------------------ - * Copyright (C) 2000 Free Software Foundation, Inc. - * + * Copyright (C) 2000, 2007 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 + * the Free Software Foundation; either version 3 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. - * + * */ @@ -28,7 +26,7 @@ #include "mix_eval.h" /* the evaluator type */ -struct mix_eval_t +struct mix_eval_t { mix_symbol_table_t *table; /* symbol table */ gboolean towner; /* true if owns the table */ @@ -38,7 +36,7 @@ struct mix_eval_t }; /* flex scanner data/result struct */ -typedef struct mix_eval_data_ +typedef struct mix_eval_data_ { gchar *expr; const mix_symbol_table_t *table; diff --git a/mixlib/xmix_io.c b/mixlib/xmix_io.c index a43d284..24e672b 100644 --- a/mixlib/xmix_io.c +++ b/mixlib/xmix_io.c @@ -1,22 +1,22 @@ /* -*-c-*- ------------------ xmix_io.c : * Implementation of the functions declared in xmix_io.h * ------------------------------------------------------------------ - * Copyright (C) 2000 Free Software Foundation, Inc. - * + * Copyright (C) 2000, 2007 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 + * the Free Software Foundation; either version 3 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 @@ -36,20 +36,20 @@ io_init_from_fdesc_(mix_iochannel_t *ioc, int fdesc) mix_fmode_t mode; int flags = fcntl(fdesc, F_GETFL); - if ( (flags&O_RDONLY) == O_RDONLY ) + if ( (flags&O_RDONLY) == O_RDONLY ) mode = mix_io_READ; else if ( (flags&O_WRONLY) == O_WRONLY ) mode = mix_io_WRITE; else if ( (flags&O_RDWR) == O_RDWR ) mode = mix_io_RDWRT; - else + else return FALSE; - + file = fdopen(fdesc, fmode_to_type_(mode)); g_return_val_if_fail(file != NULL, FALSE); if (mode == mix_io_RDWRT) rewind (file); io_init_from_file_(ioc, file); - + return TRUE; } diff --git a/mixlib/xmix_io.h b/mixlib/xmix_io.h index 1346559..be30066 100644 --- a/mixlib/xmix_io.h +++ b/mixlib/xmix_io.h @@ -1,22 +1,22 @@ /* -*-c-*- ------------------ xmix_io.h : * Implementation of mix_iochannel_t and mix_file_t * ------------------------------------------------------------------ - * Copyright (C) 2000 Free Software Foundation, Inc. - * + * Copyright (C) 2000, 2007 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 + * the Free Software Foundation; either version 3 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. - * + * */ @@ -27,7 +27,7 @@ #include "mix_io.h" /* the actual definition of mix_iochannel_t */ -struct mix_iochannel_t +struct mix_iochannel_t { FILE *file; }; diff --git a/mixlib/xmix_parser.h b/mixlib/xmix_parser.h index 51f1560..1cbdd04 100644 --- a/mixlib/xmix_parser.h +++ b/mixlib/xmix_parser.h @@ -1,11 +1,11 @@ /* -*-c-*- ---------------- xmix_parser.h : * Declarations for the implementation of mix_parser_t * ------------------------------------------------------------------ - * Copyright (C) 2000, 2004 Free Software Foundation, Inc. + * Copyright (C) 2000, 2004, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/xmix_vm.c b/mixlib/xmix_vm.c index d5b4e4b..d4b2087 100644 --- a/mixlib/xmix_vm.c +++ b/mixlib/xmix_vm.c @@ -1,11 +1,11 @@ /* ---------------------- xmix_vm.c : * Implementation of the functions declared in xmix_vm.h * ------------------------------------------------------------------ - * Copyright (C) 2000, 2003, 2004 Free Software Foundation, Inc. + * Copyright (C) 2000, 2003, 2004, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/xmix_vm.h b/mixlib/xmix_vm.h index 63f3683..0d6605f 100644 --- a/mixlib/xmix_vm.h +++ b/mixlib/xmix_vm.h @@ -2,11 +2,11 @@ * This file contains internal declarations used in the implementation * of the mix_vm_t type. * ------------------------------------------------------------------ - * Copyright (C) 2000, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. + * Copyright (C) 2000, 2002, 2003, 2004, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/xmix_vm_command.c b/mixlib/xmix_vm_command.c index 3a15cf0..4e6ef6d 100644 --- a/mixlib/xmix_vm_command.c +++ b/mixlib/xmix_vm_command.c @@ -1,11 +1,11 @@ /* -*-c-*- -------------- xmix_vm_command.c : * Implementation of the functions declared in xmix_vm_command.h * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/xmix_vm_command.h b/mixlib/xmix_vm_command.h index ae2c2e7..8a6afae 100644 --- a/mixlib/xmix_vm_command.h +++ b/mixlib/xmix_vm_command.h @@ -1,13 +1,11 @@ /* -*-c-*- ---------------- xmix_vm_command.h : * Private type declarations form mix_vm_command * ------------------------------------------------------------------ - * $Id: xmix_vm_command.h,v 1.5 2005/09/20 19:43:13 jao Exp $ - * ------------------------------------------------------------------ - * Copyright (C) 2001, 2004 Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/xmix_vm_handlers.c b/mixlib/xmix_vm_handlers.c index 689a3a6..79c7b40 100644 --- a/mixlib/xmix_vm_handlers.c +++ b/mixlib/xmix_vm_handlers.c @@ -1,11 +1,11 @@ /* -*-c-*- -------------- xmix_vm_handlers.c : * Implementation of the functions declared in xmix_vm_handlers.h * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/mixlib/xmix_vm_handlers.h b/mixlib/xmix_vm_handlers.h index 51b24c3..decdd24 100644 --- a/mixlib/xmix_vm_handlers.h +++ b/mixlib/xmix_vm_handlers.h @@ -1,11 +1,11 @@ /* -*-c-*- ---------------- xmix_vm_handlers.h : * mix_vm_cmd_dispatcher command handlers * ------------------------------------------------------------------ - * Copyright (C) 2001, 2006 Free Software Foundation, Inc. + * Copyright (C) 2001, 2006, 2007 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, -- cgit v1.2.3