X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=opcode.pl;h=9e8d323f9166fbdde3eb60890e9b5bf65d478735;hb=5c144d81801caa5e8317f6a38b40eb08257c47ea;hp=10e252c2462a85976d8a2c1241571a55e4b74b7c;hpb=dc9aa44637d2171ba3efbf36c71e8591a7ce05d7;p=p5sagit%2Fp5-mst-13.2.git diff --git a/opcode.pl b/opcode.pl index 10e252c..9e8d323 100755 --- a/opcode.pl +++ b/opcode.pl @@ -7,7 +7,9 @@ BEGIN { $opcode_new = 'opcode.h-new'; $opname_new = 'opnames.h-new'; open(OC, ">$opcode_new") || die "Can't create $opcode_new: $!\n"; +binmode OC; open(ON, ">$opname_new") || die "Can't create $opname_new: $!\n"; +binmode ON; select OC; # Read data. @@ -35,11 +37,12 @@ while () { $i = 0; print <<"END"; -/* +/* -*- buffer-read-only: t -*- + * * opcode.h * * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, - * 2000, 2001, 2002, 2003, by Larry Wall and others + * 2000, 2001, 2002, 2003, 2004, 2005 by Larry Wall and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -49,6 +52,8 @@ print <<"END"; * will be lost! */ +#ifndef PERL_GLOBAL_STRUCT_INIT + #define Perl_pp_i_preinc Perl_pp_preinc #define Perl_pp_i_predec Perl_pp_predec #define Perl_pp_i_postinc Perl_pp_postinc @@ -57,10 +62,11 @@ print <<"END"; END print ON <<"END"; -/* +/* -*- buffer-read-only: t -*- + * * opnames.h * - * Copyright (C) 1999, 2000, 2001, 2002, 2003, by Larry Wall and others + * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, by Larry Wall and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -86,19 +92,17 @@ print ON "#define OP_phoney_OUTPUT_ONLY -2\n\n"; # Emit op names and descriptions. print <op_type == OP_CUSTOM ? custom_op_name(o) : \\ PL_op_name[(o)->op_type]) #define OP_DESC(o) ((o)->op_type == OP_CUSTOM ? custom_op_desc(o) : \\ PL_op_desc[(o)->op_type]) #ifndef DOINIT -EXT char *PL_op_name[]; +EXTCONST char* const PL_op_name[]; #else -EXT char *PL_op_name[] = { +EXTCONST char* const PL_op_name[] = { END for (@ops) { @@ -113,9 +117,9 @@ END print <$pp_proto_new" or die "Error creating $pp_proto_new: $!"; +binmode PP; open PPSYM, ">$pp_sym_new" or die "Error creating $pp_sym_new: $!"; +binmode PPSYM; print PP <<"END"; -/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +/* -*- buffer-read-only: t -*- + !!!!!!! DO NOT EDIT THIS FILE !!!!!!! This file is built by opcode.pl from its data. Any changes made here will be lost! */ @@ -304,6 +331,7 @@ print PP <<"END"; END print PPSYM <<"END"; +# -*- buffer-read-only: t -*- # # !!!!!!! DO NOT EDIT THIS FILE !!!!!!! # This file is built by opcode.pl from its data. Any changes made here @@ -327,6 +355,8 @@ for (@ops) { print PP "PERL_PPDEF(Perl_pp_$_)\n"; print PPSYM "Perl_pp_$_\n"; } +print PP "\n/* ex: set ro: */\n"; +print PPSYM "\n# ex: set ro:\n"; close PP or die "Error closing pp_proto.h: $!"; close PPSYM or die "Error closing pp.sym: $!"; @@ -684,8 +714,8 @@ die die ck_die dimst@ L reset symbol reset ck_fun is% S? lineseq line sequence ck_null @ -nextstate next statement ck_state s; -dbstate debug next statement ck_state s; +nextstate next statement ck_null s; +dbstate debug next statement ck_null s; unstack iteration finalizer ck_null s0 enter block entry ck_null 0 leave block exit ck_null @ @@ -812,7 +842,7 @@ rename rename ck_fun isT@ S S link link ck_fun isT@ S S symlink symlink ck_fun isT@ S S readlink readlink ck_fun stu% S? -mkdir mkdir ck_fun isT@ S S? +mkdir mkdir ck_fun isTu@ S? S? rmdir rmdir ck_fun isTu% S? # Directory calls.