@@ -30,15 +30,12 @@ abstract class ScanfFunction extends Function {
3030/**
3131 * The standard function `scanf` (and variations).
3232 */
33- class Scanf extends ScanfFunction {
33+ class Scanf extends ScanfFunction instanceof TopLevelFunction {
3434 Scanf ( ) {
35- this instanceof TopLevelFunction and
36- (
37- this .hasGlobalOrStdOrBslName ( "scanf" ) or // scanf(format, args...)
38- this .hasGlobalOrStdOrBslName ( "wscanf" ) or // wscanf(format, args...)
39- this .hasGlobalName ( "_scanf_l" ) or // _scanf_l(format, locale, args...)
40- this .hasGlobalName ( "_wscanf_l" ) // _wscanf_l(format, locale, args...)
41- )
35+ this .hasGlobalOrStdOrBslName ( "scanf" ) or // scanf(format, args...)
36+ this .hasGlobalOrStdOrBslName ( "wscanf" ) or // wscanf(format, args...)
37+ this .hasGlobalName ( "_scanf_l" ) or // _scanf_l(format, locale, args...)
38+ this .hasGlobalName ( "_wscanf_l" )
4239 }
4340
4441 override int getInputParameterIndex ( ) { none ( ) }
@@ -49,15 +46,12 @@ class Scanf extends ScanfFunction {
4946/**
5047 * The standard function `fscanf` (and variations).
5148 */
52- class Fscanf extends ScanfFunction {
49+ class Fscanf extends ScanfFunction instanceof TopLevelFunction {
5350 Fscanf ( ) {
54- this instanceof TopLevelFunction and
55- (
56- this .hasGlobalOrStdOrBslName ( "fscanf" ) or // fscanf(src_stream, format, args...)
57- this .hasGlobalOrStdOrBslName ( "fwscanf" ) or // fwscanf(src_stream, format, args...)
58- this .hasGlobalName ( "_fscanf_l" ) or // _fscanf_l(src_stream, format, locale, args...)
59- this .hasGlobalName ( "_fwscanf_l" ) // _fwscanf_l(src_stream, format, locale, args...)
60- )
51+ this .hasGlobalOrStdOrBslName ( "fscanf" ) or // fscanf(src_stream, format, args...)
52+ this .hasGlobalOrStdOrBslName ( "fwscanf" ) or // fwscanf(src_stream, format, args...)
53+ this .hasGlobalName ( "_fscanf_l" ) or // _fscanf_l(src_stream, format, locale, args...)
54+ this .hasGlobalName ( "_fwscanf_l" )
6155 }
6256
6357 override int getInputParameterIndex ( ) { result = 0 }
@@ -68,15 +62,12 @@ class Fscanf extends ScanfFunction {
6862/**
6963 * The standard function `sscanf` (and variations).
7064 */
71- class Sscanf extends ScanfFunction {
65+ class Sscanf extends ScanfFunction instanceof TopLevelFunction {
7266 Sscanf ( ) {
73- this instanceof TopLevelFunction and
74- (
75- this .hasGlobalOrStdOrBslName ( "sscanf" ) or // sscanf(src_stream, format, args...)
76- this .hasGlobalOrStdOrBslName ( "swscanf" ) or // swscanf(src, format, args...)
77- this .hasGlobalName ( "_sscanf_l" ) or // _sscanf_l(src, format, locale, args...)
78- this .hasGlobalName ( "_swscanf_l" ) // _swscanf_l(src, format, locale, args...)
79- )
67+ this .hasGlobalOrStdOrBslName ( "sscanf" ) or // sscanf(src_stream, format, args...)
68+ this .hasGlobalOrStdOrBslName ( "swscanf" ) or // swscanf(src, format, args...)
69+ this .hasGlobalName ( "_sscanf_l" ) or // _sscanf_l(src, format, locale, args...)
70+ this .hasGlobalName ( "_swscanf_l" )
8071 }
8172
8273 override int getInputParameterIndex ( ) { result = 0 }
@@ -87,17 +78,12 @@ class Sscanf extends ScanfFunction {
8778/**
8879 * The standard(ish) function `snscanf` (and variations).
8980 */
90- class Snscanf extends ScanfFunction {
81+ class Snscanf extends ScanfFunction instanceof TopLevelFunction {
9182 Snscanf ( ) {
92- this instanceof TopLevelFunction and
93- (
94- this .hasGlobalName ( "_snscanf" ) or // _snscanf(src, max_amount, format, args...)
95- this .hasGlobalName ( "_snwscanf" ) or // _snwscanf(src, max_amount, format, args...)
96- this .hasGlobalName ( "_snscanf_l" ) or // _snscanf_l(src, max_amount, format, locale, args...)
97- this .hasGlobalName ( "_snwscanf_l" ) // _snwscanf_l(src, max_amount, format, locale, args...)
98- // note that the max_amount is not a limit on the output length, it's an input length
99- // limit used with non null-terminated strings.
100- )
83+ this .hasGlobalName ( "_snscanf" ) or // _snscanf(src, max_amount, format, args...)
84+ this .hasGlobalName ( "_snwscanf" ) or // _snwscanf(src, max_amount, format, args...)
85+ this .hasGlobalName ( "_snscanf_l" ) or // _snscanf_l(src, max_amount, format, locale, args...)
86+ this .hasGlobalName ( "_snwscanf_l" )
10187 }
10288
10389 override int getInputParameterIndex ( ) { result = 0 }
0 commit comments