changing read2.c
This commit is contained in:
18
lib/cnode.c
18
lib/cnode.c
@ -7,10 +7,10 @@
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
@ -38,6 +38,18 @@ static hcl_cnode_t* make_cnode (hcl_t* hcl, hcl_cnode_type_t type, const hcl_iol
|
||||
return cnode;
|
||||
}
|
||||
|
||||
hcl_cnode_t* hcl_makecnodersn (hcl_t* hcl, const hcl_ioloc_t* loc)
|
||||
{
|
||||
hcl_cnode_t* cnode;
|
||||
cnode = make_cnode(hcl, loc);
|
||||
if (HCL_UNLIKELY(!cnode)) return HCL_NULL;
|
||||
cnode->u.rsn.head = HCL_NULL;
|
||||
cnode->u.rsn.tail = HCL_NULL;
|
||||
cnode->u.rsn.flags = 0;
|
||||
cnode->u.rsn.rsn_par = HCL_NULL;
|
||||
return cnode;
|
||||
}
|
||||
|
||||
hcl_cnode_t* hcl_makecnodenil (hcl_t* hcl, const hcl_ioloc_t* loc)
|
||||
{
|
||||
return make_cnode(hcl, HCL_CNODE_NIL, loc, 0);
|
||||
|
Reference in New Issue
Block a user