Support multi-line interface calls
Support splitting the call of an interface over multiple lines, e.g. for interfaces with a long list as argument: term_control_unallocated_ttys(udev_t, { ioctl_kdgkbtype ioctl_kdgetmode ioctl_pio_unimap ioctl_pio_unimapclr ioctl_kdfontop ioctl_tcgets }) Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
This commit is contained in:
parent
bdd5036d7a
commit
ec28725235
@ -53,6 +53,11 @@ define(`policy_m4_comment',`
|
||||
##### $2 depth: $1
|
||||
')dnl
|
||||
|
||||
define(NL,`
|
||||
')dnl
|
||||
|
||||
define(`chomp', `translit(`$1',NL,` ')')dnl
|
||||
|
||||
##############################
|
||||
#
|
||||
# In the future interfaces should be in loadable modules
|
||||
@ -63,10 +68,10 @@ define(`template',` dnl
|
||||
ifdef(`$1',`refpolicyerr(`duplicate definition of $1(). Original definition on '$1.) define(`__if_error')',`define(`$1',__file__:__line__)') dnl
|
||||
`define(`$1',` dnl
|
||||
pushdef(`policy_call_depth',incr(policy_call_depth)) dnl
|
||||
policy_m4_comment(policy_call_depth,begin `$1'(dollarsstar)) dnl
|
||||
policy_m4_comment(policy_call_depth,begin `$1'(chomp(dollarsstar))) dnl
|
||||
$2 dnl
|
||||
popdef(`policy_call_depth') dnl
|
||||
policy_m4_comment(policy_call_depth,end `$1'(dollarsstar)) dnl
|
||||
policy_m4_comment(policy_call_depth,end `$1'(chomp(dollarsstar))) dnl
|
||||
'')
|
||||
')
|
||||
|
||||
@ -80,10 +85,10 @@ define(`interface',` dnl
|
||||
ifdef(`$1',`refpolicyerr(`duplicate definition of $1(). Original definition on '$1.) define(`__if_error')',`define(`$1',__file__:__line__)') dnl
|
||||
`define(`$1',` dnl
|
||||
pushdef(`policy_call_depth',incr(policy_call_depth)) dnl
|
||||
policy_m4_comment(policy_call_depth,begin `$1'(dollarsstar)) dnl
|
||||
policy_m4_comment(policy_call_depth,begin `$1'(chomp(dollarsstar))) dnl
|
||||
$2 dnl
|
||||
popdef(`policy_call_depth') dnl
|
||||
policy_m4_comment(policy_call_depth,end `$1'(dollarsstar)) dnl
|
||||
policy_m4_comment(policy_call_depth,end `$1'(chomp(dollarsstar))) dnl
|
||||
'')
|
||||
')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user