SDL: wikiheaders: manpages See Also sections should specify 3 vs 3type. (59937)

From 59937e0fd59923f1abaccb78c98c8358c126bb18 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Tue, 30 Apr 2024 21:35:35 -0400
Subject: [PATCH] wikiheaders: manpages See Also sections should specify 3 vs
 3type.

(cherry picked from commit 5481ea4cd482de8edcac0994e3b7fd3d796e202d)
---
 build-scripts/wikiheaders.pl | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/build-scripts/wikiheaders.pl b/build-scripts/wikiheaders.pl
index ffdf48037e0b3..e03a306cefcd1 100755
--- a/build-scripts/wikiheaders.pl
+++ b/build-scripts/wikiheaders.pl
@@ -1974,7 +1974,12 @@ sub print_undocumented_section {
                 s/\A\s+//;
                 s/\s+\Z//;
                 next if $_ eq '';
-                $str .= "$nextstr.BR $_ (3)";
+                my $seealso_symtype = $headersymstype{$_};
+                my $seealso_mansection = '3';
+                if (defined($seealso_symtype) && ($seealso_symtype >= 3) && ($seealso_symtype <= 5)) {  # struct/union/enum/typedef
+                    $seealso_mansection = '3type';
+                }
+                $str .= "$nextstr.BR $_ ($seealso_mansection)";
                 $nextstr = ",\n";
             }
             $str .= "\n";