!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/5.6.40 

uname -a: Linux cpanel06wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.80.el6.x86_64 #1 SMP Thu Sep 24
01:42:00 EDT 2020 x86_64
 

uid=851(cp949260) gid=853(cp949260) groups=853(cp949260) 

Safe-mode: OFF (not secure)

/opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/nokogiri-1.10.4/ext/nokogiri/   drwxrwxr-x
Free 221.49 GB of 981.82 GB (22.56%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     xml_namespace.c (2.46 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#include <xml_namespace.h>

VALUE cNokogiriXmlNamespace ;

static void dealloc_namespace(xmlNsPtr ns)
{
  /*
   *
   * this deallocator is only used for namespace nodes that are part of an xpath
   * node set.
   *
   * see Nokogiri_wrap_xml_namespace() for more details.
   *
   */
  NOKOGIRI_DEBUG_START(ns) ;
  if (ns->href) {
    xmlFree((xmlChar *)(uintptr_t)ns->href);
  }
  if (ns->prefix) {
    xmlFree((xmlChar *)(uintptr_t)ns->prefix);
  }
  xmlFree(ns);
  NOKOGIRI_DEBUG_END(ns) ;
}


/*
 * call-seq:
 *  prefix
 *
 * Get the prefix for this namespace.  Returns +nil+ if there is no prefix.
 */
static VALUE prefix(VALUE self)
{
  xmlNsPtr ns;

  Data_Get_Struct(self, xmlNs, ns);
  if(!ns->prefix) return Qnil;

  return NOKOGIRI_STR_NEW2(ns->prefix);
}

/*
 * call-seq:
 *  href
 *
 * Get the href for this namespace
 */
static VALUE href(VALUE self)
{
  xmlNsPtr ns;

  Data_Get_Struct(self, xmlNs, ns);
  if(!ns->href) return Qnil;

  return NOKOGIRI_STR_NEW2(ns->href);
}

static int part_of_an_xpath_node_set_eh(xmlNsPtr node)
{
  return (node->next && ! NOKOGIRI_NAMESPACE_EH(node->next));
}

VALUE Nokogiri_wrap_xml_namespace(xmlDocPtr doc, xmlNsPtr node)
{
  VALUE ns = 0, document, node_cache;

  assert(doc->type == XML_DOCUMENT_NODE || doc->type == XML_HTML_DOCUMENT_NODE);

  if (node->_private) return (VALUE)node->_private;

  if (doc->type == XML_DOCUMENT_FRAG_NODE) doc = doc->doc;

  if (DOC_RUBY_OBJECT_TEST(doc)) {
    document = DOC_RUBY_OBJECT(doc);

    if (part_of_an_xpath_node_set_eh(node)) {
      /*
       *  this is a duplicate returned as part of an xpath query node set, and so
       *  we need to make sure we manage this memory.
       *
       *  see comments in xml_node_set.c for more details.
       */
      ns = Data_Wrap_Struct(cNokogiriXmlNamespace, 0, dealloc_namespace, node);
    } else {
      ns = Data_Wrap_Struct(cNokogiriXmlNamespace, 0, 0, node);
      node_cache = rb_iv_get(document, "@node_cache");
      rb_ary_push(node_cache, ns);
    }

    rb_iv_set(ns, "@document", document);
  } else {
    ns = Data_Wrap_Struct(cNokogiriXmlNamespace, 0, 0, node);
  }

  node->_private = (void *)ns;

  return ns;
}

void init_xml_namespace()
{
  VALUE nokogiri  = rb_define_module("Nokogiri");
  VALUE xml       = rb_define_module_under(nokogiri, "XML");
  VALUE klass     = rb_define_class_under(xml, "Namespace", rb_cObject);

  cNokogiriXmlNamespace = klass;

  rb_define_method(klass, "prefix", prefix, 0);
  rb_define_method(klass, "href", href, 0);
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0477 ]--