mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 00:06:36 +00:00
[Quest API] Alphabetize Perl method exports. (#1672)
- Keeps things tidier.
Perl script was used to get this in order easily.
```pl
my @perl_file_types = (
"bot",
"client",
"doors",
"entity",
"expedition",
"groups",
"hateentry",
"inventory",
"mob",
"npc",
"object",
"perlpacket",
"player_corpse",
"questitem",
"raids",
"spell"
);
foreach my $file_type (sort {$a cmp $b} @perl_file_types) {
my $perl_file = "perl_$file_type.cpp";
open my $client_file, '<', $perl_file or die "Cannot open file_name $perl_file";
{
local $/;
$content = <$client_file>;
}
close $client_file;
open my $perl_data_file, ">", "perl_$file_type\_data.cpp";
my @variables = ();
foreach my $line (split("\n", $content)) {
if ($line=~/newXSproto\(/i) {
$line =~ s/\s+/ /g;
my @line_data = split(/ /, $line);
push(@variables, join(" ", @line_data));
}
}
foreach my $variable (sort {$a cmp $b} @variables) {
$variable =~ s/^ //ig;
print $perl_data_file "\t$variable\n";
}
close $perl_data_file;
}```
This commit is contained in:
+19
-49
@@ -1,30 +1,3 @@
|
||||
/*
|
||||
* This file was generated automatically by xsubpp version 1.9508 from the
|
||||
* contents of tmp. Do not edit this file, edit tmp instead.
|
||||
*
|
||||
* ANY CHANGES MADE HERE WILL BE LOST!
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "../common/features.h"
|
||||
#ifdef EMBPERL_XS_CLASSES
|
||||
#include "../common/global_define.h"
|
||||
@@ -420,29 +393,26 @@ XS(boot_PerlPacket)
|
||||
|
||||
//add the strcpy stuff to get rid of const warnings....
|
||||
|
||||
|
||||
|
||||
XS_VERSION_BOOTCHECK ;
|
||||
|
||||
newXSproto(strcpy(buf, "new"), XS_PerlPacket_new, file, "$;$$");
|
||||
newXSproto(strcpy(buf, "DESTROY"), XS_PerlPacket_DESTROY, file, "$");
|
||||
newXSproto(strcpy(buf, "SetOpcode"), XS_PerlPacket_SetOpcode, file, "$$");
|
||||
newXSproto(strcpy(buf, "Resize"), XS_PerlPacket_Resize, file, "$$");
|
||||
newXSproto(strcpy(buf, "SendTo"), XS_PerlPacket_SendTo, file, "$$");
|
||||
newXSproto(strcpy(buf, "SendToAll"), XS_PerlPacket_SendToAll, file, "$");
|
||||
newXSproto(strcpy(buf, "Zero"), XS_PerlPacket_Zero, file, "$");
|
||||
newXSproto(strcpy(buf, "FromArray"), XS_PerlPacket_FromArray, file, "$$$");
|
||||
newXSproto(strcpy(buf, "SetByte"), XS_PerlPacket_SetByte, file, "$$$");
|
||||
newXSproto(strcpy(buf, "SetShort"), XS_PerlPacket_SetShort, file, "$$$");
|
||||
newXSproto(strcpy(buf, "SetLong"), XS_PerlPacket_SetLong, file, "$$$");
|
||||
newXSproto(strcpy(buf, "SetFloat"), XS_PerlPacket_SetFloat, file, "$$$");
|
||||
newXSproto(strcpy(buf, "SetString"), XS_PerlPacket_SetString, file, "$$$");
|
||||
newXSproto(strcpy(buf, "SetEQ1319"), XS_PerlPacket_SetEQ1319, file, "$$$$");
|
||||
newXSproto(strcpy(buf, "SetEQ1913"), XS_PerlPacket_SetEQ1913, file, "$$$$");
|
||||
newXSproto(strcpy(buf, "GetByte"), XS_PerlPacket_GetByte, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetShort"), XS_PerlPacket_GetShort, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetLong"), XS_PerlPacket_GetLong, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetFloat"), XS_PerlPacket_GetFloat, file, "$$");
|
||||
newXSproto(strcpy(buf, "DESTROY"), XS_PerlPacket_DESTROY, file, "$");
|
||||
newXSproto(strcpy(buf, "FromArray"), XS_PerlPacket_FromArray, file, "$$$");
|
||||
newXSproto(strcpy(buf, "GetByte"), XS_PerlPacket_GetByte, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetFloat"), XS_PerlPacket_GetFloat, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetLong"), XS_PerlPacket_GetLong, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetShort"), XS_PerlPacket_GetShort, file, "$$");
|
||||
newXSproto(strcpy(buf, "Resize"), XS_PerlPacket_Resize, file, "$$");
|
||||
newXSproto(strcpy(buf, "SendTo"), XS_PerlPacket_SendTo, file, "$$");
|
||||
newXSproto(strcpy(buf, "SendToAll"), XS_PerlPacket_SendToAll, file, "$");
|
||||
newXSproto(strcpy(buf, "SetByte"), XS_PerlPacket_SetByte, file, "$$$");
|
||||
newXSproto(strcpy(buf, "SetEQ1319"), XS_PerlPacket_SetEQ1319, file, "$$$$");
|
||||
newXSproto(strcpy(buf, "SetEQ1913"), XS_PerlPacket_SetEQ1913, file, "$$$$");
|
||||
newXSproto(strcpy(buf, "SetFloat"), XS_PerlPacket_SetFloat, file, "$$$");
|
||||
newXSproto(strcpy(buf, "SetLong"), XS_PerlPacket_SetLong, file, "$$$");
|
||||
newXSproto(strcpy(buf, "SetOpcode"), XS_PerlPacket_SetOpcode, file, "$$");
|
||||
newXSproto(strcpy(buf, "SetShort"), XS_PerlPacket_SetShort, file, "$$$");
|
||||
newXSproto(strcpy(buf, "SetString"), XS_PerlPacket_SetString, file, "$$$");
|
||||
newXSproto(strcpy(buf, "Zero"), XS_PerlPacket_Zero, file, "$");
|
||||
newXSproto(strcpy(buf, "new"), XS_PerlPacket_new, file, "$;$$");
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user