Shadow.xs

filter: Statementstmt 0.0% 0 / 22 Branchbran 0.0% 0 / 40 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 62 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/Linux/Shadow.pm ↑ Summary const-xs.inc »
1 #include "EXTERN.h"
2 #include "perl.h"
3 #include "XSUB.h"
4  
5 #include "ppport.h"
6  
7 #include <shadow.h>
8  
9 #include "const-c.inc"
10  
11 MODULE = Linux::Shadow PACKAGE = Linux::Shadow
12  
13 PROTOTYPES: DISABLE
14  
15 INCLUDE: const-xs.inc
16  
17 void
18 getspnam (name)
19 const char * name
20 INIT:
21 struct spwd *shadow;
22 PPCODE:
23 0 shadow = getspnam(name);
24 0 ▶ if (shadow) {
Branch: 1 branch
BranchTrueFalseTotal
if (shadow) { 0 0 0
25 0 ▶ XPUSHs(sv_2mortal(newSVpvf("%s", shadow->sp_namp)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSVpvf("%s", shadow->sp_namp))); 0 0 0
26 0 ▶ XPUSHs(sv_2mortal(newSVpvf("%s", shadow->sp_pwdp)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSVpvf("%s", shadow->sp_pwdp))); 0 0 0
27 0 ▶ XPUSHs(sv_2mortal(newSViv(shadow->sp_lstchg)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSViv(shadow->sp_lstchg))); 0 0 0
28 0 ▶ XPUSHs(sv_2mortal(newSViv(shadow->sp_min)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSViv(shadow->sp_min))); 0 0 0
29 0 ▶ XPUSHs(sv_2mortal(newSViv(shadow->sp_max)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSViv(shadow->sp_max))); 0 0 0
30 0 ▶ XPUSHs(sv_2mortal(newSViv(shadow->sp_warn)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSViv(shadow->sp_warn))); 0 0 0
31 0 ▶ XPUSHs(sv_2mortal(newSViv(shadow->sp_inact)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSViv(shadow->sp_inact))); 0 0 0
32 0 ▶ XPUSHs(sv_2mortal(newSViv(shadow->sp_expire)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSViv(shadow->sp_expire))); 0 0 0
33 0 ▶ XPUSHs(sv_2mortal(newSViv(shadow->sp_flag)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSViv(shadow->sp_flag))); 0 0 0
34 }
35  
36 void
37 getspent ()
38 INIT:
39 struct spwd *shadow;
40 PPCODE:
41 0 shadow = getspent();
42 0 ▶ if (shadow) {
Branch: 1 branch
BranchTrueFalseTotal
if (shadow) { 0 0 0
43 0 ▶ XPUSHs(sv_2mortal(newSVpvf("%s", shadow->sp_namp)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSVpvf("%s", shadow->sp_namp))); 0 0 0
44 0 ▶ XPUSHs(sv_2mortal(newSVpvf("%s", shadow->sp_pwdp)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSVpvf("%s", shadow->sp_pwdp))); 0 0 0
45 0 ▶ XPUSHs(sv_2mortal(newSViv(shadow->sp_lstchg)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSViv(shadow->sp_lstchg))); 0 0 0
46 0 ▶ XPUSHs(sv_2mortal(newSViv(shadow->sp_min)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSViv(shadow->sp_min))); 0 0 0
47 0 ▶ XPUSHs(sv_2mortal(newSViv(shadow->sp_max)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSViv(shadow->sp_max))); 0 0 0
48 0 ▶ XPUSHs(sv_2mortal(newSViv(shadow->sp_warn)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSViv(shadow->sp_warn))); 0 0 0
49 0 ▶ XPUSHs(sv_2mortal(newSViv(shadow->sp_inact)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSViv(shadow->sp_inact))); 0 0 0
50 0 ▶ XPUSHs(sv_2mortal(newSViv(shadow->sp_expire)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSViv(shadow->sp_expire))); 0 0 0
51 0 ▶ XPUSHs(sv_2mortal(newSViv(shadow->sp_flag)));
Branch: 1 branch
BranchTrueFalseTotal
XPUSHs(sv_2mortal(newSViv(shadow->sp_flag))); 0 0 0
52 }
53  
54 void
55 setspent ()
56  
57 void
58 endspent ()
59  
« blib/lib/Linux/Shadow.pm ↑ Summary const-xs.inc »