Explicitly specify the SDL API calling convention (C by default)
authorSam Lantinga <slouken@libsdl.org>
Thu, 11 Apr 2002 14:35:16 +0000
changeset 3379154ec9ca3d2
parent 336 745873ea091f
child 338 518ffd98a8f6
Explicitly specify the SDL API calling convention (C by default)
include/SDL.h
include/SDL_active.h
include/SDL_audio.h
include/SDL_cdrom.h
include/SDL_endian.h
include/SDL_error.h
include/SDL_events.h
include/SDL_getenv.h
include/SDL_joystick.h
include/SDL_keyboard.h
include/SDL_main.h
include/SDL_mouse.h
include/SDL_mutex.h
include/SDL_rwops.h
include/SDL_syswm.h
include/SDL_thread.h
include/SDL_timer.h
include/SDL_version.h
include/SDL_video.h
include/begin_code.h
src/main/beos/exports/genexp.pl
src/main/macos/exports/gendef.pl
src/main/macosx/exports/gendef.pl
src/main/win32/exports/gendef.pl
     1.1 --- a/include/SDL.h	Wed Apr 10 17:12:32 2002 +0000
     1.2 +++ b/include/SDL.h	Thu Apr 11 14:35:16 2002 +0000
     1.3 @@ -69,24 +69,24 @@
     1.4   * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
     1.5   * signal handlers for some commonly ignored fatal signals (like SIGSEGV)
     1.6   */
     1.7 -extern DECLSPEC int SDL_Init(Uint32 flags);
     1.8 +extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
     1.9  
    1.10  /* This function initializes specific SDL subsystems */
    1.11 -extern DECLSPEC int SDL_InitSubSystem(Uint32 flags);
    1.12 +extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
    1.13  
    1.14  /* This function cleans up specific SDL subsystems */
    1.15 -extern DECLSPEC void SDL_QuitSubSystem(Uint32 flags);
    1.16 +extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
    1.17  
    1.18  /* This function returns mask of the specified subsystems which have
    1.19     been initialized.
    1.20     If 'flags' is 0, it returns a mask of all initialized subsystems.
    1.21  */
    1.22 -extern DECLSPEC Uint32 SDL_WasInit(Uint32 flags);
    1.23 +extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
    1.24  
    1.25  /* This function cleans up all initialized subsystems and unloads the
    1.26   * dynamically linked library.  You should call it upon all exit conditions.
    1.27   */
    1.28 -extern DECLSPEC void SDL_Quit(void);
    1.29 +extern DECLSPEC void SDLCALL SDL_Quit(void);
    1.30  
    1.31  /* Ends C function definitions when using C++ */
    1.32  #ifdef __cplusplus
     2.1 --- a/include/SDL_active.h	Wed Apr 10 17:12:32 2002 +0000
     2.2 +++ b/include/SDL_active.h	Thu Apr 11 14:35:16 2002 +0000
     2.3 @@ -48,7 +48,7 @@
     2.4   * SDL_APPACTIVE.  If SDL_APPACTIVE is set, then the user is able to
     2.5   * see your application, otherwise it has been iconified or disabled.
     2.6   */
     2.7 -extern DECLSPEC Uint8 SDL_GetAppState(void);
     2.8 +extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void);
     2.9  
    2.10  
    2.11  /* Ends C function definitions when using C++ */
     3.1 --- a/include/SDL_audio.h	Wed Apr 10 17:12:32 2002 +0000
     3.2 +++ b/include/SDL_audio.h	Thu Apr 11 14:35:16 2002 +0000
     3.3 @@ -105,14 +105,14 @@
     3.4   * have a specific need to specify the audio driver you want to use.
     3.5   * You should normally use SDL_Init() or SDL_InitSubSystem().
     3.6   */
     3.7 -extern DECLSPEC int SDL_AudioInit(const char *driver_name);
     3.8 -extern DECLSPEC void SDL_AudioQuit(void);
     3.9 +extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);
    3.10 +extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
    3.11  
    3.12  /* This function fills the given character buffer with the name of the
    3.13   * current audio driver, and returns a pointer to it if the audio driver has
    3.14   * been initialized.  It returns NULL if no driver has been initialized.
    3.15   */
    3.16 -extern DECLSPEC char *SDL_AudioDriverName(char *namebuf, int maxlen);
    3.17 +extern DECLSPEC char * SDLCALL SDL_AudioDriverName(char *namebuf, int maxlen);
    3.18  
    3.19  /*
    3.20   * This function opens the audio device with the desired parameters, and
    3.21 @@ -155,7 +155,7 @@
    3.22   * may modify the requested size of the audio buffer, you should allocate
    3.23   * any local mixing buffers after you open the audio device.
    3.24   */
    3.25 -extern DECLSPEC int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained);
    3.26 +extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained);
    3.27  
    3.28  /*
    3.29   * Get the current audio state:
    3.30 @@ -165,7 +165,7 @@
    3.31  	SDL_AUDIO_PLAYING,
    3.32  	SDL_AUDIO_PAUSED
    3.33  } SDL_audiostatus;
    3.34 -extern DECLSPEC SDL_audiostatus SDL_GetAudioStatus(void);
    3.35 +extern DECLSPEC SDL_audiostatus SDLCALL SDL_GetAudioStatus(void);
    3.36  
    3.37  /*
    3.38   * This function pauses and unpauses the audio callback processing.
    3.39 @@ -174,7 +174,7 @@
    3.40   * data for your callback function after opening the audio device.
    3.41   * Silence will be written to the audio device during the pause.
    3.42   */
    3.43 -extern DECLSPEC void SDL_PauseAudio(int pause_on);
    3.44 +extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on);
    3.45  
    3.46  /*
    3.47   * This function loads a WAVE from the data source, automatically freeing
    3.48 @@ -193,8 +193,7 @@
    3.49   * wave file cannot be opened, uses an unknown data format, or is 
    3.50   * corrupt.  Currently raw and MS-ADPCM WAVE files are supported.
    3.51   */
    3.52 -extern DECLSPEC SDL_AudioSpec *SDL_LoadWAV_RW(SDL_RWops *src, int freesrc,
    3.53 -		 SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len);
    3.54 +extern DECLSPEC SDL_AudioSpec * SDLCALL SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len);
    3.55  
    3.56  /* Compatibility convenience function -- loads a WAV from a file */
    3.57  #define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
    3.58 @@ -203,7 +202,7 @@
    3.59  /*
    3.60   * This function frees data previously allocated with SDL_LoadWAV_RW()
    3.61   */
    3.62 -extern DECLSPEC void SDL_FreeWAV(Uint8 *audio_buf);
    3.63 +extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 *audio_buf);
    3.64  
    3.65  /*
    3.66   * This function takes a source format and rate and a destination format
    3.67 @@ -212,7 +211,7 @@
    3.68   * to the other.
    3.69   * This function returns 0, or -1 if there was an error.
    3.70   */
    3.71 -extern DECLSPEC int SDL_BuildAudioCVT(SDL_AudioCVT *cvt,
    3.72 +extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT *cvt,
    3.73  		Uint16 src_format, Uint8 src_channels, int src_rate,
    3.74  		Uint16 dst_format, Uint8 dst_channels, int dst_rate);
    3.75  
    3.76 @@ -224,7 +223,7 @@
    3.77   * cvt->buf should be allocated after the cvt structure is initialized by
    3.78   * SDL_BuildAudioCVT(), and should be cvt->len*cvt->len_mult bytes long.
    3.79   */
    3.80 -extern DECLSPEC int SDL_ConvertAudio(SDL_AudioCVT *cvt);
    3.81 +extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT *cvt);
    3.82  
    3.83  /*
    3.84   * This takes two audio buffers of the playing audio format and mixes
    3.85 @@ -234,7 +233,7 @@
    3.86   * This is provided for convenience -- you can mix your own audio data.
    3.87   */
    3.88  #define SDL_MIX_MAXVOLUME 128
    3.89 -extern DECLSPEC void SDL_MixAudio(Uint8 *dst, const Uint8 *src, Uint32 len, int volume);
    3.90 +extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 *dst, const Uint8 *src, Uint32 len, int volume);
    3.91  
    3.92  /*
    3.93   * The lock manipulated by these functions protects the callback function.
    3.94 @@ -242,13 +241,13 @@
    3.95   * callback function is not running.  Do not call these from the callback
    3.96   * function or you will cause deadlock.
    3.97   */
    3.98 -extern DECLSPEC void SDL_LockAudio(void);
    3.99 -extern DECLSPEC void SDL_UnlockAudio(void);
   3.100 +extern DECLSPEC void SDLCALL SDL_LockAudio(void);
   3.101 +extern DECLSPEC void SDLCALL SDL_UnlockAudio(void);
   3.102  
   3.103  /*
   3.104   * This function shuts down audio processing and closes the audio device.
   3.105   */
   3.106 -extern DECLSPEC void SDL_CloseAudio(void);
   3.107 +extern DECLSPEC void SDLCALL SDL_CloseAudio(void);
   3.108  
   3.109  
   3.110  /* Ends C function definitions when using C++ */
     4.1 --- a/include/SDL_cdrom.h	Wed Apr 10 17:12:32 2002 +0000
     4.2 +++ b/include/SDL_cdrom.h	Thu Apr 11 14:35:16 2002 +0000
     4.3 @@ -99,7 +99,7 @@
     4.4  /* Returns the number of CD-ROM drives on the system, or -1 if
     4.5     SDL_Init() has not been called with the SDL_INIT_CDROM flag.
     4.6   */
     4.7 -extern DECLSPEC int SDL_CDNumDrives(void);
     4.8 +extern DECLSPEC int SDLCALL SDL_CDNumDrives(void);
     4.9  
    4.10  /* Returns a human-readable, system-dependent identifier for the CD-ROM.
    4.11     Example:
    4.12 @@ -107,7 +107,7 @@
    4.13  	"E:"
    4.14  	"/dev/disk/ide/1/master"
    4.15  */
    4.16 -extern DECLSPEC const char * SDL_CDName(int drive);
    4.17 +extern DECLSPEC const char * SDLCALL SDL_CDName(int drive);
    4.18  
    4.19  /* Opens a CD-ROM drive for access.  It returns a drive handle on success,
    4.20     or NULL if the drive was invalid or busy.  This newly opened CD-ROM
    4.21 @@ -115,13 +115,13 @@
    4.22     CD-ROM handle.
    4.23     Drives are numbered starting with 0.  Drive 0 is the system default CD-ROM.
    4.24  */
    4.25 -extern DECLSPEC SDL_CD * SDL_CDOpen(int drive);
    4.26 +extern DECLSPEC SDL_CD * SDLCALL SDL_CDOpen(int drive);
    4.27  
    4.28  /* This function returns the current status of the given drive.
    4.29     If the drive has a CD in it, the table of contents of the CD and current
    4.30     play position of the CD will be stored in the SDL_CD structure.
    4.31  */
    4.32 -extern DECLSPEC CDstatus SDL_CDStatus(SDL_CD *cdrom);
    4.33 +extern DECLSPEC CDstatus SDLCALL SDL_CDStatus(SDL_CD *cdrom);
    4.34  
    4.35  /* Play the given CD starting at 'start_track' and 'start_frame' for 'ntracks'
    4.36     tracks and 'nframes' frames.  If both 'ntrack' and 'nframe' are 0, play 
    4.37 @@ -142,28 +142,28 @@
    4.38  
    4.39     This function returns 0, or -1 if there was an error.
    4.40  */
    4.41 -extern DECLSPEC int SDL_CDPlayTracks(SDL_CD *cdrom,
    4.42 +extern DECLSPEC int SDLCALL SDL_CDPlayTracks(SDL_CD *cdrom,
    4.43  		int start_track, int start_frame, int ntracks, int nframes);
    4.44  
    4.45  /* Play the given CD starting at 'start' frame for 'length' frames.
    4.46     It returns 0, or -1 if there was an error.
    4.47  */
    4.48 -extern DECLSPEC int SDL_CDPlay(SDL_CD *cdrom, int start, int length);
    4.49 +extern DECLSPEC int SDLCALL SDL_CDPlay(SDL_CD *cdrom, int start, int length);
    4.50  
    4.51  /* Pause play -- returns 0, or -1 on error */
    4.52 -extern DECLSPEC int SDL_CDPause(SDL_CD *cdrom);
    4.53 +extern DECLSPEC int SDLCALL SDL_CDPause(SDL_CD *cdrom);
    4.54  
    4.55  /* Resume play -- returns 0, or -1 on error */
    4.56 -extern DECLSPEC int SDL_CDResume(SDL_CD *cdrom);
    4.57 +extern DECLSPEC int SDLCALL SDL_CDResume(SDL_CD *cdrom);
    4.58  
    4.59  /* Stop play -- returns 0, or -1 on error */
    4.60 -extern DECLSPEC int SDL_CDStop(SDL_CD *cdrom);
    4.61 +extern DECLSPEC int SDLCALL SDL_CDStop(SDL_CD *cdrom);
    4.62  
    4.63  /* Eject CD-ROM -- returns 0, or -1 on error */
    4.64 -extern DECLSPEC int SDL_CDEject(SDL_CD *cdrom);
    4.65 +extern DECLSPEC int SDLCALL SDL_CDEject(SDL_CD *cdrom);
    4.66  
    4.67  /* Closes the handle for the CD-ROM drive */
    4.68 -extern DECLSPEC void SDL_CDClose(SDL_CD *cdrom);
    4.69 +extern DECLSPEC void SDLCALL SDL_CDClose(SDL_CD *cdrom);
    4.70  
    4.71  
    4.72  /* Ends C function definitions when using C++ */
     5.1 --- a/include/SDL_endian.h	Wed Apr 10 17:12:32 2002 +0000
     5.2 +++ b/include/SDL_endian.h	Thu Apr 11 14:35:16 2002 +0000
     5.3 @@ -124,20 +124,20 @@
     5.4  #endif
     5.5  
     5.6  /* Read an item of the specified endianness and return in native format */
     5.7 -extern DECLSPEC Uint16 SDL_ReadLE16(SDL_RWops *src);
     5.8 -extern DECLSPEC Uint16 SDL_ReadBE16(SDL_RWops *src);
     5.9 -extern DECLSPEC Uint32 SDL_ReadLE32(SDL_RWops *src);
    5.10 -extern DECLSPEC Uint32 SDL_ReadBE32(SDL_RWops *src);
    5.11 -extern DECLSPEC Uint64 SDL_ReadLE64(SDL_RWops *src);
    5.12 -extern DECLSPEC Uint64 SDL_ReadBE64(SDL_RWops *src);
    5.13 +extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops *src);
    5.14 +extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops *src);
    5.15 +extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops *src);
    5.16 +extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops *src);
    5.17 +extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops *src);
    5.18 +extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops *src);
    5.19  
    5.20  /* Write an item of native format to the specified endianness */
    5.21 -extern DECLSPEC int SDL_WriteLE16(SDL_RWops *dst, Uint16 value);
    5.22 -extern DECLSPEC int SDL_WriteBE16(SDL_RWops *dst, Uint16 value);
    5.23 -extern DECLSPEC int SDL_WriteLE32(SDL_RWops *dst, Uint32 value);
    5.24 -extern DECLSPEC int SDL_WriteBE32(SDL_RWops *dst, Uint32 value);
    5.25 -extern DECLSPEC int SDL_WriteLE64(SDL_RWops *dst, Uint64 value);
    5.26 -extern DECLSPEC int SDL_WriteBE64(SDL_RWops *dst, Uint64 value);
    5.27 +extern DECLSPEC int SDLCALL SDL_WriteLE16(SDL_RWops *dst, Uint16 value);
    5.28 +extern DECLSPEC int SDLCALL SDL_WriteBE16(SDL_RWops *dst, Uint16 value);
    5.29 +extern DECLSPEC int SDLCALL SDL_WriteLE32(SDL_RWops *dst, Uint32 value);
    5.30 +extern DECLSPEC int SDLCALL SDL_WriteBE32(SDL_RWops *dst, Uint32 value);
    5.31 +extern DECLSPEC int SDLCALL SDL_WriteLE64(SDL_RWops *dst, Uint64 value);
    5.32 +extern DECLSPEC int SDLCALL SDL_WriteBE64(SDL_RWops *dst, Uint64 value);
    5.33  
    5.34  
    5.35  /* Ends C function definitions when using C++ */
     6.1 --- a/include/SDL_error.h	Wed Apr 10 17:12:32 2002 +0000
     6.2 +++ b/include/SDL_error.h	Thu Apr 11 14:35:16 2002 +0000
     6.3 @@ -37,9 +37,9 @@
     6.4  #endif
     6.5  
     6.6  /* Public functions */
     6.7 -extern DECLSPEC void SDL_SetError(const char *fmt, ...);
     6.8 -extern DECLSPEC char * SDL_GetError(void);
     6.9 -extern DECLSPEC void SDL_ClearError(void);
    6.10 +extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...);
    6.11 +extern DECLSPEC char * SDLCALL SDL_GetError(void);
    6.12 +extern DECLSPEC void SDLCALL SDL_ClearError(void);
    6.13  
    6.14  /* Private error message function - used internally */
    6.15  #define SDL_OutOfMemory()	SDL_Error(SDL_ENOMEM)
     7.1 --- a/include/SDL_events.h	Wed Apr 10 17:12:32 2002 +0000
     7.2 +++ b/include/SDL_events.h	Thu Apr 11 14:35:16 2002 +0000
     7.3 @@ -238,7 +238,7 @@
     7.4     This function updates the event queue and internal input device state.
     7.5     This should only be run in the thread that sets the video mode.
     7.6  */
     7.7 -extern DECLSPEC void SDL_PumpEvents(void);
     7.8 +extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
     7.9  
    7.10  /* Checks the event queue for messages and optionally returns them.
    7.11     If 'action' is SDL_ADDEVENT, up to 'numevents' events will be added to
    7.12 @@ -258,26 +258,26 @@
    7.13  	SDL_GETEVENT
    7.14  } SDL_eventaction;
    7.15  /* */
    7.16 -extern DECLSPEC int SDL_PeepEvents(SDL_Event *events, int numevents,
    7.17 +extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event *events, int numevents,
    7.18  				SDL_eventaction action, Uint32 mask);
    7.19  
    7.20  /* Polls for currently pending events, and returns 1 if there are any pending
    7.21     events, or 0 if there are none available.  If 'event' is not NULL, the next
    7.22     event is removed from the queue and stored in that area.
    7.23   */
    7.24 -extern DECLSPEC int SDL_PollEvent(SDL_Event *event);
    7.25 +extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event *event);
    7.26  
    7.27  /* Waits indefinitely for the next available event, returning 1, or 0 if there
    7.28     was an error while waiting for events.  If 'event' is not NULL, the next
    7.29     event is removed from the queue and stored in that area.
    7.30   */
    7.31 -extern DECLSPEC int SDL_WaitEvent(SDL_Event *event);
    7.32 +extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event *event);
    7.33  
    7.34  /* Add an event to the event queue.
    7.35     This function returns 0 if the event queue was full, or -1
    7.36     if there was some other error.  Returns 1 on success.
    7.37   */
    7.38 -extern DECLSPEC int SDL_PushEvent(SDL_Event *event);
    7.39 +extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event *event);
    7.40  
    7.41  /*
    7.42    This function sets up a filter to process all events before they
    7.43 @@ -302,13 +302,13 @@
    7.44    If the quit event is generated by an interrupt signal, it will bypass the
    7.45    internal queue and be delivered to the application at the next event poll.
    7.46  */
    7.47 -extern DECLSPEC void SDL_SetEventFilter(SDL_EventFilter filter);
    7.48 +extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter);
    7.49  
    7.50  /*
    7.51    Return the current event filter - can be used to "chain" filters.
    7.52    If there is no event filter set, this function returns NULL.
    7.53  */
    7.54 -extern DECLSPEC SDL_EventFilter SDL_GetEventFilter(void);
    7.55 +extern DECLSPEC SDL_EventFilter SDLCALL SDL_GetEventFilter(void);
    7.56  
    7.57  /*
    7.58    This function allows you to set the state of processing certain events.
    7.59 @@ -322,7 +322,7 @@
    7.60  #define SDL_IGNORE	 0
    7.61  #define SDL_DISABLE	 0
    7.62  #define SDL_ENABLE	 1
    7.63 -extern DECLSPEC Uint8 SDL_EventState(Uint8 type, int state);
    7.64 +extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint8 type, int state);
    7.65  
    7.66  
    7.67  /* Ends C function definitions when using C++ */
     8.1 --- a/include/SDL_getenv.h	Wed Apr 10 17:12:32 2002 +0000
     8.2 +++ b/include/SDL_getenv.h	Thu Apr 11 14:35:16 2002 +0000
     8.3 @@ -14,11 +14,11 @@
     8.4  #endif
     8.5  
     8.6  /* Put a variable of the form "name=value" into the environment */
     8.7 -extern DECLSPEC int SDL_putenv(const char *variable);
     8.8 +extern DECLSPEC int SDLCALL SDL_putenv(const char *variable);
     8.9  #define putenv(X)   SDL_putenv(X)
    8.10  
    8.11  /* Retrieve a variable named "name" from the environment */
    8.12 -extern DECLSPEC char *SDL_getenv(const char *name);
    8.13 +extern DECLSPEC char * SDLCALL SDL_getenv(const char *name);
    8.14  #define getenv(X)     SDL_getenv(X)
    8.15  
    8.16  /* Ends C function definitions when using C++ */
     9.1 --- a/include/SDL_joystick.h	Wed Apr 10 17:12:32 2002 +0000
     9.2 +++ b/include/SDL_joystick.h	Thu Apr 11 14:35:16 2002 +0000
     9.3 @@ -52,14 +52,14 @@
     9.4  /*
     9.5   * Count the number of joysticks attached to the system
     9.6   */
     9.7 -extern DECLSPEC int SDL_NumJoysticks(void);
     9.8 +extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
     9.9  
    9.10  /*
    9.11   * Get the implementation dependent name of a joystick.
    9.12   * This can be called before any joysticks are opened.
    9.13   * If no name can be found, this function returns NULL.
    9.14   */
    9.15 -extern DECLSPEC const char *SDL_JoystickName(int device_index);
    9.16 +extern DECLSPEC const char * SDLCALL SDL_JoystickName(int device_index);
    9.17  
    9.18  /*
    9.19   * Open a joystick for use - the index passed as an argument refers to
    9.20 @@ -68,46 +68,46 @@
    9.21   *
    9.22   * This function returns a joystick identifier, or NULL if an error occurred.
    9.23   */
    9.24 -extern DECLSPEC SDL_Joystick *SDL_JoystickOpen(int device_index);
    9.25 +extern DECLSPEC SDL_Joystick * SDLCALL SDLCALL SDL_JoystickOpen(int device_index);
    9.26  
    9.27  /*
    9.28   * Returns 1 if the joystick has been opened, or 0 if it has not.
    9.29   */
    9.30 -extern DECLSPEC int SDL_JoystickOpened(int device_index);
    9.31 +extern DECLSPEC int SDLCALL SDL_JoystickOpened(int device_index);
    9.32  
    9.33  /*
    9.34   * Get the device index of an opened joystick.
    9.35   */
    9.36 -extern DECLSPEC int SDL_JoystickIndex(SDL_Joystick *joystick);
    9.37 +extern DECLSPEC int SDLCALL SDL_JoystickIndex(SDL_Joystick *joystick);
    9.38  
    9.39  /*
    9.40   * Get the number of general axis controls on a joystick
    9.41   */
    9.42 -extern DECLSPEC int SDL_JoystickNumAxes(SDL_Joystick *joystick);
    9.43 +extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick);
    9.44  
    9.45  /*
    9.46   * Get the number of trackballs on a joystick
    9.47   * Joystick trackballs have only relative motion events associated
    9.48   * with them and their state cannot be polled.
    9.49   */
    9.50 -extern DECLSPEC int SDL_JoystickNumBalls(SDL_Joystick *joystick);
    9.51 +extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick);
    9.52  
    9.53  /*
    9.54   * Get the number of POV hats on a joystick
    9.55   */
    9.56 -extern DECLSPEC int SDL_JoystickNumHats(SDL_Joystick *joystick);
    9.57 +extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick);
    9.58  
    9.59  /*
    9.60   * Get the number of buttons on a joystick
    9.61   */
    9.62 -extern DECLSPEC int SDL_JoystickNumButtons(SDL_Joystick *joystick);
    9.63 +extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick);
    9.64  
    9.65  /*
    9.66   * Update the current state of the open joysticks.
    9.67   * This is called automatically by the event loop if any joystick
    9.68   * events are enabled.
    9.69   */
    9.70 -extern DECLSPEC void SDL_JoystickUpdate(void);
    9.71 +extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
    9.72  
    9.73  /*
    9.74   * Enable/disable joystick event polling.
    9.75 @@ -116,14 +116,14 @@
    9.76   * information.
    9.77   * The state can be one of SDL_QUERY, SDL_ENABLE or SDL_IGNORE.
    9.78   */
    9.79 -extern DECLSPEC int SDL_JoystickEventState(int state);
    9.80 +extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
    9.81  
    9.82  /*
    9.83   * Get the current state of an axis control on a joystick
    9.84   * The state is a value ranging from -32768 to 32767.
    9.85   * The axis indices start at index 0.
    9.86   */
    9.87 -extern DECLSPEC Sint16 SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis);
    9.88 +extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis);
    9.89  
    9.90  /*
    9.91   * Get the current state of a POV hat on a joystick
    9.92 @@ -141,25 +141,25 @@
    9.93  /*
    9.94   * The hat indices start at index 0.
    9.95   */
    9.96 -extern DECLSPEC Uint8 SDL_JoystickGetHat(SDL_Joystick *joystick, int hat);
    9.97 +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick, int hat);
    9.98  
    9.99  /*
   9.100   * Get the ball axis change since the last poll
   9.101   * This returns 0, or -1 if you passed it invalid parameters.
   9.102   * The ball indices start at index 0.
   9.103   */
   9.104 -extern DECLSPEC int SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy);
   9.105 +extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy);
   9.106  
   9.107  /*
   9.108   * Get the current state of a button on a joystick
   9.109   * The button indices start at index 0.
   9.110   */
   9.111 -extern DECLSPEC Uint8 SDL_JoystickGetButton(SDL_Joystick *joystick, int button);
   9.112 +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick, int button);
   9.113  
   9.114  /*
   9.115   * Close a joystick previously opened with SDL_JoystickOpen()
   9.116   */
   9.117 -extern DECLSPEC void SDL_JoystickClose(SDL_Joystick *joystick);
   9.118 +extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick);
   9.119  
   9.120  
   9.121  /* Ends C function definitions when using C++ */
    10.1 --- a/include/SDL_keyboard.h	Wed Apr 10 17:12:32 2002 +0000
    10.2 +++ b/include/SDL_keyboard.h	Thu Apr 11 14:35:16 2002 +0000
    10.3 @@ -74,7 +74,7 @@
    10.4   * If 'enable' is -1, the translation state is not changed.
    10.5   * It returns the previous state of keyboard translation.
    10.6   */
    10.7 -extern DECLSPEC int SDL_EnableUNICODE(int enable);
    10.8 +extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);
    10.9  
   10.10  /*
   10.11   * Enable/Disable keyboard repeat.  Keyboard repeat defaults to off.
   10.12 @@ -87,7 +87,7 @@
   10.13  /*
   10.14   * If 'delay' is set to 0, keyboard repeat is disabled.
   10.15   */
   10.16 -extern DECLSPEC int SDL_EnableKeyRepeat(int delay, int interval);
   10.17 +extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
   10.18  
   10.19  /*
   10.20   * Get a snapshot of the current state of the keyboard.
   10.21 @@ -96,23 +96,23 @@
   10.22   * 	Uint8 *keystate = SDL_GetKeyState(NULL);
   10.23   *	if ( keystate[SDLK_RETURN] ) ... <RETURN> is pressed.
   10.24   */
   10.25 -extern DECLSPEC Uint8 * SDL_GetKeyState(int *numkeys);
   10.26 +extern DECLSPEC Uint8 * SDLCALL SDL_GetKeyState(int *numkeys);
   10.27  
   10.28  /*
   10.29   * Get the current key modifier state
   10.30   */
   10.31 -extern DECLSPEC SDLMod SDL_GetModState(void);
   10.32 +extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void);
   10.33  
   10.34  /*
   10.35   * Set the current key modifier state
   10.36   * This does not change the keyboard state, only the key modifier flags.
   10.37   */
   10.38 -extern DECLSPEC void SDL_SetModState(SDLMod modstate);
   10.39 +extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate);
   10.40  
   10.41  /*
   10.42   * Get the name of an SDL virtual keysym
   10.43   */
   10.44 -extern DECLSPEC char * SDL_GetKeyName(SDLKey key);
   10.45 +extern DECLSPEC char * SDLCALL SDL_GetKeyName(SDLKey key);
   10.46  
   10.47  
   10.48  /* Ends C function definitions when using C++ */
    11.1 --- a/include/SDL_main.h	Wed Apr 10 17:12:32 2002 +0000
    11.2 +++ b/include/SDL_main.h	Thu Apr 11 14:35:16 2002 +0000
    11.3 @@ -64,9 +64,9 @@
    11.4  #endif
    11.5  
    11.6  /* This should be called from your WinMain() function, if any */
    11.7 -extern DECLSPEC void SDL_SetModuleHandle(void *hInst);
    11.8 +extern DECLSPEC void SDLCALL SDL_SetModuleHandle(void *hInst);
    11.9  /* This can also be called, but is no longer necessary */
   11.10 -extern DECLSPEC int SDL_RegisterApp(char *name, Uint32 style, void *hInst);
   11.11 +extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst);
   11.12  
   11.13  #ifdef __cplusplus
   11.14  }
   11.15 @@ -86,7 +86,7 @@
   11.16  struct QDGlobals;
   11.17  
   11.18  /* This should be called from your main() function, if any */
   11.19 -extern DECLSPEC void SDL_InitQuickDraw(struct QDGlobals *the_qd);
   11.20 +extern DECLSPEC void SDLCALL SDL_InitQuickDraw(struct QDGlobals *the_qd);
   11.21  
   11.22  #ifdef __cplusplus
   11.23  }
    12.1 --- a/include/SDL_mouse.h	Wed Apr 10 17:12:32 2002 +0000
    12.2 +++ b/include/SDL_mouse.h	Thu Apr 11 14:35:16 2002 +0000
    12.3 @@ -56,7 +56,7 @@
    12.4   * be tested using the SDL_BUTTON(X) macros, and x and y are set to the
    12.5   * current mouse cursor position.  You can pass NULL for either x or y.
    12.6   */
    12.7 -extern DECLSPEC Uint8 SDL_GetMouseState(int *x, int *y);
    12.8 +extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y);
    12.9  
   12.10  /*
   12.11   * Retrieve the current state of the mouse.
   12.12 @@ -64,12 +64,12 @@
   12.13   * be tested using the SDL_BUTTON(X) macros, and x and y are set to the
   12.14   * mouse deltas since the last call to SDL_GetRelativeMouseState().
   12.15   */
   12.16 -extern DECLSPEC Uint8 SDL_GetRelativeMouseState(int *x, int *y);
   12.17 +extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
   12.18  
   12.19  /*
   12.20   * Set the position of the mouse cursor (generates a mouse motion event)
   12.21   */
   12.22 -extern DECLSPEC void SDL_WarpMouse(Uint16 x, Uint16 y);
   12.23 +extern DECLSPEC void SDLCALL SDL_WarpMouse(Uint16 x, Uint16 y);
   12.24  
   12.25  /*
   12.26   * Create a cursor using the specified data and mask (in MSB format).
   12.27 @@ -84,7 +84,7 @@
   12.28   *
   12.29   * Cursors created with this function must be freed with SDL_FreeCursor().
   12.30   */
   12.31 -extern DECLSPEC SDL_Cursor *SDL_CreateCursor
   12.32 +extern DECLSPEC SDL_Cursor * SDLCALL SDL_CreateCursor
   12.33  		(Uint8 *data, Uint8 *mask, int w, int h, int hot_x, int hot_y);
   12.34  
   12.35  /*
   12.36 @@ -92,17 +92,17 @@
   12.37   * If the cursor is currently visible, the change will be immediately 
   12.38   * represented on the display.
   12.39   */
   12.40 -extern DECLSPEC void SDL_SetCursor(SDL_Cursor *cursor);
   12.41 +extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor *cursor);
   12.42  
   12.43  /*
   12.44   * Returns the currently active cursor.
   12.45   */
   12.46 -extern DECLSPEC SDL_Cursor * SDL_GetCursor(void);
   12.47 +extern DECLSPEC SDL_Cursor * SDLCALL SDL_GetCursor(void);
   12.48  
   12.49  /*
   12.50   * Deallocates a cursor created with SDL_CreateCursor().
   12.51   */
   12.52 -extern DECLSPEC void SDL_FreeCursor(SDL_Cursor *cursor);
   12.53 +extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor *cursor);
   12.54  
   12.55  /*
   12.56   * Toggle whether or not the cursor is shown on the screen.
   12.57 @@ -111,7 +111,7 @@
   12.58   * before the call, or 0 if it was not.  You can query the current
   12.59   * state by passing a 'toggle' value of -1.
   12.60   */
   12.61 -extern DECLSPEC int SDL_ShowCursor(int toggle);
   12.62 +extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
   12.63  
   12.64  /* Used as a mask when testing buttons in buttonstate
   12.65     Button 1:	Left mouse button
    13.1 --- a/include/SDL_mutex.h	Wed Apr 10 17:12:32 2002 +0000
    13.2 +++ b/include/SDL_mutex.h	Thu Apr 11 14:35:16 2002 +0000
    13.3 @@ -60,18 +60,18 @@
    13.4  typedef struct SDL_mutex SDL_mutex;
    13.5  
    13.6  /* Create a mutex, initialized unlocked */
    13.7 -extern DECLSPEC SDL_mutex * SDL_CreateMutex(void);
    13.8 +extern DECLSPEC SDL_mutex * SDLCALL SDL_CreateMutex(void);
    13.9  
   13.10  /* Lock the mutex  (Returns 0, or -1 on error) */
   13.11  #define SDL_LockMutex(m)	SDL_mutexP(m)
   13.12 -extern DECLSPEC int SDL_mutexP(SDL_mutex *mutex);
   13.13 +extern DECLSPEC int SDLCALL SDL_mutexP(SDL_mutex *mutex);
   13.14  
   13.15  /* Unlock the mutex  (Returns 0, or -1 on error) */
   13.16  #define SDL_UnlockMutex(m)	SDL_mutexV(m)
   13.17 -extern DECLSPEC int SDL_mutexV(SDL_mutex *mutex);
   13.18 +extern DECLSPEC int SDLCALL SDL_mutexV(SDL_mutex *mutex);
   13.19  
   13.20  /* Destroy a mutex */
   13.21 -extern DECLSPEC void SDL_DestroyMutex(SDL_mutex *mutex);
   13.22 +extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex *mutex);
   13.23  
   13.24  
   13.25  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
   13.26 @@ -83,21 +83,21 @@
   13.27  typedef struct SDL_semaphore SDL_sem;
   13.28  
   13.29  /* Create a semaphore, initialized with value, returns NULL on failure. */
   13.30 -extern DECLSPEC SDL_sem * SDL_CreateSemaphore(Uint32 initial_value);
   13.31 +extern DECLSPEC SDL_sem * SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
   13.32  
   13.33  /* Destroy a semaphore */
   13.34 -extern DECLSPEC void SDL_DestroySemaphore(SDL_sem *sem);
   13.35 +extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem *sem);
   13.36  
   13.37  /* This function suspends the calling thread until the semaphore pointed 
   13.38   * to by sem has a positive count. It then atomically decreases the semaphore
   13.39   * count.
   13.40   */
   13.41 -extern DECLSPEC int SDL_SemWait(SDL_sem *sem);
   13.42 +extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem *sem);
   13.43  
   13.44  /* Non-blocking variant of SDL_SemWait(), returns 0 if the wait succeeds,
   13.45     SDL_MUTEX_TIMEDOUT if the wait would block, and -1 on error.
   13.46  */
   13.47 -extern DECLSPEC int SDL_SemTryWait(SDL_sem *sem);
   13.48 +extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem *sem);
   13.49  
   13.50  /* Variant of SDL_SemWait() with a timeout in milliseconds, returns 0 if
   13.51     the wait succeeds, SDL_MUTEX_TIMEDOUT if the wait does not succeed in
   13.52 @@ -105,15 +105,15 @@
   13.53     On some platforms this function is implemented by looping with a delay
   13.54     of 1 ms, and so should be avoided if possible.
   13.55  */
   13.56 -extern DECLSPEC int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 ms);
   13.57 +extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem *sem, Uint32 ms);
   13.58  
   13.59  /* Atomically increases the semaphore's count (not blocking), returns 0,
   13.60     or -1 on error.
   13.61   */
   13.62 -extern DECLSPEC int SDL_SemPost(SDL_sem *sem);
   13.63 +extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem *sem);
   13.64  
   13.65  /* Returns the current count of the semaphore */
   13.66 -extern DECLSPEC Uint32 SDL_SemValue(SDL_sem *sem);
   13.67 +extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem *sem);
   13.68  
   13.69  
   13.70  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
   13.71 @@ -125,26 +125,26 @@
   13.72  typedef struct SDL_cond SDL_cond;
   13.73  
   13.74  /* Create a condition variable */
   13.75 -extern DECLSPEC SDL_cond * SDL_CreateCond(void);
   13.76 +extern DECLSPEC SDL_cond * SDLCALL SDL_CreateCond(void);
   13.77  
   13.78  /* Destroy a condition variable */
   13.79 -extern DECLSPEC void SDL_DestroyCond(SDL_cond *cond);
   13.80 +extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond *cond);
   13.81  
   13.82  /* Restart one of the threads that are waiting on the condition variable,
   13.83     returns 0 or -1 on error.
   13.84   */
   13.85 -extern DECLSPEC int SDL_CondSignal(SDL_cond *cond);
   13.86 +extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond *cond);
   13.87  
   13.88  /* Restart all threads that are waiting on the condition variable,
   13.89     returns 0 or -1 on error.
   13.90   */
   13.91 -extern DECLSPEC int SDL_CondBroadcast(SDL_cond *cond);
   13.92 +extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond *cond);
   13.93  
   13.94  /* Wait on the condition variable, unlocking the provided mutex.
   13.95     The mutex must be locked before entering this function!
   13.96     Returns 0 when it is signaled, or -1 on error.
   13.97   */
   13.98 -extern DECLSPEC int SDL_CondWait(SDL_cond *cond, SDL_mutex *mut);
   13.99 +extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond *cond, SDL_mutex *mut);
  13.100  
  13.101  /* Waits for at most 'ms' milliseconds, and returns 0 if the condition
  13.102     variable is signaled, SDL_MUTEX_TIMEDOUT if the condition is not
  13.103 @@ -152,7 +152,7 @@
  13.104     On some platforms this function is implemented by looping with a delay
  13.105     of 1 ms, and so should be avoided if possible.
  13.106  */
  13.107 -extern DECLSPEC int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms);
  13.108 +extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms);
  13.109  
  13.110  /* Ends C function definitions when using C++ */
  13.111  #ifdef __cplusplus
    14.1 --- a/include/SDL_rwops.h	Wed Apr 10 17:12:32 2002 +0000
    14.2 +++ b/include/SDL_rwops.h	Thu Apr 11 14:35:16 2002 +0000
    14.3 @@ -87,14 +87,14 @@
    14.4  
    14.5  /* Functions to create SDL_RWops structures from various data sources */
    14.6  
    14.7 -extern DECLSPEC SDL_RWops * SDL_RWFromFile(const char *file, const char *mode);
    14.8 +extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromFile(const char *file, const char *mode);
    14.9  
   14.10 -extern DECLSPEC SDL_RWops * SDL_RWFromFP(FILE *fp, int autoclose);
   14.11 +extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromFP(FILE *fp, int autoclose);
   14.12  
   14.13 -extern DECLSPEC SDL_RWops * SDL_RWFromMem(void *mem, int size);
   14.14 +extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromMem(void *mem, int size);
   14.15  
   14.16 -extern DECLSPEC SDL_RWops * SDL_AllocRW(void);
   14.17 -extern DECLSPEC void SDL_FreeRW(SDL_RWops *area);
   14.18 +extern DECLSPEC SDL_RWops * SDLCALL SDL_AllocRW(void);
   14.19 +extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops *area);
   14.20  
   14.21  /* Macros to easily read and write from an SDL_RWops structure */
   14.22  #define SDL_RWseek(ctx, offset, whence)	(ctx)->seek(ctx, offset, whence)
    15.1 --- a/include/SDL_syswm.h	Wed Apr 10 17:12:32 2002 +0000
    15.2 +++ b/include/SDL_syswm.h	Thu Apr 11 14:35:16 2002 +0000
    15.3 @@ -153,7 +153,7 @@
    15.4   * returns 1 if the function is implemented.  If it's not implemented, or
    15.5   * the version member of the 'info' structure is invalid, it returns 0. 
    15.6   */
    15.7 -extern DECLSPEC int SDL_GetWMInfo(SDL_SysWMinfo *info);
    15.8 +extern DECLSPEC int SDLCALL SDL_GetWMInfo(SDL_SysWMinfo *info);
    15.9  
   15.10  
   15.11  /* Ends C function definitions when using C++ */
    16.1 --- a/include/SDL_thread.h	Wed Apr 10 17:12:32 2002 +0000
    16.2 +++ b/include/SDL_thread.h	Thu Apr 11 14:35:16 2002 +0000
    16.3 @@ -50,24 +50,24 @@
    16.4  typedef struct SDL_Thread SDL_Thread;
    16.5  
    16.6  /* Create a thread */
    16.7 -extern DECLSPEC SDL_Thread * SDL_CreateThread(int (*fn)(void *), void *data);
    16.8 +extern DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (*fn)(void *), void *data);
    16.9  
   16.10  /* Get the 32-bit thread identifier for the current thread */
   16.11 -extern DECLSPEC Uint32 SDL_ThreadID(void);
   16.12 +extern DECLSPEC Uint32 SDLCALL SDL_ThreadID(void);
   16.13  
   16.14  /* Get the 32-bit thread identifier for the specified thread,
   16.15     equivalent to SDL_ThreadID() if the specified thread is NULL.
   16.16   */
   16.17 -extern DECLSPEC Uint32 SDL_GetThreadID(SDL_Thread *thread);
   16.18 +extern DECLSPEC Uint32 SDLCALL SDL_GetThreadID(SDL_Thread *thread);
   16.19  
   16.20  /* Wait for a thread to finish.
   16.21     The return code for the thread function is placed in the area
   16.22     pointed to by 'status', if 'status' is not NULL.
   16.23   */
   16.24 -extern DECLSPEC void SDL_WaitThread(SDL_Thread *thread, int *status);
   16.25 +extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread *thread, int *status);
   16.26  
   16.27  /* Forcefully kill a thread without worrying about its state */
   16.28 -extern DECLSPEC void SDL_KillThread(SDL_Thread *thread);
   16.29 +extern DECLSPEC void SDLCALL SDL_KillThread(SDL_Thread *thread);
   16.30  
   16.31  
   16.32  /* Ends C function definitions when using C++ */
    17.1 --- a/include/SDL_timer.h	Wed Apr 10 17:12:32 2002 +0000
    17.2 +++ b/include/SDL_timer.h	Thu Apr 11 14:35:16 2002 +0000
    17.3 @@ -48,13 +48,13 @@
    17.4  /* Get the number of milliseconds since the SDL library initialization.
    17.5   * Note that this value wraps if the program runs for more than ~49 days.
    17.6   */ 
    17.7 -extern DECLSPEC Uint32 SDL_GetTicks(void);
    17.8 +extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
    17.9  
   17.10  /* Wait a specified number of milliseconds before returning */
   17.11 -extern DECLSPEC void SDL_Delay(Uint32 ms);
   17.12 +extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
   17.13  
   17.14  /* Function prototype for the timer callback function */
   17.15 -typedef Uint32 (*SDL_TimerCallback)(Uint32 interval);
   17.16 +typedef Uint32 (SDLCALL *SDL_TimerCallback)(Uint32 interval);
   17.17  
   17.18  /* Set a callback to run after the specified number of milliseconds has
   17.19   * elapsed. The callback function is passed the current timer interval
   17.20 @@ -82,7 +82,7 @@
   17.21   * should not use this function in multi-threaded applications as signals
   17.22   * to multi-threaded apps have undefined behavior in some implementations.
   17.23   */
   17.24 -extern DECLSPEC int SDL_SetTimer(Uint32 interval, SDL_TimerCallback callback);
   17.25 +extern DECLSPEC int SDLCALL SDL_SetTimer(Uint32 interval, SDL_TimerCallback callback);
   17.26  
   17.27  /* New timer API, supports multiple timers
   17.28   * Written by Stephane Peter <megastep@lokigames.com>
   17.29 @@ -94,7 +94,7 @@
   17.30   * passed in, the periodic alarm continues, otherwise a new alarm is
   17.31   * scheduled.  If the callback returns 0, the periodic alarm is cancelled.
   17.32   */
   17.33 -typedef Uint32 (*SDL_NewTimerCallback)(Uint32 interval, void *param);
   17.34 +typedef Uint32 (SDLCALL *SDL_NewTimerCallback)(Uint32 interval, void *param);
   17.35  
   17.36  /* Definition of the timer ID type */
   17.37  typedef struct _SDL_TimerID *SDL_TimerID;
   17.38 @@ -102,12 +102,12 @@
   17.39  /* Add a new timer to the pool of timers already running.
   17.40     Returns a timer ID, or NULL when an error occurs.
   17.41   */
   17.42 -extern DECLSPEC SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_NewTimerCallback callback, void *param);
   17.43 +extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval, SDL_NewTimerCallback callback, void *param);
   17.44  
   17.45  /* Remove one of the multiple timers knowing its ID.
   17.46   * Returns a boolean value indicating success.
   17.47   */
   17.48 -extern DECLSPEC SDL_bool SDL_RemoveTimer(SDL_TimerID t);
   17.49 +extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID t);
   17.50  
   17.51  /* Ends C function definitions when using C++ */
   17.52  #ifdef __cplusplus
    18.1 --- a/include/SDL_version.h	Wed Apr 10 17:12:32 2002 +0000
    18.2 +++ b/include/SDL_version.h	Thu Apr 11 14:35:16 2002 +0000
    18.3 @@ -79,7 +79,7 @@
    18.4     it should NOT be used to fill a version structure, instead you should
    18.5     use the SDL_Version() macro.
    18.6   */
    18.7 -extern DECLSPEC const SDL_version * SDL_Linked_Version(void);
    18.8 +extern DECLSPEC const SDL_version * SDLCALL SDL_Linked_Version(void);
    18.9  
   18.10  /* Ends C function definitions when using C++ */
   18.11  #ifdef __cplusplus
    19.1 --- a/include/SDL_video.h	Wed Apr 10 17:12:32 2002 +0000
    19.2 +++ b/include/SDL_video.h	Thu Apr 11 14:35:16 2002 +0000
    19.3 @@ -237,14 +237,14 @@
    19.4   * SDL_Init() before opening the sound device, otherwise under Win32 DirectX,
    19.5   * you won't be able to set full-screen display modes.
    19.6   */
    19.7 -extern DECLSPEC int SDL_VideoInit(const char *driver_name, Uint32 flags);
    19.8 -extern DECLSPEC void SDL_VideoQuit(void);
    19.9 +extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name, Uint32 flags);
   19.10 +extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
   19.11  
   19.12  /* This function fills the given character buffer with the name of the
   19.13   * video driver, and returns a pointer to it if the video driver has
   19.14   * been initialized.  It returns NULL if no driver has been initialized.
   19.15   */
   19.16 -extern DECLSPEC char *SDL_VideoDriverName(char *namebuf, int maxlen);
   19.17 +extern DECLSPEC char * SDLCALL SDL_VideoDriverName(char *namebuf, int maxlen);
   19.18  
   19.19  /*
   19.20   * This function returns a pointer to the current display surface.
   19.21 @@ -252,7 +252,7 @@
   19.22   * function returns the publicly visible surface, not the real video
   19.23   * surface.
   19.24   */
   19.25 -extern DECLSPEC SDL_Surface * SDL_GetVideoSurface(void);
   19.26 +extern DECLSPEC SDL_Surface * SDLCALL SDL_GetVideoSurface(void);
   19.27  
   19.28  /*
   19.29   * This function returns a read-only pointer to information about the
   19.30 @@ -260,7 +260,7 @@
   19.31   * member of the returned structure will contain the pixel format of the
   19.32   * "best" video mode.
   19.33   */
   19.34 -extern DECLSPEC const SDL_VideoInfo * SDL_GetVideoInfo(void);
   19.35 +extern DECLSPEC const SDL_VideoInfo * SDLCALL SDL_GetVideoInfo(void);
   19.36  
   19.37  /* 
   19.38   * Check to see if a particular video mode is supported.
   19.39 @@ -273,7 +273,7 @@
   19.40   * The arguments to SDL_VideoModeOK() are the same ones you would pass to
   19.41   * SDL_SetVideoMode()
   19.42   */
   19.43 -extern DECLSPEC int SDL_VideoModeOK(int width, int height, int bpp, Uint32 flags);
   19.44 +extern DECLSPEC int SDLCALL SDL_VideoModeOK(int width, int height, int bpp, Uint32 flags);
   19.45  
   19.46  /*
   19.47   * Return a pointer to an array of available screen dimensions for the
   19.48 @@ -284,7 +284,7 @@
   19.49   * If 'format' is NULL, the mode list will be for the format given 
   19.50   * by SDL_GetVideoInfo()->vfmt
   19.51   */
   19.52 -extern DECLSPEC SDL_Rect ** SDL_ListModes(SDL_PixelFormat *format, Uint32 flags);
   19.53 +extern DECLSPEC SDL_Rect ** SDLCALL SDL_ListModes(SDL_PixelFormat *format, Uint32 flags);
   19.54  
   19.55  /*
   19.56   * Set up a video mode with the specified width, height and bits-per-pixel.
   19.57 @@ -344,7 +344,7 @@
   19.58   * SDL will fall back to reduced functionality if the exact flags you wanted
   19.59   * are not available.
   19.60   */
   19.61 -extern DECLSPEC SDL_Surface *SDL_SetVideoMode
   19.62 +extern DECLSPEC SDL_Surface * SDLCALL SDL_SetVideoMode
   19.63  			(int width, int height, int bpp, Uint32 flags);
   19.64  
   19.65  /*
   19.66 @@ -353,9 +353,9 @@
   19.67   * screen.
   19.68   * These functions should not be called while 'screen' is locked.
   19.69   */
   19.70 -extern DECLSPEC void SDL_UpdateRects
   19.71 +extern DECLSPEC void SDLCALL SDL_UpdateRects
   19.72  		(SDL_Surface *screen, int numrects, SDL_Rect *rects);
   19.73 -extern DECLSPEC void SDL_UpdateRect
   19.74 +extern DECLSPEC void SDLCALL SDL_UpdateRect
   19.75  		(SDL_Surface *screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h);
   19.76  
   19.77  /*
   19.78 @@ -368,7 +368,7 @@
   19.79   * setting the video mode for this function to perform hardware flipping.
   19.80   * This function returns 0 if successful, or -1 if there was an error.
   19.81   */
   19.82 -extern DECLSPEC int SDL_Flip(SDL_Surface *screen);
   19.83 +extern DECLSPEC int SDLCALL SDL_Flip(SDL_Surface *screen);
   19.84  
   19.85  /*
   19.86   * Set the gamma correction for each of the color channels.
   19.87 @@ -378,7 +378,7 @@
   19.88   * be emulated using gamma ramps, if available.  If successful, this
   19.89   * function returns 0, otherwise it returns -1.
   19.90   */
   19.91 -extern DECLSPEC int SDL_SetGamma(float red, float green, float blue);
   19.92 +extern DECLSPEC int SDLCALL SDL_SetGamma(float red, float green, float blue);
   19.93  
   19.94  /*
   19.95   * Set the gamma translation table for the red, green, and blue channels
   19.96 @@ -392,7 +392,7 @@
   19.97   * hardware does not support gamma translation, or otherwise fails,
   19.98   * this function will return -1.
   19.99   */
  19.100 -extern DECLSPEC int SDL_SetGammaRamp(Uint16 *red, Uint16 *green, Uint16 *blue);
  19.101 +extern DECLSPEC int SDLCALL SDL_SetGammaRamp(Uint16 *red, Uint16 *green, Uint16 *blue);
  19.102  
  19.103  /*
  19.104   * Retrieve the current values of the gamma translation tables.
  19.105 @@ -403,7 +403,7 @@
  19.106   * hardware does not support gamma translation, or otherwise fails,
  19.107   * this function will return -1.
  19.108   */
  19.109 -extern DECLSPEC int SDL_GetGammaRamp(Uint16 *red, Uint16 *green, Uint16 *blue);
  19.110 +extern DECLSPEC int SDLCALL SDL_GetGammaRamp(Uint16 *red, Uint16 *green, Uint16 *blue);
  19.111  
  19.112  /*
  19.113   * Sets a portion of the colormap for the given 8-bit surface.  If 'surface'
  19.114 @@ -420,7 +420,7 @@
  19.115   * you desire, even if the window colormap has to be warped or run under
  19.116   * emulation.
  19.117   */
  19.118 -extern DECLSPEC int SDL_SetColors(SDL_Surface *surface, 
  19.119 +extern DECLSPEC int SDLCALL SDL_SetColors(SDL_Surface *surface, 
  19.120  			SDL_Color *colors, int firstcolor, int ncolors);
  19.121  
  19.122  /*
  19.123 @@ -439,32 +439,32 @@
  19.124   * SDL_SetColors() is equivalent to calling this function with
  19.125   *     flags = (SDL_LOGPAL|SDL_PHYSPAL).
  19.126   */
  19.127 -extern DECLSPEC int SDL_SetPalette(SDL_Surface *surface, int flags,
  19.128 +extern DECLSPEC int SDLCALL SDL_SetPalette(SDL_Surface *surface, int flags,
  19.129  				   SDL_Color *colors, int firstcolor,
  19.130  				   int ncolors);
  19.131  
  19.132  /*
  19.133   * Maps an RGB triple to an opaque pixel value for a given pixel format
  19.134   */
  19.135 -extern DECLSPEC Uint32 SDL_MapRGB
  19.136 +extern DECLSPEC Uint32 SDLCALL SDL_MapRGB
  19.137  			(SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b);
  19.138  
  19.139  /*
  19.140   * Maps an RGBA quadruple to a pixel value for a given pixel format
  19.141   */
  19.142 -extern DECLSPEC Uint32 SDL_MapRGBA(SDL_PixelFormat *format,
  19.143 +extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(SDL_PixelFormat *format,
  19.144  				   Uint8 r, Uint8 g, Uint8 b, Uint8 a);
  19.145  
  19.146  /*
  19.147   * Maps a pixel value into the RGB components for a given pixel format
  19.148   */
  19.149 -extern DECLSPEC void SDL_GetRGB(Uint32 pixel, SDL_PixelFormat *fmt,
  19.150 +extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel, SDL_PixelFormat *fmt,
  19.151  				Uint8 *r, Uint8 *g, Uint8 *b);
  19.152  
  19.153  /*
  19.154   * Maps a pixel value into the RGBA components for a given pixel format
  19.155   */
  19.156 -extern DECLSPEC void SDL_GetRGBA(Uint32 pixel, SDL_PixelFormat *fmt,
  19.157 +extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel, SDL_PixelFormat *fmt,
  19.158  				 Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a);
  19.159  
  19.160  /*
  19.161 @@ -502,13 +502,13 @@
  19.162   * the SDL_HWSURFACE flag set, and will be created in system memory instead.
  19.163   */
  19.164  #define SDL_AllocSurface    SDL_CreateRGBSurface
  19.165 -extern DECLSPEC SDL_Surface *SDL_CreateRGBSurface
  19.166 +extern DECLSPEC SDL_Surface * SDLCALL SDL_CreateRGBSurface
  19.167  			(Uint32 flags, int width, int height, int depth, 
  19.168  			Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
  19.169 -extern DECLSPEC SDL_Surface *SDL_CreateRGBSurfaceFrom(void *pixels,
  19.170 +extern DECLSPEC SDL_Surface * SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
  19.171  			int width, int height, int depth, int pitch,
  19.172  			Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
  19.173 -extern DECLSPEC void SDL_FreeSurface(SDL_Surface *surface);
  19.174 +extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface *surface);
  19.175  
  19.176  /*
  19.177   * SDL_LockSurface() sets up a surface for directly accessing the pixels.
  19.178 @@ -528,8 +528,8 @@
  19.179   *
  19.180   * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.
  19.181   */
  19.182 -extern DECLSPEC int SDL_LockSurface(SDL_Surface *surface);
  19.183 -extern DECLSPEC void SDL_UnlockSurface(SDL_Surface *surface);
  19.184 +extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface *surface);
  19.185 +extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface *surface);
  19.186  
  19.187  /*
  19.188   * Load a surface from a seekable SDL data source (memory or file.)
  19.189 @@ -537,7 +537,7 @@
  19.190   * Returns the new surface, or NULL if there was an error.
  19.191   * The new surface should be freed with SDL_FreeSurface().
  19.192   */
  19.193 -extern DECLSPEC SDL_Surface * SDL_LoadBMP_RW(SDL_RWops *src, int freesrc);
  19.194 +extern DECLSPEC SDL_Surface * SDLCALL SDL_LoadBMP_RW(SDL_RWops *src, int freesrc);
  19.195  
  19.196  /* Convenience macro -- load a surface from a file */
  19.197  #define SDL_LoadBMP(file)	SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
  19.198 @@ -547,7 +547,7 @@
  19.199   * If 'freedst' is non-zero, the source will be closed after being written.
  19.200   * Returns 0 if successful or -1 if there was an error.
  19.201   */
  19.202 -extern DECLSPEC int SDL_SaveBMP_RW
  19.203 +extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
  19.204  		(SDL_Surface *surface, SDL_RWops *dst, int freedst);
  19.205  
  19.206  /* Convenience macro -- save a surface to a file */
  19.207 @@ -563,7 +563,7 @@
  19.208   * If 'flag' is 0, this function clears any current color key.
  19.209   * This function returns 0, or -1 if there was an error.
  19.210   */
  19.211 -extern DECLSPEC int SDL_SetColorKey
  19.212 +extern DECLSPEC int SDLCALL SDL_SetColorKey
  19.213  			(SDL_Surface *surface, Uint32 flag, Uint32 key);
  19.214  
  19.215  /*
  19.216 @@ -579,7 +579,7 @@
  19.217   * OR:ing the flag with SDL_RLEACCEL requests RLE acceleration for the
  19.218   * surface; if SDL_RLEACCEL is not specified, the RLE accel will be removed.
  19.219   */
  19.220 -extern DECLSPEC int SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha);
  19.221 +extern DECLSPEC int SDLCALL SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha);
  19.222  
  19.223  /*
  19.224   * Sets the clipping rectangle for the destination surface in a blit.
  19.225 @@ -593,14 +593,14 @@
  19.226   * Note that blits are automatically clipped to the edges of the source
  19.227   * and destination surfaces.
  19.228   */
  19.229 -extern DECLSPEC SDL_bool SDL_SetClipRect(SDL_Surface *surface, const SDL_Rect *rect);
  19.230 +extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface *surface, const SDL_Rect *rect);
  19.231  
  19.232  /*
  19.233   * Gets the clipping rectangle for the destination surface in a blit.
  19.234   * 'rect' must be a pointer to a valid rectangle which will be filled
  19.235   * with the correct values.
  19.236   */
  19.237 -extern DECLSPEC void SDL_GetClipRect(SDL_Surface *surface, SDL_Rect *rect);
  19.238 +extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface *surface, SDL_Rect *rect);
  19.239  
  19.240  /*
  19.241   * Creates a new surface of the specified format, and then copies and maps 
  19.242 @@ -614,7 +614,7 @@
  19.243   *
  19.244   * This function is used internally by SDL_DisplayFormat().
  19.245   */
  19.246 -extern DECLSPEC SDL_Surface *SDL_ConvertSurface
  19.247 +extern DECLSPEC SDL_Surface * SDLCALL SDL_ConvertSurface
  19.248  			(SDL_Surface *src, SDL_PixelFormat *fmt, Uint32 flags);
  19.249  
  19.250  /*
  19.251 @@ -691,13 +691,13 @@
  19.252  /* This is the public blit function, SDL_BlitSurface(), and it performs
  19.253     rectangle validation and clipping before passing it to SDL_LowerBlit()
  19.254  */
  19.255 -extern DECLSPEC int SDL_UpperBlit
  19.256 +extern DECLSPEC int SDLCALL SDL_UpperBlit
  19.257  			(SDL_Surface *src, SDL_Rect *srcrect,
  19.258  			 SDL_Surface *dst, SDL_Rect *dstrect);
  19.259  /* This is a semi-private blit function and it performs low-level surface
  19.260     blitting only.
  19.261  */
  19.262 -extern DECLSPEC int SDL_LowerBlit
  19.263 +extern DECLSPEC int SDLCALL SDL_LowerBlit
  19.264  			(SDL_Surface *src, SDL_Rect *srcrect,
  19.265  			 SDL_Surface *dst, SDL_Rect *dstrect);
  19.266  
  19.267 @@ -710,7 +710,7 @@
  19.268   * can be generated by the SDL_MapRGB() function.
  19.269   * This function returns 0 on success, or -1 on error.
  19.270   */
  19.271 -extern DECLSPEC int SDL_FillRect
  19.272 +extern DECLSPEC int SDLCALL SDL_FillRect
  19.273  		(SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color);
  19.274  
  19.275  /* 
  19.276 @@ -724,7 +724,7 @@
  19.277   *
  19.278   * If the conversion fails or runs out of memory, it returns NULL
  19.279   */
  19.280 -extern DECLSPEC SDL_Surface * SDL_DisplayFormat(SDL_Surface *surface);
  19.281 +extern DECLSPEC SDL_Surface * SDLCALL SDL_DisplayFormat(SDL_Surface *surface);
  19.282  
  19.283  /* 
  19.284   * This function takes a surface and copies it to a new surface of the
  19.285 @@ -738,7 +738,7 @@
  19.286   *
  19.287   * If the conversion fails or runs out of memory, it returns NULL
  19.288   */
  19.289 -extern DECLSPEC SDL_Surface * SDL_DisplayFormatAlpha(SDL_Surface *surface);
  19.290 +extern DECLSPEC SDL_Surface * SDLCALL SDL_DisplayFormatAlpha(SDL_Surface *surface);
  19.291  
  19.292  
  19.293  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  19.294 @@ -750,12 +750,12 @@
  19.295     the contents of the display surface underneath the area where the overlay
  19.296     is shown is undefined - it may be overwritten with the converted YUV data.
  19.297  */
  19.298 -extern DECLSPEC SDL_Overlay *SDL_CreateYUVOverlay(int width, int height,
  19.299 +extern DECLSPEC SDL_Overlay * SDLCALL SDL_CreateYUVOverlay(int width, int height,
  19.300  				Uint32 format, SDL_Surface *display);
  19.301  
  19.302  /* Lock an overlay for direct access, and unlock it when you are done */
  19.303 -extern DECLSPEC int SDL_LockYUVOverlay(SDL_Overlay *overlay);
  19.304 -extern DECLSPEC void SDL_UnlockYUVOverlay(SDL_Overlay *overlay);
  19.305 +extern DECLSPEC int SDLCALL SDL_LockYUVOverlay(SDL_Overlay *overlay);
  19.306 +extern DECLSPEC void SDLCALL SDL_UnlockYUVOverlay(SDL_Overlay *overlay);
  19.307  
  19.308  /* Blit a video overlay to the display surface.
  19.309     The contents of the video surface underneath the blit destination are
  19.310 @@ -763,10 +763,10 @@
  19.311     The width and height of the destination rectangle may be different from
  19.312     that of the overlay, but currently only 2x scaling is supported.
  19.313  */
  19.314 -extern DECLSPEC int SDL_DisplayYUVOverlay(SDL_Overlay *overlay, SDL_Rect *dstrect);
  19.315 +extern DECLSPEC int SDLCALL SDL_DisplayYUVOverlay(SDL_Overlay *overlay, SDL_Rect *dstrect);
  19.316  
  19.317  /* Free a video overlay */
  19.318 -extern DECLSPEC void SDL_FreeYUVOverlay(SDL_Overlay *overlay);
  19.319 +extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay(SDL_Overlay *overlay);
  19.320  
  19.321  
  19.322  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  19.323 @@ -783,17 +783,17 @@
  19.324   *
  19.325   * This is disabled in default builds of SDL.
  19.326   */
  19.327 -extern DECLSPEC int SDL_GL_LoadLibrary(const char *path);
  19.328 +extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
  19.329  
  19.330  /*
  19.331   * Get the address of a GL function (for extension functions)
  19.332   */
  19.333 -extern DECLSPEC void *SDL_GL_GetProcAddress(const char* proc);
  19.334 +extern DECLSPEC void * SDLCALL SDL_GL_GetProcAddress(const char* proc);
  19.335  
  19.336  /*
  19.337   * Set an attribute of the OpenGL subsystem before intialization.
  19.338   */
  19.339 -extern DECLSPEC int SDL_GL_SetAttribute(SDL_GLattr attr, int value);
  19.340 +extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
  19.341  
  19.342  /*
  19.343   * Get an attribute of the OpenGL subsystem from the windowing
  19.344 @@ -804,20 +804,20 @@
  19.345   * Developers should track the values they pass into SDL_GL_SetAttribute
  19.346   * themselves if they want to retrieve these values.
  19.347   */
  19.348 -extern DECLSPEC int SDL_GL_GetAttribute(SDL_GLattr attr, int* value);
  19.349 +extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int* value);
  19.350  
  19.351  /*
  19.352   * Swap the OpenGL buffers, if double-buffering is supported.
  19.353   */
  19.354 -extern DECLSPEC void SDL_GL_SwapBuffers(void);
  19.355 +extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers(void);
  19.356  
  19.357  /*
  19.358   * Internal functions that should not be called unless you have read
  19.359   * and understood the source code for these functions.
  19.360   */
  19.361 -extern DECLSPEC void SDL_GL_UpdateRects(int numrects, SDL_Rect* rects);
  19.362 -extern DECLSPEC void SDL_GL_Lock(void);
  19.363 -extern DECLSPEC void SDL_GL_Unlock(void);
  19.364 +extern DECLSPEC void SDLCALL SDL_GL_UpdateRects(int numrects, SDL_Rect* rects);
  19.365 +extern DECLSPEC void SDLCALL SDL_GL_Lock(void);
  19.366 +extern DECLSPEC void SDLCALL SDL_GL_Unlock(void);
  19.367  
  19.368  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  19.369  /* These functions allow interaction with the window manager, if any.        */
  19.370 @@ -826,8 +826,8 @@
  19.371  /*
  19.372   * Sets/Gets the title and icon text of the display window
  19.373   */
  19.374 -extern DECLSPEC void SDL_WM_SetCaption(const char *title, const char *icon);
  19.375 -extern DECLSPEC void SDL_WM_GetCaption(char **title, char **icon);
  19.376 +extern DECLSPEC void SDLCALL SDL_WM_SetCaption(const char *title, const char *icon);
  19.377 +extern DECLSPEC void SDLCALL SDL_WM_GetCaption(char **title, char **icon);
  19.378  
  19.379  /*
  19.380   * Sets the icon for the display window.
  19.381 @@ -835,14 +835,14 @@
  19.382   * It takes an icon surface, and a mask in MSB format.
  19.383   * If 'mask' is NULL, the entire icon surface will be used as the icon.
  19.384   */
  19.385 -extern DECLSPEC void SDL_WM_SetIcon(SDL_Surface *icon, Uint8 *mask);
  19.386 +extern DECLSPEC void SDLCALL SDL_WM_SetIcon(SDL_Surface *icon, Uint8 *mask);
  19.387  
  19.388  /*
  19.389   * This function iconifies the window, and returns 1 if it succeeded.
  19.390   * If the function succeeds, it generates an SDL_APPACTIVE loss event.
  19.391   * This function is a noop and returns 0 in non-windowed environments.
  19.392   */
  19.393 -extern DECLSPEC int SDL_WM_IconifyWindow(void);
  19.394 +extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow(void);
  19.395  
  19.396  /*
  19.397   * Toggle fullscreen mode without changing the contents of the screen.
  19.398 @@ -859,7 +859,7 @@
  19.399   *
  19.400   * This is currently only implemented in the X11 video driver.
  19.401   */
  19.402 -extern DECLSPEC int SDL_WM_ToggleFullScreen(SDL_Surface *surface);
  19.403 +extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen(SDL_Surface *surface);
  19.404  
  19.405  /*
  19.406   * This function allows you to set and query the input grab state of
  19.407 @@ -876,10 +876,10 @@
  19.408   * and nearly all keyboard input is passed directly to the application,
  19.409   * and not interpreted by a window manager, if any.
  19.410   */
  19.411 -extern DECLSPEC SDL_GrabMode SDL_WM_GrabInput(SDL_GrabMode mode);
  19.412 +extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput(SDL_GrabMode mode);
  19.413  
  19.414  /* Not in public API at the moment - do not use! */
  19.415 -extern DECLSPEC int SDL_SoftStretch(SDL_Surface *src, SDL_Rect *srcrect,
  19.416 +extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface *src, SDL_Rect *srcrect,
  19.417                                      SDL_Surface *dst, SDL_Rect *dstrect);
  19.418                      
  19.419  /* Ends C function definitions when using C++ */
    20.1 --- a/include/begin_code.h	Wed Apr 10 17:12:32 2002 +0000
    20.2 +++ b/include/begin_code.h	Thu Apr 11 14:35:16 2002 +0000
    20.3 @@ -31,6 +31,11 @@
    20.4  #endif
    20.5  #define _begin_code_h
    20.6  
    20.7 +/* Make sure the correct platform symbols are defined */
    20.8 +#if !defined(WIN32) && defined(_WIN32)
    20.9 +#define WIN32
   20.10 +#endif /* Windows */
   20.11 +
   20.12  /* Some compilers use a special export keyword */
   20.13  #ifndef DECLSPEC
   20.14  # ifdef __BEOS__
   20.15 @@ -56,6 +61,15 @@
   20.16  # endif
   20.17  #endif
   20.18  
   20.19 +/* By default SDL uses the C calling convention */
   20.20 +#ifndef SDLCALL
   20.21 +#ifdef WIN32
   20.22 +#define SDLCALL __cdecl
   20.23 +#else
   20.24 +#define SDLCALL
   20.25 +#endif
   20.26 +#endif /* SDLCALL */
   20.27 +
   20.28  /* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */
   20.29  #ifdef __SYMBIAN32__ 
   20.30  #undef DECLSPEC
    21.1 --- a/src/main/beos/exports/genexp.pl	Wed Apr 10 17:12:32 2002 +0000
    21.2 +++ b/src/main/beos/exports/genexp.pl	Thu Apr 11 14:35:16 2002 +0000
    21.3 @@ -9,9 +9,7 @@
    21.4  	}
    21.5  	$file =~ s,.*/,,;
    21.6  	while (<FILE>) {
    21.7 -		if ( /DECLSPEC.*\s\**([^\s\(]+)\(/ ) {
    21.8 -			print "_$1\n";
    21.9 -		} elsif ( /DECLSPEC.*\s\**([^\s\(]+)$/ ) {
   21.10 +		if ( /DECLSPEC.*SDLCALL ([^\s\(]+)/ ) {
   21.11  			print "_$1\n";
   21.12  		}
   21.13  	}
    22.1 --- a/src/main/macos/exports/gendef.pl	Wed Apr 10 17:12:32 2002 +0000
    22.2 +++ b/src/main/macos/exports/gendef.pl	Thu Apr 11 14:35:16 2002 +0000
    22.3 @@ -10,9 +10,7 @@
    22.4  	$printed_header = 0;
    22.5  	$file =~ s,.*/,,;
    22.6  	while (<FILE>) {
    22.7 -		if ( /DECLSPEC.*\s\**([^\s\(]+)\(/ ) {
    22.8 -			print "\t$1\n";
    22.9 -		} elsif ( /DECLSPEC.*\s\**([^\s\(]+)$/ ) {
   22.10 +		if ( /DECLSPEC.*SDLCALL ([^\s\(]+)/ ) {
   22.11  			print "\t$1\n";
   22.12  		}
   22.13  	}
    23.1 --- a/src/main/macosx/exports/gendef.pl	Wed Apr 10 17:12:32 2002 +0000
    23.2 +++ b/src/main/macosx/exports/gendef.pl	Thu Apr 11 14:35:16 2002 +0000
    23.3 @@ -10,9 +10,7 @@
    23.4  	$printed_header = 0;
    23.5  	$file =~ s,.*/,,;
    23.6  	while (<FILE>) {
    23.7 -		if ( /DECLSPEC.*\s\**([^\s\(]+)\(/ ) {
    23.8 -			print "\t_$1\n";
    23.9 -		} elsif ( /DECLSPEC.*\s\**([^\s\(]+)$/ ) {
   23.10 +		if ( /DECLSPEC.*SDLCALL ([^\s\(]+)/ ) {
   23.11  			print "\t_$1\n";
   23.12  		}
   23.13  	}
    24.1 --- a/src/main/win32/exports/gendef.pl	Wed Apr 10 17:12:32 2002 +0000
    24.2 +++ b/src/main/win32/exports/gendef.pl	Thu Apr 11 14:35:16 2002 +0000
    24.3 @@ -10,9 +10,7 @@
    24.4  	$printed_header = 0;
    24.5  	$file =~ s,.*/,,;
    24.6  	while (<FILE>) {
    24.7 -		if ( /DECLSPEC.*\s\**([^\s\(]+)\(/ ) {
    24.8 -			print "\t$1\n";
    24.9 -		} elsif ( /DECLSPEC.*\s\**([^\s\(]+)$/ ) {
   24.10 +		if ( /DECLSPEC.*SDLCALL ([^\s\(]+)/ ) {
   24.11  			print "\t$1\n";
   24.12  		}
   24.13  	}