Applied a consistent look to all header files (copyright, ifdefs)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9891 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
ultramage 2007-02-21 15:09:20 +00:00
parent a4d1b45215
commit 49096125fb
71 changed files with 138 additions and 98 deletions

View File

@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2007/02/21
* Applied a consistent look to all header files (copyright, ifdefs)
* Minor stuff (typos, socket.c, junk in login reply packet) [ultramage]
2007/02/19
* Fixed @cartlist info message typo [Lupus]

View File

@ -55,4 +55,5 @@ extern char char_txt[];
int char_config_read(const char *cfgName);
int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg, int *reg_num);
int parse_friend_txt(struct mmo_charstatus *p);
#endif
#endif /* _CHAR_H_ */

View File

@ -19,4 +19,5 @@ extern char castle_txt[1024];
//For the TXT->SQL converter
int inter_guild_fromstr(char *str, struct guild *g);
int inter_guildcastle_fromstr(char *str, struct guild_castle *gc);
#endif
#endif /* _INT_GUILD_H_ */

View File

@ -13,4 +13,4 @@ int inter_homun_parse_frommap(int fd);
extern char homun_txt[1024];
#endif
#endif /* _INT_HOMUN_H_ */

View File

@ -16,4 +16,5 @@ extern char party_txt[1024];
//For the TXT->SQL converter
int inter_party_fromstr(char *str, struct party *p);
#endif
#endif /* _INT_PARTY_H_ */

View File

@ -15,4 +15,5 @@ extern char pet_txt[1024];
//Exported for use in the TXT-SQL converter.
int inter_pet_fromstr(char *str,struct s_pet *p);
#endif
#endif /* _INT_PET_H_ */

View File

@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#ifndef __INT_STATUS__
#define __INT_STATUS__
#ifndef _INT_STATUS_H_
#define _INT_STATUS_H_
#include "char.h"
@ -21,4 +21,5 @@ void inter_status_save(void);
void status_init(void);
void status_final(void);
#endif
#endif
#endif /* _INT_STATUS_H_ */

View File

@ -19,4 +19,5 @@ extern char guild_storage_txt[1024];
//Exported for use in the TXT-SQL converter.
int storage_fromstr(char *str,struct storage *p);
int guild_storage_fromstr(char *str,struct guild_storage *p);
#endif
#endif /* _INT_STORAGE_H_ */

View File

@ -25,4 +25,5 @@ extern char main_chat_nick[16];
//For TXT->SQL conversion
extern char accreg_txt[];
int inter_accreg_fromstr(const char *str, struct accreg *reg);
#endif
#endif /* _INTER_H_ */

View File

@ -1,7 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#ifndef _CHARSQL_H_
#define _CHARSQL_H_
#ifndef _CHAR_SQL_H_
#define _CHAR_SQL_H_
#include "../common/core.h"
#include "../common/socket.h"
@ -106,4 +107,5 @@ extern int debug_mysql_query(char *file, int line, void *mysql, const char *q);
//Exported for use in the TXT-SQL converter.
int mmo_char_tosql(int char_id, struct mmo_charstatus *p);
void sql_config_read(const char *cfgName);
#endif
#endif /* _CHAR_SQL_H_ */

View File

@ -1,5 +1,5 @@
// Homunculus saving by Albator and Orn for eAthena.
// GNU/GPL rulez !
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,8 +1,8 @@
// Homunculus saving by Albator and Orn for eAthena.
// GNU/GPL rulez !
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#ifndef _INT_HOMUN_H_
#define _INT_HOMUN_H_
#ifndef _INT_HOMUN_SQL_H_
#define _INT_HOMUN_SQL_H_
int inter_homunculus_sql_init(void);
void inter_homunculus_sql_final(void);
@ -12,4 +12,4 @@ int mapif_delete_homunculus(int fd);
int inter_delete_homunculus(int hom_id);
int inter_homunculus_parse_frommap(int fd);
#endif
#endif /* _INT_HOMUN_SQL_H_ */

View File

@ -26,4 +26,5 @@ int inter_party_CharOnline(int char_id, int party_id);
int inter_party_CharOffline(int char_id, int party_id);
//Required for the TXT->SQL converter
int inter_party_tosql(struct party *p, int flag, int index);
#endif
#endif /* _INT_PARTY_SQL_H_ */

View File

@ -15,4 +15,5 @@ int inter_pet_sql_init(void);
//Exported for use in the TXT-SQL converter.
int inter_pet_tosql(int pet_id, struct s_pet *p);
#endif
#endif /* _INT_PET_SQL_H_ */

View File

@ -14,4 +14,5 @@ int inter_storage_parse_frommap(int fd);
//Exported for use in the TXT-SQL converter.
int storage_tosql(int account_id,struct storage *p);
int guild_storage_tosql(int guild_id, struct guild_storage *p);
#endif
#endif /* _INT_STORAGE_SQL_H_ */

View File

@ -53,4 +53,5 @@ extern char login_db_server_db[32];
extern char main_chat_nick[16];
int inter_accreg_tosql(int account_id, int char_id, struct accreg *reg, int type);
#endif
#endif /* _INTER_SQL_H_ */

View File

@ -3,6 +3,7 @@
#ifndef _ITEMDB_H_
#define _ITEMDB_H_
#include "mmo.h"
//FIXME: Maybe it would be better to move this enum to mmo.h,
@ -40,4 +41,4 @@ int itemdb_isequip2(struct item_data *);
void do_final_itemdb(void);
int do_init_itemdb(void);
#endif
#endif /* _ITEMDB_H_ */

View File

@ -1,5 +1,6 @@
#ifndef _CBASETYPES_H_
#define _CBASETYPES_H_
/* +--------+-----------+--------+---------+
* | ILP32 | LP64 | ILP64 | (LL)P64 |
* +------------+--------+-----------+--------+---------+

View File

@ -20,4 +20,4 @@ extern void set_server_type(void);
extern void set_termfunc(void (*termfunc)(void));
extern void do_final(void);
#endif // _CORE_H_
#endif /* _CORE_H_ */

View File

@ -702,4 +702,4 @@ void* linkdb_search ( struct linkdb_node** head, void *key);
void* linkdb_erase ( struct linkdb_node** head, void *key);
void linkdb_final ( struct linkdb_node** head );
#endif
#endif /* _DB_H_ */

View File

@ -19,4 +19,5 @@ int decode_zip(unsigned char *dest, unsigned long* destLen, const unsigned char*
int encode_zip(unsigned char *dest, unsigned long* destLen, const unsigned char* source, unsigned long sourceLen);
int deflate_file (const char *source, const char *filename);
#endif // _GRFIO_H_
#endif /* _GRFIO_H_ */

View File

@ -9,5 +9,4 @@
FILE* lock_fopen(const char* filename,int *info);
int lock_fclose(FILE *fp,const char* filename,int *info);
#endif
#endif /* _LOCK_H_ */

View File

@ -3,6 +3,7 @@
#ifndef _MALLOC_H_
#define _MALLOC_H_
// Q: What are the 'a'-variant allocation functions?
// A: They allocate memory from the stack, which is automatically
// freed when the invoking function returns.
@ -157,4 +158,4 @@ unsigned int malloc_usage (void);
void malloc_init (void);
void malloc_final (void);
#endif
#endif /* _MALLOC_H_ */

View File

@ -1,3 +1,6 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,5 +1,9 @@
#ifndef _MAX_INDEX_H
#define _MAX_INDEX_H
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#ifndef _MAPINDEX_H_
#define _MAPINDEX_H_
//File in charge of assigning a numberic ID to each map in existance for space saving when passing map info between servers.
extern char mapindex_cfgfile[80];
@ -38,4 +42,4 @@ const char* mapindex_id2name(unsigned short);
void mapindex_init(void);
void mapindex_final(void);
#endif
#endif /* _MAPINDEX_H_ */

View File

@ -4,4 +4,4 @@
void MD5_String(const char * string, char * output);
void MD5_String2binary(const char * string, char * output);
#endif
#endif /* _MD5CALC_H_ */

View File

@ -511,4 +511,4 @@ enum {
#endif
#endif
#endif // _MMO_H_
#endif /* _MMO_H_ */

View File

@ -234,4 +234,4 @@ void nullpo_info_f(const char *file, int line, const char *func,
__attribute__((format(printf,4,5)));
#endif
#endif /* _NULLPO_H_ */

View File

@ -80,4 +80,4 @@ typedef void Plugin_Event_Func(void);
#define PLUGIN_EVENTS_TABLE struct _Plugin_Event_Table plugin_event_table[]
void** plugin_call_table;
#endif // _PLUGIN_H_
#endif /* _PLUGIN_H_ */

View File

@ -63,4 +63,4 @@ void plugin_unload(Plugin* plugin);
void plugins_init(void);
void plugins_final(void);
#endif // _PLUGINS_H_
#endif /* _PLUGINS_H_ */

View File

@ -93,4 +93,4 @@ extern int ShowDebug(const char *, ...);
extern int ShowError(const char *, ...);
extern int ShowFatalError(const char *, ...);
#endif
#endif /* _SHOWMSG_H_ */

View File

@ -141,4 +141,4 @@ int socket_getips(uint32* ips, int max);
extern uint32 addr_[16]; // ip addresses of local host (host byte order)
extern int naddr_; // # of ip addresses
#endif // _SOCKET_H_
#endif /* _SOCKET_H_ */

View File

@ -1,8 +1,9 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#ifndef _J_STR_LIB_H_
#define _J_STR_LIB_H_
#ifndef _STRLIB_H_
#define _STRLIB_H_
#define J_MAX_MALLOC_SIZE 65535
// String function library.
// code by Jioh L. Jung (ziozzang@4wish.net)
@ -26,4 +27,4 @@ const char *stristr(const char *haystack, const char *needle);
size_t strnlen (const char* string, size_t maxlen);
#endif
#endif
#endif /* _STRLIB_H_ */

View File

@ -59,4 +59,4 @@ unsigned long get_uptime(void);
void timer_init(void);
void timer_final(void);
#endif // _TIMER_H_
#endif /* _TIMER_H_ */

View File

@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#ifndef COMMON_UTILS_H
#define COMMON_UTILS_H
#ifndef _UTILS_H_
#define _UTILS_H_
#include <stdarg.h>
@ -41,4 +41,4 @@ extern unsigned short GetWord(unsigned long val, size_t num);
extern unsigned short MakeWord(unsigned char byte0, unsigned char byte1);
extern unsigned long MakeDWord(unsigned short word0, unsigned short word1);
#endif
#endif /* _UTILS_H_ */

View File

@ -27,4 +27,4 @@
// C言語の仕様上、最初に0を付けると8進数になるので間違えないで下さい。
#define ATHENA_MOD_VERSION 1249 // mod version (patch No.)
#endif
#endif /* _VERSION_H_ */

View File

@ -1,4 +1,4 @@
// (c) eAthena Dev Team - Licensed under GNU GPL
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
///////////////////////////////////////////////////////////////////////////

View File

@ -1,4 +1,4 @@
// (c) eAthena Dev Team - Licensed under GNU GPL
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#ifndef _LADMIN_H_
@ -10,4 +10,4 @@
// It is made into 2 at the time of passwordencrypt2.
// When it is made 3, it corresponds to both.
#endif
#endif /* _LADMIN_H_ */

View File

@ -39,4 +39,5 @@ struct mmo_char_server {
extern struct mmo_char_server server[MAX_SERVERS];
extern int server_fd[MAX_SERVERS];
#endif
#endif /* _LOGIN_H_ */

View File

@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#ifndef _LOGIN_H_
#define _LOGIN_H_
#ifndef _LOGIN_SQL_H_
#define _LOGIN_SQL_H_
#define MAX_SERVERS 30
@ -51,4 +51,4 @@ struct mmo_char_server {
};
#endif
#endif /* _LOGIN_SQL_H_ */

View File

@ -325,5 +325,4 @@ extern char atcommand_symbol;
#define MAX_MSG 1000
extern char* msg_table[MAX_MSG];
#endif
#endif /* _ATCOMMAND_H_ */

View File

@ -444,4 +444,4 @@ extern void battle_set_defaults(void);
extern int battle_set_value(char *, char *);
int battle_get_value(char *);
#endif
#endif /* _BATTLE_H_ */

View File

@ -70,5 +70,5 @@ int get_charcommand_level(const CharCommandType type);
int charcommand_config_read(const char *cfgName);
extern char charcommand_symbol;
#endif
#endif /* _CHARCOMMAND_H_ */

View File

@ -18,4 +18,4 @@
void charsave_save_scdata(int account_id, int char_id, struct status_change* sc_data, int max_sc);
#endif
#endif
#endif /* _CHARSAVE_H_ */

View File

@ -19,4 +19,4 @@ int chat_enableevent(struct chat_data *cd);
int chat_disableevent(struct chat_data *cd);
int chat_npckickall(struct chat_data *cd);
#endif
#endif /* _CHAT_H_ */

View File

@ -55,4 +55,4 @@ int do_init_chrif(void);
int chrif_flush_fifo(void);
#endif
#endif /* _CHRIF_H_ */

View File

@ -362,6 +362,4 @@ int clif_hom_food(struct map_session_data *sd,int foodid,int fail); //[orn]
void clif_send_homdata(struct map_session_data *sd, int type, int param); //[orn]
int clif_hwalkok(struct homun_data *hd); //[orn]
#endif
#endif /* _CLIF_H_ */

View File

@ -3,7 +3,6 @@
#ifndef _DATE_H_
#define _DATE_H_
#endif
int date_get_year(void);
int date_get_month(void);
@ -15,3 +14,5 @@ int date_get_sec(void);
int is_day_of_sun(void);
int is_day_of_moon(void);
int is_day_of_star(void);
#endif /* _DATE_H_ */

View File

@ -91,4 +91,4 @@ int guild_agit_break(struct mob_data *md);
void do_final_guild(void);
#endif
#endif /* _GUILD_H_ */

View File

@ -70,4 +70,4 @@ int intif_homunculus_requestdelete(int homun_id);
int CheckForCharServer(void);
#endif
#endif /* _INTIF_H_ */

View File

@ -1,5 +1,5 @@
#ifndef _IRC_H_
#define _IRC_H_
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#include <ctype.h>
#include <stdio.h>
@ -545,5 +545,3 @@ int irc_read_conf(char *file) {
return 1;
}
#endif //_IRC_H_

View File

@ -1,3 +1,9 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#ifndef _IRC_H_
#define _IRC_H_
#include "map.h"
// IRC .conf file [Zido]
@ -53,3 +59,5 @@ int set_access(char *nick,int level); // [Zido]
int get_access(char *nick); // [Zido]
int irc_rmnames(void); // [Zido]
int irc_read_conf(char *file); // [Zido]
#endif /* _IRC_H_ */

View File

@ -142,4 +142,4 @@ void itemdb_reload(void);
void do_final_itemdb(void);
int do_init_itemdb(void);
#endif
#endif /* _ITEMDB_H_ */

View File

@ -53,4 +53,4 @@ extern struct Log_Config {
char log_branch_db[32], log_pick_db[32], log_zeny_db[32], log_mvpdrop_db[32], log_gm_db[32], log_npc_db[32], log_chat_db[32];
} log_config;
#endif
#endif /* _LOG_H_ */

View File

@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
// Mail System for eAthena
// Created by Valaris
#ifndef _MAIL_H_
#define _MAIL_H_
int mail_check(struct map_session_data *sd, int type);
int mail_read(struct map_session_data *sd, int message_id);
@ -10,3 +10,5 @@ int mail_delete(struct map_session_data *sd, int message_id);
int mail_send(struct map_session_data *sd, char *name, char *message, int flag);
int do_init_mail(void);
#endif /* _MAIL_H_ */

View File

@ -1503,4 +1503,4 @@ typedef struct homun_data TBL_HOM;
extern int lowest_gm_level;
extern char main_chat_nick[16];
#endif
#endif /* _MAP_H_ */

View File

@ -1,3 +1,6 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -1,5 +1,9 @@
// Homunculus and future Mercenary system code go here [Celest]
// implemented by [orn]
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#ifndef _MERCENARY_H_
#define _MERCENARY_H_
struct homunculus_db {
int class_ ;
char name[NAME_LENGTH];
@ -81,3 +85,5 @@ int merc_skill_tree_get_max(int id, int b_class);
void merc_hom_init_timers(struct homun_data * hd);
void merc_skill_reload(void);
void merc_reload(void);
#endif /* _MERCENARY_H_ */

View File

@ -203,4 +203,4 @@ int mob_clone_delete(int class_);
void mob_reload(void);
#endif
#endif /* _MOB_H_ */

View File

@ -88,5 +88,4 @@ extern char *current_file;
struct npc_data *fake_nd;
#endif
#endif /* _NPC_H_ */

View File

@ -47,4 +47,4 @@ int party_sub_count(struct block_list *bl, va_list ap);
int party_foreachsamemap(int (*func)(struct block_list *,va_list),struct map_session_data *sd,int type,...);
#endif
#endif /* _PARTY_H_ */

View File

@ -315,4 +315,5 @@ int duel_checktime(struct map_session_data* sd);
int pc_read_motd(void); // [Valaris]
int pc_disguise(struct map_session_data *sd, int class_);
#endif
#endif /* _PC_H_ */

View File

@ -65,5 +65,4 @@ int read_petdb(void);
int do_init_pet(void);
int do_final_pet(void);
#endif
#endif /* _PET_H_ */

View File

@ -90,5 +90,4 @@ int script_reload(void);
extern char mapreg_txt[];
#endif
#endif /* _SCRIPT_H_ */

View File

@ -956,4 +956,4 @@ enum {
UNT_GROUNDDRIFT_FIRE,
};
#endif
#endif /* _SKILL_H_ */

View File

@ -657,4 +657,4 @@ int status_check_visibility(struct block_list *src, struct block_list *target);
int status_readdb(void);
int do_init_status(void);
#endif
#endif /* _STATUS_H_ */

View File

@ -42,4 +42,4 @@ int storage_comp_item(const void *_i1, const void *_i2);
void sortage_sortitem(struct storage* stor);
void sortage_gsortitem(struct guild_storage* gstor);
#endif
#endif /* _STORAGE_H_ */

View File

@ -12,4 +12,4 @@ void trade_tradeok(struct map_session_data *sd);
void trade_tradecancel(struct map_session_data *sd);
void trade_tradecommit(struct map_session_data *sd);
#endif // _TRADE_H_
#endif /* _TRADE_H_ */

View File

@ -1,6 +1,6 @@
// Copyright (c) jAthena Dev Teams - Licensed under GNU GPL
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
// Merged originally from jA by Skotlex
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -1,6 +1,6 @@
// Copyright (c) jAthena Dev Teams - Licensed under GNU GPL
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
// Merged originally from jA by Skotlex
#ifndef _UNIT_H_
#define _UNIT_H_
@ -69,4 +69,5 @@ int do_final_unit(void);
extern const int dirx[8];
extern const int diry[8];
#endif /* _UNIT_H_ */

View File

@ -11,4 +11,4 @@ void vending_openvending(struct map_session_data *sd,int len,char *message,int f
void vending_vendinglistreq(struct map_session_data *sd,int id);
void vending_purchasereq(struct map_session_data *sd,int len,int id,unsigned char *p);
#endif // _VENDING_H_
#endif /* _VENDING_H_ */