home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / shareware / dev / ppcsmalleiffel / lib_se / native_c.e < prev    next >
Encoding:
Text File  |  1998-01-16  |  2.2 KB  |  78 lines

  1. --          This file is part of SmallEiffel The GNU Eiffel Compiler.
  2. --          Copyright (C) 1994-98 LORIA - UHP - CRIN - INRIA - FRANCE
  3. --            Dominique COLNET and Suzanne COLLIN - colnet@loria.fr 
  4. --                       http://www.loria.fr/SmallEiffel
  5. -- SmallEiffel is  free  software;  you can  redistribute it and/or modify it 
  6. -- under the terms of the GNU General Public License as published by the Free
  7. -- Software  Foundation;  either  version  2, or (at your option)  any  later 
  8. -- version. SmallEiffel is distributed in the hope that it will be useful,but
  9. -- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  10. -- or  FITNESS FOR A PARTICULAR PURPOSE.   See the GNU General Public License 
  11. -- for  more  details.  You  should  have  received a copy of the GNU General 
  12. -- Public  License  along  with  SmallEiffel;  see the file COPYING.  If not,
  13. -- write to the  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  14. -- Boston, MA 02111-1307, USA.
  15. --
  16. class NATIVE_C
  17.  
  18. inherit NATIVE;
  19.  
  20. feature {NONE}
  21.  
  22.    c_mapping_function_non_small_eiffel(rf8: RUN_FEATURE_8; name: STRING) is
  23.       local
  24.      bf: EXTERNAL_FUNCTION;
  25.      bfuc, tcbd: BOOLEAN;
  26.       do
  27.      bf := rf8.base_feature;
  28.      bfuc := bf.use_current;
  29.      if not bfuc then
  30.         tcbd := cpp.target_cannot_be_dropped;
  31.         if tcbd then
  32.            cpp.put_character(',');
  33.         end;
  34.      end;
  35.      cpp.put_string(bf.external_c_name);
  36.      cpp.put_character('(');
  37.      if bfuc then
  38.         cpp.put_target_as_value;
  39.      end;
  40.      if rf8.arg_count > 0 then
  41.         if bfuc then
  42.            cpp.put_character(',');
  43.         end;
  44.         cpp.put_arguments;
  45.      end;
  46.      cpp.put_character(')');
  47.      if not bfuc and then tcbd then
  48.         cpp.put_character(')');
  49.      end;
  50.       end;
  51.  
  52.    c_mapping_procedure_non_small_eiffel(rf7: RUN_FEATURE_7; name: STRING) is
  53.       local
  54.      bf: EXTERNAL_PROCEDURE;
  55.      bfuc: BOOLEAN;
  56.       do
  57.      bf := rf7.base_feature;
  58.      bfuc := bf.use_current;
  59.      if not bfuc and then cpp.target_cannot_be_dropped then
  60.         cpp.put_string(fz_14);
  61.      end;
  62.      cpp.put_string(bf.external_c_name);
  63.      cpp.put_character('(');
  64.      if bfuc then
  65.         cpp.put_target_as_value;
  66.      end;
  67.      if rf7.arg_count > 0 then
  68.         if bfuc then
  69.            cpp.put_character(',');
  70.         end;
  71.         cpp.put_arguments;
  72.      end;
  73.      cpp.put_string(fz_14);
  74.       end;
  75.  
  76. end -- NATIVE_C
  77.  
  78.