Add doxygen conf
Adding doxyconf as rA default conf for doxygen and for people if they wish to build their doc. Adding tools/build_doc to check app for building doc and to update version number in documentation. Fix few typo in src
This commit is contained in:
parent
b2d1932e36
commit
1c5a53f25e
3
.gitignore
vendored
3
.gitignore
vendored
@ -43,6 +43,9 @@
|
|||||||
/conf/import
|
/conf/import
|
||||||
/conf/msg_conf/import
|
/conf/msg_conf/import
|
||||||
|
|
||||||
|
# /doc/
|
||||||
|
/doc/doxygen
|
||||||
|
|
||||||
# /log/
|
# /log/
|
||||||
/log/*.log
|
/log/*.log
|
||||||
/log/*.leaks
|
/log/*.leaks
|
||||||
|
@ -2026,8 +2026,7 @@ void mmo_char_send(int fd, struct char_session_data* sd){
|
|||||||
char_charlist_notify(fd,sd);
|
char_charlist_notify(fd,sd);
|
||||||
char_block_character(fd,sd);
|
char_block_character(fd,sd);
|
||||||
}
|
}
|
||||||
//@FIXME dump from kro doesn't show 6b transmission
|
else mmo_char_send006b(fd,sd);
|
||||||
mmo_char_send006b(fd,sd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int char_married(int pl1, int pl2)
|
int char_married(int pl1, int pl2)
|
||||||
|
@ -4691,8 +4691,7 @@ ACMD_FUNC(jailfor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//By Coltaro
|
//By Coltaro
|
||||||
ACMD_FUNC(jailtime)
|
ACMD_FUNC(jailtime){
|
||||||
{
|
|
||||||
int year, month, day, hour, minute, second;
|
int year, month, day, hour, minute, second;
|
||||||
char timestr[CHAT_SIZE_MAX];
|
char timestr[CHAT_SIZE_MAX];
|
||||||
|
|
||||||
@ -4719,6 +4718,7 @@ ACMD_FUNC(jailtime)
|
|||||||
clif_displaymessage(fd, atcmd_output);
|
clif_displaymessage(fd, atcmd_output);
|
||||||
time2str(timestr,"%Y-%m-%d %H:%M",sd->sc.data[SC_JAILED]->val1*60);
|
time2str(timestr,"%Y-%m-%d %H:%M",sd->sc.data[SC_JAILED]->val1*60);
|
||||||
sprintf(atcmd_output,"Release date is: %s",timestr);
|
sprintf(atcmd_output,"Release date is: %s",timestr);
|
||||||
|
clif_displaymessage(fd, atcmd_output);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2202,7 +2202,7 @@ int intif_parse(int fd)
|
|||||||
int packet_len, cmd;
|
int packet_len, cmd;
|
||||||
cmd = RFIFOW(fd,0);
|
cmd = RFIFOW(fd,0);
|
||||||
// Verify ID of the packet
|
// Verify ID of the packet
|
||||||
if(cmd<0x3800 || cmd>=0x3800+(sizeof(packet_len_table)/sizeof(packet_len_table[0])) ||
|
if(cmd<0x3800 || cmd>=0x3800+ARRAYLENGTH(packet_len_table) ||
|
||||||
packet_len_table[cmd-0x3800]==0){
|
packet_len_table[cmd-0x3800]==0){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
17
src/map/pc.c
17
src/map/pc.c
@ -1002,18 +1002,9 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
|
|||||||
// Checks and fixes to character status data, that are required
|
// Checks and fixes to character status data, that are required
|
||||||
// in case of configuration change or stuff, which cannot be
|
// in case of configuration change or stuff, which cannot be
|
||||||
// checked on char-server.
|
// checked on char-server.
|
||||||
if( sd->status.hair < MIN_HAIR_STYLE || sd->status.hair > MAX_HAIR_STYLE )
|
sd->status.hair = cap_value(sd->status.hair,MIN_HAIR_STYLE,MAX_HAIR_STYLE);
|
||||||
{
|
sd->status.hair_color = cap_value(sd->status.hair_color,MIN_HAIR_COLOR,MAX_HAIR_COLOR);
|
||||||
sd->status.hair = MIN_HAIR_STYLE;
|
sd->status.clothes_color = cap_value(sd->status.clothes_color,MIN_CLOTH_COLOR,MAX_CLOTH_COLOR);
|
||||||
}
|
|
||||||
if( sd->status.hair_color < MIN_HAIR_COLOR || sd->status.hair_color > MAX_HAIR_COLOR )
|
|
||||||
{
|
|
||||||
sd->status.hair_color = MIN_HAIR_COLOR;
|
|
||||||
}
|
|
||||||
if( sd->status.clothes_color < MIN_CLOTH_COLOR || sd->status.clothes_color > MAX_CLOTH_COLOR )
|
|
||||||
{
|
|
||||||
sd->status.clothes_color = MIN_CLOTH_COLOR;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Initializations to null/0 unneeded since map_session_data was filled with 0 upon allocation.
|
//Initializations to null/0 unneeded since map_session_data was filled with 0 upon allocation.
|
||||||
if(!sd->status.hp) pc_setdead(sd);
|
if(!sd->status.hp) pc_setdead(sd);
|
||||||
@ -10384,7 +10375,7 @@ void pc_show_version(struct map_session_data *sd) {
|
|||||||
else if( git[0] != UNKNOWN_VERSION )
|
else if( git[0] != UNKNOWN_VERSION )
|
||||||
sprintf(buf,msg_txt(sd,1295),"Git Hash: ",git); //rAthena Version Git Hash: %s
|
sprintf(buf,msg_txt(sd,1295),"Git Hash: ",git); //rAthena Version Git Hash: %s
|
||||||
else
|
else
|
||||||
sprintf(buf,msg_txt(sd,1296)); //Cannot determine SVN/Git version.
|
sprintf(buf,"%s",msg_txt(sd,1296)); //Cannot determine SVN/Git version.
|
||||||
clif_displaymessage(sd->fd,buf);
|
clif_displaymessage(sd->fd,buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
72
tools/build_doc.pl
Normal file
72
tools/build_doc.pl
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
# building documentation using doxygen and updation versionning number
|
||||||
|
use strict;
|
||||||
|
use File::Basename;
|
||||||
|
|
||||||
|
my $sDocFile = "doxyconf";
|
||||||
|
my $outputdir = "doc/doxygen";
|
||||||
|
my @line = ();
|
||||||
|
my $repoversion;
|
||||||
|
my $gitversion;
|
||||||
|
my $doxyversion;
|
||||||
|
my $chked;
|
||||||
|
|
||||||
|
my($filename, $dir, $suffix) = fileparse($0);
|
||||||
|
chdir "../$dir"; #put ourself like was called in tools
|
||||||
|
|
||||||
|
#checking for doxygen
|
||||||
|
open PIPE,"doxygen --version |" or die $!;
|
||||||
|
@line = grep { /\d.\d.\d/ } <PIPE>;
|
||||||
|
$doxyversion = $line[0];
|
||||||
|
print "doxyversion = [ $doxyversion ]\n";
|
||||||
|
if($doxyversion eq ""){
|
||||||
|
die "Please install doxygen to proceed";
|
||||||
|
}
|
||||||
|
close PIPE;
|
||||||
|
|
||||||
|
#cheking for git cli
|
||||||
|
open PIPE,"git --version |" or die $!;
|
||||||
|
@line = grep { /\d.\d.\d.\d/ } <PIPE>;
|
||||||
|
$gitversion = $line[0];
|
||||||
|
$gitversion =~ s/[^\d.\d.\d.\d]//g;
|
||||||
|
print "doxyversion = [ $gitversion ]\n";
|
||||||
|
if($gitversion eq ""){
|
||||||
|
die "Please install git to proceed";
|
||||||
|
}
|
||||||
|
close PIPE;
|
||||||
|
|
||||||
|
open PIPE,"git rev-parse --short HEAD |" or die $!;
|
||||||
|
@line = grep { /\w/ } <PIPE>;
|
||||||
|
$repoversion = $line[0];
|
||||||
|
print "Git hash is : $repoversion";
|
||||||
|
close PIPE;
|
||||||
|
|
||||||
|
unless(-r "$outputdir"){
|
||||||
|
mkdir "$outputdir" or die "Can't create output directory for documentation (outdir=$outputdir)\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
die "$sDocFile doesn't seem to exist or coudldn't be read" unless(-r "$sDocFile");
|
||||||
|
print "Updating doxygen file version (doxyconf=$sDocFile)\n";
|
||||||
|
open FHIN,"$sDocFile" || die "couldn't openfile/create $sDocFile \n";
|
||||||
|
open FHOUT,">doxyconf.tmp" || die "couldn't openfile/create doxyconf.tmp \n";
|
||||||
|
while(<FHIN>){
|
||||||
|
if(($chked&1)==0 && $_ =~ /^PROJECT_NUMBER/) {
|
||||||
|
@line = split(" ",$_);
|
||||||
|
print FHOUT "PROJECT_NUMBER = $repoversion";
|
||||||
|
print "Updated project number\n";
|
||||||
|
$chked &=1;
|
||||||
|
}
|
||||||
|
elsif(($chked&2)==0 && $_ =~ /^OUTPUT_DIRECTORY/){
|
||||||
|
print FHOUT "OUTPUT_DIRECTORY = $outputdir";
|
||||||
|
print "Updated output dir\n";
|
||||||
|
$chked &=2;
|
||||||
|
}
|
||||||
|
else { print FHOUT $_; }
|
||||||
|
}
|
||||||
|
close FHIN;
|
||||||
|
close FHOUT;
|
||||||
|
unlink $sDocFile;
|
||||||
|
rename "doxyconf.tmp", $sDocFile;
|
||||||
|
|
||||||
|
print "Building doc\n";
|
||||||
|
system("doxygen doxyconf");
|
Loading…
x
Reference in New Issue
Block a user