Index: urces/src/COPYING-2.0
===================================================================
--- /sources/src/COPYING-2.0	(revision 51)
+++ 	(revision )
@@ -1,345 +1,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) 19yy  <name of author>
-
-    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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) 19yy name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
Index: /sources/src/COPYING-2.0.txt
===================================================================
--- /sources/src/COPYING-2.0.txt	(revision 52)
+++ /sources/src/COPYING-2.0.txt	(revision 52)
@@ -0,0 +1,345 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) 19yy name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
Index: urces/src/COPYING.LIB-2.0
===================================================================
--- /sources/src/COPYING.LIB-2.0	(revision 51)
+++ 	(revision )
@@ -1,490 +1,0 @@
-		  GNU LIBRARY GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
-    		    59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL.  It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it.  You can use it for
-your libraries, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library.  If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software.  To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
-  Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs.  This
-license, the GNU Library General Public License, applies to certain
-designated libraries.  This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
-  The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it.  Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program.  However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
-  Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries.  We
-concluded that weaker conditions might promote sharing better.
-
-  However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves.  This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them.  (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.)  The hope is that this
-will lead to faster development of free libraries.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, while the latter only
-works together with the library.
-
-  Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
-
-
-		  GNU LIBRARY GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License").  Each licensee is
-addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-
-  6. As an exception to the Sections above, you may also compile or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    c) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    d) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library 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 of the License, or (at your option) any later version.
-
-    This library 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
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public
-    License along with this library; if not, write to the Free
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
Index: /sources/src/COPYING.LIB-2.0.txt
===================================================================
--- /sources/src/COPYING.LIB-2.0.txt	(revision 52)
+++ /sources/src/COPYING.LIB-2.0.txt	(revision 52)
@@ -0,0 +1,490 @@
+		  GNU LIBRARY GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+    		    59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL.  It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it.  You can use it for
+your libraries, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library.  If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software.  To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+  Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs.  This
+license, the GNU Library General Public License, applies to certain
+designated libraries.  This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+  The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it.  Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program.  However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+  Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries.  We
+concluded that weaker conditions might promote sharing better.
+
+  However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves.  This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them.  (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.)  The hope is that this
+will lead to faster development of free libraries.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+  Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+
+		  GNU LIBRARY GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License").  Each licensee is
+addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+
+  6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    c) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    d) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library 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 of the License, or (at your option) any later version.
+
+    This library 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
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public
+    License along with this library; if not, write to the Free
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
Index: /sources/src/Makefile.am
===================================================================
--- /sources/src/Makefile.am	(revision 51)
+++ /sources/src/Makefile.am	(revision 52)
@@ -1,32 +1,33 @@
-sclibdir=$(prefix)/lib-@SC_LIB_TARGET@
+
+sclibdir = $(prefix)/lib-@SC_LIB_TARGET@
 
 sclib_LTLIBRARIES = libsystemc.la
 
-libsystemc_objects= alias.o bit2string.o dump_dot.o dump_used_env.o		\
-dump_used_options.o entity.o global_functions.o graph.o graph_cass.o	\
-graph_signals.o hex2string.o methodprocess_dependency.o					\
-module_hierarchy.o module_hierarchy2dot.o mouchard_scheduling.o			\
-port_dependency.o process_dependency.o sc_clock.o sc_event.o			\
-sc_event_finder.o sc_interface.o sc_main.o sc_module.o sc_numrep.o		\
-sc_object.o sc_pat_trace.o sc_port.o sc_sensitive.o sc_time.o			\
-sc_trace.o sc_uint_subref_r.o sc_vcd_trace.o sc_ver.o schedulers.o		\
+libsystemc_objects= alias.o bit2string.o dump_dot.o dump_used_env.o     \
+dump_used_options.o entity.o global_functions.o graph.o graph_cass.o    \
+graph_signals.o hex2string.o methodprocess_dependency.o                 \
+module_hierarchy.o module_hierarchy2dot.o mouchard_scheduling.o         \
+port_dependency.o process_dependency.o sc_clock.o sc_event.o            \
+sc_event_finder.o sc_interface.o sc_main.o sc_module.o sc_numrep.o      \
+sc_object.o sc_pat_trace.o sc_port.o sc_sensitive.o sc_time.o           \
+sc_trace.o sc_uint_subref_r.o sc_vcd_trace.o sc_ver.o schedulers.o      \
 serialization.o signal_dependency.o simplify_string.o
 # sc_logic.o
 
-libsystemc_headers= graph_cass.h sc_biguint.h sc_nbdefs.h				\
-sc_unsigned.h alias.h sc_bit.h graph_signals.h sc_bv.h sc_numrep.h		\
-sc_vcd_trace.h bit2string.h sc_clock.h sc_object.h sc_ver.h casc.h		\
-hex2string.h sc_clock_ext.h sc_ver_ext.h data_field.h internal.h		\
-sc_pat_trace.h internal_ext.h sc_event.h schedulers.h dump_dot.h		\
-sc_port.h methodprocess_dependency.h sc_event_finder.h sc_port_ext.h	\
-serialization.h dump_used_env.h sc_fwd.h serialization_ext.h			\
-module_hierarchy.h sc_int.h sc_sensitive.h dump_used_options.h			\
-sc_signal.h signal_dependency.h module_hierarchy2dot.h sc_interface.h	\
-sc_signed.h entity.h module_hierarchy_ext.h sc_localvar.h sc_string.h	\
-simplify_string.h fsm_rules.h systemc mouchard_scheduling.h sc_logic.h	\
-sc_time.h systemc.h gen_code.h sc_lv.h systemcass_version_ext.h			\
-port_dependency.h sc_trace.h usage.h global_functions.h					\
-port_dependency_ext.h sc_trace_ext.h utils.h sc_module.h sc_uint.h		\
-graph.h process_dependency.h sc_module_ext.h sc_bigint.h				\
+libsystemc_headers= graph_cass.h sc_biguint.h sc_nbdefs.h               \
+sc_unsigned.h alias.h sc_bit.h graph_signals.h sc_bv.h sc_numrep.h      \
+sc_vcd_trace.h bit2string.h sc_clock.h sc_object.h sc_ver.h casc.h      \
+hex2string.h sc_clock_ext.h sc_ver_ext.h data_field.h internal.h        \
+sc_pat_trace.h internal_ext.h sc_event.h schedulers.h dump_dot.h        \
+sc_port.h methodprocess_dependency.h sc_event_finder.h sc_port_ext.h    \
+serialization.h dump_used_env.h sc_fwd.h serialization_ext.h            \
+module_hierarchy.h sc_int.h sc_sensitive.h dump_used_options.h          \
+sc_signal.h signal_dependency.h module_hierarchy2dot.h sc_interface.h   \
+sc_signed.h entity.h module_hierarchy_ext.h sc_localvar.h sc_string.h   \
+simplify_string.h fsm_rules.h systemc mouchard_scheduling.h sc_logic.h  \
+sc_time.h systemc.h gen_code.h sc_lv.h systemcass_version_ext.h         \
+port_dependency.h sc_trace.h usage.h global_functions.h                 \
+port_dependency_ext.h sc_trace_ext.h utils.h sc_module.h sc_uint.h      \
+graph.h process_dependency.h sc_module_ext.h sc_bigint.h                \
 sc_module_name.h sc_unit.h
 
@@ -34,5 +35,5 @@
 
 if WITH_ALLIANCE
-ALLIANCE_LIBS= -L$(ALLIANCE_PATH)/lib -lMut -lPat -lPpt -lPgn
+ALLIANCE_LIBS = -L$(ALLIANCE_PATH)/lib -lMut -lPat -lPpt -lPgn
 endif
 
@@ -42,5 +43,6 @@
 noinst_LTLIBRARIES =  libgen_code.la
 libgen_code_la_SOURCES = gen_code.cc
-libgen_code_la_CXXFLAGS=-DGENERATED_MODULE_CFLAGS='"$(CXXFLAGS) -I$(prefix)/include"' @OPENMP_CFLAGS@
+libgen_code_la_CXXFLAGS = -DGENERATED_MODULE_CFLAGS='"$(CXXFLAGS) -I$(prefix)/include"' @OPENMP_CFLAGS@
 
 include_HEADERS = alias.h casc.h data_field.h global_functions.h internal_ext.h module_hierarchy_ext.h port_dependency_ext.h sc_bigint.h sc_biguint.h sc_bit.h sc_bv.h sc_clock_ext.h sc_event.h sc_fwd.h sc_int.h sc_interface.h sc_localvar.h sc_logic.h sc_lv.h sc_module_ext.h sc_module_name.h sc_nbdefs.h sc_numrep.h sc_object.h sc_pat_trace.h sc_port_ext.h sc_sensitive.h sc_signal.h sc_signed.h sc_string.h sc_time.h sc_trace_ext.h sc_uint.h sc_unit.h sc_unsigned.h sc_vcd_trace.h sc_ver_ext.h serialization_ext.h systemc systemc.h systemcass_version_ext.h
+
Index: /sources/src/alias.cc
===================================================================
--- /sources/src/alias.cc	(revision 51)
+++ /sources/src/alias.cc	(revision 52)
@@ -34,4 +34,5 @@
 
 #include "alias.h"
+
 #include <iostream>
 #ifdef HAVE_CONFIG_H
@@ -39,8 +40,7 @@
 #endif
 
-const char * alias ()
-{
+const char * alias () {
 	static int i = 0;
-	char *buf = new char[4];	
+	char * buf = new char[4];	
 	buf[3] = '\0';
 	buf[2] = 'a' + i % 26;
Index: /sources/src/alias.h
===================================================================
--- /sources/src/alias.h	(revision 51)
+++ /sources/src/alias.h	(revision 52)
@@ -10,4 +10,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef ALIAS_H
 #define ALIAS_H
@@ -16,2 +17,3 @@
 
 #endif
+
Index: /sources/src/bit2string.cc
===================================================================
--- /sources/src/bit2string.cc	(revision 51)
+++ /sources/src/bit2string.cc	(revision 52)
@@ -1,14 +1,14 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                 bit2string.cc                     |
-|                                                             |
-| Author  :                 Kingbo Paul-Jerome                |
-|                           Buchmann Richard                  |
-|                                                             |
-| Date    :                   09_07_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                 bit2string.cc                     |
+  |                                                             |
+  | Author  :                 Kingbo Paul-Jerome                |
+  |                           Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   09_07_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -37,80 +37,76 @@
 #include "bit2string.h"
 #include "sc_unit.h"
+
 #include <cstdarg>
 #include <cstdio>
 #include <cstdlib>
 #include <iostream>
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-	
+
 using namespace std;
 
 namespace sc_core {
 
-static
-void bit2string_64 (char *buf, tab_t *val,int size)
-{
-	typedef sc_dt::s_uint_type<64>::uint_type data_type;
-  data_type tmp=*((data_type*)val);
-       	//cout << "tmp = " << tmp << "\n";	
-	buf[size]='\0';
-	for (int i=size-1; i>=0;--i) 
-	{
-		buf[i]=(tmp&1)?'1':'0';
-		tmp>>=1;
-	}
-#if 0
-  cout << buf << "\n";	
-#endif
+static void bit2string_64(char * buf, tab_t * val, int size) {
+   typedef sc_dt::s_uint_type<64>::uint_type data_type;
+   data_type tmp = *((data_type *) val);
+   buf[size] = '\0';
+   for (int i = size - 1; i >= 0; --i) {
+      buf[i] = (tmp & 1) ? '1' : '0';
+      tmp >>= 1;
+   }
 }
 
-static
-void bit2string_32 (char *buf, tab_t *val,int size)
-{
-	typedef sc_dt::s_uint_type<32>::uint_type data_type;
-  data_type tmp=*((data_type*)val);
-       	//cout << "tmp = " << tmp << "\n";	
-	buf[size]='\0';
-	for (int i=size-1; i>=0;--i) 
-	{
-		buf[i]=(tmp&1)?'1':'0';
-		tmp>>=1;
-	}
-#if 0
-  cout << buf << "\n";	
-#endif
+static void bit2string_32(char * buf, tab_t * val, int size) {
+   typedef sc_dt::s_uint_type<32>::uint_type data_type;
+   data_type tmp = *((data_type *) val);
+   buf[size] = '\0';
+   for (int i = size - 1; i >= 0; --i) {
+      buf[i] = (tmp & 1) ? '1' : '0';
+      tmp >>= 1;
+   }
 }
 
-void bit2string(char *buf, tab_t *val,int bit_number)
-{
-  if (bit_number > 32)
-  {
-    bit2string_64 (buf, (tab_t*)val, bit_number);
-    return;
-  } else if (bit_number > 16) 
-  {
-    bit2string_32 (buf, (tab_t*)val, bit_number);
-    return;
-  }
-	tab_t tmp=*((tab_t*)val);
-       	//cout << "tmp = " << tmp << "\n";	
-	buf[bit_number]='\0';
-	for (int i=bit_number-1; i>=0;--i) 
-	{
-		buf[i]=(tmp&1)?'1':'0';
-		tmp>>=1;
-	}
-	
+void bit2string(char * buf, tab_t * val, int bit_number) {
+   if (bit_number > 32) {
+      bit2string_64(buf, (tab_t *) val, bit_number);
+      return;
+   }
+   else if (bit_number > 16) {
+      bit2string_32(buf, (tab_t *) val, bit_number);
+      return;
+   }
+   tab_t tmp = *((tab_t *) val);
+   buf[bit_number] = '\0';
+   for (int i = bit_number - 1; i >= 0; --i) {
+      buf[i] = (tmp & 1) ? '1' : '0';
+      tmp >>= 1;
+   }
+
 }
 
-char * strip (char * buf)
-{
-	int cpt=0;
-	while ( (buf[cpt] == '0') && (buf[cpt+1] != '\0') ) //tant que bit == 0
-		cpt++;
-	return (buf+cpt);
+char * strip(char * buf) {
+   int cpt = 0;
+   while ((buf[cpt] == '0') && (buf[cpt + 1] != '\0')) {// tant que bit == 0
+      cpt++;
+   }
+   return (buf + cpt);
 }
 
 } // end of sc_core namespace
 
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/bit2string.h
===================================================================
--- /sources/src/bit2string.h	(revision 51)
+++ /sources/src/bit2string.h	(revision 52)
@@ -10,4 +10,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef BIT2STRING_H
 #define BIT2STRING_H
@@ -17,8 +18,9 @@
 namespace sc_core {
 
-extern void  bit2string (char *buf,tab_t *val,int bit_number);
-extern char *strip      (char *bitstring);	
+extern void  bit2string(char * buf, tab_t * val, int bit_number);
+extern char * strip(char * bitstring);
 
 } // end of sc_core namespace
 
 #endif
+
Index: /sources/src/casc.h
===================================================================
--- /sources/src/casc.h	(revision 51)
+++ /sources/src/casc.h	(revision 52)
@@ -1,13 +1,14 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                 casc.h                            |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                                                             |
-| Date    :                   09_07_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                 casc.h                            |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   09_07_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
+
 #ifndef __CASC_H__
 #define __CASC_H__
@@ -26,12 +27,10 @@
 
 namespace sc_core {
-
-struct sc_module;
-
-inline void transition        (void);
-EXTERN void update            (void);
-inline void moore_generation  (void);
-EXTERN void mealy_generation  (void);
-EXTERN bool casc_check_version(const char*);
+    struct sc_module;
+    inline void transition        (void);
+    EXTERN void update            (void);
+    inline void moore_generation  (void);
+    EXTERN void mealy_generation  (void);
+    EXTERN bool casc_check_version(const char *);
 }
 
@@ -41,21 +40,29 @@
 namespace sc_core {
 
-EXTERN void initialize        ()
-{
-  casc_check_version (SYSTEMC_VERSION);
-}
+    EXTERN void initialize() {
+        casc_check_version(SYSTEMC_VERSION);
+    }
 
-EXTERN void simulate_1_cycle (void) 
-{
-  transition ();
-  update     ();
-  moore_generation ();
-  mealy_generation (); 
-}
+    EXTERN void simulate_1_cycle(void) {
+        transition();
+        update();
+        moore_generation();
+        mealy_generation(); 
+    }
 } // end of sc_core namespace
 
 #endif
 
-
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/data_field.h
===================================================================
--- /sources/src/data_field.h	(revision 51)
+++ /sources/src/data_field.h	(revision 52)
@@ -13,14 +13,11 @@
 #define __DATA_FIELD_H__
 
-template<int      WIDTH,
-         int      PADDING,
-         typename data_type>
+template <int WIDTH, int PADDING, typename data_type>
 struct val_field {
   data_type valW:WIDTH;
 };
 
-template<int      WIDTH,
-         typename data_type>
-struct val_field<WIDTH,0,data_type> {
+template <int WIDTH, typename data_type>
+struct val_field<WIDTH, 0, data_type> {
   data_type valW:WIDTH;
 };
Index: /sources/src/dump_dot.cc
===================================================================
--- /sources/src/dump_dot.cc	(revision 51)
+++ /sources/src/dump_dot.cc	(revision 52)
@@ -1,13 +1,13 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                  dump_dot.cc                      |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                                                             |
-| Date    :                   09_07_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                  dump_dot.cc                      |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   09_07_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -44,5 +44,6 @@
 #endif
 
-typedef std::list<sc_core::sc_port_base*> port_list_t;
+typedef std::list<sc_core::sc_port_base *> port_list_t;
+
 using namespace std;
 
@@ -52,122 +53,122 @@
 
 // Build a port list owned by the module mod
-static void
-get_out_port_list (const sc_module &mod, port_list_t &pl)
-{
-	port2module_t::iterator i;
-	for (i = port2module.begin (); i != port2module.end (); ++i) {
-		if ((i->second == &mod) && (i->first)) {
-			pl.push_back ((sc_port_base*)(i->first));
-		}
-	}
+static void get_out_port_list(const sc_module & mod, port_list_t & pl) {
+    port2module_t::iterator i;
+    for (i = port2module.begin(); i != port2module.end(); ++i) {
+        if ((i->second == &mod) && (i->first)) {
+            pl.push_back((sc_port_base *) (i->first));
+        }
+    }
 }
 
-static void
-dump_dot (ofstream &o, method_process_t &m)
-{
-	port_list_t port_list;
-	get_out_port_list (*(m.module),port_list);
-	port_list_t::iterator op;
-	for (op = port_list.begin (); op != port_list.end (); ++op)
-  {
-		sensitivity_list_t::iterator ip;
-		for (ip = m.sensitivity_list.begin(); ip != m.sensitivity_list.end();++ip)
-		{	
-			if (is_clock (ip->get_interface()))
-				continue;
-			const char *in = get_name (ip->get_interface().get_pointer());
-			const char *out = (*op)->name ();
-			string s;
-			o << simplify_name(in,s); 
-      o << "->";
-      o << simplify_name(out,s);
-      o << ";\n";
-		}		
-	}
+static void dump_dot(ofstream & o, method_process_t & m) {
+    port_list_t port_list;
+    get_out_port_list(*(m.module), port_list);
+    port_list_t::iterator op;
+    for (op = port_list.begin(); op != port_list.end(); ++op) {
+        sensitivity_list_t::iterator ip;
+        for (ip = m.sensitivity_list.begin(); ip != m.sensitivity_list.end(); ++ip) {
+            if (is_clock(ip->get_interface())) {
+                continue;
+            }
+            const char * in = get_name(ip->get_interface().get_pointer());
+            const char * out = (*op)->name();
+            string s;
+            o << simplify_name(in, s);
+            o << "->";
+            o << simplify_name(out, s);
+            o << ";\n";
+        }
+    }
 }
 
-static void
-dump_all (ofstream &o, method_process_list_t &lm)
-{
-	method_process_list_t::iterator it;
-	for (it = lm.begin (); it != lm.end (); ++it)
-		dump_dot (o,**it);
+
+static void dump_all(ofstream & o, method_process_list_t & lm) {
+    method_process_list_t::iterator it;
+    for (it = lm.begin(); it != lm.end(); ++it) {
+        dump_dot(o, **it);
+    }
 }
 
-static void
-dump_all (ofstream &o, const Vertex & v)
-{
-  if (v.arcs == NULL)
-	  return;
-  Arc *a;
-  for (a = v.arcs; a; a = a->next)
-	{
-    method_process_t *m  = (method_process_t*)v.data;
-    method_process_t *m2 = (method_process_t*)a->tip->data;
-		o << m->module->name ();
-	  o << " -> "
-		  << m2->module->name () 
-      << "\n";
-	}
+
+static void dump_all(ofstream & o, const Vertex & v) {
+    if (v.arcs == NULL) {
+        return;
+    }
+    Arc * a;
+    for (a = v.arcs; a != NULL; a = a->next) {
+        method_process_t * m = (method_process_t *) v.data;
+        method_process_t * m2 = (method_process_t *) a->tip->data;
+        o << m->module->name();
+        o << " -> " << m2->module->name() << "\n";
+    }
 }
 
-static void
-dump_all (ofstream &o, Graph &g)
-{
-	Vertex *v;
-  for (v = g.vertices; v < g.vertices + g.n; v++) 
-	{
-		dump_all (o,*v);
-  }
+
+static void dump_all(ofstream & o, Graph & g) {
+    Vertex *v;
+    for (v = g.vertices; v < g.vertices + g.n; v++) {
+        dump_all(o, *v);
+    }
 }
 
-bool
-SignalDependancyGraph2dot (const char *name, method_process_list_t &lm)
-{
-	if (!name)
-		return false;
-	string filename;
-	filename =  name;
-	filename += ".dot";
-	ofstream o;
-  o.open (filename.c_str(),ios::out | ios::trunc);
-	if (o.is_open () == false)
-		return false;
-	o << "// Signal dependency graph\n"
-             "// Generated by "
-          << sc_version () << "\n";
-	o << "strict digraph " << name << " {\n";
-	dump_all (o,lm);
-	o << "}\n";
-	o.close ();
-	return true;
+
+bool SignalDependancyGraph2dot(const char * name, method_process_list_t & lm) {
+    if (!name) {
+        return false;
+    }
+    string filename;
+    filename = name;
+    filename += ".dot";
+    ofstream o;
+    o.open(filename.c_str(), ios::out | ios::trunc);
+    if (o.is_open() == false) {
+        return false;
+    }
+    o << "// Signal dependency graph\n"
+         "// Generated by " << sc_version() << "\n";
+    o << "strict digraph " << name << " {\n";
+    dump_all(o, lm);
+    o << "}\n";
+    o.close();
+    return true;
 }
 
 
 
-bool
-FctDependancyGraph2dot (const char *name, Graph *g)
-{
-	if (!name)
-		return false;
-	if (!g)
-		return false;
-	string filename;
-	filename =  name;
-	filename += ".dot";
-	ofstream o;
-  o.open (filename.c_str(),ios::out | ios::trunc);
-	if (o.is_open () == false)
-		return false;
-	o << "// Function dependency graph\n"
-             "// Generated by "
-          << sc_version () << "\n";
-	o << "digraph " << name << " {\n";
-	dump_all (o,*g);
-	o << "}\n";
-	o.close ();
-	return true;
+bool FctDependancyGraph2dot(const char * name, Graph * g) {
+    if (!name) {
+        return false;
+    }
+    if (!g) {
+        return false;
+    }
+    string filename;
+    filename = name;
+    filename += ".dot";
+    ofstream o;
+    o.open(filename.c_str(), ios::out | ios::trunc);
+    if (o.is_open() == false) {
+        return false;
+    }
+    o << "// Function dependency graph\n"
+         "// Generated by " << sc_version() << "\n";
+    o << "digraph " << name << " {\n";
+    dump_all(o, *g);
+    o << "}\n";
+    o.close();
+    return true;
 }
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
Index: /sources/src/dump_dot.h
===================================================================
--- /sources/src/dump_dot.h	(revision 51)
+++ /sources/src/dump_dot.h	(revision 52)
@@ -14,11 +14,15 @@
 
 #include <list>
+
 #include "sc_fwd.h"
 #include "graph.h"
 
 namespace sc_core {
-extern bool SignalDependancyGraph2dot (const char *name, method_process_list_t &lm);
-extern bool FctDependancyGraph2dot (const char *name, Graph*);
+
+extern bool SignalDependancyGraph2dot(const char * name, method_process_list_t & lm);
+extern bool FctDependancyGraph2dot(const char * name, Graph *);
+
 }
 
 #endif
+
Index: /sources/src/dump_used_env.cc
===================================================================
--- /sources/src/dump_used_env.cc	(revision 51)
+++ /sources/src/dump_used_env.cc	(revision 52)
@@ -1,13 +1,13 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                  dump_used_env.cc                 |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                                                             |
-| Date    :                   10_MAY_2005                     |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                  dump_used_env.cc                 |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   10_MAY_2005                     |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -35,4 +35,5 @@
 
 #include <cstdlib>
+
 #include "dump_used_env.h"
 #ifdef HAVE_CONFIG_H
@@ -40,23 +41,41 @@
 #endif
 
-std::string
-sc_core::get_used_env()
-{
-  const char *compiler    = getenv ("GCC");
-  const char *systemc_dir = getenv ("SYSTEMCASS");
-  const char *target_arch = getenv ("TARGET_ARCH");
-  if (compiler == NULL)
-    compiler = "undefined";
-  if (systemc_dir == NULL)
-    systemc_dir = "undefined";
-  if (target_arch == NULL)
-    target_arch = "undefined";
-  std::string used_env;
-  used_env +=   "GCC         = ";
-  used_env += compiler;
-  used_env += "\nSYSTEMCASS  = ";
-  used_env += systemc_dir;
-  used_env += "\nTARGET_ARCH = ";
-  used_env += target_arch;
-  return used_env;
+std::string sc_core::get_used_env() {
+    const char * compiler = getenv("GCC");
+    const char * systemc_dir = getenv("SYSTEMCASS");
+    const char * target_arch = getenv("TARGET_ARCH");
+
+    if (compiler == NULL) {
+        compiler = "undefined";
+    }
+
+    if (systemc_dir == NULL) {
+        systemc_dir = "undefined";
+    }
+
+    if (target_arch == NULL) {
+        target_arch = "undefined";
+    }
+
+    std::string used_env;
+    used_env += "GCC         = ";
+    used_env += compiler;
+    used_env += "\nSYSTEMCASS  = ";
+    used_env += systemc_dir;
+    used_env += "\nTARGET_ARCH = ";
+    used_env += target_arch;
+
+    return used_env;
 }
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/dump_used_env.h
===================================================================
--- /sources/src/dump_used_env.h	(revision 51)
+++ /sources/src/dump_used_env.h	(revision 52)
@@ -10,4 +10,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef DUMP_USED_ENV_H
 #define DUMP_USED_ENV_H
Index: /sources/src/dump_used_options.cc
===================================================================
--- /sources/src/dump_used_options.cc	(revision 51)
+++ /sources/src/dump_used_options.cc	(revision 52)
@@ -35,4 +35,5 @@
 
 #include "dump_used_options.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -41,6 +42,5 @@
 namespace sc_core {
 
-static 
-const char used_options[] =
+static const char used_options[] =
   "Used Options :\n"
 #ifdef USE_PORT_DEPENDENCY
@@ -94,7 +94,5 @@
   "...";
 
-const char*
-get_used_options()
-{
+const char * get_used_options() {
     return used_options;
 }
@@ -102,2 +100,14 @@
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
+
Index: /sources/src/dump_used_options.h
===================================================================
--- /sources/src/dump_used_options.h	(revision 51)
+++ /sources/src/dump_used_options.h	(revision 52)
@@ -15,5 +15,5 @@
 namespace sc_core {
 
-extern const char *get_used_options ();
+extern const char * get_used_options();
 
 }
Index: /sources/src/entity.cc
===================================================================
--- /sources/src/entity.cc	(revision 51)
+++ /sources/src/entity.cc	(revision 52)
@@ -1,14 +1,14 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                   entity.cc                       |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                           Taktak Sami                       |
-|                                                             |
-| Date    :                   09_07_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                   entity.cc                       |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                           Taktak Sami                       |
+  |                                                             |
+  | Date    :                   09_07_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -40,10 +40,11 @@
 #include <map>
 #include <vector>
-
 #include <cassert>
+
 #include "entity.h"
 #include "sc_port.h"
 #include "sc_signal.h"
 #include "sc_module.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -53,548 +54,511 @@
 
 namespace sc_core {
-  equi_list_t equi_list;
-  equi_table_t equi_table = NULL;
-
-  ostream& operator << (ostream &, const entity &);
-  ostream& operator << (ostream &, const equi_t &);
-
-  struct predic4entity2equi_t_t
-  {
-    bool operator()(const entity &e1, const entity &e2) const
-    {
-      return e1.interface < e2.interface;
-    }
-  };
-
-  typedef std::map<entity,equi_list_t::iterator,predic4entity2equi_t_t> entity2equi_it_t;
-
-  ostream& operator << (ostream& o, const entity2equi_it_t &m)
-  {
+
+equi_list_t equi_list;
+equi_table_t equi_table = NULL;
+
+ostream & operator << (ostream &, const entity &);
+ostream & operator << (ostream &, const equi_t &);
+
+struct predic4entity2equi_t_t {
+    bool operator() (const entity & e1, const entity & e2) const {
+        return e1.interface < e2.interface;
+    }
+};
+
+typedef std::map <entity, equi_list_t::iterator, predic4entity2equi_t_t> entity2equi_it_t;
+
+
+ostream & operator << (ostream & o, const entity2equi_it_t & m) {
     entity2equi_it_t::const_iterator i;
-    for (i = m.begin(); i != m.end(); ++i)
-    {
-      o << (i->first) << " : " << *(i->second) << "\n";
+    for (i = m.begin(); i != m.end(); ++i) {
+        o << (i->first) << " : " << *(i->second) << "\n";
     }
     return o;
-  }
-  entity2equi_it_t equi_map;
-	
-  const equi_list_t& get_equi_list ()
-	{
+}
+
+entity2equi_it_t equi_map;
+
+
+const equi_list_t & get_equi_list() {
     return equi_list;
-  }
-
-  unsigned int
-  max (unsigned int a, unsigned int b)
-  {
-  	return (a > b)?a:b;
-  }
-
-  static
-  int get_signal_table_size (const equi_list_t &e)
-  {
-		// bug fix : remove the 0x0 equi from the list
+}
+
+
+unsigned int max(unsigned int a, unsigned int b) {
+    return (a > b) ? a : b;
+}
+
+
+static int get_signal_table_size(const equi_list_t & e) {
+    // bug fix : remove the 0x0 equi from the list
     equi_list_t::const_iterator i;
     int capacity = 0;
-    for (i = e.begin (); i != e.end (); ++i) {
-//cerr << i->begin()->object->name ();
-      const entity &ent = *(i->begin());
-      int     data_size = ent.data_size_in_bytes();
-      int     number_of_part = ((data_size - 1) / sizeof(tab_t)) + 1;
-      capacity += number_of_part;
+    for (i = e.begin(); i != e.end(); ++i) {
+        //cerr << i->begin()->object->name ();
+        const entity & ent = *(i->begin());
+        int data_size = ent.data_size_in_bytes();
+        int number_of_part = ((data_size - 1) / sizeof(tab_t)) + 1;
+        capacity += number_of_part;
     }
     return capacity;
-  }
-
-  int get_signal_table_size ()
-  {
-    return get_signal_table_size (equi_list);
-  }
-
-	sc_port_base*
-	get_out_port (const equi_t &eq)
-	{
-		equi_t::const_iterator i;
-		for (i = eq.begin (); i != eq.end (); ++i) {
-			const char *type = i->kind ();
-			if ((type == sc_core::sc_out_string)||(type == sc_core::sc_inout_string))
-				return i->port;
-		}
-		/*
-		cerr << "Internal error : can't find out port in "
-			<< eq << ".\n";
-		exit(32);
-		*/
-		return NULL;
-	}
-	
-	static
-	sc_port_base*
-	get_localvar (equi_t &eq)
-	{
-		equi_t::iterator i;
-		for (i = eq.begin (); i != eq.end (); ++i) {
-			const char *type = i->kind ();
-			if (strcmp (type, "sc_localvar") == 0)
-				return i->port;
-		}
-		return NULL;
-	}
-
-	static
-	sc_port_base*
-	get_signal (equi_t &eq)
-	{
-		equi_t::iterator i;
-		for (i = eq.begin (); i != eq.end (); ++i) {
-			const char *type = i->kind ();
-			if (strcmp (type, "sc_signal") == 0)
-				return i->port;
-		}
-		return NULL;
-	}
-
-  equi_t& 
-  get_equi (const sc_interface &i)
-	{
-		return get_equi (i.get_pointer ());
-	}
-
-  struct predic4tab_t2equi_t_t
-  {
-    bool operator()(const tab_t *t1, const tab_t *t2) const
-    {
-      return t1 < t2;
-    }
-  };
+}
+
+
+int get_signal_table_size() {
+    return get_signal_table_size(equi_list);
+}
+
+
+sc_port_base * get_out_port(const equi_t & eq) {
+    equi_t::const_iterator i;
+    for (i = eq.begin(); i != eq.end(); ++i) {
+        const char * type = i->kind();
+        if ((type == sc_core::sc_out_string) || (type == sc_core::sc_inout_string)) {
+            return i->port;
+        }
+    }
+    return NULL;
+}
+
+static sc_port_base *get_localvar(equi_t & eq) {
+    equi_t::iterator i;
+    for (i = eq.begin(); i != eq.end(); ++i) {
+        const char *type = i->kind();
+        if (strcmp(type, "sc_localvar") == 0) {
+            return i->port;
+        }
+    }
+    return NULL;
+}
+
+
+static sc_port_base *get_signal(equi_t & eq) {
+    equi_t::iterator i;
+    for (i = eq.begin(); i != eq.end(); ++i) {
+        const char * type = i->kind();
+        if (strcmp(type, "sc_signal") == 0) {
+            return i->port;
+        }
+    }
+    return NULL;
+}
+
+
+equi_t & get_equi(const sc_interface & i) {
+    return get_equi(i.get_pointer());
+}
+
+
+struct predic4tab_t2equi_t_t {
+    bool operator() (const tab_t * t1, const tab_t * t2) const {
+        return t1 < t2;
+    }
+};
+
 
 #define get_equi_SPEEDUP
-  equi_t& 
-  get_equi (const tab_t *pointer)
-	{
+equi_t & get_equi(const tab_t * pointer) {
     // result variable
-		equi_list_t::iterator i;
+    equi_list_t::iterator i;
 #if defined(get_equi_SPEEDUP)
-    typedef std::map<const tab_t *,equi_list_t::iterator,predic4tab_t2equi_t_t> tab_t2equi_it_t;
+    typedef std::map <const tab_t *, equi_list_t::iterator, predic4tab_t2equi_t_t> tab_t2equi_it_t;
     static tab_t2equi_it_t tab2equi_map;
     assert(pointer != NULL);
 
     // boost
-    tab_t2equi_it_t::/*const_*/iterator it = tab2equi_map.find (pointer);
-    if (it != tab2equi_map.end ())
-    {
-      i = it->second;
-      return *i;
-    }
-#endif
-    //
-		for (i = equi_list.begin (); i != equi_list.end (); ++i) {
-      const equi_t::iterator &j = i->begin();
-      const entity       &e = *j;
-      const sc_interface *f = e.interface;
-      const tab_t        *p = f->get_pointer ();
-			if (p == pointer)
-      {
+    tab_t2equi_it_t:: /*const_ */ iterator it = tab2equi_map.find(pointer);
+    if (it != tab2equi_map.end()) {
+        i = it->second;
+        return *i;
+    }
+#endif
+
+    
+    for (i = equi_list.begin(); i != equi_list.end(); ++i) {
+        const equi_t::iterator & j = i->begin();
+        const entity & e = *j;
+        const sc_interface * f = e.interface;
+        const tab_t * p = f->get_pointer();
+        if (p == pointer) {
 #if defined(get_equi_SPEEDUP)
-        tab2equi_map[pointer] = i;
-#endif
-				return *i;
-      }
-		}
-		cerr << "Internal error : get_equi(" << pointer << ")\n";		
-		exit (11);
-	}
+            tab2equi_map[pointer] = i;
+#endif
+            return *i;
+        }
+    }
+    cerr << "Internal error : get_equi(" << pointer << ")\n";
+    exit(11);
+}
 #undef get_equi_SPEEDUP
 
-  bool
-  has_equi (/*const*/ sc_port_base &port)
-	{
+
+bool has_equi( /*const */ sc_port_base & port) {
     entity e(port);
-    entity2equi_it_t::/*const_*/iterator it = equi_map.find (e);
-    if (it == equi_map.end ())
-    {
-       return false;
+    entity2equi_it_t::/*const_ */iterator it = equi_map.find(e);
+    if (it == equi_map.end()) {
+        return false;
     }
     return true;
-  }
-
-	static
-	bool
-	is_register (const equi_t &eq)
-	{
-		return eq.size () == 1;
-	}
-	
-	static 
-	int 
-	count_level (const char *s, char c)
-	{
-		int i;
-		int counter = 0;
-		for (i = 0; s[i] != '\0'; ++i) {
-			if (s[i] == c)
-				++counter;
-		}
-		return counter;
-	}
-	
-	const char* 
-  get_name (const equi_t& e)
-	{
-		equi_t::const_iterator top_iter = e.begin ();
+}
+
+
+static bool is_register(const equi_t & eq) {
+    return eq.size() == 1;
+}
+
+static int count_level(const char * s, char c) {
+    int i;
+    int counter = 0;
+    for (i = 0; s[i] != '\0'; ++i) {
+        if (s[i] == c) {
+            ++counter;
+        }
+    }
+    return counter;
+}
+
+
+const char * get_name(const equi_t & e) {
+    equi_t::const_iterator top_iter = e.begin();
 #ifdef CONFIG_DEBUG
-		if (top_iter == e.end ()) {
-			cerr << "Internal error : no signal in " << e << endl;
-			exit (25);
-		}
-		if (top_iter->object == NULL) {
-			cerr << "Internal error : no object bound to ";
-			cerr << *top_iter;
-			cerr << endl;
-			exit (26);
-		}
-		if (top_iter->object->name () == NULL) {
-			cerr << "Internal error : signal has no name.\n";
-			cerr << *top_iter;
-			cerr << endl;
-		}
-#endif
-		int top_level = count_level (top_iter->object->name (),'.');
-		equi_t::const_iterator i;
-		for (i = ++(e.begin ()); i != e.end (); ++i) {
-			int current_level = count_level (i->object->name (),'.');
-			if (current_level < top_level) {
-				top_iter = i;
-				top_level = current_level;
-			}
-		}
+    if (top_iter == e.end()) {
+        cerr << "Internal error : no signal in " << e << endl;
+        exit(25);
+    }
+    if (top_iter->object == NULL) {
+        cerr << "Internal error : no object bound to ";
+        cerr << *top_iter;
+        cerr << endl;
+        exit(26);
+    }
+    if (top_iter->object->name() == NULL) {
+        cerr << "Internal error : signal has no name.\n";
+        cerr << *top_iter;
+        cerr << endl;
+    }
+#endif
+    int top_level = count_level(top_iter->object->name(), '.');
+    equi_t::const_iterator i;
+    for (i = ++(e.begin()); i != e.end(); ++i) {
+        int current_level = count_level(i->object->name(), '.');
+        if (current_level < top_level) {
+            top_iter = i;
+            top_level = current_level;
+        }
+    }
 #if 0
-		cerr << "get_name of " << e;
-		cerr << " return " << top_iter->object->name () << endl;
-#endif
-		return top_iter->object->name ();
-	}
-	
-	const char* 
-  get_name (const tab_t *pointer)
-	{
-		return get_name (get_equi (pointer));
-	}
-
-	static 
-  const sc_module& 
-  get_module (const string &s)
-	{
-	  instances_set_t::iterator i;
-  	for (i = instances_set.begin (); i != instances_set.end (); ++i) {
-    	if (strcmp ((*i)->name (), s.c_str ()) == 0)
-				return **i;
-		}
-		cerr << "Internal error : get_module\n";
-		exit (27);
-	}
-		
-  template<typename T> static 
-	equi_list_t::iterator get_equi (T &e)
-  {
-    entity2equi_it_t::iterator it = equi_map.find (entity(e));
-    if (it == equi_map.end())
-    {
-//      cerr << "Internal error : get_equi (T &)";
-      return equi_list.end ();         
+    cerr << "get_name of " << e;
+    cerr << " return " << top_iter->object->name() << endl;
+#endif
+    return top_iter->object->name();
+}
+
+
+const char *get_name(const tab_t * pointer) {
+    return get_name(get_equi(pointer));
+}
+
+
+static const sc_module & get_module(const string & s) {
+    instances_set_t::iterator i;
+    for (i = instances_set.begin(); i != instances_set.end(); ++i) {
+        if (strcmp((*i)->name(), s.c_str()) == 0) {
+            return **i;
+        }
+    }
+    cerr << "Internal error : get_module\n";
+    exit(27);
+}
+
+
+template < typename T > static equi_list_t::iterator get_equi(T & e) {
+    entity2equi_it_t::iterator it = equi_map.find(entity(e));
+    if (it == equi_map.end()) {
+        return equi_list.end();
     }
     return it->second;
-  }
-
-  template<typename T> static
-  void 
-  add_equi (equi_list_t::iterator &x, T &y)
-  {
+}
+
+
+template < typename T > static void add_equi(equi_list_t::iterator & x, T & y) {
     entity e(y);
-    x->push_back (e);
+    x->push_back(e);
     equi_map[e] = x;
-  }
- 
-  template<typename T> static
-  equi_list_t::iterator 
-  new_equi (T &x) /* parameter is not 'const' because we need to modify pointer port/signal at end of elaboration step */
-  {
-    equi_list_t::iterator it = equi_list.insert (equi_list.begin (),equi_t(1,entity(x)));
+}
+
+
+template < typename T > static
+equi_list_t::iterator new_equi(T & x) { /* parameter is not 'const' because we need to modify pointer port/signal at end of elaboration step */
+    equi_list_t::iterator it = equi_list.insert(equi_list.begin(), equi_t(1, entity(x)));
     equi_map[entity(x)] = it;
     return it;
-  }
-
-  // sort by number of connected ports	bound to the signal
-	static
-	int 
-  operator<(const equi_t &e1, const equi_t &e2) 
-	{ 
-		return (e1.size() < e2.size ());
-	}
-
-	// sort by data size
-/*	
-	int operator<(const equi_t &e1, const equi_t &e2) 
-	{ 
-		return (e1.begin()->data_size () < e2.begin()->data_size ());
-	}
-*/	
-	// random sort
-/*	
-	int operator<(const equi_t &e1, const equi_t &e2) 
-	{ 
-	typedef std::map<const equi_t*,int> m_t;
-	static m_t m;
-		if (m[&e1] == 0)
-			m[&e1] = rand ();
-		if (m[&e2] == 0)
-			m[&e2] = rand ();
-		return m[&e1] < m[&e2]; 
-	}
-*/
-  void sort_equi_list ()
-  {
-		//load ();
-    equi_list.sort ();
+}
+
+
+// sort by number of connected ports  bound to the signal
+static int operator <(const equi_t & e1, const equi_t & e2) {
+    return (e1.size() < e2.size());
+}
+
+// sort by data size
+/*
+    int operator<(const equi_t &e1, const equi_t &e2) 
+    { 
+    return (e1.begin()->data_size () < e2.begin()->data_size ());
+    }
+    */
+// random sort
+/*
+    int operator<(const equi_t &e1, const equi_t &e2) 
+    { 
+    typedef std::map<const equi_t*,int> m_t;
+    static m_t m;
+    if (m[&e1] == 0)
+    m[&e1] = rand ();
+    if (m[&e2] == 0)
+    m[&e2] = rand ();
+    return m[&e1] < m[&e2]; 
+    }
+    */
+
+void sort_equi_list() {
+    //load ();
+    equi_list.sort();
     //equi_list.reverse ();
-	}
-	
+}
+
+
 #if defined(DUMP_SIGNAL_STATS)
-	static unsigned int equi_real_size;
-#endif
-
-  unsigned int 
-  get_sizeof_signals_table ()
-  {
+static unsigned int equi_real_size;
+#endif
+
+unsigned int get_sizeof_signals_table() {
     equi_list_t::iterator i;
     int table_size = 0;
-		//cerr << "external table includes :\n";
-    for (i = equi_list.begin (); i != equi_list.end (); ++i) {
-			if (get_out_port (*i))
-				continue;
-			if (get_signal (*i))
-				continue;
-			//cerr << get_name (*i) << " ";
-      const entity &ent = *(i->begin());
-      int     data_size = ent.data_size_in_bytes();
-      int     number_of_part = ((data_size - 1) / sizeof(tab_t)) + 1;
-			table_size += number_of_part;
-		}
+    //cerr << "external table includes :\n";
+    for (i = equi_list.begin(); i != equi_list.end(); ++i) {
+        if (get_out_port(*i)) {
+            continue;
+        }
+        if (get_signal(*i)) {
+            continue;
+        }
+        //cerr << get_name (*i) << " ";
+        const entity & ent = *(i->begin());
+        int data_size = ent.data_size_in_bytes();
+        int number_of_part = ((data_size - 1) / sizeof(tab_t)) + 1;
+        table_size += number_of_part;
+    }
     return table_size;
-  }
-
-  void 
-  create_signals_table ()
-  {
-    if (dump_stage)
-  		cerr << "Allocating signals table.\n";
-		//cerr << "\n";
-    unsigned int table_size = get_sizeof_signals_table ();
-		equi_table = new tab_t[table_size]; //(0xCD);
+}
+
+
+void create_signals_table() {
+    if (dump_stage) {
+        cerr << "Allocating signals table.\n";
+    }
+    unsigned int table_size = get_sizeof_signals_table();
+    equi_table = new tab_t[table_size]; //(0xCD);
 #if defined(DUMP_SIGNAL_STATS)
-		equi_real_size = table_size;
+    equi_real_size = table_size;
 #endif
 #if defined(INIT_SIGNALS_TO_ZERO)
-		memset (equi_table, 0, sizeof (tab_t) * table_size);
+    memset(equi_table, 0, sizeof(tab_t) * table_size);
 #else
-		memset (equi_table, 0xCD, sizeof (tab_t) * table_size);		
-#endif
-  }
-
-	static
-  void 
-  bind_equi_to_table (equi_t &e, tab_t * const pointer)
-  {
+    memset(equi_table, 0xCD, sizeof(tab_t) * table_size);
+#endif
+}
+
+
+static void bind_equi_to_table(equi_t & e, tab_t * const pointer) {
     assert(pointer != NULL);
     equi_t::iterator i;
-    for (i = e.begin (); i != e.end (); ++i) {
-      sc_interface *const inter = i->interface;
-      inter->set_pointer (pointer);
-      // We can't initialize data to zero there 
-      // because we can't write the right amount of bits.
-      // It may produce some segmentation fault errors.
-      // The pointer is aligned to 32 bits.
-    }
-  }
-  
-  void 
-  bind_to_table ()
-  {
-    if (dump_stage)
-  		cerr << "Binding ports/signals to the table.\n";
+    for (i = e.begin(); i != e.end(); ++i) {
+        sc_interface *const inter = i->interface;
+        inter->set_pointer(pointer);
+        // We can't initialize data to zero there 
+        // because we can't write the right amount of bits.
+        // It may produce some segmentation fault errors.
+        // The pointer is aligned to 32 bits.
+    }
+}
+
+
+void bind_to_table() {
+    if (dump_stage) {
+        cerr << "Binding ports/signals to the table.\n";
+    }
     equi_list_t::iterator i;
     int index = 0;
-    for (i = equi_list.begin (); i != equi_list.end (); ++i) 		{
-			sc_interface *out = get_out_port (*i);
-			if (out) {
-				bind_equi_to_table (*i, out->get_pointer ());
-			} else {
-				sc_interface *reg = get_signal (*i);
-				if (reg == NULL)
-          reg = get_localvar (*i);
-			 	if (reg) {
-          bind_equi_to_table (*i, reg->get_pointer ());
-				} else {
-	      	bind_equi_to_table (*i, &(equi_table[index]));
-				  index += (i->begin()->data_size_in_bytes() - 1) / sizeof(tab_t) + 1;
-				}
-			}
-    }
-  }
-
-  ostream& 
-  operator << (ostream &o, const entity &e)
-  {
+    for (i = equi_list.begin(); i != equi_list.end(); ++i) {
+        sc_interface *out = get_out_port(*i);
+        if (out) {
+            bind_equi_to_table(*i, out->get_pointer());
+        }
+        else {
+            sc_interface * reg = get_signal(*i);
+            if (reg == NULL) {
+                reg = get_localvar(*i);
+            }
+            if (reg) {
+                bind_equi_to_table(*i, reg->get_pointer());
+            }
+            else {
+                bind_equi_to_table(*i, &(equi_table[index]));
+                index += (i->begin()->data_size_in_bytes() - 1) / sizeof(tab_t) + 1;
+            }
+        }
+    }
+}
+
+
+ostream & operator <<(ostream & o, const entity & e) {
 #if 0
     o << "entity (";
     if (e.object)
-      o << e.object->name ();
+        o << e.object->name();
     else
-      o << "no object";
+        o << "no object";
     if (e.interface)
-      o << ", pointer = 0x" << hex << e.interface->get_pointer ();
+        o << ", pointer = 0x" << hex << e.interface->get_pointer();
     else
-      o << ", no interface";
+        o << ", no interface";
     o << ")";
 #else
-   assert(e.object != NULL); 
-   o << e.object->name ();
+    assert(e.object != NULL);
+    o << e.object->name();
 #endif
     return o;
-  }
-  
-  ostream& 
-  operator << (ostream &o, const equi_t &e)
-  {
+}
+
+ostream & operator <<(ostream & o, const equi_t & e) {
     bool nb = 0;
     equi_t::const_iterator i;
-    for (i = e.begin (); i != e.end (); ++i) {
-      const entity &ity = *i;
-      o << ((nb++)?" = ":"") << ity;
-    }	  
+    for (i = e.begin(); i != e.end(); ++i) {
+        const entity & ity = *i;
+        o << ((nb++) ? " = " : "") << ity;
+    }
     return o;
-  }
-  
-  void 
-  print_table (ostream &o)
-  {
-    o << "Signal list\n"
-      << "-----------\n";
+}
+
+
+void print_table(ostream & o) {
+    o << "Signal list\n" << "-----------\n";
     equi_list_t::const_iterator i;
-    for (i = equi_list.begin (); i != equi_list.end (); ++i) {
-      const equi_t &eq = *i;
+    for (i = equi_list.begin(); i != equi_list.end(); ++i) {
+        const equi_t & eq = *i;
 #if 0
-      o << i->begin()->interface->get_pointer () << " : ";
-	    o << (*i);
-	    o << "\n";
+        o << i->begin()->interface->get_pointer() << " : ";
+        o << (*i);
+        o << "\n";
 #else
-      o << "(" << get_name (eq) << ") <=> " << eq << ".\n";
-#endif
-    }
-	}
-
-	void
-  print_table_stats (ostream &o)
-  {
+        o << "(" << get_name(eq) << ") <=> " << eq << ".\n";
+#endif
+    }
+}
+
+void print_table_stats(ostream & o) {
 #if defined(DUMP_SIGNAL_STATS)
-		int nb_reg = 0;
-		int nb_sig = 0;
-		int real_size = 0;
-		
-		// count
+    int nb_reg = 0;
+    int nb_sig = 0;
+    int real_size = 0;
+
+    // count
     equi_list_t::const_iterator i;
-		int num;
-    for (num = 0, i = equi_list.begin (); i != equi_list.end (); ++num, ++i) {
-	    if (is_register (*i))
-				++nb_reg;
-			else
-				++nb_sig;
-    }
-		
-		// print results
-		o << "Statistics :\n";
-		o << "#registers : " << nb_reg << endl;
-		o << "#signals : " << nb_sig << endl;
-		o << "current table size : " << equi_real_size << endl;
-#endif
-	}
+    int num;
+    for (num = 0, i = equi_list.begin(); i != equi_list.end(); ++num, ++i) {
+        if (is_register(*i)) {
+            ++nb_reg;
+        }
+        else {
+            ++nb_sig;
+        }
+    }
+
+    // print results
+    o << "Statistics :\n";
+    o << "#registers : " << nb_reg << endl;
+    o << "#signals : " << nb_sig << endl;
+    o << "current table size : " << equi_real_size << endl;
+#endif
+}
+
 
 #ifdef DUMP_SIGNAL_STATS
-typedef map<tab_t*,long long int> counter_t;
-static counter_t  counter;
+typedef map < tab_t *, long long int > counter_t;
+static counter_t counter;
 long long int unnecessary = 0;
 long long int total_assig = 0;
 #endif
 
-const char* 
-get_module_name (const equi_t &eq)
-{
-	if (!is_register (eq)) {
-	/*
-		cerr << "get_module_name doesn't work yet upon non-register.\n";
-		
-	const sc_port_base &port = *(i->port);
-	const sc_module &module = port.get_module ();
-	*/
-		return "top_level";
-	}
-	const entity &ent = *(eq.begin ());
+const char * get_module_name(const equi_t & eq) {
+    if (!is_register(eq)) {
+        /*
+        cerr << "get_module_name doesn't work yet upon non-register.\n";
+        */
+        return "top_level";
+    }
+    const entity & ent = *(eq.begin());
+
 #ifdef CONFIG_DEBUG
-	if (ent.type != sc_core::entity::SIGNAL)
-		exit(28);
-#endif
-	// get module name from sc_signal used like a register
-	const char *sig_name = ent.object->name ();
-	const char *sep  = strchr (sig_name,'.');
+    if (ent.type != sc_core::entity::SIGNAL) {
+        exit(28);
+    }
+#endif
+
+    // get module name from sc_signal used like a register
+    const char * sig_name = ent.object->name();
+    const char * sep = strchr(sig_name, '.');
+
 #ifdef CONFIG_DEBUG
-	if (sep == NULL) {
-		exit (30);
-	}
-#endif
-	int end_pos = sep - sig_name;
-	string module_name (sig_name, end_pos);
-	// can't return the char* pointer from string since it will be invalid.
-	return get_module (module_name).name ();
-}
-
-static 
-void 
-merge_equi (equi_list_t::iterator &x, equi_list_t::iterator &y)
-{
-  equi_t::iterator i;
-  equi_t &y2 = *y;
-  for (i = y2.begin(); i != y2.end(); ++i)
-  {
-    entity &e = *i;
-    equi_map[e] = x;
-  }
-
-  x->merge  (*y);
-  equi_list.erase (y);
-}
- 
+    if (sep == NULL) {
+        exit(30);
+    }
+#endif
+
+    int end_pos = sep - sig_name;
+    string module_name(sig_name, end_pos);
+    // can't return the char* pointer from string since it will be invalid.
+    return get_module(module_name).name();
+}
+
+
+static void merge_equi(equi_list_t::iterator & x, equi_list_t::iterator & y) {
+    equi_t::iterator i;
+    equi_t & y2 = *y;
+    for (i = y2.begin(); i != y2.end(); ++i) {
+        entity & e = *i;
+        equi_map[e] = x;
+    }
+
+    x->merge(*y);
+    equi_list.erase(y);
+}
+
+
 // sort by data size
 #ifdef DATASIZE_SORT
-int 
-operator<(const equi_t &e1, const equi_t &e2) 
-{ 
-	return (e1.begin()->data_size () < e2.begin()->data_size ());
-}
-#endif
+int operator< (const equi_t & e1, const equi_t & e2) {
+    return (e1.begin()->data_size() < e2.begin()->data_size());
+}
+#endif
+
 
 // random sort
 #ifdef RANDOM_SORT
-int 
-operator<(const equi_t &e1, const equi_t &e2) 
-{ 
-typedef std::map<const equi_t*,int> m_t;
-static m_t m;
-	if (m[&e1] == 0)
-		m[&e1] = rand ();
-	if (m[&e2] == 0)
-		m[&e2] = rand ();
-	return m[&e1] < m[&e2]; 
-}
-#endif
+int operator< (const equi_t & e1, const equi_t & e2) {
+    typedef std::map < const equi_t *, int > m_t;
+    static m_t m;
+    if (m[&e1] == 0) {
+        m[&e1] = rand();
+    }
+    if (m[&e2] == 0) {
+        m[&e2] = rand();
+    }
+    return m[&e1] < m[&e2];
+}
+#endif
+
 
 #if defined(DUMP_SIGNAL_STATS)
@@ -602,74 +566,90 @@
 #endif
 
-void 
-bind (sc_signal_base &x)
-{
-#if 0 
-//defined(CONFIG_DEBUG)
-  equi_list_t::iterator x_equi = get_equi (x);
-  if ((x_equi != equi_list.end())) {
-    cerr << "Internal error : Signal already in the table\n";
-    return;
-  }
-#endif
-  new_equi (x);
-}
-
-void 
-bind (sc_port_base &x)
-{
-  new_equi (x);
-}
-
-template <typename T> static
-void 
-test_before_bind (sc_port_base& p1,T& p2)
-{
-	bool t1 = (p1.kind () != NULL);
-	bool t2 = (p2.kind () != NULL);
-	if (t1 && t2)
-		return;
-	if (t1 == true)
-		cerr << "Trying to bind '" << p1.name() << "' to an unknown type.\n";
-	else if (t2 == true)
-		cerr << "Trying to bind '" << p2.name() << "' to an unknown type.\n";
-	else
-		cerr << "Binding failed. Please check the netlist description.\n";
-	exit (20040525);
-}
-
-template <typename T> static
-void 
-tbind (sc_port_base &x,T &y)
-{
-//  assert(x.get_pointer () != NULL); // x pointer may be NULL
-//  assert(y.get_pointer () != NULL); // y pointer may be NULL
-  equi_list_t::iterator x_equi = get_equi (x);
-  equi_list_t::iterator y_equi = get_equi (y);
-  if ((x_equi != equi_list.end()) && (y_equi != equi_list.end())) {
-    // 2 equipotentials are equals
-    merge_equi (x_equi, y_equi);
-  } else if ((x_equi != equi_list.end())) {
-    // add y
-    add_equi (x_equi,y);
-  } else if ((y_equi != equi_list.end())) {
-    // add y
-    add_equi (y_equi,x);
-  } else {
-    // add a new equi
-    x_equi = new_equi (x);
-    add_equi (x_equi, y);
-  }
-}
-
-void 
-bind (sc_port_base& p1,sc_port_base& p2)
-{ test_before_bind (p1, p2); tbind (p1, p2); }
-
-void 
-bind (sc_port_base& p1,sc_signal_base& s1)
-{ test_before_bind (p1, s1); tbind (p1, s1); }
+
+void bind(sc_signal_base & x) {
+#if 0
+    //defined(CONFIG_DEBUG)
+    equi_list_t::iterator x_equi = get_equi(x);
+    if ((x_equi != equi_list.end())) {
+        cerr << "Internal error : Signal already in the table\n";
+        return;
+    }
+#endif
+    new_equi(x);
+}
+
+
+void bind(sc_port_base & x) {
+    new_equi(x);
+}
+
+
+template < typename T > static void test_before_bind(sc_port_base & p1, T & p2) {
+    bool t1 = (p1.kind() != NULL);
+    bool t2 = (p2.kind() != NULL);
+    if (t1 && t2) {
+        return;
+    }
+    if (t1 == true) {
+        cerr << "Trying to bind '" << p1.name() << "' to an unknown type.\n";
+    }
+    else if (t2 == true) {
+        cerr << "Trying to bind '" << p2.name() << "' to an unknown type.\n";
+    }
+    else {
+        cerr << "Binding failed. Please check the netlist description.\n";
+    }
+    exit(20040525);
+}
+
+
+template < typename T > static void tbind(sc_port_base & x, T & y) {
+    // assert(x.get_pointer () != NULL); // x pointer may be NULL
+    // assert(y.get_pointer () != NULL); // y pointer may be NULL
+    equi_list_t::iterator x_equi = get_equi(x);
+    equi_list_t::iterator y_equi = get_equi(y);
+    if ((x_equi != equi_list.end()) && (y_equi != equi_list.end())) {
+        // 2 equipotentials are equals
+        merge_equi(x_equi, y_equi);
+    }
+    else if ((x_equi != equi_list.end())) {
+        // add y
+        add_equi(x_equi, y);
+    }
+    else if ((y_equi != equi_list.end())) {
+        // add y
+        add_equi(y_equi, x);
+    }
+    else {
+        // add a new equi
+        x_equi = new_equi(x);
+        add_equi(x_equi, y);
+    }
+}
+
+
+void bind(sc_port_base & p1, sc_port_base & p2) {
+    test_before_bind(p1, p2);
+    tbind(p1, p2);
+}
+
+
+void bind(sc_port_base & p1, sc_signal_base & s1) {
+    test_before_bind(p1, s1);
+    tbind(p1, s1);
+}
 
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/entity.h
===================================================================
--- /sources/src/entity.h	(revision 51)
+++ /sources/src/entity.h	(revision 52)
@@ -1,14 +1,14 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                   entity.h                        |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                           Taktak Sami                       |
-|                                                             |
-| Date    :                   09_07_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                   entity.h                        |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                           Taktak Sami                       |
+  |                                                             |
+  | Date    :                   09_07_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 #ifndef __ENTITY_H__
 #define __ENTITY_H__
@@ -22,55 +22,84 @@
 namespace sc_core {
 
-  // Entity class
-  struct entity {
+// Entity class
+struct entity {
     enum { SIGNAL, PORT } type;
-    union { // port & signal aren't const because we need to modify
-            // some fields in elaboration step.
-      sc_port_base   *port;
-      sc_signal_base *signal;
-		};
-    sc_object      *object;
-    sc_interface   *interface;
-//    tab_t          *pointer;
-    bool operator == (const sc_port_base &port_)
-    { return (type == PORT) && (&port_ == port); }
-    bool operator == (const sc_signal_base &signal_)
-    { return (type == SIGNAL) && (&signal_ == signal); }
-    bool operator < (const entity &e_) const
-    { return (void*) this < (void*) &e_; } // casting to "unsigned int" causes warnings
-		const char *kind () const
-		{ return object->kind (); }
-		size_t      data_size_in_bytes () const
-		{ return interface->data_size_in_bytes (); }
-    entity (/*const*/ sc_port_base &port_)
-    { type = PORT; port = &port_; object = &port_; interface = &port_; }
-    entity (/*const*/ sc_signal_base &signal_)
-    { type = SIGNAL; signal = &signal_; object = &signal_; interface = &signal_; }
-  };
+    union {
+        // port & signal aren't const because we need to modify
+        // some fields in elaboration step.
+        sc_port_base * port;
+        sc_signal_base * signal;
+    };
+    sc_object * object;
+    sc_interface * interface;
+    bool operator ==(const sc_port_base & port_) {
+        return (type == PORT) && (&port_ == port);
+    }
 
-  // list
-  typedef std::list<entity>   equi_t;
-  typedef std::list<equi_t>   equi_list_t;
+    bool operator ==(const sc_signal_base & signal_) {
+        return (type == SIGNAL) && (&signal_ == signal);
+    }
 
-  // Miscellanous functions
-  equi_t&     get_equi        (const sc_interface &);
-	equi_t&     get_equi        (const tab_t *pointer);
-	bool        has_equi        (/*const*/ sc_port_base &);
-	equi_t&     merge_equi      (const tab_t *pointer);
-	sc_port_base *get_out_port  (const equi_t&);
-	const char *get_name        (const equi_t&);
-  const char* get_module_name (const equi_t &);
-  std::ostream& operator <<   (std::ostream &, const equi_t &);
-  std::ostream& operator <<   (std::ostream &, const entity &);
+    bool operator <(const entity & e_) const {
+        return (void *) this < (void *) &e_;
+    } // casting to "unsigned int" causes warnings
 
-  const equi_list_t &get_equi_list           ();
-  int                get_signal_table_size   ();
+    const char * kind() const {
+        return object->kind();
+    }
 
-  // Bind functions
-  void bind (sc_port_base& p1,sc_port_base& p2);
-  void bind (sc_port_base& p1,sc_signal_base& s1);
+    size_t data_size_in_bytes() const {
+        return interface->data_size_in_bytes();
+    }
+
+    entity(/*const */sc_port_base & port_) {
+        type = PORT;
+        port = &port_;
+        object = &port_;
+        interface = &port_;
+    }
+
+    entity(/*const */sc_signal_base & signal_) {
+        type = SIGNAL;
+        signal = &signal_;
+        object = &signal_;
+        interface = &signal_;
+    }
+};
+
+// list
+typedef std::list < entity > equi_t;
+typedef std::list < equi_t > equi_list_t;
+
+// Miscellanous functions
+equi_t & get_equi(const sc_interface &);
+equi_t & get_equi(const tab_t * pointer);
+bool has_equi(/*const */sc_port_base &);
+equi_t & merge_equi(const tab_t * pointer);
+sc_port_base * get_out_port(const equi_t &);
+const char * get_name(const equi_t &);
+const char * get_module_name(const equi_t &);
+std::ostream & operator <<(std::ostream &, const equi_t &);
+std::ostream & operator <<(std::ostream &, const entity &);
+
+const equi_list_t & get_equi_list();
+int get_signal_table_size();
+
+// Bind functions
+void bind(sc_port_base & p1, sc_port_base & p2);
+void bind(sc_port_base & p1, sc_signal_base & s1);
 
 } // end of sc_core namespace
- 
+
 #endif /* __ENTITY_H__ */
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
Index: /sources/src/gen_code.cc
===================================================================
--- /sources/src/gen_code.cc	(revision 51)
+++ /sources/src/gen_code.cc	(revision 52)
@@ -1,14 +1,14 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                 gen_code.cc                       |
-|                                                             |
-| Author  :                 Taktak Sami                       |
-|                           Buchmann Richard                  |
-|                                                             |
-| Date    :                   09_07_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                 gen_code.cc                       |
+  |                                                             |
+  | Author  :                 Taktak Sami                       |
+  |                           Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   09_07_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -34,4 +34,5 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
+
 #if defined(__linux__)
 #include <linux/limits.h>
@@ -39,4 +40,5 @@
 #include <windows.h>
 #endif
+
 #include <cstring>
 #include <cstdio>
@@ -50,4 +52,5 @@
 #include "sc_ver.h"
 #include "process_dependency.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -67,437 +70,399 @@
 namespace sc_core {
 
-static void PrintCall(std::ostream&, const method_process_t &);
-static void open_temp(std::ofstream&, char *);
+static void PrintCall(std::ostream &, const method_process_t &);
+static void open_temp(std::ofstream &, char *);
 typedef void (*CASC_ENTRY_FUNC) (void *);
-typedef union { unsigned long long int integer; SC_ENTRY_FUNC pmf; CASC_ENTRY_FUNC pf; } fct;
-
-const char *
-get_pmf_type ()
-{
-  switch (sizeof (SC_ENTRY_FUNC)) {
-  case 4:
-    // G4 pointer-to-member-function style
-    return "unsigned long int";
-  case 8:
-    // PC pointer-to-member-function style
-    return "unsigned long long int";
-  default:
-    cerr << "Internal Error : Unsupported pointer-to-member-function"
-            "(size: " << sizeof (SC_ENTRY_FUNC) << ").\n"
-            "Please try --nodynamiclink option.\n";
-    exit(21072009);
-  };
-}
-
-static
-ostream& operator << (ostream &o, const SC_ENTRY_FUNC &f)
-{
-  register fct p;
-  p.integer = 0;
-  p.pmf = f;
-  return o << "0x" << hex << p.integer << "ULL";
-}
-
-static 
-void
-PrintCall         (std::ostream           &o,
-                   const method_process_t &m)
-{
-  SC_ENTRY_FUNC func  = m.func;
-  if (print_schedule)
-    o << "    fprintf(stderr,\"evaluation de "
-      << m.module->name() << "->" << m.name << "()\\n\");\n";
-  o << " p.integer = " << func << ";\n";
+typedef union {
+    unsigned long long int integer;
+    SC_ENTRY_FUNC pmf;
+    CASC_ENTRY_FUNC pf;
+} fct;
+
+
+const char * get_pmf_type() {
+    switch (sizeof(SC_ENTRY_FUNC)) {
+        case 4:
+            // G4 pointer-to-member-function style
+            return "unsigned long int";
+        case 8:
+            // PC pointer-to-member-function style
+            return "unsigned long long int";
+        default:
+            cerr <<
+                "Internal Error : Unsupported pointer-to-member-function"
+                "(size: " << sizeof(SC_ENTRY_FUNC) << ").\n"
+                "Please try --nodynamiclink option.\n";
+            exit(21072009);
+    };
+}
+
+
+static ostream & operator <<(ostream & o, const SC_ENTRY_FUNC & f) {
+    register fct p;
+    p.integer = 0;
+    p.pmf = f;
+    return o << "0x" << hex << p.integer << "ULL";
+}
+
+
+static void PrintCall(std::ostream & o, const method_process_t & m) {
+    SC_ENTRY_FUNC func = m.func;
+    if (print_schedule) {
+        o << "    fprintf(stderr,\"evaluation de " << m.module->name() << "->" << m.name << "()\\n\");\n";
+    }
+    o << " p.integer = " << func << ";\n";
 #ifdef CPP_CALL
-  o << " (((sc_module*)(" << m.module << "))->*(p.pmf)) (); /* " 
-    << m.module->name () << "->" << m.name << "() */\n";
+    o << " (((sc_module*)(" << m.module << "))->*(p.pmf)) (); /* " << m.module->name() << "->" << m.name << "() */\n";
 #else
-  o << " p.pf((void *)" 
-    << m.module << "); /* " 
-    << m.module->name () << "->" << m.name << "() */\n";
-#endif
-}
-
-static
-bool
-is_exist (const char *temp)
-{
-#if 0
-  cerr << "testing " << temp << "\n";
-#endif
-  ifstream o;
-  o.open (temp,ios::in);
-  if (o.is_open () == false)
-    return false;
-#if 0
-  cerr << "opened\n";
-  cerr << "peek : " << (int) o.peek() << endl;
-#endif
-  if (o.peek () == -1)
-    return false;
-  return true;
-}
-
-static 
-void
-open_temp          (ofstream &o,
-                    char     *temp)
-{
-/*
-  srand (time (NULL));
-    int r = rand () % 1000;
-*/
-  pid_t pid = getpid();
-  int r = -1;
-  do {
-    sprintf (temp, "%s/scheduling-%d-%x.cc", temporary_dir, pid, ++r);
-  } while (is_exist (temp));
-
-  o.open (temp,ios::out);
-  if (o.is_open () == false)
-  {
-    cerr << "Error : Unable to open a file to write scheduling code.\n";
-    exit (30032005);
-  }
-
+    o << " p.pf((void *)" << m.module << "); /* " << m.module->name() << "->" << m.name << "() */\n";
+#endif
+}
+
+
+static bool is_exist(const char * temp) {
+    ifstream o;
+    o.open(temp, ios::in);
+    if (o.is_open() == false) {
+        return false;
+    }
+    if (o.peek() == -1) {
+        return false;
+    }
+    return true;
+}
+
+
+static void open_temp(ofstream & o, char * temp) {
+    /*
+       srand (time (NULL));
+       int r = rand () % 1000;
+       */
+    pid_t pid = getpid();
+    int r = -1;
+    do {
+        sprintf(temp, "%s/scheduling-%d-%x.cc", temporary_dir, pid, ++r);
+    } while (is_exist(temp));
+
+    o.open(temp, ios::out);
+    if (o.is_open() == false) {
+        cerr << "Error : Unable to open a file to write scheduling code.\n";
+        exit(30032005);
+    }
 #ifdef CONFIG_DEBUG
-  cerr << "opened temporary filename : " << temp << "\n";
-#endif
-  
-  sprintf (temp, "scheduling-%d-%x", pid, r++);
-}
-
-static
-char *
-gen_transition (ofstream              &o,
-                method_process_list_t &transition_func_list)
-{
-  // transitions
-  o << "\ninline void transition(void)\n{\n";
-  if (transition_func_list.empty () == false) {
-    o << " /* fonctions de transition */\n"
-      << " register fct p;\n";
-    method_process_list_t::iterator mm;
-    for( mm = transition_func_list.begin(); mm != transition_func_list.end(); ++mm)
-    {
-      PrintCall (o, **mm);
-    }
-  }
-  o << "}\n";
-}
-
-static
-char *
-gen_moore (ofstream              &o,
-           method_process_list_t &moore_func_list)
-{
-  // Moore generations (sequential functions)
-  o << "\ninline void moore_generation (void)\n{\n";
-  if (moore_func_list.empty () == false) {
-    o << "  /* fonctions de generation de Moore */\n"
-      << " register fct p;\n";
-    method_process_list_t::reverse_iterator mm;
-    for( mm = moore_func_list.rbegin(); mm != moore_func_list.rend(); ++mm)
-    {
-      PrintCall (o, **mm);
-    }
-  }
-  o << " \n}\n";
-}
-
-static
-char *
-gen_mealy (ofstream                &o,
-           strong_component_list_t &strongcomponents)
-{
-  // Mealy generations (combinational functions only)
-  o << "\nextern void mealy_generation (void)\n{\n";
-  if (strongcomponents.empty ())
-    return NULL;
-   o << "  register fct p;\n"
-    << "\n\n  /* fonctions de mealy */\n";
+    cerr << "opened temporary filename : " << temp << "\n";
+#endif
+    sprintf(temp, "scheduling-%d-%x", pid, r++);
+}
+
+
+static char * gen_transition(ofstream & o, method_process_list_t & transition_func_list) {
+    // transitions
+    o << "\ninline void transition(void)\n{\n";
+    if (transition_func_list.empty() == false) {
+        o << " /* fonctions de transition */\n" << " register fct p;\n";
+        method_process_list_t::iterator mm;
+        for (mm = transition_func_list.begin(); mm != transition_func_list.end(); ++mm) {
+            PrintCall(o, **mm);
+        }
+    }
+    o << "}\n";
+}
+
+
+static char * gen_moore(ofstream & o, method_process_list_t & moore_func_list) {
+    // Moore generations (sequential functions)
+    o << "\ninline void moore_generation (void)\n{\n";
+    if (moore_func_list.empty() == false) {
+        o << "  /* fonctions de generation de Moore */\n"
+            << " register fct p;\n";
+        method_process_list_t::reverse_iterator mm;
+        for (mm = moore_func_list.rbegin();
+                mm != moore_func_list.rend(); ++mm) {
+            PrintCall(o, **mm);
+        }
+    }
+    o << " \n}\n";
+}
+
+
+static char * gen_mealy(ofstream & o, strong_component_list_t & strongcomponents) {
+    // Mealy generations (combinational functions only)
+    o << "\nextern void mealy_generation (void)\n{\n";
+    if (strongcomponents.empty()) {
+        return NULL;
+    }
+    o << "  register fct p;\n" << "\n\n  /* fonctions de mealy */\n";
 #ifdef NO_STATIC_SCHEDULE
-  o << "\n  do {\n    unstable = 0;\n";
-#endif
-  strong_component_list_t::iterator ss;
-  for ( ss = strongcomponents.begin(); ss != strongcomponents.end(); ++ss) {
-    if ( (*ss)->size() == 1) {
-      /* un seul element dans le strong component */
-      method_process_t *m = (method_process_t*)(*((*ss)->begin ()));
-      PrintCall (o, *m);
-      continue;
-    } else {
-      /* plusieurs elements dans le strong component */
+    o << "\n  do {\n    unstable = 0;\n";
+#endif
+    strong_component_list_t::iterator ss;
+    for (ss = strongcomponents.begin(); ss != strongcomponents.end(); ++ss) {
+        if ((*ss)->size() == 1) {
+            /* un seul element dans le strong component */
+            method_process_t *m = (method_process_t *) (*((*ss)->begin()));
+            PrintCall(o, *m);
+            continue;
+        }
+        else {
+            /* plusieurs elements dans le strong component */
 #ifndef NO_STATIC_SCHEDULE
-      o << "\n  do {\n    unstable = 0;\n";
-#endif
-      component_list_t::reverse_iterator rev_mm;
-      for( rev_mm = (*ss)->rbegin(); rev_mm != (*ss)->rend(); ++rev_mm) {
-        method_process_t *m = (method_process_t*) *rev_mm;
-        PrintCall (o, *m);
-      }
+            o << "\n  do {\n    unstable = 0;\n";
+#endif
+            component_list_t::reverse_iterator rev_mm;
+            for (rev_mm = (*ss)->rbegin(); rev_mm != (*ss)->rend(); ++rev_mm) {
+                method_process_t * m = (method_process_t *) * rev_mm;
+                PrintCall(o, *m);
+            }
 #ifndef NO_STATIC_SCHEDULE
-      o << "  } while ( unstable );\n\n";
-#endif
-    }
-  }
+            o << "  } while ( unstable );\n\n";
+#endif
+        }
+    }
 #ifdef NO_STATIC_SCHEDULE
-  o << "  } while ( unstable );\n\n";
+    o << "  } while ( unstable );\n\n";
 #else
-  o << "\tunstable = 0;\n";
-#endif
-}
-
-static
-char *
-gen_mealy (ofstream                &o,
-           ProcessDependencyList   &mealy_func_list)
-{
-  // Mealy generations (combinational functions only)
-  o << "\nextern void mealy_generation (void)\n{\n";
-  o << "  register fct p;\n"
-    << "\n\n  /* fonctions de mealy */\n";
-  ProcessDependencyList::iterator it;
-  for (it = mealy_func_list.begin(); it != mealy_func_list.end(); ++it)
-  {
-    const method_process_t *m = *it;
-    PrintCall (o, *m);
-  }
-}
-
-char *
-gen_scheduling_code_for_dynamic_link (
-               method_process_list_t           &transition_func_list,
-               method_process_list_t           &moore_func_list,
-               strong_component_list_t         &strongcomponents)
-{
-  if (dump_stage)
-    cerr << "Generating C code for scheduling...\n";
-
-  // open temporary file
-  ofstream o;
-  char base_name[PATH_MAX];
-  open_temp (o, base_name);
- 
-  if (! o.good ()) {
-    perror("scheduling: open file\n");
-    exit(-1);
-  }
-
-  o << "// generated by " << sc_version () << endl
-    << "#include <casc.h>\n\n"
-    << "#include <cstdio>\n\n"
-//  << "#include <iostream>\n\n"
-    << "namespace sc_core {\n"
-    << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n"
-    << " typedef void (*CASC_ENTRY_FUNC)(void *);\n";
-
-  const char *pmf_type = get_pmf_type ();
-
-  o << " typedef union { " 
-    << pmf_type 
-    << " integer; SC_ENTRY_FUNC pmf; CASC_ENTRY_FUNC pf; } fct;\n"; 
-  
-  gen_transition (o, transition_func_list);  
-  gen_moore      (o, moore_func_list);  
-  gen_mealy      (o, strongcomponents);
-
-  o << " \n}\n";
-  o << "\n} // end of sc_core namespace\n";
- 
-  o.flush ();
-  o.close ();
-
-  // add "cc" extension
-  char file_name[PATH_MAX];
-  strncpy(file_name, base_name, PATH_MAX);
-  file_name[strlen (base_name)] = '\0';
-  strcat(file_name, ".cc");
-  rename (base_name, file_name);
-  
-  if (edit_schedule)
-    run_schedule_editor (file_name);
-  
-  if (dump_stage)
-    cerr << "Generating C code for scheduling done.\n";
-
-  return strdup(base_name);
-}
-
-char *
-gen_scheduling_code_for_dynamic_link   (
-            method_process_list_t &transition_func_list,
-            method_process_list_t &moore_func_list,
-            ProcessDependencyList &mealy_func_list)
-{
-  if (dump_stage)
-    cerr << "Generating C code for scheduling...\n";
-
-  // open temporary file
-  ofstream o;
-  char base_name[PATH_MAX];
-  open_temp (o, base_name);
- 
-  if (! o.good ()) {
-    perror("scheduling: open file\n");
-    exit(-1);
-  }
-
-  o << "// generated by " << sc_version () << endl
-    << "#include <casc.h>\n\n"
-    << "#include <cstdio>\n\n"
-//    << "#include <iostream>\n\n"
-    << "namespace sc_core {\n"
-    << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n"
-    << " typedef void (*CASC_ENTRY_FUNC)(void *);\n"
-    << " typedef union { unsigned long long int integer; SC_ENTRY_FUNC pmf; CASC_ENTRY_FUNC pf; } fct;\n"; 
-  
-  gen_transition (o, transition_func_list);  
-  gen_moore      (o, moore_func_list);  
-  gen_mealy      (o, mealy_func_list);
-
-  o << "\n}\n";
-  o << "\n} // end of sc_core namespace\n";
- 
-  o.flush ();
-  o.close ();
-  
-  // add "cc" extension
-  char file_name[PATH_MAX];
-  strncpy(file_name, base_name, PATH_MAX);
-  file_name[strlen (base_name)] = '\0';
-  strcat(file_name, ".cc");
-  rename (base_name, file_name);
-
-  if (edit_schedule)
-    run_schedule_editor (file_name);
-
-  if (dump_stage)
-    cerr << "Generating C code for scheduling done.\n";
-  
-  return strdup(base_name);
-}
+    o << "\tunstable = 0;\n";
+#endif
+}
+
+
+static char * gen_mealy(ofstream & o, ProcessDependencyList & mealy_func_list) {
+    // Mealy generations (combinational functions only)
+    o << "\nextern void mealy_generation (void)\n{\n";
+    o << "  register fct p;\n" << "\n\n  /* fonctions de mealy */\n";
+    ProcessDependencyList::iterator it;
+    for (it = mealy_func_list.begin(); it != mealy_func_list.end(); ++it) {
+        const method_process_t * m = *it;
+        PrintCall(o, *m);
+    }
+}
+
+
+char * gen_scheduling_code_for_dynamic_link(method_process_list_t &
+        transition_func_list,
+        method_process_list_t &
+        moore_func_list,
+        strong_component_list_t &
+        strongcomponents) {
+    if (dump_stage) {
+        cerr << "Generating C code for scheduling...\n";
+    }
+
+    // open temporary file
+    ofstream o;
+    char base_name[PATH_MAX];
+    open_temp(o, base_name);
+
+    if (!o.good()) {
+        perror("scheduling: open file\n");
+        exit(-1);
+    }
+
+    o << "// generated by " << sc_version() << endl
+        << "#include <casc.h>\n\n" << "#include <cstdio>\n\n"
+        //  << "#include <iostream>\n\n"
+        << "namespace sc_core {\n"
+        << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n"
+        << " typedef void (*CASC_ENTRY_FUNC)(void *);\n";
+
+    const char * pmf_type = get_pmf_type();
+
+    o << " typedef union { "
+        << pmf_type
+        << " integer; SC_ENTRY_FUNC pmf; CASC_ENTRY_FUNC pf; } fct;\n";
+
+    gen_transition(o, transition_func_list);
+    gen_moore(o, moore_func_list);
+    gen_mealy(o, strongcomponents);
+
+    o << " \n}\n";
+    o << "\n} // end of sc_core namespace\n";
+
+    o.flush();
+    o.close();
+
+    // add "cc" extension
+    char file_name[PATH_MAX];
+    strncpy(file_name, base_name, PATH_MAX);
+    file_name[strlen(base_name)] = '\0';
+    strcat(file_name, ".cc");
+    rename(base_name, file_name);
+
+    if (edit_schedule) {
+        run_schedule_editor(file_name);
+    }
+
+    if (dump_stage) {
+        cerr << "Generating C code for scheduling done.\n";
+    }
+
+    return strdup(base_name);
+}
+
+
+char * gen_scheduling_code_for_dynamic_link(method_process_list_t &
+        transition_func_list,
+        method_process_list_t &
+        moore_func_list,
+        ProcessDependencyList &
+        mealy_func_list) {
+    if (dump_stage) {
+        cerr << "Generating C code for scheduling...\n";
+    }
+
+    // open temporary file
+    ofstream o;
+    char base_name[PATH_MAX];
+    open_temp(o, base_name);
+
+    if (!o.good()) {
+        perror("scheduling: open file\n");
+        exit(-1);
+    }
+
+    o << "// generated by " << sc_version() << endl
+        << "#include <casc.h>\n\n" << "#include <cstdio>\n\n"
+        << "namespace sc_core {\n"
+        << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n"
+        << " typedef void (*CASC_ENTRY_FUNC)(void *);\n"
+        <<
+        " typedef union { unsigned long long int integer; SC_ENTRY_FUNC pmf; CASC_ENTRY_FUNC pf; } fct;\n";
+
+    gen_transition(o, transition_func_list);
+    gen_moore(o, moore_func_list);
+    gen_mealy(o, mealy_func_list);
+
+    o << "\n}\n";
+    o << "\n} // end of sc_core namespace\n";
+
+    o.flush();
+    o.close();
+
+    // add "cc" extension
+    char file_name[PATH_MAX];
+    strncpy(file_name, base_name, PATH_MAX);
+    file_name[strlen(base_name)] = '\0';
+    strcat(file_name, ".cc");
+    rename(base_name, file_name);
+
+    if (edit_schedule) {
+        run_schedule_editor(file_name);
+    }
+
+    if (dump_stage) {
+        cerr << "Generating C code for scheduling done.\n";
+    }
+
+    return strdup(base_name);
+}
+
 
 /* base_name est la base du nom du fichier C++
  * casc_cflags est une string qui correspond à $(INCLUDE) d'un Makefile
  */
-void 
-compile_code          (const char *base_name, 
-                       const char *casc_cflags2) 
-{
-  if (dump_stage) 
-    cerr << "Compiling C/C++ code for scheduling...\n";
-  char compil_str[512];
-  const char *compiler = getenv ("CXX");
-  const char *systemc_dir = getenv ("SYSTEMCASS");
-//  const char *target_arch = getenv ("TARGET_ARCH");
-  const char *default_compiler =
+void compile_code(const char * base_name, const char * casc_cflags2) {
+    if (dump_stage) {
+        cerr << "Compiling C/C++ code for scheduling...\n";
+    }
+    char compil_str[512];
+    const char * compiler = getenv("CXX");
+    const char * systemc_dir = getenv("SYSTEMCASS");
+    const char * default_compiler =
 #ifdef CPP_CALL
-    "g++";
+        "g++";
 #else
     "gcc";
 #endif
 
-  compiler = (compiler == NULL)?default_compiler:compiler;
-  if (systemc_dir == NULL) {
-    systemc_dir = getenv ("SYSTEMC");
+    compiler = (compiler == NULL) ? default_compiler : compiler;
     if (systemc_dir == NULL) {
-      cerr << "Error : set SYSTEMCASS or SYSTEMC environnement variable "
-              "to the SYSTEMCASS directory.\n";
-      exit (-1);
-    }
-  }
-  //target_arch = (target_arch == NULL)?"":target_arch;
-  
-  char target_name[128];
-  char source_name[128];
-  sprintf (target_name, "%s.lo", base_name);
-  sprintf (source_name, "%s.cc", base_name);
-  
-  if (keep_generated_code)
-  { 
-    char lg_cde[256];
-    sprintf (lg_cde, "mkdir -p %s", generated_files_dir);
-    system(lg_cde);
-    sprintf(lg_cde, "cp %s/%s %s/", 
-            temporary_dir, source_name, generated_files_dir);
-    if (dump_stage) 
-      cerr << "$ " << lg_cde << "\n";
-    system(lg_cde);
-    sprintf(lg_cde, "(cd %s ; indent %s)", 
-            generated_files_dir, source_name);
-    if (dump_stage) 
-      cerr << "$ " << lg_cde << "\n";
-    system(lg_cde);
-  }
-  /* ******* */
-  /* COMPILE */
-  /* ******* */
-  const char *commandline_template =
+        systemc_dir = getenv("SYSTEMC");
+        if (systemc_dir == NULL) {
+            cerr << "Error : set SYSTEMCASS or SYSTEMC environnement variable to the SYSTEMCASS directory.\n";
+            exit(-1);
+        }
+    }
+
+    char target_name[128];
+    char source_name[128];
+    sprintf(target_name, "%s.lo", base_name);
+    sprintf(source_name, "%s.cc", base_name);
+
+    if (keep_generated_code) {
+        char lg_cde[256];
+        sprintf(lg_cde, "mkdir -p %s", generated_files_dir);
+        system(lg_cde);
+        sprintf(lg_cde, "cp %s/%s %s/", temporary_dir, source_name, generated_files_dir);
+        if (dump_stage) {
+            cerr << "$ " << lg_cde << "\n";
+        }
+        system(lg_cde);
+        sprintf(lg_cde, "(cd %s ; indent %s)", generated_files_dir, source_name);
+        if (dump_stage) {
+            cerr << "$ " << lg_cde << "\n";
+        }
+        system(lg_cde);
+    }
+    /* ******* */
+    /* COMPILE */
+    /* ******* */
+    const char * commandline_template =
 #if defined(CONFIG_OS_DARWIN)
-    "(cd %s ;"                     " %s %s -DSCHEDULING_BY_CASC -I%s/include -fno-common -dynamic -o %s -c %s)"
+        "(cd %s ;"
+        " %s %s -DSCHEDULING_BY_CASC -I%s/include -fno-common -dynamic -o %s -c %s)"
 #elif defined(CONFIG_OS_LINUX)
-    "(cd %s ; libtool --mode=compile %s %s -DSCHEDULING_BY_CASC -I%s/include -shared -o %s -c %s)"
+        "(cd %s ; libtool --mode=compile %s %s -DSCHEDULING_BY_CASC -I%s/include -shared -o %s -c %s)"
 #else
-    "(cd %s ;"                     " %s %s -DSCHEDULING_BY_CASC -I%s/include -dynamiclib -o %s -c %s)"
-#endif
-    ;
-
-  string cflags = casc_cflags;
-  if (use_openmp)
-    cflags += " -fopenmp";
-
-  sprintf(compil_str, 
-      commandline_template,
-      temporary_dir,
-      compiler, 
-      cflags.c_str(), 
-      systemc_dir, 
-      target_name,
-      source_name);
-
-  if (dump_stage) 
-    cerr << "Executing command : " << compil_str << "\n";
-  
-  if (system(compil_str)) {
-    perror("compil : system");
-    exit(-1);
-  }
-
-  /* **** */
-  /* LINK */
-  /* **** */
-  sprintf (target_name, "%s.la", base_name);
+        "(cd %s ;"
+        " %s %s -DSCHEDULING_BY_CASC -I%s/include -dynamiclib -o %s -c %s)"
+#endif
+        ;
+
+    string cflags = casc_cflags;
+    if (use_openmp) {
+        cflags += " -fopenmp";
+    }
+
+    sprintf(compil_str, commandline_template, temporary_dir, compiler, cflags.c_str(), systemc_dir, target_name, source_name);
+
+    if (dump_stage) {
+        cerr << "Executing command : " << compil_str << "\n";
+    }
+
+    if (system(compil_str)) {
+        perror("compil : system");
+        exit(-1);
+    }
+
+    /* **** */
+    /* LINK */
+    /* **** */
+    sprintf(target_name, "%s.la", base_name);
 
 #ifdef CONFIG_OS_LINUX
-  sprintf (source_name, "%s.lo", base_name);
-  sprintf(compil_str, "(cd %s ; pwd ; libtool --mode=link %s %s -module -shared -o %s %s -rpath /tmp)", /* -L. -L%s/lib-%s */ 
-     temporary_dir, compiler, casc_cflags, /*systemc_dir, target_arch,*/ 
-     target_name, source_name);
+    sprintf(source_name, "%s.lo", base_name);
+    sprintf(compil_str, "(cd %s ; pwd ; libtool --mode=link %s %s -module -shared -o %s %s -rpath /tmp)", /* -L. -L%s/lib-%s */
+            temporary_dir, compiler, casc_cflags, /*systemc_dir, target_arch, */
+            target_name, source_name);
 #else
-  sprintf (source_name, "%s.o", base_name);
-  sprintf(compil_str, "(cd %s ; pwd ; libtool -dynamic -o %s %s)", 
-     temporary_dir, target_name, source_name);
-#endif
-
-  if (dump_stage) 
-    cerr << "Executing command : " << compil_str << "\n";
-
-  if (system(compil_str)) {
-    perror("compil : system");
-    exit(-1);
-  }
-
- /* 
-  sprintf(compil_str, "(cd %s ; rm -f %s.o %s.lo)", 
-          temporary_dir, base_name, base_name);
-  if (dump_stage) 
-    cerr << "$ " << compil_str << "\n";
-*/
-
-  system(compil_str);
-  if (dump_stage) 
-    cerr << "Compiling done.\n";
-}
+    sprintf(source_name, "%s.o", base_name);
+    sprintf(compil_str, "(cd %s ; pwd ; libtool -dynamic -o %s %s)", temporary_dir, target_name, source_name);
+#endif
+
+    if (dump_stage) {
+        cerr << "Executing command : " << compil_str << "\n";
+    }
+
+    if (system(compil_str)) {
+        perror("compil : system");
+        exit(-1);
+    }
+
+    system(compil_str);
+    if (dump_stage) {
+        cerr << "Compiling done.\n";
+    }
+}
+
 
 /* ********************************
@@ -505,105 +470,101 @@
  */
 struct function_call {
-  fct      *function;
-  void    **instance;
-  int       func_number;
+    fct * function;
+    void ** instance;
+    int func_number;
 };
 static function_call pf[3];
 
-void
-get_function_call (function_call         &pf, 
-                   method_process_list_t &func_list)
-{
-  pf.func_number = func_list.size ();
-  pf.function = (fct*)   malloc (sizeof (fct)   * pf.func_number);
-  pf.instance = (void**) malloc (sizeof (void*) * pf.func_number);
-  method_process_list_t::iterator mm;
-  int i;
-  for (mm = func_list.begin(), i = 0; mm != func_list.end(); ++mm, ++i)
-  {
-    const method_process_t *mp = *mm;
-    pf.function[i].pmf = (mp->func);
-    pf.instance[i] = (void*)(mp->module);
-  }
-}
-
-void
-get_function_call (function_call &pf, 
-                   ProcessDependencyList &func_list)
-{
-  pf.func_number = func_list.size ();
-  pf.function = (fct*)   malloc (sizeof (fct)   * pf.func_number);
-  pf.instance = (void**) malloc (sizeof (void*) * pf.func_number);
-  ProcessDependencyList::iterator it;
-  int i;
-  for (i = 0, it = func_list.begin(); it != func_list.end(); ++it, ++i)
-  {
-    const method_process_t *mp = *it;
-    pf.function[i].pmf = (mp->func);
-    pf.instance[i] = (void*)(mp->module);
-  }
-}
-
-void
-gen_scheduling_code_for_static_func (
-            method_process_list_t &transition_func_list,
-            method_process_list_t &moore_func_list,
-            ProcessDependencyList &mealy_func_list)
-{
-  if (dump_stage)
-    cerr << "Generating scheduling...\n";
-
-  get_function_call (pf[0], transition_func_list);
-  get_function_call (pf[1], moore_func_list);
-  get_function_call (pf[2], mealy_func_list);
-
-  if (dump_stage)
-    cerr << "Generating scheduling done.\n";
-}
-
-void
-call_functions (function_call &fc)
-{
-  int n = fc.func_number;
-  int i;
-  for (i = 0; i < n; ++i)
-  {
-#if 0 //defined(CONFIG_DEBUG)
-    sc_module *m = (sc_module*)(fc.instance[i]);
-    cerr << m->name () << endl;
-#endif
-    fc.function[i].pf (fc.instance[i]);
-  }
-}
-
-void
-call_functions_in_parallel (function_call &fc)
-{
-  int n = fc.func_number;
-  int i;
-  #pragma omp parallel for
-  for (i = 0; i < n; ++i)
-  {
-#if 0 //defined(CONFIG_DEBUG)
-    sc_module *m = (sc_module*)(fc.instance[i]);
-    cerr << m->name () << endl;
-    cerr << "thread #" << omp_get_thread_num () << endl;
-#endif
-    fc.function[i].pf (fc.instance[i]);
-  }
-}
-
-void static_mealy_generation ()
-{
-  call_functions (pf[2]);
-}
-
-void static_simulate_1_cycle (void) 
-{
-  call_functions (pf[0]); // transition
-  update     ();
-  call_functions_in_parallel (pf[1]); // moore generation
-  call_functions (pf[2]); // mealy generation
-}
+
+void get_function_call(function_call & pf, method_process_list_t & func_list) {
+    pf.func_number = func_list.size();
+    pf.function = (fct *) malloc(sizeof(fct) * pf.func_number);
+    pf.instance = (void **) malloc(sizeof(void *) * pf.func_number);
+    method_process_list_t::iterator mm;
+    int i;
+    for (mm = func_list.begin(), i = 0; mm != func_list.end(); ++mm, ++i) {
+        const method_process_t * mp = *mm;
+        pf.function[i].pmf = (mp->func);
+        pf.instance[i] = (void *) (mp->module);
+    }
+}
+
+
+void get_function_call(function_call & pf, ProcessDependencyList & func_list) {
+    pf.func_number = func_list.size();
+    pf.function = (fct *) malloc(sizeof(fct) * pf.func_number);
+    pf.instance = (void **) malloc(sizeof(void *) * pf.func_number);
+    ProcessDependencyList::iterator it;
+    int i;
+    for (i = 0, it = func_list.begin(); it != func_list.end(); ++it, ++i) {
+        const method_process_t * mp = *it;
+        pf.function[i].pmf = (mp->func);
+        pf.instance[i] = (void *) (mp->module);
+    }
+}
+
+
+void gen_scheduling_code_for_static_func(method_process_list_t &
+        transition_func_list,
+        method_process_list_t &
+        moore_func_list,
+        ProcessDependencyList &
+        mealy_func_list) {
+    if (dump_stage) {
+        cerr << "Generating scheduling...\n";
+    }
+
+    get_function_call(pf[0], transition_func_list);
+    get_function_call(pf[1], moore_func_list);
+    get_function_call(pf[2], mealy_func_list);
+
+    if (dump_stage) {
+        cerr << "Generating scheduling done.\n";
+    }
+}
+
+
+void call_functions(function_call & fc) {
+    int n = fc.func_number;
+    int i;
+    for (i = 0; i < n; ++i) {
+#if 0
+        //defined(CONFIG_DEBUG)
+        sc_module *m = (sc_module *) (fc.instance[i]);
+        cerr << m->name() << endl;
+#endif
+        fc.function[i].pf(fc.instance[i]);
+    }
+}
+
+
+void call_functions_in_parallel(function_call & fc) {
+    int n = fc.func_number;
+    int i;
+#pragma omp parallel for
+    for (i = 0; i < n; ++i) {
+#if 0
+        //defined(CONFIG_DEBUG)
+        sc_module *m = (sc_module *) (fc.instance[i]);
+        cerr << m->name() << endl;
+        cerr << "thread #" << omp_get_thread_num() << endl;
+#endif
+        fc.function[i].pf(fc.instance[i]);
+    }
+}
+
+
+void static_mealy_generation() {
+    call_functions(pf[2]);
+}
+
+
+void static_simulate_1_cycle(void) {
+    call_functions(pf[0]); // transition
+    update();
+    call_functions_in_parallel(pf[1]); // moore generation
+    call_functions(pf[2]); // mealy generation
+}
+
 
 /* ***************************************
@@ -611,74 +572,83 @@
  */
 
-static method_process_list_t   func_list[2];
+static method_process_list_t func_list[2];
 static strong_component_list_t quasistatic_list;
 
-static 
-void
-Call         (const method_process_t &m)
-{
-  sc_module        *mod  = m.module;
-  SC_ENTRY_FUNC     func = m.func;
-//  CASC_ENTRY_FUNC   func = reinterpret_cast<CASC_ENTRY_FUNC> (m.func);
-  (mod->*func) ();
-}
-
-void quasistatic_mealy_generation ()
-{
-  strong_component_list_t::iterator ss;
-  for ( ss = quasistatic_list.begin(); ss != quasistatic_list.end(); ++ss) {
-    if ( (*ss)->size() == 1) {
-      /* un seul element dans le strong component */
-      method_process_t *m = (method_process_t*)(*((*ss)->begin ()));
-      Call (*m);
-      continue;
-    } else {
-      /* plusieurs elements dans le strong component */
-      do {
-        unstable = 0;
-        component_list_t::reverse_iterator rev_mm;
-        for( rev_mm = (*ss)->rbegin(); rev_mm != (*ss)->rend(); ++rev_mm) {
-          method_process_t *m = (method_process_t*) *rev_mm;
-          Call (*m);
-        }
-      } while ( unstable );
-    }
-  }
-}
-
-void quasistatic_simulate_1_cycle (void) 
-{
-  method_process_list_t::iterator mm;
-  for( mm = func_list[0].begin(); mm != func_list[0].end(); ++mm)
-  {
-    method_process_t &m    = **mm;
-    Call (m);
-  }
-  update     ();
-  for( mm = func_list[1].begin(); mm != func_list[1].end(); ++mm)
-  {
-    method_process_t &m    = **mm;
-    Call (m);
-  }
-  quasistatic_mealy_generation ();
-}
-
-void
-gen_scheduling_code_for_quasistatic_func (
-            method_process_list_t   &transition_func_list,
-            method_process_list_t   &moore_func_list,
-            strong_component_list_t &mealy_func_list)
-{
-  if (dump_stage)
-    cerr << "Generating quasi static scheduling...\n";
-
-  func_list[0]     = transition_func_list;
-  func_list[1]     = moore_func_list;
-  quasistatic_list = mealy_func_list;
-
-  if (dump_stage)
-    cerr << "Generating quasi static scheduling done.\n";
+static void Call(const method_process_t & m) {
+    sc_module * mod = m.module;
+    SC_ENTRY_FUNC func = m.func;
+    //  CASC_ENTRY_FUNC   func = reinterpret_cast<CASC_ENTRY_FUNC> (m.func);
+    (mod->*func) ();
+}
+
+
+void quasistatic_mealy_generation() {
+    strong_component_list_t::iterator ss;
+    for (ss = quasistatic_list.begin(); ss != quasistatic_list.end(); ++ss) {
+        if ((*ss)->size() == 1) {
+            /* un seul element dans le strong component */
+            method_process_t * m = (method_process_t *) (*((*ss)->begin()));
+            Call(*m);
+            continue;
+        }
+        else {
+            /* plusieurs elements dans le strong component */
+            do {
+                unstable = 0;
+                component_list_t::reverse_iterator rev_mm;
+                for (rev_mm = (*ss)->rbegin(); rev_mm != (*ss)->rend(); ++rev_mm) {
+                    method_process_t * m = (method_process_t *) * rev_mm;
+                    Call(*m);
+                }
+            } while (unstable);
+        }
+    }
+}
+
+
+void quasistatic_simulate_1_cycle(void) {
+    method_process_list_t::iterator mm;
+    for (mm = func_list[0].begin(); mm != func_list[0].end(); ++mm) {
+        method_process_t & m = **mm;
+        Call(m);
+    }
+    update();
+    for (mm = func_list[1].begin(); mm != func_list[1].end(); ++mm) {
+        method_process_t & m = **mm;
+        Call(m);
+    }
+    quasistatic_mealy_generation();
+}
+
+
+void gen_scheduling_code_for_quasistatic_func(method_process_list_t &
+        transition_func_list,
+        method_process_list_t &
+        moore_func_list,
+        strong_component_list_t &
+        mealy_func_list) {
+    if (dump_stage) {
+        cerr << "Generating quasi static scheduling...\n";
+    }
+
+    func_list[0] = transition_func_list;
+    func_list[1] = moore_func_list;
+    quasistatic_list = mealy_func_list;
+
+    if (dump_stage) {
+        cerr << "Generating quasi static scheduling done.\n";
+    }
 }
 } // end of sc_core namespace
 
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
Index: /sources/src/gen_code.h
===================================================================
--- /sources/src/gen_code.h	(revision 51)
+++ /sources/src/gen_code.h	(revision 52)
@@ -1,14 +1,14 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                 gen_code.h                        |
-|                                                             |
-| Author  :                 Taktak Sami                       |
-|                           Buchmann Richard                  |
-|                                                             |
-| Date    :                   09_07_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                 gen_code.h                        |
+  |                                                             |
+  | Author  :                 Taktak Sami                       |
+  |                           Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   09_07_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 #ifndef __GEN_CODE_H__
 #define __GEN_CODE_H__
@@ -31,26 +31,29 @@
 namespace sc_core {
 
-extern strong_component_list_t *strong;
+extern strong_component_list_t * strong;
 
 /* compile scheduling code to link dynamically later */
-extern void compile_code(const char *base_name, const char *cflags2 = "");
+extern void compile_code(const char * base_name, const char * cflags2 = "");
 
 /* generate a scheduling code */
 extern void  gen_scheduling_code_for_quasistatic_func(
-                      method_process_list_t   &transition_list,
-                      method_process_list_t   &moore_list,
-	                    strong_component_list_t &mealy_list);
+      method_process_list_t   &transition_list,
+      method_process_list_t   &moore_list,
+      strong_component_list_t &mealy_list);
+
 extern void  gen_scheduling_code_for_static_func(
-                      method_process_list_t   &transition_list,
-                      method_process_list_t   &moore_list,
-	                    ProcessDependencyList   &mealy_list);
-extern char *gen_scheduling_code_for_dynamic_link(
-                      method_process_list_t   &transition_list,
-                      method_process_list_t   &moore_list,
-	                    ProcessDependencyList   &mealy_list);
-extern char *gen_scheduling_code_for_dynamic_link(
-                      method_process_list_t   &transition_list,
-                      method_process_list_t   &moore_list,
-	                    strong_component_list_t &strongcomponents);
+      method_process_list_t   &transition_list,
+      method_process_list_t   &moore_list,
+      ProcessDependencyList   &mealy_list);
+
+extern char * gen_scheduling_code_for_dynamic_link(
+      method_process_list_t   &transition_list,
+      method_process_list_t   &moore_list,
+      ProcessDependencyList   &mealy_list);
+
+extern char * gen_scheduling_code_for_dynamic_link(
+      method_process_list_t   &transition_list,
+      method_process_list_t   &moore_list,
+      strong_component_list_t &strongcomponents);
 
 /* function when any dynamic link is impossible */
@@ -61,14 +64,14 @@
 #endif
 
-EXTERN void static_simulate_1_cycle ();
-EXTERN void static_mealy_generation ();
-EXTERN void quasistatic_simulate_1_cycle ();
-EXTERN void quasistatic_mealy_generation ();
+EXTERN void static_simulate_1_cycle();
+EXTERN void static_mealy_generation();
+EXTERN void quasistatic_simulate_1_cycle();
+EXTERN void quasistatic_mealy_generation();
 
 /* internal functions */
-inline void switch_to_moore () INLINE;
-inline void internal_sc_cycle2 () INLINE;
-inline void internal_sc_cycle1 (int number_of_cycles) INLINE;
-inline void internal_sc_cycle0( double duration )  INLINE;
+inline void switch_to_moore() INLINE;
+inline void internal_sc_cycle2() INLINE;
+inline void internal_sc_cycle1(int number_of_cycles) INLINE;
+inline void internal_sc_cycle0(double duration)  INLINE;
 
 /* ***************** */
@@ -76,59 +79,54 @@
 /* ***************** */
 
-inline void
-internal_sc_cycle2 ()
-{
+inline void internal_sc_cycle2() {
 #ifdef DUMP_STAGE
-  std::cerr << "begin of cycle #" << sc_simulation_time () << "\n";
+    std::cerr << "begin of cycle #" << sc_simulation_time () << "\n";
 #endif
-  func_simulate_1_cycle ();  
-  ++nb_cycles;
+    func_simulate_1_cycle();  
+    ++nb_cycles;
 #ifdef DUMP_STAGE
-  std::cerr << "end of cycle\n";
+    std::cerr << "end of cycle\n";
 #endif
 }
 
-inline void
-internal_sc_cycle1 (int number_of_cycles)
-{  
-	//while ((! have_to_stop) && (number_of_cycles != 0)) {
-	while (!((have_to_stop) | (number_of_cycles == 0))) {
-  	trace_all  (false);
-		internal_sc_cycle2 ();
-  	trace_all  (true);
-		number_of_cycles = (number_of_cycles<0)?number_of_cycles:number_of_cycles-1;
-  }
+
+inline void internal_sc_cycle1(int number_of_cycles) {  
+    //while ((! have_to_stop) && (number_of_cycles != 0)) {
+    while (!((have_to_stop) | (number_of_cycles == 0))) {
+        trace_all(false);
+        internal_sc_cycle2();
+        trace_all(true);
+        number_of_cycles = (number_of_cycles<0) ? number_of_cycles:number_of_cycles - 1;
+    }
 }
 
-inline
-void 
-internal_sc_cycle0( double duration )  // in default time units
-{
+
+inline void internal_sc_cycle0(double duration) {
+    // in default time units
+
 #ifdef CONFIG_DEBUG
-	// Check dynamic linkage
-  if ((func_combinationals == NULL) || (func_simulate_1_cycle == NULL)) {
-    std::cerr << "Main execution loop is not yet generated.\n";
-  }
+    // Check dynamic linkage
+    if ((func_combinationals == NULL) || (func_simulate_1_cycle == NULL)) {
+        std::cerr << "Main execution loop is not yet generated.\n";
+    }
 
-	if (duration < -1)
-		std::cerr << "Invalid duration.\n";
+    if (duration < -1) {
+        std::cerr << "Invalid duration.\n";
+    }
 #endif
-	
-  if (is_posted_write ()) {
-		// update posted value to external signals		
-#if 0
-		std::cerr << "update\n";
-#endif
-  	update ();
-    func_combinationals ();
-  }
-	
-	internal_sc_cycle1 ((int)duration);
 
-  // don't need to do func_combinationals since 'unstable' flag is now false
-  if (is_posted_write ()) {
-    update ();
-    func_combinationals ();
-  }
+    if (is_posted_write ()) {
+        // update posted value to external signals		
+        update ();
+        func_combinationals ();
+    }
+
+    internal_sc_cycle1 ((int) duration);
+
+    // don't need to do func_combinationals since 'unstable' flag is now false
+    if (is_posted_write()) {
+        update();
+        func_combinationals();
+    }
 }
 
@@ -145,2 +143,14 @@
 
 #endif /* __GEN_CODE_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/global_functions.cc
===================================================================
--- /sources/src/global_functions.cc	(revision 51)
+++ /sources/src/global_functions.cc	(revision 52)
@@ -1,14 +1,14 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                 global_functions.cc               |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                           Nicolas Pouillon                  |
-|                                                             |
-| Date    :                   21_09_2005                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                 global_functions.cc               |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                           Nicolas Pouillon                  |
+  |                                                             |
+  | Date    :                   21_09_2005                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -38,11 +38,13 @@
 #include <iostream>
 #include <dlfcn.h>
-#include "schedulers.h" // get_scheduling & run_schedule_editor
-#include "sc_module.h" // check_all_method_process
-#include "gen_code.h"  // gen_scheduling_code_for_dynamic_link & gen_scheduling_code_for_static_func
+
+#include "schedulers.h"   // get_scheduling & run_schedule_editor
+#include "sc_module.h"    // check_all_method_process
+#include "gen_code.h"     // gen_scheduling_code_for_dynamic_link & gen_scheduling_code_for_static_func
 #include "sc_clock_ext.h" // clock list
 #include "usage.h"
 #include "module_hierarchy2dot.h"
 #include "assert.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -53,6 +55,6 @@
 namespace sc_core {
 
-const char *temporary_dir = "/tmp";
-const char *generated_files_dir = "./generated_by_systemcass";
+const char * temporary_dir = "/tmp";
+const char * generated_files_dir = "./generated_by_systemcass";
 
 static usage_t usage;
@@ -62,12 +64,9 @@
 /* ***************************** */
 
-template <typename T>
-ostream& operator << (ostream &o, const vector<T*> &v)
-{
-  typename vector<T*>::const_iterator i;
-  for (i = v.begin(); i != v.end(); ++i) {
-    o << **i << " ";
-  }
-  return o;
+template < typename T > ostream & operator <<(ostream & o, const vector < T * > & v) {
+    typename vector < T * >::const_iterator i;
+    for (i = v.begin(); i != v.end(); ++i) {
+        o << **i << " ";
+    } return o;
 }
 
@@ -76,30 +75,25 @@
 /****************/
 
-typedef std::set<const sc_clock*> clock_list_t;
-
-ostream& 
-operator << (ostream &o,
-             const clock_list_t &cl)
-{
-  clock_list_t::const_iterator i;
-  for (i = cl.begin(); i != cl.end(); ++i) {
-    o << (*i)->name () << " ";
-  }
-  return o;
-}
+typedef std::set<const sc_clock *> clock_list_t;
+
+ostream & operator <<(ostream & o, const clock_list_t & cl) {
+    clock_list_t::const_iterator i;
+    for (i = cl.begin(); i != cl.end(); ++i) {
+        o << (*i)->name() << " ";
+    }
+    return o;
+}
+
 
 // clock list
-void 
-create_clock_list (clock_list_t  &c,
-                   const equi_list_t &el)
-{
-  equi_list_t::const_iterator i;
-  for (i = el.begin (); i != el.end(); ++i) {
-    equi_t::const_iterator j;
-    for (j = i->begin (); j != i->end (); ++j) {
-      if (j->kind () == sc_clock::kind_string)
-        c.insert ((const sc_clock*)j->object);
-    }
-  }
+void create_clock_list(clock_list_t & c, const equi_list_t & el) {
+    equi_list_t::const_iterator i;
+    for (i = el.begin(); i != el.end(); ++i) {
+        equi_t::const_iterator j;
+        for (j = i->begin(); j != i->end(); ++j) {
+            if (j->kind() == sc_clock::kind_string)
+                c.insert((const sc_clock *) j->object);
+        }
+    }
 }
 
@@ -116,76 +110,73 @@
 /* ************ */
 
-static void *handle = NULL;
-
-static
-void 
-link (const char *lib)
-{
-  // chargement du code de simulate_1_cycle
-  handle = dlopen(lib, RTLD_GLOBAL | RTLD_NOW);
-  //handle = dlopen(lib, RTLD_LAZY | RTLD_GLOBAL | RTLD_NOW);
-  
-  if (handle == NULL) {
-    const char *error = dlerror ();
-    if (error)
-      fprintf (stderr, "dlopen: %s\n",error);
-    fprintf (stderr, 
-             "Is there -rdynamic option into your command line ? "
-             "If not, please do it.\n");
-    exit(18);
-  }
-
-  union uni_fct_t {
-    evaluation_fct_t fct_type;
-    void            *dl_pointer_type;
-  };
-  uni_fct_t        temp;  
-  temp.dl_pointer_type = dlsym (handle,"initialize");
-  if (temp.dl_pointer_type == NULL) {
-    const char *error = dlerror ();
-    if (error)
-      fprintf (stderr, "dlsym: %s\n",error);
-    exit(19);
-  }
-  evaluation_fct_t func_initialize;
-  func_initialize = temp.fct_type;
-  func_initialize ();
-
-  temp.dl_pointer_type = dlsym (handle,"simulate_1_cycle");
-  if (temp.dl_pointer_type == NULL) {
-    const char *error = dlerror ();
-    if (error)
-      fprintf (stderr, "dlsym: %s\n",error);
-    exit(20);
-  }
-  func_simulate_1_cycle = temp.fct_type;
-  
-  temp.dl_pointer_type = dlsym (handle,"mealy_generation");
-  if (temp.dl_pointer_type == NULL) {
-    const char *error = dlerror ();
-    if (error)
-      fprintf (stderr, "dlsym: %s\n",error);
-    exit(21);
-  }  
-  func_combinationals = temp.fct_type;
-
-  /*
-   *
-   */
-  if (dump_stage)
-    cerr << "dynamic link done\n";
-}
-
-static
-void
-unlink ()
-{
-  if (handle)
-  {
-    if (dlclose (handle) != 0)
-      cerr << "Warning : dlclose returns an error.\n" 
-           << dlerror () << endl;
-    handle = NULL;
-  }
+static void * handle = NULL;
+
+static void link(const char * lib) {
+    // chargement du code de simulate_1_cycle
+    handle = dlopen(lib, RTLD_GLOBAL | RTLD_NOW);
+    //handle = dlopen(lib, RTLD_LAZY | RTLD_GLOBAL | RTLD_NOW);
+
+    if (handle == NULL) {
+        const char * error = dlerror();
+        if (error) {
+            fprintf(stderr, "dlopen: %s\n", error);
+        }
+        fprintf(stderr, "Is there -rdynamic option into your command line ? If not, please do it.\n");
+        exit(18);
+    }
+
+    union uni_fct_t {
+        evaluation_fct_t fct_type;
+        void * dl_pointer_type;
+    };
+    uni_fct_t temp;
+    temp.dl_pointer_type = dlsym(handle, "initialize");
+    if (temp.dl_pointer_type == NULL) {
+        const char * error = dlerror();
+        if (error) {
+            fprintf(stderr, "dlsym: %s\n", error);
+        }
+        exit(19);
+    }
+    evaluation_fct_t func_initialize;
+    func_initialize = temp.fct_type;
+    func_initialize();
+
+    temp.dl_pointer_type = dlsym(handle, "simulate_1_cycle");
+    if (temp.dl_pointer_type == NULL) {
+        const char * error = dlerror();
+        if (error) {
+            fprintf(stderr, "dlsym: %s\n", error);
+            exit(20);
+        }
+        func_simulate_1_cycle = temp.fct_type;
+
+        temp.dl_pointer_type = dlsym(handle, "mealy_generation");
+        if (temp.dl_pointer_type == NULL) {
+            const char * error = dlerror();
+            if (error) {
+                fprintf(stderr, "dlsym: %s\n", error);
+            }
+            exit(21);
+        }
+        func_combinationals = temp.fct_type;
+
+        /*
+         *
+         */
+        if (dump_stage) {
+            cerr << "dynamic link done\n";
+        }
+    }
+}
+
+
+static void unlink() {
+    if (handle) {
+        if (dlclose(handle) != 0) {
+            cerr << "Warning : dlclose returns an error.\n" << dlerror() << endl;
+        }
+        handle = NULL;
+    }
 }
 
@@ -194,143 +185,136 @@
 /* ************ */
 
-bool  already_initialized = false;
-
-static
-void
-use_static_func ()
-{
-  if (dump_stage)
-    cerr << "Using static functions to schedule SystemC processes.\n";
-  if (scheduling_method == CASS_SCHEDULING)
-  {
-    func_simulate_1_cycle = (evaluation_fct_t)sc_core::quasistatic_simulate_1_cycle;
-    func_combinationals   = (evaluation_fct_t)sc_core::quasistatic_mealy_generation;
-  } else {
-    func_simulate_1_cycle = (evaluation_fct_t)sc_core::static_simulate_1_cycle;
-    func_combinationals   = (evaluation_fct_t)sc_core::static_mealy_generation;
-  }
-}
-
-static
-void
-compile_and_link (const char *base_name)
-{
-  if (dump_stage)
-    cerr << "Using dynamically loaded functions to schedule SystemC processes.\n";
-  // compilation du code de simulate_1_cycle
-  compile_code(base_name);
-   
-  char lib_absolutepath[256]; 
+bool already_initialized = false;
+
+static void use_static_func() {
+    if (dump_stage) {
+        cerr << "Using static functions to schedule SystemC processes.\n";
+    }
+    if (scheduling_method == CASS_SCHEDULING) {
+        func_simulate_1_cycle = (evaluation_fct_t) sc_core::quasistatic_simulate_1_cycle;
+        func_combinationals = (evaluation_fct_t) sc_core::quasistatic_mealy_generation;
+    }
+    else {
+        func_simulate_1_cycle = (evaluation_fct_t) sc_core::static_simulate_1_cycle;
+        func_combinationals = (evaluation_fct_t) sc_core::static_mealy_generation;
+    }
+}
+
+
+static void compile_and_link(const char *base_name) {
+    if (dump_stage) {
+        cerr << "Using dynamically loaded functions to schedule SystemC processes.\n";
+    }
+    // compilation du code de simulate_1_cycle
+    compile_code(base_name);
+
+    char lib_absolutepath[256];
 #if defined(CONFIG_OS_DARWIN)
-  sprintf(lib_absolutepath, "/tmp/%s.so", base_name);
+    sprintf(lib_absolutepath, "/tmp/%s.so", base_name);
 #elif defined(CONFIG_OS_LINUX)
-  sprintf(lib_absolutepath, "/tmp/.libs/%s.so.0", base_name);
+    sprintf(lib_absolutepath, "/tmp/.libs/%s.so.0", base_name);
 #else
-  cerr << "ERROR\n"; exit (126);
-#endif
-  
-  link (lib_absolutepath);
-}
-
-static
-void 
-internal_sc_initialize (void) 
-{
-  sort_equi_list ();
-
-  check_all_method_process ();
-
-  if (dump_netlist_info)
-    cerr << "Module instance list\n"
-         << "--------------------\n" 
-         << instances_set << endl;
-  
-  /*
-   * Initialize the signals table
-   */
-  create_signals_table ();
-  bind_to_table ();
-  if (dump_netlist_info)
-  {
-    print_table (cerr);
-    cerr << endl;
-    print_table_stats (cerr);
-    cerr << endl;
-  }
-
-  // Init variables to be able to run combinational functions
-  pending_write_vector_capacity = get_signal_table_size ();
-
-  if (pending_write_vector_capacity == 0)
-    pending_write_vector = NULL;
-  else
-    pending_write_vector = (pending_write_vector_t) realloc (pending_write_vector, sizeof (pending_write_t) * pending_write_vector_capacity);
-  
-  // create the clock list
-  clock_list_t clock_list;
-  create_clock_list (clock_list, get_equi_list ());
-  if (dump_netlist_info)
-    cerr << "Clock list\n"
-         << "----------\n"
-         << clock_list << "\n\n";
-
-  // Check if a clock exists in the system
-  if (clock_list.empty ()) {
-    cerr << "System need a clock.\n"
-         << "Please define system clock using special type \"sc_clock\".\n";
-    exit (22);
-  }
-
-  // Check if any constructor wrote into registers
-  if (pending_write_vector_nb != 0)
-  {
-    cerr << "Error : Register/Signal writing is not allowed before sc_initialize.\n"
-      "Move initializations from constructors/sc_main to module reset sequences.\n";
-    // we are unable to dump register(s) name(s) 
-    // because the table binding is not yet completed.
-    exit (24);
-  }
- 
-  string base_name = get_scheduling (scheduling_method);
-
-  if (dynamic_link_of_scheduling_code)
-    compile_and_link (base_name.c_str());
-  else
-    use_static_func ();
-  
-  pending_write_vector_nb = 0;
- 
-  check_all_ports ();
-  usage.start ();
-
-  if (dump_stage)
-    cerr << "sc_initialize () done.\n";
-
-  already_initialized = true;
-}
-
-inline
-void
-check_and_initialize ()
-{
-  if (already_initialized == false) {
+    cerr << "ERROR\n";
+    exit(126);
+#endif
+    link(lib_absolutepath);
+}
+
+
+static void internal_sc_initialize(void) {
+    sort_equi_list();
+
+    check_all_method_process();
+
+    if (dump_netlist_info) {
+        cerr << "Module instance list\n--------------------\n" << instances_set << endl;
+    }
+
+    /*
+     * Initialize the signals table
+     */
+    create_signals_table();
+    bind_to_table();
+    if (dump_netlist_info) {
+        print_table(cerr);
+        cerr << endl;
+        print_table_stats(cerr);
+        cerr << endl;
+    }
+    // Init variables to be able to run combinational functions
+    pending_write_vector_capacity = get_signal_table_size();
+
+    if (pending_write_vector_capacity == 0) {
+        pending_write_vector = NULL;
+    }
+    else {
+        pending_write_vector = (pending_write_vector_t) realloc(pending_write_vector, sizeof(pending_write_t) * pending_write_vector_capacity);
+    }
+
+    // create the clock list
+    clock_list_t clock_list;
+    create_clock_list(clock_list, get_equi_list());
+    if (dump_netlist_info) {
+        cerr << "Clock list\n" << "----------\n" << clock_list << "\n\n";
+    }
+
+    // Check if a clock exists in the system
+    if (clock_list.empty()) {
+        cerr << "System need a clock.\n" <<
+            "Please define system clock using special type \"sc_clock\".\n";
+        exit(22);
+    }
+    // Check if any constructor wrote into registers
+    if (pending_write_vector_nb != 0) {
+        cerr <<
+            "Error : Register/Signal writing is not allowed before sc_initialize.\n"
+            "Move initializations from constructors/sc_main to module reset sequences.\n";
+        // we are unable to dump register(s) name(s) 
+        // because the table binding is not yet completed.
+        exit(24);
+    }
+
+    string base_name = get_scheduling(scheduling_method);
+
+    if (dynamic_link_of_scheduling_code) {
+        compile_and_link(base_name.c_str());
+    }
+    else {
+        use_static_func();
+    }
+
+    pending_write_vector_nb = 0;
+
+    check_all_ports();
+    usage.start();
+
+    if (dump_stage) {
+        cerr << "sc_initialize () done.\n";
+    }
+
+    already_initialized = true;
+}
+
+
+inline void check_and_initialize() {
+    if (already_initialized == false) {
 #if defined(SYSTEMC_VERSION_1_0)
-    std::cerr << "Warning : call sc_initialize before executiong simulation.\n";
-#endif
-    internal_sc_initialize ();
-    if (dump_module_hierarchy)
-      module_hierarchy2dot (dump_module_hierarchy);
-    if (nosimulation)
-    {
-      exit (0);
-    }
-  }
-}
-
-void sc_initialize(void) 
-{
-  cerr << "Warning : 'sc_initialize' function is deprecated since SystemC 2.1.\n"; 
-  cerr << "Use 'sc_start(0)' instead.\n"; 
-  check_and_initialize ();
+        cerr << "Warning : call sc_initialize before executiong simulation.\n";
+#endif
+        internal_sc_initialize();
+        if (dump_module_hierarchy) {
+            module_hierarchy2dot(dump_module_hierarchy);
+        }
+        if (nosimulation) {
+            exit(0);
+        }
+    }
+}
+
+
+void sc_initialize(void) {
+    cerr << "Warning : 'sc_initialize' function is deprecated since SystemC 2.1.\n";
+    cerr << "Use 'sc_start(0)' instead.\n";
+    check_and_initialize();
 }
 
@@ -339,63 +323,53 @@
 /* ********** */
 
-inline 
-void 
-sc_cycle( double duration)
-{
-  check_and_initialize ();
-  sc_core::internal_sc_cycle0(duration);
-}
-
-inline
-void 
-sc_cycle( double       duration,
-          sc_time_unit time_unit )
-{
-  check_and_initialize ();
-  sc_core::internal_sc_cycle0(duration);
-}
-
-void 
-sc_start(double d_val)
-{
-  sc_cycle (d_val);
+inline void sc_cycle(double duration) {
+    check_and_initialize();
+    sc_core::internal_sc_cycle0(duration);
+}
+
+
+inline void sc_cycle(double duration, sc_time_unit time_unit) {
+    check_and_initialize();
+    sc_core::internal_sc_cycle0(duration);
+}
+
+
+void sc_start(double d_val) {
+    sc_cycle(d_val);
 #ifdef DUMP_SIGNAL_STATS
-  print_registers_writing_stats (cerr);
+    print_registers_writing_stats(cerr);
 #endif
 #ifdef DUMP_SCHEDULE_STATS
-  print_schedule_stats (cerr);
-#endif
-}
-
-void 
-sc_start()
-{
-  sc_cycle (-1);
+    print_schedule_stats(cerr);
+#endif
+}
+
+
+void sc_start() {
+    sc_cycle(-1);
 #ifdef DUMP_SIGNAL_STATS
-  print_registers_writing_stats (cerr);
+    print_registers_writing_stats(cerr);
 #endif
 #ifdef DUMP_SCHEDULE_STATS
-  print_schedule_stats (cerr);
-#endif
-}
-
-void
-sc_start (double       d_val,
-          sc_time_unit d_tu)
-{
-  sc_start (sc_time (d_val, d_tu));
-}
-
-void
-sc_start( const sc_time& duration )
-{
-  sc_cycle ((double)duration);
+    print_schedule_stats(cerr);
+#endif
+}
+
+
+void sc_start(double d_val, sc_time_unit d_tu) {
+    sc_start(sc_time(d_val, d_tu));
+}
+
+
+void sc_start(const sc_time & duration) {
+    sc_cycle((double) duration);
 #ifdef DUMP_SIGNAL_STATS
-  print_registers_writing_stats (cerr);
+    print_registers_writing_stats(cerr);
 #endif
 #ifdef DUMP_SCHEDULE_STATS
-  print_schedule_stats (cerr);
-#endif
-}
+    print_schedule_stats(cerr);
+#endif
+}
+
 
 /* ****************** */
@@ -403,58 +377,61 @@
 /* ****************** */
 
-bool         have_to_stop = false;
-sc_stop_mode stop_mode    = SC_STOP_FINISH_DELTA;
-
-void
-sc_stop ()
-{
-  switch (stop_mode)
-  {
-  case SC_STOP_IMMEDIATE    :
-    exit (54);
-    break;
-  case SC_STOP_FINISH_DELTA :
-  default :
-    have_to_stop = true;
-    break;
-  }
-}
-
-void
-sc_set_stop_mode (sc_stop_mode new_mode)
-{
-  if (new_mode == SC_STOP_IMMEDIATE)
-    stop_mode = SC_STOP_IMMEDIATE;
-}
-
-sc_stop_mode
-sc_get_stop_mode ()
-{
-  return stop_mode;
-}
-
-void
-close_systemcass ()
-{
-  unlink ();
-  if (print_user_resources)
-  {
-    usage.stop ();
-    unsigned int d = usage;
-    cerr << "Performances\n"
-            "------------\n";
-    cerr << "Time elapsed (sec) : " << d << endl;
-    cerr << "Cycles done        : " << nb_cycles << endl;
-    //sc_simulation_time () << endl;
-    if (d == 0)
-      cerr << "Performance (c/s)  : N/A" << endl;
-    else
-      cerr << "Performance (c/s)  : " << nb_cycles / d << endl;
-//    cerr << "Memory used        : " << usage.get_memory_size () << endl;
-  }
-}
-
-/////////////////////////
+bool have_to_stop = false;
+sc_stop_mode stop_mode = SC_STOP_FINISH_DELTA;
+
+void sc_stop() {
+    switch (stop_mode) {
+        case SC_STOP_IMMEDIATE:
+            exit(54);
+            break;
+        case SC_STOP_FINISH_DELTA:
+        default:
+            have_to_stop = true;
+            break;
+    }
+}
+
+
+void sc_set_stop_mode(sc_stop_mode new_mode) {
+    if (new_mode == SC_STOP_IMMEDIATE) {
+        stop_mode = SC_STOP_IMMEDIATE;
+    }
+}
+
+
+sc_stop_mode sc_get_stop_mode() {
+    return stop_mode;
+}
+
+
+void close_systemcass() {
+    unlink();
+    if (print_user_resources) {
+        usage.stop();
+        unsigned int d = usage;
+        cerr << "Performances\n" "------------\n";
+        cerr << "Time elapsed (sec) : " << d << endl;
+        cerr << "Cycles done        : " << nb_cycles << endl;
+        if (d == 0) {
+            cerr << "Performance (c/s)  : N/A" << endl;
+        }
+        else {
+            cerr << "Performance (c/s)  : " << nb_cycles / d << endl;
+        }
+        // cerr << "Memory used        : " << usage.get_memory_size () << endl;
+    }
+}
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/global_functions.h
===================================================================
--- /sources/src/global_functions.h	(revision 51)
+++ /sources/src/global_functions.h	(revision 52)
@@ -1,13 +1,13 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                 global_functions.h                |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                                                             |
-| Date    :                   09_07_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                 global_functions.h                |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   09_07_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 #ifndef __GLOBAL_FUNCTIONS_H__
 #define __GLOBAL_FUNCTIONS_H__
@@ -23,32 +23,30 @@
 enum sc_stop_mode
 {
-  SC_STOP_FINISH_DELTA,
-  SC_STOP_IMMEDIATE
+    SC_STOP_FINISH_DELTA,
+    SC_STOP_IMMEDIATE
 };
-
 /////////////////////////
 
-
-extern int main(int argc, char *argv[]);
+extern int main(int argc, char * argv[]);
 
 extern void sc_initialize(void);
 
-//extern void next_cycle(void);
-extern void         sc_start         (double d_val)  __attribute__((deprecated));
-extern void         sc_start         ();
-extern void         sc_start         ( const sc_time& duration );
-extern void         sc_start         (double d_val, sc_time_unit d_tu);
-extern void         sc_stop          ();
-extern void         sc_set_stop_mode (sc_stop_mode);
+extern void sc_start(double d_val)  __attribute__((deprecated));
+extern void sc_start();
+extern void sc_start(const sc_time & duration );
+extern void sc_start(double d_val, sc_time_unit d_tu);
+extern void sc_stop();
+extern void sc_set_stop_mode (sc_stop_mode);
 extern sc_stop_mode sc_get_stop_mode ();
 
-extern const char *sc_gen_unique_name (const char *basename_);
+extern const char * sc_gen_unique_name(const char * basename_);
 
 /////////////////////////
 ///// SYSTEMCASS_SPECIFIC
-extern void close_systemcass   ();
-extern bool run_schedule_editor (const char*);
-extern const char *temporary_dir;
-extern const char *generated_files_dir;
+
+extern void close_systemcass();
+extern bool run_schedule_editor(const char *);
+extern const char * temporary_dir;
+extern const char * generated_files_dir;
 
 /////////////////////////
@@ -65,2 +63,13 @@
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/graph.cc
===================================================================
--- /sources/src/graph.cc	(revision 51)
+++ /sources/src/graph.cc	(revision 52)
@@ -1,15 +1,15 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                 graph.cc                          |
-|                                                             |
-| Author  :                 Petrot Frédéric                   |
-|                           Taktak Sami                       |
-|                           Buchmann Richard                  |
-|                                                             |
-| Date    :                   09_07_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                 graph.cc                          |
+  |                                                             |
+  | Author  :                 Petrot Frédéric                   |
+  |                           Taktak Sami                       |
+  |                           Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   09_07_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -121,29 +121,27 @@
 /* Sorry for that, Mr Knuth :-) */
 
-Graph *gb_new_graph(int n)
-{
-Graph *g;
-
-   g = (Graph *) malloc(sizeof(Graph));
-   g->n = n;
-   if (n)
-   {
-     g->vertices = (Vertex *) malloc(n * sizeof(Vertex));
-     (void)memset(g->vertices, 0, n * sizeof(Vertex));
-   } else {
-     g->vertices = NULL;
-   }
-   return g;
-}
-
-static void gb_new_arc(Vertex *u, Vertex *v, long l)
-{
-Arc *a;
-
-   a       = (Arc *) malloc(sizeof(Arc));
-   a->next = u->arcs;
-   u->arcs = a;
-   a->tip  = v;
-   a->len  = l;
+Graph * gb_new_graph(int n) {
+    Graph * g;
+
+    g = (Graph *) malloc(sizeof(Graph));
+    g->n = n;
+    if (n) {
+        g->vertices = (Vertex *) malloc(n * sizeof(Vertex));
+        (void) memset(g->vertices, 0, n * sizeof(Vertex));
+    }
+    else {
+        g->vertices = NULL;
+    }
+    return g;
+}
+
+
+static void gb_new_arc(Vertex * u, Vertex * v, long l) {
+    Arc * a;
+    a = (Arc *) malloc(sizeof(Arc));
+    a->next = u->arcs;
+    u->arcs = a;
+    a->tip = v;
+    a->len = l;
 }
 
@@ -152,18 +150,21 @@
 #define VERTEX 220898
 
-#define type     u.I
-
-void new_arc(Vertex *u, Vertex *v)
-{
-Arc *a;
+#define type u.I
+
+void new_arc(Vertex * u, Vertex * v) {
+    Arc * a;
 #ifdef CONFIG_DEBUG
-	if ((u == NULL) || (v == NULL))
-		exit(29042004);
+    if ((u == NULL) || (v == NULL)) {
+        exit(29042004);
+    }
 #endif
-   for (a = u->arcs; a; a = a->next)
-      if (a->tip == v)
-         return;
-   gb_new_arc(u, v, 0L);
-}
+    for (a = u->arcs; a != NULL; a = a->next) {
+        if (a->tip == v) {
+            return;
+        }
+    }
+    gb_new_arc(u, v, 0L);
+}
+
 
 #define rank z.I
@@ -181,131 +182,121 @@
  * to ones list the components contents (one or more vertices) */
 
-extern strong_component_list_t *strong_component(Graph *g)
-{
-  long nn;
-  Vertex *active_stack;
-  Vertex *settled_stack;
-  Vertex *vv;
-  
-  register Vertex *v;
-  
-  strong_component_list_t *strongcomponents = new strong_component_list_t;
-	typedef std::vector<void*> void_list_t;
-  void_list_t *component;
-
-  if (g->vertices == NULL)
+extern strong_component_list_t *strong_component(Graph * g) {
+    long nn;
+    Vertex * active_stack;
+    Vertex * settled_stack;
+    Vertex * vv;
+
+    register Vertex * v;
+
+    strong_component_list_t * strongcomponents = new strong_component_list_t;
+    typedef std::vector < void *>void_list_t;
+    void_list_t * component;
+
+    if (g->vertices == NULL) {
+        return strongcomponents;
+    }
+
+    /* Make all vertices unseen and all arcs untagged */
+    for (v = g->vertices + g->n - 1; v >= g->vertices; v--) {
+        v->rank = 0;
+        v->untagged = v->arcs;
+    }
+    nn = 0;
+    active_stack = settled_stack = NULL;
+
+    for (vv = g->vertices; vv < g->vertices + g->n; vv++) {
+        if (vv->rank == 0) { /* vv is still unseen */
+            v = vv;
+            v->parent = NULL;
+
+            v->rank = ++nn;
+            v->link = active_stack;
+            active_stack = v;
+            v->min = v;
+
+            do { /* Eplore one step from the current vertex v, possibly moving to another vertex 
+                           and calling it v */
+                register Vertex *u; /* a vertex adjacent to v */
+                register Arc *a = v->untagged; /* v's first remaining untagged arc, if any */
+                if (a) {
+                    u = a->tip;
+                    v->untagged = a->next; /* tag the arc from v to u */
+                    if (u->rank) { /* we've seen u already */
+                        if (u->rank < v->min->rank) { /* non-tree arc, jutt update v->min */
+                            v->min = u;
+                        }
+                    }
+                    else { /* u is presently unseen */
+                        u->parent = v; /* the arcfrom v to u is a new tree arc */
+                        v = u; /* u will now be the currnt vertex */
+                        v->rank = ++nn; /* make vertex v active */
+                        v->link = active_stack;
+                        active_stack = v;
+                        v->min = v;
+                    }
+                }
+                else { /* all arcs from v are tagged, so v matures */
+                    u = v->parent; /* prepare to backtrack in the tree */
+                    if (v->min == v) {
+                        /* Remove v and all its successors on the activestack from the tree,
+                           and mark them as a strong component of the graph */
+                        register Vertex * t; /* runs though the vertices of the new strong component */
+
+                        t = active_stack;
+                        active_stack = v->link;
+                        v->link = settled_stack;
+                        settled_stack = t; /* we've moved the top of one stack to the other */
+                        component = new void_list_t;
+                        /* singe vetex */
+                        if (t != v) { /* NOT singe vetex */
+                            while (t != v) {
+                                component->push_back(t->data);
+                                t->rank = infinity; /* now t is settled */
+                                t->parent = v; /* and v represents the new strong component */
+                                t = t->link;
+                            }
+                        }
+                        component->push_back(v->data);
+                        strongcomponents->push_back(component);
+                        v->rank = infinity; /* v too is settled */
+                        v->parent = v; /* and represents its own strong component */
+                    }
+                    else {
+                        /* the arc from u to v has just matured, making v->min visible from u */
+                        if (v->min->rank < u->min->rank) {
+                            u->min = v->min;
+                        }
+                    }
+                    v = u;/* the former parent of v is the new current vertex v */
+                }
+            } while (v != NULL);
+        }
+    }
+
     return strongcomponents;
-
- /* Make all vertices unseen and all arcs untagged */
- for (v = g->vertices + g->n - 1; v >= g->vertices; v--) {
-   v->rank = 0;
-   v->untagged = v->arcs;
- }
- nn = 0;
- active_stack = settled_stack = NULL;
-
- for (vv = g->vertices; vv < g->vertices + g->n; vv++)
-   if (vv->rank == 0) { /* vv is still unseen */
-     v = vv;
-     v->parent = NULL;
-     
-     v->rank = ++nn;
-     v->link = active_stack;
-     active_stack = v;
-     v->min = v;
-     
-     do { /* Eplore one step from the current vertex v, possibly moving to another vertex 
-	     and calling it v */
-       register Vertex *u;               /* a vertex adjacent to v */
-       register Arc *a = v->untagged;    /* v's first remaining untagged arc, if any */
-       if (a) {
-	 u = a->tip;
-	 v->untagged = a->next;    /* tag the arc from v to u */
-	 if (u->rank) {    /* we've seen u already */
-	   if (u->rank < v->min->rank) /* non-tree arc, jutt update v->min */
-	     v->min = u;
-	 } else {   /* u is presently unseen */
-	   u->parent = v; /* the arcfrom v to u is a new tree arc */
-	   v = u;         /* u will now be the currnt vertex */
-	   v->rank = ++nn;  /* make vertex v active */
-	   v->link = active_stack;
-	   active_stack = v;
-	   v->min = v;
-	 }
-       } else { /* all arcs from v are tagged, so v matures */
-	 u = v->parent; /* prepare to backtrack in the tree */
-	 if (v->min == v) {
-	   /* Remove v and all its successors on the activestack from the tree,
-	      and mark them as a strong component of the graph */
-	   register Vertex *t; /* runs though the vertices of the new strong component */
-	   
-	   t = active_stack;
-	   active_stack = v->link;
-	   v->link = settled_stack;
-	   settled_stack = t; /* we've moved the top of one stack to the other */
-	   component = new void_list_t;
-	   /* singe vetex */
-	   if (t != v) { /* NOT singe vetex */
-	     while (t != v) {
-	       component->push_back(t->data);
-	       t->rank = infinity; /* now t is settled */
-	       t->parent = v;  /* and v represents the new strong component */
-	       t = t->link;
-	     }
-	   }
-	   component->push_back(v->data);
-	   strongcomponents->push_back(component);
-	   v->rank = infinity; /* v too is settled */
-	   v->parent = v; /* and represents its own strong component */
-	 } else /* the arc from u to v has just matured, making v->min visible from u */
-	   if (v->min->rank < u->min->rank) u->min = v->min;
-	 v = u; /* the former parent of v is the new current vertex v */
-       }
-     } while (v != NULL);
-   }
-
- return strongcomponents;
-}
-
-bool 
-has_cycle (const strong_component_list_t &l)
-{	
-	strong_component_list_t::const_iterator it;
-	for (it = l.begin (); it != l.end (); ++it)
-	{
-		if ((*it)->size() > 1)
-			return true;
-	}
-	return false;
-}
-
-#if 0
-const component_list_t*
-get_cycle (const strong_component_list_t &l)
-{	
-	strong_component_list_t::const_iterator it;
-	for (it = l.begin (); it != l.end (); ++it)
-	{
-    const component_list_t *c = *it;
-		if (c->size() > 1)
-			return c;
-	}
-	return NULL;
-}
-
-void
-print_cycle (std::ostream &o, 
-             const component_list_t *c)
-{
-  if (c == NULL)
-    return;
-  component_list_t::const_iterator it;
-  for (it = c->begin (); it != c->end (); ++it)
-  {
-    void *v = *it;
-    o << hex << (int) v << " ";
-  }
-  o << "\n";
-}
-#endif
-
+}
+
+
+bool has_cycle(const strong_component_list_t & l) {
+    strong_component_list_t::const_iterator it;
+    for (it = l.begin(); it != l.end(); ++it) {
+        if ((*it)->size() > 1) {
+            return true;
+        }
+    }
+    return false;
+}
+
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/graph.h
===================================================================
--- /sources/src/graph.h	(revision 51)
+++ /sources/src/graph.h	(revision 52)
@@ -1,15 +1,15 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                 graph.h                           |
-|                                                             |
-| Author  :                 Pétrot Frédéric                   |
-|                           Taktak Sami                       |
-|                           Buchmann Richard                  |
-|                                                             |
-| Date    :                   09_07_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                 graph.h                           |
+  |                                                             |
+  | Author  :                 Pétrot Frédéric                   |
+  |                           Taktak Sami                       |
+  |                           Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   09_07_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 #ifndef __GRAPH_H__
 #define __GRAPH_H__
@@ -26,53 +26,61 @@
 
 enum vertex_type {
-   CONNECTOR = 0x0, INSTANCE = 0x4, STRONG_COMPONENT = 0x8
+    CONNECTOR = 0x0, INSTANCE = 0x4, STRONG_COMPONENT = 0x8
 };
 
-#define KEEP_ARC 240898
+//#define KEEP_ARC 240898
 
 typedef union {
-   struct vertex_struct *V;
-   struct arc_struct *A;
-   struct graph_struct *G;
-   char *S;
-   long I;
+    struct vertex_struct * V;
+    struct arc_struct * A;
+    struct graph_struct * G;
+    char * S;
+    long I;
 } util;
 
 typedef struct vertex_struct {
-  struct arc_struct *arcs;
-	union {
-		void             *data;
-	};
-  util u, v, w, x, y, z;
+    struct arc_struct * arcs;
+    union {
+        void * data;
+    };
+    util u, v, w, x, y, z;
 } Vertex;
 
 typedef struct arc_struct {
-   struct vertex_struct *tip;
-   struct arc_struct *next;
-   long len;
-   util a, b;
+    struct vertex_struct * tip;
+    struct arc_struct * next;
+    long len;
+    util a, b;
 } Arc;
 
-#define ID_FIELD_SIZE 161
+//#define ID_FIELD_SIZE 161
 typedef struct graph_struct {
-   Vertex *vertices;
-   long n;
-   long m;
-   char *id;
-   util uu, vv, ww, xx, yy, zz;
+    Vertex * vertices;
+    long n;
+    long m;
+    char * id;
+    util uu, vv, ww, xx, yy, zz;
 } Graph;
 
-extern Graph *gb_new_graph(int n);
-extern void new_arc(Vertex *u, Vertex *v);
+extern Graph * gb_new_graph(int n);
+extern void new_arc(Vertex * u, Vertex * v);
 
 typedef std::vector<void *> component_list_t;
 typedef std::vector<component_list_t *> strong_component_list_t;
-extern strong_component_list_t *strong_component(Graph *g);
+extern strong_component_list_t * strong_component(Graph * g);
 
-extern bool                    has_cycle   (const strong_component_list_t&);
-#if 0
-extern const component_list_t* get_cycle   (const strong_component_list_t&);
-extern void                    print_cycle (std::ostream&,const component_list_t*);
-#endif
+extern bool has_cycle(const strong_component_list_t &);
 
 #endif /* __GRAPH_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/graph_cass.cc
===================================================================
--- /sources/src/graph_cass.cc	(revision 51)
+++ /sources/src/graph_cass.cc	(revision 52)
@@ -1,15 +1,15 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                 graph_cass.cc                     |
-|                                                             |
-| Author  :                 Petrot Frédéric                   |
-|                           Taktak Sami                       |
-|                           Buchmann Richard                  |
-|                                                             |
-| Date    :                   09_07_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                 graph_cass.cc                     |
+  |                                                             |
+  | Author  :                 Petrot Frédéric                   |
+  |                           Taktak Sami                       |
+  |                           Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   09_07_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -107,12 +107,12 @@
  * bug fix :
  * - allow the use of user-defined structs in sc_signal/sc_in/sc_out/sc_inout
- * - use sc_dt namespace like official SystemC engine
- *
- * add :
- * - dump the signal/port/module dependancy graph in dot format
- *
- * Graph library is now splitted from the SystemCASS specific code.
- *
- */
+* - use sc_dt namespace like official SystemC engine
+*
+* add :
+* - dump the signal/port/module dependancy graph in dot format
+*
+* Graph library is now splitted from the SystemCASS specific code.
+*
+*/
 
 #include <iostream>
@@ -129,5 +129,5 @@
 #include "entity.h"
 #include "simplify_string.h" // simplify_string
-#include "sc_ver_ext.h"      // sc_version for dumping to DOT
+#include "sc_ver_ext.h" // sc_version for dumping to DOT
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -138,93 +138,50 @@
 namespace sc_core {
 
-#if 0
-static
-ostream& operator << (ostream& o,
-		      const Vertex & v)
-{
-#if 0
-      if (v.arcs == NULL)
-	o << v.name << "(" << v.module->ins_name << ")->(none)\n";
-      Arc *a;
-      for (a = v.arcs; a; a = a->next)
-	o << v.name << "(" << v.module->ins_name << ")->"
-		<< a->tip->name << "(" << a->tip->module << ")\n";
-  return o;
-#endif
-	method_process_t* m = (method_process_t*)(v.data);
-  if (v.arcs == NULL)
-	  o << *m << "\n";
-  Arc *a;
-  for (a = v.arcs; a; a = a->next) {
-	  method_process_t* m2 = (method_process_t*)(a->tip->data);
-    o << *m << "->"
-		  << *m2 << ")\n";
-	}
-  return o;
-
-}
-#endif
-
-#if 0
-static
-ostream& 
-operator << (ostream &o,
-		         const Graph &g)
-{
-  Vertex     *v;
-    for (v = g.vertices; v < g.vertices + g.n; v++) {
-	o << *v;
-    }
-    return o;
-}
-#endif
-
-std::map<const method_process_t*,Vertex*> m_v;
-
-/* Ajoute un arc */ 
-void add_arcs(const method_process_t &mp, const sc_module &module)
-{
-	std::map<const method_process_t*,Vertex*>::iterator i;
-  for (i =	m_v.begin ();	 i != m_v.end (); ++i) {
-	  if (i->first->module == &module)
-			new_arc (m_v[&mp],i->second);
-	}
-}
-
-/* Ajoute un arc */ 
-void add_arcs(const  method_process_t &mp,
-              tab_t *signal_pointer)
-{
-  equi_t &e = get_equi (signal_pointer);
-  equi_t::iterator i;
-  for (i = e.begin (); i != e.end (); ++i) {
-		const char *kind = i->kind ();
-    if (strstr (kind,"out")) {
-			const sc_port_base &port = *(i->port);
-		  const sc_module &module = port.get_module ();
-			if (&module == mp.module)
-				continue;
-			add_arcs (mp, module);
-      break;
-		}
-  }
-}
-
-void
-add_arcs(const method_process_t &mp)
-{
-  sensitivity_list_t::const_iterator port_bound;
-	for (port_bound = mp.sensitivity_list.begin(); port_bound != mp.sensitivity_list.end(); ++port_bound) {
-      // pour tous les ports/signaux p associés à la fonction au couple m
-      	/* si pp est un port de sortie d'une autre fonction de mealy,
-	   crée un arc entre m et mm */
-	/* on ne peut pas savoir si un port est la sortie d'une fonction de mealy. 
-	   on va donc chercher à savoir si c'est un port de sortie d'un automate de moore,
-	   sinon on considère que c'est une sortie de mealy.
-	*/
-
-      add_arcs(mp, port_bound->get_interface().get_pointer ());
-    }
-}
+std::map < const method_process_t *, Vertex * >m_v;
+
+/* Ajoute un arc */
+void add_arcs(const method_process_t & mp, const sc_module & module) {
+    std::map < const method_process_t *, Vertex * >::iterator i;
+    for (i = m_v.begin(); i != m_v.end(); ++i) {
+        if (i->first->module == &module)
+            new_arc(m_v[&mp], i->second);
+    }
+}
+
+
+/* Ajoute un arc */
+void add_arcs(const method_process_t & mp, tab_t * signal_pointer) {
+    equi_t & e = get_equi(signal_pointer);
+    equi_t::iterator i;
+    for (i = e.begin(); i != e.end(); ++i) {
+        const char * kind = i->kind();
+        if (strstr(kind, "out")) {
+            const sc_port_base & port = *(i->port);
+            const sc_module & module = port.get_module();
+            if (&module == mp.module) {
+                continue;
+            }
+            add_arcs(mp, module);
+            break;
+        }
+    }
+}
+
+
+void add_arcs(const method_process_t & mp) {
+    sensitivity_list_t::const_iterator port_bound;
+    for (port_bound = mp.sensitivity_list.begin();
+            port_bound != mp.sensitivity_list.end(); ++port_bound) {
+        // pour tous les ports/signaux p associés à la fonction au couple m
+        /* si pp est un port de sortie d'une autre fonction de mealy,
+           crée un arc entre m et mm */
+        /* on ne peut pas savoir si un port est la sortie d'une fonction de mealy. 
+           on va donc chercher à savoir si c'est un port de sortie d'un automate de moore,
+           sinon on considère que c'est une sortie de mealy.
+           */
+        add_arcs(mp, port_bound->get_interface().get_pointer());
+    }
+}
+
 
 /* Construit le graph de dépendance des signaux de Mealy */
@@ -238,178 +195,121 @@
    Vertex is an array of (method_process_t*)
    Edge is a couple Vertex->Vertex.
+   */
+extern Graph * makegraph(const method_process_list_t * lm) {
+    method_process_list_t::const_iterator mp;
+
+    int n = 0; /* Number of vertices */
+    Graph * g;
+    Vertex * v;
+
+    /* Compute the number of vertices in the graph:
+     * The vertices set is the method set. */
+
+    /*  for (m = lm->begin(); m != lm->end(); m++)
+        n++;*/
+    n = lm->size();
+
+    /* Create the graph */
+    g = gb_new_graph(n);
+
+    /* Associate the netlist elements to the graph vertices, and vice-versa */
+    v = g->vertices;
+
+    /* initialisation des vertices */
+    for (mp = lm->begin(); mp != lm->end(); ++mp) {
+        v->data = *mp;
+        m_v[*mp] = v++;
+    }
+
+    for (mp = lm->begin(); mp != lm->end(); ++mp) {
+        // pour tous couples m, instance module/function de la liste lm
+        add_arcs(**mp);
+    }
+
+    return g;
+}
+
+
+static string & get_method_process_fullname(string & name, const method_process_t & mp) {
+    sc_module * module = mp.module;
+    name = module->name();
+    name += "_";
+    name += mp.name;
+    return name;
+}
+
+
+static bool dot_write(ofstream & o, const Graph & g) {
+    string name1, name2, s;
+    // Printing into dot file
+    for (int i = 0; i < g.n; ++i) { // Printing node list
+        Vertex * v = g.vertices + i;
+        method_process_t *mp = (method_process_t *) (v->data);
+        get_method_process_fullname(name1, *mp);
+        const char * pname1 = name1.c_str();
+        o << "node [name=";
+        o.width(35);
+        o << simplify_name(pname1, s);
+        o << "];\n";
+    }
+    for (int i = 0; i < g.n; ++i) { // Printing edge list
+        Vertex * v1 = g.vertices + i;
+        method_process_t *mp1 = (method_process_t *) (v1->data);
+        get_method_process_fullname(name1, *mp1);
+        const char * pname1 = name1.c_str();
+        for (Arc * a = v1->arcs; a != NULL; a = a->next) {
+            Vertex *v2 = a->tip;
+            method_process_t * mp2 = (method_process_t *) (v2->data);
+            get_method_process_fullname(name2, *mp2);
+            const char * pname2 = name2.c_str();
+            o.width(35);
+            o << simplify_name(pname2, s);
+            o << " -> ";
+            o.width(35);
+            o << simplify_name(pname1, s);
+            o << ";\n";
+        }
+    }
+    return true;
+}
+
+extern bool graph2dot(const char * name, const Graph & g) {
+    if (!name) {
+        return false;
+    }
+    string filename;
+    filename = name;
+    filename += ".dot";
+    ofstream o;
+    o.open(filename.c_str(), ios::out | ios::trunc);
+    if (o.is_open() == false) {
+        return false;
+    }
+    o << "// Module dependency graph\n// Generated by " << sc_version() << "\n";
+    o << "strict digraph " << name << " {\n";
+    o << "node [shape=box];\n";
+    //       "concentrate=true;\n";
+    o << left;
+    dot_write(o, g);
+    // Closing dot file
+    o << "}\n";
+    o.close();
+    if (dump_stage) {
+        cerr << "Module dependency graph written into '" << filename << "'.\n";
+    }
+    return true;
+}
+
+} // end of sc_core namespace
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
 */
-extern Graph*
-makegraph (const method_process_list_t *lm)
-{
-  method_process_list_t::const_iterator mp;
-
-  int         n = 0; /* Number of vertices */
-  Graph      *g;
-  Vertex     *v;
-  
-  /* Compute the number of vertices in the graph:
-   * The vertices set is the method set. */
-  
-/*  for (m = lm->begin(); m != lm->end(); m++)
-    n++;*/
-  n = lm->size ();
-  
-  /* Create the graph */
-  g = gb_new_graph(n);
-
-  /* Associate the netlist elements to the graph vertices, and vice-versa */
-  v = g->vertices;
-
-  /* initialisation des vertices */
-  for (mp = lm->begin(); mp != lm->end(); ++mp) {
-    v->data = *mp;
-    m_v[*mp] = v++;
-  }
-
-  for (mp = lm->begin(); mp != lm->end(); ++mp) { 
-    // pour tous couples m, instance module/function de la liste lm
-    add_arcs (**mp);
-  }
-
-  return g;
-}   
-
-/* 
-void 
-dot_write_edge (const  method_process_t &mp,
-                tab_t *signal_pointer)
-{
-  equi_t &e = get_equi (signal_pointer);
-  equi_t::iterator i;
-  for (i = e.begin (); i != e.end (); ++i) {
-		const char *kind = i->kind ();
-    if (strstr (kind,"out")) {
-			const sc_port_base &port = *(i->port);
-		  const sc_module &module = port.get_module ();
-			if (&module == mp.module)
-				continue;
-			add_arcs (mp, module);
-	    o << "edge [label="
-        << "];\n";
-      o	<< " -> ";
-      o << ";\n";
-		}
-  }
-}
-
-static
-bool
-dot_write_edge (ofstream &o,
-                const method_process_t &mp)
-{
-  sensitivity_list_t::const_iterator port_bound;
-	for (port_bound = mp.sensitivity_list.begin(); port_bound != mp.sensitivity_list.end(); ++port_bound)
-      dot_write_edge (o, mp, port_bound->get_interface().get_pointer ());
-}
-
-static
-bool
-dot_write (ofstream &o,
-           const method_process_list_t &lm)
-{
-  // Printing into dot file
-  string s;
-  method_process_list_t::const_iterator mp;
-  for (mp = lm.begin(); mp != lm.end(); ++mp) {
-    method_process_t *amp = *mp;
-    sc_module *module = amp->module;
-    o << "node [name="
-//      << simplify_name(module.get_name().c_str(),s)
-      << "];\n";
-  }
-  for (mp = lm->begin(); mp != lm->end(); ++mp)
-    dot_write (o, **mp);
-}
-*/
-
-static
-string&
-get_method_process_fullname (string &name, 
-                             const method_process_t &mp)
-{
-  sc_module *module = mp.module;
-  name = module->name ();
-  name += "_";
-  name += mp.name;
-  return name;
-}
-
-static
-bool
-dot_write (ofstream &o,
-           const Graph &g)
-{
-  string name1,name2,s;
-  // Printing into dot file
-  for (int i = 0; i < g.n; ++i)
-  { // Printing node list
-    Vertex *v = g.vertices + i;
-    method_process_t *mp     = (method_process_t*) (v->data);
-    get_method_process_fullname (name1,*mp);
-    const char *pname1 = name1.c_str();
-    o << "node [name=";
-    o.width (35);
-    o << simplify_name(pname1,s);
-    o << "];\n";
-  }
-  for (int i = 0; i < g.n; ++i)
-  { // Printing edge list
-    Vertex *v1 = g.vertices + i;
-    method_process_t *mp1     = (method_process_t*) (v1->data);
-    get_method_process_fullname (name1,*mp1);
-    const char *pname1 = name1.c_str();
-    for (Arc *a = v1->arcs; a != NULL; a = a->next)
-    {
-      Vertex *v2 = a->tip;
-      method_process_t *mp2 = (method_process_t*) (v2->data);
-      get_method_process_fullname (name2,*mp2);
-      const char *pname2 = name2.c_str();
-      o.width (35);
-      o << simplify_name(pname2,s);
-      o << " -> ";
-      o.width (35);
-      o << simplify_name(pname1,s);
-      o << ";\n";
-    }
-  }
-
-  return true;
-}
-
-extern bool
-graph2dot (const char *name,
-           const Graph &g)
-{
-	if (!name)
-		return false;
-	string filename;
-	filename =  name;
-	filename += ".dot";
-	ofstream o;
-  o.open (filename.c_str(),ios::out | ios::trunc);
-	if (o.is_open () == false)
-		return false;
-	o << "// Module dependency graph\n"
-       "// Generated by "
-    << sc_version () << "\n";
-	o << "strict digraph " << name << " {\n";
-  o << "node [shape=box];\n";
-//       "concentrate=true;\n";
-  o << left;
-	dot_write (o,g);
-  // Closing dot file
-	o << "}\n";
-	o.close ();
-  if (dump_stage)
-    cerr << "Module dependency graph written into '" 
-         << filename << "'.\n";
-	return true;
-}
-
-} // end of sc_core namespace
-
+
Index: /sources/src/graph_cass.h
===================================================================
--- /sources/src/graph_cass.h	(revision 51)
+++ /sources/src/graph_cass.h	(revision 52)
@@ -20,6 +20,6 @@
 
 /* A unique exported function from all that */
-extern Graph *makegraph(const method_process_list_t *);
-extern bool   graph2dot(const char*,const Graph&);
+extern Graph * makegraph(const method_process_list_t *);
+extern bool graph2dot(const char *, const Graph&);
 
 } // end of sc_core namespace
Index: /sources/src/graph_signals.cc
===================================================================
--- /sources/src/graph_signals.cc	(revision 51)
+++ /sources/src/graph_signals.cc	(revision 52)
@@ -1,13 +1,13 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                 graph_signals.cc                  |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                                                             |
-| Date    :                   22_09_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                 graph_signals.cc                  |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   22_09_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -138,4 +138,5 @@
 #include "sc_module.h"
 #include "sc_port.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -146,110 +147,79 @@
 namespace sc_core {
 
-#if 0
-static
-ostream& operator << (ostream&      o,
-                      const Vertex &v)
-{
-	equi_t* m = (equi_t*)(v.data);
-  if (v.arcs == NULL)
-	  o << get_name(*m) << "\n";
-  Arc *a;
-  for (a = v.arcs; a; a = a->next)
-	{
-	  equi_t* m2 = (equi_t*)(a->tip->data);
-	  o << get_name(*m) << "->"
-		  << get_name(*m2) << "\n";
-	}
-  return o;
-
-}
-
-static
-ostream& 
-operator << (ostream     &o,
-             const Graph &g)
-{
-  Vertex *v;
-  int     i = 1;
-  for (v = g.vertices; v < g.vertices + g.n; ++v) {
-    o << i++ << " : " << *v;
-  }
-  return o;
-}
-#endif
-
-typedef std::map<const equi_t*, Vertex*> nodes_set_t;
-
-void
-create_arcs (const SignalDependencyGraph& sig_g, nodes_set_t& s)
-{
-  SignalDependencyGraph::const_iterator j;
-  for (j = sig_g.begin(); j != sig_g.end(); ++j) { 
-    new_arc (s[j->source],s[j->destination]);
-  }
-}
-
-void
-create_vertices_list (Graph *g, nodes_set_t& s)
-{
-	Vertex *v = g->vertices;
-  if (v == NULL)
-    return;
-  nodes_set_t::iterator j;
-  for (j = s.begin(); j != s.end(); ++j) 
-  {
-		v->data   = (void*) (j->first);
-		j->second = v++;
-	}	
-}
-
-nodes_set_t*
-create_nodes_set (const SignalDependencyGraph& sig_g)
-{
-	/* Create a signal set */
-	nodes_set_t &s = *(new nodes_set_t);
-
-  SignalDependencyGraph::const_iterator j;
-  for (j = sig_g.begin(); j != sig_g.end(); ++j) 
-  {
-		s[j->source] = NULL;
-		s[j->destination] = NULL;
-  }
-	return &s;
-}
+
+typedef std::map < const equi_t *, Vertex * >nodes_set_t;
+
+void create_arcs(const SignalDependencyGraph & sig_g, nodes_set_t & s) {
+   SignalDependencyGraph::const_iterator j;
+   for (j = sig_g.begin(); j != sig_g.end(); ++j) {
+      new_arc(s[j->source], s[j->destination]);
+   }
+}
+
+
+void create_vertices_list(Graph * g, nodes_set_t & s) {
+   Vertex * v = g->vertices;
+   if (v == NULL) {
+      return;
+   }
+   nodes_set_t::iterator j;
+   for (j = s.begin(); j != s.end(); ++j) {
+      v->data = (void *) (j->first);
+      j->second = v++;
+   }
+}
+
+
+nodes_set_t * create_nodes_set(const SignalDependencyGraph & sig_g) {
+   /* Create a signal set */
+   nodes_set_t & s = *(new nodes_set_t);
+
+   SignalDependencyGraph::const_iterator j;
+   for (j = sig_g.begin(); j != sig_g.end(); ++j) {
+      s[j->source] = NULL;
+      s[j->destination] = NULL;
+   }
+   return &s;
+}
+
 
 /* Construit le graph de dépendance des signaux de Mealy */
 /* g = Mealy signal dependancy graph */
-Graph *makegraph(const SignalDependencyGraph& sig_g)
-{
-  int         n = 0; /* Number of vertices */
-  Graph      *g;
-  //Vertex     *v;
-  
-	/* Create node set */
-	nodes_set_t *sig_s = create_nodes_set (sig_g);
-
-  /* Compute the number of vertices in the graph */
-  n = sig_s->size();
-  
-  /* Create the graph */
-  g = gb_new_graph(n);
-
-  /* Associate the netlist elements to the graph vertices, and vice-versa */
-//  v = g->vertices;
-
-	/* Create the node set */
-  create_vertices_list (g,*sig_s);
-
-  /* initialisation des vertices */
-	create_arcs (sig_g,*sig_s);
-
-	delete sig_s;
-#if 0
-	cerr << *g << "\n";
-#endif
-  return g;
-}   
+Graph * makegraph(const SignalDependencyGraph & sig_g) {
+   int n = 0; /* Number of vertices */
+   Graph * g;
+
+   /* Create node set */
+   nodes_set_t * sig_s = create_nodes_set(sig_g);
+
+   /* Compute the number of vertices in the graph */
+   n = sig_s->size();
+
+   /* Create the graph */
+   g = gb_new_graph(n);
+
+   /* Create the node set */
+   create_vertices_list(g, *sig_s);
+
+   /* initialisation des vertices */
+   create_arcs(sig_g, *sig_s);
+
+   delete sig_s;
+
+   return g;
+}
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
+
Index: /sources/src/graph_signals.h
===================================================================
--- /sources/src/graph_signals.h	(revision 51)
+++ /sources/src/graph_signals.h	(revision 52)
@@ -19,5 +19,5 @@
 namespace sc_core {
 
-extern Graph *makegraph(const SignalDependencyGraph&);
+extern Graph * makegraph(const SignalDependencyGraph&);
 
 } // end of sc_core namespace
Index: /sources/src/hex2string.cc
===================================================================
--- /sources/src/hex2string.cc	(revision 51)
+++ /sources/src/hex2string.cc	(revision 52)
@@ -1,13 +1,13 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                 hex2string.cc                     |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                                                             |
-| Date    :                   09_07_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                 hex2string.cc                     |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   09_07_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -36,38 +36,38 @@
 #include "hex2string.h"
 
-//#include <string>
 #include <stdarg.h>
 #include <cstdio>
 #include <cstdlib>
 #include <iostream>
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-	
+
 using namespace std;
 
 namespace sc_core {
 
-void 
-hex2string(char        *buf,
-           const tab_t *val,
-           int          bit_number)
-{
-	int tmp=*((const int*)val);
- 	//cout << "tmp = " << tmp << "\n";	
-	buf[bit_number >> 2]='\0';
-	for (int i = (bit_number >> 2) - 1; i >= 0 ;i--) 
-	{
-		char value = tmp & 0x0F;
-		buf[i]=(value > 9)?('A' + value - 10):('0'+value);
-		tmp=tmp>>4;
-	}
-#if 0
-  sscanf (buf, "%X", &tmp);
-  if (atoi (buf) != *val)
-    cerr << "hex2string (0x" << hex << *val << ") returns 0x" << buf << "    KO !\n";
-#endif	
+void hex2string(char * buf, const tab_t * val, int bit_number) {
+    int tmp = *((const int *) val);
+    buf[bit_number >> 2]='\0';
+    for (int i = (bit_number >> 2) - 1; i >= 0 ;i--) {
+        char value = tmp & 0x0F;
+        buf[i] = (value > 9) ? ('A' + value - 10) : ('0'+value);
+        tmp = tmp >> 4;
+    }
 }
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/hex2string.h
===================================================================
--- /sources/src/hex2string.h	(revision 51)
+++ /sources/src/hex2string.h	(revision 52)
@@ -17,7 +17,8 @@
 namespace sc_core {
 
-extern void hex2string(char *buf,const tab_t *val,int bit_number);
+extern void hex2string(char * buf,const tab_t * val,int bit_number);
 
 } // end of sc_core namespace
 
 #endif
+
Index: /sources/src/internal.h
===================================================================
--- /sources/src/internal.h	(revision 51)
+++ /sources/src/internal.h	(revision 52)
@@ -21,5 +21,5 @@
 
 // Method Process List
-extern method_process_t *method;
+extern method_process_t * method;
 extern method_process_list_t method_process_list;
 
@@ -29,42 +29,44 @@
 
 // Hash Table Port -> Module
-typedef std::map</*const */sc_port_base*, const sc_module*> port2module_t;
+typedef std::map</*const */sc_port_base *, const sc_module *> port2module_t;
 extern port2module_t port2module;
 
 // Functions for Elaboration step
-void sort_equi_list ();
-void create_signals_table ();
-void bind_to_table ();
+void sort_equi_list();
+void create_signals_table();
+void bind_to_table();
 
 // Debug Functions
-void print_table (std::ostream&);
-void print_table_stats (std::ostream&);
-void print_registers_writing_stats (std::ostream&);
+void print_table(std::ostream&);
+void print_table_stats(std::ostream&);
+void print_registers_writing_stats(std::ostream&);
 
-extern bool   is_clock (const sc_interface &inter);
+extern bool is_clock(const sc_interface &inter);
 
 // Flags
-extern bool        check_port_dependencies;
-extern bool        dump_all_graph;
-extern const char* dump_module_hierarchy;
-extern bool        dump_netlist_info;
-extern bool        dump_funclist_info;
-extern bool        dynamic_link_of_scheduling_code;
-extern bool        keep_generated_code;
-extern bool        nosimulation;
-extern bool        notrace;
-extern bool        print_user_resources;
-extern char*       save_on_exit;
-extern int         scheduling_method;
-extern bool        use_port_dependency;
-extern bool        use_openmp;
+extern bool check_port_dependencies;
+extern bool dump_all_graph;
+extern const char * dump_module_hierarchy;
+extern bool dump_netlist_info;
+extern bool dump_funclist_info;
+extern bool dynamic_link_of_scheduling_code;
+extern bool keep_generated_code;
+extern bool nosimulation;
+extern bool notrace;
+extern bool print_user_resources;
+extern char * save_on_exit;
+extern int scheduling_method;
+extern bool use_port_dependency;
+extern bool use_openmp;
 
-#define NO_SCHEDULING          0
-#define BUCHMANN_SCHEDULING    1
-#define MOUCHARD_SCHEDULING    2
-#define CASS_SCHEDULING        4
+#define NO_SCHEDULING       0
+#define BUCHMANN_SCHEDULING 1
+#define MOUCHARD_SCHEDULING 2
+#define CASS_SCHEDULING     4
 
 // More
+
 extern uint64 trace_start;
+
 }
 
Index: /sources/src/internal_ext.h
===================================================================
--- /sources/src/internal_ext.h	(revision 51)
+++ /sources/src/internal_ext.h	(revision 52)
@@ -38,7 +38,7 @@
 
 #include <list>
+
 #include "sc_fwd.h"
 #include "sc_nbdefs.h"
-//#include "casc.h"
 
 /*
@@ -68,16 +68,16 @@
 // Granularity of the posted write stack
 #ifdef UINT64
-	typedef uint64        tab_t;
+    typedef uint64 tab_t;
 #else
-	typedef uint32        tab_t;
-//	typedef smallest_uint tab_t; // signals of 64 bits are wrong in trace file
+    typedef uint32 tab_t;
+// typedef smallest_uint tab_t; // signals of 64 bits are wrong in trace file
 #endif
-typedef tab_t       *equi_table_t;
-extern equi_table_t  equi_table;
+typedef tab_t * equi_table_t;
+extern equi_table_t equi_table;
 
 // Flags
-extern bool   dump_stage;
-extern bool   print_schedule;
-extern bool   edit_schedule;
+extern bool dump_stage;
+extern bool print_schedule;
+extern bool edit_schedule;
 
 }
Index: /sources/src/methodprocess_dependency.cc
===================================================================
--- /sources/src/methodprocess_dependency.cc	(revision 51)
+++ /sources/src/methodprocess_dependency.cc	(revision 52)
@@ -35,9 +35,11 @@
 
 #include <cassert>
+#include <iostream>
+#include <fstream>
+
 #include "methodprocess_dependency.h"
 #include "simplify_string.h"
 #include "sc_module.h"
-#include <iostream>
-#include <fstream>
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -47,87 +49,89 @@
 namespace sc_core {
 
-string
-get_name (const method_process_t *method)
-{
-  assert(method != NULL);
-  const sc_module *module = method->module;
-  assert(module != NULL);
-  const char *module_name = module->name ();
-  const char *function_name = method->name;
-  
-  string name = module_name;
-  name += "_";
-  name += function_name;
-  return name;
+string get_name(const method_process_t * method) {
+    assert(method != NULL);
+    const sc_module *module = method->module;
+    assert(module != NULL);
+    const char * module_name = module->name();
+    const char * function_name = method->name;
+
+    string name = module_name;
+    name += "_";
+    name += function_name;
+    return name;
 }
 
-static
-bool
-dot_write (ofstream &o,
-           const SignalDependencyGraph &sig)
-{
-  // Preparing data
-  typedef map<const equi_t *, const method_process_t *> table_t;
-  table_t table;
-  
-  // For each arrow, add destination node into table
-	SignalDependencyGraph::const_iterator sig_it;
-	for (sig_it = sig.begin (); sig_it != sig.end (); ++sig_it)
-  {
-    const SignalDependency &sd     = *sig_it;
-    const equi_t           *equi   = sd.destination;
-	  const method_process_t *method = sd.method;
-    table[equi] = method;
-  }
 
-  // Printing into dot file
-	string s;
-  SignalDependencyGraph::const_iterator it;
-  for (it = sig.begin (); it != sig.end (); ++it)
-  {
-    const SignalDependency &sd = *it;
-    const equi_t           *source_equi     = sd.source;
-    assert(source_equi != NULL);
-	  const method_process_t *source_method   = table[source_equi];
-    if (source_method == NULL)
-      continue;
-    string                  source_method_name = get_name (source_method);
-    string                  source_equi_name = get_name (*source_equi);
-	  const method_process_t *destination_method = sd.method;
-    string                  destination_method_name = get_name (destination_method);
-		o << "edge [label="
-      << simplify_name(source_equi_name.c_str(),s)
-      << "];\n";
-		o << simplify_name(source_method_name.c_str(),s);
-		o	<< " -> ";
-		o << simplify_name(destination_method_name.c_str(),s);
-	  o << ";\n";
-  }
+static bool dot_write(ofstream & o, const SignalDependencyGraph & sig) {
+    // Preparing data
+    typedef map < const equi_t *, const method_process_t *>table_t;
+    table_t table;
+
+    // For each arrow, add destination node into table
+    SignalDependencyGraph::const_iterator sig_it;
+    for (sig_it = sig.begin(); sig_it != sig.end(); ++sig_it) {
+        const SignalDependency & sd = *sig_it;
+        const equi_t * equi = sd.destination;
+        const method_process_t * method = sd.method;
+        table[equi] = method;
+    }
+
+    // Printing into dot file
+    string s;
+    SignalDependencyGraph::const_iterator it;
+    for (it = sig.begin(); it != sig.end(); ++it) {
+        const SignalDependency & sd = *it;
+        const equi_t * source_equi = sd.source;
+        assert(source_equi != NULL);
+        const method_process_t * source_method = table[source_equi];
+        if (source_method == NULL) {
+            continue;
+        }
+        string source_method_name = get_name(source_method);
+        string source_equi_name = get_name(*source_equi);
+        const method_process_t *destination_method = sd.method;
+        string destination_method_name = get_name(destination_method);
+        o << "edge [label=" << simplify_name(source_equi_name.c_str(), s) << "];\n";
+        o << simplify_name(source_method_name.c_str(), s);
+        o << " -> ";
+        o << simplify_name(destination_method_name.c_str(), s);
+        o << ";\n";
+    }
 }
 
-bool 
-MethodProcessDependencyGraph2dot (const char *name,
-                                  const SignalDependencyGraph& sig)
-{
-	if (!name)
-		return false;
-	string filename;
-	filename =  name;
-	filename += ".dot";
-	ofstream o;
-  o.open (filename.c_str(),ios::out | ios::trunc);
-	if (o.is_open () == false)
-		return false;
-	o << "strict digraph " << name << " {\n";
-	dot_write (o,sig);
-  // Closing dot file
-	o << "}\n";
-	o.close ();
-  if (dump_stage)
-    cerr << "MethodProcess dependency graph written into '" 
-         << filename << "'.\n";
-	return true;
+
+bool MethodProcessDependencyGraph2dot(const char * name, const SignalDependencyGraph & sig) {
+    if (!name) {
+        return false;
+    }
+    string filename;
+    filename = name;
+    filename += ".dot";
+    ofstream o;
+    o.open(filename.c_str(), ios::out | ios::trunc);
+    if (o.is_open() == false) {
+        return false;
+    }
+    o << "strict digraph " << name << " {\n";
+    dot_write(o, sig);
+    // Closing dot file
+    o << "}\n";
+    o.close();
+    if (dump_stage) {
+        cerr << "MethodProcess dependency graph written into '" << filename << "'.\n";
+    }
+    return true;
 }
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
Index: /sources/src/methodprocess_dependency.h
===================================================================
--- /sources/src/methodprocess_dependency.h	(revision 51)
+++ /sources/src/methodprocess_dependency.h	(revision 52)
@@ -16,6 +16,8 @@
 
 namespace sc_core {
+
 // Dump to dot file
 extern bool MethodProcessDependencyGraph2dot (const char *name, const SignalDependencyGraph&);
+
 }
 
Index: /sources/src/module_hierarchy.cc
===================================================================
--- /sources/src/module_hierarchy.cc	(revision 51)
+++ /sources/src/module_hierarchy.cc	(revision 52)
@@ -1,13 +1,13 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                 module_hierarchy.cc               |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                                                             |
-| Date    :                   15_12_2005                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                 module_hierarchy.cc               |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   15_12_2005                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -34,13 +34,16 @@
  */
 
-#include "module_hierarchy.h"
-#include "sc_module.h"
 #include <cassert>
 #include <map>
+#include <cstdlib>
+#include <cstring>
+
+#include "sc_module.h"
+#include "module_hierarchy.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <cstdlib>
-#include <cstring>
+
 
 using namespace std;
@@ -48,76 +51,71 @@
 namespace sc_core {
 
-typedef vector<sc_object*> sc_object_list_t;
-typedef map<const sc_object*,sc_object_list_t> sc_object2sc_object_list_t;
-typedef map<const sc_object*,sc_object *>      sc_object2sc_object_t;
+typedef vector<sc_object *> sc_object_list_t;
+typedef map<const sc_object *, sc_object_list_t> sc_object2sc_object_list_t;
+typedef map<const sc_object*, sc_object *> sc_object2sc_object_t;
 
-sc_object_list_t            top_level_objects;
-sc_object2sc_object_list_t  object2childs;
-sc_object2sc_object_t       object2parent;
+sc_object_list_t top_level_objects;
+sc_object2sc_object_list_t object2childs;
+sc_object2sc_object_t object2parent;
 
-void
-set_parent (sc_module &mod, sc_module *parent)
-{
-  object2parent[&mod] = parent; 
-  sc_object_list_t &obj_list = (parent == NULL)?top_level_objects:object2childs[parent];
-  obj_list.push_back (&mod);
+
+void set_parent (sc_module &mod, sc_module * parent) {
+    object2parent[&mod] = parent; 
+    sc_object_list_t &obj_list = (parent == NULL) ? top_level_objects : object2childs[parent];
+    obj_list.push_back (&mod);
 }
 
-void
-add_child (sc_object &obj)
-{
-  sc_object_list_t *obj_list;
-  if (modules_stack.empty ())
-  {
-    obj_list = &top_level_objects;
-  } else {
-    const sc_module *parent    = modules_stack.top ();
-    if (parent == NULL)
-      return; //obj_list = &top_level_objects;
+
+void add_child (sc_object &obj) {
+    sc_object_list_t * obj_list;
+    if (modules_stack.empty ()) {
+        obj_list = &top_level_objects;
+    }
     else {
-      assert(parent != &obj);
-      const sc_object *pobj      = (const sc_module *) parent;
-      obj_list = &(object2childs[pobj]);
+        const sc_module * parent = modules_stack.top ();
+        if (parent == NULL) {
+            return; //obj_list = &top_level_objects;
+        }
+        else {
+            assert(parent != &obj);
+            const sc_object * pobj = (const sc_module *) parent;
+            obj_list = &(object2childs[pobj]);
+        }
     }
-  }
-  obj_list->push_back (&obj);
+    obj_list->push_back (&obj);
 }
 
-const std::vector<sc_object*>& 
-sc_get_top_level_objects()
-{
-  return top_level_objects;
+
+const std::vector<sc_object *>& sc_get_top_level_objects() {
+    return top_level_objects;
 }
 
-const sc_object*
-sc_find_object (const char* name)
-{
-  sc_object2sc_object_list_t::iterator i = object2childs.begin ();
-  while (i != object2childs.end ())
-  {
-    const sc_object *obj = i->first;
-    const char      *n   = obj->name ();
-    if (strcmp (name, n) == 0)
-      return obj;
-    ++i;
-  }
-  return NULL;
-}
- 
-const std::vector<sc_object*>& 
-get_child_objects (const sc_object &obj)
-{
-  sc_object_list_t &l = object2childs[&obj];
-  /* 
-   * If the object is not in the objects list,
-   * get_child_objects returns an empty list.
-   */
-  return l;    
+
+const sc_object * sc_find_object(const char * name) {
+    sc_object2sc_object_list_t::iterator i = object2childs.begin ();
+    while (i != object2childs.end()) {
+        const sc_object * obj = i->first;
+        const char * n = obj->name ();
+        if (strcmp (name, n) == 0) {
+            return obj;
+        }
+        ++i;
+    }
+    return NULL;
 }
 
-sc_object*
-get_parent_object (const sc_object &obj)
-{
-  return object2parent[&obj];
+
+const std::vector<sc_object *>& get_child_objects(const sc_object &obj) {
+    sc_object_list_t &l = object2childs[&obj];
+    /* 
+     * If the object is not in the objects list,
+     * get_child_objects returns an empty list.
+     */
+    return l;    
+}
+
+
+sc_object * get_parent_object(const sc_object &obj) {
+    return object2parent[&obj];
 }
 
@@ -125,2 +123,13 @@
 
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/module_hierarchy_ext.h
===================================================================
--- /sources/src/module_hierarchy_ext.h	(revision 51)
+++ /sources/src/module_hierarchy_ext.h	(revision 52)
@@ -39,10 +39,11 @@
 #include "sc_module_ext.h"
 #include "sc_object.h"
+
 #include <vector>
 
 namespace sc_core {
 
-extern const std::vector<sc_object*>&   sc_get_top_level_objects();
-extern const sc_object*                 sc_find_object (const char* name);
+extern const std::vector<sc_object *>& sc_get_top_level_objects();
+extern const sc_object * sc_find_object(const char * name);
 
 } // end of namespace sc_core
Index: /sources/src/mouchard_scheduling.cc
===================================================================
--- /sources/src/mouchard_scheduling.cc	(revision 51)
+++ /sources/src/mouchard_scheduling.cc	(revision 52)
@@ -37,4 +37,5 @@
 #include <iostream>
 #include <fstream>
+
 #include "assert.h"
 #include "process_dependency.h"
@@ -45,4 +46,5 @@
 #include "sc_module.h"
 #include "sc_ver.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -54,81 +56,82 @@
 
 typedef set<SignalDependency> signalDependencySet;
-typedef set<const method_process_t*> processSet;
+typedef set<const method_process_t *> processSet;
 
-static
-void
-getSource (signalDependencySet        &ss,
-           const SignalDependencyGraph &sig_g)
-{
-  typedef set<const equi_t *> nonSource_t;
-  nonSource_t nonSource;
-  SignalDependencyGraph::iterator it;
-  for (it = sig_g.begin(); it != sig_g.end(); ++it)
-  {
-    const SignalDependency &sigDep = *it;
-    const equi_t           *dest   = sigDep.destination;
-    nonSource.insert(dest);
-  }
-  for (it = sig_g.begin(); it != sig_g.end(); ++it)
-  {
-    const SignalDependency &sigDep = *it;
-    const equi_t           *src    = sigDep.source;
-    if (nonSource.find(src) == nonSource.end())
-      ss.insert(sigDep);
-  }
+static void getSource(signalDependencySet &ss, const SignalDependencyGraph &sig_g) {
+    typedef set<const equi_t *> nonSource_t;
+    nonSource_t nonSource;
+    SignalDependencyGraph::iterator it;
+    for (it = sig_g.begin(); it != sig_g.end(); ++it) {
+        const SignalDependency &sigDep = *it;
+        const equi_t * dest = sigDep.destination;
+        nonSource.insert(dest);
+    }
+
+    for (it = sig_g.begin(); it != sig_g.end(); ++it) {
+        const SignalDependency &sigDep = *it;
+        const equi_t * src = sigDep.source;
+        if (nonSource.find(src) == nonSource.end()) {
+            ss.insert(sigDep);
+        }
+    }
 }
 
-static
-void
-removeSignals (SignalDependencyGraph &sig_g,
-               signalDependencySet   &ss)
-{
-  SignalDependencyGraph::iterator it = sig_g.begin();
-  while (it != sig_g.end())
-  {
-    const SignalDependency &sigDep = *it;
-    if (ss.find(sigDep) != ss.end())
-    {
-      SignalDependencyGraph::iterator jt = it++;
-      sig_g.erase (jt);
-    } else
-      ++it;
-  }
+
+static void removeSignals(SignalDependencyGraph &sig_g, signalDependencySet &ss) {
+    SignalDependencyGraph::iterator it = sig_g.begin();
+    while (it != sig_g.end()) {
+        const SignalDependency &sigDep = *it;
+        if (ss.find(sigDep) != ss.end()) {
+            SignalDependencyGraph::iterator jt = it++;
+            sig_g.erase(jt);
+        }
+        else {
+            ++it;
+        }
+    }
 }
 
-ProcessDependencyList* 
-MakeMouchardScheduling (const SignalDependencyGraph  & _sig_g)
-{
-  if (dump_stage)
-    cerr << "Making process dependency list...\n";
-	ProcessDependencyList *mod_l = new ProcessDependencyList ();
-	SignalDependencyGraph sig_g = _sig_g;
-	while (!sig_g.empty ())
-	{
-		signalDependencySet ss;
-    getSource (ss, sig_g);
-    removeSignals (sig_g, ss);
-    processSet ps;
-    signalDependencySet::iterator sit;
-    for (sit = ss.begin(); sit != ss.end(); ++sit)
-    {
-		  const SignalDependency &sigdep  = *sit;
-		  const method_process_t *process = sigdep.method;
-      ps.insert(process);
+
+ProcessDependencyList * MakeMouchardScheduling(const SignalDependencyGraph & _sig_g) {
+    if (dump_stage) {
+        cerr << "Making process dependency list...\n";
     }
-    processSet::iterator pit;
-    for (pit = ps.begin(); pit != ps.end(); ++pit)
-    {
-      const method_process_t *process = *pit;
-	    mod_l->push_back(process);
-#if 1
-   		cerr << "Process found : " << *process << "\n";
-#endif
+    ProcessDependencyList * mod_l = new ProcessDependencyList ();
+    SignalDependencyGraph sig_g = _sig_g;
+    while (!sig_g.empty ()) {
+        signalDependencySet ss;
+        getSource(ss, sig_g);
+        removeSignals(sig_g, ss);
+        processSet ps;
+        signalDependencySet::iterator sit;
+        for (sit = ss.begin(); sit != ss.end(); ++sit) {
+            const SignalDependency & sigdep  = *sit;
+            const method_process_t * process = sigdep.method;
+            ps.insert(process);
+        }
+        processSet::iterator pit;
+        for (pit = ps.begin(); pit != ps.end(); ++pit) {
+            const method_process_t * process = *pit;
+            mod_l->push_back(process);
+            if (dump_stage) {
+                cerr << "Process found : " << *process << "\n";
+            }
+        }
     }
-  }
-    
-	return mod_l;
+
+    return mod_l;
 }
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/mouchard_scheduling.h
===================================================================
--- /sources/src/mouchard_scheduling.h	(revision 51)
+++ /sources/src/mouchard_scheduling.h	(revision 52)
@@ -17,5 +17,5 @@
 namespace sc_core {
 
-ProcessDependencyList* MakeMouchardScheduling (const SignalDependencyGraph &);
+ProcessDependencyList * MakeMouchardScheduling(const SignalDependencyGraph &);
 
 } // end of sc_core namespace
Index: /sources/src/port_dependency.cc
===================================================================
--- /sources/src/port_dependency.cc	(revision 51)
+++ /sources/src/port_dependency.cc	(revision 52)
@@ -1,13 +1,13 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                  port_dependency.cc               |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                                                             |
-| Date    :                   21_09_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                  port_dependency.cc               |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   21_09_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -38,4 +38,5 @@
 #include <iostream>
 #include <fstream>
+
 #include "port_dependency.h"
 #include "simplify_string.h"
@@ -45,4 +46,5 @@
 #include "sc_port.h"
 #include "sc_ver_ext.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -55,119 +57,121 @@
 static PortDependencyGraph aPortDependencyGraph;
 
-const PortDependencyGraph& 
-get_port_dependency_graph ()
-{
-	return aPortDependencyGraph;
+const PortDependencyGraph & get_port_dependency_graph() {
+    return aPortDependencyGraph;
 }
 
-static
-void
-check_port_dependency_declaration (const sc_port_base* a, 
-                                   const sc_port_base& b)
-{
-  const sc_module &moduleA = a->get_module ();
-  const sc_module &moduleB = b.get_module  ();
-  if (check_port_dependencies && (&moduleA != &moduleB))
-  {
-    const char *module_nameA = moduleA.basename ();
-    const char *module_nameB = moduleB.basename ();
-    if (strlen (module_nameA) == 0)
-      module_nameA = "<top level>";
-    cerr << "Error : Port dependency declaration in '"
-         << module_name_stack.back () << "' constructor is wrong.\n" 
-         << "'" << a->name () << "' and '" << b.name ()
-         << "' are ports of two differents modules ("
-         << module_nameA << " and " 
-         << module_nameB << "). "
-         << "You can't declare any port dependency like that.\n";
-    exit (37); //15092005);
-  }
-  if (module_name_stack.empty ())
-  {
-    cerr << "Error : Port dependency declaration is wrong.\n" 
-         << "The dependency declaration of '" 
-         << a->name () << "' and '" << b.name ()
-         << "' is not in any sc_module constructor.\n";
-    exit (16092005);
-  }
-  if (method_process_list.empty ())
-  {
-    cerr << "Error : Port dependency declaration in '"
-         << module_name_stack.back () << "' constructor is wrong.\n" 
-         << "The dependency of '" << a->name () << "' and '" << b.name ()
-         << "' should be linked to a SC_METHOD.\n";         
-    exit(165); //17092005);
-  }
+
+static void check_port_dependency_declaration(const sc_port_base * a, const sc_port_base& b) {
+    const sc_module & moduleA = a->get_module();
+    const sc_module & moduleB = b.get_module();
+    if (check_port_dependencies && (&moduleA != &moduleB)) {
+        const char * module_nameA = moduleA.basename();
+        const char * module_nameB = moduleB.basename();
+        if (strlen(module_nameA) == 0) {
+            module_nameA = "<top level>";
+        }
+        cerr << "Error : Port dependency declaration in '"
+            << module_name_stack.back () << "' constructor is wrong.\n" 
+            << "'" << a->name () << "' and '" << b.name ()
+            << "' are ports of two differents modules ("
+            << module_nameA << " and " 
+            << module_nameB << "). "
+            << "You can't declare any port dependency like that.\n";
+        exit (37); //15092005);
+    }
+    if (module_name_stack.empty()) {
+        cerr << "Error : Port dependency declaration is wrong.\n" 
+            << "The dependency declaration of '" 
+            << a->name () << "' and '" << b.name ()
+            << "' is not in any sc_module constructor.\n";
+        exit (16092005);
+    }
+    if (method_process_list.empty()) {
+        cerr << "Error : Port dependency declaration in '"
+            << module_name_stack.back () << "' constructor is wrong.\n" 
+            << "The dependency of '" << a->name () << "' and '" << b.name ()
+            << "' should be linked to a SC_METHOD.\n";         
+        exit(165); //17092005);
+    }
 }
 
-void 
-set_port_dependency          (const sc_port_base* a, 
-                              const sc_port_base& b)
-{
-  check_port_dependency_declaration (a,b);
-	PortDependency p;
-	p.method = method_process_list.back();
-	p.source = a;
-	p.destination = &b;
-	aPortDependencyGraph.push_back (p);
+
+void set_port_dependency(const sc_port_base * a, const sc_port_base & b) {
+    check_port_dependency_declaration(a,b);
+    PortDependency p;
+    p.method = method_process_list.back();
+    p.source = a;
+    p.destination = &b;
+    aPortDependencyGraph.push_back(p);
 #ifdef DUMP_PORT_DEPENDENCY
-	if (a) {
-		cerr << "'" << ((sc_object&)b).name()
-  	     << "' depends on '" 
-			   << ((sc_object*)a)->name () 
-         << "' in '" << p.method->name << "' function.\n";
-	} else
-		cerr << "'" << ((sc_object&)b).name()
-  	     << "' doesn't depend on anything"
-         << " in '" << p.method->name << "' function.\n";
+    if (a) {
+        cerr << "'" << ((sc_object&)b).name()
+            << "' depends on '" 
+            << ((sc_object*)a)->name() 
+            << "' in '" << p.method->name << "' function.\n";
+    }
+    else {
+        cerr << "'" << ((sc_object&)b).name()
+            << "' doesn't depend on anything"
+            << " in '" << p.method->name << "' function.\n";
+    }
 #endif
 }
 
-static
-void
-dot_write (ofstream &o, const PortDependencyGraph &g)
-{
-	string s;
-	PortDependencyGraph::const_iterator it;
-	for (it = g.begin (); it != g.end (); ++it)
-	{
-		if (it->source == NULL)
-			continue;
-		const char *name;
-		name = ((sc_object*)it->source)->name();
-		o << simplify_name(name,s);
-		o	<< " -> ";
-		name = ((sc_object*)it->destination)->name();
-		o << simplify_name(name,s);
-	  o << "\n";
-	}
+
+static void dot_write (ofstream & o, const PortDependencyGraph & g) {
+    string s;
+    PortDependencyGraph::const_iterator it;
+    for (it = g.begin (); it != g.end (); ++it) {
+        if (it->source == NULL) {
+            continue;
+        }
+        const char * name;
+        name = ((sc_object *)it->source)->name();
+        o << simplify_name(name,s);
+        o << " -> ";
+        name = ((sc_object *)it->destination)->name();
+        o << simplify_name(name,s);
+        o << "\n";
+    }
 }
 
-bool
-PortDependencyGraph2dot (const char *name,
-                         const PortDependencyGraph& g)
-{
-	if (!name)
-		return false;
-	string filename;
-	filename =  name;
-	filename += ".dot";
-	ofstream o;
-  o.open (filename.c_str(),ios::out | ios::trunc);
-	if (o.is_open () == false)
-		return false;
-	o << "// Port dependency graph\n"
-       "// Generated by "
-    << sc_version () << "\n";
-	o << "strict digraph " << name << " {\n";
-	dot_write (o,g);
-	o << "}\n";
-	o.close ();
-  if (dump_stage)
-    cerr << "Port Dependency Graph written into '" 
-         << filename << "'.\n";
-	return true;
+
+bool PortDependencyGraph2dot (const char * name, const PortDependencyGraph & g) {
+    if (!name) {
+        return false;
+    }
+    string filename;
+    filename = name;
+    filename += ".dot";
+    ofstream o;
+    o.open(filename.c_str(),ios::out | ios::trunc);
+    if (o.is_open () == false) {
+        return false;
+    }
+    o << "// Port dependency graph\n"
+        "// Generated by "
+        << sc_version () << "\n";
+    o << "strict digraph " << name << " {\n";
+    dot_write (o,g);
+    o << "}\n";
+    o.close ();
+    if (dump_stage) {
+        cerr << "Port Dependency Graph written into '" << filename << "'.\n";
+    }
+    return true;
 }
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/port_dependency.h
===================================================================
--- /sources/src/port_dependency.h	(revision 51)
+++ /sources/src/port_dependency.h	(revision 52)
@@ -22,8 +22,9 @@
 // Port Dependency Graph
 struct PortDependency {
-  const method_process_t *method;
-  const sc_port_base     *source;
-  const sc_port_base     *destination;
+  const method_process_t * method;
+  const sc_port_base * source;
+  const sc_port_base * destination;
 };
+
 typedef std::list<PortDependency> PortDependencyGraph;
 
@@ -32,5 +33,5 @@
 
 // Dump to dot file
-extern bool PortDependencyGraph2dot (const char *name, const PortDependencyGraph& = get_port_dependency_graph());
+extern bool PortDependencyGraph2dot(const char * name, const PortDependencyGraph& = get_port_dependency_graph());
 
 } // end of sc_core namespace
Index: /sources/src/port_dependency_ext.h
===================================================================
--- /sources/src/port_dependency_ext.h	(revision 51)
+++ /sources/src/port_dependency_ext.h	(revision 52)
@@ -1,13 +1,13 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                  port_dependancy_ext.h            |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                                                             |
-| Date    :                   12_08_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                  port_dependancy_ext.h            |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   12_08_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -40,22 +40,15 @@
 
 // Declare dependancy
-extern void set_port_dependency (const sc_port_base* source,const sc_port_base& destination);
+extern void set_port_dependency(const sc_port_base * source, const sc_port_base & destination);
 
 template<typename T, size_t N1, size_t N2>
-inline
-void
-set_port_dependency (sc_in<T>  (&source)[N1],
-                     sc_out<T> (&destination)[N2])
-{
-  int i;
-  for (i = 0; i < N1; ++i)
-  {
-    int j;
-    for (j = 0; j < N2; ++j)
-    {
-      set_port_dependency ((const sc_port_base*) &(source[i]), (const
-sc_port_base&) (destination[j]));
+inline void set_port_dependency(sc_in<T> (&source)[N1], sc_out<T> (&destination)[N2]) {
+    int i;
+    for (i = 0; i < N1; ++i) {
+        int j;
+        for (j = 0; j < N2; ++j) {
+            set_port_dependency ((const sc_port_base *) &(source[i]), (const sc_port_base&) (destination[j]));
+        }
     }
-  }
 }
 
@@ -63,2 +56,14 @@
 
 #endif
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/process_dependency.cc
===================================================================
--- /sources/src/process_dependency.cc	(revision 51)
+++ /sources/src/process_dependency.cc	(revision 52)
@@ -1,13 +1,13 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                  process_dependancy.cc            |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                                                             |
-| Date    :                   21_09_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                  process_dependancy.cc            |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   21_09_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -37,4 +37,5 @@
 #include <iostream>
 #include <fstream>
+
 #include "assert.h"
 #include "process_dependency.h"
@@ -44,4 +45,5 @@
 #include "sc_module.h"
 #include "sc_ver.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -52,351 +54,287 @@
 namespace sc_core {
 
-bool 
-ProcessDependency::operator < (const ProcessDependency &a) const
-{
-	if (a.source < source)
-		return false;
-	if (a.destination < destination)
-		return false;
-	return true;
-}
-
-static
-void
-dot_write (ofstream &o,
-           const ProcessDependencyGraph &g)
-{
-	string s;
-	ProcessDependencyGraph::const_iterator it;
-	for (it = g.begin (); it != g.end (); ++it)
-	{
-		string name;
-		name = it->source->module->name();
-		name += "_";
-		name += it->source->name;
-		o << simplify_name(name.c_str(),s);
-		o	<< " -> ";
-		name = it->destination->module->name();
-		name += "_";
-		name += it->destination->name;
-		o << simplify_name(name.c_str(),s);
-	  o << "\n";
-	}
-}
-
-static
-void
-dot_write (ofstream &o, 
-           const ProcessDependencyList &l)
-{
-	const method_process_t *old = NULL;
-	string s;
-	ProcessDependencyList::const_iterator it;
-	for (it = l.begin (); it != l.end (); ++it)
-	{
-		const method_process_t *current = *it;
-		if (old)
-		{
-			string name;
-			name = old->module->name();
-			name += "_";
-			name += old->name;
-			o << simplify_name(name.c_str(),s);
-			o	<< " -> ";
-			name = current->module->name();
-			name += "_";
-			name += current->name;
-			o << simplify_name(name.c_str(),s);
-		  o << "\n";
-		}
-		old = current;
-	}
-}
-
-bool
-ProcessDependencyGraph2dot (const char *name,
-                            const ProcessDependencyGraph& g)
-{
-	if (!name)
-		return false;
-	string filename;
-	filename =  name;
-	filename += ".dot";
-	ofstream o;
-  o.open (filename.c_str(),ios::out | ios::trunc);
-	if (o.is_open () == false)
-		return false;
-	o << "// Ordered process list\n"
-             "// Generated by "
-          << sc_version () << "\n";
-	o << "strict digraph " << name << " {\n";
-	dot_write (o,g);
-	o << "}\n";
-	o.close ();
-  if (dump_stage)
-    cerr << "Port Dependency Graph written into '" 
-         << filename << "'.\n";
-	return true;
-}
-
-bool
-ProcessDependencyList2dot (const char *name,
-                          const ProcessDependencyList& l)
-{
-	if (!name)
-		return false;
-	string filename;
-	filename =  name;
-	filename += ".dot";
-	ofstream o;
-  o.open (filename.c_str(),ios::out | ios::trunc);
-	if (o.is_open () == false)
-		return false;
-	o << "// Ordered process list\n"
-       "// Generated by "
-    << sc_version () << "\n";
-	o << "digraph " << name << " {\n";
-	dot_write (o,l);
-	o << "}\n";
-	o.close ();
-	return true;
-}
-
-#if 0
-ProcessDependencyGraph* 
-sc_core::MakeProcessDependencyGraph (const SignalDependencyGraph& g)
-{
-  if (dump_stage)
-	  cerr << "Making module dependency graph...\n";
-
-	ProcessDependencyGraph *mod_g = new ProcessDependencyGraph ();
-	SignalDependencyGraph::const_iterator it;
-	for (it = g.begin(); it != g.end(); ++it)
-	{
-		ProcessDependency s;
-		s.destination = it->method;
-	  SignalDependencyGraph::const_iterator it2;
-		for (it2 = g.begin(); it2 != g.end(); ++it2)
-	  {
-			if (it2->source == it->destination)
-			{
-	  		s.source = it2->method;
-  	    mod_g->insert(s);
-			}
-		}
-	}
-	return mod_g;
-}
-
-static
-const method_process_t*
-get_method (const equi_t &e, const SignalDependencyGraph &sig)
-{
-	SignalDependencyGraph::const_iterator it;
-	for (it = sig.begin (); it != sig.end (); ++it)
-	{
-		if (it->destination == &e)
-			return it->method;
-	}
-	return NULL;
-}
-#endif
-
-
-static
-bool
-is_leef (const SignalDependencyGraph &g,
-         const equi_t                *e)
-{
-	SignalDependencyGraph::const_iterator it;
-	for (it = g.begin (); it != g.end (); ++it)
-  {
-    if (it->source == e)
-      return false;
-  }
-  return true;
-}
-
-static
-bool
-has_all_leef (const SignalDependencyGraph &sig,
-              const method_process_t      *m)
-{
-	SignalDependencyGraph::const_iterator sig_it;
-	for (sig_it = sig.begin (); sig_it != sig.end (); ++sig_it)
-    if ((sig_it->method == m) 
-       && (!is_leef (sig, sig_it->destination)))
-      return false;
-  return true;
-}
-
-static
-const method_process_t*
-get_best_process (const SignalDependencyGraph &sig)
-{
-	SignalDependencyGraph::const_iterator sig_it;
-	for (sig_it = sig.begin (); sig_it != sig.end (); ++sig_it)
-  {
-    if (has_all_leef (sig, sig_it->method)) 
-      return sig_it->method;
-  }
-  return NULL;
-}
+bool ProcessDependency::operator < (const ProcessDependency &a) const {
+    if (a.source < source) {
+        return false;
+    }
+    if (a.destination < destination) {
+        return false;
+    }
+    return true;
+}
+
+
+static void dot_write (ofstream & o, const ProcessDependencyGraph & g) {
+    string s;
+    ProcessDependencyGraph::const_iterator it;
+    for (it = g.begin (); it != g.end (); ++it) {
+        string name;
+        name = it->source->module->name();
+        name += "_";
+        name += it->source->name;
+        o << simplify_name(name.c_str(),s);
+        o << " -> ";
+        name = it->destination->module->name();
+        name += "_";
+        name += it->destination->name;
+        o << simplify_name(name.c_str(),s);
+        o << "\n";
+    }
+}
+
+
+static void dot_write(ofstream &o, const ProcessDependencyList &l) {
+    const method_process_t * old = NULL;
+    string s;
+    ProcessDependencyList::const_iterator it;
+    for (it = l.begin (); it != l.end (); ++it) {
+        const method_process_t * current = *it;
+        if (old) {
+            string name;
+            name = old->module->name();
+            name += "_";
+            name += old->name;
+            o << simplify_name(name.c_str(),s);
+            o << " -> ";
+            name = current->module->name();
+            name += "_";
+            name += current->name;
+            o << simplify_name(name.c_str(),s);
+            o << "\n";
+        }
+        old = current;
+    }
+}
+
+
+bool ProcessDependencyGraph2dot(const char * name, const ProcessDependencyGraph& g) {
+    if (!name) {
+        return false;
+    }
+    string filename;
+    filename =  name;
+    filename += ".dot";
+    ofstream o;
+    o.open (filename.c_str(),ios::out | ios::trunc);
+    if (o.is_open () == false) {
+        return false;
+    }
+    o << "// Ordered process list\n"
+        "// Generated by "
+        << sc_version () << "\n";
+    o << "strict digraph " << name << " {\n";
+    dot_write (o,g);
+    o << "}\n";
+    o.close ();
+    if (dump_stage) {
+        cerr << "Port Dependency Graph written into '" 
+             << filename << "'.\n";
+    }
+    return true;
+}
+
+
+bool ProcessDependencyList2dot(const char * name, const ProcessDependencyList& l) {
+    if (!name) {
+        return false;
+    }
+    string filename;
+    filename =  name;
+    filename += ".dot";
+    ofstream o;
+    o.open (filename.c_str(),ios::out | ios::trunc);
+    if (o.is_open () == false) {
+        return false;
+    }
+    o << "// Ordered process list\n"
+        "// Generated by "
+        << sc_version () << "\n";
+    o << "digraph " << name << " {\n";
+    dot_write (o,l);
+    o << "}\n";
+    o.close ();
+    return true;
+}
+
+
+static bool is_leef(const SignalDependencyGraph & g, const equi_t * e) {
+    SignalDependencyGraph::const_iterator it;
+    for (it = g.begin(); it != g.end(); ++it) {
+        if (it->source == e) {
+            return false;
+        }
+    }
+    return true;
+}
+
+
+static bool has_all_leef(const SignalDependencyGraph & sig, const method_process_t * m) {
+    SignalDependencyGraph::const_iterator sig_it;
+    for (sig_it = sig.begin(); sig_it != sig.end(); ++sig_it) {
+        if ((sig_it->method == m) && (!is_leef (sig, sig_it->destination))) {
+            return false;
+        }
+    }
+    return true;
+}
+
+
+static const method_process_t * get_best_process(const SignalDependencyGraph & sig) {
+    SignalDependencyGraph::const_iterator sig_it;
+    for (sig_it = sig.begin(); sig_it != sig.end(); ++sig_it) {
+        if (has_all_leef(sig, sig_it->method)) {
+            return sig_it->method;
+        }
+    }
+    return NULL;
+}
+
 
 /*
  *   Remove signals
  */
-static
-void
-remove_leefs (SignalDependencyGraph  &g,
-             const method_process_t &m)
-{
-	SignalDependencyGraph::iterator it;
-	it = g.begin (); 
-  while (it != g.end ())
-  {
-    const method_process_t *cur_m = it->method;
-    if ((cur_m == &m) && (is_leef (g,it->destination)))
-    {
-      SignalDependencyGraph::iterator x = it++;
-      g.erase (x);
-    }
-    else
-      ++it;
-  }	
-}
+static void remove_leefs (SignalDependencyGraph  & g, const method_process_t & m) {
+    SignalDependencyGraph::iterator it;
+    it = g.begin();
+    while (it != g.end()) {
+        const method_process_t * cur_m = it->method;
+        if ((cur_m == &m) && (is_leef (g,it->destination))) {
+            SignalDependencyGraph::iterator x = it++;
+            g.erase (x);
+        }
+        else {
+            ++it;
+        }
+    }
+}
+
 
 #if defined(UNUSED)
-static
-void
-print_signals (ostream                      &o,
-               const SignalDependencyGraph  &sig,
-               const method_process_t       *method,
-               bool                          source)
-{
-  int count = 0;
-	SignalDependencyGraph::const_iterator it;
-	for (it = sig.begin (); it != sig.end (); ++it)
-  {
-    const SignalDependency &dep   = *it;
-    const method_process_t *cur_m = dep.method;
-    if (cur_m == method)
-    {
-      const equi_t *e = (source)?dep.source:dep.destination;
-      o << ((count++)?",":"") << get_name (*e);
-    }
-  }	
+static void print_signals (ostream & o,
+        const SignalDependencyGraph & sig,
+        const method_process_t * method,
+        bool source) {
+    int count = 0;
+    SignalDependencyGraph::const_iterator it;
+    for (it = sig.begin(); it != sig.end(); ++it) {
+        const SignalDependency & dep = *it;
+        const method_process_t * cur_m = dep.method;
+        if (cur_m == method) {
+            const equi_t * e = (source) ? dep.source : dep.destination;
+            o << ((count++)?",":"") << get_name (*e);
+        }
+    }
 }
 #endif
 
-static
-void
-print_leef_list (SignalDependencyGraph &sig)
-{
-  typedef map<const equi_t *, const method_process_t *> table_t;
-  table_t table;
-  
-  // For each arrow, add destination node into table
-	SignalDependencyGraph::const_iterator sig_it;
-	for (sig_it = sig.begin (); sig_it != sig.end (); ++sig_it)
-  {
-    const SignalDependency  sd     = *sig_it;
-    const equi_t           *equi   = sd.destination;
-	  const method_process_t *method = sd.method;
-    table[equi] = method;
-  }
- 
-  // For each arrow, remove source node into table
-	for (sig_it = sig.begin (); sig_it != sig.end (); ++sig_it)
-  {
-    const SignalDependency  sd = *sig_it;
-    const equi_t           *e  = sd.source;
-    table_t::const_iterator tab_it = table.find (e);
-    if (tab_it != table.end ())
-      table.erase (e);
-  }
-
-  typedef multimap<const method_process_t *, const equi_t *> table2_t;
-  typedef pair<const method_process_t *, const equi_t *> table2_pair_t;
-  table2_t table2;
-
-  // Build table2
-  table_t::const_iterator it;
-  for (it = table.begin(); it != table.end(); ++it)
-  {
-    const method_process_t *method = it->second;
-    const equi_t           *equi   = it->first;
-    table2_pair_t           pair   = table2_pair_t(method,equi);
-    table2.insert(pair);
-  }
-
-  // Print leef list
-  cerr << "Please split following methods :";
-  table2_t::const_iterator low_it = table2.begin();
-  table2_t::const_iterator up_it;
-  while (low_it != table2.end ())
-  {
-    const method_process_t *method      = low_it->first;
-    const char             *method_name = method->name;
-    const sc_module        *module      = method->module;
-    const char             *module_name = module->name();
-    cerr << "\n\t - " << module_name << "::" << method_name;
-    cerr << "() to evaluate '";
-    int   count = 0;
-    up_it = table2.upper_bound(low_it->first);
-    table2_t::const_iterator it2;
-    for (it2 = low_it; it2 != up_it; ++it2)
-    {
-      const equi_t *equi         = it2->second;
-      const char   *signal_name  = get_name (*equi);
-      cerr << ((count++)?",":"") << signal_name;
-    }
-    cerr << "' signal(s) separetly";
-    low_it = up_it;
-  }
-  cerr << "\n";
-}
-
-static
-void
-help2resolve (SignalDependencyGraph &sig)
-{
-  print_leef_list (sig);
-  MethodProcessDependencyGraph2dot ("methodprocess_graph", sig);
-  cerr << "Please look at 'methodprocess_graph.dot' "
-          "to know how to get ride of circular dependencies.\n";
-  if (dump_all_graph)
-  {
-    SignalDependencyGraph2dot ("reduced_signal_graph", sig);
-  }
-}
-
-ProcessDependencyList* 
-MakeProcessDependencyList  (const SignalDependencyGraph  & _sig_g)
-{
-  if (dump_stage)
-    cerr << "Making process dependency list...\n";
-	ProcessDependencyList *mod_l = new ProcessDependencyList ();
-	SignalDependencyGraph sig_g = _sig_g;
-	while (!sig_g.empty ())
-	{
-		const method_process_t *process = get_best_process (sig_g);
-#if 1
-    if (process == NULL)
-    {
-      cerr << "Internal Error : Unable to select the best process to schedule.\n";
-      help2resolve (sig_g);
-      exit (31032005); // 197
-    }
-#endif
-	  mod_l->push_front(process);
-#if 0
-		cerr << "Process found : " << *process << "\n";
-#endif
-		remove_leefs (sig_g, *process);
-	}
-	return mod_l;
+
+static void print_leef_list (SignalDependencyGraph & sig) {
+    typedef map<const equi_t *, const method_process_t *> table_t;
+    table_t table;
+
+    // For each arrow, add destination node into table
+    SignalDependencyGraph::const_iterator sig_it;
+    for (sig_it = sig.begin(); sig_it != sig.end(); ++sig_it) {
+        const SignalDependency sd = *sig_it;
+        const equi_t * equi = sd.destination;
+        const method_process_t * method = sd.method;
+        table[equi] = method;
+    }
+
+    // For each arrow, remove source node into table
+    for (sig_it = sig.begin(); sig_it != sig.end(); ++sig_it) {
+        const SignalDependency sd = *sig_it;
+        const equi_t * e = sd.source;
+        table_t::const_iterator tab_it = table.find(e);
+        if (tab_it != table.end()) {
+            table.erase(e);
+        }
+    }
+
+    typedef multimap<const method_process_t *, const equi_t *> table2_t;
+    typedef pair<const method_process_t *, const equi_t *> table2_pair_t;
+    table2_t table2;
+
+    // Build table2
+    table_t::const_iterator it;
+    for (it = table.begin(); it != table.end(); ++it) {
+        const method_process_t * method = it->second;
+        const equi_t * equi = it->first;
+        table2_pair_t pair = table2_pair_t(method,equi);
+        table2.insert(pair);
+    }
+
+    // Print leef list
+    cerr << "Please split following methods :";
+    table2_t::const_iterator low_it = table2.begin();
+    table2_t::const_iterator up_it;
+    while (low_it != table2.end()) {
+        const method_process_t * method = low_it->first;
+        const char * method_name = method->name;
+        const sc_module * module = method->module;
+        const char * module_name = module->name();
+        cerr << "\n\t - " << module_name << "::" << method_name;
+        cerr << "() to evaluate '";
+        int count = 0;
+        up_it = table2.upper_bound(low_it->first);
+        table2_t::const_iterator it2;
+        for (it2 = low_it; it2 != up_it; ++it2) {
+            const equi_t * equi = it2->second;
+            const char * signal_name = get_name(*equi);
+            cerr << ((count++) ? ",":"") << signal_name;
+        }
+        cerr << "' signal(s) separetly";
+        low_it = up_it;
+    }
+    cerr << "\n";
+}
+
+
+static void help2resolve(SignalDependencyGraph & sig) {
+    print_leef_list(sig);
+    MethodProcessDependencyGraph2dot ("methodprocess_graph", sig);
+    cerr << "Please look at 'methodprocess_graph.dot' "
+        "to know how to get ride of circular dependencies.\n";
+    if (dump_all_graph) {
+        SignalDependencyGraph2dot ("reduced_signal_graph", sig);
+    }
+}
+
+
+ProcessDependencyList * MakeProcessDependencyList(const SignalDependencyGraph & _sig_g) {
+    if (dump_stage) {
+        cerr << "Making process dependency list...\n";
+    }
+    ProcessDependencyList * mod_l = new ProcessDependencyList();
+    SignalDependencyGraph sig_g = _sig_g;
+    while (!sig_g.empty()) {
+        const method_process_t * process = get_best_process(sig_g);
+        if (process == NULL)
+        {
+            cerr << "Internal Error : Unable to select the best process to schedule.\n";
+            help2resolve(sig_g);
+            exit (31032005); // 197
+        }
+        mod_l->push_front(process);
+        if (dump_stage) {
+            cerr << "Process found : " << *process << "\n";
+        }
+        remove_leefs (sig_g, * process);
+    }
+    return mod_l;
 }
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
+
Index: /sources/src/process_dependency.h
===================================================================
--- /sources/src/process_dependency.h	(revision 51)
+++ /sources/src/process_dependency.h	(revision 52)
@@ -19,19 +19,19 @@
 // Signal Dependency Graph
 struct ProcessDependency {
-  const method_process_t *source;
-  const method_process_t *destination;
-  bool operator < (const ProcessDependency &) const;
+    const method_process_t * source;
+    const method_process_t * destination;
+    bool operator < (const ProcessDependency &) const;
 };
 
-typedef std::set<ProcessDependency>        ProcessDependencyGraph;
-typedef std::list<const method_process_t*> ProcessDependencyList;
+typedef std::set<ProcessDependency> ProcessDependencyGraph;
+typedef std::list<const method_process_t *> ProcessDependencyList;
 
 // Convert Port Dependency Graph to Signal Dependency Graph
-extern ProcessDependencyGraph* MakeProcessDependencyGraph (const SignalDependencyGraph&);
-extern ProcessDependencyList* MakeProcessDependencyList (const SignalDependencyGraph&);
+extern ProcessDependencyGraph * MakeProcessDependencyGraph(const SignalDependencyGraph &);
+extern ProcessDependencyList * MakeProcessDependencyList(const SignalDependencyGraph &);
 
 // Dump to dot file
-extern bool ProcessDependencyGraph2dot (const char *name, const ProcessDependencyGraph&);
-extern bool ProcessDependencyList2dot (const char *name, const ProcessDependencyList&);
+extern bool ProcessDependencyGraph2dot(const char * name, const ProcessDependencyGraph &);
+extern bool ProcessDependencyList2dot(const char * name, const ProcessDependencyList &);
 
 } // end of sc_core namespace
@@ -39,2 +39,13 @@
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_bigint.h
===================================================================
--- /sources/src/sc_bigint.h	(revision 51)
+++ /sources/src/sc_bigint.h	(revision 52)
@@ -1,13 +1,13 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                 sc_bigint.h                      |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                                                             |
-| Date    :                   09_07_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                 sc_bigint.h                      |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   09_07_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 #ifndef __SC_BIGINT_H__
 #define __SC_BIGINT_H__
@@ -26,22 +26,21 @@
 namespace sc_dt {
 
-//
 #define MASK32(W) ((~ (const uint32)0) >> (sizeof (uint32) * 8 - W))
 #define MASK64(W) ((~ (const uint64)0) >> (sizeof (uint64) * 8 - W))
-//
 
 template<int W> struct s_bigint_type { typedef uint64 uint_type;};
 #define DECLAR_BIGINT_TYPE(W) template<> struct s_bigint_type<W> { typedef uint16 uint_type; }// not declared as uint16 because << operator threats like a character
-DECLAR_BIGINT_TYPE( 1);
-DECLAR_BIGINT_TYPE( 2);
-DECLAR_BIGINT_TYPE( 3);
-DECLAR_BIGINT_TYPE( 4);
-DECLAR_BIGINT_TYPE( 5);
-DECLAR_BIGINT_TYPE( 6);
-DECLAR_BIGINT_TYPE( 7);
-DECLAR_BIGINT_TYPE( 8);
+DECLAR_BIGINT_TYPE(1);
+DECLAR_BIGINT_TYPE(2);
+DECLAR_BIGINT_TYPE(3);
+DECLAR_BIGINT_TYPE(4);
+DECLAR_BIGINT_TYPE(5);
+DECLAR_BIGINT_TYPE(6);
+DECLAR_BIGINT_TYPE(7);
+DECLAR_BIGINT_TYPE(8);
 #undef DECLAR_BIGINT_TYPE
+
 #define DECLAR_BIGINT_TYPE(W) template<> struct s_bigint_type<W> { typedef uint16 uint_type; }
-DECLAR_BIGINT_TYPE( 9);
+DECLAR_BIGINT_TYPE(9);
 DECLAR_BIGINT_TYPE(10);
 DECLAR_BIGINT_TYPE(11);
@@ -52,4 +51,5 @@
 DECLAR_BIGINT_TYPE(16);
 #undef DECLAR_BIGINT_TYPE
+
 #define DECLAR_BIGINT_TYPE(W) template<> struct s_bigint_type<W> { typedef uint32 uint_type; }
 DECLAR_BIGINT_TYPE(17);
@@ -72,76 +72,160 @@
 
 template< int W /* = SC_INTWIDTH */>
-class sc_bigint
-{
-  typedef sc_bigint<W>                     this_type;
-  typedef typename s_int_type<W>::int_type  data_type;
-
-  typedef data_type sc_uint_subref;
-  typedef data_type sc_uint_subref_r;
-
-	union {
-	  data_type valW:W;
-    bool      valB[W];
-		data_type val;
-	};
-	void check () 
-	{ if (W > 64) { std::cerr << "sc_bigint with W > 64 is not supported.\n"; exit (20040528); } }
-public:
-  sc_bigint() { check (); val = 0; }
-  sc_bigint(data_type val_) { check (); val = 0; write (val_); }
-  template <int W2> explicit sc_bigint (const sc_bigint<W2> &val_) { write (val_.read());}
-
-  inline const data_type& read() const { return val; }
-  inline operator const data_type& () const { return read (); }
-//  inline void write(int64 val_) { val = val_ & MASK64(W); }
-//  inline void write(signed int val_)   { val = val_ & MASK32(W); }
-  inline void write(data_type val_)   { valW = val_; }
-  template <int W2> inline void write (const sc_bigint<W2> val_) { write (val_.read ()); }
-  inline void write (const sc_bigint<W> val_) { write (val_.read()); };
-	template <typename T> inline sc_bigint& operator = (const T& val_) { write (val_); return *this; }
-
-  inline uint32         to_uint   () const {return val & MASK32(W);};
-  inline int32          to_int    () const {return val & MASK32(W);};
-  inline uint64         to_uint64 () const {return val & MASK64(W);};
-  inline int64          to_int64  () const {return val & MASK64(W);};
-
-  template <typename T>
-  inline sc_bigint& operator <<= (T v)
-  { valW <<= v; return *this; }
-  template <typename T>
-  inline sc_bigint& operator >>= (T v)
-  { valW >>= v; return *this; }
-  template <typename T>
-  inline sc_bigint& operator += (T v)
-  { valW += v; return *this; }
-  template <typename T>
-  inline sc_bigint& operator -= (T v)
-  { valW -= v; return *this; }
-  template <typename T>
-  inline sc_bigint& operator *= (T v)
-  { valW *= v; return *this; }
-  template <typename T>
-  inline sc_bigint& operator /= (T v)
-  { valW /= v; return *this; }
-  template <typename T>
-  inline sc_bigint& operator %= (T v)
-  { valW %= v; return *this; }
-  template <typename T>
-  inline sc_bigint& operator &= (T v)
-  { valW &= v; return *this; }
-  template <typename T>
-  inline sc_bigint& operator |= (T v)
-  { valW |= v; return *this; }
-  template <typename T>
-  inline sc_bigint& operator ^= (T v)
-  { valW ^= v; return *this; }
-  inline sc_uint_bit_ref& operator [] (int v)
-  { return valB[v]; }
-  inline sc_uint_bit_ref_r& operator [] (int v) const
-  { return valB[v]; }
-  inline sc_uint_subref range (int left, int right)
-  { return (((~0) >> (sizeof (data_type) * 8 - left)) & val) >> right; }
-  inline sc_uint_subref_r range (int left, int right) const
-  { return (((~0) >> (sizeof (data_type) * 8 - left)) & val) >> right; }
+class sc_bigint {
+    typedef sc_bigint<W> this_type;
+    typedef typename s_int_type<W>::int_type data_type;
+
+    typedef data_type sc_uint_subref;
+    typedef data_type sc_uint_subref_r;
+
+    union {
+        data_type valW:W;
+        bool valB[W];
+        data_type val;
+    };
+    
+    void check() {
+        if (W > 64) {
+            std::cerr << "sc_bigint with W > 64 is not supported.\n";
+            exit (20040528);
+        }
+    }
+
+    public:
+    sc_bigint() {
+        check ();
+        val = 0;
+    }
+
+    sc_bigint(data_type val_) {
+        check ();
+        val = 0;
+        write (val_);
+    }
+
+    template <int W2> explicit sc_bigint(const sc_bigint<W2> & val_) {
+        write (val_.read());
+    }
+
+    inline const data_type & read() const {
+        return val;
+    }
+
+    inline operator const data_type & () const {
+        return read ();
+    }
+
+    //  inline void write(int64 val_) { val = val_ & MASK64(W); }
+    //  inline void write(signed int val_)   { val = val_ & MASK32(W); }
+    
+    inline void write(data_type val_) {
+        valW = val_;
+    }
+    
+    template <int W2> inline void write (const sc_bigint<W2> val_) {
+        write (val_.read ());
+    }
+
+    inline void write (const sc_bigint<W> val_) {
+        write (val_.read());
+    }
+
+    template <typename T> inline sc_bigint & operator = (const T & val_) {
+        write (val_);
+        return *this;
+    }
+
+    inline uint32 to_uint() const {
+        return val & MASK32(W);
+    }
+
+    inline int32 to_int() const {
+        return val & MASK32(W);
+    }
+
+    inline uint64 to_uint64() const {
+        return val & MASK64(W);
+    }
+
+    inline int64 to_int64() const {
+        return val & MASK64(W);
+    }
+
+    template <typename T>
+    inline sc_bigint & operator <<= (T v) {
+        valW <<= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_bigint & operator >>= (T v) {
+        valW >>= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_bigint & operator += (T v) {
+        valW += v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_bigint & operator -= (T v) {
+        valW -= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_bigint & operator *= (T v) {
+        valW *= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_bigint & operator /= (T v) {
+        valW /= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_bigint & operator %= (T v) {
+        valW %= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_bigint & operator &= (T v) {
+        valW &= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_bigint & operator |= (T v) {
+        valW |= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_bigint & operator ^= (T v) {
+        valW ^= v;
+        return *this;
+    }
+
+    inline sc_uint_bit_ref & operator [] (int v) {
+        return valB[v];
+    }
+
+    inline sc_uint_bit_ref_r& operator [] (int v) const {
+        return valB[v];
+    }
+
+    inline sc_uint_subref range(int left, int right) {
+        return (((~0) >> (sizeof (data_type) * 8 - left)) & val) >> right;
+    }
+
+    inline sc_uint_subref_r range(int left, int right) const {
+        return (((~0) >> (sizeof (data_type) * 8 - left)) & val) >> right;
+    }
+
 };
 
@@ -149,2 +233,15 @@
 
 #endif /* __SC_BIGINT_H__ */
+
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_biguint.h
===================================================================
--- /sources/src/sc_biguint.h	(revision 51)
+++ /sources/src/sc_biguint.h	(revision 52)
@@ -22,22 +22,22 @@
 namespace sc_dt {
 
-//
 #define MASK32(W) ((~ (const uint32)0) >> (sizeof (uint32) * 8 - W))
 #define MASK64(W) ((~ (const uint64)0) >> (sizeof (uint64) * 8 - W))
-//
 
 template<int W> struct s_biguint_type { typedef uint64 uint_type;};
+
 #define DECLAR_BIGUINT_TYPE(W) template<> struct s_biguint_type<W> { typedef uint16 uint_type; }// not declared as uint16 because << operator threats like a character
-DECLAR_BIGUINT_TYPE( 1);
-DECLAR_BIGUINT_TYPE( 2);
-DECLAR_BIGUINT_TYPE( 3);
-DECLAR_BIGUINT_TYPE( 4);
-DECLAR_BIGUINT_TYPE( 5);
-DECLAR_BIGUINT_TYPE( 6);
-DECLAR_BIGUINT_TYPE( 7);
-DECLAR_BIGUINT_TYPE( 8);
+DECLAR_BIGUINT_TYPE(1);
+DECLAR_BIGUINT_TYPE(2);
+DECLAR_BIGUINT_TYPE(3);
+DECLAR_BIGUINT_TYPE(4);
+DECLAR_BIGUINT_TYPE(5);
+DECLAR_BIGUINT_TYPE(6);
+DECLAR_BIGUINT_TYPE(7);
+DECLAR_BIGUINT_TYPE(8);
 #undef DECLAR_BIGUINT_TYPE
+
 #define DECLAR_BIGUINT_TYPE(W) template<> struct s_biguint_type<W> { typedef uint16 uint_type; }
-DECLAR_BIGUINT_TYPE( 9);
+DECLAR_BIGUINT_TYPE(9);
 DECLAR_BIGUINT_TYPE(10);
 DECLAR_BIGUINT_TYPE(11);
@@ -48,4 +48,5 @@
 DECLAR_BIGUINT_TYPE(16);
 #undef DECLAR_BIGUINT_TYPE
+
 #define DECLAR_BIGUINT_TYPE(W) template<> struct s_biguint_type<W> { typedef uint32 uint_type; }
 DECLAR_BIGUINT_TYPE(17);
@@ -67,77 +68,144 @@
 #undef DECLAR_BIGUINT_TYPE
 
+
 template< int W /* = SC_INTWIDTH */>
-class sc_biguint
-{
-  typedef sc_biguint<W>                     this_type;
-  typedef typename s_int_type<W>::int_type  data_type;
-
-  typedef data_type sc_uint_subref;
-  typedef data_type sc_uint_subref_r;
-
-	union {
-	  data_type valW:W;
-    bool      valB[W];
-		data_type val;
-	};
-	void check () 
-	{ if (W > 64) { std::cerr << "sc_biguint with W > 64 is not supported.\n"; exit (20040528); } }
-public:
-  sc_biguint() { check (); val = 0; }
-  sc_biguint(data_type val_) { check (); val = 0; write (val_); }
-  template <int W2> explicit sc_biguint (const sc_biguint<W2> &val_) { write (val_.read());}
-
-  inline const data_type& read() const { return val; }
-  inline operator const data_type& () const { return read (); }
-//  inline void write(int64 val_) { val = val_ & MASK64(W); }
-//  inline void write(signed int val_)   { val = val_ & MASK32(W); }
-  inline void write(data_type val_)   { valW = val_; }
-  template <int W2> inline void write (const sc_biguint<W2> val_) { write (val_.read ()); }
-  inline void write (const sc_biguint<W> val_) { write (val_.read()); };
-	template <typename T> inline sc_biguint& operator = (const T& val_) { write (val_); return *this; }
-
-  inline uint32         to_uint   () const {return val & MASK32(W);};
-  inline int32          to_int    () const {return val & MASK32(W);};
-  inline uint64         to_uint64 () const {return val & MASK64(W);};
-  inline int64          to_int64  () const {return val & MASK64(W);};
-
-  template <typename T>
-  inline sc_biguint& operator <<= (T v)
-  { valW <<= v; return *this; }
-  template <typename T>
-  inline sc_biguint& operator >>= (T v)
-  { valW >>= v; return *this; }
-  template <typename T>
-  inline sc_biguint& operator += (T v)
-  { valW += v; return *this; }
-  template <typename T>
-  inline sc_biguint& operator -= (T v)
-  { valW -= v; return *this; }
-  template <typename T>
-  inline sc_biguint& operator *= (T v)
-  { valW *= v; return *this; }
-  template <typename T>
-  inline sc_biguint& operator /= (T v)
-  { valW /= v; return *this; }
-  template <typename T>
-  inline sc_biguint& operator %= (T v)
-  { valW %= v; return *this; }
-  template <typename T>
-  inline sc_biguint& operator &= (T v)
-  { valW &= v; return *this; }
-  template <typename T>
-  inline sc_biguint& operator |= (T v)
-  { valW |= v; return *this; }
-  template <typename T>
-  inline sc_biguint& operator ^= (T v)
-  { valW ^= v; return *this; }
-  inline sc_uint_bit_ref& operator [] (int v)
-  { return valB[v]; }
-  inline sc_uint_bit_ref_r& operator [] (int v) const
-  { return valB[v]; }
-  inline sc_uint_subref range (int left, int right)
-  { return (((~0) >> (sizeof (data_type) * 8 - left)) & val) >> right; }
-  inline sc_uint_subref_r range (int left, int right) const
-  { return (((~0) >> (sizeof (data_type) * 8 - left)) & val) >> right; }
+class sc_biguint {
+    typedef sc_biguint<W> this_type;
+    typedef typename s_int_type<W>::int_type data_type;
+
+    typedef data_type sc_uint_subref;
+    typedef data_type sc_uint_subref_r;
+
+    union {
+        data_type valW:W;
+        bool      valB[W];
+        data_type val;
+    };
+    
+    void check () {
+        if (W > 64) {
+            std::cerr << "sc_biguint with W > 64 is not supported.\n";
+            exit (20040528);
+        }
+    }
+
+    public:
+    
+    sc_biguint() {
+        check ();
+        val = 0;
+    }
+
+    sc_biguint(data_type val_) {
+        check ();
+        val = 0;
+        write (val_);
+    }
+
+    template <int W2> explicit sc_biguint (const sc_biguint<W2> & val_) {
+        write (val_.read());
+    }
+
+    inline const data_type & read() const {
+        return val;
+    }
+
+    inline operator const data_type & () const {
+        return read ();
+    }
+
+    inline void write(data_type val_) {
+        valW = val_;
+    }
+
+    template <int W2> inline void write (const sc_biguint<W2> val_) {
+        write (val_.read ());
+    }
+
+    inline void write (const sc_biguint<W> val_) {
+        write (val_.read());
+    }
+
+    template <typename T> inline sc_biguint & operator = (const T& val_) {
+        write (val_);
+        return *this;
+    }
+
+    inline uint32 to_uint()   const { return val & MASK32(W); }
+    inline int32  to_int()    const { return val & MASK32(W); }
+    inline uint64 to_uint64() const { return val & MASK64(W); }
+    inline int64  to_int64()  const { return val & MASK64(W); }
+
+    template <typename T>
+    inline sc_biguint & operator <<= (T v) {
+        valW <<= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_biguint & operator >>= (T v) {
+        valW >>= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_biguint & operator += (T v) {
+        valW += v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_biguint & operator -= (T v) {
+        valW -= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_biguint & operator *= (T v) {
+        valW *= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_biguint & operator /= (T v) {
+        valW /= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_biguint & operator %= (T v) {
+        valW %= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_biguint & operator &= (T v) {
+        valW &= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_biguint & operator |= (T v) {
+        valW |= v;
+        return *this;
+    }
+
+    template <typename T>
+    inline sc_biguint & operator ^= (T v) {
+        valW ^= v;
+        return *this;
+    }
+
+    inline sc_uint_bit_ref &   operator [] (int v) { return valB[v]; }
+    inline sc_uint_bit_ref_r & operator [] (int v) const { return valB[v]; }
+
+    inline sc_uint_subref range (int left, int right) {
+        return (((~0) >> (sizeof(data_type) * 8 - left)) & val) >> right;
+    }
+
+    inline sc_uint_subref_r range (int left, int right) const {
+        return (((~0) >> (sizeof(data_type) * 8 - left)) & val) >> right;
+    }
+
 };
 
@@ -145,2 +213,14 @@
 
 #endif /* __SC_BIGUINT_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_bit.h
===================================================================
--- /sources/src/sc_bit.h	(revision 51)
+++ /sources/src/sc_bit.h	(revision 52)
@@ -26,169 +26,177 @@
 namespace sc_dt {
 
-class sc_bit
-{
-/////////////////////////
-///// SYSTEMCASS SPECIFIC
-  bool val;
-/////////////////////////
-public:
-  // constructors  & destructor 
-  sc_bit ()                             { val = false; }
-  explicit sc_bit (bool a)              { val = a; }
-  explicit sc_bit (int a)               { val = a > 0; }
-  explicit sc_bit (char a)              { val = (a == '1')?true:false; }
-  explicit sc_bit (const sc_logic & a)  { val = a.to_bool(); }
-  ~sc_bit ()                            { };
-  // copy constructor 
-  sc_bit (const sc_bit & a)             { val = a; }
-  // assignment operators 
-  sc_bit & operator = (const sc_bit & b)   { val = b.to_bool(); return *this; }
-  sc_bit & operator = (int b)              { val = b > 0; return *this; }
-  sc_bit & operator = (bool b)             { val = b; return *this; }
-  sc_bit & operator = (char b)             { val = (b == '1')?true:false; return *this; }
-  sc_bit & operator = (const sc_logic & b) { val = b.to_bool(); return *this; }
-
-  // bitwise assignment operators 
-  sc_bit & operator &= (const sc_bit & b)  { val &= b.to_bool(); return *this; }
-  sc_bit & operator &= (int b)             { val &= b > 0; return *this; }
-  sc_bit & operator &= (bool b)            { val &= b; return *this; }
-  sc_bit & operator &= (char b)            { val &= (b == '1')?true:false; return *this; }
-  sc_bit & operator |= (const sc_bit & b)  { val |= b.val; return *this; }
-  sc_bit & operator |= (int b)             { val |= b > 0; return *this; }
-  sc_bit & operator |= (bool b)            { val |= b; return *this; }
-  sc_bit & operator |= (char b)            { val |= (b == '1')?true:false; return *this; }
-  sc_bit & operator ^= (const sc_bit & b)  { val ^= b.val; return *this; }
-  sc_bit & operator ^= (int b)             { val ^= b > 0; return *this; }
-  sc_bit & operator ^= (bool b)            { val ^= b; return *this; }
-  sc_bit & operator ^= (char b)            { val ^= (b == '1')?true:false; return *this; }
-
-  // implicit conversion to bool 
-  operator bool () const    { return val;  }
-  bool operator ! () const  { return !val; }
-
-  // explicit conversion to character string 
-  const sc_string to_string       ( sc_numrep numrep = SC_DEC ) const 
-  { return sc_string ((val)?"1":"0"); }
-  const sc_string to_dec() const  { return to_string (SC_DEC); }
-  const sc_string to_bin() const  { return to_string (SC_BIN); }
-  const sc_string to_oct() const  { return to_string (SC_OCT); }
-  const sc_string to_hex() const  { return to_string (SC_HEX); }
-
-  // others explicit conversions 
-  bool to_bool () const     { return val;  }
-  char to_char () const     { return (val)?'1':'0'; }
-
-  // relational operators and functions 
-  friend bool operator == (const sc_bit & a, const sc_bit & b) { return a ==
-b; }
-  friend bool operator == (const sc_bit & a, int b);
-  friend bool operator == (const sc_bit & a, bool b);
-  friend bool operator == (const sc_bit & a, char b);
-  friend bool operator == (int a, const sc_bit & b);
-
-  friend bool operator == (bool a, const sc_bit & b);
-  friend bool operator == (char a, const sc_bit & b);
-  friend bool equal (const sc_bit & a, const sc_bit & b);
-  friend bool equal (const sc_bit & a, int b);
-  friend bool equal (const sc_bit & a, bool b);
-  friend bool equal (const sc_bit & a, char b);
-  friend bool equal (int a, const sc_bit & b);
-  friend bool equal (bool a, const sc_bit & b);
-  friend bool equal (char a, const sc_bit & b);
-  friend bool operator != (const sc_bit & a, const sc_bit & b);
-  friend bool operator != (const sc_bit & a, int b);
-  friend bool operator != (const sc_bit & a, bool b);
-  friend bool operator != (const sc_bit & a, char b);
-  friend bool operator != (int a, const sc_bit & b);
-  friend bool operator != (bool a, const sc_bit & b);
-  friend bool operator != (char a, const sc_bit & b);
-  friend bool not_equal (const sc_bit & a, const sc_bit & b);
-  friend bool not_equal (const sc_bit & a, int b);
-  friend bool not_equal (const sc_bit & a, bool b);
-  friend bool not_equal (const sc_bit & a, char b);
-  friend bool not_equal (int a, const sc_bit & b);
-  friend bool not_equal (bool a, const sc_bit & b);
-  friend bool not_equal (char a, const sc_bit & b);
-  // bitwise complement 
-  friend const sc_bit operator ~ (const sc_bit & a);
-    sc_bit & b_not ();
-  friend void b_not (sc_bit & r, const sc_bit & a);
-  friend const sc_bit b_not (const sc_bit & a);
-  // bitwise or 
-  friend const sc_bit operator | (const sc_bit & a, const sc_bit & b);
-  friend const sc_bit operator | (const sc_bit & a, int b);
-  friend const sc_bit operator | (const sc_bit & a, bool b);
-  friend const sc_bit operator | (const sc_bit & a, char b);
-  friend const sc_bit operator | (int a, const sc_bit & b);
-  friend const sc_bit operator | (bool a, const sc_bit & b);
-  friend const sc_bit operator | (char a, const sc_bit & b);
-  friend const sc_bit b_or (const sc_bit & a, const sc_bit & b);
-  friend const sc_bit b_or (const sc_bit & a, int b);
-  friend const sc_bit b_or (const sc_bit & a, bool b);
-  friend const sc_bit b_or (const sc_bit & a, char b);
-  friend const sc_bit b_or (int a, const sc_bit & b);
-  friend const sc_bit b_or (bool a, const sc_bit & b);
-
-  friend const sc_bit b_or (char a, const sc_bit & b);
-  friend void b_or (sc_bit & r, const sc_bit & a, const sc_bit & b);
-  friend void b_or (sc_bit & r, const sc_bit & a, int b);
-  friend void b_or (sc_bit & r, const sc_bit & a, bool b);
-  friend void b_or (sc_bit & r, const sc_bit & a, char b);
-  friend void b_or (sc_bit & r, int a, const sc_bit & b);
-  friend void b_or (sc_bit & r, bool a, const sc_bit & b);
-  friend void b_or (sc_bit & r, char a, const sc_bit & b);
-  // bitwise and 
-  friend const sc_bit operator & (const sc_bit & a, const sc_bit & b);
-  friend const sc_bit operator & (const sc_bit & a, int b);
-  friend const sc_bit operator & (const sc_bit & a, bool b);
-  friend const sc_bit operator & (const sc_bit & a, char b);
-  friend const sc_bit operator & (int a, const sc_bit & b);
-  friend const sc_bit operator & (bool a, const sc_bit & b);
-  friend const sc_bit operator & (char a, const sc_bit & b);
-  friend const sc_bit b_and (const sc_bit & a, const sc_bit & b);
-  friend const sc_bit b_and (const sc_bit & a, int b);
-  friend const sc_bit b_and (const sc_bit & a, bool b);
-  friend const sc_bit b_and (const sc_bit & a, char b);
-  friend const sc_bit b_and (int a, const sc_bit & b);
-  friend const sc_bit b_and (bool a, const sc_bit & b);
-  friend const sc_bit b_and (char a, const sc_bit & b);
-  friend void b_and (sc_bit & r, const sc_bit & a, const sc_bit & b);
-  friend void b_and (sc_bit & r, const sc_bit & a, int b);
-  friend void b_and (sc_bit & r, const sc_bit & a, bool b);
-  friend void b_and (sc_bit & r, const sc_bit & a, char b);
-  friend void b_and (sc_bit & r, int a, const sc_bit & b);
-  friend void b_and (sc_bit & r, bool a, const sc_bit & b);
-  friend void b_and (sc_bit & r, char a, const sc_bit & b);
-  // bitwise exor 
-  friend const sc_bit operator ^ (const sc_bit & a, const sc_bit & b);
-  friend const sc_bit operator ^ (const sc_bit & a, int b);
-  friend const sc_bit operator ^ (const sc_bit & a, bool b);
-  friend const sc_bit operator ^ (const sc_bit & a, char b);
-  friend const sc_bit operator ^ (int a, const sc_bit & b);
-
-  friend const sc_bit operator ^ (bool a, const sc_bit & b);
-  friend const sc_bit operator ^ (char a, const sc_bit & b);
-  friend const sc_bit b_xor (const sc_bit & a, const sc_bit & b);
-  friend const sc_bit b_xor (const sc_bit & a, int b);
-  friend const sc_bit b_xor (const sc_bit & a, bool b);
-  friend const sc_bit b_xor (const sc_bit & a, char b);
-  friend const sc_bit b_xor (int a, const sc_bit & b);
-  friend const sc_bit b_xor (bool a, const sc_bit & b);
-  friend const sc_bit b_xor (char a, const sc_bit & b);
-  friend void b_xor (sc_bit & r, const sc_bit & a, const sc_bit & b);
-  friend void b_xor (sc_bit & r, const sc_bit & a, int b);
-  friend void b_xor (sc_bit & r, const sc_bit & a, bool b);
-  friend void b_xor (sc_bit & r, const sc_bit & a, char b);
-  friend void b_xor (sc_bit & r, int a, const sc_bit & b);
-  friend void b_xor (sc_bit & r, bool a, const sc_bit & b);
-  friend void b_xor (sc_bit & r, char a, const sc_bit & b);
+class sc_bit {
+    
+    /////////////////////////
+    ///// SYSTEMCASS SPECIFIC
+    bool val;
+    /////////////////////////
+
+    public:
+    // constructors  & destructor 
+    sc_bit()                            { val = false; }
+    explicit sc_bit(bool a)             { val = a; }
+    explicit sc_bit(int a)              { val = a > 0; }
+    explicit sc_bit(char a)             { val = (a == '1') ? true : false; }
+    explicit sc_bit(const sc_logic & a) { val = a.to_bool(); }
+    ~sc_bit()                           {}
+    // copy constructor 
+    sc_bit(const sc_bit & a)            { val = a; }
+    // assignment operators 
+    sc_bit & operator = (const sc_bit & b)   { val = b.to_bool(); return *this; }
+    sc_bit & operator = (int b)              { val = b > 0; return *this; }
+    sc_bit & operator = (bool b)             { val = b; return *this; }
+    sc_bit & operator = (char b)             { val = (b == '1') ? true : false; return *this; }
+    sc_bit & operator = (const sc_logic & b) { val = b.to_bool(); return *this; }
+
+    // bitwise assignment operators 
+    sc_bit & operator &= (const sc_bit & b)  { val &= b.to_bool(); return *this; }
+    sc_bit & operator &= (int b)             { val &= b > 0; return *this; }
+    sc_bit & operator &= (bool b)            { val &= b; return *this; }
+    sc_bit & operator &= (char b)            { val &= (b == '1') ? true : false; return *this; }
+    sc_bit & operator |= (const sc_bit & b)  { val |= b.val; return *this; }
+    sc_bit & operator |= (int b)             { val |= b > 0; return *this; }
+    sc_bit & operator |= (bool b)            { val |= b; return *this; }
+    sc_bit & operator |= (char b)            { val |= (b == '1') ? true : false; return *this; }
+    sc_bit & operator ^= (const sc_bit & b)  { val ^= b.val; return *this; }
+    sc_bit & operator ^= (int b)             { val ^= b > 0; return *this; }
+    sc_bit & operator ^= (bool b)            { val ^= b; return *this; }
+    sc_bit & operator ^= (char b)            { val ^= (b == '1') ? true : false; return *this; }
+
+    // implicit conversion to bool 
+    operator bool () const   { return val;  }
+    bool operator ! () const { return !val; }
+
+    // explicit conversion to character string 
+    const sc_string to_string(sc_numrep numrep = SC_DEC ) const  {
+        return sc_string ((val) ? "1" : "0");
+    }
+    const sc_string to_dec() const { return to_string (SC_DEC); }
+    const sc_string to_bin() const { return to_string (SC_BIN); }
+    const sc_string to_oct() const { return to_string (SC_OCT); }
+    const sc_string to_hex() const { return to_string (SC_HEX); }
+
+    // others explicit conversions 
+    bool to_bool() const { return val;  }
+    char to_char() const { return (val) ? '1' : '0'; }
+
+    // relational operators and functions 
+    friend bool operator == (const sc_bit & a, const sc_bit & b) { return a == b; }
+    friend bool operator == (const sc_bit & a, int b);
+    friend bool operator == (const sc_bit & a, bool b);
+    friend bool operator == (const sc_bit & a, char b);
+    friend bool operator == (int a, const sc_bit & b);
+    friend bool operator == (bool a, const sc_bit & b);
+    friend bool operator == (char a, const sc_bit & b);
+    friend bool equal (const sc_bit & a, const sc_bit & b);
+    friend bool equal (const sc_bit & a, int b);
+    friend bool equal (const sc_bit & a, bool b);
+    friend bool equal (const sc_bit & a, char b);
+    friend bool equal (int a, const sc_bit & b);
+    friend bool equal (bool a, const sc_bit & b);
+    friend bool equal (char a, const sc_bit & b);
+    friend bool operator != (const sc_bit & a, const sc_bit & b);
+    friend bool operator != (const sc_bit & a, int b);
+    friend bool operator != (const sc_bit & a, bool b);
+    friend bool operator != (const sc_bit & a, char b);
+    friend bool operator != (int a, const sc_bit & b);
+    friend bool operator != (bool a, const sc_bit & b);
+    friend bool operator != (char a, const sc_bit & b);
+    friend bool not_equal (const sc_bit & a, const sc_bit & b);
+    friend bool not_equal (const sc_bit & a, int b);
+    friend bool not_equal (const sc_bit & a, bool b);
+    friend bool not_equal (const sc_bit & a, char b);
+    friend bool not_equal (int a, const sc_bit & b);
+    friend bool not_equal (bool a, const sc_bit & b);
+    friend bool not_equal (char a, const sc_bit & b);
+    // bitwise complement 
+    friend const sc_bit operator ~ (const sc_bit & a);
+    sc_bit & b_not();
+    friend void b_not (sc_bit & r, const sc_bit & a);
+    friend const sc_bit b_not (const sc_bit & a);
+    // bitwise or 
+    friend const sc_bit operator | (const sc_bit & a, const sc_bit & b);
+    friend const sc_bit operator | (const sc_bit & a, int b);
+    friend const sc_bit operator | (const sc_bit & a, bool b);
+    friend const sc_bit operator | (const sc_bit & a, char b);
+    friend const sc_bit operator | (int a, const sc_bit & b);
+    friend const sc_bit operator | (bool a, const sc_bit & b);
+    friend const sc_bit operator | (char a, const sc_bit & b);
+    friend const sc_bit b_or (const sc_bit & a, const sc_bit & b);
+    friend const sc_bit b_or (const sc_bit & a, int b);
+    friend const sc_bit b_or (const sc_bit & a, bool b);
+    friend const sc_bit b_or (const sc_bit & a, char b);
+    friend const sc_bit b_or (int a, const sc_bit & b);
+    friend const sc_bit b_or (bool a, const sc_bit & b);
+
+    friend const sc_bit b_or (char a, const sc_bit & b);
+    friend void b_or (sc_bit & r, const sc_bit & a, const sc_bit & b);
+    friend void b_or (sc_bit & r, const sc_bit & a, int b);
+    friend void b_or (sc_bit & r, const sc_bit & a, bool b);
+    friend void b_or (sc_bit & r, const sc_bit & a, char b);
+    friend void b_or (sc_bit & r, int a, const sc_bit & b);
+    friend void b_or (sc_bit & r, bool a, const sc_bit & b);
+    friend void b_or (sc_bit & r, char a, const sc_bit & b);
+    // bitwise and 
+    friend const sc_bit operator & (const sc_bit & a, const sc_bit & b);
+    friend const sc_bit operator & (const sc_bit & a, int b);
+    friend const sc_bit operator & (const sc_bit & a, bool b);
+    friend const sc_bit operator & (const sc_bit & a, char b);
+    friend const sc_bit operator & (int a, const sc_bit & b);
+    friend const sc_bit operator & (bool a, const sc_bit & b);
+    friend const sc_bit operator & (char a, const sc_bit & b);
+    friend const sc_bit b_and (const sc_bit & a, const sc_bit & b);
+    friend const sc_bit b_and (const sc_bit & a, int b);
+    friend const sc_bit b_and (const sc_bit & a, bool b);
+    friend const sc_bit b_and (const sc_bit & a, char b);
+    friend const sc_bit b_and (int a, const sc_bit & b);
+    friend const sc_bit b_and (bool a, const sc_bit & b);
+    friend const sc_bit b_and (char a, const sc_bit & b);
+    friend void b_and (sc_bit & r, const sc_bit & a, const sc_bit & b);
+    friend void b_and (sc_bit & r, const sc_bit & a, int b);
+    friend void b_and (sc_bit & r, const sc_bit & a, bool b);
+    friend void b_and (sc_bit & r, const sc_bit & a, char b);
+    friend void b_and (sc_bit & r, int a, const sc_bit & b);
+    friend void b_and (sc_bit & r, bool a, const sc_bit & b);
+    friend void b_and (sc_bit & r, char a, const sc_bit & b);
+    // bitwise exor 
+    friend const sc_bit operator ^ (const sc_bit & a, const sc_bit & b);
+    friend const sc_bit operator ^ (const sc_bit & a, int b);
+    friend const sc_bit operator ^ (const sc_bit & a, bool b);
+    friend const sc_bit operator ^ (const sc_bit & a, char b);
+    friend const sc_bit operator ^ (int a, const sc_bit & b);
+
+    friend const sc_bit operator ^ (bool a, const sc_bit & b);
+    friend const sc_bit operator ^ (char a, const sc_bit & b);
+    friend const sc_bit b_xor (const sc_bit & a, const sc_bit & b);
+    friend const sc_bit b_xor (const sc_bit & a, int b);
+    friend const sc_bit b_xor (const sc_bit & a, bool b);
+    friend const sc_bit b_xor (const sc_bit & a, char b);
+    friend const sc_bit b_xor (int a, const sc_bit & b);
+    friend const sc_bit b_xor (bool a, const sc_bit & b);
+    friend const sc_bit b_xor (char a, const sc_bit & b);
+    friend void b_xor (sc_bit & r, const sc_bit & a, const sc_bit & b);
+    friend void b_xor (sc_bit & r, const sc_bit & a, int b);
+    friend void b_xor (sc_bit & r, const sc_bit & a, bool b);
+    friend void b_xor (sc_bit & r, const sc_bit & a, char b);
+    friend void b_xor (sc_bit & r, int a, const sc_bit & b);
+    friend void b_xor (sc_bit & r, bool a, const sc_bit & b);
+    friend void b_xor (sc_bit & r, char a, const sc_bit & b);
+
+};
+
+} /* end of sc_dt namespace */
+
+#endif /* __SC_BIT_H__ */
+
 /*
-  // other functions 
-  void print (std::ostream & os = std::cout) const;
-  void scan (std::istream & = std::cin);
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
 */
-};
-
-} /* end of sc_dt namespace */
-
-#endif /* __SC_BIT_H__ */
+
Index: /sources/src/sc_bv.h
===================================================================
--- /sources/src/sc_bv.h	(revision 51)
+++ /sources/src/sc_bv.h	(revision 52)
@@ -27,17 +27,12 @@
 namespace sc_dt {
 
-class sc_bv_base
-{
-public:
-  // constructors 
-/*
-  explicit sc_bv_base (int length_ = sc_length_param ().len ());
-  explicit sc_bv_base (bool a, int length_ = sc_length_param ().len ());
-*/
-    sc_bv_base (const char *a);
-    sc_bv_base (const char *a, int length_);
+class sc_bv_base {
+    public:
+    // constructors 
+    sc_bv_base (const char * a);
+    sc_bv_base (const char * a, int length_);
     template < class X > sc_bv_base (const sc_bv_base & a);
     virtual ~ sc_bv_base ();
-  // assignment operators 
+    // assignment operators 
     template < class X > sc_bv_base & operator = (const sc_bv_base & a);
     sc_bv_base & operator = (const char *a);
@@ -46,8 +41,4 @@
     sc_bv_base & operator = (const sc_unsigned & a);
     sc_bv_base & operator = (const sc_signed & a);
-/*
-    sc_bv_base & operator = (const sc_uint_base & a);
-    sc_bv_base & operator = (const sc_int_base & a);
-*/
     sc_bv_base & operator = (unsigned long a);
     sc_bv_base & operator = (long a);
@@ -57,17 +48,17 @@
     sc_bv_base & operator = (int64 a);
 
-  // methods 
-  int length () const;
-  bool is_01 () const;
+    // methods 
+    int length () const;
+    bool is_01 () const;
 };
 
 
-template < int W > class sc_bv:public sc_bv_base
-{
-public:
-  // constructors 
-  sc_bv ();
-  explicit sc_bv (bool init_value);
-  explicit sc_bv (char init_value);
+template < int W >
+class sc_bv : public sc_bv_base {
+    public:
+    // constructors 
+    sc_bv ();
+    explicit sc_bv (bool init_value);
+    explicit sc_bv (char init_value);
     sc_bv (const char *a);
     sc_bv (const bool * a);
@@ -75,8 +66,4 @@
     sc_bv (const sc_unsigned & a);
     sc_bv (const sc_signed & a);
-/*
-    sc_bv (const sc_uint_base & a);
-    sc_bv (const sc_int_base & a);
-*/
     sc_bv (unsigned long a);
     sc_bv (long a);
@@ -86,23 +73,19 @@
     sc_bv (int64 a);
     sc_bv (const sc_bv_base & a);
-    sc_bv (const sc_bv < W > &a);
-  // assignment operators 
-    template < class X > sc_bv < W > &operator = (const sc_bv_base & a);
-    sc_bv < W > &operator = (const sc_bv < W > &a);
-    sc_bv < W > &operator = (const char *a);
-    sc_bv < W > &operator = (const bool * a);
-    sc_bv < W > &operator = (const sc_logic * a);
-    sc_bv < W > &operator = (const sc_unsigned & a);
-    sc_bv < W > &operator = (const sc_signed & a);
-/*
-    sc_bv < W > &operator = (const sc_uint_base & a);
-    sc_bv < W > &operator = (const sc_int_base & a);
-*/
-    sc_bv < W > &operator = (unsigned long a);
-    sc_bv < W > &operator = (long a);
-    sc_bv < W > &operator = (unsigned int a);
-    sc_bv < W > &operator = (int a);
-    sc_bv < W > &operator = (uint64 a);
-    sc_bv < W > &operator = (int64 a);
+    sc_bv (const sc_bv < W > & a);
+    // assignment operators 
+    template < class X > sc_bv < W > & operator = (const sc_bv_base & a);
+    sc_bv < W > & operator = (const sc_bv < W > &a);
+    sc_bv < W > & operator = (const char *a);
+    sc_bv < W > & operator = (const bool * a);
+    sc_bv < W > & operator = (const sc_logic * a);
+    sc_bv < W > & operator = (const sc_unsigned & a);
+    sc_bv < W > & operator = (const sc_signed & a);
+    sc_bv < W > & operator = (unsigned long a);
+    sc_bv < W > & operator = (long a);
+    sc_bv < W > & operator = (unsigned int a);
+    sc_bv < W > & operator = (int a);
+    sc_bv < W > & operator = (uint64 a);
+    sc_bv < W > & operator = (int64 a);
 };
 
@@ -110,2 +93,14 @@
 
 #endif /* __SC_BV_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_clock.cc
===================================================================
--- /sources/src/sc_clock.cc	(revision 51)
+++ /sources/src/sc_clock.cc	(revision 52)
@@ -1,14 +1,14 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                  sc_clock.cc                      |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                           Taktak Sami                       |
-|                                                             |
-| Date    :                   09_09_2005                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                  sc_clock.cc                      |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                           Taktak Sami                       |
+  |                                                             |
+  | Date    :                   09_09_2005                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -35,6 +35,8 @@
  */
 
+#include <cassert>
+
 #include "sc_clock.h"
-#include <cassert>
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -53,57 +55,66 @@
 
 
-sc_clock::sc_clock(): base_type() 
-{
-	init ();
-  posedge_first = true;
+sc_clock::sc_clock(): base_type() {
+    init ();
+    posedge_first = true;
 }
 
-sc_clock::sc_clock(const char *name_): base_type(name_)
-{
-	init ();
-  posedge_first = true;
+
+sc_clock::sc_clock(const char * name_): base_type(name_) {
+    init ();
+    posedge_first = true;
 }
 
-sc_clock::sc_clock(const char *name_,
-	   const          sc_time& period_,
-	   double         duty_cycle_,
-	   const sc_time& start_time_,
-	   bool           posedge_first_) : base_type(name_)
-{
-	init ();
-  assert(period_     == 1);
-  assert(duty_cycle_ == 0.5);
-  assert(start_time_ == SC_ZERO_TIME);
-  posedge_first = posedge_first_;
+
+sc_clock::sc_clock(const char * name_,
+        const sc_time & period_,
+        double          duty_cycle_,
+        const sc_time & start_time_,
+        bool            posedge_first_) : base_type(name_) {
+    init ();
+    assert(period_ == 1);
+    assert(duty_cycle_ == 0.5);
+    assert(start_time_ == SC_ZERO_TIME);
+    posedge_first = posedge_first_;
 }
 
-sc_clock::sc_clock(const char *name_,
-	   double         period_,
-	   double         duty_cycle_,
-	   double         start_time_,
-	   bool           posedge_first_) : base_type(name_)
-{
-	init ();
-  assert(period_     == 1);
-  assert(duty_cycle_ == 0.5);
-  assert(start_time_ == SC_ZERO_TIME);
-  posedge_first = posedge_first_;
+
+sc_clock::sc_clock(const char * name_,
+        double period_,
+        double duty_cycle_,
+        double start_time_,
+        bool   posedge_first_) : base_type(name_) {
+    init ();
+    assert(period_ == 1);
+    assert(duty_cycle_ == 0.5);
+    assert(start_time_ == SC_ZERO_TIME);
+    posedge_first = posedge_first_;
 }
 
-sc_clock::~sc_clock ()
-{
+
+sc_clock::~sc_clock() {}
+
+
+void sc_clock::init () {
+    set_kind(kind_string);
 }
 
-void
-sc_clock::init ()
-{
-	set_kind (kind_string);
-}
 
-sc_clock::this_type& sc_clock::operator = ( const data_type& value_) {
-  write(value_);
-  return *this;
+sc_clock::this_type & sc_clock::operator = (const data_type & value_) {
+    write(value_);
+    return *this;
 }
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_clock.h
===================================================================
--- /sources/src/sc_clock.h	(revision 51)
+++ /sources/src/sc_clock.h	(revision 52)
@@ -19,2 +19,13 @@
 #endif /* __SC_CLOCK_H__ */
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_clock_ext.h
===================================================================
--- /sources/src/sc_clock_ext.h	(revision 51)
+++ /sources/src/sc_clock_ext.h	(revision 52)
@@ -47,39 +47,41 @@
 // ----------------------------------------------------------------------------
 
-class sc_clock : public sc_signal<bool>
-{
-	//////
-	// Internal
-  void init ();
-	//////				 
-private:
-  typedef bool                            data_type;
-  typedef sc_signal<bool>                 base_type;
-  typedef sc_clock                        this_type;
+class sc_clock : public sc_signal<bool> {
+    ///////////
+    // Internal
+    void init ();
+    ///////////
 
-public:
-  sc_clock();
-	/*virtual */~sc_clock();
-  // Changes from LRM : 
-  // We use "const char *" instead of "sc_module_name" because we don't need
-  // to add a module name in the stack when constructing sc_clock !
-  explicit sc_clock(const char *name_); 
-  sc_clock(const char *name_,
-	   const          sc_time& period_,
-	   double         duty_cycle_ = 0.5,
-	   const sc_time& start_time_ = SC_ZERO_TIME,
-	   bool           posedge_first_ = true );
-  sc_clock(const char *name_,
-	   double         period_,
-	   double         duty_cycle_ = 0.5,
-	   double         start_time_ = 0.0,
-	   bool           posedge_first_ = true );
+    private:
+    typedef bool data_type;
+    typedef sc_signal<bool> base_type;
+    typedef sc_clock this_type;
 
-  static const char *const kind_string;
-  //virtual const char *kind () const;
-  
-  /*inline*/ this_type& operator = ( const data_type& value_);
+    public:
+    sc_clock();
+    ~sc_clock();
+    
+    // Changes from LRM : 
+    // We use "const char *" instead of "sc_module_name" because we don't need
+    // to add a module name in the stack when constructing sc_clock !
+    
+    explicit sc_clock(const char * name_); 
+    sc_clock(const char * name_,
+             const sc_time & period_,
+             double          duty_cycle_ = 0.5,
+             const sc_time & start_time_ = SC_ZERO_TIME,
+             bool            posedge_first_ = true);
 
-  bool posedge_first;
+    sc_clock(const char *name_,
+             double period_,
+             double duty_cycle_ = 0.5,
+             double start_time_ = 0.0,
+             bool   posedge_first_ = true);
+
+    static const char * const kind_string;
+
+    /*inline*/ this_type & operator = (const data_type & value_);
+
+    bool posedge_first;
 };
 
@@ -88,2 +90,13 @@
 #endif /* __SC_CLOCK_EXT_H__ */
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_event.cc
===================================================================
--- /sources/src/sc_event.cc	(revision 51)
+++ /sources/src/sc_event.cc	(revision 52)
@@ -1,13 +1,13 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                 sc_event.cc                       |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                                                             |
-| Date    :                   09_07_2004                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                 sc_event.cc                       |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   09_07_2004                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -36,7 +36,9 @@
 
 #include <iostream>
+
 #include "sc_event.h"
 #include "sc_interface.h"
 #include "sc_port_ext.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -52,28 +54,36 @@
 // ----------------------------------------------------------------------------
 
-ostream& operator << (ostream &o, const sc_event &s)
-{ 
-  o << get_name (s.get_interface().get_pointer()) << ".";
-  switch (s.get_flag ()) {
-	case sc_event::VAL:	return o << "val()";
-	case sc_event::NEG: return o << "neg()";
-	case sc_event::POS: return o << "pos()";
-	default:  
-	  cerr << "Internal error : unknown event flag.\n";
-		exit (13);
-	}
+ostream & operator << (ostream & o, const sc_event & s) {
+    o << get_name (s.get_interface().get_pointer()) << ".";
+    switch (s.get_flag ()) {
+        case sc_event::VAL:
+            return o << "val()";
+        case sc_event::NEG:
+            return o << "neg()";
+        case sc_event::POS:
+            return o << "pos()";
+        default:
+            cerr << "Internal error : unknown event flag.\n";
+            exit (13);
+    }
 }
 
-sc_event::sc_event (const sc_interface &inter_,
-		                flag_t flag_)
-	: interface (inter_)
-{
-	flag = flag_;
+sc_event::sc_event (const sc_interface & inter_, flag_t flag_) : interface (inter_) {
+    flag = flag_;
 }
 
-sc_event::~sc_event ()
-{
-}
+sc_event::~sc_event() {}
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_event.h
===================================================================
--- /sources/src/sc_event.h	(revision 51)
+++ /sources/src/sc_event.h	(revision 52)
@@ -14,4 +14,5 @@
 
 #include "sc_fwd.h"
+
 #include <iostream>
 
@@ -19,30 +20,30 @@
 
 class sc_event {
-public : typedef enum { POS, NEG, VAL } flag_t;
-private:
-	const sc_interface   &interface;
-	flag_t flag;
-public:
-	bool pos () const;
-  sc_event (const sc_interface &, flag_t);
-  ~sc_event ();
+    public :
+    typedef enum { POS, NEG, VAL } flag_t;
 
-  // methods
-  const sc_interface&  get_interface() const { return interface;}; // CASC specific
-  flag_t              get_flag () const { return flag;}; // CASC specific
-  
-  // operators
+    private:
+    const sc_interface & interface;
+    flag_t flag;
 
-  friend std::ostream& operator << (std::ostream &, const sc_event &);
-	
-  sc_event ();
-	/*
-	// LRM
-  sc_event ();
-private:
-  // disabled
-  sc_event (const sc_event &);
-  sc_event& operator = (const sc_event&);  
-	*/
+    public:
+    bool pos() const;
+    sc_event(const sc_interface &, flag_t);
+    ~sc_event();
+
+    // methods
+    const sc_interface & get_interface() const {
+        return interface;
+    } // CASC specific
+    flag_t get_flag () const {
+        return flag;
+    } // CASC specific
+
+    // operators
+
+    friend std::ostream & operator << (std::ostream &, const sc_event &);
+
+    sc_event ();
+
 };
 
@@ -50,2 +51,14 @@
 
 #endif /* __SC_EVENT_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_event_finder.cc
===================================================================
--- /sources/src/sc_event_finder.cc	(revision 51)
+++ /sources/src/sc_event_finder.cc	(revision 52)
@@ -36,4 +36,5 @@
 
 #include "sc_event_finder.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -42,18 +43,23 @@
 namespace sc_core {
 
-sc_event_finder::sc_event_finder (/*const*/ sc_core::sc_port_base &p)
-  : a_port (p)
-{
-}
+sc_event_finder::sc_event_finder (/*const*/sc_core::sc_port_base & p) : a_port (p) {}
 
-sc_event_finder::~sc_event_finder ()
-{
-}
+sc_event_finder::~sc_event_finder() {}
 
-/*const*/ sc_core::sc_port_base& 
-sc_event_finder::port () /*const*/
-{
+/*const*/ sc_core::sc_port_base & sc_event_finder::port() /*const*/ {
   return a_port;
 }
 
 }
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_event_finder.h
===================================================================
--- /sources/src/sc_event_finder.h	(revision 51)
+++ /sources/src/sc_event_finder.h	(revision 52)
@@ -18,19 +18,21 @@
 
 class sc_event_finder {
-  /*const*/sc_core::sc_port_base &a_port;
-public:
-  sc_event_finder (/*const*/ sc_core::sc_port_base&);
-  virtual ~sc_event_finder ();
+    /*const*/sc_core::sc_port_base & a_port;
 
-  // methods
-  /*const*/ sc_core::sc_port_base& port () /*const*/;
-  
-  // operators
+    public:
+    sc_event_finder(/*const*/ sc_core::sc_port_base &);
+    virtual ~sc_event_finder();
 
-private:
-  // disabled
-  sc_event_finder ();
-  sc_event_finder (const sc_event_finder &);
-  sc_event_finder& operator = (const sc_event_finder&);  
+    // methods
+    //
+    /*const*/ sc_core::sc_port_base& port () /*const*/;
+
+    // operators
+
+    private:
+    // disabled
+    sc_event_finder();
+    sc_event_finder(const sc_event_finder &);
+    sc_event_finder & operator = (const sc_event_finder &);
 };
 
@@ -38,2 +40,14 @@
 
 #endif /* __SC_EVENT_FINDER_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_fwd.h
===================================================================
--- /sources/src/sc_fwd.h	(revision 51)
+++ /sources/src/sc_fwd.h	(revision 52)
@@ -20,5 +20,5 @@
 /////////////////////////////////////////////////
 // kernel
-//
+/////////////////////////////////////////////////
 class method_process_t;
 class sc_port_base;
@@ -36,5 +36,5 @@
 /////////////////////////////////////////////////
 // Ports & Signals
-//
+/////////////////////////////////////////////////
 template <class T> class sc_in;
 template <class T> class sc_inout;
@@ -47,30 +47,44 @@
 /////////////////////////////////////////////////
 // Tracing
-//
+/////////////////////////////////////////////////
 class sc_trace_file;
 
 /////////////////////////////////////////////////
 // lists
-//
+/////////////////////////////////////////////////
 typedef std::vector<method_process_t *> method_process_list_t;
+
 }
+
 
 /////////////////////////////////////////////////
 // Data Types
-//
+/////////////////////////////////////////////////
 namespace sc_dt {
 
-  template <int W> class sc_bigint;
-  template <int W> class sc_biguint;
-  template <int W> class sc_int;
-  template <int W> class sc_uint;
-  template <int W> class sc_bv;
-  template <int W> class sc_lv;
-  class sc_unsigned;
-  class sc_signed;
-  class sc_bit;
-  class sc_logic;
+template <int W> class sc_bigint;
+template <int W> class sc_biguint;
+template <int W> class sc_int;
+template <int W> class sc_uint;
+template <int W> class sc_bv;
+template <int W> class sc_lv;
+class sc_unsigned;
+class sc_signed;
+class sc_bit;
+class sc_logic;
+
 }
 
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_int.h
===================================================================
--- /sources/src/sc_int.h	(revision 51)
+++ /sources/src/sc_int.h	(revision 52)
@@ -36,20 +36,21 @@
 typedef sc_int<1> sc_int_bit_ref_r;
 
-//
+
 #define MASK32(W) ((~ (const uint32)0) >> (sizeof (uint32) * 8 - W))
 #define MASK64(W) ((~ (const uint64)0) >> (sizeof (uint64) * 8 - W))
-//
-
-template<int W> struct s_int_type { typedef int64 int_type;};
+
+template<int W> struct s_int_type { typedef int64 int_type; };
+
 #define DECLAR_INT_TYPE(W) template<> struct s_int_type<W> { typedef smallest_int int_type; } // not declared as in8 because << operator threats like a character
-DECLAR_INT_TYPE( 1);
-DECLAR_INT_TYPE( 2);
-DECLAR_INT_TYPE( 3);
-DECLAR_INT_TYPE( 4);
-DECLAR_INT_TYPE( 5);
-DECLAR_INT_TYPE( 6);
-DECLAR_INT_TYPE( 7);
-DECLAR_INT_TYPE( 8);
+DECLAR_INT_TYPE(1);
+DECLAR_INT_TYPE(2);
+DECLAR_INT_TYPE(3);
+DECLAR_INT_TYPE(4);
+DECLAR_INT_TYPE(5);
+DECLAR_INT_TYPE(6);
+DECLAR_INT_TYPE(7);
+DECLAR_INT_TYPE(8);
 #undef DECLAR_INT_TYPE
+
 #define DECLAR_INT_TYPE(W) template<> struct s_int_type<W> { typedef int16 int_type; }
 DECLAR_INT_TYPE( 9);
@@ -62,4 +63,5 @@
 DECLAR_INT_TYPE(16);
 #undef DECLAR_INT_TYPE
+
 #define DECLAR_INT_TYPE(W) template<> struct s_int_type<W> { typedef int32 int_type; }
 DECLAR_INT_TYPE(17);
@@ -86,19 +88,24 @@
 // Used for range, concat functions
 
-class sc_int_subref_r
-{
-  template <int W> friend class sc_dt::sc_int;
-  int       left, right;
-  public : int64    val;
-  sc_int_subref_r (int64 val_, int left_, int right_)
-  {
-    val = val_; left = left_; right = right_;
-  }
-  public:
-  inline int64 read () const { return val; }
-  inline const sc_int_subref_r& operator | (const sc_int_subref_r &v) const
-  { print_warning (); return *this; }
-
-  private :void print_warning () const;
+class sc_int_subref_r {
+
+    template <int W> friend class sc_dt::sc_int;
+    int left, right;
+    
+    public :
+    int64 val;
+    sc_int_subref_r(int64 val_, int left_, int right_) {
+        val = val_; left = left_; right = right_;
+    }
+    
+    inline int64 read () const { return val; }
+    inline const sc_int_subref_r& operator | (const sc_int_subref_r &v) const {
+        print_warning ();
+        return *this;
+    }
+
+    private :
+    void print_warning () const;
+
 };
 
@@ -110,148 +117,156 @@
 
 template< int W /* = SC_INTWIDTH */>
-class sc_int
-{
-  /***********************/
-  /* SYSTEMCASS SPECIFIC */
-  /***********************/
-  typedef sc_int<W>                         this_type;
-  typedef typename s_int_type<W>::int_type  data_type;
-
-  typedef data_type sc_int_subref;
-//typedef data_type sc_int_subref_r;
-    /* removed since "operator ," was going wrong */
-
-// internal
-	union {
-    val_field<W,(sizeof (data_type) * 8) - W,data_type> vf; /* To compute */
-		data_type val;          /* To return an int reference (read function) */
-//	  data_type valW:W; /* works with little endianess only */
-//  bool      valB[W]; /* removed since 1 bool takes 1 byte */
-	};
-
-  /***********************/
-  /*        L R M        */
-  /***********************/
-public:
-  sc_int()                 { val = 0; }
-//  sc_int(data_type val_)  { val = 0; write (val_); }
-  sc_int (const char *a)   { val = 0; write (std::atoi (a)); }
-  sc_int (unsigned short a){ val = 0; write (a); }
-  sc_int (short a)         { val = 0; write (a); }
-  sc_int (unsigned long a) { val = 0; write (a); }
-  sc_int (long a)          { val = 0; write (a); }
-  sc_int (unsigned int a)  { val = 0; write (a); }
-  sc_int (int a)           { val = 0; write (a); }
-  sc_int (int64 a)         { val = 0; write (a); }
-  sc_int (uint64 a)        { val = 0; write (a); }
-  sc_int (double a)        { val = 0; write (a); }
-
-  template <int W2> sc_int (const sc_int<W2> &val_) { val = 0; write (val_.read());}
-  /* this template doesn't redefine default copy constructor of sc_int.
-   * So, we define by this way 
-   */
-
-  sc_int (const sc_int &val_) { val = val_.val; }
-  sc_int (const sc_int_subref_r &a) { val = 0; write (a); } 
+class sc_int {
+
+    /***********************/
+    /* SYSTEMCASS SPECIFIC */
+    /***********************/
+    typedef sc_int<W> this_type;
+    typedef typename s_int_type<W>::int_type data_type;
+
+    typedef data_type sc_int_subref;
+
+    // internal
+    union {
+        val_field<W, (sizeof (data_type) * 8) - W,data_type> vf; /* To compute */
+        data_type val;          /* To return an int reference (read function) */
+    };
+
+
+    /***********************/
+    /*        L R M        */
+    /***********************/
+    public:
+    sc_int()                  { val = 0; }
+    sc_int (const char * a)   { val = 0; write (std::atoi (a)); }
+    sc_int (unsigned short a) { val = 0; write (a); }
+    sc_int (short a)          { val = 0; write (a); }
+    sc_int (unsigned long a)  { val = 0; write (a); }
+    sc_int (long a)           { val = 0; write (a); }
+    sc_int (unsigned int a)   { val = 0; write (a); }
+    sc_int (int a)            { val = 0; write (a); }
+    sc_int (int64 a)          { val = 0; write (a); }
+    sc_int (uint64 a)         { val = 0; write (a); }
+    sc_int (double a)         { val = 0; write (a); }
+
+    template <int W2> sc_int (const sc_int<W2> &val_) { val = 0; write (val_.read());}
+    /* this template doesn't redefine default copy constructor of sc_int.
+     * So, we define by this way 
+     */
+
+    sc_int (const sc_int &val_) { val = val_.val; }
+    sc_int (const sc_int_subref_r & a) { val = 0; write (a); } 
     /* the user needs to cast explicitly result of range () method. */
 
-  /***********************/
-  /* SYSTEMCASS SPECIFIC */
-  /***********************/
+
+    /***********************/
+    /* SYSTEMCASS SPECIFIC */
+    /***********************/
+
+    // read/write
+    inline const data_type& read() const { return val; }
+    inline void write(data_type val_)    { vf.valW = val_; }
+    template <int W2> inline void write (const sc_int<W2> val_) { write (val_.read ()); }
+    inline void write (const sc_int_subref_r& s) { write (s.read()); }
+
+    /***********************/
+    /*        L R M        */
+    /***********************/
+
+    // operators
+    inline operator const data_type & () const {
+        return read ();
+    }
+
+    template <typename T> inline sc_int& operator = (const T& val_) {
+        write (val_);
+        return *this;
+    }
+
+    inline sc_int & operator = (const sc_int_subref_r& a) {
+        write (a);
+        return *this;
+    }
+
+    // explicit conversions
+    inline uint32 to_uint()   const { return val & MASK32(W); }
+    inline int32  to_int()    const { return val & MASK32(W); }
+    inline uint64 to_uint64() const { return val & MASK64(W); }
+    inline int64  to_int64()  const { return val & MASK64(W); }
+
+    // explicit conversion to character string 
+    const sc_string to_string(sc_numrep numrep = SC_DEC) const {
+        return sc_dt::to_string (val, W, numrep);
+    }
+    const sc_string to_dec() const { return to_string (SC_DEC); }
+    const sc_string to_bin() const { return to_string (SC_BIN); }
+    const sc_string to_oct() const { return to_string (SC_OCT); }
+    const sc_string to_hex() const { return to_string (SC_HEX); }
+
+    // arithmetic
+#define DEFINE_OPERATOR(OPER)           \
+    template <typename T>               \
+    inline sc_int & operator OPER (T v) \
+    { vf.valW OPER v; return *this; }
+
+    DEFINE_OPERATOR(<<=)
+    DEFINE_OPERATOR(>>=)
+    DEFINE_OPERATOR(+=)
+    DEFINE_OPERATOR(-=)
+    DEFINE_OPERATOR(*=)
+    DEFINE_OPERATOR(/=)
+    DEFINE_OPERATOR(%=)
+    DEFINE_OPERATOR(&=)
+    DEFINE_OPERATOR(|=)
+    DEFINE_OPERATOR(^=)
+#undef DEFINE_OPERATOR
+
+    inline sc_int_bit_ref & operator [] (int v) {
+        return (vf.valW >> v) & 1;
+    }
+    inline sc_int_bit_ref_r & operator [] (int v) const {
+        return (vf.valW >> v) & 1;
+    }
+
+    template <int W2> 
+    inline sc_int<W + W2> operator , (const sc_int<W2> & b) const {
+        sc_int<W + W2> res = read() << W2; res += b.read();
+        return res;
+    }
+
+    inline sc_int<W + 1> operator , (bool b) const {
+        sc_int<W + 1> res = read(); res <<= 1; res += b;
+        return res;
+    }
+
+    template <int W2>
+    inline sc_int<W2> operator , (const sc_int_subref_r &v) const {
+        std::cerr << "Warning : \n";
+        return sc_int<W2> (v.read());
+    }
+
+    inline sc_int_subref range (int left, int right) {
+        return (data_type)((data_type) (((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) & val) >> right;
+    }
+
+    inline sc_int_subref_r range (int left, int right) const {
+        return sc_int_subref_r (((data_type) (((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) & val) >> right, left, right);
+    }
 #if 0
-  bool is_negative () const {
-    return (valW >> (W-1)) == 1;
-  }
+    std::cerr << "range(" << left << "," << right << ")\n";
+    std::cerr << "val = " << val << "\n";
+    std::cerr << "~0 >> " << (sizeof (data_type) * 8 - left - 1) << " = " << (data_type) (((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) << "\n";
+    std::cerr <<  ((data_type) ((((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) & val) >> right) << "\n";
+    std::cerr << "data_type = " << sizeof (data_type) << "\n";
 #endif
-  // read/write
-  inline const data_type& read() const { return val; }
-  inline void write(data_type val_)    { vf.valW = val_; }
-  template <int W2> inline void write (const sc_int<W2> val_) { write (val_.read ()); }
-//inline void write (const sc_int<W> val_) { write (val_.read()); };
-  inline void write (const sc_int_subref_r& s) { write (s.read()); }
-
-  /***********************/
-  /*        L R M        */
-  /***********************/
-  // operators
-  inline operator const data_type& () const { return read (); }
-//  inline void write(int64 val_) { val = val_ & MASK64(W); }
-//  inline void write(signed int val_)   { val = val_ & MASK32(W); }
-	template <typename T> inline sc_int& operator = (const T& val_) 
-  { write (val_); return *this; }
-	inline sc_int& operator = (const sc_int_subref_r& a) 
-  { write (a); return *this; }
-
-  // explicit conversions
-  inline uint32         to_uint   () const {return val & MASK32(W);};
-  inline int32          to_int    () const {return val & MASK32(W);};
-  inline uint64         to_uint64 () const {return val & MASK64(W);};
-  inline int64          to_int64  () const {return val & MASK64(W);};
-
-  // explicit conversion to character string 
-  const sc_string to_string       ( sc_numrep numrep = SC_DEC ) const 
-  { return sc_dt::to_string (val, W, numrep); }
-  const sc_string to_dec() const  { return to_string (SC_DEC); }
-  const sc_string to_bin() const  { return to_string (SC_BIN); }
-  const sc_string to_oct() const  { return to_string (SC_OCT); }
-  const sc_string to_hex() const  { return to_string (SC_HEX); }
-
-  // arithmetic
-#define DEFINE_OPERATOR(OPER)        \
-  template <typename T>              \
-  inline sc_int& operator OPER (T v) \
-  { vf.valW OPER v; return *this; }
-
-  DEFINE_OPERATOR(<<=)
-  DEFINE_OPERATOR(>>=)
-  DEFINE_OPERATOR(+=)
-  DEFINE_OPERATOR(-=)
-  DEFINE_OPERATOR(*=)
-  DEFINE_OPERATOR(/=)
-  DEFINE_OPERATOR(%=)
-  DEFINE_OPERATOR(&=)
-  DEFINE_OPERATOR(|=)
-  DEFINE_OPERATOR(^=)
-#undef DEFINE_OPERATOR
-
-  inline sc_int_bit_ref& operator [] (int v)
-  { return (vf.valW >> v) & 1; }
-  inline sc_int_bit_ref_r& operator [] (int v) const
-  { return (vf.valW >> v) & 1; }
-
-  template <int W2> 
-  inline sc_int<W+W2> operator , (const sc_int<W2> &b) const
-  { sc_int<W+W2> res = read() << W2; res += b.read(); return res; }
-#if 0 
-std::cerr << "[" << to_bin() << "," << b.to_bin() << " = " << res.to_bin() << "]\n"; 
-#endif
-
-  inline sc_int<W+1> operator , (bool b) const
-  { sc_int<W+1> res = read(); res <<= 1; res += b; return res; }
-#if 0 
-std::cerr << "[" << to_bin() << "," << b.to_bin() << " = " << res.to_bin() << "]\n"; 
-#endif
-
-  template <int W2>
-  inline sc_int<W2> operator , (const sc_int_subref_r &v) const
-  { std::cerr << "Warning : \n"; return sc_int<W2> (v.read()); }
-
-  inline sc_int_subref range (int left, int right)
-  { return (data_type)((data_type) (((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) & val) >> right; }
-
-  inline sc_int_subref_r range (int left, int right) const
-  { return sc_int_subref_r (((data_type) (((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) & val) >> right, left, right); }
-#if 0
-std::cerr << "range(" << left << "," << right << ")\n";
-std::cerr << "val = " << val << "\n";
-std::cerr << "~0 >> " << (sizeof (data_type) * 8 - left - 1) << " = " << (data_type) (((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) << "\n";
-std::cerr <<  ((data_type) ((((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) & val) >> right) << "\n";
-std::cerr << "data_type = " << sizeof (data_type) << "\n";
-#endif
 
 };
 
-inline std::ostream& operator << (std::ostream &o, const sc_int_subref_r& s)
-{ return o << s.val; }
+inline std::ostream & operator << (std::ostream &o, const sc_int_subref_r & s) {
+    return o << s.val;
+}
+
+#undef MASK32
+#undef MASK64
 
 } /* end of sc_dt namespace */
@@ -259,2 +274,13 @@
 #endif /* __SC_INT_H__ */
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_interface.cc
===================================================================
--- /sources/src/sc_interface.cc	(revision 51)
+++ /sources/src/sc_interface.cc	(revision 52)
@@ -34,31 +34,32 @@
  */
 
+#include <iostream>
+#include <map>
+#include <cstdlib>  //exit
+
 #include "sc_interface.h"
 #include "sc_event.h"
 #include "assert.h"
-#include <iostream>
-#include <map>
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <cstdlib>  //exit
 
 using namespace std;
 
 namespace sc_core {
+
 struct interface_infos_t {
-	size_t data_size_in_bytes;
-	sc_event default_event;
-	interface_infos_t ()
-	{
-		exit(12);
-	}
-	interface_infos_t (size_t s, sc_event e) 
-		: data_size_in_bytes(s), default_event (e)
-	{
-	}
+    size_t data_size_in_bytes;
+    sc_event default_event;
+    interface_infos_t() {
+        exit(12);
+    }
+    interface_infos_t (size_t s, sc_event e) : data_size_in_bytes(s), default_event(e) {}
 };
-typedef std::map<const sc_interface*,interface_infos_t> interface2infos_t;
+
+typedef std::map<const sc_interface *,interface_infos_t> interface2infos_t;
 static interface2infos_t interface2infos;
+
 }
 
@@ -71,62 +72,50 @@
 // ----------------------------------------------------------------------------
 
-#if 0
-static 
-ostream&
-operator << (ostream &o, 
-             const sc_interface &i)
-{
-	return o << hex << &i;
-}
-#endif
-
-/*
-void 
-sc_interface::register_port (sc_port_base & port_, const char *if_typename_)
-{
-}
-*/
-
-sc_interface::~sc_interface ()
-{}
+sc_interface::~sc_interface() {}
   
 // constructor 
-sc_interface::sc_interface ()
-{
+sc_interface::sc_interface() {
   pointer = NULL; // => not assigned
 }
 
-void
-sc_interface::init (size_t s) const
-{
-	interface2infos_t::value_type pair (this, 
-			interface_infos_t (s,sc_event (*this, sc_event::VAL)));
-	interface2infos.insert (pair);
+
+void sc_interface::init (size_t s) const {
+    interface2infos_t::value_type pair (this, interface_infos_t(s,sc_event (*this, sc_event::VAL)));
+    interface2infos.insert(pair);
 }
 
-size_t
-sc_interface::data_size_in_bytes () const
-{
-	interface2infos_t::iterator i = interface2infos.find (this);
+size_t sc_interface::data_size_in_bytes () const {
+    interface2infos_t::iterator i = interface2infos.find(this);
 #ifdef CONFIG_DEBUG
-	if (i == interface2infos.end ()) {
-		cerr << "Internal error : can't find data size of " << this << "\n";
-		exit (90);
-	}
+    if (i == interface2infos.end()) {
+        cerr << "Internal error : can't find data size of " << this << "\n";
+        exit (90);
+    }
 #endif
-	return i->second.data_size_in_bytes;
+    return i->second.data_size_in_bytes;
 }
 
-const sc_event &
-sc_interface::default_event () const
-{
-	interface2infos_t::iterator i = interface2infos.find (this);
+
+const sc_event & sc_interface::default_event () const {
+    interface2infos_t::iterator i = interface2infos.find(this);
 #ifdef CONFIG_DEBUG
-	if (i == interface2infos.end ()) {
-		cerr << "Internal error : can't find default event of " << this << "\n";
-		exit (90);
-	}
+    if (i == interface2infos.end ()) {
+        cerr << "Internal error : can't find default event of " << this << "\n";
+        exit (90);
+    }
 #endif
-	return i->second.default_event;
+    return i->second.default_event;
 }
 
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_interface.h
===================================================================
--- /sources/src/sc_interface.h	(revision 51)
+++ /sources/src/sc_interface.h	(revision 52)
@@ -20,4 +20,5 @@
 namespace sc_core {
 
+
 // ----------------------------------------------------------------------------
 //  CLASS : sc_interface
@@ -25,32 +26,32 @@
 //  
 // ----------------------------------------------------------------------------
-class sc_interface
-{ 
-	///////////
-	// Internal
-	private:  tab_t              *pointer; // pointeur dans la table de signaux 
-                                         // NULL pour les sc_out/sc_inout
-  public:   inline tab_t       *get_pointer () const   { return pointer; }
-  public:   inline void         set_pointer (tab_t *i) { pointer = i; }
-	public:   size_t              data_size_in_bytes () const; /* nb of bytes */
-	protected:void                init        (size_t) const;
-	///////////
-					 
-	//////
-	// LRM
-public:
-					 /*
-  virtual void register_port (sc_port_base & port_, const char *if_typename_);
-	*/
-  /*virtual */const sc_event & default_event () const;
-  /*virtual */~ sc_interface ();
-protected:
-  // constructor 
+
+class sc_interface { 
+    ///////////
+    // Internal
+    private:
+    tab_t * pointer; // pointeur dans la table de signaux 
+                     // NULL pour les sc_out/sc_inout
+
+    public:
+    inline tab_t * get_pointer() const { return pointer; }
+    inline void set_pointer(tab_t * i) { pointer = i; }
+    size_t data_size_in_bytes() const; /* nb of bytes */
+
+    protected:
+    void init(size_t) const;
+
+    public:
+    const sc_event & default_event() const;
+    ~sc_interface();
+
+    protected:
     sc_interface ();
-private:
-  // disabled 
-    sc_interface (const sc_interface &);
+
+    private:
+    // disabled
+    // QM: required for compilation...
+    sc_interface(const sc_interface &);
     sc_interface & operator = (const sc_interface &);
-  //////
 };
 
@@ -58,2 +59,14 @@
 
 #endif /* __SC_INTERFACE_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_localvar.h
===================================================================
--- /sources/src/sc_localvar.h	(revision 51)
+++ /sources/src/sc_localvar.h	(revision 52)
@@ -20,17 +20,19 @@
 
 template <typename T>
-class sc_localvar : public sc_signal_base
-{
+class sc_localvar : public sc_signal_base {
 
-  public: sc_localvar (const T& object)
-  { init (object); }
+    public:
+    sc_localvar (const T & object) {
+        init (object);
+    }
 
-  private: void init (const T& object)
-  {
-    set_pointer ((tab_t*) &object);
-    set_kind ("sc_localvar");
-    sc_interface::init (sizeof (object));
-    bind (*((sc_signal_base*)this));
-  }
+    private:
+    void init (const T & object) {
+        set_pointer ((tab_t *) &object);
+        set_kind ("sc_localvar");
+        sc_interface::init (sizeof(object));
+        bind (*((sc_signal_base *) this));
+    }
+
 };
 
@@ -39,2 +41,13 @@
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_logic.cc
===================================================================
--- /sources/src/sc_logic.cc	(revision 51)
+++ /sources/src/sc_logic.cc	(revision 52)
@@ -40,4 +40,5 @@
 
 #include "sc_logic.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -46,9 +47,20 @@
 namespace sc_dt {
 
-const sc_logic SC_LOGIC_0 (Log_0);
-const sc_logic SC_LOGIC_1 (Log_1);
-const sc_logic SC_LOGIC_Z (Log_Z);
-const sc_logic SC_LOGIC_X (Log_X);
+const sc_logic SC_LOGIC_0(Log_0);
+const sc_logic SC_LOGIC_1(Log_1);
+const sc_logic SC_LOGIC_Z(Log_Z);
+const sc_logic SC_LOGIC_X(Log_X);
 
 } /* end of sc_dt namespace */
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_logic.h
===================================================================
--- /sources/src/sc_logic.h	(revision 51)
+++ /sources/src/sc_logic.h	(revision 52)
@@ -29,118 +29,114 @@
 // ----------------------------------------------------------------------------
 
-enum sc_logic_value_t
-{
-  Log_0 = 0,
-  Log_1,
-  Log_Z,
-  Log_X
+enum sc_logic_value_t {
+    Log_0 = 0,
+    Log_1,
+    Log_Z,
+    Log_X
 };
 
-class sc_logic
-{
-public:
-  // constructors & destructor 
-  sc_logic ();
-  sc_logic (const sc_logic & a);
-  sc_logic (sc_logic_value_t v);
-  explicit sc_logic (bool a);
-  explicit sc_logic (char a);
-  explicit sc_logic (int a);
-  explicit sc_logic (const sc_bit & a);
-  ~sc_logic ();
-  // assignment operators 
-   sc_logic & operator = (const sc_logic & a);
-   sc_logic & operator = (sc_logic_value_t v);
-   sc_logic & operator = (bool a);
-   sc_logic & operator = (char a);
-   sc_logic & operator = (int a);
-   sc_logic & operator = (const sc_bit & a);
-  // bitwise assignment operators 
-   sc_logic & operator &= (const sc_logic & b);
-   sc_logic & operator &= (sc_logic_value_t v);
-   sc_logic & operator &= (bool b);
-   sc_logic & operator &= (char b);
-   sc_logic & operator &= (int b);
-   sc_logic & operator |= (const sc_logic & b);
-   sc_logic & operator |= (sc_logic_value_t v);
-   sc_logic & operator |= (bool b);
-   sc_logic & operator |= (char b);
-   sc_logic & operator |= (int b);
-   sc_logic & operator ^= (const sc_logic & b);
-   sc_logic & operator ^= (sc_logic_value_t v);
-   sc_logic & operator ^= (bool b);
-   sc_logic & operator ^= (char b);
-   sc_logic & operator ^= (int b);
-  // bitwise complement 
-  const sc_logic operator ~ () const;
-    sc_logic & b_not ();
-  // bitwise and 
-  friend const sc_logic operator & (const sc_logic & a, const sc_logic & b);
-  friend const sc_logic operator & (const sc_logic & a, sc_logic_value_t b);
-  friend const sc_logic operator & (const sc_logic & a, bool b);
-  friend const sc_logic operator & (const sc_logic & a, char b);
-  friend const sc_logic operator & (const sc_logic & a, int b);
-  friend const sc_logic operator & (sc_logic_value_t a, const sc_logic & b);
-  friend const sc_logic operator & (bool a, const sc_logic & b);
-  friend const sc_logic operator & (char a, const sc_logic & b);
-  friend const sc_logic operator & (int a, const sc_logic & b);
-  // bitwise or 
-  friend const sc_logic operator | (const sc_logic & a, const sc_logic & b);
-  friend const sc_logic operator | (const sc_logic & a, sc_logic_value_t b);
-  friend const sc_logic operator | (const sc_logic & a, bool b);
-  friend const sc_logic operator | (const sc_logic & a, char b);
-  friend const sc_logic operator | (const sc_logic & a, int b);
-  friend const sc_logic operator | (sc_logic_value_t a, const sc_logic & b);
-  friend const sc_logic operator | (bool a, const sc_logic & b);
-  friend const sc_logic operator | (char a, const sc_logic & b);
-  friend const sc_logic operator | (int a, const sc_logic & b);
-  // bitwise xor 
-  friend const sc_logic operator ^ (const sc_logic & a, const sc_logic & b);
-  friend const sc_logic operator ^ (const sc_logic & a, sc_logic_value_t b);
-  friend const sc_logic operator ^ (const sc_logic & a, bool b);
-  friend const sc_logic operator ^ (const sc_logic & a, char b);
-  friend const sc_logic operator ^ (const sc_logic & a, int b);
-  friend const sc_logic operator ^ (sc_logic_value_t a, const sc_logic & b);
-  friend const sc_logic operator ^ (bool a, const sc_logic & b);
-  friend const sc_logic operator ^ (char a, const sc_logic & b);
-  friend const sc_logic operator ^ (int a, const sc_logic & b);
-  // relational operators and functions 
-  friend bool operator == (const sc_logic & a, const sc_logic & b);
-  friend bool operator == (const sc_logic & a,
-			   sc_logic_value_t b);
-  friend bool operator == (const sc_logic & a, bool b);
-  friend bool operator == (const sc_logic & a, char b);
-  friend bool operator == (const sc_logic & a, int b);
-  friend bool operator == (sc_logic_value_t a, const sc_logic & b);
-  friend bool operator == (bool a, const sc_logic & b);
-  friend bool operator == (char a, const sc_logic & b);
-  friend bool operator == (int a, const sc_logic & b);
-  friend bool operator != (const sc_logic & a, const sc_logic & b);
-  friend bool operator != (const sc_logic & a, sc_logic_value_t b);
-  friend bool operator != (const sc_logic & a, bool b);
-  friend bool operator != (const sc_logic & a, char b);
-  friend bool operator != (const sc_logic & a, int b);
-  friend bool operator != (sc_logic_value_t a, const sc_logic & b);
-  friend bool operator != (bool a, const sc_logic & b);
-  friend bool operator != (char a, const sc_logic & b);
-  friend bool operator != (int a, const sc_logic & b);
-  // explicit conversions 
-  sc_logic_value_t value () const;
-  bool is_01 () const;
-  bool to_bool () const;
-  char to_char () const;
-/*
-  // other methods 
-  void print (std::ostream & os = std::cout) const;
-  void scan (std::istream & is = std::cin);
-*/
-  // memory (de);allocation 
-  static void *operator new (size_t, void *p);	// placement new 
-  static void *operator new (size_t sz);
-  static void operator delete (void *p, size_t sz);
-  static void *operator new[] (size_t sz);
-  static void operator delete[] (void *p, size_t sz);
-private:
-  // disabled 
+
+class sc_logic {
+    public:
+    // constructors & destructor 
+    sc_logic();
+    sc_logic(const sc_logic & a);
+    sc_logic(sc_logic_value_t v);
+    explicit sc_logic(bool a);
+    explicit sc_logic(char a);
+    explicit sc_logic(int a);
+    explicit sc_logic(const sc_bit & a);
+    ~sc_logic();
+    // assignment operators 
+    sc_logic & operator = (const sc_logic & a);
+    sc_logic & operator = (sc_logic_value_t v);
+    sc_logic & operator = (bool a);
+    sc_logic & operator = (char a);
+    sc_logic & operator = (int a);
+    sc_logic & operator = (const sc_bit & a);
+    // bitwise assignment operators 
+    sc_logic & operator &= (const sc_logic & b);
+    sc_logic & operator &= (sc_logic_value_t v);
+    sc_logic & operator &= (bool b);
+    sc_logic & operator &= (char b);
+    sc_logic & operator &= (int b);
+    sc_logic & operator |= (const sc_logic & b);
+    sc_logic & operator |= (sc_logic_value_t v);
+    sc_logic & operator |= (bool b);
+    sc_logic & operator |= (char b);
+    sc_logic & operator |= (int b);
+    sc_logic & operator ^= (const sc_logic & b);
+    sc_logic & operator ^= (sc_logic_value_t v);
+    sc_logic & operator ^= (bool b);
+    sc_logic & operator ^= (char b);
+    sc_logic & operator ^= (int b);
+    // bitwise complement 
+    const sc_logic operator ~ () const;
+    sc_logic & b_not();
+    // bitwise and 
+    friend const sc_logic operator & (const sc_logic & a, const sc_logic & b);
+    friend const sc_logic operator & (const sc_logic & a, sc_logic_value_t b);
+    friend const sc_logic operator & (const sc_logic & a, bool b);
+    friend const sc_logic operator & (const sc_logic & a, char b);
+    friend const sc_logic operator & (const sc_logic & a, int b);
+    friend const sc_logic operator & (sc_logic_value_t a, const sc_logic & b);
+    friend const sc_logic operator & (bool a, const sc_logic & b);
+    friend const sc_logic operator & (char a, const sc_logic & b);
+    friend const sc_logic operator & (int a, const sc_logic & b);
+    // bitwise or 
+    friend const sc_logic operator | (const sc_logic & a, const sc_logic & b);
+    friend const sc_logic operator | (const sc_logic & a, sc_logic_value_t b);
+    friend const sc_logic operator | (const sc_logic & a, bool b);
+    friend const sc_logic operator | (const sc_logic & a, char b);
+    friend const sc_logic operator | (const sc_logic & a, int b);
+    friend const sc_logic operator | (sc_logic_value_t a, const sc_logic & b);
+    friend const sc_logic operator | (bool a, const sc_logic & b);
+    friend const sc_logic operator | (char a, const sc_logic & b);
+    friend const sc_logic operator | (int a, const sc_logic & b);
+    // bitwise xor 
+    friend const sc_logic operator ^ (const sc_logic & a, const sc_logic & b);
+    friend const sc_logic operator ^ (const sc_logic & a, sc_logic_value_t b);
+    friend const sc_logic operator ^ (const sc_logic & a, bool b);
+    friend const sc_logic operator ^ (const sc_logic & a, char b);
+    friend const sc_logic operator ^ (const sc_logic & a, int b);
+    friend const sc_logic operator ^ (sc_logic_value_t a, const sc_logic & b);
+    friend const sc_logic operator ^ (bool a, const sc_logic & b);
+    friend const sc_logic operator ^ (char a, const sc_logic & b);
+    friend const sc_logic operator ^ (int a, const sc_logic & b);
+    // relational operators and functions 
+    friend bool operator == (const sc_logic & a, const sc_logic & b);
+    friend bool operator == (const sc_logic & a, sc_logic_value_t b);
+    friend bool operator == (const sc_logic & a, bool b);
+    friend bool operator == (const sc_logic & a, char b);
+    friend bool operator == (const sc_logic & a, int b);
+    friend bool operator == (sc_logic_value_t a, const sc_logic & b);
+    friend bool operator == (bool a, const sc_logic & b);
+    friend bool operator == (char a, const sc_logic & b);
+    friend bool operator == (int a, const sc_logic & b);
+    friend bool operator != (const sc_logic & a, const sc_logic & b);
+    friend bool operator != (const sc_logic & a, sc_logic_value_t b);
+    friend bool operator != (const sc_logic & a, bool b);
+    friend bool operator != (const sc_logic & a, char b);
+    friend bool operator != (const sc_logic & a, int b);
+    friend bool operator != (sc_logic_value_t a, const sc_logic & b);
+    friend bool operator != (bool a, const sc_logic & b);
+    friend bool operator != (char a, const sc_logic & b);
+    friend bool operator != (int a, const sc_logic & b);
+    
+    // explicit conversions 
+    sc_logic_value_t value() const;
+    bool is_01() const;
+    bool to_bool() const;
+    char to_char() const;
+    
+    // memory (de);allocation 
+    static void * operator new (size_t, void * p); // placement new 
+    static void * operator new (size_t sz);
+    static void operator delete (void * p, size_t sz);
+    static void * operator new [] (size_t sz);
+    static void operator delete [] (void * p, size_t sz);
+    
+    private:
+    // disabled 
     explicit sc_logic (const char *);
     sc_logic & operator = (const char *);
@@ -155,2 +151,14 @@
 
 #endif /* __SC_LOGIC_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_lv.h
===================================================================
--- /sources/src/sc_lv.h	(revision 51)
+++ /sources/src/sc_lv.h	(revision 52)
@@ -10,4 +10,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_LV_H__
 #define __SC_LV_H__
@@ -28,17 +29,19 @@
 namespace sc_dt {
 
-template<int W> struct s_lv_type { typedef uint64 lv_type;};
+template<int W> struct s_lv_type { typedef uint64 lv_type; };
+
 #define DECLAR_LV_TYPE(W) template<> struct s_lv_type<W> { typedef smallest_uint lv_type; }// not declared as uint16 because << operator threats like a character
-DECLAR_LV_TYPE( 1);
-DECLAR_LV_TYPE( 2);
-DECLAR_LV_TYPE( 3);
-DECLAR_LV_TYPE( 4);
-DECLAR_LV_TYPE( 5);
-DECLAR_LV_TYPE( 6);
-DECLAR_LV_TYPE( 7);
-DECLAR_LV_TYPE( 8);
+DECLAR_LV_TYPE(1);
+DECLAR_LV_TYPE(2);
+DECLAR_LV_TYPE(3);
+DECLAR_LV_TYPE(4);
+DECLAR_LV_TYPE(5);
+DECLAR_LV_TYPE(6);
+DECLAR_LV_TYPE(7);
+DECLAR_LV_TYPE(8);
 #undef DECLAR_LV_TYPE
+
 #define DECLAR_LV_TYPE(W) template<> struct s_lv_type<W> { typedef uint16 lv_type; }
-DECLAR_LV_TYPE( 9);
+DECLAR_LV_TYPE(9);
 DECLAR_LV_TYPE(10);
 DECLAR_LV_TYPE(11);
@@ -49,4 +52,5 @@
 DECLAR_LV_TYPE(16);
 #undef DECLAR_LV_TYPE
+
 #define DECLAR_LV_TYPE(W) template<> struct s_lv_type<W> { typedef uint32 lv_type; }
 DECLAR_LV_TYPE(17);
@@ -69,28 +73,20 @@
 
 
-class sc_lv_base
-{
-public:
-  // constructors 
-/*
-  explicit sc_lv_base (int length_ = sc_length_param ().len ());
-  explicit sc_lv_base (bool a, int length_ = sc_length_param ().len ());
-*/
-    sc_lv_base () { } // SYSTEMCASS SPECIFIC
-    sc_lv_base (const char *a);
-    sc_lv_base (const char *a, int length_);
+class sc_lv_base {
+
+    public:
+    // constructors 
+    sc_lv_base() {} // SYSTEMCASS SPECIFIC
+    sc_lv_base(const char * a);
+    sc_lv_base(const char * a, int length_);
     template < class X > sc_lv_base (const sc_lv_base & a);
-    virtual ~ sc_lv_base () {}
-  // assignment operators 
+    virtual ~sc_lv_base() {}
+    // assignment operators 
     template < class X > sc_lv_base & operator = (const sc_lv_base & a);
-    sc_lv_base & operator = (const char *a);
+    sc_lv_base & operator = (const char * a);
     sc_lv_base & operator = (const bool * a);
     sc_lv_base & operator = (const sc_logic * a);
     sc_lv_base & operator = (const sc_unsigned & a);
     sc_lv_base & operator = (const sc_signed & a);
-/*
-    sc_lv_base & operator = (const sc_uint_base & a);
-    sc_lv_base & operator = (const sc_int_base & a);
-*/
     sc_lv_base & operator = (unsigned long a);
     sc_lv_base & operator = (long a);
@@ -100,68 +96,72 @@
     sc_lv_base & operator = (int64 a);
 
-  // methods 
-  int length () const;
-  bool is_01 () const;
+    // methods 
+    int length() const;
+    bool is_01() const;
 };
 
 
-template < int W > class sc_lv:public sc_lv_base
-{
-  /***********************/
-  /* SYSTEMCASS SPECIFIC */
-  /***********************/
-  typedef sc_lv<W>                         this_type;
-  typedef typename s_lv_type<W>::lv_type   data_type;
-  data_type val;
-public:
-  // constructors 
-  sc_lv ()                         { val = 0; }
-  explicit sc_lv (bool init_value) { val = 0; }
-  explicit sc_lv (char init_value) { val = 0; }
-    sc_lv (const char *a)          { val = 0; write (atoi (a)); }
-    sc_lv (const bool * a)         { val = 0; write (a); }
-    sc_lv (const sc_logic * a)     { val = 0; write (a); }
-    sc_lv (const sc_unsigned & a)  { val = 0; write (a); }
-    sc_lv (const sc_signed & a)    { val = 0; write (a); }
-/*
-    sc_lv (const sc_uint_base & a);
-    sc_lv (const sc_int_base & a);
-*/
-    sc_lv (unsigned long a)        { val = 0; write (a); }  
-    sc_lv (long a)                 { val = 0; write (a); }
-    sc_lv (unsigned int a)         { val = 0; write (a); }
-    sc_lv (int a)                  { val = 0; write (a); }
-    sc_lv (uint64 a)               { val = 0; write (a); }
-    sc_lv (int64 a)                { val = 0; write (a); }
-    sc_lv (const sc_lv_base & a)   { val = 0; write (a); }
-    sc_lv (const sc_lv < W > &a)   { val = 0; write (a); }
-  // assignment operators 
+template < int W > class sc_lv : public sc_lv_base {
+
+    /***********************/
+    /* SYSTEMCASS SPECIFIC */
+    /***********************/
+    
+    typedef sc_lv<W> this_type;
+    typedef typename s_lv_type<W>::lv_type data_type;
+    data_type val;
+
+    public:
+    // constructors 
+    sc_lv() { val = 0; }
+    explicit sc_lv(bool init_value) { val = 0; }
+    explicit sc_lv (char init_value) { val = 0; }
+    sc_lv(const char * a)        { val = 0; write(atoi(a)); }
+    sc_lv(const bool * a)        { val = 0; write(a); }
+    sc_lv(const sc_logic * a)    { val = 0; write(a); }
+    sc_lv(const sc_unsigned & a) { val = 0; write(a); }
+    sc_lv(const sc_signed & a)   { val = 0; write(a); }
+    sc_lv(unsigned long a)       { val = 0; write(a); }  
+    sc_lv(long a)                { val = 0; write(a); }
+    sc_lv(unsigned int a)        { val = 0; write(a); }
+    sc_lv(int a)                 { val = 0; write(a); }
+    sc_lv(uint64 a)              { val = 0; write(a); }
+    sc_lv(int64 a)               { val = 0; write(a); }
+    sc_lv(const sc_lv_base & a)  { val = 0; write(a); }
+    sc_lv(const sc_lv < W > & a) { val = 0; write(a); }
+    
+    // assignment operators 
 #ifdef LRM
-  template < class X > sc_lv < W > &operator = (const sc_lv_base & a)
-  sc_lv < W > &operator = (const sc_lv < W > &a)
-  sc_lv < W > &operator = (const char *a)
-  sc_lv < W > &operator = (const bool * a)
-  sc_lv < W > &operator = (const sc_logic * a)
-  sc_lv < W > &operator = (const sc_unsigned & a)
-  sc_lv < W > &operator = (const sc_signed & a)
+    template < class X > sc_lv < W > & operator = (const sc_lv_base & a);
+    sc_lv < W > & operator = (const sc_lv < W > &a);
+    sc_lv < W > & operator = (const char *a);
+    sc_lv < W > & operator = (const bool * a);
+    sc_lv < W > & operator = (const sc_logic * a);
+    sc_lv < W > & operator = (const sc_unsigned & a);
+    sc_lv < W > & operator = (const sc_signed & a);
 #endif // LRM
-  template <typename T> inline sc_lv& operator = (const T& val_)
-  { write (val_); return *this; }
-/*
-    sc_lv < W > &operator = (const sc_uint_base & a);
-    sc_lv < W > &operator = (const sc_int_base & a);
-*/
-    sc_lv < W > &operator = (unsigned long a);
-    sc_lv < W > &operator = (long a);
-    sc_lv < W > &operator = (unsigned int a);
-    sc_lv < W > &operator = (int a) { val = a; return *this; }
-    sc_lv < W > &operator = (uint64 a);
-    sc_lv < W > &operator = (int64 a);
-  /***********************/
-  /* SYSTEMCASS SPECIFIC */
-  /***********************/
-  // read/write
-  inline void write(data_type val_)    { val = val_; }
-  template <int W2> inline void write (const sc_lv<W2> val_) { write (val_.read()); }
+
+    template <typename T> inline sc_lv& operator = (const T& val_) {
+        write (val_);
+        return *this;
+    }
+    sc_lv < W > & operator = (unsigned long a);
+    sc_lv < W > & operator = (long a);
+    sc_lv < W > & operator = (unsigned int a);
+    sc_lv < W > & operator = (int a) { val = a; return *this; }
+    sc_lv < W > & operator = (uint64 a);
+    sc_lv < W > & operator = (int64 a);
+
+    
+    /***********************/
+    /* SYSTEMCASS SPECIFIC */
+    /***********************/
+    // read/write
+    inline void write(data_type val_) {
+        val = val_;
+    }
+    template <int W2> inline void write (const sc_lv<W2> val_) {
+        write (val_.read());
+    }
 
 };
@@ -170,2 +170,14 @@
 
 #endif /* __SC_LV_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_main.cc
===================================================================
--- /sources/src/sc_main.cc	(revision 51)
+++ /sources/src/sc_main.cc	(revision 52)
@@ -54,44 +54,45 @@
 #endif
 
-//
+
 using namespace std;
 using namespace sc_core;
-//
-typedef list<sc_module* >         module_list_t;
-
-//
+
+typedef list<sc_module *> module_list_t;
+
+
 namespace sc_core {
 
-bool        check_port_dependencies = false;
+bool check_port_dependencies = false;
 #ifdef CONFIG_DEFAULT_RUNTIME_COMPILATION
-bool        dynamic_link_of_scheduling_code = true;
+bool dynamic_link_of_scheduling_code = true;
 #else
-bool        dynamic_link_of_scheduling_code = false;
-#endif
-bool        dump_netlist_info       = false;
-bool        dump_funclist_info      = false;
-bool        dump_stage              = false;
-bool        dump_all_graph          = false;
-const char* dump_module_hierarchy   = NULL;
-bool        edit_schedule           = false;
-bool        keep_generated_code     = false;
-bool        nobanner                = false;
-bool        noinitialization        = false;
-bool        nosimulation            = false;
-bool        notrace                 = false;
-bool        print_schedule          = false;
-bool        print_user_resources    = false;
-char*       save_on_exit            = NULL;
-int         scheduling_method       = NO_SCHEDULING;
-bool        use_sensitivity_list    = false;
-bool        use_port_dependency     = false;
+bool dynamic_link_of_scheduling_code = false;
+#endif
+bool dump_netlist_info    = false;
+bool dump_funclist_info   = false;
+bool dump_stage           = false;
+bool dump_all_graph       = false;
+const char * dump_module_hierarchy = NULL;
+bool edit_schedule        = false;
+bool keep_generated_code  = false;
+bool nobanner             = false;
+bool noinitialization     = false;
+bool nosimulation         = false;
+bool notrace              = false;
+bool print_schedule       = false;
+bool print_user_resources = false;
+char * save_on_exit       = NULL;
+int  scheduling_method    = NO_SCHEDULING;
+bool use_sensitivity_list = false;
+bool use_port_dependency  = false;
 
 #ifdef _OPENMP
-bool        use_openmp              = true;
+bool use_openmp = true;
 #else
-bool        use_openmp              = false;
-#endif
-
-const char *HELP_STRING = \
+bool use_openmp = false;
+#endif
+
+
+const char * HELP_STRING = \
 "\n"
 "--a\n"
@@ -169,204 +170,209 @@
 
 
-static
-void 
-print_splash_screen ()
-{
-  // Display once
-  if (nobanner == false)
-    cerr << get_splash_screen ();
-  nobanner = true;
+
+static void print_splash_screen() {
+    // Display once
+    if (nobanner == false) {
+        cerr << get_splash_screen ();
+    }
+    nobanner = true;
 }
 
-static
-void
-check_parameters ()
-{
-  if (dump_all_graph) {
-    if (use_port_dependency)
-      cerr << "SystemCASS will dump signal dependency graph.\n";
-    else
-      cerr << "SystemCASS will dump module dependency graph.\n";
-  }
-  if (!use_port_dependency && check_port_dependencies)
-    cerr << "Warning : unable to check port dependencies.\n";
-  if (!use_port_dependency)
-  {
-    use_sensitivity_list = true;
-    scheduling_method = CASS_SCHEDULING;
-  }
-  switch (scheduling_method) {
-  case CASS_SCHEDULING :
-    assert(use_port_dependency == false);
-    break;
-  case BUCHMANN_SCHEDULING :
-  case MOUCHARD_SCHEDULING :
+
+static void check_parameters() {
+    if (dump_all_graph) {
+        if (use_port_dependency) {
+            cerr << "SystemCASS will dump signal dependency graph.\n";
+        }
+        else {
+            cerr << "SystemCASS will dump module dependency graph.\n";
+        }
+    }
+    if (!use_port_dependency && check_port_dependencies) {
+        cerr << "Warning : unable to check port dependencies.\n";
+    }
     if (!use_port_dependency) {
-    cerr << "Error : "
-            "The choosen scheduling needs port dependencies informations\n";
-    exit (31);
-    }
-    break;
-  default :
-    cerr << "Error : You need to choose one of the available scheduling :\n"
-         << "- Almost static scheduling like CASS (use sensitivity list)\n"
-         << "- Simple static scheduling (use port dependencies)\n"
-         << "- Entirely static scheduling (use port dependencies)\n";
-    exit (33);
-  }
-  assert(use_port_dependency || use_sensitivity_list);
+        use_sensitivity_list = true;
+        scheduling_method = CASS_SCHEDULING;
+    }
+    switch (scheduling_method) {
+        case CASS_SCHEDULING :
+            assert(use_port_dependency == false);
+            break;
+        case BUCHMANN_SCHEDULING :
+        case MOUCHARD_SCHEDULING :
+            if (!use_port_dependency) {
+                cerr << "Error : "
+                    "The choosen scheduling needs port dependencies informations\n";
+                exit (31);
+            }
+            break;
+        default :
+            cerr << "Error : You need to choose one of the available scheduling :\n"
+                << "- Almost static scheduling like CASS (use sensitivity list)\n"
+                << "- Simple static scheduling (use port dependencies)\n"
+                << "- Entirely static scheduling (use port dependencies)\n";
+            exit (33);
+    }
+    assert(use_port_dependency || use_sensitivity_list);
 }
 
-void
-apply_parameters (int &argc, char ** &argv)
-{
+
+void apply_parameters(int & argc, char ** &argv) {
 #ifdef KEEP_GENERATED_CODE // supprimer scheduling-XXXXXX.cc
-  keep_generated_code = true;
+    keep_generated_code = true;
 #endif
 #ifdef DUMP_NETLIST_INFO
-  dump_netlist_info = true;
+    dump_netlist_info = true;
 #endif
 #ifdef DUMP_FUNCLIST_INFO
-  dump_funclist_info = true;
+    dump_funclist_info = true;
 #endif
 #ifdef DUMP_STAGE
-  dump_stage = true;
+    dump_stage = true;
 #endif
 #ifdef DUMP_COMBINATIONAL_LIST2DOT
-  dump_all_graph = true;
+    dump_all_graph = true;
 #endif
 #ifdef PRINT_SCHEDULE
-  print_schedule = true;
+    print_schedule = true;
 #endif    
 #ifdef USE_PORT_DEPENDENCY
-  use_port_dependency = true;
-#endif
-  // parse the command line
-  int i;
-  for (i = 1; i < argc; ++i)
-    {
-    if (argv[i][0] == '-')
-      {
-      if (argv[i][1] == '-')
-        {
-        switch (argv[i][2])
-          {
-          case 'h' : 
-            print_splash_screen ();
-            cerr << "Usage : " 
-                 << argv[0] << " [--c] [--edit] [--d] [--f] [--h] [--i] [--k] [--modules filename] [--nobanner] [--[no]dynamiclink] [--nosim] [--notrace] [--s] [--t] [--tracestart n] [--usage] [--v] [--p|m|a] [others parameters processed by sc_main]\n"
-                 << "Thoses options are processed by SystemCASS library. All the remaining options are passed to sc_main.\n"
-                 << "sc_main function retrieves last parameters.\n"
-                 << HELP_STRING;
-            noinitialization = true;
-            nosimulation = true;
-            continue;
-          case 'v' : 
-            print_splash_screen ();
-            cerr << get_used_options  () << "\n";
-            cerr << get_used_env () << "\n";
-            cerr << sc_version () << "\n\n";
-            exit (0);
-          case 'u' : 
-            if (strcmp (argv[i]+2, "usage") == 0)
-              print_user_resources = true;
-            else
-              break;
-            continue;
-          case 'i' :
-            dump_netlist_info = true;
-            continue;
-          case 'f' :
-            dump_funclist_info = true;
-            continue;
-          case 's' :
-            if (strcmp (argv[i]+2, "save_on_exit") == 0)
-              save_on_exit = argv[++i];
-            else
-              dump_stage = true;
-            continue;
-          case 'c' :
-            print_schedule = true;
-            continue;
-          case 'd' :
-            if (strcmp (argv[i]+2, "dynamiclink") == 0)
-              dynamic_link_of_scheduling_code = true;
-            else
-              check_port_dependencies = true;
-            continue;
-          case 'e' :
-            if (strcmp (argv[i]+2, "edit") == 0)
-              edit_schedule = true;
-            else
-              break;
-            continue;
-          case 'k' :
-            keep_generated_code = true;
-            continue;
-          case 't' :
-            if (strcmp (argv[i]+2, "tracestart") == 0) {
-              ++i;
-              istringstream iss (argv[i]);
-              iss >> trace_start;
-              trace_start <<= 1;
-//              trace_start = strtoll (argv[i],0,10) << 1;
-//              trace_start = atoll (argv[i]) << 1;
-            } else {
-              dump_all_graph = true;
+    use_port_dependency = true;
+#endif
+    // parse the command line
+    int i;
+    for (i = 1; i < argc; ++i) {
+        if (argv[i][0] == '-') {
+            if (argv[i][1] == '-') {
+                switch (argv[i][2]) {
+                    case 'h' : 
+                        print_splash_screen();
+                        cerr << "Usage : " 
+                            << argv[0] << " [--c] [--edit] [--d] [--f] [--h] [--i] [--k] [--modules filename] [--nobanner] [--[no]dynamiclink] [--nosim] [--notrace] [--s] [--t] [--tracestart n] [--usage] [--v] [--p|m|a] [others parameters processed by sc_main]\n"
+                            << "Thoses options are processed by SystemCASS library. All the remaining options are passed to sc_main.\n"
+                            << "sc_main function retrieves last parameters.\n"
+                            << HELP_STRING;
+                        noinitialization = true;
+                        nosimulation = true;
+                        continue;
+                    case 'v' : 
+                        print_splash_screen ();
+                        cerr << get_used_options  () << "\n";
+                        cerr << get_used_env () << "\n";
+                        cerr << sc_version () << "\n\n";
+                        exit (0);
+                    case 'u' : 
+                        if (strcmp (argv[i] + 2, "usage") == 0) {
+                            print_user_resources = true;
+                        }
+                        else {
+                            break;
+                        }
+                        continue;
+                    case 'i' :
+                        dump_netlist_info = true;
+                        continue;
+                    case 'f' :
+                        dump_funclist_info = true;
+                        continue;
+                    case 's' :
+                        if (strcmp (argv[i] + 2, "save_on_exit") == 0) {
+                            save_on_exit = argv[++i];
+                        }
+                        else {
+                            dump_stage = true;
+                        }
+
+                        continue;
+                    case 'c' :
+                        print_schedule = true;
+                        continue;
+                    case 'd' :
+                        if (strcmp (argv[i] + 2, "dynamiclink") == 0) {
+                            dynamic_link_of_scheduling_code = true;
+                        }
+                        else {
+                            check_port_dependencies = true;
+                        }
+                        continue;
+                    case 'e' :
+                        if (strcmp (argv[i] + 2, "edit") == 0) {
+                            edit_schedule = true;
+                        }
+                        else {
+                            break;
+                        }
+                        continue;
+                    case 'k' :
+                        keep_generated_code = true;
+                        continue;
+                    case 't' :
+                        if (strcmp (argv[i] + 2, "tracestart") == 0) {
+                            ++i;
+                            istringstream iss (argv[i]);
+                            iss >> trace_start;
+                            trace_start <<= 1;
+                            // trace_start = strtoll (argv[i],0,10) << 1;
+                            // trace_start = atoll (argv[i]) << 1;
+                        }
+                        else {
+                            dump_all_graph = true;
+                        }
+                        continue;
+                    case 'm' :
+                        if (strcmp (argv[i] + 2, "modules") == 0) {
+                            ++i;
+                            dump_module_hierarchy = argv[i];
+                            continue;
+                        }
+                        else if (strcmp (argv[i] + 2, "m") == 0) {
+                            use_port_dependency = true;
+                            scheduling_method = MOUCHARD_SCHEDULING;
+                            continue;
+                        }
+                        break;
+                    case 'n' :
+                        if (strcmp (argv[i] + 2, "nobanner") == 0) {
+                            nobanner = true;
+                        }
+                        else if (strcmp (argv[i] + 2, "nodynamiclink") == 0) {
+                            dynamic_link_of_scheduling_code = false;
+                        }
+                        else if (strcmp (argv[i] + 2, "nosim") == 0) {
+                            nosimulation = true;
+                        }
+                        else if (strcmp (argv[i] + 2, "notrace") == 0) {
+                            notrace = true;
+                        }
+                        else {
+                            break;
+                        }
+                        continue;
+                    case 'a' :
+                        use_sensitivity_list = true;
+                        scheduling_method = CASS_SCHEDULING;
+                        continue;
+                    case 'p' :
+                        use_port_dependency = true;
+                        scheduling_method = BUCHMANN_SCHEDULING;
+                        continue;
+                    default :
+                        break;
+                }
+                break;
             }
-            continue;
-          case 'm' :
-            if (strcmp (argv[i]+2, "modules") == 0) {
-              ++i;
-              dump_module_hierarchy = argv[i];
-              continue;
-            } else if (strcmp (argv[i]+2, "m") == 0) {
-              use_port_dependency = true;
-              scheduling_method = MOUCHARD_SCHEDULING;
-              continue;
-            }
-            break;
-          case 'n' :
-            if (strcmp (argv[i]+2, "nobanner") == 0) {
-              nobanner = true;
-            } else if (strcmp (argv[i]+2, "nodynamiclink") == 0) {
-              dynamic_link_of_scheduling_code = false;
-            } else if (strcmp (argv[i]+2, "nosim") == 0) {
-              nosimulation = true;
-            } else if (strcmp (argv[i]+2, "notrace") == 0) {
-              notrace = true;
-            } else
-              break;
-            continue;
-          case 'a' :
-            use_sensitivity_list = true;
-            scheduling_method = CASS_SCHEDULING;
-            continue;
-          case 'p' :
-            use_port_dependency = true;
-            scheduling_method = BUCHMANN_SCHEDULING;
-            continue;
-          default :
-            break;
-          }
+        } 
         break;
+    }
+
+    // erase SystemCASS options from the command line and give it to the sc_main
+    if (i != 1) {
+        int j = 1;
+        while (i < argc) {
+            argv[j++] = argv[i++];
         }
-      } 
-      break;
-    }
-  
-  // erase SystemCASS options from the command line and give it to the sc_main
-  if (i != 1)
-    {
-    int j = 1;
-    while (i < argc)
-      {
-      argv[j++] = argv[i++];
-      }
-    argc = j;
-    }
-#if 0
-  cerr << "The user command line length is " << argc << ".\n";
-#endif
+        argc = j;
+    }
 }
 
@@ -374,30 +380,37 @@
 } // end of namespace
 
+
 using namespace sc_core;
 
-int 
-main(int   argc, 
-     char* argv[])
-{
-  apply_parameters    (argc, argv);
-  print_splash_screen ();
-  check_parameters ();
-
-  if (noinitialization)
-  {
-    return 255;
-  }
-
-  int ret = sc_main(argc, argv);
-  free (pending_write_vector);
-  close_systemcass ();
-
-  if (have_to_stop)
-  {
-    cerr << "'sc_stop' function was called. Exit code : 1\n";
-    return 1;
-  }
-
-  return ret;
+int main(int argc, char * argv[]) {
+    apply_parameters(argc, argv);
+    print_splash_screen();
+    check_parameters();
+
+    if (noinitialization) {
+        return 255;
+    }
+
+    int ret = sc_main(argc, argv);
+    free(pending_write_vector);
+    close_systemcass();
+
+    if (have_to_stop) {
+        cerr << "'sc_stop' function was called. Exit code : 1\n";
+        return 1;
+    }
+
+    return ret;
 }
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_module.cc
===================================================================
--- /sources/src/sc_module.cc	(revision 51)
+++ /sources/src/sc_module.cc	(revision 52)
@@ -49,4 +49,5 @@
 #include "entity.h"
 #include <cassert>
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -62,71 +63,56 @@
 
 namespace sc_core {
+
 instances_set_t instances_set;   
 instances_list_t temp_list;   
 method_process_list_t method_process_list;
-
 module_name_stack_t module_name_stack;
-
 modules_stack_t modules_stack;
-
-method_process_t       *method;
-
-void
-declare_method_process (const char *  name,
-                        SC_ENTRY_FUNC func,
-                        sc_module&    module)
-{
-  method = create_method_process (name, func, module);
+method_process_t * method;
+
+void declare_method_process(const char * name, SC_ENTRY_FUNC func, sc_module & module) {
+  method = create_method_process(name, func, module);
   method_process_list.push_back(method); 
 }
 
 
-ostream& 
-operator << (ostream &o, 
-             instances_set_t &l)
-{
+ostream & operator << (ostream &o, instances_set_t &l) {
   instances_set_t::iterator i;
-  for (i = l.begin (); i != l.end (); ++i) {
-    o << (*i)->name () << " ";
-  };
+  for (i = l.begin(); i != l.end(); ++i) {
+    o << (*i)->name() << " ";
+  }
   return o << endl;
 }
 
+
 template <typename T>
-static 
-std::ostream& 
-operator << (std::ostream &o, 
-             const list<T> &l)
-{
+static std::ostream& operator << (std::ostream & o, const list<T> &l) {
   typename list<T>::const_iterator i;
-  for (i = l.begin (); i != l.end (); ++i) {
+  for (i = l.begin(); i != l.end(); ++i) {
     o << (*i) << " ";
-  };
+  }
   return o << endl;
 }
 
+
 template <typename T>
-static 
-std::ostream& 
-operator << (std::ostream &o, 
-             const list<T*> &l)
-{
-  typename list<T*>::const_iterator i;
-  for (i = l.begin (); i != l.end (); ++i) {
+static std::ostream& operator << (std::ostream &o, const list<T *> &l) {
+  typename list<T *>::const_iterator i;
+  for (i = l.begin(); i != l.end(); ++i) {
     o << (**i) << " ";
-  };
+  }
   return o << endl;
 }
 
-bool
-is_clock (const sc_interface &inter)
-{
-	equi_t &e = get_equi(inter);
-	equi_t::iterator i;
-	for (i = e.begin (); i != e.end (); ++i) {
-		if (i->kind () == sc_clock::kind_string)
-			return true;
-	}
-	return false;
+
+bool is_clock (const sc_interface & inter) {
+    equi_t & e = get_equi(inter);
+    equi_t::iterator i;
+    for (i = e.begin(); i != e.end(); ++i) {
+        if (i->kind() == sc_clock::kind_string) {
+            return true;
+        }
+    }
+    return false;
 }
 
@@ -136,6 +122,5 @@
 //                                               
 // ----------------------------------------------------------------------------
-method_process_t::method_process_t(const char* nm, SC_ENTRY_FUNC fn, sc_module& mod)
-{
+method_process_t::method_process_t(const char * nm, SC_ENTRY_FUNC fn, sc_module & mod) {
   name = nm;
   func = fn; 
@@ -144,80 +129,86 @@
 }
 
-static
-bool
-is_register (const sc_interface &inter)
-{
-	equi_t &e = get_equi (inter);
-	if (e.size () != 1)
-		return false;
-	sc_object &obj = *(e.begin ()->object);
-	if (obj.kind () != sc_signal_base::kind_string)
-		return false;
-	return true;
-}
-
-bool method_process_t::is_combinational(void)
-{
-	if (sensitivity_list.empty ())
-		return false;
-  sensitivity_list_t::iterator i;
-  for (i = sensitivity_list.begin (); i != sensitivity_list.end (); ++i) {
+
+static bool is_register (const sc_interface & inter) {
+    equi_t & e = get_equi(inter);
+    if (e.size() != 1) {
+        return false;
+    }
+    
+    sc_object & obj = *(e.begin()->object);
+    if (obj.kind() != sc_signal_base::kind_string) {
+        return false;
+    }
+    return true;
+}
+
+
+bool method_process_t::is_combinational(void) {
+    if (sensitivity_list.empty()) {
+        return false;
+    }
+    sensitivity_list_t::iterator i;
+    for (i = sensitivity_list.begin(); i != sensitivity_list.end(); ++i) {
 #if defined(CONFIG_DEBUG) && 0
-    if (i->get_interface() == NULL)
-    {
-      cerr << "'" << i << "' is unbound.\n";
-      exit (121);
-    }
+        if (i->get_interface() == NULL) {
+            cerr << "'" << i << "' is unbound.\n";
+            exit(121);
+        }
 #endif
-		if ((i->get_flag() == sc_event::VAL)
-				&& (!is_register (i->get_interface())))
-			return true;
-  }
-  return false;
-}
-
-bool method_process_t::is_transition(void)
-{
-	if (sensitivity_list.empty ())
-		return false;
-  sensitivity_list_t::iterator i;
-  for (i = sensitivity_list.begin (); i != sensitivity_list.end (); ++i) {
-		if (i->get_flag () != sc_event::POS)
-			return false;
-		// check if the port is a clock
-		if (is_clock (i->get_interface ()) == false)
-			return false;
-  }
-  return true;
-}
-
-bool method_process_t::is_genmoore(void)
-{
-	// sensitivity list of moore functions includes :
-	// - register (signal unconnected)
-	// - negative edge of port which is bound to a clock signal
-	if (sensitivity_list.empty ())
-		return false;
-  sensitivity_list_t::iterator i;
-  for (i = sensitivity_list.begin (); i != sensitivity_list.end (); ++i) {
-		if ((i->get_flag () == sc_event::VAL)
-				&& (is_register(i->get_interface ())))
-			continue;
-		if ((i->get_flag () == sc_event::NEG) 
-				&& (is_clock (i->get_interface ()) == true))
-			continue;
-		return false;
-  }
-  return true;
-}
-
-std::ostream& operator << (std::ostream &o, const method_process_t &m)
-{
-  return o << *(m.module) 
-           << "->" 
-           << m.name 
-           << "() when " 
-           << m.sensitivity_list;
-}
+        if ((i->get_flag() == sc_event::VAL) && (!is_register(i->get_interface()))) {
+            return true;
+        }
+    }
+    return false;
+}
+
+
+bool method_process_t::is_transition(void) {
+    if (sensitivity_list.empty()) {
+        return false;
+    }
+    sensitivity_list_t::iterator i;
+    for (i = sensitivity_list.begin(); i != sensitivity_list.end(); ++i) {
+        if (i->get_flag() != sc_event::POS) {
+            return false;
+        }
+        // check if the port is a clock
+        if (is_clock(i->get_interface()) == false) {
+            return false;
+        }
+    }
+    return true;
+}
+
+
+bool method_process_t::is_genmoore(void) {
+    // sensitivity list of moore functions includes :
+    // - register (signal unconnected)
+    // - negative edge of port which is bound to a clock signal
+    if (sensitivity_list.empty()) {
+        return false;
+    }
+    sensitivity_list_t::iterator i;
+    for (i = sensitivity_list.begin(); i != sensitivity_list.end(); ++i) {
+        if ((i->get_flag() == sc_event::VAL) && (is_register(i->get_interface()))) {
+            continue;
+        }
+        if ((i->get_flag() == sc_event::NEG) && (is_clock(i->get_interface()) == true)) {
+            continue;
+        }
+        return false;
+    }
+    return true;
+}
+
+
+std::ostream & operator << (std::ostream & o, const method_process_t & m) {
+    return o << *(m.module) 
+        << "->" 
+        << m.name 
+        << "() when " 
+        << m.sensitivity_list;
+}
+
 
 // ----------------------------------------------------------------------------
@@ -227,238 +218,213 @@
 
 
-sc_module::sc_module(void)
-	: sc_object (NULL),
-	  sensitive (this)
+sc_module::sc_module(void) :
+    sc_object(NULL),
+    sensitive(this) {
+  init();
+}
+
+sc_module::sc_module(const char * nm) :
+    sc_object(NULL),
+    sensitive(this) {
+  assert(nm != NULL);
+  init();
+}
+
+
+sc_module::sc_module(const sc_module_name & nm) :
+    sc_object(NULL),
+    sensitive(this) {
+  init();
+}
+
+
+void sc_module::init() {
+    instances_set.insert(this);
+    temp_list.push_back(this);
+    modules_stack.top() = this;
+    set_save_handler(*this, NULL);
+}
+
+void sc_module::dont_initialize() {
+    sc_core::valid_method_process();
+}
+
+
+void declare_save_handler(const char * name, save_fct_t1 func, sc_module & module) {
+    sc_core::set_save_handler(module, func);
+}
+
+typedef std::list<sc_port_base*> port_list_t;
+
+// Build a port list owned by the module mod
+static void get_port_list(const sc_module & mod, port_list_t & pl) {
+    port2module_t::iterator i;
+    for (i = port2module.begin(); i != port2module.end(); ++i) {
+        if (i->second == &mod) {
+            pl.push_back((sc_port_base *) (i->first));
+        }
+    }
+}
+
+
+#define BIND(sig) bind(*this, p, port_list, sig)
+
+static void bind(sc_module & mod, 
+        port_list_t::iterator & port_it, 
+        port_list_t & port_list, 
+        sc_bind_proxy & sig) {
+    if (&sig == &SC_BIND_PROXY_NIL) { 
+        return;
+    }
+    if (port_it == port_list.end()) {
+        cerr << "error : binding port in ";
+        cerr << mod.name();
+        cerr << " module.\n";
+        exit(7);
+    }
+    bind(**(port_it++), sig);
+}
+
+
+void sc_module::operator () ( /* const */ sc_bind_proxy & p001,
+        /* const */ sc_bind_proxy & p002,
+        /* const */ sc_bind_proxy & p003,
+        /* const */ sc_bind_proxy & p004,
+        /* const */ sc_bind_proxy & p005,
+        /* const */ sc_bind_proxy & p006,
+        /* const */ sc_bind_proxy & p007,
+        /* const */ sc_bind_proxy & p008,
+        /* const */ sc_bind_proxy & p009,
+        /* const */ sc_bind_proxy & p010,
+        /* const */ sc_bind_proxy & p011,
+        /* const */ sc_bind_proxy & p012,
+        /* const */ sc_bind_proxy & p013,
+        /* const */ sc_bind_proxy & p014,
+        /* const */ sc_bind_proxy & p015,
+        /* const */ sc_bind_proxy & p016,
+        /* const */ sc_bind_proxy & p017,
+        /* const */ sc_bind_proxy & p018,
+        /* const */ sc_bind_proxy & p019,
+        /* const */ sc_bind_proxy & p020,
+        /* const */ sc_bind_proxy & p021,
+        /* const */ sc_bind_proxy & p022,
+        /* const */ sc_bind_proxy & p023,
+        /* const */ sc_bind_proxy & p024,
+        /* const */ sc_bind_proxy & p025,
+        /* const */ sc_bind_proxy & p026,
+        /* const */ sc_bind_proxy & p027,
+        /* const */ sc_bind_proxy & p028,
+        /* const */ sc_bind_proxy & p029,
+        /* const */ sc_bind_proxy & p030,
+        /* const */ sc_bind_proxy & p031,
+        /* const */ sc_bind_proxy & p032,
+        /* const */ sc_bind_proxy & p033,
+        /* const */ sc_bind_proxy & p034,
+        /* const */ sc_bind_proxy & p035,
+        /* const */ sc_bind_proxy & p036,
+        /* const */ sc_bind_proxy & p037,
+        /* const */ sc_bind_proxy & p038,
+        /* const */ sc_bind_proxy & p039,
+        /* const */ sc_bind_proxy & p040,
+        /* const */ sc_bind_proxy & p041,
+        /* const */ sc_bind_proxy & p042,
+        /* const */ sc_bind_proxy & p043,
+        /* const */ sc_bind_proxy & p044,
+        /* const */ sc_bind_proxy & p045,
+        /* const */ sc_bind_proxy & p046,
+        /* const */ sc_bind_proxy & p047,
+        /* const */ sc_bind_proxy & p048,
+        /* const */ sc_bind_proxy & p049,
+        /* const */ sc_bind_proxy & p050,
+        /* const */ sc_bind_proxy & p051,
+        /* const */ sc_bind_proxy & p052,
+        /* const */ sc_bind_proxy & p053,
+        /* const */ sc_bind_proxy & p054,
+        /* const */ sc_bind_proxy & p055,
+        /* const */ sc_bind_proxy & p056,
+        /* const */ sc_bind_proxy & p057,
+        /* const */ sc_bind_proxy & p058,
+        /* const */ sc_bind_proxy & p059,
+        /* const */ sc_bind_proxy & p060,
+        /* const */ sc_bind_proxy & p061,
+        /* const */ sc_bind_proxy & p062,
+        /* const */ sc_bind_proxy & p063,
+        /* const */ sc_bind_proxy & p064)
 {
-#if 0
-  cerr << "sc_module constructor with no parameter\n";
-#endif
-  init ();
-}
-
-sc_module::sc_module(const char* nm)
-	: sc_object (NULL),
-	  sensitive (this)
-{
-  assert(nm != NULL);
-#if 0
-  cerr << "sc_module constructor with const char * parameter\n";
-#endif
-  init ();
-}
-
-
-sc_module::sc_module(const sc_module_name &nm)
-	: sc_object (NULL),
-	  sensitive (this)
-{
-#if 0
-  cerr << "sc_module constructor by copy\n";
-#endif
-  init ();
-}
-
-void
-sc_module::init ()
-{
-  instances_set.insert (this);
-  temp_list.push_back (this);
-	modules_stack.top () = this;
-  set_save_handler (*this, NULL);
-#if 0
-  cout << "sc_module <- " << this->name () << endl;
-#endif
-}
-
-void
-sc_module::dont_initialize ()
-{
-  sc_core::valid_method_process ();
-}
-
-
-void
-declare_save_handler   (const char *  name,
-                        save_fct_t1   func,
-                        sc_module&    module)
-{
-  sc_core::set_save_handler (module, func);
-}
-
-typedef std::list<sc_port_base*> port_list_t;
-
-// Build a port list owned by the module mod
-static void
-get_port_list (const sc_module &mod, port_list_t &pl)
-{
-	port2module_t::iterator i;
-	for (i = port2module.begin (); i != port2module.end (); ++i) {
-		if (i->second == &mod) {
-			pl.push_back ((sc_port_base*)(i->first));
-		}
-	}
-}
-
-
-#define BIND(sig) bind(*this, p, port_list, sig)
-
-static void
-bind (sc_module &mod, 
-		port_list_t::iterator &port_it, 
-		port_list_t &port_list, 
-		sc_bind_proxy &sig)
-{
-	if (&sig == &SC_BIND_PROXY_NIL) { 
-		return;
-	}; 
-	if (port_it == port_list.end ()) {
-			cerr << "error : binding port in ";
-			cerr << mod.name ();
-			cerr << " module.\n";
-			exit (7);
-	};
-	bind (**(port_it++), sig);
-}
-
-void
-sc_module::operator () ( /* const */ sc_bind_proxy& p001,
-	       /* const */ sc_bind_proxy& p002,
-	       /* const */ sc_bind_proxy& p003,
-	       /* const */ sc_bind_proxy& p004,
-	       /* const */ sc_bind_proxy& p005,
-	       /* const */ sc_bind_proxy& p006,
-	       /* const */ sc_bind_proxy& p007,
-	       /* const */ sc_bind_proxy& p008,
-	       /* const */ sc_bind_proxy& p009,
-	       /* const */ sc_bind_proxy& p010,
-	       /* const */ sc_bind_proxy& p011,
-	       /* const */ sc_bind_proxy& p012,
-	       /* const */ sc_bind_proxy& p013,
-	       /* const */ sc_bind_proxy& p014,
-	       /* const */ sc_bind_proxy& p015,
-	       /* const */ sc_bind_proxy& p016,
-	       /* const */ sc_bind_proxy& p017,
-	       /* const */ sc_bind_proxy& p018,
-	       /* const */ sc_bind_proxy& p019,
-	       /* const */ sc_bind_proxy& p020,
-	       /* const */ sc_bind_proxy& p021,
-	       /* const */ sc_bind_proxy& p022,
-	       /* const */ sc_bind_proxy& p023,
-	       /* const */ sc_bind_proxy& p024,
-	       /* const */ sc_bind_proxy& p025,
-	       /* const */ sc_bind_proxy& p026,
-	       /* const */ sc_bind_proxy& p027,
-	       /* const */ sc_bind_proxy& p028,
-	       /* const */ sc_bind_proxy& p029,
-	       /* const */ sc_bind_proxy& p030,
-	       /* const */ sc_bind_proxy& p031,
-	       /* const */ sc_bind_proxy& p032,
-	       /* const */ sc_bind_proxy& p033,
-	       /* const */ sc_bind_proxy& p034,
-	       /* const */ sc_bind_proxy& p035,
-	       /* const */ sc_bind_proxy& p036,
-	       /* const */ sc_bind_proxy& p037,
-	       /* const */ sc_bind_proxy& p038,
-	       /* const */ sc_bind_proxy& p039,
-	       /* const */ sc_bind_proxy& p040,
-	       /* const */ sc_bind_proxy& p041,
-	       /* const */ sc_bind_proxy& p042,
-	       /* const */ sc_bind_proxy& p043,
-	       /* const */ sc_bind_proxy& p044,
-	       /* const */ sc_bind_proxy& p045,
-	       /* const */ sc_bind_proxy& p046,
-	       /* const */ sc_bind_proxy& p047,
-	       /* const */ sc_bind_proxy& p048,
-	       /* const */ sc_bind_proxy& p049,
-	       /* const */ sc_bind_proxy& p050,
-	       /* const */ sc_bind_proxy& p051,
-	       /* const */ sc_bind_proxy& p052,
-	       /* const */ sc_bind_proxy& p053,
-	       /* const */ sc_bind_proxy& p054,
-	       /* const */ sc_bind_proxy& p055,
-	       /* const */ sc_bind_proxy& p056,
-	       /* const */ sc_bind_proxy& p057,
-	       /* const */ sc_bind_proxy& p058,
-	       /* const */ sc_bind_proxy& p059,
-	       /* const */ sc_bind_proxy& p060,
-	       /* const */ sc_bind_proxy& p061,
-	       /* const */ sc_bind_proxy& p062,
-	       /* const */ sc_bind_proxy& p063,
-	       /* const */ sc_bind_proxy& p064 )
-{
-	port_list_t port_list;
-	get_port_list (*this,port_list);
-	cerr << "port list : " << port_list << endl;	
-	port_list_t::iterator p = port_list.begin ();
-  BIND( p001 );
-  BIND( p002 );
-  BIND( p003 );
-  BIND( p004 );
-  BIND( p005 );
-  BIND( p006 );
-  BIND( p007 );
-  BIND( p008 );
-  BIND( p009 );
-  BIND( p010 );
-  BIND( p011 );
-  BIND( p012 );
-  BIND( p013 );
-  BIND( p014 );
-  BIND( p015 );
-  BIND( p016 );
-  BIND( p017 );
-  BIND( p018 );
-  BIND( p019 );
-  BIND( p020 );
-  BIND( p021 );
-  BIND( p022 );
-  BIND( p023 );
-  BIND( p024 );
-  BIND( p025 );
-  BIND( p026 );
-  BIND( p027 );
-  BIND( p028 );
-  BIND( p029 );
-  BIND( p030 );
-  BIND( p031 );
-  BIND( p032 );
-  BIND( p033 );
-  BIND( p034 );
-  BIND( p035 );
-  BIND( p036 );
-  BIND( p037 );
-  BIND( p038 );
-  BIND( p039 );
-  BIND( p040 );
-  BIND( p041 );
-  BIND( p042 );
-  BIND( p043 );
-  BIND( p044 );
-  BIND( p045 );
-  BIND( p046 );
-  BIND( p047 );
-  BIND( p048 );
-  BIND( p049 );
-  BIND( p050 );
-  BIND( p051 );
-  BIND( p052 );
-  BIND( p053 );
-  BIND( p054 );
-  BIND( p055 );
-  BIND( p056 );
-  BIND( p057 );
-  BIND( p058 );
-  BIND( p059 );
-  BIND( p060 );
-  BIND( p061 );
-  BIND( p062 );
-  BIND( p063 );
-  BIND( p064 );
-}
-
-ostream& operator << (ostream &o, const sc_module &m)
-{
-  return o << m.name ();
-}
+    port_list_t port_list;
+    get_port_list(*this, port_list);
+    cerr << "port list : " << port_list << endl;
+    port_list_t::iterator p = port_list.begin();
+    BIND(p001);
+    BIND(p002);
+    BIND(p003);
+    BIND(p004);
+    BIND(p005);
+    BIND(p006);
+    BIND(p007);
+    BIND(p008);
+    BIND(p009);
+    BIND(p010);
+    BIND(p011);
+    BIND(p012);
+    BIND(p013);
+    BIND(p014);
+    BIND(p015);
+    BIND(p016);
+    BIND(p017);
+    BIND(p018);
+    BIND(p019);
+    BIND(p020);
+    BIND(p021);
+    BIND(p022);
+    BIND(p023);
+    BIND(p024);
+    BIND(p025);
+    BIND(p026);
+    BIND(p027);
+    BIND(p028);
+    BIND(p029);
+    BIND(p030);
+    BIND(p031);
+    BIND(p032);
+    BIND(p033);
+    BIND(p034);
+    BIND(p035);
+    BIND(p036);
+    BIND(p037);
+    BIND(p038);
+    BIND(p039);
+    BIND(p040);
+    BIND(p041);
+    BIND(p042);
+    BIND(p043);
+    BIND(p044);
+    BIND(p045);
+    BIND(p046);
+    BIND(p047);
+    BIND(p048);
+    BIND(p049);
+    BIND(p050);
+    BIND(p051);
+    BIND(p052);
+    BIND(p053);
+    BIND(p054);
+    BIND(p055);
+    BIND(p056);
+    BIND(p057);
+    BIND(p058);
+    BIND(p059);
+    BIND(p060);
+    BIND(p061);
+    BIND(p062);
+    BIND(p063);
+    BIND(p064);
+}
+
+
+ostream & operator << (ostream & o, const sc_module & m) {
+    return o << m.name();
+}
+
 
 // ----------------------------------------------------------------------------
@@ -467,110 +433,89 @@
 // ----------------------------------------------------------------------------
 
-sc_module_name::sc_module_name( const char* name_ ) 
-  : m_pushed(true)
-{
-#if 0
-  cerr << "sc_module_name constructor with const char * parameter\n";
+sc_module_name::sc_module_name(const char * name_) : m_pushed(true) {
+    m_name = name_;
+    init();
+}
+
+
+sc_module_name::sc_module_name(const sc_module_name & module) : m_pushed(false) {
+    m_name = module.m_name;
+}
+
+
+void sc_module_name::init() {
+    sc_core::module_name_stack.push_back(m_name);
+    modules_stack.push(NULL);
+}
+
+
+sc_module_name::~sc_module_name() {
+    if (m_pushed == false) {
+        return;
+    }
+    assert(sc_core::module_name_stack.empty() == false);
+    sc_core::module_name_stack.pop_back();
+    modules_stack.pop();
+    assert(temp_list.empty() == false);
+    sc_module * last1 = temp_list.back();
+    temp_list.pop_back();
+    sc_module * last2 = (temp_list.empty()) ? NULL : temp_list.back();
+    set_parent(*last1, last2);
+}
+
+
+std::ostream & operator << (std::ostream & o, const sc_core::sc_module_name & n) {
+    return o << (const char *) n;
+}
+
+/////////////////////////////////////////:
+
+static void check_method_process(const method_process_t & m) {
+    if (m.dont_initialize == false) {
+        assert(m.module != NULL);
+#ifdef CONFIG_DEBUG
+        std::cerr << "Warning : SystemCASS doesn't perform SC_METHOD(S) initializations.\n"
+            << "Please turn off automatic initialization for '" << m.name 
+            << "' method of '" << m.module->name() << "' module"
+            " by calling 'dont_initialize()' function.\n"
+            "Example :\n"
+            "  SC_METHOD(transition);\n"
+            "  sensitive << clk;\n"
+            "  dont_initialize();\n";
 #endif
-	m_name = name_;
-  init ();
-}
-
-sc_module_name::sc_module_name( const sc_module_name &module ) 
-  : m_pushed(false)
-{
-#if 0
-  cerr << "sc_module_name constructor by copy\n";
-#endif
-	m_name = module.m_name;
-  //init ();
-}
-
-void
-sc_module_name::init ()
-{
-	sc_core::module_name_stack.push_back (m_name);
-	modules_stack.push (NULL);
-#if 0
-  cout << "module_name <- " << m_name << endl;
-#endif
-}
-
-sc_module_name::~sc_module_name ()
-{
-  if (m_pushed == false)
-    return;
-  assert(sc_core::module_name_stack.empty () == false);
-  sc_core::module_name_stack.pop_back ();
-	modules_stack.pop ();
-#if 0
-  cout << "~sc_module_name <- " << m_name << endl;
-#endif
-  assert(temp_list.empty () == false);
-  sc_module *last1 = temp_list.back();
-  temp_list.pop_back();
-  sc_module *last2 = (temp_list.empty())?NULL:temp_list.back();
-  set_parent (*last1, last2);
-}
-
-std::ostream& 
-operator << (std::ostream&                  o, 
-             const sc_core::sc_module_name &n)
-{
-  return o << (const char*)n;
-}
-
-/////////////////////////////////////////:
-
-static
-void
-check_method_process (const method_process_t &m)
-{
-  if (m.dont_initialize == false)
-  {
-    assert(m.module != NULL);
-#ifdef CONFIG_DEBUG
-    std::cerr << "Warning : SystemCASS doesn't perform SC_METHOD(S) initializations.\n"
-              << "Please turn off automatic initialization for '" << m.name 
-              << "' method of '" << m.module->name () << "' module"
-                 " by calling 'dont_initialize()' function.\n"
-                 "Example :\n"
-                 "  SC_METHOD(transition);\n"
-                 "  sensitive << clk;\n"
-                 "  dont_initialize ();\n";
-#endif
-#if 0
-    exit (250405);
-#endif
-  }
-}
-
-void
-check_all_method_process ()
-{
-  method_process_list_t::const_iterator i;
-  for (i = sc_core::method_process_list.begin(); 
-       i != sc_core::method_process_list.end ();
-       ++i)
-  {
-    check_method_process (**i);
-  }
-}
-
-void
-valid_method_process ()
-{
-  method_process_t *m = sc_core::method_process_list.back();
-  m->dont_initialize = true;
-}
-
-method_process_t* 
-create_method_process (const char * name, 
-                      SC_ENTRY_FUNC func,
-                      sc_module&    module)
-{
-  return new method_process_t (name, func, module);
-}
+    }
+}
+
+
+void check_all_method_process() {
+    method_process_list_t::const_iterator i;
+    for (i = sc_core::method_process_list.begin(); i != sc_core::method_process_list.end(); ++i) {
+        check_method_process(**i);
+    }
+}
+
+
+void valid_method_process() {
+    method_process_t * m = sc_core::method_process_list.back();
+    m->dont_initialize = true;
+}
+
+
+method_process_t * create_method_process(const char * name, SC_ENTRY_FUNC func, sc_module & module) {
+    return new method_process_t(name, func, module);
+}
+
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_module.h
===================================================================
--- /sources/src/sc_module.h	(revision 51)
+++ /sources/src/sc_module.h	(revision 52)
@@ -11,4 +11,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_MODULE_H__
 #define __SC_MODULE_H__
@@ -19,5 +20,4 @@
 
 #include "internal.h"
-
 #include "sc_fwd.h"
 #include "sc_module_ext.h"
@@ -34,16 +34,17 @@
 // INTERNAL IMPLEMENTATION
 //
-typedef std::list<sc_signal_base* > signal_list_t; 
+typedef std::list<sc_signal_base *> signal_list_t; 
 
-typedef std::list<sc_module* > instances_list_t; 
-typedef std::set<sc_module* > instances_set_t; 
-extern instances_set_t instances_set;     // ensemble d'instances
+typedef std::list<sc_module *> instances_list_t; 
+typedef std::set<sc_module *> instances_set_t; 
+extern instances_set_t instances_set; // ensemble d'instances
 
-typedef std::stack<const sc_module*> modules_stack_t;
+typedef std::stack<const sc_module *> modules_stack_t;
 extern modules_stack_t modules_stack;
-extern void check_all_method_process ();
-extern void valid_method_process ();
+extern void check_all_method_process();
+extern void valid_method_process();
 
-extern std::ostream& operator << (std::ostream &o, instances_set_t&);
+extern std::ostream & operator << (std::ostream & o, instances_set_t &);
+
 
 // ----------------------------------------------------------------------------
@@ -52,28 +53,33 @@
 //  Method process class.
 // ----------------------------------------------------------------------------
-class method_process_t
-{
-  // for debug
-public: const char *name; // function name
+
+class method_process_t {
+
+
+    public:
+    const char * name; // function name
+
 #ifdef DUMP_SCHEDULE_STATS
-  long long int number_of_calls;
-#endif	
-public:
-  // data
-  sc_module          *module;
-  SC_ENTRY_FUNC       func;
-  sensitivity_list_t  sensitivity_list;
-  bool                dont_initialize;
+    long long int number_of_calls;
+#endif
 
-  // constructors
-  method_process_t(const char* nm, SC_ENTRY_FUNC fn, sc_module& mod );
+    public:
+    // data
+    sc_module * module;
+    SC_ENTRY_FUNC func;
+    sensitivity_list_t sensitivity_list;
+    bool dont_initialize;
 
-  // methods
-  friend std::ostream& operator << (std::ostream &, const method_process_t &);
-  
-  // accessors
-  bool is_combinational(void); 
-  bool is_transition(void);
-  bool is_genmoore(void);
+    // constructors
+    method_process_t(const char * nm, SC_ENTRY_FUNC fn, sc_module & mod);
+
+    // methods
+    friend std::ostream& operator << (std::ostream &, const method_process_t &);
+
+    // accessors
+    bool is_combinational(void); 
+    bool is_transition(void);
+    bool is_genmoore(void);
+
 };
 
@@ -82,2 +88,14 @@
 
 #endif /* __SC_MODULE_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_module_ext.h
===================================================================
--- /sources/src/sc_module_ext.h	(revision 51)
+++ /sources/src/sc_module_ext.h	(revision 52)
@@ -53,7 +53,7 @@
 
 typedef void (sc_module::*SC_ENTRY_FUNC)();
-//typedef void (*SC_ENTRY_FUNC)(sc_module*);
-
-extern method_process_t* create_method_process (const char*, SC_ENTRY_FUNC, sc_module&);
+
+extern method_process_t * create_method_process(const char *, SC_ENTRY_FUNC, sc_module &);
+
 
 // ----------------------------------------------------------------------------
@@ -62,117 +62,123 @@
 //  Module class.
 // ----------------------------------------------------------------------------
+
 typedef sc_signal_base sc_bind_proxy;
 extern sc_bind_proxy SC_BIND_PROXY_NIL;
 
-struct sc_module : public sc_object
-{
+
+struct sc_module : public sc_object {
+
   //////////////////////
   // SYSTEMCASS SPECIFIC
-private : void init ();
-public :
-//  friend std::ostream& operator << (std::ostream &o, const sc_module &m);
- 
+private :
+    void init();
   //////////////////////
+
+
   // LRM (?)
 protected:
   sc_module();
-  sc_module( const char* nm );
-//  sc_module( const sc_string& nm);
-  sc_module( const sc_module_name &nm);
+  sc_module(const char * nm);
+  sc_module(const sc_module_name & nm);
 
 public:
   ~sc_module() {};
 
-	/////////
-	//// LRM
-protected:  void dont_initialize ();
-public:  void operator () ( /* const */ sc_bind_proxy& p001,
-	       /* const */ sc_bind_proxy& p002 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p003 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p004 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p005 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p006 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p007 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p008 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p009 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p010 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p011 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p012 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p013 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p014 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p015 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p016 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p017 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p018 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p019 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p020 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p021 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p022 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p023 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p024 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p025 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p026 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p027 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p028 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p029 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p030 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p031 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p032 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p033 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p034 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p035 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p036 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p037 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p038 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p039 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p040 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p041 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p042 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p043 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p044 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p045 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p046 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p047 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p048 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p049 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p050 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p051 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p052 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p053 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p054 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p055 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p056 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p057 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p058 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p059 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p060 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p061 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p062 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p063 = SC_BIND_PROXY_NIL,
-	       /* const */ sc_bind_proxy& p064 = SC_BIND_PROXY_NIL );
-	
-	/////////
+  /////////
+  //// LRM
+protected:
+  void dont_initialize();
+
+public:
+  void operator () (
+          /* const */ sc_bind_proxy& p001,
+          /* const */ sc_bind_proxy& p002 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p003 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p004 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p005 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p006 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p007 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p008 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p009 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p010 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p011 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p012 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p013 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p014 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p015 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p016 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p017 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p018 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p019 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p020 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p021 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p022 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p023 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p024 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p025 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p026 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p027 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p028 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p029 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p030 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p031 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p032 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p033 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p034 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p035 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p036 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p037 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p038 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p039 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p040 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p041 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p042 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p043 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p044 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p045 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p046 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p047 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p048 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p049 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p050 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p051 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p052 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p053 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p054 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p055 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p056 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p057 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p058 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p059 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p060 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p061 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p062 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p063 = SC_BIND_PROXY_NIL,
+          /* const */ sc_bind_proxy& p064 = SC_BIND_PROXY_NIL);
+
+  /////////
   // These are protected so that user derived classes can refer to them.
-  sc_sensitive     sensitive;
+  sc_sensitive sensitive;
   sc_sensitive_pos sensitive_pos;
   sc_sensitive_neg sensitive_neg;  
 };
 
+
 #define SC_MODULE(user_module_name) \
-	struct user_module_name : public sc_core::sc_module
+    struct user_module_name : public sc_core::sc_module
 
 // the SC_HAS_PROCESS macro call must be followed by a ;
-#define SC_HAS_PROCESS(user_module_name)                         \
-   typedef user_module_name SC_CURRENT_USER_MODULE
-
-#define SC_CTOR(user_module_name)                                \
-   SC_HAS_PROCESS(user_module_name);                             \
-   user_module_name(sc_core::sc_module_name)
-
-/* Converting `void (module_tag::*)()' to `void (sc_module::*)()' is OK as
-   long as the dynamic type is correct.  C++ Standard 5.4 "Explicit type
-   conversion", clause 7: a pointer to member of derived class type may be
-   explicitly converted to a pointer to member of an unambiguous non-virtual
-   base class type. */
+#define SC_HAS_PROCESS(user_module_name) \
+    typedef user_module_name SC_CURRENT_USER_MODULE
+
+#define SC_CTOR(user_module_name)     \
+    SC_HAS_PROCESS(user_module_name); \
+    user_module_name(sc_core::sc_module_name)
+
+                              /* Converting `void (module_tag::*)()' to `void (sc_module::*)()' is OK as
+                                 long as the dynamic type is correct.  C++ Standard 5.4 "Explicit type
+                                 conversion", clause 7: a pointer to member of derived class type may be
+                                 explicitly converted to a pointer to member of an unambiguous non-virtual
+                                 base class type. */
 #define SC_MAKE_FUNC_PTR(module_tag, func) \
     (/*static_cast<*/(sc_core::SC_ENTRY_FUNC)/*>*/ (&module_tag::func))
@@ -181,12 +187,13 @@
 
 #define DECLARE_METHOD_PROCESS(handle, name, module_tag, func) \
-  declare_method_process(name, \
-                        SC_MAKE_FUNC_PTR( module_tag, func ), \
-                        *this)
-
-#define SC_METHOD(func)     \
-  {                         \
-  DECLARE_METHOD_PROCESS(func ## _handle, #func, SC_CURRENT_USER_MODULE,func);\
-  }
+    declare_method_process(name,                               \
+    SC_MAKE_FUNC_PTR( module_tag, func ),                      \
+    *this)
+
+
+#define SC_METHOD(func)                                                          \
+{                                                                                \
+    DECLARE_METHOD_PROCESS(func ## _handle, #func, SC_CURRENT_USER_MODULE,func); \
+}
 
 #define SC_MAKE_SAVE_PTR(module_tag, func) \
@@ -194,16 +201,29 @@
 
 extern void declare_save_handler(const char*,save_fct_t1,sc_module&);
-//extern void declare_save_handler(const char*,save_fct_t2,sc_module&);
+
 #define DECLARE_SAVE_HANDLER(handle, name, module_tag, func) \
-  declare_save_handler (name, \
-                        SC_MAKE_SAVE_PTR( module_tag, func ), \
-                        *this)
-
-#define SAVE_HANDLER(func)  \
-  {                         \
-  DECLARE_SAVE_HANDLER(func ## _handle, #func, SC_CURRENT_USER_MODULE,func);\
-  }
+    declare_save_handler (name,                              \
+    SC_MAKE_SAVE_PTR( module_tag, func ),                    \
+    *this)
+
+
+#define SAVE_HANDLER(func)                                                     \
+{                                                                              \
+    DECLARE_SAVE_HANDLER(func ## _handle, #func, SC_CURRENT_USER_MODULE,func); \
+}
+
 } // end of namespace sc_core
 
 #endif /* __SC_MODULE_EXT_H__ */
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_module_name.h
===================================================================
--- /sources/src/sc_module_name.h	(revision 51)
+++ /sources/src/sc_module_name.h	(revision 52)
@@ -11,4 +11,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_MODULE_NAME_H__
 #define __SC_MODULE_NAME_H__
@@ -24,27 +25,28 @@
 // ----------------------------------------------------------------------------
 
-class sc_module_name
-{
-  /////////////////////////
-  // SYSTEMCASS SPECIFIC //
-  void init ();
-  /////////////////////////
-  
-  const char*     m_name;
-  bool            m_pushed;
-  friend class sc_module;
-//  friend class sc_object_manager;
-public:
-  sc_module_name( const char* );
-  sc_module_name( const sc_module_name & );
-  ~sc_module_name ();
-  operator const char*() const { return m_name; };
-private:
-  // disabled 
-    sc_module_name ();
+class sc_module_name {
+
+    /////////////////////////
+    // SYSTEMCASS SPECIFIC //
+    void init();
+    /////////////////////////
+
+    const char * m_name;
+    bool m_pushed;
+    friend class sc_module;
+
+    //  friend class sc_object_manager;
+    public:
+    sc_module_name(const char *);
+    sc_module_name(const sc_module_name &);
+    ~sc_module_name();
+    operator const char * () const { return m_name; };
+
+    private:
+    // disabled 
+    sc_module_name();
     sc_module_name & operator = (const sc_module_name &);
 };
 
-//std::ostream& operator << (std::ostream&, const sc_core::sc_module_name &);
 
 } // end of namespace sc_core
@@ -52,2 +54,13 @@
 #endif /* __SC_MODULE_NAME__ */
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_nbdefs.h
===================================================================
--- /sources/src/sc_nbdefs.h	(revision 51)
+++ /sources/src/sc_nbdefs.h	(revision 52)
@@ -10,24 +10,37 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_DEFS_H__
 #define __SC_DEFS_H__
 
 #ifndef WIN32
-typedef signed long long   int64;
+typedef signed long long int64;
 typedef unsigned long long uint64;
 #else
-typedef signed __int64     int64;
-typedef unsigned __int64   uint64;
+typedef signed __int64 int64;
+typedef unsigned __int64 uint64;
 #endif
 
-typedef long           int32;
+typedef long  int32;
+typedef short int16;
+typedef char  int8;
 typedef unsigned long  uint32;
-typedef short          int16;
 typedef unsigned short uint16;
-typedef char           int8;
 typedef unsigned char  uint8;
 
-typedef uint16         smallest_uint;
-typedef int16          smallest_int;
+typedef uint16 smallest_uint;
+typedef int16  smallest_int;
 
 #endif
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_numrep.cc
===================================================================
--- /sources/src/sc_numrep.cc	(revision 51)
+++ /sources/src/sc_numrep.cc	(revision 52)
@@ -35,5 +35,7 @@
 
 #include <string>
+
 #include "sc_numrep.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -43,21 +45,19 @@
 
 const std::string numrep_name[] = {
-  "SC_DEC",
-  "SC_BIN",
-  "SC_BIN_US",
-  "SC_BIN_SM",
-  "SC_OCT",
-  "SC_OCT_US",
-  "SC_OCT_SM",
-  "SC_HEX",
-  "SC_HEX_US",
-  "SC_HEX_SM",
-  "SC_CSD"
+    "SC_DEC",
+    "SC_BIN",
+    "SC_BIN_US",
+    "SC_BIN_SM",
+    "SC_OCT",
+    "SC_OCT_US",
+    "SC_OCT_SM",
+    "SC_HEX",
+    "SC_HEX_US",
+    "SC_HEX_SM",
+    "SC_CSD"
 };
 
-const std::string 
-to_string (sc_numrep n)
-{
-  return numrep_name[n];
+const std::string to_string (sc_numrep n) {
+    return numrep_name[n];
 }
 
@@ -65,2 +65,13 @@
 } // end of sc_dt namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_numrep.h
===================================================================
--- /sources/src/sc_numrep.h	(revision 51)
+++ /sources/src/sc_numrep.h	(revision 52)
@@ -10,4 +10,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_NUMREP_H__
 #define __SC_NUMREP_H__
@@ -15,4 +16,5 @@
 #include <cstdio>
 #include <iostream>
+
 #include "sc_string.h"
 
@@ -20,63 +22,62 @@
 
 typedef enum {
-  SC_NOBASE = 0,
-  SC_BIN    = 2,     // binary
-  SC_OCT    = 8,     // octal, two's complement
-  SC_DEC    = 10,    // decimal
-  SC_HEX    = 16,    // hexadecimal, two's complement
-  SC_BIN_US     ,    // binary, unsigned
-  SC_BIN_SM     ,    // binary, sign magnitude
-  SC_OCT_US     , 
-  SC_OCT_SM     ,
-  SC_HEX_US     ,
-  SC_HEX_SM     ,
-  SC_CSD             // canonical signed digit
+    SC_NOBASE = 0,
+    SC_BIN = 2,   // binary
+    SC_OCT = 8,   // octal, two's complement
+    SC_DEC = 10,  // decimal
+    SC_HEX = 16,  // hexadecimal, two's complement
+    SC_BIN_US,    // binary, unsigned
+    SC_BIN_SM,    // binary, sign magnitude
+    SC_OCT_US, 
+    SC_OCT_SM,
+    SC_HEX_US,
+    SC_HEX_SM,
+    SC_CSD        // canonical signed digit
 } sc_numrep;
 
-inline
-const unsigned int bitstring_to_uint (const char * val)
-{ 
-  unsigned int i, res = 0;
-  for (i = 0; val[i] != '\0'; ++i)
-  {
-    res <<= 1;
-    res |= (val[i] == '1')?1:0;
-  } 
-  return res;    
+
+inline const unsigned int bitstring_to_uint(const char * val) { 
+    unsigned int i, res = 0;
+    for (i = 0; val[i] != '\0'; ++i) {
+        res <<= 1;
+        res |= (val[i] == '1') ? 1 : 0;
+    }
+    return res;    
 }
 
+
 template <typename T>
-const sc_string to_string (T val, size_t nbits, sc_numrep n)
-{ 
-  sc_string s(nbits + 3,'0');
-  switch (n) {
-  case SC_HEX : {
-    char t[64];
-    char format[64];
-    sprintf (format, "0x0%%0%dx", nbits/4);
-    sprintf (t, format, val);
-    s = t;
-    break;
-  }
-  case SC_BIN : {
-    int i;
-    s[1] = 'b';
-    for (i = nbits - 1; i >= 0; --i)
-    {
-      s[i + 3] = (val & 1)?'1':'0';
-      val >>= 1;
-    } 
-    break;
-  }
-  default:
-    { std::cerr << "error\n"; return s; }
-  }
-#if 0
-  std::cerr << "\"" << s << "\"";
-#endif
-  return s;
+const sc_string to_string(T val, size_t nbits, sc_numrep n) { 
+    sc_string s(nbits + 3, '0');
+    switch (n) {
+        case SC_HEX :
+        {
+            char t[64];
+            char format[64];
+            sprintf(format, "0x0%%0%dx", nbits / 4);
+            sprintf(t, format, val);
+            s = t;
+            break;
+        }
+        case SC_BIN :
+        {
+            int i;
+            s[1] = 'b';
+            for (i = nbits - 1; i >= 0; --i)
+            {
+                s[i + 3] = (val & 1)?'1':'0';
+                val >>= 1;
+            } 
+            break;
+        }
+        default:
+        {
+                std::cerr << "error\n"; return s;
+        }
+    }
+    return s;
 }
 
-const std::string to_string (sc_numrep);
+const std::string to_string(sc_numrep);
 
 } // end of sc_dt namespace
@@ -98,2 +99,13 @@
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_object.cc
===================================================================
--- /sources/src/sc_object.cc	(revision 51)
+++ /sources/src/sc_object.cc	(revision 52)
@@ -39,85 +39,56 @@
 #include <string>
 #include <map>
-
 #include <cassert>
+
 #include "sc_object.h"
-//#include "sc_port.h"
 #include "internal.h"
 #include "sc_signal.h"
 #include "module_hierarchy.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+
 using namespace std;
 
 namespace sc_core {
 
-static void
-gen_name (const char *prefix, string &s)
-{
-  s = prefix;
-  static int i = 0;
-  char ic[10];
-  sprintf (ic,"%d",i++);
-  s += ic;
-}
-// ----------------------------------------------------------------------------
-static void
-build_complete_name (const char *name, string &out)
-{
-	out = "";
-  module_name_stack_t::const_iterator i;
-  for (i = module_name_stack.begin (); i != module_name_stack.end (); ++i) {
-    const string &module_name = *i;
-    out += (module_name + ".");
-//    out += ".";
-  }
-//  assert(name != NULL);
-  if (name)
-    out += name;
-  else
-    out[out.length ()-1] = '\0';
-#if 0
-  cerr << "complete_name = " << out << endl;
-#endif
-}
-
-#if 0
-static
-void
-build_full_name_r (string &out, const sc_object *obj)
-{
-  if (obj == NULL)
-  {
+static void gen_name (const char *prefix, string &s) {
+    s = prefix;
+    static int i = 0;
+    char ic[10];
+    sprintf (ic,"%d",i++);
+    s += ic;
+}
+
+
+static void build_complete_name (const char *name, string &out) {
     out = "";
-  } else {
-    const sc_object *parent = obj->get_parent_object ();
-    build_full_name_r (out, parent);
-    out += obj->basename ();
-    out += ".";
-  }
-}
-
-static
-void
-build_full_name (string &out, const sc_object &obj)
-{
-  const sc_object *parent = obj.get_parent_object ();
-  build_full_name_r (out, parent);
-  out += obj.basename ();
-  cerr << "build_full_name = " << out << endl;
-}
-#endif
-
-typedef std::map<const sc_object* const,string> object2name_t;
+    module_name_stack_t::const_iterator i;
+    for (i = module_name_stack.begin (); i != module_name_stack.end (); ++i) {
+        const string &module_name = *i;
+        out += (module_name + ".");
+    }
+    if (name) {
+        out += name;
+    }
+    else {
+        out[out.length ()-1] = '\0';
+    }
+}
+
+
+typedef std::map<const sc_object * const, string> object2name_t;
 static object2name_t object2basename;
 static object2name_t object2fullname;
 
 struct object_infos_t {
-	const char *kind_string;
+    const char * kind_string;
 };
-typedef std::map<const sc_object* const,object_infos_t> object2infos_t;
+
+typedef std::map<const sc_object * const, object_infos_t> object2infos_t;
 static object2infos_t object2infos;
+
 
 // We initialize SC_BIND_PROXY_NIL there to make sure object2infos,
@@ -125,6 +96,7 @@
 // SC_BIND_PROXY_NIL should be declared into sc_module.cc but it prevents us
 // to force the initialization order.
-const char *SC_BIND_PROXY_NIL_string = "SC_BIND_PROXY_NIL";
-sc_bind_proxy SC_BIND_PROXY_NIL (SC_BIND_PROXY_NIL_string,NULL);
+const char * SC_BIND_PROXY_NIL_string = "SC_BIND_PROXY_NIL";
+sc_bind_proxy SC_BIND_PROXY_NIL(SC_BIND_PROXY_NIL_string, NULL);
+
 
 // ----------------------------------------------------------------------------
@@ -132,12 +104,10 @@
 //                                               
 // ----------------------------------------------------------------------------
-
-const char *
-sc_gen_unique_name (const char *basename_)
-{
-	string s;
-	gen_name (basename_,s);
-	return strdup (s.c_str ());
-}
+const char * sc_gen_unique_name(const char * basename_) {
+    string s;
+    gen_name(basename_,s);
+    return strdup (s.c_str());
+}
+
 
 // ----------------------------------------------------------------------------
@@ -146,144 +116,121 @@
 // ----------------------------------------------------------------------------
 
-const char* const sc_object::kind_string = "sc_object";
-
-void
-sc_object::set_kind (const char *k)
-{
-	object2infos[this].kind_string = k;
-}
-
-void
-sc_object::init ()
-{
-	set_kind ("sc_object");
-  add_child (*this);
-}
-
-sc_object::sc_object()
-{
-	string noname;
- 	gen_name ("noname_",noname);
-#if 0
-  cerr << "object2basename[this] = " << noname << "\n"; 
-#endif
-  object2basename[this] = noname;
-  build_complete_name (noname.c_str(),object2fullname[this]);
-	init ();
-}
-
-sc_object::sc_object(const char *name_)
-{
-  const char *temp;
-  if (name_ == NULL) {
-    if (module_name_stack.empty())
-    {
-      cerr << "Internal error : module_name_stack is empty.";
-      exit (21092005);
-    }
-    string &module_name = module_name_stack.back ();
-    temp = module_name.c_str ();
-  } else {
-    temp = name_;
-  }
-#if 0
-  cerr << "object2basename[this] = " << temp << "\n"; 
-  cerr << "name temp = " << temp << endl;
-#endif
-  object2basename[this] = temp;
-  build_complete_name (name_,object2fullname[this]);
-	init ();
-}
-
-const char *
-sc_object::basename () const
-{
-  return object2basename[this].c_str ();
-}
-
-const char *
-sc_object::name () const
-{
-	object2name_t::iterator i = object2fullname.find (this);
+const char * const sc_object::kind_string = "sc_object";
+
+void sc_object::set_kind(const char * k) {
+    object2infos[this].kind_string = k;
+}
+
+
+void sc_object::init() {
+    set_kind("sc_object");
+    add_child(*this);
+}
+
+
+sc_object::sc_object() {
+    string noname;
+    gen_name("noname_", noname);
+    object2basename[this] = noname;
+    build_complete_name(noname.c_str(), object2fullname[this]);
+    init();
+}
+
+
+sc_object::sc_object(const char * name_) {
+    const char * temp;
+    if (name_ == NULL) {
 #ifdef CONFIG_DEBUG
-	if (i == object2fullname.end ()) {
-		cerr << "Internal error : can't find name of " << this << "\n";
-		exit (90);
-	}
-#endif
-  return i->second.c_str ();
-}
-  
-void
-sc_object::rename (const char* newname) const
-{
+        if (module_name_stack.empty()) {
+            cerr << "Internal error : module_name_stack is empty.";
+            exit(21092005);
+        }
+#endif
+        string & module_name = module_name_stack.back();
+        temp = module_name.c_str();
+    }
+    else {
+        temp = name_;
+    }
+    object2basename[this] = temp;
+    build_complete_name(name_, object2fullname[this]);
+    init();
+}
+
+
+const char * sc_object::basename() const {
+    return object2basename[this].c_str();
+}
+
+
+const char * sc_object::name() const {
+    object2name_t::iterator i = object2fullname.find(this);
+#ifdef CONFIG_DEBUG
+    if (i == object2fullname.end()) {
+        cerr << "Internal error : can't find name of " << this << "\n";
+        exit (90);
+    }
+#endif
+    return i->second.c_str();
+}
+
+
+void sc_object::rename(const char * newname) const {
+    object2basename[this] = newname;
+    build_complete_name (newname,object2fullname[this]);
+}
+
+
+const char * sc_object::kind() const {
+    object2infos_t::iterator i = object2infos.find(this);
+#ifdef CONFIG_DEBUG
+    if (i == object2infos.end()) {
+        cerr << "Internal error : can't find kind of " << this << "\n";
+        exit(90);
+    }
+#endif
+    return i->second.kind_string;
+}
+
+
+sc_object::~sc_object() {
+    if (save_on_exit) {
+        sc_save_simulation(save_on_exit);
+        save_on_exit = NULL;
+    }
+    object2fullname.erase(this);
+    object2basename.erase(this);
+    object2infos.erase(this);
+}
+
+
+std::ostream & operator << (std::ostream & os, const sc_object & obj) {
+    return os << obj.name ();
+}
+
+
+/* virtual */ 
+const std::vector<sc_object *> & sc_object::get_child_objects() const {
+    return sc_core::get_child_objects(*this);
+}
+
+
+sc_object * sc_object::get_parent_object() const {
+    return sc_core::get_parent_object(*this);
+}
+
+
+} // end of sc_core namespace
+
+
 /*
-	object2name_t::iterator i = object2fullname.find (this);
-#ifdef CONFIG_DEBUG
-	if (i == object2fullname.end ()) {
-		cerr << "Internal error : can't find name of " << this << "\n";
-		exit (90);
-	}
-#endif
-  i->second = newname;
-  object2basename[this] = newname;
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
 */
-  object2basename[this] = newname;
-  build_complete_name (newname,object2fullname[this]);
-/*
-  const std::vector<sc_object*>& childs = get_child_objects();
-  std::vector<sc_object*>::const_iterator it;
-  for (it = childs.begin (); it != childs.end (); ++it)
-  {
-    string     out;
-    sc_object* obj = *it;
-    assert(obj != NULL);
-    build_full_name (out, *obj);
-  }
-*/
-}
-const char *sc_object::kind () const
-{
-	object2infos_t::iterator i = object2infos.find (this);
-#ifdef CONFIG_DEBUG
-	if (i == object2infos.end ()) {
-		cerr << "Internal error : can't find kind of " << this << "\n";
-		exit (90);
-	}
-#endif
-  return i->second.kind_string;
-}
-
-sc_object::~sc_object ()
-{
-  if (save_on_exit)
-  {
-    sc_save_simulation (save_on_exit);
-    save_on_exit = NULL;
-  }
-  object2fullname.erase (this);
-  object2basename.erase (this);
-  object2infos.erase    (this);
-}
-
-std::ostream& 
-operator << (std::ostream& os, const sc_object& obj)
-{
-	return os << obj.name ();
-}
-
-/* virtual */ 
-const std::vector<sc_object*>& 
-sc_object::get_child_objects() const
-{
-  return sc_core::get_child_objects (*this);
-}
-
-sc_object*
-sc_object::get_parent_object () const
-{
-  return sc_core::get_parent_object (*this);
-}
-
-} // end of sc_core namespace
-
+
Index: /sources/src/sc_object.h
===================================================================
--- /sources/src/sc_object.h	(revision 51)
+++ /sources/src/sc_object.h	(revision 52)
@@ -10,4 +10,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_OBJECT_H__
 #define __SC_OBJECT_H__
@@ -23,49 +24,36 @@
 namespace sc_core {
 
-class sc_object
-{
-	///////////
+
+class sc_object {
+	
+    ///////////
 	// Internal
-	protected: void             init ();
-	protected: void             set_kind (const char *);
-	///////////		 
-public:
-  static const char* const kind_string;
-  // LRM
-  const char *name     () const;
-  const char *basename () const;
-  void        rename   (const char*) const;
+    // ////////
+	protected:
+    void init();
+    void set_kind(const char *);
 
-	friend std::ostream& operator << (std::ostream& , const sc_object&);
-  /*
-  void print () const;
-  virtual void print (std::ostream & os) const;
-  void dump () const;
-  virtual void dump (std::ostream & os) const;
-  virtual void trace (sc_trace_file *) const;
-  */
-  /*virtual*/ const char *kind () const;
-  /*
-  sc_simcontext *simcontext () const;
-  bool add_attribute (sc_attr_base &);
-  sc_attr_base *get_attribute (const sc_string &);
-  const sc_attr_base *get_attribute (const sc_string &) const;
-  sc_attr_base *remove_attribute (const sc_string &);
-  void remove_all_attributes ();
-  int num_attributes () const;
-    sc_attr_cltn & attr_cltn ();
-  const sc_attr_cltn & attr_cltn () const;
-  */
-  /* virtual */ const std::vector<sc_object*>& get_child_objects() const;
-  sc_object*               get_parent_object       () const;
-protected:
-    sc_object ();
-    sc_object (const char *);
-    /*virtual */~ sc_object ();
-		
+
+    public:
+    static const char * const kind_string;
+    // LRM
+    const char * name() const;
+    const char * basename() const;
+    void rename(const char*) const;
+
+    friend std::ostream & operator << (std::ostream &, const sc_object &);
+    /* virtual */ const char * kind() const;
+    /* virtual */ const std::vector<sc_object *> & get_child_objects() const;
+    sc_object * get_parent_object() const;
+
+    protected:
+    sc_object();
+    sc_object(const char *);
+    /*virtual */~sc_object();
+
 };
 
-const std::vector<sc_object*>& sc_get_top_level_objects();
-const sc_object*               sc_find_object          (const char*);
+const std::vector<sc_object *> & sc_get_top_level_objects();
+const sc_object * sc_find_object(const char *);
 
 } // end of sc_core namespace
@@ -76,2 +64,13 @@
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_pat_trace.cc
===================================================================
--- /sources/src/sc_pat_trace.cc	(revision 51)
+++ /sources/src/sc_pat_trace.cc	(revision 52)
@@ -35,4 +35,5 @@
  */
 
+#include <ctime>
 
 #include "sc_trace.h"
@@ -41,5 +42,4 @@
 #include "internal.h" // notrace
 
-#include <ctime>
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -48,5 +48,5 @@
 #ifdef CONFIG_PAT_TRACE_FORMAT
 
-//-----------------------------------------
+
 
 extern "C" {
@@ -54,9 +54,8 @@
 }
 
-//#include "malloc.h" // NO LONGER SUPPORTED
+
 #include <cstdlib>
 #include <cstdio>
 
-//-----------------------------------------
 
 using namespace std;
@@ -64,45 +63,43 @@
 namespace sc_core {
 
-//*************************************************************************
 
-sc_trace_file*
-sc_create_pat_trace_file(const char * name)
-{
-  if (notrace)
-    return NULL;
-	//création d'1 instance de la structure Sc_trace_file:
-	sc_trace_file *traceFic=new sc_trace_file();
-	traceFic->flag = PAT_FORMAT;	
-	
-	trace_file_list.push_back(traceFic);
-	
-	DEF_GENPAT((char *)name);
-	
-	return traceFic; 
-	//pointeur sur le sc_trace_file dontl'un des elts pointe sur le fichier.pat crée 
-	
+sc_trace_file * sc_create_pat_trace_file(const char * name) {
+    if (notrace) {
+        return NULL;
+    }
+    //création d'1 instance de la structure Sc_trace_file:
+    sc_trace_file * traceFic = new sc_trace_file();
+    traceFic->flag = PAT_FORMAT;	
+
+    trace_file_list.push_back(traceFic);
+
+    DEF_GENPAT((char *) name);
+
+    return traceFic; 
+    //pointeur sur le sc_trace_file dontl'un des elts pointe sur le fichier.pat crée 
 }
+
 
 //*************************************************************************
 
-void
-sc_close_pat_trace_file( sc_trace_file* traceFic )
-{	
-  if (notrace)
-    return;
+void sc_close_pat_trace_file(sc_trace_file * traceFic ) {	
+    if (notrace) {
+        return;
+    }
 
-  trace  (*traceFic,false);
+    trace(*traceFic, false);
 
-	SAV_GENPAT ();
-	
-	//libération de l'instance de la structure en mémoire:
-	delete traceFic;
+    SAV_GENPAT();
 
-	vector<sc_trace_file*>::iterator i;
-	for (i = trace_file_list.begin (); i != trace_file_list.end(); ++i)
-		if (*i == traceFic) {
-			trace_file_list.erase(i);
-			break;
-		}
+    //libération de l'instance de la structure en mémoire:
+    delete traceFic;
+
+    vector<sc_trace_file *>::iterator i;
+    for (i = trace_file_list.begin (); i != trace_file_list.end(); ++i) {
+        if (*i == traceFic) {
+            trace_file_list.erase(i);
+            break;
+        }
+    }
 }
 
@@ -110,2 +107,14 @@
 
 #endif
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_pat_trace.h
===================================================================
--- /sources/src/sc_pat_trace.h	(revision 51)
+++ /sources/src/sc_pat_trace.h	(revision 52)
@@ -11,4 +11,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef SC_PAT_TRACE_H
 #define SC_PAT_TRACE_H
@@ -20,5 +21,5 @@
 
 // Create PAT file
-extern sc_trace_file *sc_create_pat_trace_file(const char* name);
+extern sc_trace_file * sc_create_pat_trace_file(const char * name);
 
 // Close PAT file
@@ -32,2 +33,13 @@
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_port.cc
===================================================================
--- /sources/src/sc_port.cc	(revision 51)
+++ /sources/src/sc_port.cc	(revision 52)
@@ -51,7 +51,7 @@
 
 extern "C" {
-	extern char unstable;
-  char unstable = 0; // not in sc_core namespace because dynamic link support C linkage only
-  int32_t pending_write_vector_nb = 0;
+    extern char unstable;
+    char unstable = 0; // not in sc_core namespace because dynamic link support C linkage only
+    int32_t pending_write_vector_nb = 0;
 }
 
@@ -60,6 +60,6 @@
 namespace sc_core {
 
-const char *const sc_port_base::kind_string = "sc_port";
-const char *const sc_signal_base::kind_string = "sc_signal";
+const char * const sc_port_base::kind_string = "sc_port";
+const char * const sc_signal_base::kind_string = "sc_signal";
 
 unsigned int pending_write_vector_capacity = 512;
@@ -67,11 +67,9 @@
 extern equi_list_t equi_list;
 
-const char* get_module_name (const tab_t *pointer)
-{
-	const equi_t &eq = get_equi (pointer);
-  return get_module_name (eq);
-}
-
-//typedef std::map<const sc_port_base*, const sc_module*> port2module_t;
+const char * get_module_name (const tab_t * pointer) {
+	const equi_t & eq = get_equi (pointer);
+    return get_module_name (eq);
+}
+
 port2module_t port2module;
 
@@ -80,4 +78,5 @@
 const char * const sc_in_string    = "sc_in";
 const char * const sc_out_string   = "sc_out";
+
 
 // ----------------------------------------------------------------------------
@@ -87,82 +86,82 @@
 // ----------------------------------------------------------------------------
 
-sc_port_base::sc_port_base()
-{
+sc_port_base::sc_port_base() {
 	init ();
 }
 
-sc_port_base::sc_port_base(const char* name_) : sc_object(name_)
-{
-	init ();
-}
-
-sc_port_base::sc_port_base(const sc_port_base& parent_) : sc_object (parent_.name ())
-{
-	init ();
-}
-
-void
-sc_port_base::init ()
-{
+
+sc_port_base::sc_port_base(const char * name_) : sc_object(name_) {
+    init ();
+}
+
+
+sc_port_base::sc_port_base(const sc_port_base & parent_) : sc_object (parent_.name ()) {
+    init ();
+}
+
+
+void sc_port_base::init() {
 #ifdef CONFIG_DEBUG
-	if (modules_stack.empty ()) {
-		cerr << "Internal error : modules stack empty\n";
-		exit (9);
-	}
-#endif
-	const sc_module *last_module = sc_core::modules_stack.top ();
-	port2module[this] = last_module;
-	set_kind (kind_string);
-}
-
-const sc_module &
-sc_port_base::get_module () const
-{
-	port2module_t::iterator i = port2module.find ((sc_port_base*)this);
-	if (i == port2module.end ()) {
-		cerr << "Internal error : Modules contain ports. "
+    if (modules_stack.empty()) {
+        cerr << "Internal error : modules stack empty\n";
+        exit (9);
+    }
+#endif
+    const sc_module * last_module = sc_core::modules_stack.top();
+    port2module[this] = last_module;
+    set_kind(kind_string);
+}
+
+
+const sc_module & sc_port_base::get_module() const {
+    port2module_t::iterator i = port2module.find ((sc_port_base *) this);
+    if (i == port2module.end()) {
+        cerr << "Internal error : Modules contain ports. "
             "SystemCASS needs to identify the module that contains the following port : '" 
-        << name()
-			  << "'\n";
-		exit (17);
-	}
-  const sc_module *m = i->second;
-	return *m;
-}
+            << name()
+            << "'\n";
+        exit (17);
+    }
+    const sc_module * m = i->second;
+    return *m;
+}
+
 
 static bool check_multiwriting2port_error_message = true;
-void
-sc_port_base::check_multiwriting2port () const
-{
-  static std::map<sc_port_base*, double> s;
-  double t = sc_simulation_time ();
-  if (t == 0)
-    return;
-  sc_port_base *port = (sc_port_base*)this;
-  if ((s[port] == t) && (check_multiwriting2port_error_message))
-  {
-    check_multiwriting2port_error_message = 0;
-    if (use_port_dependency)
-    {
-      std::cerr << "Error at cycle #" << t << " : "
-                   "SystemCASS allows only 1 writing for each ports/signals.\n"
+
+void sc_port_base::check_multiwriting2port() const {
+    static std::map<sc_port_base *, double> s;
+    double t = sc_simulation_time();
+    if (t == 0) {
+        return;
+    }
+    sc_port_base * port = (sc_port_base *) this;
+    if ((s[port] == t) && (check_multiwriting2port_error_message)) {
+        check_multiwriting2port_error_message = 0;
+        if (use_port_dependency) {
+            std::cerr << "Error at cycle #" << t << " : "
+                "SystemCASS allows only 1 writing for each ports/signals.\n"
                 << "Functions write several times into '" << name () << "'.\n";
-    } else {
-      std::cerr << "Error : "
-                   "Multiwriting to port assertion works only "
-                   "when SystemCASS uses port dependency information "
-                   "(--p parameter).\n";
-    }
-    sc_core::sc_stop ();
-    exit (31072006); // 6
-  } else
-    s[port] = t;
-}
-
-std::ostream& 
-operator << (std::ostream &o, const sc_port_base &p)
-{
-  return o << p.name ();
-}
+        }
+        else {
+            std::cerr << "Error : "
+                "Multiwriting to port assertion works only "
+                "when SystemCASS uses port dependency information "
+                "(--p parameter).\n";
+        }
+        sc_core::sc_stop();
+        exit (31072006); // 6
+    }
+    else {
+        s[port] = t;
+    }
+}
+
+
+std::ostream & operator << (std::ostream & o, const sc_port_base & p) {
+    return o << p.name();
+}
+
+
 // ----------------------------------------------------------------------------
 //  CLASS : sc_signal_base
@@ -170,27 +169,28 @@
 //  The sc_signal<T> primitive channel class.
 // ----------------------------------------------------------------------------
-
-void
-sc_signal_base::init ()
-{
-	set_kind (kind_string);
-	bind (*this);
-}
+void sc_signal_base::init() {
+    set_kind(kind_string);
+    bind(*this);
+}
+
 
 sc_signal_base::sc_signal_base() { 
-  init ();
-}
-
-sc_signal_base::sc_signal_base(const char* name_) : sc_object(name_) { 
-  init ();
-}
-
-sc_signal_base::sc_signal_base(const char* name_, void*) : sc_object(name_) {
-	// this overload is only used for SC_BIND_PROXY_NIL constant.
-	// this signal should not be added to the signal list.
-}
-
-sc_signal_base::~sc_signal_base() { 
-}
+    init();
+}
+
+
+sc_signal_base::sc_signal_base(const char * name_) : sc_object(name_) { 
+    init ();
+}
+
+
+sc_signal_base::sc_signal_base(const char * name_, void *) : sc_object(name_) {
+    // this overload is only used for SC_BIND_PROXY_NIL constant.
+    // this signal should not be added to the signal list.
+}
+
+
+sc_signal_base::~sc_signal_base() {}
+
 
 /*
@@ -199,6 +199,6 @@
 
 #ifdef DUMP_SIGNAL_STATS
-typedef map<tab_t*,long long int> counter_t;
-static counter_t  counter;
+typedef map<tab_t *, long long int> counter_t;
+static counter_t counter;
 long long int unnecessary = 0;
 long long int total_assig = 0;
@@ -207,50 +207,45 @@
 } // end of sc_core namespace
 
+
 extern "C" {
-void
-update ()
-{
+
+    void update() {
 #if defined(DUMP_STAGE)
-  cerr << "Updating... ";
-#endif
-// stl vectors are too slow
-// memcopy is not better
-// signal table sorting doesn't give any better performance	
-#if 0
-	cerr << pending_write_vector_nb << " " << pending_write_vector_capacity << endl;
-#endif
+            cerr << "Updating... ";
+#endif
+            // stl vectors are too slow
+            // memcopy is not better
+            // signal table sorting doesn't give any better performance	
 #if defined(DUMP_STAGE)
-  cerr << "(" << pending_write_vector_nb 
-       << " internal pending writings) ";
-#endif
-	unsigned int i;
-	for (i = 0; i < pending_write_vector_nb; ++i) {
-#if 0
-		cerr << "pending_write[" << i << "] : " << pending_write_vector[i];
-#endif
+            cerr << "(" << pending_write_vector_nb 
+                << " internal pending writings) ";
+#endif
+            unsigned int i;
+            for (i = 0; i < pending_write_vector_nb; ++i) {
 #define iter (sc_core::pending_write_vector[i])
 #ifdef CONFIG_DEBUG
-		if (iter.pointer == NULL) {
-			cerr << "Internal error : trying to apply a posted write from an unassigned signal/port\n";
-			exit (8);
-		}
+                if (iter.pointer == NULL) {
+                    cerr << "Internal error : trying to apply a posted write from an unassigned signal/port\n";
+                    exit (8);
+                }
 #endif	
 #ifdef DUMP_SIGNAL_STATS
-		if (*(iter.pointer) == iter.value)
-			unnecessary++;
-		counter[iter.pointer]++;
-#endif
-		*(iter.pointer) = iter.value;	
+                if (*(iter.pointer) == iter.value) {
+                    unnecessary++;
+                }
+                counter[iter.pointer]++;
+#endif
+                *(iter.pointer) = iter.value;	
 #undef iter
-  }
+            }
 #ifdef DUMP_SIGNAL_STATS
-	total_assig += pending_write_vector_nb;
-#endif
-	pending_write_vector_nb = 0;
+            total_assig += pending_write_vector_nb;
+#endif
+            pending_write_vector_nb = 0;
 
 #if defined(DUMP_STAGE)
-  cerr << "done.\n";
-#endif
-}
+            cerr << "done.\n";
+#endif
+        }
 
 } // end of extern "C"
@@ -258,91 +253,89 @@
 namespace sc_core {
 
-void
-print_registers_writing_stats (ostream &o)
-{
+void print_registers_writing_stats (ostream & o) {
 #ifdef DUMP_SIGNAL_STATS
-	o << "signal index / name / usage (>1%)\n";
-	o << setprecision (2);
-	double t = sc_simulation_time ();
-	if (t == 0) {
-		o << "Warning : simulation too short.\n";
-		t = 0.01;
-	}
-	if (total_assig == 0)
-		return;
-	counter_t::iterator k;
-	for (k = counter.begin (); k != counter.end (); ++k) {
-		double usage = k->second / t * 100;
-		if (usage <= 1)
-			continue;
-		o << k->first 
-			<< "   " << get_name (k->first) 
-			<< "   " << usage << "%\n";
-	}
-	typedef map<string,int> counter_module_t;
-	counter_module_t counter_by_module;
-	for (k = counter.begin (); k != counter.end (); ++k) {
-		string module_name = get_module_name (k->first);
-		counter_by_module[module_name] += k->second;	
-	}
-	o << "module name / usage\n";
-	counter_module_t::iterator i;
-	for (i = counter_by_module.begin (); i != counter_by_module.end (); ++i) {
-		o << i->first 
-			<< "   " << (i->second * 100 / total_assig) << "%\n";
-	}
-	cerr << "average of assignment number per cycle " << (total_assig / t) << "\n";
-	cerr << (unnecessary * 100 / total_assig) << "% of assignment are unecessary\n";
+    o << "signal index / name / usage (>1%)\n";
+    o << setprecision(2);
+    double t = sc_simulation_time();
+    if (t == 0) {
+        o << "Warning : simulation too short.\n";
+        t = 0.01;
+    }
+    if (total_assig == 0) {
+        return;
+    }
+    counter_t::iterator k;
+    for (k = counter.begin(); k != counter.end(); ++k) {
+        double usage = k->second / t * 100;
+        if (usage <= 1) {
+            continue;
+        }
+        o << k->first << "   " << get_name (k->first) << "   " << usage << "%\n";
+    }
+    typedef map<string, int> counter_module_t;
+    counter_module_t counter_by_module;
+    for (k = counter.begin(); k != counter.end(); ++k) {
+        string module_name = get_module_name (k->first);
+        counter_by_module[module_name] += k->second;	
+    }
+    o << "module name / usage\n";
+    counter_module_t::iterator i;
+    for (i = counter_by_module.begin(); i != counter_by_module.end(); ++i) {
+        o << i->first << "   " << (i->second * 100 / total_assig) << "%\n";
+    }
+    cerr << "average of assignment number per cycle " << (total_assig / t) << "\n";
+    cerr << (unnecessary * 100 / total_assig) << "% of assignment are unecessary\n";
 #else
-	cerr << "Register usage not available.\n";
-#endif
-}
-
-static
-bool
-is_bound (/*const*/ sc_port_base &port)
-{
-  const tab_t *pointer = port.get_pointer ();
-  //assert(pointer != NULL);
-  if (pointer == NULL)
-    return false; // case : sc_in not bound
-/*
-  equi_t &e = get_equi (pointer);
-  if (e.size () == 1)
-    return true; // case : sc_out not bound
-*/
-  return has_equi (port);
-}
-
-static
-void
-check_port (/*const*/ sc_port_base &port)
-{
-  if (!is_bound (port))
-  {
-    cerr << "Error : '" << port.name () << "' port"
+    cerr << "Register usage not available.\n";
+#endif
+}
+
+static bool is_bound(/*const*/ sc_port_base & port) {
+    const tab_t * pointer = port.get_pointer();
+    //assert(pointer != NULL);
+    if (pointer == NULL) {
+        return false; // case : sc_in not bound
+    }
+    return has_equi (port);
+}
+
+static void check_port(/*const*/ sc_port_base & port) {
+    if (!is_bound (port)) {
+        cerr << "Error : '" << port.name() << "' port"
             " (" << port.kind() << ")"
             " is not bound.\n";
-    exit (29);
-  }
-}
-
-void
-check_all_ports ()
-{
-  if (dump_stage)
-    cerr << "checking ports...";
-	port2module_t::/*const_*/iterator i;
-  for (i = port2module.begin (); i != port2module.end (); ++i)
-  {
-    /*const*/ sc_port_base *port = i->first;
-    assert(port != NULL);
-    check_port (*port);
-  }
-  if (dump_stage)
-    cerr << " done.";
-}
+        exit (29);
+    }
+}
+
+
+void check_all_ports() {
+    if (dump_stage) {
+        cerr << "checking ports...";
+    }
+    port2module_t::/*const_*/iterator i;
+    for (i = port2module.begin(); i != port2module.end(); ++i) {
+        /*const*/ sc_port_base *port = i->first;
+        assert(port != NULL);
+        check_port(*port);
+    }
+    if (dump_stage) {
+        cerr << " done.";
+    }
+}
+
 
 } // end of sc_core namespace
 
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_port.h
===================================================================
--- /sources/src/sc_port.h	(revision 51)
+++ /sources/src/sc_port.h	(revision 52)
@@ -11,4 +11,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_PORT_H__
 #define __SC_PORT_H__
@@ -16,15 +17,25 @@
 #include "sc_port_ext.h"
 #include "sc_fwd.h"
-//#include "internal_ext.h"
 
 #include <list>
 
-//
 namespace sc_core {
-//
-const char *get_module_name (const tab_t *pointer);
-void        check_all_ports ();
+
+const char * get_module_name(const tab_t * pointer);
+void check_all_ports();
 
 } // end of sc_core namespace
 
 #endif /* __SC_PORT_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_port_ext.h
===================================================================
--- /sources/src/sc_port_ext.h	(revision 51)
+++ /sources/src/sc_port_ext.h	(revision 52)
@@ -11,4 +11,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_PORT_EXT_H__
 #define __SC_PORT_EXT_H__
@@ -36,30 +37,31 @@
 //
 #if ((__GNUC__ < 3) || (__GNUC_MINOR__ < 4))
-#define INLINE __attribute__((always_inline))
+    #define INLINE __attribute__((always_inline))
 #else
-/* gcc3.4 doesn't support */ 
-#define INLINE
+    /* gcc3.4 doesn't support */ 
+    #define INLINE
 #endif
 
 #include <list>
 
-//
+
 namespace sc_core {
-//
-
-  using namespace sc_dt;
-
-const char *get_name        (const tab_t *pointer);
+
+using namespace sc_dt;
+
+const char * get_name(const tab_t * pointer);
 
 #define READ_SIGNAL(value_type_,pointer_) \
   ((value_type_&) (*((value_type_*) (pointer_))))
 
+
 ///////////////////// DEPRECATED
 // C ANSI-only since it is needed to link with extern "C"
 
-extern void bind (sc_port_base&,sc_port_base&);
-extern void bind (sc_port_base&,sc_signal_base&);
-extern void bind (sc_signal_base &x);
-extern void bind (sc_port_base   &x);
+
+extern void bind(sc_port_base &, sc_port_base&);
+extern void bind(sc_port_base &, sc_signal_base&);
+extern void bind(sc_signal_base & x);
+extern void bind(sc_port_base & x);
 
 // KIND STRING
@@ -68,207 +70,204 @@
 extern const char * const sc_out_string;  
 
-extern "C" void update (void);
-
-class sc_port_base : public sc_object, public sc_interface
+extern "C" void update(void);
+
+class sc_port_base : public sc_object, public sc_interface {
+
+    protected:
+    typedef sc_port_base base_type;
+
+    public:
+    ///////////
+    // Internal
+    const sc_module & get_module() const;
+    void init();
+    void check_multiwriting2port() const;
+    ///////////     
+
+    friend std::ostream & operator << (std::ostream &, const sc_port_base &);
+
+
+    // LRM
+    static const char * const kind_string;
+    //
+
+    sc_port_base();
+    sc_port_base(const char * name_);
+    explicit sc_port_base(const sc_port_base & parent_);
+    /*virtual */~sc_port_base() {};
+    // bind to a handle
+    void operator () (method_process_t & func) const;
+};
+
+
+template < typename T > class sc_port_b : public sc_port_base
 {
-protected:
-  typedef sc_port_base                        base_type;
-public:
+};
+
+
+// ----------------------------------------------------------------------------
+//  CLASS : sc_in< T >
+//
+// ----------------------------------------------------------------------------
+
+template < typename T >
+class sc_in : public sc_port_base {
+
+    private:
+    typedef T data_type;
+    typedef sc_port_base base_type;
+    typedef sc_in<data_type> this_type;
+    typedef sc_signal<data_type> signal_type;
+
+
+    ///////////
+    // Internal
+    void init();
+    ///////////
+
+    public:
+    // constructors
+    sc_in() : base_type() { init(); }
+
+    explicit sc_in(const char * name_) : base_type(name_) { init(); }
+
+    explicit sc_in(const base_type & parent_) : base_type( parent_ ) { init(); }
+
+    /*
+    // LRM error !
+    //static const char *const kind_string; this is a template !
+    */
+    //  virtual const char *kind () const 
+    //  { return "sc_in"; };
+
+    sc_event neg() const { return sc_event(*this, sc_event::NEG); };
+    sc_event pos() const { return sc_event(*this, sc_event::POS); };
+
+    // read the current value
+    inline const T & read() const INLINE;  
+    inline operator const T & () const INLINE;
+
+    // operateur ==
+    inline bool operator == (const T & v) INLINE;
+
+    // bind to in interface
+    void operator () (sc_signal<data_type> & s) {
+        sc_core::bind(*this, s);
+    }
+
+    // binding for hierarchical description
+    void operator () (this_type & parent_) {
+        sc_core::bind(*this, parent_);
+    }
+
+    void operator () (sc_out<data_type> & o) {
+        sc_core::bind(*this, o);
+    }
+
+    /*virtual */~sc_in() {};
+
+};
+
+
+template < typename T >
+void sc_in< T >::init() { 
+    set_kind(sc_in_string);
+    sc_interface::init(sizeof(data_type)); 
+}
+
+
+// read
+template < typename T > inline 
+const T & sc_in< T >::read() const { 
+#ifdef DUMP_READ
+    std::cerr << "read " << READ_SIGNAL(const T &, get_pointer())
+     << " on signal " << name() << "\n";
+#endif
+    return READ_SIGNAL(const T, get_pointer());
+}
+  
+
+template < typename T > inline 
+sc_in< T >::operator const T & () const {
+    return sc_in< T >::read();
+}
+
+
+template < typename T > inline 
+bool sc_in< T >::operator == (const T & v) {
+    return sc_in< T >::read() == v;
+}
+
+
+
+// ----------------------------------------------------------------------------
+//  CLASS : sc_inout< T >
+//
+// ----------------------------------------------------------------------------
+
+template < typename  T >
+class sc_inout : public sc_port_base {
+
   ///////////
   // Internal
-  const sc_module &get_module () const;
-  void             init ();
-  void             check_multiwriting2port () const;
-  ///////////     
-  
-  friend std::ostream& operator << (std::ostream &, const sc_port_base &);
- 
-  // LRM
-  //virtual const sc_event /*&*/ default_event () const;
-  static const char* const kind_string;
-//  virtual const char *kind () const;
-  //
-  sc_port_base();
-  sc_port_base(const char* name_);
-  explicit sc_port_base(const sc_port_base& parent_);
-  /*virtual */~sc_port_base () {};
-  // bind to a handle
-  void operator () (method_process_t &func) const;
+    protected:
+    void init();
+    T val;
+
+    private:
+    typedef T data_type;
+
+    typedef sc_inout<data_type> this_type;
+    typedef sc_signal<data_type> signal_type;
+
+    
+    public:
+    // contructeurs
+    sc_inout() : base_type() { init (); };
+
+    explicit sc_inout(const char * name_) : base_type(name_) { init(); };
+
+    /*
+    // LRM error !
+    //static const char *const kind_string; this is a template !
+    */
+
+    // read the current value
+    inline const T & read() const INLINE;
+    // write the new value
+    inline void write(const T &) INLINE;
+    template < int W > inline void write(const sc_uint< W > & v) {
+        sc_inout< T >::write(v.read());
+    }
+
+    inline operator const T & () const INLINE;
+
+    inline sc_inout< T > & operator = (const T & a) INLINE;
+    inline sc_inout< T > & operator = (const sc_signal< T > & a) INLINE;
+
+    // operateur ==
+    inline bool operator == (const bool & v) INLINE;
+
+    // bind to in interface
+    void operator () (sc_signal<data_type> & s) {
+        bind(*this);
+        bind(*this, s);
+    }
+
+    void operator () (this_type & parent_) {
+        bind(*this, parent_);
+    }
+
+    /*virtual */~sc_inout() {};
 };
 
-template < typename T > class sc_port_b:public sc_port_base
-{
-};
-
-// ----------------------------------------------------------------------------
-//  CLASS : sc_in<T>
-//
-// ----------------------------------------------------------------------------
-
-template <typename T>
-class sc_in : public sc_port_base
-{
-private:
-  typedef T  data_type;
-  typedef sc_port_base                  base_type;
-  typedef sc_in<data_type>              this_type;
-  typedef sc_signal<data_type>          signal_type;
-
-  ///////////
-  // Internal
-  void init ();
-  /*
-  public: virtual size_t data_size () const
-  { return sizeof (data_type); }
-  */
-  ///////////
-public:
-  // constructors
-  sc_in(): base_type() { init (); }
-
-  explicit sc_in(const char* name_): base_type(name_) { init (); }
-
-  explicit sc_in(const base_type& parent_ ): base_type( parent_ ) { init (); }
-
-  /*
-  // LRM error !
-  //static const char *const kind_string; this is a template !
-  */
-//  virtual const char *kind () const 
-//  { return "sc_in"; };
- 
-#if 0
-  // LRM
-  sc_event_finder& neg () const { return *new sc_event_finder (*(sc_port_base*)this);};
-  sc_event_finder& pos () const { return *new sc_event_finder (*(sc_port_base*)this);};
-#endif
-
-  sc_event         neg () const { return sc_event (*this, sc_event::NEG);};
-  sc_event         pos () const { return sc_event (*this, sc_event::POS);};
-  // read the current value
-  inline const T& read() const INLINE;  
-  inline operator const T& () const INLINE;
-
-  // operateur ==
-  inline bool operator == (const T& v) INLINE;
-
-  // bind to in interface
-  void operator () (sc_signal<data_type> &s)
-  { sc_core::bind (*this,s); }
-  
-  // binding for hierarchical description
-  void operator () (this_type &parent_)  
-  { sc_core::bind (*this,parent_); }
-
-  void operator () (sc_out<data_type> &o) 
-  { sc_core::bind (*this,o); }
-
-  /*virtual */~sc_in() {};
-
-};
-
-template <typename T>
-void
-sc_in<T>::init()
-{ 
-  set_kind (sc_in_string);
-  sc_interface::init (sizeof (data_type)); 
-}
-
-// read
-template <typename T> inline 
-const T& 
-sc_in<T>::read() const
-{ 
-#ifdef DUMP_READ
-  std::cerr << "read " << READ_SIGNAL(const T&, get_pointer())
-     << " on signal " << name () << "\n";
-#endif
-  return READ_SIGNAL(const T, get_pointer());
-}
-  
-template <typename T> inline 
-sc_in<T>::operator const T& () const
-{ return sc_in<T>::read (); }
-
-template <typename T> inline 
-bool sc_in<T>::operator == (const T& v) {
-  return sc_in<T>::read() == v;
-}
-
-// ----------------------------------------------------------------------------
-//  CLASS : sc_inout<T>
-//
-// ----------------------------------------------------------------------------
-
-template <typename T>
-class sc_inout : public sc_port_base
-{
-  ///////////
-  // Internal
-protected:
-  void init ();
-  T val;
-private:
-  typedef T                                   data_type;
-
-  typedef sc_inout<data_type>                 this_type;
-  typedef sc_signal<data_type>                signal_type;
-
-  /*
-  public: virtual size_t data_size () const
-  { return sizeof (data_type); }
-  */
-  ///////////
-public:
-  // contructeurs
-  sc_inout(): base_type() { init (); };
-
-  explicit sc_inout(const char* name_): base_type(name_) { init (); };
-
-  /*
-  // LRM error !
-  //static const char *const kind_string; this is a template !
-  */
-  //virtual const char *kind () const 
-  //{ return "sc_inout"; };
- 
-  // read the current value
-  inline const T& read() const INLINE;
-  // write the new value
-  inline void write( const T& ) INLINE;
-  template <int W> inline void write( const sc_uint<W>& v) 
-  { sc_inout<T>::write (v.read()); }
-
-  inline operator const T& () const INLINE;
-
-  inline sc_inout<T>& operator = ( const T& a ) INLINE;
-  
-  inline sc_inout<T>& operator = ( const sc_signal<T>& a ) INLINE;
-
-//  inline sc_inout<T>& operator = ( const sc_port_base& a ) INLINE;
-
-  // operateur ==
-  inline bool operator == (const bool& v) INLINE;
-
-  // bind to in interface
-  void operator () (sc_signal<data_type> &s)
-  { bind (*this); bind (*this,s); }
-  
-  void operator () (this_type &parent_) 
-  { bind (*this,parent_); }
-
-  /*virtual */~sc_inout() {};
-};
-
-template <typename T>
-void
-sc_inout<T>::init ()
-{
-  set_pointer ((tab_t*)(void*)&val);
-  sc_object::set_kind    (sc_inout_string);
-  sc_interface::init (sizeof (data_type)); 
-  /*ref*/ val = (0);
-  //sc_inout::write (0);
+
+template < typename T >
+void sc_inout< T >::init() {
+    set_pointer((tab_t *) (void *) &val);
+    sc_object::set_kind(sc_inout_string);
+    sc_interface::init(sizeof(data_type)); 
+    /*ref*/ val = (0);
+    //sc_inout::write (0);
     /* Fix : 
      * FSM checker generates an error at runtime 
@@ -277,58 +276,64 @@
 }
 
+
 // read
-template <typename T>
-inline 
-const T& 
-sc_inout<T>::read() const
-{ 
+template < typename T >
+inline const T & sc_inout< T >::read() const {
 #ifdef DUMP_READ
-  std::cerr << "read " << READ_SIGNAL(const T, get_pointer()) // val
-     << " on signal " << name () << "\n";
-#endif
-//  return val; 
-  return READ_SIGNAL(const T, get_pointer());
-}
+    std::cerr << "read " << READ_SIGNAL(const T, get_pointer()) // val
+        << " on signal " << name () << "\n";
+#endif
+    //  return val; 
+    return READ_SIGNAL(const T, get_pointer());
+}
+
 
 // write the new value
-template <typename T>
-inline
-void
-sc_inout<T>::write( const T& value_ )
-{
+template < typename T >
+inline void sc_inout< T >::write(const T & value_) {
 #ifdef DUMP_WRITE
-  std::cerr << "write " << value_ 
-            << " on in/out port (writing into a signal) '" << name () << "'\n";
-#endif
-//  T& ref = *(T*)(get_pointer());
+    std::cerr << "write " << value_ << " on in/out port (writing into a signal) '" << name() << "'\n";
+#endif
+    //  T& ref = *(T*)(get_pointer());
 #ifndef USE_PORT_DEPENDENCY
-  unstable |= (value_) != val; //ref;
-#endif
-  /*ref*/ val = (value_);
-}
-
-template <typename T>
-inline 
-sc_inout<T>::operator const T& () const
-{ return sc_inout<T>::read(); }
-
-template <typename T>
-inline sc_inout<T>& sc_inout<T>::operator = ( const T& a )
-{ sc_inout<T>::write( a ); return *this; }
-
-template <typename T>
-inline 
-sc_inout<T>& sc_inout<T>::operator = ( const sc_signal<T>& a )
-{ sc_inout<T>::write( a.read() ); return *this; }
+    unstable |= (value_) != val; //ref;
+#endif
+    /*ref*/ val = (value_);
+}
+
+
+template < typename T >
+inline sc_inout< T >::operator const T & () const {
+    return sc_inout< T >::read();
+}
+
+
+template < typename T >
+inline sc_inout< T > & sc_inout< T >::operator = (const T & a) {
+    sc_inout< T >::write(a);
+    return *this;
+}
+
+
+template < typename T >
+inline sc_inout< T > & sc_inout< T >::operator = (const sc_signal< T > & a) {
+    sc_inout< T >::write(a.read());
+    return *this;
+}
+
+
 /*
-template <typename T>
-inline 
-sc_inout<T>& sc_inout<T>::operator = ( const sc_port_base& a )
-{ write( a.read() ); return *this; }
-*/
-template <typename T>
-inline 
-bool sc_inout<T>::operator == (const bool& v) 
-{ return sc_inout<T>::read() == v; }
+   template <typename T>
+   inline 
+   sc_inout<T>& sc_inout<T>::operator = ( const sc_port_base& a )
+   { write( a.read() ); return *this; }
+   */
+
+
+template < typename T > inline 
+bool sc_inout< T >::operator == (const bool & v) {
+    return sc_inout< T >::read() == v;
+}
+
 
 // ----------------------------------------------------------------------------
@@ -340,72 +345,78 @@
 // For debugging reasons, a class is provided instead of a define."
 
-template <typename T>
-class sc_out : public sc_inout<T>
-{
-  ///////////
-  // Internal
-  void init ();
-  ///////////
-public:
-  // typedefs 
-  typedef T data_type;
-  typedef sc_inout<T> base_type;
-  typedef sc_out<data_type>      this_type;
-  typedef sc_signal<data_type>   signal_type;
-public:
-  // constructors & destructor 
-  sc_out(): base_type() { init (); };
-  explicit sc_out(const char* name_): base_type(name_) { init (); };
-  sc_out (this_type & parent_);
-  sc_out (const char *name_, this_type & parent_);
-
-  /*
-  // LRM error !
-  //static const char *const kind_string; this is a template !
-  */
-  //virtual const char *kind () const 
-  //{ return "sc_out"; };
- 
-
-  inline this_type& operator = ( const data_type& a ) INLINE;
-  inline bool operator == (const bool& v) INLINE;
-
-  // bind to in interface
-  void operator () (sc_signal<data_type> &s)
-  { bind (*this,s); }
+template < typename T >
+class sc_out : public sc_inout< T > {
+
+    ///////////
+    // Internal
+    void init();
+    ///////////
   
-  void operator () (this_type &parent_) 
-  { bind (*this,parent_); }
-
-  //////////////////////
-  // Systemcass specific
-  void operator () (sc_port_base &o)
-  { set_port_dependency (&o, (sc_port_base&)(*this)); }
-/*
-  void operator () () // n'a pas de sens...
-  { set_port_dependency (NULL, (sc_port_base&)(*this)); }
-*/
-  //////////////////////
-
-
-  /*virtual */~ sc_out () {};
-
-private:
-  // disabled 
-  sc_out (const this_type &);
+    public:
+    typedef T data_type;
+    typedef sc_inout< T > base_type;
+    typedef sc_out<data_type> this_type;
+    typedef sc_signal<data_type> signal_type;
+
+
+    // constructors & destructor 
+    sc_out() : base_type() {
+        init();
+    }
+
+    explicit sc_out(const char * name_) : base_type(name_) {
+        init();
+    }
+
+    sc_out(this_type & parent_);
+    sc_out(const char * name_, this_type & parent_);
+
+    /*
+    // LRM error !
+    //static const char *const kind_string; this is a template !
+    */
+    //virtual const char *kind () const 
+    //{ return "sc_out"; };
+
+
+    inline this_type & operator = (const data_type & a) INLINE;
+    inline bool operator == (const bool & v) INLINE;
+
+    // bind to in interface
+    void operator () (sc_signal<data_type> & s) {
+        bind(*this, s);
+    }
+
+    void operator () (this_type & parent_) {
+        bind(*this, parent_);
+    }
+
+    //////////////////////
+    // Systemcass specific
+    void operator () (sc_port_base & o) {
+        set_port_dependency(&o, (sc_port_base &) (*this));
+    }
+    //////////////////////
+
+
+    /*virtual */~sc_out() {};
+
+    private:
+    // disabled 
+    sc_out(const this_type &);
+
 };
 
-//
-template<typename T>
-void
-sc_out<T>::init ()
-{
-  sc_inout<T>::init ();
-//  tab_t *t = &(sc_inout<T>::val);
-//  sc_interface::set_pointer (t);
-  sc_object::set_kind (sc_out_string);
-//  sc_interface::init (sizeof (data_type)); 
-//  /*ref*/ sc_inout<T>::val = 0;
-  //sc_inout<T>::write (0); 
+
+
+template< typename T >
+void sc_out< T >::init() {
+    sc_inout< T >::init();
+    //  tab_t *t = &(sc_inout<T>::val);
+    //  sc_interface::set_pointer (t);
+    sc_object::set_kind(sc_out_string);
+    //  sc_interface::init (sizeof (data_type)); 
+    //  /*ref*/ sc_inout<T>::val = 0;
+    //sc_inout<T>::write (0); 
     /* Fix : 
      * FSM checker generates an error at runtime 
@@ -413,27 +424,37 @@
 }
 
-template<typename T> inline 
-sc_out<T>& 
-sc_out<T>::operator = ( const data_type& a )
-{ sc_out<T>::write( a ); return *this; }
-
-template<typename T> inline 
-bool 
-sc_out<T>::operator == (const bool& v) 
-{ return sc_out<T>::read() == v; }
+
+template< typename T >
+inline sc_out< T > & sc_out< T >::operator = (const data_type & a) {
+    sc_out< T >::write(a);
+    return *this;
+}
+
+
+template< typename T >
+inline bool sc_out< T >::operator == (const bool & v) {
+    return sc_out< T >::read() == v;
+}
+
 
 // Dumps
-template<typename T> inline 
-std::ostream& operator<<( std::ostream& os, const sc_in<T> &r) 
-{ return os << r.read (); }
+template< typename T >
+inline std::ostream & operator << ( std::ostream & os, const sc_in< T > & r) {
+    return os << r.read();
+}
+
 
 // Add '&'
-template<class T> inline 
-std::ostream& operator<<( std::ostream& os, const sc_inout<T> &r) 
-{ return os << r.read (); }
-
-template<class T> inline 
-std::ostream& operator<<( std::ostream& os, const sc_signal<T> &r)
-{ return os << r.read (); }
+template< class T >
+inline std::ostream & operator << ( std::ostream & os, const sc_inout< T > & r) {
+    return os << r.read();
+}
+
+
+template< class T >
+inline std::ostream & operator << ( std::ostream & os, const sc_signal< T > & r) {
+    return os << r.read();
+}
+
 
 // Declarations
@@ -449,2 +470,14 @@
 
 #endif /* __SC_PORT_EXT_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_sensitive.cc
===================================================================
--- /sources/src/sc_sensitive.cc	(revision 51)
+++ /sources/src/sc_sensitive.cc	(revision 52)
@@ -41,4 +41,5 @@
 #include "sc_module.h"
 #include "internal.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -48,21 +49,24 @@
 
 namespace sc_core {
-  void assert_before_init ()
-  {
-    if (sc_core::already_initialized == true)
-      exit (14);
-  }
-  static
-	void add_sensitivity (const sc_event &s)
-  {
-		if (method == NULL) {
-			cerr << "declare a process before declaring " << s << " event\n";
-			exit (1);
-		}
-    method->sensitivity_list.push_back(s);
-  }
+
+
+void assert_before_init() {
+    if (sc_core::already_initialized) {
+        exit(14);
+    }
 }
 
-//
+
+static void add_sensitivity(const sc_event & s) {
+    if (method == NULL) {
+        cerr << "declare a process before declaring " << s << " event\n";
+        exit(1);
+    }
+    method->sensitivity_list.push_back(s);
+}
+
+}
+
+
 using namespace sc_core;
 
@@ -73,46 +77,46 @@
 // ----------------------------------------------------------------------------
 
-sc_sensitive& sc_sensitive::operator << (const sc_port_base& port)
-{
-  sc_event s (port,sc_event::VAL);
-  sc_core::add_sensitivity (s);
-  return *this;
+sc_sensitive & sc_sensitive::operator << (const sc_port_base & port) {
+    sc_event s(port, sc_event::VAL);
+    sc_core::add_sensitivity(s);
+    return *this;
 }
 
-sc_sensitive& sc_sensitive::operator () (const sc_port_base& port)
-{
-  return *this << port;
+
+sc_sensitive & sc_sensitive::operator () (const sc_port_base & port) {
+    return *this << port;
 }
 
-sc_sensitive& sc_sensitive::operator << (const sc_event &e)
-{
-  sc_core::add_sensitivity (e);
-  return *this;
+
+sc_sensitive & sc_sensitive::operator << (const sc_event & e) {
+    sc_core::add_sensitivity(e);
+    return *this;
 }
 
-sc_sensitive& sc_sensitive::operator () (const sc_event& e)
-{
-  return *this << e;
+
+sc_sensitive & sc_sensitive::operator () (const sc_event & e) {
+    return *this << e;
 }
 
-sc_sensitive& sc_sensitive::operator << (sc_event_finder& e)
-{
-  return *this << e.port ();
+
+sc_sensitive & sc_sensitive::operator << (sc_event_finder & e) {
+    return *this << e.port();
 }
 
-sc_sensitive& sc_sensitive::operator () (sc_event_finder& e)
-{
-  return *this << e;
+
+sc_sensitive & sc_sensitive::operator () (sc_event_finder & e) {
+    return *this << e;
 }
 
-sc_sensitive& sc_sensitive::operator << (const sc_interface &e)
-{
-  return *this << e.default_event ();
+
+sc_sensitive & sc_sensitive::operator << (const sc_interface & e) {
+    return *this << e.default_event();
 }
 
-sc_sensitive& sc_sensitive::operator () (const sc_interface &e)
-{
-  return *this << e;
+
+sc_sensitive & sc_sensitive::operator () (const sc_interface & e) {
+    return *this << e;
 }
+
 
 
@@ -124,29 +128,17 @@
 // ----------------------------------------------------------------------------
 
-sc_sensitive_pos& sc_sensitive_pos::operator << (const sc_port_base& port)
-{
-  sc_event s (port,sc_event::POS);
-  sc_core::add_sensitivity (s);
-  return *this;
+
+sc_sensitive_pos & sc_sensitive_pos::operator << (const sc_port_base & port) {
+    sc_event s(port, sc_event::POS);
+    sc_core::add_sensitivity(s);
+    return *this;
 }
 
-sc_sensitive_pos& sc_sensitive_pos::operator () (const sc_port_base& port)
-{
-  return *this << port;
+
+sc_sensitive_pos& sc_sensitive_pos::operator () (const sc_port_base & port) {
+    return *this << port;
 }
 
-/*
-sc_sensitive_pos& sc_sensitive_pos::operator << (const sc_interface &e)
-{
-	sc_event s (e, sc_event::POS);
-  sc_core::add_sensitivity (s);
-  return *this;
-};
 
-sc_sensitive_pos& sc_sensitive_pos::operator () (const sc_interface &e)
-{
-  return *this << e;
-};
-*/
 
 // ----------------------------------------------------------------------------
@@ -156,16 +148,26 @@
 // ----------------------------------------------------------------------------
 
-sc_sensitive_neg& sc_sensitive_neg::operator << (const sc_port_base& port)
-{
-  sc_event s (port,sc_event::NEG);
-  sc_core::add_sensitivity (s);
-  return *this;
+sc_sensitive_neg & sc_sensitive_neg::operator << (const sc_port_base & port) {
+    sc_event s(port, sc_event::NEG);
+    sc_core::add_sensitivity(s);
+    return *this;
 }
 
-sc_sensitive_neg& sc_sensitive_neg::operator () (const sc_port_base& port)
-{
-  return *this << port;
+
+sc_sensitive_neg & sc_sensitive_neg::operator () (const sc_port_base & port) {
+    return *this << port;
 }
 
 
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_sensitive.h
===================================================================
--- /sources/src/sc_sensitive.h	(revision 51)
+++ /sources/src/sc_sensitive.h	(revision 52)
@@ -10,8 +10,10 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_SENSITIVE_H__
 #define __SC_SENSITIVE_H__
 
 #include <list>
+
 #include "sc_fwd.h"
 //#include "sc_event.h"
@@ -21,24 +23,4 @@
 namespace sc_core {
 
-// ----------------------------------------------------------------------------
-//  CLASS : sensitivity_t
-//
-//  Static events.
-// ----------------------------------------------------------------------------
-
-  /*
-struct sensitivity_t {
-  sc_port_base *port;
-  typedef enum { POS, NEG, VAL } flag_t;
-public:
-  flag_t flag;
-  bool pos () const ;
-  sensitivity_t (sc_port_base &port_, flag_t flag_);
-  friend std::ostream& operator << (std::ostream &, const sensitivity_t &);
-private:
-  // disabled
-  sensitivity_t ();
-};
-*/
 
 // ----------------------------------------------------------------------------
@@ -48,24 +30,27 @@
 // ----------------------------------------------------------------------------
 
-class sc_sensitive // from SystemC v201 LRM
-{
-public:
-  // constructor, destructor 
-  explicit sc_sensitive (sc_module *) {};
-  ~sc_sensitive () {};
-public:
-  //  specify static sensitivity for processes 
-  sc_sensitive & operator () (const sc_event &);
-  sc_sensitive & operator () (const sc_interface &);
-  sc_sensitive & operator () (const sc_port_base &);
-  sc_sensitive & operator () (sc_event_finder &);
-  sc_sensitive & operator << (const sc_event &);
-  sc_sensitive & operator << (const sc_interface &);
-  sc_sensitive & operator << (const sc_port_base &);
-  sc_sensitive & operator << (sc_event_finder &);
-private:
-  // disabled 
-  sc_sensitive ();
-  sc_sensitive (const sc_sensitive &);
+class sc_sensitive {
+    // from SystemC v201 LRM
+
+    public:
+    // constructor, destructor 
+    explicit sc_sensitive (sc_module *) {};
+    ~sc_sensitive() {};
+
+    public:
+    //  specify static sensitivity for processes 
+    sc_sensitive & operator () (const sc_event &);
+    sc_sensitive & operator () (const sc_interface &);
+    sc_sensitive & operator () (const sc_port_base &);
+    sc_sensitive & operator () (sc_event_finder &);
+    sc_sensitive & operator << (const sc_event &);
+    sc_sensitive & operator << (const sc_interface &);
+    sc_sensitive & operator << (const sc_port_base &);
+    sc_sensitive & operator << (sc_event_finder &);
+    
+    private:
+    // disabled 
+    sc_sensitive ();
+    sc_sensitive (const sc_sensitive &);
     sc_sensitive & operator = (const sc_sensitive &);
 };
@@ -77,12 +62,11 @@
 // ----------------------------------------------------------------------------
 
-class sc_sensitive_pos /* deprecated */
-{
-public:
-  
-  sc_sensitive_pos& operator << (const sc_port_base&);
-  sc_sensitive_pos& operator () (const sc_port_base&);
-  sc_sensitive_pos& operator << (const sc_interface &);
-  sc_sensitive_pos& operator () (const sc_interface &);
+class sc_sensitive_pos { /* deprecated */
+
+    public:
+    sc_sensitive_pos & operator << (const sc_port_base &);
+    sc_sensitive_pos & operator () (const sc_port_base &);
+    sc_sensitive_pos & operator << (const sc_interface &);
+    sc_sensitive_pos & operator () (const sc_interface &);
 };
 
@@ -93,15 +77,27 @@
 // ----------------------------------------------------------------------------
 
-class sc_sensitive_neg /* deprecated */
-{
-public:
-  
-  sc_sensitive_neg& operator << (const sc_port_base&);
-  sc_sensitive_neg& operator () (const sc_port_base&);
-  sc_sensitive_neg& operator << (const sc_interface &);
-  sc_sensitive_neg& operator () (const sc_interface &);
+class sc_sensitive_neg { /* deprecated */
+
+    public:
+    sc_sensitive_neg & operator << (const sc_port_base &);
+    sc_sensitive_neg & operator () (const sc_port_base &);
+    sc_sensitive_neg & operator << (const sc_interface &);
+    sc_sensitive_neg & operator () (const sc_interface &);
 };
+
 
 } // end of namespace sc_core
 
 #endif /* __SC_SENSITIVE_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_signal.h
===================================================================
--- /sources/src/sc_signal.h	(revision 51)
+++ /sources/src/sc_signal.h	(revision 52)
@@ -11,4 +11,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_SIGNAL_H__
 #define __SC_SIGNAL_H__
@@ -17,8 +18,7 @@
 #include <iostream>
 #include <cstdlib>
+
 #include "sc_fwd.h"
 #include "sc_nbdefs.h"
-//#include "sc_event_finder.h"
-//#include "sc_event.h"
 #include "sc_time.h" // SC_ZERO_TIME
 #include "sc_object.h"
@@ -30,36 +30,44 @@
 //
 #if ((__GNUC__ < 3) || (__GNUC_MINOR__ < 4))
-#define INLINE __attribute__((always_inline))
+    #define INLINE __attribute__((always_inline))
 #else
-/* gcc3.4 doesn't support */ 
-#define INLINE
-#endif
+    /* gcc3.4 doesn't support */ 
+    #define INLINE
+#endif
+
 
 #define READ_SIGNAL(value_type_,pointer_) \
-	((value_type_&) (*((value_type_*) (pointer_))))
-
-	///////////////////// DEPRECATED
+    ((value_type_ &) (*((value_type_ *) (pointer_))))
+
+///////////////////// DEPRECATED
 // C ANSI-only since it is needed to link with extern "C"
 
-extern void bind (sc_port_base&,sc_port_base&);
-extern void bind (sc_port_base&,sc_signal_base&);
-extern void bind (sc_signal_base &x);
-extern void bind (sc_port_base   &x);
+extern void bind(sc_port_base &, sc_port_base &);
+extern void bind(sc_port_base &, sc_signal_base &);
+extern void bind(sc_signal_base & x);
+extern void bind(sc_port_base & x);
+
 typedef tab_t base_type;
+
 struct pending_write_t {
-	base_type   *pointer;
-	base_type    value;
-	//pending_write_t (base_type *const pointer_, const base_type value_)
-	//{	pointer = pointer_; value = value_; }
-	friend std::ostream& operator << (std::ostream &o, const pending_write_t &p)
-	{ return o << "(pointer = " << p.pointer << "; value = " << p.value << ")\n"; }
+    base_type * pointer;
+    base_type value;
+    //pending_write_t(base_type * const pointer_, const base_type value_) {
+    //    pointer = pointer_;
+    //    value = value_;
+    //}
+    
+    friend std::ostream & operator << (std::ostream & o, const pending_write_t & p) {
+        return o << "(pointer = " << p.pointer << "; value = " << p.value << ")\n";
+    }
 };
 
+
 // Check pending_writing to register
-extern void pending_writing2register_clear  ();
-extern void pending_writing2register_record_and_check (const tab_t *);
+extern void pending_writing2register_clear();
+extern void pending_writing2register_record_and_check(const tab_t *);
 
 // Pending write to register (simple stack)
-typedef pending_write_t *pending_write_vector_t;
+typedef pending_write_t * pending_write_vector_t;
 extern pending_write_vector_t pending_write_vector;
 extern "C" unsigned int pending_write_vector_nb;
@@ -67,64 +75,57 @@
 
 
-template <typename T>
-inline void post_write (base_type *const pointer_,
-                        const T          value_) /*INLINE*/;
-template <typename T>
-inline void post_multiwrite (base_type *const pointer_,
-                             const T          value_)
-{
-	size_t size = (sizeof (T)-1) / sizeof (base_type);
-	size_t i = 0;
-	const base_type *pvalue = (const base_type*)(void*)(&value_);
-	do {
+template < typename T >
+inline void post_write(base_type * const pointer_, const T value_) /*INLINE*/;
+
+template < typename T >
+inline void post_multiwrite(base_type * const pointer_, const T value_) {
+    size_t size = (sizeof(T) - 1) / sizeof(base_type);
+    size_t i = 0;
+    const base_type * pvalue = (const base_type *) (void *) (& value_);
+    do {
+        post_write(pointer_ + i, pvalue[i]);
+    } while (i++ < size);
+}
+
+template < typename T >
+inline void post_write(base_type * const pointer_, const T value_) {
+    if (sizeof(T) > sizeof(base_type)) {
+        post_multiwrite(pointer_,value_);
+    }
+    else {
+#if defined(CONFIG_DEBUG)
+        if (pending_write_vector_nb >= pending_write_vector_capacity) {
+            std::cerr << "Error : The array for posted writing on register is too small.\n";
+            std::cerr << "Up to 1 writing per register is allowed during a cycle.\n";
+            std::cerr << "Please check the hardware description.\n";
+            exit(-1);
+        }
+#endif
+        pending_write_vector[pending_write_vector_nb].pointer = pointer_;
+        // pending_write_vector[pending_write_vector_nb++].value = *(reinterpret_cast<const base_type*const>(&value_)); => bug !
+        pending_write_vector[pending_write_vector_nb++].value = value_; // => bug avec blues !
+
+        // -> fix to use user-defined struct in sc_signal/sc_in/sc_out/sc_inout
+        // pending_write_vector[pending_write_vector_nb++].value = *((base_type*)&value_); => bug !
 #if 0
-    cout << "post_multiwrite 0x" << hex << pvalue[i] << " @" << (pointer_ + i) << "\n";
-#endif
-		post_write (pointer_ + i, pvalue[i]);
-	} while (i++ < size);
-}
-template <typename T>
-inline void post_write (base_type *const pointer_, 
-                        const T          value_)
-{
-  if (sizeof (T) > sizeof (base_type)) {
-#if 0
-    std::cout << "sizeof (T) = " << sizeof (T) 
-            << " (base_type = " << sizeof (base_type) << "\n";
-#endif
-    post_multiwrite (pointer_,value_);
-  } else {
-#if defined(CONFIG_DEBUG)
-    if (pending_write_vector_nb >= pending_write_vector_capacity) {
-      //if (pending_write_vector_nb >= pending_write_vector_capacity * sizeof(pending_write_t)) {
-      std::cerr << "Error : The array for posted writing on register is too small.\n";
-      std::cerr << "Up to 1 writing per register is allowed during a cycle.\n";
-      std::cerr << "Please check the hardware description.\n";
-      exit (-1);
-    }
-#endif // CONFIG_DEBUG
-    pending_write_vector[pending_write_vector_nb].pointer = pointer_;
-//	pending_write_vector[pending_write_vector_nb++].value = *(reinterpret_cast<const base_type*const>(&value_)); => bug !
-    pending_write_vector[pending_write_vector_nb++].value = value_; // => bug avec blues !
-
-	// -> fix to use user-defined struct in sc_signal/sc_in/sc_out/sc_inout
-	// pending_write_vector[pending_write_vector_nb++].value = *((base_type*)&value_); => bug !
-#if 0
-	std::cerr << "posted write : ptr = " << pointer_ << ", val = " << value_ << "\n";
+        std::cerr << "posted write : ptr = " << pointer_ << ", val = " << value_ << "\n";
 #endif
 #if 0 
-	// introduce bug on using trace functions
-	if (value_ == READ_SIGNAL(T,pointer_))
-		return;
-#endif
-  };
-}
-
-inline bool is_posted_write ()
-{
-  return pending_write_vector_nb > 0;
-}
-
-extern "C" void update (void);
+        // introduce bug on using trace functions
+        if (value_ == READ_SIGNAL(T,pointer_)) {
+            return;
+        }
+#endif
+    }
+}
+
+
+inline bool is_posted_write() {
+    return pending_write_vector_nb > 0;
+}
+
+
+extern "C" void update(void);
+
 
 // ----------------------------------------------------------------------------
@@ -134,145 +135,155 @@
 // ----------------------------------------------------------------------------
 
-class sc_signal_base : public sc_object, public sc_interface
-{
-  //////
-  // Internal
-  friend class sc_clock;
-  friend class sc_port_base;
-  void init ();
-  //////				 
-  
-
-public: 
-  // LRM (?)
-  //virtual const sc_event /*&*/ default_event () const;
-  static const char* const kind_string;
-  //virtual const char *kind () const;
-
-  //
-public:
-  sc_signal_base();
-  sc_signal_base(const char* name_);
-  sc_signal_base(const char* name_, void*);
-  ~sc_signal_base();
+class sc_signal_base : public sc_object, public sc_interface {
+
+    //////
+    // Internal
+    friend class sc_clock;
+    friend class sc_port_base;
+    void init();
+    ////// 
+
+
+    public: 
+    // LRM (?)
+    //virtual const sc_event /*&*/ default_event() const;
+    static const char * const kind_string;
+    //virtual const char * kind() const;
+
+    
+
+    public:
+    sc_signal_base();
+    sc_signal_base(const char * name_);
+    sc_signal_base(const char * name_, void *);
+    ~sc_signal_base();
+
 };
 
-template <typename T>
-class sc_signal : public sc_signal_base
-{
-private:
-  T val;
-  typedef T                data_type;
-  typedef sc_signal < T >  this_type;
-
-  ///////////
-  // Internal
-public: void init ();
-  ///////////
-
-  //  virtual void update ();
-  void check_writer ();
-public:
-  // constructors, destructor 
-  sc_signal () 
-  { init (); }
-  explicit sc_signal (const char *name_): sc_signal_base(name_)
-  { init (); }
-  /*virtual */~ sc_signal () 
-  {}
-  // methods 
-  /*
-  virtual void register_port (sc_port_base &, const char *)
-  {}
-  virtual const sc_event & default_event () const 
-  {}
-  virtual const sc_event & value_changed_event () const 
-  {}
-  */
-  /*virtual*/ inline const data_type & read () const INLINE;
+
+template < typename T >
+class sc_signal : public sc_signal_base {
+
+    private:
+    T val;
+    typedef T data_type;
+    typedef sc_signal < T > this_type;
+
+
+    ///////////
+    // Internal
+    public:
+    void init();
+    ///////////
+
+    void check_writer();
+
+    public:
+    // constructors, destructor 
+    sc_signal() {
+        init();
+    }
+
+    explicit sc_signal(const char * name_) : sc_signal_base(name_) {
+        init();
+    }
+
+    /*virtual*/ ~sc_signal() {}
+    /*virtual*/ inline const data_type & read() const INLINE;
+    /*virtual*/ inline void write(const data_type &) /*INLINE*/;
+
+    inline operator const data_type & () const { return this->read(); }
+
+    inline this_type & operator = (const data_type & a) {
+        sc_signal< T >::write(a);
+        return *this;
+    }
+
+    inline this_type & operator = (const sc_signal < T > & a) {
+        sc_signal< T >::write(a.read());
+        return *this;
+    }
+
+    inline this_type & operator += (const data_type & a) {
+        sc_signal< T >::write(read() + a);
+        return *this;
+    }
+
+    inline this_type & operator += (const sc_signal < T > & a) {
+        sc_signal< T >::write(read() + a.read());
+        return *this;
+    }
+
+    const data_type & get_new_value() const;
+
+    //  void trace (sc_trace_file * tf) const;
+    /*
+    virtual void print(std::ostream & o) const { o << *this; }
+    virtual void dump(std::ostream & o) const { o << *this; }
+    */
+
+    private:
+    // disabled 
+    sc_signal(const sc_signal < T > &);
+
+};
+
+
+template < typename T >
+void sc_signal< T >::init() {
+    set_pointer((tab_t *) (void *) &val);
+    set_kind(kind_string);
+    sc_interface::init(sizeof(data_type)); 
+    val = 0; /* The simulator initializes the signal/register to 0.    */
+    /* However, hardware initialization still has to be done. */
+    /* This kind of initialization is for trace diffing.      */
+}
+
+
+// read the value
+template < typename T >
+/*virtual*/ inline const T & sc_signal< T >::read() const {
+#ifdef DUMP_READ
+    std::cerr << "read " << READ_SIGNAL(const T, get_pointer()) << " on signal " << name() << "\n";
+#endif
+    return READ_SIGNAL(const T, get_pointer());
+}
+
+
+// write the new value
+template < typename T >
+inline void sc_signal< T >::write(const data_type & value_) {
+#ifdef CONFIG_DEBUG
+    if (get_pointer() == NULL) {
+        std::cerr << "Error : Unable to write into '" << name() << "'.";
+        exit(24032005);
+    }
+#endif
+#ifdef DUMP_WRITE
+    if (sc_signal< T >::read() == value_) {
+        return;
+    }
+    std::cerr << "write (posted) " << value_ << " on sc_signal (writing into register) '" << name() << "'\n";
+#endif
+    post_write(/*(tab_t*)&val*/ get_pointer(), value_);
+}
+
+#undef INLINE
+#undef READ_SIGNAL
+
+
+} // end of namespace sc_core
+
+#endif /* __SC_SIGNAL_H__ */
+
 /*
-  virtual const T & get_data_ref () const
-  {}
-  virtual bool event () const
-  {}
-  */
-  /*virtual*/ inline void write (const data_type &) /*INLINE*/;
-  inline operator const data_type & () const
-  { return this->read(); }
-  inline this_type& operator = (const data_type & a)
-  { sc_signal<T>::write (a); return *this; }
-  inline this_type& operator = (const sc_signal < T > &a)
-  { sc_signal<T>::write (a.read()); return *this; }
-  inline this_type& operator += (const data_type & a)
-  { sc_signal<T>::write (read() + a); return *this; }
-  inline this_type& operator += (const sc_signal < T > &a)
-  { sc_signal<T>::write (read()+a.read()); return *this; }
-  const data_type & get_new_value () const;
-//  void trace (sc_trace_file * tf) const;
-  /*
-	virtual void print (std::ostream &o) const
-  { o << *this; }
-  virtual void dump (std::ostream &o) const
-  { o << *this; }
-	*/
-private:
-  // disabled 
-  sc_signal (const sc_signal < T > &);
-
-};
-
-template <typename T>
-void
-sc_signal<T>::init()
-{
-	set_pointer ((tab_t*)(void*)&val);
-  set_kind    (kind_string);
-  sc_interface::init (sizeof (data_type)); 
-  val = 0; /* The simulator initializes the signal/register to 0.    */
-           /* However, hardware initialization still has to be done. */
-           /* This kind of initialization is for trace diffing.      */
-}
-// read the value
-template <typename T>
-/*virtual*/ 
-inline 
-const T & 
-sc_signal<T>::read() const
-{
-#ifdef DUMP_READ
-  std::cerr << "read " << READ_SIGNAL(const T, get_pointer())
-	 	<< " on signal " << name () << "\n";
-#endif
-    return READ_SIGNAL(const T, get_pointer());
-}
-
-// write the new value
-template <typename T>
-inline
-void
-sc_signal<T>::write( const data_type& value_ )
-{
-#ifdef CONFIG_DEBUG
-  if (get_pointer() == NULL)
-  {
-    std::cerr << "Error : Unable to write into '" << name () << "'.";
-    exit (24032005);
-  }
-#endif
-#ifdef DUMP_WRITE
-  if (sc_signal<T>::read() == value_)
-    return;
-  std::cerr << "write (posted) " << value_ 
-		<< " on sc_signal (writing into register) '" << name () << "'\n";
-#endif
-  post_write (/*(tab_t*)&val*/ get_pointer(), value_);
-}
-
-#undef INLINE
-
-#undef READ_SIGNAL
-
-} // end of namespace sc_core
-
-#endif /* __SC_SIGNAL_H__ */
-
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_signed.h
===================================================================
--- /sources/src/sc_signed.h	(revision 51)
+++ /sources/src/sc_signed.h	(revision 52)
@@ -10,4 +10,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_SIGNED_H__
 #define __SC_SIGNED_H__
@@ -23,2 +24,14 @@
 
 #endif /* __SC_SIGNED_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_string.h
===================================================================
--- /sources/src/sc_string.h	(revision 51)
+++ /sources/src/sc_string.h	(revision 52)
@@ -10,4 +10,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_STRING_H__
 #define __SC_STRING_H__
@@ -19,2 +20,13 @@
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_time.cc
===================================================================
--- /sources/src/sc_time.cc	(revision 51)
+++ /sources/src/sc_time.cc	(revision 52)
@@ -35,17 +35,20 @@
 
 
-#include "sc_time.h"
 #include <ctime>
 #include <sys/time.h>
 #include <string>
 #include <sstream>
+
+#include "sc_time.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+
 namespace sc_core {
 
-static const char *const unit_repr_string[6] = 
-{
+
+static const char *const unit_repr_string[6] = {
 	"FS", "PS", "NS", "US", "MS", "SEC"
 };
@@ -53,36 +56,44 @@
 uint64_t nb_cycles = 0;
 
-const sc_time SC_ZERO_TIME(0,SC_NS);
-sc_time SC_CURRENT_TIME(0,SC_NS);
+const sc_time SC_ZERO_TIME(0, SC_NS);
+sc_time SC_CURRENT_TIME(0, SC_NS);
 
-sc_time::sc_time (const sc_time &t)
-{
-	*this = t;
-}
 
-sc_time::sc_time (double val, sc_time_unit tu)
-{
-  time = (uint64_t) val;
-  unit = tu;
+sc_time::sc_time (const sc_time & t) {
+    *this = t;
 }
 
 
-sc_time&
-sc_time::operator = (const sc_time &t)
-{
-  time = t.time;
-  unit = t.unit;
-  return *this;
+sc_time::sc_time (double val, sc_time_unit tu) {
+    time = (uint64_t) val;
+    unit = tu;
 }
 
 
-const std::string 
-sc_time::to_string () const
-{
-	std::ostringstream o;
-	o << time << ' ' << unit_repr_string[unit];
-	return o.str();
+sc_time & sc_time::operator = (const sc_time & t) {
+    time = t.time;
+    unit = t.unit;
+    return *this;
 }
+
+
+const std::string sc_time::to_string() const {
+    std::ostringstream o;
+    o << time << ' ' << unit_repr_string[unit];
+    return o.str();
+}
+
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_time.h
===================================================================
--- /sources/src/sc_time.h	(revision 51)
+++ /sources/src/sc_time.h	(revision 52)
@@ -10,4 +10,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_TIME_H__
 #define __SC_TIME_H__
@@ -18,4 +19,5 @@
 namespace sc_core {
 
+
 // ----------------------------------------------------------------------------
 //  ENUM : sc_time_unit
@@ -24,6 +26,5 @@
 // ----------------------------------------------------------------------------
 
-enum sc_time_unit
-{
+enum sc_time_unit {
     SC_FS = 0,
     SC_PS,
@@ -34,5 +35,5 @@
 };
 
-//
+
 class sc_time;
 extern const sc_time SC_ZERO_TIME;
@@ -41,67 +42,114 @@
 extern uint64_t nb_cycles;
 
-inline double sc_simulation_time()   // in default time units
-{
-  return (double)nb_cycles;
+inline double sc_simulation_time() {
+    // in default time units
+    return (double) nb_cycles;
 }
 
-const sc_time& sc_time_stamp ();
 
-//
-class sc_time 
-{
-  friend const sc_time &sc_time_stamp ();
-  uint64_t time;
-  enum sc_time_unit unit;
-public:
-  sc_time (double val, sc_time_unit tu);
-  sc_time (const sc_time& = SC_ZERO_TIME);
- 
-  sc_time& operator= (const sc_time &);
- 
-  uint64_t      value     () const { return time;}
-  inline double        to_double () const;
-  inline double        to_seconds() const;
-  inline operator      double    () const { return to_double ();}
-  const std::string to_string () const;
+const sc_time & sc_time_stamp();
+
+
+
+class sc_time {
+
+    friend const sc_time & sc_time_stamp();
+    uint64_t time;
+    enum sc_time_unit unit;
+
+    public:
+    sc_time(double val, sc_time_unit tu);
+    sc_time(const sc_time & = SC_ZERO_TIME);
+
+    sc_time & operator= (const sc_time &);
+
+    uint64_t value() const {
+        return time;
+    }
+
+    inline double to_double() const;
+    inline double to_seconds() const;
+    inline operator double() const {
+        return to_double();
+    }
+
+    const std::string to_string() const;
+
 };
 
-inline const sc_time& sc_time_stamp ()   // in default time units
-{
-  SC_CURRENT_TIME.time = nb_cycles;
-  return SC_CURRENT_TIME;// = sc_time (nb_cycles, SC_NS);
+
+inline const sc_time & sc_time_stamp() {
+    // in default time units 
+    SC_CURRENT_TIME.time = nb_cycles;
+    return SC_CURRENT_TIME; // = sc_time (nb_cycles, SC_NS);
 }
 
-double
-sc_time::to_double () const
-{
-	double fact = 1;
-	switch(unit) {
-	case SC_FS: fact = 1e-6; break;
-	case SC_PS: fact = 1e-3; break;
-	case SC_NS: fact = 1; break;
-	case SC_US: fact = 1e3; break;
-	case SC_MS: fact = 1e6; break;
-	case SC_SEC: fact = 1e9; break;
-	}
-	return (double)time * fact;
+
+double sc_time::to_double() const {
+    double fact = 1;
+    switch (unit) {
+        case SC_FS:
+            fact = 1e-6;
+            break;
+        case SC_PS:
+            fact = 1e-3;
+            break;
+        case SC_NS:
+            fact = 1;
+            break;
+        case SC_US:
+            fact = 1e3;
+            break;
+        case SC_MS:
+            fact = 1e6;
+            break;
+        case SC_SEC:
+            fact = 1e9;
+            break;
+    }
+    return (double) time * fact;
 }
 
-double
-sc_time::to_seconds() const
-{
-	double fact = 1;
-	switch(unit) {
-	case SC_FS: fact = 1e-15; break;
-	case SC_PS: fact = 1e-12; break;
-	case SC_NS: fact = 1e-9; break;
-	case SC_US: fact = 1e-6; break;
-	case SC_MS: fact = 1e-3; break;
-	case SC_SEC: fact = 1; break;
-	}
-	return (double)time * fact;
+
+double sc_time::to_seconds() const {
+    double fact = 1;
+    switch (unit) {
+        case SC_FS:
+            fact = 1e-15;
+            break;
+        case SC_PS:
+            fact = 1e-12;
+            break;
+        case SC_NS:
+            fact = 1e-9;
+            break;
+        case SC_US:
+            fact = 1e-6;
+            break;
+        case SC_MS:
+            fact = 1e-3;
+            break;
+        case SC_SEC:
+            fact = 1;
+            break;
+    }
+    return (double) time * fact;
 }
+
 
 } // end of namespace sc_core
 
+
 #endif /* __SC_TIME_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_trace.cc
===================================================================
--- /sources/src/sc_trace.cc	(revision 51)
+++ /sources/src/sc_trace.cc	(revision 52)
@@ -35,4 +35,10 @@
  */
 
+#include <cassert>
+#include <list>
+#include <cstdio>
+#include <iostream>
+#include <cstring> //strlen
+
 #include "sc_port.h"
 #include "sc_clock.h"
@@ -42,14 +48,9 @@
 #include "hex2string.h"
 
-#include <cassert>
-#include <list>
-#include <cstdio>
-#include <iostream>
-#include <cstring> //strlen
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+
 //-----------------------------------------
 
@@ -63,5 +64,4 @@
 }
 
-//#include "malloc.h" // NO LONGER SUPPORTED
 #include <cstdlib>
 #include <cstdio>
@@ -70,650 +70,532 @@
 //-----------------------------------------
 
+
 namespace sc_core {
 
 vector<sc_trace_file *>  trace_file_list;
-uint64                   cpt         = 0;
-uint64                   trace_start = 0;
-	
-//-----------------------------------------
-#if 0
-static ostream& operator << (ostream &, const signal2trace &);
-#endif
-
-//-----------------------------------------
-
-/*
-typedef list<signal2trace> signal2trace_list;
-
-template <typename T>
-static
-void make_list_from_vector (const vector<T>& v, list<T>& l)
-{
-	l.clear ();
-	typename vector<T>::const_iterator i;
-	for (i = v.begin (); i != v.end (); ++i)
-		l.push_back (*i);
-}
-
-template <typename T>
-static
-void make_vector_from_list (const list<T>& l, vector<T>& v)
-{
-	v.clear ();	
-	typename list<T>::const_iterator i;
-	for (i = l.begin (); i != l.end (); ++i)
-		v.push_back (*i);
-}
-
-static
-int operator<(const signal2trace &e1, const signal2trace &e2) 
-{ 
-	return (e1.bit_size < e2.bit_size);
-}
-
-static void 
-init (sc_trace_file *tf)
-{
-	signal2trace_list lsig;
-	make_list_from_vector (tf->sig_list, lsig);
-	lsig.reverse(); //sort ();
-	make_vector_from_list (lsig, tf->sig_list);
-}
-*/
-
-static 
-void 
-init (sc_trace_file &tf)
-{
-  if (dump_stage)
-    cerr << "Initializing trace functions : Looking for clocks...";
-
-	vector<signal2trace>::iterator i;
-	i = (tf.sig_list).begin();
-	while (i!=(tf.sig_list).end()) {
-		if (is_clock( *(i->inter) ) ) {
-			tf.clk_list.push_back(*i);
-			i = tf.sig_list.erase(i);
-		} 
-		else ++i;
-	}
-  if (dump_stage)
-    cerr << "Done\n";
-}
-
-static 
-void
-vcd_print_cycle_number (FILE *f,long long unsigned int num)
-{
-	string cycle;
-
-	//------------------------------------------------------------------------------------
-	// affichage des cycles (#500 ou #2500 etc...)
-	fprintf(f,"\n#%llu00\n", num * 5);//cycle de simulation
-}
+uint64 cpt = 0;
+uint64 trace_start = 0;
+
+
+static void init(sc_trace_file & tf) {
+    if (dump_stage) {
+        cerr << "Initializing trace functions : Looking for clocks...";
+    }
+
+    vector<signal2trace>::iterator i;
+    i = (tf.sig_list).begin();
+    while (i != (tf.sig_list).end()) {
+        if (is_clock(*(i->inter))) {
+            tf.clk_list.push_back(*i);
+            i = tf.sig_list.erase(i);
+        } 
+        else {
+            ++i;
+        }
+    }
+    if (dump_stage) {
+        cerr << "Done\n";
+    }
+}
+
+
+static void vcd_print_cycle_number(FILE * f,long long unsigned int num) {
+    string cycle;
+
+    // affichage des cycles (#500 ou #2500 etc...)
+    fprintf(f,"\n#%llu00\n", num * 5);//cycle de simulation
+}
+
+
 
 //--------------------------------------------------------------------------------------
 // trace function
 // Called each end of cycle to dump in trace files
-
-void
-trace_all (bool part)
-{
-	if (trace_file_list.empty ())
-		return;
-	
-  if (cpt >= trace_start)
-  {
-	  vector<sc_trace_file*>::const_iterator ptf;
-  	for (ptf = trace_file_list.begin (); ptf != trace_file_list.end(); ++ptf)
-    {
-      sc_trace_file *tf = *ptf;
-      assert(tf != NULL);
-	  	trace (*tf, part);
-    }
-  }
-	
-	cpt++;
-}
+void trace_all(bool part) {
+    if (trace_file_list.empty()) {
+        return;
+    }
+
+    if (cpt >= trace_start) {
+        vector<sc_trace_file *>::const_iterator ptf;
+        for (ptf = trace_file_list.begin(); ptf != trace_file_list.end(); ++ptf) {
+            sc_trace_file * tf = *ptf;
+            assert(tf != NULL);
+            trace(*tf, part);
+        }
+    }
+
+    cpt++;
+}
+
 
 #ifdef CONFIG_PAT_TRACE_FORMAT
-static void
-pat_set_value (char *buf, const signal2trace &s)
-{
-	if ( ( s.bit_size % 4 ) == 0 )
-	{
-		buf[1] = 'x';
-		hex2string( buf+2, s.inter->get_pointer() , s.bit_size );
-	}
-	else
-	{
-		buf[1] = 'b';
-		bit2string( buf+2, s.inter->get_pointer() , s.bit_size );
-	}
-}
-
-inline
-static 
-void
-affect    (const char          *cur,
-           const char          *nomSig,
-           const char          *buf)
-{
+static void pat_set_value(char * buf, const signal2trace & s) {
+    if ((s.bit_size % 4) == 0) {
+        buf[1] = 'x';
+        hex2string(buf + 2, s.inter->get_pointer(), s.bit_size);
+    }
+    else {
+        buf[1] = 'b';
+        bit2string(buf + 2, s.inter->get_pointer(), s.bit_size);
+    }
+}
+
+
+inline static void affect(const char * cur, const char * nomSig, const char * buf) {
+    AFFECT ((char*)cur, (char*)nomSig, (char*)buf );
+}
+
+
+
+inline static void pat_trace(
+        sc_trace_file       & tf, 
+        const signal2trace  & s2t, 
+        const ostringstream & cur1,
+        const ostringstream & cur2) {
+    static char buf[50] = "0\0";
+    //cout << "Nom du signal: " << s->nomSig;
+    pat_set_value(buf, s2t);
+    affect(cur1.str().c_str(), s2t.nomSig.c_str(), buf);
+    affect(cur2.str().c_str(), s2t.nomSig.c_str(), buf);
+}
+
+
+inline static void pat_trace_clocks(
+        sc_trace_file       & tf,
+        const ostringstream & cur1,
+        const ostringstream & cur2) {
+    vector<signal2trace>::const_iterator s;
+    for (s = (tf.clk_list).begin(); s != (tf.clk_list).end(); s++) {
+        const signal2trace & s2t = *s;
+        char * name = (char *) ((s2t.nomSig).c_str());
+        const sc_interface * inter = s2t.inter;
+        const sc_clock * clk = (const sc_clock *) inter;
+        bool  posedge_first = clk->posedge_first;
+        char * a, * b;
+        if (posedge_first) {
+            a = "0B1";
+            b = "0B0";
+        }
+        else {
+            a = "0B0";
+            b = "0B1"; 
+        }
+        affect(cur1.str().c_str(), name, a);
+        affect(cur2.str().c_str(), name, b);
+    }
+}
+
+
+static void pat_trace_init(sc_trace_file & tf) {
+    init(tf);
+}
+
+
+static void pat_trace(sc_trace_file & tf, bool part) { 
+    if (part) {
+        return;
+    }
+    
+    if (cpt == trace_start) {
+        pat_trace_init(tf);
+    }
+
+    // time counters
+    ostringstream cur1, cur2;
+    long long unsigned int buf = cpt * 5;
+    cur1 << buf << "00";
+    cur2 << buf + 5 << "00";
+
+    // affect each signal
+    vector<signal2trace>::iterator s;
+    for (s = (tf.sig_list).begin(); s != (tf.sig_list).end(); s++) {
+        pat_trace(tf, *s, cur1, cur2);
+    }
+    pat_trace_clocks(tf, cur1, cur2);
+}
+
+#else
+void pat_trace (sc_trace_file & tf, bool part) {}
+#endif // CONFIG_PAT_TRACE_FORMAT
+
+
+static bool is_modified(const signal2trace & s2t) {
+    unsigned int bit_size = s2t.bit_size;
+    if (bit_size > 32) {
+        const uint64 * const pointer_saved = (const uint64 *) s2t.pointer;
+        const uint64 * const pointer_current = (const uint64 *) s2t.inter->get_pointer();
+        return (*pointer_saved != *pointer_current);
+    }
+    else if (bit_size > 16) {
+        const uint32 * const pointer_saved = (const uint32 *) s2t.pointer;
+        const uint32 * const pointer_current = (const uint32 *) s2t.inter->get_pointer();
+        return (*pointer_saved != *pointer_current);
+    }
+    else {
+        const uint16 * const pointer_saved = (const uint16 *) s2t.pointer;
+        const uint16 * const pointer_current = (const uint16 *) s2t.inter->get_pointer();
+        return (*pointer_saved != *pointer_current);
+    }
+}
+
+
+static bool save_modification(signal2trace & s2t) {
+    *(s2t.pointer) = *(s2t.inter->get_pointer());
+}
+
+
+static inline void print(sc_trace_file & tf, signal2trace & s2t) {
+    char buf[100];
+    bit2string(buf + 1, s2t.inter->get_pointer() , s2t.bit_size);
+
+    char * buf2 = strip(buf + 1);
+    int len = strlen(buf2);
+    if (s2t.bit_size != 1) {
+        --buf2;
+        buf2[0] = 'b';
+        sprintf(buf2 + len + 1, " %s\n", s2t.alias);
+    }
+    else {
+        sprintf(buf2 + len, "%s\n", s2t.alias);
+    }
+    
+    // ecriture liste[i] dans le fichier VCD:
+    if ((fprintf(tf.pfic,buf2)) == 0) {
+        cerr << "erreur ecriture du couple Valeur/Nom du signal dans le VCD\n";
+        exit(16);
+    }
+}
+
+
+static inline void vcd_trace(sc_trace_file & tf, signal2trace  & s2t, bool skip = true) {
+    if ((skip) && (!is_modified(s2t))) {
+        return;
+    }
+    save_modification(s2t);
+    print(tf, s2t);
+}
+
+
+static void vcd_trace_clocks(const sc_trace_file & tf, bool v) {
+    vector<signal2trace>::const_iterator i;
+    for (i = (tf.clk_list).begin(); i != (tf.clk_list).end(); i++) {
+        const signal2trace & s2t   = *i;
+        const sc_interface * inter = s2t.inter;
+        const sc_clock * clk = (const sc_clock *) inter;
+        bool posedge_first = clk->posedge_first;
+        fprintf(tf.pfic, "%c%s\n",(v^posedge_first)?'0':'1', i->alias);
+    }
+}
+
+
+static tab_t * vcd_signal_table = NULL;
+
+
+static int vcd_get_size(const signal2trace & s2t) {
 #if 0
-  printf ("AFFECT (\"%s\", \"%s\", \"%s\");\n", 
-    cur,
-    nomSig,
-    buf);
+    cerr << "alias     : " << s2t.alias    << "\n";
+    cerr << "bit_size  : " << s2t.bit_size << "\n";
+    cerr << "=> #tab_t : " << ((s2t.bit_size - 1) / (sizeof (tab_t)*8)) + 1 << "\n";
 #endif
-	AFFECT ((char*)cur, (char*)nomSig, (char*)buf );
-}
-
-inline
-static 
-void
-pat_trace (sc_trace_file       &tf, 
-           const signal2trace  &s2t, 
-           const ostringstream &cur1,
-           const ostringstream &cur2)
-{
-	static char buf[50] = "0\0";
-	//cout << "Nom du signal: " << s->nomSig;
-	pat_set_value (buf, s2t);
-	affect (cur1.str().c_str(), s2t.nomSig.c_str(), buf);
-	affect (cur2.str().c_str(), s2t.nomSig.c_str(), buf);
-}
-
-inline
-static 
-void
-pat_trace_clocks (sc_trace_file &tf,
-                  const ostringstream &cur1,
-                  const ostringstream &cur2)
-{
-	vector<signal2trace>::const_iterator s;
-	for(s=(tf.clk_list).begin();s!=(tf.clk_list).end();s++)
-	{
-    const signal2trace &s2t = *s;
-    char *name = (char*)((s2t.nomSig).c_str());
-    const sc_interface *inter = s2t.inter;
-    const sc_clock     *clk   = (const sc_clock *) inter;
-    bool  posedge_first       = clk->posedge_first;
-    char *a, *b;
-    if (posedge_first)
-    {
-      a = "0B1"; b = "0B0";
-    } else {
-      a = "0B0"; b = "0B1"; 
-    }
-    affect (cur1.str().c_str(), name, a);
-    affect (cur2.str().c_str(), name, b);
-	}
-}
-
-static
-void
-pat_trace_init (sc_trace_file &tf)
-{
-  init (tf);
-}
-
-static 
-void
-pat_trace (sc_trace_file &tf,
-           bool           part)
-{ 
-  if (part)
-    return;
-	if (cpt==trace_start) {
-		pat_trace_init (tf);
-	}
-	// time counters
-	ostringstream cur1,cur2; 
-  long long unsigned int buf = cpt * 5;
-	cur1 << buf << "00";
-	cur2 << buf + 5 << "00";
-	// affect each signal
-	vector<signal2trace>::iterator s;
-	for(s=(tf.sig_list).begin();s!=(tf.sig_list).end();s++)
-	{
-    pat_trace (tf, *s, cur1, cur2);
-	}
-  pat_trace_clocks (tf, cur1, cur2);
-}
-#else
-void
-pat_trace (sc_trace_file &tf,
-           bool           part)
-{
-}
+    return ((s2t.bit_size - 1) / (sizeof(tab_t) * 8)) + 1;
+}
+
+
+static int vcd_get_signal_table_size(const sc_trace_file & tf) {
+    int total_size = 0;
+    vector<signal2trace>::const_iterator i;
+    for (i = (tf.sig_list).begin(); i != (tf.sig_list).end(); i++) {
+        const signal2trace & s2t = *i;
+        total_size += vcd_get_size(s2t);
+    }
+    return total_size;
+}
+
+
+static void vcd_alloc_signal_table(int size) {
+    if (size == 0) {
+        vcd_signal_table = NULL;
+    }
+    else {
+        vcd_signal_table = (tab_t *) malloc(sizeof(tab_t) * size);
+    }
+#ifdef CONFIG_DEBUG
+    if (vcd_signal_table == NULL) {
+        cerr << "Internal error : Unable to allocate memory for signal table to trace.\n";
+        exit(24032005);
+    }
+#endif
+}
+
+
+static void vcd_bind_to_signal_table(sc_trace_file & tf) {
+    tab_t * cur = vcd_signal_table;
+    vector<signal2trace>::iterator i;
+    for (i = (tf.sig_list).begin(); i != (tf.sig_list).end(); i++) {
+        signal2trace & s2t = *i;
+        s2t.pointer = cur;
+        cur += vcd_get_size(s2t);
+#if 0
+        std::cout << s2t 
+            << "\nget_pointer () => " << hex << s2t.inter->get_pointer () 
+            << "\nvcd pointer () => " << hex << s2t.pointer 
+            << "\nvcd_get_size () => " << vcd_get_size (s2t)
+            << "\n";
+#endif
+    }
+}
+
+
+static void vcd_build_signal_table(sc_trace_file & tf) {
+    int s = vcd_get_signal_table_size(tf);
+    vcd_alloc_signal_table(s);
+    vcd_bind_to_signal_table(tf);
+}
+
+
+static void vcd_trace_init(sc_trace_file & tf) {
+    init(tf);
+    fprintf(tf.pfic,"$upscope $end\n$enddefinitions  $end\n\n$comment\nAll initial values are dumped below at time 0 sec = 0 timescale units.\n$end\n\n$dumpvars\n");
+    vcd_build_signal_table(tf);
+
+    // dump all var
+    vector<signal2trace>::iterator i;
+    for(i = (tf.sig_list).begin() ; i != (tf.sig_list).end(); i++) {
+        vcd_trace(tf, *i, false);
+    }//fin de la liste des signal2trace
+
+    // clocks to trace
+    vcd_trace_clocks(tf, true);
+
+    if (cpt == trace_start) {
+        fprintf(tf.pfic, "$end\n"); //fin du $dumpvars
+    }
+}
+
+
+static void vcd_trace(sc_trace_file & tf, bool part) {
+    if (sc_core::cpt == sc_core::trace_start) {
+        if (part == false) {
+            vcd_trace_init (tf);
+        }
+    }
+    else {
+#if defined(CONFIG_DEBUG)
+        if (vcd_signal_table == NULL) {
+            cerr << "Internal Error : VCD signal table is not yet allocated.\n";
+            exit(1042005);
+        }
+#endif
+        vcd_print_cycle_number(tf.pfic,sc_core::cpt);
+        // signals to trace 
+        if (part == false) {
+            vector<signal2trace>::iterator i;
+            for (i = tf.sig_list.begin(); i != tf.sig_list.end(); i++) {
+                vcd_trace(tf, *i);
+            }//fin de la liste des signal2trace
+        }
+        // clocks to trace
+        vcd_trace_clocks(tf, !part);
+    }
+}
+
+
+void trace(sc_trace_file & tf, bool part) {
+    switch (tf.flag) {
+        // fonction trace() pour VCD:
+        case VCD_FORMAT:
+            vcd_trace(tf, part);
+            break;
+            //fin de la fonction trace() pour VCD
+
+            /*------------------------------------------------------------------------------------*/
+
+            // fonction trace() pour PAT:
+        case PAT_FORMAT:
+            pat_trace(tf, part);
+            break;
+            //fin de la fonction trace() pour PAT
+    }
+    // fin du switch format pour trace()
+
+}
+
+
+/*------------------------------------------------------------------------------------*/
+
+
+static void vcd_sc_trace(sc_trace_file * tf, const signal2trace & t, const std::string & name) {
+    //déclaration du signal dans l'en-tête du fichier VCD:
+    // exemple de déclarations :
+    // $var wire    1  aaa  clk       $end
+    // $var wire    1  aab  resetn       $end
+    // $var wire    1  aac  _mips0_IT_5       $end
+
+    std::string declaration;
+    std::ostringstream buf;
+    // begin
+    declaration = "$var wire ";
+    buf.width(4);
+    buf << t.bit_size;
+    declaration += buf.str();
+    declaration += "  ";
+    declaration += t.alias;
+    declaration += "  ";
+    declaration += name;
+    // bit range
+    if (t.bit_size != 1) {
+        declaration += " [";
+        std::ostringstream bit_size;
+        bit_size << t.bit_size - 1;
+        declaration += bit_size.str();
+        declaration += ":0]";
+    }
+    // end
+    declaration += "       $end\n";
+
+    if ((fprintf(tf->pfic,declaration.c_str())) == 0) {
+        cerr << "erreur ecriture de declaration du signal sc_signal\n";
+        exit(3);
+    }
+}
+
+
+static void pat_sc_trace(sc_trace_file * tf, const signal2trace & t, const std::string & name) {
+#ifdef CONFIG_PAT_TRACE_FORMAT
+    //exemple:
+    //DECLAR ("a", ":2", "X", IN, "3  downto 0", "" );
+    //DECLAR ("b", ":2", "X", IN, "3  downto 0", "" );
+    //DECLAR ("vdd", ":2", "B", IN, "", "" );
+
+    std::string downto;
+    const sc_object * obj = (const sc_object *) t.inter;
+    const char * obj_kind = obj->kind();
+    char * format;
+    char * dir;
+
+    if (strstr(obj_kind, "inout"))
+        dir = OUT; // Direction is OUT instead of INOUT
+    // because port behavior is only seen as an output port.
+    else if (strstr (obj_kind, "in")) {
+        dir = IN;
+    }
+    else if (strstr (obj_kind, "out")) {
+        dir = OUT;
+    }
+    else if (obj_kind == sc_clock::kind_string) {
+        dir = SIGNAL;
+    }
+    else if (obj_kind == sc_signal_base::kind_string) {
+        dir = REGISTER;
+    }
+    // to do : dir = REGISTER;
+    //         dir = SIGNAL;
+
+    if (t.bit_size % 4 == 0) {
+        format = "x";
+    }
+    else {
+        format = "b";
+    }
+
+    if (t.bit_size == 1) {
+        downto = "";
+    }
+    else {  
+        std::ostringstream nbits;
+        nbits << t.bit_size - 1;
+        downto = nbits.str();
+        downto += " downto 0";
+    }
+
+#if 0
+    printf ("DECLAR (\"%s\", \":1\", \"%s\", %s, \"%s\", \"\" );\n", 
+            name.c_str (),
+            format,
+            dir,
+            downto.c_str());
+#endif
+    DECLAR ((char *) (name.c_str()), ":1", format, dir, (char *) downto.c_str(), "");
 #endif // CONFIG_PAT_TRACE_FORMAT
-
-static
-bool
-is_modified (const signal2trace &s2t)
-{
-  unsigned int bit_size = s2t.bit_size;
-  if (bit_size > 32)
-  {
-    const uint64 *const pointer_saved   = (const uint64 *)s2t.pointer;
-    const uint64 *const pointer_current = (const uint64 *)s2t.inter->get_pointer ();
-    return (*pointer_saved != *pointer_current);
-  } else if (bit_size > 16) {
-    const uint32 *const pointer_saved   = (const uint32*)s2t.pointer;
-    const uint32 *const pointer_current = (const uint32*)s2t.inter->get_pointer ();
-    return (*pointer_saved != *pointer_current);
-  } else {
-    const uint16 *const pointer_saved   = (const uint16 *)s2t.pointer;
-    const uint16 *const pointer_current = (const uint16 *)s2t.inter->get_pointer ();
-    return (*pointer_saved != *pointer_current);
-  }
-}
-
-static
-bool
-save_modification (signal2trace &s2t)
-{
-  *(s2t.pointer) = *(s2t.inter->get_pointer ());
-}
-
-static
-inline
-void
-print (sc_trace_file &tf, signal2trace &s2t)
-{
-	char buf[100];
-	bit2string( buf+1, s2t.inter->get_pointer() , s2t.bit_size );
-	
-	char *buf2 = strip(buf+1);
-  int   len  = strlen (buf2);
-  if (s2t.bit_size != 1)
-  {
-    --buf2;
-    buf2[0] = 'b';
-    sprintf (buf2 + len + 1, " %s\n", s2t.alias);
-  } else {
-    sprintf (buf2 + len, "%s\n", s2t.alias);
-  }
-/*	
-	char *buf2 = strip(buf);
-  char buf3[128];
-
-  if (s2t.bit_size != 1)
-    sprintf (buf3, "b%s %s\n", buf2, s2t.alias);
-  else
-    sprintf (buf3, "%s%s\n", buf2, s2t.alias);
-  */  
-	// ecriture liste[i] dans le fichier VCD:
-	if ((fprintf(tf.pfic,buf2))==0)
-	{
-	  cerr << "erreur ecriture du couple Valeur/Nom du signal dans le VCD\n";
-		exit(16);
-	}
-}
-
-static
-inline 
-void
-vcd_trace (sc_trace_file &tf, 
-           signal2trace  &s2t, 
-           bool           skip = true)
-{
-  if ((skip) && (!is_modified (s2t)))
-    return;
-  save_modification (s2t);
-  print (tf, s2t);
-}
-
-static
-void
-vcd_trace_clocks (const sc_trace_file &tf, 
-                  bool v)
-{
-	vector<signal2trace>::const_iterator i;
-	for(i=(tf.clk_list).begin();i!=(tf.clk_list).end();i++) 
-	{
-    const signal2trace &s2t   = *i;
-    const sc_interface *inter = s2t.inter;
-    const sc_clock     *clk   = (const sc_clock *) inter;
-    bool  posedge_first       = clk->posedge_first;
-		fprintf(tf.pfic, "%c%s\n",(v^posedge_first)?'0':'1', i->alias);
-	}
-}
-
-static tab_t *vcd_signal_table = NULL;
-
-
-static
-int
-vcd_get_size (const signal2trace &s2t)
-{
-#if 0
-  cerr << "alias     : " << s2t.alias    << "\n";
-  cerr << "bit_size  : " << s2t.bit_size << "\n";
-  cerr << "=> #tab_t : " << ((s2t.bit_size - 1) / (sizeof (tab_t)*8)) + 1 << "\n";
-#endif
-  return ((s2t.bit_size - 1) / (sizeof (tab_t)*8)) + 1;
-}
-
-static
-int
-vcd_get_signal_table_size (const sc_trace_file &tf)
-{
-  int total_size = 0;
-	vector<signal2trace>::const_iterator i;
-	for(i=(tf.sig_list).begin();i!=(tf.sig_list).end();i++)
-	{
-    const signal2trace &s2t = *i;
-    total_size += vcd_get_size (s2t);
-  }
-  return total_size;
-}
-
-static
-void
-vcd_alloc_signal_table (int size)
-{
-  if (size == 0)
-    vcd_signal_table = NULL;
-  else
-    vcd_signal_table = (tab_t*) malloc (sizeof (tab_t) * size);
-#ifdef CONFIG_DEBUG
-  if (vcd_signal_table == NULL)
-  {
-    cerr << "Internal error : Unable to allocate memory for signal table to trace.\n";
-    exit (24032005);
-  }
-#endif
-}
-
-static
-void
-vcd_bind_to_signal_table (sc_trace_file &tf)
-{
-  tab_t *cur = vcd_signal_table;
-	vector<signal2trace>::iterator i;
-	for(i=(tf.sig_list).begin();i!=(tf.sig_list).end();i++)
-	{
-    signal2trace &s2t = *i;
-    s2t.pointer = cur;
-    cur += vcd_get_size (s2t);
-#if 0
-    std::cout << s2t 
-      << "\nget_pointer () => " << hex << s2t.inter->get_pointer () 
-      << "\nvcd pointer () => " << hex << s2t.pointer 
-      << "\nvcd_get_size () => " << vcd_get_size (s2t)
-      << "\n";
-#endif
-  }
-}
-
-static
-void
-vcd_build_signal_table (sc_trace_file &tf)
-{
-  int s = vcd_get_signal_table_size (tf);
-
-  vcd_alloc_signal_table (s);
-
-  vcd_bind_to_signal_table (tf);
-}
-
-static
-void
-vcd_trace_init (sc_trace_file &tf)
-{
-	init (tf);
-	fprintf (tf.pfic,"$upscope $end\n$enddefinitions  $end\n\n$comment\nAll initial values are dumped below at time 0 sec = 0 timescale units.\n$end\n\n$dumpvars\n");
-  vcd_build_signal_table (tf);
-
-  // dump all var
-	vector<signal2trace>::iterator i;
-	for(i=(tf.sig_list).begin();i!=(tf.sig_list).end();i++)
-	{
-    vcd_trace (tf, *i, false);
-	}//fin de la liste des signal2trace
-
-  // clocks to trace
-  vcd_trace_clocks (tf, true);
-
-	if (cpt==trace_start)
-		fprintf(tf.pfic,"$end\n"); //fin du $dumpvars
-}
-
-static
-void
-vcd_trace (sc_trace_file &tf,
-           bool           part)
-{
-	if (sc_core::cpt==sc_core::trace_start) {
-    if (part == false)
-      vcd_trace_init (tf);
-  } else {
-#if defined(CONFIG_DEBUG)
-      if (vcd_signal_table == NULL)
-      {
-        cerr << "Internal Error : VCD signal table is not yet allocated.\n";
-        exit (1042005);
-      }
-#endif
-      vcd_print_cycle_number (tf.pfic,sc_core::cpt);
-      // signals to trace 
-      if (part == false)
-      {
-//        vector<signal2trace> &sig_list = (part == false)?to_update_on_pos:to_update_on_neg;
-        vector<signal2trace>::iterator i;
-        for(i=tf.sig_list.begin();i!=tf.sig_list.end();i++)
-        {
-          vcd_trace (tf, *i);
-        }//fin de la liste des signal2trace
-      }
-      // clocks to trace
-      vcd_trace_clocks (tf, !part);
-  }
-}
-
-void
-trace (sc_trace_file &tf, bool part)
-{
-/*------------------------------------------------------------------------------------*/
-	
-	switch (tf.flag){
-
-	// fonction trace() pour VCD:
-	case VCD_FORMAT:
-		vcd_trace (tf, part);
-    break;//fin de la fonction trace() pour VCD
-
-/*------------------------------------------------------------------------------------*/
-	
-	// fonction trace() pour PAT:
-	case PAT_FORMAT : 
-    pat_trace (tf, part);
-		break;//fin de la fonction trace() pour PAT
-	}// fin du switch format pour trace()
-		
-}
-
-/*------------------------------------------------------------------------------------*/
-
-static
-void
-vcd_sc_trace (sc_trace_file *tf, const signal2trace &t, const std::string
-&name)
-{
-	//déclaration du signal dans l'en-tête du fichier VCD:
-	// exemple de déclarations :
-	// $var wire    1  aaa  clk       $end
-	// $var wire    1  aab  resetn       $end
-	// $var wire    1  aac  _mips0_IT_5       $end
-
-	std::string declaration;
-	std::ostringstream buf;
-  // begin
-	declaration = "$var wire ";
-	buf.width (4);
-  buf << t.bit_size;
-  declaration += buf.str();
-  declaration += "  ";
-  declaration += t.alias;
-  declaration += "  ";
-  declaration += name;
-  // bit range
-  if (t.bit_size != 1)
-  {
-    declaration += " [";
-	  std::ostringstream bit_size;
-    bit_size << t.bit_size - 1;
-    declaration += bit_size.str();
-    declaration += ":0]";
-  }
-  // end
-	declaration += "       $end\n";
-	//declaration += "  $end\n";
-
-	if ((fprintf(tf->pfic,declaration.c_str()))==0)
-		{
-			cerr << "erreur ecriture de declaration du signal sc_signal\n";
-			exit(3);
-		}
-}
-
-static
-void
-pat_sc_trace (sc_trace_file *tf, const signal2trace &t, const std::string
-&name)
-{
-#ifdef CONFIG_PAT_TRACE_FORMAT
-	//exemple:
-	//DECLAR ("a", ":2", "X", IN, "3  downto 0", "" );
-	//DECLAR ("b", ":2", "X", IN, "3  downto 0", "" );
-	//DECLAR ("vdd", ":2", "B", IN, "", "" );
-
-	std::string downto;	
-	const sc_object *obj = (const sc_object *) t.inter;
-	const char *obj_kind = obj->kind ();
-	char *format;
-	char *dir;
-
-	if (strstr (obj_kind,"inout"))
-		dir = OUT; // Direction is OUT instead of INOUT
-               // because port behavior is only seen as an output port.
-	else if (strstr (obj_kind,"in"))
-		dir = IN;
-	else if (strstr (obj_kind,"out"))
-		dir = OUT;
-	else if (obj_kind == sc_clock::kind_string)
-		dir = SIGNAL;
-	else if (obj_kind == sc_signal_base::kind_string)
-    dir = REGISTER;
-  // to do : dir = REGISTER;
-	//         dir = SIGNAL;
-
-	if ( t.bit_size % 4 == 0)
-		format = "x";
-	else
-		format = "b";
-
-  if ( t.bit_size == 1) {
-		downto = "";
-	}
-	else  
-	{
-		std::ostringstream nbits;
-		nbits << t.bit_size-1;
-		downto = nbits.str();
-		downto += " downto 0";
-	}
-	
-#if 0
-  printf ("DECLAR (\"%s\", \":1\", \"%s\", %s, \"%s\", \"\" );\n", 
-    name.c_str (),
-    format,
-    dir,
-    downto.c_str());
-#endif
-	DECLAR ((char*)(name.c_str ()), ":1", format, dir,(char *) downto.c_str(), "" );
-#endif // CONFIG_PAT_TRACE_FORMAT
-}
-
-void
-sc_trace( sc_trace_file* tf, const signal2trace &t, const std::string &name )
-{
-  if (tf == NULL)
-    return;
-	if (t.bit_size > 64)
-		cerr << "Warning : tracing functions do not support data types larger than 64 bits.\n";
-	if (already_initialized)
-		cerr << "Warning : please call tracing functions BEFORE sc_initialize.\n";
-	//ajout du signal dans la liste des signaux à tracer:
-	(tf->sig_list).push_back (t); 
-
-	switch (tf->flag) {
-	case VCD_FORMAT : 
-    vcd_sc_trace (tf, t, name);
-		break;
-	
-	case PAT_FORMAT :
-    pat_sc_trace (tf, t, name);
-		break;
-	default :
-		{
-		cerr << "Unknown trace format.\n";
-		exit (1);
-		}
-	}// fin switch format pour sc_trace
-	
-}
+}
+
+
+void sc_trace(sc_trace_file * tf, const signal2trace & t, const std::string & name) {
+    if (tf == NULL) {
+        return;
+    }
+    if (t.bit_size > 64) {
+        cerr << "Warning : tracing functions do not support data types larger than 64 bits.\n";
+    }
+    if (already_initialized) {
+        cerr << "Warning : please call tracing functions BEFORE sc_initialize.\n";
+    }
+    //ajout du signal dans la liste des signaux à tracer:
+    (tf->sig_list).push_back(t);
+
+    switch (tf->flag) {
+        case VCD_FORMAT : 
+            vcd_sc_trace(tf, t, name);
+            break;
+
+        case PAT_FORMAT :
+            pat_sc_trace(tf, t, name);
+            break;
+        default :
+            {
+                cerr << "Unknown trace format.\n";
+                exit(1);
+            }
+    }// fin switch format pour sc_trace
+
+}
+
+//----------------------------------------------------------------------------
+
+#define DEF_SC_TRACE(T) /*inline \*/                                        \
+    void                                                                    \
+    sc_trace (sc_trace_file* tf, const T& object, const std::string & name) \
+    {                                                                       \
+        signal2trace t;                                                     \
+        sc_interface * inter = new sc_localvar< T > (object);               \
+        t.inter = inter;                                                    \
+        t.alias = alias();                                                  \
+        t.bit_size = get_bits_number(object);                               \
+        t.nomSig = name;                                                    \
+        sc_trace (tf, t, name);                                             \
+    }
+
+
+    DEF_SC_TRACE(bool)
+    DEF_SC_TRACE(float)
+    DEF_SC_TRACE(double)
+    DEF_SC_TRACE(unsigned char)
+    DEF_SC_TRACE(unsigned short)
+    DEF_SC_TRACE(unsigned int)
+    DEF_SC_TRACE(unsigned long)
+    DEF_SC_TRACE(char)
+    DEF_SC_TRACE(short)
+    DEF_SC_TRACE(int)
+    DEF_SC_TRACE(long)
+    DEF_SC_TRACE(uint64)
+    DEF_SC_TRACE(int64)
+
+#undef DEF_SC_TRACE
 
 //---------------------------------------------------------------------------
 
-#if 0
-static
-ostream&
-operator << (ostream &o,
-             const signal2trace &s2t)
-{
-  o << "signal2trace {"
-    << "inter = " << hex << s2t.inter
-    << ",alias = '" << s2t.alias << "'"
-    << ",bitsize = " << dec << s2t.bit_size
-    << ",pointer = " << hex << s2t.pointer
-    << ",nomSig  = " << s2t.nomSig << "}";
-  return o;
-}
-#endif
-
-//----------------------------------------------------------------------------
-
-#define DEF_SC_TRACE(T) /*inline \*/ \
-  void   \
-  sc_trace (sc_trace_file* tf, const T& object, const std::string &name) \
-  { \
-		signal2trace t;                                      \
-		sc_interface *inter = new sc_localvar<T> (object);   \
-		t.inter = inter;                                     \
-		t.alias = alias();                                   \
-		t.bit_size = get_bits_number(object);                \
-		t.nomSig = name;                                     \
-		sc_trace (tf, t, name);                              \
-  } \
-
-	DEF_SC_TRACE(bool)
-	DEF_SC_TRACE(float)
-	DEF_SC_TRACE(double)
-	DEF_SC_TRACE(unsigned char)
-	DEF_SC_TRACE(unsigned short)
-	DEF_SC_TRACE(unsigned int)
-	DEF_SC_TRACE(unsigned long)
-	DEF_SC_TRACE(char)
-	DEF_SC_TRACE(short)
-	DEF_SC_TRACE(int)
-	DEF_SC_TRACE(long)
-	DEF_SC_TRACE(uint64)
-	DEF_SC_TRACE(int64)
-
-#undef DEF_SC_TRACE
-
-//---------------------------------------------------------------------------
 } // end of sc_core namespace
 
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_trace.h
===================================================================
--- /sources/src/sc_trace.h	(revision 51)
+++ /sources/src/sc_trace.h	(revision 52)
@@ -33,41 +33,52 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
+
 #ifndef __SC_TRACE_H__
 #define __SC_TRACE_H__
 
-#include "sc_trace_ext.h"
 #include <vector>
 
-//---------------------------------------------------------------------------
+#include "sc_trace_ext.h"
+
 
 namespace sc_core {
 
-//---------------------------------------------------------------------------
 
-typedef enum {VCD_FORMAT, PAT_FORMAT} TRACE_FORMAT;
+typedef enum {
+    VCD_FORMAT,
+    PAT_FORMAT
+} TRACE_FORMAT;
 
-//---------------------------------------------------------------------------
 
 extern std::vector<sc_trace_file *> trace_file_list;
-extern uint64                       cpt;
+extern uint64 cpt;
 
-extern void trace_all (bool part);
-extern void trace     (sc_trace_file&, bool part);
+extern void trace_all(bool part);
+extern void trace(sc_trace_file &, bool part);
 
-//---------------------------------------------------------------------------
 
-struct sc_trace_file
-{
-	TRACE_FORMAT  flag;
-	FILE*         pfic;
+
+struct sc_trace_file {
+	TRACE_FORMAT flag;
+	FILE * pfic;
 	std::vector<signal2trace> sig_list;
 	std::vector<signal2trace> clk_list;
 };
 
-//---------------------------------------------------------------------------
+
 
 } // end of sc_core namespace
 
-//----------------------------------------------------------------------------
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_trace_ext.h
===================================================================
--- /sources/src/sc_trace_ext.h	(revision 51)
+++ /sources/src/sc_trace_ext.h	(revision 52)
@@ -38,6 +38,4 @@
 #define __SC_TRACE_EXT_H__
 
-#include "sc_fwd.h"
-#include "alias.h"
 #include <vector>
 #include <iostream>
@@ -45,158 +43,161 @@
 #include <sstream>
 
+#include "sc_fwd.h"
+#include "alias.h"
 #include "sc_module_ext.h"
 #include "sc_localvar.h"
 
-//---------------------------------------------------------------------------
+
 
 namespace sc_core {
 
-	using namespace sc_dt;
-
-//---------------------------------------------------------------------------
-
-struct signal2trace
-{
-	const sc_interface   *inter;
-	const char           *alias;
-	unsigned int          bit_size;
-  tab_t                *pointer;
-  std::string           nomSig;
+using namespace sc_dt;
+
+
+
+struct signal2trace {
+    const sc_interface * inter;
+    const char * alias;
+    unsigned int bit_size;
+    tab_t * pointer;
+    std::string nomSig;
 };
 
-//---------------------------------------------------------------------------
-
-template<typename T> struct bits_number_getter {};
- 
-#define BITS_NUMBER_GETTER_DEF(newt,typ, expr)      \
-template<newt> struct bits_number_getter<typ> {     \
-    typedef typ val_t;                              \
-    static inline unsigned int get() {return expr;} \
-}
-
- BITS_NUMBER_GETTER_DEF(, bool          ,1);
- BITS_NUMBER_GETTER_DEF(, char          ,8*sizeof(val_t));
- BITS_NUMBER_GETTER_DEF(, signed   char ,8*sizeof(val_t));
- BITS_NUMBER_GETTER_DEF(, unsigned char ,8*sizeof(val_t));
- BITS_NUMBER_GETTER_DEF(, unsigned short,8*sizeof(val_t));
- BITS_NUMBER_GETTER_DEF(, signed   short,8*sizeof(val_t));
- BITS_NUMBER_GETTER_DEF(, signed   int  ,8*sizeof(val_t));
- BITS_NUMBER_GETTER_DEF(, unsigned int  ,8*sizeof(val_t));
- BITS_NUMBER_GETTER_DEF(, signed   long ,8*sizeof(val_t));
- BITS_NUMBER_GETTER_DEF(, unsigned long ,8*sizeof(val_t));
- BITS_NUMBER_GETTER_DEF(, float         ,8*sizeof(val_t));
- BITS_NUMBER_GETTER_DEF(, sc_unsigned   ,8*sizeof(unsigned int));
- BITS_NUMBER_GETTER_DEF(, sc_signed     ,8*sizeof(int));
- BITS_NUMBER_GETTER_DEF(, double        ,8*sizeof(val_t));
- BITS_NUMBER_GETTER_DEF(, uint64        ,8*sizeof(val_t));
- BITS_NUMBER_GETTER_DEF(, int64         ,8*sizeof(val_t));
- BITS_NUMBER_GETTER_DEF(typename inval_t, sc_in<inval_t>    ,bits_number_getter<inval_t>::get());
- BITS_NUMBER_GETTER_DEF(typename inval_t, sc_out<inval_t>   ,bits_number_getter<inval_t>::get());
- BITS_NUMBER_GETTER_DEF(typename inval_t, sc_inout<inval_t> ,bits_number_getter<inval_t>::get());
- BITS_NUMBER_GETTER_DEF(typename inval_t, sc_signal<inval_t>,bits_number_getter<inval_t>::get());
- BITS_NUMBER_GETTER_DEF(int W, sc_int<W>,W);
- BITS_NUMBER_GETTER_DEF(int W, sc_uint<W>,W);
- BITS_NUMBER_GETTER_DEF(int W, sc_bigint<W>,W);
- BITS_NUMBER_GETTER_DEF(int W, sc_biguint<W>,W);
- BITS_NUMBER_GETTER_DEF(int W, sc_bv<W>,W);
- BITS_NUMBER_GETTER_DEF(int W, sc_lv<W>,W);
+
+
+template< typename T > struct bits_number_getter {};
+
+
+#define BITS_NUMBER_GETTER_DEF(newt, typ, expr)           \
+    template<newt> struct bits_number_getter<typ> {       \
+        typedef typ val_t;                                \
+        static inline unsigned int get() { return expr; } \
+    }
+
+
+BITS_NUMBER_GETTER_DEF(, bool          , 1);
+BITS_NUMBER_GETTER_DEF(, char          , 8 * sizeof(val_t));
+BITS_NUMBER_GETTER_DEF(, signed   char , 8 * sizeof(val_t));
+BITS_NUMBER_GETTER_DEF(, unsigned char , 8 * sizeof(val_t));
+BITS_NUMBER_GETTER_DEF(, unsigned short, 8 * sizeof(val_t));
+BITS_NUMBER_GETTER_DEF(, signed   short, 8 * sizeof(val_t));
+BITS_NUMBER_GETTER_DEF(, signed   int  , 8 * sizeof(val_t));
+BITS_NUMBER_GETTER_DEF(, unsigned int  , 8 * sizeof(val_t));
+BITS_NUMBER_GETTER_DEF(, signed   long , 8 * sizeof(val_t));
+BITS_NUMBER_GETTER_DEF(, unsigned long , 8 * sizeof(val_t));
+BITS_NUMBER_GETTER_DEF(, float         , 8 * sizeof(val_t));
+BITS_NUMBER_GETTER_DEF(, sc_unsigned   , 8 * sizeof(unsigned int));
+BITS_NUMBER_GETTER_DEF(, sc_signed     , 8 * sizeof(int));
+BITS_NUMBER_GETTER_DEF(, double        , 8 * sizeof(val_t));
+BITS_NUMBER_GETTER_DEF(, uint64        , 8 * sizeof(val_t));
+BITS_NUMBER_GETTER_DEF(, int64         , 8 * sizeof(val_t));
+BITS_NUMBER_GETTER_DEF(typename inval_t, sc_in<inval_t>    , bits_number_getter<inval_t>::get());
+BITS_NUMBER_GETTER_DEF(typename inval_t, sc_out<inval_t>   , bits_number_getter<inval_t>::get());
+BITS_NUMBER_GETTER_DEF(typename inval_t, sc_inout<inval_t> , bits_number_getter<inval_t>::get());
+BITS_NUMBER_GETTER_DEF(typename inval_t, sc_signal<inval_t>, bits_number_getter<inval_t>::get());
+BITS_NUMBER_GETTER_DEF(int W, sc_int<W>, W);
+BITS_NUMBER_GETTER_DEF(int W, sc_uint<W>, W);
+BITS_NUMBER_GETTER_DEF(int W, sc_bigint<W>, W);
+BITS_NUMBER_GETTER_DEF(int W, sc_biguint<W>, W);
+BITS_NUMBER_GETTER_DEF(int W, sc_bv<W>, W);
+BITS_NUMBER_GETTER_DEF(int W, sc_lv<W>, W);
 #undef BITS_NUMBER_GETTER_DEF
- 
-template < typename T > inline
-unsigned int get_bits_number (const T & object)
-{
+
+
+template < typename T >
+inline unsigned int get_bits_number (const T & object) {
     return bits_number_getter<T>::get();
 }
 
-//---------------------------------------------------------------------------
+
 
 struct sc_trace_file;
 
-//---------------------------------------------------------------------------
-
-extern void
-sc_trace( sc_trace_file* tf, const signal2trace &t, const std::string &name );
+
+extern void sc_trace(sc_trace_file * tf, const signal2trace & t, const std::string & name);
+
+
+template < class T > /*inline*/
+void sc_trace(sc_trace_file * tf, const sc_in< T > & port, const std::string & name) {
+    signal2trace t;
+    t.inter = (const sc_interface *) &port;
+    t.alias = alias();
+    t.bit_size = get_bits_number(port);
+    t.nomSig = name;
+    sc_trace (tf, t, name);
+}
+
+
 
 template <class T> /*inline*/
-void
-sc_trace( sc_trace_file* tf, const sc_in<T>& port, const std::string &name )
-{
-	signal2trace t;
-	t.inter = (const sc_interface*) &port;
-	t.alias = alias();
-	t.bit_size = get_bits_number(port);
-	t.nomSig = name;
-	sc_trace (tf, t, name);
-}
-
-//----------------------------------------------------------------------------
-
-template <class T> /*inline*/
-void
-sc_trace( sc_trace_file* tf, const sc_out<T>& out, const std::string &name )
-{
-	signal2trace t;
-	t.inter = (const sc_interface*) &out;
-	t.alias = alias();
-	t.bit_size = get_bits_number(out);
-	t.nomSig = name;
-	sc_trace (tf, t, name);
-}
-
-//----------------------------------------------------------------------------
+void sc_trace(sc_trace_file * tf, const sc_out< T > & out, const std::string & name) {
+    signal2trace t;
+    t.inter = (const sc_interface *) &out;
+    t.alias = alias();
+    t.bit_size = get_bits_number(out);
+    t.nomSig = name;
+    sc_trace (tf, t, name);
+}
+
+
 
 template <typename T> /*inline*/
-void
-sc_trace( sc_trace_file* tf, const sc_inout<T>& inout, const std::string &name )
-{
-	signal2trace t;
-	t.inter = (const sc_interface*) &inout;
-	t.alias = alias();
-	t.bit_size = get_bits_number(inout);
-	t.nomSig = name;
-	sc_trace (tf, t, name);
-}
-
-//----------------------------------------------------------------------------
+void sc_trace(sc_trace_file * tf, const sc_inout< T > & inout, const std::string & name) {
+    signal2trace t;
+    t.inter = (const sc_interface *) &inout;
+    t.alias = alias();
+    t.bit_size = get_bits_number(inout);
+    t.nomSig = name;
+    sc_trace (tf, t, name);
+}
+
+
 
 template <typename T> /*inline*/
-void
-sc_trace( sc_trace_file* tf, const sc_signal<T>& signal, const std::string &name )
-{
-	signal2trace t;
-	t.inter = (const sc_interface*) &signal;
-	t.alias = alias();
-	t.bit_size = get_bits_number(signal);
-	t.nomSig = name;
-	sc_trace (tf, t, name);
-}
-
-//----------------------------------------------------------------------------
-
-#define DEF_SC_TRACE(T) /*inline \*/ \
-  extern void   \
-  sc_trace (sc_trace_file*,      \
-            const T& object,     \
-            const std::string&);
-
-	DEF_SC_TRACE(bool)
-	DEF_SC_TRACE(float)
-	DEF_SC_TRACE(double)
-	DEF_SC_TRACE(unsigned char)
-	DEF_SC_TRACE(unsigned short)
-	DEF_SC_TRACE(unsigned int)
-	DEF_SC_TRACE(unsigned long)
-	DEF_SC_TRACE(char)
-	DEF_SC_TRACE(short)
-	DEF_SC_TRACE(int)
-	DEF_SC_TRACE(long)
-	DEF_SC_TRACE(uint64)
-	DEF_SC_TRACE(int64)
-
+void sc_trace( sc_trace_file * tf, const sc_signal< T > & signal, const std::string & name) {
+    signal2trace t;
+    t.inter = (const sc_interface *) &signal;
+    t.alias = alias();
+    t.bit_size = get_bits_number(signal);
+    t.nomSig = name;
+    sc_trace (tf, t, name);
+}
+
+
+
+#define DEF_SC_TRACE(T) /*inline \*/       \
+    extern void sc_trace (sc_trace_file *, \
+        const T & object,                  \
+        const std::string &);
+
+    DEF_SC_TRACE(bool)
+    DEF_SC_TRACE(float)
+    DEF_SC_TRACE(double)
+    DEF_SC_TRACE(unsigned char)
+    DEF_SC_TRACE(unsigned short)
+    DEF_SC_TRACE(unsigned int)
+    DEF_SC_TRACE(unsigned long)
+    DEF_SC_TRACE(char)
+    DEF_SC_TRACE(short)
+    DEF_SC_TRACE(int)
+    DEF_SC_TRACE(long)
+    DEF_SC_TRACE(uint64)
+    DEF_SC_TRACE(int64)
 #undef DEF_SC_TRACE
 
 } // end of sc_core namespace
 
-//----------------------------------------------------------------------------
+
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_uint.h
===================================================================
--- /sources/src/sc_uint.h	(revision 51)
+++ /sources/src/sc_uint.h	(revision 52)
@@ -10,4 +10,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_UINT_H__
 #define __SC_UINT_H__
@@ -32,43 +33,59 @@
 typedef sc_uint<1> sc_uint_bit_ref_r;
 
+
 // --------------------------------
 // CLASS : sc_uint_subref_r
 //
 // Used for range, concat functions
-class sc_uint_subref_r
-{
-  template <int W> friend class sc_dt::sc_uint;
-  int       left, right;
-  public : uint64    val;
-  sc_uint_subref_r (uint64 val_, int left_, int right_)
-  {
-    val = val_; left = left_; right = right_;
-  }
-  public:
-  inline uint64 read () const { return val; }
-  inline const sc_uint_subref_r& operator | (const sc_uint_subref_r &v) const
-  { print_warning (); return *this; }
-
-  private :void print_warning () const;
+// --------------------------------
+
+class sc_uint_subref_r {
+    template <int W> friend class sc_dt::sc_uint;
+    int left, right;
+    public :
+    uint64 val;
+    sc_uint_subref_r(uint64 val_, int left_, int right_) {
+        val = val_;
+        left = left_;
+        right = right_;
+    }
+
+    public:
+    inline uint64 read() const {
+        return val;
+    }
+
+    inline const sc_uint_subref_r & operator | (const sc_uint_subref_r & v) const {
+        print_warning();
+        return *this;
+    }
+
+    private:
+    void print_warning() const;
+
 };
 
-//
-#define MASK32(W) ((~ (const uint32)0) >> (sizeof (uint32) * 8 - W))
-#define MASK64(W) ((~ (const uint64)0) >> (sizeof (uint64) * 8 - W))
-//
-
-template<int W> struct s_uint_type { typedef uint64 uint_type;};
+
+#define MASK32(W) ((~ (const uint32)0) >> (sizeof(uint32) * 8 - W))
+#define MASK64(W) ((~ (const uint64)0) >> (sizeof(uint64) * 8 - W))
+
+
+template<int W> struct s_uint_type {
+    typedef uint64 uint_type;
+};
+
 #define DECLAR_UINT_TYPE(W) template<> struct s_uint_type<W> { typedef smallest_uint uint_type; }// not declared as uint16 because << operator threats like a character
-DECLAR_UINT_TYPE( 1);
-DECLAR_UINT_TYPE( 2);
-DECLAR_UINT_TYPE( 3);
-DECLAR_UINT_TYPE( 4);
-DECLAR_UINT_TYPE( 5);
-DECLAR_UINT_TYPE( 6);
-DECLAR_UINT_TYPE( 7);
-DECLAR_UINT_TYPE( 8);
+DECLAR_UINT_TYPE(1);
+DECLAR_UINT_TYPE(2);
+DECLAR_UINT_TYPE(3);
+DECLAR_UINT_TYPE(4);
+DECLAR_UINT_TYPE(5);
+DECLAR_UINT_TYPE(6);
+DECLAR_UINT_TYPE(7);
+DECLAR_UINT_TYPE(8);
 #undef DECLAR_UINT_TYPE
+
 #define DECLAR_UINT_TYPE(W) template<> struct s_uint_type<W> { typedef uint16 uint_type; }
-DECLAR_UINT_TYPE( 9);
+DECLAR_UINT_TYPE(9);
 DECLAR_UINT_TYPE(10);
 DECLAR_UINT_TYPE(11);
@@ -79,4 +96,5 @@
 DECLAR_UINT_TYPE(16);
 #undef DECLAR_UINT_TYPE
+
 #define DECLAR_UINT_TYPE(W) template<> struct s_uint_type<W> { typedef uint32 uint_type; }
 DECLAR_UINT_TYPE(17);
@@ -98,151 +116,190 @@
 #undef DECLAR_UINT_TYPE
 
+
 class sc_uint_subref_r;
 
-template<int W>     /* width of data type = SC_INTWIDTH */
-class sc_uint
-{
-  /***********************/
-  /* SYSTEMCASS SPECIFIC */
-  /***********************/
-  typedef sc_uint<W>                         this_type;
-  typedef typename s_uint_type<W>::uint_type data_type;
-
-  typedef data_type sc_uint_subref;
-//typedef data_type sc_uint_subref_r; 
-    /* removed since "operator ," was going wrong */
-
-// internal
-	union {
-    val_field<W,(sizeof (data_type) * 8) - W,data_type> vf; /* To compute */
-		data_type val;          /* To return an int reference (read function) */
-//	  data_type valW:W; /* works with little endianess only */
-//  bool      valB[W]; /* removed since 1 bool takes 1 byte */
-	};
-
-  /***********************/
-  /*        L R M        */
-  /***********************/
-public:
-  sc_uint ()                { val = 0; }
-//  sc_uint (data_type val_)  { val = 0; write (val_); }
-  sc_uint (const char *a)   { val = 0; write (std::atoi (a)); }
-  sc_uint (unsigned short a){ val = 0; write (a); }
-  sc_uint (short a)         { val = 0; write (a); }
-  sc_uint (unsigned long a) { val = 0; write (a); }
-  sc_uint (long a)          { val = 0; write (a); }
-  sc_uint (unsigned int a)  { val = 0; write (a); }
-  sc_uint (int a)           { val = 0; write (a); }
-  sc_uint (int64 a)         { val = 0; write (a); }
-  sc_uint (uint64 a)        { val = 0; write (a); }
-  sc_uint (double a)        { val = 0; write (a); }
-
-  template <int W2> sc_uint (const sc_uint<W2> &val_) { val = 0; write (val_.read());}
-  /* this template doesn't redefine default copy constructor of sc_uint.
-   * So, we define by this way 
-   */
-  sc_uint (const sc_uint &val_)          { val = 0; write (val_.read()); }
-  sc_uint (const sc_uint_subref_r &val_) { val = 0; write (val_.read()); } 
+
+/* width of data type = SC_INTWIDTH */
+template<int W>
+class sc_uint {
+
+    /***********************/
+    /* SYSTEMCASS SPECIFIC */
+    /***********************/
+    typedef sc_uint<W> this_type;
+    typedef typename s_uint_type<W>::uint_type data_type;
+    typedef data_type sc_uint_subref;
+    //typedef data_type sc_uint_subref_r; /* removed since "operator ," was going wrong */
+
+
+    // internal
+    union {
+        val_field<W, (sizeof(data_type) * 8) - W, data_type> vf; /* To compute */
+        data_type val;          /* To return an int reference (read function) */
+        // data_type valW: W; /* works with little endianess only */
+        // bool valB[W];  /* removed since 1 bool takes 1 byte */
+    };
+
+    /***********************/
+    /*        L R M        */
+    /***********************/
+    public:
+    sc_uint()                 { val = 0; }
+    //  sc_uint(data_type val_)  { val = 0; write (val_); }
+    sc_uint(const char * a)   { val = 0; write(std::atoi(a)); }
+    sc_uint(unsigned short a) { val = 0; write(a); }
+    sc_uint(short a)          { val = 0; write(a); }
+    sc_uint(unsigned long a)  { val = 0; write(a); }
+    sc_uint(long a)           { val = 0; write(a); }
+    sc_uint(unsigned int a)   { val = 0; write(a); }
+    sc_uint(int a)            { val = 0; write(a); }
+    sc_uint(int64 a)          { val = 0; write(a); }
+    sc_uint(uint64 a)         { val = 0; write(a); }
+    sc_uint(double a)         { val = 0; write(a); }
+
+
+    template <int W2> sc_uint(const sc_uint<W2> & val_) {
+        val = 0;
+        write(val_.read());
+    }
+    
+    /* this template doesn't redefine default copy constructor of sc_uint.
+     * So, we define by this way 
+     */
+    sc_uint(const sc_uint & val_)          { val = 0; write(val_.read()); }
+    sc_uint(const sc_uint_subref_r & val_) { val = 0; write(val_.read()); } 
     /* the user needs to cast explicitly result of range () method. */
 
-  /***********************/
-  /* SYSTEMCASS SPECIFIC */
-  /***********************/
-  // read/write
-  inline const data_type& read() const { return val; }
-  inline void write(data_type val_)    { vf.valW = val_; }
-  template <int W2> inline void write (const sc_uint<W2> val_) { write (val_.read()); }
-//inline void write (const sc_uint<W> val_) { write (val_.read()); }
-  inline void write (const sc_uint_subref_r& s) { write (s.read()); }
-
-  /***********************/
-  /*        L R M        */
-  /***********************/
-  // operators
-  inline operator const data_type& () const { return read (); }
-//  inline void write(uint64 val_) { val = val_ & MASK64(W); }
-//  inline void write(unsigned int val_)   { val = val_ & MASK32(W); }
-	template <typename T> inline sc_uint& operator = (const T& val_) 
-  { write (val_); return *this; }
-	inline sc_uint& operator = (const sc_uint_subref_r& a) 
-  { write (a);    return *this; }
-
-  // explicit conversions
-  inline uint32         to_uint   () const {return val & MASK32(W);}
-  inline int32          to_int    () const {return val & MASK32(W);}
-  inline uint64         to_uint64 () const {return val & MASK64(W);}
-  inline int64          to_int64  () const {return val & MASK64(W);}
-  
-  // explicit conversion to character string 
-  const sc_string to_string       ( sc_numrep numrep = SC_DEC ) const 
-  { return sc_dt::to_string (val, W, numrep); }
-  const sc_string to_dec() const  { return to_string (SC_DEC); }
-  const sc_string to_bin() const  { return to_string (SC_BIN); }
-  const sc_string to_oct() const  { return to_string (SC_OCT); }
-  const sc_string to_hex() const  { return to_string (SC_HEX); }
-
-  // arithmetic
-#define DEFINE_OPERATOR(OPER)        \
-  template <typename T>              \
-  inline sc_uint& operator OPER (T v)\
-  { vf.valW OPER v; return *this; }
-
-  DEFINE_OPERATOR(<<=)
-  DEFINE_OPERATOR(>>=)
-  DEFINE_OPERATOR(+=)
-  DEFINE_OPERATOR(-=)
-  DEFINE_OPERATOR(*=)
-  DEFINE_OPERATOR(/=)
-  DEFINE_OPERATOR(%=)
-  DEFINE_OPERATOR(&=)
-  DEFINE_OPERATOR(|=)
-  DEFINE_OPERATOR(^=)
+    /***********************/
+    /* SYSTEMCASS SPECIFIC */
+    /***********************/
+    // read/write
+    inline const data_type & read() const {
+        return val;
+    }
+
+    inline void write(data_type val_) {
+        vf.valW = val_;
+    }
+
+    template <int W2> inline void write(const sc_uint<W2> val_) {
+        write(val_.read());
+    }
+
+    // inline void write(const sc_uint<W> val_) {
+    //     write(val_.read());
+    // }
+    
+    inline void write(const sc_uint_subref_r & s) {
+        write(s.read());
+    }
+
+
+    /***********************/
+    /*        L R M        */
+    /***********************/
+    // operators
+    inline operator const data_type & () const { 
+        return read();
+    }
+
+    // inline void write(uint64 val_) {
+    //     val = val_ & MASK64(W);
+    // }
+    // inline void write(unsigned int val_) {
+    //     val = val_ & MASK32(W);
+    // }
+    
+    template < typename T > inline sc_uint & operator = (const T & val_) {
+        write(val_);
+        return *this;
+    }
+
+    inline sc_uint & operator = (const sc_uint_subref_r & a) {
+        write(a);
+        return *this;
+    }
+
+    // explicit conversions
+    inline uint32 to_uint()   const { return val & MASK32(W); }
+    inline int32  to_int()    const { return val & MASK32(W); }
+    inline uint64 to_uint64() const { return val & MASK64(W); }
+    inline int64  to_int64()  const { return val & MASK64(W); }
+
+    // explicit conversion to character string 
+    const sc_string to_string(sc_numrep numrep = SC_DEC) const {
+        return sc_dt::to_string(val, W, numrep);
+    }
+    const sc_string to_dec() const { return to_string(SC_DEC); }
+    const sc_string to_bin() const { return to_string(SC_BIN); }
+    const sc_string to_oct() const { return to_string(SC_OCT); }
+    const sc_string to_hex() const { return to_string(SC_HEX); }
+
+
+    // arithmetic
+#define DEFINE_OPERATOR(OPER)            \
+    template < typename T >              \
+    inline sc_uint & operator OPER (T v) \
+    { vf.valW OPER v; return *this; }
+
+    DEFINE_OPERATOR(<<=)
+    DEFINE_OPERATOR(>>=)
+    DEFINE_OPERATOR(+=)
+    DEFINE_OPERATOR(-=)
+    DEFINE_OPERATOR(*=)
+    DEFINE_OPERATOR(/=)
+    DEFINE_OPERATOR(%=)
+    DEFINE_OPERATOR(&=)
+    DEFINE_OPERATOR(|=)
+    DEFINE_OPERATOR(^=)
 #undef DEFINE_OPERATOR
 
+
+    inline sc_uint_bit_ref operator [] (int v) {
+        return (vf.valW >> v) & 1;
+    }
+
+    inline sc_uint_bit_ref_r operator [] (int v) const {
+        return (vf.valW >> v) & 1;
+    }
+
+    template <int W2> 
+    inline sc_uint<W + W2> operator , (const sc_uint<W2> & b) const {
+        sc_uint<W + W2> res = read() << W2;
+        res += b.read();
+        return res;
+    }
+
+    inline sc_uint<W + 1> operator , (bool b) const {
+        sc_uint<W + 1> res = read();
+        res <<= 1;
+        res += b;
+        return res;
+    }
+
+    template <int W2>
+    inline sc_uint<W2> operator , (const sc_uint_subref_r & v) const {
+        std::cerr << "Warning : \n"; // ??
+        return sc_uint<W2> (v.read());
+    }
+
+    inline sc_uint_subref range(int left, int right) {
+        return (data_type) ((data_type) (((data_type) ~(0)) >> (sizeof(data_type) * 8 - left - 1)) & val) >> right;
+    }
+
+    inline sc_uint_subref_r range(int left, int right) const {
+        return sc_uint_subref_r (((data_type) (((data_type) ~(0)) >> (sizeof(data_type) * 8 - left - 1)) & val) >> right, left, right);
+    }
+
 #if 0
-#define DEFINE_OPERATOR(OPER)                                              \
-  friend bool operator OPER (const data_type& a, const data_type& b);
-//  { return (a.valW) OPER (b.valW); }
-
-  DEFINE_OPERATOR(==)
-  DEFINE_OPERATOR(!=)
-  DEFINE_OPERATOR(>=)
-  DEFINE_OPERATOR(<=)
-#undef DEFINE_OPERATOR
+    std::cerr << "range(" << left << "," << right << ")\n";
+    std::cerr << "val = " << val << "\n";
+    std::cerr << "~0 >> " << (sizeof (data_type) * 8 - left - 1) << " = " << (data_type) (((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) << "\n";
+    std::cerr <<  ((data_type) ((((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) & val) >> right) << "\n";
+    std::cerr << "data_type = " << sizeof (data_type) << "\n";
 #endif
-  inline sc_uint_bit_ref operator [] (int v)
-  { return (vf.valW >> v) & 1; }
-  inline sc_uint_bit_ref_r operator [] (int v) const
-  { return (vf.valW >> v) & 1; }
-
-  template <int W2> 
-  inline sc_uint<W+W2> operator , (const sc_uint<W2> &b) const
-  { sc_uint<W+W2> res = read() << W2; res += b.read(); return res; }
-#if 0 
-std::cerr << "[" << to_bin() << "," << b.to_bin() << " = " << res.to_bin() << "]\n"; 
-#endif
-
-  inline sc_uint<W+1> operator , (bool b) const
-  { sc_uint<W+1> res = read(); res <<= 1; res += b; return res; }
-#if 0 
-std::cerr << "[" << to_bin() << "," << b.to_bin() << " = " << res.to_bin() << "]\n"; 
-#endif
-
-  template <int W2>
-  inline sc_uint<W2> operator , (const sc_uint_subref_r &v) const
-  { std::cerr << "Warning : \n"; return sc_uint<W2> (v.read()); }
-
-  inline sc_uint_subref range (int left, int right)
-  { return (data_type)((data_type) (((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) & val) >> right; }
-
-  inline sc_uint_subref_r range (int left, int right) const
-  { return sc_uint_subref_r (((data_type) (((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) & val) >> right, left, right); }
-#if 0
-std::cerr << "range(" << left << "," << right << ")\n";
-std::cerr << "val = " << val << "\n";
-std::cerr << "~0 >> " << (sizeof (data_type) * 8 - left - 1) << " = " << (data_type) (((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) << "\n";
-std::cerr <<  ((data_type) ((((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) & val) >> right) << "\n";
-std::cerr << "data_type = " << sizeof (data_type) << "\n";
-#endif
+    
+#undef MASK32
+#undef MASK64
 
 }; 
@@ -250,8 +307,9 @@
 //
 // no sign flag to threat
-//
-
-inline std::ostream& operator << (std::ostream &o, const sc_uint_subref_r& s)
-{ return o << s.val; }
+
+inline std::ostream & operator << (std::ostream & o, const sc_uint_subref_r & s) {
+    return o << s.val;
+}
+
 
 } /* end of sc_dt namespace */
@@ -259,2 +317,13 @@
 #endif /* __SC_UINT_H__ */
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_uint_subref_r.cc
===================================================================
--- /sources/src/sc_uint_subref_r.cc	(revision 51)
+++ /sources/src/sc_uint_subref_r.cc	(revision 52)
@@ -35,5 +35,7 @@
 
 #include <iostream>
+
 #include "sc_uint.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -42,15 +44,22 @@
 using namespace std;
 
-void
-sc_dt::sc_uint_subref_r::print_warning () const
-{
-  cerr << "Warning :\n"
-  "  SystemCASS need you to cast explicitly result of range() method.\n";
-  cerr << "  Result Type of range(" << left << "," << right << ")"
-          " shoud be sc_uint<" << left - right + 1 << "> in this case.\n";
-  exit (23);
+void sc_dt::sc_uint_subref_r::print_warning() const {
+    cerr << "Warning :\nSystemCASS needs you to cast explicitly the result of range() method.\n";
+    cerr << "  Result Type of range(" << left << "," << right << ")"
+        " shoud be sc_uint<" << left - right + 1 << "> in this case.\n";
+    exit (23);
 }
 
 
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
 
Index: /sources/src/sc_unit.h
===================================================================
--- /sources/src/sc_unit.h	(revision 51)
+++ /sources/src/sc_unit.h	(revision 52)
@@ -10,4 +10,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_UNIT_H__
 #define __SC_UNIT_H__
@@ -25,2 +26,14 @@
 
 #endif /* __SC_UNIT_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_unsigned.h
===================================================================
--- /sources/src/sc_unsigned.h	(revision 51)
+++ /sources/src/sc_unsigned.h	(revision 52)
@@ -10,6 +10,8 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SC_UNSIGNED_H__
 #define __SC_UNSIGNED_H__
+
 
 // ----------------------------------------------------------------------------
@@ -28,2 +30,14 @@
 
 #endif /* __SC_UNSIGNED_H__ */
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_vcd_trace.cc
===================================================================
--- /sources/src/sc_vcd_trace.cc	(revision 51)
+++ /sources/src/sc_vcd_trace.cc	(revision 52)
@@ -35,4 +35,8 @@
  */
 
+#include <cstdio>
+#include <cassert>
+#include <ctime>
+#include <string>
 
 #include "sc_trace.h"
@@ -41,14 +45,8 @@
 #include "internal.h"
 
-#include <cstdio>
-#include <cassert>
-#include <ctime>
-#include <string>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-//-----------------------------------------*/
 
 using namespace std;
@@ -58,49 +56,45 @@
 //-----------------------------------------*/
 
-sc_trace_file*
-sc_create_vcd_trace_file(const char * name)
-{
-  if (notrace)
-    return NULL;
-  assert(name != NULL);
-	string filename;
-	filename = name;
-	filename += ".vcd";
-	//char varToday[1024];system(varToday=echo `date`);
-	
-	//création d'1 instance de la structure Sc_trace_file:
-	sc_trace_file *traceFic=new sc_trace_file();
-	traceFic->flag = VCD_FORMAT;	
-	
-	trace_file_list.push_back(traceFic);
-	
-	//en-tête du fichier VCD:
-	char entete[]="$date\n\t%s\n$end\n\n$version\n\t%s\n$end\n\n$timescale\n\t1 ps\n$end\n\n$scope module SystemC $end\n";
-	
-	//ouverture du fichier nommé "*name":
-	traceFic->pfic=fopen(filename.c_str(),"w+");//on a un pointeur sur le fichier
-	if((traceFic->pfic)==NULL)
-	{
-		/* fopen renvoie NULL si erreur */
-		fprintf(stderr,"\n\terreur ouverture outVcd\n");
-		exit(15);
-	}
+sc_trace_file * sc_create_vcd_trace_file(const char * name) {
+    if (notrace) {
+        return NULL;
+    }
+    assert(name != NULL);
+    string filename;
+    filename = name;
+    filename += ".vcd";
 
-  char date[128];	
-  time_t timep = time (NULL);
-  const struct tm *tm = localtime (&timep);
-  strftime (date, 128, "%A %d %B %y %Z - %R:%S -", tm); 
+    // Création d'une instance de la structure Sc_trace_file:
+    sc_trace_file * traceFic = new sc_trace_file();
+    traceFic->flag = VCD_FORMAT;
 
-	//écriture de l'en-tête du format VCD:
-	if ((fprintf(traceFic->pfic,entete, date, sc_version ()))==0)
-		{
-			/* fprintf renvoie 0 si erreur */
-			cerr << "\n\terreur ecriture de l'entete \n";
-			exit(2);
-		}
-	
-	//on retourne un pointeur sur la structure traceFile
-	//dont un des éléments pointe sur notre fichier VCD:
-	return traceFic;
+    trace_file_list.push_back(traceFic);
+
+    //en-tête du fichier VCD:
+    char entete[] = "$date\n\t%s\n$end\n\n$version\n\t%s\n$end\n\n$timescale\n\t1 ps\n$end\n\n$scope module SystemC $end\n";
+
+    //ouverture du fichier nommé "*name":
+    traceFic->pfic = fopen(filename.c_str(), "w+");//on a un pointeur sur le fichier
+    if ((traceFic->pfic) == NULL) {
+        /* fopen renvoie NULL si erreur */
+        fprintf(stderr, "\n\terreur ouverture outVcd\n");
+        exit(15);
+    }
+
+    char date[128];
+    time_t timep = time(NULL);
+    const struct tm * tm = localtime(&timep);
+    strftime(date, 128, "%A %d %B %y %Z - %R:%S -", tm); 
+
+    //écriture de l'en-tête du format VCD:
+    if ((fprintf(traceFic->pfic, entete, date, sc_version())) == 0) {
+        /* fprintf renvoie 0 si erreur */
+        cerr << "\n\terreur ecriture de l'entete \n";
+        exit(2);
+    }
+
+    //on retourne un pointeur sur la structure traceFile
+    //dont un des éléments pointe sur notre fichier VCD:
+    return traceFic;
 }
 
@@ -108,42 +102,50 @@
 //*************************************************************************
 
-void
-sc_close_vcd_trace_file( sc_trace_file* traceFic )
-{	
-  if (notrace)
-    return;
-  if (!traceFic)
-  {
-    cerr << "Warning : Unable to close vcd trace file.\n";
-    return;
-  }
+void sc_close_vcd_trace_file(sc_trace_file * traceFic) {
+    if (notrace) {
+        return;
+    }
+    if (!traceFic) {
+        cerr << "Warning : Unable to close vcd trace file.\n";
+        return;
+    }
 
-  if (cpt >= trace_start)
-  {
-    trace (*traceFic,false);
-    cpt++;
-    trace (*traceFic,true);
-  }
+    if (cpt >= trace_start) {
+        trace (*traceFic, false);
+        cpt++;
+        trace (*traceFic, true);
+    }
 
-	//fermeture fichier VCD
-	if (fclose(traceFic->pfic))
-	{
-		/* fclose renvoie 0 si OK */
-		perror("\n\tclosing VCD file.");
-		exit(4);
-	}
+    //fermeture fichier VCD
+    if (fclose(traceFic->pfic)) {
+        /* fclose renvoie 0 si OK */
+        perror("\n\tclosing VCD file.");
+        exit(4);
+    }
 
-	//libération de l'instance de la structure en mémoire:
-	delete traceFic;
+    //libération de l'instance de la structure en mémoire:
+    delete traceFic;
 
-	vector<sc_trace_file*>::iterator i;
-	for (i = trace_file_list.begin (); i != trace_file_list.end(); ++i)
-		if (*i == traceFic) {
-			trace_file_list.erase(i);
-			break;
-		}
+    vector<sc_trace_file *>::iterator i;
+    for (i = trace_file_list.begin(); i != trace_file_list.end(); ++i) {
+        if (*i == traceFic) {
+            trace_file_list.erase(i);
+            break;
+        }
+    }
+}
 
-}
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_vcd_trace.h
===================================================================
--- /sources/src/sc_vcd_trace.h	(revision 51)
+++ /sources/src/sc_vcd_trace.h	(revision 52)
@@ -11,4 +11,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef SC_VCD_TRACE_H
 #define SC_VCD_TRACE_H
@@ -16,10 +17,9 @@
 #include "sc_fwd.h"
 
-// ----------------------------------------------------------------------------
 namespace sc_core {
 
 // Create VCD file
-extern sc_trace_file *sc_create_vcd_trace_file(const char* name);
-extern void sc_close_vcd_trace_file( sc_trace_file* tf );
+extern sc_trace_file * sc_create_vcd_trace_file(const char * name);
+extern void sc_close_vcd_trace_file(sc_trace_file * tf);
 
 } // end of sc_core namespace
@@ -29,2 +29,14 @@
 
 #endif
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_ver.cc
===================================================================
--- /sources/src/sc_ver.cc	(revision 51)
+++ /sources/src/sc_ver.cc	(revision 52)
@@ -35,8 +35,9 @@
  */
 
-#include "sc_ver.h"
 #include <iostream>
 #include <cstring> //strcmp
 #include <cstdlib> //exit
+
+#include "sc_ver.h"
 
 #ifdef HAVE_CONFIG_H
@@ -44,74 +45,81 @@
 #endif
 
+
 namespace sc_core {
 
-static
-const char copyright[] =
+
+static const char copyright[] =
     "        Copyright (c) 2003-2009 by all Contributors\n"
     "                    ALL RIGHTS RESERVED";
 
-static
-const char systemc_version[] =
+static const char systemc_version[] =
     PACKAGE_STRING " --- Compilation date : " __DATE__ " " __TIME__;
 
-static 
-const char splash_screen[] =
-	" ____            _                  ____    _    ____ ____  \n"
-	"/ ___| _   _ ___| |_ ___ _ __ ___  / ___|  / \\  / ___/ ___| \n"
-	"\\___ \\| | | / __| __/ _ \\ '_ ` _ \\| |     / _ \\ \\___ \\___ \\ \n"
-	" ___) | |_| \\__ \\ ||  __/ | | | | | |___ / ___ \\ ___) |__) |\n"
-	"|____/ \\__, |___/\\__\\___|_| |_| |_|\\____/_/   \\_\\____/____/ \n"
-	"       |___/                                                \n"
-	"\n"
-	"         Cycle Accurate System Simulator\n"
+static const char splash_screen[] =
+    " ____            _                  ____    _    ____ ____  \n"
+    "/ ___| _   _ ___| |_ ___ _ __ ___  / ___|  / \\  / ___/ ___| \n"
+    "\\___ \\| | | / __| __/ _ \\ '_ ` _ \\| |     / _ \\ \\___ \\___ \\ \n"
+    " ___) | |_| \\__ \\ ||  __/ | | | | | |___ / ___ \\ ___) |__) |\n"
+    "|____/ \\__, |___/\\__\\___|_| |_| |_|\\____/_/   \\_\\____/____/ \n"
+    "       |___/                                                \n"
+    "\n"
+    "         Cycle Accurate System Simulator\n"
 #ifdef CONFIG_DEBUG
-  "            DEBUG version\n"
+    "            DEBUG version\n"
 #endif
 #ifdef USE_PORT_DEPENDENCY
-  "            using explicit port dependancy\n"
+    "            using explicit port dependancy\n"
 #endif
-	"            ASIM/LIP6/UPMC\n"
-	"            E-mail support:  Richard.Buchmann@asim.lip6.fr\n"
-	"            Contributors : Richard Buchmann, Sami Taktak,\n"
-  "                           Paul-Jerome Kingbo, Frederic Pétrot,\n"
-  "                           Nicolas Pouillon\n"
-	"\n"
-	"                           Last change : " __DATE__ "\n"
-	"\n";
+    "            ASIM/LIP6/UPMC\n"
+    "            E-mail support:  Richard.Buchmann@asim.lip6.fr\n"
+    "            Contributors : Richard Buchmann, Sami Taktak,\n"
+    "                           Paul-Jerome Kingbo, Frederic Pétrot,\n"
+    "                           Nicolas Pouillon\n"
+    "\n"
+    "                           Last change : " __DATE__ "\n"
+    "\n";
 
-const char*
-sc_copyright()
-{
+
+const char * sc_copyright() {
     return copyright;
 }
 
-const char*
-sc_version()
-{
+
+const char * sc_version() {
     return systemc_version;
 }
 
-const char*
-get_splash_screen()
-{
+
+const char * get_splash_screen() {
     return splash_screen;
 }
 
+
 } // end of sc_core namespace
 
-bool
-casc_check_version (const char *runtime_ver)
-{
-  const char *lib_version = SYSTEMC_VERSION;
-  bool right_version =  strcmp (runtime_ver, lib_version) == 0;
-  if (right_version == false)
-  {
-    std::cerr << "Current SystemCASS library version doesn't match.\n";
-    std::cerr << "SystemCASS linked library is : " << lib_version << "\n";
-    std::cerr << "SystemCASS environnement variable points to : " << runtime_ver << "\n";
-    exit(125);
-  }
- 
-  return true;
+
+bool casc_check_version(const char * runtime_ver) {
+    const char * lib_version = SYSTEMC_VERSION;
+    bool right_version = strcmp(runtime_ver, lib_version) == 0;
+    if (right_version == false) {
+        std::cerr << "Current SystemCASS library version doesn't match.\n";
+        std::cerr << "SystemCASS linked library is : " << lib_version << "\n";
+        std::cerr << "SystemCASS environnement variable points to : " << runtime_ver << "\n";
+        exit(125);
+    }
+
+    return true;
 }
 
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_ver.h
===================================================================
--- /sources/src/sc_ver.h	(revision 51)
+++ /sources/src/sc_ver.h	(revision 52)
@@ -11,4 +11,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef SC_VER_H
 #define SC_VER_H
@@ -16,9 +17,22 @@
 #include "sc_ver_ext.h"
 
+
 namespace sc_core {
 
-extern const char* get_splash_screen();
+extern const char * get_splash_screen();
 
 } // end of sc_core
 
 #endif
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/sc_ver_ext.h
===================================================================
--- /sources/src/sc_ver_ext.h	(revision 51)
+++ /sources/src/sc_ver_ext.h	(revision 52)
@@ -42,8 +42,9 @@
 #include "systemcass_version_ext.h"
 
+
 namespace sc_core {
 
-extern const char* sc_copyright();
-extern const char* sc_version();
+extern const char * sc_copyright();
+extern const char * sc_version();
 
 } // end of sc_core
@@ -54,2 +55,13 @@
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/schedulers.cc
===================================================================
--- /sources/src/schedulers.cc	(revision 51)
+++ /sources/src/schedulers.cc	(revision 52)
@@ -35,4 +35,9 @@
  */
 
+#include <cstdio>
+#include <cassert>
+#include <iostream>
+#include <algorithm> //std::sort
+
 #include "sc_module.h" // method_process_t
 #include "gen_code.h"  // gen_scheduling_code_for_dynamic_link & gen_scheduling_code_for_static_func
@@ -43,10 +48,4 @@
 #include "mouchard_scheduling.h" // MakeMouchardScheduling
 #include "graph_signals.h" // makegraph
-//#include "module_hierarchy2dot.h"
-
-#include <cstdio>
-#include <cassert>
-#include <iostream>
-#include <algorithm> //std::sort
 
 #ifdef HAVE_CONFIG_H
@@ -63,11 +62,10 @@
 
 template <typename T>
-ostream& operator << (ostream &o, const vector<T*> &v)
-{
-  typename vector<T*>::const_iterator i;
-  for (i = v.begin(); i != v.end(); ++i) {
-    o << **i << " ";
-  }
-  return o;
+ostream & operator << (ostream & o, const vector<T*> & v) {
+    typename vector<T *>::const_iterator i;
+    for (i = v.begin(); i != v.end(); ++i) {
+        o << **i << " ";
+    }
+    return o;
 }
 
@@ -76,5 +74,4 @@
 /****************/
 
-//
 // sort_functions splits and sorts instances_list into three functions lists : 
 method_process_list_t transition_func_list;
@@ -82,68 +79,13 @@
 method_process_list_t combinational_func_list;
 
-#if 0
-static
-bool
-isCostly (const char *n)
-{
-  const char *costly[] = {/*"vgmn", */"mips", "cache", NULL};
-  int i = 0;
-  do {
-    if (strstr (n, costly[i]) != NULL)
-      return true;
-  } while (costly[++i] != NULL);
-  return false;
-}
-
-static
-bool 
-only_sort_by_module_ptr (const method_process_t *a1, 
-                         const method_process_t *a2)
-{
-  assert(a1 != NULL);
-  assert(a2 != NULL);
-  sc_module *m1 = a1->module;
-  sc_module *m2 = a2->module;
-  const char* n1 = m1->basename ();
-  const char* n2 = m2->basename ();
-  bool        h1 = isCostly (n1);
-  bool        h2 = isCostly (n2);
-  if ((h1 ^ h2) == true)
-    return h1 > h2;
-  if (a1->module == a2->module)
-  {
-    union {
-        SC_ENTRY_FUNC func;
-        unsigned long addr_l;
-        unsigned long long addr_ll;
-    } addr1, addr2;
-    addr1.func = a1->func;
-    addr2.func = a2->func;
-    assert(addr1.addr_ll != addr2.addr_ll);
-    if ( sizeof(SC_ENTRY_FUNC) == 4 ) {
-        return (addr1.addr_l < addr2.addr_l);
-    } else {
-        return (addr1.addr_ll < addr2.addr_ll);
-    }
-  }
-  return (a1->module < a2->module);
-}
-#endif
-#if 1
-static
-bool 
-sort_by_module_ptr (const method_process_t *a1, 
-                    const method_process_t *a2)
-{
-  assert(a1 != NULL);
-  assert(a2 != NULL);
-  return (a1->module < a2->module);
-}
-
-static
-bool 
-sort_by_fct_ptr (const method_process_t *a1, 
-                 const method_process_t *a2)
-{
+
+static bool sort_by_module_ptr (const method_process_t * a1, const method_process_t * a2) {
+    assert(a1 != NULL);
+    assert(a2 != NULL);
+    return (a1->module < a2->module);
+}
+
+
+static bool sort_by_fct_ptr (const method_process_t * a1, const method_process_t * a2) {
     assert(a1 != NULL);
     assert(a2 != NULL);
@@ -153,37 +95,39 @@
         unsigned long long addr_ll;
     } addr1, addr2;
+
     addr1.func = a1->func;
     addr2.func = a2->func;
-    if (a1->func == a2->func)
-      return sort_by_module_ptr (a1,a2);
-    if ( sizeof(SC_ENTRY_FUNC) == 4 ) {
+    
+    if (a1->func == a2->func) {
+        return sort_by_module_ptr(a1,a2);
+    }
+
+    if (sizeof(SC_ENTRY_FUNC) == 4 ) {
         return (addr1.addr_l < addr2.addr_l);
-    } else {
+    }
+    else {
         return (addr1.addr_ll < addr2.addr_ll);
     }
 }
-#endif
-void
-sort_functions ()
-{
-#if 0
-  cerr << method_process_list << endl;
-#endif
-  method_process_list_t::const_iterator m;
-  for (m = method_process_list.begin(); m != method_process_list.end(); ++m) {
-      if ((*m)->is_combinational()) combinational_func_list.push_back(*m);
-      else if ((*m)->is_transition ()) transition_func_list.push_back(*m);
-      else if ((*m)->is_genmoore ())   moore_func_list.push_back(*m);
-  }
-#if 1
-  // Sort transition functions by method pointer (1) and by module pointer (2)
-  std::sort (transition_func_list.begin(), transition_func_list.end(), sort_by_fct_ptr);
-  // Sort generation functions by method pointer (1) and by module pointer (2)
-  std::sort (moore_func_list.begin(), moore_func_list.end(), sort_by_fct_ptr);
-#endif
-#if 0
-  std::sort (transition_func_list.begin(), transition_func_list.end(), only_sort_by_module_ptr);
-  std::sort (moore_func_list.begin(), moore_func_list.end(), only_sort_by_module_ptr);
-#endif
+
+
+
+void sort_functions() {
+    method_process_list_t::const_iterator m;
+    for (m = method_process_list.begin(); m != method_process_list.end(); ++m) {
+        if ((*m)->is_combinational()) {
+            combinational_func_list.push_back(*m);
+        }
+        else if ((*m)->is_transition ()) {
+            transition_func_list.push_back(*m);
+        }
+        else if ((*m)->is_genmoore ()) {
+            moore_func_list.push_back(*m);
+        }
+    }
+    // Sort transition functions by method pointer (1) and by module pointer (2)
+    std::sort (transition_func_list.begin(), transition_func_list.end(), sort_by_fct_ptr);
+    // Sort generation functions by method pointer (1) and by module pointer (2)
+    std::sort (moore_func_list.begin(), moore_func_list.end(), sort_by_fct_ptr);
 }
 
@@ -192,158 +136,170 @@
 /* ****************** */
 
-static
-SignalDependencyGraph*
-MakeAcyclicSignalDependencyGraph ()
-{
-  if (dump_all_graph) {
-    const PortDependencyGraph &port_graph = get_port_dependency_graph ();
-    PortDependencyGraph2dot ("port_graph", port_graph);
-  }
-
-  SignalDependencyGraph* sig_graph = MakeSignalDependencyGraph ();
-
-  if (dump_all_graph)
-    SignalDependencyGraph2dot ("signal_graph",*sig_graph);
-
-  if (!Check (*sig_graph))
-  {
-    cerr << "The signal dependency graph is not valid.\n";
-    exit (29092004);
-  }
-
-#if 1
-  if (!Check (method_process_list,*sig_graph))
-  {
-    cerr << "Sensitivity list is not valid.\n";
-    exit (30092004);
-  }
-#endif
-  
-  // There is a cycle in the signal dependency graph ?
-  Graph *sig_knuth = makegraph (*sig_graph);
-  strong_component_list_t *s = strong_component(sig_knuth);
-
-  if (dump_all_graph)
-    SignalDependencyOrder2txt ("signal_order",*s);
-
-  if (has_cycle (*s))
-  {
-    cerr << "Error : There is a cycle in the signal dependency graph.\n";
-#if 0
-    print_cycle (cerr, get_cycle (*s));
-#endif
-    exit (24092004);
-  }
-  return sig_graph;
-}
-
-static
-ProcessDependencyList*
-MouchardScheduling ()
-{
-  SignalDependencyGraph *sig_graph = MakeAcyclicSignalDependencyGraph ();
-  assert(sig_graph != NULL);
-  // Create the process evaluation list
-  ProcessDependencyList* process_list = MakeMouchardScheduling (*sig_graph);
-  assert(process_list != NULL);
-
-  if (dump_all_graph)
-    ProcessDependencyList2dot  ("process_order",*process_list);
-
-  return process_list;
-}
-
-static
-ProcessDependencyList*
-BuchmannScheduling ()
-{
-  SignalDependencyGraph *sig_graph = MakeAcyclicSignalDependencyGraph ();
-  // Create the process evaluation list
-  ProcessDependencyList* process_list = MakeProcessDependencyList (*sig_graph);
-
-  if (dump_all_graph)
-    ProcessDependencyList2dot  ("process_order",*process_list);
-
-  return process_list;
-}
-
-string
-get_scheduling (int scheduling_method) 
-{
-  /* marque les fonctions comme fonction de mealy ou non */
-  if (dump_funclist_info)
-    cerr << "method process list : " << method_process_list << "\n";
-  sort_functions ();
-  if (dump_funclist_info)
-  {
-    cerr << "Transition functions : " << transition_func_list << "\n";
-    cerr << "Moore generation functions : " << moore_func_list << "\n";
-    cerr << "Mealy generation functions : " << combinational_func_list << "\n";
-  }
-
-  /* Schedule */ 
-  string base_name;
-  switch (scheduling_method) {
-  case BUCHMANN_SCHEDULING : {
-    // Generate the scheduled code, compile and link.
-    // Buchmann's thesis explains this scheduling method.
-    // Uses port dependancies like Dr. Mouchard.
-    ProcessDependencyList* process_list = BuchmannScheduling ();
-  if (dynamic_link_of_scheduling_code)
-    base_name = gen_scheduling_code_for_dynamic_link (transition_func_list, moore_func_list,*process_list);
-  else
-    gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list);
-    break;
-  }
-  case MOUCHARD_SCHEDULING : {
-    // Generate the scheduled code, compile and link.
-    // Mouchard's thesis explains this scheduling method.
-    // Uses port dependancies like Dr. Mouchard.
-    // CAUTION : unlike FastSysC, this scheduling is totally static 
-    // and does not use an event-driven scheduler.
-    ProcessDependencyList* process_list = MouchardScheduling ();
-  if (dynamic_link_of_scheduling_code)
-    base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*process_list);
-  else
-    gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list);
-    break;
-  }
-  case CASS_SCHEDULING : {
-    // Generate the scheduled code, compile and link
-    // Hommais's thesis explains this scheduling method (like CASS strategy)
-    // Doesn't use port dependancies
-    Graph *g = makegraph (&combinational_func_list);
-    if (dump_all_graph && g)
-      graph2dot("module_graph", *g);
-    strong_component_list_t *strong_list = strong_component (g);
-  if (dynamic_link_of_scheduling_code)
-    base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*strong_list);
-  else
-    gen_scheduling_code_for_quasistatic_func (transition_func_list, moore_func_list, *strong_list);
-    break;
-  }
-  default :
-    cerr << "Error : Unable to schedule SystemC process."
-            "Please select a scheduling method.\n";
-    exit (35);
-  }
-  return base_name;
-}
-
-bool
-run_schedule_editor (const char *schedule)
-{
-  char buf[128];
-  const char *editor = getenv ("EDITOR");
-  if (editor == NULL)
-    editor = "vim";
-  sprintf (buf, "(cd '%s' ; %s '%s')", temporary_dir, editor, schedule);
-  if (dump_stage)
-    cerr << "Executing : " << buf << endl;
-  return (system(buf) == 0);
-}
-
-/////////////////////////
+static SignalDependencyGraph * MakeAcyclicSignalDependencyGraph() {
+    if (dump_all_graph) {
+        const PortDependencyGraph & port_graph = get_port_dependency_graph ();
+        PortDependencyGraph2dot ("port_graph", port_graph);
+    }
+
+    SignalDependencyGraph * sig_graph = MakeSignalDependencyGraph();
+
+    if (dump_all_graph) {
+        SignalDependencyGraph2dot ("signal_graph",*sig_graph);
+    }
+
+    if (!Check(*sig_graph)) {
+        cerr << "The signal dependency graph is not valid.\n";
+        exit (29092004);
+    }
+
+    if (!Check(method_process_list, *sig_graph)) {
+        cerr << "Sensitivity list is not valid.\n";
+        exit (30092004);
+    }
+
+    // There is a cycle in the signal dependency graph ?
+    Graph * sig_knuth = makegraph(*sig_graph);
+    strong_component_list_t * s = strong_component(sig_knuth);
+
+    if (dump_all_graph) {
+        SignalDependencyOrder2txt("signal_order",*s);
+    }
+
+    if (has_cycle(*s)) {
+        cerr << "Error : There is a cycle in the signal dependency graph.\n";
+        exit (24092004);
+    }
+    return sig_graph;
+}
+
+
+static ProcessDependencyList * MouchardScheduling() {
+    SignalDependencyGraph * sig_graph = MakeAcyclicSignalDependencyGraph();
+    assert(sig_graph != NULL);
+    // Create the process evaluation list
+    ProcessDependencyList * process_list = MakeMouchardScheduling(*sig_graph);
+    assert(process_list != NULL);
+
+    if (dump_all_graph) {
+        ProcessDependencyList2dot  ("process_order", *process_list);
+    }
+
+    return process_list;
+}
+
+
+static ProcessDependencyList * BuchmannScheduling() {
+    SignalDependencyGraph * sig_graph = MakeAcyclicSignalDependencyGraph();
+    // Create the process evaluation list
+    ProcessDependencyList * process_list = MakeProcessDependencyList(*sig_graph);
+
+    if (dump_all_graph) {
+        ProcessDependencyList2dot("process_order", *process_list);
+    }
+
+    return process_list;
+}
+
+
+string get_scheduling(int scheduling_method) {
+    /* marque les fonctions comme fonction de mealy ou non */
+    if (dump_funclist_info) {
+        cerr << "method process list : " << method_process_list << "\n";
+    }
+
+    sort_functions();
+    if (dump_funclist_info) {
+        cerr << "Transition functions : " << transition_func_list << "\n";
+        cerr << "Moore generation functions : " << moore_func_list << "\n";
+        cerr << "Mealy generation functions : " << combinational_func_list << "\n";
+    }
+
+    /* Schedule */ 
+    string base_name;
+    switch (scheduling_method) {
+        case BUCHMANN_SCHEDULING :
+        {
+            // Generate the scheduled code, compile and link.
+            // Buchmann's thesis explains this scheduling method.
+            // Uses port dependancies like Dr. Mouchard.
+            ProcessDependencyList * process_list = BuchmannScheduling();
+            if (dynamic_link_of_scheduling_code) {
+                base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list, *process_list);
+            }
+            else {
+                gen_scheduling_code_for_static_func(transition_func_list, moore_func_list, *process_list);
+            }
+            break;
+        }
+
+        case MOUCHARD_SCHEDULING :
+        {
+            // Generate the scheduled code, compile and link.
+            // Mouchard's thesis explains this scheduling method.
+            // Uses port dependancies like Dr. Mouchard.
+            // CAUTION : unlike FastSysC, this scheduling is totally static 
+            // and does not use an event-driven scheduler.
+            ProcessDependencyList * process_list = MouchardScheduling();
+            if (dynamic_link_of_scheduling_code) {
+                base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list, *process_list);
+            }
+            else {
+                gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list);
+            }
+            break;
+        }
+
+        case CASS_SCHEDULING :
+        {
+            // Generate the scheduled code, compile and link
+            // Hommais's thesis explains this scheduling method (like CASS strategy)
+            // Doesn't use port dependancies
+            Graph * g = makegraph (&combinational_func_list);
+            if (dump_all_graph && g) {
+                graph2dot("module_graph", *g);
+            }
+            strong_component_list_t * strong_list = strong_component(g);
+            if (dynamic_link_of_scheduling_code) {
+                base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list, *strong_list);
+            }
+            else {
+                gen_scheduling_code_for_quasistatic_func (transition_func_list, moore_func_list, *strong_list);
+            }
+            break;
+        }
+        default :
+            cerr << "Error : Unable to schedule SystemC process."
+                    "Please select a scheduling method.\n";
+            exit (35);
+    }
+    return base_name;
+}
+
+
+bool run_schedule_editor (const char * schedule) {
+    char buf[128];
+    const char * editor = getenv("EDITOR");
+    if (editor == NULL) {
+        editor = "vim";
+    }
+    sprintf (buf, "(cd '%s' ; %s '%s')", temporary_dir, editor, schedule);
+    if (dump_stage) {
+        cerr << "Executing : " << buf << endl;
+    }
+    return (system(buf) == 0);
+}
+
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/schedulers.h
===================================================================
--- /sources/src/schedulers.h	(revision 51)
+++ /sources/src/schedulers.h	(revision 52)
@@ -20,8 +20,8 @@
 /////////////////////////
 ///// SYSTEMCASS_SPECIFIC
-extern const char *temporary_dir;
-extern const char *generated_files_dir;
-extern std::string get_scheduling      (int scheduling_method);
-extern bool        run_schedule_editor (const char* scheduling);
+extern const char * temporary_dir;
+extern const char * generated_files_dir;
+extern std::string get_scheduling(int scheduling_method);
+extern bool        run_schedule_editor(const char * scheduling);
 
 /////////////////////////
@@ -31,2 +31,13 @@
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/serialization.cc
===================================================================
--- /sources/src/serialization.cc	(revision 51)
+++ /sources/src/serialization.cc	(revision 52)
@@ -34,4 +34,7 @@
  */
 
+#include <cassert>
+#include <map>
+#include <fstream>
 
 #include "internal_ext.h" // tab_t
@@ -42,9 +45,4 @@
 #include "hex2string.h"
 
-#include <cassert>
-#include <map>
-#include <fstream>
-//#include <vector> // save_module_hierarchy
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -54,148 +52,117 @@
 using namespace sc_core;
 
+
 namespace sc_core {
 
-#if 0
-static
-void
-save_module_hierarchy (ostream   &o, 
-                       sc_object *obj)
-{
-  const std::vector<sc_object*> &children = obj->get_child_objects();
-  for (unsigned i = 0; i < children.size(); i++)
-  {
-    if (children[i])
-      save_module_hierarchy (o,children[i]);
-  };
-//  if (obj->kind () != sc_module::kind_string)
-//    o << obj->name () << " " << obj->kind() << endl;
+
+static void dec2string(char * buf, const tab_t * val, int bit_number) {
+    assert(bit_number <= 64);
+    if (bit_number == 1) {
+        bool v = *((const bool *) val);
+        sprintf(buf, "%d", (v) ? 1 : 0);
+    }
+    else if (bit_number <= 8) {
+        uint8 v = *((const uint8 *) val);
+        int v2 = v;
+        sprintf(buf, "%d", v2);
+    }
+    else if (bit_number <= 16) {
+        uint16 v = *((const uint16 *) val);
+        sprintf(buf, "%u", (uint32) v);
+    }
+    else if (bit_number <= 32) {
+        uint32 v = *((const uint32 *) val);
+        sprintf(buf, "%u", v);
+    }
+    else if (bit_number <= 64) {
+        uint64 v = *((const uint64 *) val);
+        sprintf(buf, "%llu", v);
+    }
 }
 
-static
-void
-save_module_hierarchy (ostream &o,
-                       const std::vector<sc_object*> &obj_list)
-{
-  for (signed int i = obj_list.size(); i >= 0; i--)
-    save_module_hierarchy(o, obj_list[i]);
-}
-#endif
 
-static
-void
-dec2string (char        *buf,
-            const tab_t *val,
-            int          bit_number)
-{
-  assert(bit_number <= 64);
-  if (bit_number == 1) {
-    bool v = *((const bool*) val);
-    sprintf (buf, "%d", (v)?1:0);
-  } else if (bit_number <= 8) {
-    uint8 v = *((const uint8*)val);
-    int   v2 = v;
-    sprintf (buf, "%d", v2);
-  } else if (bit_number <= 16) {
-    uint16 v = *((const uint16*)val);
-    sprintf (buf, "%u", (uint32) v);
-  } else if (bit_number <= 32) {
-    uint32 v = *((const uint32*)val);
-    sprintf (buf, "%u", v);
-  } else if (bit_number <= 64) {
-    uint64 v = *((const uint64*)val);
-    sprintf (buf, "%llu", v);
-  }
+static void save_signal_table(ostream & o, int hex = true) {
+    const equi_list_t &eq_l = get_equi_list();
+    equi_list_t::const_iterator it;
+    for (it = eq_l.begin(); it != eq_l.end(); ++it) {
+        const equi_t & eq = *it;
+        equi_t::const_iterator it2 = eq.begin();
+        const entity & en = *it2;
+        const sc_interface * f = en.interface;
+        o << dec << get_name(eq) << endl;
+        char buf[128];
+        if (hex) {
+            buf[0] = '0';
+            buf[1] = 'x';
+            hex2string(buf + 2, f->get_pointer(), f->data_size_in_bytes() << 3);
+        }
+        else {
+            dec2string(buf, f->get_pointer(), f->data_size_in_bytes() << 3);
+        }
+        o << buf;
+        o << endl;
+    }
 }
 
-static
-void
-save_signal_table (std::ostream &o, 
-                   int           hex = true)
-{
-  const equi_list_t &eq_l = get_equi_list ();
-  equi_list_t::const_iterator it;
-  for (it = eq_l.begin (); it != eq_l.end (); ++it)
-  {
-    const equi_t           &eq = *it;
-    equi_t::const_iterator it2 = eq.begin();
-    const entity           &en = *it2;
-    const sc_interface     *f = en.interface;
-    o << dec << get_name (eq) << endl;
-//    print_value (o, *f);
-    char buf[128];
-    if (hex)
-    {
-      buf[0] = '0';
-      buf[1] = 'x';
-      hex2string (buf+2, f->get_pointer (), f->data_size_in_bytes() << 3);
-    } else {
-      dec2string (buf, f->get_pointer (), f->data_size_in_bytes() << 3);
-    }
-    o << buf;
-    o << endl;
-  }
+
+typedef map<const sc_module *, save_fct_t1> sc_module2save_fct_t1;
+
+sc_module2save_fct_t1 save_handler_table;
+
+void set_save_handler(const sc_module & mod, save_fct_t1 fct) {
+    save_handler_table[&mod] = fct;
 }
 
-typedef std::map<const sc_module *, save_fct_t1> sc_module2save_fct_t1;
-sc_module2save_fct_t1 save_handler_table;
 
-void 
-set_save_handler   (const sc_module &mod, 
-                    save_fct_t1      fct)
-{
-  //assert(fct != NULL);
-  //sc_module2save_fct_t1::value_type pair(&mod,fct);
-  //save_handler_table.insert (pair);
-  save_handler_table[&mod] = fct;
+static void save_modules(FILE * o) {
+    sc_module2save_fct_t1::const_iterator it;
+    for (it = save_handler_table.begin(); it != save_handler_table.end(); ++it) {
+        const sc_module * mod = it->first;
+        save_fct_t1 fct = it->second;
+        assert(mod != NULL);
+        fprintf(o, "module\n%s\n", mod->name());
+        if (fct != NULL) {
+            (((sc_module *) mod)->*fct)(o);
+        }
+    }
 }
 
-static
-void
-//save_modules (ostream &o)
-save_modules (FILE    *o)
-{
-  sc_module2save_fct_t1::const_iterator it;
-  for (it = save_handler_table.begin(); 
-       it != save_handler_table.end(); 
-       ++it)
-  {
-    const sc_module *mod = it->first;
-    save_fct_t1      fct = it->second;
-    assert(mod != NULL);
-//    assert(fct != NULL);
-    //o << mod->name () << endl;
-    fprintf (o,"module\n%s\n",mod->name ());
-    if (fct != NULL)
-      (((sc_module*)mod)->*fct) (o);
-  }
+
+void sc_save_simulation(const char * filename) {
+    update();
+    if (dump_stage) {
+        cerr << "Saving simulation into \"" << filename << "\"... ";
+    }
+
+    ofstream file;
+    file.open(filename);
+    file << "CABA Save!" << endl;
+    file << (sc_time_stamp() / 1000) << endl;
+    file << sc_time_stamp().to_string() << endl;
+    save_signal_table(file, true);
+    file.close();
+    FILE * f = fopen(filename, "a+");
+    assert(f != NULL);
+    save_modules(f);
+    fclose(f);
+
+    if (dump_stage) {
+        cerr << "done.\n";
+    }
 }
 
-void 
-sc_save_simulation (const char *filename)
-{
-  update ();
-  if (dump_stage)
-    cerr << "Saving simulation into \"" << filename << "\"... ";
-    
-  ofstream file;
-  file.open (filename);
-  file << "CABA Save!" << endl;
-  file << (sc_time_stamp () / 1000) << endl;
-  file << sc_time_stamp ().to_string () << endl;
-  //save_module_hierarchy (file,sc_get_top_level_objects ());
-  save_signal_table (file, true);
-  //save_modules (file);
-  //file.close ();
-  file.close ();
-  FILE *f = fopen (filename, "a+");
-  assert(f != NULL);
-  save_modules (f);
-  fclose (f);
-
-  if (dump_stage)
-    cerr << "done.\n";
-}
 
 } // end of sc_core namespace
 
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/serialization.h
===================================================================
--- /sources/src/serialization.h	(revision 51)
+++ /sources/src/serialization.h	(revision 52)
@@ -10,4 +10,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef __SERIALIZATION_H__
 #define __SERIALIZATION_H__
@@ -17,8 +18,7 @@
 
 namespace sc_core {
-/////////////////////////
+
 // SYSTEMCASS SPECIFIC //
-
-extern void set_save_handler   (const sc_module &, save_fct_t1);
+extern void set_save_handler(const sc_module &, save_fct_t1);
 
 } // end of sc_core namespace
@@ -26,2 +26,13 @@
 #endif // __SERIALIZATION_H__
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/serialization_ext.h
===================================================================
--- /sources/src/serialization_ext.h	(revision 51)
+++ /sources/src/serialization_ext.h	(revision 52)
@@ -38,16 +38,17 @@
 
 #include <iostream>
+
 #include "sc_fwd.h"
 
 namespace sc_core {
+
 /////////////////////////
 // SYSTEMCASS SPECIFIC //
 
 // Types
-//typedef void (sc_core::sc_module::*save_fct_t2) (std::ostream&) const;
-typedef void (sc_core::sc_module::*save_fct_t1) (FILE*) const;
+typedef void(sc_core::sc_module::*save_fct_t1) (FILE *) const;
 
 // Functions
-extern void sc_save_simulation (const char *filename = "savedefault");
+extern void sc_save_simulation(const char * filename = "savedefault");
 
 } // end of sc_core namespace
@@ -59,2 +60,13 @@
 #endif // __SERIALIZATION_EXT_H__
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/signal_dependency.cc
===================================================================
--- /sources/src/signal_dependency.cc	(revision 51)
+++ /sources/src/signal_dependency.cc	(revision 52)
@@ -43,4 +43,5 @@
 #include "sc_module.h"
 #include "sc_ver_ext.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -51,237 +52,229 @@
 namespace sc_core {
 
-bool 
-SignalDependency::operator < (const SignalDependency &b) const
-{
-	if (source < b.source)
-		return true;
-	if (destination < b.destination)
-		return true;
-	return false;
-}
-
-static
-void
-txt_write (ofstream &o, const component_list_t &l)
-{
-	component_list_t::const_iterator it;
-	for (it = l.begin (); it != l.end (); ++it)
-	{
-		o << get_name(*((equi_t*)(*it))) << " ";
-	}
-}
-
-static
-void
-txt_write (ofstream &o, const strong_component_list_t &l)
-{
-	strong_component_list_t::const_iterator it;
-	for (it = l.begin (); it != l.end (); ++it)
-	{
-		txt_write (o,**it);
-		o <<  "\n";
-	}
-}
-
-bool
-SignalDependencyOrder2txt (const char *name,
-                           const strong_component_list_t&l)
-{
-	if (!name)
-		return false;
-	string filename;
-	filename =  name;
-	filename += ".txt";
-	ofstream o;
-  o.open (filename.c_str(),ios::out | ios::trunc);
-	if (o.is_open () == false)
-		return false;
-	txt_write (o,l);
-	o.close ();
-	return true;
-	
-}
-
-static
-void
-dot_write (ofstream &o, const SignalDependencyGraph &g)
-{
-	string s;
-	SignalDependencyGraph::const_iterator it;
-	for (it = g.begin (); it != g.end (); ++it)
-	{
-		string name;
-		name = it->method->module->name();
-		name += "_";
-		name += it->method->name;
-		o << "edge [label="
-      << simplify_name(name.c_str(),s)
-      << "];\n";
-    const equi_t *equi = it->source;
-		name = get_name (*equi);
-		o << simplify_name(name.c_str(),s);
-		o	<< " -> ";
-    equi = it->destination;
-		name = get_name (*equi);
-		o << simplify_name(name.c_str(),s);
-	  o << ";\n";
-	}
-}
-
-bool
-SignalDependencyGraph2dot (const char *name,
-                           const SignalDependencyGraph& g)
-{
-	if (!name)
-		return false;
-	string filename;
-	filename =  name;
-	filename += ".dot";
-	ofstream o;
-  o.open (filename.c_str(),ios::out | ios::trunc);
-	if (o.is_open () == false)
-		return false;
-	o << "// Signal dependency graph\n"
-       "// Generated by "
-    << sc_version () << "\n";
-	o << "strict digraph " << name << " {\n";
-	dot_write (o,g);
-	o << "}\n";
-	o.close ();
-  if (dump_stage)
-    cerr << "Signal Dependency Graph written into '" 
-         << filename << "'.\n";
-	return true;
-}
-
-SignalDependencyGraph* 
-MakeSignalDependencyGraph (const PortDependencyGraph& g)
-{
-  if (dump_stage)
-	  cerr << "Making signal dependency graph...\n";
-
-	SignalDependencyGraph *sig_g = new SignalDependencyGraph ();
-	PortDependencyGraph::const_iterator it;
-	for (it = g.begin(); it != g.end(); ++it)
-	{
-		SignalDependency s;
-		s.method = it->method;
-		const sc_interface *inter;
-		inter = it->source;
-		if (inter)
-			s.source = &(get_equi (*inter));
-		else
-			continue;
-		inter = it->destination;
-		s.destination = &(get_equi (*inter));
-		sig_g->insert(s);
-	}
-	return sig_g;
-}
-
-
-static
-bool
-is_in (const equi_t &e, const method_process_t &m)
-{
-  const tab_t *pt = e.begin ()->interface->get_pointer ();
-  const sensitivity_list_t &sens = m.sensitivity_list;
-  sensitivity_list_t::const_iterator it;
-  for (it = sens.begin (); it != sens.end (); ++it)
-  {
-    const sc_event &event = *it;
-    if (pt == event.get_interface().get_pointer ())
-      return true;
-  }
-	return false;
-}
-
-static
-bool
-is_valid (const SignalDependency &s)
-{
-#if 0
-  cerr << "'" << get_name (*(s.destination)) << "'"
-       << " depends on '" << get_name (*(s.source)) << "'"
-       << " in the module '" << s.method->module->name() << "'\n";
-  return true;
-#endif
-	if (is_in (*(s.source), *(s.method)))
-    return true;
-  const char *src = get_name (*(s.source));
-  cerr << "'" << get_name (*(s.destination)) << "'"
-       << " depends on '" << src << "'"
-       << " in the module '" << s.method->module->name() << "'"
-       << " but '" << src << "' is not in the sensitivity_list.\n";
-  return false;
-}
-
-bool
-Check (const SignalDependencyGraph &g)
-{
-	SignalDependencyGraph::const_iterator it;
-	for (it = g.begin(); it != g.end(); ++it)
-	{
-		const SignalDependency &s = (*it);
-    if (!is_valid (s))
-      return false;
-  }  
-  return true;
-}
-
-static
-bool
-is_in (const equi_t &e, const SignalDependencyGraph &g)
-{
-  SignalDependencyGraph::const_iterator it;
-  for (it = g.begin (); it != g.end (); ++it)
-  {
-    const SignalDependency &s = *it;
-    if (&e == s.source)
-      return true;
-  }
-	return false;
-}
-
-static
-bool
-is_in (const sensitivity_list_t &sens, const SignalDependencyGraph &g)
-{
-  sensitivity_list_t::const_iterator it;
-  for (it = sens.begin (); it != sens.end (); ++it)
-  {
-    const sc_event     &event = *it;
-    const sc_interface &i     = event.get_interface();
-    const equi_t       &equi  = get_equi (i);
-		if (is_clock (i))
-      continue;
-    if (!is_in (equi, g)) {
-      cerr << "'" << get_name(equi) << "'"
-           << " is in the sensitivity list of ";
-      return false;
-    }
-  }
-  return true;
-}
-
-bool
-Check       (const method_process_list_t &ml,
-             const SignalDependencyGraph &g)
-{
-	method_process_list_t::const_iterator it;
-	for (it = ml.begin(); it != ml.end(); ++it)
-	{
-		const method_process_t   &m = *(*it);
-    const sensitivity_list_t &sens = m.sensitivity_list;
-		if (!is_in (sens, g))
-    {
-      cerr << "'" << m.module->name() << "' module instance "
-           << "but any output port doesn't depend on this input.\n";
-      return false;
-    }
-  }  
-  return true;
-}
+bool SignalDependency::operator < (const SignalDependency & b) const {
+    if (source < b.source) {
+        return true;
+    }
+    if (destination < b.destination) {
+        return true;
+    }
+    return false;
+}
+
+
+static void txt_write(ofstream & o, const component_list_t & l) {
+    component_list_t::const_iterator it;
+    for (it = l.begin(); it != l.end(); ++it) {
+        o << get_name(*((equi_t *) (*it))) << " ";
+    }
+}
+
+
+static void txt_write(ofstream & o, const strong_component_list_t & l) {
+    strong_component_list_t::const_iterator it;
+    for (it = l.begin(); it != l.end(); ++it) {
+        txt_write(o, **it);
+        o <<  "\n";
+    }
+}
+
+
+bool SignalDependencyOrder2txt(const char * name, const strong_component_list_t & l) {
+    if (!name) {
+        return false;
+    }
+    string filename;
+    filename =  name;
+    filename += ".txt";
+    ofstream o;
+    o.open(filename.c_str(),ios::out | ios::trunc);
+    if (!o.is_open()) {
+        return false;
+    }
+    txt_write(o, l);
+    o.close();
+    return true;
+}
+
+
+static void dot_write(ofstream & o, const SignalDependencyGraph & g) {
+    string s;
+    SignalDependencyGraph::const_iterator it;
+    for (it = g.begin(); it != g.end(); ++it) {
+        string name;
+        name = it->method->module->name();
+        name += "_";
+        name += it->method->name;
+        o << "edge [label="
+            << simplify_name(name.c_str(), s)
+            << "];\n";
+        const equi_t * equi = it->source;
+        name = get_name(*equi);
+        o << simplify_name(name.c_str(), s);
+        o << " -> ";
+        equi = it->destination;
+        name = get_name(*equi);
+        o << simplify_name(name.c_str(), s);
+        o << ";\n";
+    }
+}
+
+
+bool SignalDependencyGraph2dot(const char * name, const SignalDependencyGraph & g) {
+    if (!name) {
+        return false;
+    }
+    string filename;
+    filename =  name;
+    filename += ".dot";
+    ofstream o;
+    o.open(filename.c_str(),ios::out | ios::trunc);
+    if (!o.is_open()) {
+        return false;
+    }
+    o << "// Signal dependency graph\n"
+        "// Generated by "
+        << sc_version() << "\n";
+    o << "strict digraph " << name << " {\n";
+    dot_write(o, g);
+    o << "}\n";
+    o.close();
+    if (dump_stage) {
+        cerr << "Signal Dependency Graph written into '" 
+            << filename << "'.\n";
+    }
+    return true;
+}
+
+
+SignalDependencyGraph * MakeSignalDependencyGraph(const PortDependencyGraph & g) {
+    if (dump_stage) {
+        cerr << "Making signal dependency graph...\n";
+    }
+
+    SignalDependencyGraph * sig_g = new SignalDependencyGraph();
+    PortDependencyGraph::const_iterator it;
+    for (it = g.begin(); it != g.end(); ++it) {
+        SignalDependency s;
+        s.method = it->method;
+        const sc_interface * inter;
+        inter = it->source;
+        if (inter) {
+            s.source = &(get_equi(*inter));
+        }
+        else {
+            continue;
+        }
+        inter = it->destination;
+        s.destination = &(get_equi(*inter));
+        sig_g->insert(s);
+    }
+    return sig_g;
+}
+
+
+static bool is_in(const equi_t & e, const method_process_t & m) {
+    const tab_t * pt = e.begin()->interface->get_pointer();
+    const sensitivity_list_t & sens = m.sensitivity_list;
+    sensitivity_list_t::const_iterator it;
+    for (it = sens.begin(); it != sens.end(); ++it) {
+        const sc_event & event = *it;
+        if (pt == event.get_interface().get_pointer()) {
+            return true;
+        }
+    }
+    return false;
+}
+
+
+static bool is_valid(const SignalDependency & s) {
+    if (dump_stage) {
+    cerr << "'" << get_name (*(s.destination)) << "'"
+        << " depends on '" << get_name (*(s.source)) << "'"
+        << " in the module '" << s.method->module->name() << "'\n";
+    }
+    if (is_in(*(s.source), *(s.method))) {
+        return true;
+    }
+    
+    const char * src = get_name(*(s.source));
+    cerr << "'" << get_name(*(s.destination)) << "'"
+        << " depends on '" << src << "'"
+        << " in the module '" << s.method->module->name() << "'"
+        << " but '" << src << "' is not in the sensitivity_list.\n";
+    return false;
+}
+
+
+bool Check(const SignalDependencyGraph & g) {
+    SignalDependencyGraph::const_iterator it;
+    for (it = g.begin(); it != g.end(); ++it) {
+        const SignalDependency &s = (*it);
+        if (!is_valid(s)) {
+            return false;
+        }
+
+    }  
+    return true;
+}
+
+
+static bool is_in(const equi_t & e, const SignalDependencyGraph & g) {
+    SignalDependencyGraph::const_iterator it;
+    for (it = g.begin(); it != g.end(); ++it) {
+        const SignalDependency & s = *it;
+        if (&e == s.source) {
+            return true;
+        }
+
+    }
+    return false;
+}
+
+
+static bool is_in(const sensitivity_list_t & sens, const SignalDependencyGraph & g) {
+    sensitivity_list_t::const_iterator it;
+    for (it = sens.begin(); it != sens.end(); ++it) {
+        const sc_event & event = *it;
+        const sc_interface & i = event.get_interface();
+        const equi_t & equi = get_equi(i);
+        if (is_clock(i)) {
+            continue;
+        }
+        if (!is_in(equi, g)) {
+            cerr << "'" << get_name(equi) << "' is in the sensitivity list of ";
+            return false;
+        }
+    }
+    return true;
+}
+
+
+bool Check(const method_process_list_t & ml, const SignalDependencyGraph & g) {
+    method_process_list_t::const_iterator it;
+    for (it = ml.begin(); it != ml.end(); ++it) {
+        const method_process_t & m = *(*it);
+        const sensitivity_list_t & sens = m.sensitivity_list;
+        if (!is_in(sens, g)) {
+            cerr << "'" << m.module->name() << "' module instance "
+                 << "but any output port doesn't depend on this input.\n";
+            return false;
+        }
+    }  
+    return true;
+}
+
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/signal_dependency.h
===================================================================
--- /sources/src/signal_dependency.h	(revision 51)
+++ /sources/src/signal_dependency.h	(revision 52)
@@ -10,37 +10,40 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef SIGNAL_DEPENDENCY_H
 #define SIGNAL_DEPENDENCY_H
 
 #include <set>
+
 #include "sc_fwd.h"
 #include "entity.h" // equi_t
 #include "graph.h"
-//#include "sc_port.h"
 #include "port_dependency.h"
 
 namespace sc_core {
 
+
 // Signal Dependency Graph
 struct SignalDependency {
-  const method_process_t *method;
-  const equi_t           *source;
-  const equi_t           *destination;
-  bool operator < (const SignalDependency &a) const;
-//  friend int operator < (const SignalDependency &a, const SignalDependency &b);
+  const method_process_t * method;
+  const equi_t * source;
+  const equi_t * destination;
+  bool operator < (const SignalDependency & a) const;
 };
+
 
 typedef std::set<SignalDependency> SignalDependencyGraph;
 
+
 // Convert Port Dependency Graph to Signal Dependency Graph
-extern SignalDependencyGraph* MakeSignalDependencyGraph (const PortDependencyGraph& = get_port_dependency_graph ());
+extern SignalDependencyGraph * MakeSignalDependencyGraph(const PortDependencyGraph & = get_port_dependency_graph());
 
 // Checking
-extern bool Check (const SignalDependencyGraph&);
-extern bool Check (const method_process_list_t&, const SignalDependencyGraph&);
+extern bool Check(const SignalDependencyGraph &);
+extern bool Check(const method_process_list_t &, const SignalDependencyGraph &);
 
 // Dump
-extern bool SignalDependencyGraph2dot (const char *name, const SignalDependencyGraph&);
-extern bool SignalDependencyOrder2txt (const char *name, const strong_component_list_t&);
+extern bool SignalDependencyGraph2dot(const char * name, const SignalDependencyGraph &);
+extern bool SignalDependencyOrder2txt(const char * name, const strong_component_list_t &);
 
 } // end of sc_core namespace
@@ -48,2 +51,13 @@
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/simplify_string.cc
===================================================================
--- /sources/src/simplify_string.cc	(revision 51)
+++ /sources/src/simplify_string.cc	(revision 52)
@@ -35,4 +35,5 @@
 
 #include "simplify_string.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -43,23 +44,34 @@
 namespace sc_core {
 
+
 // Truncate the name : delete "."
-string&
-simplify_name (const char *name, string &newname)
-{
-	if (!name) {
-    newname = "";
-		return newname;
-  }
-	newname = name;
-	string::size_type i = 0;
-	do { 
-		i = newname.find ('.');
-		if (i == -1)
-			break;
-	  newname[i] = '_';
-	} while (1);
-	return newname;
+string & simplify_name (const char * name, string & newname) {
+    if (!name) {
+        newname = "";
+        return newname;
+    }
+    newname = name;
+    string::size_type i = 0;
+    do { 
+        i = newname.find ('.');
+        if (i == -1) {
+            break;
+        }
+        newname[i] = '_';
+    } while (1);
+    return newname;
 }
 
 } // end of sc_core namespace
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/simplify_string.h
===================================================================
--- /sources/src/simplify_string.h	(revision 51)
+++ /sources/src/simplify_string.h	(revision 52)
@@ -10,4 +10,5 @@
 |                                                             |
 \------------------------------------------------------------*/
+
 #ifndef SIMPLIFY_STRING_H
 #define SIMPLIFY_STRING_H
@@ -17,7 +18,20 @@
 // Truncate the name : delete "."
 namespace sc_core {
-extern std::string& simplify_name (const char *name, std::string &newname);
+
+extern std::string & simplify_name(const char * name, std::string & newname);
+
 }
 
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/systemc
===================================================================
--- /sources/src/systemc	(revision 51)
+++ /sources/src/systemc	(revision 52)
@@ -31,2 +31,14 @@
 
 #endif
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/systemc.h
===================================================================
--- /sources/src/systemc.h	(revision 51)
+++ /sources/src/systemc.h	(revision 52)
@@ -52,7 +52,8 @@
 using sc_core::sc_sensitive_pos;
 using sc_core::sc_sensitive_neg;
-/////////////////////////////////////////////////
+
+/////////////////////////////////
 // Ports & Signals
-//
+/////////////////////////////////
 using sc_core::sc_time;
 using sc_core::sc_simulation_time;
@@ -89,2 +90,13 @@
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/systemcass_version_ext.h
===================================================================
--- /sources/src/systemcass_version_ext.h	(revision 51)
+++ /sources/src/systemcass_version_ext.h	(revision 52)
@@ -1,1 +1,14 @@
+
 #define SYSTEMC_VERSION "SystemCASS : lundi 10 septembre 2007, 15:"
+
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/usage.h
===================================================================
--- /sources/src/usage.h	(revision 51)
+++ /sources/src/usage.h	(revision 52)
@@ -1,13 +1,13 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                  usage.h                          |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                                                             |
-| Date    :                   ??_??_2005                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                  usage.h                          |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   ??_??_2005                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -33,4 +33,5 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
+
 #ifndef __USAGE_H__
 #define __USAGE_H__
@@ -42,39 +43,54 @@
 
 struct usage_t {
-	unsigned int elapsed_time;
-  long         memory_size;
-	usage_t () 
-	{
-		elapsed_time = 0;
-    memory_size  = 0;
-	}
-	void start () 
-	{
-		struct rusage usage;
-		getrusage(RUSAGE_SELF, &usage);
-		elapsed_time = usage.ru_utime.tv_sec;
-		memory_size  = usage.ru_maxrss;
-	}
-	void cont () 
-	{
-		struct rusage usage;
-		getrusage(RUSAGE_SELF, &usage);
-		elapsed_time = usage.ru_utime.tv_sec - elapsed_time;
-		memory_size  = usage.ru_maxrss;
-	}
-	void stop ()
-	{
-		cont ();
-	}
-	operator unsigned int () const
-	{ return elapsed_time; }	
-  long     get_memory_size () const
-  { return memory_size;  }
-	friend std::ostream& operator << (std::ostream& o, const usage_t &c)
-	{
-		return o << c.elapsed_time << "seconds";
-	}
+    unsigned int elapsed_time;
+    long memory_size;
+    usage_t() {
+        elapsed_time = 0;
+        memory_size  = 0;
+    }
+
+    void start() {
+        struct rusage usage;
+        getrusage(RUSAGE_SELF, &usage);
+        elapsed_time = usage.ru_utime.tv_sec;
+        memory_size = usage.ru_maxrss;
+    }
+
+    void cont() {
+        struct rusage usage;
+        getrusage(RUSAGE_SELF, &usage);
+        elapsed_time = usage.ru_utime.tv_sec - elapsed_time;
+        memory_size = usage.ru_maxrss;
+    }
+
+    void stop() {
+        cont();
+    }
+
+    operator unsigned int () const {
+        return elapsed_time;
+    }
+
+    long get_memory_size () const {
+        return memory_size;
+    }
+
+    friend std::ostream & operator << (std::ostream & o, const usage_t & c) {
+        return o << c.elapsed_time << "seconds";
+    }
+
 };
 
 #endif
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
Index: /sources/src/utils.h
===================================================================
--- /sources/src/utils.h	(revision 51)
+++ /sources/src/utils.h	(revision 52)
@@ -37,2 +37,3 @@
 
 #endif /* __UTILS_H__ */
+
