Skip to content

Commit

Permalink
Remove utils/c2ph and utils/pstruct
Browse files Browse the repository at this point in the history
These programs are the same, just behave differently depending on
under which name you call it.

This is a very old script, originally dating from the perl3 era.
It has been deprecated in favour of h2xs for a long time.

In Perl 5.26, these utilities will no longer be available.
  • Loading branch information
Abigail committed Jan 16, 2017
1 parent 856f894 commit 2560602
Show file tree
Hide file tree
Showing 17 changed files with 20 additions and 1,489 deletions.
4 changes: 2 additions & 2 deletions Cross/Makefile-cross-SH
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ private = preplibrary $(CONFIGPM) $(CROSS_LIB)/Config.pod lib/buildcustomize.pl
shextract = Makefile cflags config.h makedepend \
makedir myconfig writemain pod/Makefile
addedbyconf = UU $(shextract) lib/lib.pm pstruct
addedbyconf = UU $(shextract) lib/lib.pm
# Unicode data files generated by mktables
unidatafiles = lib/unicore/Decomposition.pl lib/unicore/TestProp.pl \
Expand Down Expand Up @@ -997,7 +997,7 @@ _cleaner2:
rm -rf $(unidatafiles) $(unidatadirs)
rm -rf lib/auto
rm -f lib/.exists lib/*/.exists lib/*/*/.exists
rm -f h2ph.man pstruct
rm -f h2ph.man
rm -rf .config
rm -f preload
rm -rf lib/Encode lib/Compress lib/Hash lib/re
Expand Down
2 changes: 0 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -2239,8 +2239,6 @@ make install will install the following:

cppstdin This is used by the deprecated switch perl -P,
if your cc -E can't read from stdin.
c2ph, pstruct Scripts for handling C structures in header
files.
corelist Shows versions of modules that come with
different
versions of perl.
Expand Down
1 change: 0 additions & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -5891,7 +5891,6 @@ utfebcdic.h Unicode on EBCDIC (UTF-EBCDIC, tr16) header
util.c Utility routines
util.h Dummy header
utils.lst Lists utilities bundled with Perl
utils/c2ph.PL program to translate dbx stabs to perl
utils/corelist.PL Module::CoreList
utils/cpan.PL easily interact with CPAN from the command line
utils/enc2xs.PL Encode module generator
Expand Down
4 changes: 2 additions & 2 deletions Makefile.SH
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ shextract = $shextract
## In the following dollars and backticks do not need the extra backslash.
$spitshell >>$Makefile <<'!NO!SUBS!'
addedbyconf = UU $(shextract) pstruct
addedbyconf = UU $(shextract)
# Unicode data files generated by mktables
unidatafiles = lib/unicore/Decomposition.pl lib/unicore/TestProp.pl \
Expand Down Expand Up @@ -1398,7 +1398,7 @@ _cleaner2:
rm -rf $(unidatafiles) $(unidatadirs)
rm -rf lib/auto
rm -f lib/.exists lib/*/.exists lib/*/*/.exists
rm -f h2ph.man pstruct
rm -f h2ph.man
rm -rf .config
rm -f preload
rm -f pod2htmd.tmp
Expand Down
3 changes: 1 addition & 2 deletions NetWare/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,6 @@ UTILS = \
..\utils\splain \
..\utils\perlbug \
..\utils\pl2pm \
..\utils\c2ph \
..\utils\h2xs \
..\utils\perldoc \
..\pod\pod2html \
Expand Down Expand Up @@ -1349,7 +1348,7 @@ distclean: clean nwclean
-del /f /q $(PODDIR)\*.html
-del /f /q $(PODDIR)\*.bat
cd ..\utils
-del /f /q h2ph splain perlbug pl2pm c2ph h2xs perldoc
-del /f /q h2ph splain perlbug pl2pm h2xs perldoc
-del /f /q *.bat
cd ..\netware
-del /f /q ..\config.sh ..\splittree.pl dlutils.c config.h.new
Expand Down
2 changes: 0 additions & 2 deletions configure.com
Original file line number Diff line number Diff line change
Expand Up @@ -7407,7 +7407,6 @@ $ ENDIF
$ WRITE CONFIG "$!"
$ WRITE CONFIG "$! Symbols for Perl-based utility programs:"
$ WRITE CONFIG "$!"
$ WRITE CONFIG "$ c2ph == """ + perl_setup_perl + " ''vms_prefix':[utils]c2ph.com"""
$ WRITE CONFIG "$ corelist == """ + perl_setup_perl + " ''vms_prefix':[utils]corelist.com"""
$ WRITE CONFIG "$ cpan == """ + perl_setup_perl + " ''vms_prefix':[utils]cpan.com"""
$ WRITE CONFIG "$ enc2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]enc2xs.com"""
Expand All @@ -7430,7 +7429,6 @@ $ WRITE CONFIG "$ pod2usage == """ + perl_setup_perl + " ''vms_prefix':[utils]p
$ WRITE CONFIG "$ podchecker == """ + perl_setup_perl + " ''vms_prefix':[utils]podchecker.com"""
$ WRITE CONFIG "$ podselect == """ + perl_setup_perl + " ''vms_prefix':[utils]podselect.com"""
$ WRITE CONFIG "$ prove == """ + perl_setup_perl + " ''vms_prefix':[utils]prove.com"""
$ WRITE CONFIG "$ pstruct == """ + perl_setup_perl + " ''vms_prefix':[utils]pstruct.com"""
$ WRITE CONFIG "$ ptar == """ + perl_setup_perl + " ''vms_prefix':[utils]ptar.com"""
$ WRITE CONFIG "$ ptardiff == """ + perl_setup_perl + " ''vms_prefix':[utils]ptardiff.com"""
$ WRITE CONFIG "$ ptargrep == """ + perl_setup_perl + " ''vms_prefix':[utils]ptargrep.com"""
Expand Down
2 changes: 1 addition & 1 deletion pod/perl.pod
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ path perlglossary cpan/perlfaq/lib/
path perlxs(?:tut|typemap)? dist/ExtUtils-ParseXS/lib/
path perldoc cpan/Pod-Perldoc/

aux c2ph h2ph h2xs perlbug pl2pm pod2html pod2man splain xsubpp
aux h2ph h2xs perlbug pl2pm pod2html pod2man splain xsubpp

=end buildtoc

Expand Down
5 changes: 5 additions & 0 deletions pod/perldeprecation.pod
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ using this option did not do anything other than producing a warning.
The C<< --libpods >> option is no longer recognized in Perl 5.26.


=head3 The utilities C<< c2ph >> and C<< pstruct >>

These old, perl3-era utilities have been deprecated in favour of
C<< h2xs >> for a long time. In Perl 5.26, they have been removed.


=head2 Perl 5.24

Expand Down
9 changes: 1 addition & 8 deletions pod/perlutil.pod
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,6 @@ around - the F<.ph> file should be created by running F<h2ph> on the
corresponding F<.h> file. See the F<h2ph> documentation for more on how
to convert a whole bunch of header files at once.

=item L<c2ph|c2ph> and L<pstruct|pstruct>

F<c2ph> and F<pstruct>, which are actually the same program but behave
differently depending on how they are called, provide another way of
getting at C with Perl - they'll convert C structures and union declarations
to Perl code. This is deprecated in favour of F<h2xs> these days.

=item L<h2xs|h2xs>

F<h2xs> converts C header files into XS modules, and will try and write
Expand Down Expand Up @@ -238,7 +231,7 @@ L<perldoc|perldoc>, L<pod2man|pod2man>, L<perlpod>,
L<pod2html|pod2html>, L<pod2usage|pod2usage>, L<podselect|podselect>,
L<podchecker|podchecker>, L<splain|splain>, L<perldiag>,
C<roffitall|roffitall>, L<File::Find|File::Find>, L<pl2pm|pl2pm>,
L<perlbug|perlbug>, L<h2ph|h2ph>, L<c2ph|c2ph>, L<h2xs|h2xs>, L<enc2xs>,
L<perlbug|perlbug>, L<h2ph|h2ph>, L<h2xs|h2xs>, L<enc2xs>,
L<xsubpp>, L<cpan>, L<instmodsh>, L<piconv>, L<prove>, L<corelist>, L<ptar>,
L<ptardiff>, L<shasum>, L<zipdetails>

Expand Down
1 change: 0 additions & 1 deletion t/porting/known_pod_issues.dat
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ prctl(2)
printenv(1)
printf(3)
provide
pstruct
ptar(1)
ptargrep(1)
pwd_mkdb(8)
Expand Down
1 change: 0 additions & 1 deletion utils.lst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ cpan/podlators/blib/script/pod2text
cpan/Pod-Usage/blib/script/pod2usage
cpan/Pod-Checker/blib/script/podchecker
cpan/Pod-Parser/blib/script/podselect
utils/c2ph # link = utils/pstruct
utils/cpan
utils/corelist
utils/enc2xs
Expand Down
10 changes: 4 additions & 6 deletions utils/Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,15 @@ print $fh <<'EOT';
# Files to be built with variable substitution after miniperl is
# available. Dependencies handled manually below (for now).
pl = c2ph.PL corelist.PL cpan.PL h2ph.PL h2xs.PL instmodsh.PL json_pp.PL perlbug.PL perldoc.PL perlivp.PL pl2pm.PL prove.PL ptar.PL ptardiff.PL ptargrep.PL shasum.PL splain.PL libnetcfg.PL piconv.PL enc2xs.PL encguess.PL xsubpp.PL pod2html.PL zipdetails.PL
plextract = c2ph corelist cpan h2ph h2xs instmodsh json_pp perlbug perldoc perlivp pl2pm prove ptar ptardiff ptargrep shasum splain libnetcfg piconv enc2xs encguess xsubpp pod2html zipdetails
plextractexe = ./c2ph ./corelist ./cpan ./h2ph ./h2xs ./json_pp ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./ptar ./ptardiff ./ptargrep ./shasum ./splain ./libnetcfg ./piconv ./enc2xs ./encguess ./xsubpp ./pod2html ./zipdetails
pl = corelist.PL cpan.PL h2ph.PL h2xs.PL instmodsh.PL json_pp.PL perlbug.PL perldoc.PL perlivp.PL pl2pm.PL prove.PL ptar.PL ptardiff.PL ptargrep.PL shasum.PL splain.PL libnetcfg.PL piconv.PL enc2xs.PL encguess.PL xsubpp.PL pod2html.PL zipdetails.PL
plextract = corelist cpan h2ph h2xs instmodsh json_pp perlbug perldoc perlivp pl2pm prove ptar ptardiff ptargrep shasum splain libnetcfg piconv enc2xs encguess xsubpp pod2html zipdetails
plextractexe = ./corelist ./cpan ./h2ph ./h2xs ./json_pp ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./ptar ./ptardiff ./ptargrep ./shasum ./splain ./libnetcfg ./piconv ./enc2xs ./encguess ./xsubpp ./pod2html ./zipdetails
all: $(plextract)
$(plextract):
$(RUN) $(PERL) -I../lib $@.PL
c2ph: c2ph.PL ../config.sh
cpan: cpan.PL ../config.sh
corelist: corelist.PL ../config.sh
Expand Down Expand Up @@ -95,7 +93,7 @@ pod2html: pod2html.PL ../config.sh ../ext/Pod-Html/bin/pod2html
clean:
realclean:
rm -rf $(plextract) pstruct $(plextractexe)
rm -rf $(plextract) $(plextractexe)
rm -f ../t/_h2ph_pre.ph
clobber: realclean
Expand Down
Loading

0 comments on commit 2560602

Please sign in to comment.