mksymbolsmanpage.pl 3.7 KB

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