hexsha
stringlengths
40
40
size
int64
5
1.05M
ext
stringclasses
98 values
lang
stringclasses
21 values
max_stars_repo_path
stringlengths
3
945
max_stars_repo_name
stringlengths
4
118
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
945
max_issues_repo_name
stringlengths
4
118
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
134k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
945
max_forks_repo_name
stringlengths
4
135
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
1.05M
avg_line_length
float64
1
1.03M
max_line_length
int64
2
1.03M
alphanum_fraction
float64
0
1
281f601c6c31c196d65d3e8165a59367c3cadb3e
4,499
rb
Ruby
features/step_definitions/biblio_steps.rb
Loic1204/MGL7460-Biblio
6d188e7510b65a75c8d1aab7f9a098eb9e80eee9
[ "MIT" ]
null
null
null
features/step_definitions/biblio_steps.rb
Loic1204/MGL7460-Biblio
6d188e7510b65a75c8d1aab7f9a098eb9e80eee9
[ "MIT" ]
null
null
null
features/step_definitions/biblio_steps.rb
Loic1204/MGL7460-Biblio
6d188e7510b65a75c8d1aab7f9a098eb9e80eee9
[ "MIT" ]
null
null
null
require 'fileutils' require_relative 'assertions' require 'biblio' ##################################################### # Preconditions. ##################################################### # Voir support/hooks.rb Given(/^il n'existe pas de fichier "([^"]*)"$/) do |fichier| FileUtils.rm_f fichier end Given(/^il existe un fichier "([^"]*)"$/) do |fichier| FileUtils.touch fichier end ##################################################### # Actions/evenements. ##################################################### When(/^je retourne l'emprunteur de l'unique emprunt dont le titre matche "([^"]*)"$/) do |titre| @stdout = @biblio_repository.emprunteur( titre ) end When(/^j'indique que l'emprunt "([^"]*)" est perdu$/) do |titre| @biblio_repository.indiquer_perte( titre ) end When(/^je cree un depot sans nom$/) do Biblio::Biblio.ouvrir( Biblio::DEPOT_DEFAUT, {:creer => true, :detruire_si_existe => false} ) end When(/^je cree un depot texte "([^"]*)"$/) do |depot| Biblio::Biblio.ouvrir( depot, {:creer => true, :detruire_si_existe => false} ) end When(/^je cree un depot texte sans nom en indiquant de le detruire s'il existe$/) do Biblio::Biblio.ouvrir( Biblio::DEPOT_DEFAUT, {:creer => true, :detruire_si_existe => true} ) end When(/^je cree un depot texte "([^"]*)" en indiquant de le detruire s'il existe$/) do |depot| Biblio::Biblio.ouvrir( depot, {:creer => true, :detruire_si_existe => true} ) end When(/^je liste les emprunts qui ne sont pas perdus$/) do @stdout = "" @biblio_repository.emprunts( :inclure_perdus => false ).each do |emp| @stdout << ( emp.to_s('%-.20N :: [ %-10A ] "%-.20T"') ) @stdout << "\n" end end When(/^je liste tous les emprunts$/) do @stdout = "" @biblio_repository.emprunts( :inclure_perdus => true ).each do |emp| perdu = emp.perdu? ? " <<PERDU>> " : "" @stdout << ( emp.to_s('%-.20N :: [ %-10A ] "%-.20T"') << perdu ) @stdout << "\n" end end When(/^je rapporte un emprunt dont le titre est "([^"]*)"$/) do |titre| @biblio_repository.rapporter( titre ) end When(/^je selectionne l'emprunt dont le titre matche "([^"]*)"$/) do |titre| @selection = @biblio_repository.les_emprunts.selectionner( unique: false ) do |e| e.titre == titre end end When(/^je trouve les emprunts dont le titre matche "([^"]*)"$/) do |extrait_titre| @selection = @biblio_repository.trouver( extrait_titre ) end When(/^je selectionne les emprunts faits par "([^"]*)"$/) do |nom| @stdout = "" @stdout << @biblio_repository.emprunts_de(nom).join("\n") end When(/^j'emprunte l'emprunt "([^"]*)" pour "([^"]*)" de courriel "([^"]*)" pour le document "([^"]*)" ecrit par "([^"]*)"$/) do |e, nom, courriel, titre, auteurs| begin @biblio_repository.emprunter( nom, courriel, titre, auteurs ) if courriel =~ /([\w\.]*@[\w\.]*)/ rescue Exception=>e @stdout = e.message end end ##################################################### # Postconditions. ##################################################### Then(/^le nom retourne est "([^"]*)"$/) do |nom| assert_equal @stdout, nom end Then(/^aucun nom n'est retourne$/) do assert_equal @stdout, nil end Then(/^l'emprunt "([^"]*)" est considere comme etant perdu$/) do |titre| @selection = @biblio_repository.les_emprunts.selectionner( unique: true ) do |e| e.titre == titre end assert_equal @selection.perdu?, true end Then(/^le fichier "([^"]*)" existe$/) do |fichier| File.exist? fichier end Then(/^on retourne$/) do |string| assert_equal( @stdout, string) end Then(/^on retourne la table$/) do |table| ### # Pris de la page http://stackoverflow.com/questions/19909912/cucumber-reading-data-from-a-3-column-table ### data = table.transpose.raw.inject({}) do |hash, column| column.reject!(&:empty?) hash[column.shift] = column hash end assert_equal( @selection, data['titre']) end Then(/^(\d+) documents ont ete affiches$/) do |number| @tab = @stdout.split("\n") assert_equal( number.to_i, @tab.size ) end Then(/^il y a "([^"]*)" emprunts$/) do |nb| es = @biblio_repository.les_emprunts.selectionner( unique: false ) do |e| e.titre.size > 0 end assert_equal nb.to_i, es.size end Then(/^l'emprunteur de "([^"]*)" est "([^"]*)"$/) do |titre, nom| emp = @biblio_repository.les_emprunts.selectionner( unique: true ) do |e| e.titre == titre end assert_equal nom, emp.nom end Then(/^(\d+) document a ete selectionne$/) do |nb| assert_equal nb.to_i, @selection.size end
28.839744
162
0.597911
3dd010ff9d5c5d6eb368bebd2405d356bf8017f6
3,608
rs
Rust
qlib/kernel/kernel/waiter/mod.rs
abel-von/Quark
7bbba67ee1105e3b7df751a278cbad9b2af666a1
[ "Apache-2.0" ]
null
null
null
qlib/kernel/kernel/waiter/mod.rs
abel-von/Quark
7bbba67ee1105e3b7df751a278cbad9b2af666a1
[ "Apache-2.0" ]
null
null
null
qlib/kernel/kernel/waiter/mod.rs
abel-von/Quark
7bbba67ee1105e3b7df751a278cbad9b2af666a1
[ "Apache-2.0" ]
null
null
null
// Copyright (c) 2021 Quark Container Authors / 2018 The gVisor Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. pub mod waiter; pub mod entry; pub mod waitlist; pub mod queue; pub mod waitgroup; pub mod lock; pub mod bufchan; pub mod chan; pub mod cond; pub mod qlock; use super::super::super::linux_def::*; use super::super::task::*; pub use self::entry::*; pub use self::waiter::*; pub use self::queue::*; use super::async_wait::*; use super::super::fs::file::File; // EventMaskFromLinux returns an EventMask representing the supported events // from the Linux events e, which is in the format used by poll(2). pub fn EventMaskFromLinux(e: u32) -> EventMask { return e as u64 & ALL_EVENTS; } // ToLinux returns e in the format used by Linux poll(2). pub fn ToLinux(e: EventMask) -> u32 { return e as u32; } // Waitable contains the methods that need to be implemented by waitable // objects. // default:: Alway readable pub trait Waitable { fn AsyncReadiness(&self, task: &Task, mask: EventMask, _wait: &MultiWait) -> Future<EventMask> { //wait.AddWait(); let future = Future::New(0 as EventMask); let ret = self.Readiness(task, mask); future.Set(Ok(ret)); //wait.Done(); return future; } // Readiness returns what the object is currently ready for. If it's // not ready for a desired purpose, the caller may use EventRegister and // EventUnregister to get notifications once the object becomes ready. // // Implementations should allow for events like EventHUp and EventErr // to be returned regardless of whether they are in the input EventMask. fn Readiness(&self, _task: &Task, mask: EventMask) -> EventMask { return mask } // EventRegister registers the given waiter entry to receive // notifications when an event occurs that makes the object ready for // at least one of the events in mask. fn EventRegister(&self, _task: &Task, _e: &WaitEntry, _mask: EventMask) {} // EventUnregister unregisters a waiter entry previously registered with // EventRegister(). fn EventUnregister(&self, _task: &Task, _e: &WaitEntry) {} } pub struct PollStruct { pub f: File, pub event: EventMask, pub revent: EventMask, pub future: Option<Future<EventMask>>, } impl PollStruct { pub fn PollMulti(task: &Task, polls: &mut [PollStruct]) -> usize { let mw = MultiWait::New(task.GetTaskId()); for i in 0..polls.len() { let poll = &mut polls[i]; let future = poll.f.AsyncReadiness(task, poll.event, &mw); poll.future = Some(future) } mw.Wait(); let mut cnt = 0; for i in 0..polls.len() { let poll = &mut polls[i]; match poll.future.take().unwrap().Wait() { Err(_) => (), Ok(revent) => { if revent > 0 { poll.revent = revent; cnt += 1; } }, }; } return cnt; } }
31.649123
100
0.633592
6a13f2163cc9072a13bab551574457bfd692d19d
148
lua
Lua
util/apply-plugin/config.lua
btatarov/moai-plugin-mgr
132f1fba89d0568edb8bd17ff9a3a50019dc4f84
[ "MIT" ]
null
null
null
util/apply-plugin/config.lua
btatarov/moai-plugin-mgr
132f1fba89d0568edb8bd17ff9a3a50019dc4f84
[ "MIT" ]
null
null
null
util/apply-plugin/config.lua
btatarov/moai-plugin-mgr
132f1fba89d0568edb8bd17ff9a3a50019dc4f84
[ "MIT" ]
null
null
null
PLUGINS = { -- put plugin definitions here like so: -- 'moai-plugin', -- 'moai-other-plugin', -- ... 'moai-android-facebook', }
18.5
43
0.547297
866b7aab0150142f4fdf1597ea89b97a81c8a266
502
sql
SQL
sql/dropobj.sql
connormcd/misc-scripts
7c4ccd44dd45df9f538666a2b4db367afe51dc51
[ "Apache-2.0" ]
24
2019-11-05T03:00:05.000Z
2022-03-31T12:56:42.000Z
sql/dropobj.sql
connormcd/misc-scripts
7c4ccd44dd45df9f538666a2b4db367afe51dc51
[ "Apache-2.0" ]
1
2020-12-24T05:35:49.000Z
2020-12-24T15:47:19.000Z
sql/dropobj.sql
connormcd/misc-scripts
7c4ccd44dd45df9f538666a2b4db367afe51dc51
[ "Apache-2.0" ]
17
2020-01-24T18:05:50.000Z
2022-03-19T13:54:59.000Z
------------------------------------------------------------------------------- -- -- PLEASE NOTE -- -- No warranty, no liability, no support. -- -- This script is 100% at your own risk to use. -- ------------------------------------------------------------------------------- select 'drop table '||table_name||' cascade constraints;' from user_tables union select 'drop '||object_type||' '||object_name||';' from user_objects where object_type in ('PROCEDURE','FUNCTION','VIEW','PACKAGE','SNAPSHOT')
31.375
79
0.474104
69c39233f7fe07cea58ba20b3a8ba5dbb969d7bb
12,808
swift
Swift
Tests/Model/Transient/TransactionFilter+Tests.swift
frollous/frollo-swift-sdk
603acb8523b46a924bedf0307d9bc41fd9b89ff5
[ "Apache-2.0" ]
1
2021-02-24T14:08:04.000Z
2021-02-24T14:08:04.000Z
Tests/Model/Transient/TransactionFilter+Tests.swift
frollous/frollo-swift-sdk
603acb8523b46a924bedf0307d9bc41fd9b89ff5
[ "Apache-2.0" ]
23
2020-06-30T05:56:31.000Z
2022-03-22T02:48:33.000Z
Tests/Model/Transient/TransactionFilter+Tests.swift
frollous/frollo-swift-sdk
603acb8523b46a924bedf0307d9bc41fd9b89ff5
[ "Apache-2.0" ]
null
null
null
// // Copyright © 2019 Frollo. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // import Foundation import CoreData import XCTest @testable import FrolloSDK class TransactionFilterTests: BaseTestCase { var transactionFilter = TransactionFilter() override func setUp() { testsKeychainService = "TransactionFilterTests" super.setUp() } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() Keychain(service: keychainService).removeAll() } func testTransactionFilterURL() { transactionFilter.populateTestData() XCTAssertEqual(transactionFilter.urlString, "aggregation/transactions?account_ids=11,22,33&transaction_ids=66,77,88,99&merchant_ids=23,45,67,78&transaction_category_ids=4546,5767,6883&search_term=Woolies&budget_category=lifestyle,goals&min_amount=22.44&max_amount=66.00&from_date=2019-11-11&to_date=2020-01-29&base_type=credit&transaction_included=false&account_included=true&tags=Frollo%26Volt,Groceries%20Aldi&bill_id=1024&goal_id=2048") } func testTransactionFilterPredicates() { transactionFilter.populateTestData() let predicates = transactionFilter.filterPredicates XCTAssertEqual(NSCompoundPredicate(andPredicateWithSubpredicates: predicates).predicateFormat, "transactionDateString >= \"2019-11-11\" AND transactionDateString <= \"2020-01-29\" AND transactionID IN {66, 77, 88, 99} AND merchantID IN {23, 45, 67, 78} AND accountID IN {11, 22, 33} AND transactionCategoryID IN {4546, 5767, 6883} AND budgetCategoryRawValue IN {\"lifestyle\", \"goals\"} AND baseTypeRawValue == \"credit\" AND ((amount >= 22.44 AND amount <= 66) OR (amount <= -22.44 AND amount >= -66)) AND (userTagsRawValue CONTAINS[cd] \"Frollo&Volt\" OR userTagsRawValue CONTAINS[cd] \"Groceries Aldi\") AND included == 0 AND account.included == 1 AND (userDescription CONTAINS[cd] \"Woolies\" OR simpleDescription CONTAINS[cd] \"Woolies\" OR originalDescription CONTAINS[cd] \"Woolies\" OR memo CONTAINS[cd] \"Woolies\") AND billID == 1024 AND goalID == 2048") } func testTransactionFilters() { let expectation1 = expectation(description: "Network Request 1") let notificationExpectation = expectation(forNotification: Aggregation.transactionsUpdatedNotification, object: nil, handler: nil) var transactionFilter = TransactionFilter() connect(endpoint: AggregationEndpoint.transactions(transactionFilter: transactionFilter).path.prefixedWithSlash, toResourceWithName: "transactions_single_page") let aggregation = self.aggregation(loggedIn: true) database.setup { error in XCTAssertNil(error) aggregation.refreshTransactions() { result in switch result { case .failure(let error): XCTFail(error.localizedDescription) case .success: let context = self.context transactionFilter.budgetCategories = [.living, .lifestyle] var fetchedTransactions = aggregation.transactions(context: context, transactionFilter: transactionFilter) XCTAssertEqual(fetchedTransactions?.count, 33) transactionFilter = TransactionFilter(budgetCategories: [.income]) fetchedTransactions = aggregation.transactions(context: context, transactionFilter: transactionFilter) XCTAssertEqual(fetchedTransactions?.count, 1) transactionFilter = TransactionFilter(baseType: .credit) fetchedTransactions = aggregation.transactions(context: context, transactionFilter: transactionFilter) XCTAssertEqual(fetchedTransactions?.count, 9) transactionFilter = TransactionFilter(transactionCategoryIDs: [77, 102]) fetchedTransactions = aggregation.transactions(context: context, transactionFilter: transactionFilter) XCTAssertEqual(fetchedTransactions?.count, 16) transactionFilter = TransactionFilter(accountIDs: [2150]) fetchedTransactions = aggregation.transactions(context: context, transactionFilter: transactionFilter) XCTAssertEqual(fetchedTransactions?.count, 26) transactionFilter = TransactionFilter(merchantIDs: [1603]) fetchedTransactions = aggregation.transactions(context: context, transactionFilter: transactionFilter) XCTAssertEqual(fetchedTransactions?.count, 8) transactionFilter = TransactionFilter(minimumAmount: "18.98", maximumAmount: "33.95") fetchedTransactions = aggregation.transactions(context: context, transactionFilter: transactionFilter) XCTAssertEqual(fetchedTransactions?.count, 9) print(fetchedTransactions!.map({$0.amount})) transactionFilter = TransactionFilter(minimumAmount: "55.10") transactionFilter.baseType = .credit fetchedTransactions = aggregation.transactions(context: context, transactionFilter: transactionFilter) XCTAssertEqual(fetchedTransactions?.count, 6) transactionFilter = TransactionFilter(billID: 1024) fetchedTransactions = aggregation.transactions(context: context, transactionFilter: transactionFilter) XCTAssertEqual(fetchedTransactions?.count, 1) transactionFilter = TransactionFilter(goalID: 2048) fetchedTransactions = aggregation.transactions(context: context, transactionFilter: transactionFilter) XCTAssertEqual(fetchedTransactions?.count, 1) } expectation1.fulfill() } } wait(for: [expectation1, notificationExpectation], timeout: 1000.0) } func testCacheLogicForTransactionsSingleDay() { let expectation1 = expectation(description: "Database Request 1") database.setup { error in XCTAssertNil(error) let context = self.context context.performAndWait { let transaction1 = Transaction(context: context) transaction1.populateTestData() transaction1.transactionID = 1 transaction1.transactionDate = Transaction.transactionDateFormatter.date(from: "2019-11-11")! let transaction2 = Transaction(context: context) transaction2.populateTestData() transaction2.transactionID = 2 transaction2.transactionDate = Transaction.transactionDateFormatter.date(from: "2019-11-11")! let transaction3 = Transaction(context: context) transaction3.populateTestData() transaction3.transactionID = 3 transaction3.transactionDate = Transaction.transactionDateFormatter.date(from: "2019-11-11")! let transaction4 = Transaction(context: context) transaction4.populateTestData() transaction4.transactionID = 4 transaction4.transactionDate = Transaction.transactionDateFormatter.date(from: "2019-11-11")! let transaction5 = Transaction(context: context) transaction5.populateTestData() transaction5.transactionID = 5 transaction5.transactionDate = Transaction.transactionDateFormatter.date(from: "2019-11-11")! let transaction6 = Transaction(context: context) transaction6.populateTestData() transaction6.transactionID = 6 transaction6.transactionDate = Transaction.transactionDateFormatter.date(from: "2019-11-11")! let transaction7 = Transaction(context: context) transaction7.populateTestData() transaction7.transactionID = 7 transaction7.transactionDate = Transaction.transactionDateFormatter.date(from: "2019-11-11")! let transaction8 = Transaction(context: context) transaction8.populateTestData() transaction8.transactionID = 8 transaction8.transactionDate = Transaction.transactionDateFormatter.date(from: "2019-11-11")! let transaction9 = Transaction(context: context) transaction9.populateTestData() transaction9.transactionID = 9 transaction9.transactionDate = Transaction.transactionDateFormatter.date(from: "2019-11-11")! let transaction10 = Transaction(context: context) transaction10.populateTestData() transaction10.transactionID = 10 transaction10.transactionDate = Transaction.transactionDateFormatter.date(from: "2019-11-11")! let transaction11 = Transaction(context: context) transaction11.populateTestData() transaction11.transactionID = 11 transaction11.transactionDate = Transaction.transactionDateFormatter.date(from: "2019-11-12")! let transaction12 = Transaction(context: context) transaction12.populateTestData() transaction12.transactionID = 12 transaction12.transactionDate = Transaction.transactionDateFormatter.date(from: "2019-11-10")! try! context.save() } let filterPredicate1 = NSPredicate(format: "transactionDateString <= %@", argumentArray: ["2019-11-12"]) let filterPredicate2 = NSPredicate(format: "transactionDateString == %@ || transactionID <= %@", argumentArray: ["2019-11-11", 5]) let beforePredicate = NSCompoundPredicate(andPredicateWithSubpredicates: [filterPredicate1, filterPredicate2]) let filterPredicate3 = NSPredicate(format: "transactionDateString >= %@", argumentArray: ["2019-11-10"]) let filterPredicate4 = NSPredicate(format: "transactionDateString == %@ || transactionID >= %@", argumentArray: ["2019-11-11", 10]) let afterPredicate = NSCompoundPredicate(andPredicateWithSubpredicates: [filterPredicate3, filterPredicate4]) let finalPredicate = NSCompoundPredicate(andPredicateWithSubpredicates: [beforePredicate, afterPredicate]) let fetchRequest: NSFetchRequest<Transaction> = Transaction.fetchRequest() fetchRequest.predicate = finalPredicate do { let fetchedTransactions = try context.fetch(fetchRequest) XCTAssertEqual(fetchedTransactions.count, 10) } catch { XCTFail(error.localizedDescription) } expectation1.fulfill() } wait(for: [expectation1], timeout: 3.0) } } extension TransactionFilter { mutating func populateTestData() { accountIDs = [11,22,33] transactionIDs = [66,77,88,99] merchantIDs = [23,45,67,78] accountIncluded = true baseType = .credit budgetCategories = [.lifestyle, .savings] transactionCategoryIDs = [4546,5767,6883] fromDate = "2019-11-11" toDate = "2020-01-29" minimumAmount = "22.44" maximumAmount = "66.00" searchTerm = "Woolies" tags = ["Frollo&Volt", "Groceries Aldi"] transactionIncluded = false billID = 1024 goalID = 2048 } }
51.027888
873
0.630153
a1a6cf56c78ce242de3be9a964be2f1ff6b74f8a
2,736
go
Go
cmd/ports.go
rmohr/cli
a95a4b96a0c93899e2e6c3f1ef0ce911b118a382
[ "Apache-2.0" ]
null
null
null
cmd/ports.go
rmohr/cli
a95a4b96a0c93899e2e6c3f1ef0ce911b118a382
[ "Apache-2.0" ]
null
null
null
cmd/ports.go
rmohr/cli
a95a4b96a0c93899e2e6c3f1ef0ce911b118a382
[ "Apache-2.0" ]
null
null
null
package cmd import ( "fmt" "github.com/docker/docker/api/types" "github.com/docker/docker/client" "github.com/docker/go-connections/nat" "github.com/rmohr/cli/docker" "github.com/spf13/cobra" "strconv" ) const ( PORT_SSH = 2201 PORT_REGISTRY = 5000 PORT_OCP = 8443 PORT_K8S = 6443 PORT_VNC = 5901 PORT_NAME_SSH = "ssh" PORT_NAME_OCP = "ocp" PORT_NAME_REGISTRY = "registry" PORT_NAME_K8S = "k8s" PORT_NAME_VNC = "vnc" ) func NewPortCommand() *cobra.Command { port := &cobra.Command{ Use: "ports", Short: "ports shows exposed ports of the cluster", Long: `ports shows exposed ports of the cluster If no port name is specified, all exposed ports are printed. If an extra port name is specified, only the exposed port is printed. Known port names are 'ssh', 'registry', 'ocp' and 'k8s'. `, RunE: ports, Args: func(cmd *cobra.Command, args []string) error { if len(args) > 1 { return fmt.Errorf("only one port name can be specified at once") } if len(args) == 1 { switch args[0] { case PORT_NAME_SSH, PORT_NAME_K8S, PORT_NAME_OCP, PORT_NAME_REGISTRY, PORT_NAME_VNC: return nil default: return fmt.Errorf("unknown port name %s", args[0]) } } return nil }, } return port } func ports(cmd *cobra.Command, args []string) error { prefix, err := cmd.Flags().GetString("prefix") if err != nil { return err } cli, err := client.NewEnvClient() if err != nil { return err } container, err := docker.GetDDNSMasqContainer(cli, prefix) if err != nil { return err } portName := "" if len(args) > 0 { portName = args[0] } if portName != "" { err = nil switch portName { case PORT_NAME_SSH: err = printPort(PORT_SSH, container.Ports) case PORT_NAME_K8S: err = printPort(PORT_K8S, container.Ports) case PORT_NAME_REGISTRY: err = printPort(PORT_REGISTRY, container.Ports) case PORT_NAME_OCP: err = printPort(PORT_OCP, container.Ports) case PORT_NAME_VNC: err = printPort(PORT_VNC, container.Ports) } if err != nil { return err } } else { for _, p := range container.Ports { fmt.Printf("%d/%s -> %s:%d\n", p.PrivatePort, p.Type, p.IP, p.PublicPort) } } return nil } func getPort(port uint16, ports []types.Port) (uint16, error) { for _, p := range ports { if p.PrivatePort == port { return p.PublicPort, nil } } return 0, fmt.Errorf("port is not exposed") } func printPort(port uint16, ports []types.Port) error { p, err := getPort(port, ports) if err != nil { return err } fmt.Println(p) return nil } func tcpPortOrDie(port int) nat.Port { p, err := nat.NewPort("tcp", strconv.Itoa(port)) if err != nil { panic(err) } return p }
20.571429
88
0.654971
f064510352f9025b4d799da86b5d394101356eaa
2,040
js
JavaScript
stories/useFullscreen.stories.js
niqingyang/vue-next-use
b2303d01d05a15ff35f01ca23de95bb7317242f2
[ "MIT" ]
5
2021-03-15T13:14:56.000Z
2021-11-16T05:45:06.000Z
stories/useFullscreen.stories.js
niqingyang/vue-next-use
b2303d01d05a15ff35f01ca23de95bb7317242f2
[ "MIT" ]
1
2021-03-12T02:38:41.000Z
2021-03-15T09:29:04.000Z
stories/useFullscreen.stories.js
niqingyang/vue-next-use
b2303d01d05a15ff35f01ca23de95bb7317242f2
[ "MIT" ]
1
2021-06-09T02:12:57.000Z
2021-06-09T02:12:57.000Z
import {useFullscreen, useRef, useToggle} from "../src/index"; import {ShowDemo, ShowDocs} from './util/index'; export default { title: 'UI/useFullscreen', argTypes: {}, }; export const Docs = ShowDocs(require('../docs/useFullscreen.md')); export const Demo = ShowDemo({ setup(props) { const [show, toggle] = useToggle(false); const ref = useRef(null); const videoRef = useRef(null); const isFullScreen = useFullscreen(ref, show, { onClose: () => toggle(false), video: videoRef, }); return () => { const controls = ( <div style={{background: 'white', padding: '20px'}}> <div>{isFullScreen.value ? 'is full screen' : 'not full screen'}</div> <button onClick={() => toggle()}>Toggle</button> <button onClick={() => toggle(true)}>set ON</button> <button onClick={() => toggle(false)}>set OFF</button> </div> ); return ( <div> <div ref={ref} style={{ backgroundColor: isFullScreen.value ? 'black' : 'grey', width: 400, height: 300, display: 'flex', justifyContent: 'center', alignItems: 'center', }}> <video ref={videoRef} style={{width: '70%'}} src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" autoplay={true} /> {isFullScreen.value && controls} </div> <br/> <br/> {!isFullScreen.value && controls} </div> ) } } });
32.903226
90
0.401471
0efea2b74eccde0423c2b00f8d372ccb92e47bff
600
ts
TypeScript
packages/wasmvm/wasmlib/ts/wasmlib/wasmtypes/index.ts
Dr-Electron/wasp
40e3da13cd7c5d076a89a986c3ea78bd65551052
[ "BSD-2-Clause" ]
1
2021-11-07T15:43:51.000Z
2021-11-07T15:43:51.000Z
packages/wasmvm/wasmlib/ts/wasmlib/wasmtypes/index.ts
Dr-Electron/wasp
40e3da13cd7c5d076a89a986c3ea78bd65551052
[ "BSD-2-Clause" ]
null
null
null
packages/wasmvm/wasmlib/ts/wasmlib/wasmtypes/index.ts
Dr-Electron/wasp
40e3da13cd7c5d076a89a986c3ea78bd65551052
[ "BSD-2-Clause" ]
1
2022-02-28T08:36:18.000Z
2022-02-28T08:36:18.000Z
// Copyright 2020 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 export * from "./codec" export * from "./proxy" export * from "./scaddress" export * from "./scagentid" export * from "./scbool" export * from "./scbytes" export * from "./scchainid" export * from "./sccolor" export * from "./schash" export * from "./schname" export * from "./scint8" export * from "./scint16" export * from "./scint32" export * from "./scint64" export * from "./screquestid" export * from "./scstring" export * from "./scuint8" export * from "./scuint16" export * from "./scuint32" export * from "./scuint64"
24
38
0.668333
fe66a8159fcd4d87e3c401afa5b6cd3e2b9edd99
514
h
C
GYEasyForm/Classes/Rows/GYSingleImageRow.h
zhugezhaofang/GYEasyForm
dbe27d11047c26f56acfd69dc19aa0165d1eb128
[ "MIT" ]
16
2018-12-28T09:20:32.000Z
2019-11-28T04:05:44.000Z
GYEasyForm/Classes/Rows/GYSingleImageRow.h
gaoyuexit/GYEasyForm
dbe27d11047c26f56acfd69dc19aa0165d1eb128
[ "MIT" ]
1
2019-01-28T10:00:49.000Z
2019-01-28T10:14:27.000Z
GYEasyForm/Classes/Rows/GYSingleImageRow.h
gaoyuexit/GYEasyForm
dbe27d11047c26f56acfd69dc19aa0165d1eb128
[ "MIT" ]
null
null
null
// // GYSingleImageRow.h // ZGSellHouseModule // // Created by apple on 2018/12/18. // #import "GYEasyRow.h" #import "GYEasyCell.h" NS_ASSUME_NONNULL_BEGIN @interface GYSingleImageCell : GYEasyCell @property (nonatomic, strong) UIImageView *iconView; @end @interface GYSingleImageRow : GYEasyRow <GYSingleImageCell *> @property (nonatomic, assign) UIEdgeInsets iconInsets; @property (nonatomic, strong) UIImage *icon; @property (nonatomic, assign) UIViewContentMode contentMode; @end NS_ASSUME_NONNULL_END
21.416667
61
0.77821
c3aa011799e9c8113119a1c474e56f523ae43f2d
540
go
Go
src/initialize/cache.go
lzw5399/tumbleweed
5cec804c1ba54d9caca95f157147720df95f305f
[ "MIT" ]
22
2021-03-31T05:32:11.000Z
2022-02-28T05:57:19.000Z
src/initialize/cache.go
lzw5399/gwfe
5cec804c1ba54d9caca95f157147720df95f305f
[ "MIT" ]
1
2021-08-20T15:33:38.000Z
2021-08-23T01:06:58.000Z
src/initialize/cache.go
lzw5399/tumbleweed
5cec804c1ba54d9caca95f157147720df95f305f
[ "MIT" ]
6
2021-03-31T05:40:05.000Z
2022-01-06T16:11:52.000Z
/** * @Author: lzw5399 * @Date: 2021/3/20 15:44 * @Desc: 初始化内存缓存 并 加载租户信息到缓存 */ package initialize import ( "log" "github.com/patrickmn/go-cache" "workflow/src/global" "workflow/src/model" ) func setupCache() { c := cache.New(-1, -1) global.BankCache = c var tenants []model.Tenant err := global.BankDb. Model(&model.Tenant{}). Find(&tenants). Error if err != nil { log.Fatalf("初始化租户失败, err:%s", err.Error()) } c.SetDefault("tenants", tenants) log.Printf("-------租户列表缓存成功,当前租户个数:%d--------\n", len(tenants)) }
16.363636
64
0.625926
746b1f36e847e583aa754899c618f3f5a388f505
853
c
C
src/window.c
turboMaCk/asteroids
e67526a3f72e9a05e932574319b0ce1a8b915a7c
[ "Unlicense" ]
1
2020-04-05T14:05:07.000Z
2020-04-05T14:05:07.000Z
src/window.c
turboMaCk/asteroids
e67526a3f72e9a05e932574319b0ce1a8b915a7c
[ "Unlicense" ]
null
null
null
src/window.c
turboMaCk/asteroids
e67526a3f72e9a05e932574319b0ce1a8b915a7c
[ "Unlicense" ]
null
null
null
#include <SDL2/SDL.h> #include "window.h" Window Window_init(SDL_Window* win) { int width, height; SDL_GetWindowSize(win, &width, &height); Window res = {width, height, width/WIN_WIDTH, win}; return res; } void Window_event_handler(Window* win, SDL_Event* event, SDL_Renderer* ren) { // Event type must be window if (event->type != SDL_WINDOWEVENT) return; if (event->window.event == SDL_WINDOWEVENT_SIZE_CHANGED) { win->width = event->window.data1; win->height = event->window.data2; // we should use ints here! int scale = win->width / 1200; // scale can be at least 1 scale = fmax(1, scale); win->height /= scale; win->width /= scale; win->scale = scale; // Error when scaling if (SDL_RenderSetScale(ren, scale, scale)) { SDL_Log("SetScale Error %s", SDL_GetError()); } } }
23.694444
75
0.649472
41e26c2895caf76cccdb01c9bb453fb2043ca216
1,995
h
C
_midynet/include/FastMIDyNet/proposer/movetypes.h
charlesmurphy1/fast-midynet
22071d49077fce9d5f99a4664f36767b27edea64
[ "MIT" ]
null
null
null
_midynet/include/FastMIDyNet/proposer/movetypes.h
charlesmurphy1/fast-midynet
22071d49077fce9d5f99a4664f36767b27edea64
[ "MIT" ]
null
null
null
_midynet/include/FastMIDyNet/proposer/movetypes.h
charlesmurphy1/fast-midynet
22071d49077fce9d5f99a4664f36767b27edea64
[ "MIT" ]
null
null
null
#ifndef FAST_MIDYNET_MOVETYPES_H #define FAST_MIDYNET_MOVETYPES_H #include <vector> #include <iostream> #include "BaseGraph/types.h" #include "FastMIDyNet/types.h" namespace FastMIDyNet { struct GraphMove{ GraphMove(std::vector<BaseGraph::Edge> removedEdges, std::vector<BaseGraph::Edge> addedEdges): removedEdges(removedEdges), addedEdges(addedEdges){ } GraphMove(){ } std::vector<BaseGraph::Edge> removedEdges; std::vector<BaseGraph::Edge> addedEdges; void display() const{ std::cout << "edges removed : { "; for (auto e : removedEdges){ std::cout << "{ " << e.first << ", " << e.second << "}, "; } std::cout << "}\t edges added : { "; for (auto e : addedEdges){ std::cout << "{ " << e.first << ", " << e.second << "}, "; } std::cout << "}" << std::endl; } }; struct BlockMove{ BlockMove(BaseGraph::VertexIndex vertexIdx, BlockIndex prevBlockIdx, BlockIndex nextBlockIdx, int addedBlocks=0): vertexIdx(vertexIdx), prevBlockIdx(prevBlockIdx), nextBlockIdx(nextBlockIdx), addedBlocks(addedBlocks){ } BaseGraph::VertexIndex vertexIdx; BlockIndex prevBlockIdx; BlockIndex nextBlockIdx; int addedBlocks; void display()const{ std::cout << "vertex " << vertexIdx << ": " << prevBlockIdx << " -> " << nextBlockIdx << std::endl; } }; struct NestedBlockMove{ NestedBlockMove(std::vector<BlockMove> blockMoves, int addedLayers=0): blockMoves(blockMoves), addedLayers(addedLayers){ } std::vector<BlockMove> blockMoves; int addedLayers; std::vector<BlockMove>::iterator begin() { return blockMoves.begin(); } std::vector<BlockMove>::iterator end() { return blockMoves.end(); } const BlockMove& operator[](size_t layerIdx) const { return blockMoves[layerIdx]; } size_t size() const { return blockMoves.size(); } void display()const{ for(auto m : blockMoves) m.display(); } }; } #endif
30.227273
117
0.638596
56c4dcded21b39d3cd31ec4aec5ec11cca806ab1
732
ts
TypeScript
dist/core/varietal.d.ts
clinfc/m-observer
b2f3e701579b1889b00b9ad3f344795c2699ac89
[ "MIT" ]
null
null
null
dist/core/varietal.d.ts
clinfc/m-observer
b2f3e701579b1889b00b9ad3f344795c2699ac89
[ "MIT" ]
null
null
null
dist/core/varietal.d.ts
clinfc/m-observer
b2f3e701579b1889b00b9ad3f344795c2699ac89
[ "MIT" ]
null
null
null
import { Selecter } from "../util/dom-query"; import { EachCallback } from "../util/data"; export declare function eobserve(target: Selecter, eachcall: EachCallback, option: MutationObserverInit): void; export declare function eobserveAll(target: Selecter, eachcall: EachCallback, filter?: string[]): void; export declare function eattribute(target: Selecter, eachcall: EachCallback, subtree?: boolean): void; export declare function eattributeFilter(target: Selecter, eachcall: EachCallback, filter: string[], subtree?: boolean): void; export declare function echildList(target: Selecter, eachcall: EachCallback, subtree?: boolean): void; export declare function echaracter(target: Selecter, eachcall: EachCallback): void;
81.333333
127
0.780055
9cf27349ec7443d358a132a6a058b53fe0d92e6c
26,163
css
CSS
jikexueyuan/css/index.css
zyzxykf/mission4
a722a96d0e49b5f1a989a45a885a94b957dc6c59
[ "Apache-2.0" ]
null
null
null
jikexueyuan/css/index.css
zyzxykf/mission4
a722a96d0e49b5f1a989a45a885a94b957dc6c59
[ "Apache-2.0" ]
null
null
null
jikexueyuan/css/index.css
zyzxykf/mission4
a722a96d0e49b5f1a989a45a885a94b957dc6c59
[ "Apache-2.0" ]
null
null
null
body { margin: 0; padding: 0; background-color: #f5f5f5; } div, nav, ul, li, i, a{ margin: 0; padding: 0; box-sizing: border-box; vertical-align: middle; } .header ul, .header nav{ margin: 0; padding: 0; text-decoration: none; } .header a { white-space: nowrap; text-decoration: none; padding: 0px; margin: 0px; vertical-align: middle; box-sizing: border-box; font-family: Verdana,"Hiragino Sans GB","Microsoft Yahei",Helvetica,arial,\5b8b\4f53,sans-serif; } .header { height: 60px; border-bottom: 1px solid #ececec; background-color: #fff; } .header .w-1000 { width: 1000px; margin: 0 auto; height: 60px; line-height: 60px; } .header .logo { width: 109px; height: 60px; margin-right: 60px; display: inline-block; float: left; } .header .logo img { margin-top: 10px; } .header nav { height: 60px; display: inline-block; float: left; } .header ul { list-style: none; } .header nav li { height: 60px; margin-right: 50px; font-size: 14px; display: inline-block; cursor: pointer; float: left; position: relative; } .header nav li i { margin-left: 5px; } .arrow-icon { width: 8px; height: 8px; border-top: 1px solid #c1c1c1; border-left: 1px solid #c1c1c1; display: inline-block; transform: rotate(-135deg); margin-left: 5px; margin-bottom: 2px; } .header nav .submenu { width: 280px; display: none; opacity: 0; position: absolute; top: 60px; left: 0px; font-size: 12px; background-color: #fff; color: #666; transition: opacity 1s ease-out; z-index: 10; } .header nav .submenu h3 { margin: 10px 0; padding: 0 0 0 15px; background-color: #fafafa; height: 28px; line-height: 28px; font-weight: 300; font-size: 12px; } .header nav .submenu a { display: block; height: 30px; line-height: 30px; padding: 0 15px; color: #333; } .school-list i { background: url('../img/allicon.png') 0 0 no-repeat; background-size: 64px 64px; width: 14px; height: 14px; display: inline-block; margin-right: 10px; } .school-list .web-icon { background-position: -15px -27px; } .school-list i { margin-left: 5px; } .school-list i.wechat-icon, .school-list i.python-icon, .school-list i.go-icon, .school-list i.ios-icon { background: url('../img/allicon4.png') 0 0 no-repeat; background-size: 16px 128px; } .school-list i.wechat-icon { background-position: -2px -51px; } .school-list i.python-icon { background-position: -2px -2px; } .school-list i.go-icon { background-position: -2px -32px; } .school-list i.android-icon { background-position: -44px -15px; } .school-list i.ios-icon { background-position: -2px -70px; } .header nav li:nth-child(2):hover, .header nav li:nth-child(3):hover, .header nav li:nth-child(4):hover { color: rgb(53, 181, 88); } .header nav li:nth-child(2):hover .arrow-icon, .header nav li:nth-child(3):hover .arrow-icon, .header nav li:nth-child(4):hover .arrow-icon { border-top: 1px solid rgb(53, 181, 88); border-left: 1px solid rgb(53, 181, 88); transform: rotate(45deg); transform-origin: 45% 40%; animation: arrow-icon-rotate 1s 0s ease-in; } .header nav li:nth-child(2):hover .school-list, .header nav li:nth-child(3):hover .vip-lesson, .header nav li:nth-child(4):hover .vip-lesson, .header .icon-box .app-icon:hover .submenu, .header .icon-box .loginlist:hover .submenu { display: block; opacity: 1; animation:school_list_opacity 1s ease forwards; } @keyframes school_list_opacity { 0%{opacity:0} 100%{opacity:1} } @keyframes arrow-icon-rotate { 0%{ transform: rotate(45deg); } 90%{ transform: rotate(360deg); } 100%{ transform: rotate(405deg); } } .header nav li .school-list a:hover, .header nav li .vip-lesson a:hover { color: rgb(53, 181, 88); background-color: #fafafa; } .header nav .vip-lesson { padding: 10px 0; } .header nav .vip-lesson a, .header nav .vip-lesson1 a { display: block; height: 40px; line-height: 40px; color: #666; } .vip-lesson i { background: url("../img/allicon.png") 0 0 no-repeat; background-size: 64px 64px; width: 14px; height: 14px; display: inline-block; margin-right: 10px!important; } .vip-lesson .kck-icon { background-position: 0px -12px; } .header nav .vip-lesson a span { float: right; color: #bbb; } .vip-lesson .zyljt-icon { background-position: -45px 0px; } .vip-lesson .zstxt-icon { background-position: -30px -12px; } .vip-lesson .xlkc-icon { background: url("../img/xlkc2.png") 0 0 no-repeat; background-size: 12px 12px; background-position: 0 0; } .vip-lesson .kcbq-icon { background-position: -15px -13px; } .vip-lesson .vip-icon { background-position: -16px 0px; } .vip-lesson .jswd-icon { background-position: 0px -27px; } .vip-lesson .wiki-icon { background-position: -30px -27px; } .vip-lesson .sq-icon { background-position: 0px 2px; } .vip-lesson .zyxz-icon { background-position: -30px 0px; } .header .icon-box { display: inline-block; height: 60px; margin-right: 10px; float: right; width: 200px; text-align: right; } .header .icon-box span { display: inline-block; height: 60px; width: 17px; margin-left: 25px; cursor: pointer; } .header .icon-box .search-icon { background: url("../img/search-icon.png") 0 0 no-repeat; background-size: 17px; background-position: 0px; } .header .icon-box .search-icon:hover { background: url("../img/search-icon2.png") 0 0 no-repeat; background-size: 17px; background-position: 0px; } .header .icon-box .app-icon { background: url("../img/app-icon.png") 0 0 no-repeat; background-size: 17px; background-position: 0px; } .header .icon-box .app-icon:hover { background: url("../img/app-icon2.png") 0 0 no-repeat; background-size: 17px; background-position: 0px; } .header .icon-box .relative { position: relative; } .logolist .submenu { display: none; opaction: 0; padding: 10px 0; position: absolute; width: 120px; height: 40px; top: 60px; right: -50px; background-color: #fff; } .logolist .submenu i { position: absolute; top: -8px; width: 15px; height: 15px; border-left: 1px solid #ececec; border-top: 1px solid #ececec; transform: rotate(45deg); background-color: #fff; } .logolist .submenu .top-icon { left: 53px; } .logolist .submenu img { position: absolute; top: 0; left: 0; } .header .icon-box .noti-icon { background: url("../img/icon-msg.png") 0 0 no-repeat; background-size: 15px 17px; background-position: 0px; } .header .icon-box .noti-icon:hover { background: url("../img/msg-hover.png") 0 0 no-repeat; background-size: 15px 17px; background-position: 0px; } .header .icon-box .login-icon { background: url("../img/login-icon.png") 0 0 no-repeat; background-size: 17px; background-position: 0px; } .loginlist .submenu { display: none; opacity: 0; position: absolute; top: 60px; right: -10px; width: 120px; background-color: #fff; margin: 0; padding: 10px 0; box-shadow: 0px 0px 10px rgba(0, 0, 0, .2); } .loginlist .submenu .top-icon { position: absolute; right: 10px; top: -8px; width: 15px; height: 15px; border-left: 1px solid #ececec; border-top: 1px solid #ececec; transform: rotate(45deg); background-color: #fff; } .loginlist .submenu dd { margin: 0px; padding-left: 10px; font-size: 12px; line-height: 35px; vertical-align: middle; text-align: left; } .loginlist .submenu dd a { color: #666; height: 35px; line-height: 35px; } .loginlist .submenu dd .reg-btn { width: 45%; display: inline-block; text-align: center; } .loginlist .submenu dd .login-btn { width: 45px; display: inline-block; text-align: center; } .header .loginlist dd>a>i { background: url("../img/allicon2.png") 0 0 no-repeat; background-size: 64px 64px; width: 12px; height: 12px; margin-right: 10px; display: inline-block; } .loginlist .submenu dd .xxzx-icon { background-position: -16px -15px; } .loginlist .submenu dd .grzy-icon { background-position: -45px -1px; } .loginlist .submenu dd .zhsz-icon { background-position: -30px -1px; } .pager { display: block; } .pager .w-1000 { width: 1000px; margin: 20px auto 40px auto; zoom: 1; display: table; } .pager .jk-banner { width: 750px; height: 330px; margin-right: 10px; background-color: #f5f5f5; overflow: hidden; float: left; } .pager .jk-banner .banner-container { width: 100%; height: 100%; position: relative; cursor: pointer; } .pager .jk-banner .banner-container a { display: block; background: url("../img/5929418d43018.jpg") center center no-repeat rgb(245, 245, 245); width: 750px; height: 330px; } .pager .jk-login { width: 240px; height: 160px; float: left; border: 1px solid #e9e9e9; background-color: #fff; display: block; box-sizing: border-box; padding: 26px 29px 24px; } .pager .jk-login .userInfo { height: 57px; width: 180px; } .userInfo .userImg { width: 57px; height: 57px; margin-right: 15px; float: left; } .userInfo .userName { float: left; font-size: 12px; color: #555; line-height: 16px; height: 16px; width: 108px; margin-top: 8px; overflow: hidden; white-space: normal; text-overflow: ellipsis; } .userInfo .userStatus { float: left; font-size: 12px; color: #555; line-height: 16px; height: 16px; margin-top: 10px; margin-bottom: 0px; width: 108px; } .jk-login .loginOn, .jk-login .registerNow { display: inline-block; width: 85px; height: 32px; border: 1px solid #35b558; border-radius: 2px; color: #35b558; line-height: 30px; text-align: center; text-decoration: none; font-size: 14px; margin-top: 20px; transition: background-color .8s; float: left; } .jk-login .loginOn { margin-right: 10px; } .jk-login .loginOn:hover, .jk-login .registerNow:hover { background-color: #35b558; color: #fff; } .jk-huodong { display: block; width: 240px; height: 160px; float: left; margin-top: 10px; } .jk-jiuye { display: block; width: 100%; margin-top: 40px; padding-right: 240px; box-sizing: border-box; position: relative; float: left; } .jk-jiuye h2, .jk-sku h2, .jk-offline h2, .jk-vip h2, .jk-story h2, .jk-parter h2 { font-size: 18px; color: #555; line-height: 18px; height: 18px; margin: 0 0 22px 0; font-weight: 400; } .jk-jiuye .jk-ban { display: block; width: 370px; height: 75px; margin: 0 10px 10px 0; padding-left: 120px; text-decoration: none; float: left; transition: box-shadow .2s linear; } .jk-jiuye .web { background: url("../img/jiuye-web03_b78e3f6.png") no-repeat center center / 370px 75px; } .jk-jiuye .jk-ban p { margin: 0; padding: 0; height: 75px; font-size: 15px; line-height: 75px; text-align: center; font-family: Verdana,"Lantinghei SC","Hiragino Sans GB","Microsoft Yahei",Helvetica,arial,\5b8b\4f53,sans-serif; color: #fff; } .jk-jiuye .php { background: url("../img/jiuye-php03_8cdf521.png") no-repeat center center / 370px 75px; } .jk-jiuye .mr-0 { margin-right: 0px; } .jk-jiuye .java-web { background: url("../img/jiuye-java03_302dbd8.png") no-repeat center center / 370px 75px; } .jk-jiuye .mb-0 { margin-bottom: 0px; } .jk-jiuye .ui-ux { background: url("../img/jiuye-ux03_45d7813.png") no-repeat center center / 370px 75px; } .jk-jiuye .jk-ban:hover { box-shadow: 0 4px 8px rgba(0, 0, 0, .4); } .jk-sku { display: block; width: 1000px; margin: 20px auto 40px auto; box-sizing: border-box; } ul, li, p { margin: 0; padding: 0; font-family: Verdana,"Lantinghei SC","Hiragino Sans GB","Microsoft Yahei",Helvetica,arial,\5b8b\4f53,sans-serif; box-sizing: border-box; } .jk-sku ul { height: 270px; width: 100%; list-style: none; } .jk-sku ul li { height: 270px; width: 235px; margin-right: 20px; border: 1px solid #e9e9e9; float: left; } .jk-sku ul li:last-child { margin-right: 0px; } a { text-decoration: none; box-sizing: border-box; } .jk-sku ul li a { display: block; width: 100%; } .jk-sku ul li a img { width: 100%; height: 155px; } .jk-sku ul li a .skuContainer { padding: 14px; height: 113px; position: relative; background-color: #fff; } .jk-sku ul li a .skuContainer .skuTitle { width: 100%; height: 36px; font-size: 12px; line-height: 18px; color: #555; } .jk-sku ul li a .skuContainer .skuInfo { width: 100px; height: 16px; margin-top: 6px; font-size: 12px; line-height: 16px; color: #999; } span { margin: 0; padding: 0; box-sizing: border-box; } .jk-sku ul li a .skuContainer .skuPrice { float: left; font-size: 18px; color: #ff5c00; margin-top: 8px; margin-right: 5px; vertical-align: bottom; } .jk-sku ul li a .skuContainer .skuPrice:before { content: "¥"; font-size: 14px; margin-right: 3px; } .jk-sku ul li a .skuContainer .skuThrought { float: left; font-size: 12px; height: 15px; margin-top: 14px; color: #999; text-decoration: line-through; vertical-align: bottom; } .jk-sku ul li a .skuContainer .skuNum { display: inline-block; font-size: 12px; height: 14px; position: absolute; bottom: 14px; right: 14px; color: #999; } .jk-offline { width: 1000px; margin: 0 auto 40px auto; display: table; } ul { list-style: none; box-sizing: border-box; } .cf { zoom: 1; } .jk-offline ul li { float: right; width: 261px; height: 139px; position: relative; } .jk-offline ul { float: right; } .jk-offline .daniu li { transition: all 0.8s; } .jk-offline ul li a { display: block; width: 100%; height: 100%; color: #fff; font-size: 14px; text-align: center; padding-top: 35px; } .jk-offline .daniu li:nth-child(1), .jk-offline .daniu li:nth-child(5) { background-color: #0276f1; } .jk-offline .daniu li:nth-child(1):hover, .jk-offline .daniu li:nth-child(5):hover { background-color: #0569d3; } .jk-offline ul li a span { display: block; width: 31px; margin: 0 auto; margin-bottom: 15px; } .jk-offline .daniu li:nth-child(1) a span { background: url("../img/daniu-05_b18767c.png") no-repeat center center / 21px 33px; width: 21px; height: 33px; margin-bottom: 9px; } .jk-offline .daniu li:nth-child(2), .jk-offline .daniu li:nth-child(4) { background-color: #3390f3; } .jk-offline .daniu li:nth-child(2):hover, .jk-offline .daniu li:nth-child(4):hover { background-color: #0569d3; } .jk-offline .daniu li:nth-child(2) a span { background: url("../img/daniu-06_5b9a64a.png") no-repeat center center / 28px 30px; width: 30px; height: 28px; } .jk-offline .daniu li:nth-child(3) { background: url("../img/daniu-bg2_5bb23e1.png") no-repeat center center /478px 278px; position: relative; width: 478px; height: 278px; float: left; } .jk-offline .daniu li:nth-child(3):hover { box-shadow: 0 0 0!important; } .jk-offline .daniu li:nth-child(3) a { padding-top: 40px; } .jk-offline ul li:nth-child(3) a .ban { position: absolute; top: 0px; left: 0px; width: 123px; height: 35px; line-height: 35px; text-align: center; } .jk-offline ul .top-title { margin: 15px auto 10px; font-size: 37px; } .jk-offline ul .title { margin: 0 0 12px 0; font-size: 40px; font-weight: 400; } .jk-offline ul .bot-title { font-size: 26px; } .jk-offline .daniu li:nth-child(4) a span { background: url("../img/daniu-07_e81e2d7.png") no-repeat center center / 26px 26px; width: 26px; height: 26px; margin-bottom: 16px; } .jk-offline .daniu li:nth-child(5) a span { background: url("../img/daniu-08_a15e689.png") no-repeat center center / 30px 30px; width: 30px; height: 30px; border-bottom: 12px; } .jk-offline .mogui { margin-top: 20px; } .jk-offline .mogui li:nth-child(1), .jk-offline .mogui li:nth-child(5) { background-color: #eb313e; } .jk-offline .mogui li:nth-child(2), .jk-offline .mogui li:nth-child(4) { background-color: #F64450; } .jk-offline .mogui li:nth-child(1) span { background: url("../img/mogui-02_5e33480.png") 0 0 no-repeat; background-size: 31px 24px; width: 31px; height: 24px; margin-bottom: 20px; } .jk-offline .mogui li:nth-child(2) span { background: url("../img/mogui-01_08e776e.png") no-repeat center center / 31px 28px; width: 31px; height: 28px; margin-bottom: 24px; } .jk-offline .mogui li:nth-child(3) { width: 478px; height: 278px; background: url("../img/mogui-bg_ee9827b.png") no-repeat center center / 478px 278px; float: left; } .jk-offline .mogui li:nth-child(3) a { padding-top: 40px; } .jk-offline .mogui li:nth-child(4) span { background: url("../img/mogui-04_ce7d6bc.png") no-repeat center center / 31px 30px; width: 31px; height: 30px; margin-bottom: 14px; } .jk-offline .mogui li:nth-child(5) span { background: url("../img/mogui-03_e9f2b48.png") no-repeat center center /29px 31px; width: 29px; height: 31px; margin-bottom: 13px; } .jk-college { display: table; width: 1000px; margin: 0 auto 40px; } .jk-college h2 { margin: 0; padding: 0; font-size: 18px; height: 18px; line-height: 18px; margin-bottom: 22px; font-weight: 400; } .jk-college ul li { float: left; background: #ccc; height: 130px; width: 240px; position: relative; margin-left: 10px; margin-bottom: 10px; } .jk-college ul li:nth-child(4), .jk-college ul li:nth-child(5) { margin-left: 10px; margin-bottom: 0; } .jk-college ul .web { width: 500px; height: 270px; background: url("../img/bgweb_054d9d5.jpg") no-repeat center center / 500px 270px; margin: 0; } .jk-college ul li a { display: inline-block; height: 100%; width: 100%; } .jk-college ul li i { display: block; width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; background: #000; opacity: 0; transition: opacity .8s; } .jk-college ul li:hover i { opacity: 0.2; } .jk-college ul li span { display: block; width: 100%; height: 100%; position: absolute; left: 0px; top: 0px; text-align: center; color: #fff; font-size: 14px; padding-top: 88px; } .jk-college ul .web span { padding-top: 180px; font-size: 20px; background: url("../img/cweb_2d70d0b.png") no-repeat center 70px / 55px 84px; } .jk-college ul .python { background: url("../img/bgpython_c21a999.jpg") no-repeat center center / 240px 130px; } .jk-college ul .python span { background: url("../img/cpython_5ed9df4.png") no-repeat center 31px / 36px 36px; } .jk-college ul .go { background: url("../img/bggo_6ac4e5b.jpg") no-repeat center center / 240px 130px; } .jk-college ul .go span { background: url("../img/cgo_e66208d.png") no-repeat center 35px / 36px 29px; } .jk-college ul .ios { background: url("../img/bgios_cadb5b0.jpg") no-repeat center center / 240px 130px; } .jk-college ul .ios span { background: url("../img/cios_dc0ca8e.png") no-repeat center 31px / 32px 36px; } .jk-college ul .wechat { background: url("../img/bgwechat_2357330.jpg") no-repeat center center / 240px 130px; } .jk-college ul .wechat span { background: url("../img/cwechat_624099d.png") no-repeat center 29px / 41px 34px; } .jk-vip { width: 1000px; height: 420px; margin: 0 auto; margin-bottom: 40px; box-sizing: border-box; } .jk-vip ul { width: 1000px; height: 310px; } .jk-vip ul li { height: 150px; width: 158px; box-sizing: border-box; border: 1px solid #e9e9e9; float: left; background-color: #fff; margin-right: 10px; } .jk-vip ul li:nth-child(6), .jk-vip ul li:nth-child(12) { margin-right: 0px; } .jk-vip ul li:nth-child(n+7) { margin-top: 10px; } .jk-vip ul li a { width: 100%; height: 100%; display: block; text-align: center; } .jk-vip ul li a img { margin-top: 25px; width: 55px; height: 55px; } .jk-vip ul li a p { height: 22px; line-height: 22px; font-size: 12px; color: #555; } .jk-vip ul li a span { height: 22px; line-height: 22px; font-size: 14px; color: #35b558; display: block; } .jk-vip .vip-all { display: block; width: 120px; height: 32px; box-sizing: border-box; border: 1px solid #35b558; border-radius: 2px; line-height: 30px; color: #35b558; font-size: 14px; text-align: center; margin-top: 38px; position: relative; left: 50%; margin-left: -60px; transition: background-color .5s; } .jk-story { width: 1000px; margin: 0 auto; height: 300px; margin-bottom: 40px; box-sizing: border-box; } .jk-story .story-container { width: 100%; height: 260px; position: relative; overflow: hidden; } .jk-partner { width: 1000px; margin: 0 auto; height: 240px; margin-bottom: 40px; box-sizing: border-box; } .jk-partner ul { width: 100%; height: 120px; } .jk-partner ul li { width: 150px; height: 50px; box-sizing: border-box; border: 1px solid #e9e9e9; margin-right: 20px; float: left; background: #fff; transition: box-shadow 0.5s; } .jk-partner ul li:nth-child(6), .jk-partner ul li:nth-child(12) { margin-right: 0px; } .jk-partner ul li:nth-child(n+7) { margin-top: 20px; } .jk-partner ul li:nth-child(1) a { background: url("../img/p_microsoft_82f9a9a.png") no-repeat center center / 125px 27px; } .jk-partner ul li a { display: block; height: 100%; width: 100%; } .jk-partner ul li:hover { border: 1px solid #e1e2e1; box-shadow: 0 2px 6px #ccc; } .jk-partner .more-partner { display: block; height: 32px; width: 120px; border: 1px solid #35b558; border-radius: 2px; line-height: 30px; font-size: 14px; line-height: 30px; color: #35b558; text-align: center; margin-top: 38px; position: relative; left: 50%; margin-left: -60px; transition: background-color 0.5s; } .jk-partner .more-partner:hover, .jk-vip .vip-all:hover { color: #fff; background-color: #35b558; } .footer { min-width: 1000px; border-top: 1px solid #e4e4e4; background-color: #fff; } .footer div, .footer p, .footer dl, .footer dd { padding: 0; margin: 0; box-sizing: border-box; } .mar-t50 { margin-top: 50px; } .footer .jkinfor-block { background-color: #fff; } .footer .jkinfor-block .jkinfor { width: 1000px; position: relative; height: 215px; margin: 0 auto; border-bottom: 1px solid #f5f5f5; padding-left: 224px; padding-top: 25px; } .footer .jkinfor-block .jkinfor .jk-logo { position: absolute; left: 0; top: 25px; display: inline-block; width: 160px; } .footer .jkinfor-block .jkinfor .jk-logo p { margin-top: 20px; font-size: 12px; color: #999; } .footer .jkinfor dl { width: 135px; color: #808080; float: left; } .footer .jkinfor dl dt { font-size: 14px; line-height: 30px; } .footer .jkinfor dl dd { font-size: 12px; line-height: 30px; } .footer .jkinfor dl dd a { color: #999999; } .footer .jkinfor .jk-down { position: absolute; top: 25px; right: 0; width: 175px; text-align: left; } .footer .jkinfor .jk-down p { font-size: 14px; margin-bottom: 20px; color: #808080; } .footer .jkinfor .jk-down .downCon { display: inline-block; width: 140px; height: 30px; border: 1px solid #eeeeee; margin-bottom: 10px; font-size: 13px; line-height: 30px; color: #808080; padding-left: 40px; cursor: pointer; position: relative; } .footer .jkinfor .jk-down .down-ios { background: url("../img/icon-down-ios.png") no-repeat 0 0 / 30px 30px; } .footer .jkinfor .jk-down .down-android { background: url("../img/icon-down-and.png") no-repeat 0 0 / 30px 30px;; } .footer .jkinfor .jk-down .downCon img { position: absolute; left: 12px; top: -157px; display: none; } .footer .jkinfor .jk-down .downCon:hover img { display: block; } .footer .copyright { width: 1000px; margin: 0 auto; color: #999; font-size: 12px; text-align: center; padding: 15px 0; } .footer .copyright strong { font-weight: 400; padding: 0; margin: 0; box-sizing: border-box; } .footer .copyright a { color: #999; vertical-align: top; } a, a:link { border: 0 none; } .footer .copyright .down-wechat { display: block; float: right; width: 18px; height: 15px; background: url("../img/icon-down-wechat.png") no-repeat 0 0 / 18px 15px; } .footer .copyright .down-weibo { float: right; width: 20px; height: 15px; background: url("../img/icon-down-sina.png") no-repeat 0 0 / 20px 15px; margin-right: 10px; } .footer .copyright .szfw { display: block; margin: 15px auto 0; background: url("../img/cert.png") no-repeat center 0 / 57px 20px; height: 20px; } .gotop { position: fixed; left: 50%; bottom: 50px; margin-left: 510px; width: 34px; height: 103px; text-align: center; z-index: 100; } .gotop .top { height: 34px; width: 34px; background: url("../img/gotop.jpg") no-repeat 0 0; background-size: 34px 103px; } .gotop .top:hover { background: url("../img/gotop2.jpg") no-repeat 0 0; background-size: 34px 103px; } .gotop .jk-app { position: relative; display: block; height: 35px; width: 34px; background: #f7f7f7 url("../img/phone-1.png") no-repeat center center / 12px 24px; } .gotop .jk-app:hover { background: #f7f7f7 url("../img/phone-2.png") no-repeat center center / 12px 24px; } .gotop .jk-app .appewm { position: absolute; left: -126px; top: -70px; width: 126px; height: 159px; background: url("../img/appewm.png") no-repeat 0 0 / 126px 159px; display: none; } .gotop .jk-app:hover .appewm { display: block; }
18.621352
232
0.637618
27fd17312166d1ebb3e73760d291c760fdd4f9ee
1,719
css
CSS
public/css/all_home.css
NaingHtet1997/firstTest
839498a3211fac20d5db481db441952a23c59012
[ "MIT" ]
1
2020-03-04T04:03:22.000Z
2020-03-04T04:03:22.000Z
public/css/all_home.css
NaingHtet1997/firstTest
839498a3211fac20d5db481db441952a23c59012
[ "MIT" ]
null
null
null
public/css/all_home.css
NaingHtet1997/firstTest
839498a3211fac20d5db481db441952a23c59012
[ "MIT" ]
null
null
null
#myModal{ position: relative; width: 50%; background: #fff; padding: 50px 15px; } .card-body{ background-color: #fff; padding: 20px !important; } label{ margin-top: 5px; } .saleItem{ margin: 25px 0px 0px 0px; } .all_total{ margin-top: 10px; } .content{ margin-left: 275px !important; } .form-horizontal{ padding: 0px 25px; } #invoiceform select.form-control{ height: 30px; } #invoiceform .form-group label{ text-align: left; } .content{ margin-left: 0px !important; } .datepicker.datepicker-dropdown.dropdown-menu.datepicker-orient-left.datepicker-orient-top{ background: #fff !important; } select{ min-width: 150px; } .btn-primary, a.btn-primary, a:visited.btn-primary a:link.btn-primary{ background-color:#07773b; border-color: #07773b; } .btn-primary:hover, a.btn-primary:hover, a:visited.btn-primary a:link.btn-primary:hover{ background-color:#099e4e !important; border-color: #099e4e !important; } .tab-student ul.student_form{ background-color: #fff; padding-top: 20px; margin-bottom: 15px; border-radius: 4px; } body.compact-menu .sidebar.sidebar-left .sidebar-content .main-menu .nav.metismenu>li.active>a{ background-color: #07773b !important; border-left: solid 3px #07773b; } .btn-primary:active, a.btn-primary:active, a:visited.btn-primary a:link.btn-primary:active{ background-color: #07773b !important; border-color: #07773b !important; } input[type="file"] { z-index: -1; position: absolute; opacity: 0; } input:focus + label { outline: 2px solid; } #profile label{ background: #07773b; border-color: #07773b; padding: 10px; color: #fff; border-radius: 10px; cursor: pointer; }
18.483871
95
0.688191
ee47c31f00043e39cbcc8341610596dd40861c29
1,629
swift
Swift
NHS-COVID-19/Core/Sources/Domain/SelfDiagnosis/SelfDiagnosisManager.swift
NicholasG04/covid-19-app-ios-ag-public
afd44bc18d6b90865a03d9e171370eeea543c955
[ "MIT" ]
null
null
null
NHS-COVID-19/Core/Sources/Domain/SelfDiagnosis/SelfDiagnosisManager.swift
NicholasG04/covid-19-app-ios-ag-public
afd44bc18d6b90865a03d9e171370eeea543c955
[ "MIT" ]
null
null
null
NHS-COVID-19/Core/Sources/Domain/SelfDiagnosis/SelfDiagnosisManager.swift
NicholasG04/covid-19-app-ios-ag-public
afd44bc18d6b90865a03d9e171370eeea543c955
[ "MIT" ]
null
null
null
// // Copyright © 2020 NHSX. All rights reserved. // import Combine import Common import Foundation public class SelfDiagnosisManager { private let httpClient: HTTPClient private let calculateIsolationState: (GregorianDay?) -> IsolationState public var threshold: Double? init(httpClient: HTTPClient, calculateIsolationState: @escaping (GregorianDay?) -> IsolationState) { self.httpClient = httpClient self.calculateIsolationState = calculateIsolationState } public func fetchQuestionnaire() -> AnyPublisher<SymptomsQuestionnaire, NetworkRequestError> { httpClient.fetch(SymptomsQuestionnaireEndpoint()) } public func evaluateSymptoms(symptoms: [(Symptom, Bool)], onsetDay: GregorianDay?, threshold: Double) -> IsolationState { let result = _evaluateSymptoms(symptoms: symptoms, onsetDay: onsetDay, threshold: threshold) switch result { case .noNeedToIsolate: Metrics.signpost(.completedQuestionnaireButDidNotStartIsolation) default: Metrics.signpost(.completedQuestionnaireAndStartedIsolation) } return result } public func _evaluateSymptoms(symptoms: [(Symptom, Bool)], onsetDay: GregorianDay?, threshold: Double) -> IsolationState { let sum = symptoms.lazy .filter { _, isConfirmed in isConfirmed } .map { symptom, _ in symptom.riskWeight } .reduce(0, +) guard sum >= threshold else { return .noNeedToIsolate } return calculateIsolationState(onsetDay) } }
33.244898
126
0.671578
91d329d27348b701629d0f4541adbbb575a39a6e
1,783
kt
Kotlin
app/src/main/java/tool/xfy9326/schedule/ui/dialog/ImportCourseConflictDialog.kt
Winter-is-comingXK/Schedule
63149a2becb26addc670747c3dab709259408d9a
[ "Apache-2.0" ]
3
2021-04-09T09:57:29.000Z
2022-01-21T14:49:17.000Z
app/src/main/java/tool/xfy9326/schedule/ui/dialog/ImportCourseConflictDialog.kt
Winter-is-comingXK/Schedule
63149a2becb26addc670747c3dab709259408d9a
[ "Apache-2.0" ]
4
2022-01-14T10:36:04.000Z
2022-02-20T10:55:58.000Z
app/src/main/java/tool/xfy9326/schedule/ui/dialog/ImportCourseConflictDialog.kt
Winter-is-comingXK/Schedule
63149a2becb26addc670747c3dab709259408d9a
[ "Apache-2.0" ]
1
2022-01-15T04:58:39.000Z
2022-01-15T04:58:39.000Z
package tool.xfy9326.schedule.ui.dialog import android.content.DialogInterface import android.os.Bundle import androidx.appcompat.app.AppCompatDialogFragment import androidx.fragment.app.FragmentManager import androidx.fragment.app.setFragmentResult import androidx.lifecycle.LifecycleOwner import com.google.android.material.dialog.MaterialAlertDialogBuilder import tool.xfy9326.schedule.R class ImportCourseConflictDialog : AppCompatDialogFragment(), DialogInterface.OnClickListener { companion object { private val DIALOG_TAG = ImportCourseConflictDialog::class.java.simpleName fun showDialog(fragmentManager: FragmentManager, value: Bundle? = null) { ImportCourseConflictDialog().apply { arguments = value }.show(fragmentManager, DIALOG_TAG) } fun setOnReadImportCourseConflictListener(fragmentManager: FragmentManager, lifecycleOwner: LifecycleOwner, block: (Bundle?) -> Unit) { fragmentManager.setFragmentResultListener(DIALOG_TAG, lifecycleOwner) { _, bundle -> block(bundle.takeUnless { it.isEmpty }) } } } override fun onCreateDialog(savedInstanceState: Bundle?) = MaterialAlertDialogBuilder(requireContext()).apply { setTitle(R.string.import_course_has_conflict) setMessage(R.string.import_course_has_conflict_msg) setPositiveButton(android.R.string.ok, this@ImportCourseConflictDialog) }.create() override fun onStart() { super.onStart() dialog?.apply { setCancelable(false) setCanceledOnTouchOutside(false) } } override fun onClick(dialog: DialogInterface?, which: Int) { setFragmentResult(DIALOG_TAG, arguments ?: Bundle.EMPTY) } }
38.76087
143
0.7235
bd3a662fb349989868d51eb2243cb72e1eac5b28
2,124
rs
Rust
web-server/sgx-wallet-impl/src/schema/types.rs
ntls-io/nautilus-wallet
31a6a534c920d58548a8ac5869b3cb918d3b7c11
[ "Apache-2.0" ]
1
2022-01-30T03:54:55.000Z
2022-01-30T03:54:55.000Z
web-server/sgx-wallet-impl/src/schema/types.rs
ntls-io/nautilus-wallet
31a6a534c920d58548a8ac5869b3cb918d3b7c11
[ "Apache-2.0" ]
32
2021-11-15T08:43:10.000Z
2022-03-20T22:35:56.000Z
web-server/sgx-wallet-impl/src/schema/types.rs
ntls-io/nautilus-wallet
31a6a534c920d58548a8ac5869b3cb918d3b7c11
[ "Apache-2.0" ]
2
2021-11-21T19:19:08.000Z
2021-11-22T09:17:01.000Z
//! Supporting data types. use std::boxed::Box; use std::prelude::v1::String; use ripple_keypairs::{Algorithm, EntropyArray}; use serde::{Deserialize, Serialize}; pub type Bytes = Box<[u8]>; /// Nautilus Wallet ID. pub type WalletId = String; /// A wallet owner's authenticating PIN. pub type WalletPin = String; /// Algorand account seed, as bytes. pub type AlgorandAccountSeedBytes = [u8; 32]; /// Algorand account address, as bytes. pub type AlgorandAddressBytes = [u8; 32]; /// Algorand account address, as base32 with checksum. pub type AlgorandAddressBase32 = String; /// XRPL key type (signing algorithm). /// /// Docs: <https://xrpl.org/cryptographic-keys.html#signing-algorithms> #[derive(Copy, Clone, Eq, PartialEq, Debug)] // core #[derive(Deserialize, Serialize)] // serde #[serde(rename_all = "lowercase")] pub enum XrplKeyType { Secp256k1, Ed25519, } /// Default to `secp256k1`, like the XRP Ledger. impl Default for XrplKeyType { fn default() -> Self { Self::Secp256k1 } } // Convert between our representation and ripple-keypairs. /// Convert from `&Algorithm`, as used by ripple-keypairs. impl From<&Algorithm> for XrplKeyType { fn from(algorithm: &Algorithm) -> Self { match algorithm { Algorithm::Secp256k1 => Self::Secp256k1, Algorithm::Ed25519 => Self::Ed25519, } } } /// Convert to `&'static Algorithm`, as expected by ripple-keypairs. impl From<XrplKeyType> for &'static Algorithm { fn from(key_type: XrplKeyType) -> Self { match key_type { XrplKeyType::Secp256k1 => &Algorithm::Secp256k1, XrplKeyType::Ed25519 => &Algorithm::Ed25519, } } } /// XRP account seed, as bytes. pub type XrplAccountSeedBytes = EntropyArray; /// XRP account address, as base58 with checksum ("Base58Check"). /// /// Docs: <https://xrpl.org/base58-encodings.html> pub type XrplAddressBase58 = String; /// XRP public key, as a hexadecimal string. Used to prepare unsigned transactions. /// /// Docs: <https://xrpl.org/cryptographic-keys.html#public-key> pub type XrplPublicKeyHex = String;
27.230769
83
0.682203
71e66700a5a0d05fcd0ed4aaaf77057973cd19d0
3,215
ts
TypeScript
src/types/AwsCodePipeline.d.ts
quicken/aws-meerkat
7f01f390e0f32619bfa706f5e351a90998d18879
[ "Apache-2.0" ]
null
null
null
src/types/AwsCodePipeline.d.ts
quicken/aws-meerkat
7f01f390e0f32619bfa706f5e351a90998d18879
[ "Apache-2.0" ]
null
null
null
src/types/AwsCodePipeline.d.ts
quicken/aws-meerkat
7f01f390e0f32619bfa706f5e351a90998d18879
[ "Apache-2.0" ]
null
null
null
/** * The CodePipelineEvent describes the properties available by all events that are generated during the life-cycle of * a code pipeline execution. * * https://docs.aws.amazon.com/codepipeline/latest/userguide/detect-state-changes-cloudwatch-events.html */ export type CodePipelineEvent = { detail: { pipeline: string; "execution-id": string; version: 16.0; }; account: string; region: string; source: string; time: string; notificationRuleArn: string; resources: string[]; }; /** * Information generated by an AWS Code Pipeline Execution Event. * https://docs.aws.amazon.com/codepipeline/latest/userguide/detect-state-changes-cloudwatch-events.html */ export type CodePipelineExecutionEvent = CodePipelineEvent & { detailType: "CodePipeline Pipeline Execution State Change"; detail: { "execution-trigger"?: { "trigger-type": "Webhook" | "StartPipelineExecution"; "trigger-detail": string; }; state: "STARTED" | "SUCCEEDED" | "FAILED"; }; additionalAttributes: { sourceActions?: any[]; failedActionCount?: number; failedActions?: CodePipelineFailedAction[]; failedStage?: string; }; }; type CodePipelineFailedAction = { action: string; additionalInformation: string; }; /** * Information generated by an AWS Code Pipeline Stage Event. * https://docs.aws.amazon.com/codepipeline/latest/userguide/detect-state-changes-cloudwatch-events.html */ export type CodePipelineStageEvent = CodePipelineEvent & { detailType: "CodePipeline Stage Execution State Change"; detail: { state: "STARTED" | "SUCCEEDED" | "FAILED"; stage: string; }; additionalAttributes: { sourceActions?: any[]; failedActionCount?: number; failedActions?: CodePipelineFailedAction[]; }; }; /** * Information about an AWS CodePipeline Action Type. * https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_ActionType.html */ type CodePipelineActionType = { owner: "AWS"; provider: string; category: string; version: "1"; }; /** * Describes properties available for a CodePipeline Artificat. * https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_Artifact.html */ type CodePipeLineArtifact = { name: string; s3location: { bucket: string; key: string; }; }; /** * Information generated by an AWS Code Pipeline Action Event. * * https://docs.aws.amazon.com/codepipeline/latest/userguide/detect-state-changes-cloudwatch-events.html */ export type CodePipelineActionEvent = CodePipelineEvent & { detailType: "CodePipeline Action Execution State Change"; detail: { "execution-result"?: { "external-execution-url": string; "external-execution-id": string; "external-execution-summary"?: string; "error-code"?: string; }; "input-artifacts"?: CodePipeLineArtifact[]; "output-artifacts"?: CodePipeLineArtifact[]; state: "STARTED" | "SUCCEEDED" | "FAILED"; action: "Source" | "Build" | string; stage: string; region: string; type: CodePipelineActionType; }; additionalAttributes: { sourceActions?: any[]; additionalInformation?: string; externalEntityLink?: string; customData?: string; }; };
27.715517
117
0.702022
e7177c0d7d23ea51f698586f3300fa7e4ca4c082
687
js
JavaScript
src/redux/actions/mainActions.js
b1tn3r/fuller-stack-boilerplate
0d660a8c6d6f7a088c89994962c0e54579c2a7fc
[ "MIT" ]
2
2018-11-14T10:15:46.000Z
2018-11-14T10:16:16.000Z
src/redux/actions/mainActions.js
b1tn3r/fuller-stack-starter-app
0d660a8c6d6f7a088c89994962c0e54579c2a7fc
[ "MIT" ]
1
2018-12-03T11:38:53.000Z
2018-12-03T11:38:53.000Z
src/redux/actions/mainActions.js
b1tn3r/fuller-stack-starter-app
0d660a8c6d6f7a088c89994962c0e54579c2a7fc
[ "MIT" ]
null
null
null
import api from '../../api'; function sayHello(message) { return { type: "SAY_HELLO", payload: message } } function fetchContests() { return function(dispatch) { dispatch({type: "FETCH_CONTESTS_PENDING"}); api.fetchContests().then(contests => { dispatch({ type: "FETCH_CONTESTS_FULFILLED", payload: { contests: contests, } }); }).catch(err => { dispatch({ type: "FETCH_CONTESTS_REJECTED", payload: err }); }); }; } module.exports = { sayHello, fetchContests, };
19.628571
51
0.47016
f03057b3821748f5e13d3a717a4220542b4bbcb5
594
js
JavaScript
src/main.js
angelorc/Almerico
5b51405a2f7b84106e93b9e629bfe81820a7bc30
[ "MIT" ]
null
null
null
src/main.js
angelorc/Almerico
5b51405a2f7b84106e93b9e629bfe81820a7bc30
[ "MIT" ]
null
null
null
src/main.js
angelorc/Almerico
5b51405a2f7b84106e93b9e629bfe81820a7bc30
[ "MIT" ]
null
null
null
import Vue from "vue"; import App from "./App.vue"; import router from "Setup/router"; import store from "Setup/store"; import i18n from "Setup/i18n"; import directives from "Setup/directives"; import "bootstrap"; import "Setup/navigationGuard"; const result = require('dotenv').config({ debug: process.env.DEBUG }); if (result.error) { throw result.error; } Vue.config.productionTip = false; // Add directive "v-click-outside" on element outside click Vue.directive("click-outside", directives.clickOutside); new Vue({ router, store, i18n, render: h => h(App) }).$mount('#app');
22.846154
70
0.713805
fea16c1ff5bb0f64169733667c7e5ce160107aa1
305
sql
SQL
sample/sample-nullif.sql
nminoru/pg_plan_tree_dot
13eff984a59ccfeb332685e870195885db02a8e3
[ "BSD-3-Clause" ]
9
2016-09-14T06:49:50.000Z
2021-12-17T08:41:56.000Z
sample/sample-nullif.sql
nminoru/pg_plan_tree_dot
13eff984a59ccfeb332685e870195885db02a8e3
[ "BSD-3-Clause" ]
2
2016-09-14T07:03:30.000Z
2017-06-03T11:00:02.000Z
sample/sample-nullif.sql
nminoru/pg_plan_tree_dot
13eff984a59ccfeb332685e870195885db02a8e3
[ "BSD-3-Clause" ]
3
2017-08-02T23:41:04.000Z
2021-12-17T08:58:04.000Z
CREATE EXTENSION IF NOT EXISTS pg_plan_tree_dot; DROP TABLE IF EXISTS test; CREATE TABLE test (id1 INTEGER, id2 INTEGER); INSERT INTO test VALUES (11, 10); -- SELECT NULLIF(id1, id2) FROM test SELECT generate_plan_tree_dot('SELECT NULLIF(id1, id2) FROM test', 'sample-nullif.dot'); DROP TABLE test;
21.785714
88
0.754098
dd474b9c47259ad792fe5a421ffe440573f915fb
5,038
go
Go
syncgroup_test.go
c1982/sgsync
2e86bffc5cabea23b8859abe92c959ecfe18e6c4
[ "MIT" ]
12
2020-01-09T13:05:29.000Z
2021-05-09T13:26:25.000Z
syncgroup_test.go
c1982/sgsync
2e86bffc5cabea23b8859abe92c959ecfe18e6c4
[ "MIT" ]
null
null
null
syncgroup_test.go
c1982/sgsync
2e86bffc5cabea23b8859abe92c959ecfe18e6c4
[ "MIT" ]
null
null
null
package main import ( "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" ) var sourceGroup = []*ec2.SecurityGroup{ (&ec2.SecurityGroup{ Description: aws.String("source"), GroupId: aws.String("gs-001"), GroupName: aws.String("source group"), OwnerId: aws.String("owner"), VpcId: aws.String("wpc"), IpPermissions: []*ec2.IpPermission{ (&ec2.IpPermission{ FromPort: aws.Int64(22), ToPort: aws.Int64(22), IpProtocol: aws.String("tcp"), IpRanges: []*ec2.IpRange{ (&ec2.IpRange{ CidrIp: aws.String("10.5.5.1/32"), }), }, }), }, IpPermissionsEgress: []*ec2.IpPermission{ (&ec2.IpPermission{ IpProtocol: aws.String("-1"), IpRanges: []*ec2.IpRange{ (&ec2.IpRange{ CidrIp: aws.String("0.0.0.0/0"), }), }, }), (&ec2.IpPermission{ IpProtocol: aws.String("-1"), IpRanges: []*ec2.IpRange{ (&ec2.IpRange{ CidrIp: aws.String("5.5.5.2/32"), }), }, }), }, }), } var destinations = []*ec2.SecurityGroup{ (&ec2.SecurityGroup{ Description: aws.String("destination 2"), GroupId: aws.String("gs-002"), GroupName: aws.String("destination group 2"), OwnerId: aws.String("owner-id"), VpcId: aws.String("vpc-id"), IpPermissions: []*ec2.IpPermission{ (&ec2.IpPermission{ FromPort: aws.Int64(22), ToPort: aws.Int64(22), IpProtocol: aws.String("tcp"), IpRanges: []*ec2.IpRange{ (&ec2.IpRange{ CidrIp: aws.String("10.5.5.1/32"), }), }, }), (&ec2.IpPermission{ FromPort: aws.Int64(22), ToPort: aws.Int64(22), IpProtocol: aws.String("tcp"), IpRanges: []*ec2.IpRange{ (&ec2.IpRange{ CidrIp: aws.String("4.2.2.1/32"), }), }, }), }, IpPermissionsEgress: []*ec2.IpPermission{ (&ec2.IpPermission{ FromPort: aws.Int64(53), ToPort: aws.Int64(53), IpProtocol: aws.String("udp"), IpRanges: []*ec2.IpRange{ (&ec2.IpRange{ CidrIp: aws.String("8.8.8.8/32"), }), }, }), }, }), (&ec2.SecurityGroup{ Description: aws.String("destination 3"), GroupId: aws.String("gs-003"), GroupName: aws.String("destination group 3"), OwnerId: aws.String("owner-id"), VpcId: aws.String("vpc-id"), IpPermissions: []*ec2.IpPermission{ (&ec2.IpPermission{ FromPort: aws.Int64(22), ToPort: aws.Int64(22), IpProtocol: aws.String("tcp"), IpRanges: []*ec2.IpRange{ (&ec2.IpRange{ CidrIp: aws.String("8.8.8.8/32"), }), }, }), }, }), (&ec2.SecurityGroup{ Description: aws.String("destination 4"), GroupId: aws.String("gs-004"), GroupName: aws.String("destination group 4"), OwnerId: aws.String("owner-id"), VpcId: aws.String("vpc-id"), IpPermissions: []*ec2.IpPermission{ (&ec2.IpPermission{ FromPort: aws.Int64(8080), ToPort: aws.Int64(8080), IpProtocol: aws.String("tcp"), IpRanges: []*ec2.IpRange{ (&ec2.IpRange{ CidrIp: aws.String("0.0.0.0/0"), }), }, }), }, IpPermissionsEgress: []*ec2.IpPermission{ (&ec2.IpPermission{ IpProtocol: aws.String("-1"), IpRanges: []*ec2.IpRange{ (&ec2.IpRange{ CidrIp: aws.String("0.0.0.0/0"), }), }, }), (&ec2.IpPermission{ FromPort: aws.Int64(443), ToPort: aws.Int64(443), IpProtocol: aws.String("tcp"), IpRanges: []*ec2.IpRange{ (&ec2.IpRange{ CidrIp: aws.String("0.0.0.0/0"), }), }, }), }, }), } var dstengress = []*ec2.SecurityGroup{ (&ec2.SecurityGroup{ Description: aws.String("destination 4"), GroupId: aws.String("gs-004"), GroupName: aws.String("destination group 4"), OwnerId: aws.String("owner-id"), VpcId: aws.String("vpc-id"), IpPermissionsEgress: []*ec2.IpPermission{ (&ec2.IpPermission{ IpProtocol: aws.String("-1"), IpRanges: []*ec2.IpRange{ (&ec2.IpRange{ CidrIp: aws.String("0.0.0.0/0"), }), }, }), }, }), } func Test_WillbeAddedIngress(t *testing.T) { s := NewSyncGroup(sourceGroup[0], destinations) ingress := s.willbeAddedIngress() if len(ingress) != 2 { t.Errorf("ingress rules cannot prepare. got: %d, want: %d", len(ingress), 2) } } func Test_WillbeAddedEgress(t *testing.T) { s := NewSyncGroup(sourceGroup[0], dstengress) egress := s.willbeAddedEgress() if len(egress) != 1 { t.Errorf("egress value not expected got: %d, want: %d", len(egress), 1) } } func Test_WillBeDeleteIngress(t *testing.T) { s := NewSyncGroup(sourceGroup[0], destinations) deleteds := s.willbeDeleteIngress() if len(deleteds) != 3 { t.Errorf("deleted ingress value not expected got: %d, want: %d", len(deleteds), 3) } } func Test_WillBeDeleteEgress(t *testing.T) { s := NewSyncGroup(sourceGroup[0], destinations) deleteds := s.willbeDeleteEgress() if len(deleteds) != 2 { t.Errorf("deleted egress value not expected got: %d, want: %d", len(deleteds), 2) } }
23.876777
84
0.589718
136e5910e6b1fde97d89c7e5df78bc6bf3788b2a
11,507
c
C
kernel/drivers/dual_ccci/ccci_fs_main.c
touxiong88/92_mediatek
5e96a7bb778fd9d9b335825584664e0c8b5ff2c7
[ "Apache-2.0" ]
1
2022-01-07T01:53:19.000Z
2022-01-07T01:53:19.000Z
kernel/drivers/dual_ccci/ccci_fs_main.c
touxiong88/92_mediatek
5e96a7bb778fd9d9b335825584664e0c8b5ff2c7
[ "Apache-2.0" ]
null
null
null
kernel/drivers/dual_ccci/ccci_fs_main.c
touxiong88/92_mediatek
5e96a7bb778fd9d9b335825584664e0c8b5ff2c7
[ "Apache-2.0" ]
1
2020-02-28T02:48:42.000Z
2020-02-28T02:48:42.000Z
/***************************************************************************** * * Filename: * --------- * ccci_fs.c * * Project: * -------- * ALPS * * Description: * ------------ * MT65XX CCCI FS Proxy Driver * ****************************************************************************/ #include <linux/sched.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/device.h> #include <linux/cdev.h> #include <linux/spinlock.h> #include <linux/wakelock.h> #include <linux/interrupt.h> #include <linux/delay.h> #include <linux/wait.h> #include <linux/fs.h> #include <linux/uaccess.h> #include <linux/platform_device.h> #include <linux/dma-mapping.h> #include <asm/dma-mapping.h> #include <ccci.h> #define CCCI_FS_DEVNAME "ccci_fs" extern unsigned long long lg_ch_tx_debug_enable[]; extern unsigned long long lg_ch_rx_debug_enable[]; //enable fs_tx or fs_rx log unsigned int fs_tx_debug_enable[MAX_MD_NUM]; unsigned int fs_rx_debug_enable[MAX_MD_NUM]; typedef struct _fs_ctl_block { unsigned int fs_md_id; spinlock_t fs_spinlock; dev_t fs_dev_num; struct cdev fs_cdev; fs_stream_buffer_t *fs_buffers; int fs_buffers_phys_addr; struct kfifo fs_fifo; int reset_handle; wait_queue_head_t fs_waitq; struct wake_lock fs_wake_lock; char fs_wakelock_name[16]; int fs_smem_size; }fs_ctl_block_t; static fs_ctl_block_t *fs_ctl_block[MAX_MD_NUM]; // will be called when modem sends us something. // we will then copy it to the tty's buffer. // this is essentially the "read" fops. static void ccci_fs_callback(void *private) { unsigned long flag; logic_channel_info_t *ch_info = (logic_channel_info_t*)private; ccci_msg_t msg; fs_ctl_block_t *ctl_b = (fs_ctl_block_t *)ch_info->m_owner; spin_lock_irqsave(&ctl_b->fs_spinlock,flag); while(get_logic_ch_data(ch_info, &msg)){ if (msg.channel == CCCI_FS_RX) { if(fs_rx_debug_enable[ctl_b->fs_md_id]){ CCCI_DBG_MSG(ctl_b->fs_md_id, "fs ", "fs_callback: %08X %08X %08X\n", msg.data0, msg.data1, msg.reserved); } if (kfifo_in(&ctl_b->fs_fifo, (unsigned char *) &msg.reserved, sizeof(msg.reserved)) == sizeof(msg.reserved)) { wake_up_interruptible(&ctl_b->fs_waitq); wake_lock_timeout(&ctl_b->fs_wake_lock, HZ/2); } else { CCCI_DBG_MSG(ctl_b->fs_md_id, "fs ", "[Error]Unable to put new request into fifo\n"); } } } spin_unlock_irqrestore(&ctl_b->fs_spinlock,flag); } static int ccci_fs_get_index(int md_id) { int ret; unsigned long flag; fs_ctl_block_t *ctl_b; if(unlikely(fs_ctl_block[md_id] == NULL)) { CCCI_MSG_INF(md_id, "fs ", "fs_get_index: fata error, fs_ctl_b is NULL\n"); return -EPERM; } ctl_b = fs_ctl_block[md_id]; CCCI_FS_MSG(md_id, "get_fs_index++\n"); if (wait_event_interruptible(ctl_b->fs_waitq, kfifo_len(&ctl_b->fs_fifo) != 0) != 0) { if(fs_rx_debug_enable[md_id]) CCCI_MSG_INF(md_id, "fs ", "fs_get_index: Interrupted by syscall.signal_pend\n"); return -ERESTARTSYS; } spin_lock_irqsave(&ctl_b->fs_spinlock,flag); if (kfifo_out(&ctl_b->fs_fifo, (unsigned char *) &ret, sizeof(int)) != sizeof(int)) { spin_unlock_irqrestore(&ctl_b->fs_spinlock,flag); CCCI_MSG_INF(md_id, "fs ", "get fs index fail from fifo\n"); return -EFAULT; } spin_unlock_irqrestore(&ctl_b->fs_spinlock,flag); if(fs_rx_debug_enable[md_id]) CCCI_MSG_INF(md_id, "fs ", "fs_index=%d \n", ret); CCCI_FS_MSG(md_id, "get_fs_index--\n"); return ret; } static int ccci_fs_send(int md_id, unsigned long arg) { void __user *argp; ccci_msg_t msg; fs_stream_msg_t message; int ret = 0; int xmit_retry = 0; fs_ctl_block_t *ctl_b; CCCI_FS_MSG(md_id, "ccci_fs_send++\n"); if(unlikely(fs_ctl_block[md_id] == NULL)) { CCCI_MSG_INF(md_id, "fs ", "fs_get_index: fatal error, fs_ctl_b is NULL\n"); return -EPERM; } ctl_b = fs_ctl_block[md_id]; argp = (void __user *) arg; if (copy_from_user((void *) &message, argp, sizeof(fs_stream_msg_t))) { CCCI_MSG_INF(md_id, "fs ", "ccci_fs_send: copy_from_user fail!\n"); return -EFAULT; } msg.data0 = ctl_b->fs_buffers_phys_addr - md_2_ap_phy_addr_offset_fixed + (sizeof(fs_stream_buffer_t) * message.index); msg.data1 = message.length + 4; msg.channel = CCCI_FS_TX; msg.reserved = message.index; if(fs_tx_debug_enable[md_id]) { CCCI_MSG_INF(md_id, "fs ", "fs_send: %08X %08X %08X\n", msg.data0, msg.data1, msg.reserved); } mb(); do{ ret = ccci_message_send(md_id, &msg, 1); if(ret == sizeof(ccci_msg_t)) break; if(ret == -CCCI_ERR_CCIF_NO_PHYSICAL_CHANNEL) { xmit_retry++; msleep(10); if( (xmit_retry&0xF) == 0) { CCCI_MSG_INF(md_id, "fs ", "fs_chr has retried %d times\n", xmit_retry); } }else{ break; } }while(1); if(ret != sizeof(ccci_msg_t)) { CCCI_MSG_INF(md_id, "fs ", "ccci_fs_send fail <ret=%d>: %08X, %08X, %08X\n", ret, msg.data0, msg.data1, msg.reserved); return ret; } CCCI_FS_MSG(md_id, "ccci_fs_send--\n"); return 0; } static int ccci_fs_mmap(struct file *file, struct vm_area_struct *vma) { unsigned long off, start, len; fs_ctl_block_t *ctl_b; int md_id; ctl_b =(fs_ctl_block_t *)file->private_data; md_id = ctl_b->fs_md_id; CCCI_FS_MSG(md_id, "mmap++\n"); if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) { CCCI_MSG_INF(md_id, "fs ", "ccci_fs_mmap: vm_pgoff too large\n"); return -EINVAL; } off = vma->vm_pgoff << PAGE_SHIFT; start = (unsigned long) ctl_b->fs_buffers_phys_addr; len = PAGE_ALIGN((start & ~PAGE_MASK) + ctl_b->fs_smem_size); if ((vma->vm_end - vma->vm_start + off) > len) { CCCI_MSG_INF(md_id, "fs ", "ccci_fs_mmap: memory require over ccci_fs_smem size\n"); return -EINVAL; } off += start & PAGE_MASK; vma->vm_pgoff = off >> PAGE_SHIFT; vma->vm_flags |= VM_IO; vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); CCCI_FS_MSG(md_id, "mmap--\n"); return remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, vma->vm_end - vma->vm_start, vma->vm_page_prot); } static long ccci_fs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { int ret; int md_id; fs_ctl_block_t *ctl_b; ctl_b =(fs_ctl_block_t *)file->private_data; md_id = ctl_b->fs_md_id; switch(cmd) { case CCCI_FS_IOCTL_GET_INDEX: ret = ccci_fs_get_index(md_id); break; case CCCI_FS_IOCTL_SEND: ret = ccci_fs_send(md_id, arg); break; default: CCCI_MSG_INF(md_id, "fs ", "ccci_fs_ioctl: [Error]unknown ioctl:%d\n", cmd); ret = -ENOIOCTLCMD; break; } return ret; } static int ccci_fs_open(struct inode *inode, struct file *file) { int md_id; int major; fs_ctl_block_t *ctl_b; major = imajor(inode); md_id = get_md_id_by_dev_major(major); if(md_id < 0) { CCCI_MSG("FS open fail: invalid major id:%d\n", major); return -1; } CCCI_MSG_INF(md_id, "fs ", "FS open by %s\n", current->comm); ctl_b = fs_ctl_block[md_id]; file->private_data=ctl_b; nonseekable_open(inode,file); // modem reset registration. ctl_b->reset_handle = ccci_reset_register(md_id, "CCCI_FS"); ASSERT(ctl_b->reset_handle >= 0); return 0; } static int ccci_fs_release(struct inode *inode, struct file *file) { int md_id; int major; fs_ctl_block_t *ctl_b; unsigned long flag; major = imajor(inode); md_id = get_md_id_by_dev_major(major); if(md_id < 0) { CCCI_MSG("FS release fail: invalid major id:%d\n", major); return -1; } CCCI_MSG_INF(md_id, "fs ", "FS release by %s\n", current->comm); ctl_b = fs_ctl_block[md_id]; memset(ctl_b->fs_buffers, 0, ctl_b->fs_smem_size); ccci_user_ready_to_reset(md_id, ctl_b->reset_handle); // clear kfifo invalid data which may not be processed before close operation spin_lock_irqsave(&ctl_b->fs_spinlock,flag); kfifo_reset(&ctl_b->fs_fifo); spin_unlock_irqrestore(&ctl_b->fs_spinlock,flag); return 0; } static int ccci_fs_start(int md_id) { fs_ctl_block_t *ctl_b; unsigned long flag; if(unlikely(fs_ctl_block[md_id] == NULL)) { CCCI_MSG_INF(md_id, "fs ", "ccci_fs_start: fatal error, fs_ctl_b is NULL\n"); return -CCCI_ERR_FATAL_ERR; } ctl_b = fs_ctl_block[md_id]; if ( 0 != kfifo_alloc(&ctl_b->fs_fifo,sizeof(unsigned) * CCCI_FS_MAX_BUFFERS, GFP_KERNEL)) { CCCI_MSG_INF(md_id, "fs ", "ccci_fs_start: kfifo alloc fail \n"); return -CCCI_ERR_ALLOCATE_MEMORY_FAIL; } // Reset FS KFIFO spin_lock_irqsave(&ctl_b->fs_spinlock,flag); kfifo_reset(&ctl_b->fs_fifo); spin_unlock_irqrestore(&ctl_b->fs_spinlock,flag); // modem related channel registration. ASSERT(ccci_fs_base_req(md_id, (int*)&ctl_b->fs_buffers, &ctl_b->fs_buffers_phys_addr, \ &ctl_b->fs_smem_size) == 0); ASSERT(register_to_logic_ch(md_id, CCCI_FS_RX, ccci_fs_callback, ctl_b) == 0); return 0; } static void ccci_fs_stop(int md_id) { fs_ctl_block_t *ctl_b; if(unlikely(fs_ctl_block[md_id] == NULL)) { CCCI_MSG_INF(md_id, "fs ", "ccci_fs_stop: fatal error, fs_ctl_b is NULL\n"); return; } ctl_b = fs_ctl_block[md_id]; if (ctl_b->fs_buffers != NULL) { kfifo_free(&ctl_b->fs_fifo); ASSERT(un_register_to_logic_ch(md_id, CCCI_FS_RX) == 0); ctl_b->fs_buffers = NULL; ctl_b->fs_buffers_phys_addr = 0; } } static struct file_operations fs_fops = { .owner = THIS_MODULE, .unlocked_ioctl = ccci_fs_ioctl, .open = ccci_fs_open, .mmap = ccci_fs_mmap, .release = ccci_fs_release, }; int __init ccci_fs_init(int md_id) { int ret; int major, minor; fs_ctl_block_t *ctl_b; ret = get_dev_id_by_md_id(md_id, "fs", &major, &minor); if(ret<0) { CCCI_MSG("ccci_fs_init: get md device number failed(%d)\n", ret); return ret; } // Allocate fs ctrl struct memory ctl_b = (fs_ctl_block_t *)kmalloc(sizeof(fs_ctl_block_t), GFP_KERNEL); if(ctl_b == NULL) return -CCCI_ERR_GET_MEM_FAIL; memset(ctl_b, 0, sizeof(fs_ctl_block_t)); fs_ctl_block[md_id] = ctl_b; // Init ctl_b ctl_b->fs_md_id = md_id; spin_lock_init(&ctl_b->fs_spinlock); init_waitqueue_head(&ctl_b->fs_waitq); ctl_b->fs_dev_num = MKDEV(major, minor); snprintf(ctl_b->fs_wakelock_name, sizeof(ctl_b->fs_wakelock_name), "ccci%d_fs", (md_id+1)); wake_lock_init(&ctl_b->fs_wake_lock, WAKE_LOCK_SUSPEND, ctl_b->fs_wakelock_name); ret = register_chrdev_region(ctl_b->fs_dev_num, 1, ctl_b->fs_wakelock_name); if (ret) { CCCI_MSG_INF(md_id, "fs ", "ccci_fs_init: Register char device failed(%d)\n", ret); goto _REG_CHR_REGION_FAIL; } cdev_init(&ctl_b->fs_cdev, &fs_fops); ctl_b->fs_cdev.owner = THIS_MODULE; ctl_b->fs_cdev.ops = &fs_fops; ret = cdev_add(&ctl_b->fs_cdev, ctl_b->fs_dev_num, 1); if (ret) { CCCI_MSG_INF(md_id, "fs ", "cdev_add fail(%d)\n", ret); unregister_chrdev_region(ctl_b->fs_dev_num, 1); goto _REG_CHR_REGION_FAIL; } ret = ccci_fs_start(md_id); if (ret) { CCCI_MSG_INF(md_id, "fs ", "FS initialize fail\n"); goto _CCCI_FS_START_FAIL; } CCCI_FS_MSG(md_id, "Init complete, device major number = %d\n", MAJOR(ctl_b->fs_dev_num)); return 0; _CCCI_FS_START_FAIL: cdev_del(&ctl_b->fs_cdev); unregister_chrdev_region(ctl_b->fs_dev_num, 1); _REG_CHR_REGION_FAIL: kfree(ctl_b); fs_ctl_block[md_id] = NULL; return ret; } void __exit ccci_fs_exit(int md_id) { fs_ctl_block_t *ctl_b = fs_ctl_block[md_id]; if(unlikely(ctl_b == NULL)) { CCCI_MSG_INF(md_id, "fs ", "ccci_fs_exit: fs_ctl_b is NULL\n"); return; } ccci_fs_stop(md_id); cdev_del(&ctl_b->fs_cdev); unregister_chrdev_region(ctl_b->fs_dev_num, 1); wake_lock_destroy(&ctl_b->fs_wake_lock); kfree(ctl_b); fs_ctl_block[md_id] = NULL; }
25.514412
120
0.691927
28e666e189c0efe319df790c4309cb9e7daa8096
1,076
asm
Assembly
src/input.asm
gltchitm/tic-tac-toe-asm
84d2112397218f770e9c573744504078afbdbf8f
[ "MIT" ]
null
null
null
src/input.asm
gltchitm/tic-tac-toe-asm
84d2112397218f770e9c573744504078afbdbf8f
[ "MIT" ]
null
null
null
src/input.asm
gltchitm/tic-tac-toe-asm
84d2112397218f770e9c573744504078afbdbf8f
[ "MIT" ]
null
null
null
%define ICANON 2 %define ECHO 8 %macro input 2 %1: mov rax, 0 push rax push rbp mov rbp, rsp sub rsp, 56 push r11 push rbx push rdx push rcx push rdi push rsi mov rsi, rax mov rsi, 21505 lea rdx, [rbp - 56] mov rax, 16 syscall lea rbx, [rdx + 12] and byte [rbx], ~(ICANON | ECHO) inc rsi push rsi mov rax, 16 push rax syscall lea rsi, [rbp + 8] push rdx mov rdx, 8 mov rax, 0 syscall pop rdx pop rax pop rsi or byte [rbx], (ICANON | ECHO) syscall pop rsi pop rdi pop rcx pop rdx pop rbx pop r11 leave pop rax mov r9, rax mov rdi, newline mov rsi, newline_len call print mov rax, r9 jmp %2 %endmacro input get_user_input_spot, handle_move input get_user_input_rematch, handle_rematch
15.823529
44
0.464684
0a158691c0e0f94d7a41e3d17c9941c140b198bb
761
h
C
AVFoundationDemo/KYAVAssetResourceContentInfo.h
cuidayang/AVFoundationDemo
e7dbce6de340f667caee84b09dd364d60f8224b1
[ "MIT" ]
1
2018-05-25T11:32:07.000Z
2018-05-25T11:32:07.000Z
AVFoundationDemo/KYAVAssetResourceContentInfo.h
cuidayang/AVFoundationDemo
e7dbce6de340f667caee84b09dd364d60f8224b1
[ "MIT" ]
null
null
null
AVFoundationDemo/KYAVAssetResourceContentInfo.h
cuidayang/AVFoundationDemo
e7dbce6de340f667caee84b09dd364d60f8224b1
[ "MIT" ]
1
2018-09-27T22:35:29.000Z
2018-09-27T22:35:29.000Z
// // KYAVAssetResourceContentInfo.h // AVFoundationDemo // // Created by leoking870 on 2018/5/9. // Copyright © 2018年 leoking870. All rights reserved. // #import <Foundation/Foundation.h> @interface KYAVAssetResourceContentInfo : NSObject - (instancetype) init NS_UNAVAILABLE; // make content info from http response - (instancetype)initWithHTTPResponse:(NSHTTPURLResponse *)response NS_DESIGNATED_INITIALIZER; // make content info from local file path - (instancetype)initWithLocalFilePath:(NSString *)filePath NS_DESIGNATED_INITIALIZER; @property (nonatomic, copy, readonly, nullable) NSString *contentType; @property (nonatomic, assign, readonly) BOOL byteRangeAccessSupported; @property (nonatomic, assign, readonly) long long contentLength; @end
31.708333
93
0.793693
39808166b3a7613d4daa01e653c5958c82328840
890
kt
Kotlin
app/src/main/java/com/kshitijpatil/elementaryeditor/ui/imagepicker/TempFileUriProvider.kt
Kshitij09/Elementary-Editor
67aa2f2cc0f60e9c64f6b9ad40e5a971f2fbe446
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/kshitijpatil/elementaryeditor/ui/imagepicker/TempFileUriProvider.kt
Kshitij09/Elementary-Editor
67aa2f2cc0f60e9c64f6b9ad40e5a971f2fbe446
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/kshitijpatil/elementaryeditor/ui/imagepicker/TempFileUriProvider.kt
Kshitij09/Elementary-Editor
67aa2f2cc0f60e9c64f6b9ad40e5a971f2fbe446
[ "Apache-2.0" ]
null
null
null
package com.kshitijpatil.elementaryeditor.ui.imagepicker import android.content.Context import android.net.Uri import androidx.core.content.FileProvider import com.kshitijpatil.elementaryeditor.BuildConfig import java.io.File import java.lang.ref.WeakReference fun interface TempFileUriProvider { fun get(): Uri? } class DefaultTempFileUriProvider(context: Context, private val prefix: String) : TempFileUriProvider { private val contextRef = WeakReference(context) override fun get(): Uri? { val context = contextRef.get() ?: return null val tmpFile = File.createTempFile(prefix, ".png", context.cacheDir).apply { createNewFile() deleteOnExit() } return FileProvider.getUriForFile( context.applicationContext, "${BuildConfig.APPLICATION_ID}.provider", tmpFile ) } }
29.666667
83
0.698876
0ee5a0994211469c1ad344fb82bb49fbb2b5d307
49
ts
TypeScript
src/command/index.ts
AlexRogalskiy/typescript-patterns
5066795a1a6d2b0199e3e17a9d284c2056d30834
[ "MIT" ]
null
null
null
src/command/index.ts
AlexRogalskiy/typescript-patterns
5066795a1a6d2b0199e3e17a9d284c2056d30834
[ "MIT" ]
75
2021-09-06T14:07:17.000Z
2022-03-30T13:20:13.000Z
src/command/index.ts
AlexRogalskiy/typescript-patterns
5066795a1a6d2b0199e3e17a9d284c2056d30834
[ "MIT" ]
null
null
null
export * from './command' export * from './demo'
16.333333
25
0.632653
653e59fcbdd6ab10a8f9cfbeb5d59f5f53315a37
6,114
py
Python
src/trainer/transformations.py
tiborkubik/Robust-Teeth-Detection-in-3D-Dental-Scans-by-Automated-Multi-View-Landmarking
c7d9fa29b3b94ea786da5f4ec11a11520c1b882a
[ "MIT" ]
2
2022-02-20T23:45:47.000Z
2022-03-14T07:36:53.000Z
src/trainer/transformations.py
tiborkubik/Robust-Teeth-Detection-in-3D-Dental-Scans-by-Automated-Multi-View-Landmarking
c7d9fa29b3b94ea786da5f4ec11a11520c1b882a
[ "MIT" ]
null
null
null
src/trainer/transformations.py
tiborkubik/Robust-Teeth-Detection-in-3D-Dental-Scans-by-Automated-Multi-View-Landmarking
c7d9fa29b3b94ea786da5f4ec11a11520c1b882a
[ "MIT" ]
null
null
null
""" :filename transformations.py :author Tibor Kubik :email xkubik34@stud.fit.vutbr.cz from Classes of custom transformations that are applied during the training as additional augmentation of the depth maps. """ import torch import random import numpy as np import torch.nn.functional as F from random import randrange from skimage.transform import resize, warp, AffineTransform class Normalize(object): """Normalization of a depth map in the value of [0, 1] for each pixel.""" def __init__(self, input_type): self.input_type = input_type def __call__(self, sample): if self.input_type == 'geom': image, landmarks, label = sample['image'], sample['landmarks'], sample['label'] mean, std = image.mean([1, 2]), image.std([1, 2]) # TODO? return {'image': image, 'landmarks': landmarks, 'label': label} class ToTensor(object): """Transformation of a training sample into a torch tensor instance.""" def __init__(self, input_type): self.input_type = input_type def __call__(self, sample): image, landmarks, label = sample['image'], sample['landmarks'], sample['label'] image = torch.from_numpy(image.copy()) if self.input_type != 'depth+geom': image = image.unsqueeze(1) image = image.permute(1, 0, 2) else: image = image.permute(2, 0, 1) landmarks = np.asarray(landmarks) landmarks = torch.from_numpy(landmarks.copy()) return {'image': image, 'landmarks': landmarks, 'label': label} class Resize(object): """Resizing of the input sample into provided dimensions.""" def __init__(self, width, height, input_type='image'): assert isinstance(width, int) assert isinstance(height, int) self.width = width self.height = height self.type = input_type def __call__(self, sample): image, landmarks, label = sample['image'], sample['landmarks'], sample['label'] resized_landmarks = landmarks.copy() if self.type == 'image': image = resize(image, (self.height, self.width), anti_aliasing=True) if self.type == 'landmarks': resized_landmarks = [] for landmark in landmarks: landmark_resized = resize(landmark, (self.height, self.width), anti_aliasing=True) resized_landmarks.append(landmark_resized) return {'image': image, 'landmarks': resized_landmarks, 'label': label} class RandomTranslating(object): """Randomly translate the input sample from range [-10 px, 10 px] with provided probability.""" def __init__(self, p=0.5): assert isinstance(p, float) self.p = p def __call__(self, sample): image, landmarks, label = sample['image'], sample['landmarks'], sample['label'] translated_landmarks = landmarks.copy() if np.random.rand(1) < self.p: n1 = randrange(-10, 10) n2 = randrange(-10, 10) t = AffineTransform(translation=(n1, n2)) image = warp(image, t.inverse) translated_landmarks = [] for landmark in landmarks: translated_landmarks.append(warp(landmark, t.inverse)) return {'image': image, 'landmarks': translated_landmarks, 'label': label} class RandomScaling(object): """Randomly scales the input sample with scale index from range [0.90, 1.10] with provided probability.""" def __init__(self, p=0.5): assert isinstance(p, float) self.p = p def __call__(self, sample): image, landmarks, label = sample['image'], sample['landmarks'], sample['label'] scaled_landmarks = landmarks.copy() if np.random.rand(1) < self.p: n = random.uniform(0.90, 1.10) t = AffineTransform(scale=(n, n)) image = warp(image, t.inverse) scaled_landmarks = [] for landmark in landmarks: scaled_landmarks.append(warp(landmark, t.inverse)) return {'image': image, 'landmarks': scaled_landmarks, 'label': label} class RandomRotation(object): """Randomly rotates the input sample from range [−11.25 deg, 11.25 deg] with provided probability.""" def __init__(self, p=0.5): assert isinstance(p, float) self.p = p def __call__(self, sample): image, landmarks, label = sample['image'], sample['landmarks'], sample['label'] rnd_num1 = randrange(-32, -6) rnd_num2 = randrange(6, 32) rnd_num = random.choice([rnd_num1, rnd_num2]) if np.random.rand(1) < self.p: rotated_image = self.rotate(x=image.unsqueeze(0).type(torch.FloatTensor), theta=np.pi/rnd_num) rotated_landmarks = [] for _, landmark in enumerate(landmarks): rotated_landmark = self.rotate(x=landmark.unsqueeze(0).unsqueeze(0).type(torch.FloatTensor), theta=np.pi/rnd_num) rotated_landmarks.append(rotated_landmark.squeeze(0)) result = torch.cat(rotated_landmarks, dim=0) return {'image': rotated_image.squeeze(0), 'landmarks': result, 'label': label} return {'image': image, 'landmarks': landmarks, 'label': label} @staticmethod def get_rotation_matrix(theta): """Returns a tensor rotation matrix with given theta value.""" theta = torch.tensor(theta) return torch.tensor([[torch.cos(theta), -torch.sin(theta), 0], [torch.sin(theta), torch.cos(theta), 0]]) def rotate(self, x, theta): rot_mat = self.get_rotation_matrix(theta)[None, ...].repeat(x.shape[0], 1, 1) grid = F.affine_grid(rot_mat, x.size(), align_corners=False) x = F.grid_sample(x, grid, align_corners=False) return x
31.678756
129
0.596663
46e95b87f3e97540c50f1d6869a71db4857774fe
468
kt
Kotlin
src/main/kotlin/com/projectcitybuild/entities/migrations/20220114_first_time_run.kt
andyksaw/PCBridge
bd146b31bab402789efd8edaee6addba1b8b33da
[ "MIT" ]
3
2016-06-16T06:08:32.000Z
2017-02-03T03:23:32.000Z
src/main/kotlin/com/projectcitybuild/entities/migrations/20220114_first_time_run.kt
andimage/PCBridge
bd146b31bab402789efd8edaee6addba1b8b33da
[ "MIT" ]
5
2015-10-02T16:44:36.000Z
2017-02-05T04:46:13.000Z
src/main/kotlin/com/projectcitybuild/entities/migrations/20220114_first_time_run.kt
andimage/PCBridge
bd146b31bab402789efd8edaee6addba1b8b33da
[ "MIT" ]
3
2016-06-20T04:42:28.000Z
2017-02-02T03:15:23.000Z
package com.projectcitybuild.entities.migrations import co.aikar.idb.HikariPooledDatabase import com.projectcitybuild.core.database.DatabaseMigration class `20220114_first_time_run` : DatabaseMigration { override val description = "First-time run" override fun execute(database: HikariPooledDatabase) { database.executeUpdate("CREATE TABLE IF NOT EXISTS meta(version INT(64));") database.executeInsert("INSERT INTO meta VALUES(1);") } }
33.428571
83
0.769231
ff6c16961abed824365560e9bc19dad70086e690
251,378
asm
Assembly
win32/VC10/Win32/libxml2_Debug/xinclude.asm
txwizard/libxml2_x64_and_ARM
bc19a931370a09ee379d641a7c9a862fecebff3b
[ "MIT" ]
null
null
null
win32/VC10/Win32/libxml2_Debug/xinclude.asm
txwizard/libxml2_x64_and_ARM
bc19a931370a09ee379d641a7c9a862fecebff3b
[ "MIT" ]
null
null
null
win32/VC10/Win32/libxml2_Debug/xinclude.asm
txwizard/libxml2_x64_and_ARM
bc19a931370a09ee379d641a7c9a862fecebff3b
[ "MIT" ]
null
null
null
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27027.1 TITLE C:\Users\DAG\Documents\_Clients\CodeProject Authors Group\Windows on ARM\libxml2\libxml2-2.9.9\xinclude.c .686P .XMM include listing.inc .model flat INCLUDELIB MSVCRTD INCLUDELIB OLDNAMES _DATA SEGMENT COMM _xmlMalloc:DWORD COMM _xmlMallocAtomic:DWORD COMM _xmlRealloc:DWORD COMM _xmlFree:DWORD COMM _xmlMemStrdup:DWORD COMM _xmlXPathNAN:QWORD COMM _xmlXPathPINF:QWORD COMM _xmlXPathNINF:QWORD COMM _xmlIsBaseCharGroup:BYTE:010H COMM _xmlIsCharGroup:BYTE:010H COMM _xmlIsCombiningGroup:BYTE:010H COMM _xmlIsDigitGroup:BYTE:010H COMM _xmlIsExtenderGroup:BYTE:010H COMM _xmlIsIdeographicGroup:BYTE:010H COMM _xmlIsPubidChar_tab:BYTE:0100H COMM _xmlParserMaxDepth:DWORD COMM _forbiddenExp:DWORD COMM _emptyExp:DWORD _DATA ENDS msvcjmc SEGMENT __188180DA_corecrt_math@h DB 01H __2CC6E67D_corecrt_stdio_config@h DB 01H __05476D76_corecrt_wstdio@h DB 01H __A452D4A0_stdio@h DB 01H __4384A2D9_corecrt_memcpy_s@h DB 01H __4E51A221_corecrt_wstring@h DB 01H __2140C079_string@h DB 01H __07371726_xinclude@c DB 01H msvcjmc ENDS PUBLIC _xmlXIncludeProcess PUBLIC _xmlXIncludeProcessFlags PUBLIC _xmlXIncludeProcessFlagsData PUBLIC _xmlXIncludeProcessTreeFlagsData PUBLIC _xmlXIncludeProcessTree PUBLIC _xmlXIncludeProcessTreeFlags PUBLIC _xmlXIncludeNewContext PUBLIC _xmlXIncludeSetFlags PUBLIC _xmlXIncludeFreeContext PUBLIC _xmlXIncludeProcessNode PUBLIC __JustMyCode_Default PUBLIC ??_C@_0BP@DJFHNAOK@Memory?5allocation?5failed?5?3?5?$CFs?6@ ; `string' PUBLIC ??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@ ; `string' PUBLIC ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@ ; `string' PUBLIC ??_C@_0BJ@LMPOCELI@growing?5XInclude?5context@ ; `string' PUBLIC ??_C@_0BK@NPNMIHKC@creating?5XInclude?5context@ ; `string' PUBLIC ??_C@_0BM@FPMOMHKP@detected?5a?5recursion?5in?5?$CFs?6@ ; `string' PUBLIC ??_C@_0L@NDJLOKMA@adding?5URL@ ; `string' PUBLIC ??_C@_0BP@IGCIIMIK@cannot?5allocate?5parser?5context@ ; `string' PUBLIC ??_C@_04CMBCJJJD@href@ ; `string' PUBLIC ??_C@_00CNPNBAHC@@ ; `string' PUBLIC ??_C@_05GOEGCMJM@parse@ ; `string' PUBLIC ??_C@_03PJHHNEEI@xml@ ; `string' PUBLIC ??_C@_04CIMGMMMG@text@ ; `string' PUBLIC ??_C@_0BO@KBIJIENG@invalid?5value?5?$CFs?5for?5?8parse?8?6@ ; `string' PUBLIC ??_C@_0BC@LNHFKIFC@failed?5build?5URL?6@ ; `string' PUBLIC ??_C@_08DNJCJFMK@xpointer@ ; `string' PUBLIC ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@ ; `string' PUBLIC ??_C@_0EC@PPIAEBNK@Invalid?5fragment?5identifier?5in?5@ ; `string' PUBLIC ??_C@_0DD@GKECCJLJ@detected?5a?5local?5recursion?5with@ ; `string' PUBLIC ??_C@_0P@NPOPFDNN@processing?5doc@ ; `string' PUBLIC ??_C@_0BA@KMMAMGLP@processing?5text@ ; `string' PUBLIC ??_C@_0CH@PEJDIBGL@mismatch?5in?5redefinition?5of?5ent@ ; `string' PUBLIC ??_C@_0CD@PEMEOEGM@could?5not?5create?5XPointer?5conte@ ; `string' PUBLIC ??_C@_0CB@CBJIEBBP@XPointer?5evaluation?5failed?3?5?$CD?$CFs@ ; `string' PUBLIC ??_C@_0BO@BAOAOILH@XPointer?5is?5not?5a?5range?3?5?$CD?$CFs?6@ ; `string' PUBLIC ??_C@_0CE@BOPHMAJL@XPointer?5selects?5an?5attribute?3?5@ ; `string' PUBLIC ??_C@_0CD@OMDJDBLC@XPointer?5selects?5a?5namespace?3?5?$CD@ ; `string' PUBLIC ??_C@_0CI@NPJMIHPM@XPointer?5selects?5unexpected?5nod@ ; `string' PUBLIC ??_C@_0CF@GLDAAHFK@http?3?1?1www?4w3?4org?1XML?11998?1name@ ; `string' PUBLIC ??_C@_04BHIIPFEC@base@ ; `string' PUBLIC ??_C@_0CG@KGJNPLJO@trying?5to?5build?5relative?5URI?5fr@ ; `string' PUBLIC ??_C@_0CA@DKDEEGND@trying?5to?5rebuild?5base?5from?5?$CFs?6@ ; `string' PUBLIC ??_C@_0CM@EOJCKNLM@fragment?5identifier?5forbidden?5f@ ; `string' PUBLIC ??_C@_0CO@JGKFOGCG@text?5serialization?5of?5document?5@ ; `string' PUBLIC ??_C@_08MLPGAEIK@encoding@ ; `string' PUBLIC ??_C@_0BL@EIOJIGPP@encoding?5?$CFs?5not?5supported?6@ ; `string' PUBLIC ??_C@_0BK@JOLCHMFH@?$CFs?5contains?5invalid?5char?6@ ; `string' PUBLIC ??_C@_08LFBOCJLE@fallback@ ; `string' PUBLIC ??_C@_0CO@LMECEKCE@could?5not?5load?5?$CFs?0?5and?5no?5fallb@ ; `string' PUBLIC ??_C@_0DF@GJKNHIHG@XInclude?5error?3?5would?5result?5in@ ; `string' PUBLIC ??_C@_0BG@FIICHNCC@failed?5to?5build?5node?6@ ; `string' PUBLIC ??_C@_07FHOHOHLG@include@ ; `string' PUBLIC ??_C@_0BL@JFPJOKPM@?$CFs?5has?5an?5?8include?8?5child?6@ ; `string' PUBLIC ??_C@_0CD@NFGHFOEO@?$CFs?5has?5multiple?5fallback?5childr@ ; `string' PUBLIC ??_C@_0CF@BKGBMCAE@?$CFs?5is?5not?5the?5child?5of?5an?5?8incl@ ; `string' EXTRN _xmlStrdup:PROC EXTRN _xmlStrchr:PROC EXTRN _xmlStrEqual:PROC EXTRN _xmlBufContent:PROC EXTRN _xmlBufShrink:PROC EXTRN _xmlDictReference:PROC EXTRN _xmlDictFree:PROC EXTRN _xmlCreateIntSubset:PROC EXTRN _xmlFreeDoc:PROC EXTRN _xmlNewDocNode:PROC EXTRN _xmlNewText:PROC EXTRN _xmlNewTextLen:PROC EXTRN _xmlCopyNode:PROC EXTRN _xmlDocCopyNode:PROC EXTRN _xmlDocCopyNodeList:PROC EXTRN _xmlCopyNodeList:PROC EXTRN _xmlDocGetRootElement:PROC EXTRN _xmlAddChild:PROC EXTRN _xmlAddPrevSibling:PROC EXTRN _xmlAddNextSibling:PROC EXTRN _xmlUnlinkNode:PROC EXTRN _xmlFreeNode:PROC EXTRN _xmlGetProp:PROC EXTRN _xmlGetNsProp:PROC EXTRN _xmlNodeAddContentLen:PROC EXTRN _xmlNodeGetBase:PROC EXTRN _xmlNodeSetBase:PROC EXTRN _xmlHashScan:PROC EXTRN ___xmlRaiseError:PROC EXTRN _xmlAddDocEntity:PROC EXTRN _xmlGetDocEntity:PROC EXTRN _xmlGetCharEncodingHandler:PROC EXTRN _xmlParseCharEncoding:PROC EXTRN _xmlCharEncCloseFunc:PROC EXTRN _xmlParserInputBufferRead:PROC EXTRN _xmlFreeParserInputBuffer:PROC EXTRN _xmlParserGetDirectory:PROC EXTRN _xmlInitParser:PROC EXTRN _xmlParseDocument:PROC EXTRN _xmlNewParserCtxt:PROC EXTRN _xmlFreeParserCtxt:PROC EXTRN _xmlLoadExternalEntity:PROC EXTRN _xmlCtxtUseOptions:PROC EXTRN _xmlBuildURI:PROC EXTRN _xmlBuildRelativeURI:PROC EXTRN _xmlParseURI:PROC EXTRN _xmlSaveUri:PROC EXTRN _xmlURIEscape:PROC EXTRN _xmlFreeURI:PROC EXTRN _xmlXPathFreeObject:PROC EXTRN _xmlXPathFreeContext:PROC EXTRN _xmlXPtrNewContext:PROC EXTRN _xmlXPtrEval:PROC EXTRN _xmlFreeInputStream:PROC EXTRN _inputPush:PROC EXTRN _xmlStringCurrentChar:PROC EXTRN _xmlBufLength:PROC EXTRN _xmlXPtrAdvanceNode:PROC EXTRN @_RTC_CheckStackVars@8:PROC EXTRN @__CheckForDebuggerJustMyCode@4:PROC EXTRN __RTC_CheckEsp:PROC EXTRN __RTC_InitBase:PROC EXTRN __RTC_Shutdown:PROC EXTRN _memset:PROC ; COMDAT rtc$TMZ rtc$TMZ SEGMENT __RTC_Shutdown.rtc$TMZ DD FLAT:__RTC_Shutdown rtc$TMZ ENDS ; COMDAT rtc$IMZ rtc$IMZ SEGMENT __RTC_InitBase.rtc$IMZ DD FLAT:__RTC_InitBase rtc$IMZ ENDS ; COMDAT ??_C@_0CF@BKGBMCAE@?$CFs?5is?5not?5the?5child?5of?5an?5?8incl@ CONST SEGMENT ??_C@_0CF@BKGBMCAE@?$CFs?5is?5not?5the?5child?5of?5an?5?8incl@ DB '%s is ' DB 'not the child of an ''include''', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CD@NFGHFOEO@?$CFs?5has?5multiple?5fallback?5childr@ CONST SEGMENT ??_C@_0CD@NFGHFOEO@?$CFs?5has?5multiple?5fallback?5childr@ DB '%s has mul' DB 'tiple fallback children', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BL@JFPJOKPM@?$CFs?5has?5an?5?8include?8?5child?6@ CONST SEGMENT ??_C@_0BL@JFPJOKPM@?$CFs?5has?5an?5?8include?8?5child?6@ DB '%s has an ''' DB 'include'' child', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_07FHOHOHLG@include@ CONST SEGMENT ??_C@_07FHOHOHLG@include@ DB 'include', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BG@FIICHNCC@failed?5to?5build?5node?6@ CONST SEGMENT ??_C@_0BG@FIICHNCC@failed?5to?5build?5node?6@ DB 'failed to build node', 0aH DB 00H ; `string' CONST ENDS ; COMDAT ??_C@_0DF@GJKNHIHG@XInclude?5error?3?5would?5result?5in@ CONST SEGMENT ??_C@_0DF@GJKNHIHG@XInclude?5error?3?5would?5result?5in@ DB 'XInclude err' DB 'or: would result in multiple root nodes', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CO@LMECEKCE@could?5not?5load?5?$CFs?0?5and?5no?5fallb@ CONST SEGMENT ??_C@_0CO@LMECEKCE@could?5not?5load?5?$CFs?0?5and?5no?5fallb@ DB 'could n' DB 'ot load %s, and no fallback was found', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_08LFBOCJLE@fallback@ CONST SEGMENT ??_C@_08LFBOCJLE@fallback@ DB 'fallback', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BK@JOLCHMFH@?$CFs?5contains?5invalid?5char?6@ CONST SEGMENT ??_C@_0BK@JOLCHMFH@?$CFs?5contains?5invalid?5char?6@ DB '%s contains inva' DB 'lid char', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BL@EIOJIGPP@encoding?5?$CFs?5not?5supported?6@ CONST SEGMENT ??_C@_0BL@EIOJIGPP@encoding?5?$CFs?5not?5supported?6@ DB 'encoding %s not' DB ' supported', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_08MLPGAEIK@encoding@ CONST SEGMENT ??_C@_08MLPGAEIK@encoding@ DB 'encoding', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CO@JGKFOGCG@text?5serialization?5of?5document?5@ CONST SEGMENT ??_C@_0CO@JGKFOGCG@text?5serialization?5of?5document?5@ DB 'text serializ' DB 'ation of document not available', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CM@EOJCKNLM@fragment?5identifier?5forbidden?5f@ CONST SEGMENT ??_C@_0CM@EOJCKNLM@fragment?5identifier?5forbidden?5f@ DB 'fragment ident' DB 'ifier forbidden for text: %s', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CA@DKDEEGND@trying?5to?5rebuild?5base?5from?5?$CFs?6@ CONST SEGMENT ??_C@_0CA@DKDEEGND@trying?5to?5rebuild?5base?5from?5?$CFs?6@ DB 'trying t' DB 'o rebuild base from %s', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CG@KGJNPLJO@trying?5to?5build?5relative?5URI?5fr@ CONST SEGMENT ??_C@_0CG@KGJNPLJO@trying?5to?5build?5relative?5URI?5fr@ DB 'trying to bu' DB 'ild relative URI from %s', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_04BHIIPFEC@base@ CONST SEGMENT ??_C@_04BHIIPFEC@base@ DB 'base', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CF@GLDAAHFK@http?3?1?1www?4w3?4org?1XML?11998?1name@ CONST SEGMENT ??_C@_0CF@GLDAAHFK@http?3?1?1www?4w3?4org?1XML?11998?1name@ DB 'http://ww' DB 'w.w3.org/XML/1998/namespace', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CI@NPJMIHPM@XPointer?5selects?5unexpected?5nod@ CONST SEGMENT ??_C@_0CI@NPJMIHPM@XPointer?5selects?5unexpected?5nod@ DB 'XPointer selec' DB 'ts unexpected nodes: #%s', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CD@OMDJDBLC@XPointer?5selects?5a?5namespace?3?5?$CD@ CONST SEGMENT ??_C@_0CD@OMDJDBLC@XPointer?5selects?5a?5namespace?3?5?$CD@ DB 'XPointer ' DB 'selects a namespace: #%s', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CE@BOPHMAJL@XPointer?5selects?5an?5attribute?3?5@ CONST SEGMENT ??_C@_0CE@BOPHMAJL@XPointer?5selects?5an?5attribute?3?5@ DB 'XPointer sel' DB 'ects an attribute: #%s', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BO@BAOAOILH@XPointer?5is?5not?5a?5range?3?5?$CD?$CFs?6@ CONST SEGMENT ??_C@_0BO@BAOAOILH@XPointer?5is?5not?5a?5range?3?5?$CD?$CFs?6@ DB 'XPoint' DB 'er is not a range: #%s', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CB@CBJIEBBP@XPointer?5evaluation?5failed?3?5?$CD?$CFs@ CONST SEGMENT ??_C@_0CB@CBJIEBBP@XPointer?5evaluation?5failed?3?5?$CD?$CFs@ DB 'XPointe' DB 'r evaluation failed: #%s', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CD@PEMEOEGM@could?5not?5create?5XPointer?5conte@ CONST SEGMENT ??_C@_0CD@PEMEOEGM@could?5not?5create?5XPointer?5conte@ DB 'could not cre' DB 'ate XPointer context', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CH@PEJDIBGL@mismatch?5in?5redefinition?5of?5ent@ CONST SEGMENT ??_C@_0CH@PEJDIBGL@mismatch?5in?5redefinition?5of?5ent@ DB 'mismatch in r' DB 'edefinition of entity %s', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BA@KMMAMGLP@processing?5text@ CONST SEGMENT ??_C@_0BA@KMMAMGLP@processing?5text@ DB 'processing text', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0P@NPOPFDNN@processing?5doc@ CONST SEGMENT ??_C@_0P@NPOPFDNN@processing?5doc@ DB 'processing doc', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0DD@GKECCJLJ@detected?5a?5local?5recursion?5with@ CONST SEGMENT ??_C@_0DD@GKECCJLJ@detected?5a?5local?5recursion?5with@ DB 'detected a lo' DB 'cal recursion with no xpointer in %s', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0EC@PPIAEBNK@Invalid?5fragment?5identifier?5in?5@ CONST SEGMENT ??_C@_0EC@PPIAEBNK@Invalid?5fragment?5identifier?5in?5@ DB 'Invalid fragm' DB 'ent identifier in URI %s use the xpointer attribute', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@ CONST SEGMENT ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@ DB 'invalid value URI %s' DB 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_08DNJCJFMK@xpointer@ CONST SEGMENT ??_C@_08DNJCJFMK@xpointer@ DB 'xpointer', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BC@LNHFKIFC@failed?5build?5URL?6@ CONST SEGMENT ??_C@_0BC@LNHFKIFC@failed?5build?5URL?6@ DB 'failed build URL', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BO@KBIJIENG@invalid?5value?5?$CFs?5for?5?8parse?8?6@ CONST SEGMENT ??_C@_0BO@KBIJIENG@invalid?5value?5?$CFs?5for?5?8parse?8?6@ DB 'invalid v' DB 'alue %s for ''parse''', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_04CIMGMMMG@text@ CONST SEGMENT ??_C@_04CIMGMMMG@text@ DB 'text', 00H ; `string' CONST ENDS ; COMDAT ??_C@_03PJHHNEEI@xml@ CONST SEGMENT ??_C@_03PJHHNEEI@xml@ DB 'xml', 00H ; `string' CONST ENDS ; COMDAT ??_C@_05GOEGCMJM@parse@ CONST SEGMENT ??_C@_05GOEGCMJM@parse@ DB 'parse', 00H ; `string' CONST ENDS ; COMDAT ??_C@_00CNPNBAHC@@ CONST SEGMENT ??_C@_00CNPNBAHC@@ DB 00H ; `string' CONST ENDS ; COMDAT ??_C@_04CMBCJJJD@href@ CONST SEGMENT ??_C@_04CMBCJJJD@href@ DB 'href', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BP@IGCIIMIK@cannot?5allocate?5parser?5context@ CONST SEGMENT ??_C@_0BP@IGCIIMIK@cannot?5allocate?5parser?5context@ DB 'cannot allocate' DB ' parser context', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0L@NDJLOKMA@adding?5URL@ CONST SEGMENT ??_C@_0L@NDJLOKMA@adding?5URL@ DB 'adding URL', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BM@FPMOMHKP@detected?5a?5recursion?5in?5?$CFs?6@ CONST SEGMENT ??_C@_0BM@FPMOMHKP@detected?5a?5recursion?5in?5?$CFs?6@ DB 'detected a re' DB 'cursion in %s', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BK@NPNMIHKC@creating?5XInclude?5context@ CONST SEGMENT ??_C@_0BK@NPNMIHKC@creating?5XInclude?5context@ DB 'creating XInclude con' DB 'text', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BJ@LMPOCELI@growing?5XInclude?5context@ CONST SEGMENT ??_C@_0BJ@LMPOCELI@growing?5XInclude?5context@ DB 'growing XInclude conte' DB 'xt', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@ CONST SEGMENT ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@ DB 'http://www' DB '.w3.org/2001/XInclude', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@ CONST SEGMENT ??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@ DB 'http://www' DB '.w3.org/2003/XInclude', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BP@DJFHNAOK@Memory?5allocation?5failed?5?3?5?$CFs?6@ CONST SEGMENT ??_C@_0BP@DJFHNAOK@Memory?5allocation?5failed?5?3?5?$CFs?6@ DB 'Memory al' DB 'location failed : %s', 0aH, 00H ; `string' CONST ENDS ; Function compile flags: /Odt ; COMDAT __JustMyCode_Default _TEXT SEGMENT __JustMyCode_Default PROC ; COMDAT push ebp mov ebp, esp pop ebp ret 0 __JustMyCode_Default ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeTestNode _TEXT SEGMENT _nb_fallback$1 = -8 ; size = 4 _child$2 = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _node$ = 12 ; size = 4 _xmlXIncludeTestNode PROC ; COMDAT ; 2286 : xmlXIncludeTestNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) { push ebp mov ebp, esp sub esp, 8 mov DWORD PTR [ebp-8], -858993460 ; ccccccccH mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 2287 : if (node == NULL) cmp DWORD PTR _node$[ebp], 0 jne SHORT $LN4@xmlXInclud ; 2288 : return(0); xor eax, eax jmp $LN1@xmlXInclud $LN4@xmlXInclud: ; 2289 : if (node->type != XML_ELEMENT_NODE) mov eax, DWORD PTR _node$[ebp] cmp DWORD PTR [eax+4], 1 je SHORT $LN5@xmlXInclud ; 2290 : return(0); xor eax, eax jmp $LN1@xmlXInclud $LN5@xmlXInclud: ; 2291 : if (node->ns == NULL) mov ecx, DWORD PTR _node$[ebp] cmp DWORD PTR [ecx+36], 0 jne SHORT $LN6@xmlXInclud ; 2292 : return(0); xor eax, eax jmp $LN1@xmlXInclud $LN6@xmlXInclud: ; 2293 : if ((xmlStrEqual(node->ns->href, XINCLUDE_NS)) || push OFFSET ??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@ mov edx, DWORD PTR _node$[ebp] mov eax, DWORD PTR [edx+36] mov ecx, DWORD PTR [eax+8] push ecx call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN8@xmlXInclud push OFFSET ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@ mov edx, DWORD PTR _node$[ebp] mov eax, DWORD PTR [edx+36] mov ecx, DWORD PTR [eax+8] push ecx call _xmlStrEqual add esp, 8 test eax, eax je $LN7@xmlXInclud $LN8@xmlXInclud: ; 2294 : (xmlStrEqual(node->ns->href, XINCLUDE_OLD_NS))) { ; 2295 : if (xmlStrEqual(node->ns->href, XINCLUDE_OLD_NS)) { push OFFSET ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@ mov edx, DWORD PTR _node$[ebp] mov eax, DWORD PTR [edx+36] mov ecx, DWORD PTR [eax+8] push ecx call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN9@xmlXInclud ; 2296 : if (ctxt->legacy == 0) { mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx+56], 0 jne SHORT $LN9@xmlXInclud ; 2297 : #if 0 /* wait for the XML Core Working Group to get something stable ! */ ; 2298 : xmlXIncludeWarn(ctxt, node, XML_XINCLUDE_DEPRECATED_NS, ; 2299 : "Deprecated XInclude namespace found, use %s", ; 2300 : XINCLUDE_NS); ; 2301 : #endif ; 2302 : ctxt->legacy = 1; mov eax, DWORD PTR _ctxt$[ebp] mov DWORD PTR [eax+56], 1 $LN9@xmlXInclud: ; 2303 : } ; 2304 : } ; 2305 : if (xmlStrEqual(node->name, XINCLUDE_NODE)) { push OFFSET ??_C@_07FHOHOHLG@include@ mov ecx, DWORD PTR _node$[ebp] mov edx, DWORD PTR [ecx+8] push edx call _xmlStrEqual add esp, 8 test eax, eax je $LN11@xmlXInclud ; 2306 : xmlNodePtr child = node->children; mov eax, DWORD PTR _node$[ebp] mov ecx, DWORD PTR [eax+12] mov DWORD PTR _child$2[ebp], ecx ; 2307 : int nb_fallback = 0; mov DWORD PTR _nb_fallback$1[ebp], 0 $LN2@xmlXInclud: ; 2308 : ; 2309 : while (child != NULL) { cmp DWORD PTR _child$2[ebp], 0 je $LN3@xmlXInclud ; 2310 : if ((child->type == XML_ELEMENT_NODE) && ; 2311 : (child->ns != NULL) && mov edx, DWORD PTR _child$2[ebp] cmp DWORD PTR [edx+4], 1 jne $LN12@xmlXInclud mov eax, DWORD PTR _child$2[ebp] cmp DWORD PTR [eax+36], 0 je $LN12@xmlXInclud push OFFSET ??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@ mov ecx, DWORD PTR _child$2[ebp] mov edx, DWORD PTR [ecx+36] mov eax, DWORD PTR [edx+8] push eax call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN13@xmlXInclud push OFFSET ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@ mov ecx, DWORD PTR _child$2[ebp] mov edx, DWORD PTR [ecx+36] mov eax, DWORD PTR [edx+8] push eax call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN12@xmlXInclud $LN13@xmlXInclud: ; 2312 : ((xmlStrEqual(child->ns->href, XINCLUDE_NS)) || ; 2313 : (xmlStrEqual(child->ns->href, XINCLUDE_OLD_NS)))) { ; 2314 : if (xmlStrEqual(child->name, XINCLUDE_NODE)) { push OFFSET ??_C@_07FHOHOHLG@include@ mov ecx, DWORD PTR _child$2[ebp] mov edx, DWORD PTR [ecx+8] push edx call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN14@xmlXInclud ; 2315 : xmlXIncludeErr(ctxt, node, push OFFSET ??_C@_07FHOHOHLG@include@ push OFFSET ??_C@_0BL@JFPJOKPM@?$CFs?5has?5an?5?8include?8?5child?6@ push 1614 ; 0000064eH mov eax, DWORD PTR _node$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 2316 : XML_XINCLUDE_INCLUDE_IN_INCLUDE, ; 2317 : "%s has an 'include' child\n", ; 2318 : XINCLUDE_NODE); ; 2319 : return(0); xor eax, eax jmp $LN1@xmlXInclud $LN14@xmlXInclud: ; 2320 : } ; 2321 : if (xmlStrEqual(child->name, XINCLUDE_FALLBACK)) { push OFFSET ??_C@_08LFBOCJLE@fallback@ mov edx, DWORD PTR _child$2[ebp] mov eax, DWORD PTR [edx+8] push eax call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN12@xmlXInclud ; 2322 : nb_fallback++; mov ecx, DWORD PTR _nb_fallback$1[ebp] add ecx, 1 mov DWORD PTR _nb_fallback$1[ebp], ecx $LN12@xmlXInclud: ; 2323 : } ; 2324 : } ; 2325 : child = child->next; mov edx, DWORD PTR _child$2[ebp] mov eax, DWORD PTR [edx+24] mov DWORD PTR _child$2[ebp], eax ; 2326 : } jmp $LN2@xmlXInclud $LN3@xmlXInclud: ; 2327 : if (nb_fallback > 1) { cmp DWORD PTR _nb_fallback$1[ebp], 1 jle SHORT $LN16@xmlXInclud ; 2328 : xmlXIncludeErr(ctxt, node, XML_XINCLUDE_FALLBACKS_IN_INCLUDE, push OFFSET ??_C@_07FHOHOHLG@include@ push OFFSET ??_C@_0CD@NFGHFOEO@?$CFs?5has?5multiple?5fallback?5childr@ push 1615 ; 0000064fH mov ecx, DWORD PTR _node$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 2329 : "%s has multiple fallback children\n", ; 2330 : XINCLUDE_NODE); ; 2331 : return(0); xor eax, eax jmp $LN1@xmlXInclud $LN16@xmlXInclud: ; 2332 : } ; 2333 : return(1); mov eax, 1 jmp $LN1@xmlXInclud $LN11@xmlXInclud: ; 2334 : } ; 2335 : if (xmlStrEqual(node->name, XINCLUDE_FALLBACK)) { push OFFSET ??_C@_08LFBOCJLE@fallback@ mov eax, DWORD PTR _node$[ebp] mov ecx, DWORD PTR [eax+8] push ecx call _xmlStrEqual add esp, 8 test eax, eax je $LN7@xmlXInclud ; 2336 : if ((node->parent == NULL) || ; 2337 : (node->parent->type != XML_ELEMENT_NODE) || ; 2338 : (node->parent->ns == NULL) || ; 2339 : ((!xmlStrEqual(node->parent->ns->href, XINCLUDE_NS)) && ; 2340 : (!xmlStrEqual(node->parent->ns->href, XINCLUDE_OLD_NS))) || mov edx, DWORD PTR _node$[ebp] cmp DWORD PTR [edx+20], 0 je SHORT $LN19@xmlXInclud mov eax, DWORD PTR _node$[ebp] mov ecx, DWORD PTR [eax+20] cmp DWORD PTR [ecx+4], 1 jne SHORT $LN19@xmlXInclud mov edx, DWORD PTR _node$[ebp] mov eax, DWORD PTR [edx+20] cmp DWORD PTR [eax+36], 0 je SHORT $LN19@xmlXInclud push OFFSET ??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@ mov ecx, DWORD PTR _node$[ebp] mov edx, DWORD PTR [ecx+20] mov eax, DWORD PTR [edx+36] mov ecx, DWORD PTR [eax+8] push ecx call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN20@xmlXInclud push OFFSET ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@ mov edx, DWORD PTR _node$[ebp] mov eax, DWORD PTR [edx+20] mov ecx, DWORD PTR [eax+36] mov edx, DWORD PTR [ecx+8] push edx call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN19@xmlXInclud $LN20@xmlXInclud: push OFFSET ??_C@_07FHOHOHLG@include@ mov eax, DWORD PTR _node$[ebp] mov ecx, DWORD PTR [eax+20] mov edx, DWORD PTR [ecx+8] push edx call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN7@xmlXInclud $LN19@xmlXInclud: ; 2341 : (!xmlStrEqual(node->parent->name, XINCLUDE_NODE))) { ; 2342 : xmlXIncludeErr(ctxt, node, push OFFSET ??_C@_08LFBOCJLE@fallback@ push OFFSET ??_C@_0CF@BKGBMCAE@?$CFs?5is?5not?5the?5child?5of?5an?5?8incl@ push 1616 ; 00000650H mov eax, DWORD PTR _node$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErr add esp, 20 ; 00000014H $LN7@xmlXInclud: ; 2343 : XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE, ; 2344 : "%s is not the child of an 'include'\n", ; 2345 : XINCLUDE_FALLBACK); ; 2346 : } ; 2347 : } ; 2348 : } ; 2349 : return(0); xor eax, eax $LN1@xmlXInclud: ; 2350 : } add esp, 8 cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeTestNode ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeIncludeNode _TEXT SEGMENT _nb_elem$1 = -20 ; size = 4 _tmp$ = -16 ; size = 4 _list$ = -12 ; size = 4 _end$ = -8 ; size = 4 _cur$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _nr$ = 12 ; size = 4 _xmlXIncludeIncludeNode PROC ; COMDAT ; 2186 : xmlXIncludeIncludeNode(xmlXIncludeCtxtPtr ctxt, int nr) { push ebp mov ebp, esp sub esp, 20 ; 00000014H mov eax, -858993460 ; ccccccccH mov DWORD PTR [ebp-20], eax mov DWORD PTR [ebp-16], eax mov DWORD PTR [ebp-12], eax mov DWORD PTR [ebp-8], eax mov DWORD PTR [ebp-4], eax mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 2187 : xmlNodePtr cur, end, list, tmp; ; 2188 : ; 2189 : if (ctxt == NULL) cmp DWORD PTR _ctxt$[ebp], 0 jne SHORT $LN8@xmlXInclud ; 2190 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN8@xmlXInclud: ; 2191 : if ((nr < 0) || (nr >= ctxt->incNr)) cmp DWORD PTR _nr$[ebp], 0 jl SHORT $LN10@xmlXInclud mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR _nr$[ebp] cmp ecx, DWORD PTR [eax+8] jl SHORT $LN9@xmlXInclud $LN10@xmlXInclud: ; 2192 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN9@xmlXInclud: ; 2193 : cur = ctxt->incTab[nr]->ref; mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov eax, DWORD PTR [edx+12] mov DWORD PTR _cur$[ebp], eax ; 2194 : if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) cmp DWORD PTR _cur$[ebp], 0 je SHORT $LN12@xmlXInclud mov ecx, DWORD PTR _cur$[ebp] cmp DWORD PTR [ecx+4], 18 ; 00000012H jne SHORT $LN11@xmlXInclud $LN12@xmlXInclud: ; 2195 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN11@xmlXInclud: ; 2196 : ; 2197 : /* ; 2198 : * If we stored an XPointer a late computation may be needed ; 2199 : */ ; 2200 : if ((ctxt->incTab[nr]->inc == NULL) && mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] cmp DWORD PTR [edx+16], 0 jne SHORT $LN13@xmlXInclud mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] cmp DWORD PTR [eax+28], 0 je SHORT $LN13@xmlXInclud ; 2201 : (ctxt->incTab[nr]->xptr != NULL)) { ; 2202 : ctxt->incTab[nr]->inc = mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [edx+eax*4] mov edx, DWORD PTR [ecx+28] push edx mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax] push ecx mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeCopyXPointer add esp, 16 ; 00000010H mov edx, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [edx+16] mov edx, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [ecx+edx*4] mov DWORD PTR [ecx+16], eax ; 2203 : xmlXIncludeCopyXPointer(ctxt, ctxt->doc, ctxt->doc, ; 2204 : ctxt->incTab[nr]->xptr); ; 2205 : xmlXPathFreeObject(ctxt->incTab[nr]->xptr); mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov eax, DWORD PTR [edx+28] push eax call _xmlXPathFreeObject add esp, 4 ; 2206 : ctxt->incTab[nr]->xptr = NULL; mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [edx+eax*4] mov DWORD PTR [ecx+28], 0 $LN13@xmlXInclud: ; 2207 : } ; 2208 : list = ctxt->incTab[nr]->inc; mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov eax, DWORD PTR [edx+16] mov DWORD PTR _list$[ebp], eax ; 2209 : ctxt->incTab[nr]->inc = NULL; mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [edx+eax*4] mov DWORD PTR [ecx+16], 0 ; 2210 : ; 2211 : /* ; 2212 : * Check against the risk of generating a multi-rooted document ; 2213 : */ ; 2214 : if ((cur->parent != NULL) && mov edx, DWORD PTR _cur$[ebp] cmp DWORD PTR [edx+20], 0 je SHORT $LN14@xmlXInclud mov eax, DWORD PTR _cur$[ebp] mov ecx, DWORD PTR [eax+20] cmp DWORD PTR [ecx+4], 1 je SHORT $LN14@xmlXInclud ; 2215 : (cur->parent->type != XML_ELEMENT_NODE)) { ; 2216 : int nb_elem = 0; mov DWORD PTR _nb_elem$1[ebp], 0 ; 2217 : ; 2218 : tmp = list; mov edx, DWORD PTR _list$[ebp] mov DWORD PTR _tmp$[ebp], edx $LN2@xmlXInclud: ; 2219 : while (tmp != NULL) { cmp DWORD PTR _tmp$[ebp], 0 je SHORT $LN3@xmlXInclud ; 2220 : if (tmp->type == XML_ELEMENT_NODE) mov eax, DWORD PTR _tmp$[ebp] cmp DWORD PTR [eax+4], 1 jne SHORT $LN15@xmlXInclud ; 2221 : nb_elem++; mov ecx, DWORD PTR _nb_elem$1[ebp] add ecx, 1 mov DWORD PTR _nb_elem$1[ebp], ecx $LN15@xmlXInclud: ; 2222 : tmp = tmp->next; mov edx, DWORD PTR _tmp$[ebp] mov eax, DWORD PTR [edx+24] mov DWORD PTR _tmp$[ebp], eax ; 2223 : } jmp SHORT $LN2@xmlXInclud $LN3@xmlXInclud: ; 2224 : if (nb_elem > 1) { cmp DWORD PTR _nb_elem$1[ebp], 1 jle SHORT $LN14@xmlXInclud ; 2225 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, push 0 push OFFSET ??_C@_0DF@GJKNHIHG@XInclude?5error?3?5would?5result?5in@ push 1611 ; 0000064bH mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [edx+eax*4] mov edx, DWORD PTR [ecx+12] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeErr add esp, 20 ; 00000014H ; 2226 : XML_XINCLUDE_MULTIPLE_ROOT, ; 2227 : "XInclude error: would result in multiple root nodes\n", ; 2228 : NULL); ; 2229 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN14@xmlXInclud: ; 2230 : } ; 2231 : } ; 2232 : ; 2233 : if (ctxt->parseFlags & XML_PARSE_NOXINCNODE) { mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+60] and edx, 32768 ; 00008000H je SHORT $LN17@xmlXInclud $LN4@xmlXInclud: ; 2234 : /* ; 2235 : * Add the list of nodes ; 2236 : */ ; 2237 : while (list != NULL) { cmp DWORD PTR _list$[ebp], 0 je SHORT $LN5@xmlXInclud ; 2238 : end = list; mov eax, DWORD PTR _list$[ebp] mov DWORD PTR _end$[ebp], eax ; 2239 : list = list->next; mov ecx, DWORD PTR _list$[ebp] mov edx, DWORD PTR [ecx+24] mov DWORD PTR _list$[ebp], edx ; 2240 : ; 2241 : xmlAddPrevSibling(cur, end); mov eax, DWORD PTR _end$[ebp] push eax mov ecx, DWORD PTR _cur$[ebp] push ecx call _xmlAddPrevSibling add esp, 8 ; 2242 : } jmp SHORT $LN4@xmlXInclud $LN5@xmlXInclud: ; 2243 : xmlUnlinkNode(cur); mov edx, DWORD PTR _cur$[ebp] push edx call _xmlUnlinkNode add esp, 4 ; 2244 : xmlFreeNode(cur); mov eax, DWORD PTR _cur$[ebp] push eax call _xmlFreeNode add esp, 4 ; 2245 : } else { jmp $LN18@xmlXInclud $LN17@xmlXInclud: ; 2246 : /* ; 2247 : * Change the current node as an XInclude start one, and add an ; 2248 : * XInclude end one ; 2249 : */ ; 2250 : cur->type = XML_XINCLUDE_START; mov ecx, DWORD PTR _cur$[ebp] mov DWORD PTR [ecx+4], 19 ; 00000013H ; 2251 : end = xmlNewDocNode(cur->doc, cur->ns, cur->name, NULL); push 0 mov edx, DWORD PTR _cur$[ebp] mov eax, DWORD PTR [edx+8] push eax mov ecx, DWORD PTR _cur$[ebp] mov edx, DWORD PTR [ecx+36] push edx mov eax, DWORD PTR _cur$[ebp] mov ecx, DWORD PTR [eax+32] push ecx call _xmlNewDocNode add esp, 16 ; 00000010H mov DWORD PTR _end$[ebp], eax ; 2252 : if (end == NULL) { cmp DWORD PTR _end$[ebp], 0 jne SHORT $LN19@xmlXInclud ; 2253 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, push 0 push OFFSET ??_C@_0BG@FIICHNCC@failed?5to?5build?5node?6@ push 1609 ; 00000649H mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov eax, DWORD PTR [edx+12] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 2254 : XML_XINCLUDE_BUILD_FAILED, ; 2255 : "failed to build node\n", NULL); ; 2256 : return(-1); or eax, -1 jmp SHORT $LN1@xmlXInclud $LN19@xmlXInclud: ; 2257 : } ; 2258 : end->type = XML_XINCLUDE_END; mov edx, DWORD PTR _end$[ebp] mov DWORD PTR [edx+4], 20 ; 00000014H ; 2259 : xmlAddNextSibling(cur, end); mov eax, DWORD PTR _end$[ebp] push eax mov ecx, DWORD PTR _cur$[ebp] push ecx call _xmlAddNextSibling add esp, 8 $LN6@xmlXInclud: ; 2260 : ; 2261 : /* ; 2262 : * Add the list of nodes ; 2263 : */ ; 2264 : while (list != NULL) { cmp DWORD PTR _list$[ebp], 0 je SHORT $LN18@xmlXInclud ; 2265 : cur = list; mov edx, DWORD PTR _list$[ebp] mov DWORD PTR _cur$[ebp], edx ; 2266 : list = list->next; mov eax, DWORD PTR _list$[ebp] mov ecx, DWORD PTR [eax+24] mov DWORD PTR _list$[ebp], ecx ; 2267 : ; 2268 : xmlAddPrevSibling(end, cur); mov edx, DWORD PTR _cur$[ebp] push edx mov eax, DWORD PTR _end$[ebp] push eax call _xmlAddPrevSibling add esp, 8 ; 2269 : } jmp SHORT $LN6@xmlXInclud $LN18@xmlXInclud: ; 2270 : } ; 2271 : ; 2272 : ; 2273 : return(0); xor eax, eax $LN1@xmlXInclud: ; 2274 : } add esp, 20 ; 00000014H cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeIncludeNode ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeLoadNode _TEXT SEGMENT _children$1 = -44 ; size = 4 _eschref$2 = -40 ; size = 4 _escbase$3 = -36 ; size = 4 _ret$ = -32 ; size = 4 _xml$ = -28 ; size = 4 _URI$ = -24 ; size = 4 _oldBase$ = -20 ; size = 4 _base$ = -16 ; size = 4 _parse$ = -12 ; size = 4 _href$ = -8 ; size = 4 _cur$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _nr$ = 12 ; size = 4 _xmlXIncludeLoadNode PROC ; COMDAT ; 2029 : xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) { push ebp mov ebp, esp sub esp, 44 ; 0000002cH push esi push edi lea edi, DWORD PTR [ebp-44] mov ecx, 11 ; 0000000bH mov eax, -858993460 ; ccccccccH rep stosd mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 2030 : xmlNodePtr cur; ; 2031 : xmlChar *href; ; 2032 : xmlChar *parse; ; 2033 : xmlChar *base; ; 2034 : xmlChar *oldBase; ; 2035 : xmlChar *URI; ; 2036 : int xml = 1; /* default Issue 64 */ mov DWORD PTR _xml$[ebp], 1 ; 2037 : int ret; ; 2038 : ; 2039 : if (ctxt == NULL) cmp DWORD PTR _ctxt$[ebp], 0 jne SHORT $LN4@xmlXInclud ; 2040 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN4@xmlXInclud: ; 2041 : if ((nr < 0) || (nr >= ctxt->incNr)) cmp DWORD PTR _nr$[ebp], 0 jl SHORT $LN6@xmlXInclud mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR _nr$[ebp] cmp ecx, DWORD PTR [eax+8] jl SHORT $LN5@xmlXInclud $LN6@xmlXInclud: ; 2042 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN5@xmlXInclud: ; 2043 : cur = ctxt->incTab[nr]->ref; mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov eax, DWORD PTR [edx+12] mov DWORD PTR _cur$[ebp], eax ; 2044 : if (cur == NULL) cmp DWORD PTR _cur$[ebp], 0 jne SHORT $LN7@xmlXInclud ; 2045 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN7@xmlXInclud: ; 2046 : ; 2047 : /* ; 2048 : * read the attributes ; 2049 : */ ; 2050 : href = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_HREF); push OFFSET ??_C@_04CMBCJJJD@href@ mov ecx, DWORD PTR _cur$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeGetProp add esp, 12 ; 0000000cH mov DWORD PTR _href$[ebp], eax ; 2051 : if (href == NULL) { cmp DWORD PTR _href$[ebp], 0 jne SHORT $LN8@xmlXInclud ; 2052 : href = xmlStrdup(BAD_CAST ""); /* @@@@ href is now optional */ push OFFSET ??_C@_00CNPNBAHC@@ call _xmlStrdup add esp, 4 mov DWORD PTR _href$[ebp], eax ; 2053 : if (href == NULL) cmp DWORD PTR _href$[ebp], 0 jne SHORT $LN8@xmlXInclud ; 2054 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN8@xmlXInclud: ; 2055 : } ; 2056 : parse = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_PARSE); push OFFSET ??_C@_05GOEGCMJM@parse@ mov eax, DWORD PTR _cur$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeGetProp add esp, 12 ; 0000000cH mov DWORD PTR _parse$[ebp], eax ; 2057 : if (parse != NULL) { cmp DWORD PTR _parse$[ebp], 0 je $LN10@xmlXInclud ; 2058 : if (xmlStrEqual(parse, XINCLUDE_PARSE_XML)) push OFFSET ??_C@_03PJHHNEEI@xml@ mov edx, DWORD PTR _parse$[ebp] push edx call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN11@xmlXInclud ; 2059 : xml = 1; mov DWORD PTR _xml$[ebp], 1 jmp $LN10@xmlXInclud $LN11@xmlXInclud: ; 2060 : else if (xmlStrEqual(parse, XINCLUDE_PARSE_TEXT)) push OFFSET ??_C@_04CIMGMMMG@text@ mov eax, DWORD PTR _parse$[ebp] push eax call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN13@xmlXInclud ; 2061 : xml = 0; mov DWORD PTR _xml$[ebp], 0 jmp SHORT $LN10@xmlXInclud $LN13@xmlXInclud: ; 2062 : else { ; 2063 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, mov ecx, DWORD PTR _parse$[ebp] push ecx push OFFSET ??_C@_0BO@KBIJIENG@invalid?5value?5?$CFs?5for?5?8parse?8?6@ push 1601 ; 00000641H mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov eax, DWORD PTR [edx+12] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 2064 : XML_XINCLUDE_PARSE_VALUE, ; 2065 : "invalid value %s for 'parse'\n", parse); ; 2066 : if (href != NULL) cmp DWORD PTR _href$[ebp], 0 je SHORT $LN15@xmlXInclud ; 2067 : xmlFree(href); mov esi, esp mov edx, DWORD PTR _href$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN15@xmlXInclud: ; 2068 : if (parse != NULL) cmp DWORD PTR _parse$[ebp], 0 je SHORT $LN16@xmlXInclud ; 2069 : xmlFree(parse); mov esi, esp mov eax, DWORD PTR _parse$[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN16@xmlXInclud: ; 2070 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN10@xmlXInclud: ; 2071 : } ; 2072 : } ; 2073 : ; 2074 : /* ; 2075 : * compute the URI ; 2076 : */ ; 2077 : base = xmlNodeGetBase(ctxt->doc, cur); mov ecx, DWORD PTR _cur$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx] push eax call _xmlNodeGetBase add esp, 8 mov DWORD PTR _base$[ebp], eax ; 2078 : if (base == NULL) { cmp DWORD PTR _base$[ebp], 0 jne SHORT $LN17@xmlXInclud ; 2079 : URI = xmlBuildURI(href, ctxt->doc->URL); mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx] mov eax, DWORD PTR [edx+72] push eax mov ecx, DWORD PTR _href$[ebp] push ecx call _xmlBuildURI add esp, 8 mov DWORD PTR _URI$[ebp], eax ; 2080 : } else { jmp SHORT $LN18@xmlXInclud $LN17@xmlXInclud: ; 2081 : URI = xmlBuildURI(href, base); mov edx, DWORD PTR _base$[ebp] push edx mov eax, DWORD PTR _href$[ebp] push eax call _xmlBuildURI add esp, 8 mov DWORD PTR _URI$[ebp], eax $LN18@xmlXInclud: ; 2082 : } ; 2083 : if (URI == NULL) { cmp DWORD PTR _URI$[ebp], 0 jne SHORT $LN19@xmlXInclud ; 2084 : xmlChar *escbase; ; 2085 : xmlChar *eschref; ; 2086 : /* ; 2087 : * Some escaping may be needed ; 2088 : */ ; 2089 : escbase = xmlURIEscape(base); mov ecx, DWORD PTR _base$[ebp] push ecx call _xmlURIEscape add esp, 4 mov DWORD PTR _escbase$3[ebp], eax ; 2090 : eschref = xmlURIEscape(href); mov edx, DWORD PTR _href$[ebp] push edx call _xmlURIEscape add esp, 4 mov DWORD PTR _eschref$2[ebp], eax ; 2091 : URI = xmlBuildURI(eschref, escbase); mov eax, DWORD PTR _escbase$3[ebp] push eax mov ecx, DWORD PTR _eschref$2[ebp] push ecx call _xmlBuildURI add esp, 8 mov DWORD PTR _URI$[ebp], eax ; 2092 : if (escbase != NULL) cmp DWORD PTR _escbase$3[ebp], 0 je SHORT $LN20@xmlXInclud ; 2093 : xmlFree(escbase); mov esi, esp mov edx, DWORD PTR _escbase$3[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN20@xmlXInclud: ; 2094 : if (eschref != NULL) cmp DWORD PTR _eschref$2[ebp], 0 je SHORT $LN19@xmlXInclud ; 2095 : xmlFree(eschref); mov esi, esp mov eax, DWORD PTR _eschref$2[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN19@xmlXInclud: ; 2096 : } ; 2097 : if (URI == NULL) { cmp DWORD PTR _URI$[ebp], 0 jne $LN22@xmlXInclud ; 2098 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, push 0 push OFFSET ??_C@_0BC@LNHFKIFC@failed?5build?5URL?6@ push 1605 ; 00000645H mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [edx+eax*4] mov edx, DWORD PTR [ecx+12] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeErr add esp, 20 ; 00000014H ; 2099 : XML_XINCLUDE_HREF_URI, "failed build URL\n", NULL); ; 2100 : if (parse != NULL) cmp DWORD PTR _parse$[ebp], 0 je SHORT $LN23@xmlXInclud ; 2101 : xmlFree(parse); mov esi, esp mov ecx, DWORD PTR _parse$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN23@xmlXInclud: ; 2102 : if (href != NULL) cmp DWORD PTR _href$[ebp], 0 je SHORT $LN24@xmlXInclud ; 2103 : xmlFree(href); mov esi, esp mov edx, DWORD PTR _href$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN24@xmlXInclud: ; 2104 : if (base != NULL) cmp DWORD PTR _base$[ebp], 0 je SHORT $LN25@xmlXInclud ; 2105 : xmlFree(base); mov esi, esp mov eax, DWORD PTR _base$[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN25@xmlXInclud: ; 2106 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN22@xmlXInclud: ; 2107 : } ; 2108 : #ifdef DEBUG_XINCLUDE ; 2109 : xmlGenericError(xmlGenericErrorContext, "parse: %s\n", ; 2110 : xml ? "xml": "text"); ; 2111 : xmlGenericError(xmlGenericErrorContext, "URI: %s\n", URI); ; 2112 : #endif ; 2113 : ; 2114 : /* ; 2115 : * Save the base for this include (saving the current one) ; 2116 : */ ; 2117 : oldBase = ctxt->base; mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+64] mov DWORD PTR _oldBase$[ebp], edx ; 2118 : ctxt->base = base; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR _base$[ebp] mov DWORD PTR [eax+64], ecx ; 2119 : ; 2120 : if (xml) { cmp DWORD PTR _xml$[ebp], 0 je SHORT $LN26@xmlXInclud ; 2121 : ret = xmlXIncludeLoadDoc(ctxt, URI, nr); mov edx, DWORD PTR _nr$[ebp] push edx mov eax, DWORD PTR _URI$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeLoadDoc add esp, 12 ; 0000000cH mov DWORD PTR _ret$[ebp], eax ; 2122 : /* xmlXIncludeGetFragment(ctxt, cur, URI); */ ; 2123 : } else { jmp SHORT $LN27@xmlXInclud $LN26@xmlXInclud: ; 2124 : ret = xmlXIncludeLoadTxt(ctxt, URI, nr); mov edx, DWORD PTR _nr$[ebp] push edx mov eax, DWORD PTR _URI$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeLoadTxt add esp, 12 ; 0000000cH mov DWORD PTR _ret$[ebp], eax $LN27@xmlXInclud: ; 2125 : } ; 2126 : ; 2127 : /* ; 2128 : * Restore the original base before checking for fallback ; 2129 : */ ; 2130 : ctxt->base = oldBase; mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR _oldBase$[ebp] mov DWORD PTR [edx+64], eax ; 2131 : ; 2132 : if (ret < 0) { cmp DWORD PTR _ret$[ebp], 0 jge $LN28@xmlXInclud ; 2133 : xmlNodePtr children; ; 2134 : ; 2135 : /* ; 2136 : * Time to try a fallback if availble ; 2137 : */ ; 2138 : #ifdef DEBUG_XINCLUDE ; 2139 : xmlGenericError(xmlGenericErrorContext, "error looking for fallback\n"); ; 2140 : #endif ; 2141 : children = cur->children; mov ecx, DWORD PTR _cur$[ebp] mov edx, DWORD PTR [ecx+12] mov DWORD PTR _children$1[ebp], edx $LN2@xmlXInclud: ; 2142 : while (children != NULL) { cmp DWORD PTR _children$1[ebp], 0 je $LN28@xmlXInclud ; 2143 : if ((children->type == XML_ELEMENT_NODE) && ; 2144 : (children->ns != NULL) && ; 2145 : (xmlStrEqual(children->name, XINCLUDE_FALLBACK)) && mov eax, DWORD PTR _children$1[ebp] cmp DWORD PTR [eax+4], 1 jne SHORT $LN29@xmlXInclud mov ecx, DWORD PTR _children$1[ebp] cmp DWORD PTR [ecx+36], 0 je SHORT $LN29@xmlXInclud push OFFSET ??_C@_08LFBOCJLE@fallback@ mov edx, DWORD PTR _children$1[ebp] mov eax, DWORD PTR [edx+8] push eax call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN29@xmlXInclud push OFFSET ??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@ mov ecx, DWORD PTR _children$1[ebp] mov edx, DWORD PTR [ecx+36] mov eax, DWORD PTR [edx+8] push eax call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN30@xmlXInclud push OFFSET ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@ mov ecx, DWORD PTR _children$1[ebp] mov edx, DWORD PTR [ecx+36] mov eax, DWORD PTR [edx+8] push eax call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN29@xmlXInclud $LN30@xmlXInclud: ; 2146 : ((xmlStrEqual(children->ns->href, XINCLUDE_NS)) || ; 2147 : (xmlStrEqual(children->ns->href, XINCLUDE_OLD_NS)))) { ; 2148 : ret = xmlXIncludeLoadFallback(ctxt, children, nr); mov ecx, DWORD PTR _nr$[ebp] push ecx mov edx, DWORD PTR _children$1[ebp] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeLoadFallback add esp, 12 ; 0000000cH mov DWORD PTR _ret$[ebp], eax ; 2149 : if (ret == 0) cmp DWORD PTR _ret$[ebp], 0 jne SHORT $LN29@xmlXInclud ; 2150 : break; jmp SHORT $LN28@xmlXInclud $LN29@xmlXInclud: ; 2151 : } ; 2152 : children = children->next; mov ecx, DWORD PTR _children$1[ebp] mov edx, DWORD PTR [ecx+24] mov DWORD PTR _children$1[ebp], edx ; 2153 : } jmp $LN2@xmlXInclud $LN28@xmlXInclud: ; 2154 : } ; 2155 : if (ret < 0) { cmp DWORD PTR _ret$[ebp], 0 jge SHORT $LN32@xmlXInclud ; 2156 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, mov eax, DWORD PTR _URI$[ebp] push eax push OFFSET ??_C@_0CO@LMECEKCE@could?5not?5load?5?$CFs?0?5and?5no?5fallb@ push 1604 ; 00000644H mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [edx+eax*4] mov edx, DWORD PTR [ecx+12] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeErr add esp, 20 ; 00000014H $LN32@xmlXInclud: ; 2157 : XML_XINCLUDE_NO_FALLBACK, ; 2158 : "could not load %s, and no fallback was found\n", ; 2159 : URI); ; 2160 : } ; 2161 : ; 2162 : /* ; 2163 : * Cleanup ; 2164 : */ ; 2165 : if (URI != NULL) cmp DWORD PTR _URI$[ebp], 0 je SHORT $LN33@xmlXInclud ; 2166 : xmlFree(URI); mov esi, esp mov ecx, DWORD PTR _URI$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN33@xmlXInclud: ; 2167 : if (parse != NULL) cmp DWORD PTR _parse$[ebp], 0 je SHORT $LN34@xmlXInclud ; 2168 : xmlFree(parse); mov esi, esp mov edx, DWORD PTR _parse$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN34@xmlXInclud: ; 2169 : if (href != NULL) cmp DWORD PTR _href$[ebp], 0 je SHORT $LN35@xmlXInclud ; 2170 : xmlFree(href); mov esi, esp mov eax, DWORD PTR _href$[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN35@xmlXInclud: ; 2171 : if (base != NULL) cmp DWORD PTR _base$[ebp], 0 je SHORT $LN36@xmlXInclud ; 2172 : xmlFree(base); mov esi, esp mov ecx, DWORD PTR _base$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN36@xmlXInclud: ; 2173 : return(0); xor eax, eax $LN1@xmlXInclud: ; 2174 : } pop edi pop esi add esp, 44 ; 0000002cH cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeLoadNode ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludePreProcessNode _TEXT SEGMENT _ctxt$ = 8 ; size = 4 _node$ = 12 ; size = 4 _xmlXIncludePreProcessNode PROC ; COMDAT ; 2014 : xmlXIncludePreProcessNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) { push ebp mov ebp, esp mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 2015 : xmlXIncludeAddNode(ctxt, node); mov eax, DWORD PTR _node$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeAddNode add esp, 8 ; 2016 : return(NULL); xor eax, eax ; 2017 : } cmp ebp, esp call __RTC_CheckEsp pop ebp ret 0 _xmlXIncludePreProcessNode ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeLoadFallback _TEXT SEGMENT _ret$ = -8 ; size = 4 _newctxt$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _fallback$ = 12 ; size = 4 _nr$ = 16 ; size = 4 _xmlXIncludeLoadFallback PROC ; COMDAT ; 1963 : xmlXIncludeLoadFallback(xmlXIncludeCtxtPtr ctxt, xmlNodePtr fallback, int nr) { push ebp mov ebp, esp sub esp, 8 mov DWORD PTR [ebp-8], -858993460 ; ccccccccH mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 1964 : xmlXIncludeCtxtPtr newctxt; ; 1965 : int ret = 0; mov DWORD PTR _ret$[ebp], 0 ; 1966 : ; 1967 : if ((fallback == NULL) || (fallback->type == XML_NAMESPACE_DECL) || cmp DWORD PTR _fallback$[ebp], 0 je SHORT $LN3@xmlXInclud mov eax, DWORD PTR _fallback$[ebp] cmp DWORD PTR [eax+4], 18 ; 00000012H je SHORT $LN3@xmlXInclud cmp DWORD PTR _ctxt$[ebp], 0 jne SHORT $LN2@xmlXInclud $LN3@xmlXInclud: ; 1968 : (ctxt == NULL)) ; 1969 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN2@xmlXInclud: ; 1970 : if (fallback->children != NULL) { mov ecx, DWORD PTR _fallback$[ebp] cmp DWORD PTR [ecx+12], 0 je $LN4@xmlXInclud ; 1971 : /* ; 1972 : * It's possible that the fallback also has 'includes' ; 1973 : * (Bug 129969), so we re-process the fallback just in case ; 1974 : */ ; 1975 : newctxt = xmlXIncludeNewContext(ctxt->doc); mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx] push eax call _xmlXIncludeNewContext add esp, 4 mov DWORD PTR _newctxt$[ebp], eax ; 1976 : if (newctxt == NULL) cmp DWORD PTR _newctxt$[ebp], 0 jne SHORT $LN6@xmlXInclud ; 1977 : return (-1); or eax, -1 jmp $LN1@xmlXInclud $LN6@xmlXInclud: ; 1978 : newctxt->_private = ctxt->_private; mov ecx, DWORD PTR _newctxt$[ebp] mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+68] mov DWORD PTR [ecx+68], eax ; 1979 : newctxt->base = xmlStrdup(ctxt->base); /* Inherit the base from the existing context */ mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+64] push edx call _xmlStrdup add esp, 4 mov ecx, DWORD PTR _newctxt$[ebp] mov DWORD PTR [ecx+64], eax ; 1980 : xmlXIncludeSetFlags(newctxt, ctxt->parseFlags); mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+60] push eax mov ecx, DWORD PTR _newctxt$[ebp] push ecx call _xmlXIncludeSetFlags add esp, 8 ; 1981 : ret = xmlXIncludeDoProcess(newctxt, ctxt->doc, fallback->children); mov edx, DWORD PTR _fallback$[ebp] mov eax, DWORD PTR [edx+12] push eax mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx] push edx mov eax, DWORD PTR _newctxt$[ebp] push eax call _xmlXIncludeDoProcess add esp, 12 ; 0000000cH mov DWORD PTR _ret$[ebp], eax ; 1982 : if (ctxt->nbErrors > 0) mov ecx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [ecx+52], 0 jle SHORT $LN7@xmlXInclud ; 1983 : ret = -1; mov DWORD PTR _ret$[ebp], -1 jmp SHORT $LN8@xmlXInclud $LN7@xmlXInclud: ; 1984 : else if (ret > 0) cmp DWORD PTR _ret$[ebp], 0 jle SHORT $LN8@xmlXInclud ; 1985 : ret = 0; /* xmlXIncludeDoProcess can return +ve number */ mov DWORD PTR _ret$[ebp], 0 $LN8@xmlXInclud: ; 1986 : xmlXIncludeFreeContext(newctxt); mov edx, DWORD PTR _newctxt$[ebp] push edx call _xmlXIncludeFreeContext add esp, 4 ; 1987 : ; 1988 : ctxt->incTab[nr]->inc = xmlDocCopyNodeList(ctxt->doc, mov eax, DWORD PTR _fallback$[ebp] mov ecx, DWORD PTR [eax+12] push ecx mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx] push eax call _xmlDocCopyNodeList add esp, 8 mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [edx+ecx*4] mov DWORD PTR [edx+16], eax ; 1989 : fallback->children); ; 1990 : } else { jmp SHORT $LN5@xmlXInclud $LN4@xmlXInclud: ; 1991 : ctxt->incTab[nr]->inc = NULL; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov DWORD PTR [eax+16], 0 ; 1992 : ctxt->incTab[nr]->emptyFb = 1; /* flag empty callback */ mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [edx+eax*4] mov DWORD PTR [ecx+32], 1 $LN5@xmlXInclud: ; 1993 : } ; 1994 : return(ret); mov eax, DWORD PTR _ret$[ebp] $LN1@xmlXInclud: ; 1995 : } add esp, 8 cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeLoadFallback ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeLoadTxt _TEXT SEGMENT tv246 = -76 ; size = 4 tv248 = -72 ; size = 4 tv247 = -68 ; size = 4 _l$1 = -60 ; size = 4 _cur$2 = -52 ; size = 4 _content$3 = -48 ; size = 4 _len$4 = -44 ; size = 4 _xinclude_multibyte_fallback_used$ = -40 ; size = 4 _inputStream$ = -36 ; size = 4 _pctxt$ = -32 ; size = 4 _enc$ = -28 ; size = 4 _encoding$ = -24 ; size = 4 _i$ = -20 ; size = 4 _URL$ = -16 ; size = 4 _uri$ = -12 ; size = 4 _node$ = -8 ; size = 4 _buf$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _url$ = 12 ; size = 4 _nr$ = 16 ; size = 4 _xmlXIncludeLoadTxt PROC ; COMDAT ; 1797 : xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) { push ebp mov ebp, esp sub esp, 76 ; 0000004cH push esi push edi lea edi, DWORD PTR [ebp-76] mov ecx, 19 ; 00000013H mov eax, -858993460 ; ccccccccH rep stosd mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 1798 : xmlParserInputBufferPtr buf; ; 1799 : xmlNodePtr node; ; 1800 : xmlURIPtr uri; ; 1801 : xmlChar *URL; ; 1802 : int i; ; 1803 : xmlChar *encoding = NULL; mov DWORD PTR _encoding$[ebp], 0 ; 1804 : xmlCharEncoding enc = (xmlCharEncoding) 0; mov DWORD PTR _enc$[ebp], 0 ; 1805 : xmlParserCtxtPtr pctxt; ; 1806 : xmlParserInputPtr inputStream; ; 1807 : int xinclude_multibyte_fallback_used = 0; mov DWORD PTR _xinclude_multibyte_fallback_used$[ebp], 0 ; 1808 : ; 1809 : /* ; 1810 : * Check the URL and remove any fragment identifier ; 1811 : */ ; 1812 : uri = xmlParseURI((const char *)url); mov eax, DWORD PTR _url$[ebp] push eax call _xmlParseURI add esp, 4 mov DWORD PTR _uri$[ebp], eax ; 1813 : if (uri == NULL) { cmp DWORD PTR _uri$[ebp], 0 jne SHORT $LN10@xmlXInclud ; 1814 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, XML_XINCLUDE_HREF_URI, mov ecx, DWORD PTR _url$[ebp] push ecx push OFFSET ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@ push 1605 ; 00000645H mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov eax, DWORD PTR [edx+12] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 1815 : "invalid value URI %s\n", url); ; 1816 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN10@xmlXInclud: ; 1817 : } ; 1818 : if (uri->fragment != NULL) { mov edx, DWORD PTR _uri$[ebp] cmp DWORD PTR [edx+32], 0 je SHORT $LN11@xmlXInclud ; 1819 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, XML_XINCLUDE_TEXT_FRAGMENT, mov eax, DWORD PTR _uri$[ebp] mov ecx, DWORD PTR [eax+32] push ecx push OFFSET ??_C@_0CM@EOJCKNLM@fragment?5identifier?5forbidden?5f@ push 1606 ; 00000646H mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov eax, DWORD PTR [edx+12] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 1820 : "fragment identifier forbidden for text: %s\n", ; 1821 : (const xmlChar *) uri->fragment); ; 1822 : xmlFreeURI(uri); mov edx, DWORD PTR _uri$[ebp] push edx call _xmlFreeURI add esp, 4 ; 1823 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN11@xmlXInclud: ; 1824 : } ; 1825 : URL = xmlSaveUri(uri); mov eax, DWORD PTR _uri$[ebp] push eax call _xmlSaveUri add esp, 4 mov DWORD PTR _URL$[ebp], eax ; 1826 : xmlFreeURI(uri); mov ecx, DWORD PTR _uri$[ebp] push ecx call _xmlFreeURI add esp, 4 ; 1827 : if (URL == NULL) { cmp DWORD PTR _URL$[ebp], 0 jne SHORT $LN12@xmlXInclud ; 1828 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, XML_XINCLUDE_HREF_URI, mov edx, DWORD PTR _url$[ebp] push edx push OFFSET ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@ push 1605 ; 00000645H mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax+12] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 1829 : "invalid value URI %s\n", url); ; 1830 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN12@xmlXInclud: ; 1831 : } ; 1832 : ; 1833 : /* ; 1834 : * Handling of references to the local document are done ; 1835 : * directly through ctxt->doc. ; 1836 : */ ; 1837 : if (URL[0] == 0) { mov eax, 1 imul ecx, eax, 0 mov edx, DWORD PTR _URL$[ebp] movzx eax, BYTE PTR [edx+ecx] test eax, eax jne SHORT $LN13@xmlXInclud ; 1838 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, push 0 push OFFSET ??_C@_0CO@JGKFOGCG@text?5serialization?5of?5document?5@ push 1607 ; 00000647H mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [edx+eax*4] mov edx, DWORD PTR [ecx+12] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeErr add esp, 20 ; 00000014H ; 1839 : XML_XINCLUDE_TEXT_DOCUMENT, ; 1840 : "text serialization of document not available\n", NULL); ; 1841 : xmlFree(URL); mov esi, esp mov ecx, DWORD PTR _URL$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1842 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN13@xmlXInclud: ; 1843 : } ; 1844 : ; 1845 : /* ; 1846 : * Prevent reloading twice the document. ; 1847 : */ ; 1848 : for (i = 0; i < ctxt->txtNr; i++) { mov DWORD PTR _i$[ebp], 0 jmp SHORT $LN4@xmlXInclud $LN2@xmlXInclud: mov edx, DWORD PTR _i$[ebp] add edx, 1 mov DWORD PTR _i$[ebp], edx $LN4@xmlXInclud: mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR _i$[ebp] cmp ecx, DWORD PTR [eax+20] jge SHORT $LN3@xmlXInclud ; 1849 : if (xmlStrEqual(URL, ctxt->txturlTab[i])) { mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+32] mov ecx, DWORD PTR _i$[ebp] mov edx, DWORD PTR [eax+ecx*4] push edx mov eax, DWORD PTR _URL$[ebp] push eax call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN14@xmlXInclud ; 1850 : node = xmlCopyNode(ctxt->txtTab[i], 1); push 1 mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+28] mov eax, DWORD PTR _i$[ebp] mov ecx, DWORD PTR [edx+eax*4] push ecx call _xmlCopyNode add esp, 8 mov DWORD PTR _node$[ebp], eax ; 1851 : goto loaded; jmp $loaded$39 $LN14@xmlXInclud: ; 1852 : } ; 1853 : } jmp SHORT $LN2@xmlXInclud $LN3@xmlXInclud: ; 1854 : /* ; 1855 : * Try to get the encoding if available ; 1856 : */ ; 1857 : if ((ctxt->incTab[nr] != NULL) && (ctxt->incTab[nr]->ref != NULL)) { mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] cmp DWORD PTR [eax+ecx*4], 0 je SHORT $LN15@xmlXInclud mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] cmp DWORD PTR [edx+12], 0 je SHORT $LN15@xmlXInclud ; 1858 : encoding = xmlGetProp(ctxt->incTab[nr]->ref, XINCLUDE_PARSE_ENCODING); push OFFSET ??_C@_08MLPGAEIK@encoding@ mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax+12] push ecx call _xmlGetProp add esp, 8 mov DWORD PTR _encoding$[ebp], eax $LN15@xmlXInclud: ; 1859 : } ; 1860 : if (encoding != NULL) { cmp DWORD PTR _encoding$[ebp], 0 je $LN16@xmlXInclud ; 1861 : /* ; 1862 : * TODO: we should not have to remap to the xmlCharEncoding ; 1863 : * predefined set, a better interface than ; 1864 : * xmlParserInputBufferCreateFilename should allow any ; 1865 : * encoding supported by iconv ; 1866 : */ ; 1867 : enc = xmlParseCharEncoding((const char *) encoding); mov edx, DWORD PTR _encoding$[ebp] push edx call _xmlParseCharEncoding add esp, 4 mov DWORD PTR _enc$[ebp], eax ; 1868 : if (enc == XML_CHAR_ENCODING_ERROR) { cmp DWORD PTR _enc$[ebp], -1 jne SHORT $LN17@xmlXInclud ; 1869 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, mov eax, DWORD PTR _encoding$[ebp] push eax push OFFSET ??_C@_0BL@EIOJIGPP@encoding?5?$CFs?5not?5supported?6@ push 1610 ; 0000064aH mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [edx+eax*4] mov edx, DWORD PTR [ecx+12] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeErr add esp, 20 ; 00000014H ; 1870 : XML_XINCLUDE_UNKNOWN_ENCODING, ; 1871 : "encoding %s not supported\n", encoding); ; 1872 : xmlFree(encoding); mov esi, esp mov ecx, DWORD PTR _encoding$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1873 : xmlFree(URL); mov esi, esp mov edx, DWORD PTR _URL$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1874 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN17@xmlXInclud: ; 1875 : } ; 1876 : xmlFree(encoding); mov esi, esp mov eax, DWORD PTR _encoding$[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN16@xmlXInclud: ; 1877 : } ; 1878 : ; 1879 : /* ; 1880 : * Load it. ; 1881 : */ ; 1882 : pctxt = xmlNewParserCtxt(); call _xmlNewParserCtxt mov DWORD PTR _pctxt$[ebp], eax ; 1883 : inputStream = xmlLoadExternalEntity((const char*)URL, NULL, pctxt); mov ecx, DWORD PTR _pctxt$[ebp] push ecx push 0 mov edx, DWORD PTR _URL$[ebp] push edx call _xmlLoadExternalEntity add esp, 12 ; 0000000cH mov DWORD PTR _inputStream$[ebp], eax ; 1884 : if(inputStream == NULL) { cmp DWORD PTR _inputStream$[ebp], 0 jne SHORT $LN18@xmlXInclud ; 1885 : xmlFreeParserCtxt(pctxt); mov eax, DWORD PTR _pctxt$[ebp] push eax call _xmlFreeParserCtxt add esp, 4 ; 1886 : xmlFree(URL); mov esi, esp mov ecx, DWORD PTR _URL$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1887 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN18@xmlXInclud: ; 1888 : } ; 1889 : buf = inputStream->buf; mov edx, DWORD PTR _inputStream$[ebp] mov eax, DWORD PTR [edx] mov DWORD PTR _buf$[ebp], eax ; 1890 : if (buf == NULL) { cmp DWORD PTR _buf$[ebp], 0 jne SHORT $LN19@xmlXInclud ; 1891 : xmlFreeInputStream (inputStream); mov ecx, DWORD PTR _inputStream$[ebp] push ecx call _xmlFreeInputStream add esp, 4 ; 1892 : xmlFreeParserCtxt(pctxt); mov edx, DWORD PTR _pctxt$[ebp] push edx call _xmlFreeParserCtxt add esp, 4 ; 1893 : xmlFree(URL); mov esi, esp mov eax, DWORD PTR _URL$[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1894 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN19@xmlXInclud: ; 1895 : } ; 1896 : if (buf->encoder) mov ecx, DWORD PTR _buf$[ebp] cmp DWORD PTR [ecx+12], 0 je SHORT $LN20@xmlXInclud ; 1897 : xmlCharEncCloseFunc(buf->encoder); mov edx, DWORD PTR _buf$[ebp] mov eax, DWORD PTR [edx+12] push eax call _xmlCharEncCloseFunc add esp, 4 $LN20@xmlXInclud: ; 1898 : buf->encoder = xmlGetCharEncodingHandler(enc); mov ecx, DWORD PTR _enc$[ebp] push ecx call _xmlGetCharEncodingHandler add esp, 4 mov edx, DWORD PTR _buf$[ebp] mov DWORD PTR [edx+12], eax ; 1899 : node = xmlNewText(NULL); push 0 call _xmlNewText add esp, 4 mov DWORD PTR _node$[ebp], eax $xinclude_multibyte_fallback$40: ; 1900 : ; 1901 : /* ; 1902 : * Scan all chars from the resource and add the to the node ; 1903 : */ ; 1904 : xinclude_multibyte_fallback: ; 1905 : while (xmlParserInputBufferRead(buf, 128) > 0) { push 128 ; 00000080H mov eax, DWORD PTR _buf$[ebp] push eax call _xmlParserInputBufferRead add esp, 8 test eax, eax jle $LN6@xmlXInclud ; 1906 : int len; ; 1907 : const xmlChar *content; ; 1908 : ; 1909 : content = xmlBufContent(buf->buffer); mov ecx, DWORD PTR _buf$[ebp] mov edx, DWORD PTR [ecx+16] push edx call _xmlBufContent add esp, 4 mov DWORD PTR _content$3[ebp], eax ; 1910 : len = xmlBufLength(buf->buffer); mov eax, DWORD PTR _buf$[ebp] mov ecx, DWORD PTR [eax+16] push ecx call _xmlBufLength add esp, 4 mov DWORD PTR _len$4[ebp], eax ; 1911 : for (i = 0;i < len;) { mov DWORD PTR _i$[ebp], 0 $LN9@xmlXInclud: mov edx, DWORD PTR _i$[ebp] cmp edx, DWORD PTR _len$4[ebp] jge $LN8@xmlXInclud ; 1912 : int cur; ; 1913 : int l; ; 1914 : ; 1915 : cur = xmlStringCurrentChar(NULL, &content[i], &l); lea eax, DWORD PTR _l$1[ebp] push eax mov ecx, DWORD PTR _content$3[ebp] add ecx, DWORD PTR _i$[ebp] push ecx push 0 call _xmlStringCurrentChar add esp, 12 ; 0000000cH mov DWORD PTR _cur$2[ebp], eax ; 1916 : if (!IS_CHAR(cur)) { cmp DWORD PTR _cur$2[ebp], 256 ; 00000100H jge SHORT $LN34@xmlXInclud cmp DWORD PTR _cur$2[ebp], 9 jl SHORT $LN26@xmlXInclud cmp DWORD PTR _cur$2[ebp], 10 ; 0000000aH jle SHORT $LN27@xmlXInclud $LN26@xmlXInclud: cmp DWORD PTR _cur$2[ebp], 13 ; 0000000dH je SHORT $LN27@xmlXInclud cmp DWORD PTR _cur$2[ebp], 32 ; 00000020H jge SHORT $LN27@xmlXInclud mov DWORD PTR tv247[ebp], 0 jmp SHORT $LN33@xmlXInclud $LN27@xmlXInclud: mov DWORD PTR tv247[ebp], 1 $LN33@xmlXInclud: mov edx, DWORD PTR tv247[ebp] mov DWORD PTR tv248[ebp], edx jmp SHORT $LN35@xmlXInclud $LN34@xmlXInclud: cmp DWORD PTR _cur$2[ebp], 256 ; 00000100H jl SHORT $LN28@xmlXInclud cmp DWORD PTR _cur$2[ebp], 55295 ; 0000d7ffH jle SHORT $LN30@xmlXInclud $LN28@xmlXInclud: cmp DWORD PTR _cur$2[ebp], 57344 ; 0000e000H jl SHORT $LN29@xmlXInclud cmp DWORD PTR _cur$2[ebp], 65533 ; 0000fffdH jle SHORT $LN30@xmlXInclud $LN29@xmlXInclud: cmp DWORD PTR _cur$2[ebp], 65536 ; 00010000H jl SHORT $LN31@xmlXInclud cmp DWORD PTR _cur$2[ebp], 1114111 ; 0010ffffH jle SHORT $LN30@xmlXInclud $LN31@xmlXInclud: mov DWORD PTR tv246[ebp], 0 jmp SHORT $LN32@xmlXInclud $LN30@xmlXInclud: mov DWORD PTR tv246[ebp], 1 $LN32@xmlXInclud: mov eax, DWORD PTR tv246[ebp] mov DWORD PTR tv248[ebp], eax $LN35@xmlXInclud: cmp DWORD PTR tv248[ebp], 0 jne $LN21@xmlXInclud ; 1917 : /* Handle splitted multibyte char at buffer boundary */ ; 1918 : if (((len - i) < 4) && (!xinclude_multibyte_fallback_used)) { mov ecx, DWORD PTR _len$4[ebp] sub ecx, DWORD PTR _i$[ebp] cmp ecx, 4 jge SHORT $LN23@xmlXInclud cmp DWORD PTR _xinclude_multibyte_fallback_used$[ebp], 0 jne SHORT $LN23@xmlXInclud ; 1919 : xinclude_multibyte_fallback_used = 1; mov DWORD PTR _xinclude_multibyte_fallback_used$[ebp], 1 ; 1920 : xmlBufShrink(buf->buffer, i); mov edx, DWORD PTR _i$[ebp] push edx mov eax, DWORD PTR _buf$[ebp] mov ecx, DWORD PTR [eax+16] push ecx call _xmlBufShrink add esp, 8 ; 1921 : goto xinclude_multibyte_fallback; jmp $xinclude_multibyte_fallback$40 ; 1922 : } else { jmp SHORT $LN24@xmlXInclud $LN23@xmlXInclud: ; 1923 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, mov edx, DWORD PTR _URL$[ebp] push edx push OFFSET ??_C@_0BK@JOLCHMFH@?$CFs?5contains?5invalid?5char?6@ push 1608 ; 00000648H mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax+12] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 1924 : XML_XINCLUDE_INVALID_CHAR, ; 1925 : "%s contains invalid char\n", URL); ; 1926 : xmlFreeParserInputBuffer(buf); mov eax, DWORD PTR _buf$[ebp] push eax call _xmlFreeParserInputBuffer add esp, 4 ; 1927 : xmlFree(URL); mov esi, esp mov ecx, DWORD PTR _URL$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1928 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN24@xmlXInclud: ; 1929 : } ; 1930 : } else { jmp SHORT $LN22@xmlXInclud $LN21@xmlXInclud: ; 1931 : xinclude_multibyte_fallback_used = 0; mov DWORD PTR _xinclude_multibyte_fallback_used$[ebp], 0 ; 1932 : xmlNodeAddContentLen(node, &content[i], l); mov edx, DWORD PTR _l$1[ebp] push edx mov eax, DWORD PTR _content$3[ebp] add eax, DWORD PTR _i$[ebp] push eax mov ecx, DWORD PTR _node$[ebp] push ecx call _xmlNodeAddContentLen add esp, 12 ; 0000000cH $LN22@xmlXInclud: ; 1933 : } ; 1934 : i += l; mov edx, DWORD PTR _i$[ebp] add edx, DWORD PTR _l$1[ebp] mov DWORD PTR _i$[ebp], edx ; 1935 : } jmp $LN9@xmlXInclud $LN8@xmlXInclud: ; 1936 : xmlBufShrink(buf->buffer, len); mov eax, DWORD PTR _len$4[ebp] push eax mov ecx, DWORD PTR _buf$[ebp] mov edx, DWORD PTR [ecx+16] push edx call _xmlBufShrink add esp, 8 ; 1937 : } jmp $xinclude_multibyte_fallback$40 $LN6@xmlXInclud: ; 1938 : xmlFreeParserCtxt(pctxt); mov eax, DWORD PTR _pctxt$[ebp] push eax call _xmlFreeParserCtxt add esp, 4 ; 1939 : xmlXIncludeAddTxt(ctxt, node, URL); mov ecx, DWORD PTR _URL$[ebp] push ecx mov edx, DWORD PTR _node$[ebp] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeAddTxt add esp, 12 ; 0000000cH ; 1940 : xmlFreeInputStream(inputStream); mov ecx, DWORD PTR _inputStream$[ebp] push ecx call _xmlFreeInputStream add esp, 4 $loaded$39: ; 1941 : ; 1942 : loaded: ; 1943 : /* ; 1944 : * Add the element as the replacement copy. ; 1945 : */ ; 1946 : ctxt->incTab[nr]->inc = node; mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov eax, DWORD PTR _node$[ebp] mov DWORD PTR [edx+16], eax ; 1947 : xmlFree(URL); mov esi, esp mov ecx, DWORD PTR _URL$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1948 : return(0); xor eax, eax $LN1@xmlXInclud: ; 1949 : } push edx mov ecx, ebp push eax lea edx, DWORD PTR $LN38@xmlXInclud call @_RTC_CheckStackVars@8 pop eax pop edx pop edi pop esi add esp, 76 ; 0000004cH cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 $LN38@xmlXInclud: DD 1 DD $LN37@xmlXInclud $LN37@xmlXInclud: DD -60 ; ffffffc4H DD 4 DD $LN36@xmlXInclud $LN36@xmlXInclud: DB 108 ; 0000006cH DB 0 _xmlXIncludeLoadTxt ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeLoadDoc _TEXT SEGMENT tv346 = -64 ; size = 4 tv311 = -60 ; size = 4 _relBase$1 = -56 ; size = 4 _xmlBase$2 = -52 ; size = 4 _curBase$3 = -48 ; size = 4 _base$4 = -44 ; size = 4 _node$5 = -40 ; size = 4 _set$6 = -36 ; size = 4 _xptrctxt$7 = -32 ; size = 4 _xptr$8 = -28 ; size = 4 _saveFlags$ = -24 ; size = 4 _i$ = -20 ; size = 4 _fragment$ = -16 ; size = 4 _URL$ = -12 ; size = 4 _uri$ = -8 ; size = 4 _doc$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _url$ = 12 ; size = 4 _nr$ = 16 ; size = 4 _xmlXIncludeLoadDoc PROC ; COMDAT ; 1404 : xmlXIncludeLoadDoc(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) { push ebp mov ebp, esp sub esp, 64 ; 00000040H push esi push edi lea edi, DWORD PTR [ebp-64] mov ecx, 16 ; 00000010H mov eax, -858993460 ; ccccccccH rep stosd mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 1405 : xmlDocPtr doc; ; 1406 : xmlURIPtr uri; ; 1407 : xmlChar *URL; ; 1408 : xmlChar *fragment = NULL; mov DWORD PTR _fragment$[ebp], 0 ; 1409 : int i = 0; mov DWORD PTR _i$[ebp], 0 ; 1410 : #ifdef LIBXML_XPTR_ENABLED ; 1411 : int saveFlags; ; 1412 : #endif ; 1413 : ; 1414 : #ifdef DEBUG_XINCLUDE ; 1415 : xmlGenericError(xmlGenericErrorContext, "Loading doc %s:%d\n", url, nr); ; 1416 : #endif ; 1417 : /* ; 1418 : * Check the URL and remove any fragment identifier ; 1419 : */ ; 1420 : uri = xmlParseURI((const char *)url); mov eax, DWORD PTR _url$[ebp] push eax call _xmlParseURI add esp, 4 mov DWORD PTR _uri$[ebp], eax ; 1421 : if (uri == NULL) { cmp DWORD PTR _uri$[ebp], 0 jne SHORT $LN17@xmlXInclud ; 1422 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, mov ecx, DWORD PTR _url$[ebp] push ecx push OFFSET ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@ push 1605 ; 00000645H mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov eax, DWORD PTR [edx+12] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 1423 : XML_XINCLUDE_HREF_URI, ; 1424 : "invalid value URI %s\n", url); ; 1425 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN17@xmlXInclud: ; 1426 : } ; 1427 : if (uri->fragment != NULL) { mov edx, DWORD PTR _uri$[ebp] cmp DWORD PTR [edx+32], 0 je SHORT $LN18@xmlXInclud ; 1428 : fragment = (xmlChar *) uri->fragment; mov eax, DWORD PTR _uri$[ebp] mov ecx, DWORD PTR [eax+32] mov DWORD PTR _fragment$[ebp], ecx ; 1429 : uri->fragment = NULL; mov edx, DWORD PTR _uri$[ebp] mov DWORD PTR [edx+32], 0 $LN18@xmlXInclud: ; 1430 : } ; 1431 : if ((ctxt->incTab != NULL) && (ctxt->incTab[nr] != NULL) && mov eax, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [eax+16], 0 je SHORT $LN19@xmlXInclud mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _nr$[ebp] cmp DWORD PTR [edx+eax*4], 0 je SHORT $LN19@xmlXInclud mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [edx+eax*4] cmp DWORD PTR [ecx+4], 0 je SHORT $LN19@xmlXInclud ; 1432 : (ctxt->incTab[nr]->fragment != NULL)) { ; 1433 : if (fragment != NULL) xmlFree(fragment); cmp DWORD PTR _fragment$[ebp], 0 je SHORT $LN20@xmlXInclud mov esi, esp mov edx, DWORD PTR _fragment$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN20@xmlXInclud: ; 1434 : fragment = xmlStrdup(ctxt->incTab[nr]->fragment); mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax+4] push ecx call _xmlStrdup add esp, 4 mov DWORD PTR _fragment$[ebp], eax $LN19@xmlXInclud: ; 1435 : } ; 1436 : URL = xmlSaveUri(uri); mov edx, DWORD PTR _uri$[ebp] push edx call _xmlSaveUri add esp, 4 mov DWORD PTR _URL$[ebp], eax ; 1437 : xmlFreeURI(uri); mov eax, DWORD PTR _uri$[ebp] push eax call _xmlFreeURI add esp, 4 ; 1438 : if (URL == NULL) { cmp DWORD PTR _URL$[ebp], 0 jne SHORT $LN21@xmlXInclud ; 1439 : if (ctxt->incTab != NULL) mov ecx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [ecx+16], 0 je SHORT $LN22@xmlXInclud ; 1440 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, mov edx, DWORD PTR _url$[ebp] push edx push OFFSET ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@ push 1605 ; 00000645H mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax+12] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeErr add esp, 20 ; 00000014H jmp SHORT $LN23@xmlXInclud $LN22@xmlXInclud: ; 1441 : XML_XINCLUDE_HREF_URI, ; 1442 : "invalid value URI %s\n", url); ; 1443 : else ; 1444 : xmlXIncludeErr(ctxt, NULL, mov eax, DWORD PTR _url$[ebp] push eax push OFFSET ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@ push 1605 ; 00000645H push 0 mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErr add esp, 20 ; 00000014H $LN23@xmlXInclud: ; 1445 : XML_XINCLUDE_HREF_URI, ; 1446 : "invalid value URI %s\n", url); ; 1447 : if (fragment != NULL) cmp DWORD PTR _fragment$[ebp], 0 je SHORT $LN24@xmlXInclud ; 1448 : xmlFree(fragment); mov esi, esp mov edx, DWORD PTR _fragment$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN24@xmlXInclud: ; 1449 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN21@xmlXInclud: ; 1450 : } ; 1451 : ; 1452 : /* ; 1453 : * Handling of references to the local document are done ; 1454 : * directly through ctxt->doc. ; 1455 : */ ; 1456 : if ((URL[0] == 0) || (URL[0] == '#') || mov eax, 1 imul ecx, eax, 0 mov edx, DWORD PTR _URL$[ebp] movzx eax, BYTE PTR [edx+ecx] test eax, eax je SHORT $LN26@xmlXInclud mov ecx, 1 imul edx, ecx, 0 mov eax, DWORD PTR _URL$[ebp] movzx ecx, BYTE PTR [eax+edx] cmp ecx, 35 ; 00000023H je SHORT $LN26@xmlXInclud mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx], 0 je SHORT $LN25@xmlXInclud mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax] mov edx, DWORD PTR [ecx+72] push edx mov eax, DWORD PTR _URL$[ebp] push eax call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN25@xmlXInclud $LN26@xmlXInclud: ; 1457 : ((ctxt->doc != NULL) && (xmlStrEqual(URL, ctxt->doc->URL)))) { ; 1458 : doc = NULL; mov DWORD PTR _doc$[ebp], 0 ; 1459 : goto loaded; jmp $loaded$75 $LN25@xmlXInclud: ; 1460 : } ; 1461 : ; 1462 : /* ; 1463 : * Prevent reloading twice the document. ; 1464 : */ ; 1465 : for (i = 0; i < ctxt->incNr; i++) { mov DWORD PTR _i$[ebp], 0 jmp SHORT $LN4@xmlXInclud $LN2@xmlXInclud: mov ecx, DWORD PTR _i$[ebp] add ecx, 1 mov DWORD PTR _i$[ebp], ecx $LN4@xmlXInclud: mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR _i$[ebp] cmp eax, DWORD PTR [edx+8] jge SHORT $LN3@xmlXInclud ; 1466 : if ((xmlStrEqual(URL, ctxt->incTab[i]->URI)) && mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _i$[ebp] mov ecx, DWORD PTR [edx+eax*4] mov edx, DWORD PTR [ecx] push edx mov eax, DWORD PTR _URL$[ebp] push eax call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN27@xmlXInclud mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _i$[ebp] mov ecx, DWORD PTR [edx+eax*4] cmp DWORD PTR [ecx+8], 0 je SHORT $LN27@xmlXInclud ; 1467 : (ctxt->incTab[i]->doc != NULL)) { ; 1468 : doc = ctxt->incTab[i]->doc; mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _i$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov eax, DWORD PTR [edx+8] mov DWORD PTR _doc$[ebp], eax ; 1469 : #ifdef DEBUG_XINCLUDE ; 1470 : printf("Already loaded %s\n", URL); ; 1471 : #endif ; 1472 : goto loaded; jmp $loaded$75 $LN27@xmlXInclud: ; 1473 : } ; 1474 : } jmp SHORT $LN2@xmlXInclud $LN3@xmlXInclud: ; 1475 : ; 1476 : /* ; 1477 : * Load it. ; 1478 : */ ; 1479 : #ifdef DEBUG_XINCLUDE ; 1480 : printf("loading %s\n", URL); ; 1481 : #endif ; 1482 : #ifdef LIBXML_XPTR_ENABLED ; 1483 : /* ; 1484 : * If this is an XPointer evaluation, we want to assure that ; 1485 : * all entities have been resolved prior to processing the ; 1486 : * referenced document ; 1487 : */ ; 1488 : saveFlags = ctxt->parseFlags; mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+60] mov DWORD PTR _saveFlags$[ebp], edx ; 1489 : if (fragment != NULL) { /* if this is an XPointer eval */ cmp DWORD PTR _fragment$[ebp], 0 je SHORT $LN28@xmlXInclud ; 1490 : ctxt->parseFlags |= XML_PARSE_NOENT; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+60] or ecx, 2 mov edx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [edx+60], ecx $LN28@xmlXInclud: ; 1491 : } ; 1492 : #endif ; 1493 : ; 1494 : doc = xmlXIncludeParseFile(ctxt, (const char *)URL); mov eax, DWORD PTR _URL$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeParseFile add esp, 8 mov DWORD PTR _doc$[ebp], eax ; 1495 : #ifdef LIBXML_XPTR_ENABLED ; 1496 : ctxt->parseFlags = saveFlags; mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR _saveFlags$[ebp] mov DWORD PTR [edx+60], eax ; 1497 : #endif ; 1498 : if (doc == NULL) { cmp DWORD PTR _doc$[ebp], 0 jne SHORT $LN29@xmlXInclud ; 1499 : xmlFree(URL); mov esi, esp mov ecx, DWORD PTR _URL$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1500 : if (fragment != NULL) cmp DWORD PTR _fragment$[ebp], 0 je SHORT $LN30@xmlXInclud ; 1501 : xmlFree(fragment); mov esi, esp mov edx, DWORD PTR _fragment$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN30@xmlXInclud: ; 1502 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN29@xmlXInclud: ; 1503 : } ; 1504 : ctxt->incTab[nr]->doc = doc; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR _doc$[ebp] mov DWORD PTR [eax+8], ecx ; 1505 : /* ; 1506 : * It's possible that the requested URL has been mapped to a ; 1507 : * completely different location (e.g. through a catalog entry). ; 1508 : * To check for this, we compare the URL with that of the doc ; 1509 : * and change it if they disagree (bug 146988). ; 1510 : */ ; 1511 : if (!xmlStrEqual(URL, doc->URL)) { mov edx, DWORD PTR _doc$[ebp] mov eax, DWORD PTR [edx+72] push eax mov ecx, DWORD PTR _URL$[ebp] push ecx call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN31@xmlXInclud ; 1512 : xmlFree(URL); mov esi, esp mov edx, DWORD PTR _URL$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1513 : URL = xmlStrdup(doc->URL); mov eax, DWORD PTR _doc$[ebp] mov ecx, DWORD PTR [eax+72] push ecx call _xmlStrdup add esp, 4 mov DWORD PTR _URL$[ebp], eax $LN31@xmlXInclud: ; 1514 : } ; 1515 : for (i = nr + 1; i < ctxt->incNr; i++) { mov edx, DWORD PTR _nr$[ebp] add edx, 1 mov DWORD PTR _i$[ebp], edx jmp SHORT $LN7@xmlXInclud $LN5@xmlXInclud: mov eax, DWORD PTR _i$[ebp] add eax, 1 mov DWORD PTR _i$[ebp], eax $LN7@xmlXInclud: mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR _i$[ebp] cmp edx, DWORD PTR [ecx+8] jge SHORT $LN6@xmlXInclud ; 1516 : if (xmlStrEqual(URL, ctxt->incTab[i]->URI)) { mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _i$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax] push ecx mov edx, DWORD PTR _URL$[ebp] push edx call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN32@xmlXInclud ; 1517 : ctxt->incTab[nr]->count++; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax+24] add ecx, 1 mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [eax+edx*4] mov DWORD PTR [eax+24], ecx ; 1518 : #ifdef DEBUG_XINCLUDE ; 1519 : printf("Increasing %s count since reused\n", URL); ; 1520 : #endif ; 1521 : break; jmp SHORT $LN6@xmlXInclud $LN32@xmlXInclud: ; 1522 : } ; 1523 : } jmp SHORT $LN5@xmlXInclud $LN6@xmlXInclud: ; 1524 : ; 1525 : /* ; 1526 : * Make sure we have all entities fixed up ; 1527 : */ ; 1528 : xmlXIncludeMergeEntities(ctxt, ctxt->doc, doc); mov ecx, DWORD PTR _doc$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeMergeEntities add esp, 12 ; 0000000cH ; 1529 : ; 1530 : /* ; 1531 : * We don't need the DTD anymore, free up space ; 1532 : if (doc->intSubset != NULL) { ; 1533 : xmlUnlinkNode((xmlNodePtr) doc->intSubset); ; 1534 : xmlFreeNode((xmlNodePtr) doc->intSubset); ; 1535 : doc->intSubset = NULL; ; 1536 : } ; 1537 : if (doc->extSubset != NULL) { ; 1538 : xmlUnlinkNode((xmlNodePtr) doc->extSubset); ; 1539 : xmlFreeNode((xmlNodePtr) doc->extSubset); ; 1540 : doc->extSubset = NULL; ; 1541 : } ; 1542 : */ ; 1543 : xmlXIncludeRecurseDoc(ctxt, doc, URL); mov edx, DWORD PTR _URL$[ebp] push edx mov eax, DWORD PTR _doc$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeRecurseDoc add esp, 12 ; 0000000cH $loaded$75: ; 1544 : ; 1545 : loaded: ; 1546 : if (fragment == NULL) { cmp DWORD PTR _fragment$[ebp], 0 jne SHORT $LN33@xmlXInclud ; 1547 : /* ; 1548 : * Add the top children list as the replacement copy. ; 1549 : */ ; 1550 : if (doc == NULL) cmp DWORD PTR _doc$[ebp], 0 jne SHORT $LN35@xmlXInclud ; 1551 : { ; 1552 : /* Hopefully a DTD declaration won't be copied from ; 1553 : * the same document */ ; 1554 : ctxt->incTab[nr]->inc = xmlCopyNodeList(ctxt->doc->children); mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx] mov ecx, DWORD PTR [eax+12] push ecx call _xmlCopyNodeList add esp, 4 mov edx, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [edx+16] mov edx, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [ecx+edx*4] mov DWORD PTR [ecx+16], eax ; 1555 : } else { jmp SHORT $LN36@xmlXInclud $LN35@xmlXInclud: ; 1556 : ctxt->incTab[nr]->inc = xmlXIncludeCopyNodeList(ctxt, ctxt->doc, mov edx, DWORD PTR _doc$[ebp] mov eax, DWORD PTR [edx+12] push eax mov ecx, DWORD PTR _doc$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeCopyNodeList add esp, 16 ; 00000010H mov edx, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [edx+16] mov edx, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [ecx+edx*4] mov DWORD PTR [ecx+16], eax $LN36@xmlXInclud: ; 1557 : doc, doc->children); ; 1558 : } ; 1559 : } jmp $LN34@xmlXInclud $LN33@xmlXInclud: ; 1560 : #ifdef LIBXML_XPTR_ENABLED ; 1561 : else { ; 1562 : /* ; 1563 : * Computes the XPointer expression and make a copy used ; 1564 : * as the replacement copy. ; 1565 : */ ; 1566 : xmlXPathObjectPtr xptr; ; 1567 : xmlXPathContextPtr xptrctxt; ; 1568 : xmlNodeSetPtr set; ; 1569 : ; 1570 : if (doc == NULL) { cmp DWORD PTR _doc$[ebp], 0 jne SHORT $LN37@xmlXInclud ; 1571 : xptrctxt = xmlXPtrNewContext(ctxt->doc, ctxt->incTab[nr]->ref, push 0 mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov eax, DWORD PTR [edx+12] push eax mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx] push edx call _xmlXPtrNewContext add esp, 12 ; 0000000cH mov DWORD PTR _xptrctxt$7[ebp], eax ; 1572 : NULL); ; 1573 : } else { jmp SHORT $LN38@xmlXInclud $LN37@xmlXInclud: ; 1574 : xptrctxt = xmlXPtrNewContext(doc, NULL, NULL); push 0 push 0 mov eax, DWORD PTR _doc$[ebp] push eax call _xmlXPtrNewContext add esp, 12 ; 0000000cH mov DWORD PTR _xptrctxt$7[ebp], eax $LN38@xmlXInclud: ; 1575 : } ; 1576 : if (xptrctxt == NULL) { cmp DWORD PTR _xptrctxt$7[ebp], 0 jne SHORT $LN39@xmlXInclud ; 1577 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, push 0 push OFFSET ??_C@_0CD@PEMEOEGM@could?5not?5create?5XPointer?5conte@ push 1612 ; 0000064cH mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [edx+eax*4] mov edx, DWORD PTR [ecx+12] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeErr add esp, 20 ; 00000014H ; 1578 : XML_XINCLUDE_XPTR_FAILED, ; 1579 : "could not create XPointer context\n", NULL); ; 1580 : xmlFree(URL); mov esi, esp mov ecx, DWORD PTR _URL$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1581 : xmlFree(fragment); mov esi, esp mov edx, DWORD PTR _fragment$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1582 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN39@xmlXInclud: ; 1583 : } ; 1584 : xptr = xmlXPtrEval(fragment, xptrctxt); mov eax, DWORD PTR _xptrctxt$7[ebp] push eax mov ecx, DWORD PTR _fragment$[ebp] push ecx call _xmlXPtrEval add esp, 8 mov DWORD PTR _xptr$8[ebp], eax ; 1585 : if (xptr == NULL) { cmp DWORD PTR _xptr$8[ebp], 0 jne SHORT $LN40@xmlXInclud ; 1586 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, mov edx, DWORD PTR _fragment$[ebp] push edx push OFFSET ??_C@_0CB@CBJIEBBP@XPointer?5evaluation?5failed?3?5?$CD?$CFs@ push 1612 ; 0000064cH mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax+12] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 1587 : XML_XINCLUDE_XPTR_FAILED, ; 1588 : "XPointer evaluation failed: #%s\n", ; 1589 : fragment); ; 1590 : xmlXPathFreeContext(xptrctxt); mov eax, DWORD PTR _xptrctxt$7[ebp] push eax call _xmlXPathFreeContext add esp, 4 ; 1591 : xmlFree(URL); mov esi, esp mov ecx, DWORD PTR _URL$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1592 : xmlFree(fragment); mov esi, esp mov edx, DWORD PTR _fragment$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1593 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN40@xmlXInclud: ; 1594 : } ; 1595 : switch (xptr->type) { mov eax, DWORD PTR _xptr$8[ebp] mov ecx, DWORD PTR [eax] mov DWORD PTR tv311[ebp], ecx cmp DWORD PTR tv311[ebp], 9 ja $LN8@xmlXInclud mov edx, DWORD PTR tv311[ebp] movzx eax, BYTE PTR $LN71@xmlXInclud[edx] jmp DWORD PTR $LN73@xmlXInclud[eax*4] $LN41@xmlXInclud: ; 1596 : case XPATH_UNDEFINED: ; 1597 : case XPATH_BOOLEAN: ; 1598 : case XPATH_NUMBER: ; 1599 : case XPATH_STRING: ; 1600 : case XPATH_POINT: ; 1601 : case XPATH_USERS: ; 1602 : case XPATH_XSLT_TREE: ; 1603 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, mov ecx, DWORD PTR _fragment$[ebp] push ecx push OFFSET ??_C@_0BO@BAOAOILH@XPointer?5is?5not?5a?5range?3?5?$CD?$CFs?6@ push 1613 ; 0000064dH mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov eax, DWORD PTR [edx+12] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 1604 : XML_XINCLUDE_XPTR_RESULT, ; 1605 : "XPointer is not a range: #%s\n", ; 1606 : fragment); ; 1607 : xmlXPathFreeContext(xptrctxt); mov edx, DWORD PTR _xptrctxt$7[ebp] push edx call _xmlXPathFreeContext add esp, 4 ; 1608 : xmlFree(URL); mov esi, esp mov eax, DWORD PTR _URL$[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1609 : xmlFree(fragment); mov esi, esp mov ecx, DWORD PTR _fragment$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1610 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN42@xmlXInclud: ; 1611 : case XPATH_NODESET: ; 1612 : if ((xptr->nodesetval == NULL) || mov edx, DWORD PTR _xptr$8[ebp] cmp DWORD PTR [edx+4], 0 je SHORT $LN44@xmlXInclud mov eax, DWORD PTR _xptr$8[ebp] mov ecx, DWORD PTR [eax+4] cmp DWORD PTR [ecx], 0 jg SHORT $LN8@xmlXInclud $LN44@xmlXInclud: ; 1613 : (xptr->nodesetval->nodeNr <= 0)) { ; 1614 : xmlXPathFreeContext(xptrctxt); mov edx, DWORD PTR _xptrctxt$7[ebp] push edx call _xmlXPathFreeContext add esp, 4 ; 1615 : xmlFree(URL); mov esi, esp mov eax, DWORD PTR _URL$[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1616 : xmlFree(fragment); mov esi, esp mov ecx, DWORD PTR _fragment$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1617 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN8@xmlXInclud: ; 1618 : } ; 1619 : ; 1620 : case XPATH_RANGE: ; 1621 : case XPATH_LOCATIONSET: ; 1622 : break; ; 1623 : } ; 1624 : set = xptr->nodesetval; mov edx, DWORD PTR _xptr$8[ebp] mov eax, DWORD PTR [edx+4] mov DWORD PTR _set$6[ebp], eax ; 1625 : if (set != NULL) { cmp DWORD PTR _set$6[ebp], 0 je $LN46@xmlXInclud ; 1626 : for (i = 0;i < set->nodeNr;i++) { mov DWORD PTR _i$[ebp], 0 jmp SHORT $LN12@xmlXInclud $LN10@xmlXInclud: mov ecx, DWORD PTR _i$[ebp] add ecx, 1 mov DWORD PTR _i$[ebp], ecx $LN12@xmlXInclud: mov edx, DWORD PTR _set$6[ebp] mov eax, DWORD PTR _i$[ebp] cmp eax, DWORD PTR [edx] jge $LN46@xmlXInclud ; 1627 : if (set->nodeTab[i] == NULL) mov ecx, DWORD PTR _set$6[ebp] mov edx, DWORD PTR [ecx+8] mov eax, DWORD PTR _i$[ebp] cmp DWORD PTR [edx+eax*4], 0 jne SHORT $LN47@xmlXInclud ; 1628 : continue; jmp SHORT $LN10@xmlXInclud $LN47@xmlXInclud: ; 1629 : switch (set->nodeTab[i]->type) { mov ecx, DWORD PTR _set$6[ebp] mov edx, DWORD PTR [ecx+8] mov eax, DWORD PTR _i$[ebp] mov ecx, DWORD PTR [edx+eax*4] mov edx, DWORD PTR [ecx+4] mov DWORD PTR tv346[ebp], edx mov eax, DWORD PTR tv346[ebp] sub eax, 1 mov DWORD PTR tv346[ebp], eax cmp DWORD PTR tv346[ebp], 20 ; 00000014H ja $LN13@xmlXInclud mov ecx, DWORD PTR tv346[ebp] movzx edx, BYTE PTR $LN72@xmlXInclud[ecx] jmp DWORD PTR $LN74@xmlXInclud[edx*4] $LN48@xmlXInclud: ; 1630 : case XML_ELEMENT_NODE: ; 1631 : case XML_TEXT_NODE: ; 1632 : case XML_CDATA_SECTION_NODE: ; 1633 : case XML_ENTITY_REF_NODE: ; 1634 : case XML_ENTITY_NODE: ; 1635 : case XML_PI_NODE: ; 1636 : case XML_COMMENT_NODE: ; 1637 : case XML_DOCUMENT_NODE: ; 1638 : case XML_HTML_DOCUMENT_NODE: ; 1639 : #ifdef LIBXML_DOCB_ENABLED ; 1640 : case XML_DOCB_DOCUMENT_NODE: ; 1641 : #endif ; 1642 : continue; jmp SHORT $LN10@xmlXInclud $LN49@xmlXInclud: ; 1643 : ; 1644 : case XML_ATTRIBUTE_NODE: ; 1645 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, mov eax, DWORD PTR _fragment$[ebp] push eax push OFFSET ??_C@_0CE@BOPHMAJL@XPointer?5selects?5an?5attribute?3?5@ push 1613 ; 0000064dH mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [edx+eax*4] mov edx, DWORD PTR [ecx+12] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeErr add esp, 20 ; 00000014H ; 1646 : XML_XINCLUDE_XPTR_RESULT, ; 1647 : "XPointer selects an attribute: #%s\n", ; 1648 : fragment); ; 1649 : set->nodeTab[i] = NULL; mov ecx, DWORD PTR _set$6[ebp] mov edx, DWORD PTR [ecx+8] mov eax, DWORD PTR _i$[ebp] mov DWORD PTR [edx+eax*4], 0 ; 1650 : continue; jmp $LN10@xmlXInclud $LN50@xmlXInclud: ; 1651 : case XML_NAMESPACE_DECL: ; 1652 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, mov ecx, DWORD PTR _fragment$[ebp] push ecx push OFFSET ??_C@_0CD@OMDJDBLC@XPointer?5selects?5a?5namespace?3?5?$CD@ push 1613 ; 0000064dH mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov eax, DWORD PTR [edx+12] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 1653 : XML_XINCLUDE_XPTR_RESULT, ; 1654 : "XPointer selects a namespace: #%s\n", ; 1655 : fragment); ; 1656 : set->nodeTab[i] = NULL; mov edx, DWORD PTR _set$6[ebp] mov eax, DWORD PTR [edx+8] mov ecx, DWORD PTR _i$[ebp] mov DWORD PTR [eax+ecx*4], 0 ; 1657 : continue; jmp $LN10@xmlXInclud $LN51@xmlXInclud: ; 1658 : case XML_DOCUMENT_TYPE_NODE: ; 1659 : case XML_DOCUMENT_FRAG_NODE: ; 1660 : case XML_NOTATION_NODE: ; 1661 : case XML_DTD_NODE: ; 1662 : case XML_ELEMENT_DECL: ; 1663 : case XML_ATTRIBUTE_DECL: ; 1664 : case XML_ENTITY_DECL: ; 1665 : case XML_XINCLUDE_START: ; 1666 : case XML_XINCLUDE_END: ; 1667 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, mov edx, DWORD PTR _fragment$[ebp] push edx push OFFSET ??_C@_0CI@NPJMIHPM@XPointer?5selects?5unexpected?5nod@ push 1613 ; 0000064dH mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax+12] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 1668 : XML_XINCLUDE_XPTR_RESULT, ; 1669 : "XPointer selects unexpected nodes: #%s\n", ; 1670 : fragment); ; 1671 : set->nodeTab[i] = NULL; mov eax, DWORD PTR _set$6[ebp] mov ecx, DWORD PTR [eax+8] mov edx, DWORD PTR _i$[ebp] mov DWORD PTR [ecx+edx*4], 0 ; 1672 : set->nodeTab[i] = NULL; mov eax, DWORD PTR _set$6[ebp] mov ecx, DWORD PTR [eax+8] mov edx, DWORD PTR _i$[ebp] mov DWORD PTR [ecx+edx*4], 0 ; 1673 : continue; /* for */ jmp $LN10@xmlXInclud $LN13@xmlXInclud: ; 1674 : } ; 1675 : } jmp $LN10@xmlXInclud $LN46@xmlXInclud: ; 1676 : } ; 1677 : if (doc == NULL) { cmp DWORD PTR _doc$[ebp], 0 jne SHORT $LN52@xmlXInclud ; 1678 : ctxt->incTab[nr]->xptr = xptr; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR _xptr$8[ebp] mov DWORD PTR [eax+28], ecx ; 1679 : ctxt->incTab[nr]->inc = NULL; mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov DWORD PTR [edx+16], 0 ; 1680 : } else { jmp SHORT $LN53@xmlXInclud $LN52@xmlXInclud: ; 1681 : ctxt->incTab[nr]->inc = mov eax, DWORD PTR _xptr$8[ebp] push eax mov ecx, DWORD PTR _doc$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeCopyXPointer add esp, 16 ; 00000010H mov edx, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [edx+16] mov edx, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [ecx+edx*4] mov DWORD PTR [ecx+16], eax ; 1682 : xmlXIncludeCopyXPointer(ctxt, ctxt->doc, doc, xptr); ; 1683 : xmlXPathFreeObject(xptr); mov edx, DWORD PTR _xptr$8[ebp] push edx call _xmlXPathFreeObject add esp, 4 $LN53@xmlXInclud: ; 1684 : } ; 1685 : xmlXPathFreeContext(xptrctxt); mov eax, DWORD PTR _xptrctxt$7[ebp] push eax call _xmlXPathFreeContext add esp, 4 ; 1686 : xmlFree(fragment); mov esi, esp mov ecx, DWORD PTR _fragment$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN34@xmlXInclud: ; 1687 : } ; 1688 : #endif ; 1689 : ; 1690 : /* ; 1691 : * Do the xml:base fixup if needed ; 1692 : */ ; 1693 : if ((doc != NULL) && (URL != NULL) && ; 1694 : (!(ctxt->parseFlags & XML_PARSE_NOBASEFIX)) && cmp DWORD PTR _doc$[ebp], 0 je $LN54@xmlXInclud cmp DWORD PTR _URL$[ebp], 0 je $LN54@xmlXInclud mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+60] and eax, 262144 ; 00040000H jne $LN54@xmlXInclud mov ecx, DWORD PTR _doc$[ebp] mov edx, DWORD PTR [ecx+88] and edx, 262144 ; 00040000H jne $LN54@xmlXInclud ; 1695 : (!(doc->parseFlags & XML_PARSE_NOBASEFIX))) { ; 1696 : xmlNodePtr node; ; 1697 : xmlChar *base; ; 1698 : xmlChar *curBase; ; 1699 : ; 1700 : /* ; 1701 : * The base is only adjusted if "necessary", i.e. if the xinclude node ; 1702 : * has a base specified, or the URL is relative ; 1703 : */ ; 1704 : base = xmlGetNsProp(ctxt->incTab[nr]->ref, BAD_CAST "base", push OFFSET ??_C@_0CF@GLDAAHFK@http?3?1?1www?4w3?4org?1XML?11998?1name@ push OFFSET ??_C@_04BHIIPFEC@base@ mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax+12] push ecx call _xmlGetNsProp add esp, 12 ; 0000000cH mov DWORD PTR _base$4[ebp], eax ; 1705 : XML_XML_NAMESPACE); ; 1706 : if (base == NULL) { cmp DWORD PTR _base$4[ebp], 0 jne SHORT $LN55@xmlXInclud ; 1707 : /* ; 1708 : * No xml:base on the xinclude node, so we check whether the ; 1709 : * URI base is different than (relative to) the context base ; 1710 : */ ; 1711 : curBase = xmlBuildRelativeURI(URL, ctxt->base); mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+64] push eax mov ecx, DWORD PTR _URL$[ebp] push ecx call _xmlBuildRelativeURI add esp, 8 mov DWORD PTR _curBase$3[ebp], eax ; 1712 : if (curBase == NULL) { /* Error return */ cmp DWORD PTR _curBase$3[ebp], 0 jne SHORT $LN56@xmlXInclud ; 1713 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, mov edx, DWORD PTR _URL$[ebp] push edx push OFFSET ??_C@_0CG@KGJNPLJO@trying?5to?5build?5relative?5URI?5fr@ push 1605 ; 00000645H mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax+12] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 1714 : XML_XINCLUDE_HREF_URI, ; 1715 : "trying to build relative URI from %s\n", URL); ; 1716 : } else { jmp SHORT $LN55@xmlXInclud $LN56@xmlXInclud: ; 1717 : /* If the URI doesn't contain a slash, it's not relative */ ; 1718 : if (!xmlStrchr(curBase, (xmlChar) '/')) push 47 ; 0000002fH mov eax, DWORD PTR _curBase$3[ebp] push eax call _xmlStrchr add esp, 8 test eax, eax jne SHORT $LN58@xmlXInclud ; 1719 : xmlFree(curBase); mov esi, esp mov ecx, DWORD PTR _curBase$3[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp jmp SHORT $LN55@xmlXInclud $LN58@xmlXInclud: ; 1720 : else ; 1721 : base = curBase; mov edx, DWORD PTR _curBase$3[ebp] mov DWORD PTR _base$4[ebp], edx $LN55@xmlXInclud: ; 1722 : } ; 1723 : } ; 1724 : if (base != NULL) { /* Adjustment may be needed */ cmp DWORD PTR _base$4[ebp], 0 je $LN54@xmlXInclud ; 1725 : node = ctxt->incTab[nr]->inc; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax+16] mov DWORD PTR _node$5[ebp], ecx $LN15@xmlXInclud: ; 1726 : while (node != NULL) { cmp DWORD PTR _node$5[ebp], 0 je $LN16@xmlXInclud ; 1727 : /* Only work on element nodes */ ; 1728 : if (node->type == XML_ELEMENT_NODE) { mov edx, DWORD PTR _node$5[ebp] cmp DWORD PTR [edx+4], 1 jne $LN61@xmlXInclud ; 1729 : curBase = xmlNodeGetBase(node->doc, node); mov eax, DWORD PTR _node$5[ebp] push eax mov ecx, DWORD PTR _node$5[ebp] mov edx, DWORD PTR [ecx+32] push edx call _xmlNodeGetBase add esp, 8 mov DWORD PTR _curBase$3[ebp], eax ; 1730 : /* If no current base, set it */ ; 1731 : if (curBase == NULL) { cmp DWORD PTR _curBase$3[ebp], 0 jne SHORT $LN62@xmlXInclud ; 1732 : xmlNodeSetBase(node, base); mov eax, DWORD PTR _base$4[ebp] push eax mov ecx, DWORD PTR _node$5[ebp] push ecx call _xmlNodeSetBase add esp, 8 ; 1733 : } else { jmp $LN61@xmlXInclud $LN62@xmlXInclud: ; 1734 : /* ; 1735 : * If the current base is the same as the ; 1736 : * URL of the document, then reset it to be ; 1737 : * the specified xml:base or the relative URI ; 1738 : */ ; 1739 : if (xmlStrEqual(curBase, node->doc->URL)) { mov edx, DWORD PTR _node$5[ebp] mov eax, DWORD PTR [edx+32] mov ecx, DWORD PTR [eax+72] push ecx mov edx, DWORD PTR _curBase$3[ebp] push edx call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN64@xmlXInclud ; 1740 : xmlNodeSetBase(node, base); mov eax, DWORD PTR _base$4[ebp] push eax mov ecx, DWORD PTR _node$5[ebp] push ecx call _xmlNodeSetBase add esp, 8 ; 1741 : } else { jmp $LN65@xmlXInclud $LN64@xmlXInclud: ; 1742 : /* ; 1743 : * If the element already has an xml:base ; 1744 : * set, then relativise it if necessary ; 1745 : */ ; 1746 : xmlChar *xmlBase; ; 1747 : xmlBase = xmlGetNsProp(node, push OFFSET ??_C@_0CF@GLDAAHFK@http?3?1?1www?4w3?4org?1XML?11998?1name@ push OFFSET ??_C@_04BHIIPFEC@base@ mov edx, DWORD PTR _node$5[ebp] push edx call _xmlGetNsProp add esp, 12 ; 0000000cH mov DWORD PTR _xmlBase$2[ebp], eax ; 1748 : BAD_CAST "base", ; 1749 : XML_XML_NAMESPACE); ; 1750 : if (xmlBase != NULL) { cmp DWORD PTR _xmlBase$2[ebp], 0 je $LN65@xmlXInclud ; 1751 : xmlChar *relBase; ; 1752 : relBase = xmlBuildURI(xmlBase, base); mov eax, DWORD PTR _base$4[ebp] push eax mov ecx, DWORD PTR _xmlBase$2[ebp] push ecx call _xmlBuildURI add esp, 8 mov DWORD PTR _relBase$1[ebp], eax ; 1753 : if (relBase == NULL) { /* error */ cmp DWORD PTR _relBase$1[ebp], 0 jne SHORT $LN67@xmlXInclud ; 1754 : xmlXIncludeErr(ctxt, mov edx, DWORD PTR _xmlBase$2[ebp] push edx push OFFSET ??_C@_0CA@DKDEEGND@trying?5to?5rebuild?5base?5from?5?$CFs?6@ push 1605 ; 00000645H mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax+12] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 1755 : ctxt->incTab[nr]->ref, ; 1756 : XML_XINCLUDE_HREF_URI, ; 1757 : "trying to rebuild base from %s\n", ; 1758 : xmlBase); ; 1759 : } else { jmp SHORT $LN68@xmlXInclud $LN67@xmlXInclud: ; 1760 : xmlNodeSetBase(node, relBase); mov eax, DWORD PTR _relBase$1[ebp] push eax mov ecx, DWORD PTR _node$5[ebp] push ecx call _xmlNodeSetBase add esp, 8 ; 1761 : xmlFree(relBase); mov esi, esp mov edx, DWORD PTR _relBase$1[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN68@xmlXInclud: ; 1762 : } ; 1763 : xmlFree(xmlBase); mov esi, esp mov eax, DWORD PTR _xmlBase$2[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN65@xmlXInclud: ; 1764 : } ; 1765 : } ; 1766 : xmlFree(curBase); mov esi, esp mov ecx, DWORD PTR _curBase$3[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN61@xmlXInclud: ; 1767 : } ; 1768 : } ; 1769 : node = node->next; mov edx, DWORD PTR _node$5[ebp] mov eax, DWORD PTR [edx+24] mov DWORD PTR _node$5[ebp], eax ; 1770 : } jmp $LN15@xmlXInclud $LN16@xmlXInclud: ; 1771 : xmlFree(base); mov esi, esp mov ecx, DWORD PTR _base$4[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN54@xmlXInclud: ; 1772 : } ; 1773 : } ; 1774 : if ((nr < ctxt->incNr) && (ctxt->incTab[nr]->doc != NULL) && mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR _nr$[ebp] cmp eax, DWORD PTR [edx+8] jge SHORT $LN69@xmlXInclud mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _nr$[ebp] mov ecx, DWORD PTR [edx+eax*4] cmp DWORD PTR [ecx+8], 0 je SHORT $LN69@xmlXInclud mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] cmp DWORD PTR [edx+24], 1 jg SHORT $LN69@xmlXInclud ; 1775 : (ctxt->incTab[nr]->count <= 1)) { ; 1776 : #ifdef DEBUG_XINCLUDE ; 1777 : printf("freeing %s\n", ctxt->incTab[nr]->doc->URL); ; 1778 : #endif ; 1779 : xmlFreeDoc(ctxt->incTab[nr]->doc); mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _nr$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax+8] push ecx call _xmlFreeDoc add esp, 4 ; 1780 : ctxt->incTab[nr]->doc = NULL; mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _nr$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov DWORD PTR [edx+8], 0 $LN69@xmlXInclud: ; 1781 : } ; 1782 : xmlFree(URL); mov esi, esp mov eax, DWORD PTR _URL$[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 1783 : return(0); xor eax, eax $LN1@xmlXInclud: ; 1784 : } pop edi pop esi add esp, 64 ; 00000040H cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 npad 2 $LN73@xmlXInclud: DD $LN41@xmlXInclud DD $LN42@xmlXInclud DD $LN8@xmlXInclud $LN71@xmlXInclud: DB 0 DB 1 DB 0 DB 0 DB 0 DB 0 DB 2 DB 2 DB 0 DB 0 npad 2 $LN74@xmlXInclud: DD $LN48@xmlXInclud DD $LN49@xmlXInclud DD $LN51@xmlXInclud DD $LN50@xmlXInclud $LN72@xmlXInclud: DB 0 DB 1 DB 0 DB 0 DB 0 DB 0 DB 0 DB 0 DB 0 DB 2 DB 2 DB 2 DB 0 DB 2 DB 2 DB 2 DB 2 DB 3 DB 2 DB 2 DB 0 _xmlXIncludeLoadDoc ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeMergeEntities _TEXT SEGMENT _data$1 = -40 ; size = 8 _data$2 = -24 ; size = 8 _source$ = -12 ; size = 4 _target$ = -8 ; size = 4 _cur$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _doc$ = 12 ; size = 4 _from$ = 16 ; size = 4 _xmlXIncludeMergeEntities PROC ; COMDAT ; 1344 : xmlDocPtr from) { push ebp mov ebp, esp sub esp, 44 ; 0000002cH push edi lea edi, DWORD PTR [ebp-44] mov ecx, 11 ; 0000000bH mov eax, -858993460 ; ccccccccH rep stosd mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 1345 : xmlNodePtr cur; ; 1346 : xmlDtdPtr target, source; ; 1347 : ; 1348 : if (ctxt == NULL) cmp DWORD PTR _ctxt$[ebp], 0 jne SHORT $LN2@xmlXInclud ; 1349 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN2@xmlXInclud: ; 1350 : ; 1351 : if ((from == NULL) || (from->intSubset == NULL)) cmp DWORD PTR _from$[ebp], 0 je SHORT $LN4@xmlXInclud mov eax, DWORD PTR _from$[ebp] cmp DWORD PTR [eax+44], 0 jne SHORT $LN3@xmlXInclud $LN4@xmlXInclud: ; 1352 : return(0); xor eax, eax jmp $LN1@xmlXInclud $LN3@xmlXInclud: ; 1353 : ; 1354 : target = doc->intSubset; mov ecx, DWORD PTR _doc$[ebp] mov edx, DWORD PTR [ecx+44] mov DWORD PTR _target$[ebp], edx ; 1355 : if (target == NULL) { cmp DWORD PTR _target$[ebp], 0 jne SHORT $LN5@xmlXInclud ; 1356 : cur = xmlDocGetRootElement(doc); mov eax, DWORD PTR _doc$[ebp] push eax call _xmlDocGetRootElement add esp, 4 mov DWORD PTR _cur$[ebp], eax ; 1357 : if (cur == NULL) cmp DWORD PTR _cur$[ebp], 0 jne SHORT $LN6@xmlXInclud ; 1358 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN6@xmlXInclud: ; 1359 : target = xmlCreateIntSubset(doc, cur->name, NULL, NULL); push 0 push 0 mov ecx, DWORD PTR _cur$[ebp] mov edx, DWORD PTR [ecx+8] push edx mov eax, DWORD PTR _doc$[ebp] push eax call _xmlCreateIntSubset add esp, 16 ; 00000010H mov DWORD PTR _target$[ebp], eax ; 1360 : if (target == NULL) cmp DWORD PTR _target$[ebp], 0 jne SHORT $LN5@xmlXInclud ; 1361 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN5@xmlXInclud: ; 1362 : } ; 1363 : ; 1364 : source = from->intSubset; mov ecx, DWORD PTR _from$[ebp] mov edx, DWORD PTR [ecx+44] mov DWORD PTR _source$[ebp], edx ; 1365 : if ((source != NULL) && (source->entities != NULL)) { cmp DWORD PTR _source$[ebp], 0 je SHORT $LN8@xmlXInclud mov eax, DWORD PTR _source$[ebp] cmp DWORD PTR [eax+48], 0 je SHORT $LN8@xmlXInclud ; 1366 : xmlXIncludeMergeData data; ; 1367 : ; 1368 : data.ctxt = ctxt; mov ecx, DWORD PTR _ctxt$[ebp] mov DWORD PTR _data$2[ebp+4], ecx ; 1369 : data.doc = doc; mov edx, DWORD PTR _doc$[ebp] mov DWORD PTR _data$2[ebp], edx ; 1370 : ; 1371 : xmlHashScan((xmlHashTablePtr) source->entities, lea eax, DWORD PTR _data$2[ebp] push eax push OFFSET _xmlXIncludeMergeEntity mov ecx, DWORD PTR _source$[ebp] mov edx, DWORD PTR [ecx+48] push edx call _xmlHashScan add esp, 12 ; 0000000cH $LN8@xmlXInclud: ; 1372 : xmlXIncludeMergeEntity, &data); ; 1373 : } ; 1374 : source = from->extSubset; mov eax, DWORD PTR _from$[ebp] mov ecx, DWORD PTR [eax+48] mov DWORD PTR _source$[ebp], ecx ; 1375 : if ((source != NULL) && (source->entities != NULL)) { cmp DWORD PTR _source$[ebp], 0 je SHORT $LN9@xmlXInclud mov edx, DWORD PTR _source$[ebp] cmp DWORD PTR [edx+48], 0 je SHORT $LN9@xmlXInclud ; 1376 : xmlXIncludeMergeData data; ; 1377 : ; 1378 : data.ctxt = ctxt; mov eax, DWORD PTR _ctxt$[ebp] mov DWORD PTR _data$1[ebp+4], eax ; 1379 : data.doc = doc; mov ecx, DWORD PTR _doc$[ebp] mov DWORD PTR _data$1[ebp], ecx ; 1380 : ; 1381 : /* ; 1382 : * don't duplicate existing stuff when external subsets are the same ; 1383 : */ ; 1384 : if ((!xmlStrEqual(target->ExternalID, source->ExternalID)) && mov edx, DWORD PTR _source$[ebp] mov eax, DWORD PTR [edx+52] push eax mov ecx, DWORD PTR _target$[ebp] mov edx, DWORD PTR [ecx+52] push edx call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN9@xmlXInclud mov eax, DWORD PTR _source$[ebp] mov ecx, DWORD PTR [eax+56] push ecx mov edx, DWORD PTR _target$[ebp] mov eax, DWORD PTR [edx+56] push eax call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN9@xmlXInclud ; 1385 : (!xmlStrEqual(target->SystemID, source->SystemID))) { ; 1386 : xmlHashScan((xmlHashTablePtr) source->entities, lea ecx, DWORD PTR _data$1[ebp] push ecx push OFFSET _xmlXIncludeMergeEntity mov edx, DWORD PTR _source$[ebp] mov eax, DWORD PTR [edx+48] push eax call _xmlHashScan add esp, 12 ; 0000000cH $LN9@xmlXInclud: ; 1387 : xmlXIncludeMergeEntity, &data); ; 1388 : } ; 1389 : } ; 1390 : return(0); xor eax, eax $LN1@xmlXInclud: ; 1391 : } push edx mov ecx, ebp push eax lea edx, DWORD PTR $LN15@xmlXInclud call @_RTC_CheckStackVars@8 pop eax pop edx pop edi add esp, 44 ; 0000002cH cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 npad 2 $LN15@xmlXInclud: DD 2 DD $LN14@xmlXInclud $LN14@xmlXInclud: DD -24 ; ffffffe8H DD 8 DD $LN12@xmlXInclud DD -40 ; ffffffd8H DD 8 DD $LN13@xmlXInclud $LN13@xmlXInclud: DB 100 ; 00000064H DB 97 ; 00000061H DB 116 ; 00000074H DB 97 ; 00000061H DB 0 $LN12@xmlXInclud: DB 100 ; 00000064H DB 97 ; 00000061H DB 116 ; 00000074H DB 97 ; 00000061H DB 0 _xmlXIncludeMergeEntities ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeMergeEntity _TEXT SEGMENT tv164 = -32 ; size = 4 tv71 = -28 ; size = 4 _ctxt$ = -24 ; size = 4 _doc$ = -20 ; size = 4 _prev$ = -16 ; size = 4 _ret$ = -12 ; size = 4 _data$ = -8 ; size = 4 _ent$ = -4 ; size = 4 _payload$ = 8 ; size = 4 _vdata$ = 12 ; size = 4 _name$ = 16 ; size = 4 _xmlXIncludeMergeEntity PROC ; COMDAT ; 1265 : const xmlChar *name ATTRIBUTE_UNUSED) { push ebp mov ebp, esp sub esp, 32 ; 00000020H mov eax, -858993460 ; ccccccccH mov DWORD PTR [ebp-32], eax mov DWORD PTR [ebp-28], eax mov DWORD PTR [ebp-24], eax mov DWORD PTR [ebp-20], eax mov DWORD PTR [ebp-16], eax mov DWORD PTR [ebp-12], eax mov DWORD PTR [ebp-8], eax mov DWORD PTR [ebp-4], eax mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 1266 : xmlEntityPtr ent = (xmlEntityPtr) payload; mov eax, DWORD PTR _payload$[ebp] mov DWORD PTR _ent$[ebp], eax ; 1267 : xmlXIncludeMergeDataPtr data = (xmlXIncludeMergeDataPtr) vdata; mov ecx, DWORD PTR _vdata$[ebp] mov DWORD PTR _data$[ebp], ecx ; 1268 : xmlEntityPtr ret, prev; ; 1269 : xmlDocPtr doc; ; 1270 : xmlXIncludeCtxtPtr ctxt; ; 1271 : ; 1272 : if ((ent == NULL) || (data == NULL)) cmp DWORD PTR _ent$[ebp], 0 je SHORT $LN7@xmlXInclud cmp DWORD PTR _data$[ebp], 0 jne SHORT $LN6@xmlXInclud $LN7@xmlXInclud: ; 1273 : return; jmp $LN1@xmlXInclud $LN6@xmlXInclud: ; 1274 : ctxt = data->ctxt; mov edx, DWORD PTR _data$[ebp] mov eax, DWORD PTR [edx+4] mov DWORD PTR _ctxt$[ebp], eax ; 1275 : doc = data->doc; mov ecx, DWORD PTR _data$[ebp] mov edx, DWORD PTR [ecx] mov DWORD PTR _doc$[ebp], edx ; 1276 : if ((ctxt == NULL) || (doc == NULL)) cmp DWORD PTR _ctxt$[ebp], 0 je SHORT $LN9@xmlXInclud cmp DWORD PTR _doc$[ebp], 0 jne SHORT $LN8@xmlXInclud $LN9@xmlXInclud: ; 1277 : return; jmp $LN1@xmlXInclud $LN8@xmlXInclud: ; 1278 : switch (ent->etype) { mov eax, DWORD PTR _ent$[ebp] mov ecx, DWORD PTR [eax+48] mov DWORD PTR tv71[ebp], ecx cmp DWORD PTR tv71[ebp], 4 jl SHORT $LN2@xmlXInclud cmp DWORD PTR tv71[ebp], 6 jle SHORT $LN10@xmlXInclud jmp SHORT $LN2@xmlXInclud $LN10@xmlXInclud: ; 1279 : case XML_INTERNAL_PARAMETER_ENTITY: ; 1280 : case XML_EXTERNAL_PARAMETER_ENTITY: ; 1281 : case XML_INTERNAL_PREDEFINED_ENTITY: ; 1282 : return; jmp $LN1@xmlXInclud $LN2@xmlXInclud: ; 1283 : case XML_INTERNAL_GENERAL_ENTITY: ; 1284 : case XML_EXTERNAL_GENERAL_PARSED_ENTITY: ; 1285 : case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY: ; 1286 : break; ; 1287 : } ; 1288 : ret = xmlAddDocEntity(doc, ent->name, ent->etype, ent->ExternalID, mov edx, DWORD PTR _ent$[ebp] mov eax, DWORD PTR [edx+40] push eax mov ecx, DWORD PTR _ent$[ebp] mov edx, DWORD PTR [ecx+56] push edx mov eax, DWORD PTR _ent$[ebp] mov ecx, DWORD PTR [eax+52] push ecx mov edx, DWORD PTR _ent$[ebp] mov eax, DWORD PTR [edx+48] push eax mov ecx, DWORD PTR _ent$[ebp] mov edx, DWORD PTR [ecx+8] push edx mov eax, DWORD PTR _doc$[ebp] push eax call _xmlAddDocEntity add esp, 24 ; 00000018H mov DWORD PTR _ret$[ebp], eax ; 1289 : ent->SystemID, ent->content); ; 1290 : if (ret != NULL) { cmp DWORD PTR _ret$[ebp], 0 je SHORT $LN12@xmlXInclud ; 1291 : if (ent->URI != NULL) mov ecx, DWORD PTR _ent$[ebp] cmp DWORD PTR [ecx+64], 0 je SHORT $LN14@xmlXInclud ; 1292 : ret->URI = xmlStrdup(ent->URI); mov edx, DWORD PTR _ent$[ebp] mov eax, DWORD PTR [edx+64] push eax call _xmlStrdup add esp, 4 mov ecx, DWORD PTR _ret$[ebp] mov DWORD PTR [ecx+64], eax $LN14@xmlXInclud: ; 1293 : } else { jmp $LN13@xmlXInclud $LN12@xmlXInclud: ; 1294 : prev = xmlGetDocEntity(doc, ent->name); mov edx, DWORD PTR _ent$[ebp] mov eax, DWORD PTR [edx+8] push eax mov ecx, DWORD PTR _doc$[ebp] push ecx call _xmlGetDocEntity add esp, 8 mov DWORD PTR _prev$[ebp], eax ; 1295 : if (prev != NULL) { cmp DWORD PTR _prev$[ebp], 0 je $LN13@xmlXInclud ; 1296 : if (ent->etype != prev->etype) mov edx, DWORD PTR _ent$[ebp] mov eax, DWORD PTR _prev$[ebp] mov ecx, DWORD PTR [edx+48] cmp ecx, DWORD PTR [eax+48] je SHORT $LN16@xmlXInclud ; 1297 : goto error; jmp $error$31 $LN16@xmlXInclud: ; 1298 : ; 1299 : if ((ent->SystemID != NULL) && (prev->SystemID != NULL)) { mov edx, DWORD PTR _ent$[ebp] cmp DWORD PTR [edx+56], 0 je SHORT $LN17@xmlXInclud mov eax, DWORD PTR _prev$[ebp] cmp DWORD PTR [eax+56], 0 je SHORT $LN17@xmlXInclud ; 1300 : if (!xmlStrEqual(ent->SystemID, prev->SystemID)) mov ecx, DWORD PTR _prev$[ebp] mov edx, DWORD PTR [ecx+56] push edx mov eax, DWORD PTR _ent$[ebp] mov ecx, DWORD PTR [eax+56] push ecx call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN19@xmlXInclud ; 1301 : goto error; jmp SHORT $error$31 $LN19@xmlXInclud: ; 1302 : } else if ((ent->ExternalID != NULL) && jmp SHORT $LN13@xmlXInclud $LN17@xmlXInclud: mov edx, DWORD PTR _ent$[ebp] cmp DWORD PTR [edx+52], 0 je SHORT $LN20@xmlXInclud mov eax, DWORD PTR _prev$[ebp] cmp DWORD PTR [eax+52], 0 je SHORT $LN20@xmlXInclud ; 1303 : (prev->ExternalID != NULL)) { ; 1304 : if (!xmlStrEqual(ent->ExternalID, prev->ExternalID)) mov ecx, DWORD PTR _prev$[ebp] mov edx, DWORD PTR [ecx+52] push edx mov eax, DWORD PTR _ent$[ebp] mov ecx, DWORD PTR [eax+52] push ecx call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN22@xmlXInclud ; 1305 : goto error; jmp SHORT $error$31 $LN22@xmlXInclud: ; 1306 : } else if ((ent->content != NULL) && (prev->content != NULL)) { jmp SHORT $LN13@xmlXInclud $LN20@xmlXInclud: mov edx, DWORD PTR _ent$[ebp] cmp DWORD PTR [edx+40], 0 je SHORT $LN23@xmlXInclud mov eax, DWORD PTR _prev$[ebp] cmp DWORD PTR [eax+40], 0 je SHORT $LN23@xmlXInclud ; 1307 : if (!xmlStrEqual(ent->content, prev->content)) mov ecx, DWORD PTR _prev$[ebp] mov edx, DWORD PTR [ecx+40] push edx mov eax, DWORD PTR _ent$[ebp] mov ecx, DWORD PTR [eax+40] push ecx call _xmlStrEqual add esp, 8 test eax, eax jne SHORT $LN25@xmlXInclud ; 1308 : goto error; jmp SHORT $error$31 $LN25@xmlXInclud: ; 1309 : } else { jmp SHORT $LN13@xmlXInclud $LN23@xmlXInclud: ; 1310 : goto error; jmp SHORT $error$31 $LN13@xmlXInclud: ; 1311 : } ; 1312 : ; 1313 : } ; 1314 : } ; 1315 : return; jmp SHORT $LN1@xmlXInclud $error$31: ; 1316 : error: ; 1317 : switch (ent->etype) { mov edx, DWORD PTR _ent$[ebp] mov eax, DWORD PTR [edx+48] mov DWORD PTR tv164[ebp], eax mov ecx, DWORD PTR tv164[ebp] sub ecx, 1 mov DWORD PTR tv164[ebp], ecx cmp DWORD PTR tv164[ebp], 5 ja SHORT $LN4@xmlXInclud mov edx, DWORD PTR tv164[ebp] movzx eax, BYTE PTR $LN29@xmlXInclud[edx] jmp DWORD PTR $LN30@xmlXInclud[eax*4] $LN26@xmlXInclud: ; 1318 : case XML_INTERNAL_PARAMETER_ENTITY: ; 1319 : case XML_EXTERNAL_PARAMETER_ENTITY: ; 1320 : case XML_INTERNAL_PREDEFINED_ENTITY: ; 1321 : case XML_INTERNAL_GENERAL_ENTITY: ; 1322 : case XML_EXTERNAL_GENERAL_PARSED_ENTITY: ; 1323 : return; jmp SHORT $LN1@xmlXInclud $LN4@xmlXInclud: ; 1324 : case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY: ; 1325 : break; ; 1326 : } ; 1327 : xmlXIncludeErr(ctxt, (xmlNodePtr) ent, XML_XINCLUDE_ENTITY_DEF_MISMATCH, mov ecx, DWORD PTR _ent$[ebp] mov edx, DWORD PTR [ecx+8] push edx push OFFSET ??_C@_0CH@PEJDIBGL@mismatch?5in?5redefinition?5of?5ent@ push 1602 ; 00000642H mov eax, DWORD PTR _ent$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErr add esp, 20 ; 00000014H $LN1@xmlXInclud: ; 1328 : "mismatch in redefinition of entity %s\n", ; 1329 : ent->name); ; 1330 : } add esp, 32 ; 00000020H cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 $LN30@xmlXInclud: DD $LN26@xmlXInclud DD $LN4@xmlXInclud $LN29@xmlXInclud: DB 0 DB 0 DB 1 DB 0 DB 0 DB 0 _xmlXIncludeMergeEntity ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeCopyXPointer _TEXT SEGMENT tv92 = -40 ; size = 4 tv85 = -36 ; size = 4 tv71 = -32 ; size = 4 _set$1 = -28 ; size = 4 _cur$2 = -24 ; size = 4 _tmp$3 = -20 ; size = 4 _set$4 = -16 ; size = 4 _i$ = -12 ; size = 4 _last$ = -8 ; size = 4 _list$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _target$ = 12 ; size = 4 _source$ = 16 ; size = 4 _obj$ = 20 ; size = 4 _xmlXIncludeCopyXPointer PROC ; COMDAT ; 1125 : xmlDocPtr source, xmlXPathObjectPtr obj) { push ebp mov ebp, esp sub esp, 40 ; 00000028H push edi lea edi, DWORD PTR [ebp-40] mov ecx, 10 ; 0000000aH mov eax, -858993460 ; ccccccccH rep stosd mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 1126 : xmlNodePtr list = NULL, last = NULL; mov DWORD PTR _list$[ebp], 0 mov DWORD PTR _last$[ebp], 0 ; 1127 : int i; ; 1128 : ; 1129 : if (source == NULL) cmp DWORD PTR _source$[ebp], 0 jne SHORT $LN18@xmlXInclud ; 1130 : source = ctxt->doc; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax] mov DWORD PTR _source$[ebp], ecx $LN18@xmlXInclud: ; 1131 : if ((ctxt == NULL) || (target == NULL) || (source == NULL) || cmp DWORD PTR _ctxt$[ebp], 0 je SHORT $LN20@xmlXInclud cmp DWORD PTR _target$[ebp], 0 je SHORT $LN20@xmlXInclud cmp DWORD PTR _source$[ebp], 0 je SHORT $LN20@xmlXInclud cmp DWORD PTR _obj$[ebp], 0 jne SHORT $LN19@xmlXInclud $LN20@xmlXInclud: ; 1132 : (obj == NULL)) ; 1133 : return(NULL); xor eax, eax jmp $LN1@xmlXInclud $LN19@xmlXInclud: ; 1134 : switch (obj->type) { mov edx, DWORD PTR _obj$[ebp] mov eax, DWORD PTR [edx] mov DWORD PTR tv71[ebp], eax cmp DWORD PTR tv71[ebp], 1 je SHORT $LN21@xmlXInclud cmp DWORD PTR tv71[ebp], 6 je $LN39@xmlXInclud cmp DWORD PTR tv71[ebp], 7 je $LN34@xmlXInclud jmp $LN2@xmlXInclud $LN21@xmlXInclud: ; 1135 : case XPATH_NODESET: { ; 1136 : xmlNodeSetPtr set = obj->nodesetval; mov ecx, DWORD PTR _obj$[ebp] mov edx, DWORD PTR [ecx+4] mov DWORD PTR _set$4[ebp], edx ; 1137 : if (set == NULL) cmp DWORD PTR _set$4[ebp], 0 jne SHORT $LN22@xmlXInclud ; 1138 : return(NULL); xor eax, eax jmp $LN1@xmlXInclud $LN22@xmlXInclud: ; 1139 : for (i = 0;i < set->nodeNr;i++) { mov DWORD PTR _i$[ebp], 0 jmp SHORT $LN6@xmlXInclud $LN4@xmlXInclud: mov eax, DWORD PTR _i$[ebp] add eax, 1 mov DWORD PTR _i$[ebp], eax $LN6@xmlXInclud: mov ecx, DWORD PTR _set$4[ebp] mov edx, DWORD PTR _i$[ebp] cmp edx, DWORD PTR [ecx] jge $LN5@xmlXInclud ; 1140 : if (set->nodeTab[i] == NULL) mov eax, DWORD PTR _set$4[ebp] mov ecx, DWORD PTR [eax+8] mov edx, DWORD PTR _i$[ebp] cmp DWORD PTR [ecx+edx*4], 0 jne SHORT $LN23@xmlXInclud ; 1141 : continue; jmp SHORT $LN4@xmlXInclud $LN23@xmlXInclud: ; 1142 : switch (set->nodeTab[i]->type) { mov eax, DWORD PTR _set$4[ebp] mov ecx, DWORD PTR [eax+8] mov edx, DWORD PTR _i$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax+4] mov DWORD PTR tv85[ebp], ecx mov edx, DWORD PTR tv85[ebp] sub edx, 2 mov DWORD PTR tv85[ebp], edx cmp DWORD PTR tv85[ebp], 17 ; 00000011H ja $LN7@xmlXInclud mov eax, DWORD PTR tv85[ebp] movzx ecx, BYTE PTR $LN45@xmlXInclud[eax] jmp DWORD PTR $LN46@xmlXInclud[ecx*4] ; 1143 : case XML_TEXT_NODE: ; 1144 : case XML_CDATA_SECTION_NODE: ; 1145 : case XML_ELEMENT_NODE: ; 1146 : case XML_ENTITY_REF_NODE: ; 1147 : case XML_ENTITY_NODE: ; 1148 : case XML_PI_NODE: ; 1149 : case XML_COMMENT_NODE: ; 1150 : case XML_DOCUMENT_NODE: ; 1151 : case XML_HTML_DOCUMENT_NODE: ; 1152 : #ifdef LIBXML_DOCB_ENABLED ; 1153 : case XML_DOCB_DOCUMENT_NODE: ; 1154 : #endif ; 1155 : case XML_XINCLUDE_END: ; 1156 : break; jmp $LN7@xmlXInclud $LN25@xmlXInclud: ; 1157 : case XML_XINCLUDE_START: { ; 1158 : xmlNodePtr tmp, cur = set->nodeTab[i]; mov edx, DWORD PTR _set$4[ebp] mov eax, DWORD PTR [edx+8] mov ecx, DWORD PTR _i$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov DWORD PTR _cur$2[ebp], edx ; 1159 : ; 1160 : cur = cur->next; mov eax, DWORD PTR _cur$2[ebp] mov ecx, DWORD PTR [eax+24] mov DWORD PTR _cur$2[ebp], ecx $LL9@xmlXInclud: ; 1161 : while (cur != NULL) { cmp DWORD PTR _cur$2[ebp], 0 je SHORT $LN10@xmlXInclud ; 1162 : switch(cur->type) { mov edx, DWORD PTR _cur$2[ebp] mov eax, DWORD PTR [edx+4] mov DWORD PTR tv92[ebp], eax cmp DWORD PTR tv92[ebp], 1 je SHORT $LN26@xmlXInclud cmp DWORD PTR tv92[ebp], 2 jle SHORT $LN11@xmlXInclud cmp DWORD PTR tv92[ebp], 8 jle SHORT $LN26@xmlXInclud jmp SHORT $LN11@xmlXInclud $LN26@xmlXInclud: ; 1163 : case XML_TEXT_NODE: ; 1164 : case XML_CDATA_SECTION_NODE: ; 1165 : case XML_ELEMENT_NODE: ; 1166 : case XML_ENTITY_REF_NODE: ; 1167 : case XML_ENTITY_NODE: ; 1168 : case XML_PI_NODE: ; 1169 : case XML_COMMENT_NODE: ; 1170 : tmp = xmlXIncludeCopyNode(ctxt, target, mov ecx, DWORD PTR _cur$2[ebp] push ecx mov edx, DWORD PTR _source$[ebp] push edx mov eax, DWORD PTR _target$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeCopyNode add esp, 16 ; 00000010H mov DWORD PTR _tmp$3[ebp], eax ; 1171 : source, cur); ; 1172 : if (last == NULL) { cmp DWORD PTR _last$[ebp], 0 jne SHORT $LN27@xmlXInclud ; 1173 : list = last = tmp; mov edx, DWORD PTR _tmp$3[ebp] mov DWORD PTR _last$[ebp], edx mov eax, DWORD PTR _last$[ebp] mov DWORD PTR _list$[ebp], eax ; 1174 : } else { jmp SHORT $LN28@xmlXInclud $LN27@xmlXInclud: ; 1175 : xmlAddNextSibling(last, tmp); mov ecx, DWORD PTR _tmp$3[ebp] push ecx mov edx, DWORD PTR _last$[ebp] push edx call _xmlAddNextSibling add esp, 8 ; 1176 : last = tmp; mov eax, DWORD PTR _tmp$3[ebp] mov DWORD PTR _last$[ebp], eax $LN28@xmlXInclud: ; 1177 : } ; 1178 : cur = cur->next; mov ecx, DWORD PTR _cur$2[ebp] mov edx, DWORD PTR [ecx+24] mov DWORD PTR _cur$2[ebp], edx ; 1179 : continue; jmp SHORT $LL9@xmlXInclud $LN11@xmlXInclud: ; 1180 : default: ; 1181 : break; ; 1182 : } ; 1183 : break; jmp SHORT $LN10@xmlXInclud ; 1184 : } jmp SHORT $LL9@xmlXInclud $LN10@xmlXInclud: ; 1185 : continue; jmp $LN4@xmlXInclud $LN30@xmlXInclud: ; 1186 : } ; 1187 : case XML_ATTRIBUTE_NODE: ; 1188 : case XML_NAMESPACE_DECL: ; 1189 : case XML_DOCUMENT_TYPE_NODE: ; 1190 : case XML_DOCUMENT_FRAG_NODE: ; 1191 : case XML_NOTATION_NODE: ; 1192 : case XML_DTD_NODE: ; 1193 : case XML_ELEMENT_DECL: ; 1194 : case XML_ATTRIBUTE_DECL: ; 1195 : case XML_ENTITY_DECL: ; 1196 : continue; /* for */ jmp $LN4@xmlXInclud $LN7@xmlXInclud: ; 1197 : } ; 1198 : if (last == NULL) cmp DWORD PTR _last$[ebp], 0 jne SHORT $LN31@xmlXInclud ; 1199 : list = last = xmlXIncludeCopyNode(ctxt, target, source, mov eax, DWORD PTR _set$4[ebp] mov ecx, DWORD PTR [eax+8] mov edx, DWORD PTR _i$[ebp] mov eax, DWORD PTR [ecx+edx*4] push eax mov ecx, DWORD PTR _source$[ebp] push ecx mov edx, DWORD PTR _target$[ebp] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeCopyNode add esp, 16 ; 00000010H mov DWORD PTR _last$[ebp], eax mov ecx, DWORD PTR _last$[ebp] mov DWORD PTR _list$[ebp], ecx jmp SHORT $LN32@xmlXInclud $LN31@xmlXInclud: ; 1200 : set->nodeTab[i]); ; 1201 : else { ; 1202 : xmlAddNextSibling(last, mov edx, DWORD PTR _set$4[ebp] mov eax, DWORD PTR [edx+8] mov ecx, DWORD PTR _i$[ebp] mov edx, DWORD PTR [eax+ecx*4] push edx mov eax, DWORD PTR _source$[ebp] push eax mov ecx, DWORD PTR _target$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeCopyNode add esp, 16 ; 00000010H push eax mov eax, DWORD PTR _last$[ebp] push eax call _xmlAddNextSibling add esp, 8 ; 1203 : xmlXIncludeCopyNode(ctxt, target, source, ; 1204 : set->nodeTab[i])); ; 1205 : if (last->next != NULL) mov ecx, DWORD PTR _last$[ebp] cmp DWORD PTR [ecx+24], 0 je SHORT $LN32@xmlXInclud ; 1206 : last = last->next; mov edx, DWORD PTR _last$[ebp] mov eax, DWORD PTR [edx+24] mov DWORD PTR _last$[ebp], eax $LN32@xmlXInclud: ; 1207 : } ; 1208 : } jmp $LN4@xmlXInclud $LN5@xmlXInclud: ; 1209 : break; jmp $LN2@xmlXInclud $LN34@xmlXInclud: ; 1210 : } ; 1211 : #ifdef LIBXML_XPTR_ENABLED ; 1212 : case XPATH_LOCATIONSET: { ; 1213 : xmlLocationSetPtr set = (xmlLocationSetPtr) obj->user; mov ecx, DWORD PTR _obj$[ebp] mov edx, DWORD PTR [ecx+28] mov DWORD PTR _set$1[ebp], edx ; 1214 : if (set == NULL) cmp DWORD PTR _set$1[ebp], 0 jne SHORT $LN35@xmlXInclud ; 1215 : return(NULL); xor eax, eax jmp $LN1@xmlXInclud $LN35@xmlXInclud: ; 1216 : for (i = 0;i < set->locNr;i++) { mov DWORD PTR _i$[ebp], 0 jmp SHORT $LN15@xmlXInclud $LN13@xmlXInclud: mov eax, DWORD PTR _i$[ebp] add eax, 1 mov DWORD PTR _i$[ebp], eax $LN15@xmlXInclud: mov ecx, DWORD PTR _set$1[ebp] mov edx, DWORD PTR _i$[ebp] cmp edx, DWORD PTR [ecx] jge SHORT $LN14@xmlXInclud ; 1217 : if (last == NULL) cmp DWORD PTR _last$[ebp], 0 jne SHORT $LN36@xmlXInclud ; 1218 : list = last = xmlXIncludeCopyXPointer(ctxt, target, source, mov eax, DWORD PTR _set$1[ebp] mov ecx, DWORD PTR [eax+8] mov edx, DWORD PTR _i$[ebp] mov eax, DWORD PTR [ecx+edx*4] push eax mov ecx, DWORD PTR _source$[ebp] push ecx mov edx, DWORD PTR _target$[ebp] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeCopyXPointer add esp, 16 ; 00000010H mov DWORD PTR _last$[ebp], eax mov ecx, DWORD PTR _last$[ebp] mov DWORD PTR _list$[ebp], ecx jmp SHORT $LN37@xmlXInclud $LN36@xmlXInclud: ; 1219 : set->locTab[i]); ; 1220 : else ; 1221 : xmlAddNextSibling(last, mov edx, DWORD PTR _set$1[ebp] mov eax, DWORD PTR [edx+8] mov ecx, DWORD PTR _i$[ebp] mov edx, DWORD PTR [eax+ecx*4] push edx mov eax, DWORD PTR _source$[ebp] push eax mov ecx, DWORD PTR _target$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeCopyXPointer add esp, 16 ; 00000010H push eax mov eax, DWORD PTR _last$[ebp] push eax call _xmlAddNextSibling add esp, 8 $LN37@xmlXInclud: ; 1222 : xmlXIncludeCopyXPointer(ctxt, target, source, ; 1223 : set->locTab[i])); ; 1224 : if (last != NULL) { cmp DWORD PTR _last$[ebp], 0 je SHORT $LN38@xmlXInclud $LL16@xmlXInclud: ; 1225 : while (last->next != NULL) mov ecx, DWORD PTR _last$[ebp] cmp DWORD PTR [ecx+24], 0 je SHORT $LN38@xmlXInclud ; 1226 : last = last->next; mov edx, DWORD PTR _last$[ebp] mov eax, DWORD PTR [edx+24] mov DWORD PTR _last$[ebp], eax jmp SHORT $LL16@xmlXInclud $LN38@xmlXInclud: ; 1227 : } ; 1228 : } jmp $LN13@xmlXInclud $LN14@xmlXInclud: ; 1229 : break; jmp SHORT $LN2@xmlXInclud $LN39@xmlXInclud: ; 1230 : } ; 1231 : case XPATH_RANGE: ; 1232 : return(xmlXIncludeCopyRange(ctxt, target, source, obj)); mov ecx, DWORD PTR _obj$[ebp] push ecx mov edx, DWORD PTR _source$[ebp] push edx mov eax, DWORD PTR _target$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeCopyRange add esp, 16 ; 00000010H jmp SHORT $LN1@xmlXInclud $LN2@xmlXInclud: ; 1233 : #endif ; 1234 : case XPATH_POINT: ; 1235 : /* points are ignored in XInclude */ ; 1236 : break; ; 1237 : default: ; 1238 : break; ; 1239 : } ; 1240 : return(list); mov eax, DWORD PTR _list$[ebp] $LN1@xmlXInclud: ; 1241 : } pop edi add esp, 40 ; 00000028H cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 $LN46@xmlXInclud: DD $LN30@xmlXInclud DD $LN25@xmlXInclud DD $LN7@xmlXInclud $LN45@xmlXInclud: DB 0 DB 2 DB 2 DB 2 DB 2 DB 2 DB 2 DB 2 DB 0 DB 0 DB 0 DB 2 DB 0 DB 0 DB 0 DB 0 DB 0 DB 1 _xmlXIncludeCopyXPointer ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeCopyRange _TEXT SEGMENT tv204 = -80 ; size = 4 _content$1 = -76 ; size = 4 _len$2 = -72 ; size = 4 _content$3 = -68 ; size = 4 _endFlag$ = -64 ; size = 4 _endLevel$ = -60 ; size = 4 _lastLevel$ = -56 ; size = 4 _level$ = -48 ; size = 4 _index2$ = -40 ; size = 4 _index1$ = -36 ; size = 4 _end$ = -32 ; size = 4 _cur$ = -28 ; size = 4 _start$ = -24 ; size = 4 _tmp2$ = -20 ; size = 4 _tmp$ = -16 ; size = 4 _listParent$ = -12 ; size = 4 _last$ = -8 ; size = 4 _list$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _target$ = 12 ; size = 4 _source$ = 16 ; size = 4 _range$ = 20 ; size = 4 _xmlXIncludeCopyRange PROC ; COMDAT ; 911 : xmlDocPtr source, xmlXPathObjectPtr range) { push ebp mov ebp, esp sub esp, 80 ; 00000050H push edi lea edi, DWORD PTR [ebp-80] mov ecx, 20 ; 00000014H mov eax, -858993460 ; ccccccccH rep stosd mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 912 : /* pointers to generated nodes */ ; 913 : xmlNodePtr list = NULL, last = NULL, listParent = NULL; mov DWORD PTR _list$[ebp], 0 mov DWORD PTR _last$[ebp], 0 mov DWORD PTR _listParent$[ebp], 0 ; 914 : xmlNodePtr tmp, tmp2; ; 915 : /* pointers to traversal nodes */ ; 916 : xmlNodePtr start, cur, end; ; 917 : int index1, index2; ; 918 : int level = 0, lastLevel = 0, endLevel = 0, endFlag = 0; mov DWORD PTR _level$[ebp], 0 mov DWORD PTR _lastLevel$[ebp], 0 mov DWORD PTR _endLevel$[ebp], 0 mov DWORD PTR _endFlag$[ebp], 0 ; 919 : ; 920 : if ((ctxt == NULL) || (target == NULL) || (source == NULL) || cmp DWORD PTR _ctxt$[ebp], 0 je SHORT $LN11@xmlXInclud cmp DWORD PTR _target$[ebp], 0 je SHORT $LN11@xmlXInclud cmp DWORD PTR _source$[ebp], 0 je SHORT $LN11@xmlXInclud cmp DWORD PTR _range$[ebp], 0 jne SHORT $LN10@xmlXInclud $LN11@xmlXInclud: ; 921 : (range == NULL)) ; 922 : return(NULL); xor eax, eax jmp $LN1@xmlXInclud $LN10@xmlXInclud: ; 923 : if (range->type != XPATH_RANGE) mov eax, DWORD PTR _range$[ebp] cmp DWORD PTR [eax], 6 je SHORT $LN12@xmlXInclud ; 924 : return(NULL); xor eax, eax jmp $LN1@xmlXInclud $LN12@xmlXInclud: ; 925 : start = (xmlNodePtr) range->user; mov ecx, DWORD PTR _range$[ebp] mov edx, DWORD PTR [ecx+28] mov DWORD PTR _start$[ebp], edx ; 926 : ; 927 : if ((start == NULL) || (start->type == XML_NAMESPACE_DECL)) cmp DWORD PTR _start$[ebp], 0 je SHORT $LN14@xmlXInclud mov eax, DWORD PTR _start$[ebp] cmp DWORD PTR [eax+4], 18 ; 00000012H jne SHORT $LN13@xmlXInclud $LN14@xmlXInclud: ; 928 : return(NULL); xor eax, eax jmp $LN1@xmlXInclud $LN13@xmlXInclud: ; 929 : end = range->user2; mov ecx, DWORD PTR _range$[ebp] mov edx, DWORD PTR [ecx+36] mov DWORD PTR _end$[ebp], edx ; 930 : if (end == NULL) cmp DWORD PTR _end$[ebp], 0 jne SHORT $LN15@xmlXInclud ; 931 : return(xmlDocCopyNode(start, target, 1)); push 1 mov eax, DWORD PTR _target$[ebp] push eax mov ecx, DWORD PTR _start$[ebp] push ecx call _xmlDocCopyNode add esp, 12 ; 0000000cH jmp $LN1@xmlXInclud $LN15@xmlXInclud: ; 932 : if (end->type == XML_NAMESPACE_DECL) mov edx, DWORD PTR _end$[ebp] cmp DWORD PTR [edx+4], 18 ; 00000012H jne SHORT $LN16@xmlXInclud ; 933 : return(NULL); xor eax, eax jmp $LN1@xmlXInclud $LN16@xmlXInclud: ; 934 : ; 935 : cur = start; mov eax, DWORD PTR _start$[ebp] mov DWORD PTR _cur$[ebp], eax ; 936 : index1 = range->index; mov ecx, DWORD PTR _range$[ebp] mov edx, DWORD PTR [ecx+32] mov DWORD PTR _index1$[ebp], edx ; 937 : index2 = range->index2; mov eax, DWORD PTR _range$[ebp] mov ecx, DWORD PTR [eax+40] mov DWORD PTR _index2$[ebp], ecx $LN2@xmlXInclud: ; 938 : /* ; 939 : * level is depth of the current node under consideration ; 940 : * list is the pointer to the root of the output tree ; 941 : * listParent is a pointer to the parent of output tree (within ; 942 : the included file) in case we need to add another level ; 943 : * last is a pointer to the last node added to the output tree ; 944 : * lastLevel is the depth of last (relative to the root) ; 945 : */ ; 946 : while (cur != NULL) { cmp DWORD PTR _cur$[ebp], 0 je $LN3@xmlXInclud ; 947 : /* ; 948 : * Check if our output tree needs a parent ; 949 : */ ; 950 : if (level < 0) { cmp DWORD PTR _level$[ebp], 0 jge SHORT $LN6@xmlXInclud $LN4@xmlXInclud: ; 951 : while (level < 0) { cmp DWORD PTR _level$[ebp], 0 jge SHORT $LN5@xmlXInclud ; 952 : /* copy must include namespaces and properties */ ; 953 : tmp2 = xmlDocCopyNode(listParent, target, 2); push 2 mov edx, DWORD PTR _target$[ebp] push edx mov eax, DWORD PTR _listParent$[ebp] push eax call _xmlDocCopyNode add esp, 12 ; 0000000cH mov DWORD PTR _tmp2$[ebp], eax ; 954 : xmlAddChild(tmp2, list); mov ecx, DWORD PTR _list$[ebp] push ecx mov edx, DWORD PTR _tmp2$[ebp] push edx call _xmlAddChild add esp, 8 ; 955 : list = tmp2; mov eax, DWORD PTR _tmp2$[ebp] mov DWORD PTR _list$[ebp], eax ; 956 : listParent = listParent->parent; mov ecx, DWORD PTR _listParent$[ebp] mov edx, DWORD PTR [ecx+20] mov DWORD PTR _listParent$[ebp], edx ; 957 : level++; mov eax, DWORD PTR _level$[ebp] add eax, 1 mov DWORD PTR _level$[ebp], eax ; 958 : } jmp SHORT $LN4@xmlXInclud $LN5@xmlXInclud: ; 959 : last = list; mov ecx, DWORD PTR _list$[ebp] mov DWORD PTR _last$[ebp], ecx ; 960 : lastLevel = 0; mov DWORD PTR _lastLevel$[ebp], 0 $LN6@xmlXInclud: ; 961 : } ; 962 : /* ; 963 : * Check whether we need to change our insertion point ; 964 : */ ; 965 : while (level < lastLevel) { mov edx, DWORD PTR _level$[ebp] cmp edx, DWORD PTR _lastLevel$[ebp] jge SHORT $LN7@xmlXInclud ; 966 : last = last->parent; mov eax, DWORD PTR _last$[ebp] mov ecx, DWORD PTR [eax+20] mov DWORD PTR _last$[ebp], ecx ; 967 : lastLevel --; mov edx, DWORD PTR _lastLevel$[ebp] sub edx, 1 mov DWORD PTR _lastLevel$[ebp], edx ; 968 : } jmp SHORT $LN6@xmlXInclud $LN7@xmlXInclud: ; 969 : if (cur == end) { /* Are we at the end of the range? */ mov eax, DWORD PTR _cur$[ebp] cmp eax, DWORD PTR _end$[ebp] jne $LN18@xmlXInclud ; 970 : if (cur->type == XML_TEXT_NODE) { mov ecx, DWORD PTR _cur$[ebp] cmp DWORD PTR [ecx+4], 3 jne $LN20@xmlXInclud ; 971 : const xmlChar *content = cur->content; mov edx, DWORD PTR _cur$[ebp] mov eax, DWORD PTR [edx+40] mov DWORD PTR _content$3[ebp], eax ; 972 : int len; ; 973 : ; 974 : if (content == NULL) { cmp DWORD PTR _content$3[ebp], 0 jne SHORT $LN22@xmlXInclud ; 975 : tmp = xmlNewTextLen(NULL, 0); push 0 push 0 call _xmlNewTextLen add esp, 8 mov DWORD PTR _tmp$[ebp], eax ; 976 : } else { jmp SHORT $LN23@xmlXInclud $LN22@xmlXInclud: ; 977 : len = index2; mov ecx, DWORD PTR _index2$[ebp] mov DWORD PTR _len$2[ebp], ecx ; 978 : if ((cur == start) && (index1 > 1)) { mov edx, DWORD PTR _cur$[ebp] cmp edx, DWORD PTR _start$[ebp] jne SHORT $LN24@xmlXInclud cmp DWORD PTR _index1$[ebp], 1 jle SHORT $LN24@xmlXInclud ; 979 : content += (index1 - 1); mov eax, DWORD PTR _index1$[ebp] mov ecx, DWORD PTR _content$3[ebp] lea edx, DWORD PTR [ecx+eax-1] mov DWORD PTR _content$3[ebp], edx ; 980 : len -= (index1 - 1); mov eax, DWORD PTR _index1$[ebp] sub eax, 1 mov ecx, DWORD PTR _len$2[ebp] sub ecx, eax mov DWORD PTR _len$2[ebp], ecx ; 981 : } else { jmp SHORT $LN25@xmlXInclud $LN24@xmlXInclud: ; 982 : len = index2; mov edx, DWORD PTR _index2$[ebp] mov DWORD PTR _len$2[ebp], edx $LN25@xmlXInclud: ; 983 : } ; 984 : tmp = xmlNewTextLen(content, len); mov eax, DWORD PTR _len$2[ebp] push eax mov ecx, DWORD PTR _content$3[ebp] push ecx call _xmlNewTextLen add esp, 8 mov DWORD PTR _tmp$[ebp], eax $LN23@xmlXInclud: ; 985 : } ; 986 : /* single sub text node selection */ ; 987 : if (list == NULL) cmp DWORD PTR _list$[ebp], 0 jne SHORT $LN26@xmlXInclud ; 988 : return(tmp); mov eax, DWORD PTR _tmp$[ebp] jmp $LN1@xmlXInclud $LN26@xmlXInclud: ; 989 : /* prune and return full set */ ; 990 : if (level == lastLevel) mov edx, DWORD PTR _level$[ebp] cmp edx, DWORD PTR _lastLevel$[ebp] jne SHORT $LN27@xmlXInclud ; 991 : xmlAddNextSibling(last, tmp); mov eax, DWORD PTR _tmp$[ebp] push eax mov ecx, DWORD PTR _last$[ebp] push ecx call _xmlAddNextSibling add esp, 8 jmp SHORT $LN28@xmlXInclud $LN27@xmlXInclud: ; 992 : else ; 993 : xmlAddChild(last, tmp); mov edx, DWORD PTR _tmp$[ebp] push edx mov eax, DWORD PTR _last$[ebp] push eax call _xmlAddChild add esp, 8 $LN28@xmlXInclud: ; 994 : return(list); mov eax, DWORD PTR _list$[ebp] jmp $LN1@xmlXInclud ; 995 : } else { /* ending node not a text node */ jmp $LN21@xmlXInclud $LN20@xmlXInclud: ; 996 : endLevel = level; /* remember the level of the end node */ mov ecx, DWORD PTR _level$[ebp] mov DWORD PTR _endLevel$[ebp], ecx ; 997 : endFlag = 1; mov DWORD PTR _endFlag$[ebp], 1 ; 998 : /* last node - need to take care of properties + namespaces */ ; 999 : tmp = xmlDocCopyNode(cur, target, 2); push 2 mov edx, DWORD PTR _target$[ebp] push edx mov eax, DWORD PTR _cur$[ebp] push eax call _xmlDocCopyNode add esp, 12 ; 0000000cH mov DWORD PTR _tmp$[ebp], eax ; 1000 : if (list == NULL) { cmp DWORD PTR _list$[ebp], 0 jne SHORT $LN29@xmlXInclud ; 1001 : list = tmp; mov ecx, DWORD PTR _tmp$[ebp] mov DWORD PTR _list$[ebp], ecx ; 1002 : listParent = cur->parent; mov edx, DWORD PTR _cur$[ebp] mov eax, DWORD PTR [edx+20] mov DWORD PTR _listParent$[ebp], eax ; 1003 : } else { jmp SHORT $LN30@xmlXInclud $LN29@xmlXInclud: ; 1004 : if (level == lastLevel) mov ecx, DWORD PTR _level$[ebp] cmp ecx, DWORD PTR _lastLevel$[ebp] jne SHORT $LN31@xmlXInclud ; 1005 : xmlAddNextSibling(last, tmp); mov edx, DWORD PTR _tmp$[ebp] push edx mov eax, DWORD PTR _last$[ebp] push eax call _xmlAddNextSibling add esp, 8 jmp SHORT $LN30@xmlXInclud $LN31@xmlXInclud: ; 1006 : else { ; 1007 : xmlAddChild(last, tmp); mov ecx, DWORD PTR _tmp$[ebp] push ecx mov edx, DWORD PTR _last$[ebp] push edx call _xmlAddChild add esp, 8 ; 1008 : lastLevel = level; mov eax, DWORD PTR _level$[ebp] mov DWORD PTR _lastLevel$[ebp], eax $LN30@xmlXInclud: ; 1009 : } ; 1010 : } ; 1011 : last = tmp; mov ecx, DWORD PTR _tmp$[ebp] mov DWORD PTR _last$[ebp], ecx ; 1012 : ; 1013 : if (index2 > 1) { cmp DWORD PTR _index2$[ebp], 1 jle SHORT $LN33@xmlXInclud ; 1014 : end = xmlXIncludeGetNthChild(cur, index2 - 1); mov edx, DWORD PTR _index2$[ebp] sub edx, 1 push edx mov eax, DWORD PTR _cur$[ebp] push eax call _xmlXIncludeGetNthChild add esp, 8 mov DWORD PTR _end$[ebp], eax ; 1015 : index2 = 0; mov DWORD PTR _index2$[ebp], 0 $LN33@xmlXInclud: ; 1016 : } ; 1017 : if ((cur == start) && (index1 > 1)) { mov ecx, DWORD PTR _cur$[ebp] cmp ecx, DWORD PTR _start$[ebp] jne SHORT $LN34@xmlXInclud cmp DWORD PTR _index1$[ebp], 1 jle SHORT $LN34@xmlXInclud ; 1018 : cur = xmlXIncludeGetNthChild(cur, index1 - 1); mov edx, DWORD PTR _index1$[ebp] sub edx, 1 push edx mov eax, DWORD PTR _cur$[ebp] push eax call _xmlXIncludeGetNthChild add esp, 8 mov DWORD PTR _cur$[ebp], eax ; 1019 : index1 = 0; mov DWORD PTR _index1$[ebp], 0 ; 1020 : } else { jmp SHORT $LN35@xmlXInclud $LN34@xmlXInclud: ; 1021 : cur = cur->children; mov ecx, DWORD PTR _cur$[ebp] mov edx, DWORD PTR [ecx+12] mov DWORD PTR _cur$[ebp], edx $LN35@xmlXInclud: ; 1022 : } ; 1023 : level++; /* increment level to show change */ mov eax, DWORD PTR _level$[ebp] add eax, 1 mov DWORD PTR _level$[ebp], eax ; 1024 : /* ; 1025 : * Now gather the remaining nodes from cur to end ; 1026 : */ ; 1027 : continue; /* while */ jmp $LN2@xmlXInclud $LN21@xmlXInclud: ; 1028 : } jmp $LN19@xmlXInclud $LN18@xmlXInclud: ; 1029 : } else if (cur == start) { /* Not at the end, are we at start? */ mov ecx, DWORD PTR _cur$[ebp] cmp ecx, DWORD PTR _start$[ebp] jne $LN36@xmlXInclud ; 1030 : if ((cur->type == XML_TEXT_NODE) || mov edx, DWORD PTR _cur$[ebp] cmp DWORD PTR [edx+4], 3 je SHORT $LN40@xmlXInclud mov eax, DWORD PTR _cur$[ebp] cmp DWORD PTR [eax+4], 4 jne SHORT $LN38@xmlXInclud $LN40@xmlXInclud: ; 1031 : (cur->type == XML_CDATA_SECTION_NODE)) { ; 1032 : const xmlChar *content = cur->content; mov ecx, DWORD PTR _cur$[ebp] mov edx, DWORD PTR [ecx+40] mov DWORD PTR _content$1[ebp], edx ; 1033 : ; 1034 : if (content == NULL) { cmp DWORD PTR _content$1[ebp], 0 jne SHORT $LN41@xmlXInclud ; 1035 : tmp = xmlNewTextLen(NULL, 0); push 0 push 0 call _xmlNewTextLen add esp, 8 mov DWORD PTR _tmp$[ebp], eax ; 1036 : } else { jmp SHORT $LN42@xmlXInclud $LN41@xmlXInclud: ; 1037 : if (index1 > 1) { cmp DWORD PTR _index1$[ebp], 1 jle SHORT $LN43@xmlXInclud ; 1038 : content += (index1 - 1); mov eax, DWORD PTR _index1$[ebp] mov ecx, DWORD PTR _content$1[ebp] lea edx, DWORD PTR [ecx+eax-1] mov DWORD PTR _content$1[ebp], edx ; 1039 : index1 = 0; mov DWORD PTR _index1$[ebp], 0 $LN43@xmlXInclud: ; 1040 : } ; 1041 : tmp = xmlNewText(content); mov eax, DWORD PTR _content$1[ebp] push eax call _xmlNewText add esp, 4 mov DWORD PTR _tmp$[ebp], eax $LN42@xmlXInclud: ; 1042 : } ; 1043 : last = list = tmp; mov ecx, DWORD PTR _tmp$[ebp] mov DWORD PTR _list$[ebp], ecx mov edx, DWORD PTR _list$[ebp] mov DWORD PTR _last$[ebp], edx ; 1044 : listParent = cur->parent; mov eax, DWORD PTR _cur$[ebp] mov ecx, DWORD PTR [eax+20] mov DWORD PTR _listParent$[ebp], ecx ; 1045 : } else { /* Not text node */ jmp SHORT $LN39@xmlXInclud $LN38@xmlXInclud: ; 1046 : /* ; 1047 : * start of the range - need to take care of ; 1048 : * properties and namespaces ; 1049 : */ ; 1050 : tmp = xmlDocCopyNode(cur, target, 2); push 2 mov edx, DWORD PTR _target$[ebp] push edx mov eax, DWORD PTR _cur$[ebp] push eax call _xmlDocCopyNode add esp, 12 ; 0000000cH mov DWORD PTR _tmp$[ebp], eax ; 1051 : list = last = tmp; mov ecx, DWORD PTR _tmp$[ebp] mov DWORD PTR _last$[ebp], ecx mov edx, DWORD PTR _last$[ebp] mov DWORD PTR _list$[ebp], edx ; 1052 : listParent = cur->parent; mov eax, DWORD PTR _cur$[ebp] mov ecx, DWORD PTR [eax+20] mov DWORD PTR _listParent$[ebp], ecx ; 1053 : if (index1 > 1) { /* Do we need to position? */ cmp DWORD PTR _index1$[ebp], 1 jle SHORT $LN39@xmlXInclud ; 1054 : cur = xmlXIncludeGetNthChild(cur, index1 - 1); mov edx, DWORD PTR _index1$[ebp] sub edx, 1 push edx mov eax, DWORD PTR _cur$[ebp] push eax call _xmlXIncludeGetNthChild add esp, 8 mov DWORD PTR _cur$[ebp], eax ; 1055 : level = lastLevel = 1; mov DWORD PTR _lastLevel$[ebp], 1 mov ecx, DWORD PTR _lastLevel$[ebp] mov DWORD PTR _level$[ebp], ecx ; 1056 : index1 = 0; mov DWORD PTR _index1$[ebp], 0 ; 1057 : /* ; 1058 : * Now gather the remaining nodes from cur to end ; 1059 : */ ; 1060 : continue; /* while */ jmp $LN2@xmlXInclud $LN39@xmlXInclud: ; 1061 : } ; 1062 : } ; 1063 : } else { jmp $LN19@xmlXInclud $LN36@xmlXInclud: ; 1064 : tmp = NULL; mov DWORD PTR _tmp$[ebp], 0 ; 1065 : switch (cur->type) { mov edx, DWORD PTR _cur$[ebp] mov eax, DWORD PTR [edx+4] mov DWORD PTR tv204[ebp], eax mov ecx, DWORD PTR tv204[ebp] sub ecx, 2 mov DWORD PTR tv204[ebp], ecx cmp DWORD PTR tv204[ebp], 18 ; 00000012H ja SHORT $LN49@xmlXInclud mov edx, DWORD PTR tv204[ebp] movzx eax, BYTE PTR $LN57@xmlXInclud[edx] jmp DWORD PTR $LN61@xmlXInclud[eax*4] $LN45@xmlXInclud: ; 1066 : case XML_DTD_NODE: ; 1067 : case XML_ELEMENT_DECL: ; 1068 : case XML_ATTRIBUTE_DECL: ; 1069 : case XML_ENTITY_NODE: ; 1070 : /* Do not copy DTD informations */ ; 1071 : break; jmp SHORT $LN8@xmlXInclud $LN46@xmlXInclud: ; 1072 : case XML_ENTITY_DECL: ; 1073 : /* handle crossing entities -> stack needed */ ; 1074 : break; jmp SHORT $LN8@xmlXInclud $LN47@xmlXInclud: ; 1075 : case XML_XINCLUDE_START: ; 1076 : case XML_XINCLUDE_END: ; 1077 : /* don't consider it part of the tree content */ ; 1078 : break; jmp SHORT $LN8@xmlXInclud $LN48@xmlXInclud: ; 1079 : case XML_ATTRIBUTE_NODE: ; 1080 : /* Humm, should not happen ! */ ; 1081 : break; jmp SHORT $LN8@xmlXInclud $LN49@xmlXInclud: ; 1082 : default: ; 1083 : /* ; 1084 : * Middle of the range - need to take care of ; 1085 : * properties and namespaces ; 1086 : */ ; 1087 : tmp = xmlDocCopyNode(cur, target, 2); push 2 mov ecx, DWORD PTR _target$[ebp] push ecx mov edx, DWORD PTR _cur$[ebp] push edx call _xmlDocCopyNode add esp, 12 ; 0000000cH mov DWORD PTR _tmp$[ebp], eax $LN8@xmlXInclud: ; 1088 : break; ; 1089 : } ; 1090 : if (tmp != NULL) { cmp DWORD PTR _tmp$[ebp], 0 je SHORT $LN19@xmlXInclud ; 1091 : if (level == lastLevel) mov eax, DWORD PTR _level$[ebp] cmp eax, DWORD PTR _lastLevel$[ebp] jne SHORT $LN51@xmlXInclud ; 1092 : xmlAddNextSibling(last, tmp); mov ecx, DWORD PTR _tmp$[ebp] push ecx mov edx, DWORD PTR _last$[ebp] push edx call _xmlAddNextSibling add esp, 8 jmp SHORT $LN52@xmlXInclud $LN51@xmlXInclud: ; 1093 : else { ; 1094 : xmlAddChild(last, tmp); mov eax, DWORD PTR _tmp$[ebp] push eax mov ecx, DWORD PTR _last$[ebp] push ecx call _xmlAddChild add esp, 8 ; 1095 : lastLevel = level; mov edx, DWORD PTR _level$[ebp] mov DWORD PTR _lastLevel$[ebp], edx $LN52@xmlXInclud: ; 1096 : } ; 1097 : last = tmp; mov eax, DWORD PTR _tmp$[ebp] mov DWORD PTR _last$[ebp], eax $LN19@xmlXInclud: ; 1098 : } ; 1099 : } ; 1100 : /* ; 1101 : * Skip to next node in document order ; 1102 : */ ; 1103 : cur = xmlXPtrAdvanceNode(cur, &level); lea ecx, DWORD PTR _level$[ebp] push ecx mov edx, DWORD PTR _cur$[ebp] push edx call _xmlXPtrAdvanceNode add esp, 8 mov DWORD PTR _cur$[ebp], eax ; 1104 : if (endFlag && (level >= endLevel)) cmp DWORD PTR _endFlag$[ebp], 0 je SHORT $LN53@xmlXInclud mov eax, DWORD PTR _level$[ebp] cmp eax, DWORD PTR _endLevel$[ebp] jl SHORT $LN53@xmlXInclud ; 1105 : break; jmp SHORT $LN3@xmlXInclud $LN53@xmlXInclud: ; 1106 : } jmp $LN2@xmlXInclud $LN3@xmlXInclud: ; 1107 : return(list); mov eax, DWORD PTR _list$[ebp] $LN1@xmlXInclud: ; 1108 : } push edx mov ecx, ebp push eax lea edx, DWORD PTR $LN60@xmlXInclud call @_RTC_CheckStackVars@8 pop eax pop edx pop edi add esp, 80 ; 00000050H cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 npad 1 $LN60@xmlXInclud: DD 1 DD $LN59@xmlXInclud $LN59@xmlXInclud: DD -48 ; ffffffd0H DD 4 DD $LN58@xmlXInclud $LN58@xmlXInclud: DB 108 ; 0000006cH DB 101 ; 00000065H DB 118 ; 00000076H DB 101 ; 00000065H DB 108 ; 0000006cH DB 0 npad 2 $LN61@xmlXInclud: DD $LN48@xmlXInclud DD $LN45@xmlXInclud DD $LN46@xmlXInclud DD $LN47@xmlXInclud DD $LN49@xmlXInclud $LN57@xmlXInclud: DB 0 DB 4 DB 4 DB 4 DB 1 DB 4 DB 4 DB 4 DB 4 DB 4 DB 4 DB 4 DB 1 DB 1 DB 1 DB 2 DB 4 DB 3 DB 3 _xmlXIncludeCopyRange ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeGetNthChild _TEXT SEGMENT _i$ = -4 ; size = 4 _cur$ = 8 ; size = 4 _no$ = 12 ; size = 4 _xmlXIncludeGetNthChild PROC ; COMDAT ; 877 : xmlXIncludeGetNthChild(xmlNodePtr cur, int no) { push ebp mov ebp, esp push ecx mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 878 : int i; ; 879 : if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) cmp DWORD PTR _cur$[ebp], 0 je SHORT $LN6@xmlXInclud mov eax, DWORD PTR _cur$[ebp] cmp DWORD PTR [eax+4], 18 ; 00000012H jne SHORT $LN5@xmlXInclud $LN6@xmlXInclud: ; 880 : return(NULL); xor eax, eax jmp SHORT $LN1@xmlXInclud $LN5@xmlXInclud: ; 881 : cur = cur->children; mov ecx, DWORD PTR _cur$[ebp] mov edx, DWORD PTR [ecx+12] mov DWORD PTR _cur$[ebp], edx ; 882 : for (i = 0;i <= no;cur = cur->next) { mov DWORD PTR _i$[ebp], 0 jmp SHORT $LN4@xmlXInclud $LN2@xmlXInclud: mov eax, DWORD PTR _cur$[ebp] mov ecx, DWORD PTR [eax+24] mov DWORD PTR _cur$[ebp], ecx $LN4@xmlXInclud: mov edx, DWORD PTR _i$[ebp] cmp edx, DWORD PTR _no$[ebp] jg SHORT $LN3@xmlXInclud ; 883 : if (cur == NULL) cmp DWORD PTR _cur$[ebp], 0 jne SHORT $LN7@xmlXInclud ; 884 : return(cur); mov eax, DWORD PTR _cur$[ebp] jmp SHORT $LN1@xmlXInclud $LN7@xmlXInclud: ; 885 : if ((cur->type == XML_ELEMENT_NODE) || ; 886 : (cur->type == XML_DOCUMENT_NODE) || mov eax, DWORD PTR _cur$[ebp] cmp DWORD PTR [eax+4], 1 je SHORT $LN9@xmlXInclud mov ecx, DWORD PTR _cur$[ebp] cmp DWORD PTR [ecx+4], 9 je SHORT $LN9@xmlXInclud mov edx, DWORD PTR _cur$[ebp] cmp DWORD PTR [edx+4], 13 ; 0000000dH jne SHORT $LN8@xmlXInclud $LN9@xmlXInclud: ; 887 : (cur->type == XML_HTML_DOCUMENT_NODE)) { ; 888 : i++; mov eax, DWORD PTR _i$[ebp] add eax, 1 mov DWORD PTR _i$[ebp], eax ; 889 : if (i == no) mov ecx, DWORD PTR _i$[ebp] cmp ecx, DWORD PTR _no$[ebp] jne SHORT $LN8@xmlXInclud ; 890 : break; jmp SHORT $LN3@xmlXInclud $LN8@xmlXInclud: ; 891 : } ; 892 : } jmp SHORT $LN2@xmlXInclud $LN3@xmlXInclud: ; 893 : return(cur); mov eax, DWORD PTR _cur$[ebp] $LN1@xmlXInclud: ; 894 : } add esp, 4 cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeGetNthChild ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeCopyNode _TEXT SEGMENT _result$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _target$ = 12 ; size = 4 _source$ = 16 ; size = 4 _elem$ = 20 ; size = 4 _xmlXIncludeCopyNode PROC ; COMDAT ; 819 : xmlDocPtr source, xmlNodePtr elem) { push ebp mov ebp, esp push ecx mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 820 : xmlNodePtr result = NULL; mov DWORD PTR _result$[ebp], 0 ; 821 : ; 822 : if ((ctxt == NULL) || (target == NULL) || (source == NULL) || cmp DWORD PTR _ctxt$[ebp], 0 je SHORT $LN3@xmlXInclud cmp DWORD PTR _target$[ebp], 0 je SHORT $LN3@xmlXInclud cmp DWORD PTR _source$[ebp], 0 je SHORT $LN3@xmlXInclud cmp DWORD PTR _elem$[ebp], 0 jne SHORT $LN2@xmlXInclud $LN3@xmlXInclud: ; 823 : (elem == NULL)) ; 824 : return(NULL); xor eax, eax jmp SHORT $LN1@xmlXInclud $LN2@xmlXInclud: ; 825 : if (elem->type == XML_DTD_NODE) mov eax, DWORD PTR _elem$[ebp] cmp DWORD PTR [eax+4], 14 ; 0000000eH jne SHORT $LN4@xmlXInclud ; 826 : return(NULL); xor eax, eax jmp SHORT $LN1@xmlXInclud $LN4@xmlXInclud: ; 827 : if (elem->type == XML_DOCUMENT_NODE) mov ecx, DWORD PTR _elem$[ebp] cmp DWORD PTR [ecx+4], 9 jne SHORT $LN5@xmlXInclud ; 828 : result = xmlXIncludeCopyNodeList(ctxt, target, source, elem->children); mov edx, DWORD PTR _elem$[ebp] mov eax, DWORD PTR [edx+12] push eax mov ecx, DWORD PTR _source$[ebp] push ecx mov edx, DWORD PTR _target$[ebp] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeCopyNodeList add esp, 16 ; 00000010H mov DWORD PTR _result$[ebp], eax jmp SHORT $LN6@xmlXInclud $LN5@xmlXInclud: ; 829 : else ; 830 : result = xmlDocCopyNode(elem, target, 1); push 1 mov ecx, DWORD PTR _target$[ebp] push ecx mov edx, DWORD PTR _elem$[ebp] push edx call _xmlDocCopyNode add esp, 12 ; 0000000cH mov DWORD PTR _result$[ebp], eax $LN6@xmlXInclud: ; 831 : return(result); mov eax, DWORD PTR _result$[ebp] $LN1@xmlXInclud: ; 832 : } add esp, 4 cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeCopyNode ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeCopyNodeList _TEXT SEGMENT _last$ = -16 ; size = 4 _result$ = -12 ; size = 4 _res$ = -8 ; size = 4 _cur$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _target$ = 12 ; size = 4 _source$ = 16 ; size = 4 _elem$ = 20 ; size = 4 _xmlXIncludeCopyNodeList PROC ; COMDAT ; 846 : xmlDocPtr source, xmlNodePtr elem) { push ebp mov ebp, esp sub esp, 16 ; 00000010H mov eax, -858993460 ; ccccccccH mov DWORD PTR [ebp-16], eax mov DWORD PTR [ebp-12], eax mov DWORD PTR [ebp-8], eax mov DWORD PTR [ebp-4], eax mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 847 : xmlNodePtr cur, res, result = NULL, last = NULL; mov DWORD PTR _result$[ebp], 0 mov DWORD PTR _last$[ebp], 0 ; 848 : ; 849 : if ((ctxt == NULL) || (target == NULL) || (source == NULL) || cmp DWORD PTR _ctxt$[ebp], 0 je SHORT $LN5@xmlXInclud cmp DWORD PTR _target$[ebp], 0 je SHORT $LN5@xmlXInclud cmp DWORD PTR _source$[ebp], 0 je SHORT $LN5@xmlXInclud cmp DWORD PTR _elem$[ebp], 0 jne SHORT $LN4@xmlXInclud $LN5@xmlXInclud: ; 850 : (elem == NULL)) ; 851 : return(NULL); xor eax, eax jmp SHORT $LN1@xmlXInclud $LN4@xmlXInclud: ; 852 : cur = elem; mov eax, DWORD PTR _elem$[ebp] mov DWORD PTR _cur$[ebp], eax $LN2@xmlXInclud: ; 853 : while (cur != NULL) { cmp DWORD PTR _cur$[ebp], 0 je SHORT $LN3@xmlXInclud ; 854 : res = xmlXIncludeCopyNode(ctxt, target, source, cur); mov ecx, DWORD PTR _cur$[ebp] push ecx mov edx, DWORD PTR _source$[ebp] push edx mov eax, DWORD PTR _target$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeCopyNode add esp, 16 ; 00000010H mov DWORD PTR _res$[ebp], eax ; 855 : if (res != NULL) { cmp DWORD PTR _res$[ebp], 0 je SHORT $LN6@xmlXInclud ; 856 : if (result == NULL) { cmp DWORD PTR _result$[ebp], 0 jne SHORT $LN7@xmlXInclud ; 857 : result = last = res; mov edx, DWORD PTR _res$[ebp] mov DWORD PTR _last$[ebp], edx mov eax, DWORD PTR _last$[ebp] mov DWORD PTR _result$[ebp], eax ; 858 : } else { jmp SHORT $LN6@xmlXInclud $LN7@xmlXInclud: ; 859 : last->next = res; mov ecx, DWORD PTR _last$[ebp] mov edx, DWORD PTR _res$[ebp] mov DWORD PTR [ecx+24], edx ; 860 : res->prev = last; mov eax, DWORD PTR _res$[ebp] mov ecx, DWORD PTR _last$[ebp] mov DWORD PTR [eax+28], ecx ; 861 : last = res; mov edx, DWORD PTR _res$[ebp] mov DWORD PTR _last$[ebp], edx $LN6@xmlXInclud: ; 862 : } ; 863 : } ; 864 : cur = cur->next; mov eax, DWORD PTR _cur$[ebp] mov ecx, DWORD PTR [eax+24] mov DWORD PTR _cur$[ebp], ecx ; 865 : } jmp SHORT $LN2@xmlXInclud $LN3@xmlXInclud: ; 866 : return(result); mov eax, DWORD PTR _result$[ebp] $LN1@xmlXInclud: ; 867 : } add esp, 16 ; 00000010H cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeCopyNodeList ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeAddTxt _TEXT SEGMENT _ctxt$ = 8 ; size = 4 _txt$ = 12 ; size = 4 _url$ = 16 ; size = 4 _xmlXIncludeAddTxt PROC ; COMDAT ; 758 : xmlXIncludeAddTxt(xmlXIncludeCtxtPtr ctxt, xmlNodePtr txt, const xmlURL url) { push ebp mov ebp, esp push esi mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 759 : #ifdef DEBUG_XINCLUDE ; 760 : xmlGenericError(xmlGenericErrorContext, "Adding text %s\n", url); ; 761 : #endif ; 762 : if (ctxt->txtMax == 0) { mov eax, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [eax+24], 0 jne $LN2@xmlXInclud ; 763 : ctxt->txtMax = 4; mov ecx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [ecx+24], 4 ; 764 : ctxt->txtTab = (xmlNodePtr *) xmlMalloc(ctxt->txtMax * mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+24] shl eax, 2 mov esi, esp push eax call DWORD PTR _xmlMalloc add esp, 4 cmp esi, esp call __RTC_CheckEsp mov ecx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [ecx+28], eax ; 765 : sizeof(ctxt->txtTab[0])); ; 766 : if (ctxt->txtTab == NULL) { mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx+28], 0 jne SHORT $LN3@xmlXInclud ; 767 : xmlXIncludeErrMemory(ctxt, NULL, "processing text"); push OFFSET ??_C@_0BA@KMMAMGLP@processing?5text@ push 0 mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeErrMemory add esp, 12 ; 0000000cH ; 768 : return; jmp $LN1@xmlXInclud $LN3@xmlXInclud: ; 769 : } ; 770 : ctxt->txturlTab = (xmlURL *) xmlMalloc(ctxt->txtMax * mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+24] shl edx, 2 mov esi, esp push edx call DWORD PTR _xmlMalloc add esp, 4 cmp esi, esp call __RTC_CheckEsp mov ecx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [ecx+32], eax ; 771 : sizeof(ctxt->txturlTab[0])); ; 772 : if (ctxt->txturlTab == NULL) { mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx+32], 0 jne SHORT $LN2@xmlXInclud ; 773 : xmlXIncludeErrMemory(ctxt, NULL, "processing text"); push OFFSET ??_C@_0BA@KMMAMGLP@processing?5text@ push 0 mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeErrMemory add esp, 12 ; 0000000cH ; 774 : return; jmp $LN1@xmlXInclud $LN2@xmlXInclud: ; 775 : } ; 776 : } ; 777 : if (ctxt->txtNr >= ctxt->txtMax) { mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [ecx+20] cmp eax, DWORD PTR [edx+24] jl $LN5@xmlXInclud ; 778 : ctxt->txtMax *= 2; mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+24] shl edx, 1 mov eax, DWORD PTR _ctxt$[ebp] mov DWORD PTR [eax+24], edx ; 779 : ctxt->txtTab = (xmlNodePtr *) xmlRealloc(ctxt->txtTab, mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+24] shl edx, 2 mov esi, esp push edx mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+28] push ecx call DWORD PTR _xmlRealloc add esp, 8 cmp esi, esp call __RTC_CheckEsp mov edx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [edx+28], eax ; 780 : ctxt->txtMax * sizeof(ctxt->txtTab[0])); ; 781 : if (ctxt->txtTab == NULL) { mov eax, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [eax+28], 0 jne SHORT $LN6@xmlXInclud ; 782 : xmlXIncludeErrMemory(ctxt, NULL, "processing text"); push OFFSET ??_C@_0BA@KMMAMGLP@processing?5text@ push 0 mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErrMemory add esp, 12 ; 0000000cH ; 783 : return; jmp $LN1@xmlXInclud $LN6@xmlXInclud: ; 784 : } ; 785 : ctxt->txturlTab = (xmlURL *) xmlRealloc(ctxt->txturlTab, mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+24] shl eax, 2 mov esi, esp push eax mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+32] push edx call DWORD PTR _xmlRealloc add esp, 8 cmp esi, esp call __RTC_CheckEsp mov ecx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [ecx+32], eax ; 786 : ctxt->txtMax * sizeof(ctxt->txturlTab[0])); ; 787 : if (ctxt->txturlTab == NULL) { mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx+32], 0 jne SHORT $LN5@xmlXInclud ; 788 : xmlXIncludeErrMemory(ctxt, NULL, "processing text"); push OFFSET ??_C@_0BA@KMMAMGLP@processing?5text@ push 0 mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeErrMemory add esp, 12 ; 0000000cH ; 789 : return; jmp SHORT $LN1@xmlXInclud $LN5@xmlXInclud: ; 790 : } ; 791 : } ; 792 : ctxt->txtTab[ctxt->txtNr] = txt; mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+20] mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+28] mov eax, DWORD PTR _txt$[ebp] mov DWORD PTR [ecx+edx*4], eax ; 793 : ctxt->txturlTab[ctxt->txtNr] = xmlStrdup(url); mov ecx, DWORD PTR _url$[ebp] push ecx call _xmlStrdup add esp, 4 mov edx, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [edx+20] mov edx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [edx+32] mov DWORD PTR [edx+ecx*4], eax ; 794 : ctxt->txtNr++; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+20] add ecx, 1 mov edx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [edx+20], ecx $LN1@xmlXInclud: ; 795 : } pop esi cmp ebp, esp call __RTC_CheckEsp pop ebp ret 0 _xmlXIncludeAddTxt ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeRecurseDoc _TEXT SEGMENT _i$ = -8 ; size = 4 _newctxt$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _doc$ = 12 ; size = 4 _url$ = 16 ; size = 4 _xmlXIncludeRecurseDoc PROC ; COMDAT ; 665 : const xmlURL url ATTRIBUTE_UNUSED) { push ebp mov ebp, esp sub esp, 8 push esi mov DWORD PTR [ebp-8], -858993460 ; ccccccccH mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 666 : xmlXIncludeCtxtPtr newctxt; ; 667 : int i; ; 668 : ; 669 : /* ; 670 : * Avoid recursion in already substitued resources ; 671 : for (i = 0;i < ctxt->urlNr;i++) { ; 672 : if (xmlStrEqual(doc->URL, ctxt->urlTab[i])) ; 673 : return; ; 674 : } ; 675 : */ ; 676 : ; 677 : #ifdef DEBUG_XINCLUDE ; 678 : xmlGenericError(xmlGenericErrorContext, "Recursing in doc %s\n", doc->URL); ; 679 : #endif ; 680 : /* ; 681 : * Handle recursion here. ; 682 : */ ; 683 : ; 684 : newctxt = xmlXIncludeNewContext(doc); mov eax, DWORD PTR _doc$[ebp] push eax call _xmlXIncludeNewContext add esp, 4 mov DWORD PTR _newctxt$[ebp], eax ; 685 : if (newctxt != NULL) { cmp DWORD PTR _newctxt$[ebp], 0 je $LN1@xmlXInclud ; 686 : /* ; 687 : * Copy the private user data ; 688 : */ ; 689 : newctxt->_private = ctxt->_private; mov ecx, DWORD PTR _newctxt$[ebp] mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+68] mov DWORD PTR [ecx+68], eax ; 690 : /* ; 691 : * Copy the existing document set ; 692 : */ ; 693 : newctxt->incMax = ctxt->incMax; mov ecx, DWORD PTR _newctxt$[ebp] mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+12] mov DWORD PTR [ecx+12], eax ; 694 : newctxt->incNr = ctxt->incNr; mov ecx, DWORD PTR _newctxt$[ebp] mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+8] mov DWORD PTR [ecx+8], eax ; 695 : newctxt->incTab = (xmlXIncludeRefPtr *) xmlMalloc(newctxt->incMax * mov ecx, DWORD PTR _newctxt$[ebp] mov edx, DWORD PTR [ecx+12] shl edx, 2 mov esi, esp push edx call DWORD PTR _xmlMalloc add esp, 4 cmp esi, esp call __RTC_CheckEsp mov ecx, DWORD PTR _newctxt$[ebp] mov DWORD PTR [ecx+16], eax ; 696 : sizeof(newctxt->incTab[0])); ; 697 : if (newctxt->incTab == NULL) { mov edx, DWORD PTR _newctxt$[ebp] cmp DWORD PTR [edx+16], 0 jne SHORT $LN9@xmlXInclud ; 698 : xmlXIncludeErrMemory(ctxt, (xmlNodePtr) doc, "processing doc"); push OFFSET ??_C@_0P@NPOPFDNN@processing?5doc@ mov eax, DWORD PTR _doc$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErrMemory add esp, 12 ; 0000000cH ; 699 : xmlFree(newctxt); mov esi, esp mov edx, DWORD PTR _newctxt$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 700 : return; jmp $LN1@xmlXInclud $LN9@xmlXInclud: ; 701 : } ; 702 : /* ; 703 : * copy the urlTab ; 704 : */ ; 705 : newctxt->urlMax = ctxt->urlMax; mov eax, DWORD PTR _newctxt$[ebp] mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+44] mov DWORD PTR [eax+44], edx ; 706 : newctxt->urlNr = ctxt->urlNr; mov eax, DWORD PTR _newctxt$[ebp] mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+40] mov DWORD PTR [eax+40], edx ; 707 : newctxt->urlTab = ctxt->urlTab; mov eax, DWORD PTR _newctxt$[ebp] mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+48] mov DWORD PTR [eax+48], edx ; 708 : ; 709 : /* ; 710 : * Inherit the existing base ; 711 : */ ; 712 : newctxt->base = xmlStrdup(ctxt->base); mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+64] push ecx call _xmlStrdup add esp, 4 mov edx, DWORD PTR _newctxt$[ebp] mov DWORD PTR [edx+64], eax ; 713 : ; 714 : /* ; 715 : * Inherit the documents already in use by other includes ; 716 : */ ; 717 : newctxt->incBase = ctxt->incNr; mov eax, DWORD PTR _newctxt$[ebp] mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+8] mov DWORD PTR [eax+4], edx ; 718 : for (i = 0;i < ctxt->incNr;i++) { mov DWORD PTR _i$[ebp], 0 jmp SHORT $LN4@xmlXInclud $LN2@xmlXInclud: mov eax, DWORD PTR _i$[ebp] add eax, 1 mov DWORD PTR _i$[ebp], eax $LN4@xmlXInclud: mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR _i$[ebp] cmp edx, DWORD PTR [ecx+8] jge SHORT $LN3@xmlXInclud ; 719 : newctxt->incTab[i] = ctxt->incTab[i]; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _newctxt$[ebp] mov eax, DWORD PTR [edx+16] mov edx, DWORD PTR _i$[ebp] mov esi, DWORD PTR _i$[ebp] mov ecx, DWORD PTR [ecx+esi*4] mov DWORD PTR [eax+edx*4], ecx ; 720 : newctxt->incTab[i]->count++; /* prevent the recursion from mov edx, DWORD PTR _newctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _i$[ebp] mov edx, DWORD PTR [eax+ecx*4] mov eax, DWORD PTR [edx+24] add eax, 1 mov ecx, DWORD PTR _newctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov ecx, DWORD PTR _i$[ebp] mov edx, DWORD PTR [edx+ecx*4] mov DWORD PTR [edx+24], eax ; 721 : freeing it */ ; 722 : } jmp SHORT $LN2@xmlXInclud $LN3@xmlXInclud: ; 723 : /* ; 724 : * The new context should also inherit the Parse Flags ; 725 : * (bug 132597) ; 726 : */ ; 727 : newctxt->parseFlags = ctxt->parseFlags; mov eax, DWORD PTR _newctxt$[ebp] mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+60] mov DWORD PTR [eax+60], edx ; 728 : xmlXIncludeDoProcess(newctxt, doc, xmlDocGetRootElement(doc)); mov eax, DWORD PTR _doc$[ebp] push eax call _xmlDocGetRootElement add esp, 4 push eax mov ecx, DWORD PTR _doc$[ebp] push ecx mov edx, DWORD PTR _newctxt$[ebp] push edx call _xmlXIncludeDoProcess add esp, 12 ; 0000000cH ; 729 : for (i = 0;i < ctxt->incNr;i++) { mov DWORD PTR _i$[ebp], 0 jmp SHORT $LN7@xmlXInclud $LN5@xmlXInclud: mov eax, DWORD PTR _i$[ebp] add eax, 1 mov DWORD PTR _i$[ebp], eax $LN7@xmlXInclud: mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR _i$[ebp] cmp edx, DWORD PTR [ecx+8] jge SHORT $LN6@xmlXInclud ; 730 : newctxt->incTab[i]->count--; mov eax, DWORD PTR _newctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _i$[ebp] mov eax, DWORD PTR [ecx+edx*4] mov ecx, DWORD PTR [eax+24] sub ecx, 1 mov edx, DWORD PTR _newctxt$[ebp] mov eax, DWORD PTR [edx+16] mov edx, DWORD PTR _i$[ebp] mov eax, DWORD PTR [eax+edx*4] mov DWORD PTR [eax+24], ecx ; 731 : newctxt->incTab[i] = NULL; mov ecx, DWORD PTR _newctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _i$[ebp] mov DWORD PTR [edx+eax*4], 0 ; 732 : } jmp SHORT $LN5@xmlXInclud $LN6@xmlXInclud: ; 733 : ; 734 : /* urlTab may have been reallocated */ ; 735 : ctxt->urlTab = newctxt->urlTab; mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR _newctxt$[ebp] mov eax, DWORD PTR [edx+48] mov DWORD PTR [ecx+48], eax ; 736 : ctxt->urlMax = newctxt->urlMax; mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR _newctxt$[ebp] mov eax, DWORD PTR [edx+44] mov DWORD PTR [ecx+44], eax ; 737 : ; 738 : newctxt->urlMax = 0; mov ecx, DWORD PTR _newctxt$[ebp] mov DWORD PTR [ecx+44], 0 ; 739 : newctxt->urlNr = 0; mov edx, DWORD PTR _newctxt$[ebp] mov DWORD PTR [edx+40], 0 ; 740 : newctxt->urlTab = NULL; mov eax, DWORD PTR _newctxt$[ebp] mov DWORD PTR [eax+48], 0 ; 741 : ; 742 : xmlXIncludeFreeContext(newctxt); mov ecx, DWORD PTR _newctxt$[ebp] push ecx call _xmlXIncludeFreeContext add esp, 4 $LN1@xmlXInclud: ; 743 : } ; 744 : #ifdef DEBUG_XINCLUDE ; 745 : xmlGenericError(xmlGenericErrorContext, "Done recursing in doc %s\n", url); ; 746 : #endif ; 747 : } pop esi add esp, 8 cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeRecurseDoc ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeAddNode _TEXT SEGMENT _eschref$1 = -52 ; size = 4 _escbase$2 = -48 ; size = 4 _local$ = -44 ; size = 4 _i$ = -40 ; size = 4 _xml$ = -36 ; size = 4 _URI$ = -32 ; size = 4 _base$ = -28 ; size = 4 _parse$ = -24 ; size = 4 _href$ = -20 ; size = 4 _fragment$ = -16 ; size = 4 _URL$ = -12 ; size = 4 _uri$ = -8 ; size = 4 _ref$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _cur$ = 12 ; size = 4 _xmlXIncludeAddNode PROC ; COMDAT ; 489 : xmlXIncludeAddNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur) { push ebp mov ebp, esp sub esp, 52 ; 00000034H push esi push edi lea edi, DWORD PTR [ebp-52] mov ecx, 13 ; 0000000dH mov eax, -858993460 ; ccccccccH rep stosd mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 490 : xmlXIncludeRefPtr ref; ; 491 : xmlURIPtr uri; ; 492 : xmlChar *URL; ; 493 : xmlChar *fragment = NULL; mov DWORD PTR _fragment$[ebp], 0 ; 494 : xmlChar *href; ; 495 : xmlChar *parse; ; 496 : xmlChar *base; ; 497 : xmlChar *URI; ; 498 : int xml = 1, i; /* default Issue 64 */ mov DWORD PTR _xml$[ebp], 1 ; 499 : int local = 0; mov DWORD PTR _local$[ebp], 0 ; 500 : ; 501 : ; 502 : if (ctxt == NULL) cmp DWORD PTR _ctxt$[ebp], 0 jne SHORT $LN5@xmlXInclud ; 503 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN5@xmlXInclud: ; 504 : if (cur == NULL) cmp DWORD PTR _cur$[ebp], 0 jne SHORT $LN6@xmlXInclud ; 505 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN6@xmlXInclud: ; 506 : ; 507 : #ifdef DEBUG_XINCLUDE ; 508 : xmlGenericError(xmlGenericErrorContext, "Add node\n"); ; 509 : #endif ; 510 : /* ; 511 : * read the attributes ; 512 : */ ; 513 : href = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_HREF); push OFFSET ??_C@_04CMBCJJJD@href@ mov eax, DWORD PTR _cur$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeGetProp add esp, 12 ; 0000000cH mov DWORD PTR _href$[ebp], eax ; 514 : if (href == NULL) { cmp DWORD PTR _href$[ebp], 0 jne SHORT $LN7@xmlXInclud ; 515 : href = xmlStrdup(BAD_CAST ""); /* @@@@ href is now optional */ push OFFSET ??_C@_00CNPNBAHC@@ call _xmlStrdup add esp, 4 mov DWORD PTR _href$[ebp], eax ; 516 : if (href == NULL) cmp DWORD PTR _href$[ebp], 0 jne SHORT $LN7@xmlXInclud ; 517 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN7@xmlXInclud: ; 518 : } ; 519 : if ((href[0] == '#') || (href[0] == 0)) mov edx, 1 imul eax, edx, 0 mov ecx, DWORD PTR _href$[ebp] movzx edx, BYTE PTR [ecx+eax] cmp edx, 35 ; 00000023H je SHORT $LN10@xmlXInclud mov eax, 1 imul ecx, eax, 0 mov edx, DWORD PTR _href$[ebp] movzx eax, BYTE PTR [edx+ecx] test eax, eax jne SHORT $LN9@xmlXInclud $LN10@xmlXInclud: ; 520 : local = 1; mov DWORD PTR _local$[ebp], 1 $LN9@xmlXInclud: ; 521 : parse = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_PARSE); push OFFSET ??_C@_05GOEGCMJM@parse@ mov ecx, DWORD PTR _cur$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeGetProp add esp, 12 ; 0000000cH mov DWORD PTR _parse$[ebp], eax ; 522 : if (parse != NULL) { cmp DWORD PTR _parse$[ebp], 0 je $LN11@xmlXInclud ; 523 : if (xmlStrEqual(parse, XINCLUDE_PARSE_XML)) push OFFSET ??_C@_03PJHHNEEI@xml@ mov eax, DWORD PTR _parse$[ebp] push eax call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN12@xmlXInclud ; 524 : xml = 1; mov DWORD PTR _xml$[ebp], 1 jmp SHORT $LN11@xmlXInclud $LN12@xmlXInclud: ; 525 : else if (xmlStrEqual(parse, XINCLUDE_PARSE_TEXT)) push OFFSET ??_C@_04CIMGMMMG@text@ mov ecx, DWORD PTR _parse$[ebp] push ecx call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN14@xmlXInclud ; 526 : xml = 0; mov DWORD PTR _xml$[ebp], 0 jmp SHORT $LN11@xmlXInclud $LN14@xmlXInclud: ; 527 : else { ; 528 : xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_PARSE_VALUE, mov edx, DWORD PTR _parse$[ebp] push edx push OFFSET ??_C@_0BO@KBIJIENG@invalid?5value?5?$CFs?5for?5?8parse?8?6@ push 1601 ; 00000641H mov eax, DWORD PTR _cur$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 529 : "invalid value %s for 'parse'\n", parse); ; 530 : if (href != NULL) cmp DWORD PTR _href$[ebp], 0 je SHORT $LN16@xmlXInclud ; 531 : xmlFree(href); mov esi, esp mov edx, DWORD PTR _href$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN16@xmlXInclud: ; 532 : if (parse != NULL) cmp DWORD PTR _parse$[ebp], 0 je SHORT $LN17@xmlXInclud ; 533 : xmlFree(parse); mov esi, esp mov eax, DWORD PTR _parse$[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN17@xmlXInclud: ; 534 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN11@xmlXInclud: ; 535 : } ; 536 : } ; 537 : ; 538 : /* ; 539 : * compute the URI ; 540 : */ ; 541 : base = xmlNodeGetBase(ctxt->doc, cur); mov ecx, DWORD PTR _cur$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx] push eax call _xmlNodeGetBase add esp, 8 mov DWORD PTR _base$[ebp], eax ; 542 : if (base == NULL) { cmp DWORD PTR _base$[ebp], 0 jne SHORT $LN18@xmlXInclud ; 543 : URI = xmlBuildURI(href, ctxt->doc->URL); mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx] mov eax, DWORD PTR [edx+72] push eax mov ecx, DWORD PTR _href$[ebp] push ecx call _xmlBuildURI add esp, 8 mov DWORD PTR _URI$[ebp], eax ; 544 : } else { jmp SHORT $LN19@xmlXInclud $LN18@xmlXInclud: ; 545 : URI = xmlBuildURI(href, base); mov edx, DWORD PTR _base$[ebp] push edx mov eax, DWORD PTR _href$[ebp] push eax call _xmlBuildURI add esp, 8 mov DWORD PTR _URI$[ebp], eax $LN19@xmlXInclud: ; 546 : } ; 547 : if (URI == NULL) { cmp DWORD PTR _URI$[ebp], 0 jne SHORT $LN20@xmlXInclud ; 548 : xmlChar *escbase; ; 549 : xmlChar *eschref; ; 550 : /* ; 551 : * Some escaping may be needed ; 552 : */ ; 553 : escbase = xmlURIEscape(base); mov ecx, DWORD PTR _base$[ebp] push ecx call _xmlURIEscape add esp, 4 mov DWORD PTR _escbase$2[ebp], eax ; 554 : eschref = xmlURIEscape(href); mov edx, DWORD PTR _href$[ebp] push edx call _xmlURIEscape add esp, 4 mov DWORD PTR _eschref$1[ebp], eax ; 555 : URI = xmlBuildURI(eschref, escbase); mov eax, DWORD PTR _escbase$2[ebp] push eax mov ecx, DWORD PTR _eschref$1[ebp] push ecx call _xmlBuildURI add esp, 8 mov DWORD PTR _URI$[ebp], eax ; 556 : if (escbase != NULL) cmp DWORD PTR _escbase$2[ebp], 0 je SHORT $LN21@xmlXInclud ; 557 : xmlFree(escbase); mov esi, esp mov edx, DWORD PTR _escbase$2[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN21@xmlXInclud: ; 558 : if (eschref != NULL) cmp DWORD PTR _eschref$1[ebp], 0 je SHORT $LN20@xmlXInclud ; 559 : xmlFree(eschref); mov esi, esp mov eax, DWORD PTR _eschref$1[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN20@xmlXInclud: ; 560 : } ; 561 : if (parse != NULL) cmp DWORD PTR _parse$[ebp], 0 je SHORT $LN23@xmlXInclud ; 562 : xmlFree(parse); mov esi, esp mov ecx, DWORD PTR _parse$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN23@xmlXInclud: ; 563 : if (href != NULL) cmp DWORD PTR _href$[ebp], 0 je SHORT $LN24@xmlXInclud ; 564 : xmlFree(href); mov esi, esp mov edx, DWORD PTR _href$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN24@xmlXInclud: ; 565 : if (base != NULL) cmp DWORD PTR _base$[ebp], 0 je SHORT $LN25@xmlXInclud ; 566 : xmlFree(base); mov esi, esp mov eax, DWORD PTR _base$[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN25@xmlXInclud: ; 567 : if (URI == NULL) { cmp DWORD PTR _URI$[ebp], 0 jne SHORT $LN26@xmlXInclud ; 568 : xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_HREF_URI, push 0 push OFFSET ??_C@_0BC@LNHFKIFC@failed?5build?5URL?6@ push 1605 ; 00000645H mov ecx, DWORD PTR _cur$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 569 : "failed build URL\n", NULL); ; 570 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN26@xmlXInclud: ; 571 : } ; 572 : fragment = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_PARSE_XPOINTER); push OFFSET ??_C@_08DNJCJFMK@xpointer@ mov eax, DWORD PTR _cur$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeGetProp add esp, 12 ; 0000000cH mov DWORD PTR _fragment$[ebp], eax ; 573 : ; 574 : /* ; 575 : * Check the URL and remove any fragment identifier ; 576 : */ ; 577 : uri = xmlParseURI((const char *)URI); mov edx, DWORD PTR _URI$[ebp] push edx call _xmlParseURI add esp, 4 mov DWORD PTR _uri$[ebp], eax ; 578 : if (uri == NULL) { cmp DWORD PTR _uri$[ebp], 0 jne SHORT $LN27@xmlXInclud ; 579 : xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_HREF_URI, mov eax, DWORD PTR _URI$[ebp] push eax push OFFSET ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@ push 1605 ; 00000645H mov ecx, DWORD PTR _cur$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 580 : "invalid value URI %s\n", URI); ; 581 : if (fragment != NULL) cmp DWORD PTR _fragment$[ebp], 0 je SHORT $LN28@xmlXInclud ; 582 : xmlFree(fragment); mov esi, esp mov eax, DWORD PTR _fragment$[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN28@xmlXInclud: ; 583 : xmlFree(URI); mov esi, esp mov ecx, DWORD PTR _URI$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 584 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN27@xmlXInclud: ; 585 : } ; 586 : ; 587 : if (uri->fragment != NULL) { mov edx, DWORD PTR _uri$[ebp] cmp DWORD PTR [edx+32], 0 je $LN29@xmlXInclud ; 588 : if (ctxt->legacy != 0) { mov eax, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [eax+56], 0 je SHORT $LN30@xmlXInclud ; 589 : if (fragment == NULL) { cmp DWORD PTR _fragment$[ebp], 0 jne SHORT $LN32@xmlXInclud ; 590 : fragment = (xmlChar *) uri->fragment; mov ecx, DWORD PTR _uri$[ebp] mov edx, DWORD PTR [ecx+32] mov DWORD PTR _fragment$[ebp], edx ; 591 : } else { jmp SHORT $LN33@xmlXInclud $LN32@xmlXInclud: ; 592 : xmlFree(uri->fragment); mov esi, esp mov eax, DWORD PTR _uri$[ebp] mov ecx, DWORD PTR [eax+32] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN33@xmlXInclud: ; 593 : } ; 594 : } else { jmp SHORT $LN31@xmlXInclud $LN30@xmlXInclud: ; 595 : xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_FRAGMENT_ID, mov edx, DWORD PTR _URI$[ebp] push edx push OFFSET ??_C@_0EC@PPIAEBNK@Invalid?5fragment?5identifier?5in?5@ push 1618 ; 00000652H mov eax, DWORD PTR _cur$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 596 : "Invalid fragment identifier in URI %s use the xpointer attribute\n", ; 597 : URI); ; 598 : if (fragment != NULL) cmp DWORD PTR _fragment$[ebp], 0 je SHORT $LN34@xmlXInclud ; 599 : xmlFree(fragment); mov esi, esp mov edx, DWORD PTR _fragment$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN34@xmlXInclud: ; 600 : xmlFreeURI(uri); mov eax, DWORD PTR _uri$[ebp] push eax call _xmlFreeURI add esp, 4 ; 601 : xmlFree(URI); mov esi, esp mov ecx, DWORD PTR _URI$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 602 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN31@xmlXInclud: ; 603 : } ; 604 : uri->fragment = NULL; mov edx, DWORD PTR _uri$[ebp] mov DWORD PTR [edx+32], 0 $LN29@xmlXInclud: ; 605 : } ; 606 : URL = xmlSaveUri(uri); mov eax, DWORD PTR _uri$[ebp] push eax call _xmlSaveUri add esp, 4 mov DWORD PTR _URL$[ebp], eax ; 607 : xmlFreeURI(uri); mov ecx, DWORD PTR _uri$[ebp] push ecx call _xmlFreeURI add esp, 4 ; 608 : xmlFree(URI); mov esi, esp mov edx, DWORD PTR _URI$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 609 : if (URL == NULL) { cmp DWORD PTR _URL$[ebp], 0 jne SHORT $LN35@xmlXInclud ; 610 : xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_HREF_URI, mov eax, DWORD PTR _URI$[ebp] push eax push OFFSET ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@ push 1605 ; 00000645H mov ecx, DWORD PTR _cur$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 611 : "invalid value URI %s\n", URI); ; 612 : if (fragment != NULL) cmp DWORD PTR _fragment$[ebp], 0 je SHORT $LN36@xmlXInclud ; 613 : xmlFree(fragment); mov esi, esp mov eax, DWORD PTR _fragment$[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN36@xmlXInclud: ; 614 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN35@xmlXInclud: ; 615 : } ; 616 : ; 617 : /* ; 618 : * If local and xml then we need a fragment ; 619 : */ ; 620 : if ((local == 1) && (xml == 1) && cmp DWORD PTR _local$[ebp], 1 jne SHORT $LN37@xmlXInclud cmp DWORD PTR _xml$[ebp], 1 jne SHORT $LN37@xmlXInclud cmp DWORD PTR _fragment$[ebp], 0 je SHORT $LN38@xmlXInclud mov ecx, 1 imul edx, ecx, 0 mov eax, DWORD PTR _fragment$[ebp] movzx ecx, BYTE PTR [eax+edx] test ecx, ecx jne SHORT $LN37@xmlXInclud $LN38@xmlXInclud: ; 621 : ((fragment == NULL) || (fragment[0] == 0))) { ; 622 : xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_RECURSION, mov edx, DWORD PTR _URL$[ebp] push edx push OFFSET ??_C@_0DD@GKECCJLJ@detected?5a?5local?5recursion?5with@ push 1600 ; 00000640H mov eax, DWORD PTR _cur$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 623 : "detected a local recursion with no xpointer in %s\n", ; 624 : URL); ; 625 : if (fragment != NULL) cmp DWORD PTR _fragment$[ebp], 0 je SHORT $LN39@xmlXInclud ; 626 : xmlFree(fragment); mov esi, esp mov edx, DWORD PTR _fragment$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN39@xmlXInclud: ; 627 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN37@xmlXInclud: ; 628 : } ; 629 : ; 630 : /* ; 631 : * Check the URL against the stack for recursions ; 632 : */ ; 633 : if ((!local) && (xml == 1)) { cmp DWORD PTR _local$[ebp], 0 jne SHORT $LN40@xmlXInclud cmp DWORD PTR _xml$[ebp], 1 jne SHORT $LN40@xmlXInclud ; 634 : for (i = 0;i < ctxt->urlNr;i++) { mov DWORD PTR _i$[ebp], 0 jmp SHORT $LN4@xmlXInclud $LN2@xmlXInclud: mov eax, DWORD PTR _i$[ebp] add eax, 1 mov DWORD PTR _i$[ebp], eax $LN4@xmlXInclud: mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR _i$[ebp] cmp edx, DWORD PTR [ecx+40] jge SHORT $LN40@xmlXInclud ; 635 : if (xmlStrEqual(URL, ctxt->urlTab[i])) { mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+48] mov edx, DWORD PTR _i$[ebp] mov eax, DWORD PTR [ecx+edx*4] push eax mov ecx, DWORD PTR _URL$[ebp] push ecx call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN41@xmlXInclud ; 636 : xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_RECURSION, mov edx, DWORD PTR _URL$[ebp] push edx push OFFSET ??_C@_0BM@FPMOMHKP@detected?5a?5recursion?5in?5?$CFs?6@ push 1600 ; 00000640H mov eax, DWORD PTR _cur$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 637 : "detected a recursion in %s\n", URL); ; 638 : return(-1); or eax, -1 jmp SHORT $LN1@xmlXInclud $LN41@xmlXInclud: ; 639 : } ; 640 : } jmp SHORT $LN2@xmlXInclud $LN40@xmlXInclud: ; 641 : } ; 642 : ; 643 : ref = xmlXIncludeNewRef(ctxt, URL, cur); mov edx, DWORD PTR _cur$[ebp] push edx mov eax, DWORD PTR _URL$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeNewRef add esp, 12 ; 0000000cH mov DWORD PTR _ref$[ebp], eax ; 644 : if (ref == NULL) { cmp DWORD PTR _ref$[ebp], 0 jne SHORT $LN42@xmlXInclud ; 645 : return(-1); or eax, -1 jmp SHORT $LN1@xmlXInclud $LN42@xmlXInclud: ; 646 : } ; 647 : ref->fragment = fragment; mov edx, DWORD PTR _ref$[ebp] mov eax, DWORD PTR _fragment$[ebp] mov DWORD PTR [edx+4], eax ; 648 : ref->doc = NULL; mov ecx, DWORD PTR _ref$[ebp] mov DWORD PTR [ecx+8], 0 ; 649 : ref->xml = xml; mov edx, DWORD PTR _ref$[ebp] mov eax, DWORD PTR _xml$[ebp] mov DWORD PTR [edx+20], eax ; 650 : ref->count = 1; mov ecx, DWORD PTR _ref$[ebp] mov DWORD PTR [ecx+24], 1 ; 651 : xmlFree(URL); mov esi, esp mov edx, DWORD PTR _URL$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp ; 652 : return(0); xor eax, eax $LN1@xmlXInclud: ; 653 : } pop edi pop esi add esp, 52 ; 00000034H cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeAddNode ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeParseFile _TEXT SEGMENT _inputStream$ = -12 ; size = 4 _pctxt$ = -8 ; size = 4 _ret$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _URL$ = 12 ; size = 4 _xmlXIncludeParseFile PROC ; COMDAT ; 421 : xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) { push ebp mov ebp, esp sub esp, 12 ; 0000000cH mov DWORD PTR [ebp-12], -858993460 ; ccccccccH mov DWORD PTR [ebp-8], -858993460 ; ccccccccH mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 422 : xmlDocPtr ret; ; 423 : xmlParserCtxtPtr pctxt; ; 424 : xmlParserInputPtr inputStream; ; 425 : ; 426 : xmlInitParser(); call _xmlInitParser ; 427 : ; 428 : pctxt = xmlNewParserCtxt(); call _xmlNewParserCtxt mov DWORD PTR _pctxt$[ebp], eax ; 429 : if (pctxt == NULL) { cmp DWORD PTR _pctxt$[ebp], 0 jne SHORT $LN2@xmlXInclud ; 430 : xmlXIncludeErrMemory(ctxt, NULL, "cannot allocate parser context"); push OFFSET ??_C@_0BP@IGCIIMIK@cannot?5allocate?5parser?5context@ push 0 mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeErrMemory add esp, 12 ; 0000000cH ; 431 : return(NULL); xor eax, eax jmp $LN1@xmlXInclud $LN2@xmlXInclud: ; 432 : } ; 433 : ; 434 : /* ; 435 : * pass in the application data to the parser context. ; 436 : */ ; 437 : pctxt->_private = ctxt->_private; mov ecx, DWORD PTR _pctxt$[ebp] mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+68] mov DWORD PTR [ecx+272], eax ; 438 : ; 439 : /* ; 440 : * try to ensure that new documents included are actually ; 441 : * built with the same dictionary as the including document. ; 442 : */ ; 443 : if ((ctxt->doc != NULL) && (ctxt->doc->dict != NULL)) { mov ecx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [ecx], 0 je SHORT $LN3@xmlXInclud mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx] cmp DWORD PTR [eax+80], 0 je SHORT $LN3@xmlXInclud ; 444 : if (pctxt->dict != NULL) mov ecx, DWORD PTR _pctxt$[ebp] cmp DWORD PTR [ecx+296], 0 je SHORT $LN4@xmlXInclud ; 445 : xmlDictFree(pctxt->dict); mov edx, DWORD PTR _pctxt$[ebp] mov eax, DWORD PTR [edx+296] push eax call _xmlDictFree add esp, 4 $LN4@xmlXInclud: ; 446 : pctxt->dict = ctxt->doc->dict; mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx] mov eax, DWORD PTR _pctxt$[ebp] mov ecx, DWORD PTR [edx+80] mov DWORD PTR [eax+296], ecx ; 447 : xmlDictReference(pctxt->dict); mov edx, DWORD PTR _pctxt$[ebp] mov eax, DWORD PTR [edx+296] push eax call _xmlDictReference add esp, 4 $LN3@xmlXInclud: ; 448 : } ; 449 : ; 450 : xmlCtxtUseOptions(pctxt, ctxt->parseFlags | XML_PARSE_DTDLOAD); mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+60] or edx, 4 push edx mov eax, DWORD PTR _pctxt$[ebp] push eax call _xmlCtxtUseOptions add esp, 8 ; 451 : ; 452 : inputStream = xmlLoadExternalEntity(URL, NULL, pctxt); mov ecx, DWORD PTR _pctxt$[ebp] push ecx push 0 mov edx, DWORD PTR _URL$[ebp] push edx call _xmlLoadExternalEntity add esp, 12 ; 0000000cH mov DWORD PTR _inputStream$[ebp], eax ; 453 : if (inputStream == NULL) { cmp DWORD PTR _inputStream$[ebp], 0 jne SHORT $LN5@xmlXInclud ; 454 : xmlFreeParserCtxt(pctxt); mov eax, DWORD PTR _pctxt$[ebp] push eax call _xmlFreeParserCtxt add esp, 4 ; 455 : return(NULL); xor eax, eax jmp $LN1@xmlXInclud $LN5@xmlXInclud: ; 456 : } ; 457 : ; 458 : inputPush(pctxt, inputStream); mov ecx, DWORD PTR _inputStream$[ebp] push ecx mov edx, DWORD PTR _pctxt$[ebp] push edx call _inputPush add esp, 8 ; 459 : ; 460 : if (pctxt->directory == NULL) mov eax, DWORD PTR _pctxt$[ebp] cmp DWORD PTR [eax+180], 0 jne SHORT $LN6@xmlXInclud ; 461 : pctxt->directory = xmlParserGetDirectory(URL); mov ecx, DWORD PTR _URL$[ebp] push ecx call _xmlParserGetDirectory add esp, 4 mov edx, DWORD PTR _pctxt$[ebp] mov DWORD PTR [edx+180], eax $LN6@xmlXInclud: ; 462 : ; 463 : pctxt->loadsubset |= XML_DETECT_IDS; mov eax, DWORD PTR _pctxt$[ebp] mov ecx, DWORD PTR [eax+276] or ecx, 2 mov edx, DWORD PTR _pctxt$[ebp] mov DWORD PTR [edx+276], ecx ; 464 : ; 465 : xmlParseDocument(pctxt); mov eax, DWORD PTR _pctxt$[ebp] push eax call _xmlParseDocument add esp, 4 ; 466 : ; 467 : if (pctxt->wellFormed) { mov ecx, DWORD PTR _pctxt$[ebp] cmp DWORD PTR [ecx+12], 0 je SHORT $LN7@xmlXInclud ; 468 : ret = pctxt->myDoc; mov edx, DWORD PTR _pctxt$[ebp] mov eax, DWORD PTR [edx+8] mov DWORD PTR _ret$[ebp], eax ; 469 : } jmp SHORT $LN8@xmlXInclud $LN7@xmlXInclud: ; 470 : else { ; 471 : ret = NULL; mov DWORD PTR _ret$[ebp], 0 ; 472 : if (pctxt->myDoc != NULL) mov ecx, DWORD PTR _pctxt$[ebp] cmp DWORD PTR [ecx+8], 0 je SHORT $LN9@xmlXInclud ; 473 : xmlFreeDoc(pctxt->myDoc); mov edx, DWORD PTR _pctxt$[ebp] mov eax, DWORD PTR [edx+8] push eax call _xmlFreeDoc add esp, 4 $LN9@xmlXInclud: ; 474 : pctxt->myDoc = NULL; mov ecx, DWORD PTR _pctxt$[ebp] mov DWORD PTR [ecx+8], 0 $LN8@xmlXInclud: ; 475 : } ; 476 : xmlFreeParserCtxt(pctxt); mov edx, DWORD PTR _pctxt$[ebp] push edx call _xmlFreeParserCtxt add esp, 4 ; 477 : ; 478 : return(ret); mov eax, DWORD PTR _ret$[ebp] $LN1@xmlXInclud: ; 479 : } add esp, 12 ; 0000000cH cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeParseFile ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeURLPop _TEXT SEGMENT _ret$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _xmlXIncludeURLPop PROC ; COMDAT ; 356 : { push ebp mov ebp, esp push ecx push esi mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 357 : xmlChar * ret; ; 358 : ; 359 : if (ctxt->urlNr <= 0) mov eax, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [eax+40], 0 jg SHORT $LN2@xmlXInclud ; 360 : return; jmp SHORT $LN1@xmlXInclud $LN2@xmlXInclud: ; 361 : ctxt->urlNr--; mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+40] sub edx, 1 mov eax, DWORD PTR _ctxt$[ebp] mov DWORD PTR [eax+40], edx ; 362 : if (ctxt->urlNr > 0) mov ecx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [ecx+40], 0 jle SHORT $LN3@xmlXInclud ; 363 : ctxt->url = ctxt->urlTab[ctxt->urlNr - 1]; mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+40] mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+48] mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [edx+eax*4-4] mov DWORD PTR [ecx+36], edx jmp SHORT $LN4@xmlXInclud $LN3@xmlXInclud: ; 364 : else ; 365 : ctxt->url = NULL; mov eax, DWORD PTR _ctxt$[ebp] mov DWORD PTR [eax+36], 0 $LN4@xmlXInclud: ; 366 : ret = ctxt->urlTab[ctxt->urlNr]; mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+40] mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+48] mov edx, DWORD PTR [ecx+edx*4] mov DWORD PTR _ret$[ebp], edx ; 367 : ctxt->urlTab[ctxt->urlNr] = NULL; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+40] mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+48] mov DWORD PTR [eax+ecx*4], 0 ; 368 : if (ret != NULL) cmp DWORD PTR _ret$[ebp], 0 je SHORT $LN1@xmlXInclud ; 369 : xmlFree(ret); mov esi, esp mov ecx, DWORD PTR _ret$[ebp] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN1@xmlXInclud: ; 370 : } pop esi add esp, 4 cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeURLPop ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeURLPush _TEXT SEGMENT tv146 = -8 ; size = 4 tv140 = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _value$ = 12 ; size = 4 _xmlXIncludeURLPush PROC ; COMDAT ; 317 : { push ebp mov ebp, esp sub esp, 8 push esi mov DWORD PTR [ebp-8], -858993460 ; ccccccccH mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 318 : if (ctxt->urlNr > XINCLUDE_MAX_DEPTH) { mov eax, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [eax+40], 40 ; 00000028H jle SHORT $LN2@xmlXInclud ; 319 : xmlXIncludeErr(ctxt, NULL, XML_XINCLUDE_RECURSION, mov ecx, DWORD PTR _value$[ebp] push ecx push OFFSET ??_C@_0BM@FPMOMHKP@detected?5a?5recursion?5in?5?$CFs?6@ push 1600 ; 00000640H push 0 mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeErr add esp, 20 ; 00000014H ; 320 : "detected a recursion in %s\n", value); ; 321 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN2@xmlXInclud: ; 322 : } ; 323 : if (ctxt->urlTab == NULL) { mov eax, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [eax+48], 0 jne SHORT $LN3@xmlXInclud ; 324 : ctxt->urlMax = 4; mov ecx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [ecx+44], 4 ; 325 : ctxt->urlNr = 0; mov edx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [edx+40], 0 ; 326 : ctxt->urlTab = (xmlChar * *) xmlMalloc( mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+44] shl ecx, 2 mov esi, esp push ecx call DWORD PTR _xmlMalloc add esp, 4 cmp esi, esp call __RTC_CheckEsp mov edx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [edx+48], eax ; 327 : ctxt->urlMax * sizeof(ctxt->urlTab[0])); ; 328 : if (ctxt->urlTab == NULL) { mov eax, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [eax+48], 0 jne SHORT $LN3@xmlXInclud ; 329 : xmlXIncludeErrMemory(ctxt, NULL, "adding URL"); push OFFSET ??_C@_0L@NDJLOKMA@adding?5URL@ push 0 mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErrMemory add esp, 12 ; 0000000cH ; 330 : return (-1); or eax, -1 jmp $LN1@xmlXInclud $LN3@xmlXInclud: ; 331 : } ; 332 : } ; 333 : if (ctxt->urlNr >= ctxt->urlMax) { mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [edx+40] cmp ecx, DWORD PTR [eax+44] jl SHORT $LN5@xmlXInclud ; 334 : ctxt->urlMax *= 2; mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+44] shl eax, 1 mov ecx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [ecx+44], eax ; 335 : ctxt->urlTab = mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+44] shl eax, 2 mov esi, esp push eax mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+48] push edx call DWORD PTR _xmlRealloc add esp, 8 cmp esi, esp call __RTC_CheckEsp mov ecx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [ecx+48], eax ; 336 : (xmlChar * *) xmlRealloc(ctxt->urlTab, ; 337 : ctxt->urlMax * ; 338 : sizeof(ctxt->urlTab[0])); ; 339 : if (ctxt->urlTab == NULL) { mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx+48], 0 jne SHORT $LN5@xmlXInclud ; 340 : xmlXIncludeErrMemory(ctxt, NULL, "adding URL"); push OFFSET ??_C@_0L@NDJLOKMA@adding?5URL@ push 0 mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeErrMemory add esp, 12 ; 0000000cH ; 341 : return (-1); or eax, -1 jmp SHORT $LN1@xmlXInclud $LN5@xmlXInclud: ; 342 : } ; 343 : } ; 344 : ctxt->url = ctxt->urlTab[ctxt->urlNr] = xmlStrdup(value); mov ecx, DWORD PTR _value$[ebp] push ecx call _xmlStrdup add esp, 4 mov DWORD PTR tv140[ebp], eax mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+40] mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+48] mov ecx, DWORD PTR tv140[ebp] mov DWORD PTR [edx+eax*4], ecx mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR tv140[ebp] mov DWORD PTR [edx+36], eax ; 345 : return (ctxt->urlNr++); mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+40] mov DWORD PTR tv146[ebp], edx mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+40] add ecx, 1 mov edx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [edx+40], ecx mov eax, DWORD PTR tv146[ebp] $LN1@xmlXInclud: ; 346 : } pop esi add esp, 8 cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeURLPush ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeNewRef _TEXT SEGMENT _ret$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _URI$ = 12 ; size = 4 _ref$ = 16 ; size = 4 _xmlXIncludeNewRef PROC ; COMDAT ; 226 : xmlNodePtr ref) { push ebp mov ebp, esp push ecx push esi mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 227 : xmlXIncludeRefPtr ret; ; 228 : ; 229 : #ifdef DEBUG_XINCLUDE ; 230 : xmlGenericError(xmlGenericErrorContext, "New ref %s\n", URI); ; 231 : #endif ; 232 : ret = (xmlXIncludeRefPtr) xmlMalloc(sizeof(xmlXIncludeRef)); mov esi, esp push 36 ; 00000024H call DWORD PTR _xmlMalloc add esp, 4 cmp esi, esp call __RTC_CheckEsp mov DWORD PTR _ret$[ebp], eax ; 233 : if (ret == NULL) { cmp DWORD PTR _ret$[ebp], 0 jne SHORT $LN2@xmlXInclud ; 234 : xmlXIncludeErrMemory(ctxt, ref, "growing XInclude context"); push OFFSET ??_C@_0BJ@LMPOCELI@growing?5XInclude?5context@ mov eax, DWORD PTR _ref$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErrMemory add esp, 12 ; 0000000cH ; 235 : return(NULL); xor eax, eax jmp $LN1@xmlXInclud $LN2@xmlXInclud: ; 236 : } ; 237 : memset(ret, 0, sizeof(xmlXIncludeRef)); xor edx, edx mov eax, DWORD PTR _ret$[ebp] mov DWORD PTR [eax], edx mov DWORD PTR [eax+4], edx mov DWORD PTR [eax+8], edx mov DWORD PTR [eax+12], edx mov DWORD PTR [eax+16], edx mov DWORD PTR [eax+20], edx mov DWORD PTR [eax+24], edx mov DWORD PTR [eax+28], edx mov DWORD PTR [eax+32], edx ; 238 : if (URI == NULL) cmp DWORD PTR _URI$[ebp], 0 jne SHORT $LN3@xmlXInclud ; 239 : ret->URI = NULL; mov ecx, DWORD PTR _ret$[ebp] mov DWORD PTR [ecx], 0 jmp SHORT $LN4@xmlXInclud $LN3@xmlXInclud: ; 240 : else ; 241 : ret->URI = xmlStrdup(URI); mov edx, DWORD PTR _URI$[ebp] push edx call _xmlStrdup add esp, 4 mov ecx, DWORD PTR _ret$[ebp] mov DWORD PTR [ecx], eax $LN4@xmlXInclud: ; 242 : ret->fragment = NULL; mov edx, DWORD PTR _ret$[ebp] mov DWORD PTR [edx+4], 0 ; 243 : ret->ref = ref; mov eax, DWORD PTR _ret$[ebp] mov ecx, DWORD PTR _ref$[ebp] mov DWORD PTR [eax+12], ecx ; 244 : ret->doc = NULL; mov edx, DWORD PTR _ret$[ebp] mov DWORD PTR [edx+8], 0 ; 245 : ret->count = 0; mov eax, DWORD PTR _ret$[ebp] mov DWORD PTR [eax+24], 0 ; 246 : ret->xml = 0; mov ecx, DWORD PTR _ret$[ebp] mov DWORD PTR [ecx+20], 0 ; 247 : ret->inc = NULL; mov edx, DWORD PTR _ret$[ebp] mov DWORD PTR [edx+16], 0 ; 248 : if (ctxt->incMax == 0) { mov eax, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [eax+12], 0 jne SHORT $LN5@xmlXInclud ; 249 : ctxt->incMax = 4; mov ecx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [ecx+12], 4 ; 250 : ctxt->incTab = (xmlXIncludeRefPtr *) xmlMalloc(ctxt->incMax * mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+12] shl eax, 2 mov esi, esp push eax call DWORD PTR _xmlMalloc add esp, 4 cmp esi, esp call __RTC_CheckEsp mov ecx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [ecx+16], eax ; 251 : sizeof(ctxt->incTab[0])); ; 252 : if (ctxt->incTab == NULL) { mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx+16], 0 jne SHORT $LN5@xmlXInclud ; 253 : xmlXIncludeErrMemory(ctxt, ref, "growing XInclude context"); push OFFSET ??_C@_0BJ@LMPOCELI@growing?5XInclude?5context@ mov eax, DWORD PTR _ref$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErrMemory add esp, 12 ; 0000000cH ; 254 : xmlXIncludeFreeRef(ret); mov edx, DWORD PTR _ret$[ebp] push edx call _xmlXIncludeFreeRef add esp, 4 ; 255 : return(NULL); xor eax, eax jmp $LN1@xmlXInclud $LN5@xmlXInclud: ; 256 : } ; 257 : } ; 258 : if (ctxt->incNr >= ctxt->incMax) { mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [eax+8] cmp edx, DWORD PTR [ecx+12] jl SHORT $LN7@xmlXInclud ; 259 : ctxt->incMax *= 2; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+12] shl ecx, 1 mov edx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [edx+12], ecx ; 260 : ctxt->incTab = (xmlXIncludeRefPtr *) xmlRealloc(ctxt->incTab, mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+12] shl ecx, 2 mov esi, esp push ecx mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] push eax call DWORD PTR _xmlRealloc add esp, 8 cmp esi, esp call __RTC_CheckEsp mov ecx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [ecx+16], eax ; 261 : ctxt->incMax * sizeof(ctxt->incTab[0])); ; 262 : if (ctxt->incTab == NULL) { mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx+16], 0 jne SHORT $LN7@xmlXInclud ; 263 : xmlXIncludeErrMemory(ctxt, ref, "growing XInclude context"); push OFFSET ??_C@_0BJ@LMPOCELI@growing?5XInclude?5context@ mov eax, DWORD PTR _ref$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeErrMemory add esp, 12 ; 0000000cH ; 264 : xmlXIncludeFreeRef(ret); mov edx, DWORD PTR _ret$[ebp] push edx call _xmlXIncludeFreeRef add esp, 4 ; 265 : return(NULL); xor eax, eax jmp SHORT $LN1@xmlXInclud $LN7@xmlXInclud: ; 266 : } ; 267 : } ; 268 : ctxt->incTab[ctxt->incNr++] = ret; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+8] mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov edx, DWORD PTR _ret$[ebp] mov DWORD PTR [eax+ecx*4], edx mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+8] add ecx, 1 mov edx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [edx+8], ecx ; 269 : return(ret); mov eax, DWORD PTR _ret$[ebp] $LN1@xmlXInclud: ; 270 : } pop esi add esp, 4 cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeNewRef ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeFreeRef _TEXT SEGMENT _ref$ = 8 ; size = 4 _xmlXIncludeFreeRef PROC ; COMDAT ; 194 : xmlXIncludeFreeRef(xmlXIncludeRefPtr ref) { push ebp mov ebp, esp push esi mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 195 : if (ref == NULL) cmp DWORD PTR _ref$[ebp], 0 jne SHORT $LN2@xmlXInclud ; 196 : return; jmp $LN1@xmlXInclud $LN2@xmlXInclud: ; 197 : #ifdef DEBUG_XINCLUDE ; 198 : xmlGenericError(xmlGenericErrorContext, "Freeing ref\n"); ; 199 : #endif ; 200 : if (ref->doc != NULL) { mov eax, DWORD PTR _ref$[ebp] cmp DWORD PTR [eax+8], 0 je SHORT $LN3@xmlXInclud ; 201 : #ifdef DEBUG_XINCLUDE ; 202 : xmlGenericError(xmlGenericErrorContext, "Freeing doc %s\n", ref->URI); ; 203 : #endif ; 204 : xmlFreeDoc(ref->doc); mov ecx, DWORD PTR _ref$[ebp] mov edx, DWORD PTR [ecx+8] push edx call _xmlFreeDoc add esp, 4 $LN3@xmlXInclud: ; 205 : } ; 206 : if (ref->URI != NULL) mov eax, DWORD PTR _ref$[ebp] cmp DWORD PTR [eax], 0 je SHORT $LN4@xmlXInclud ; 207 : xmlFree(ref->URI); mov esi, esp mov ecx, DWORD PTR _ref$[ebp] mov edx, DWORD PTR [ecx] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN4@xmlXInclud: ; 208 : if (ref->fragment != NULL) mov eax, DWORD PTR _ref$[ebp] cmp DWORD PTR [eax+4], 0 je SHORT $LN5@xmlXInclud ; 209 : xmlFree(ref->fragment); mov esi, esp mov ecx, DWORD PTR _ref$[ebp] mov edx, DWORD PTR [ecx+4] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN5@xmlXInclud: ; 210 : if (ref->xptr != NULL) mov eax, DWORD PTR _ref$[ebp] cmp DWORD PTR [eax+28], 0 je SHORT $LN6@xmlXInclud ; 211 : xmlXPathFreeObject(ref->xptr); mov ecx, DWORD PTR _ref$[ebp] mov edx, DWORD PTR [ecx+28] push edx call _xmlXPathFreeObject add esp, 4 $LN6@xmlXInclud: ; 212 : xmlFree(ref); mov esi, esp mov eax, DWORD PTR _ref$[ebp] push eax call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN1@xmlXInclud: ; 213 : } pop esi cmp ebp, esp call __RTC_CheckEsp pop ebp ret 0 _xmlXIncludeFreeRef ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeGetProp _TEXT SEGMENT _ret$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _cur$ = 12 ; size = 4 _name$ = 16 ; size = 4 _xmlXIncludeGetProp PROC ; COMDAT ; 173 : const xmlChar *name) { push ebp mov ebp, esp push ecx mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 174 : xmlChar *ret; ; 175 : ; 176 : ret = xmlGetNsProp(cur, XINCLUDE_NS, name); mov eax, DWORD PTR _name$[ebp] push eax push OFFSET ??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@ mov ecx, DWORD PTR _cur$[ebp] push ecx call _xmlGetNsProp add esp, 12 ; 0000000cH mov DWORD PTR _ret$[ebp], eax ; 177 : if (ret != NULL) cmp DWORD PTR _ret$[ebp], 0 je SHORT $LN2@xmlXInclud ; 178 : return(ret); mov eax, DWORD PTR _ret$[ebp] jmp SHORT $LN1@xmlXInclud $LN2@xmlXInclud: ; 179 : if (ctxt->legacy != 0) { mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx+56], 0 je SHORT $LN3@xmlXInclud ; 180 : ret = xmlGetNsProp(cur, XINCLUDE_OLD_NS, name); mov eax, DWORD PTR _name$[ebp] push eax push OFFSET ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@ mov ecx, DWORD PTR _cur$[ebp] push ecx call _xmlGetNsProp add esp, 12 ; 0000000cH mov DWORD PTR _ret$[ebp], eax ; 181 : if (ret != NULL) cmp DWORD PTR _ret$[ebp], 0 je SHORT $LN3@xmlXInclud ; 182 : return(ret); mov eax, DWORD PTR _ret$[ebp] jmp SHORT $LN1@xmlXInclud $LN3@xmlXInclud: ; 183 : } ; 184 : ret = xmlGetProp(cur, name); mov edx, DWORD PTR _name$[ebp] push edx mov eax, DWORD PTR _cur$[ebp] push eax call _xmlGetProp add esp, 8 mov DWORD PTR _ret$[ebp], eax ; 185 : return(ret); mov eax, DWORD PTR _ret$[ebp] $LN1@xmlXInclud: ; 186 : } add esp, 4 cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeGetProp ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeErr _TEXT SEGMENT _ctxt$ = 8 ; size = 4 _node$ = 12 ; size = 4 _error$ = 16 ; size = 4 _msg$ = 20 ; size = 4 _extra$ = 24 ; size = 4 _xmlXIncludeErr PROC ; COMDAT ; 131 : { push ebp mov ebp, esp mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 132 : if (ctxt != NULL) cmp DWORD PTR _ctxt$[ebp], 0 je SHORT $LN2@xmlXInclud ; 133 : ctxt->nbErrors++; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+52] add ecx, 1 mov edx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [edx+52], ecx $LN2@xmlXInclud: ; 134 : __xmlRaiseError(NULL, NULL, NULL, ctxt, node, XML_FROM_XINCLUDE, mov eax, DWORD PTR _extra$[ebp] push eax mov ecx, DWORD PTR _msg$[ebp] push ecx push 0 push 0 push 0 push 0 mov edx, DWORD PTR _extra$[ebp] push edx push 0 push 0 push 2 mov eax, DWORD PTR _error$[ebp] push eax push 11 ; 0000000bH mov ecx, DWORD PTR _node$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx push 0 push 0 push 0 call ___xmlRaiseError add esp, 68 ; 00000044H ; 135 : error, XML_ERR_ERROR, NULL, 0, ; 136 : (const char *) extra, NULL, NULL, 0, 0, ; 137 : msg, (const char *) extra); ; 138 : } cmp ebp, esp call __RTC_CheckEsp pop ebp ret 0 _xmlXIncludeErr ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeErrMemory _TEXT SEGMENT _ctxt$ = 8 ; size = 4 _node$ = 12 ; size = 4 _extra$ = 16 ; size = 4 _xmlXIncludeErrMemory PROC ; COMDAT ; 110 : { push ebp mov ebp, esp mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 111 : if (ctxt != NULL) cmp DWORD PTR _ctxt$[ebp], 0 je SHORT $LN2@xmlXInclud ; 112 : ctxt->nbErrors++; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+52] add ecx, 1 mov edx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [edx+52], ecx $LN2@xmlXInclud: ; 113 : __xmlRaiseError(NULL, NULL, NULL, ctxt, node, XML_FROM_XINCLUDE, mov eax, DWORD PTR _extra$[ebp] push eax push OFFSET ??_C@_0BP@DJFHNAOK@Memory?5allocation?5failed?5?3?5?$CFs?6@ push 0 push 0 push 0 push 0 mov ecx, DWORD PTR _extra$[ebp] push ecx push 0 push 0 push 2 push 2 push 11 ; 0000000bH mov edx, DWORD PTR _node$[ebp] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax push 0 push 0 push 0 call ___xmlRaiseError add esp, 68 ; 00000044H ; 114 : XML_ERR_NO_MEMORY, XML_ERR_ERROR, NULL, 0, ; 115 : extra, NULL, NULL, 0, 0, ; 116 : "Memory allocation failed : %s\n", extra); ; 117 : } cmp ebp, esp call __RTC_CheckEsp pop ebp ret 0 _xmlXIncludeErrMemory ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeDoProcess _TEXT SEGMENT _start$ = -16 ; size = 4 _i$ = -12 ; size = 4 _ret$ = -8 ; size = 4 _cur$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _doc$ = 12 ; size = 4 _tree$ = 16 ; size = 4 _xmlXIncludeDoProcess PROC ; COMDAT ; 2364 : xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) { push ebp mov ebp, esp sub esp, 16 ; 00000010H mov eax, -858993460 ; ccccccccH mov DWORD PTR [ebp-16], eax mov DWORD PTR [ebp-12], eax mov DWORD PTR [ebp-8], eax mov DWORD PTR [ebp-4], eax mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 2365 : xmlNodePtr cur; ; 2366 : int ret = 0; mov DWORD PTR _ret$[ebp], 0 ; 2367 : int i, start; ; 2368 : ; 2369 : if ((doc == NULL) || (tree == NULL) || (tree->type == XML_NAMESPACE_DECL)) cmp DWORD PTR _doc$[ebp], 0 je SHORT $LN14@xmlXInclud cmp DWORD PTR _tree$[ebp], 0 je SHORT $LN14@xmlXInclud mov eax, DWORD PTR _tree$[ebp] cmp DWORD PTR [eax+4], 18 ; 00000012H jne SHORT $LN13@xmlXInclud $LN14@xmlXInclud: ; 2370 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN13@xmlXInclud: ; 2371 : if (ctxt == NULL) cmp DWORD PTR _ctxt$[ebp], 0 jne SHORT $LN15@xmlXInclud ; 2372 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN15@xmlXInclud: ; 2373 : ; 2374 : if (doc->URL != NULL) { mov ecx, DWORD PTR _doc$[ebp] cmp DWORD PTR [ecx+72], 0 je SHORT $LN16@xmlXInclud ; 2375 : ret = xmlXIncludeURLPush(ctxt, doc->URL); mov edx, DWORD PTR _doc$[ebp] mov eax, DWORD PTR [edx+72] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeURLPush add esp, 8 mov DWORD PTR _ret$[ebp], eax ; 2376 : if (ret < 0) cmp DWORD PTR _ret$[ebp], 0 jge SHORT $LN16@xmlXInclud ; 2377 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN16@xmlXInclud: ; 2378 : } ; 2379 : start = ctxt->incNr; mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+8] mov DWORD PTR _start$[ebp], eax ; 2380 : ; 2381 : /* ; 2382 : * First phase: lookup the elements in the document ; 2383 : */ ; 2384 : cur = tree; mov ecx, DWORD PTR _tree$[ebp] mov DWORD PTR _cur$[ebp], ecx ; 2385 : if (xmlXIncludeTestNode(ctxt, cur) == 1) mov edx, DWORD PTR _cur$[ebp] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeTestNode add esp, 8 cmp eax, 1 jne SHORT $LN2@xmlXInclud ; 2386 : xmlXIncludePreProcessNode(ctxt, cur); mov ecx, DWORD PTR _cur$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludePreProcessNode add esp, 8 $LN2@xmlXInclud: ; 2387 : while ((cur != NULL) && (cur != tree->parent)) { cmp DWORD PTR _cur$[ebp], 0 je $LN3@xmlXInclud mov eax, DWORD PTR _tree$[ebp] mov ecx, DWORD PTR _cur$[ebp] cmp ecx, DWORD PTR [eax+20] je $LN3@xmlXInclud ; 2388 : /* TODO: need to work on entities -> stack */ ; 2389 : if ((cur->children != NULL) && ; 2390 : (cur->children->type != XML_ENTITY_DECL) && ; 2391 : (cur->children->type != XML_XINCLUDE_START) && mov edx, DWORD PTR _cur$[ebp] cmp DWORD PTR [edx+12], 0 je SHORT $LN19@xmlXInclud mov eax, DWORD PTR _cur$[ebp] mov ecx, DWORD PTR [eax+12] cmp DWORD PTR [ecx+4], 17 ; 00000011H je SHORT $LN19@xmlXInclud mov edx, DWORD PTR _cur$[ebp] mov eax, DWORD PTR [edx+12] cmp DWORD PTR [eax+4], 19 ; 00000013H je SHORT $LN19@xmlXInclud mov ecx, DWORD PTR _cur$[ebp] mov edx, DWORD PTR [ecx+12] cmp DWORD PTR [edx+4], 20 ; 00000014H je SHORT $LN19@xmlXInclud ; 2392 : (cur->children->type != XML_XINCLUDE_END)) { ; 2393 : cur = cur->children; mov eax, DWORD PTR _cur$[ebp] mov ecx, DWORD PTR [eax+12] mov DWORD PTR _cur$[ebp], ecx ; 2394 : if (xmlXIncludeTestNode(ctxt, cur)) mov edx, DWORD PTR _cur$[ebp] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeTestNode add esp, 8 test eax, eax je SHORT $LN21@xmlXInclud ; 2395 : xmlXIncludePreProcessNode(ctxt, cur); mov ecx, DWORD PTR _cur$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludePreProcessNode add esp, 8 $LN21@xmlXInclud: ; 2396 : } else if (cur->next != NULL) { jmp $LN20@xmlXInclud $LN19@xmlXInclud: mov eax, DWORD PTR _cur$[ebp] cmp DWORD PTR [eax+24], 0 je SHORT $LN22@xmlXInclud ; 2397 : cur = cur->next; mov ecx, DWORD PTR _cur$[ebp] mov edx, DWORD PTR [ecx+24] mov DWORD PTR _cur$[ebp], edx ; 2398 : if (xmlXIncludeTestNode(ctxt, cur)) mov eax, DWORD PTR _cur$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeTestNode add esp, 8 test eax, eax je SHORT $LN24@xmlXInclud ; 2399 : xmlXIncludePreProcessNode(ctxt, cur); mov edx, DWORD PTR _cur$[ebp] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludePreProcessNode add esp, 8 $LN24@xmlXInclud: ; 2400 : } else { jmp SHORT $LN20@xmlXInclud $LN22@xmlXInclud: ; 2401 : if (cur == tree) mov ecx, DWORD PTR _cur$[ebp] cmp ecx, DWORD PTR _tree$[ebp] jne SHORT $LN6@xmlXInclud ; 2402 : break; jmp SHORT $LN3@xmlXInclud $LN6@xmlXInclud: ; 2403 : do { ; 2404 : cur = cur->parent; mov edx, DWORD PTR _cur$[ebp] mov eax, DWORD PTR [edx+20] mov DWORD PTR _cur$[ebp], eax ; 2405 : if ((cur == NULL) || (cur == tree->parent)) cmp DWORD PTR _cur$[ebp], 0 je SHORT $LN27@xmlXInclud mov ecx, DWORD PTR _tree$[ebp] mov edx, DWORD PTR _cur$[ebp] cmp edx, DWORD PTR [ecx+20] jne SHORT $LN26@xmlXInclud $LN27@xmlXInclud: ; 2406 : break; /* do */ jmp SHORT $LN20@xmlXInclud $LN26@xmlXInclud: ; 2407 : if (cur->next != NULL) { mov eax, DWORD PTR _cur$[ebp] cmp DWORD PTR [eax+24], 0 je SHORT $LN4@xmlXInclud ; 2408 : cur = cur->next; mov ecx, DWORD PTR _cur$[ebp] mov edx, DWORD PTR [ecx+24] mov DWORD PTR _cur$[ebp], edx ; 2409 : if (xmlXIncludeTestNode(ctxt, cur)) mov eax, DWORD PTR _cur$[ebp] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeTestNode add esp, 8 test eax, eax je SHORT $LN29@xmlXInclud ; 2410 : xmlXIncludePreProcessNode(ctxt, cur); mov edx, DWORD PTR _cur$[ebp] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludePreProcessNode add esp, 8 $LN29@xmlXInclud: ; 2411 : break; /* do */ jmp SHORT $LN20@xmlXInclud $LN4@xmlXInclud: ; 2412 : } ; 2413 : } while (cur != NULL); cmp DWORD PTR _cur$[ebp], 0 jne SHORT $LN6@xmlXInclud $LN20@xmlXInclud: ; 2414 : } ; 2415 : } jmp $LN2@xmlXInclud $LN3@xmlXInclud: ; 2416 : ; 2417 : /* ; 2418 : * Second Phase : collect the infosets fragments ; 2419 : */ ; 2420 : for (i = start;i < ctxt->incNr; i++) { mov ecx, DWORD PTR _start$[ebp] mov DWORD PTR _i$[ebp], ecx jmp SHORT $LN9@xmlXInclud $LN7@xmlXInclud: mov edx, DWORD PTR _i$[ebp] add edx, 1 mov DWORD PTR _i$[ebp], edx $LN9@xmlXInclud: mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR _i$[ebp] cmp ecx, DWORD PTR [eax+8] jge SHORT $LN8@xmlXInclud ; 2421 : xmlXIncludeLoadNode(ctxt, i); mov edx, DWORD PTR _i$[ebp] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeLoadNode add esp, 8 ; 2422 : ret++; mov ecx, DWORD PTR _ret$[ebp] add ecx, 1 mov DWORD PTR _ret$[ebp], ecx ; 2423 : } jmp SHORT $LN7@xmlXInclud $LN8@xmlXInclud: ; 2424 : ; 2425 : /* ; 2426 : * Third phase: extend the original document infoset. ; 2427 : * ; 2428 : * Originally we bypassed the inclusion if there were any errors ; 2429 : * encountered on any of the XIncludes. A bug was raised (bug ; 2430 : * 132588) requesting that we output the XIncludes without error, ; 2431 : * so the check for inc!=NULL || xptr!=NULL was put in. This may ; 2432 : * give some other problems in the future, but for now it seems to ; 2433 : * work ok. ; 2434 : * ; 2435 : */ ; 2436 : for (i = ctxt->incBase;i < ctxt->incNr; i++) { mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+4] mov DWORD PTR _i$[ebp], eax jmp SHORT $LN12@xmlXInclud $LN10@xmlXInclud: mov ecx, DWORD PTR _i$[ebp] add ecx, 1 mov DWORD PTR _i$[ebp], ecx $LN12@xmlXInclud: mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR _i$[ebp] cmp eax, DWORD PTR [edx+8] jge SHORT $LN11@xmlXInclud ; 2437 : if ((ctxt->incTab[i]->inc != NULL) || ; 2438 : (ctxt->incTab[i]->xptr != NULL) || mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+16] mov eax, DWORD PTR _i$[ebp] mov ecx, DWORD PTR [edx+eax*4] cmp DWORD PTR [ecx+16], 0 jne SHORT $LN31@xmlXInclud mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _i$[ebp] mov edx, DWORD PTR [eax+ecx*4] cmp DWORD PTR [edx+28], 0 jne SHORT $LN31@xmlXInclud mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] mov edx, DWORD PTR _i$[ebp] mov eax, DWORD PTR [ecx+edx*4] cmp DWORD PTR [eax+32], 0 je SHORT $LN30@xmlXInclud $LN31@xmlXInclud: ; 2439 : (ctxt->incTab[i]->emptyFb != 0)) /* (empty fallback) */ ; 2440 : xmlXIncludeIncludeNode(ctxt, i); mov ecx, DWORD PTR _i$[ebp] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeIncludeNode add esp, 8 $LN30@xmlXInclud: ; 2441 : } jmp SHORT $LN10@xmlXInclud $LN11@xmlXInclud: ; 2442 : ; 2443 : if (doc->URL != NULL) mov eax, DWORD PTR _doc$[ebp] cmp DWORD PTR [eax+72], 0 je SHORT $LN32@xmlXInclud ; 2444 : xmlXIncludeURLPop(ctxt); mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeURLPop add esp, 4 $LN32@xmlXInclud: ; 2445 : return(ret); mov eax, DWORD PTR _ret$[ebp] $LN1@xmlXInclud: ; 2446 : } add esp, 16 ; 00000010H cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeDoProcess ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeProcessNode _TEXT SEGMENT _ret$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _node$ = 12 ; size = 4 _xmlXIncludeProcessNode PROC ; COMDAT ; 2611 : xmlXIncludeProcessNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) { push ebp mov ebp, esp push ecx mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 2612 : int ret = 0; mov DWORD PTR _ret$[ebp], 0 ; 2613 : ; 2614 : if ((node == NULL) || (node->type == XML_NAMESPACE_DECL) || ; 2615 : (node->doc == NULL) || (ctxt == NULL)) cmp DWORD PTR _node$[ebp], 0 je SHORT $LN3@xmlXInclud mov eax, DWORD PTR _node$[ebp] cmp DWORD PTR [eax+4], 18 ; 00000012H je SHORT $LN3@xmlXInclud mov ecx, DWORD PTR _node$[ebp] cmp DWORD PTR [ecx+32], 0 je SHORT $LN3@xmlXInclud cmp DWORD PTR _ctxt$[ebp], 0 jne SHORT $LN2@xmlXInclud $LN3@xmlXInclud: ; 2616 : return(-1); or eax, -1 jmp SHORT $LN1@xmlXInclud $LN2@xmlXInclud: ; 2617 : ret = xmlXIncludeDoProcess(ctxt, node->doc, node); mov edx, DWORD PTR _node$[ebp] push edx mov eax, DWORD PTR _node$[ebp] mov ecx, DWORD PTR [eax+32] push ecx mov edx, DWORD PTR _ctxt$[ebp] push edx call _xmlXIncludeDoProcess add esp, 12 ; 0000000cH mov DWORD PTR _ret$[ebp], eax ; 2618 : if ((ret >= 0) && (ctxt->nbErrors > 0)) cmp DWORD PTR _ret$[ebp], 0 jl SHORT $LN4@xmlXInclud mov eax, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [eax+52], 0 jle SHORT $LN4@xmlXInclud ; 2619 : ret = -1; mov DWORD PTR _ret$[ebp], -1 $LN4@xmlXInclud: ; 2620 : return(ret); mov eax, DWORD PTR _ret$[ebp] $LN1@xmlXInclud: ; 2621 : } add esp, 4 cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeProcessNode ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeFreeContext _TEXT SEGMENT _i$ = -4 ; size = 4 _ctxt$ = 8 ; size = 4 _xmlXIncludeFreeContext PROC ; COMDAT ; 379 : xmlXIncludeFreeContext(xmlXIncludeCtxtPtr ctxt) { push ebp mov ebp, esp push ecx push esi mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 380 : int i; ; 381 : ; 382 : #ifdef DEBUG_XINCLUDE ; 383 : xmlGenericError(xmlGenericErrorContext, "Freeing context\n"); ; 384 : #endif ; 385 : if (ctxt == NULL) cmp DWORD PTR _ctxt$[ebp], 0 jne SHORT $LN2@xmlXInclud ; 386 : return; jmp $LN1@xmlXInclud $LN2@xmlXInclud: ; 387 : while (ctxt->urlNr > 0) mov eax, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [eax+40], 0 jle SHORT $LN3@xmlXInclud ; 388 : xmlXIncludeURLPop(ctxt); mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeURLPop add esp, 4 jmp SHORT $LN2@xmlXInclud $LN3@xmlXInclud: ; 389 : if (ctxt->urlTab != NULL) mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx+48], 0 je SHORT $LN11@xmlXInclud ; 390 : xmlFree(ctxt->urlTab); mov esi, esp mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+48] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN11@xmlXInclud: ; 391 : for (i = 0;i < ctxt->incNr;i++) { mov DWORD PTR _i$[ebp], 0 jmp SHORT $LN6@xmlXInclud $LN4@xmlXInclud: mov edx, DWORD PTR _i$[ebp] add edx, 1 mov DWORD PTR _i$[ebp], edx $LN6@xmlXInclud: mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR _i$[ebp] cmp ecx, DWORD PTR [eax+8] jge SHORT $LN5@xmlXInclud ; 392 : if (ctxt->incTab[i] != NULL) mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _i$[ebp] cmp DWORD PTR [eax+ecx*4], 0 je SHORT $LN12@xmlXInclud ; 393 : xmlXIncludeFreeRef(ctxt->incTab[i]); mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR [edx+16] mov ecx, DWORD PTR _i$[ebp] mov edx, DWORD PTR [eax+ecx*4] push edx call _xmlXIncludeFreeRef add esp, 4 $LN12@xmlXInclud: ; 394 : } jmp SHORT $LN4@xmlXInclud $LN5@xmlXInclud: ; 395 : if (ctxt->txturlTab != NULL) { mov eax, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [eax+32], 0 je SHORT $LN13@xmlXInclud ; 396 : for (i = 0;i < ctxt->txtNr;i++) { mov DWORD PTR _i$[ebp], 0 jmp SHORT $LN9@xmlXInclud $LN7@xmlXInclud: mov ecx, DWORD PTR _i$[ebp] add ecx, 1 mov DWORD PTR _i$[ebp], ecx $LN9@xmlXInclud: mov edx, DWORD PTR _ctxt$[ebp] mov eax, DWORD PTR _i$[ebp] cmp eax, DWORD PTR [edx+20] jge SHORT $LN13@xmlXInclud ; 397 : if (ctxt->txturlTab[i] != NULL) mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+32] mov eax, DWORD PTR _i$[ebp] cmp DWORD PTR [edx+eax*4], 0 je SHORT $LN14@xmlXInclud ; 398 : xmlFree(ctxt->txturlTab[i]); mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR [ecx+32] mov esi, esp mov eax, DWORD PTR _i$[ebp] mov ecx, DWORD PTR [edx+eax*4] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN14@xmlXInclud: ; 399 : } jmp SHORT $LN7@xmlXInclud $LN13@xmlXInclud: ; 400 : } ; 401 : if (ctxt->incTab != NULL) mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx+16], 0 je SHORT $LN15@xmlXInclud ; 402 : xmlFree(ctxt->incTab); mov esi, esp mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+16] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN15@xmlXInclud: ; 403 : if (ctxt->txtTab != NULL) mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx+28], 0 je SHORT $LN16@xmlXInclud ; 404 : xmlFree(ctxt->txtTab); mov esi, esp mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+28] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN16@xmlXInclud: ; 405 : if (ctxt->txturlTab != NULL) mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx+32], 0 je SHORT $LN17@xmlXInclud ; 406 : xmlFree(ctxt->txturlTab); mov esi, esp mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+32] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN17@xmlXInclud: ; 407 : if (ctxt->base != NULL) { mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx+64], 0 je SHORT $LN18@xmlXInclud ; 408 : xmlFree(ctxt->base); mov esi, esp mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR [eax+64] push ecx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN18@xmlXInclud: ; 409 : } ; 410 : xmlFree(ctxt); mov esi, esp mov edx, DWORD PTR _ctxt$[ebp] push edx call DWORD PTR _xmlFree add esp, 4 cmp esi, esp call __RTC_CheckEsp $LN1@xmlXInclud: ; 411 : } pop esi add esp, 4 cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeFreeContext ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeSetFlags _TEXT SEGMENT _ctxt$ = 8 ; size = 4 _flags$ = 12 ; size = 4 _xmlXIncludeSetFlags PROC ; COMDAT ; 2458 : xmlXIncludeSetFlags(xmlXIncludeCtxtPtr ctxt, int flags) { push ebp mov ebp, esp mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 2459 : if (ctxt == NULL) cmp DWORD PTR _ctxt$[ebp], 0 jne SHORT $LN2@xmlXInclud ; 2460 : return(-1); or eax, -1 jmp SHORT $LN1@xmlXInclud $LN2@xmlXInclud: ; 2461 : ctxt->parseFlags = flags; mov eax, DWORD PTR _ctxt$[ebp] mov ecx, DWORD PTR _flags$[ebp] mov DWORD PTR [eax+60], ecx ; 2462 : return(0); xor eax, eax $LN1@xmlXInclud: ; 2463 : } cmp ebp, esp call __RTC_CheckEsp pop ebp ret 0 _xmlXIncludeSetFlags ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeNewContext _TEXT SEGMENT _ret$ = -4 ; size = 4 _doc$ = 8 ; size = 4 _xmlXIncludeNewContext PROC ; COMDAT ; 281 : xmlXIncludeNewContext(xmlDocPtr doc) { push ebp mov ebp, esp push ecx push esi mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 282 : xmlXIncludeCtxtPtr ret; ; 283 : ; 284 : #ifdef DEBUG_XINCLUDE ; 285 : xmlGenericError(xmlGenericErrorContext, "New context\n"); ; 286 : #endif ; 287 : if (doc == NULL) cmp DWORD PTR _doc$[ebp], 0 jne SHORT $LN2@xmlXInclud ; 288 : return(NULL); xor eax, eax jmp $LN1@xmlXInclud $LN2@xmlXInclud: ; 289 : ret = (xmlXIncludeCtxtPtr) xmlMalloc(sizeof(xmlXIncludeCtxt)); mov esi, esp push 72 ; 00000048H call DWORD PTR _xmlMalloc add esp, 4 cmp esi, esp call __RTC_CheckEsp mov DWORD PTR _ret$[ebp], eax ; 290 : if (ret == NULL) { cmp DWORD PTR _ret$[ebp], 0 jne SHORT $LN3@xmlXInclud ; 291 : xmlXIncludeErrMemory(NULL, (xmlNodePtr) doc, push OFFSET ??_C@_0BK@NPNMIHKC@creating?5XInclude?5context@ mov eax, DWORD PTR _doc$[ebp] push eax push 0 call _xmlXIncludeErrMemory add esp, 12 ; 0000000cH ; 292 : "creating XInclude context"); ; 293 : return(NULL); xor eax, eax jmp SHORT $LN1@xmlXInclud $LN3@xmlXInclud: ; 294 : } ; 295 : memset(ret, 0, sizeof(xmlXIncludeCtxt)); push 72 ; 00000048H push 0 mov ecx, DWORD PTR _ret$[ebp] push ecx call _memset add esp, 12 ; 0000000cH ; 296 : ret->doc = doc; mov edx, DWORD PTR _ret$[ebp] mov eax, DWORD PTR _doc$[ebp] mov DWORD PTR [edx], eax ; 297 : ret->incNr = 0; mov ecx, DWORD PTR _ret$[ebp] mov DWORD PTR [ecx+8], 0 ; 298 : ret->incBase = 0; mov edx, DWORD PTR _ret$[ebp] mov DWORD PTR [edx+4], 0 ; 299 : ret->incMax = 0; mov eax, DWORD PTR _ret$[ebp] mov DWORD PTR [eax+12], 0 ; 300 : ret->incTab = NULL; mov ecx, DWORD PTR _ret$[ebp] mov DWORD PTR [ecx+16], 0 ; 301 : ret->nbErrors = 0; mov edx, DWORD PTR _ret$[ebp] mov DWORD PTR [edx+52], 0 ; 302 : return(ret); mov eax, DWORD PTR _ret$[ebp] $LN1@xmlXInclud: ; 303 : } pop esi add esp, 4 cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeNewContext ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeProcessTreeFlags _TEXT SEGMENT _ret$ = -8 ; size = 4 _ctxt$ = -4 ; size = 4 _tree$ = 8 ; size = 4 _flags$ = 12 ; size = 4 _xmlXIncludeProcessTreeFlags PROC ; COMDAT ; 2565 : xmlXIncludeProcessTreeFlags(xmlNodePtr tree, int flags) { push ebp mov ebp, esp sub esp, 8 mov DWORD PTR [ebp-8], -858993460 ; ccccccccH mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 2566 : xmlXIncludeCtxtPtr ctxt; ; 2567 : int ret = 0; mov DWORD PTR _ret$[ebp], 0 ; 2568 : ; 2569 : if ((tree == NULL) || (tree->type == XML_NAMESPACE_DECL) || cmp DWORD PTR _tree$[ebp], 0 je SHORT $LN3@xmlXInclud mov eax, DWORD PTR _tree$[ebp] cmp DWORD PTR [eax+4], 18 ; 00000012H je SHORT $LN3@xmlXInclud mov ecx, DWORD PTR _tree$[ebp] cmp DWORD PTR [ecx+32], 0 jne SHORT $LN2@xmlXInclud $LN3@xmlXInclud: ; 2570 : (tree->doc == NULL)) ; 2571 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN2@xmlXInclud: ; 2572 : ctxt = xmlXIncludeNewContext(tree->doc); mov edx, DWORD PTR _tree$[ebp] mov eax, DWORD PTR [edx+32] push eax call _xmlXIncludeNewContext add esp, 4 mov DWORD PTR _ctxt$[ebp], eax ; 2573 : if (ctxt == NULL) cmp DWORD PTR _ctxt$[ebp], 0 jne SHORT $LN4@xmlXInclud ; 2574 : return(-1); or eax, -1 jmp SHORT $LN1@xmlXInclud $LN4@xmlXInclud: ; 2575 : ctxt->base = xmlNodeGetBase(tree->doc, tree); mov ecx, DWORD PTR _tree$[ebp] push ecx mov edx, DWORD PTR _tree$[ebp] mov eax, DWORD PTR [edx+32] push eax call _xmlNodeGetBase add esp, 8 mov ecx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [ecx+64], eax ; 2576 : xmlXIncludeSetFlags(ctxt, flags); mov edx, DWORD PTR _flags$[ebp] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeSetFlags add esp, 8 ; 2577 : ret = xmlXIncludeDoProcess(ctxt, tree->doc, tree); mov ecx, DWORD PTR _tree$[ebp] push ecx mov edx, DWORD PTR _tree$[ebp] mov eax, DWORD PTR [edx+32] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeDoProcess add esp, 12 ; 0000000cH mov DWORD PTR _ret$[ebp], eax ; 2578 : if ((ret >= 0) && (ctxt->nbErrors > 0)) cmp DWORD PTR _ret$[ebp], 0 jl SHORT $LN5@xmlXInclud mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx+52], 0 jle SHORT $LN5@xmlXInclud ; 2579 : ret = -1; mov DWORD PTR _ret$[ebp], -1 $LN5@xmlXInclud: ; 2580 : ; 2581 : xmlXIncludeFreeContext(ctxt); mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeFreeContext add esp, 4 ; 2582 : return(ret); mov eax, DWORD PTR _ret$[ebp] $LN1@xmlXInclud: ; 2583 : } add esp, 8 cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeProcessTreeFlags ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeProcessTree _TEXT SEGMENT _tree$ = 8 ; size = 4 _xmlXIncludeProcessTree PROC ; COMDAT ; 2595 : xmlXIncludeProcessTree(xmlNodePtr tree) { push ebp mov ebp, esp mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 2596 : return(xmlXIncludeProcessTreeFlags(tree, 0)); push 0 mov eax, DWORD PTR _tree$[ebp] push eax call _xmlXIncludeProcessTreeFlags add esp, 8 ; 2597 : } cmp ebp, esp call __RTC_CheckEsp pop ebp ret 0 _xmlXIncludeProcessTree ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeProcessTreeFlagsData _TEXT SEGMENT _ret$ = -8 ; size = 4 _ctxt$ = -4 ; size = 4 _tree$ = 8 ; size = 4 _flags$ = 12 ; size = 4 _data$ = 16 ; size = 4 _xmlXIncludeProcessTreeFlagsData PROC ; COMDAT ; 2479 : xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree, int flags, void *data) { push ebp mov ebp, esp sub esp, 8 mov DWORD PTR [ebp-8], -858993460 ; ccccccccH mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 2480 : xmlXIncludeCtxtPtr ctxt; ; 2481 : int ret = 0; mov DWORD PTR _ret$[ebp], 0 ; 2482 : ; 2483 : if ((tree == NULL) || (tree->type == XML_NAMESPACE_DECL) || cmp DWORD PTR _tree$[ebp], 0 je SHORT $LN3@xmlXInclud mov eax, DWORD PTR _tree$[ebp] cmp DWORD PTR [eax+4], 18 ; 00000012H je SHORT $LN3@xmlXInclud mov ecx, DWORD PTR _tree$[ebp] cmp DWORD PTR [ecx+32], 0 jne SHORT $LN2@xmlXInclud $LN3@xmlXInclud: ; 2484 : (tree->doc == NULL)) ; 2485 : return(-1); or eax, -1 jmp $LN1@xmlXInclud $LN2@xmlXInclud: ; 2486 : ; 2487 : ctxt = xmlXIncludeNewContext(tree->doc); mov edx, DWORD PTR _tree$[ebp] mov eax, DWORD PTR [edx+32] push eax call _xmlXIncludeNewContext add esp, 4 mov DWORD PTR _ctxt$[ebp], eax ; 2488 : if (ctxt == NULL) cmp DWORD PTR _ctxt$[ebp], 0 jne SHORT $LN4@xmlXInclud ; 2489 : return(-1); or eax, -1 jmp SHORT $LN1@xmlXInclud $LN4@xmlXInclud: ; 2490 : ctxt->_private = data; mov ecx, DWORD PTR _ctxt$[ebp] mov edx, DWORD PTR _data$[ebp] mov DWORD PTR [ecx+68], edx ; 2491 : ctxt->base = xmlStrdup((xmlChar *)tree->doc->URL); mov eax, DWORD PTR _tree$[ebp] mov ecx, DWORD PTR [eax+32] mov edx, DWORD PTR [ecx+72] push edx call _xmlStrdup add esp, 4 mov ecx, DWORD PTR _ctxt$[ebp] mov DWORD PTR [ecx+64], eax ; 2492 : xmlXIncludeSetFlags(ctxt, flags); mov edx, DWORD PTR _flags$[ebp] push edx mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeSetFlags add esp, 8 ; 2493 : ret = xmlXIncludeDoProcess(ctxt, tree->doc, tree); mov ecx, DWORD PTR _tree$[ebp] push ecx mov edx, DWORD PTR _tree$[ebp] mov eax, DWORD PTR [edx+32] push eax mov ecx, DWORD PTR _ctxt$[ebp] push ecx call _xmlXIncludeDoProcess add esp, 12 ; 0000000cH mov DWORD PTR _ret$[ebp], eax ; 2494 : if ((ret >= 0) && (ctxt->nbErrors > 0)) cmp DWORD PTR _ret$[ebp], 0 jl SHORT $LN5@xmlXInclud mov edx, DWORD PTR _ctxt$[ebp] cmp DWORD PTR [edx+52], 0 jle SHORT $LN5@xmlXInclud ; 2495 : ret = -1; mov DWORD PTR _ret$[ebp], -1 $LN5@xmlXInclud: ; 2496 : ; 2497 : xmlXIncludeFreeContext(ctxt); mov eax, DWORD PTR _ctxt$[ebp] push eax call _xmlXIncludeFreeContext add esp, 4 ; 2498 : return(ret); mov eax, DWORD PTR _ret$[ebp] $LN1@xmlXInclud: ; 2499 : } add esp, 8 cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeProcessTreeFlagsData ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeProcessFlagsData _TEXT SEGMENT _tree$ = -4 ; size = 4 _doc$ = 8 ; size = 4 _flags$ = 12 ; size = 4 _data$ = 16 ; size = 4 _xmlXIncludeProcessFlagsData PROC ; COMDAT ; 2514 : xmlXIncludeProcessFlagsData(xmlDocPtr doc, int flags, void *data) { push ebp mov ebp, esp push ecx mov DWORD PTR [ebp-4], -858993460 ; ccccccccH mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 2515 : xmlNodePtr tree; ; 2516 : ; 2517 : if (doc == NULL) cmp DWORD PTR _doc$[ebp], 0 jne SHORT $LN2@xmlXInclud ; 2518 : return(-1); or eax, -1 jmp SHORT $LN1@xmlXInclud $LN2@xmlXInclud: ; 2519 : tree = xmlDocGetRootElement(doc); mov eax, DWORD PTR _doc$[ebp] push eax call _xmlDocGetRootElement add esp, 4 mov DWORD PTR _tree$[ebp], eax ; 2520 : if (tree == NULL) cmp DWORD PTR _tree$[ebp], 0 jne SHORT $LN3@xmlXInclud ; 2521 : return(-1); or eax, -1 jmp SHORT $LN1@xmlXInclud $LN3@xmlXInclud: ; 2522 : return(xmlXIncludeProcessTreeFlagsData(tree, flags, data)); mov ecx, DWORD PTR _data$[ebp] push ecx mov edx, DWORD PTR _flags$[ebp] push edx mov eax, DWORD PTR _tree$[ebp] push eax call _xmlXIncludeProcessTreeFlagsData add esp, 12 ; 0000000cH $LN1@xmlXInclud: ; 2523 : } add esp, 4 cmp ebp, esp call __RTC_CheckEsp mov esp, ebp pop ebp ret 0 _xmlXIncludeProcessFlagsData ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeProcessFlags _TEXT SEGMENT _doc$ = 8 ; size = 4 _flags$ = 12 ; size = 4 _xmlXIncludeProcessFlags PROC ; COMDAT ; 2536 : xmlXIncludeProcessFlags(xmlDocPtr doc, int flags) { push ebp mov ebp, esp mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 2537 : return xmlXIncludeProcessFlagsData(doc, flags, NULL); push 0 mov eax, DWORD PTR _flags$[ebp] push eax mov ecx, DWORD PTR _doc$[ebp] push ecx call _xmlXIncludeProcessFlagsData add esp, 12 ; 0000000cH ; 2538 : } cmp ebp, esp call __RTC_CheckEsp pop ebp ret 0 _xmlXIncludeProcessFlags ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c ; COMDAT _xmlXIncludeProcess _TEXT SEGMENT _doc$ = 8 ; size = 4 _xmlXIncludeProcess PROC ; COMDAT ; 2550 : xmlXIncludeProcess(xmlDocPtr doc) { push ebp mov ebp, esp mov ecx, OFFSET __07371726_xinclude@c call @__CheckForDebuggerJustMyCode@4 ; 2551 : return(xmlXIncludeProcessFlags(doc, 0)); push 0 mov eax, DWORD PTR _doc$[ebp] push eax call _xmlXIncludeProcessFlags add esp, 8 ; 2552 : } cmp ebp, esp call __RTC_CheckEsp pop ebp ret 0 _xmlXIncludeProcess ENDP _TEXT ENDS END
22.366581
112
0.654528
f07f197c27b7ad864308c5332ee3a30042155d95
15,797
py
Python
tempest/cmd/run.py
Juniper/tempest
f8316c9c28e029063c036e1cf83947af068e7703
[ "Apache-2.0" ]
null
null
null
tempest/cmd/run.py
Juniper/tempest
f8316c9c28e029063c036e1cf83947af068e7703
[ "Apache-2.0" ]
null
null
null
tempest/cmd/run.py
Juniper/tempest
f8316c9c28e029063c036e1cf83947af068e7703
[ "Apache-2.0" ]
5
2016-06-24T20:03:52.000Z
2020-02-05T10:14:54.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """ Runs tempest tests This command is used for running the tempest tests Test Selection ============== Tempest run has several options: * **--regex/-r**: This is a selection regex like what testr uses. It will run any tests that match on re.match() with the regex * **--smoke/-s**: Run all the tests tagged as smoke There are also the **--blacklist-file** and **--whitelist-file** options that let you pass a filepath to tempest run with the file format being a line separated regex, with '#' used to signify the start of a comment on a line. For example:: # Regex file ^regex1 # Match these tests .*regex2 # Match those tests The blacklist file will be used to construct a negative lookahead regex and the whitelist file will simply OR all the regexes in the file. The whitelist and blacklist file options are mutually exclusive so you can't use them together. However, you can combine either with a normal regex or the *--smoke* flag. When used with a blacklist file the generated regex will be combined to something like:: ^((?!black_regex1|black_regex2).)*$cli_regex1 When combined with a whitelist file all the regexes from the file and the CLI regexes will be ORed. You can also use the **--list-tests** option in conjunction with selection arguments to list which tests will be run. You can also use the **--load-list** option that lets you pass a filepath to tempest run with the file format being in a non-regex format, similar to the tests generated by the **--list-tests** option. You can specify target tests by removing unnecessary tests from a list file which is generated from **--list-tests** option. Test Execution ============== There are several options to control how the tests are executed. By default tempest will run in parallel with a worker for each CPU present on the machine. If you want to adjust the number of workers use the **--concurrency** option and if you want to run tests serially use **--serial/-t** Running with Workspaces ----------------------- Tempest run enables you to run your tempest tests from any setup tempest workspace it relies on you having setup a tempest workspace with either the ``tempest init`` or ``tempest workspace`` commands. Then using the ``--workspace`` CLI option you can specify which one of your workspaces you want to run tempest from. Using this option you don't have to run Tempest directly with you current working directory being the workspace, Tempest will take care of managing everything to be executed from there. Running from Anywhere --------------------- Tempest run provides you with an option to execute tempest from anywhere on your system. You are required to provide a config file in this case with the ``--config-file`` option. When run tempest will create a .testrepository directory and a .testr.conf file in your current working directory. This way you can use testr commands directly to inspect the state of the previous run. Test Output =========== By default tempest run's output to STDOUT will be generated using the subunit-trace output filter. But, if you would prefer a subunit v2 stream be output to STDOUT use the **--subunit** flag Combining Runs ============== There are certain situations in which you want to split a single run of tempest across 2 executions of tempest run. (for example to run part of the tests serially and others in parallel) To accomplish this but still treat the results as a single run you can leverage the **--combine** option which will append the current run's results with the previous runs. """ import io import os import sys import tempfile import threading from cliff import command from os_testr import regex_builder from os_testr import subunit_trace from oslo_serialization import jsonutils as json import six from testrepository.commands import run_argv from tempest import clients from tempest.cmd import cleanup_service from tempest.cmd import init from tempest.cmd import workspace from tempest.common import credentials_factory as credentials from tempest import config CONF = config.CONF SAVED_STATE_JSON = "saved_state.json" class TempestRun(command.Command): def _set_env(self, config_file=None): if config_file: CONF.set_config_path(os.path.abspath(config_file)) # NOTE(mtreinish): This is needed so that testr doesn't gobble up any # stacktraces on failure. if 'TESTR_PDB' in os.environ: return else: os.environ["TESTR_PDB"] = "" # NOTE(dims): most of our .testr.conf try to test for PYTHON # environment variable and fall back to "python", under python3 # if it does not exist. we should set it to the python3 executable # to deal with this situation better for now. if six.PY3 and 'PYTHON' not in os.environ: os.environ['PYTHON'] = sys.executable def _create_testrepository(self): if not os.path.isdir('.testrepository'): returncode = run_argv(['testr', 'init'], sys.stdin, sys.stdout, sys.stderr) if returncode: sys.exit(returncode) def _create_testr_conf(self): top_level_path = os.path.dirname(os.path.dirname(__file__)) discover_path = os.path.join(top_level_path, 'test_discover') file_contents = init.TESTR_CONF % (top_level_path, discover_path) with open('.testr.conf', 'w+') as testr_conf_file: testr_conf_file.write(file_contents) def take_action(self, parsed_args): returncode = 0 if parsed_args.config_file: self._set_env(parsed_args.config_file) else: self._set_env() # Workspace execution mode if parsed_args.workspace: workspace_mgr = workspace.WorkspaceManager( parsed_args.workspace_path) path = workspace_mgr.get_workspace(parsed_args.workspace) if not path: sys.exit( "The %r workspace isn't registered in " "%r. Use 'tempest init' to " "register the workspace." % (parsed_args.workspace, workspace_mgr.path)) os.chdir(path) # NOTE(mtreinish): tempest init should create a .testrepository dir # but since workspaces can be imported let's sanity check and # ensure that one is created self._create_testrepository() # Local execution mode elif os.path.isfile('.testr.conf'): # If you're running in local execution mode and there is not a # testrepository dir create one self._create_testrepository() # local execution with config file mode elif parsed_args.config_file: self._create_testr_conf() self._create_testrepository() else: print("No .testr.conf file was found for local execution") sys.exit(2) if parsed_args.state: self._init_state() else: pass if parsed_args.combine: temp_stream = tempfile.NamedTemporaryFile() return_code = run_argv(['tempest', 'last', '--subunit'], sys.stdin, temp_stream, sys.stderr) if return_code > 0: sys.exit(return_code) regex = self._build_regex(parsed_args) if parsed_args.list_tests: argv = ['tempest', 'list-tests', regex] returncode = run_argv(argv, sys.stdin, sys.stdout, sys.stderr) else: options = self._build_options(parsed_args) returncode = self._run(regex, options) if returncode > 0: sys.exit(returncode) if parsed_args.combine: return_code = run_argv(['tempest', 'last', '--subunit'], sys.stdin, temp_stream, sys.stderr) if return_code > 0: sys.exit(return_code) returncode = run_argv(['tempest', 'load', temp_stream.name], sys.stdin, sys.stdout, sys.stderr) sys.exit(returncode) def get_description(self): return 'Run tempest' def _init_state(self): print("Initializing saved state.") data = {} self.global_services = cleanup_service.get_global_cleanup_services() self.admin_mgr = clients.Manager( credentials.get_configured_admin_credentials()) admin_mgr = self.admin_mgr kwargs = {'data': data, 'is_dry_run': False, 'saved_state_json': data, 'is_preserve': False, 'is_save_state': True} for service in self.global_services: svc = service(admin_mgr, **kwargs) svc.run() with open(SAVED_STATE_JSON, 'w+') as f: f.write(json.dumps(data, sort_keys=True, indent=2, separators=(',', ': '))) def get_parser(self, prog_name): parser = super(TempestRun, self).get_parser(prog_name) parser = self._add_args(parser) return parser def _add_args(self, parser): # workspace args parser.add_argument('--workspace', default=None, help='Name of tempest workspace to use for running' ' tests. You can see a list of workspaces ' 'with tempest workspace list') parser.add_argument('--workspace-path', default=None, dest='workspace_path', help="The path to the workspace file, the default " "is ~/.tempest/workspace.yaml") # Configuration flags parser.add_argument('--config-file', default=None, dest='config_file', help='Configuration file to run tempest with') # test selection args regex = parser.add_mutually_exclusive_group() regex.add_argument('--smoke', '-s', action='store_true', help="Run the smoke tests only") regex.add_argument('--regex', '-r', default='', help='A normal testr selection regex used to ' 'specify a subset of tests to run') list_selector = parser.add_mutually_exclusive_group() list_selector.add_argument('--whitelist-file', '--whitelist_file', help="Path to a whitelist file, this file " "contains a separate regex on each " "newline.") list_selector.add_argument('--blacklist-file', '--blacklist_file', help='Path to a blacklist file, this file ' 'contains a separate regex exclude on ' 'each newline') list_selector.add_argument('--load-list', '--load_list', help='Path to a non-regex whitelist file, ' 'this file contains a seperate test ' 'on each newline. This command' 'supports files created by the tempest' 'run ``--list-tests`` command') # list only args parser.add_argument('--list-tests', '-l', action='store_true', help='List tests', default=False) # execution args parser.add_argument('--concurrency', '-w', help="The number of workers to use, defaults to " "the number of cpus") parallel = parser.add_mutually_exclusive_group() parallel.add_argument('--parallel', dest='parallel', action='store_true', help='Run tests in parallel (this is the' ' default)') parallel.add_argument('--serial', '-t', dest='parallel', action='store_false', help='Run tests serially') parser.add_argument('--save-state', dest='state', action='store_true', help="To save the state of the cloud before " "running tempest.") # output args parser.add_argument("--subunit", action='store_true', help='Enable subunit v2 output') parser.add_argument("--combine", action='store_true', help='Combine the output of this run with the ' "previous run's as a combined stream in the " "testr repository after it finish") parser.set_defaults(parallel=True) return parser def _build_regex(self, parsed_args): regex = '' if parsed_args.smoke: regex = 'smoke' elif parsed_args.regex: regex = parsed_args.regex if parsed_args.whitelist_file or parsed_args.blacklist_file: regex = regex_builder.construct_regex(parsed_args.blacklist_file, parsed_args.whitelist_file, regex, False) return regex def _build_options(self, parsed_args): options = [] if parsed_args.subunit: options.append("--subunit") if parsed_args.parallel: options.append("--parallel") if parsed_args.concurrency: options.append("--concurrency=%s" % parsed_args.concurrency) if parsed_args.load_list: options.append("--load-list=%s" % parsed_args.load_list) return options def _run(self, regex, options): returncode = 0 argv = ['tempest', 'run', regex] + options if '--subunit' in options: returncode = run_argv(argv, sys.stdin, sys.stdout, sys.stderr) else: argv.append('--subunit') stdin = io.StringIO() stdout_r, stdout_w = os.pipe() subunit_w = os.fdopen(stdout_w, 'wt') subunit_r = os.fdopen(stdout_r) returncodes = {} def run_argv_thread(): returncodes['testr'] = run_argv(argv, stdin, subunit_w, sys.stderr) subunit_w.close() run_thread = threading.Thread(target=run_argv_thread) run_thread.start() returncodes['subunit-trace'] = subunit_trace.trace( subunit_r, sys.stdout, post_fails=True, print_failures=True) run_thread.join() subunit_r.close() # python version of pipefail if returncodes['testr']: returncode = returncodes['testr'] elif returncodes['subunit-trace']: returncode = returncodes['subunit-trace'] return returncode
43.043597
79
0.599734
7bc7fc90d308a25fd34d4c214628670851e0093c
389
rb
Ruby
config/routes.rb
SHUBV92/RPI-Security-Sensor
579fdb6deb543d1af6e22f3b859ba6031cdd6f1a
[ "MIT" ]
1
2020-01-07T09:56:28.000Z
2020-01-07T09:56:28.000Z
config/routes.rb
mattfreeman-london/RPI-Security-Sensor
579fdb6deb543d1af6e22f3b859ba6031cdd6f1a
[ "MIT" ]
6
2020-01-07T09:50:04.000Z
2022-03-31T00:28:58.000Z
config/routes.rb
mattfreeman-london/RPI-Security-Sensor
579fdb6deb543d1af6e22f3b859ba6031cdd6f1a
[ "MIT" ]
4
2020-01-07T09:48:49.000Z
2020-01-20T11:46:42.000Z
Rails.application.routes.draw do authenticated :user do root to: 'feed#show' end get 'feed/images', to: 'feed#show' get "/pages/:page" => "pages#show" post "/", to: 'feed#create' # Method in controller root :to => redirect("/users/sign_in") devise_for :users # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html end
21.611111
101
0.681234
fe0db513a9c4cd643da1c8513582252ff8ac3ca1
4,529
c
C
generated/gtriangul1_res.c
ahrnbom/guts
9134e7f6568a24b435841e5934a640bdbe329a68
[ "MIT" ]
null
null
null
generated/gtriangul1_res.c
ahrnbom/guts
9134e7f6568a24b435841e5934a640bdbe329a68
[ "MIT" ]
null
null
null
generated/gtriangul1_res.c
ahrnbom/guts
9134e7f6568a24b435841e5934a640bdbe329a68
[ "MIT" ]
null
null
null
#include <math.h> void generated_function(double* A0, const double x3D, const double y3D, const double P11_1, const double P11_2, const double P11_3, const double P11_4, const double P12_1, const double P12_2, const double P12_3, const double P12_4, const double P13_1, const double P13_2, const double P13_3, const double P13_4, const double twodim1, const double twodim2, const double twodim3, const double G1_1, const double G1_2, const double G1_3, const double G1_4, const double G1_5, const double G1_6, const double G1_7, const double G1_8, const double G2_1, const double G2_2, const double G2_3, const double G2_4, const double G2_5, const double G2_6, const double G2_7, const double G2_8, const double G3_1, const double G3_2, const double G3_3, const double G3_4, const double G3_5, const double G3_6, const double G3_7, const double G3_8, const double alpha) { const double t2 = P13_1*x3D; const double t3 = P13_2*y3D; const double t4 = 1.0/twodim3; const double t5 = -x3D; const double t6 = -y3D; const double t7 = G1_1+t5; const double t8 = G1_2+t5; const double t9 = G1_3+t5; const double t10 = G1_4+t5; const double t11 = G1_5+t5; const double t12 = G1_6+t5; const double t13 = G1_7+t5; const double t14 = G1_8+t5; const double t15 = G2_1+t6; const double t16 = G2_2+t6; const double t17 = G2_3+t6; const double t18 = G2_4+t6; const double t19 = G2_5+t6; const double t20 = G2_6+t6; const double t21 = G2_7+t6; const double t22 = G2_8+t6; const double t23 = t7*t7; const double t24 = t8*t8; const double t25 = t9*t9; const double t26 = t10*t10; const double t27 = t11*t11; const double t28 = t12*t12; const double t29 = t13*t13; const double t30 = t14*t14; const double t31 = t15*t15; const double t32 = t16*t16; const double t33 = t17*t17; const double t34 = t18*t18; const double t35 = t19*t19; const double t36 = t20*t20; const double t37 = t21*t21; const double t38 = t22*t22; const double t39 = t23+t31; const double t40 = t24+t32; const double t41 = t25+t33; const double t42 = t26+t34; const double t43 = t27+t35; const double t44 = t28+t36; const double t45 = t29+t37; const double t46 = t30+t38; const double t47 = sqrt(t39); const double t48 = sqrt(t40); const double t49 = sqrt(t41); const double t50 = sqrt(t42); const double t51 = sqrt(t43); const double t52 = sqrt(t44); const double t53 = sqrt(t45); const double t54 = sqrt(t46); const double t55 = alpha*t47; const double t56 = alpha*t48; const double t57 = alpha*t49; const double t58 = alpha*t50; const double t59 = alpha*t51; const double t60 = alpha*t52; const double t61 = alpha*t53; const double t62 = alpha*t54; const double t63 = -t55; const double t64 = -t56; const double t65 = -t57; const double t66 = -t58; const double t67 = -t59; const double t68 = -t60; const double t69 = -t61; const double t70 = -t62; const double t71 = exp(t63); const double t72 = exp(t64); const double t73 = exp(t65); const double t74 = exp(t66); const double t75 = exp(t67); const double t76 = exp(t68); const double t77 = exp(t69); const double t78 = exp(t70); const double t79 = G3_1*t71; const double t80 = G3_2*t72; const double t81 = G3_3*t73; const double t82 = G3_4*t74; const double t83 = G3_5*t75; const double t84 = G3_6*t76; const double t85 = G3_7*t77; const double t86 = G3_8*t78; const double t87 = t71+t72+t73+t74+t75+t76+t77+t78; const double t88 = 1.0/t87; const double t89 = t79+t80+t81+t82+t83+t84+t85+t86; const double t90 = P13_3*t88*t89; const double t91 = P13_4+t2+t3+t90; const double t92 = 1.0/t91; A0[0] = -t4*twodim1+t92*(P11_4+P11_1*x3D+P11_2*y3D+P11_3*t88*t89); A0[1] = -t4*twodim2+t92*(P12_4+P12_1*x3D+P12_2*y3D+P12_3*t88*t89); } void main(double* out, double* data) { generated_function(out, data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7], data[8], data[9], data[10], data[11], data[12], data[13], data[14], data[15], data[16], data[17], data[18], data[19], data[20], data[21], data[22], data[23], data[24], data[25], data[26], data[27], data[28], data[29], data[30], data[31], data[32], data[33], data[34], data[35], data[36], data[37], data[38], data[39], data[40], data[41]); } /* Output matrix should be of size 1 x 2 */
44.401961
855
0.65467
9be3a5b33d46c6ab60330eab43e93451a365bebf
828
js
JavaScript
benchmarks/generated/lia/8/5.js
BillHallahan/Lava
512729ea951681418aebe68c041dd935b66be0e2
[ "BSD-3-Clause" ]
null
null
null
benchmarks/generated/lia/8/5.js
BillHallahan/Lava
512729ea951681418aebe68c041dd935b66be0e2
[ "BSD-3-Clause" ]
2
2019-05-28T18:44:59.000Z
2019-05-28T18:58:56.000Z
benchmarks/generated/lia/8/5.js
BillHallahan/Lava
512729ea951681418aebe68c041dd935b66be0e2
[ "BSD-3-Clause" ]
null
null
null
function add(x_0, x_1) { return x_0 + x_1; } function mult(x_0, x_1) { return x_0 * x_1; } function increment(x_0) { return x_0 + 1; } function decrement(x_0) { return x_0 - 1; } function subtract(x_0, x_1) { return x_0 - x_1; } function double(x_0) { return x_0 * 2; } function f131f(x_0, x_1, x_2) { return add(add(x_0, x_0), mult(x_1, x_0)); } function f736f(x_0) { return add(mult(x_0, x_0), f131f(x_0, x_0, x_0)); } function f962f(x_0, x_1) { return subtract(subtract(x_0, x_0), double(x_0)); } function f148f(x_0) { return mult(f962f(x_0, x_0), f736f(x_0)); } function f908f(x_0, x_1, x_2) { return subtract(x_2, f736f(x_1)); } //@pbe (constraint (= (f747f -5 2 9) -79)) //@pbe (constraint (= (f747f 10 -2 2) -6)) //@pbe (constraint (= (f747f -4 -2 4) -18)) //@pbe (constraint (= (f747f -2 1 8) -63))
14.033898
50
0.626812
05061dc325631bab1ff36cf95bf50ba8670f2991
314
kt
Kotlin
app/src/main/java/com/example/tangoapp/data/ApiService.kt
ispam/tango_app
5ab3fd745ffe8cfdf389c9f5422643100a358668
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/example/tangoapp/data/ApiService.kt
ispam/tango_app
5ab3fd745ffe8cfdf389c9f5422643100a358668
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/example/tangoapp/data/ApiService.kt
ispam/tango_app
5ab3fd745ffe8cfdf389c9f5422643100a358668
[ "Apache-2.0" ]
null
null
null
package com.example.tangoapp.data import com.example.tangoapp.data.entities.News import retrofit2.Response import retrofit2.http.GET import retrofit2.http.Headers interface ApiService { @Headers("Content-Type: application/json") @GET("/v3/articles") suspend fun getArticles(): Response<List<News>> }
24.153846
51
0.770701
9be2296671e5683e4cb70788c8a7e1f9e82de3df
477
js
JavaScript
src/reducers/createFetchReducers.js
just-paja/improtresk-web
446e31bbc6a72514dfdc79650c11c340b826d8c0
[ "MIT" ]
1
2017-01-04T16:12:44.000Z
2017-01-04T16:12:44.000Z
src/reducers/createFetchReducers.js
just-paja/improtresk-web
446e31bbc6a72514dfdc79650c11c340b826d8c0
[ "MIT" ]
8
2017-01-30T08:49:13.000Z
2017-03-16T13:02:52.000Z
src/reducers/createFetchReducers.js
just-paja/improtresk-web
446e31bbc6a72514dfdc79650c11c340b826d8c0
[ "MIT" ]
2
2017-03-16T12:31:36.000Z
2017-05-01T15:10:27.000Z
import { fetchFailure, fetchStart, fetchStop, fetchSuccess, invalidateOnResourceChange } from 'react-saga-rest' export { defaultResourceState as initialState } from 'react-saga-rest' export default ({ routine, identAttr }) => ({ [routine.TRIGGER]: identAttr ? invalidateOnResourceChange(identAttr, 'payload') : undefined, [routine.FAILURE]: fetchFailure, [routine.FULFILL]: fetchStop, [routine.REQUEST]: fetchStart, [routine.SUCCESS]: fetchSuccess })
22.714286
94
0.735849
388b2ec7862ad524a5514654bd4fb2543e18b0d0
7,763
c
C
src/tools/gt_condenseq_info.c
satta/genometools
3955d63c95e142c2475e1436206fddf0eb29185d
[ "BSD-2-Clause" ]
202
2015-01-08T10:09:57.000Z
2022-03-31T09:45:44.000Z
src/tools/gt_condenseq_info.c
satta/genometools
3955d63c95e142c2475e1436206fddf0eb29185d
[ "BSD-2-Clause" ]
286
2015-01-05T16:29:27.000Z
2022-03-30T21:19:03.000Z
src/tools/gt_condenseq_info.c
satta/genometools
3955d63c95e142c2475e1436206fddf0eb29185d
[ "BSD-2-Clause" ]
56
2015-01-19T11:33:22.000Z
2022-03-21T21:47:05.000Z
/* Copyright (c) 2014 Florian Markowsky <1markows@informatik.uni-hamburg.de> Copyright (c) 2014 Dirk Willrodt <willrodt@zbh.uni-hamburg.de> Copyright (c) 2014 Center for Bioinformatics, University of Hamburg Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "core/log_api.h" #include "core/logger.h" #include "core/ma_api.h" #include "core/undef_api.h" #include "core/unused_api.h" #include "extended/condenseq.h" #include "tools/gt_condenseq_info.h" typedef struct { GtUword link; unsigned int align_len; bool verbose, gff, dist, compdist, size; } GtCondenseqInfoArguments; static void* gt_condenseq_info_arguments_new(void) { GtCondenseqInfoArguments *arguments = gt_calloc((size_t) 1, sizeof *arguments); return arguments; } static void gt_condenseq_info_arguments_delete(void *tool_arguments) { GtCondenseqInfoArguments *arguments = tool_arguments; if (arguments != NULL) { gt_free(arguments); } } static GtOptionParser* gt_condenseq_info_option_parser_new(void *tool_arguments) { GtCondenseqInfoArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *option; gt_assert(arguments); /* init */ op = gt_option_parser_new("[options] condenseq", "Shows statistical information of a condenseq."); /* -verbose */ option = gt_option_new_bool("verbose", "verbose output", &arguments->verbose, false); gt_option_parser_add_option(op, option); /* -size */ option = gt_option_new_bool("size", "output size in bytes in memory", &arguments->size, false); gt_option_parser_add_option(op, option); /* -gff */ option = gt_option_new_bool("gff", "output uniques and links as gff3 file", &arguments->gff, false); gt_option_parser_add_option(op, option); /* -dist */ option = gt_option_new_bool("dist", "output dists of unique and link length", &arguments->dist, false); gt_option_parser_add_option(op, option); /* -compdist */ option = gt_option_new_bool("compdist", "output dists of editsript " "compression ratios", &arguments->compdist, false); gt_option_parser_add_option(op, option); /* -link */ option = gt_option_new_uword("link", "output editscript information of given " "link", &arguments->link, GT_UNDEF_UWORD); gt_option_parser_add_option(op, option); /* -align_len */ option = gt_option_new_uint("align_len", "show statistics for unique with " "assumed min alignment length.", &arguments->align_len, GT_UNDEF_UINT); gt_option_parser_add_option(op, option); return op; } static int gt_condenseq_info_runner(GT_UNUSED int argc, const char **argv, int parsed_args, void *tool_arguments, GtError *err) { GtCondenseqInfoArguments *arguments = tool_arguments; int had_err = 0; GtCondenseq *ces = NULL; GtLogger *logger = NULL; gt_error_check(err); logger = gt_logger_new(arguments->verbose, GT_LOGGER_DEFLT_PREFIX, stderr); if (!had_err) { ces = gt_condenseq_new_from_file(argv[parsed_args], logger, err); if (ces == NULL) had_err = -1; } if (!had_err) { GtUword num, total; num = gt_condenseq_num_uniques(ces); total = gt_condenseq_total_unique_len(ces); printf(GT_WU "\tunique entries\n", num); printf(GT_WU "\tunique length\n", total); printf(GT_WU "\taverage unique length\n", total / num); if (arguments->align_len != GT_UNDEF_UINT) printf(GT_WU "\trelevant uniques (>= %u)\n", gt_condenseq_count_relevant_uniques(ces, arguments->align_len), arguments->align_len); num = gt_condenseq_num_links(ces); total = gt_condenseq_total_link_len(ces); printf(GT_WU "\tlink entries\n", num); printf(GT_WU "\tlink length\n", total); printf(GT_WU "\taverage link length\n", total / num); printf(GT_WU "\ttotal length\n", gt_condenseq_total_length(ces)); } if (!had_err && arguments->size) { GtUword size, links, uniques, eds, descs, ssp; size = gt_condenseq_size(ces, &uniques, &links, &eds, &descs, &ssp); printf(GT_WU "\tbytes total size\n", size); printf(GT_WU "\tbytes uniques size\n", uniques); printf(GT_WU "\tbytes links size (without editscripts)\n", links); printf(GT_WU "\tbytes editscripts size\n", eds); printf(GT_WU "\tbytes descriptions size\n", descs); printf(GT_WU "\tbytes ssptab size\n", ssp); } if (!had_err && arguments->gff) { had_err = gt_condenseq_output_to_gff3(ces, err); } if (!had_err && arguments->link != GT_UNDEF_UWORD) { if (arguments->link >= gt_condenseq_num_links(ces)) { gt_error_set(err, GT_WU " exceedes number of links: " GT_WU, arguments->link, gt_condenseq_num_links(ces)); had_err = -1; } else { GtUword match, mis, ins, del, vlen, size; const GtEditscript *es = gt_condenseq_link_editscript(ces, arguments->link); GtAlphabet *al = gt_condenseq_alphabet(ces); gt_editscript_get_stats(es, &match, &mis, &ins, &del); vlen = gt_editscript_get_target_len(es); gt_editscript_show(es, al); printf("target (v) len: " GT_WU "\n" GT_WU " matches\n" GT_WU " mismatches\n" GT_WU " indels\n", vlen, match, mis, ins + del); size = (GtUword) gt_editscript_size(es); printf(GT_WU "/" GT_WU " compressed size: %.2f\n", size, vlen, ((double) size / (double) vlen) * 100.0); gt_alphabet_delete(al); } } if (!had_err && arguments->dist) { GtFile *outfile = gt_file_new_from_fileptr(stdout); GtDiscDistri *dist = gt_condenseq_unique_length_dist(ces); printf("unique length distribution\n"); gt_disc_distri_show(dist, outfile); gt_disc_distri_delete(dist); dist = gt_condenseq_link_length_dist(ces); printf("link length distribution\n"); gt_disc_distri_show(dist, outfile); gt_disc_distri_delete(dist); gt_file_delete_without_handle(outfile); } if (!had_err && arguments->compdist) { GtFile *outfile = gt_file_new_from_fileptr(stdout); GtDiscDistri *dist = gt_condenseq_link_comp_dist(ces); printf("compression distribution\n"); gt_disc_distri_show(dist, outfile); gt_disc_distri_delete(dist); gt_file_delete_without_handle(outfile); } gt_condenseq_delete(ces); gt_logger_delete(logger); return had_err; } GtTool* gt_condenseq_info(void) { return gt_tool_new(gt_condenseq_info_arguments_new, gt_condenseq_info_arguments_delete, gt_condenseq_info_option_parser_new, NULL, gt_condenseq_info_runner); }
36.106977
80
0.653227
1762358a31d9fc8e6abfe83a0aadde3afcb75d7e
1,751
html
HTML
docs/index.html
Luismcplopes/slack-webhook
e056d9a51f33f6c64f598563e742f96c81d269d7
[ "MIT" ]
null
null
null
docs/index.html
Luismcplopes/slack-webhook
e056d9a51f33f6c64f598563e742f96c81d269d7
[ "MIT" ]
1
2019-07-18T15:18:55.000Z
2019-07-18T15:18:55.000Z
docs/index.html
Luismcplopes/slack-webhook
e056d9a51f33f6c64f598563e742f96c81d269d7
[ "MIT" ]
null
null
null
<h1 id="slack-webhooks">Slack-Webhooks</h1> <p>This package leet you send messages in to a Slack Channel and can be activated as a service for when server with Ubuntu was turned off or on we received a notification on the slack channel</p> <div class="figure"> <img src="https://github.com/Luismcplopes/slack-webhook/raw/master/custom-emojis/slackmessage.jpg" alt="https://github.com/Luismcplopes/slack-webhook/blob/master/custom-emojis/slackmessage.jpg" /><p class="caption">https://github.com/Luismcplopes/slack-webhook/blob/master/custom-emojis/slackmessage.jpg</p> </div> <h2 id="to-create-you-will-need">To create you will need</h2> <ul> <li>Ubuntu 16.04</li> <li>Slack Webhook Url</li> <li>Channel name (without #)</li> <li>Emoji name (smiley without :)</li> </ul> <h2 id="create-a-debian-package">Create a debian package</h2> <ul> <li>Build</li> <li><code>sudo ./build.sh</code></li> <li>Install</li> <li><code>sudo dpkg -i slack-webhooks_0.8-amd64.deb</code></li> <li>Test</li> <li><code>slack-webhook -r &quot;my_room&quot; -m &quot;test me&quot;</code></li> <li>Install as a service</li> <li><code>sudo bash /etc/slack-webhooks/install-asservice.sh</code></li> <li>Test the service</li> <li><code>sudo systemctl restart slack-notify-start-stop.service</code></li> <li>Uninstall</li> <li><code>sudo dpkg --remove slack-webhooks</code></li> </ul> <h2 id="note-about-emojis">Note about emojis</h2> <p>This example uses the emoji :ubuntu: to display the emoji as a user icon. The :ubuntu: emoji does not exist in grab the image from this folder <a href="/custom-emojis">custom emojis</a></p> <p>If you are not familiar with how to do this here is a slack how-to article https://get.slack.help/hc/en-us/articles/206870177-Create-custom-emoji</p>
56.483871
307
0.731582
6b8f539357afedb5d52724963057c4c64ec652bc
52
c
C
test cases/unit/67 static link/lib/func2.c
kira78/meson
0ae840656c5b87f30872072aa8694667c63c96d2
[ "Apache-2.0" ]
4,047
2015-06-18T10:36:48.000Z
2022-03-31T09:47:02.000Z
test cases/unit/67 static link/lib/func2.c
kira78/meson
0ae840656c5b87f30872072aa8694667c63c96d2
[ "Apache-2.0" ]
8,206
2015-06-14T12:20:48.000Z
2022-03-31T22:50:37.000Z
test cases/unit/67 static link/lib/func2.c
kira78/meson
0ae840656c5b87f30872072aa8694667c63c96d2
[ "Apache-2.0" ]
1,489
2015-06-27T04:06:38.000Z
2022-03-29T10:14:48.000Z
int func1(); int func2() { return func1() + 1; }
7.428571
21
0.538462
07f27947e51b93af560c4d4e57349c5e19e410ee
436
c
C
gcc-gcc-7_3_0-release/gcc/testsuite/gcc.dg/volatile2.c
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/testsuite/gcc.dg/volatile2.c
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/gcc.dg/volatile2.c
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
/* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ struct GTeth_desc { unsigned ed_cmdsts; }; struct GTeth_softc { struct GTeth_desc txq_desc[32]; }; void foo(struct GTeth_softc *sc) { /* Verify that we retain the volatileness on the store until after optimization. */ volatile struct GTeth_desc *p = &sc->txq_desc[0]; p->ed_cmdsts = 0; } /* { dg-final { scan-tree-dump "{v}" "optimized" } } */
19.818182
55
0.649083
3b67250089d2f0a498076bc14efe1d72dd18832e
7,023
sql
SQL
backend/de.metas.fresh/de.metas.fresh.base/src/main/sql/postgresql/ddl/functions/Docs_Sales_Order_Details.sql
metas-fresh/fresh
265b6e00fbbf154d6a7bbb9aaf9cf7135f9d6a27
[ "RSA-MD" ]
1
2015-11-09T07:13:14.000Z
2015-11-09T07:13:14.000Z
backend/de.metas.fresh/de.metas.fresh.base/src/main/sql/postgresql/ddl/functions/Docs_Sales_Order_Details.sql
metas-fresh/fresh
265b6e00fbbf154d6a7bbb9aaf9cf7135f9d6a27
[ "RSA-MD" ]
null
null
null
backend/de.metas.fresh/de.metas.fresh.base/src/main/sql/postgresql/ddl/functions/Docs_Sales_Order_Details.sql
metas-fresh/fresh
265b6e00fbbf154d6a7bbb9aaf9cf7135f9d6a27
[ "RSA-MD" ]
null
null
null
DROP FUNCTION IF EXISTS de_metas_endcustomer_fresh_reports.Docs_Sales_Order_Details(IN p_record_id numeric, IN p_ad_language Character Varying(6)) ; CREATE OR REPLACE FUNCTION de_metas_endcustomer_fresh_reports.Docs_Sales_Order_Details(IN p_record_id numeric, IN p_ad_language Character Varying(6)) RETURNS TABLE ( line numeric(10, 0), Name character varying, Attributes text, HUQty numeric, HUName character varying, QtyEnteredInPriceUOM numeric, PriceEntered numeric, UOMSymbol character varying(10), StdPrecision numeric(10, 0), linenetamt numeric, discount numeric, isDiscountPrinted character(1), rate character varying, isPrintTax character(1), description character varying, documentnote character varying, productdescription character varying, bp_product_no character varying(30), bp_product_name character varying(100), cursymbol character varying(10), p_value character varying(40), p_description character varying(255), order_description character varying(1024), c_order_compensationgroup_id numeric, isgroupcompensationline character(1), groupname character varying(255), iso_code character(3), iscampaignprice character(1), weight numeric ) AS $$ SELECT ol.line, COALESCE(pt.Name, p.name) AS Name, CASE WHEN LENGTH(att.Attributes) > 15 THEN att.Attributes || E'\n' ELSE att.Attributes END AS Attributes, ol.QtyEnteredTU AS HUQty, CASE WHEN piit.M_HU_PI_Version_ID = 101 OR ol.QtyEnteredTU IS NULL THEN NULL ELSE ip.name END AS HUName, ol.QtyEnteredInPriceUOM AS QtyEnteredInPriceUOM, ol.PriceEntered AS PriceEntered, COALESCE(uomt.UOMSymbol, uom.UOMSymbol) AS UOMSymbol, uom.StdPrecision, ol.linenetamt AS linenetamt, CASE WHEN ROUND(discount, 0) = discount THEN ROUND(discount, 0) WHEN ROUND(discount, 1) = discount THEN ROUND(discount, 1) ELSE ROUND(discount, 2) END AS discount, bp.isDiscountPrinted, CASE WHEN ROUND(rate, 0) = rate THEN ROUND(rate, 0) WHEN ROUND(rate, 1) = rate THEN ROUND(rate, 1) ELSE ROUND(rate, 2) END::character varying AS rate, isPrintTax, ol.description, ol.M_Product_DocumentNote AS documentnote, ol.productdescription, -- in case there is no C_BPartner_Product, fallback to the default ones COALESCE(NULLIF(bpp.ProductNo, ''), p.value) AS bp_product_no, COALESCE(NULLIF(bpp.ProductName, ''), pt.Name, p.name) AS bp_product_name, c.cursymbol, p.value AS p_value, p.description AS p_description, o.description AS order_description, ol.c_order_compensationgroup_id, ol.isgroupcompensationline, cg.name, c.iso_code, ol.iscampaignprice, p.weight FROM C_OrderLine ol INNER JOIN C_Order o ON ol.C_Order_ID = o.C_Order_ID INNER JOIN C_BPartner bp ON o.C_BPartner_ID = bp.C_BPartner_ID LEFT OUTER JOIN C_BP_Group bpg ON bp.C_BP_Group_ID = bpg.C_BP_Group_ID LEFT OUTER JOIN M_HU_PI_Item_Product ip ON ol.M_HU_PI_Item_Product_ID = ip.M_HU_PI_Item_Product_ID AND ip.isActive = 'Y' LEFT OUTER JOIN M_HU_PI_Item piit ON ip.M_HU_PI_Item_ID = piit.M_HU_PI_Item_ID AND piit.isActive = 'Y' -- Product and its translation LEFT OUTER JOIN M_Product p ON ol.M_Product_ID = p.M_Product_ID LEFT OUTER JOIN M_Product_Trl pt ON ol.M_Product_ID = pt.M_Product_ID AND pt.AD_Language = p_ad_language AND pt.isActive = 'Y' LEFT OUTER JOIN M_Product_Category pc ON p.M_Product_Category_ID = pc.M_Product_Category_ID -- Unit of measurement and its translation LEFT OUTER JOIN C_UOM uom ON ol.Price_UOM_ID = uom.C_UOM_ID LEFT OUTER JOIN C_UOM_Trl uomt ON ol.Price_UOM_ID = uomt.C_UOM_ID AND uomt.AD_Language = p_ad_language AND uomt.isActive = 'Y' AND uomt.isActive = 'Y' -- Tax LEFT OUTER JOIN C_Tax t ON ol.C_Tax_ID = t.C_Tax_ID -- Get Attributes LEFT OUTER JOIN ( SELECT STRING_AGG(att.ai_value, ', ' ORDER BY LENGTH(att.ai_value)) AS Attributes, att.M_AttributeSetInstance_ID, ol.C_OrderLine_ID FROM Report.fresh_Attributes att JOIN C_OrderLine ol ON att.M_AttributeSetInstance_ID = ol.M_AttributeSetInstance_ID WHERE att.IsPrintedInDocument = 'Y' AND ol.C_Order_ID = p_record_id GROUP BY att.M_AttributeSetInstance_ID, ol.C_OrderLine_ID ) att ON ol.M_AttributeSetInstance_ID = att.M_AttributeSetInstance_ID AND ol.C_OrderLine_ID = att.C_OrderLine_ID LEFT OUTER JOIN de_metas_endcustomer_fresh_reports.getC_BPartner_Product_Details(p.M_Product_ID, bp.C_BPartner_ID, att.M_AttributeSetInstance_ID) AS bpp ON 1 = 1 -- compensation group LEFT JOIN c_order_compensationgroup cg ON ol.c_order_compensationgroup_id = cg.c_order_compensationgroup_id LEFT JOIN C_Currency c ON o.C_Currency_ID = c.C_Currency_ID AND c.isActive = 'Y' WHERE ol.C_Order_ID = p_record_id AND ol.isActive = 'Y' AND (COALESCE(pc.M_Product_Category_ID, -1) != getSysConfigAsNumeric('PackingMaterialProductCategoryID', ol.AD_Client_ID, ol.AD_Org_ID)) ORDER BY ol.line $$ LANGUAGE sql STABLE ;
53.610687
159
0.543358
72d7408bc56f45dd7d7d7b02fd666547e0b8196d
200
kt
Kotlin
recipe-api/src/main/kotlin/io/bwvolleyball/recipe/domain/Category.kt
Bwvolleyball/recipe-organizr
fa173a4d2d331c443861ebe07e0f8419f0a8fe67
[ "Apache-2.0" ]
null
null
null
recipe-api/src/main/kotlin/io/bwvolleyball/recipe/domain/Category.kt
Bwvolleyball/recipe-organizr
fa173a4d2d331c443861ebe07e0f8419f0a8fe67
[ "Apache-2.0" ]
10
2019-07-13T18:29:09.000Z
2022-03-02T04:02:45.000Z
recipe-api/src/main/kotlin/io/bwvolleyball/recipe/domain/Category.kt
Bwvolleyball/recipe-organizr
fa173a4d2d331c443861ebe07e0f8419f0a8fe67
[ "Apache-2.0" ]
null
null
null
package io.bwvolleyball.recipe.domain data class Category(val id: Long, val name: String, val thumbnail: String, val description: String){}
33.333333
46
0.55
94c5fb8f431d0c8f95820cc2a5676e28d2c96e3c
1,837
swift
Swift
QXUIKitExtension/QXUIKitExtension/QXMessageView.swift
labi3285/QXUIKitExtension
40294565179b63b99eb56164128f0bb56a95a5e3
[ "MIT" ]
4
2019-11-08T03:06:26.000Z
2021-08-06T03:14:45.000Z
QXUIKitExtension/QXUIKitExtension/QXMessageView.swift
labi3285/QXUIKitExtension
40294565179b63b99eb56164128f0bb56a95a5e3
[ "MIT" ]
null
null
null
QXUIKitExtension/QXUIKitExtension/QXMessageView.swift
labi3285/QXUIKitExtension
40294565179b63b99eb56164128f0bb56a95a5e3
[ "MIT" ]
null
null
null
// // QXMessageView.swift // QXUIKitExtension // // Created by labi3285 on 2019/7/22. // Copyright © 2019 labi3285_lab. All rights reserved. // import UIKit import QXMessageView extension UIViewController { open func showLoading(msg: String?) { _ = QXMessageView.demoLoading(msg: msg, superview: view) } open func hideLoading() { for view in view.subviews { if let view = view as? QXMessageView { view.remove() } } } open func showSuccess(msg: String, complete: (() -> Void)? = nil) { hideLoading() QXMessageView.demoSuccess(msg: msg, superview: view, complete: complete) } open func showFailure(msg: String, complete: (() -> Void)? = nil) { hideLoading() QXMessageView.demoFailure(msg: msg, superview: view, complete: complete) } open func showWarning(msg: String, complete: (() -> Void)? = nil) { hideLoading() QXMessageView.demoWarning(msg: msg, superview: view, complete: complete) } } extension UIView { open func showLoading(msg: String?) { _ = QXMessageView.demoLoading(msg: msg, superview: self) } open func hideLoading() { for view in self.subviews { if let view = view as? QXMessageView { view.remove() } } } open func showSuccess(msg: String, complete: (() -> Void)? = nil) { QXMessageView.demoSuccess(msg: msg, superview: self, complete: complete) } open func showFailure(msg: String, complete: (() -> Void)? = nil) { QXMessageView.demoFailure(msg: msg, superview: self, complete: complete) } open func showWarning(msg: String, complete: (() -> Void)? = nil) { QXMessageView.demoWarning(msg: msg, superview: self, complete: complete) } }
31.672414
80
0.608057
7b6fb30294d4065ab74d86ed81cd3052400c68ad
468
asm
Assembly
programs/oeis/006/A006579.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/006/A006579.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/006/A006579.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A006579: Sum of gcd(n,k) for k = 1 to n-1. ; 0,1,2,4,4,9,6,12,12,17,10,28,12,25,30,32,16,45,18,52,44,41,22,76,40,49,54,76,28,105,30,80,72,65,82,132,36,73,86,140,40,153,42,124,144,89,46,192,84,145,114,148,52,189,134,204,128,113,58,300,60,121,210,192,160,249,66,196,156,281,70,348,72,145,250,220,196,297,78,352,216,161,82,436,212,169,198,332,88,477,234,268,212,185,238,464,96,301,342,420 lpb $0 add $2,1 mov $3,$2 gcd $3,$0 sub $0,1 add $1,$3 lpe mov $0,$1
39
342
0.649573
6b4530cbdedacf29af3710b3ec835ded4645f5a6
2,059
kt
Kotlin
buildSrc/src/main/kotlin/JmhPlugin.kt
kennethshackleton/selekt
2da36da1916381b1406f360031a4ff76fcbdee9d
[ "ECL-2.0", "Apache-2.0", "BSD-3-Clause" ]
24
2020-07-24T20:33:07.000Z
2022-03-16T13:40:14.000Z
buildSrc/src/main/kotlin/JmhPlugin.kt
kennethshackleton/selekt
2da36da1916381b1406f360031a4ff76fcbdee9d
[ "ECL-2.0", "Apache-2.0", "BSD-3-Clause" ]
166
2021-01-02T18:27:16.000Z
2022-03-25T22:01:29.000Z
buildSrc/src/main/kotlin/JmhPlugin.kt
kennethshackleton/selekt
2da36da1916381b1406f360031a4ff76fcbdee9d
[ "ECL-2.0", "Apache-2.0", "BSD-3-Clause" ]
9
2020-07-28T07:18:43.000Z
2022-02-26T08:46:28.000Z
/* * Copyright 2021 Bloomberg Finance L.P. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.tasks.JavaExec import org.gradle.api.tasks.SourceSetContainer import org.gradle.kotlin.dsl.get class JmhPlugin : Plugin<Project> { override fun apply(target: Project): Unit = target.run { sourceSets.create("jmh") { java.srcDirs("src/jmh/kotlin") } dependencies.apply { configurations.getByName("jmhImplementation") { add(name, project) add(name, "org.openjdk.jmh:jmh-core:${Versions.JMH}") } configurations.getByName("kaptJmh") { add(name, "org.openjdk.jmh:jmh-generator-annprocess:${Versions.JMH}") } } tasks.register("jmh", JavaExec::class.java) { val reportDir = "$buildDir/reports/jmh" val reportFile = "$reportDir/jmh.json" group = "benchmark" dependsOn("jmhClasses") mainClass.set("org.openjdk.jmh.Main") args( "-rf", "json", "-rff", reportFile ) classpath(sourceSets.getByName("jmh").runtimeClasspath) doFirst { mkdir(reportDir) } outputs.apply { file(reportFile) upToDateWhen { false } } } } } private val Project.sourceSets: SourceSetContainer get() = extensions["sourceSets"] as SourceSetContainer
35.5
105
0.619233
585347f12540af3ae76898dfd35cce373bfff284
3,336
h
C
bishrpg/Source/bishrpg/Battle/BattleCommandQueue.h
myumoon/bishrpg
5c2d2b731315f4c1ac4a4f71523c7d75b0b3dd5e
[ "Apache-2.0" ]
null
null
null
bishrpg/Source/bishrpg/Battle/BattleCommandQueue.h
myumoon/bishrpg
5c2d2b731315f4c1ac4a4f71523c7d75b0b3dd5e
[ "Apache-2.0" ]
null
null
null
bishrpg/Source/bishrpg/Battle/BattleCommandQueue.h
myumoon/bishrpg
5c2d2b731315f4c1ac4a4f71523c7d75b0b3dd5e
[ "Apache-2.0" ]
null
null
null
// Copyright © 2018 nekoatsume_atsuko. All rights reserved. #pragma once #include "CoreMinimal.h" #include "Components/ActorComponent.h" #include "SharedPointer.h" #include "System/CharacterStatus.h" #include "GameData/SkillData.h" #include "BattleDataType.h" #include "BattleData.h" #include "BattleObjectHandle.h" #include "BattleCommandQueue.generated.h" UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent)) class BISHRPG_API UBattleCommandQueue : public UActorComponent { GENERATED_BODY() public: using BattleCommandList = TArray<FBattleCommand>; public: /*! バトル行動を追加 @return コマンド数がいっぱいになったらtrue */ UFUNCTION(BlueprintCallable, Category = "Battle") void Initialize(UBattleSystem* battleSystem, bool playerSide); /*! バトル行動を追加 @return コマンド数がいっぱいになったらtrue */ UFUNCTION(BlueprintCallable, Category = "Battle") bool PushSkillCommand(int32 posIndex, const FName& skillName); /*! バトル行動を追加 @return コマンド数がいっぱいになったらtrue */ UFUNCTION(BlueprintCallable, Category = "Battle") bool PushSkillCommand2(const FBattleObjectHandle& actor, const FName& skillName); /*! バトル行動を追加 @return コマンド数がいっぱいになったらtrue */ UFUNCTION(BlueprintCallable, Category = "Battle") bool PushMoveCommand(int32 posIndex, int32 moveTo); /*! バトル行動を追加 @return コマンド数がいっぱいになったらtrue */ UFUNCTION(BlueprintCallable, Category = "Battle") bool PushMoveCommand2(const FBattleObjectHandle& actor, int32 moveTo); /*! バトル行動を追加 @return コマンド数がいっぱいになったらtrue */ UFUNCTION(BlueprintCallable, Category = "Battle") bool PushAttackCommand(int32 posIndex); /*! バトル行動を追加 @return コマンド数がいっぱいになったらtrue */ UFUNCTION(BlueprintCallable, Category = "Battle") bool PushAttackCommand2(const FBattleObjectHandle& actor); /*! バトル行動を戻す */ UFUNCTION(BlueprintCallable, Category = "Battle") bool RevertCommand(FBattleCommand& revertedCommand); /*! バトル行動を除去 */ UFUNCTION(BlueprintCallable, Category = "Battle") void ResetCommand(); /*! バトル開始可能かどうか */ UFUNCTION(BlueprintCallable, Category = "Battle") bool CanStartCommand() const; /*! バトルシステムに送信 */ UFUNCTION(BlueprintCallable, Category = "Battle") void Commit(); /*! コマンド数をカウント */ UFUNCTION(BlueprintCallable, Category = "Battle") int32 GetCount(bool includingMoveCommand = false) const; /*! コマンド実行前のキャラの位置を取得 */ UFUNCTION(BlueprintCallable, Category = "Battle") int32 GetInitialCharacterPos(int32 posIndex) const; /*! コマンド実行前のキャラの位置を取得 */ UFUNCTION(BlueprintCallable, Category = "Battle") int32 GetInitialCharacterPos2(const FBattleObjectHandle& handle) const; /*! 移動コマンド実行前のキャラを取得 */ UFUNCTION(BlueprintCallable, Category = "Battle") int32 GetMovedCharacterIndex(int32 posIndex, bool playerSide) const; /*! 移動コマンド実行前のキャラを取得 */ UFUNCTION(BlueprintCallable, Category = "Battle") int32 GetOriginCharacterIndex(int32 posIndex, EPlayerGroup side) const; /*! コマンド取得 */ const FBattleCommand& GetCommand(int32 index) const; /*! 最後のコマンドかどうかを判定 */ bool IsLastCommandIndex(int32 index) const; protected: int32 GetPrevPosIndex(int32 posIndex) const; private: BattleCommandList CommandList; //!< バトルコマンドリスト UBattleSystem* BattleSystem = nullptr; EPlayerGroup PlayerSide = EPlayerGroup::One; };
26.267717
83
0.731715
c7f93d1ded9da87304f5856add07eb386f773f40
2,284
java
Java
libraries/gffs-structure/trunk/src/edu/virginia/vcgr/genii/security/axis/AxisTrustCredential.java
genesis-2/trunk
9a6b34e8531ef0a1614ee48802b037df6e4fa2d7
[ "Apache-2.0" ]
1
2022-03-16T16:36:00.000Z
2022-03-16T16:36:00.000Z
libraries/gffs-structure/trunk/src/edu/virginia/vcgr/genii/security/axis/AxisTrustCredential.java
lancium/GenesisII-public
b8fbdf2881fa125a73ff7d5799bf33e1b5076d6e
[ "Apache-2.0" ]
1
2021-06-04T02:05:42.000Z
2021-06-04T02:05:42.000Z
libraries/gffs-structure/trunk/src/edu/virginia/vcgr/genii/security/axis/AxisTrustCredential.java
lancium/GenesisII-Stale-DO-NOT-USE
d0cd1b4502145ef94527459d3d3055800f482250
[ "Apache-2.0" ]
null
null
null
package edu.virginia.vcgr.genii.security.axis; import java.security.GeneralSecurityException; import javax.xml.soap.SOAPException; import org.apache.axis.message.MessageElement; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.ws.security.message.token.BinarySecurity; import org.w3c.dom.Element; import org.w3c.dom.Node; import edu.virginia.vcgr.genii.security.SAMLConstants; import edu.virginia.vcgr.genii.security.XMLCompatible; import edu.virginia.vcgr.genii.security.credentials.TrustCredential; /** * Produces an Axis MessageElement from the TrustCredential. * * @author myanhaona * @author ckoeritz */ public class AxisTrustCredential implements XMLCompatible { static private Log _logger = LogFactory.getLog(AxisTrustCredential.class); transient private TrustCredential _realCred; public AxisTrustCredential(TrustCredential cred) { _realCred = cred; } @Override public String getTokenType() { return SAMLConstants.SAML_DELEGATION_TOKEN_TYPE; } /** * This is the method for converting a trust delegation into a form that can be transmitted over the wire using Axis web-services * facilities. */ public Element convertToMessageElement() throws GeneralSecurityException { // this location also did not need a synchronization. Node nodeRepresentation = null; synchronized (_realCred.getDelegation()) { MessageElement template = new MessageElement(BinarySecurity.TOKEN_BST); nodeRepresentation = AxisCredentialWallet.convertToAxis(template, _realCred.getDelegation().getXMLBeanDoc()); } MessageElement securityToken = new MessageElement(BinarySecurity.TOKEN_BST); securityToken.appendChild(nodeRepresentation); securityToken.setAttributeNS(null, "ValueType", SAMLConstants.SAML_DELEGATION_TOKEN_TYPE); MessageElement wseTokenRef = null; try { MessageElement embedded = new MessageElement(SAMLConstants.EMBEDDED_TOKEN_QNAME); embedded.addChild(securityToken); wseTokenRef = new MessageElement(SAMLConstants.SECURITY_TOKEN_QNAME); wseTokenRef.addChild(embedded); } catch (SOAPException e) { _logger.error("failure to create MessageElement: " + e.getMessage()); throw new GeneralSecurityException(e.getMessage(), e); } return wseTokenRef; } }
32.628571
130
0.795534
502a2b47deb023cea34ad38ac69751e525d6a81d
979
go
Go
acct.go
woodada/woow
6f5f5d2911cb812d4f636520fe9b081125da9ae7
[ "MIT" ]
null
null
null
acct.go
woodada/woow
6f5f5d2911cb812d4f636520fe9b081125da9ae7
[ "MIT" ]
null
null
null
acct.go
woodada/woow
6f5f5d2911cb812d4f636520fe9b081125da9ae7
[ "MIT" ]
null
null
null
package woow import ( "sync" ) var _ sync.Locker = (*AccountStore)(nil) // nocopy func (this AccountStore) Lock() {} // nocopy func (this AccountStore) Unlock() {} // nocopy // 线程安全的账号/密码 type AccountStore struct { d map[string]string m sync.RWMutex } func NewAccountStore(accts map[string]string) *AccountStore { d := make(map[string]string) for k, v := range accts { d[k] = v } return &AccountStore{d: d} } func (this *AccountStore) Upsert(username, passwd string) { this.m.Lock() defer this.m.Unlock() this.d[username] = passwd } // 0-成功 1-用户不存在 2-密码错误 func (this *AccountStore) Compare(username, passwd string) int { this.m.RLock() defer this.m.RUnlock() p, ok := this.d[username] if ok && p == passwd { return 0 } if !ok { return 1 } return 2 } func (this *AccountStore) Size() int { this.m.RLock() defer this.m.RUnlock() return len(this.d) }
18.826923
64
0.599591
b2c14d3bb32a9d0a97a9d773d034e8784a7e69a4
5,641
py
Python
lljs.py
Peter9192/wind_analytics
604136be1c2ef1155bdb7579c7d123525dbe10d8
[ "Apache-2.0" ]
null
null
null
lljs.py
Peter9192/wind_analytics
604136be1c2ef1155bdb7579c7d123525dbe10d8
[ "Apache-2.0" ]
null
null
null
lljs.py
Peter9192/wind_analytics
604136be1c2ef1155bdb7579c7d123525dbe10d8
[ "Apache-2.0" ]
null
null
null
""" Identify low-level jets in wind profile data. Peter Kalverla December 2020 """ import numpy as np import xarray as xr def detect_llj(x, axis=None, falloff=0, output='strength', inverse=False): """ Identify maxima in wind profiles. args: - x : ndarray with wind profile data - axis : specifies the vertical dimension is internally used with np.apply_along_axis - falloff : threshold for labeling as low-level jet default 0; can be masked later, e.g. llj[falloff>2.0] - output : specifiy return type: 'strength' or 'index' returns (depending on <output> argument): - strength : 0 if no maximum identified, otherwise falloff strength - index : nan if no maximum identified, otherwise index along <axis>, to get the height of the jet etc. """ def inner(x, output): if inverse: x = x[::-1, ...] # Identify local maxima x = x[~np.isnan(x)] dx = x[1:] - x[:-1] ind = np.where((np.hstack((dx, 0)) < 0) & (np.hstack((0, dx)) >= 0))[0] # Last value of x cannot be llj if ind.size and ind[-1] == x.size - 1: ind = ind[:-1] # Compute the falloff strength for each local maxima if ind.size: # this assumes height increases along axis!!! strength = np.array([x[i] - min(x[i:]) for i in ind]) imax = np.argmax(strength) # Return jet_strength and index of maximum: if output == 'strength': r = max(strength) if ind.size else 0 elif output == 'index': r = ind[imax] if ind.size else 0 return r # Wrapper interface to apply 1d function to ndarray return np.apply_along_axis(inner, axis, x, output=output) def detect_llj_vectorized(xs, axis=-1, output='falloff', mask_inv=False, inverse=False): """ Identify local maxima in wind profiles. args: - x : ndarray with wind profile data - axis : specifies the vertical dimension - output : specifiy return type: 'falloff', 'strength' or 'index' - mask_inv : use np.ma to mask nan values returns (depending on <output> argument and whether llj is identified): - falloff : 0 or largest difference between local max and subseq min - strength : 0 or wind speed at jet height - index : -1 or index along <axis> """ # Move <axis> to first dimension, to easily index and iterate over it. xv = np.rollaxis(xs, axis) if inverse: xv = xv[::-1, ...] if mask_inv: xv = np.ma.masked_invalid(xv) # Set initial arrays min_elem = xv[-1].copy() max_elem = np.zeros(min_elem.shape) max_diff = np.zeros(min_elem.shape) max_idx = np.ones(min_elem.shape, dtype=int) * (-1) # Start at end of array and search backwards for larger differences. for i, elem in reversed(list(enumerate(xv))): min_elem = np.minimum(elem, min_elem) new_max_identified = elem - min_elem > max_diff max_diff = np.where(new_max_identified, elem - min_elem, max_diff) max_elem = np.where(new_max_identified, elem, max_elem) max_idx = np.where(new_max_identified, i, max_idx) if output == 'falloff': r = max_diff elif output == 'strength': r = max_elem elif output == 'index': r = max_idx else: raise ValueError('Invalid argument for <output>: %s' % output) return r def detect_llj_xarray(da, inverse=False): """ Identify local maxima in wind profiles. args: - da : xarray.DataArray with wind profile data - inverse : to flip the array if the data is stored upside down returns: : xarray.Dataset with vertical dimension removed containing: - falloff : 0 or largest difference between local max and subseq min - strength : 0 or wind speed at jet height - index : -1 or index along <axis> Note: vertical dimension should be labeled 'level' and axis=1 """ # Move <axis> to first dimension, to easily index and iterate over it. xv = np.rollaxis(da.values, 1) if inverse: xv = xv[::-1, ...] # Set initial arrays min_elem = xv[-1].copy() max_elem = np.zeros(min_elem.shape) max_diff = np.zeros(min_elem.shape) max_idx = np.ones(min_elem.shape, dtype=int) * (-1) # Start at end of array and search backwards for larger differences. for i, elem in reversed(list(enumerate(xv))): min_elem = np.minimum(elem, min_elem) new_max_identified = elem - min_elem > max_diff max_diff = np.where(new_max_identified, elem - min_elem, max_diff) max_elem = np.where(new_max_identified, elem, max_elem) max_idx = np.where(new_max_identified, i, max_idx) # Combine the results in a dataframe get_height = lambda i: np.where(i > 0, da.level.values[i], da.level.values[ -1]) dims = da.isel(level=0).drop('level').dims coords = da.isel(level=0).drop('level').coords lljs = xr.Dataset( { 'falloff': (dims, max_diff), 'strength': (dims, max_elem), 'level': (dims, get_height(max_idx)), }, coords=coords) print( 'Beware! Level is also filled if no jet is detected! ' 'Use ds.sel(level=lljs.level).where(lljs.falloff>0) to get rid of them' ) return lljs
34.820988
80
0.591916
3bd8b4d4ca9fbeac20642d83b943c8b2fd059fef
2,489
h
C
samples/_opengl/NVidiaComputeParticles/include/Ssbo.h
rsh/Cinder-Emscripten
4a08250c56656865c7c3a52fb9380980908b1439
[ "BSD-2-Clause" ]
3,494
2015-01-02T08:42:09.000Z
2022-03-31T14:16:23.000Z
samples/_opengl/NVidiaComputeParticles/include/Ssbo.h
rsh/Cinder-Emscripten
4a08250c56656865c7c3a52fb9380980908b1439
[ "BSD-2-Clause" ]
1,284
2015-01-02T07:31:47.000Z
2022-03-30T02:06:43.000Z
samples/_opengl/NVidiaComputeParticles/include/Ssbo.h
rsh/Cinder-Emscripten
4a08250c56656865c7c3a52fb9380980908b1439
[ "BSD-2-Clause" ]
780
2015-01-02T22:14:29.000Z
2022-03-30T00:16:56.000Z
#pragma once #include "cinder/gl/BufferObj.h" #if defined( CINDER_MSW ) || defined( CINDER_LINUX ) class Ssbo; typedef std::shared_ptr<Ssbo> SsboRef; class Ssbo : public ci::gl::BufferObj { public: //! Creates a shader storage buffer object with storage for \a allocationSize bytes, and filled with data \a data if it is not NULL. static inline SsboRef create( GLsizeiptr allocationSize, const void *data = nullptr, GLenum usage = GL_STATIC_DRAW ) { return SsboRef( new Ssbo( allocationSize, data, usage ) ); } //! Bind base. inline void bindBase( GLuint index ) { glBindBufferBase( mTarget, index, mId ); mBase = index; } //! Unbinds the buffer. inline void unbindBase() { glBindBufferBase( mTarget, mBase, 0 ); mBase = 0; } //! Analogous to bufferStorage. inline void bufferStorage( GLsizeiptr size, const void *data, GLbitfield flags ) const { glBufferStorage( mTarget, size, data, flags ); } protected: Ssbo( GLsizeiptr allocationSize, const void *data = nullptr, GLenum usage = GL_STATIC_DRAW ) : BufferObj( GL_SHADER_STORAGE_BUFFER, allocationSize, data, usage ), mBase( 0 ) { } GLuint mBase; }; //! Represents an OpenGL Shader Storage Buffer Object template<class T> class SsboT : public Ssbo { public: typedef std::shared_ptr<SsboT<T>> Ref; //! Creates a shader storage buffer object with storage for \a allocationSize bytes, and filled with data \a data if it is not NULL. static inline Ref create( const std::vector<T> &data, GLenum usage = GL_STATIC_DRAW ) { return Ref( new SsboT<T>( data, usage ) ); } static inline Ref create( GLsizeiptr size, GLenum usage = GL_STATIC_DRAW ) { return Ref( new SsboT<T>( size, usage ) ); } //! Map to type. inline T *mapT( GLbitfield access ) const { return reinterpret_cast<T *>( map( access ) ); } //! Map buffer range to type inline T *mapBufferRangeT( GLintptr offset, GLsizeiptr length, GLbitfield access ) { return reinterpret_cast<T *>( mapBufferRange( offset, length, access ) ); } //! Analogous to bufferStorage. inline void bufferStorageT( const std::vector<T> &data, GLbitfield flags ) const { glBufferStorage( mTarget, data.size(), &( data[0] ), flags ); } protected: SsboT( const std::vector<T> &data, GLenum usage = GL_STATIC_DRAW ) : Ssbo( sizeof( T ) * data.size(), &( data[0] ), usage ) { } SsboT( GLsizeiptr size, GLenum usage = GL_STATIC_DRAW ) : Ssbo( sizeof( T ) * size, nullptr, usage ) { } }; #endif // #if defined( CINDER_MSW ) || defined( CINDER_LINUX )
36.072464
161
0.705504
3d36ec6dac466dc5beb3503b08a591e7990b7aa8
526
go
Go
doc.go
tkrishnaviant/dsunit
debe38410fb68d5fcc7c9a4cee5d889f98110e57
[ "Apache-2.0" ]
49
2016-09-03T05:12:32.000Z
2021-10-17T19:42:26.000Z
doc.go
tkrishnaviant/dsunit
debe38410fb68d5fcc7c9a4cee5d889f98110e57
[ "Apache-2.0" ]
6
2017-02-10T17:04:59.000Z
2019-07-04T10:27:52.000Z
doc.go
tkrishnaviant/dsunit
debe38410fb68d5fcc7c9a4cee5d889f98110e57
[ "Apache-2.0" ]
9
2017-02-08T02:28:54.000Z
2021-12-04T13:37:38.000Z
// Package dsunit - Datastore testing library. package dsunit /* DsUnit provides ability to build integration tests with the final datastore used by your application/ETL process. No mocking, but actual test against various datastores likes sql RDBMS, Aerospike, BigQuery and structured transaction/log files. Usage: dsunit.InitFromURL(t, "test/init.json") dsunit.PrepareFromURL(t, "test/use_case1/data.json") ... business test logic comes here dsunit.ExpectFromURL(t, "test/use_case1/data.json") */
22.869565
129
0.754753
08963ea78b7a7c8e6fdbd6c088271a84b9c0754d
5,743
go
Go
pkg/langserver/diagnostics.go
lizelive/yodk
dc37d204598e1ff39ccbbd3bec5ba897486c2df6
[ "MIT" ]
59
2019-11-19T08:58:08.000Z
2021-10-02T20:23:48.000Z
pkg/langserver/diagnostics.go
lizelive/yodk
dc37d204598e1ff39ccbbd3bec5ba897486c2df6
[ "MIT" ]
114
2019-11-05T08:15:53.000Z
2021-12-27T21:20:52.000Z
pkg/langserver/diagnostics.go
lizelive/yodk
dc37d204598e1ff39ccbbd3bec5ba897486c2df6
[ "MIT" ]
14
2020-08-01T17:42:41.000Z
2021-10-21T04:24:45.000Z
package langserver import ( "context" "log" "net/url" "path/filepath" "strings" "github.com/dbaumgarten/yodk/pkg/lsp" "github.com/dbaumgarten/yodk/pkg/nolol" "github.com/dbaumgarten/yodk/pkg/nolol/nast" "github.com/dbaumgarten/yodk/pkg/optimizers" "github.com/dbaumgarten/yodk/pkg/parser" "github.com/dbaumgarten/yodk/pkg/parser/ast" "github.com/dbaumgarten/yodk/pkg/validators" ) // fs is a special filesystem that retrieves the main file from the cache and all // other files from the filesystem. It is used when compiling a nolol file, as nolol files may // depend on files from the file-system using includes type fs struct { *nolol.DiskFileSystem ls *LangServer Mainfile string } func getFilePath(u lsp.DocumentURI) string { ur, _ := url.Parse(string(u)) s := filepath.FromSlash(ur.Path) if !strings.HasSuffix(s, "\\\\") { s = strings.TrimPrefix(s, "\\") } return s } func newfs(ls *LangServer, mainfile lsp.DocumentURI) *fs { return &fs{ ls: ls, DiskFileSystem: &nolol.DiskFileSystem{ Dir: filepath.Dir(getFilePath(mainfile)), }, Mainfile: string(mainfile), } } func (f fs) Get(name string) (string, error) { if name == f.Mainfile { return f.ls.cache.Get(lsp.DocumentURI(name)) } return f.DiskFileSystem.Get(name) } func convertToErrorlist(errs error) parser.Errors { if errs == nil { return make(parser.Errors, 0) } switch e := errs.(type) { case parser.Errors: return e case *parser.Error: // if it is a single error, convert it to a one-element list errlist := make(parser.Errors, 1) errlist[0] = e return errlist default: log.Printf("Unknown error type: %T\n (%s)", errs, errs.Error()) return nil } } func convertErrorsToDiagnostics(errs parser.Errors, source string, severity lsp.DiagnosticSeverity) []lsp.Diagnostic { diags := make([]lsp.Diagnostic, 0) for _, err := range errs { diag := convertErrorToDiagnostic(err, source, severity) diags = append(diags, diag) } return diags } func convertErrorToDiagnostic(err *parser.Error, source string, severity lsp.DiagnosticSeverity) lsp.Diagnostic { return lsp.Diagnostic{ Source: source, Message: err.Message, Severity: severity, Range: lsp.Range{ Start: lsp.Position{ Line: float64(err.StartPosition.Line) - 1, Character: float64(err.StartPosition.Coloumn) - 1, }, End: lsp.Position{ Line: float64(err.EndPosition.Line) - 1, Character: float64(err.EndPosition.Coloumn) - 1, }, }, } } func (s *LangServer) validateCodeLength(uri lsp.DocumentURI, text string, parsed *ast.Program) []lsp.Diagnostic { // check if the code-length of yolol-code is OK if s.settings.Yolol.LengthChecking.Mode != LengthCheckModeOff { lengtherror := validators.ValidateCodeLength(text) // check if the code is small enough after optimizing it if lengtherror != nil && s.settings.Yolol.LengthChecking.Mode == LengthCheckModeOptimize && parsed != nil { opt := optimizers.NewCompoundOptimizer() err := opt.Optimize(parsed) if err == nil { printer := parser.Printer{} optimized, err := printer.Print(parsed) if err == nil { lengtherror = validators.ValidateCodeLength(optimized) } } } if lengtherror != nil { err := lengtherror.(*parser.Error) diag := convertErrorToDiagnostic(err, "validator", lsp.SeverityWarning) return []lsp.Diagnostic{diag} } } return []lsp.Diagnostic{} } func (s *LangServer) validateAvailableOperations(uri lsp.DocumentURI, parsed ast.Node) []lsp.Diagnostic { chipType, _ := validators.AutoChooseChipType(s.settings.Yolol.ChipType, string(uri)) err := validators.ValidateAvailableOperations(parsed, chipType) if err != nil { errors := convertToErrorlist(err) return convertErrorsToDiagnostics(errors, "validator", lsp.SeverityError) } return []lsp.Diagnostic{} } func (s *LangServer) Diagnose(ctx context.Context, uri lsp.DocumentURI) { go func() { var parserError error var validationDiagnostics []lsp.Diagnostic var diagRes DiagnosticResults text, _ := s.cache.Get(uri) prevDiag, err := s.cache.GetDiagnostics(uri) if err == nil { diagRes = *prevDiag } if strings.HasSuffix(string(uri), ".yolol") { p := parser.NewParser() var parsed *ast.Program parsed, parserError = p.Parse(text) if parsed != nil { diagRes.Variables = findUsedVariables(parsed) } if parserError == nil { validationDiagnostics = s.validateAvailableOperations(uri, parsed) validationDiagnostics = append(validationDiagnostics, s.validateCodeLength(uri, text, parsed)...) } } else if strings.HasSuffix(string(uri), ".nolol") { mainfile := string(uri) converter := nolol.NewConverter() converter.SetChipType(s.settings.Yolol.ChipType) included := converter.LoadFileEx(mainfile, newfs(s, uri)).ProcessIncludes() parserError = included.Error() if parserError == nil { intermediate := included.GetIntermediateProgram() // Analyze() will mutate the ast, so we create a copy of it analyse := nast.CopyAst(intermediate).(*nast.Program) analysis, err := nolol.Analyse(analyse) if err == nil { diagRes.AnalysisReport = analysis } parserError = included.ProcessCodeExpansion().ProcessNodes().ProcessLineNumbers().ProcessFinalize().Error() } } else { return } s.cache.SetDiagnostics(uri, diagRes) parserErrors := convertToErrorlist(parserError) if parserErrors == nil { return } diags := convertErrorsToDiagnostics(parserErrors, "parser", lsp.SeverityError) if validationDiagnostics != nil { diags = append(diags, validationDiagnostics...) } s.client.PublishDiagnostics(ctx, &lsp.PublishDiagnosticsParams{ URI: uri, Diagnostics: diags, }) }() }
27.218009
118
0.705032
39f6f969a3f8d7cc74240837ebf66d2fe87f7126
3,616
java
Java
backend/SpringJWT/src/main/java/com/codingdojo/springjwt/security/SecurityConfig.java
renatogm24/enelmarket_fs
64bc82b6694c7355b7ed791cae4f536f34c67977
[ "OLDAP-2.6" ]
null
null
null
backend/SpringJWT/src/main/java/com/codingdojo/springjwt/security/SecurityConfig.java
renatogm24/enelmarket_fs
64bc82b6694c7355b7ed791cae4f536f34c67977
[ "OLDAP-2.6" ]
null
null
null
backend/SpringJWT/src/main/java/com/codingdojo/springjwt/security/SecurityConfig.java
renatogm24/enelmarket_fs
64bc82b6694c7355b7ed791cae4f536f34c67977
[ "OLDAP-2.6" ]
null
null
null
package com.codingdojo.springjwt.security; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpMethod; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; import com.codingdojo.springjwt.filters.CustomAuthenticationFilter; import com.codingdojo.springjwt.filters.CustomAuthorizationFilter; import lombok.RequiredArgsConstructor; @Configuration @EnableWebSecurity @RequiredArgsConstructor public class SecurityConfig extends WebSecurityConfigurerAdapter { private final UserDetailsService userDetailsService; private final BCryptPasswordEncoder bCryptPasswordEncoder; @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(userDetailsService).passwordEncoder(bCryptPasswordEncoder); } @Override protected void configure(HttpSecurity http) throws Exception { CustomAuthenticationFilter customAuthenticationFilter = new CustomAuthenticationFilter(authenticationManagerBean()); customAuthenticationFilter.setFilterProcessesUrl("/api/login"); http.cors().and().csrf().disable(); http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS); http.authorizeRequests().antMatchers("/api/login","/api/token/refresh/**","/api/user/save","/api/isNameValid","/api/stores","/api/store","/api/category","/api/categoriesStore","/api/store2/getCobrosEnvios","/api/ordenes/addOrden","/api/ordenes/updateOrden").permitAll(); http.authorizeRequests().antMatchers(HttpMethod.GET,"/api/user/**").hasAnyAuthority("ROLE_USER"); http.authorizeRequests().antMatchers(HttpMethod.POST,"/api/user/save/**").hasAnyAuthority("ROLE_ADMIN"); http.authorizeRequests().anyRequest().authenticated(); http.addFilter(customAuthenticationFilter); //http.addFilterAt(customAuthenticationFilter, UsernamePasswordAuthenticationFilter.class); http.addFilterBefore(new CustomAuthorizationFilter(), UsernamePasswordAuthenticationFilter.class); } @Bean @Override public AuthenticationManager authenticationManagerBean() throws Exception{ return super.authenticationManagerBean(); } /*@Bean CorsConfigurationSource corsConfigurationSource() { UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); source.registerCorsConfiguration("/**", new CorsConfiguration().applyPermitDefaultValues()); return source; }*/ /*@Bean CorsConfigurationSource corsConfigurationSource() { CorsConfiguration configuration = new CorsConfiguration(); configuration.setAllowedOrigins(Arrays.asList("https://example.com")); configuration.setAllowedMethods(Arrays.asList("GET","POST")); UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); source.registerCorsConfiguration("/**", configuration); return (CorsConfigurationSource) source; }*/ }
50.929577
272
0.826604
62725e36e9c4383385bbd866c1009e735beeb419
2,979
rs
Rust
lexical-core/src/itoa/naive.rs
ignatenkobrain/rust-lexical
fefe81850e5678450ec0f001f562b182694caadf
[ "Apache-2.0", "MIT" ]
null
null
null
lexical-core/src/itoa/naive.rs
ignatenkobrain/rust-lexical
fefe81850e5678450ec0f001f562b182694caadf
[ "Apache-2.0", "MIT" ]
null
null
null
lexical-core/src/itoa/naive.rs
ignatenkobrain/rust-lexical
fefe81850e5678450ec0f001f562b182694caadf
[ "Apache-2.0", "MIT" ]
null
null
null
//! Slow, simple lexical integer-to-string conversion routine. use util::*; // Naive itoa algorithm. macro_rules! naive_algorithm { ($value:ident, $radix:ident, $buffer:ident, $index:ident) => ({ while $value >= $radix { let r = ($value % $radix).as_usize(); $value /= $radix; // This is always safe, since r must be [0, radix). $index -= 1; unchecked_index_mut!($buffer[$index] = digit_to_char(r)); } // Decode last digit. let r = ($value % $radix).as_usize(); // This is always safe, since r must be [0, radix). $index -= 1; unchecked_index_mut!($buffer[$index] = digit_to_char(r)); }); } // Naive implementation for radix-N numbers. // Precondition: `value` must be non-negative and mutable. perftools_inline!{ fn naive<T>(mut value: T, radix: u32, buffer: &mut [u8]) -> usize where T: UnsignedInteger { // Decode all but last digit, 1 at a time. let mut index = buffer.len(); let radix: T = as_cast(radix); naive_algorithm!(value, radix, buffer, index); index }} pub(crate) trait Naive { // Export integer to string. fn naive(self, radix: u32, buffer: &mut [u8]) -> usize; } // Implement naive for type. macro_rules! naive_impl { ($($t:ty)*) => ($( impl Naive for $t { perftools_inline_always!{ fn naive(self, radix: u32, buffer: &mut [u8]) -> usize { naive(self, radix, buffer) }} } )*); } naive_impl! { u8 u16 u32 u64 usize } // Naive implementation for 128-bit radix-N numbers. // Precondition: `value` must be non-negative and mutable. perftools_inline!{ #[cfg(has_i128)] fn naive_u128(value: u128, radix: u32, buffer: &mut [u8]) -> usize { // Decode all but last digit, 1 at a time. let (divisor, digits_per_iter, d_cltz) = u128_divisor(radix); let radix: u64 = as_cast(radix); // To deal with internal 0 values or values with internal 0 digits set, // we store the starting index, and if not all digits are written, // we just skip down `digits` digits for the next value. let mut index = buffer.len(); let mut start_index = index; let (value, mut low) = u128_divrem(value, divisor, d_cltz); naive_algorithm!(low, radix, buffer, index); if value != 0 { start_index -= digits_per_iter; index = index.min(start_index); let (value, mut mid) = u128_divrem(value, divisor, d_cltz); naive_algorithm!(mid, radix, buffer, index); if value != 0 { start_index -= digits_per_iter; index = index.min(start_index); let mut high = value as u64; naive_algorithm!(high, radix, buffer, index); } } index }} #[cfg(has_i128)] impl Naive for u128 { perftools_inline_always!{ fn naive(self, radix: u32, buffer: &mut [u8]) -> usize { naive_u128(self, radix, buffer) }} }
30.090909
75
0.598187
5b1f06553c29aa06cb030c9a1aef72fc1dd58138
3,204
h
C
Engine/Source/Editor/UnrealEd/Public/MatineeExporter.h
PopCap/GameIdea
201e1df50b2bc99afc079ce326aa0a44b178a391
[ "BSD-2-Clause" ]
null
null
null
Engine/Source/Editor/UnrealEd/Public/MatineeExporter.h
PopCap/GameIdea
201e1df50b2bc99afc079ce326aa0a44b178a391
[ "BSD-2-Clause" ]
2
2015-06-21T17:38:11.000Z
2015-06-22T20:54:42.000Z
Engine/Source/Editor/UnrealEd/Public/MatineeExporter.h
PopCap/GameIdea
201e1df50b2bc99afc079ce326aa0a44b178a391
[ "BSD-2-Clause" ]
null
null
null
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. /*============================================================================= Matinee exporter for Unreal Engine 3. =============================================================================*/ #ifndef __MATINEEEXPORTER_H__ #define __MATINEEEXPORTER_H__ #include "Matinee/MatineeActor.h" #include "Matinee/InterpGroup.h" #include "Matinee/InterpGroupInst.h" class UInterpData; class UInterpTrackMove; class UInterpTrackFloatProp; class UInterpTrackVectorProp; class AActor; class AMatineeActor; class ALight; /** * Main Matinee Exporter class. * Except for CImporter, consider the other classes as private. */ class MatineeExporter { public: virtual ~MatineeExporter() {} /** * Creates and readies an empty document for export. */ virtual void CreateDocument() = 0; void SetTrasformBaking(bool bBakeTransforms) { bBakeKeys = bBakeTransforms; } void SetKeepHierarchy(bool bInKeepHierarchy) { bKeepHierarchy = bInKeepHierarchy; } /** * Exports the basic scene information to a file. */ virtual void ExportLevelMesh( ULevel* Level, AMatineeActor* InMatineeActor, bool bSelectedOnly ) = 0; /** * Exports the light-specific information for a light actor. */ virtual void ExportLight( ALight* Actor, AMatineeActor* InMatineeActor ) = 0; /** * Exports the camera-specific information for a camera actor. */ virtual void ExportCamera( ACameraActor* Actor, AMatineeActor* InMatineeActor, bool bExportComponents ) = 0; /** * Exports the mesh and the actor information for a brush actor. */ virtual void ExportBrush(ABrush* Actor, UModel* Model, bool bConvertToStaticMesh ) = 0; /** * Exports the mesh and the actor information for a static mesh actor. */ virtual void ExportStaticMesh( AActor* Actor, UStaticMeshComponent* StaticMeshComponent, AMatineeActor* InMatineeActor ) = 0; /** * Exports the given Matinee sequence information into a file. * * @return true, if sucessful */ virtual bool ExportMatinee(class AMatineeActor* InMatineeActor) = 0; /** * Writes the file to disk and releases it. */ virtual void WriteToFile(const TCHAR* Filename) = 0; /** * Closes the file, releasing its memory. */ virtual void CloseDocument() = 0; // Choose a name for this actor. // If the actor is bound to a Matinee sequence, we'll // use the Matinee group name, otherwise we'll just use the actor name. FString GetActorNodeName(AActor* Actor, AMatineeActor* InMatineeActor ) { FString NodeName = Actor->GetName(); if( InMatineeActor != NULL ) { const UInterpGroupInst* FoundGroupInst = InMatineeActor->FindGroupInst( Actor ); if( FoundGroupInst != NULL ) { NodeName = FoundGroupInst->Group->GroupName.ToString(); } } // Maya does not support dashes. Change all dashes to underscores NodeName = NodeName.Replace(TEXT("-"), TEXT("_") ); return NodeName; } protected: /** When true, a key will exported per frame at the set frames-per-second (FPS). */ bool bBakeKeys; /** When true, we'll export with hierarchical relation of attachment with relative transform */ bool bKeepHierarchy; }; #endif // __MATINEEEXPORTER_H__
26.92437
126
0.69382
330e71b3b4bc8bea5b484ce2931ef4411a75120b
2,311
py
Python
2d-lin_sep.py
rzepinskip/optimization-svm
9682980e19d5fc9f09353aa1284e86874e954aec
[ "MIT" ]
null
null
null
2d-lin_sep.py
rzepinskip/optimization-svm
9682980e19d5fc9f09353aa1284e86874e954aec
[ "MIT" ]
2
2020-01-16T21:35:43.000Z
2020-03-24T18:02:41.000Z
2d-lin_sep.py
rzepinskip/optimization-svm
9682980e19d5fc9f09353aa1284e86874e954aec
[ "MIT" ]
null
null
null
import numpy as np from matplotlib import pyplot as plt from optsvm.svm import SVM x_neg = np.array([[3, 4], [1, 4], [2, 3]]) y_neg = np.array([-1, -1, -1]) x_pos = np.array([[6, -1], [7, -1], [5, -3]]) y_pos = np.array([1, 1, 1]) x1 = np.linspace(-10, 10) x = np.vstack((np.linspace(-10, 10), np.linspace(-10, 10))) # Data for the next section X = np.vstack((x_neg, x_pos)) y = np.concatenate((y_neg, y_pos)) # Plot fig = plt.figure(figsize=(10, 10)) plt.scatter(x_neg[:, 0], x_neg[:, 1], marker="x", color="r", label="Negative -1") plt.scatter(x_pos[:, 0], x_pos[:, 1], marker="o", color="b", label="Positive +1") plt.plot(x1, x1 - 3, color="darkblue") plt.plot(x1, x1 - 7, linestyle="--", alpha=0.3, color="b") plt.plot(x1, x1 + 1, linestyle="--", alpha=0.3, color="r") plt.xlim(-2, 12) plt.ylim(-7, 7) plt.xticks(np.arange(0, 10, step=1)) plt.yticks(np.arange(-5, 5, step=1)) # Lines plt.axvline(0, color="black", alpha=0.5) plt.axhline(0, color="black", alpha=0.5) plt.plot([2, 6], [3, -1], linestyle="-", color="darkblue", alpha=0.5) plt.plot([4, 6], [1, 1], [6, 6], [1, -1], linestyle=":", color="darkblue", alpha=0.5) plt.plot( [0, 1.5], [0, -1.5], [6, 6], [1, -1], linestyle=":", color="darkblue", alpha=0.5 ) # Annotations plt.annotate(s="$A \ (6,-1)$", xy=(5, -1), xytext=(6, -1.5)) plt.annotate( s="$B \ (2,3)$", xy=(2, 3), xytext=(2, 3.5) ) # , arrowprops = {'width':.2, 'headwidth':8}) plt.annotate(s="$2$", xy=(5, 1.2), xytext=(5, 1.2)) plt.annotate(s="$2$", xy=(6.2, 0.5), xytext=(6.2, 0.5)) plt.annotate(s="$2\sqrt{2}$", xy=(4.5, -0.5), xytext=(4.5, -0.5)) plt.annotate(s="$2\sqrt{2}$", xy=(2.5, 1.5), xytext=(2.5, 1.5)) plt.annotate(s="$w^Tx + b = 0$", xy=(8, 4.5), xytext=(8, 4.5)) plt.annotate( s="$(\\frac{1}{4},-\\frac{1}{4}) \\binom{x_1}{x_2}- \\frac{3}{4} = 0$", xy=(7.5, 4), xytext=(7.5, 4), ) plt.annotate(s="$\\frac{3}{\sqrt{2}}$", xy=(0.5, -1), xytext=(0.5, -1)) # Labels and show plt.xlabel("$x_1$") plt.ylabel("$x_2$") plt.legend(loc="lower right") plt.show() svm = SVM(C=10) svm.fit(X, y) # Display results print("---Our results") print("w = ", svm.w_.flatten()) print("b = ", svm.b_) from sklearn.svm import SVC clf = SVC(C=10, kernel="linear") clf.fit(X, y.ravel()) print("---SVM library") print("w = ", clf.coef_) print("b = ", clf.intercept_)
30.012987
85
0.568585
26940166a9ca6443227b0ee06f77f5a4332612b9
413
java
Java
johnson-codegen/src/main/java/com/github/johnson/codegen/visitors/ContainsObjectType.java
ewanld/johnson-runtime
897af704b11453ce7c2608fadabdd00723487da2
[ "MIT" ]
null
null
null
johnson-codegen/src/main/java/com/github/johnson/codegen/visitors/ContainsObjectType.java
ewanld/johnson-runtime
897af704b11453ce7c2608fadabdd00723487da2
[ "MIT" ]
null
null
null
johnson-codegen/src/main/java/com/github/johnson/codegen/visitors/ContainsObjectType.java
ewanld/johnson-runtime
897af704b11453ce7c2608fadabdd00723487da2
[ "MIT" ]
null
null
null
package com.github.johnson.codegen.visitors; import com.github.johnson.codegen.JohnsonTypeVisitor; import com.github.johnson.codegen.types.ObjectType; public class ContainsObjectType extends JohnsonTypeVisitor { private boolean result = false; @Override public boolean enterObject(ObjectType type) { result = true; return false; } public boolean getResult() { return result; } }
21.736842
61
0.748184
c4188b2bee9792b7bd57e327e0a521e263541b3e
872
h
C
src/saiga/vulkan/window/SDLWindow.h
SimonMederer/saiga
ff167e60c50b1cead4d19eb5ab2e93acce8c42a3
[ "MIT" ]
null
null
null
src/saiga/vulkan/window/SDLWindow.h
SimonMederer/saiga
ff167e60c50b1cead4d19eb5ab2e93acce8c42a3
[ "MIT" ]
null
null
null
src/saiga/vulkan/window/SDLWindow.h
SimonMederer/saiga
ff167e60c50b1cead4d19eb5ab2e93acce8c42a3
[ "MIT" ]
null
null
null
/** * Copyright (c) 2017 Darius Rückert * Licensed under the MIT License. * See LICENSE file for more information. */ #pragma once #include "saiga/vulkan/window/Window.h" #ifndef SAIGA_USE_SDL # error Saiga was compiled without SDL2. #endif typedef struct SDL_Window SDL_Window; namespace Saiga { namespace Vulkan { class SAIGA_VULKAN_API SDLWindow : public VulkanWindow { public: SDL_Window* sdl_window = nullptr; SDLWindow(WindowParameters _windowParameters); ~SDLWindow(); virtual std::unique_ptr<ImGuiVulkanRenderer> createImGui(size_t frameCount) override; std::vector<std::string> getRequiredInstanceExtensions() override; void createSurface(VkInstance instance, VkSurfaceKHR* surface) override; virtual void update(float dt) override; private: void create(); }; } // namespace Vulkan } // namespace Saiga
20.27907
89
0.739679
4155a6bab7f219fc24011b64f03620b6c9756b3b
757
c
C
bsp/mini2440/drivers/led.c
Davidfind/rt-thread
56f1a8af4f9e8bad0a0fdc5cea7112767267b243
[ "Apache-2.0" ]
10
2019-12-23T07:18:27.000Z
2020-12-19T04:35:43.000Z
bsp/mini2440/drivers/led.c
zlzerg/rt-thread
c0a400ccbee720fc0e9ee904298f09bd07a21382
[ "Apache-2.0" ]
5
2019-02-28T10:07:03.000Z
2019-03-11T10:40:20.000Z
bsp/mini2440/drivers/led.c
zlzerg/rt-thread
c0a400ccbee720fc0e9ee904298f09bd07a21382
[ "Apache-2.0" ]
7
2019-07-01T02:50:47.000Z
2020-12-11T10:01:07.000Z
/* * File : led.c * This file is part of RT-Thread RTOS * COPYRIGHT (C) 2006, RT-Thread Develop Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rt-thread.org/license/LICENSE * * Change Logs: * Date Author Notes * 2009-12-27 rdghx mini2440 */ /** * @addtogroup mini2440 */ /*@{*/ #include <s3c24x0.h> #include "led.h" void rt_hw_led_init(void) { /* GPB5,GPB6,GPB7,GPB8 for LED */ GPBCON = GPBCON & (~(0xff << 10)) | (0x55 << 10); GPBUP |= (0x0f << 5); } void rt_hw_led_on(unsigned char value) { GPBDAT &= ~ ((value & 0x0f) << 5); } void rt_hw_led_off(unsigned char value) { GPBDAT |= (value & 0x0f) << 5; } /*@}*/
18.02381
58
0.603699
cb422790ff0ec8ad2a11af8baeb1ef73f0570744
354
h
C
ShenShengYi/platform/School/generate/STLGenerateScore.h
shenshengyi/ShenShengYi
0b16b555d498c0bd17dd16f830343a5f2a1fd4e1
[ "MIT" ]
null
null
null
ShenShengYi/platform/School/generate/STLGenerateScore.h
shenshengyi/ShenShengYi
0b16b555d498c0bd17dd16f830343a5f2a1fd4e1
[ "MIT" ]
null
null
null
ShenShengYi/platform/School/generate/STLGenerateScore.h
shenshengyi/ShenShengYi
0b16b555d498c0bd17dd16f830343a5f2a1fd4e1
[ "MIT" ]
null
null
null
#pragma once #include <random> #include "GenerateScore.h" namespace STU { class STLGenerateScore:public GenerateScore { public: STLGenerateScore(void); int GenerateLanguage(void)override; int GenerateMath(void)override; int GenerateComprehensive(void)override; int GenerateEnglish(void)override; private: std::random_device _rand; }; }
18.631579
44
0.774011
44a9e0833d46f9f911eea2f0e43396b6408e3ba6
377
kt
Kotlin
src/main/kotlin/ui/util/Color.kt
wooodenleg/TwitchWheelOfFortune
49e87426209fca31099879c579325a75ed70c4f4
[ "MIT" ]
null
null
null
src/main/kotlin/ui/util/Color.kt
wooodenleg/TwitchWheelOfFortune
49e87426209fca31099879c579325a75ed70c4f4
[ "MIT" ]
null
null
null
src/main/kotlin/ui/util/Color.kt
wooodenleg/TwitchWheelOfFortune
49e87426209fca31099879c579325a75ed70c4f4
[ "MIT" ]
null
null
null
package ui.util import androidx.compose.ui.graphics.Color import kotlin.random.Random fun getColorFromHexString(colorString: String): Color? = if (colorString.isBlank()) null else Color(colorString.removePrefix("#").toInt(16)) .copy(alpha = 1f) fun randomColor() = Color( Random.nextInt(0, 255), Random.nextInt(0, 255), Random.nextInt(0, 255), )
23.5625
56
0.697613
3d3926670b7280098200bc859d21ea9a5a85355b
4,863
go
Go
gen3-client/mocks/mock_gen3interface.go
uc-cdis/cdis-data-client
c53fa53f70b9abb6d0224309feaecded72c91065
[ "Apache-2.0" ]
5
2019-10-04T15:10:01.000Z
2021-12-08T17:57:55.000Z
gen3-client/mocks/mock_gen3interface.go
uc-cdis/cdis-data-client
c53fa53f70b9abb6d0224309feaecded72c91065
[ "Apache-2.0" ]
23
2018-04-30T18:44:36.000Z
2021-07-15T20:52:01.000Z
gen3-client/mocks/mock_gen3interface.go
uc-cdis/cdis-data-client
c53fa53f70b9abb6d0224309feaecded72c91065
[ "Apache-2.0" ]
6
2018-10-04T17:15:53.000Z
2022-03-08T18:00:05.000Z
// Code generated by MockGen. DO NOT EDIT. // Source: github.com/uc-cdis/gen3-client/gen3-client/g3cmd (interfaces: Gen3Interface) // Package mocks is a generated GoMock package. package mocks import ( bytes "bytes" gomock "github.com/golang/mock/gomock" jwt "github.com/uc-cdis/gen3-client/gen3-client/jwt" http "net/http" url "net/url" reflect "reflect" ) // MockGen3Interface is a mock of Gen3Interface interface type MockGen3Interface struct { ctrl *gomock.Controller recorder *MockGen3InterfaceMockRecorder } // MockGen3InterfaceMockRecorder is the mock recorder for MockGen3Interface type MockGen3InterfaceMockRecorder struct { mock *MockGen3Interface } // NewMockGen3Interface creates a new mock instance func NewMockGen3Interface(ctrl *gomock.Controller) *MockGen3Interface { mock := &MockGen3Interface{ctrl: ctrl} mock.recorder = &MockGen3InterfaceMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use func (m *MockGen3Interface) EXPECT() *MockGen3InterfaceMockRecorder { return m.recorder } // CheckForShepherdAPI mocks base method func (m *MockGen3Interface) CheckForShepherdAPI(arg0 *jwt.Credential) (bool, error) { ret := m.ctrl.Call(m, "CheckForShepherdAPI", arg0) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // CheckForShepherdAPI indicates an expected call of CheckForShepherdAPI func (mr *MockGen3InterfaceMockRecorder) CheckForShepherdAPI(arg0 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckForShepherdAPI", reflect.TypeOf((*MockGen3Interface)(nil).CheckForShepherdAPI), arg0) } // CheckPrivileges mocks base method func (m *MockGen3Interface) CheckPrivileges(arg0 *jwt.Credential) (string, map[string]interface{}, error) { ret := m.ctrl.Call(m, "CheckPrivileges", arg0) ret0, _ := ret[0].(string) ret1, _ := ret[1].(map[string]interface{}) ret2, _ := ret[2].(error) return ret0, ret1, ret2 } // CheckPrivileges indicates an expected call of CheckPrivileges func (mr *MockGen3InterfaceMockRecorder) CheckPrivileges(arg0 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckPrivileges", reflect.TypeOf((*MockGen3Interface)(nil).CheckPrivileges), arg0) } // DoRequestWithSignedHeader mocks base method func (m *MockGen3Interface) DoRequestWithSignedHeader(arg0 *jwt.Credential, arg1, arg2 string, arg3 []byte) (jwt.JsonMessage, error) { ret := m.ctrl.Call(m, "DoRequestWithSignedHeader", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(jwt.JsonMessage) ret1, _ := ret[1].(error) return ret0, ret1 } // DoRequestWithSignedHeader indicates an expected call of DoRequestWithSignedHeader func (mr *MockGen3InterfaceMockRecorder) DoRequestWithSignedHeader(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoRequestWithSignedHeader", reflect.TypeOf((*MockGen3Interface)(nil).DoRequestWithSignedHeader), arg0, arg1, arg2, arg3) } // GetHost mocks base method func (m *MockGen3Interface) GetHost(arg0 *jwt.Credential) (*url.URL, error) { ret := m.ctrl.Call(m, "GetHost", arg0) ret0, _ := ret[0].(*url.URL) ret1, _ := ret[1].(error) return ret0, ret1 } // GetHost indicates an expected call of GetHost func (mr *MockGen3InterfaceMockRecorder) GetHost(arg0 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHost", reflect.TypeOf((*MockGen3Interface)(nil).GetHost), arg0) } // GetResponse mocks base method func (m *MockGen3Interface) GetResponse(arg0 *jwt.Credential, arg1, arg2, arg3 string, arg4 []byte) (string, *http.Response, error) { ret := m.ctrl.Call(m, "GetResponse", arg0, arg1, arg2, arg3, arg4) ret0, _ := ret[0].(string) ret1, _ := ret[1].(*http.Response) ret2, _ := ret[2].(error) return ret0, ret1, ret2 } // GetResponse indicates an expected call of GetResponse func (mr *MockGen3InterfaceMockRecorder) GetResponse(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResponse", reflect.TypeOf((*MockGen3Interface)(nil).GetResponse), arg0, arg1, arg2, arg3, arg4) } // MakeARequest mocks base method func (m *MockGen3Interface) MakeARequest(arg0, arg1, arg2, arg3 string, arg4 map[string]string, arg5 *bytes.Buffer, arg6 bool) (*http.Response, error) { ret := m.ctrl.Call(m, "MakeARequest", arg0, arg1, arg2, arg3, arg4, arg5, arg6) ret0, _ := ret[0].(*http.Response) ret1, _ := ret[1].(error) return ret0, ret1 } // MakeARequest indicates an expected call of MakeARequest func (mr *MockGen3InterfaceMockRecorder) MakeARequest(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MakeARequest", reflect.TypeOf((*MockGen3Interface)(nil).MakeARequest), arg0, arg1, arg2, arg3, arg4, arg5, arg6) }
41.211864
176
0.754473
156ea1e592dc84cedc6b646197a06aa5573e56d1
1,366
rb
Ruby
spec/key_config_spec.rb
hortoncd/rubikey
a62595a2d68da7716127f171daa8e6d138a469a5
[ "MIT" ]
2
2015-03-18T19:12:20.000Z
2015-03-30T03:36:37.000Z
spec/key_config_spec.rb
hortoncd/rubikey
a62595a2d68da7716127f171daa8e6d138a469a5
[ "MIT" ]
null
null
null
spec/key_config_spec.rb
hortoncd/rubikey
a62595a2d68da7716127f171daa8e6d138a469a5
[ "MIT" ]
1
2022-03-03T19:34:45.000Z
2022-03-03T19:34:45.000Z
require 'spec_helper' describe "KeyConfig" do context 'when initialization succeeded' do let(:key_config) { Rubikey::KeyConfig.new('enrlucvketdlfeknvrdggingjvrggeffenhevendbvgd', '4013a2c719c4e9734bbc63048b00e16b') } it "has the expected public yubikey id" do expect(key_config.public_id).to eq('enrlucvketdl') end it "has the expected secret yubikey id" do expect(key_config.secret_id).to eq('912a644bbc7b') end it "has the expected insert counter" do expect(key_config.insert_counter).to eq(1) end end context 'when initialization failes' do subject(:unique_passcode) { 'hknhfjbrjnlnldnhcujvddbikngjrtgh' } let(:secret_key) { 'ecde18dbe76fbd0c33330f1c354871db' } context 'raises InvalidKey when' do it 'key is not hexadecimal' do expect{ Rubikey::KeyConfig.new(unique_passcode, unique_passcode) }.to raise_error(Rubikey::InvalidKey) end it 'key is not 32 chararcters long' do expect{ Rubikey::KeyConfig.new(unique_passcode, secret_key[0,31]) }.to raise_error(Rubikey::InvalidKey) end end context 'raises BadRedundancyCheck when' do it 'CRC is invalid' do expect{ Rubikey::KeyConfig.new(unique_passcode[1,31]+'d', secret_key) }.to raise_error(Rubikey::BadRedundancyCheck) end end end end
32.52381
131
0.698389
95a092f82d2ee6e4f00899a239aa1b203d18bbff
4,032
css
CSS
assets/style.css
cabadam/stfc-galaxy-map
27230ff82d451672ee09764ae74725fb9b3aeb6b
[ "MIT" ]
null
null
null
assets/style.css
cabadam/stfc-galaxy-map
27230ff82d451672ee09764ae74725fb9b3aeb6b
[ "MIT" ]
null
null
null
assets/style.css
cabadam/stfc-galaxy-map
27230ff82d451672ee09764ae74725fb9b3aeb6b
[ "MIT" ]
null
null
null
.leaflet-container { background-color:rgba(0,0,0,0); } body { padding: 0; margin: 0; background: #000; } body > #map-wrapper { position: fixed; top: calc(50px + 1em); bottom: 0.1em; right: 0; left: 0; vertical-align: top; } #map { height: 100%; width: 100%; float: left; } .fixed-size{ /*width:1200px; height:675px;*/ width:1000px; height:1000px; position:absolute; top: 0 !important; left: 0; background: #000; } .system-label{ visibility: hidden; background:none; border:none; color: #fff; box-shadow: none; text-shadow: -1px 1px 0 #000, 1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000; /*margin-left:5px;*/ } .system-label::before{ display: none; } /*!* make vertical objects visible *! #map { overflow:visible; transform:rotateX(30deg); } !* removes a flickering background color *! .leaflet-container { background:none; } !* set up our 3D space *! #map-wrapper { perspective:1800px; transform-origin: bottom center; } #map, #map * { -webkit-transform-style:preserve-3d; transform-style:preserve-3d; }*/ .dim { opacity: 0.2; } .leaflet-control-layers-group-name { font-weight: bold; margin-bottom: .2em; margin-left: 3px; } .leaflet-control-layers-group { margin-bottom: .5em; } .leaflet-control-layers-scrollbar { overflow-y: scroll; padding-right: 10px; } label { margin-bottom :-1px; } .form-row{ margin-bottom: 5px; } .row { width: 60%; margin: 30px auto; padding: 15px; border-bottom: 1px solid #eee; } .bootstrap-tagsinput { width: 100%; } .bootstrap-tagsinput { background-color: #fff; border: 1px solid #ccc; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); display: inline-block; padding: 4px 6px; color: #555; vertical-align: middle; border-radius: 4px; max-width: 100%; line-height: 22px; cursor: text; } .bootstrap-tagsinput input { border: none; box-shadow: none; outline: none; background-color: transparent; padding: 0 6px; margin: 0; width: auto; max-width: inherit; } .bootstrap-tagsinput.form-control input::-moz-placeholder { color: #777; opacity: 1; } .bootstrap-tagsinput.form-control input:-ms-input-placeholder { color: #777; } .bootstrap-tagsinput.form-control input::-webkit-input-placeholder { color: #777; } .bootstrap-tagsinput input:focus { border: none; box-shadow: none; } .bootstrap-tagsinput .tag { margin-right: 2px; color: white; } .bootstrap-tagsinput .tag [data-role="remove"] { margin-left: 8px; cursor: pointer; } .bootstrap-tagsinput .tag [data-role="remove"]:after { content: "x"; padding: 0px 2px; } .bootstrap-tagsinput .tag [data-role="remove"]:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); } .bootstrap-tagsinput .tag [data-role="remove"]:hover:active { box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); } .twitter-typeahead .tt-query, .twitter-typeahead .tt-hint { margin-bottom: 0; } .twitter-typeahead .tt-hint { display: none; } .tt-menu { position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left; min-width: 160px; padding: 5px 0; margin: 2px 0 0; list-style: none; font-size: 14px; background-color: #ffffff; border: 1px solid #cccccc; border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 4px; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); background-clip: padding-box; cursor: pointer; } .tt-suggestion { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.428571429; color: #333333; white-space: nowrap; } .tt-suggestion:hover, .tt-suggestion:focus { color: #ffffff; text-decoration: none; outline: 0; background-color: #428bca; }
18.410959
86
0.619048
c373b5a0fd5c1679ebc54c5afb641d96088e1c47
294
swift
Swift
Swift/RemainingWork/WeatherForecast/WeatherForecast/Source/Helper/Extension/StringExtension.swift
JoongChangYang/TIL
b2a773dc31af54620fd83da9e487495099febcf5
[ "MIT" ]
null
null
null
Swift/RemainingWork/WeatherForecast/WeatherForecast/Source/Helper/Extension/StringExtension.swift
JoongChangYang/TIL
b2a773dc31af54620fd83da9e487495099febcf5
[ "MIT" ]
null
null
null
Swift/RemainingWork/WeatherForecast/WeatherForecast/Source/Helper/Extension/StringExtension.swift
JoongChangYang/TIL
b2a773dc31af54620fd83da9e487495099febcf5
[ "MIT" ]
null
null
null
// // StringExtension.swift // WeatherForecast // // Created by Giftbot on 2020/02/22. // Copyright © 2020 Giftbot. All rights reserved. // import UIKit extension String { func size(with font: UIFont) -> CGSize { return (self as NSString).size(withAttributes: [.font : font]) } }
18.375
66
0.673469
7c318cbf3ec8e34e91c19e67c122ca33d8a33b8c
1,086
rs
Rust
src/bench/simplex.rs
lfdoherty/noise
015981c9fd16a4f8e167109afca0d1add926d39f
[ "Unlicense" ]
null
null
null
src/bench/simplex.rs
lfdoherty/noise
015981c9fd16a4f8e167109afca0d1add926d39f
[ "Unlicense" ]
null
null
null
src/bench/simplex.rs
lfdoherty/noise
015981c9fd16a4f8e167109afca0d1add926d39f
[ "Unlicense" ]
null
null
null
use std::rand::{ weak_rng, Rng, XorShiftRng }; use test::Bencher; use gen::{ NoiseGen, Simplex }; #[bench] fn bench_simplex_new(b: &mut Bencher) { b.iter(|| { Simplex::new(); }) } #[bench] fn bench_simplex_from_rng(b: &mut Bencher) { let mut rng: XorShiftRng = weak_rng(); b.iter(|| { Simplex::from_rng(&mut rng); }) } #[bench] fn bench_simplex_noise1d(b: &mut Bencher) { let mut rng: XorShiftRng = weak_rng(); let simplex = Simplex::from_rng(&mut rng); b.iter(|| { simplex.noise1d(rng.gen()); }) } #[bench] fn bench_simplex_noise2d(b: &mut Bencher) { let mut rng: XorShiftRng = weak_rng(); let simplex = Simplex::from_rng(&mut rng); b.iter(|| { simplex.noise2d( rng.gen(), rng.gen() ); }) } #[bench] fn bench_simplex_noise3d(b: &mut Bencher) { let mut rng: XorShiftRng = weak_rng(); let simplex = Simplex::from_rng(&mut rng); b.iter(|| { simplex.noise3d( rng.gen(), rng.gen(), rng.gen() ); }) }
20.111111
46
0.550645
5004763133dad6b2d6fbf190fa6fc406650742ac
431
js
JavaScript
src/constants/about.js
joni43/Jonathan-Gatsby-Portfolio
9ad70c63b2742b5efdf9d687c5a12805e1e44f7d
[ "MIT" ]
null
null
null
src/constants/about.js
joni43/Jonathan-Gatsby-Portfolio
9ad70c63b2742b5efdf9d687c5a12805e1e44f7d
[ "MIT" ]
null
null
null
src/constants/about.js
joni43/Jonathan-Gatsby-Portfolio
9ad70c63b2742b5efdf9d687c5a12805e1e44f7d
[ "MIT" ]
null
null
null
import React from 'react'; export default [ { id:1, title:'About me', info:'Newly graduated Front-end Developer. The technologies I work with are JavaScript, HTML and CSS with a focus on the frameworks like React.js, Gatsby, Node and Express.', skills:[ { id:1,title:'HTML' }, { id:2, title:'CSS' },{ id:3, title:'Javascript' }, { id:4 ,title:'Node.js' }, { id:5, title:'React' }, { id:6, title:'Gatsby' } ] } ];
39.181818
178
0.635731
936e79a4889ff962a789caa1412d40592d771ae5
2,926
kt
Kotlin
src/main/kotlin/au/org/ala/cas/password/AlaPasswordEncoder.kt
bioatlas/ala-cas-5
f185be0f27495d24350d94d1593e93ea5d9e4f1d
[ "Apache-2.0" ]
null
null
null
src/main/kotlin/au/org/ala/cas/password/AlaPasswordEncoder.kt
bioatlas/ala-cas-5
f185be0f27495d24350d94d1593e93ea5d9e4f1d
[ "Apache-2.0" ]
33
2017-07-27T01:29:52.000Z
2022-01-04T16:56:41.000Z
src/main/kotlin/au/org/ala/cas/password/AlaPasswordEncoder.kt
bioatlas/ala-cas-5
f185be0f27495d24350d94d1593e93ea5d9e4f1d
[ "Apache-2.0" ]
6
2019-05-10T07:37:33.000Z
2020-11-26T11:14:38.000Z
package au.org.ala.cas.password import au.org.ala.utils.* import org.springframework.security.crypto.password.PasswordEncoder import java.io.File import java.io.FileNotFoundException import java.util.* /** * Load the password encoding properties from a property source and use those properties to * configure the ALA Legacy Password Encoder * * This works around the CAS server only calling the no-args constructor for a custom password * encoder and not loading it from the Spring context or giving it access to the property source. */ class AlaPasswordEncoder private constructor(val delegate: PasswordEncoder) : PasswordEncoder by delegate { constructor() : this(delegate = loadAlaLegacyEncoder()) companion object { private val log = logger() const val DEFAULT_LOCATION = "/data/cas5/config/pwe.properties" const val LOCATION_SYSTEM_PROPERTY = "ala.password.properties" const val LOCATION_ENV_VARIABLE = "ALA_PASSWORD_PROPERTIES" const val MD5_SECRET_PROPERTY = "md5.secret" const val MD5_BASE64_ENCODE_PROPERTY = "md5.base64Encode" fun loadAlaLegacyEncoder(): PasswordEncoder { // TODO find a way to get to the Spring Boot properties so we don't need a second property source val location = System.getProperty(LOCATION_SYSTEM_PROPERTY) ?: System.getenv(LOCATION_ENV_VARIABLE) ?: DEFAULT_LOCATION log.info("Loading AlaPasswordEncoder properties from $location") val props = try { File(location).loadProperties() } catch (e: FileNotFoundException) { log.error( """ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ALA Password Encoder properties were not found at $location! You must provide a properties file with password encoder settings! By default this file will be loaded from $DEFAULT_LOCATION but you can specify the location using the ALA_PASSWORD_PROPERTIES environment variable or ala.password.properties system property !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!""".trimIndent() ) throw e } return loadAlaLegacyEncoder(props) } fun loadAlaLegacyEncoder(props: Properties): PasswordEncoder { val md5Secret = props.getProperty(MD5_SECRET_PROPERTY) ?: throw IllegalArgumentException("md5.secret property must be set in ALA Password Encoder properties!") val md5Base64Encode = props.getProperty(MD5_BASE64_ENCODE_PROPERTY)?.toBoolean() ?: true log.debug("MD5 PWE: Using {} for secret, {} for base64Encode", md5Secret, md5Base64Encode) return AlaLegacyEncoder(md5Secret, md5Base64Encode) } } }
47.193548
213
0.639098
0e27d6f63c054fd3eb97081c7bb8cfdedfe1db55
264
sql
SQL
db/migrations/postgres/000012_create_commands.down.sql
vicky-demansol/mattermost-server
770f7a8e5ad2694fda349a9c48339594df8f21fe
[ "Apache-2.0" ]
1
2022-03-14T07:07:43.000Z
2022-03-14T07:07:43.000Z
db/migrations/postgres/000012_create_commands.down.sql
vicky-demansol/mattermost-server
770f7a8e5ad2694fda349a9c48339594df8f21fe
[ "Apache-2.0" ]
2
2022-02-13T03:34:57.000Z
2022-03-01T03:39:21.000Z
db/migrations/postgres/000012_create_commands.down.sql
vicky-demansol/mattermost-server
770f7a8e5ad2694fda349a9c48339594df8f21fe
[ "Apache-2.0" ]
1
2022-01-02T00:37:14.000Z
2022-01-02T00:37:14.000Z
DROP INDEX IF EXISTS idx_commands_team_id; DROP INDEX IF EXISTS idx_commands_update_at; DROP INDEX IF EXISTS idx_commands_create_at; DROP INDEX IF EXISTS idx_commands_delete_at; ALTER TABLE commands DROP COLUMN IF EXISTS pluginid; DROP TABLE IF EXISTS commands;
29.333333
52
0.844697
46b0264abb682d3a90ed2756ac161cbfb4df3889
265
lua
Lua
MMOCoreORB/bin/scripts/object/custom_content/building/mustafar/terrain/must_rock_smooth_05.lua
V-Fib/FlurryClone
40e0ca7245ec31b3815eb6459329fd9e70f88936
[ "Zlib", "OpenSSL" ]
18
2017-02-09T15:36:05.000Z
2021-12-21T04:22:15.000Z
MMOCoreORB/bin/scripts/object/custom_content/building/mustafar/terrain/must_rock_smooth_05.lua
V-Fib/FlurryClone
40e0ca7245ec31b3815eb6459329fd9e70f88936
[ "Zlib", "OpenSSL" ]
61
2016-12-30T21:51:10.000Z
2021-12-10T20:25:56.000Z
MMOCoreORB/bin/scripts/object/custom_content/building/mustafar/terrain/must_rock_smooth_05.lua
V-Fib/FlurryClone
40e0ca7245ec31b3815eb6459329fd9e70f88936
[ "Zlib", "OpenSSL" ]
71
2017-01-01T05:34:38.000Z
2022-03-29T01:04:00.000Z
object_building_mustafar_terrain_must_rock_smooth_05 = object_building_mustafar_terrain_shared_must_rock_smooth_05:new { } ObjectTemplates:addTemplate(object_building_mustafar_terrain_must_rock_smooth_05, "object/building/mustafar/terrain/must_rock_smooth_05.iff")
265
265
0.916981
396af061a2ad00461a778949e60dfa7b1a1f3e19
11,742
html
HTML
docs/changelog.html
terrorizer1980/rest-api-client-ng
883ce38c5f85e1114157f7c00dcd44aa2c3de061
[ "Apache-2.0" ]
null
null
null
docs/changelog.html
terrorizer1980/rest-api-client-ng
883ce38c5f85e1114157f7c00dcd44aa2c3de061
[ "Apache-2.0" ]
null
null
null
docs/changelog.html
terrorizer1980/rest-api-client-ng
883ce38c5f85e1114157f7c00dcd44aa2c3de061
[ "Apache-2.0" ]
null
null
null
<!doctype html> <html class="no-js" lang=""> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>@senzing/rest-api-client-ng documentation</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/x-icon" href="./images/favicon.ico"> <link rel="stylesheet" href="./styles/style.css"> </head> <body> <div class="navbar navbar-default navbar-fixed-top visible-xs"> <a href="./" class="navbar-brand">@senzing/rest-api-client-ng documentation</a> <button type="button" class="btn btn-default btn-menu ion-ios-menu" id="btn-menu"></button> </div> <div class="xs-menu menu" id="mobile-menu"> <div id="book-search-input" role="search"><input type="text" placeholder="Type to search"></div> <compodoc-menu></compodoc-menu> </div> <div class="container-fluid main"> <div class="row main"> <div class="hidden-xs menu"> <compodoc-menu mode="normal"></compodoc-menu> </div> <!-- START CONTENT --> <div class="content getting-started"> <div class="content-data"> <h1 id="changelog">Changelog</h1> <p>All notable changes to this project will be documented in this file.</p> <p>The format is based on <a href="https://keepachangelog.com/en/1.0.0/">Keep a Changelog</a>, <a href="https://dlaa.me/markdownlint/">markdownlint</a>, and this project adheres to <a href="https://semver.org/spec/v2.0.0.html">Semantic Versioning</a>.</p> <h2 id="222---2021-06-09">[2.2.2] - 2021-06-09</h2> <ul> <li>Dependency security updates and bugfixes. #67</li> <li>Added new <code>additionalHeaders</code> parameter to <em><em>ALL</em></em> service methods. see issue #63</li> <li>New methods and property added to <a href="http://hub.senzing.com/rest-api-client-ng/classes/Configuration.html">Cofiguration class</a> :<ul> <li><a href="http://hub.senzing.com/rest-api-client-ng/classes/Configuration.html#additionalHeaders">additionalHeaders</a></li> <li><a href="http://hub.senzing.com/rest-api-client-ng/classes/Configuration.html#addAdditionalRequestHeader">addAdditionalRequestHeader</a></li> <li><a href="http://hub.senzing.com/rest-api-client-ng/classes/Configuration.html#removeAdditionalRequestHeader">removeAdditionalRequestHeader</a></li> </ul> </li> </ul> <p>relevant tickets: #63, #67</p> <h2 id="221---2021-04-08">[2.2.1] - 2021-04-08</h2> <ul> <li>Dependency security updates and bugfixes.</li> </ul> <h2 id="220---2020-10-16">[2.2.0] - 2020-10-16</h2> <p>the models need to be updated to match the 2.2.0 specification release. <a href="https://github.com/Senzing/senzing-rest-api-specification/releases/tag/2.2.0">https://github.com/Senzing/senzing-rest-api-specification/releases/tag/2.2.0</a></p> <ul> <li>Added <code>SzNameScoring</code> to describe name scoring details</li> <li>Added <code>SzSearchFeatureScore</code> for search feature scores</li> <li>Modified <code>SzBaseRelatedEntity</code> to remove <code>fullNameScore</code> field since it has not been populated since switch to version 2.0.0 of native Senzing SDK and never made sense in the &quot;base class&quot; since only <code>SzAttributeSearchResult</code> had this field populated under native Senzing SDK version 1.x.</li> <li>Added <code>bestNameScore</code> field to <code>SzAttributeSearchResult</code> to replace <code>fullNameScore</code> in the place where the name score was previously used with version 1.x of the native Senzing SDK (i.e.: to sort search results based on the strength of the name match).</li> <li>Modified <code>SzAttributeSearchResult</code> to include the <code>featureScores</code> field to provide feature scores without using &quot;raw data&quot;</li> <li>Added <code>nameScoringDetails</code> field to <code>SzFeatureScore</code> class to provide <code>SzNameScoring</code> name scoring details on why operations,</li> <li>Updated <code>com.senzing.api.model.SzFeatureScore</code> to define its <code>score</code> field as the most sensible score value from the <code>nameScoringDetails</code> for <code>&quot;NAME&quot;</code> features since the <code>FULL_SCORE</code> field is not available for names.</li> <li>Added the <code>NOT_SCORED</code> value for <code>SzScoringBucket</code> enum.</li> </ul> <h2 id="210---2020-9-20">[2.1.0] - 2020-9-20</h2> <p>Maintenance release for framework upgrade to Angular 10: see <a href="https://blog.angular.io/version-10-of-angular-now-available-78960babd41">https://blog.angular.io/version-10-of-angular-now-available-78960babd41</a></p> <p>Major updates to most dependency versions have also been made which should improve file sizes, security, and stability.</p> <p>The following Senzing projects have also been updated to operate on Angular 10, see the following links for associated tickets:</p> <ul> <li><a href="https://github.com/Senzing/sdk-components-ng/issues/143">sdk-components-ng/issues/143</a></li> <li><a href="https://github.com/Senzing/rest-api-client-ng/issues/39">rest-api-client-ng/issues/39</a></li> <li><a href="https://github.com/Senzing/sdk-graph-components/issues/37">sdk-graph-components/issues/37</a></li> </ul> <h2 id="201---2020-9-20">2.0.1 - 2020-9-20</h2> <p>Minor updates to dependency versions. Security patches.</p> <h2 id="200---2020-07-06">2.0.0 - 2020-07-06</h2> <h3 id="added-to-200">Added to 2.0.0</h3> <p>ConfigService.getDataSources EntityDataService.reevaluateEntity EntityDataService.reevaluateRecord EntityDataService.whyEntityByEntityID EntityDataService.whyEntityByRecordID EntityDataService.whyRecords EntityDataService.deleteRecord</p> <h3 id="removed-in-200">Removed in 2.0.0</h3> <p>ConfigService.addEntityClasses ConfigService.getCurrentConfig ConfigService.getDefaultConfig</p> <h3 id="refactored-in-200">Refactored in 2.0.0</h3> <p>ConfigService.listDataSources: renamed to <code>ConfigService.getDataSources</code> ConfigService.listEntityClasses: renamed to <code>ConfigService.getEntityClasses</code> ConfigService.listEntityTypes: renamed to <code>ConfigService.getEntityTypes</code> ConfigService.listEntityTypesByClass: renamed to <code>ConfigService.getEntityTypesByClass</code></p> <p>EntityDataService: <code>withRelated</code> arg type(s) globally changed from <code>string: &#39;NONE&#39; | &#39;REPRESENTATIVE&#39; | &#39;WITH_DUPLICATES&#39;</code> to <code>SzRelationshipMode: NONE | PARTIAL | FULL as SzRelationshipMode</code> EntityDataService.addRecord: <code>withInfo</code> and <code>withRaw</code> arguments added EntityDataService.addRecordWithReturnedRecordId: <code>withInfo</code> and <code>withRaw</code> arguments added EntityDataService.getDataSourceRecord: renamed to <code>EntityDataService.getRecord</code> EntityDataService.getEntityByEntityId: <code>withDerivedFeatures</code> renamed to <code>withInternalFeatures</code> EntityDataService.getEntityByEntityId: <code>forceMinimal</code> argument added EntityDataService.getEntityByEntityId: order of args changed from: <code>entityId, featureMode, forceMinimal, withFeatureStats, withDerivedFeatures, withRelated, withRaw, observe, reportProgress</code> to: <code>entityId, featureMode, withFeatureStats, withInternalFeatures, forceMinimal, withRelated, withRaw, observe, reportProgress</code> EntityDataService.searchByAttributes: order of args changed from: <code>attrs, attr, withRelationships, featureMode, withFeatureStats, withDerivedFeatures, forceMinimal, withRaw, observe, reportProgress</code> to: <code>attrs, attr, featureMode, withFeatureStats, withInternalFeatures, forceMinimal, withRelationships, withRaw, observe, reportProgress</code> EntityDataService.getEntityByRecordId: <code>withDerivedFeatures</code> renamed to <code>withInternalFeatures</code> EntityDataService.whyEntityByEntityID: <code>withDerivedFeatures</code> renamed to <code>withInternalFeatures</code> EntityDataService.whyEntityByRecordID: <code>withDerivedFeatures</code> renamed to <code>withInternalFeatures</code></p> <p>EntityGraphService.findNetworkByEntityID: renamed to <code>EntityGraphService.findEntityNetwork</code> EntityGraphService.findPathByEntityID: renamed to <code>EntityGraphService.findEntityPath</code> EntityGraphService.findEntityNetwork: <code>withDerivedFeatures</code> renamed to <code>withInternalFeatures</code> EntityGraphService.findEntityNetwork: &quot;e&quot; arg type changed from <code>Array&lt;string|number&gt;</code> to <code>Array&lt;SzEntityIdentifier&gt;</code> which is equal to <code>Array&lt;number | SzRecordId | string&gt;</code> EntityGraphService.findEntityNetwork: &quot;entities&quot; arg type changed from <code>string</code> to <code>SzEntityIdentifiers</code> which is equal to <code>Array&lt;number&gt; | Array&lt;SzRecordId | string&gt;</code> EntityGraphService.findEntityPath: <code>withDerivedFeatures</code> renamed to <code>withInternalFeatures</code> EntityGraphService.findEntityPath: <code>x</code> arg type changed from <code>SzEntityIdentifiers</code> to <code>Array&lt;SzEntityIdentifier&gt;</code> (superficial type change) EntityGraphService.findEntityPath: <code>featureMode</code> arg type changed from <code>string</code> to <code>featureMode</code> (enum &#39;NONE&#39; | &#39;REPRESENTATIVE&#39; | &#39;WITHDUPLICATES&#39;)</p> <h2 id="102---2019-06-05">[1.0.2] - 2019-06-05</h2> <h3 id="added-to-102">Added to 1.0.2</h3> <ul> <li>minor update to projects/rest-api-client-ng/src/lib/model/szEntityPath.ts to support Graph Components. model was incorrect.</li> </ul> </div><div class="search-results"> <div class="has-results"> <h1 class="search-results-title"><span class='search-results-count'></span> result-matching "<span class='search-query'></span>"</h1> <ul class="search-results-list"></ul> </div> <div class="no-results"> <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1> </div> </div> </div> <!-- END CONTENT --> </div> </div> <script> var COMPODOC_CURRENT_PAGE_DEPTH = 0; var COMPODOC_CURRENT_PAGE_CONTEXT = 'getting-started'; var COMPODOC_CURRENT_PAGE_URL = 'changelog.html'; var MAX_SEARCH_RESULTS = 15; </script> <script src="./js/libs/custom-elements.min.js"></script> <script src="./js/libs/lit-html.js"></script> <!-- Required to polyfill modern browsers as code is ES5 for IE... --> <script src="./js/libs/custom-elements-es5-adapter.js" charset="utf-8" defer></script> <script src="./js/menu-wc.js" defer></script> <script src="./js/libs/bootstrap-native.js"></script> <script src="./js/libs/es6-shim.min.js"></script> <script src="./js/libs/EventDispatcher.js"></script> <script src="./js/libs/promise.min.js"></script> <script src="./js/libs/zepto.min.js"></script> <script src="./js/compodoc.js"></script> <script src="./js/tabs.js"></script> <script src="./js/menu.js"></script> <script src="./js/libs/clipboard.min.js"></script> <script src="./js/libs/prism.js"></script> <script src="./js/sourceCode.js"></script> <script src="./js/search/search.js"></script> <script src="./js/search/lunr.min.js"></script> <script src="./js/search/search-lunr.js"></script> <script src="./js/search/search_index.js"></script> <script src="./js/lazy-load-graphs.js"></script> </body> </html>
56.724638
251
0.716914
74c423b0615a787b16928792d3cd3d5a510ff816
597
kt
Kotlin
tf-data/src/test/kotlin/edu/wpi/inndie/tfdata/loss/LossTest.kt
wpilibsuite/INNDiE
bf16091c29f3ba94a96e536a3872f1c87e023ddb
[ "BSD-3-Clause" ]
null
null
null
tf-data/src/test/kotlin/edu/wpi/inndie/tfdata/loss/LossTest.kt
wpilibsuite/INNDiE
bf16091c29f3ba94a96e536a3872f1c87e023ddb
[ "BSD-3-Clause" ]
1
2020-05-09T19:55:05.000Z
2020-05-09T19:55:17.000Z
tf-data/src/test/kotlin/edu/wpi/inndie/tfdata/loss/LossTest.kt
wpilibsuite/INNDiE
bf16091c29f3ba94a96e536a3872f1c87e023ddb
[ "BSD-3-Clause" ]
null
null
null
package edu.wpi.inndie.tfdata.loss import io.kotlintest.shouldBe import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.Arguments import org.junit.jupiter.params.provider.MethodSource internal class LossTest { @ParameterizedTest @MethodSource("lossSource") fun `test serialization`(loss: Loss) { Loss.deserialize(loss.serialize()).shouldBe(loss) } companion object { @JvmStatic @Suppress("unused") fun lossSource() = listOf( Arguments.of(Loss.SparseCategoricalCrossentropy) ) } }
23.88
60
0.701843
aef7e7c2a975620456846d7b4b268a42a96b390e
1,501
sql
SQL
sql/error_info.sql
pllua/pllua-deprecated
942388ac518b6890063e8158c7f5eb52712a67f2
[ "PostgreSQL", "Unlicense", "MIT" ]
null
null
null
sql/error_info.sql
pllua/pllua-deprecated
942388ac518b6890063e8158c7f5eb52712a67f2
[ "PostgreSQL", "Unlicense", "MIT" ]
null
null
null
sql/error_info.sql
pllua/pllua-deprecated
942388ac518b6890063e8158c7f5eb52712a67f2
[ "PostgreSQL", "Unlicense", "MIT" ]
1
2021-06-24T02:03:18.000Z
2021-06-24T02:03:18.000Z
do $$ local testfunc = function () error("my error") end local f = function() local status, err = pcall(testfunc) if (err) then error(err) end end f() $$language pllua; create or replace function pg_temp.function_with_error() returns integer as $$ local testfunc = function () error("my error") end local f = function() local status, err = pcall(testfunc) if (err) then error(err) end end f() $$language plluau; create or replace function pg_temp.second_function() returns void as $$ local k = server.execute('select pg_temp.function_with_error()') [0] $$language plluau; do $$ server.execute('select pg_temp.second_function()') $$language pllua; do $$ local status, err = subtransaction(function() assert(1==2) end) if (err) then error(err) end $$language pllua; do $$ info({message="info message", hint="info hint", detail="info detail"}) $$language pllua; do $$ info("info message") $$language pllua; do $$ warning({message="warning message", hint="warning hint", detail="warning detail"}) $$language pllua; do $$ warning("warning message") $$language pllua; do $$ error({message="error message", hint="error hint", detail="error detail"}) $$language pllua; do $$ error("error message") $$language pllua; do $$ info() $$language pllua; do $$ warning() $$language pllua; do $$ error() $$language pllua; do $$ local status, err = subtransaction(function() local _ = fromstring('no_type_text','qwerty') end) if (err) then print(err) end $$ language pllua
18.530864
96
0.690207
2a6c1e4a87f00ccc33a6f86d1eef0950312e3c6a
7,614
java
Java
src/test/java/uk/ac/man/cs/eventlite/controllers/VenuesControllerWebTest.java
wuwenyuu/Explanatory_Web_Document
230b7135aae814e1683052d776dc208c944644d3
[ "BSD-3-Clause" ]
null
null
null
src/test/java/uk/ac/man/cs/eventlite/controllers/VenuesControllerWebTest.java
wuwenyuu/Explanatory_Web_Document
230b7135aae814e1683052d776dc208c944644d3
[ "BSD-3-Clause" ]
null
null
null
src/test/java/uk/ac/man/cs/eventlite/controllers/VenuesControllerWebTest.java
wuwenyuu/Explanatory_Web_Document
230b7135aae814e1683052d776dc208c944644d3
[ "BSD-3-Clause" ]
null
null
null
package uk.ac.man.cs.eventlite.controllers; import static org.mockito.Mockito.*; import static org.junit.Assert.assertEquals; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.model; import java.util.Collections; import org.mockito.ArgumentCaptor; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.mockito.mock.MockCreationSettings; import org.hamcrest.Matchers; import org.hamcrest.beans.HasProperty; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.ResultActions; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import uk.ac.man.cs.eventlite.TestParent; import uk.ac.man.cs.eventlite.dao.EventService; import uk.ac.man.cs.eventlite.dao.VenueRepository; import uk.ac.man.cs.eventlite.dao.VenueService; import uk.ac.man.cs.eventlite.entities.Venue; import uk.ac.man.cs.eventlite.entities.Event; import static org.junit.Assert.*; @AutoConfigureMockMvc public class VenuesControllerWebTest extends TestParent { @Autowired private MockMvc mvc; @Autowired private EventService eventService; @Autowired private VenueService realVenueService; @Mock private VenueService venueService; @Mock private VenueRepository venueRepository; @Mock private Venue venue; @InjectMocks private VenuesControllerWeb venueController; @Before public void setup() { MockitoAnnotations.initMocks(this); mvc = MockMvcBuilders.standaloneSetup(venueController).build(); } @Test public void testGetAllVenues() throws Exception { when(venueService.findAllByOrderByNameAsc()).thenReturn(realVenueService.findAllByOrderByNameAsc()); mvc.perform(get("/venues").accept(MediaType.TEXT_HTML)) .andExpect(status().isOk()) .andExpect(view().name("venues/index")) .andExpect(model().attribute("venues", Matchers.iterableWithSize((int)realVenueService.count()))); } @Test public void testSearchAVenue() throws Exception { Venue venue1 = new Venue(); venue1.setId(1); venue1.setName("Kilburn"); venue1.setCapacity(1000); venue1.setAddress("Oxford Road"); venueService.save(venue1); Venue venue2 = new Venue(); venue2.setId(1); venue2.setName("Kilners"); venue2.setCapacity(1000); venue2.setAddress("Oxford Road"); venueService.save(venue2); Venue venue3 = new Venue(); venue3.setId(1); venue3.setName("kilkil"); venue3.setCapacity(1000); venue3.setAddress("Oxford Road"); venueService.save(venue3); mvc.perform(MockMvcRequestBuilders.get("/venues/search?searchVenue=kil").accept(MediaType.TEXT_HTML)).andExpect(status().isOk()) .andExpect(view().name("venues/index")); } @Test public void deleteVenueWithoutEvent() throws Exception { when(venue.getEvents()).thenReturn(Collections.<Event> emptyList()); when(venueService.delete(1)).thenReturn(true); mvc.perform(MockMvcRequestBuilders.post("/venues/1/delete").accept(MediaType.TEXT_HTML)) .andExpect(status().isFound()).andExpect(content().string("")) .andExpect(view().name("redirect:/venues")); //mockPost("/venues/1/delete", MediaType.TEXT_HTML, "redirect:/venues", 302); //verify(venueService).delete(1L); } @Test public void deleteVenueWithEvent() throws Exception { when(venue.getEvents()).thenReturn(Collections.<Event> singletonList(new Event())); when(venueService.findById(1L)).thenReturn(venue); //mockPost("/venues/1/delete", MediaType.TEXT_HTML, "redirect:/venues/1", 302); mvc.perform(MockMvcRequestBuilders.post("/venues/1/delete").accept(MediaType.TEXT_HTML)) .andExpect(status().isOk()).andExpect(content().string("")) .andExpect(view().name("venues/deleteVenueFail")); //verify(venueService, never()).delete(1L); } @Test public void testUpdateVenue() throws Exception{ mvc.perform(get("/venues/34/update").accept(MediaType.TEXT_HTML)).andExpect(status().isOk()).andExpect(view().name("venues/update")); } @Test public void updateVenueHtml() throws Exception { String name = "testvenue"; String address = "Richmond Road, KT2 5PL"; int capacity = 200; Venue venue1 = new Venue(); venue1.setId(1); venue1.setName("Kilburn"); venue1.setCapacity(1000); venue1.setAddress("3 Oxford Road"); realVenueService.save(venue1); when(venueService.findById(1)).thenReturn(venue1); mvc.perform(MockMvcRequestBuilders.post("/venues/1/update").contentType(MediaType.APPLICATION_FORM_URLENCODED) .param("name", name) .param("address", address) .param("capacity", "" + capacity) .accept(MediaType.TEXT_HTML)) .andExpect(view().name("redirect:/venues/")); assertEquals(venue1.getName(), name); assertEquals(venue1.getCapacity(), capacity); assertEquals(venue1.getAddress(), address); } @Test public void updateVenueIncorrectAddressHtml() throws Exception { String name = "testvenue"; String address = "Richmond Road"; int capacity = 200; Venue venue1 = new Venue(); venue1.setId(1); venue1.setName("Kilburn"); venue1.setCapacity(1000); venue1.setAddress("3 Oxford Road"); realVenueService.save(venue1); when(venueService.findById(1)).thenReturn(venue1); mvc.perform(MockMvcRequestBuilders.post("/venues/1/update").contentType(MediaType.APPLICATION_FORM_URLENCODED) .param("name", name) .param("address", address) .param("capacity", "" + capacity) .accept(MediaType.TEXT_HTML)) .andExpect(view().name("redirect:/venues/{id}/update")); assertEquals(venue1.getName(), name); assertEquals(venue1.getCapacity(), capacity); assertEquals(venue1.getAddress(), "3 Oxford Road"); } @Test public void testGetNewVenueHtml() throws Exception { mvc.perform(MockMvcRequestBuilders.get("/venues/new").accept(MediaType.TEXT_HTML)).andExpect(status().isOk()) .andExpect(view().name("venues/new")); } @Test public void testAddVenueHtml() throws Exception { String name = "testaddvenue"; String address = "12 Test Address, M15 6GH"; int capacity = 100; String URL = "/venues/new"; mvc.perform(MockMvcRequestBuilders.post(URL).contentType(MediaType.APPLICATION_FORM_URLENCODED) .param("venuename", name) .param("venueaddress", address) .param("venuecapacity", ""+capacity) .accept(MediaType.TEXT_HTML)) .andExpect(view().name("redirect:/venues/")); } @Test public void testAddVenueHtmlBAdAddress() throws Exception { String name = "testaddvenue"; String address = "1232"; int capacity = 100; String URL = "/venues/new"; mvc.perform(MockMvcRequestBuilders.post(URL).contentType(MediaType.APPLICATION_FORM_URLENCODED) .param("venuename", name) .param("venueaddress", address) .param("venuecapacity", ""+capacity) .accept(MediaType.TEXT_HTML)) .andExpect(view().name("redirect:/venues/new")); } }
32.126582
135
0.741003
6364a84db8d9c16cc598090ab621288ec02090e2
8,303
kt
Kotlin
snakebroadcast/src/main/java/com/uiza/sdkbroadcast/helpers/ICameraHelper.kt
uizaio/snake.android.sdk
681adca006f61e38151cf73cf711a951f05c57dc
[ "BSD-2-Clause" ]
null
null
null
snakebroadcast/src/main/java/com/uiza/sdkbroadcast/helpers/ICameraHelper.kt
uizaio/snake.android.sdk
681adca006f61e38151cf73cf711a951f05c57dc
[ "BSD-2-Clause" ]
null
null
null
snakebroadcast/src/main/java/com/uiza/sdkbroadcast/helpers/ICameraHelper.kt
uizaio/snake.android.sdk
681adca006f61e38151cf73cf711a951f05c57dc
[ "BSD-2-Clause" ]
null
null
null
package com.uiza.sdkbroadcast.helpers import android.content.Context import android.view.MotionEvent import com.pedro.encoder.input.gl.render.filters.BaseFilterRender import com.pedro.encoder.input.video.CameraHelper.Facing import com.pedro.rtplibrary.view.OpenGlView import com.uiza.sdkbroadcast.interfaces.UZCameraChangeListener import com.uiza.sdkbroadcast.interfaces.UZCameraOpenException import com.uiza.sdkbroadcast.interfaces.UZRecordListener import com.uiza.sdkbroadcast.interfaces.UZTakePhotoCallback import com.uiza.sdkbroadcast.profile.AudioAttributes import com.uiza.sdkbroadcast.profile.VideoAttributes import com.uiza.sdkbroadcast.profile.VideoSize import java.io.IOException interface ICameraHelper { val mOpenGlView: OpenGlView? /** * @param reTries retry connect reTries times */ fun setConnectReTries(reTries: Int) fun setUZCameraChangeListener(uzCameraChangeListener: UZCameraChangeListener?) fun setUZRecordListener(uzRecordListener: UZRecordListener?) fun replaceView(openGlView: OpenGlView?) fun replaceView(context: Context?) fun setVideoAttributes(attributes: VideoAttributes?) fun setAudioAttributes(attributes: AudioAttributes?) fun setLandscape(landscape: Boolean) /** * Set filter in position 0. * * @param filterReader filter to set. You can modify parameters to filter after set it to stream. */ fun setFilter(filterReader: BaseFilterRender?) /** * @param filterPosition position of filter * @param filterReader filter to set. You can modify parameters to filter after set it to stream. */ fun setFilter(filterPosition: Int, filterReader: BaseFilterRender?) /** * Get Anti alias is enabled. * * @return true is enabled, false is disabled. */ val isAAEnabled: Boolean /** * Enable or disable Anti aliasing (This method use FXAA). * * @param aAEnabled true is AA enabled, false is AA disabled. False by default. */ fun enableAA(aAEnabled: Boolean) /** * get Stream Width */ val streamWidth: Int /** * get Stream Height */ val streamHeight: Int /** * Enable a muted microphone, can be called before, while and after broadcast. */ fun enableAudio() /** * Mute microphone, can be called before, while and after broadcast. */ fun disableAudio() /** * Get mute state of microphone. * * @return true if muted, false if enabled */ val isAudioMuted: Boolean /** * You will do a portrait broadcast * * @return true if success, false if you get a error (Normally because the encoder selected * doesn't support any configuration seated or your device hasn't a H264 encoder). */ fun prepareBroadCast(): Boolean /** * @param isLandscape boolean * @return true if success, false if you get a error (Normally because the encoder selected * doesn't support any configuration seated or your device hasn't a H264 encoder). */ fun prepareBroadCast(isLandscape: Boolean): Boolean /** * Call this method before use [.startBroadCast]. * * @param audioAttributes [AudioAttributes] If null you will do a broadcast without audio. * @param videoAttributes [VideoAttributes] * @param isLandscape boolean you will broadcast is landscape * @return true if success, false if you get a error (Normally because the encoder selected * doesn't support any configuration seated or your device hasn't a AAC encoder). */ fun prepareBroadCast( audioAttributes: AudioAttributes?, videoAttributes: VideoAttributes, isLandscape: Boolean ): Boolean /** * Get video camera state * * @return true if disabled, false if enabled */ val isVideoEnabled: Boolean /** * Need be called after [.prepareBroadCast] or/and [.prepareBroadCast]. * * @param broadCastUrl of the broadcast like: rtmp://ip:port/application/stream_name * * * RTMP: rtmp://192.168.1.1:1935/fmp4/live_stream_name * [.startPreview] to resolution seated in * [.prepareBroadCast]. * If you never startPreview this method [.startPreview] for you to resolution seated in * [.prepareBroadCast]. */ fun startBroadCast(broadCastUrl: String?) /** * Stop BroadCast started with [.startBroadCast] */ fun stopBroadCast() /** * Get broadcast state. * * @return true if broadcasting, false if not broadcasting. */ val isBroadCasting: Boolean /** * @return list of [VideoSize] */ val supportedResolutions: List<VideoSize?>? /** * Switch camera used. Can be called on preview or while stream, ignored with preview off. * * @throws UZCameraOpenException If the other camera doesn't support same resolution. */ @Throws(UZCameraOpenException::class) fun switchCamera() /** * Start camera preview. Ignored, if stream or preview is started. * resolution of preview 640x480 * * @param cameraFacing front or back camera. Like: [com.pedro.encoder.input.video.CameraHelper.Facing.BACK] * [com.pedro.encoder.input.video.CameraHelper.Facing.FRONT] */ fun startPreview(cameraFacing: Facing?) /** * Start camera preview. Ignored, if stream or preview is started. * * @param cameraFacing front or back camera. Like: [com.pedro.encoder.input.video.CameraHelper.Facing.BACK] * [com.pedro.encoder.input.video.CameraHelper.Facing.FRONT] * @param width of preview in px. * @param height of preview in px. */ fun startPreview(cameraFacing: Facing?, width: Int, height: Int) /** * is Front Camera */ val isFrontCamera: Boolean /** * check is on preview * * @return true if onpreview, false if not preview. */ val isOnPreview: Boolean /** * Stop camera preview. Ignored if streaming or already stopped. You need call it after * * stopStream to release camera properly if you will close activity. */ fun stopPreview() /** * Get record state. * * @return true if recording, false if not recoding. */ val isRecording: Boolean /** * Start record a MP4 video. Need be called while stream. * * @param savePath where file will be saved. * @throws IOException If you init it before start stream. */ @Throws(IOException::class) fun startRecord(savePath: String?) /** * Stop record MP4 video started with @startRecord. If you don't call it file will be unreadable. */ fun stopRecord() /** * take a photo * * @param callback [UZTakePhotoCallback] */ fun takePhoto(callback: UZTakePhotoCallback?) /** * Set video bitrate of H264 in kb while stream. * * @param bitrate H264 in kb. */ fun setVideoBitrateOnFly(bitrate: Int) /** * @return bitrate in kps */ val bitrate: Int fun reTry(delay: Long, reason: String?): Boolean /** * Check support Flashlight * if use Camera1 always return false * * @return true if support, false if not support. */ val isLanternSupported: Boolean /** * required: <uses-permission android:name="android.permission.FLASHLIGHT"></uses-permission> */ @Throws(Exception::class) fun enableLantern() /** * required: <uses-permission android:name="android.permission.FLASHLIGHT"></uses-permission> */ fun disableLantern() val isLanternEnabled: Boolean /** * Return max zoom level * * @return max zoom level */ val maxZoom: Float /** * Return current zoom level * * @return current zoom level */ /** * Set zoomIn or zoomOut to camera. * Use this method if you use a zoom slider. * * @param level Expected to be >= 1 and <= max zoom level * @see Camera2Base.getMaxZoom */ var zoom: Float /** * Set zoomIn or zoomOut to camera. * * @param event motion event. Expected to get event.getPointerCount() > 1 */ fun setZoom(event: MotionEvent?) }
28.829861
111
0.657473
12036287e7a0adbc31ddb66322788b5aeb5f2aed
1,607
swift
Swift
iOS/Model/MarkerFileDatabase.swift
huwr/Marker
078a53323126764b54e5b069c487355cec584963
[ "MIT" ]
2
2017-11-18T03:52:21.000Z
2021-05-21T06:36:33.000Z
iOS/Model/MarkerFileDatabase.swift
huwr/Marker
078a53323126764b54e5b069c487355cec584963
[ "MIT" ]
null
null
null
iOS/Model/MarkerFileDatabase.swift
huwr/Marker
078a53323126764b54e5b069c487355cec584963
[ "MIT" ]
null
null
null
// // FileMarkerDatabase.swift // Emergency Markers // // Created by Huw Rowlands on 15/8/18. // Copyright © 2018 Huw Rowlands. All rights reserved. // import Foundation import CoreLocation private func loadFromFile() -> Data? { guard let path = Bundle.main.path(forResource: "Marker", ofType: "json"), let string = try? String(contentsOfFile: path), let data = string.data(using: .utf8) else { return nil } return data } struct MarkerFileDatabase: MarkerDatabase { private var markers: [Marker] = [] init?(with data: Data? = loadFromFile()) { guard let data = data else { return nil } let decoder = JSONDecoder() do { markers = try decoder.decode([DecodableMarker].self, from: data).sorted(by: { lhs, rhs in lhs.markerId < rhs.markerId }) } catch let error { print("Could not do it because \(error)") } } var count: Int { return markers.count } func all() -> [Marker] { return markers } func with(keyword: String) -> [Marker] { return markers.filter { marker in searchableKeyPaths.contains { keyPath in marker[keyPath: keyPath].contains(keyword) } } } private var searchableKeyPaths: [KeyPath<Marker, String>] { return [ \Marker.markerId, \Marker.locality, \Marker.environmentName, \Marker.aRoad, \Marker.bRoad, \Marker.markerAddress ] } }
23.985075
101
0.559428
3e9acd35a30bd0635fcc0f37a98830a349777439
3,079
kt
Kotlin
shared/src/main/java/com/elbehiry/shared/di/LocationModule.kt
Elbehiry/DiningFinder
67f78b6fd9ea75195f4aafd418ef8f03c3f8b120
[ "Apache-2.0" ]
null
null
null
shared/src/main/java/com/elbehiry/shared/di/LocationModule.kt
Elbehiry/DiningFinder
67f78b6fd9ea75195f4aafd418ef8f03c3f8b120
[ "Apache-2.0" ]
null
null
null
shared/src/main/java/com/elbehiry/shared/di/LocationModule.kt
Elbehiry/DiningFinder
67f78b6fd9ea75195f4aafd418ef8f03c3f8b120
[ "Apache-2.0" ]
2
2021-07-24T20:56:00.000Z
2022-03-07T20:56:49.000Z
/* * Copyright 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.elbehiry.shared.di import android.content.Context import com.elbehiry.shared.data.location.remote.ILocationRemoteDataSource import com.elbehiry.shared.data.location.remote.LocationRemoteSource import com.elbehiry.shared.data.location.repository.ILocationRepository import com.elbehiry.shared.data.location.repository.LocationRepository import com.google.android.gms.location.FusedLocationProviderClient import com.google.android.gms.location.LocationServices import com.google.android.gms.location.LocationRequest import com.google.android.gms.location.LocationSettingsRequest import com.google.android.gms.location.SettingsClient import com.google.android.gms.tasks.CancellationToken import com.google.android.gms.tasks.CancellationTokenSource import dagger.Binds import dagger.Module import dagger.Provides import dagger.hilt.InstallIn import dagger.hilt.android.qualifiers.ApplicationContext import dagger.hilt.components.SingletonComponent @Module @InstallIn(SingletonComponent::class) class LocationModule { @Provides internal fun providesFusedLocationProviderClient( @ApplicationContext context: Context ): FusedLocationProviderClient { return LocationServices.getFusedLocationProviderClient(context.applicationContext) } @Provides internal fun providesCancellationToken(): CancellationToken { return CancellationTokenSource().token } @Provides internal fun providesLocationRequest(): LocationRequest { return LocationRequest.create().apply { priority = LocationRequest.PRIORITY_HIGH_ACCURACY } } @Provides internal fun providesLocationSettingsRequest( locationRequest: LocationRequest ): LocationSettingsRequest { return LocationSettingsRequest.Builder() .addLocationRequest(locationRequest) .setAlwaysShow(true) .build() } @Provides internal fun providesLocationSettingsClient( @ApplicationContext context: Context ): SettingsClient { return LocationServices.getSettingsClient(context) } } @Module @InstallIn(SingletonComponent::class) abstract class LocationSourceModule { @Binds internal abstract fun bindsLocationSource( locationSource: LocationRemoteSource ): ILocationRemoteDataSource @Binds internal abstract fun bindsLocationRepository( repository: LocationRepository ): ILocationRepository }
33.107527
90
0.772004
1a69af1059bc0bbffaaccd4dcaea3321ab0d1ea4
157
rs
Rust
src/game_data/types/game_data.rs
Shfty/quarchitect
3d491bb52b9789641d8a441c3b416f0572215e4a
[ "MIT" ]
5
2021-04-21T10:43:44.000Z
2021-08-03T13:40:15.000Z
src/game_data/types/game_data.rs
QodotPlugin/quarchitect
3d491bb52b9789641d8a441c3b416f0572215e4a
[ "MIT" ]
1
2021-06-23T18:31:28.000Z
2021-06-23T18:31:28.000Z
src/game_data/types/game_data.rs
QodotPlugin/quarchitect
3d491bb52b9789641d8a441c3b416f0572215e4a
[ "MIT" ]
1
2021-04-22T10:11:49.000Z
2021-04-22T10:11:49.000Z
#[derive(Debug)] pub struct GameData { pub entities: Vec<crate::game_data::Entity>, pub worldspawn_layers: Vec<crate::game_data::WorldspawnLayer>, }
26.166667
66
0.726115
53c89f3d56263451c8685a7925104ff9e5104248
2,680
java
Java
jetty-quic/quic-quiche/quic-quiche-foreign-incubator/src/main/java/org/eclipse/jetty/quic/quiche/foreign/incubator/ForeignIncubatorQuicheBinding.java
joschi/jetty.project
ce0d3c7b8d3943720f7d55b8d36e7035af0dab02
[ "Apache-2.0" ]
null
null
null
jetty-quic/quic-quiche/quic-quiche-foreign-incubator/src/main/java/org/eclipse/jetty/quic/quiche/foreign/incubator/ForeignIncubatorQuicheBinding.java
joschi/jetty.project
ce0d3c7b8d3943720f7d55b8d36e7035af0dab02
[ "Apache-2.0" ]
32
2022-02-15T04:33:42.000Z
2022-03-31T04:39:24.000Z
jetty-quic/quic-quiche/quic-quiche-foreign-incubator/src/main/java/org/eclipse/jetty/quic/quiche/foreign/incubator/ForeignIncubatorQuicheBinding.java
joschi/jetty.project
ce0d3c7b8d3943720f7d55b8d36e7035af0dab02
[ "Apache-2.0" ]
1
2022-03-03T05:49:59.000Z
2022-03-03T05:49:59.000Z
// // ======================================================================== // Copyright (c) 1995-2022 Mort Bay Consulting Pty Ltd and others. // // This program and the accompanying materials are made available under the // terms of the Eclipse Public License v. 2.0 which is available at // https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 // which is available at https://www.apache.org/licenses/LICENSE-2.0. // // SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 // ======================================================================== // package org.eclipse.jetty.quic.quiche.foreign.incubator; import java.io.IOException; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.nio.ByteBuffer; import org.eclipse.jetty.quic.quiche.QuicheBinding; import org.eclipse.jetty.quic.quiche.QuicheConfig; import org.eclipse.jetty.quic.quiche.QuicheConnection; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class ForeignIncubatorQuicheBinding implements QuicheBinding { private static final Logger LOG = LoggerFactory.getLogger(ForeignIncubatorQuicheBinding.class); @Override public boolean isUsable() { try { // Make a Quiche call to confirm. quiche_h.quiche_version(); return true; } catch (Throwable x) { LOG.debug("foreign incubator quiche binding is not usable", x); return false; } } @Override public int priority() { return 100; } @Override public byte[] fromPacket(ByteBuffer packet) { return ForeignIncubatorQuicheConnection.fromPacket(packet); } @Override public QuicheConnection connect(QuicheConfig quicheConfig, InetSocketAddress peer, int connectionIdLength) throws IOException { return ForeignIncubatorQuicheConnection.connect(quicheConfig, peer, connectionIdLength); } @Override public boolean negotiate(QuicheConnection.TokenMinter tokenMinter, ByteBuffer packetRead, ByteBuffer packetToSend) throws IOException { return ForeignIncubatorQuicheConnection.negotiate(tokenMinter, packetRead, packetToSend); } @Override public QuicheConnection tryAccept(QuicheConfig quicheConfig, QuicheConnection.TokenValidator tokenValidator, ByteBuffer packetRead, SocketAddress peer) throws IOException { return ForeignIncubatorQuicheConnection.tryAccept(quicheConfig, tokenValidator, packetRead, peer); } @Override public String toString() { return getClass().getSimpleName() + "{p=" + priority() + " u=" + isUsable() + "}"; } }
32.289157
174
0.673507
df8b7b2c3a4ff09ac53b438a33fe392728410706
729
kt
Kotlin
src/jvmMain/kotlin/com/bkahlert/kommons/text/CodePoints.kt
bkahlert/koodies
35e2ac1c4246decdf7e7a1160bfdd5c9e28fd066
[ "MIT" ]
7
2020-12-20T10:47:06.000Z
2021-08-03T14:21:57.000Z
src/jvmMain/kotlin/com/bkahlert/kommons/text/CodePoints.kt
bkahlert/koodies
35e2ac1c4246decdf7e7a1160bfdd5c9e28fd066
[ "MIT" ]
42
2021-08-25T16:22:09.000Z
2022-03-21T16:22:37.000Z
src/jvmMain/kotlin/com/bkahlert/kommons/text/CodePoints.kt
bkahlert/koodies
35e2ac1c4246decdf7e7a1160bfdd5c9e28fd066
[ "MIT" ]
null
null
null
package com.bkahlert.kommons.text /** * Contains the name of this code point */ public val CodePoint.unicodeName: String get() = Unicode[codePoint.toLong()] /** * The Unicode name, e.g. `LINE SEPARATOR` */ public val CodePoint.formattedName: String get() = "❲$unicodeName❳" /** * Contains the character pointed to and represented by a [CharArray]. */ public val CodePoint.chars: CharArray get() = Character.toChars(codePoint) /** * Contains the number of [Char] values needed to represent this code point. */ public actual val CodePoint.charCount: Int get() = Character.charCount(codePoint) public operator fun String.minus(amount: Int): String = asCodePointSequence().map { it - amount }.joinLinesToString("")
28.038462
81
0.725652
9bdc2389a97d98de9e70e5fa8bcf8517bf517c7a
353
js
JavaScript
src/loops/prender-viewers.js
omarkdev/levxyca-pandadomalbot
a19e8975edfdb03acd258526082923c07eafb12d
[ "MIT" ]
null
null
null
src/loops/prender-viewers.js
omarkdev/levxyca-pandadomalbot
a19e8975edfdb03acd258526082923c07eafb12d
[ "MIT" ]
null
null
null
src/loops/prender-viewers.js
omarkdev/levxyca-pandadomalbot
a19e8975edfdb03acd258526082923c07eafb12d
[ "MIT" ]
null
null
null
const { client } = require('../core/twitch_client'); const { jail } = require('../queues/jail'); module.exports = { interval: 600000, // 10min async execute() { await jail(async (j) => { const username = await j.arrest(); if (username) { await client.say(process.env.CHANNEL, `Prendeu ${username}`); } }); }, };
23.533333
69
0.569405
f8bcbe5a7e01fbc3a9aec6396fb6cc735f5c8955
3,839
swift
Swift
NMBasic/Classes/BasicManagers/BasicSQLiteDBManager.swift
nahlam/NMBasic
f8f492934e4cd195757edc4866bef0c0f49fde8e
[ "MIT" ]
null
null
null
NMBasic/Classes/BasicManagers/BasicSQLiteDBManager.swift
nahlam/NMBasic
f8f492934e4cd195757edc4866bef0c0f49fde8e
[ "MIT" ]
null
null
null
NMBasic/Classes/BasicManagers/BasicSQLiteDBManager.swift
nahlam/NMBasic
f8f492934e4cd195757edc4866bef0c0f49fde8e
[ "MIT" ]
1
2018-10-10T12:05:04.000Z
2018-10-10T12:05:04.000Z
// // BasicSQLiteDBManager.swift // BasicFramework // // Created by Nahla Mortada on 7/5/17. // Copyright © 2017 Nahla Mortada. All rights reserved. // import Foundation import FMDB open class BasicSQLiteDBManager: BasicManager { // MARK: - DB File Methods public class func copyDatabaseIntoDocumentsDirectory(databseFileName: String) { let paths: [String] = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true) let documentsDirectory: String = paths[0] let destinationPath: String = "\(documentsDirectory)/\(databseFileName)" DispatchQueue.global(qos: .background).async { if FileManager.default.fileExists(atPath: destinationPath) == false { let fileNameComponents = databseFileName.components(separatedBy: ".") if let sourcePath = Bundle.main.path(forResource: fileNameComponents[0], ofType: fileNameComponents[1]){ do { (try FileManager.default.copyItem(atPath: sourcePath, toPath: destinationPath)) print("[DB]", "Move From: \(sourcePath)") print("[DB]", "Move To: \(destinationPath)") } catch { print("[DB]", "[BF] : \(error.localizedDescription)") } }else { print("[DB]", "sourcePath nil") } } } } public class func removeFile(databseFileName: String) { let paths: [String] = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true) let documentsDirectory: String = paths[0] let destinationPath: String = "\(documentsDirectory)/\(databseFileName)" DispatchQueue.global(qos: .background).async { if FileManager.default.fileExists(atPath: destinationPath) == false { do { try FileManager.default.removeItem(atPath: destinationPath) }catch { print("[DB]", "Could not clear temp folder: \(error)") } } } } public class func getDBHelber(dbName: String) -> FMDatabase { //TODOO var paths: [String] = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true) let documentsDirectory: String = paths[0] let databasePath: String = URL(fileURLWithPath: documentsDirectory).appendingPathComponent(dbName).absoluteString let helper: FMDatabase = FMDatabase(path: databasePath) if !helper.open() { print("[DB]", "[BF] : CAAAAAN not opned") } return helper } fileprivate class func copyDatabaseIntoDocumentsDirectory(dbName: String) { copyDatabaseIntoDocumentsDirectory(databseFileName: dbName) } public class func selectAll(tableName: String) -> String { return "select * from \(tableName)" } // MARK: - Select Methods public class func getQueryObject(Id: Int, InTable tableName: String, primaryKey: String) -> String { return "select * from \(tableName) where \(primaryKey) = \(Id)" } public class func getQueryObjects(tableName: String) -> String { return "select * from \(tableName)" } // MARK: - Delete Methods public class func deleteQuery(tableName: String, Id itemId: Int, primaryKey: String) -> String { let query: String = "DELETE FROM \(tableName) WHERE \(primaryKey) = \(itemId)" return query } public class func deleteAllQuery(tableName: String) -> String { let query: String = "DELETE FROM \(tableName)" return query } }
36.561905
121
0.593123
75dec5d8ea01ed3df0200e2ca02c2673ca5f5cb2
939
php
PHP
tests/Unit/Responses/LogoutResponseTest.php
vsemak/ewus-php
eacb912a33c2f83a0c1e8b7ba6f2c4c97866802f
[ "MIT" ]
1
2020-10-02T11:26:23.000Z
2020-10-02T11:26:23.000Z
tests/Unit/Responses/LogoutResponseTest.php
vsemak/ewus-php
eacb912a33c2f83a0c1e8b7ba6f2c4c97866802f
[ "MIT" ]
2
2020-10-09T13:17:04.000Z
2020-10-09T13:17:17.000Z
tests/Unit/Responses/LogoutResponseTest.php
etermed/ewus-php
9ac3151f1fe5b4bc782a12b0bd16a70a0f8c912d
[ "MIT" ]
1
2020-10-23T10:28:15.000Z
2020-10-23T10:28:15.000Z
<?php declare(strict_types=1); namespace Tests\Unit\Responses; use NGT\Ewus\Requests\LogoutRequest; use NGT\Ewus\Responses\LogoutResponse; use Tests\TestCase; class LogoutResponseTest extends TestCase { /** * The response instance. * * @var \NGT\Ewus\Responses\LogoutResponse */ private $response; protected function setUp(): void { parent::setUp(); $this->response = new LogoutResponse(new LogoutRequest(), ''); } public function testLogoutMessageSetter(): void { $this->assertSame($this->response->setLogoutMessage('test'), $this->response); } public function testLogoutMessageGetter(): void { $this->response->setLogoutMessage('test'); $this->assertSame('test', $this->response->getLogoutMessage()); $this->response->setLogoutMessage(null); $this->assertSame(null, $this->response->getLogoutMessage()); } }
23.475
86
0.652822
b7896f67979e9832c3b6a13c309dbb8be4fc49cd
356
kt
Kotlin
platform-core/src/androidMain/kotlin/platform/Platform.kt
aSoft-Ltd/platform
1b0e2a0d761ab96f4e4ea00205649681118a7212
[ "MIT" ]
null
null
null
platform-core/src/androidMain/kotlin/platform/Platform.kt
aSoft-Ltd/platform
1b0e2a0d761ab96f4e4ea00205649681118a7212
[ "MIT" ]
null
null
null
platform-core/src/androidMain/kotlin/platform/Platform.kt
aSoft-Ltd/platform
1b0e2a0d761ab96f4e4ea00205649681118a7212
[ "MIT" ]
null
null
null
package platform import android.os.Build actual object Platform : ExecutionEnvironment( name = Name.Android.name, runner = Runner( name = "ART", version = Build.VERSION.RELEASE ), os = OperatingSystem( family = Name.Android.name, version = Build.VERSION.RELEASE ), version = Build.VERSION.RELEASE )
22.25
46
0.643258
8afcec773cd1bc7ce47947e7ceac95f3a045db30
7,662
swift
Swift
CotEditor/Sources/Theme.swift
GetToSet/CotEditor
95ccf52c22ae243f9bc9a5291062ba7cf1d298ce
[ "Apache-2.0" ]
1
2021-12-24T02:55:33.000Z
2021-12-24T02:55:33.000Z
CotEditor/Sources/Theme.swift
GetToSet/CotEditor
95ccf52c22ae243f9bc9a5291062ba7cf1d298ce
[ "Apache-2.0" ]
null
null
null
CotEditor/Sources/Theme.swift
GetToSet/CotEditor
95ccf52c22ae243f9bc9a5291062ba7cf1d298ce
[ "Apache-2.0" ]
null
null
null
// // Theme.swift // // CotEditor // https://coteditor.com // // Created by 1024jp on 2014-04-12. // // --------------------------------------------------------------------------- // // © 2014-2021 1024jp // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // import Foundation import AppKit.NSColor import ColorCode protocol Themable: AnyObject { var theme: Theme? { get } } final class Theme: NSObject { final class Style: NSObject { @objc dynamic var color: NSColor fileprivate static let invalidColor = NSColor.gray.usingColorSpace(.genericRGB)! init(color: NSColor) { self.color = color } } final class SelectionStyle: NSObject { @objc dynamic var color: NSColor @objc dynamic var usesSystemSetting: Bool init(color: NSColor, usesSystemSetting: Bool = false) { self.color = color self.usesSystemSetting = usesSystemSetting } } final class Metadata: NSObject, Codable { @objc dynamic var author: String? @objc dynamic var distributionURL: String? @objc dynamic var license: String? @objc dynamic var comment: String? var isEmpty: Bool { return self.author == nil && self.distributionURL == nil && self.license == nil && self.comment == nil } enum CodingKeys: String, CodingKey { case author case distributionURL case license case comment = "description" // `description` conflicts with NSObject's method. } } // MARK: Public Properties /// name of the theme var name: String? // basic colors @objc dynamic var text: Style @objc dynamic var background: Style @objc dynamic var invisibles: Style @objc dynamic var selection: SelectionStyle @objc dynamic var insertionPoint: Style @objc dynamic var lineHighlight: Style @objc dynamic var keywords: Style @objc dynamic var commands: Style @objc dynamic var types: Style @objc dynamic var attributes: Style @objc dynamic var variables: Style @objc dynamic var values: Style @objc dynamic var numbers: Style @objc dynamic var strings: Style @objc dynamic var characters: Style @objc dynamic var comments: Style var metadata: Metadata? // MARK: - // MARK: Lifecycle init(name: String? = nil) { self.name = name self.text = Style(color: .textColor) self.background = Style(color: .textBackgroundColor) self.invisibles = Style(color: .init(white: 0.7, alpha: 1)) self.selection = SelectionStyle(color: .selectedTextBackgroundColor, usesSystemSetting: true) self.insertionPoint = Style(color: .textColor) self.lineHighlight = Style(color: .init(white: 0.95, alpha: 1)) self.keywords = Style(color: .gray) self.commands = Style(color: .gray) self.types = Style(color: .gray) self.attributes = Style(color: .gray) self.variables = Style(color: .gray) self.values = Style(color: .gray) self.numbers = Style(color: .gray) self.strings = Style(color: .gray) self.characters = Style(color: .gray) self.comments = Style(color: .gray) } static func theme(contentsOf fileURL: URL) throws -> Theme { let data = try Data(contentsOf: fileURL) let decoder = JSONDecoder() let theme = try decoder.decode(Theme.self, from: data) theme.name = fileURL.deletingPathExtension().lastPathComponent return theme } // MARK: Public Methods /// Is background color dark? var isDarkTheme: Bool { guard let textColor = self.text.color.usingColorSpace(.genericRGB), let backgroundColor = self.background.color.usingColorSpace(.genericRGB) else { return false } return backgroundColor.lightnessComponent < textColor.lightnessComponent } /// selection color for inactive text view var secondarySelectionColor: NSColor? { guard !self.selection.usesSystemSetting, let color = self.selection.color.usingColorSpace(.genericRGB) else { return nil } return NSColor(calibratedWhite: color.lightnessComponent, alpha: 1.0) } } // MARK: - Codable extension Theme: Codable { private enum CodingKeys: String, CodingKey { case text case background case invisibles case selection case insertionPoint case lineHighlight case keywords case commands case types case attributes case variables case values case numbers case strings case characters case comments case metadata } } extension Theme.Style: Codable { private enum CodingKeys: String, CodingKey { case color } convenience init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) let colorCode = try container.decode(String.self, forKey: .color) let color = NSColor(colorCode: colorCode) ?? Theme.Style.invalidColor self.init(color: color) } func encode(to encoder: Encoder) throws { guard let color = self.color.usingColorSpace(.genericRGB) else { throw CocoaError(.coderInvalidValue) } var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(color.colorCode(type: .hex), forKey: .color) } } extension Theme.SelectionStyle: Codable { private enum CodingKeys: String, CodingKey { case color case usesSystemSetting } convenience init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) let colorCode = try container.decode(String.self, forKey: .color) let color = NSColor(colorCode: colorCode) ?? Theme.Style.invalidColor let usesSystemSetting = try container.decodeIfPresent(Bool.self, forKey: .usesSystemSetting) ?? false self.init(color: color, usesSystemSetting: usesSystemSetting) } func encode(to encoder: Encoder) throws { guard let color = self.color.usingColorSpace(.genericRGB) else { throw CocoaError(.coderInvalidValue) } var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(color.colorCode(type: .hex), forKey: .color) try container.encode(self.usesSystemSetting, forKey: .usesSystemSetting) } }
26.884211
114
0.597494
f14ffd020b17c8f1a5a89a1bc7cc4ba4f22a988b
38,965
rb
Ruby
lib/orm_asciidoctor.rb
gvaish/orm_asciidoctor
f9b2fc999d4c620007462ee7b4bbe71beaf45de6
[ "MIT" ]
1
2017-01-16T06:06:53.000Z
2017-01-16T06:06:53.000Z
lib/orm_asciidoctor.rb
gvaish/orm_asciidoctor
f9b2fc999d4c620007462ee7b4bbe71beaf45de6
[ "MIT" ]
null
null
null
lib/orm_asciidoctor.rb
gvaish/orm_asciidoctor
f9b2fc999d4c620007462ee7b4bbe71beaf45de6
[ "MIT" ]
null
null
null
RUBY_ENGINE = 'unknown' unless defined? RUBY_ENGINE require 'strscan' require 'set' $:.unshift(File.dirname(__FILE__)) # Public: Methods for parsing Asciidoc input files and rendering documents # using eRuby templates. # # Asciidoc documents comprise a header followed by zero or more sections. # Sections are composed of blocks of content. For example: # # = Doc Title # # == Section 1 # # This is a paragraph block in the first section. # # == Section 2 # # This section has a paragraph block and an olist block. # # . Item 1 # . Item 2 # # Examples: # # Use built-in templates: # # lines = File.readlines("your_file.asc") # doc = Asciidoctor::Document.new(lines) # html = doc.render # File.open("your_file.html", "w+") do |file| # file.puts html # end # # Use custom (Tilt-supported) templates: # # lines = File.readlines("your_file.asc") # doc = Asciidoctor::Document.new(lines, :template_dir => 'templates') # html = doc.render # File.open("your_file.html", "w+") do |file| # file.puts html # end module Asciidoctor module SafeMode # A safe mode level that disables any of the security features enforced # by Asciidoctor (Ruby is still subject to its own restrictions). UNSAFE = 0; # A safe mode level that closely parallels safe mode in AsciiDoc. This value # prevents access to files which reside outside of the parent directory of # the source file and disables any macro other than the include::[] macro. SAFE = 1; # A safe mode level that disallows the document from setting attributes # that would affect the rendering of the document, in addition to all the # security features of SafeMode::SAFE. For instance, this level disallows # changing the backend or the source-highlighter using an attribute defined # in the source document. This is the most fundamental level of security # for server-side deployments (hence the name). SERVER = 10; # A safe mode level that disallows the document from attempting to read # files from the file system and including the contents of them into the # document, in additional to all the security features of SafeMode::SERVER. # For instance, this level disallows use of the include::[] macro and the # embedding of binary content (data uri), stylesheets and JavaScripts # referenced by the document.(Asciidoctor and trusted extensions may still # be allowed to embed trusted content into the document). # # Since Asciidoctor is aiming for wide adoption, this level is the default # and is recommended for server-side deployments. SECURE = 20; # A planned safe mode level that disallows the use of passthrough macros and # prevents the document from setting any known attributes, in addition to all # the security features of SafeMode::SECURE. # # Please note that this level is not currently implemented (and therefore not # enforced)! #PARANOID = 100; end # Flags to control compliance with the behavior of AsciiDoc module Compliance # AsciiDoc supports both single-line and underlined # section titles. # This option disables the underlined variant. # Compliance value: true @underline_style_section_titles = true class << self attr_accessor :underline_style_section_titles end # Asciidoctor will recognize commonly-used Markdown syntax # to the degree it does not interfere with existing # AsciiDoc syntax and behavior. # Compliance value: false @markdown_syntax = true class << self attr_accessor :markdown_syntax end end # The root path of the Asciidoctor gem ROOT_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..')) # Flag to indicate whether encoding of external strings needs to be forced to UTF-8 # _All_ input data must be force encoded to UTF-8 if Encoding.default_external is *not* UTF-8 # Address failures performing string operations that are reported as "invalid byte sequence in US-ASCII" # Ruby 1.8 doesn't seem to experience this problem (perhaps because it isn't validating the encodings) FORCE_ENCODING = RUBY_VERSION > '1.9' && Encoding.default_external != Encoding::UTF_8 # Flag to indicate that line length should be calculated using a unicode mode hint FORCE_UNICODE_LINE_LENGTH = RUBY_VERSION < '1.9' # The endline character to use when rendering output EOL = "\n" # The default document type # Can influence markup generated by render templates DEFAULT_DOCTYPE = 'article' # The backend determines the format of the rendered output, default to htmlbook (for ORM) DEFAULT_BACKEND = 'htmlbook' DEFAULT_STYLESHEET_KEYS = ['', 'DEFAULT'].to_set DEFAULT_STYLESHEET_NAME = 'asciidoctor.css' # Pointers to the preferred version for a given backend. BACKEND_ALIASES = { 'html' => 'html5', 'docbook' => 'docbook45', 'htmlbook' => 'htmlbook' } # Default page widths for calculating absolute widths DEFAULT_PAGE_WIDTHS = { 'docbook' => 425 } # Default extensions for the respective base backends DEFAULT_EXTENSIONS = { 'html' => '.html', 'htmlbook' => '.html', 'docbook' => '.xml', 'asciidoc' => '.ad', 'markdown' => '.md' } # Set of file extensions recognized as AsciiDoc documents (stored as a truth hash) ASCIIDOC_EXTENSIONS = { '.asciidoc' => true, '.adoc' => true, '.ad' => true, '.asc' => true, '.txt' => true } SECTION_LEVELS = { '=' => 0, '-' => 1, '~' => 2, '^' => 3, '+' => 4 } ADMONITION_STYLES = ['NOTE', 'TIP', 'IMPORTANT', 'WARNING', 'CAUTION'].to_set PARAGRAPH_STYLES = ['comment', 'example', 'literal', 'listing', 'normal', 'pass', 'quote', 'sidebar', 'source', 'verse', 'abstract', 'partintro'].to_set VERBATIM_STYLES = ['literal', 'listing', 'source', 'verse'].to_set DELIMITED_BLOCKS = { '--' => [:open, ['comment', 'example', 'literal', 'listing', 'pass', 'quote', 'sidebar', 'source', 'verse', 'admonition', 'abstract', 'partintro'].to_set], '----' => [:listing, ['literal', 'source'].to_set], '....' => [:literal, ['listing', 'source'].to_set], '====' => [:example, ['admonition'].to_set], '****' => [:sidebar, Set.new], '____' => [:quote, ['verse'].to_set], '""' => [:quote, ['verse'].to_set], '++++' => [:pass, Set.new], '|===' => [:table, Set.new], ',===' => [:table, Set.new], ':===' => [:table, Set.new], '!===' => [:table, Set.new], '////' => [:comment, Set.new], '```' => [:fenced_code, Set.new], '~~~' => [:fenced_code, Set.new] } DELIMITED_BLOCK_LEADERS = DELIMITED_BLOCKS.keys.map {|key| key[0..1] }.to_set BREAK_LINES = { '\'' => :ruler, '-' => :ruler, '*' => :ruler, '_' => :ruler, '<' => :page_break } #LIST_CONTEXTS = [:ulist, :olist, :dlist, :colist] NESTABLE_LIST_CONTEXTS = [:ulist, :olist, :dlist] # TODO validate use of explicit style name above ordered list (this list is for selecting an implicit style) ORDERED_LIST_STYLES = [:arabic, :loweralpha, :lowerroman, :upperalpha, :upperroman] #, :lowergreek] ORDERED_LIST_MARKER_PATTERNS = { :arabic => /\d+[.>]/, :loweralpha => /[a-z]\./, :lowerroman => /[ivx]+\)/, :upperalpha => /[A-Z]\./, :upperroman => /[IVX]+\)/ #:lowergreek => /[a-z]\]/ } ORDERED_LIST_KEYWORDS = { 'loweralpha' => 'a', 'lowerroman' => 'i', 'upperalpha' => 'A', 'upperroman' => 'I' #'lowergreek' => 'a' #'arabic' => '1' #'decimal' => '1' } LIST_CONTINUATION = '+' LINE_BREAK = ' +' # attributes which be changed within the content of the document (but not # header) because it has semantic meaning; ex. numbered FLEXIBLE_ATTRIBUTES = %w(numbered) # NOTE allows for empty space in line as it could be left by the template engine BLANK_LINE_PATTERN = /^[[:blank:]]*\n/ LINE_FEED_ENTITY = '&#10;' # or &#x0A; # Flags to control compliance with the behavior of AsciiDoc COMPLIANCE = { # AsciiDoc terminates paragraphs adjacent to # block content (delimiter or block attribute list) # Compliance value: true # TODO what about literal paragraph? :block_terminates_paragraph => true, # AsciiDoc does not treat paragraphs labeled with a # verbatim style (literal, listing, source, verse) # as verbatim; override this behavior # Compliance value: false :strict_verbatim_paragraphs => true, # AsciiDoc allows start and end delimiters around # a block to be different lengths # this option requires that they be the same # Compliance value: false :congruent_block_delimiters => true, # AsciiDoc drops lines that contain references to missing attributes. # This behavior is not intuitive to most writers # Compliance value: 'drop-line' :attribute_missing => 'skip', # AsciiDoc drops lines that contain an attribute unassignemnt. # This behavior may need to be tuned depending on the circumstances. # Compliance value: 'drop-line' :attribute_undefined => 'drop-line', } # The following pattern, which appears frequently, captures the contents between square brackets, # ignoring escaped closing brackets (closing brackets prefixed with a backslash '\' character) # # Pattern: # (?:\[((?:\\\]|[^\]])*?)\]) # Matches: # [enclosed text here] or [enclosed [text\] here] REGEXP = { # NOTE: this is a inline admonition note :admonition_inline => /^(#{ADMONITION_STYLES.to_a * '|'}):\s/, # [[Foo]] :anchor => /^\[\[([^\s\[\]]+)\]\]$/, # Foowhatevs [[Bar]] :anchor_embedded => /^(.*?)\s*\[\[([^\[\]]+)\]\]$/, # [[ref]] (anywhere inline) :anchor_macro => /\\?\[\[([\w":].*?)\]\]/, # matches any unbounded block delimiter: # listing, literal, example, sidebar, quote, passthrough, table, fenced code # does not include open block or air quotes # TIP position the most common blocks towards the front of the pattern :any_blk => %r{^(?:(?:-|\.|=|\*|_|\+|/){4,}|[\|,;!]={3,}|(?:`|~){3,}.*)$}, # detect a list item of any sort # [[:graph:]] is a non-blank character :any_list => /^(?: <?\d+>[[:blank:]]+[[:graph:]]| [[:blank:]]*(?:-|(?:\*|\.){1,5}|\d+\.|[A-Za-z]\.|[IVXivx]+\))[[:blank:]]+[[:graph:]]| [[:blank:]]*.*?(?::{2,4}|;;)(?:[[:blank:]]+[[:graph:]]|$) )/x, # :foo: bar # :Author: Dan # :numbered!: # :long-entry: Attribute value lines ending in ' +' # are joined together as a single value, # collapsing the line breaks and indentation to # a single space. :attr_entry => /^:(!?\w.*?):(?:[[:blank:]]+(.*))?$/, # An attribute list above a block element # # Can be strictly positional: # [quote, Adam Smith, Wealth of Nations] # Or can have name/value pairs # [NOTE, caption="Good to know"] # Can be defined by an attribute # [{lead}] :blk_attr_list => /^\[(|[[:blank:]]*[\w\{,.#"'%].*)\]$/, # block attribute list or block id (bulk query) :attr_line => /^\[(|[[:blank:]]*[\w\{,.#"'%].*|\[[^\[\]]*\])\]$/, # attribute reference # {foo} # {counter:pcount:1} # {set:foo:bar} # {set:name!} :attr_ref => /(\\)?\{((set|counter2?):.+?|\w+(?:[\-]\w+)*)(\\)?\}/, # The author info line the appears immediately following the document title # John Doe <john@anonymous.com> :author_info => /^(\w[\w\-'.]*)(?: +(\w[\w\-'.]*))?(?: +(\w[\w\-'.]*))?(?: +<([^>]+)>)?$/, # [[[Foo]]] (anywhere inline) :biblio_macro => /\\?\[\[\[([\w:][\w:.-]*?)\]\]\]/, # callout reference inside literal text # <1> (optionally prefixed by //, # or ;; line comment chars) # <1> <2> (multiple callouts on one line) # <!--1--> (for XML-based languages) # special characters are already be replaced at this point during render :callout_render => /(?:(?:\/\/|#|;;) ?)?(\\)?&lt;!?(--|)(\d+)\2&gt;(?=(?: ?\\?&lt;!?\2\d+\2&gt;)*$)/, # ...but not while scanning :callout_quick_scan => /\\?<!?(--|)(\d+)\1>(?=(?: ?\\?<!?\1\d+\1>)*$)/, :callout_scan => /(?:(?:\/\/|#|;;) ?)?(\\)?<!?(--|)(\d+)\2>(?=(?: ?\\?<!?\2\d+\2>)*$)/, # <1> Foo :colist => /^<?(\d+)>[[:blank:]]+(.*)/, # //// # comment block # //// :comment_blk => %r{^/{4,}$}, # // (and then whatever) :comment => %r{^//(?:[^/]|$)}, # one,two;three;four :ssv_or_csv_delim => /,|;/, # one two three :space_delim => /([^\\])[[:blank:]]+/, # Ctrl + Alt+T # Ctrl,T :kbd_delim => /(?:\+|,)(?=[[:blank:]]*[^\1])/, # one\ two\ three :escaped_space => /\\([[:blank:]])/, # 29 :digits => /^\d+$/, # foo:: || foo::: || foo:::: || foo;; # Should be followed by a definition, on the same line... # foo:: That which precedes 'bar' (see also, <<bar>>) # ...or on a separate line # foo:: # That which precedes 'bar' (see also, <<bar>>) # The term may be an attribute reference # {term_foo}:: {def_foo} # NOTE negative match for comment line is intentional since that isn't handled when looking for next list item # QUESTION should we check for line comment in regex or when scanning the lines? :dlist => /^(?!\/\/)[[:blank:]]*(.*?)(:{2,4}|;;)(?:[[:blank:]]+(.*))?$/, :dlist_siblings => { # (?:.*?[^:])? - a non-capturing group which grabs longest sequence of characters that doesn't end w/ colon '::' => /^(?!\/\/)[[:blank:]]*((?:.*[^:])?)(::)(?:[[:blank:]]+(.*))?$/, ':::' => /^(?!\/\/)[[:blank:]]*((?:.*[^:])?)(:::)(?:[[:blank:]]+(.*))?$/, '::::' => /^(?!\/\/)[[:blank:]]*((?:.*[^:])?)(::::)(?:[[:blank:]]+(.*))?$/, ';;' => /^(?!\/\/)[[:blank:]]*(.*)(;;)(?:[[:blank:]]+(.*))?$/ }, :illegal_sectid_chars => /&(?:[[:alpha:]]+|#[[:digit:]]+|#x[[:alnum:]]+);|\W+?/, # footnote:[text] # footnoteref:[id,text] # footnoteref:[id] :footnote_macro => /\\?(footnote|footnoteref):\[((?:\\\]|[^\]])*?)\]/, # gist::123456[] :generic_blk_macro => /^(\w[\w\-]*)::(\S+?)\[((?:\\\]|[^\]])*?)\]$/, # kbd:[F3] # kbd:[Ctrl+Shift+T] # kbd:[Ctrl+\]] # kbd:[Ctrl,T] # btn:[Save] :kbd_btn_macro => /\\?(?:kbd|btn):\[((?:\\\]|[^\]])+?)\]/, # menu:File[New...] # menu:View[Page Style > No Style] # menu:View[Page Style, No Style] :menu_macro => /\\?menu:(\w|\w.*?\S)\[[[:blank:]]*(.+?)?\]/, # "File > New..." :menu_inline_macro => /\\?"(\w[^"]*?[[:blank:]]*&gt;[[:blank:]]*[^"[:blank:]][^"]*)"/, # image::filename.png[Caption] # video::http://youtube.com/12345[Cats vs Dogs] :media_blk_macro => /^(image|video|audio)::(\S+?)\[((?:\\\]|[^\]])*?)\]$/, # image:filename.png[Alt Text] # image:http://example.com/images/filename.png[Alt Text] # image:filename.png[More [Alt\] Text] (alt text becomes "More [Alt] Text") # icon:github[large] :image_macro => /\\?(?:image|icon):([^:\[][^\[]*)\[((?:\\\]|[^\]])*?)\]/, # indexterm:[Tigers,Big cats] # (((Tigers,Big cats))) :indexterm_macro => /\\?(?:indexterm:(?:\[((?:\\\]|[^\]])*?)\])|\(\(\((.*?)\)\)\)(?!\)))/m, # indexterm2:[Tigers] # ((Tigers)) :indexterm2_macro => /\\?(?:indexterm2:(?:\[((?:\\\]|[^\]])*?)\])|\(\((.*?)\)\)(?!\)))/m, # whitespace at the beginning of the line :leading_blanks => /^([[:blank:]]*)/, # leading parent directory references in path :leading_parent_dirs => /^(?:\.\.\/)*/, # + From the Asciidoc User Guide: "A plus character preceded by at # least one space character at the end of a non-blank line forces # a line break. It generates a line break (br) tag for HTML outputs. # # + (would not match because there's no space before +) # + (would match and capture '') # Foo + (would and capture 'Foo') :line_break => /^(.*)[[:blank:]]\+$/, # inline link and some inline link macro # FIXME revisit! :link_inline => %r{(^|link:|\s|>|&lt;|[\(\)\[\]])(\\?(?:https?|ftp|irc)://[^\s\[\]<]*[^\s.,\[\]<])(?:\[((?:\\\]|[^\]])*?)\])?}, # inline link macro # link:path[label] :link_macro => /\\?(?:link|mailto):([^\s\[]+)(?:\[((?:\\\]|[^\]])*?)\])/, # inline email address # doc.writer@asciidoc.org :email_inline => /[\\>:]?\w[\w.%+-]*@[[:alnum:]][[:alnum:].-]*\.[[:alpha:]]{2,4}\b/, # <TAB>Foo or one-or-more-spaces-or-tabs then whatever :lit_par => /^([[:blank:]]+.*)$/, # . Foo (up to 5 consecutive dots) # 1. Foo (arabic, default) # a. Foo (loweralpha) # A. Foo (upperalpha) # i. Foo (lowerroman) # I. Foo (upperroman) # REVIEW leading space has already been stripped, so may not need in regex :olist => /^[[:blank:]]*(\.{1,5}|\d+\.|[A-Za-z]\.|[IVXivx]+\))[[:blank:]]+(.*)$/, # ''' (ruler) # <<< (pagebreak) :break_line => /^('|<){3,}$/, # ''' or ' ' ' (ruler) # --- or - - - (ruler) # *** or * * * (ruler) # <<< (pagebreak) :break_line_plus => /^(?:'|<){3,}$|^ {0,3}([-\*_])( *)\1\2\1$/, # inline passthrough macros # +++text+++ # $$text$$ # pass:quotes[text] :pass_macro => /\\?(?:(\+{3}|\${2})(.*?)\1|pass:([a-z,]*)\[((?:\\\]|[^\]])*?)\])/m, # passthrough macro allowed in value of attribute assignment # pass:[text] :pass_macro_basic => /^pass:([a-z,]*)\[(.*)\]$/, # inline literal passthrough macro # `text` :pass_lit => /(^|[^`\w])(?:\[([^\]]+?)\])?(\\?`([^`\s]|[^`\s].*?\S)`)(?![`\w])/m, # placeholder for extracted passthrough text :pass_placeholder => /\e(\d+)\e/, # The document revision info line the appears immediately following the # document title author info line, if present # v1.0, 2013-01-01: Ring in the new year release :revision_info => /^(?:\D*(.*?),)?(?:\s*(?!:)(.*?))(?:\s*(?!^):\s*(.*))?$/, # \' within a word :single_quote_esc => /(\w)\\'(\w)/, # an alternative if our backend generated single-quoted html/xml attributes #:single_quote_esc => /(\w|=)\\'(\w)/, # used for sanitizing attribute names :illegal_attr_name_chars => /[^\w\-]/, # 1*h,2*,^3e :table_colspec => /^(?:(\d+)\*)?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?(\d+%?)?([a-z])?$/, # 2.3+<.>m # TODO might want to use step-wise scan rather than this mega-regexp :table_cellspec => { :start => /^[[:blank:]]*(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?\|/, :end => /[[:blank:]]+(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/ }, # docbook45 # html5 :trailing_digit => /[[:digit:]]+$/, # .Foo but not . Foo or ..Foo :blk_title => /^\.([^\s.].*)$/, # matches double quoted text, capturing quote char and text (single-line) :dbl_quoted => /^("|)(.*)\1$/, # matches double quoted text, capturing quote char and text (multi-line) :m_dbl_quoted => /^("|)(.*)\1$/m, # == Foo # ^ yields a level 2 title # # == Foo == # ^ also yields a level 2 title # # both equivalent to this two-line version: # Foo # ~~~ # # match[1] is the delimiter, whose length determines the level # match[2] is the title itself # match[3] is an inline anchor, which becomes the section id :section_title => /^((?:=|#){1,6})\s+(\S.*?)(?:\s*\[\[([^\[]+)\]\])?(?:\s+\1)?$/, # does not begin with a dot and has at least one alphanumeric character :section_name => /^((?=.*\w+.*)[^.].*?)$/, # ====== || ------ || ~~~~~~ || ^^^^^^ || ++++++ # TODO build from SECTION_LEVELS keys :section_underline => /^(?:=|-|~|\^|\+)+$/, # toc::[] # toc::[levels=2] :toc => /^toc::\[(.*?)\]$/, # * Foo (up to 5 consecutive asterisks) # - Foo # REVIEW leading space has already been stripped, so may not need in regex :ulist => /^[[:blank:]]*(-|\*{1,5})[[:blank:]]+(.*)$/, # inline xref macro # <<id,reftext>> (special characters have already been escaped, hence the entity references) # xref:id[reftext] :xref_macro => /\\?(?:&lt;&lt;([\w":].*?)&gt;&gt;|xref:([\w":].*?)\[(.*?)\])/m, # ifdef::basebackend-html[] # ifndef::theme[] # ifeval::["{asciidoctor-version}" >= "0.1.0"] # ifdef::asciidoctor[Asciidoctor!] # endif::theme[] # endif::basebackend-html[] # endif::[] :ifdef_macro => /^[\\]?(ifdef|ifndef|ifeval|endif)::(\S*?(?:([,\+])\S+?)?)\[(.+)?\]$/, # "{asciidoctor-version}" >= "0.1.0" :eval_expr => /^(\S.*?)[[:blank:]]*(==|!=|<=|>=|<|>)[[:blank:]]*(\S.*)$/, # ...or if we want to be more strict up front about what's on each side #:eval_expr => /^(true|false|("|'|)\{\w+(?:\-\w+)*\}\2|("|')[^\3]*\3|\-?\d+(?:\.\d+)*)[[:blank:]]*(==|!=|<=|>=|<|>)[[:blank:]]*(true|false|("|'|)\{\w+(?:\-\w+)*\}\6|("|')[^\7]*\7|\-?\d+(?:\.\d+)*)$/, # include::chapter1.ad[] # include::example.txt[lines=1;2;5..10] :include_macro => /^\\?include::([^\[]+)\[(.*?)\]$/, # http://domain # https://domain # data:info :uri_sniff => %r{\A[[:alpha:]][[:alnum:].+-]*:/*}, :uri_encode_chars => /[^\w\-.!~*';:@=+$,()\[\]]/, :mantitle_manvolnum => /^(.*)\((.*)\)$/, :manname_manpurpose => /^(.*?)[[:blank:]]+-[[:blank:]]+(.*)$/ } INTRINSICS = Hash.new{|h,k| STDERR.puts "Missing intrinsic: #{k.inspect}"; "{#{k}}"}.merge( { 'startsb' => '[', 'endsb' => ']', 'brvbar' => '|', 'caret' => '^', 'asterisk' => '*', 'tilde' => '~', 'plus' => '&#43;', 'apostrophe' => '\'', 'backslash' => '\\', 'backtick' => '`', 'empty' => '', 'sp' => ' ', 'space' => ' ', 'two-colons' => '::', 'two-semicolons' => ';;', 'nbsp' => '&#160;', 'deg' => '&#176;', 'zwsp' => '&#8203;', 'quot' => '&#34;', 'apos' => '&#39;', 'lsquo' => '&#8216;', 'rsquo' => '&#8217;', 'ldquo' => '&#8220;', 'rdquo' => '&#8221;', 'wj' => '&#8288;', 'amp' => '&', 'lt' => '<', 'gt' => '>' } ) SPECIAL_CHARS = { '<' => '&lt;', '>' => '&gt;', '&' => '&amp;' } SPECIAL_CHARS_PATTERN = /[#{SPECIAL_CHARS.keys.join}]/ #SPECIAL_CHARS_PATTERN = /(?:<|>|&(?![[:alpha:]]{2,};|#[[:digit:]]{2,}+;|#x[[:alnum:]]{2,}+;))/ # unconstrained quotes:: can appear anywhere # constrained quotes:: must be bordered by non-word characters # NOTE these substituions are processed in the order they appear here and # the order in which they are replaced is important QUOTE_SUBS = [ # **strong** [:strong, :unconstrained, /\\?(?:\[([^\]]+?)\])?\*\*(.+?)\*\*/m], # *strong* [:strong, :constrained, /(^|[^\w;:}])(?:\[([^\]]+?)\])?\*(\S|\S.*?\S)\*(?=\W|$)/m], # ``double-quoted'' [:double, :constrained, /(^|[^\w;:}])(?:\[([^\]]+?)\])?``(\S|\S.*?\S)''(?=\W|$)/m], # 'emphasis' [:emphasis, :constrained, /(^|[^\w;:}])(?:\[([^\]]+?)\])?'(\S|\S.*?\S)'(?=\W|$)/m], # `single-quoted' [:single, :constrained, /(^|[^\w;:}])(?:\[([^\]]+?)\])?`(\S|\S.*?\S)'(?=\W|$)/m], # ++monospaced++ [:monospaced, :unconstrained, /\\?(?:\[([^\]]+?)\])?\+\+(.+?)\+\+/m], # +monospaced+ [:monospaced, :constrained, /(^|[^\w;:}])(?:\[([^\]]+?)\])?\+(\S|\S.*?\S)\+(?=\W|$)/m], # __emphasis__ [:emphasis, :unconstrained, /\\?(?:\[([^\]]+?)\])?\_\_(.+?)\_\_/m], # _emphasis_ [:emphasis, :constrained, /(^|[^\w;:}])(?:\[([^\]]+?)\])?_(\S|\S.*?\S)_(?=\W|$)/m], # ##unquoted## [:none, :unconstrained, /\\?(?:\[([^\]]+?)\])?##(.+?)##/m], # #unquoted# [:none, :constrained, /(^|[^\w;:}])(?:\[([^\]]+?)\])?#(\S|\S.*?\S)#(?=\W|$)/m], # ^superscript^ [:superscript, :unconstrained, /\\?(?:\[([^\]]+?)\])?\^(.+?)\^/m], # ~subscript~ [:subscript, :unconstrained, /\\?(?:\[([^\]]+?)\])?\~(.+?)\~/m] ] # NOTE in Ruby 1.8.7, [^\\] does not match start of line, # so we need to match it explicitly # order is significant REPLACEMENTS = [ # (C) [/\\?\(C\)/, '&#169;', :none], # (R) [/\\?\(R\)/, '&#174;', :none], # (TM) [/\\?\(TM\)/, '&#8482;', :none], # foo -- bar [/(^|\n| |\\)--( |\n|$)/, '&#8201;&#8212;&#8201;', :none], # foo--bar [/(\w)\\?--(?=\w)/, '&#8212;', :leading], # ellipsis [/\\?\.\.\./, '&#8230;', :leading], # single quotes [/(\w)\\?'(\w)/, '&#8217;', :bounding], # right arrow -> [/\\?-&gt;/, '&#8594;', :none], # right double arrow => [/\\?=&gt;/, '&#8658;', :none], # left arrow <- [/\\?&lt;-/, '&#8592;', :none], # right left arrow <= [/\\?&lt;=/, '&#8656;', :none], # restore entities [/\\?(&)amp;((?:[[:alpha:]]+|#[[:digit:]]+|#x[[:alnum:]]+);)/, '', :bounding] ] # Public: Parse the AsciiDoc source input into an Asciidoctor::Document # # Accepts input as an IO (or StringIO), String or String Array object. If the # input is a File, information about the file is stored in attributes on the # Document object. # # input - the AsciiDoc source as a IO, String or Array. # options - a String, Array or Hash of options to control processing (default: {}) # String and Array values are converted into a Hash. # See Asciidoctor::Document#initialize for details about options. # # returns the Asciidoctor::Document def self.load(input, options = {}) if (monitor = options.fetch(:monitor, false)) start = Time.now end attrs = (options[:attributes] ||= {}) if attrs.is_a?(Hash) || (RUBY_ENGINE == 'jruby' && attrs.is_a?(Java::JavaUtil::Map)) # all good; placed here as optimization elsif attrs.is_a? Array attrs = options[:attributes] = attrs.inject({}) do |accum, entry| k, v = entry.split '=', 2 accum[k] = v || '' accum end elsif attrs.is_a? String # convert non-escaped spaces into null character, so we split on the # correct spaces chars, and restore escaped spaces attrs = attrs.gsub(REGEXP[:space_delim], "\\1\0").gsub(REGEXP[:escaped_space], '\1') attrs = options[:attributes] = attrs.split("\0").inject({}) do |accum, entry| k, v = entry.split '=', 2 accum[k] = v || '' accum end elsif attrs.respond_to?('keys') && attrs.respond_to?('[]') # convert it to a Hash as we know it original_attrs = attrs attrs = options[:attributes] = {} original_attrs.keys.each do |key| attrs[key] = original_attrs[key] end else raise ArgumentError, "illegal type for attributes option: #{attrs.class.ancestors}" end lines = nil if input.is_a? File lines = input.readlines input_mtime = input.mtime input_path = File.expand_path(input.path) # hold off on setting infile and indir until we get a better sense of their purpose attrs['docfile'] = input_path attrs['docdir'] = File.dirname(input_path) attrs['docname'] = File.basename(input_path, File.extname(input_path)) attrs['docdate'] = docdate = input_mtime.strftime('%Y-%m-%d') attrs['doctime'] = doctime = input_mtime.strftime('%H:%M:%S %Z') attrs['docdatetime'] = %(#{docdate} #{doctime}) elsif input.respond_to?(:readlines) input.rewind rescue nil lines = input.readlines elsif input.is_a?(String) lines = input.lines.entries elsif input.is_a?(Array) lines = input.dup else raise "Unsupported input type: #{input.class}" end if monitor read_time = Time.now - start start = Time.now end doc = Document.new(lines, options) if monitor parse_time = Time.now - start monitor[:read] = read_time monitor[:parse] = parse_time monitor[:load] = read_time + parse_time end doc end # Public: Parse the contents of the AsciiDoc source file into an Asciidoctor::Document # # Accepts input as an IO, String or String Array object. If the # input is a File, information about the file is stored in # attributes on the Document. # # input - the String AsciiDoc source filename # options - a String, Array or Hash of options to control processing (default: {}) # String and Array values are converted into a Hash. # See Asciidoctor::Document#initialize for details about options. # # returns the Asciidoctor::Document def self.load_file(filename, options = {}) Asciidoctor.load(File.new(filename), options) end # Public: Parse the AsciiDoc source input into an Asciidoctor::Document and render it # to the specified backend format # # Accepts input as an IO, String or String Array object. If the # input is a File, information about the file is stored in # attributes on the Document. # # If the :in_place option is true, and the input is a File, the output is # written to a file adjacent to the input file, having an extension that # corresponds to the backend format. Otherwise, if the :to_file option is # specified, the file is written to that file. If :to_file is not an absolute # path, it is resolved relative to :to_dir, if given, otherwise the # Document#base_dir. If the target directory does not exist, it will not be # created unless the :mkdirs option is set to true. If the file cannot be # written because the target directory does not exist, or because it falls # outside of the Document#base_dir in safe mode, an IOError is raised. # # If the output is going to be written to a file, the header and footer are # rendered unless specified otherwise (writing to a file implies creating a # standalone document). Otherwise, the header and footer are not rendered by # default and the rendered output is returned. # # input - the String AsciiDoc source filename # options - a String, Array or Hash of options to control processing (default: {}) # String and Array values are converted into a Hash. # See Asciidoctor::Document#initialize for details about options. # # returns the Document object if the rendered result String is written to a # file, otherwise the rendered result String def self.render(input, options = {}) in_place = options.delete(:in_place) || false to_file = options.delete(:to_file) to_dir = options.delete(:to_dir) mkdirs = options.delete(:mkdirs) || false monitor = options.fetch(:monitor, false) write_in_place = in_place && input.is_a?(File) write_to_target = to_file || to_dir stream_output = !to_file.nil? && to_file.respond_to?(:write) if write_in_place && write_to_target raise ArgumentError, 'the option :in_place cannot be used with either the :to_dir or :to_file option' end if !options.has_key?(:header_footer) && (write_in_place || write_to_target) options[:header_footer] = true end doc = Asciidoctor.load(input, options) if to_file == '/dev/null' return doc elsif write_in_place to_file = File.join(File.dirname(input.path), "#{doc.attributes['docname']}#{doc.attributes['outfilesuffix']}") elsif !stream_output && write_to_target working_dir = options.has_key?(:base_dir) ? File.expand_path(options[:base_dir]) : File.expand_path(Dir.pwd) # QUESTION should the jail be the working_dir or doc.base_dir??? jail = doc.safe >= SafeMode::SAFE ? working_dir : nil if to_dir to_dir = doc.normalize_system_path(to_dir, working_dir, jail, :target_name => 'to_dir', :recover => false) if to_file to_file = doc.normalize_system_path(to_file, to_dir, nil, :target_name => 'to_dir', :recover => false) # reestablish to_dir as the final target directory (in the case to_file had directory segments) to_dir = File.dirname(to_file) else to_file = File.join(to_dir, "#{doc.attributes['docname']}#{doc.attributes['outfilesuffix']}") end elsif to_file to_file = doc.normalize_system_path(to_file, working_dir, jail, :target_name => 'to_dir', :recover => false) # establish to_dir as the final target directory (in the case to_file had directory segments) to_dir = File.dirname(to_file) end if !File.directory? to_dir if mkdirs Helpers.require_library 'fileutils' FileUtils.mkdir_p to_dir else raise IOError, "target directory does not exist: #{to_dir}" end end end start = Time.now if monitor output = doc.render if monitor render_time = Time.now - start monitor[:render] = render_time monitor[:load_render] = monitor[:load] + render_time end if to_file start = Time.now if monitor if stream_output to_file.write output.rstrip # ensure there's a trailing endline to_file.write EOL else File.open(to_file, 'w') {|file| file.write output } # these assignments primarily for testing, diagnostics or reporting doc.attributes['outfile'] = outfile = File.expand_path(to_file) doc.attributes['outdir'] = File.dirname(outfile) end if monitor write_time = Time.now - start monitor[:write] = write_time monitor[:total] = monitor[:load_render] + write_time end # NOTE document cannot control this behavior if safe >= SafeMode::SERVER if !stream_output && doc.safe < SafeMode::SECURE && (doc.attr? 'basebackend-html') && (doc.attr? 'linkcss') && (doc.attr? 'copycss') copy_asciidoctor_stylesheet = DEFAULT_STYLESHEET_KEYS.include?(stylesheet = (doc.attr 'stylesheet')) #copy_user_stylesheet = !copy_asciidoctor_stylesheet && (doc.attr? 'copycss') copy_coderay_stylesheet = (doc.attr? 'source-highlighter', 'coderay') && (doc.attr 'coderay-css', 'class') == 'class' copy_pygments_stylesheet = (doc.attr? 'source-highlighter', 'pygments') && (doc.attr 'pygments-css', 'class') == 'class' if copy_asciidoctor_stylesheet || copy_coderay_stylesheet || copy_pygments_stylesheet Helpers.require_library 'fileutils' outdir = doc.attr('outdir') stylesdir = doc.normalize_system_path(doc.attr('stylesdir'), outdir, doc.safe >= SafeMode::SAFE ? outdir : nil) Helpers.mkdir_p stylesdir if mkdirs if copy_asciidoctor_stylesheet File.open(File.join(stylesdir, DEFAULT_STYLESHEET_NAME), 'w') {|f| f.write Asciidoctor::HTML5.default_asciidoctor_stylesheet } end #if copy_user_stylesheet #end if copy_coderay_stylesheet File.open(File.join(stylesdir, 'asciidoctor-coderay.css'), 'w') {|f| f.write Asciidoctor::HTML5.default_coderay_stylesheet } end if copy_pygments_stylesheet File.open(File.join(stylesdir, 'asciidoctor-pygments.css'), 'w') {|f| f.write Asciidoctor::HTML5.pygments_stylesheet(doc.attr 'pygments-style') } end end end if !stream_output && doc.safe < SafeMode::SECURE && (doc.attr? 'basebackend-htmlbook') && (doc.attr? 'linkcss') && (doc.attr? 'copycss') copy_asciidoctor_stylesheet = DEFAULT_STYLESHEET_KEYS.include?(stylesheet = (doc.attr 'stylesheet')) #copy_user_stylesheet = !copy_asciidoctor_stylesheet && (doc.attr? 'copycss') copy_coderay_stylesheet = (doc.attr? 'source-highlighter', 'coderay') && (doc.attr 'coderay-css', 'class') == 'class' copy_pygments_stylesheet = (doc.attr? 'source-highlighter', 'pygments') && (doc.attr 'pygments-css', 'class') == 'class' if copy_asciidoctor_stylesheet || copy_coderay_stylesheet || copy_pygments_stylesheet Helpers.require_library 'fileutils' outdir = doc.attr('outdir') stylesdir = doc.normalize_system_path(doc.attr('stylesdir'), outdir, doc.safe >= SafeMode::SAFE ? outdir : nil) Helpers.mkdir_p stylesdir if mkdirs if copy_asciidoctor_stylesheet File.open(File.join(stylesdir, DEFAULT_STYLESHEET_NAME), 'w') {|f| f.write Asciidoctor::HTMLBook.default_asciidoctor_stylesheet } end #if copy_user_stylesheet #end if copy_coderay_stylesheet File.open(File.join(stylesdir, 'asciidoctor-coderay.css'), 'w') {|f| f.write Asciidoctor::HTMLBook.default_coderay_stylesheet } end if copy_pygments_stylesheet File.open(File.join(stylesdir, 'asciidoctor-pygments.css'), 'w') {|f| f.write Asciidoctor::HTMLBook.pygments_stylesheet(doc.attr 'pygments-style') } end end end doc else output end end # Public: Parse the contents of the AsciiDoc source file into an Asciidoctor::Document # and render it to the specified backend format # # input - the String AsciiDoc source filename # options - a String, Array or Hash of options to control processing (default: {}) # String and Array values are converted into a Hash. # See Asciidoctor::Document#initialize for details about options. # # returns the Document object if the rendered result String is written to a # file, otherwise the rendered result String def self.render_file(filename, options = {}) Asciidoctor.render(File.new(filename), options) end # modules require 'orm_asciidoctor/debug' require 'orm_asciidoctor/substituters' require 'orm_asciidoctor/helpers' # abstract classes require 'orm_asciidoctor/abstract_node' require 'orm_asciidoctor/abstract_block' # concrete classes require 'orm_asciidoctor/attribute_list' require 'orm_asciidoctor/backends/base_template' require 'orm_asciidoctor/block' require 'orm_asciidoctor/callouts' require 'orm_asciidoctor/document' require 'orm_asciidoctor/inline' require 'orm_asciidoctor/lexer' require 'orm_asciidoctor/list' require 'orm_asciidoctor/path_resolver' require 'orm_asciidoctor/reader' require 'orm_asciidoctor/renderer' require 'orm_asciidoctor/section' require 'orm_asciidoctor/table' # info require 'orm_asciidoctor/version' end
36.759434
210
0.564943
cb804fc625cc6d1a8cbd566ee93fadc9ff267c81
2,875
html
HTML
doc/goog.i18n.GraphemeBreak.property.html
buntarb/zz.ide
3412613512fdf37f3657d6028662be3103e13f27
[ "Apache-2.0" ]
null
null
null
doc/goog.i18n.GraphemeBreak.property.html
buntarb/zz.ide
3412613512fdf37f3657d6028662be3103e13f27
[ "Apache-2.0" ]
null
null
null
doc/goog.i18n.GraphemeBreak.property.html
buntarb/zz.ide
3412613512fdf37f3657d6028662be3103e13f27
[ "Apache-2.0" ]
null
null
null
<!DOCTYPE html><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"><meta http-equiv="Content-Language" content="en"><meta http-equiv="X-UA-Compatible" content="IE=edge"><link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"><title>goog.i18n.GraphemeBreak.property</title><link href="dossier.css" rel="stylesheet" type="text/css"><header><button class="dossier-menu"><i class="material-icons">menu</i></button><form><input type="search" placeholder="Search" tabindex="1"><i class="material-icons">search</i></form></header><div class="content"><main><article><section class="intro"><div class="parentlink"><b>Namespace:</b> <a href="goog.i18n.GraphemeBreak.html">goog.i18n.GraphemeBreak</a></div><div class="codelink"><a href="source/node_modules/imazzine-developer-kit/node_modules/google-closure-library/closure/goog/i18n/graphemebreak.js.src.html#l36">View Source</a></div><h1 class="title"><div class="tags"><span class="protected"></span></div><div>enum goog.i18n.GraphemeBreak.property</div></h1><dl><dt class="spec">Type<dd><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></dl><p>Enum for all Grapheme Cluster Break properties. These enums directly corresponds to Grapheme_Cluster_Break property values mentioned in http://unicode.org/reports/tr29 table 2. VIRAMA and INDIC_CONSONANT are for the Virama × Base tailoring mentioned in the notes.</p> <p>CR and LF are moved to the bottom of the list because they occur only once and so good candidates to take 2 decimal digit values.</p> </section><section class="enum-values"><h2>Members</h2><section class="property"><div id="ANY"><dl><dt>ANY</dl></div><div id="CONTROL"><dl><dt>CONTROL</dl></div><div id="CR"><dl><dt>CR</dl></div><div id="EXTEND"><dl><dt>EXTEND</dl></div><div id="INDIC_CONSONANT"><dl><dt>INDIC_CONSONANT</dl></div><div id="L"><dl><dt>L</dl></div><div id="LF"><dl><dt>LF</dl></div><div id="LV"><dl><dt>LV</dl></div><div id="LVT"><dl><dt>LVT</dl></div><div id="PREPEND"><dl><dt>PREPEND</dl></div><div id="REGIONAL_INDICATOR"><dl><dt>REGIONAL_INDICATOR</dl></div><div id="SPACING_MARK"><dl><dt>SPACING_MARK</dl></div><div id="T"><dl><dt>T</dl></div><div id="V"><dl><dt>V</dl></div><div id="VIRAMA"><dl><dt>VIRAMA</dl></div></section></section></article></main><footer><div><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></div></footer></div><nav class="dossier-nav"><section><a class="title" href="index.html" tabindex="2">Overview</a></section><section class="types"><div class="toggle"><div class="title"><span class="item" tabindex="2">Types</span><i class="material-icons">expand_more</i></div></div></section></nav><script src="types.js"></script><script src="dossier.js"></script>
410.714286
1,327
0.719304
16c71682f154cb16c6aea28122b678fc14940da9
310
swift
Swift
exercises/practice/hello-world/Tests/HelloWorldTests/HelloWorldTests.swift
sanderploegsma/swift
fb6a55c2c07ef4d74b1ef2bf6cb93165df8dca49
[ "MIT" ]
60
2017-06-26T16:08:48.000Z
2022-02-26T15:16:04.000Z
exercises/practice/hello-world/Tests/HelloWorldTests/HelloWorldTests.swift
sanderploegsma/swift
fb6a55c2c07ef4d74b1ef2bf6cb93165df8dca49
[ "MIT" ]
171
2017-06-18T19:14:55.000Z
2022-03-23T08:00:47.000Z
exercises/practice/hello-world/Tests/HelloWorldTests/HelloWorldTests.swift
sanderploegsma/swift
fb6a55c2c07ef4d74b1ef2bf6cb93165df8dca49
[ "MIT" ]
92
2017-06-30T12:52:39.000Z
2022-03-26T04:28:38.000Z
import XCTest @testable import HelloWorld class HelloWorldTests: XCTestCase { func testHello() { XCTAssertEqual(hello(), "Hello, World!") } static var allTests: [(String, (HelloWorldTests) -> () throws -> Void)] { return [ ("testHello", testHello), ] } }
19.375
77
0.580645
60c7ca41d7e76cfd557e8e1672fc983d162bf04c
534
sql
SQL
Develop/db/seeds.sql
RekhaLeelara/SQL_Challenger
4aa10df117aaa8be5fdf94b6dfa3d11bc7dcc607
[ "FTL" ]
null
null
null
Develop/db/seeds.sql
RekhaLeelara/SQL_Challenger
4aa10df117aaa8be5fdf94b6dfa3d11bc7dcc607
[ "FTL" ]
null
null
null
Develop/db/seeds.sql
RekhaLeelara/SQL_Challenger
4aa10df117aaa8be5fdf94b6dfa3d11bc7dcc607
[ "FTL" ]
null
null
null
INSERT INTO department (names) VALUES ('IT'), ('Security'), ('Housecleaning'), ('Cafeteria'), ('Business'), ('Sales'); INSERT INTO roles (title, salary) VALUES ('Manager', '90000'), ('Cleaning', '60000'), ('SalesRep', '80000'), ('SecurityGuard', '70000'); INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ('Ravi', 'Mahinder', '1', null), ('Mahi', 'Kali', '2', null); INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ('Fathima', 'Navaz', '1', '1');
20.538462
69
0.614232
41568861c3bf7ef2c27f9cb48d580ec01f4f14bf
614
h
C
PrivateFrameworks/OfficeImport.framework/OCFont.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
36
2016-04-20T04:19:04.000Z
2018-10-08T04:12:25.000Z
PrivateFrameworks/OfficeImport.framework/OCFont.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
null
null
null
PrivateFrameworks/OfficeImport.framework/OCFont.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
10
2016-06-16T02:40:44.000Z
2019-01-15T03:31:45.000Z
/* Generated by RuntimeBrowser Image: /System/Library/PrivateFrameworks/OfficeImport.framework/OfficeImport */ @interface OCFont : NSObject { bool _bold; bool _italic; OCFontSubfamily * _subfamily; } @property (nonatomic) bool bold; @property (nonatomic) bool italic; @property (nonatomic, readonly) OCFontSubfamily *subfamily; + (id)fontWithSubfamily:(id)arg1 bold:(bool)arg2 italic:(bool)arg3; - (bool)bold; - (void)dealloc; - (id)initWithSubfamily:(id)arg1 bold:(bool)arg2 italic:(bool)arg3; - (bool)italic; - (void)setBold:(bool)arg1; - (void)setItalic:(bool)arg1; - (id)subfamily; @end
23.615385
79
0.728013
74742b93c7de7495d4034dca7ff60b85193798b3
1,294
h
C
python/pyUITextBitmap.h
indigames/igeScene
caf6e5c7575ac9fb4d7e887764707d4faa5d168e
[ "MIT" ]
null
null
null
python/pyUITextBitmap.h
indigames/igeScene
caf6e5c7575ac9fb4d7e887764707d4faa5d168e
[ "MIT" ]
null
null
null
python/pyUITextBitmap.h
indigames/igeScene
caf6e5c7575ac9fb4d7e887764707d4faa5d168e
[ "MIT" ]
null
null
null
#pragma once #include <Python.h> #include "components/Component.h" #include "components/gui/UITextBitmap.h" #include "python/pySpriteComponent.h" #include "python/pyUIText.h" namespace ige::scene { struct PyObject_UITextBitmap { PyObject_UIText super; UITextBitmap* component; }; // Type declaration extern PyTypeObject PyTypeObject_UITextBitmap; // Dealloc void UITextBitmap_dealloc(PyObject_UITextBitmap *self); // String represent PyObject* UITextBitmap_str(PyObject_UITextBitmap *self); // Get font path PyObject* UITextBitmap_getFontPath(PyObject_UITextBitmap* self); // Set font path int UITextBitmap_setFontPath(PyObject_UITextBitmap* self, PyObject* value); // Get text PyObject* UITextBitmap_getText(PyObject_UITextBitmap* self); // Set text int UITextBitmap_setText(PyObject_UITextBitmap* self, PyObject* value); // Get font size PyObject* UITextBitmap_getFontSize(PyObject_UITextBitmap* self); // Set font size int UITextBitmap_setFontSize(PyObject_UITextBitmap* self, PyObject* value); // Get color PyObject* UITextBitmap_getColor(PyObject_UITextBitmap* self); // Set color int UITextBitmap_setColor(PyObject_UITextBitmap* self, PyObject* value); }
24.415094
79
0.732612
2da2c9fec65a6de33a09f33cac3ca23fc4c249f5
926
html
HTML
Labs/09 - Lab/09_02/02_Task.html
sherali801/web_engineering
a179b86b67a25947b6403c81510693b3d1e87088
[ "MIT" ]
null
null
null
Labs/09 - Lab/09_02/02_Task.html
sherali801/web_engineering
a179b86b67a25947b6403c81510693b3d1e87088
[ "MIT" ]
null
null
null
Labs/09 - Lab/09_02/02_Task.html
sherali801/web_engineering
a179b86b67a25947b6403c81510693b3d1e87088
[ "MIT" ]
null
null
null
<!DOCTYPE html> <html> <head> <title>02 - Task</title> </head> <body> <h1>String Demo</h1> <table> <tr> <td><label for="inputString">Enter a String:</label></td> <td><input type="text" name="inputString" id="inputString"></td> </tr> <tr> <td><label for="result">Result:</label></td> <td><input type="text" name="result" id="result"></td> </tr> <tr> <td><label for="inputSubString">Enter a Word:</label></td> <td><input type="text" name="inputSubString" id="inputSubString"></td> </tr> <tr> <td colspan="2"><input type="button" name="countWords" value="Find Number of Words (Space Separated)" id="countWords"></td> </tr> <tr> <td colspan="2"><input type="button" name="subString" value="Find Word in a String" id="subString"></td> </tr> </table> <script type="text/javascript" src="script.js"></script> </body> </html>
29.870968
131
0.582073
b16d4ef54b6d58c0b719db02ca699414d58035fb
6,165
h
C
llvm/3.4.2/llvm-3.4.2.src/lib/Target/ARM/ARMBuildAttrs.h
tangyibin/goblin-core
1940db6e95908c81687b2b22ddd9afbc8db9cdfe
[ "BSD-3-Clause" ]
36
2015-01-13T19:34:04.000Z
2022-03-07T22:22:15.000Z
llvm/3.4.2/llvm-3.4.2.src/lib/Target/ARM/ARMBuildAttrs.h
tangyibin/goblin-core
1940db6e95908c81687b2b22ddd9afbc8db9cdfe
[ "BSD-3-Clause" ]
7
2015-10-20T19:05:01.000Z
2021-11-13T14:55:47.000Z
llvm/3.4.2/llvm-3.4.2.src/lib/Target/ARM/ARMBuildAttrs.h
tangyibin/goblin-core
1940db6e95908c81687b2b22ddd9afbc8db9cdfe
[ "BSD-3-Clause" ]
18
2015-04-23T20:59:52.000Z
2021-11-18T20:06:39.000Z
//===-- ARMBuildAttrs.h - ARM Build Attributes ------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file contains enumerations and support routines for ARM build attributes // as defined in ARM ABI addenda document (ABI release 2.08). // //===----------------------------------------------------------------------===// #ifndef __TARGET_ARMBUILDATTRS_H__ #define __TARGET_ARMBUILDATTRS_H__ namespace llvm { namespace ARMBuildAttrs { enum SpecialAttr { // This is for the .cpu asm attr. It translates into one or more // AttrType (below) entries in the .ARM.attributes section in the ELF. SEL_CPU }; enum AttrType { // Rest correspond to ELF/.ARM.attributes File = 1, Section = 2, Symbol = 3, CPU_raw_name = 4, CPU_name = 5, CPU_arch = 6, CPU_arch_profile = 7, ARM_ISA_use = 8, THUMB_ISA_use = 9, VFP_arch = 10, WMMX_arch = 11, Advanced_SIMD_arch = 12, PCS_config = 13, ABI_PCS_R9_use = 14, ABI_PCS_RW_data = 15, ABI_PCS_RO_data = 16, ABI_PCS_GOT_use = 17, ABI_PCS_wchar_t = 18, ABI_FP_rounding = 19, ABI_FP_denormal = 20, ABI_FP_exceptions = 21, ABI_FP_user_exceptions = 22, ABI_FP_number_model = 23, ABI_align8_needed = 24, ABI_align8_preserved = 25, ABI_enum_size = 26, ABI_HardFP_use = 27, ABI_VFP_args = 28, ABI_WMMX_args = 29, ABI_optimization_goals = 30, ABI_FP_optimization_goals = 31, compatibility = 32, CPU_unaligned_access = 34, FP_HP_extension = 36, ABI_FP_16bit_format = 38, MPextension_use = 42, // was 70, 2.08 ABI DIV_use = 44, nodefaults = 64, also_compatible_with = 65, T2EE_use = 66, conformance = 67, Virtualization_use = 68, MPextension_use_old = 70 }; // Magic numbers for .ARM.attributes enum AttrMagic { Format_Version = 0x41 }; // Legal Values for CPU_arch, (=6), uleb128 enum CPUArch { Pre_v4 = 0, v4 = 1, // e.g. SA110 v4T = 2, // e.g. ARM7TDMI v5T = 3, // e.g. ARM9TDMI v5TE = 4, // e.g. ARM946E_S v5TEJ = 5, // e.g. ARM926EJ_S v6 = 6, // e.g. ARM1136J_S v6KZ = 7, // e.g. ARM1176JZ_S v6T2 = 8, // e.g. ARM1156T2F_S v6K = 9, // e.g. ARM1136J_S v7 = 10, // e.g. Cortex A8, Cortex M3 v6_M = 11, // e.g. Cortex M1 v6S_M = 12, // v6_M with the System extensions v7E_M = 13, // v7_M with DSP extensions v8 = 14 // v8, AArch32 }; enum CPUArchProfile { // (=7), uleb128 Not_Applicable = 0, // pre v7, or cross-profile code ApplicationProfile = (0x41), // 'A' (e.g. for Cortex A8) RealTimeProfile = (0x52), // 'R' (e.g. for Cortex R4) MicroControllerProfile = (0x4D), // 'M' (e.g. for Cortex M3) SystemProfile = (0x53) // 'S' Application or real-time profile }; // The following have a lot of common use cases enum { Not_Allowed = 0, Allowed = 1, // Tag_ARM_ISA_use (=8), uleb128 // Tag_THUMB_ISA_use, (=9), uleb128 AllowThumb32 = 2, // 32-bit Thumb (implies 16-bit instructions) // Tag_FP_arch (=10), uleb128 (formerly Tag_VFP_arch = 10) AllowFPv2 = 2, // v2 FP ISA permitted (implies use of the v1 FP ISA) AllowFPv3A = 3, // v3 FP ISA permitted (implies use of the v2 FP ISA) AllowFPv3B = 4, // v3 FP ISA permitted, but only D0-D15, S0-S31 AllowFPv4A = 5, // v4 FP ISA permitted (implies use of v3 FP ISA) AllowFPv4B = 6, // v4 FP ISA was permitted, but only D0-D15, S0-S31 AllowFPARMv8A = 7, // Use of the ARM v8-A FP ISA was permitted AllowFPARMv8B = 8, // Use of the ARM v8-A FP ISA was permitted, but only D0-D15, S0-S31 // Tag_WMMX_arch, (=11), uleb128 AllowWMMXv1 = 1, // The user permitted this entity to use WMMX v1 AllowWMMXv2 = 2, // The user permitted this entity to use WMMX v2 // Tag_Advanced_SIMD_arch, (=12), uleb128 AllowNeon = 1, // SIMDv1 was permitted AllowNeon2 = 2, // SIMDv2 was permitted (Half-precision FP, MAC operations) AllowNeonARMv8 = 3, // ARM v8-A SIMD was permitted // Tag_ABI_FP_denormal, (=20), uleb128 PreserveFPSign = 2, // sign when flushed-to-zero is preserved // Tag_ABI_FP_number_model, (=23), uleb128 AllowRTABI = 2, // numbers, infinities, and one quiet NaN (see [RTABI]) AllowIEE754 = 3, // this code to use all the IEEE 754-defined FP encodings // Tag_ABI_HardFP_use, (=27), uleb128 HardFPImplied = 0, // FP use should be implied by Tag_FP_arch HardFPSinglePrecision = 1, // Single-precision only // Tag_ABI_VFP_args, (=28), uleb128 BaseAAPCS = 0, HardFPAAPCS = 1, // Tag_FP_HP_extension, (=36), uleb128 AllowHPFP = 1, // Allow use of Half Precision FP // Tag_MPextension_use, (=42), uleb128 AllowMP = 1, // Allow use of MP extensions // Tag_DIV_use, (=44), uleb128 AllowDIVIfExists = 0, // Allow hardware divide if available in arch, or no info exists. DisallowDIV = 1, // Hardware divide explicitly disallowed AllowDIVExt = 2, // Allow hardware divide as optional architecture extension above // the base arch specified by Tag_CPU_arch and Tag_CPU_arch_profile. // Tag_Virtualization_use, (=68), uleb128 AllowTZ = 1, AllowVirtualization = 2, AllowTZVirtualization = 3 }; } // namespace ARMBuildAttrs } // namespace llvm #endif // __TARGET_ARMBUILDATTRS_H__
36.052632
91
0.569181
c7e69669fbecf97882bb4557712e17e4f1bd3fb9
3,459
java
Java
app/examples/json/util/UrlDemo.java
WilsonHo/play_examples
3627c43b543776d20729e487b7a35d6ad3f7dd7e
[ "Apache-2.0" ]
null
null
null
app/examples/json/util/UrlDemo.java
WilsonHo/play_examples
3627c43b543776d20729e487b7a35d6ad3f7dd7e
[ "Apache-2.0" ]
null
null
null
app/examples/json/util/UrlDemo.java
WilsonHo/play_examples
3627c43b543776d20729e487b7a35d6ad3f7dd7e
[ "Apache-2.0" ]
null
null
null
package examples.json.util; import org.apache.commons.lang3.StringUtils; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.net.URL; import java.net.URLDecoder; import java.net.URLEncoder; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; /** * Created by wilson on 3/7/17. */ public class UrlDemo { public static void main(String[] args) { String sUrl = "http://lp.downloadhub.me/lp/my/mobile/mobiledoctor_01/index.php?fdsf=dasdas&ds&&"; System.out.println(getTspLink(sUrl)); } public static Map<String, List<String>> parseQueryString(String queryString) throws UnsupportedEncodingException { Map<String, List<String>> queryParams = new HashMap<>(); if (StringUtils.isBlank(queryString)) { return queryParams; } for (String param : queryString.split("&")) { String[] pair = param.split("="); String key = URLDecoder.decode(pair[0], "UTF-8"); String value = ""; if (pair.length > 1) { value = URLDecoder.decode(pair[1], "UTF-8"); } if (queryParams.containsKey(key)) { List<String> values = queryParams.get(key); values.add(value); queryParams.put(key, values); } else { List<String> values = new ArrayList<>(); values.add(value); queryParams.put(key, values); } } return queryParams; } private static String getTspLink(String url) { String[] removeParamKeys = {"cookieid", "xsource_data", "add_code", "act", "click_id", "rotate_id", "transaction_id", "cid"}; try { URL checkedUrl = new URL(url); String queryString = checkedUrl.getQuery(); Map<String, List<String>> queryParams = parseQueryString(queryString); for (String key : removeParamKeys) { deleteParameter(queryParams, key); } int queryStringIndex = url.indexOf("?" + queryString); int endIndex = queryStringIndex > 0 ? queryStringIndex : url.length(); return addParameters(url.substring(0, endIndex), queryParams); } catch (MalformedURLException e) { return url; } catch (UnsupportedEncodingException e) { return url; } } private static String addParameters(String url, Map<String, List<String>> queryParams) throws UnsupportedEncodingException { if (queryParams.isEmpty()) { return url; } String newUrl = url + "?"; for (Map.Entry<String, List<String>> entry : queryParams.entrySet()) { String key = entry.getKey(); for (String value : entry.getValue()) { newUrl += URLEncoder.encode(key, "UTF-8") + "=" + URLEncoder.encode(value, "UTF-8") + "&"; } } return newUrl.substring(0, newUrl.length() - 1); } private static void deleteParameter(Map<String, List<String>> queryParams, String queryKey) { if (queryParams.containsKey(queryKey)) { queryParams.remove(queryKey); } } }
33.911765
128
0.589188
ffda6cf7e1b43045a7414cd61c98c7f3bb90166f
122
html
HTML
pa1-skeleton/pa1-data/4/pangea.stanford.edu_courses_EESS146Bweb_Lab2pics.html
yzhong94/cs276-spring-2019
a4780a9f88b8c535146040fe11bb513c91c5693b
[ "MIT" ]
null
null
null
pa1-skeleton/pa1-data/4/pangea.stanford.edu_courses_EESS146Bweb_Lab2pics.html
yzhong94/cs276-spring-2019
a4780a9f88b8c535146040fe11bb513c91c5693b
[ "MIT" ]
null
null
null
pa1-skeleton/pa1-data/4/pangea.stanford.edu_courses_EESS146Bweb_Lab2pics.html
yzhong94/cs276-spring-2019
a4780a9f88b8c535146040fe11bb513c91c5693b
[ "MIT" ]
null
null
null
ocean circulation lab cylinder collapse 1 cylinder collapse 2 thermal wind 1 thermal wind 2 thermal wind 3 thermal wind 4
61
121
0.827869
5c7718ae7927b3f8f6bdf5343c1c185850689d84
2,257
h
C
ulibdns/UMDnsResourceRecord.h
andreasfink/ulibdns
d94047e8ee554ed6266d60113214bd45e3dc882a
[ "MIT" ]
null
null
null
ulibdns/UMDnsResourceRecord.h
andreasfink/ulibdns
d94047e8ee554ed6266d60113214bd45e3dc882a
[ "MIT" ]
null
null
null
ulibdns/UMDnsResourceRecord.h
andreasfink/ulibdns
d94047e8ee554ed6266d60113214bd45e3dc882a
[ "MIT" ]
1
2016-11-04T07:42:02.000Z
2016-11-04T07:42:02.000Z
// // UMDnsResourceRecord.h // ulibdns // // Created by Andreas Fink on 31/08/15. // Copyright © 2017 Andreas Fink (andreas@fink.org). All rights reserved. // #import <Foundation/Foundation.h> #import <ulib/ulib.h> #import "ulibdns_types.h" #import "UMDnsName.h" /* All RRs have the same top level format shown below: 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | | / / / NAME / | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | TYPE | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | CLASS | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | TTL | | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | RDLENGTH | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| / RDATA / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ @interface UMDnsResourceRecord : UMObject { UMDnsName *_name; UlibDnsResourceRecordType _recordType; UlibDnsClass _recordClass; NSInteger _ttl; } @property(readwrite,strong) UMDnsName *name; @property(readwrite,assign) UlibDnsResourceRecordType recordType; @property(readwrite,assign) UlibDnsClass recordClass; @property(readwrite,assign) NSInteger ttl; @property(readwrite,strong) NSData *rData; - (NSData *)binary; - (NSData *)resourceData; - (NSString *)recordTypeString; + (UMDnsResourceRecord *)recordOfType:(NSString *)rrtypeName params:(NSArray *)params zone:(NSString *)zone; - (UMDnsResourceRecord *)initWithParams:(NSArray *)params zone:(NSString *)zone; - (UMDnsResourceRecord *)initWithRawData:(NSData *)data atOffset:(int *)pos; - (NSString *)visualRepresentation; - (NSString *)recordClassString; @end
34.723077
108
0.410279
8c87108a7d058f5561659aef9c00226e47862c70
329
asm
Assembly
programs/oeis/080/A080674.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/080/A080674.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/080/A080674.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A080674: a(n) = (4/3)*(4^n - 1). ; 0,4,20,84,340,1364,5460,21844,87380,349524,1398100,5592404,22369620,89478484,357913940,1431655764,5726623060,22906492244,91625968980,366503875924,1466015503700,5864062014804,23456248059220,93824992236884,375299968947540,1501199875790164,6004799503160660 mov $1,4 pow $1,$0 div $1,3 mul $1,4
41.125
255
0.793313
774984401bad7cd0a3205c7d006703a4db2f4295
5,572
html
HTML
tutorials/react/class-siglos-vida.html
Rick-torrellas/tutorials-vanilla
c93a0a79918ce890063a17241185e3d3f57f7309
[ "MIT" ]
null
null
null
tutorials/react/class-siglos-vida.html
Rick-torrellas/tutorials-vanilla
c93a0a79918ce890063a17241185e3d3f57f7309
[ "MIT" ]
null
null
null
tutorials/react/class-siglos-vida.html
Rick-torrellas/tutorials-vanilla
c93a0a79918ce890063a17241185e3d3f57f7309
[ "MIT" ]
null
null
null
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <h1>Siglos de vida en classes</h1> <pre><code> class Clock extends React.Component { constructor(props) { super(props); this.state = {date: new Date()}; } componentDidMount() { this.timerID = setInterval( () => this.tick(), 1000 ); } componentWillUnmount() { clearInterval(this.timerID); } tick() { this.setState({ date: new Date() }); } render() { return ( &lt;div> &lt;h1>Hello, world!&lt;/h1> &lt;h2>It is {this.state.date.toLocaleTimeString()}.&lt;/h2> &lt;/div> ); } } </code></pre> <h2>El ciclo de vida del componente</h2> <p>Cada componente tiene varios “métodos de ciclo de vida” que puedes sobrescribir para ejecutar código en momentos particulares del proceso.</p> <h3>Montaje</h3> <p>Estos métodos se llaman cuando se crea una instancia de un componente y se inserta en el DOM:</p> <ul> <li>constructor()</li> <li>render()</li> <li>componentDidMount()</li> </ul> <h3>Actualización</h3> <p>Una actualización puede ser causada por cambios en las props o el estado. Estos métodos se llaman en el siguiente orden cuando un componente se vuelve a renderizar:</p> <ul> <li>render()</li> <li>componentDidUpdate()</li> </ul> <h3>Desmontaje</h3> <p>Este método es llamado cuando un componente se elimina del DOM:</p> <ul> <li>componentWillUnmount() </li> </ul> <h3>Manejo de errores</h3> <p>Estos métodos se invocan cuando hay un error durante la renderización, en un método en el ciclo de vida o en el constructor de cualquier componente hijo.</p> <ul> <li>static getDerivedStateFromError()</li> <li>componentDidCatch() </li> </ul> <div> <h2>Referencia</h2> <h3>componentDidMount()</h3> <code>componentDidMount()</code> <p>componentDidMount() se invoca inmediatamente después de que un componente se monte (se inserte en el árbol). La inicialización que requiere nodos DOM debería ir aquí. Si necesita cargar datos desde un punto final remoto, este es un buen lugar para instanciar la solicitud de red.</p> <p>Este método es un buen lugar para establecer cualquier suscripción. Si lo haces, no olvides darle de baja en componentWillUnmount().</p> <p>Puedes llamar setState() inmediatamente en componentDidMount(). Se activará un renderizado extra, pero sucederá antes de que el navegador actualice la pantalla. Esto garantiza que, aunque en este caso se invocará dos veces el render(), el usuario no verá el estado intermedio. Utiliza este patrón con precaución porque a menudo causa problemas de rendimiento. En la mayoría de los casos, deberías ser capaz de asignar el estado inicial en el constructor() en su lugar. Sin embargo, puede ser necesario para casos como modales y tooltips cuando se necesita medir un nodo DOM antes de representar algo que depende de su tamaño o posición.</p> <h3>componentDidUpdate()</h3> <code>componentDidUpdate(prevProps, prevState, snapshot)</code> <p>componentDidUpdate() se invoca inmediatamente después de que la actualización ocurra. Este método no es llamado para el renderizador inicial.</p> <p>Use esto como una oportunidad para operar en DOM cuando el componente se haya actualizado. Este es también un buen lugar para hacer solicitudes de red siempre y cuando compare los accesorios actuales con los anteriores (por ejemplo, una solicitud de red puede no ser necesaria si las props no han cambiado).</p> <pre><code> componentDidUpdate(prevProps) { // Uso tipico (no olvides de comparar las props): if (this.props.userID !== prevProps.userID) { this.fetchData(this.props.userID); } } </code></pre> <p>Puedes llamar setState() inmediatamente en componentDidUpdate() pero ten en cuenta que debe ser envuelto en una condición como en el ejemplo anterior, o causará un bucle infinito. También causaría una renderización adicional que, aunque no sea visible para el usuario, puede afectar el rendimiento del componente. Si estás intentando crear un “espejo” desde un estado a una prop que viene desde arriba, considera usar la prop directamente en su lugar. </p> <h3>componentWillUnmount()</h3> <code>componentWillUnmount()</code> <p>componentWillUnmount() se invoca inmediatamente antes de desmontar y destruir un componente. Realiza las tareas de limpieza necesarias en este método, como la invalidación de temporizadores, la cancelación de solicitudes de red o la eliminación de las suscripciones que se crearon en componentDidMount().</p> <p>No debes llamar setState() en componentWillUnmount() porque el componente nunca será vuelto a renderizar. Una vez que una instancia de componente sea desmontada, nunca será montada de nuevo.</p> </div> </body> </html>
56.282828
651
0.647882
d0d5d666b88ea49fab85a7373d82742d94d51c39
541
css
CSS
src/main/webapp/resources/css/heroku.css
anilmitsyd/trailhead
2b3a19c8fd9e4a5f5389a799a7193997c58ffba7
[ "BSD-3-Clause" ]
142
2015-01-23T16:55:11.000Z
2022-03-11T17:02:53.000Z
src/main/webapp/resources/css/heroku.css
anilmitsyd/trailhead
2b3a19c8fd9e4a5f5389a799a7193997c58ffba7
[ "BSD-3-Clause" ]
46
2015-04-15T12:16:03.000Z
2022-03-09T22:25:22.000Z
src/main/webapp/resources/css/heroku.css
anilmitsyd/trailhead
2b3a19c8fd9e4a5f5389a799a7193997c58ffba7
[ "BSD-3-Clause" ]
109
2015-03-11T08:52:56.000Z
2022-03-09T11:58:11.000Z
@import url("https://statics.herokuapp.com/fonts/fonts.css"); #heroku { color: black; float: right; text-shadow: 0 1px 0 rgba(255, 255, 255, .1), 0 0 30px rgba(255, 255, 255, .125) } #heroku strong { font-family: HybreaLight, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif; } #getting-started { padding-bottom: 40px; } body { padding-top: 40px; } @media (max-width: 980px) and (min-width: 768px) { body { padding: 0; } } @media (max-width: 768px) { body { padding: 0; } }
17.451613
85
0.597043