mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
Added pc_printf to exports
This commit is contained in:
parent
df982ceb79
commit
51d54a96ff
@ -65,7 +65,12 @@
|
|||||||
* purpose messages; errors go through pc_error(). The function is modelled
|
* purpose messages; errors go through pc_error(). The function is modelled
|
||||||
* after printf().
|
* after printf().
|
||||||
*/
|
*/
|
||||||
|
#if defined __WIN32__ || defined _WIN32 || defined WIN32
|
||||||
|
__declspec (dllexport)
|
||||||
int pc_printf(const char *message,...)
|
int pc_printf(const char *message,...)
|
||||||
|
#else
|
||||||
|
extern int pc_printf(const char *message,...)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
#if PAWN_CELL_SIZE==32
|
#if PAWN_CELL_SIZE==32
|
||||||
int ret;
|
int ret;
|
||||||
@ -105,12 +110,11 @@ static char *prefix[3]={ "error", "fatal error", "warning" };
|
|||||||
|
|
||||||
pre=prefix[number/100];
|
pre=prefix[number/100];
|
||||||
if (firstline>=0)
|
if (firstline>=0)
|
||||||
fprintf(stderr,"%s(%d -- %d) : %s %03d: ",filename,firstline,lastline,pre,number);
|
pc_printf("%s(%d -- %d) : %s %03d: ",filename,firstline,lastline,pre,number);
|
||||||
else
|
else
|
||||||
fprintf(stderr,"%s(%d) : %s %03d: ",filename,lastline,pre,number);
|
pc_printf("%s(%d) : %s %03d: ",filename,lastline,pre,number);
|
||||||
} /* if */
|
} /* if */
|
||||||
vfprintf(stderr,message,argptr);
|
vprintf(message,argptr);
|
||||||
fflush(stderr);
|
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -435,7 +435,12 @@ int pc_enablewarning(int number,int enable);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* general console output */
|
/* general console output */
|
||||||
|
#if defined __WIN32__ || defined _WIN32 || defined WIN32
|
||||||
|
__declspec (dllexport)
|
||||||
int pc_printf(const char *message,...);
|
int pc_printf(const char *message,...);
|
||||||
|
#else
|
||||||
|
extern int pc_printf(const char *message,...);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* error report function */
|
/* error report function */
|
||||||
int pc_error(int number,char *message,char *filename,int firstline,int lastline,va_list argptr);
|
int pc_error(int number,char *message,char *filename,int firstline,int lastline,va_list argptr);
|
||||||
|
Loading…
Reference in New Issue
Block a user