stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/include ai.h avi.h campaign.h ccl.h


From: address@hidden
Subject: [Stratagus-CVS] stratagus/src/include ai.h avi.h campaign.h ccl.h
Date: 22 Dec 2003 11:33:45 +1100

CVSROOT:        /home/strat
Module name:    stratagus
Changes by:      <address@hidden>       03/12/22 11:33:44

Modified files:
        src/include    : ai.h avi.h campaign.h ccl.h 

Log message:
        Tabs Cleanup

Patches:
Index: stratagus/src/include/ai.h
diff -u stratagus/src/include/ai.h:1.33 stratagus/src/include/ai.h:1.34
--- stratagus/src/include/ai.h:1.33     Sat Dec 20 16:33:25 2003
+++ stratagus/src/include/ai.h  Mon Dec 22 11:33:44 2003
@@ -5,12 +5,12 @@
 //     /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
 //             \/                  \/          \//_____/            \/
 //  ______________________                           ______________________
-//                       T H E   W A R   B E G I N S
-//        Stratagus - A free fantasy real time strategy game engine
+//                        T H E   W A R   B E G I N S
+//         Stratagus - A free fantasy real time strategy game engine
 //
-/address@hidden ai.h           -       The ai headerfile. */
+/address@hidden ai.h - The ai headerfile. */
 //
-//     (c) Copyright 1998-2002 by Lutz Sammer
+//      (c) Copyright 1998-2004 by Lutz Sammer
 //
 //      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
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: ai.h,v 1.33 2003/12/20 05:33:25 jsalmon3 Exp $
+//      $Id: ai.h,v 1.34 2003/12/22 00:33:44 wizzard Exp $
 
 #ifndef __AI_H__
 #define __AI_H__
@@ -34,35 +34,35 @@
 //@{
 
 /*----------------------------------------------------------------------------
---             Includes
+--  Includes
 ----------------------------------------------------------------------------*/
 
 #include "player.h"
 
 /*----------------------------------------------------------------------------
---             Variables
+--  Variables
 ----------------------------------------------------------------------------*/
 
-extern int AiSleepCycles;                                              /// Ai 
sleeps # cycles
-extern int AiTimeFactor;                                               /// 
Adjust the AI build times
-extern int AiCostFactor;                                               /// 
Adjust the AI costs
+extern int AiSleepCycles;  /// Ai sleeps # cycles
+extern int AiTimeFactor;   /// Adjust the AI build times
+extern int AiCostFactor;   /// Adjust the AI costs
 
 /*----------------------------------------------------------------------------
---             Functions
+--  Functions
 ----------------------------------------------------------------------------*/
 
-extern void AiEachCycle(Player* player);               /// Called each game 
cycle
-extern void AiEachSecond(Player* player);              /// Called each second
+extern void AiEachCycle(Player* player);   /// Called each game cycle
+extern void AiEachSecond(Player* player);  /// Called each second
 
-extern void InitAiModule(void);                                                
/// Init AI global structures
-extern void AiInit(Player* player);                            /// Init AI for 
this player
-extern void CleanAi(void);                                             /// 
Cleanup the AI module
-extern void SaveAi(CLFile*file);                               /// Save the AI 
state
+extern void InitAiModule(void);       /// Init AI global structures
+extern void AiInit(Player* player);   /// Init AI for this player
+extern void CleanAi(void);            /// Cleanup the AI module
+extern void SaveAi(CLFile*file);      /// Save the AI state
 
-extern void AiCclRegister(void);                               /// Register 
ccl features
+extern void AiCclRegister(void);      /// Register ccl features
 
 /*--------------------------------------------------------
---      Call Backs/Triggers
+--  Call Backs/Triggers
 --------------------------------------------------------*/
 
        /// Called if AI unit is attacked
@@ -88,4 +88,4 @@
 
 //@}
 
-#endif         // !__AI_H__
+#endif // !__AI_H__
Index: stratagus/src/include/avi.h
diff -u stratagus/src/include/avi.h:1.8 stratagus/src/include/avi.h:1.9
--- stratagus/src/include/avi.h:1.8     Sat Dec 20 16:33:26 2003
+++ stratagus/src/include/avi.h Mon Dec 22 11:33:44 2003
@@ -5,12 +5,12 @@
 //     /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
 //             \/                  \/          \//_____/            \/
 //  ______________________                           ______________________
-//                       T H E   W A R   B E G I N S
-//        Stratagus - A free fantasy real time strategy game engine
+//                        T H E   W A R   B E G I N S
+//         Stratagus - A free fantasy real time strategy game engine
 //
-/address@hidden avi.h                  -       avi support */
+/address@hidden avi.h - avi support */
 //
-//     (c) Copyright 2002 by Lutz Sammer.
+//      (c) Copyright 2002-2004 by Lutz Sammer.
 //
 //      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
@@ -26,63 +26,63 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: avi.h,v 1.8 2003/12/20 05:33:26 jsalmon3 Exp $
+//      $Id: avi.h,v 1.9 2003/12/22 00:33:44 wizzard Exp $
 
 //@{
 
 /*----------------------------------------------------------------------------
---             Includes
+--  Includes
 ----------------------------------------------------------------------------*/
 
 #include "iolib.h"
 
 /*----------------------------------------------------------------------------
---             Declaration
+--  Declaration
 ----------------------------------------------------------------------------*/
 
 /**
-**             Avi frame buffer typedef
+**  Avi frame buffer typedef
 */
 typedef struct _avi_frame_buffer_ AviFrameBuffer;
 
 /**
-**             Avi frame buffer structure
+**  Avi frame buffer structure
 **
-**             Used to stored read and used frames.
+**  Used to stored read and used frames.
 */
 struct _avi_frame_buffer_ {
-       AviFrameBuffer* Next;                           /// Next buffer
-       int                                     Length;                         
/// Buffer length
-       unsigned char   Data[1];                                /// Buffer data
+       AviFrameBuffer* Next;     /// Next buffer
+       int             Length;   /// Buffer length
+       unsigned char   Data[1];  /// Buffer data
 };
 
 /**
-**             Avi file handle structure
+**  Avi file handle structure
 */
 typedef struct _avi_file_ {
-       CLFile*         FileHandle;                             /// File handle
+       CLFile*          FileHandle;       /// File handle
        // Video streams
-       char            VideoCodec[8];                          /// Video codec
-       int                             Width;                                  
        /// Video frame width
-       int                             Height;                                 
        /// Video frame height
-       int                             FPS100;                                 
        /// Frames per second * 100
-       long            NumFrames;                              /// Number of 
video frames
-       int                             VideoStream;                            
/// Video stream number
-       unsigned long VideoTag;                         /// Video stream tag
-       AviFrameBuffer* VideoFrames;            /// Video frames
-       AviFrameBuffer** VideoFramesTail;               /// Video frames tail 
pointer
-       AviFrameBuffer* VideoBuffer;            /// Current video frame buffer
+       char             VideoCodec[8];    /// Video codec
+       int              Width;            /// Video frame width
+       int              Height;           /// Video frame height
+       int              FPS100;           /// Frames per second * 100
+       long             NumFrames;        /// Number of video frames
+       int              VideoStream;      /// Video stream number
+       unsigned long    VideoTag;         /// Video stream tag
+       AviFrameBuffer*  VideoFrames;      /// Video frames
+       AviFrameBuffer** VideoFramesTail;  /// Video frames tail pointer
+       AviFrameBuffer*  VideoBuffer;      /// Current video frame buffer
        // Audio streams
-       int                             AudioStream;                            
/// Audio stream number
-       unsigned long AudioTag;                         /// Audio stream tag
-       AviFrameBuffer* AudioFrames;            /// Audio frames
-       AviFrameBuffer** AudioFramesTail;               /// Audio frames tail 
pointer
-       AviFrameBuffer* AudioBuffer;            /// Current audio frame buffer
-       int             AudioRemain;                                            
/// Remaining bytes in buffer
+       int              AudioStream;      /// Audio stream number
+       unsigned long    AudioTag;         /// Audio stream tag
+       AviFrameBuffer*  AudioFrames;      /// Audio frames
+       AviFrameBuffer** AudioFramesTail;  /// Audio frames tail pointer
+       AviFrameBuffer*  AudioBuffer;      /// Current audio frame buffer
+       int              AudioRemain;      /// Remaining bytes in buffer
 } AviFile;
 
 /*----------------------------------------------------------------------------
---             Functions
+--  Functions
 ----------------------------------------------------------------------------*/
 
        /// Open an avi file
@@ -91,9 +91,9 @@
 extern void AviClose(AviFile* avi);
 
        /// Read next video frame
-extern int AviReadNextVideoFrame(AviFile* avi,unsigned char** frame);
+extern int AviReadNextVideoFrame(AviFile* avi, unsigned char** frame);
        /// Read next audio frame
-extern int AviReadNextAudioFrame(AviFile* avi,unsigned char** frame);
+extern int AviReadNextAudioFrame(AviFile* avi, unsigned char** frame);
 
        /// Play the sound of an avi movie
 extern void PlayAviOgg(AviFile* avi);
Index: stratagus/src/include/campaign.h
diff -u stratagus/src/include/campaign.h:1.15 
stratagus/src/include/campaign.h:1.16
--- stratagus/src/include/campaign.h:1.15       Sat Dec 20 16:33:26 2003
+++ stratagus/src/include/campaign.h    Mon Dec 22 11:33:44 2003
@@ -5,12 +5,12 @@
 //     /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
 //             \/                  \/          \//_____/            \/
 //  ______________________                           ______________________
-//                       T H E   W A R   B E G I N S
-//        Stratagus - A free fantasy real time strategy game engine
+//                        T H E   W A R   B E G I N S
+//         Stratagus - A free fantasy real time strategy game engine
 //
-/address@hidden campaign.h     -       The campaign headerfile. */
+/address@hidden campaign.h - The campaign headerfile. */
 //
-//     (c) Copyright 2002 by Lutz Sammer
+//      (c) Copyright 2002 by Lutz Sammer
 //
 //      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
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: campaign.h,v 1.15 2003/12/20 05:33:26 jsalmon3 Exp $
+//      $Id: campaign.h,v 1.16 2003/12/22 00:33:44 wizzard Exp $
 
 #ifndef __CAMPAIGN_H__
 #define __CAMPAIGN_H__
@@ -34,120 +34,120 @@
 //@{
 
 /*----------------------------------------------------------------------------
---             Includes
+--  Includes
 ----------------------------------------------------------------------------*/
 
 #include "iolib.h"
 
 /*----------------------------------------------------------------------------
---             Declaration
+--  Declaration
 ----------------------------------------------------------------------------*/
 
 /**
-**             Possible outcomes of the game.
+**  Possible outcomes of the game.
 */
 typedef enum _game_results_ {
-       GameNoResult,                                           /// Game has no 
result
-       GameVictory,                                            /// Game was won
-       GameDefeat,                                                             
/// Game was lost
-       GameDraw,                                                               
/// Game was draw
-} GameResults;                                                         /// 
Game results
+       GameNoResult,  /// Game has no result
+       GameVictory,   /// Game was won
+       GameDefeat,    /// Game was lost
+       GameDraw,      /// Game was draw
+} GameResults;     /// Game results
 
 /**
-**             Type of the chapters.
+**  Type of the chapters.
 */
 typedef enum _chapter_types_ {
-       ChapterPlayVideo,                                               /// 
Play a video
-       ChapterShowPicture,                                             /// 
Show a picture
-       ChapterPlayLevel,                                               /// 
Play a level
-       ChapterDefeat,                                          /// Levels 
played on defeat
-       ChapterDraw,                                            /// Levels 
played on draw
-       ChapterEnd,                                                             
/// End chapter (NOT SUPPORTED)
+       ChapterPlayVideo,    /// Play a video
+       ChapterShowPicture,  /// Show a picture
+       ChapterPlayLevel,    /// Play a level
+       ChapterDefeat,       /// Levels played on defeat
+       ChapterDraw,         /// Levels played on draw
+       ChapterEnd,          /// End chapter (NOT SUPPORTED)
 } ChapterTypes;
 
 /**
-**             Campaign chapter.
+**  Campaign chapter.
 */
 typedef struct _campaign_chapter_ CampaignChapter;
 
 /**
-**             Picture text alignment
+**  Picture text alignment
 */
 typedef enum _picture_text_alignment_ {
-       PictureTextAlignLeft,                           /// Left align
-       PictureTextAlignCenter,                         /// Center align
+       PictureTextAlignLeft,    /// Left align
+       PictureTextAlignCenter,  /// Center align
 } PictureTextAlignment;
 
 /**
-**             Campaign picture text
+**  Campaign picture text
 */
 typedef struct _chapter_picture_text_ {
-       int Font;                                                               
/// Font
-       int X;                                                          /// X 
position
-       int Y;                                                          /// Y 
position
-       int Width;                                                              
/// Width
-       int Height;                                                             
/// Height
-       PictureTextAlignment Align;                             /// Alignment
-       char* Text;                                                             
/// Text
-       struct _chapter_picture_text_* Next; /// Next
+       int                  Font;            /// Font
+       int                  X;               /// X position
+       int                  Y;               /// Y position
+       int                  Width;           /// Width
+       int                  Height;          /// Height
+       PictureTextAlignment Align;           /// Alignment
+       char*                Text;            /// Text
+       struct _chapter_picture_text_* Next;  /// Next
 } ChapterPictureText;
 
 /**
-**             Campaign chapter structure.
+**  Campaign chapter structure.
 */
 struct _campaign_chapter_ {
-       CampaignChapter*                Next;                           /// 
Next campaign chapter
-       ChapterTypes            Type;                           /// Type of the 
chapter (level,...)
+       CampaignChapter* Next;  /// Next campaign chapter
+       ChapterTypes     Type;  /// Type of the chapter (level,...)
        union {
                struct {
-                       char* Name;                                             
/// Chapter name
-               } Level;                                                /// 
Data for a level
+                       char* Name;  /// Chapter name
+               } Level;         /// Data for a level
                struct {
-                       char* Image;                            /// File name 
of image
-                       int FadeIn;                                             
/// Number of cycles to fade in
-                       int FadeOut;                            /// Number of 
cycles to fade out
-                       int DisplayTime;                                /// 
Number of cycles to display image
-                       ChapterPictureText* Text;               /// Linked list 
of text data
-               } Picture;                                              /// 
Data for a picture
+                       char* Image;               /// File name of image
+                       int   FadeIn;              /// Number of cycles to fade 
in
+                       int   FadeOut;             /// Number of cycles to fade 
out
+                       int   DisplayTime;         /// Number of cycles to 
display image
+                       ChapterPictureText* Text;  /// Linked list of text data
+               } Picture;                     /// Data for a picture
                struct {
-                       char* PathName;                         /// File name 
of video
-                       int Flags;                                              
/// Playback flags
-               } Movie;                                                /// 
Data for a movie
-       } Data;                                                         /// 
Data of the different chapter types
-       GameResults                             Result;                         
/// Result of this chapter
+                       char* PathName;  /// File name of video
+                       int Flags;       /// Playback flags
+               } Movie;             /// Data for a movie
+       } Data;                  /// Data of the different chapter types
+       GameResults Result;      /// Result of this chapter
 };
 
 /**
-**             Campaign structure.
+**  Campaign structure.
 */
 typedef struct _campaign_ {
-       const void*                             OType;                          
/// Object type (future extensions)
+       const void* OType;  /// Object type (future extensions)
 
-       char*                           Ident;                          /// 
Unique identifier
-       char*                           Name;                           /// 
Campaign name
-       int                                             Players;                
/// Campaign for X players
+       char* Ident;    /// Unique identifier
+       char* Name;     /// Campaign name
+       int   Players;  /// Campaign for X players
 
-       char*                           File;                           /// 
File containing the campaign
+       char* File;     /// File containing the campaign
 
-       CampaignChapter*                Chapters;               /// Campaign 
chapters
+       CampaignChapter* Chapters;  /// Campaign chapters
 } Campaign;
 
 /*----------------------------------------------------------------------------
---             Variables
+--  Variables
 ----------------------------------------------------------------------------*/
 
-extern int GameResult;                                         /// Outcome of 
the game
-extern int RestartScenario;                            /// Restart the scenario
-extern int QuitToMenu;                                         /// Quit to menu
-extern char CurrentMapPath[];                          /// Path of the current 
map
-extern char DefaultMap[];                              /// Default map path
-extern char DefaultObjective[];                                /// The default 
scenario objective
+extern int GameResult;           /// Outcome of the game
+extern int RestartScenario;      /// Restart the scenario
+extern int QuitToMenu;           /// Quit to menu
+extern char CurrentMapPath[];    /// Path of the current map
+extern char DefaultMap[];        /// Default map path
+extern char DefaultObjective[];  /// The default scenario objective
 
-extern Campaign* Campaigns;                            /// Campaigns
-extern int NumCampaigns;                               /// Number of campaigns
+extern Campaign* Campaigns;      /// Campaigns
+extern int NumCampaigns;         /// Number of campaigns
 
 /*----------------------------------------------------------------------------
---             Functions
+--  Functions
 ----------------------------------------------------------------------------*/
 
        /// Play a campaign
@@ -155,10 +155,10 @@
        /// Next chapter of a campaign
 extern char* NextChapter(void);
 
-extern void CampaignCclRegister(void);         /// Register ccl features
-extern void SaveCampaign(CLFile* file);                /// Save the campaign 
module
-extern void CleanCampaign(void);               /// Cleanup the campaign module
+extern void CampaignCclRegister(void);   /// Register ccl features
+extern void SaveCampaign(CLFile* file);  /// Save the campaign module
+extern void CleanCampaign(void);         /// Cleanup the campaign module
 
 //@}
 
-#endif         // !__CAMPAIGN_H__
+#endif // !__CAMPAIGN_H__
Index: stratagus/src/include/ccl.h
diff -u stratagus/src/include/ccl.h:1.47 stratagus/src/include/ccl.h:1.48
--- stratagus/src/include/ccl.h:1.47    Sat Dec 20 16:33:26 2003
+++ stratagus/src/include/ccl.h Mon Dec 22 11:33:44 2003
@@ -5,12 +5,12 @@
 //     /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
 //             \/                  \/          \//_____/            \/
 //  ______________________                           ______________________
-//                       T H E   W A R   B E G I N S
-//        Stratagus - A free fantasy real time strategy game engine
+//                        T H E   W A R   B E G I N S
+//         Stratagus - A free fantasy real time strategy game engine
 //
-/address@hidden ccl.h          -       The clone configuration language 
headerfile. */
+/address@hidden ccl.h - The clone configuration language headerfile. */
 //
-//     (c) Copyright 1998-2003 by Lutz Sammer and Jimmy Salmon
+//      (c) Copyright 1998-2004 by Lutz Sammer and Jimmy Salmon
 //
 //      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
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: ccl.h,v 1.47 2003/12/20 05:33:26 jsalmon3 Exp $
+//      $Id: ccl.h,v 1.48 2003/12/22 00:33:44 wizzard Exp $
 
 #ifndef __CCL_H__
 #define __CCL_H__
@@ -38,29 +38,29 @@
 #endif
 
 /*----------------------------------------------------------------------------
---             Includes
+--  Includes
 ----------------------------------------------------------------------------*/
 
 #if defined(USE_GUILE)
 
 
 #  include <guile/gh.h>
-#  define get_c_string(lisp)    CclConvertToString(lisp)
-#  define try_get_c_string(lisp) CclConvertToString(lisp)
-#  define symbol_value(x, env)   scm_variable_ref(scm_lookup(x))
-#  define NIL                                  SCM_EOL
-#  define cons(a, b)                    gh_cons(a, b)
-#  define symbol_boundp(x, env)  (!SCM_UNBNDP(x))
+#  define get_c_string(lisp)      CclConvertToString(lisp)
+#  define try_get_c_string(lisp)  CclConvertToString(lisp)
+#  define symbol_value(x, env)    scm_variable_ref(scm_lookup(x))
+#  define NIL                     SCM_EOL
+#  define cons(a, b)              gh_cons(a, b)
+#  define symbol_boundp(x, env)   (!SCM_UNBNDP(x))
 #  define fast_load(s_filename, bogus)  scm_primitive_load(s_filename)
-#  define cons_array                     gh_make_vector
-#  define gh_eval(expr, env)     scm_primitive_eval(expr)
+#  define cons_array              gh_make_vector
+#  define gh_eval(expr, env)      scm_primitive_eval(expr)
 #  define setvar(sym, value, env) scm_define(sym,value)
 #  define vload(buf,cflag,rflag)  gh_load(buf)
-#  define errl(message, value) { fputs(message, stdout); gh_display(value); 
putchar('\n'); }
-#  define lprin1CL(var, file)            { char * tmp; 
tmp=CclRepresentation(var); CLprintf(file,"%s",tmp); free(tmp); }
+#  define errl(message, value)    { fputs(message, stdout); gh_display(value); 
putchar('\n'); }
+#  define lprin1CL(var, file)     { char * tmp; tmp = CclRepresentation(var); 
CLprintf(file, "%s", tmp); free(tmp); }
 #  define gh_new_procedureN(name, proc) gh_new_procedure(name, proc, 0, 0, 1)
-#  define aset1(array, pos, value)       gh_vector_set_x(array, pos, value)
-#  define repl_c_string(msg, a, b, c  ) gh_eval_str(msg)
+#  define aset1(array, pos, value)  gh_vector_set_x(array, pos, value)
+#  define repl_c_string(msg, a, b, c)   gh_eval_str(msg)
 #  define print_welcome()
 #  define gh_scm2newstr(scm, lenp) \
   (gh_symbol_p(scm) ? gh_symbol2newstr(scm, lenp) : gh_scm2newstr(scm,lenp))
@@ -84,73 +84,73 @@
 
 extern LISP fast_load(LISP lfname,LISP noeval);
 /*----------------------------------------------------------------------------
---             Macros
+--  Macros
 ----------------------------------------------------------------------------*/
 
 //
-//             Macros for compatibility with guile high level interface.
+//  Macros for compatibility with guile high level interface.
 //
 
 #define SCM LISP
 #define SCM_UNSPECIFIED NIL
 #define gh_null_p(lisp) NULLP(lisp)
 
-#define gh_eq_p(lisp1,lisp2)           EQ(lisp1,lisp2)
+#define gh_eq_p(lisp1, lisp2)  EQ(lisp1, lisp2)
 
-#define gh_list_p(lisp)                                CONSP(lisp)
-#define gh_car(lisp)                           car(lisp)
-#define gh_cdr(lisp)                           cdr(lisp)
-#define gh_caar(lisp)                          caar(lisp)
-#define gh_cadr(lisp)                          cadr(lisp)
-#define gh_cddr(lisp)                          cddr(lisp)
-#define gh_length(lisp)                                nlength(lisp)
+#define gh_list_p(lisp)  CONSP(lisp)
+#define gh_car(lisp)     car(lisp)
+#define gh_cdr(lisp)     cdr(lisp)
+#define gh_caar(lisp)    caar(lisp)
+#define gh_cadr(lisp)    cadr(lisp)
+#define gh_cddr(lisp)    cddr(lisp)
+#define gh_length(lisp)  nlength(lisp)
 
 #define gh_set_car_x(pair, val) setcar(pair, val)
 #define gh_set_cdr_x(pair, val) setcdr(pair, val)
 
-#define gh_exact_p(lisp)               TYPEP(lisp,tc_flonum)
-#define gh_scm2int(lisp)               (long)FLONM(lisp)
-#define gh_scm2long(lisp)              (long)FLONM(lisp)
-#define gh_int2scm(num)                                flocons(num)
+#define gh_exact_p(lisp)   TYPEP(lisp, tc_flonum)
+#define gh_scm2int(lisp)   (long)FLONM(lisp)
+#define gh_scm2long(lisp)  (long)FLONM(lisp)
+#define gh_int2scm(num)    flocons(num)
 
-#define gh_string_p(lisp)              TYPEP(lisp,tc_string)
-#define                gh_scm2newstr(lisp,str) strdup(get_c_string(lisp))
-#define                gh_str02scm(str) strcons(strlen(str),str)
+#define gh_string_p(lisp)        TYPEP(lisp, tc_string)
+#define gh_scm2newstr(lisp,str)  strdup(get_c_string(lisp))
+#define gh_str02scm(str)         strcons(strlen(str), str)
 
-#define                gh_vector_p(lisp)               \
-               (TYPE(lisp)>=tc_string && TYPE(lisp)<=tc_byte_array)
-#define                gh_vector_length(lisp)          nlength(lisp)
-#define                gh_vector_ref(lisp,n)           aref1(lisp,n)
+#define gh_vector_p(lisp) \
+               (TYPE(lisp) >= tc_string && TYPE(lisp) <= tc_byte_array)
+#define gh_vector_length(lisp)  nlength(lisp)
+#define gh_vector_ref(lisp,n)   aref1(lisp,n)
 
-#define gh_boolean_p(lisp)             (EQ(lisp,sym_t) || NULLP(lisp))
-#define gh_scm2bool(lisp)              (NNULLP(lisp))
-#define gh_bool2scm(n)                         ((n) ? SCM_BOOL_T : SCM_BOOL_F)
+#define gh_boolean_p(lisp)  (EQ(lisp,sym_t) || NULLP(lisp))
+#define gh_scm2bool(lisp)   (NNULLP(lisp))
+#define gh_bool2scm(n)      ((n) ? SCM_BOOL_T : SCM_BOOL_F)
 
-#define gh_symbol_p(lisp)              SYMBOLP(lisp)
-#define gh_symbol2scm(str)             cintern(str)
+#define gh_symbol_p(lisp)   SYMBOLP(lisp)
+#define gh_symbol2scm(str)  cintern(str)
 
-#define gh_define(str,val)             setvar(rintern((str)),(val),NIL)
+#define gh_define(str,val)  setvar(rintern((str)), (val), NIL)
 
-#define gh_display(lisp)               lprin1f(lisp,stdout)
-#define gh_newline()                           fprintf(stdout,"\n")
+#define gh_display(lisp)    lprin1f(lisp, stdout)
+#define gh_newline()        fprintf(stdout, "\n")
 
-#define gh_load(str)                           vload(str,0,0)
+#define gh_load(str)        vload(str,0,0)
 
-#define gh_apply(proc,args)            lapply(proc,args)
-#define gh_eval(proc,env)              leval(proc,env)
+#define gh_apply(proc,args)  lapply(proc,args)
+#define gh_eval(proc,env)    leval(proc,env)
 
-#define gh_new_procedure0_0            init_subr_0
-#define gh_new_procedure1_0            init_subr_1
-#define gh_new_procedure2_0            init_subr_2
-#define gh_new_procedure3_0            init_subr_3
-#define gh_new_procedure4_0            init_subr_4
-#define gh_new_procedure5_0            init_subr_5
-#define gh_new_procedureN              init_lsubr
+#define gh_new_procedure0_0  init_subr_0
+#define gh_new_procedure1_0  init_subr_1
+#define gh_new_procedure2_0  init_subr_2
+#define gh_new_procedure3_0  init_subr_3
+#define gh_new_procedure4_0  init_subr_4
+#define gh_new_procedure5_0  init_subr_5
+#define gh_new_procedureN    init_lsubr
 
-#define SCM_BOOL_T             sym_t
-#define SCM_BOOL_F             NIL
+#define SCM_BOOL_T  sym_t
+#define SCM_BOOL_F  NIL
 
-#define gh_vector_set_x(array, pos, value) aset1(array, pos, value)
+#define gh_vector_set_x(array, pos, value)  aset1(array, pos, value)
 
 extern LISP sym_t;
 typedef long ccl_smob_type_t;
@@ -158,7 +158,6 @@
 
 #elif defined(USE_LUA)
 
-
 #include "lua.h"
 #include "lauxlib.h"
 #include "lualib.h"
@@ -184,44 +183,46 @@
 
 #include "iolib.h"
 
-//extern SCM CclEachSecond;                            /// Scheme function 
called each second
+#if 0
+extern SCM CclEachSecond;  /// Scheme function called each second
+#endif
 
 /*----------------------------------------------------------------------------
---             Variables
+--  Variables
 ----------------------------------------------------------------------------*/
 
-extern char* CclStartFile;                             /// CCL start file
-extern int CclInConfigFile;                            /// True while config 
file parsing
+extern char* CclStartFile;   /// CCL start file
+extern int CclInConfigFile;  /// True while config file parsing
 
 /*----------------------------------------------------------------------------
---             Functions
+--  Functions
 ----------------------------------------------------------------------------*/
 
 #if defined(USE_GUILE) || defined(USE_SIOD)
-extern char*              CclConvertToString(SCM scm);
-extern ccl_smob_type_t CclMakeSmobType(const char* name);
-extern SCM                      CclMakeSmobObj(ccl_smob_type_t tag, void* ptr);
-extern void*              CclGetSmobData(SCM smob);
-extern ccl_smob_type_t CclGetSmobType(SCM smob);
-
-extern void CclGcProtect(SCM* obj);            /// Protect scm var for GC
-extern void CclGcUnprotect(SCM* obj);          /// Unprotect scm var for GC
-extern void CclGcProtectedAssign(SCM* obj, SCM value); /// Alter garbage 
protected scm var.
+extern char*            CclConvertToString(SCM scm);
+extern ccl_smob_type_t  CclMakeSmobType(const char* name);
+extern SCM              CclMakeSmobObj(ccl_smob_type_t tag, void* ptr);
+extern void*            CclGetSmobData(SCM smob);
+extern ccl_smob_type_t  CclGetSmobType(SCM smob);
+
+extern void CclGcProtect(SCM* obj);    /// Protect scm var for GC
+extern void CclGcUnprotect(SCM* obj);  /// Unprotect scm var for GC
+extern void CclGcProtectedAssign(SCM* obj, SCM value);  /// Alter garbage 
protected scm var.
 #elif defined(USE_LUA)
 extern const char* LuaToString(lua_State* l, int narg);
 extern lua_Number LuaToNumber(lua_State* l, int narg);
 extern int LuaToBoolean(lua_State* l, int narg);
 #endif
-extern void CclGarbageCollect(int fast);/// Perform garbage collection
-extern void CclFlushOutput();                          /// Flush ccl output
-extern void InitCcl(void);                             /// Initialise ccl
-extern void LoadCcl(void);                             /// Load ccl config file
-extern void SaveCcl(CLFile* file);             /// Save CCL module
-extern void SavePreferences(void);             /// Save user preferences
-extern void CclCommand(const char*);           /// Execute a ccl command
-extern void CclFree(void*);                            /// Save free
-extern void CleanCclCredits();                         /// Free Ccl Credits 
Memory
+extern void CclGarbageCollect(int fast);  /// Perform garbage collection
+extern void CclFlushOutput();             /// Flush ccl output
+extern void InitCcl(void);                /// Initialise ccl
+extern void LoadCcl(void);                /// Load ccl config file
+extern void SaveCcl(CLFile* file);        /// Save CCL module
+extern void SavePreferences(void);        /// Save user preferences
+extern void CclCommand(const char*);      /// Execute a ccl command
+extern void CclFree(void*);               /// Save free
+extern void CleanCclCredits();            /// Free Ccl Credits Memory
 
 //@}
 
-#endif         // !__CCL_H__
+#endif // !__CCL_H__




reply via email to

[Prev in Thread] Current Thread [Next in Thread]