mksymbolsmanpage.pl 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #!/usr/bin/env perl
  2. # ***************************************************************************
  3. # * _ _ ____ _
  4. # * Project ___| | | | _ \| |
  5. # * / __| | | | |_) | |
  6. # * | (__| |_| | _ <| |___
  7. # * \___|\___/|_| \_\_____|
  8. # *
  9. # * Copyright (C) 2015 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  10. # *
  11. # * This software is licensed as described in the file COPYING, which
  12. # * you should have received as part of this distribution. The terms
  13. # * are also available at https://curl.se/docs/copyright.html.
  14. # *
  15. # * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  16. # * copies of the Software, and permit persons to whom the Software is
  17. # * furnished to do so, under the terms of the COPYING file.
  18. # *
  19. # * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  20. # * KIND, either express or implied.
  21. # *
  22. # ***************************************************************************
  23. my $version="7.41.0";
  24. use POSIX qw(strftime);
  25. my $date = strftime "%b %e, %Y", localtime;
  26. my $year = strftime "%Y", localtime;
  27. print <<HEADER
  28. .\\" **************************************************************************
  29. .\\" * _ _ ____ _
  30. .\\" * Project ___| | | | _ \\| |
  31. .\\" * / __| | | | |_) | |
  32. .\\" * | (__| |_| | _ <| |___
  33. .\\" * \\___|\\___/|_| \\_\\_____|
  34. .\\" *
  35. .\\" * Copyright (C) 1998 - $year, Daniel Stenberg, <daniel\@haxx.se>, et al.
  36. .\\" *
  37. .\\" * This software is licensed as described in the file COPYING, which
  38. .\\" * you should have received as part of this distribution. The terms
  39. .\\" * are also available at https://curl.se/docs/copyright.html.
  40. .\\" *
  41. .\\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  42. .\\" * copies of the Software, and permit persons to whom the Software is
  43. .\\" * furnished to do so, under the terms of the COPYING file.
  44. .\\" *
  45. .\\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  46. .\\" * KIND, either express or implied.
  47. .\\" *
  48. .\\" **************************************************************************
  49. .TH libcurl-symbols 3 "$date" "libcurl $version" "libcurl symbols"
  50. .SH NAME
  51. libcurl-symbols \\- libcurl symbol version information
  52. .SH "libcurl symbols"
  53. This man page details version information for public symbols provided in the
  54. libcurl header files. This lists the first version in which the symbol was
  55. introduced and for some symbols two additional information pieces:
  56. The first version in which the symbol is marked "deprecated" - meaning that
  57. since that version no new code should be written to use the symbol as it is
  58. marked for getting removed in a future.
  59. The last version that featured the specific symbol. Using the symbol in source
  60. code will make it no longer compile error-free after that specified version.
  61. This man page is automatically generated from the symbols-in-versions file.
  62. HEADER
  63. ;
  64. while(<STDIN>) {
  65. if($_ =~ /^(CURL[A-Z0-9_.]*) *(.*)/) {
  66. my ($symbol, $rest)=($1,$2);
  67. my ($intro, $dep, $rem);
  68. if($rest =~ s/^([0-9.]*) *//) {
  69. $intro = $1;
  70. }
  71. if($rest =~ s/^([0-9.]*) *//) {
  72. $dep = $1;
  73. }
  74. if($rest =~ s/^([0-9.]*) *//) {
  75. $rem = $1;
  76. }
  77. print ".IP $symbol\nIntroduced in $intro\n";
  78. if($dep) {
  79. print "Deprecated since $dep\n";
  80. }
  81. if($rem) {
  82. print "Last used in $dep\n";
  83. }
  84. }
  85. }