pkg://perl-5.8.5-9.src.rpm:11782070/perl-5.8.5.tar.gz
info downloads
perl-5.8.5/ 0040755 0001765 0001765 00000000000 10076757377 011170 5 ustar nick nick perl-5.8.5/apollo/ 0040755 0001765 0001765 00000000000 10076757372 012451 5 ustar nick nick perl-5.8.5/apollo/netinet/ 0040755 0001765 0001765 00000000000 10076757372 014117 5 ustar nick nick perl-5.8.5/apollo/netinet/in.h 0100444 0001765 0001765 00000000325 06676134464 014673 0 ustar nick nick /* Apollo's <netinet/in.h> isn't protected against multiple inclusion. */
#ifndef _NETINET_IN_INCLUDED
#define _NETINET_IN_INCLUDED
#include "/bsd4.3/usr/include/netinet/in.h"
#endif /* _NETINET_IN_INCLUDED */
perl-5.8.5/Artistic 0100444 0001765 0001765 00000013737 06554516362 012674 0 ustar nick nick
The "Artistic License"
Preamble
The intent of this document is to state the conditions under which a
Package may be copied, such that the Copyright Holder maintains some
semblance of artistic control over the development of the package,
while giving the users of the package the right to use and distribute
the Package in a more-or-less customary fashion, plus the right to make
reasonable modifications.
Definitions:
"Package" refers to the collection of files distributed by the
Copyright Holder, and derivatives of that collection of files
created through textual modification.
"Standard Version" refers to such a Package if it has not been
modified, or has been modified in accordance with the wishes
of the Copyright Holder as specified below.
"Copyright Holder" is whoever is named in the copyright or
copyrights for the package.
"You" is you, if you're thinking about copying or distributing
this Package.
"Reasonable copying fee" is whatever you can justify on the
basis of media cost, duplication charges, time of people involved,
and so on. (You will not be required to justify it to the
Copyright Holder, but only to the computing community at large
as a market that must bear the fee.)
"Freely Available" means that no fee is charged for the item
itself, though there may be fees involved in handling the item.
It also means that recipients of the item may redistribute it
under the same conditions they received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder. A Package
modified in such a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided
that you insert a prominent notice in each changed file stating how and
when you changed that file, and provided that you do at least ONE of the
following:
a) place your modifications in the Public Domain or otherwise make them
Freely Available, such as by posting said modifications to Usenet or
an equivalent medium, or placing the modifications on a major archive
site such as uunet.uu.net, or by allowing the Copyright Holder to include
your modifications in the Standard Version of the Package.
b) use the modified Package only within your corporation or organization.
c) rename any non-standard executables so the names do not conflict
with standard executables, which must also be provided, and provide
a separate manual page for each non-standard executable that clearly
documents how it differs from the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
4. You may distribute the programs of this Package in object code or
executable form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where
to get the Standard Version.
b) accompany the distribution with the machine-readable source of
the Package with your modifications.
c) give non-standard executables non-standard names, and clearly
document the differences in manual pages (or equivalent), together
with instructions on where to get the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this
Package. You may not charge a fee for this Package itself. However,
you may distribute this Package in aggregate with other (possibly
commercial) programs as part of a larger (possibly commercial) software
distribution provided that you do not advertise this Package as a
product of your own. You may embed this Package's interpreter within
an executable of yours (by linking); this shall be construed as a mere
form of aggregation, provided that the complete Standard Version of the
interpreter is so embedded.
6. The scripts and library files supplied as input to or produced as
output from the programs of this Package do not automatically fall
under the copyright of this Package, but belong to whoever generated
them, and may be sold commercially, and may be aggregated with this
Package. If such scripts or library files are aggregated with this
Package via the so-called "undump" or "unexec" methods of producing a
binary executable image, then distribution of such an image shall
neither be construed as a distribution of this Package nor shall it
fall under the restrictions of Paragraphs 3 and 4, provided that you do
not represent such an executable image as a Standard Version of this
Package.
7. C subroutines (or comparably compiled subroutines in other
languages) supplied by you and linked into this Package in order to
emulate subroutines and variables of the language defined by this
Package shall not be considered part of this Package, but are the
equivalent of input as in Paragraph 6, provided these subroutines do
not change the language in any way that would cause it to fail the
regression tests for the language.
8. Aggregation of this Package with a commercial distribution is always
permitted provided that the use of this Package is embedded; that is,
when no overt attempt is made to make this Package's interfaces visible
to the end user of the commercial distribution. Such use shall not be
construed as a distribution of this Package.
9. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.
10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End
perl-5.8.5/AUTHORS 0100444 0001765 0001765 00000072222 10075761364 012226 0 ustar nick nick # To give due honour to those who have made Perl 5 what it is today,
# here are easily-from-changelogs-extractable people and their
# (hopefully) current and preferred email addresses (as of 2002, if known)
# from the Changes files. These people have either submitted
# patches or suggestions, or their bug reports or comments have inspired
# the appropriate patches. Corrections, additions, deletions welcome;
# send them to perl5-porters@perl.org, preferably as the output of diff(1),
# diff -u or diff -c between the original and a corrected version of this file.
#
# The use of this database for anything else than Perl development
# is strictly forbidden. (Passive distribution with the Perl source
# code kit is, of course, allowed.)
--
A. C. Yardley <yardley@tanet.net>
Aaron B. Dossett <aaron@iglou.com>
Aaron J. Mackey <ajm6q@virginia.edu>
Abe Timmerman <abe@ztreet.demon.nl>
Abhijit Menon-Sen <ams@wiw.org>
Abigail <abigail@abigail.nl>
Achim Bohnet <ach@mpe.mpg.de>
Adam Kennedy <adam@ali.as>
Adam Krolnik <adamk@gypsy.cyrix.com>
Adam Milner <carmiac@nmt.edu>
Adam Spiers
Akim Demaille <akim@epita.fr>
Alan Burlison <Alan.Burlison@uk.sun.com>
Alan Champion <achampio@lehman.com>
Alan Harder <Alan.Harder@Ebay.Sun.COM>
Alan Modra
Alan Ferrency <alan@pair.com>
Albert Chin-A-Young <china@thewrittenword.com>
Albert Dvornik <bert@genscan.com>
Alessandro Forghieri <alf@orion.it>
Alex Gough <alex@rcon.rog>
Alex Vandiver <alexmv@mit.edu>
Alexander Gough <alex-p5p@earth.li>
Alexander Klimov <ask@wisdom.weizmann.ac.il>
Alexander Smishlajev <als@turnhere.com>
Alexey Mahotkin <alexm@netli.com>
Alexey Tourbin <at@altlinux.ru>
Alexey V. Barantsev <barancev@kazbek.ispras.ru>
Allen Smith <allens@cpan.org>
Alain Barbet <alian@cpan.org>
Ambrose Kofi Laing
Ananth Kesari <HYanantha@novell.com>
Anders Jonhson
Andreas Klussmann <andreas@infosys.heitec.de>
Andreas König <a.koenig@mind.de>
Andreas Schwab <schwab@suse.de>
Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru>
Andrew Bettison <andrewb@zip.com.au>
Andrew Cohen <cohen@andy.bu.edu>
andrew deryabin <djsf@technarchy.ru>
Andrew Hamm <AHamm@civica.com.au>
Andrew M. Langmead <aml@world.std.com>
Andrew Pimlott <pimlott@idiomtech.com>
Andrew Vignaux <ajv@nz.sangacorp.com>
Andrew Wilcox <awilcox@maine.com>
Andrey Sapozhnikov <sapa@icb.chel.su>
Andy Bussey <andybussey@yahoo.co.uk>
Andy Dougherty <doughera@lafayette.edu>
Andy Lester <andy@petdance.com>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
Anthony David <adavid@netinfo.com.au>
Anton Berezin <tobez@tobez.org>
Anton Tagunov <tagunov@motor.ru>
Archer Sully <archer@meer.net>
Arjen Laarhoven <arjen@nl.demon.net>
Art Green <Art_Green@mercmarine.com>
Art Haas <ahaas@airmail.net>
Artur Bergman <artur@contiller.se>
Autrijus Tang <autrijus@autrijus.org>
Barrie Slaymaker <barries@slaysys.com>
Barry Friedman
Ben Tilly <ben_tilly@operamail.com>
Benjamin Goldberg <goldbb2@earthlink.net>
Benjamin Holzman <bah@ecnvantage.com>
Benjamin Low <b.d.low@unsw.edu.au>
Benjamin Stuhl <sho_pi@hotmail.com>
Benjamin Sugars <bsugars@canoe.ca>
Bernard Quatermass <bernard@quatermass.co.uk>
Bill Campbell <bill@celestial.com>
Bill Glicker <billg@burrelles.com>
Billy Constantine <wdconsta@cs.adelaide.edu.au>
Blair Zajac <blair@orcaware.com>
Bob Dalgleish <Robert.Dalgleish@sk.sympatico.ca>
Bob Wilkinson
Boris Zentner <bzm@2bz.de>
Boyd Gerber <gerberb@zenez.com>
Brad Appleton <bradapp@enteract.com>
Brad Howerter <bhower@wgc.woodward.com>
Brad Hughes <brad@tgsmc.com>
Brad Lanam <bll@gentoo.com>
Brendan O'Dea <bod@debian.org>
Brent B. Powers <powers@ml.com>
Brent Dax <brentdax@cpan.org>
Brian Callaghan <callagh@itginc.com>
Brian Clarke <clarke@appliedmeta.com>
Brian Grossman
Brian Harrison <brie@corp.home.net>
Brian Ingerson <ingy@ttul.org>
Brian Jepson <bjepson@oreilly.com>
Brian Katzung
Brian McCauley <nobull@mail.com>
Brian Reichert <reichert@internet.com>
Brian S. Cashman <bsc@umich.edu>
Bruce Barnett <barnett@grymoire.crd.ge.com>
Bruce J. Keeler <bkeelerx@iwa.dp.intel.com>
Bruce P. Schuck <bruce@aps.org>
Bud Huff <BAHUFF@us.oracle.com>
Byron Brummer <byron@omix.com>
C Aditya <caditya@novell.com>
Calle Dybedahl <calle@lysator.liu.se>
Carl Eklof <CEklof@endeca.com>
Carl M. Fongheiser <cmf@ins.infonet.net>
Carl Witty <cwitty@newtonlabs.com>
Cary D. Renzema <caryr@mxim.com>
Casey West <casey@geeknest.com>
Castor Fu
Chaim Frenkel <chaimf@pobox.com>
Charles Bailey <bailey@newman.upenn.edu>
Charles F. Randall <crandall@free.click-n-call.com>
Charles Lane <lane@DUPHY4.Physics.Drexel.Edu>
Charles Randall <cfriv@yahoo.com>
Charles Wilson <cwilson@ece.gatech.edu>
Chaskiel M Grundman
Chia-liang Kao <clkao@clkao.org>
Chip Salzenberg <chip@pobox.com>
Chip Turner <cturner@redhat.com>
chocolateboy <chocolateboy@chocolatey.com>
Chris Ball <chris@cpan.org>
Chris Bongaarts <cab@tc.umn.edu>
Chris Faylor <cgf@bbc.com>
Chris Nandor <pudge@pobox.com>
Chris Pepper
Chris Wick <cwick@lmc.com>
Christian Kirsch <ck@held.mind.de>
Christopher Chan-Nui <channui@austin.ibm.com>
Christopher Davis <ckd@loiosh.kei.com>
chromatic <chromatic@rmci.net>
Chuck D. Phillips <cdp@hpescdp.fc.hp.com>
Chuck Phillips <cdp@fc.hp.com>
Chunhui Teng <cteng@nortel.ca>
Clark Cooper <coopercc@netheaven.com>
Claes Jacobsson <claes@surfar.nu>
Clinton A. Pierce <clintp@geeksalad.org>
Colin Kuskie <ckuskie@cadence.com>
Colin McMillen <mcmi0073@tc.umn.edu>
Colin Meyer <cmeyer@helvella.org>
Colin Watson <colinw@zeus.com>
Conrad Augustin
Conrad E. Kimball <cek@tblv021.ca.boeing.com>
Craig A. Berry <craigberry@mac.com>
Craig Milo Rogers <Rogers@ISI.EDU>
Curtis Poe <cp@onsitetech.com>
Dale Amon <amon@vnl.com>
Damian Conway <damian@cs.monash.edu.au>
Damon Atkins <Damon.Atkins@nabaus.com.au>
Dan Boorstein <dan_boo@bellsouth.net>
Dan Brook
Dan Hale <danhale@us.ibm.com>
Dan Kogai <dankogai@dan.co.jp>
Dan Schmidt <dfan@harmonixmusic.com>
Dan Sugalski <dan@sidhe.org>
Daniel Berger <djberg86@attbi.com>
Daniel Chetlin <daniel@chetlin.com>
Daniel Grisinger <dgris@dimensional.com>
Daniel Lieberman <daniel@bitpusher.com>
Daniel Muińo <dmuino@afip.gov.ar>
Daniel P. Berrange <dan@berrange.com>
Daniel S. Lewart <lewart@uiuc.edu>
Daniel Yacob <perl@geez.org>
Danny R. Faught <faught@mailhost.rsn.hp.com>
Danny Sadinoff <sadinoff@olf.com>
Darrell Kindred <dkindred+@cmu.edu>
Darrell Schiebel <drs@nrao.edu>
Darren/Torin/Who Ever... <torin@daft.com>
Dave Bianchi
Dave Hartnoll <Dave_Hartnoll@3b2.com>
Dave Liney <dave.liney@gbr.conoco.com>
Dave Nelson <David.Nelson@bellcow.com>
Dave Paris
Dave Rolsky <autarch@urth.org>
Dave Schweisguth <dcs@neutron.chem.yale.edu>
David Billinghurst <David.Billinghurst@riotinto.com.au>
David Campbell
David Couture
David D. Kilzer <ddkilzer@lubricants-oil.com>
David Denholm <denholm@conmat.phys.soton.ac.uk>
David Dyck <dcd@tc.fluke.com>
David Cannings <lists@edeca.net>
David F. Haertig <dfh@dwroll.lucent.com>
David Favor <david@davidfavor.com>
David Filo
David Glasser <me@davidglasser.net>
David H. Adler <dha@panix.com>
David Hammen <hammen@gothamcity.jsc.nasa.gov>
David J. Fiander <davidf@mks.com>
David Kerry <davidk@tor.securecomputing.com>
David Mitchell <davem@iabyn.nospamdeletethisbit.com>
David Muir Sharnoff <muir@idiom.com>
david nicol <whatever@davidnicol.com>
David R. Favor <dfavor@austin.ibm.com>
David Sparks <daves@ActiveState.com>
David Starks-Browning <dstarks@rc.tudelft.nl>
David Sundstrom <sunds@asictest.sc.ti.com>
Davin Milun <milun@cs.Buffalo.EDU>
Dean Roehrich <roehrich@cray.com>
deekoo <deekoo@tentacle.net>
Dennis Marsa <dennism@cyrix.com>
DH <crazyinsomniac@yahoo.com>
Diab Jerius <dj@head-cfa.harvard.edu>
dLux <dlux@spam.sch.bme.hu>
Dominic Dunlop <domo@computer.org>
Dominique Dumont <Dominique_Dumont@grenoble.hp.com>
Dominique Quatravaux
Doug Campbell <soup@ampersand.com>
Doug MacEachern <dougm@covalent.net>
Douglas E. Wegscheid <dwegscheid@qtm.net>
Douglas Lankshear <dougl@activestate.com>
Douglas Wilson <dougw@cpan.org>
Dov Grobgeld <dov@Orbotech.Co.IL>
Drago Goricanec <drago@raptor.otsd.ts.fujitsu.co.jp>
Ed Mooring <mooring@Lynx.COM>
Ed Peschko <epeschko@den-mdev1>
Edmund Bacon
Edward Avis <ed@membled.com>
Edward Moy <emoy@apple.com>
Edward Peschko <edwardp@excitehome.net>
Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Elizabeth Mattijsen <liz@dijkmat.nl>
Adrian M. Enache <enache@rdslink.ro>
Eric Arnold <eric.arnold@sun.com>
Eric Amick
Eric Bartley <bartley@icd.cc.purdue.edu>
Eric E. Coe <Eric.Coe@oracle.com>
Eric Fifer <egf7@columbia.edu>
Eric Melville
Eric Promislow <ericp@ActiveState.com>
Erich Rickheit
Eryq <eryq@zeegee.com>
Etienne Grossman <etienne@isr.isr.ist.utl.pt>
Eugene Alterman <Eugene.Alterman@bremer-inc.com>
Fabien Tassin <tassin@eerie.fr>
Felix Gallo <fgallo@etoys.com>
Fergal Daly <fergal@esatclear.ie>
Florent Guillaume
Frank Crawford
Frank Ridderbusch <Frank.Ridderbusch@pdb.siemens.de>
Frank Tobin <ftobin@uiuc.edu>
François Désarménien <desar@club-internet.fr>
Fréderic Chauveau <fmc@pasteur.fr>
G. Del Merritt <del@intranetics.com>
Gabe Schaffer
Garry T. Williams <garry@zvolve.com>
Gary Clark <GaryC@mail.jeld-wen.com>
Gary L. Armstrong
Gary Ng <71564.1743@compuserve.com>
Geoffrey F. Green <geoff-public@stuebegreen.com>
Georg Schwarz <geos@epost.de>
George Necula <necula@eecs.berkeley.edu>
Geraint A Edwards <gedge@serf.org>
Gerben Wierda <G.C.Th.Wierda@AWT.nl>
Gerd Knops <gerti@BITart.com>
Gerrit P. Haase <gp@familiehaase.de>
Giles Lean <giles@nemeton.com.au>
Gisle Aas <gisle@aas.no>
Gordon J. Miller <gjm@cray.com>
Grace Lee <grace@hal.com>
Graham Barr <gbarr@pobox.com>
Graham TerMarsch <graham@howlingfrog.com>
Greg Bacon <gbacon@itsc.uah.edu>
Greg Chapman <glc@well.com>
Greg Earle
Greg Kuperberg
Greg Matheson <lang@ms.chinmin.edu.tw>
Greg Seibert <seibert@Lynx.COM>
Greg Ward <gward@ase.com>
Gregor Chrupala <gregor.chrupala@star-group.net>
Gregory Martin Pfeil <pfeilgm@technomadic.org>
Guenter Schmidt <gsc@bruker.de>
Guido Flohr <guido@imperia.net>
Guruprasad S <SGURUPRASAD@novell.com>
Gurusamy Sarathy <gsar@activestate.com>
Gustaf Neumann
Guy Decoux <decoux@moulon.inra.fr>
Gwyn Judd <b.judd@xtra.co.nz>
H.J. Lu <hjl@nynexst.com>
H.Merijn Brand <h.m.brand@hccnet.nl>
Hal Morris <hom00@utsglobal.com>
Hal Pomeranz <pomeranz@netcom.com>
Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
Hannu Napari <Hannu.Napari@hut.fi>
Hans de Graaff <J.J.deGraaff@twi.tudelft.nl>
Hans Ginzel <hans@kolej.mff.cuni.cz>
Hans Mulder <hansmu@xs4all.nl>
Hans Ranke <Hans.Ranke@ei.tum.de>
Harmon S. Nine <hnine@netarx.com>
Harri Pasanen <harri.pasanen@trema.com>
Harry Edmon <harry@atmos.washington.edu>
Helmut Jarausch <jarausch@numa1.igpm.rwth-aachen.de>
Henrik Tougaard <ht.000@foa.dk>
Hershel Walters <walters@smd4d.wes.army.mil>
Holger Bechtold
Hrunting Jonhson
Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
Hugo van der Sanden <hv@crypt.org>
Hunter Kelly <retnuh@zule.pixar.com>
Huw Rogers <count0@gremlin.straylight.co.jp>
I. N. Golubev <gin@mo.msk.ru>
Iain Truskett <spoon@cpan.org>
Ian Maloney <ian.malonet@ubs.com>
Ian Phillipps <Ian.Phillipps@iname.com>
Ignasi Roca <ignasi.roca@fujitsu-siemens.com>
Ilmari Karonen <iltzu@sci.fi>
Ilya Martynov <ilya@martynov.org>
Ilya Sandler <Ilya.Sandler@etak.com>
Ilya Zakharevich <ilya@math.berkeley.edu>
Inaba Hiroto <inaba@st.rim.or.jp>
Indy Singh <indy@nusphere.com>
insecure <insecure@mail.od.ua>
Irving Reid <irving@tor.securecomputing.com>
Ivan Kurmanov <kurmanov@openlib.org>
J. David Blackstone <jdb@dfwnet.sbms.sbc.com>
J. van Krieken <John.van.Krieken@ATComputing.nl>
Jack Shirazi <JackS@GemStone.com>
Jacqui Caren <Jacqui.Caren@ig.co.uk>
Jake Hamby <jehamby@lightside.com>
James <james@rf.net>
James A. Duncan <jduncan@fotango.com>
James FitzGibbon <james@ican.net>
James Jurach <muaddib@erf.net>
Jamshid Afshar
Jan D. <jan.djarv@mbox200.swipnet.se>
Jan Dubois <jand@activestate.com>
Jan Pazdziora <adelton@fi.muni.cz>
Jan-Erik Karlsson <trg@privat.utfors.se>
Jan-Pieter Cornet <johnpc@xs4all.nl>
Jared Rhine <jared@organic.com>
Jari Aalto <jari.aalto@poboxes.com>
Jarkko Hietaniemi <jhi@iki.fi>
Jason A. Smith <smithj4@rpi.edu>
Jason E. Stewart <jason@openinformatics.com>
Jason Shirk
Jason Stewart <jasons@cs.unm.edu>
Jason Varsoke <jjv@caesun10.msd.ray.com>
Jay Hannah <jhannah@omnihotels.com>
Jay Rogers <jay@rgrs.com>
JD Laub <jdl@access-health.com>
Jeff Bouis
Jeff McDougal <jmcdo@cris.com>
Jeff Okamoto <okamoto@corp.hp.com>
Jeff Pinyan <japhy@pobox.com>
Jeff Urlwin <jurlwin@access.digex.net>
Jeffrey Friedl <jfriedl@regex.info>
Jeffrey S. Haemer <jsh@woodcock.boulder.qms.com>
Jens Hamisch <jens@Strawberry.COM>
Jens T. Berger Thielemann <jensthi@ifi.uio.no>
Jens Thomsen <jens@fiend.cis.com>
Jens-Uwe Mager <jum@helios.de>
Jeremy D. Zawodny <jzawodn@wcnet.org>
Jeremy H. Brown <jhbrown@ai.mit.edu>
Jeremy Madea <jmadea@inktomi.com>
Jerome Abela <abela@hsc.fr>
Jerrad Pierce <belg4mit@MIT.EDU>
Jesús Quiroga <jquiroga@pobox.com>
Jim Anderson <jander@ml.com>
Jim Avera <avera@hal.com>
Jim Balter
Jim Cromie <jcromie@cpan.org>
Jim Meyering <meyering@asic.sc.ti.com>
Jim Miner <jfm@winternet.com>
Jim Richardson
Jim Schneider <jschneid@netilla.com>
Joachim Huober
Jochen Wiedmann <joe@ispsoft.de>
Joe Buehler <jbuehler@hekimian.com>
Joe McMahon <mcmahon@ibiblio.org>
Joe Orton <jorton@redhat.com>
Joe Schaefer <joe+perl@sunstarsys.com>
Joe Smith <jsmith@inwap.com>
Joel Rosi-Schwartz <j.schwartz@agonet.it>
Joerg Porath <Joerg.Porath@informatik.tu-chemnitz.de>
Joergen Haegg
Johan Holtman
Johan Vromans <jvromans@squirrel.nl>
Johann Klasek <jk@auto.tuwien.ac.at>
John Bley <jbb6@acpub.duke.edu>
John Borwick <jhborwic@unity.ncsu.edu>
John Cerney <j-cerney1@ti.com>
John D Groenveld <groenvel@cse.psu.edu>
John Goodyear <johngood@us.ibm.com>
John Hasstedt <John.Hasstedt@sunysb.edu>
John Holdsworth <coldwave@bigfoot.com>
John Hughes <john@AtlanTech.COM>
John Kristian <jmk2001@engineer.com>
John L. Allen <allen@grumman.com>
John Macdonald <jmm@revenge.elegant.com>
John Nolan <jpnolan@Op.Net>
John P. Linderman <jpl@research.att.com>
John Peacock <jpeacock@rowman.com>
John Pfuntner <pfuntner@vnet.ibm.com>
John Poltorak <jp@eyup.org>
John Rowe
John Salinas <jsalinas@cray.com>
John Stoffel <jfs@fluent.com>
John Stumbles <jstumbles@bluearc.com>
John Tobey <jtobey@john-edwin-tobey.org>
Johnny Lam <jlam@jgrind.org>
Jon Eveland <jweveland@yahoo.com>
Jon Gunnip <jongunnip@hotmail.com>
Jon Orwant <orwant@oreilly.com>
Jonathan Biggar <jon@sems.com>
Jonathan D Johnston <jdjohnston2@juno.com>
Jonathan Fine <jfine@borders.com>
Jonathan I. Kamens <jik@kamens.brookline.ma.us>
Jonathan Roy <roy@idle.com>
Jonathan Stowe <gellyfish@gellyfish.com>
Jos I. Boumans <kane@dwim.org>
Jose Auguste-Etienne <Jose.auguste-etienne@cgss-guyane.fr>
Joseph N. Hall <joseph@cscaper.com>
Joseph S. Myers <jsm28@hermes.cam.ac.uk>
Joshua E. Rodd <jrodd@pbs.org>
Joshua Pritikin <joshua.pritikin@db.com>
Joost van Baal <J.E.vanBaal@uvt.nl>
JT McDuffie <jt@kpc.com>
Juan Gallego <Little.Boss@physics.mcgill.ca>
Juerd Waalboer <juerd@cpan.org>
Juha Laiho <juha.laiho@Elma.Net>
Julian Yip <julian@imoney.com>
Jungshik Shin <jshin@mailaps.org>
Justin Banks <justinb@cray.com>
Jörg Walter <jwalt@cpan.org>
Ka-Ping Yee <kpyee@aw.sgi.com>
Karl Glazebrook <kgb@aaossz.aao.GOV.AU>
Karl Heuer <kwzh@gnu.org>
Karl Simon Berg <karl@it.kth.se>
Karsten Sperling <spiff@phreax.net>
Kaveh Ghazi <ghazi@caip.rutgers.edu>
Kay Röpke <kroepke@dolphin-services.de>
KAWAI Takanori <GCD00051@nifty.ne.jp>
Keith Neufeld <neufeld@fast.pvi.org>
Keith Thompson <kst@cts.com>
Keith Thompson <kst@SDSC.EDU>
Ken Estes <estes@ms.com>
Ken Fox <kfox@ford.com>
Ken MacLeod <ken@bitsko.slc.ut.us>
Ken Neighbors
Ken Shan <ken@digitas.harvard.edu>
Ken Williams <ken@mathforum.org>
Kenneth Albanowski <kjahds@kjahds.com>
Kenneth Duda <kjd@cisco.com>
Keong Lim <Keong.Lim@sr.com.au>
Kevin Chase <kevincha99@hotmail.com>
Kevin O'Gorman <kevin.kosman@nrc.com>
Kevin Ruscoe <Kevin.Ruscoe@ubsw.com>
Kevin White <klwhite@magnus.acs.ohio-state.edu>
Kim Frutiger
Kingpin <mthurn@copper.dulles.tasc.com>
Kirrily Robert <skud@infotrope.net>
Kragen Sitaker <kragen@pobox.com>
Krishna Sethuraman <krishna@sgi.com>
Kurt D. Starsinic <kstar@wolfetech.com>
Kyriakos Georgiou
Larry Parmelee <parmelee@CS.Cornell.EDU>
Larry Schuler
Larry Schwimmer <rosebud@cyclone.Stanford.EDU>
Larry Shatzer <fugazi@zyx.net>
Larry W. Virden <lvirden@cas.org>
Larry Wall <larry@wall.org>
Lars Hecking <lhecking@nmrc.ucc.ie>
Laszlo Molnar <laszlo.molnar@eth.ericsson.se>
Leif Huhn <leif@hale.dkstat.com>
Len Johnson <lenjay@ibm.net>
Leon Brocard <acme@astray.com>
Les Peters <lpeters@aol.net>
Lincoln D. Stein <lstein@cshl.org>
Lionel Cons <lionel.cons@cern.ch>
Luc St-Louis <luc.st-louis@ca.transport.bombardier.com>
Luca Fini
Lukas Mai
Lupe Christoph <lupe@lupe-christoph.de>
Luther Huffman <lutherh@stratcom.com>
M. J. T. Guy <mjtg@cam.ac.uk>
Major Sébastien <sebastien.major@crdp.ac-caen.fr>
Makoto MATSUSHITA <matusita@ics.es.osaka-u.ac.jp>
Malcolm Beattie <mbeattie@sable.ox.ac.uk>
Manuel Valente <mvalente@idealx.com>
Marc Lehmann <pcg@goof.com>
Marc Paquette <Marc.Paquette@Softimage.COM>
Marcel Grunauer <marcel@codewerk.com>
Marek Rouchal <marek.rouchal@infineon.com>
Mark A Biggar <mab@wdl.loral.com>
Marcus Holland-Moritz <mhx-perl@gmx.net>
Mark A. Hershberger <mah@everybody.org>
Mark Bixby <mark@bixby.org>
Mark Dickinson <dickins3@fas.harvard.edu>
Mark Fisher <fisherm@tce.com>
Mark Fowler <mark@twoshortplanks.com>
Mark Hanson
Mark J. Reed <mreed@strange.turner.com>
Mark K Trettin <mkt@lucent.com>
Mark Kaehny <kaehny@execpc.com>
Mark Kettenis <kettenis@wins.uva.nl>
Mark Klein <mklein@dis.com>
Mark Knutsen <knutsen@pilot.njin.net>
Mark Kvale <kvale@phy.ucsf.edu>
Mark Leighton Fisher <mark-fisher@mindspring.com>
Mark Mielke <mark@mark.mielke.cc>
Mark Murray <mark@grondar.za>
Mark P. Lutz <mark.p.lutz@boeing.com>
Mark Pease <peasem@primenet.com>
Mark Pizzolato <mark@infocomm.com>
Mark R. Levinson <mrl@isc.upenn.edu>
Mark-Jason Dominus <mjd@plover.com>
Martien Verbruggen <mgjv@comdyn.com.au>
Martijn Koster <mak@excitecorp.com>
Martin Husemann <martin@duskware.de>
Martin J. Bligh <mbligh@us.ibm.com>
Martin Jost <Martin.Jost@icn.siemens.de>
Martin Lichtin <lichtin@bivio.com>
Martin Plechsmid <plechsmi@karlin.mff.cuni.cz>
Martin Pool <mbp@samba.org>
Martti Rahkila <martti.rahkila@hut.fi>
Marty Lucich <marty@netcom.com>
Marty Pauley <marty+p5p@kasei.com>
Martyn Pearce <martyn@inpharmatica.co.uk>
Masahiro KAJIURA <masahiro.kajiura@toshiba.co.jp>
Mathias Koerber <mathias@dnssec1.singnet.com.sg>
Matt Kimball
Matt Sergeant <matt@sergeant.org>
Matthew Black <black@csulb.edu>
Matthew Green <mrg@splode.eterna.com.au>
Matthew Sachs <matthewg@zevils.com>
Matthew T Harden <mthard@mthard1.monsanto.com>
Matthias Ulrich Neeracher <neeracher@mac.com>
Matthias Urlichs <smurf@noris.net>
Mattia Barbon <mbarbon@dsi.unive.it>
Maurizio Loreti <maurizio.loreti@pd.infn.it>
Max Baker <max@warped.org>
Merijn Broeren <merijnb@iloquent.nl>
Michael A Chase <mchase@ix.netcom.com>
Michael Carman <mjcarman@home.com>
Michael Cook <mcook@cognex.com>
Michael De La Rue <mikedlr@tardis.ed.ac.uk>
Michael Engel <engel@nms1.cc.huji.ac.il>
Michael G Schwern <schwern@pobox.com>
Michael H. Moran <mhm@austin.ibm.com>
Michael Mahan <mahanm@nextwork.rose-hulman.edu>
Michael Schroeder <Michael.Schroeder@informatik.uni-erlangen.de>
Michael Somos <somos@grail.cba.csuohio.edu>
Michael Stevens <mstevens@globnix.org>
Michele Sardo
Mik Firestone <fireston@lexmark.com>
Mike <mike808@users.sourceforge.net>
Mike Fletcher <fletch@phydeaux.org>
Mike Giroux <mgiroux@bear.com>
Mike Hopkirk <hops@sco.com>
Mike Mestnik <MMestnik@rustconsulting.com>
Mike Pomraning <mjp@pilcrow.madison.wi.us>
Mike Rogers
Mike Schilli <m@perlmeister.com>
Mike Stok <mike@stok.co.uk>
Mike W Ellwood <mwe@rl.ac.uk>
Mikhail Zabaluev <mhz@alt-linux.org>
Milton L. Hankins <mlh@swl.msd.ray.com>
Murray Nesbitt <murray@nesbitt.ca>
Nathan Kurz <nate@valleytel.net>
Nathan Torkington <gnat@frii.com>
Neale Ferguson <neale@VMA.TABNSW.COM.AU>
Neil Bowers <neil@bowers.com>
Neil Watkiss <neil.watkiss@sophos.com>
Nicholas Clark <nick@ccl4.org>
Nicholas Oxhřj
Nick Duffek
Nick Gianniotis
Nick Ing-Simmons <nick@ing-simmons.net>
Nick Williams <Nick.Williams@morganstanley.com>
Nigel Sandever <njsandever@hotmail.com>
Nikola Knezevic <indy@tesla.rcub.bg.ac.yu>
Norbert Pueschel <pueschel@imsdd.meb.uni-bonn.de>
Norton T. Allen <allen@huarp.harvard.edu>
OKAIE Yutaka
Olaf Flebbe <o.flebbe@science-computing.de>
Olaf Titz <olaf@bigred.inka.de>
Olli Savia
Ollivier Robert <roberto@keltia.freenix.fr>
Owen Taylor <owt1@cornell.edu>
parv <parv@pair.com>
Patrick Hayes <Patrick.Hayes.CAP_SESA@renault.fr>
Patrick O'Brien <pdo@cs.umd.edu>
Paul A Sand <pas@unh.edu>
Paul David Fardy <pdf@morgan.ucs.mun.ca>
Paul Eggert <eggert@twinsun.com>
Paul Fenwick <pjf@perltraining.com.au>
Paul Green <Paul.Green@stratus.com>
Paul Hoffman <phoffman@proper.com>
Paul Holser <Paul.Holser.pholser@nortelnetworks.com>
Paul Johnson <paul@pjcj.net>
Paul Lindner <lindner@inuus.com>
Paul Marquess <paul.marquess@btinternet.com>
Paul Moore <Paul.Moore@uk.origin-it.com>
Paul Rogers <Paul.Rogers@Central.Sun.COM>
Paul Saab <ps@yahoo-inc.com>
Paul Schinder <schinder@pobox.com>
Per Einar Ellefsen <per.einar@skynet.be>
Peter BARABAS
Pete Peterson <petersonp@genrad.com>
Peter Chines <pchines@nhgri.nih.gov>
Peter Gessner <peter.gessner@post.rwth-aachen.de>
Peter Gordon <peter@valor.com>
Peter Haworth <pmh@edison.ioppublishing.com>
Peter J. Farley III <pjfarley@banet.net>
Peter Jaspers-Fayer
Peter O'Gorman <peter@pogma.com>
Peter Prymmer <PPrymmer@factset.com>
Peter Scott <Peter@PSDT.com>
Peter van Heusden <pvh@junior.uwc.ac.za>
Peter Wolfe <wolfe@teloseng.com>
Petter Reinholdtsen <pere@hungry.com>
Phil Lobbes <phil@finchcomputer.com>
Philip Hazel <ph10@cus.cam.ac.uk>
Philip Newton <pne@cpan.org>
Piers Cawley <pdcawley@bofh.org.uk>
Piotr Klaban <makler@oryl.man.torun.pl>
Pixel <pixel@mandrakesoft.com>
Pradeep Hodigere <phodigere@yahoo.com>
Prymmer/Kahn <pvhp@best.com>
Quentin Fennessy <quentin@arrakeen.amd.com>
Radu Greab <radu@netsoft.ro>
Rafael Garcia-Suarez <rgarciasuarez@free.fr>
Rainer Keuchel <keuchel@allgeier.com>
Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
Rajesh Vaidheeswarran <rv@gnu.org>
Ralf S. Engelschall <rse@engelschall.com>
Randal L. Schwartz <merlyn@stonehenge.com>
Randall Gellens <randy@qualcomm.com>
Randolf Werner <randolf.werner@sap.com>
Randy J. Ray <rjray@redhat.com>
Randy W. Sims
Raphael Manfredi <Raphael.Manfredi@pobox.com>
Raul Dias <raul@dias.com.br>
Raymund Will <ray@caldera.de>
Redvers Davies <red@criticalintegration.com>
Reini Urban <rurban@sbox.tu-graz.ac.at>
Rex Dieter <rdieter@math.unl.edu>
Rich Morin <rdm@cfcl.com>
Rich Salz <rsalz@bbn.com>
Richard A. Wells <Rwells@uhs.harvard.edu>
Richard Clamp <richardc@unixbeard.net>
Richard Foley <richard.foley@ubsw.com>
Richard Hatch <rhatch@austin.ibm.com>
Richard Hitt <rbh00@utsglobal.com>
Richard Kandarian <richard.kandarian@lanl.gov>
Richard L. England <richard_england@mentorg.com>
Richard L. Maus, Jr. <rmaus@monmouth.com>
Richard Soderberg <p5-authors@crystalflame.net>
Richard Yeh <rcyeh@cco.caltech.edu>
Rick Delaney <rick@consumercontact.com>
Rick Pluta
Rickard Westman
Rob Brown <bbb@cpan.org>
Rob Henderson <robh@cs.indiana.edu>
Rob Napier <rnapier@employees.org>
Robert Partington <rjp@riffraff.plig.net>
Robert Sanders <Robert.Sanders@linux.org>
Robert Spier <rspier@pobox.com>
Robin Barker <RMBarker@cpan.org>
Robin Houston <robin@kitsite.com>
Rocco Caputo <troc@netrus.net>
Roderick Schertler <roderick@argon.org>
Rodger Anderson <rodger@boi.hp.com>
Ronald F. Guilmette <rfg@monkeys.com>
Ronald J. Kimball <rjk@linguist.dartmouth.edu>
Ruben Schattevoy <schattev@imb-jena.de>
Rujith S. de Silva <desilva@netbox.com>
Russ Allbery <rra@stanford.edu>
Russell Fulton <russell@ccu1.auckland.ac.nz>
Russell Mosemann
Ryan Herbert <rherbert@sycamorehq.com>
SADAHIRO Tomoyuki <BQW10602@nifty.com>
SAKAI Kiyotaka <ksakai@netwk.ntt-at.co.jp>
Salvador Fandińo <sfandino@yahoo.com>
Sam Tregar <sam@tregar.com>
Sam Vilain <sam@vilain.net>
Samuli Kärkkäinen <skarkkai@woods.iki.fi>
Schuyler Erle <schuyler@oreilly.com>
Scott A Crosby <scrosby@cs.rice.edu>
Scott Bronson <bronson@rinspin.com>
Scott Gifford <sgifford@tir.com>
Scott Henry <scotth@sgi.com>
Scott L. Miller <Scott.L.Miller@Compaq.com>
Sean Dague <sean@dague.net>
Sean Davis <dive@ender.com>
Sean M. Burke <sburke@cpan.org>
Sean Robinson <robinson_s@sc.maricopa.edu>
Sean Sheedy <seans@ncube.com>
Sebastian Wittmeier <Sebastian.Wittmeier@ginko.de>
Sebastien Barre <Sebastien.Barre@utc.fr>
Shigeya Suzuki <shigeya@foretune.co.jp>
Shimpei Yamashita <shimpei@socrates.patnet.caltech.edu>
Shishir Gundavaram <shishir@ruby.ora.com>
Shlomi Fish <shlomif@vipe.technion.ac.il>
Simon Cozens <simon@netthink.co.uk>
Simon Glover <scog@roe.ac.uk>
Simon Leinen
Simon Parsons <S.Parsons@ftel.co.uk>
Slaven Rezic <slaven@rezic.de>
Solar Designer <solar@openwall.com>
Spider Boardman <spider@orb.nashua.nh.us>
Stas Bekman <stas@stason.org>
Steffen Mueller <xyey9001@sneakemail.com>
Stéphane Payrard <stef@mongueurs.net>
Stephanie Beals <bealzy@us.ibm.com>
Stephen Clouse <stephenc@theiqgroup.com>
Stephen McCamant <smcc@mit.edu>
Stephen O. Lidie <lusol@turkey.cc.Lehigh.EDU>
Stephen P. Potter <spp@ds.net>
Stephen Zander <gibreel@pobox.com>
Steve A Fink <sfink@cs.berkeley.edu>
Steve Grazzini <grazz@pobox.com>
Steve Hay <Steve.Hay@uk.radan.com>
Steve Kelem <steve.kelem@xilinx.com>
Steve McDougall <swmcd@world.std.com>
Steve Nielsen <spn@enteract.com>
Steve Pearlmutter
Steve Vinoski
Steven Hirsch <hirschs@btv.ibm.com>
Steven Knight <knight@theopera.baldmt.citilink.com>
Steven Morlock <newspost@morlock.net>
Steven N. Hirsch <hirschs@stargate.btv.ibm.com>
Steven Parkes <parkes@sierravista.com>
Stian Seeberg <sseeberg@nimsoft.no>
Sven Verdoolaege <skimo@breughel.ufsia.ac.be>
SynaptiCAD, Inc. <sales@syncad.com>
Takis Psarogiannakopoulos <takis@xfree86.org>
Taro KAWAGISHI
Tassilo von Parseval <tassilo.parseval@post.rwth-aachen.de>
Tatsuhiko Miyagawa <miyagawa@edge.co.jp>
Ted Ashton <ashted@southern.edu>
Ted Law <tedlaw@cibcwg.com>
Tels
Teun Burgers <burgers@ecn.nl>
Thad Floryan <thad@thadlabs.com>
Thomas Bowditch <bowditch@inmet.com>
Thomas Conté <tom@fr.uu.net>
Thomas Dorner <Thomas.Dorner@start.de>
Thomas Kofler
Thomas König
Thomas Wegner <wegner_thomas@yahoo.com>
Tim Adye <T.J.Adye@rl.ac.uk>
Tim Ayers <tayers@bridge.com>
Tim Bunce <Tim.Bunce@pobox.com>
Tim Conrow <tim@spindrift.srl.caltech.edu>
Tim Freeman <tfreeman@infoseek.com>
Tim Jenness <t.jenness@jach.hawaii.edu>
Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>
Tim Sweetman <tim@aldigital.co.uk>
Tim Witham <twitham@pcocd2.intel.com>
Timur I. Bakeyev <bsdi@listserv.bat.ru>
Tkil <tkil@reptile.scrye.com>
Todd C. Miller <Todd.Miller@courtesan.com>
Todd T. Fries <todd@fries.int.mrleng.com>
Tom Bates <tom_bates@att.net>
Tom Brown <thecap@peach.ece.utexas.edu>
Tom Dinger
Tom Christiansen <tchrist@perl.com>
Tom Horsley <Tom.Horsley@mail.ccur.com>
Tom Hughes <tom@compton.nu>
Tom Phoenix <rootbeer@teleport.com>
Tom Spindler <dogcow@isi.net>
Ton Hospel
Tony Bowden <tony@kasei.com>
Tony Camas
Tony Cook <tony@develop-help.com>
Tony Sanders <sanders@bsdi.com>
Tor Lillqvist <tml@hemuli.tte.vtt.fi>
Torsten Foertsch <torsten.foertsch@gmx.net>
Trevor Blackwell <tlb@viaweb.com>
Tuomas J. Lukka <tjl@lukka.student.harvard.edu>
Tye McQueen <tye@metronet.com>
Ulrich Kunitz <kunitz@mai-koeln.com>
Ulrich Pfeifer <pfeifer@wait.de>
Vadim Konovalov <vkonovalov@spb.lucent.com>
Valeriy E. Ushakov <uwe@ptc.spbu.ru>
Ville Skyttä <scop@cs132170.pp.htv.fi>
Vishal Bhatia <vishal@deja.com>
Vlad Harchev <hvv@hippo.ru>
Vadim Konovalov <konovalo@mail.wplus.net>
Vladimir Alexiev <vladimir@cs.ualberta.ca>
W. Phillip Moore <wpm@ms.com>
Walt Mankowski <waltman@pobox.com>
Walter Briscoe <w.briscoe@ponl.com>
Warren Hyde <whyde@pezz.sps.mot.com>
Warren Jones <wjones@tc.fluke.com>
Wayne Berke <berke@panix.com>
Wayne Scott <wscott@ichips.intel.com>
Wayne Thompson <Wayne.Thompson@Ebay.sun.com>
Wilfredo Sánchez <wsanchez@mit.edu>
William J. Middleton <William.Middleton@oslo.mobil.telenor.no>
William Mann <wmann@avici.com>
William R Ward <hermit@BayView.COM>
William Setzer <William_Setzer@ncsu.edu>
William Williams <biwillia@cisco.com>
Winfried König <win@in.rhein-main.de>
Wolfgang Laun <Wolfgang.Laun@alcatel.at>
Xavier Noria <fxn@hashref.com>
Yary Hluchan
Yasushi Nakajima <sey@jkc.co.jp>
Yitzchak Scott-Thoennes <sthoenna@efn.org>
Yutaka OIWA <oiwa@is.s.u-tokyo.ac.jp>
Yutao Feng
Yves Orton <demerphq@hotmail.com>
Zachary Miller <zcmiller@simon.er.usgs.gov>
perl-5.8.5/autodoc.pl 0100444 0001765 0001765 00000017114 10075761640 013145 0 ustar nick nick #!/usr/bin/perl -w
require 5.003; # keep this compatible, an old perl is all we may have before
# we build the new one
BEGIN {
push @INC, 'lib';
require 'regen_lib.pl';
}
#
# See database of global and static function prototypes in embed.fnc
# This is used to generate prototype headers under various configurations,
# export symbols lists for different platforms, and macros to provide an
# implicit interpreter context argument.
#
open IN, "embed.fnc" or die $!;
# walk table providing an array of components in each line to
# subroutine, printing the result
sub walk_table (&@) {
my $function = shift;
my $filename = shift || '-';
my $leader = shift;
my $trailer = shift;
my $F;
local *F;
if (ref $filename) { # filehandle
$F = $filename;
}
else {
safer_unlink $filename;
open F, ">$filename" or die "Can't open $filename: $!";
$F = \*F;
}
print $F $leader if $leader;
seek IN, 0, 0; # so we may restart
while (<IN>) {
chomp;
next if /^:/;
while (s|\\\s*$||) {
$_ .= <IN>;
chomp;
}
my @args;
if (/^\s*(#|$)/) {
@args = $_;
}
else {
@args = split /\s*\|\s*/, $_;
}
print $F $function->(@args);
}
print $F $trailer if $trailer;
unless (ref $filename) {
close $F or die "Error closing $filename: $!";
}
}
my %apidocs;
my %gutsdocs;
my %docfuncs;
my $curheader = "Unknown section";
sub autodoc ($$) { # parse a file and extract documentation info
my($fh,$file) = @_;
my($in, $doc, $line);
FUNC:
while (defined($in = <$fh>)) {
if ($in=~ /^=head1 (.*)/) {
$curheader = $1;
next FUNC;
}
$line++;
if ($in =~ /^=for\s+apidoc\s+(.*?)\s*\n/) {
my $proto = $1;
$proto = "||$proto" unless $proto =~ /\|/;
my($flags, $ret, $name, @args) = split /\|/, $proto;
my $docs = "";
DOC:
while (defined($doc = <$fh>)) {
$line++;
last DOC if $doc =~ /^=\w+/;
if ($doc =~ m:^\*/$:) {
warn "=cut missing? $file:$line:$doc";;
last DOC;
}
$docs .= $doc;
}
$docs = "\n$docs" if $docs and $docs !~ /^\n/;
if ($flags =~ /m/) {
if ($flags =~ /A/) {
$apidocs{$curheader}{$name} = [$flags, $docs, $ret, $file, @args];
}
else {
$gutsdocs{$curheader}{$name} = [$flags, $docs, $ret, $file, @args];
}
}
else {
$docfuncs{$name} = [$flags, $docs, $ret, $file, $curheader, @args];
}
if (defined $doc) {
if ($doc =~ /^=(?:for|head)/) {
$in = $doc;
redo FUNC;
}
} else {
warn "$file:$line:$in";
}
}
}
}
sub docout ($$$) { # output the docs for one function
my($fh, $name, $docref) = @_;
my($flags, $docs, $ret, $file, @args) = @$docref;
$docs .= "NOTE: this function is experimental and may change or be
removed without notice.\n\n" if $flags =~ /x/;
$docs .= "NOTE: the perl_ form of this function is deprecated.\n\n"
if $flags =~ /p/;
print $fh "=item $name\n$docs";
if ($flags =~ /U/) { # no usage
# nothing
} elsif ($flags =~ /s/) { # semicolon ("dTHR;")
print $fh "\t\t$name;\n\n";
} elsif ($flags =~ /n/) { # no args
print $fh "\t$ret\t$name\n\n";
} else { # full usage
print $fh "\t$ret\t$name";
print $fh "(" . join(", ", @args) . ")";
print $fh "\n\n";
}
print $fh "=for hackers\nFound in file $file\n\n";
}
my $file;
# glob() picks up docs from extra .c or .h files that may be in unclean
# development trees.
my $MANIFEST = do {
local ($/, *FH);
open FH, "MANIFEST" or die "Can't open MANIFEST: $!";
<FH>;
};
for $file (($MANIFEST =~ /^(\S+\.c)\t/gm), ($MANIFEST =~ /^(\S+\.h)\t/gm)) {
open F, "< $file" or die "Cannot open $file for docs: $!\n";
$curheader = "Functions in file $file\n";
autodoc(\*F,$file);
close F or die "Error closing $file: $!\n";
}
safer_unlink "pod/perlapi.pod";
open (DOC, ">pod/perlapi.pod") or
die "Can't create pod/perlapi.pod: $!\n";
walk_table { # load documented functions into approriate hash
if (@_ > 1) {
my($flags, $retval, $func, @args) = @_;
return "" unless $flags =~ /d/;
$func =~ s/\t//g; $flags =~ s/p//; # clean up fields from embed.pl
$retval =~ s/\t//;
my $docref = delete $docfuncs{$func};
if ($docref and @$docref) {
if ($flags =~ /A/) {
$docref->[0].="x" if $flags =~ /M/;
$apidocs{$docref->[4]}{$func} =
[$docref->[0] . 'A', $docref->[1], $retval,
$docref->[3], @args];
} else {
$gutsdocs{$docref->[4]}{$func} =
[$docref->[0], $docref->[1], $retval, $docref->[3], @args];
}
}
else {
warn "no docs for $func\n" unless $docref and @$docref;
}
}
return "";
} \*DOC;
for (sort keys %docfuncs) {
# Have you used a full for apidoc or just a func name?
# Have you used Ap instead of Am in the for apidoc?
warn "Unable to place $_!\n";
}
print DOC <<'_EOB_';
=head1 NAME
perlapi - autogenerated documentation for the perl public API
=head1 DESCRIPTION
This file contains the documentation of the perl public API generated by
embed.pl, specifically a listing of functions, macros, flags, and variables
that may be used by extension writers. The interfaces of any functions that
are not listed here are subject to change without notice. For this reason,
blindly using functions listed in proto.h is to be avoided when writing
extensions.
Note that all Perl API global variables must be referenced with the C<PL_>
prefix. Some macros are provided for compatibility with the older,
unadorned names, but this support may be disabled in a future release.
The listing is alphabetical, case insensitive.
_EOB_
my $key;
# case insensitive sort, with fallback for determinacy
for $key (sort { uc($a) cmp uc($b) || $a cmp $b } keys %apidocs) {
my $section = $apidocs{$key};
print DOC "\n=head1 $key\n\n=over 8\n\n";
for my $key (sort { uc($a) cmp uc($b); } keys %$section) {
docout(\*DOC, $key, $section->{$key});
}
print DOC "\n=back\n";
}
print DOC <<'_EOE_';
=head1 AUTHORS
Until May 1997, this document was maintained by Jeff Okamoto
<okamoto@corp.hp.com>. It is now maintained as part of Perl itself.
With lots of help and suggestions from Dean Roehrich, Malcolm Beattie,
Andreas Koenig, Paul Hudson, Ilya Zakharevich, Paul Marquess, Neil
Bowers, Matthew Green, Tim Bunce, Spider Boardman, Ulrich Pfeifer,
Stephen McCamant, and Gurusamy Sarathy.
API Listing originally by Dean Roehrich <roehrich@cray.com>.
Updated to be autogenerated from comments in the source by Benjamin Stuhl.
=head1 SEE ALSO
perlguts(1), perlxs(1), perlxstut(1), perlintern(1)
_EOE_
close(DOC) or die "Error closing pod/perlapi.pod: $!";
safer_unlink "pod/perlintern.pod";
open(GUTS, ">pod/perlintern.pod") or
die "Unable to create pod/perlintern.pod: $!\n";
print GUTS <<'END';
=head1 NAME
perlintern - autogenerated documentation of purely B<internal>
Perl functions
=head1 DESCRIPTION
This file is the autogenerated documentation of functions in the
Perl interpreter that are documented using Perl's internal documentation
format but are not marked as part of the Perl API. In other words,
B<they are not for use in extensions>!
END
for $key (sort { uc($a) cmp uc($b); } keys %gutsdocs) {
my $section = $gutsdocs{$key};
print GUTS "\n=head1 $key\n\n=over 8\n\n";
for my $key (sort { uc($a) cmp uc($b); } keys %$section) {
docout(\*GUTS, $key, $section->{$key});
}
print GUTS "\n=back\n";
}
print GUTS <<'END';
=head1 AUTHORS
The autodocumentation system was originally added to the Perl core by
Benjamin Stuhl. Documentation is by whoever was kind enough to
document their functions.
=head1 SEE ALSO
perlguts(1), perlapi(1)
END
close GUTS or die "Error closing pod/perlintern.pod: $!";
perl-5.8.5/av.c 0100444 0001765 0001765 00000054354 10066302633 011724 0 ustar nick nick /* av.c
*
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
* 2000, 2001, 2002, 2003, 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.
*
*/
/*
* "...for the Entwives desired order, and plenty, and peace (by which they
* meant that things should remain where they had set them)." --Treebeard
*/
/*
=head1 Array Manipulation Functions
*/
#include "EXTERN.h"
#define PERL_IN_AV_C
#include "perl.h"
void
Perl_av_reify(pTHX_ AV *av)
{
I32 key;
SV* sv;
if (AvREAL(av))
return;
#ifdef DEBUGGING
if (SvTIED_mg((SV*)av, PERL_MAGIC_tied) && ckWARN_d(WARN_DEBUGGING))
Perl_warner(aTHX_ packWARN(WARN_DEBUGGING), "av_reify called on tied array");
#endif
key = AvMAX(av) + 1;
while (key > AvFILLp(av) + 1)
AvARRAY(av)[--key] = &PL_sv_undef;
while (key) {
sv = AvARRAY(av)[--key];
assert(sv);
if (sv != &PL_sv_undef)
(void)SvREFCNT_inc(sv);
}
key = AvARRAY(av) - AvALLOC(av);
while (key)
AvALLOC(av)[--key] = &PL_sv_undef;
AvREIFY_off(av);
AvREAL_on(av);
}
/*
=for apidoc av_extend
Pre-extend an array. The C<key> is the index to which the array should be
extended.
=cut
*/
void
Perl_av_extend(pTHX_ AV *av, I32 key)
{
MAGIC *mg;
if ((mg = SvTIED_mg((SV*)av, PERL_MAGIC_tied))) {
dSP;
ENTER;
SAVETMPS;
PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
EXTEND(SP,2);
PUSHs(SvTIED_obj((SV*)av, mg));
PUSHs(sv_2mortal(newSViv(key+1)));
PUTBACK;
call_method("EXTEND", G_SCALAR|G_DISCARD);
POPSTACK;
FREETMPS;
LEAVE;
return;
}
if (key > AvMAX(av)) {
SV** ary;
I32 tmp;
I32 newmax;
if (AvALLOC(av) != AvARRAY(av)) {
ary = AvALLOC(av) + AvFILLp(av) + 1;
tmp = AvARRAY(av) - AvALLOC(av);
Move(AvARRAY(av), AvALLOC(av), AvFILLp(av)+1, SV*);
AvMAX(av) += tmp;
SvPVX(av) = (char*)AvALLOC(av);
if (AvREAL(av)) {
while (tmp)
ary[--tmp] = &PL_sv_undef;
}
if (key > AvMAX(av) - 10) {
newmax = key + AvMAX(av);
goto resize;
}
}
else {
#ifdef PERL_MALLOC_WRAP
static const char oom_array_extend[] =
"Out of memory during array extend"; /* Duplicated in pp_hot.c */
#endif
if (AvALLOC(av)) {
#if !defined(STRANGE_MALLOC) && !defined(MYMALLOC)
MEM_SIZE bytes;
IV itmp;
#endif
#ifdef MYMALLOC
newmax = malloced_size((void*)AvALLOC(av))/sizeof(SV*) - 1;
if (key <= newmax)
goto resized;
#endif
newmax = key + AvMAX(av) / 5;
resize:
MEM_WRAP_CHECK_1(newmax+1, SV*, oom_array_extend);
#if defined(STRANGE_MALLOC) || defined(MYMALLOC)
Renew(AvALLOC(av),newmax+1, SV*);
#else
bytes = (newmax + 1) * sizeof(SV*);
#define MALLOC_OVERHEAD 16
itmp = MALLOC_OVERHEAD;
while ((MEM_SIZE)(itmp - MALLOC_OVERHEAD) < bytes)
itmp += itmp;
itmp -= MALLOC_OVERHEAD;
itmp /= sizeof(SV*);
assert(itmp > newmax);
newmax = itmp - 1;
assert(newmax >= AvMAX(av));
New(2,ary, newmax+1, SV*);
Copy(AvALLOC(av), ary, AvMAX(av)+1, SV*);
if (AvMAX(av) > 64)
offer_nice_chunk(AvALLOC(av), (AvMAX(av)+1) * sizeof(SV*));
else
Safefree(AvALLOC(av));
AvALLOC(av) = ary;
#endif
#ifdef MYMALLOC
resized:
#endif
ary = AvALLOC(av) + AvMAX(av) + 1;
tmp = newmax - AvMAX(av);
if (av == PL_curstack) { /* Oops, grew stack (via av_store()?) */
PL_stack_sp = AvALLOC(av) + (PL_stack_sp - PL_stack_base);
PL_stack_base = AvALLOC(av);
PL_stack_max = PL_stack_base + newmax;
}
}
else {
newmax = key < 3 ? 3 : key;
MEM_WRAP_CHECK_1(newmax+1, SV*, oom_array_extend);
New(2,AvALLOC(av), newmax+1, SV*);
ary = AvALLOC(av) + 1;
tmp = newmax;
AvALLOC(av)[0] = &PL_sv_undef; /* For the stacks */
}
if (AvREAL(av)) {
while (tmp)
ary[--tmp] = &PL_sv_undef;
}
SvPVX(av) = (char*)AvALLOC(av);
AvMAX(av) = newmax;
}
}
}
/*
=for apidoc av_fetch
Returns the SV at the specified index in the array. The C<key> is the
index. If C<lval> is set then the fetch will be part of a store. Check
that the return value is non-null before dereferencing it to a C<SV*>.
See L<perlguts/"Understanding the Magic of Tied Hashes and Arrays"> for
more information on how to use this function on tied arrays.
=cut
*/
SV**
Perl_av_fetch(pTHX_ register AV *av, I32 key, I32 lval)
{
SV *sv;
if (!av)
return 0;
if (SvRMAGICAL(av)) {
MAGIC *tied_magic = mg_find((SV*)av, PERL_MAGIC_tied);
if (tied_magic || mg_find((SV*)av, PERL_MAGIC_regdata)) {
U32 adjust_index = 1;
if (tied_magic && key < 0) {
/* Handle negative array indices 20020222 MJD */
SV **negative_indices_glob =
hv_fetch(SvSTASH(SvRV(SvTIED_obj((SV *)av,
tied_magic))),
NEGATIVE_INDICES_VAR, 16, 0);
if (negative_indices_glob
&& SvTRUE(GvSV(*negative_indices_glob)))
adjust_index = 0;
}
if (key < 0 && adjust_index) {
key += AvFILL(av) + 1;
if (key < 0)
return 0;
}
sv = sv_newmortal();
sv_upgrade(sv, SVt_PVLV);
mg_copy((SV*)av, sv, 0, key);
LvTYPE(sv) = 't';
LvTARG(sv) = sv; /* fake (SV**) */
return &(LvTARG(sv));
}
}
if (key < 0) {
key += AvFILL(av) + 1;
if (key < 0)
return 0;
}
if (key > AvFILLp(av)) {
if (!lval)
return 0;
sv = NEWSV(5,0);
return av_store(av,key,sv);
}
if (AvARRAY(av)[key] == &PL_sv_undef) {
emptyness:
if (lval) {
sv = NEWSV(6,0);
return av_store(av,key,sv);
}
return 0;
}
else if (AvREIFY(av)
&& (!AvARRAY(av)[key] /* eg. @_ could have freed elts */
|| SvTYPE(AvARRAY(av)[key]) == SVTYPEMASK)) {
AvARRAY(av)[key] = &PL_sv_undef; /* 1/2 reify */
goto emptyness;
}
return &AvARRAY(av)[key];
}
/*
=for apidoc av_store
Stores an SV in an array. The array index is specified as C<key>. The
return value will be NULL if the operation failed or if the value did not
need to be actually stored within the array (as in the case of tied
arrays). Otherwise it can be dereferenced to get the original C<SV*>. Note
that the caller is responsible for suitably incrementing the reference
count of C<val> before the call, and decrementing it if the function
returned NULL.
See L<perlguts/"Understanding the Magic of Tied Hashes and Arrays"> for
more information on how to use this function on tied arrays.
=cut
*/
SV**
Perl_av_store(pTHX_ register AV *av, I32 key, SV *val)
{
SV** ary;
if (!av)
return 0;
if (!val)
val = &PL_sv_undef;
if (SvRMAGICAL(av)) {
MAGIC *tied_magic = mg_find((SV*)av, PERL_MAGIC_tied);
if (tied_magic) {
/* Handle negative array indices 20020222 MJD */
if (key < 0) {
unsigned adjust_index = 1;
SV **negative_indices_glob =
hv_fetch(SvSTASH(SvRV(SvTIED_obj((SV *)av,
tied_magic))),
NEGATIVE_INDICES_VAR, 16, 0);
if (negative_indices_glob
&& SvTRUE(GvSV(*negative_indices_glob)))
adjust_index = 0;
if (adjust_index) {
key += AvFILL(av) + 1;
if (key < 0)
return 0;
}
}
if (val != &PL_sv_undef) {
mg_copy((SV*)av, val, 0, key);
}
return 0;
}
}
if (key < 0) {
key += AvFILL(av) + 1;
if (key < 0)
return 0;
}
if (SvREADONLY(av) && key >= AvFILL(av))
Perl_croak(aTHX_ PL_no_modify);
if (!AvREAL(av) && AvREIFY(av))
av_reify(av);
if (key > AvMAX(av))
av_extend(av,key);
ary = AvARRAY(av);
if (AvFILLp(av) < key) {
if (!AvREAL(av)) {
if (av == PL_curstack && key > PL_stack_sp - PL_stack_base)
PL_stack_sp = PL_stack_base + key; /* XPUSH in disguise */
do
ary[++AvFILLp(av)] = &PL_sv_undef;
while (AvFILLp(av) < key);
}
AvFILLp(av) = key;
}
else if (AvREAL(av))
SvREFCNT_dec(ary[key]);
ary[key] = val;
if (SvSMAGICAL(av)) {
if (val != &PL_sv_undef) {
MAGIC* mg = SvMAGIC(av);
sv_magic(val, (SV*)av, toLOWER(mg->mg_type), 0, key);
}
mg_set((SV*)av);
}
return &ary[key];
}
/*
=for apidoc newAV
Creates a new AV. The reference count is set to 1.
=cut
*/
AV *
Perl_newAV(pTHX)
{
register AV *av;
av = (AV*)NEWSV(3,0);
sv_upgrade((SV *)av, SVt_PVAV);
AvREAL_on(av);
AvALLOC(av) = 0;
SvPVX(av) = 0;
AvMAX(av) = AvFILLp(av) = -1;
return av;
}
/*
=for apidoc av_make
Creates a new AV and populates it with a list of SVs. The SVs are copied
into the array, so they may be freed after the call to av_make. The new AV
will have a reference count of 1.
=cut
*/
AV *
Perl_av_make(pTHX_ register I32 size, register SV **strp)
{
register AV *av;
register I32 i;
register SV** ary;
av = (AV*)NEWSV(8,0);
sv_upgrade((SV *) av,SVt_PVAV);
AvFLAGS(av) = AVf_REAL;
if (size) { /* `defined' was returning undef for size==0 anyway. */
New(4,ary,size,SV*);
AvALLOC(av) = ary;
SvPVX(av) = (char*)ary;
AvFILLp(av) = size - 1;
AvMAX(av) = size - 1;
for (i = 0; i < size; i++) {
assert (*strp);
ary[i] = NEWSV(7,0);
sv_setsv(ary[i], *strp);
strp++;
}
}
return av;
}
AV *
Perl_av_fake(pTHX_ register I32 size, register SV **strp)
{
register AV *av;
register SV** ary;
av = (AV*)NEWSV(9,0);
sv_upgrade((SV *)av, SVt_PVAV);
New(4,ary,size+1,SV*);
AvALLOC(av) = ary;
Copy(strp,ary,size,SV*);
AvFLAGS(av) = AVf_REIFY;
SvPVX(av) = (char*)ary;
AvFILLp(av) = size - 1;
AvMAX(av) = size - 1;
while (size--) {
assert (*strp);
SvTEMP_off(*strp);
strp++;
}
return av;
}
/*
=for apidoc av_clear
Clears an array, making it empty. Does not free the memory used by the
array itself.
=cut
*/
void
Perl_av_clear(pTHX_ register AV *av)
{
register I32 key;
SV** ary;
#ifdef DEBUGGING
if (SvREFCNT(av) == 0 && ckWARN_d(WARN_DEBUGGING)) {
Perl_warner(aTHX_ packWARN(WARN_DEBUGGING), "Attempt to clear deleted array");
}
#endif
if (!av)
return;
/*SUPPRESS 560*/
if (SvREADONLY(av))
Perl_croak(aTHX_ PL_no_modify);
/* Give any tie a chance to cleanup first */
if (SvRMAGICAL(av))
mg_clear((SV*)av);
if (AvMAX(av) < 0)
return;
if (AvREAL(av)) {
ary = AvARRAY(av);
key = AvFILLp(av) + 1;
while (key) {
SV * sv = ary[--key];
/* undef the slot before freeing the value, because a
* destructor might try to modify this arrray */
ary[key] = &PL_sv_undef;
SvREFCNT_dec(sv);
}
}
if ((key = AvARRAY(av) - AvALLOC(av))) {
AvMAX(av) += key;
SvPVX(av) = (char*)AvALLOC(av);
}
AvFILLp(av) = -1;
}
/*
=for apidoc av_undef
Undefines the array. Frees the memory used by the array itself.
=cut
*/
void
Perl_av_undef(pTHX_ register AV *av)
{
register I32 key;
if (!av)
return;
/*SUPPRESS 560*/
/* Give any tie a chance to cleanup first */
if (SvTIED_mg((SV*)av, PERL_MAGIC_tied))
av_fill(av, -1); /* mg_clear() ? */
if (AvREAL(av)) {
key = AvFILLp(av) + 1;
while (key)
SvREFCNT_dec(AvARRAY(av)[--key]);
}
Safefree(AvALLOC(av));
AvALLOC(av) = 0;
SvPVX(av) = 0;
AvMAX(av) = AvFILLp(av) = -1;
if (AvARYLEN(av)) {
SvREFCNT_dec(AvARYLEN(av));
AvARYLEN(av) = 0;
}
}
/*
=for apidoc av_push
Pushes an SV onto the end of the array. The array will grow automatically
to accommodate the addition.
=cut
*/
void
Perl_av_push(pTHX_ register AV *av, SV *val)
{
MAGIC *mg;
if (!av)
return;
if (SvREADONLY(av))
Perl_croak(aTHX_ PL_no_modify);
if ((mg = SvTIED_mg((SV*)av, PERL_MAGIC_tied))) {
dSP;
PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
EXTEND(SP,2);
PUSHs(SvTIED_obj((SV*)av, mg));
PUSHs(val);
PUTBACK;
ENTER;
call_method("PUSH", G_SCALAR|G_DISCARD);
LEAVE;
POPSTACK;
return;
}
av_store(av,AvFILLp(av)+1,val);
}
/*
=for apidoc av_pop
Pops an SV off the end of the array. Returns C<&PL_sv_undef> if the array
is empty.
=cut
*/
SV *
Perl_av_pop(pTHX_ register AV *av)
{
SV *retval;
MAGIC* mg;
if (!av)
return &PL_sv_undef;
if (SvREADONLY(av))
Perl_croak(aTHX_ PL_no_modify);
if ((mg = SvTIED_mg((SV*)av, PERL_MAGIC_tied))) {
dSP;
PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
XPUSHs(SvTIED_obj((SV*)av, mg));
PUTBACK;
ENTER;
if (call_method("POP", G_SCALAR)) {
retval = newSVsv(*PL_stack_sp--);
} else {
retval = &PL_sv_undef;
}
LEAVE;
POPSTACK;
return retval;
}
if (AvFILL(av) < 0)
return &PL_sv_undef;
retval = AvARRAY(av)[AvFILLp(av)];
AvARRAY(av)[AvFILLp(av)--] = &PL_sv_undef;
if (SvSMAGICAL(av))
mg_set((SV*)av);
return retval;
}
/*
=for apidoc av_unshift
Unshift the given number of C<undef> values onto the beginning of the
array. The array will grow automatically to accommodate the addition. You
must then use C<av_store> to assign values to these new elements.
=cut
*/
void
Perl_av_unshift(pTHX_ register AV *av, register I32 num)
{
register I32 i;
register SV **ary;
MAGIC* mg;
I32 slide;
if (!av)
return;
if (SvREADONLY(av))
Perl_croak(aTHX_ PL_no_modify);
if ((mg = SvTIED_mg((SV*)av, PERL_MAGIC_tied))) {
dSP;
PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
EXTEND(SP,1+num);
PUSHs(SvTIED_obj((SV*)av, mg));
while (num-- > 0) {
PUSHs(&PL_sv_undef);
}
PUTBACK;
ENTER;
call_method("UNSHIFT", G_SCALAR|G_DISCARD);
LEAVE;
POPSTACK;
return;
}
if (num <= 0)
return;
if (!AvREAL(av) && AvREIFY(av))
av_reify(av);
i = AvARRAY(av) - AvALLOC(av);
if (i) {
if (i > num)
i = num;
num -= i;
AvMAX(av) += i;
AvFILLp(av) += i;
SvPVX(av) = (char*)(AvARRAY(av) - i);
}
if (num) {
i = AvFILLp(av);
/* Create extra elements */
slide = i > 0 ? i : 0;
num += slide;
av_extend(av, i + num);
AvFILLp(av) += num;
ary = AvARRAY(av);
Move(ary, ary + num, i + 1, SV*);
do {
ary[--num] = &PL_sv_undef;
} while (num);
/* Make extra elements into a buffer */
AvMAX(av) -= slide;
AvFILLp(av) -= slide;
SvPVX(av) = (char*)(AvARRAY(av) + slide);
}
}
/*
=for apidoc av_shift
Shifts an SV off the beginning of the array.
=cut
*/
SV *
Perl_av_shift(pTHX_ register AV *av)
{
SV *retval;
MAGIC* mg;
if (!av)
return &PL_sv_undef;
if (SvREADONLY(av))
Perl_croak(aTHX_ PL_no_modify);
if ((mg = SvTIED_mg((SV*)av, PERL_MAGIC_tied))) {
dSP;
PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
XPUSHs(SvTIED_obj((SV*)av, mg));
PUTBACK;
ENTER;
if (call_method("SHIFT", G_SCALAR)) {
retval = newSVsv(*PL_stack_sp--);
} else {
retval = &PL_sv_undef;
}
LEAVE;
POPSTACK;
return retval;
}
if (AvFILL(av) < 0)
return &PL_sv_undef;
retval = *AvARRAY(av);
if (AvREAL(av))
*AvARRAY(av) = &PL_sv_undef;
SvPVX(av) = (char*)(AvARRAY(av) + 1);
AvMAX(av)--;
AvFILLp(av)--;
if (SvSMAGICAL(av))
mg_set((SV*)av);
return retval;
}
/*
=for apidoc av_len
Returns the highest index in the array. Returns -1 if the array is
empty.
=cut
*/
I32
Perl_av_len(pTHX_ register AV *av)
{
return AvFILL(av);
}
/*
=for apidoc av_fill
Ensure than an array has a given number of elements, equivalent to
Perl's C<$#array = $fill;>.
=cut
*/
void
Perl_av_fill(pTHX_ register AV *av, I32 fill)
{
MAGIC *mg;
if (!av)
Perl_croak(aTHX_ "panic: null array");
if (fill < 0)
fill = -1;
if ((mg = SvTIED_mg((SV*)av, PERL_MAGIC_tied))) {
dSP;
ENTER;
SAVETMPS;
PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
EXTEND(SP,2);
PUSHs(SvTIED_obj((SV*)av, mg));
PUSHs(sv_2mortal(newSViv(fill+1)));
PUTBACK;
call_method("STORESIZE", G_SCALAR|G_DISCARD);
POPSTACK;
FREETMPS;
LEAVE;
return;
}
if (fill <= AvMAX(av)) {
I32 key = AvFILLp(av);
SV** ary = AvARRAY(av);
if (AvREAL(av)) {
while (key > fill) {
SvREFCNT_dec(ary[key]);
ary[key--] = &PL_sv_undef;
}
}
else {
while (key < fill)
ary[++key] = &PL_sv_undef;
}
AvFILLp(av) = fill;
if (SvSMAGICAL(av))
mg_set((SV*)av);
}
else
(void)av_store(av,fill,&PL_sv_undef);
}
/*
=for apidoc av_delete
Deletes the element indexed by C<key> from the array. Returns the
deleted element. If C<flags> equals C<G_DISCARD>, the element is freed
and null is returned.
=cut
*/
SV *
Perl_av_delete(pTHX_ AV *av, I32 key, I32 flags)
{
SV *sv;
if (!av)
return Nullsv;
if (SvREADONLY(av))
Perl_croak(aTHX_ PL_no_modify);
if (SvRMAGICAL(av)) {
MAGIC *tied_magic = mg_find((SV*)av, PERL_MAGIC_tied);
SV **svp;
if ((tied_magic || mg_find((SV*)av, PERL_MAGIC_regdata))) {
/* Handle negative array indices 20020222 MJD */
if (key < 0) {
unsigned adjust_index = 1;
if (tied_magic) {
SV **negative_indices_glob =
hv_fetch(SvSTASH(SvRV(SvTIED_obj((SV *)av,
tied_magic))),
NEGATIVE_INDICES_VAR, 16, 0);
if (negative_indices_glob
&& SvTRUE(GvSV(*negative_indices_glob)))
adjust_index = 0;
}
if (adjust_index) {
key += AvFILL(av) + 1;
if (key < 0)
return Nullsv;
}
}
svp = av_fetch(av, key, TRUE);
if (svp) {
sv = *svp;
mg_clear(sv);
if (mg_find(sv, PERL_MAGIC_tiedelem)) {
sv_unmagic(sv, PERL_MAGIC_tiedelem); /* No longer an element */
return sv;
}
return Nullsv;
}
}
}
if (key < 0) {
key += AvFILL(av) + 1;
if (key < 0)
return Nullsv;
}
if (key > AvFILLp(av))
return Nullsv;
else {
if (!AvREAL(av) && AvREIFY(av))
av_reify(av);
sv = AvARRAY(av)[key];
if (key == AvFILLp(av)) {
AvARRAY(av)[key] = &PL_sv_undef;
do {
AvFILLp(av)--;
} while (--key >= 0 && AvARRAY(av)[key] == &PL_sv_undef);
}
else
AvARRAY(av)[key] = &PL_sv_undef;
if (SvSMAGICAL(av))
mg_set((SV*)av);
}
if (flags & G_DISCARD) {
SvREFCNT_dec(sv);
sv = Nullsv;
}
return sv;
}
/*
=for apidoc av_exists
Returns true if the element indexed by C<key> has been initialized.
This relies on the fact that uninitialized array elements are set to
C<&PL_sv_undef>.
=cut
*/
bool
Perl_av_exists(pTHX_ AV *av, I32 key)
{
if (!av)
return FALSE;
if (SvRMAGICAL(av)) {
MAGIC *tied_magic = mg_find((SV*)av, PERL_MAGIC_tied);
if (tied_magic || mg_find((SV*)av, PERL_MAGIC_regdata)) {
SV *sv = sv_newmortal();
MAGIC *mg;
/* Handle negative array indices 20020222 MJD */
if (key < 0) {
unsigned adjust_index = 1;
if (tied_magic) {
SV **negative_indices_glob =
hv_fetch(SvSTASH(SvRV(SvTIED_obj((SV *)av,
tied_magic))),
NEGATIVE_INDICES_VAR, 16, 0);
if (negative_indices_glob
&& SvTRUE(GvSV(*negative_indices_glob)))
adjust_index = 0;
}
if (adjust_index) {
key += AvFILL(av) + 1;
if (key < 0)
return FALSE;
}
}
mg_copy((SV*)av, sv, 0, key);
mg = mg_find(sv, PERL_MAGIC_tiedelem);
if (mg) {
magic_existspack(sv, mg);
return (bool)SvTRUE(sv);
}
}
}
if (key < 0) {
key += AvFILL(av) + 1;
if (key < 0)
return FALSE;
}
if (key <= AvFILLp(av) && AvARRAY(av)[key] != &PL_sv_undef
&& AvARRAY(av)[key])
{
return TRUE;
}
else
return FALSE;
}
/* AVHV: Support for treating arrays as if they were hashes. The
* first element of the array should be a hash reference that maps
* hash keys to array indices.
*/
STATIC I32
S_avhv_index_sv(pTHX_ SV* sv)
{
I32 index = SvIV(sv);
if (index < 1)
Perl_croak(aTHX_ "Bad index while coercing array into hash");
return index;
}
STATIC I32
S_avhv_index(pTHX_ AV *av, SV *keysv, U32 hash)
{
HV *keys;
HE *he;
STRLEN n_a;
keys = avhv_keys(av);
he = hv_fetch_ent(keys, keysv, FALSE, hash);
if (!he)
Perl_croak(aTHX_ "No such pseudo-hash field \"%s\"", SvPV(keysv,n_a));
return avhv_index_sv(HeVAL(he));
}
HV*
Perl_avhv_keys(pTHX_ AV *av)
{
SV **keysp = av_fetch(av, 0, FALSE);
if (keysp) {
SV *sv = *keysp;
if (SvGMAGICAL(sv))
mg_get(sv);
if (SvROK(sv)) {
if (ckWARN(WARN_DEPRECATED) && !sv_isa(sv, "pseudohash"))
Perl_warner(aTHX_ packWARN(WARN_DEPRECATED),
"Pseudo-hashes are deprecated");
sv = SvRV(sv);
if (SvTYPE(sv) == SVt_PVHV)
return (HV*)sv;
}
}
Perl_croak(aTHX_ "Can't coerce array into hash");
return Nullhv;
}
SV**
Perl_avhv_store_ent(pTHX_ AV *av, SV *keysv, SV *val, U32 hash)
{
return av_store(av, avhv_index(av, keysv, hash), val);
}
SV**
Perl_avhv_fetch_ent(pTHX_ AV *av, SV *keysv, I32 lval, U32 hash)
{
return av_fetch(av, avhv_index(av, keysv, hash), lval);
}
SV *
Perl_avhv_delete_ent(pTHX_ AV *av, SV *keysv, I32 flags, U32 hash)
{
HV *keys = avhv_keys(av);
HE *he;
he = hv_fetch_ent(keys, keysv, FALSE, hash);
if (!he || !SvOK(HeVAL(he)))
return Nullsv;
return av_delete(av, avhv_index_sv(HeVAL(he)), flags);
}
/* Check for the existence of an element named by a given key.
*
*/
bool
Perl_avhv_exists_ent(pTHX_ AV *av, SV *keysv, U32 hash)
{
HV *keys = avhv_keys(av);
HE *he;
he = hv_fetch_ent(keys, keysv, FALSE, hash);
if (!he || !SvOK(HeVAL(he)))
return FALSE;
return av_exists(av, avhv_index_sv(HeVAL(he)));
}
HE *
Perl_avhv_iternext(pTHX_ AV *av)
{
HV *keys = avhv_keys(av);
return hv_iternext(keys);
}
SV *
Perl_avhv_iterval(pTHX_ AV *av, register HE *entry)
{
SV *sv = hv_iterval(avhv_keys(av), entry);
return *av_fetch(av, avhv_index_sv(sv), TRUE);
}
perl-5.8.5/av.h 0100444 0001765 0001765 00000005744 07647340160 011740 0 ustar nick nick /* av.h
*
* Copyright (C) 1991, 1992, 1993, 1995, 1996, 1997, 1998, 1999,
* 2000, 2001, 2002, 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.
*
*/
struct xpvav {
char* xav_array; /* pointer to first array element */
SSize_t xav_fill; /* Index of last element present */
SSize_t xav_max; /* max index for which array has space */
IV xof_off; /* ptr is incremented by offset */
NV xnv_nv; /* numeric value, if any */
MAGIC* xmg_magic; /* magic for scalar array */
HV* xmg_stash; /* class package */
SV** xav_alloc; /* pointer to beginning of C array of SVs */
SV* xav_arylen;
U8 xav_flags;
};
/* AVf_REAL is set for all AVs whose xav_array contents are refcounted.
* Some things like "@_" and the scratchpad list do not set this, to
* indicate that they are cheating (for efficiency) by not refcounting
* the AV's contents.
*
* AVf_REIFY is only meaningful on such "fake" AVs (i.e. where AVf_REAL
* is not set). It indicates that the fake AV is capable of becoming
* real if the array needs to be modified in some way. Functions that
* modify fake AVs check both flags to call av_reify() as appropriate.
*
* Note that the Perl stack and @DB::args have neither flag set. (Thus,
* items that go on the stack are never refcounted.)
*
* These internal details are subject to change any time. AV
* manipulations external to perl should not care about any of this.
* GSAR 1999-09-10
*/
#define AVf_REAL 1 /* free old entries */
#define AVf_REIFY 2 /* can become real */
/* XXX this is not used anywhere */
#define AVf_REUSED 4 /* got undeffed--don't turn old memory into SVs now */
/*
=head1 Handy Values
=for apidoc AmU||Nullav
Null AV pointer.
=head1 Array Manipulation Functions
=for apidoc Am|int|AvFILL|AV* av
Same as C<av_len()>. Deprecated, use C<av_len()> instead.
=cut
*/
#define Nullav Null(AV*)
#define AvARRAY(av) ((SV**)((XPVAV*) SvANY(av))->xav_array)
#define AvALLOC(av) ((XPVAV*) SvANY(av))->xav_alloc
#define AvMAX(av) ((XPVAV*) SvANY(av))->xav_max
#define AvFILLp(av) ((XPVAV*) SvANY(av))->xav_fill
#define AvARYLEN(av) ((XPVAV*) SvANY(av))->xav_arylen
#define AvFLAGS(av) ((XPVAV*) SvANY(av))->xav_flags
#define AvREAL(av) (AvFLAGS(av) & AVf_REAL)
#define AvREAL_on(av) (AvFLAGS(av) |= AVf_REAL)
#define AvREAL_off(av) (AvFLAGS(av) &= ~AVf_REAL)
#define AvREIFY(av) (AvFLAGS(av) & AVf_REIFY)
#define AvREIFY_on(av) (AvFLAGS(av) |= AVf_REIFY)
#define AvREIFY_off(av) (AvFLAGS(av) &= ~AVf_REIFY)
#define AvREUSED(av) (AvFLAGS(av) & AVf_REUSED)
#define AvREUSED_on(av) (AvFLAGS(av) |= AVf_REUSED)
#define AvREUSED_off(av) (AvFLAGS(av) &= ~AVf_REUSED)
#define AvREALISH(av) (AvFLAGS(av) & (AVf_REAL|AVf_REIFY))
#define AvFILL(av) ((SvRMAGICAL((SV *) (av))) \
? mg_size((SV *) av) : AvFILLp(av))
#define NEGATIVE_INDICES_VAR "NEGATIVE_INDICES"
perl-5.8.5/beos/ 0040755 0001765 0001765 00000000000 10076757372 012113 5 ustar nick nick perl-5.8.5/beos/beos.c 0100444 0001765 0001765 00000001211 07412430103 013151 0 ustar nick nick #include "beos/beosish.h"
#undef waitpid
#include <sys/wait.h>
/* In BeOS 5.0 the waitpid() seems to misbehave in that the status
* has the upper and lower bytes swapped compared with the usual
* POSIX/UNIX implementations. To undo the surpise effect to the
* rest of Perl we need this wrapper. (The rest of BeOS might be
* surprised because of this, though.) */
pid_t beos_waitpid(pid_t process_id, int *status_location, int options) {
pid_t got = waitpid(process_id, status_location, options);
if (status_location)
*status_location =
(*status_location & 0x00FF) << 8 |
(*status_location & 0xFF00) >> 8;
return got;
}
perl-5.8.5/beos/beosish.h 0100444 0001765 0001765 00000000455 07405435132 013704 0 ustar nick nick #ifndef PERL_BEOS_BEOSISH_H
#define PERL_BEOS_BEOSISH_H
#include "../unixish.h"
#undef waitpid
#define waitpid beos_waitpid
pid_t beos_waitpid(pid_t process_id, int *status_location, int options);
/* This seems to be protoless. */
char *gcvt(double value, int num_digits, char *buffer);
#endif
perl-5.8.5/beos/nm.c 0100444 0001765 0001765 00000002703 06526604477 012670 0 ustar nick nick /* nm.c - a feeble shared-lib library parser
* Copyright 1997, 1998 Tom Spindler
* This software is covered under perl's Artistic license.
*/
/* $Id: nm.c,v 1.1 1998/02/16 03:51:26 dogcow Exp $ */
#include <be/kernel/image.h>
#include <malloc.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
main(int argc, char **argv) {
char *path, *symname;
image_id img;
int32 n = 0;
volatile int32 symnamelen, symtype;
void *symloc;
if (argc != 2) { printf("more args, bozo\n"); exit(1); }
path = (void *) malloc((size_t) 2048);
symname = (void *) malloc((size_t) 2048);
if (!getcwd(path, 2048)) { printf("aiee!\n"); exit(1); }
if (!strcat(path, "/")) {printf("naah.\n"); exit (1); }
/*printf("%s\n",path);*/
if ('/' != argv[1][0]) {
if (!strcat(path, argv[1])) { printf("feh1\n"); exit(1); }
} else {
if (!strcpy(path, argv[1])) { printf("gah!\n"); exit(1); }
}
/*printf("%s\n",path);*/
img = load_add_on(path);
if (B_ERROR == img) {printf("Couldn't load_add_on() %s.\n", path); exit(2); }
symnamelen=2047;
while (B_BAD_INDEX != get_nth_image_symbol(img, n++, symname, &symnamelen,
&symtype, &symloc)) {
printf("%s |%s |GLOB %Lx | \n", symname,
((B_SYMBOL_TYPE_ANY == symtype) || (B_SYMBOL_TYPE_TEXT == symtype)) ? "FUNC" : "VAR ", symloc);
symnamelen=2047;
}
printf("number of symbols: %d\n", n);
if (B_ERROR == unload_add_on(img)) {printf("err while closing.\n"); exit(3); }
free(path);
return(0);
}
perl-5.8.5/bytecode.pl 0100444 0001765 0001765 00000034153 07725703775 013324 0 ustar nick nick BEGIN {
push @INC, './lib';
require 'regen_lib.pl';
}
use strict;
my %alias_to = (
U32 => [qw(line_t)],
PADOFFSET => [qw(STRLEN SSize_t)],
U16 => [qw(OPCODE short)],
U8 => [qw(char)],
);
my @optype= qw(OP UNOP BINOP LOGOP LISTOP PMOP SVOP PADOP PVOP LOOP COP);
# Nullsv *must* come first in the following so that the condition
# ($$sv == 0) can continue to be used to test (sv == Nullsv).
my @specialsv = qw(Nullsv &PL_sv_undef &PL_sv_yes &PL_sv_no pWARN_ALL pWARN_NONE);
my (%alias_from, $from, $tos);
while (($from, $tos) = each %alias_to) {
map { $alias_from{$_} = $from } @$tos;
}
my $c_header = <<'EOT';
/*
* Copyright (c) 1996-1999 Malcolm Beattie
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
*
*/
/*
* This file is autogenerated from bytecode.pl. Changes made here will be lost.
*/
EOT
my $perl_header;
($perl_header = $c_header) =~ s{[/ ]?\*/?}{#}g;
safer_unlink "ext/ByteLoader/byterun.c", "ext/ByteLoader/byterun.h", "ext/B/B/Asmdata.pm";
#
# Start with boilerplate for Asmdata.pm
#
open(ASMDATA_PM, ">ext/B/B/Asmdata.pm") or die "ext/B/B/Asmdata.pm: $!";
print ASMDATA_PM $perl_header, <<'EOT';
package B::Asmdata;
our $VERSION = '1.01';
use Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(%insn_data @insn_name @optype @specialsv_name);
our(%insn_data, @insn_name, @optype, @specialsv_name);
EOT
print ASMDATA_PM <<"EOT";
\@optype = qw(@optype);
\@specialsv_name = qw(@specialsv);
# XXX insn_data is initialised this way because with a large
# %insn_data = (foo => [...], bar => [...], ...) initialiser
# I get a hard-to-track-down stack underflow and segfault.
EOT
#
# Boilerplate for byterun.c
#
open(BYTERUN_C, ">ext/ByteLoader/byterun.c") or die "ext/ByteLoader/byterun.c: $!";
print BYTERUN_C $c_header, <<'EOT';
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#define NO_XSLOCKS
#include "XSUB.h"
#include "byterun.h"
#include "bytecode.h"
static const int optype_size[] = {
EOT
my $i = 0;
for ($i = 0; $i < @optype - 1; $i++) {
printf BYTERUN_C " sizeof(%s),\n", $optype[$i], $i;
}
printf BYTERUN_C " sizeof(%s)\n", $optype[$i], $i;
print BYTERUN_C <<'EOT';
};
void *
bset_obj_store(pTHX_ struct byteloader_state *bstate, void *obj, I32 ix)
{
if (ix > bstate->bs_obj_list_fill) {
Renew(bstate->bs_obj_list, ix + 32, void*);
bstate->bs_obj_list_fill = ix + 31;
}
bstate->bs_obj_list[ix] = obj;
return obj;
}
int
byterun(pTHX_ register struct byteloader_state *bstate)
{
register int insn;
U32 ix;
SV *specialsv_list[6];
BYTECODE_HEADER_CHECK; /* croak if incorrect platform */
New(666, bstate->bs_obj_list, 32, void*); /* set op objlist */
bstate->bs_obj_list_fill = 31;
bstate->bs_obj_list[0] = NULL; /* first is always Null */
bstate->bs_ix = 1;
EOT
for my $i ( 0 .. $#specialsv ) {
print BYTERUN_C " specialsv_list[$i] = $specialsv[$i];\n";
}
print BYTERUN_C <<'EOT';
while ((insn = BGET_FGETC()) != EOF) {
switch (insn) {
EOT
my (@insn_name, $insn_num, $insn, $lvalue, $argtype, $flags, $fundtype);
while (<DATA>) {
if (/^\s*#/) {
print BYTERUN_C if /^\s*#\s*(?:if|endif|el)/;
next;
}
chop;
next unless length;
if (/^%number\s+(.*)/) {
$insn_num = $1;
next;
} elsif (/%enum\s+(.*?)\s+(.*)/) {
create_enum($1, $2); # must come before instructions
next;
}
($insn, $lvalue, $argtype, $flags) = split;
my $rvalcast = '';
if ($argtype =~ m:(.+)/(.+):) {
($rvalcast, $argtype) = ("($1)", $2);
}
$insn_name[$insn_num] = $insn;
$fundtype = $alias_from{$argtype} || $argtype;
#
# Add the case statement and code for the bytecode interpreter in byterun.c
#
printf BYTERUN_C "\t case INSN_%s:\t\t/* %d */\n\t {\n",
uc($insn), $insn_num;
my $optarg = $argtype eq "none" ? "" : ", arg";
if ($optarg) {
printf BYTERUN_C "\t\t$argtype arg;\n\t\tBGET_%s(arg);\n", $fundtype;
}
if ($flags =~ /x/) {
print BYTERUN_C "\t\tBSET_$insn($lvalue$optarg);\n";
} elsif ($flags =~ /s/) {
# Store instructions store to bytecode_obj_list[arg]. "lvalue" field is rvalue.
print BYTERUN_C "\t\tBSET_OBJ_STORE($lvalue$optarg);\n";
}
elsif ($optarg && $lvalue ne "none") {
print BYTERUN_C "\t\t$lvalue = ${rvalcast}arg;\n";
}
print BYTERUN_C "\t\tbreak;\n\t }\n";
#
# Add the initialiser line for %insn_data in Asmdata.pm
#
print ASMDATA_PM <<"EOT";
\$insn_data{$insn} = [$insn_num, \\&PUT_$fundtype, "GET_$fundtype"];
EOT
# Find the next unused instruction number
do { $insn_num++ } while $insn_name[$insn_num];
}
#
# Finish off byterun.c
#
print BYTERUN_C <<'EOT';
default:
Perl_croak(aTHX_ "Illegal bytecode instruction %d\n", insn);
/* NOTREACHED */
}
}
return 0;
}
EOT
#
# Write the instruction and optype enum constants into byterun.h
#
open(BYTERUN_H, ">ext/ByteLoader/byterun.h") or die "ext/ByteLoader/byterun.h: $!";
print BYTERUN_H $c_header, <<'EOT';
struct byteloader_fdata {
SV *datasv;
int next_out;
int idx;
};
struct byteloader_state {
struct byteloader_fdata *bs_fdata;
SV *bs_sv;
void **bs_obj_list;
int bs_obj_list_fill;
int bs_ix;
XPV bs_pv;
int bs_iv_overflows;
};
int bl_getc(struct byteloader_fdata *);
int bl_read(struct byteloader_fdata *, char *, size_t, size_t);
extern int byterun(pTHX_ struct byteloader_state *);
enum {
EOT
my $add_enum_value = 0;
my $max_insn;
for $i ( 0 .. $#insn_name ) {
$insn = uc($insn_name[$i]);
if (defined($insn)) {
$max_insn = $i;
if ($add_enum_value) {
print BYTERUN_H " INSN_$insn = $i,\t\t\t/* $i */\n";
$add_enum_value = 0;
} else {
print BYTERUN_H " INSN_$insn,\t\t\t/* $i */\n";
}
} else {
$add_enum_value = 1;
}
}
print BYTERUN_H " MAX_INSN = $max_insn\n};\n";
print BYTERUN_H "\nenum {\n";
for ($i = 0; $i < @optype - 1; $i++) {
printf BYTERUN_H " OPt_%s,\t\t/* %d */\n", $optype[$i], $i;
}
printf BYTERUN_H " OPt_%s\t\t/* %d */\n};\n\n", $optype[$i], $i;
#
# Finish off insn_data and create array initialisers in Asmdata.pm
#
print ASMDATA_PM <<'EOT';
my ($insn_name, $insn_data);
while (($insn_name, $insn_data) = each %insn_data) {
$insn_name[$insn_data->[0]] = $insn_name;
}
# Fill in any gaps
@insn_name = map($_ || "unused", @insn_name);
1;
__END__
=head1 NAME
B::Asmdata - Autogenerated data about Perl ops, used to generate bytecode
=head1 SYNOPSIS
use B::Asmdata qw(%insn_data @insn_name @optype @specialsv_name);
=head1 DESCRIPTION
Provides information about Perl ops in order to generate bytecode via
a bunch of exported variables. Its mostly used by B::Assembler and
B::Disassembler.
=over 4
=item %insn_data
my($bytecode_num, $put_sub, $get_meth) = @$insn_data{$op_name};
For a given $op_name (for example, 'cop_label', 'sv_flags', etc...)
you get an array ref containing the bytecode number of the op, a
reference to the subroutine used to 'PUT', and the name of the method
used to 'GET'.
=for _private
Add more detail about what $put_sub and $get_meth are and how to use them.
=item @insn_name
my $op_name = $insn_name[$bytecode_num];
A simple mapping of the bytecode number to the name of the op.
Suitable for using with %insn_data like so:
my $op_info = $insn_data{$insn_name[$bytecode_num]};
=item @optype
my $op_type = $optype[$op_type_num];
A simple mapping of the op type number to its type (like 'COP' or 'BINOP').
=item @specialsv_name
my $sv_name = $specialsv_name[$sv_index];
Certain SV types are considered 'special'. They're represented by
B::SPECIAL and are refered to by a number from the specialsv_list.
This array maps that number back to the name of the SV (like 'Nullsv'
or '&PL_sv_undef').
=back
=head1 AUTHOR
Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
=cut
EOT
close ASMDATA_PM or die "Error closing ASMDATA_PM: $!";
close BYTERUN_H or die "Error closing BYTERUN_H: $!";
close BYTERUN_C or die "Error closing BYTERUN_C: $!";
__END__
# First set instruction ord("#") to read comment to end-of-line (sneaky)
%number 35
comment arg comment_t
# Then make ord("\n") into a no-op
%number 10
nop none none
# Now for the rest of the ordinary ones, beginning with \0 which is
# ret so that \0-terminated strings can be read properly as bytecode.
%number 0
#
# The argtype is either a single type or "rightvaluecast/argtype".
#
#opcode lvalue argtype flags
#
ret none none x
ldsv bstate->bs_sv svindex
ldop PL_op opindex
stsv bstate->bs_sv U32 s
stop PL_op U32 s
stpv bstate->bs_pv.xpv_pv U32 x
ldspecsv bstate->bs_sv U8 x
ldspecsvx bstate->bs_sv U8 x
newsv bstate->bs_sv U8 x
newsvx bstate->bs_sv U32 x
newop PL_op U8 x
newopx PL_op U16 x
newopn PL_op U8 x
newpv none PV
pv_cur bstate->bs_pv.xpv_cur STRLEN
pv_free bstate->bs_pv none x
sv_upgrade bstate->bs_sv U8 x
sv_refcnt SvREFCNT(bstate->bs_sv) U32
sv_refcnt_add SvREFCNT(bstate->bs_sv) I32 x
sv_flags SvFLAGS(bstate->bs_sv) U32
xrv SvRV(bstate->bs_sv) svindex
xpv bstate->bs_sv none x
xpv_cur SvCUR(bstate->bs_sv) STRLEN
xpv_len SvLEN(bstate->bs_sv) STRLEN
xiv SvIVX(bstate->bs_sv) IV
xnv SvNVX(bstate->bs_sv) NV
xlv_targoff LvTARGOFF(bstate->bs_sv) STRLEN
xlv_targlen LvTARGLEN(bstate->bs_sv)