text
stringlengths
4
6.14k
/* * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #ifndef __INTERRUPT_PROPS_H__ #define __INTERRUPT_PROPS_H__ #ifndef __ASSEMBLY__ /* Create an interrupt property descriptor from various interrupt properties */ #define INTR_PROP_DESC(num, pri, grp, cfg) \ { \ .intr_num = num, \ .intr_pri = pri, \ .intr_grp = grp, \ .intr_cfg = cfg, \ } typedef struct interrupt_prop { unsigned int intr_num:10; unsigned int intr_pri:8; unsigned int intr_grp:2; unsigned int intr_cfg:2; } interrupt_prop_t; #endif /* __ASSEMBLY__ */ #endif /* __INTERRUPT_PROPS_H__ */
// // MHImportBusterTestsHelper.h // MHImportBuster // // Created by marko.hlebar on 01/01/14. // Copyright (c) 2014 Marko Hlebar. All rights reserved. // #ifndef MHImportBuster_MHImportBusterTestsHelper_h #define MHImportBuster_MHImportBusterTestsHelper_h #import <Foundation/Foundation.h> #import "NSString+Files.h" #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-function" static NSString *createTempFile(NSString* filePath) { NSString *tempFilePath = [filePath filePathByAddingSuffix:@"__"]; NSFileManager *fileManager = [NSFileManager defaultManager]; [fileManager copyItemAtPath:filePath toPath:tempFilePath error:nil]; return tempFilePath; } static void deleteFile(NSString* filePath) { NSFileManager *fileManager = [NSFileManager defaultManager]; [fileManager removeItemAtPath:filePath error:nil]; } static BOOL compareFiles(NSString *filePath, NSString *filePath2) { NSFileManager *fileManager = [NSFileManager defaultManager]; return [fileManager contentsEqualAtPath:filePath andPath:filePath2]; } #pragma clang diagnostic pop #endif
/* GNU Chess 5.0 - hung.c - hung piece evaluation code Copyright (c) 1999-2002 Free Software Foundation, Inc. GNU Chess is based on the two research programs Cobalt by Chua Kong-Sian and Gazebo by Stuart Cracraft. GNU Chess is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Chess is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Chess; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Contact Info: bug-gnu-chess@gnu.org cracraft@ai.mit.edu, cracraft@stanfordalumni.org, cracraft@earthlink.net */ /* * Hung piece evaluation. */ #include <config.h> #include <stdio.h> #include "common.h" int EvalHung(int side) /**************************************************************************** * * Calculate the number of hung pieces for a side. * ****************************************************************************/ { BitBoard c, n, b, r, q; int xside; xside = 1 ^ side; hunged[side] = 0; /* Knight */ n = (Ataks[xside][pawn] & board.b[side][knight]); n |= (Ataks[xside][0] & board.b[side][knight] & ~Ataks[side][0]); /* Bishop */ b = (Ataks[xside][pawn] & board.b[side][bishop]); b |= (Ataks[xside][0] & board.b[side][bishop] & ~Ataks[side][0]); /* Rook */ r = Ataks[xside][pawn] | Ataks[xside][knight] | Ataks[xside][bishop]; r = (r & board.b[side][rook]); r |= (Ataks[xside][0] & board.b[side][rook] & ~Ataks[side][0]); /* Queen */ q = Ataks[xside][pawn] | Ataks[xside][knight] | Ataks[xside][bishop] | Ataks[xside][rook]; q = (q & board.b[side][queen]); q |= (Ataks[xside][0] & board.b[side][queen] & ~Ataks[side][0]); c = n | b | r | q ; if (c) hunged[side] += nbits (c); /* King */ if (Ataks[xside][0] & board.b[side][king]) hunged[side] ++; return (hunged[side]); }
/* $Id: pgalloc.h,v 1.30 2001/12/21 04:56:17 davem Exp $ */ #ifndef _SPARC64_PGALLOC_H #define _SPARC64_PGALLOC_H #include <linux/kernel.h> #include <linux/sched.h> #include <linux/mm.h> #include <linux/slab.h> #include <asm/spitfire.h> #include <asm/cpudata.h> #include <asm/cacheflush.h> #include <asm/page.h> /* Page table allocation/freeing. */ extern kmem_cache_t *pgtable_cache; static inline pgd_t *pgd_alloc(struct mm_struct *mm) { return kmem_cache_alloc(pgtable_cache, GFP_KERNEL); } static inline void pgd_free(pgd_t *pgd) { kmem_cache_free(pgtable_cache, pgd); } #define pud_populate(MM, PUD, PMD) pud_set(PUD, PMD) static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) { return kmem_cache_alloc(pgtable_cache, GFP_KERNEL|__GFP_REPEAT); } static inline void pmd_free(pmd_t *pmd) { kmem_cache_free(pgtable_cache, pmd); } static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) { return kmem_cache_alloc(pgtable_cache, GFP_KERNEL|__GFP_REPEAT); } static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) { return virt_to_page(pte_alloc_one_kernel(mm, address)); } static inline void pte_free_kernel(pte_t *pte) { kmem_cache_free(pgtable_cache, pte); } static inline void pte_free(struct page *ptepage) { pte_free_kernel(page_address(ptepage)); } #define pmd_populate_kernel(MM, PMD, PTE) pmd_set(PMD, PTE) #define pmd_populate(MM,PMD,PTE_PAGE) \ pmd_populate_kernel(MM,PMD,page_address(PTE_PAGE)) #define check_pgt_cache() do { } while (0) #endif /* _SPARC64_PGALLOC_H */
/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */ typedef unsigned char UChar; typedef int Int32; typedef unsigned int UInt32; void fallbackSort ( UInt32* fmap, UInt32* eclass, Int32 nblock, Int32 verb ) { Int32 ftab[257]; Int32 ftabCopy[256]; Int32 H, i, j, k, l, r, cc, cc1; Int32 nNotDone; Int32 nBhtab; UChar* eclass8 = (UChar*)eclass; if (verb >= 4) VPrintf0 ( " bucket sorting ...\n" ); for (i = 0; i < 257; i++) ftab[i] = 0; for (i = 0; i < nblock; i++) ftab[eclass8[i]]++; for (i = 0; i < 256; i++) ftabCopy[i] = ftab[i]; for (i = 1; i < 257; i++) ftab[i] += ftab[i-1]; for (i = 0; i < nblock; i++) { j = eclass8[i] + ftab [i]; } AssertH ( j < 256, 1005 ); } /* { dg-final { cleanup-tree-dump "graphite" } } */
/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ /* { dg-skip-if "" { powerpc*-*-darwin* } } */ /* { dg-require-effective-target powerpc_vsx_ok } */ /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ /* { dg-options "-O3 -mcpu=power7 -fmerge-all-constants" } */ struct locale_time_t { const char *abday[7]; const unsigned int *wabday[7]; }; static const unsigned int empty_wstr[1] = { 0 }; void time_read (struct locale_time_t *time) { int cnt; for (cnt=0; cnt < 7; cnt++) { time->abday[cnt] = ""; time->wabday[cnt] = empty_wstr; } }
/* * tarrayobj.h * * This file is part of NEST. * * Copyright (C) 2004 The NEST Initiative * * NEST is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * NEST is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with NEST. If not, see <http://www.gnu.org/licenses/>. * */ #ifndef TARRAYOBJ_H #define TARRAYOBJ_H /* Array of Tokens */ #include <typeinfo> #include <cstddef> #include "token.h" #define ARRAY_ALLOC_SIZE 64 class Token; class TokenArrayObj { private: Token* p; Token* begin_of_free_storage; Token* end_of_free_storage; unsigned int alloc_block_size; unsigned int refs_; // bool homogeneous; void allocate( size_t, size_t, size_t, const Token& = Token() ); static size_t allocations; public: TokenArrayObj( void ) : p( NULL ) , begin_of_free_storage( NULL ) , end_of_free_storage( NULL ) , alloc_block_size( ARRAY_ALLOC_SIZE ) , refs_( 1 ){}; TokenArrayObj( size_t, const Token& = Token(), size_t = 0 ); TokenArrayObj( const TokenArrayObj& ); virtual ~TokenArrayObj(); Token* begin() const { return p; } Token* end() const { return begin_of_free_storage; } size_t size( void ) const { return ( size_t )( begin_of_free_storage - p ); } size_t capacity( void ) const { return ( size_t )( end_of_free_storage - p ); } Token& operator[]( size_t i ) { return p[ i ]; } const Token& operator[]( size_t i ) const { return p[ i ]; } const Token& get( long i ) const { return *( p + i ); // return p[i]; } bool index_is_valid( long i ) const { return ( p + i ) < begin_of_free_storage; } void rotate( Token*, Token*, Token* ); // Memory allocation bool shrink( void ); bool reserve( size_t ); unsigned int references( void ) { return refs_; } unsigned int remove_reference() { --refs_; if ( refs_ == 0 ) { delete this; return 0; } return refs_; } unsigned int add_reference() { return ++refs_; } void resize( size_t, size_t, const Token& = Token() ); void resize( size_t, const Token& = Token() ); void reserve_token( size_t n ) { if ( capacity() < size() + 1 + n ) reserve( size() + n ); } // Insertion, deletion void push_back( const Token& t ) { if ( capacity() < size() + 1 ) reserve( size() + alloc_block_size ); ( begin_of_free_storage++ )->init_by_copy( t ); } void push_back_move( Token& t ) { if ( capacity() < size() + 1 ) reserve( size() + alloc_block_size ); ( begin_of_free_storage++ )->init_move( t ); // ++begin_of_free_storage; } /** * Push back a reference. This function expects that enough space * on the stack has been reserved and that the token points to a * valid datum object. */ void push_back_by_ref( const Token& t ) { if ( capacity() < size() + 1 ) reserve( size() + alloc_block_size ); ( begin_of_free_storage++ )->init_by_ref( t ); } /** * Push back a datum pointer. This function assumes that enough * space on the stack has been reserved. This function expects a * valid datum pointer and increases the reference count of the * datum. */ void push_back_by_pointer( Datum* rhs ) { if ( capacity() < size() + 1 ) reserve( size() + alloc_block_size ); begin_of_free_storage->init_by_pointer( rhs ); ++begin_of_free_storage; } void assign_move( Token* tp, Token& t ) { tp->move( t ); } void pop_back( void ) { ( --begin_of_free_storage )->clear(); } // Erase the range given by the iterators. void erase( size_t, size_t ); void erase( Token*, Token* ); void erase( Token* tp ) { erase( tp, tp + 1 ); } // Reduce the array to the range given by the iterators void reduce( Token*, Token* ); void reduce( size_t, size_t ); void insert( size_t, size_t = 1, const Token& = Token() ); void insert( size_t i, const Token& t ) { insert( i, 1, t ); } void insert_move( size_t, TokenArrayObj& ); void insert_move( size_t, Token& ); void assign_move( TokenArrayObj&, size_t, size_t ); void assign( const TokenArrayObj&, size_t, size_t ); void replace_move( size_t, size_t, TokenArrayObj& ); void append_move( TokenArrayObj& ); void clear( void ); const TokenArrayObj& operator=( const TokenArrayObj& ); bool operator==( const TokenArrayObj& ) const; bool empty( void ) const { return size() == 0; } void info( std::ostream& ) const; static size_t getallocations( void ) { return allocations; } bool valid( void ) const; // check integrity }; std::ostream& operator<<( std::ostream&, const TokenArrayObj& ); #endif
/* linux/arch/arm/mach-exynos/dev-c2c.c * * Copyright (c) 2011 Samsung Electronics * * Base EXYNOS C2C resource and device definitions * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/platform_device.h> #include <linux/ioport.h> #include <linux/dma-mapping.h> #include <mach/map.h> #include <mach/regs-pmu.h> #include <mach/regs-pmu5.h> #include <mach/c2c.h> #include <plat/irqs.h> #include <plat/cpu.h> static struct resource exynos_c2c_resource[] = { [0] = { .start = EXYNOS_PA_C2C, .end = EXYNOS_PA_C2C + SZ_64K - 1, .flags = IORESOURCE_MEM, }, [1] = { .start = EXYNOS_PA_C2C_CP, .end = EXYNOS_PA_C2C_CP + SZ_64K - 1, .flags = IORESOURCE_MEM, }, [2] = { .start = IRQ_C2C_SSCM0, .end = IRQ_C2C_SSCM0, .flags = IORESOURCE_IRQ, }, [3] = { .start = IRQ_C2C_SSCM1, .end = IRQ_C2C_SSCM1, .flags = IORESOURCE_IRQ, }, }; static u64 exynos_c2c_dma_mask = DMA_BIT_MASK(32); struct platform_device exynos_device_c2c = { .name = "samsung-c2c", .id = -1, .num_resources = ARRAY_SIZE(exynos_c2c_resource), .resource = exynos_c2c_resource, .dev = { .dma_mask = &exynos_c2c_dma_mask, .coherent_dma_mask = DMA_BIT_MASK(32), }, }; void __init exynos_c2c_set_platdata(struct exynos_c2c_platdata *pd) { struct exynos_c2c_platdata *npd = pd; if (!npd->setup_gpio) npd->setup_gpio = exynos_c2c_cfg_gpio; if (!npd->set_cprst) npd->set_cprst = exynos_c2c_set_cprst; if (!npd->clear_cprst) npd->clear_cprst = exynos_c2c_clear_cprst; if (soc_is_exynos4212() || soc_is_exynos4412()) { /* Set C2C_CTRL Register */ writel(0x1, S5P_C2C_CTRL); if (samsung_rev() < EXYNOS4412_REV_1_0) npd->c2c_sysreg = S3C_VA_SYS + 0x010C; } else if (soc_is_exynos5250()) { /* TODO : SysReg address will be changed at EVT1 */ /* Set C2C_CTRL Register */ writel(0x1, EXYNOS5_C2C_CTRL); } exynos_device_c2c.dev.platform_data = npd; }
/* GNU Objective C Runtime internal declarations Copyright (C) 1993-2017 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ /* You need to include this file after including a number of standard ObjC files. The original list was: #include "objc/objc.h" #include "objc/objc-api.h" #include "objc/thr.h" #include "objc/hash.h" #include "objc/objc-list.h" but can almost certainly be shrunk down. */ #ifndef __objc_private_runtime_INCLUDE_GNU #define __objc_private_runtime_INCLUDE_GNU #include <stdarg.h> /* for varargs and va_list's */ #include <stdio.h> #include <ctype.h> #include <stddef.h> /* so no one else will get system versions */ #include <assert.h> extern BOOL __objc_add_class_to_hash (Class); /* (objc-class.c) */ extern void __objc_init_class_tables (void); /* (objc-class.c) */ extern void __objc_init_dispatch_tables (void); /* (objc-dispatch.c) */ extern void __objc_install_premature_dtable (Class); /* (objc-dispatch.c) */ extern void __objc_resolve_class_links (void); /* (objc-class.c) */ extern void __objc_update_dispatch_table_for_class (Class);/* (objc-msg.c) */ extern int __objc_init_thread_system (void); /* thread.c */ extern int __objc_fini_thread_system (void); /* thread.c */ extern BOOL __objc_init_class (Class class); /* init.c */ extern void class_add_method_list (Class, struct objc_method_list *); /* Registering instance methods as class methods for root classes */ extern void __objc_register_instance_methods_to_class (Class); extern struct objc_method * search_for_method_in_list (struct objc_method_list * list, SEL op); extern void __objc_update_classes_with_methods (struct objc_method *method_a, struct objc_method *method_b); /* class.c */ /* Mutex locking __objc_selector_max_index and its arrays. */ extern objc_mutex_t __objc_runtime_mutex; /* Number of threads which are alive. */ extern int __objc_runtime_threads_alive; BOOL __objc_responds_to (id object, SEL sel); /* for internal use only! */ extern void __objc_generate_gc_type_description (Class); #endif /* not __objc_private_runtime_INCLUDE_GNU */
/* * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* * Function naming determines intended use: * * <x>_r(void) : Returns the offset for register <x>. * * <x>_o(void) : Returns the offset for element <x>. * * <x>_w(void) : Returns the word offset for word (4 byte) element <x>. * * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits. * * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted * and masked to place it at field <y> of register <x>. This value * can be |'d with others to produce a full register value for * register <x>. * * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This * value can be ~'d and then &'d to clear the value of field <y> for * register <x>. * * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted * to place it at field <y> of register <x>. This value can be |'d * with others to produce a full register value for <x>. * * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register * <x> value 'r' after being shifted to place its LSB at bit 0. * This value is suitable for direct comparison with other unshifted * values appropriate for use in field <y> of register <x>. * * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for * field <y> of register <x>. This value is suitable for direct * comparison with unshifted values appropriate for use in field <y> * of register <x>. */ #ifndef _hw_timer_gm20b_h_ #define _hw_timer_gm20b_h_ static inline u32 timer_pri_timeout_r(void) { return 0x00009080; } static inline u32 timer_pri_timeout_period_f(u32 v) { return (v & 0xffffff) << 0; } static inline u32 timer_pri_timeout_period_m(void) { return 0xffffff << 0; } static inline u32 timer_pri_timeout_period_v(u32 r) { return (r >> 0) & 0xffffff; } static inline u32 timer_pri_timeout_en_f(u32 v) { return (v & 0x1) << 31; } static inline u32 timer_pri_timeout_en_m(void) { return 0x1 << 31; } static inline u32 timer_pri_timeout_en_v(u32 r) { return (r >> 31) & 0x1; } static inline u32 timer_pri_timeout_en_en_enabled_f(void) { return 0x80000000; } static inline u32 timer_pri_timeout_en_en_disabled_f(void) { return 0x0; } static inline u32 timer_pri_timeout_save_0_r(void) { return 0x00009084; } static inline u32 timer_pri_timeout_save_1_r(void) { return 0x00009088; } static inline u32 timer_pri_timeout_fecs_errcode_r(void) { return 0x0000908c; } #endif
/* */ #ifndef _ASMPARISC_TIMEX_H #define _ASMPARISC_TIMEX_H #define CLOCK_TICK_RATE 1193180 /* */ typedef unsigned long cycles_t; static inline cycles_t get_cycles (void) { return mfctl(16); } #endif
/* * Copyright (C) 2010 ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence. * * A copy of the licence is included with the program, and can also be obtained from Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /** * @file mali_device_pause_resume.c * Implementation of the Mali pause/resume functionality */ #if USING_MALI_PMM #include <linux/version.h> #include <linux/sched.h> #include <linux/module.h> #include "mali_osk.h" #include "mali_kernel_common.h" #include "mali_platform.h" #include "mali_linux_pm.h" #include "mali_device_pause_resume.h" #include "mali_pmm.h" #include "mali_kernel_license.h" #ifdef CONFIG_PM #if MALI_LICENSE_IS_GPL /* Mali Pause Resume APIs */ int mali_dev_pause() { int err = 0; _mali_osk_lock_wait(lock, _MALI_OSK_LOCKMODE_RW); if ((mali_dvfs_device_state == _MALI_DEVICE_SUSPEND) || (mali_device_state == _MALI_DEVICE_SUSPEND_IN_PROGRESS) || (mali_device_state == _MALI_DEVICE_SUSPEND) #ifdef CONFIG_HAS_EARLYSUSPEND || mali_device_state == _MALI_DEVICE_EARLYSUSPEND_DISABLE_FB) #else ) #endif { err = -EPERM; } if ((mali_dvfs_device_state == _MALI_DEVICE_RESUME) && (!err)) { mali_device_suspend(MALI_PMM_EVENT_DVFS_PAUSE, &dvfs_pm_thread); mali_dvfs_device_state = _MALI_DEVICE_SUSPEND; } _mali_osk_lock_signal(lock, _MALI_OSK_LOCKMODE_RW); return err; } EXPORT_SYMBOL(mali_dev_pause); int mali_dev_resume() { int err = 0; _mali_osk_lock_wait(lock, _MALI_OSK_LOCKMODE_RW); if ((mali_dvfs_device_state == _MALI_DEVICE_RESUME) || (mali_device_state == _MALI_DEVICE_SUSPEND_IN_PROGRESS) || (mali_device_state == _MALI_DEVICE_SUSPEND) #ifdef CONFIG_HAS_EARLYSUSPEND || mali_device_state == _MALI_DEVICE_EARLYSUSPEND_DISABLE_FB) #else ) #endif { err = -EPERM; } if (!err) { mali_device_resume(MALI_PMM_EVENT_DVFS_RESUME, &dvfs_pm_thread); mali_dvfs_device_state = _MALI_DEVICE_RESUME; } _mali_osk_lock_signal(lock, _MALI_OSK_LOCKMODE_RW); return err; } EXPORT_SYMBOL(mali_dev_resume); #endif /* MALI_LICENSE_IS_GPL */ #endif /* CONFIG_PM */ #endif /* USING_MALI_PMM */
////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // // copyright : (C) 2014 The CodeLite Team // file name : LLDBLocalsView.h // // ------------------------------------------------------------------------- // A // _____ _ _ _ _ // / __ \ | | | | (_) | // | / \/ ___ __| | ___| | _| |_ ___ // | | / _ \ / _ |/ _ \ | | | __/ _ ) // | \__/\ (_) | (_| | __/ |___| | || __/ // \____/\___/ \__,_|\___\_____/_|\__\___| // // F i l e // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// #ifndef LLDBLOCALSVIEW_H #define LLDBLOCALSVIEW_H #include "UI.h" #include "LLDBProtocol/LLDBEvent.h" #include "LLDBProtocol/LLDBVariable.h" #include "cl_treelistctrl.h" #include <map> class LLDBPlugin; class LLDBLocalsView : public LLDBLocalsViewBase { typedef std::map<int, wxTreeItemId> IntItemMap_t; LLDBPlugin *m_plugin; clTreeListCtrl* m_treeList; LLDBLocalsView::IntItemMap_t m_pendingExpandItems; private: void DoAddVariableToView(const LLDBVariable::Vect_t& variables, wxTreeItemId parent); LLDBVariableClientData *GetItemData(const wxTreeItemId &id); void Cleanup(); void GetWatchesFromSelections(wxArrayTreeItemIds& items); protected: virtual void OnDelete(wxCommandEvent& event); virtual void OnDeleteUI(wxUpdateUIEvent& event); virtual void OnNewWatch(wxCommandEvent& event); // events coming from LLDB void OnLLDBStarted(LLDBEvent &event); void OnLLDBExited(LLDBEvent &event); void OnLLDBLocalsUpdated(LLDBEvent &event); void OnLLDBRunning(LLDBEvent &event); void OnLLDBVariableExpanded(LLDBEvent &event); // UI events void OnItemExpanding(wxTreeEvent &event); void OnLocalsContextMenu(wxContextMenuEvent &event); public: LLDBLocalsView(wxWindow* parent, LLDBPlugin* plugin); virtual ~LLDBLocalsView(); }; #endif // LLDBLOCALSVIEW_H
/*********************************************************************** IndexedLineSetReaderNode - Base class for nodes that read indexed line set data from external files. Copyright (c) 2008 Oliver Kreylos This file is part of the Virtual Reality VRML viewer (VRMLViewer). The Virtual Reality VRML viewer is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The Virtual Reality VRML viewer is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the Virtual Reality VRML viewer; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ***********************************************************************/ #ifndef INDEXEDLINESETREADERNODE_INCLUDED #define INDEXEDLINESETREADERNODE_INCLUDED #include <vector> #include "Types.h" #include "VRMLNode.h" /* Forward declarations: */ class CoordinateNode; class ColorNode; class IndexedLineSetReaderNode:public VRMLNode { /* New methods: */ public: virtual bool hasColors(void) const =0; // Returns true if an indexed line set reader can generate colors virtual void readIndexedLines(CoordinateNode* coordNode,std::vector<Int32>& coordIndices,ColorNode* colorNode,std::vector<Int32>& colorIndices) const =0; // Fills a coordinate and color nodes by reading an external indexed line set file }; #endif
/* * WAX Device Driver * * (c) Copyright 2000 The Puffin Group Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * by Helge Deller <deller@gmx.de> */ #include <linux/errno.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/ioport.h> #include <linux/slab.h> #include <linux/module.h> #include <linux/types.h> #include <asm/io.h> #include <asm/hardware.h> #include "gsc.h" #define WAX_GSC_IRQ 7 /* */ static void wax_choose_irq(struct parisc_device *dev, void *ctrl) { int irq; switch (dev->id.sversion) { case 0x73: irq = 1; break; /* */ case 0x8c: irq = 6; break; /* */ case 0x90: irq = 10; break; /* */ default: return; /* */ } gsc_asic_assign_irq(ctrl, irq, &dev->irq); switch (dev->id.sversion) { case 0x73: irq = 2; break; /* */ case 0x90: irq = 0; break; /* */ default: return; /* */ } gsc_asic_assign_irq(ctrl, irq, &dev->aux_irq); } static void __init wax_init_irq(struct gsc_asic *wax) { unsigned long base = wax->hpa; /* */ gsc_writel(0x00000000, base+OFFSET_IMR); /* */ gsc_readl(base+OFFSET_IRR); /* */ /* */ // // } static int __init wax_init_chip(struct parisc_device *dev) { struct gsc_asic *wax; struct parisc_device *parent; struct gsc_irq gsc_irq; int ret; wax = kzalloc(sizeof(*wax), GFP_KERNEL); if (!wax) return -ENOMEM; wax->name = "wax"; wax->hpa = dev->hpa.start; wax->version = 0; /* */ printk(KERN_INFO "%s at 0x%lx found.\n", wax->name, wax->hpa); /* */ wax_init_irq(wax); /* */ dev->irq = gsc_claim_irq(&gsc_irq, WAX_GSC_IRQ); if (dev->irq < 0) { printk(KERN_ERR "%s(): cannot get GSC irq\n", __func__); kfree(wax); return -EBUSY; } wax->eim = ((u32) gsc_irq.txn_addr) | gsc_irq.txn_data; ret = request_irq(gsc_irq.irq, gsc_asic_intr, 0, "wax", wax); if (ret < 0) { kfree(wax); return ret; } /* */ gsc_writel(wax->eim, wax->hpa + OFFSET_IAR); /* */ ret = gsc_common_setup(dev, wax); if (ret) { kfree(wax); return ret; } gsc_fixup_irqs(dev, wax, wax_choose_irq); /* */ parent = parisc_parent(dev); if (parent->id.hw_type != HPHW_IOA) { gsc_fixup_irqs(parent, wax, wax_choose_irq); } return ret; } static struct parisc_device_id wax_tbl[] = { { HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0008e }, { 0, } }; MODULE_DEVICE_TABLE(parisc, wax_tbl); struct parisc_driver wax_driver = { .name = "wax", .id_table = wax_tbl, .probe = wax_init_chip, };
/* * IBM Accurate Mathematical Library * Written by International Business Machines Corp. * Copyright (C) 2001-2013 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. */ /************************************************************************/ /* MODULE_NAME: dosincos.h */ /* */ /* */ /* common data and variables definition for BIG or LITTLE ENDIAN */ /************************************************************************/ #ifndef USNCS_H #define USNCS_H #ifdef BIG_ENDI static const mynumber /**/ s1 = {{0xBFC55555, 0x55555555 }}, /* -0.16666666666666666 */ /**/ s2 = {{0x3F811111, 0x11110ECE }}, /* 0.0083333333333323288 */ /**/ s3 = {{0xBF2A01A0, 0x19DB08B8 }}, /* -0.00019841269834414642 */ /**/ s4 = {{0x3EC71DE2, 0x7B9A7ED9 }}, /* 2.755729806860771e-06 */ /**/ s5 = {{0xBE5ADDFF, 0xC2FCDF59 }}, /* -2.5022014848318398e-08 */ /**/ aa = {{0xBFC55580, 0x00000000 }}, /* -0.1666717529296875 */ /**/ bb = {{0x3ED55555, 0x55556E24 }}, /* 5.0862630208387126e-06 */ /**/ big = {{0x42c80000, 0x00000000 }}, /* 52776558133248 */ /**/ hp0 = {{0x3FF921FB, 0x54442D18 }}, /* 1.5707963267948966 */ /**/ hp1 = {{0x3C91A626, 0x33145C07 }}, /* 6.123233995736766e-17 */ /**/ mp1 = {{0x3FF921FB, 0x58000000 }}, /* 1.5707963407039642 */ /**/ mp2 = {{0xBE4DDE97, 0x3C000000 }}, /* -1.3909067564377153e-08 */ /**/ mp3 = {{0xBC8CB3B3, 0x99D747F2 }}, /* -4.9789962505147994e-17 */ /**/ pp3 = {{0xBC8CB3B3, 0x98000000 }}, /* -4.9789962314799099e-17 */ /**/ pp4 = {{0xbacd747f, 0x23e32ed7 }}, /* -1.9034889620193266e-25 */ /**/ hpinv = {{0x3FE45F30, 0x6DC9C883 }}, /* 0.63661977236758138 */ /**/ toint = {{0x43380000, 0x00000000 }}; /* 6755399441055744 */ #else #ifdef LITTLE_ENDI static const mynumber /**/ s1 = {{0x55555555, 0xBFC55555 }},/* -0.16666666666666666 */ /**/ s2 = {{0x11110ECE, 0x3F811111 }},/* 0.0083333333333323288 */ /**/ s3 = {{0x19DB08B8, 0xBF2A01A0 }},/* -0.00019841269834414642 */ /**/ s4 = {{0x7B9A7ED9, 0x3EC71DE2 }},/* 2.755729806860771e-06 */ /**/ s5 = {{0xC2FCDF59, 0xBE5ADDFF }},/* -2.5022014848318398e-08 */ /**/ aa = {{0x00000000, 0xBFC55580 }},/* -0.1666717529296875 */ /**/ bb = {{0x55556E24, 0x3ED55555 }},/* 5.0862630208387126e-06 */ /**/ big = {{0x00000000, 0x42c80000 }},/* 52776558133248 */ /**/ hp0 = {{0x54442D18, 0x3FF921FB }},/* 1.5707963267948966 */ /**/ hp1 = {{0x33145C07, 0x3C91A626 }},/* 6.123233995736766e-17 */ /**/ mp1 = {{0x58000000, 0x3FF921FB }},/* 1.5707963407039642 */ /**/ mp2 = {{0x3C000000, 0xBE4DDE97 }},/* -1.3909067564377153e-08 */ /**/ mp3 = {{0x99D747F2, 0xBC8CB3B3 }},/* -4.9789962505147994e-17 */ /**/ pp3 = {{0x98000000, 0xBC8CB3B3 }},/* -4.9789962314799099e-17 */ /**/ pp4 = {{0x23e32ed7, 0xbacd747f }},/* -1.9034889620193266e-25 */ /**/ hpinv = {{0x6DC9C883, 0x3FE45F30 }},/* 0.63661977236758138 */ /**/ toint = {{0x00000000, 0x43380000 }};/* 6755399441055744 */ #endif #endif #endif
/* linux/arch/arm/plat-s3c/include/plat/sdhci.h * * Copyright 2008 Openmoko, Inc. * Copyright 2008 Simtec Electronics * http://armlinux.simtec.co.uk/ * Ben Dooks <ben@simtec.co.uk> * * S3C Platform - SDHCI (HSMMC) platform data definitions * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #ifndef __PLAT_S3C_SDHCI_H #define __PLAT_S3C_SDHCI_H __FILE__ struct platform_device; struct mmc_host; struct mmc_card; struct mmc_ios; /** * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI * @max_width: The maximum number of data bits supported. * @host_caps: Standard MMC host capabilities bit field. * @cfg_gpio: Configure the GPIO for a specific card bit-width * @cfg_card: Configure the interface for a specific card and speed. This * is necessary the controllers and/or GPIO blocks require the * changing of driver-strength and other controls dependant on * the card and speed of operation. * * Initialisation data specific to either the machine or the platform * for the device driver to use or call-back when configuring gpio or * card speed information. */ struct s3c_sdhci_platdata { unsigned int max_width; unsigned int host_caps; char **clocks; /* set of clock sources */ void (*cfg_gpio)(struct platform_device *dev, int width); void (*cfg_card)(struct platform_device *dev, void __iomem *regbase, struct mmc_ios *ios, struct mmc_card *card); /* add to deal with EXT_IRQ as a card detect pin */ void (*cfg_ext_cd) (void); unsigned int (*detect_ext_cd) (void); unsigned int ext_cd; struct sdhci_host* sdhci_host; }; extern void sdhci_s3c_force_presence_change(struct platform_device *pdev); /** * s3c_sdhci0_set_platdata - Set platform data for S3C SDHCI device. * @pd: Platform data to register to device. * * Register the given platform data for use withe S3C SDHCI device. * The call will copy the platform data, so the board definitions can * make the structure itself __initdata. */ extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd); extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd); extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd); /* Default platform data, exported so that per-cpu initialisation can * set the correct one when there are more than one cpu type selected. */ extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata; extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata; extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata; /* Helper function availablity */ #ifdef CONFIG_S3C6410_SETUP_SDHCI extern char *s3c6410_hsmmc_clksrcs[4]; extern void s3c6410_setup_sdhci0_cfg_gpio(struct platform_device *, int w); extern void s3c6410_setup_sdhci1_cfg_gpio(struct platform_device *, int w); extern void s3c6410_setup_sdhci2_cfg_gpio(struct platform_device *, int w); extern void s3c6410_setup_sdhci0_cfg_card(struct platform_device *dev, void __iomem *r, struct mmc_ios *ios, struct mmc_card *card); #ifdef CONFIG_S3C_DEV_HSMMC static inline void s3c6410_default_sdhci0(void) { s3c_hsmmc0_def_platdata.clocks = s3c6410_hsmmc_clksrcs; s3c_hsmmc0_def_platdata.cfg_gpio = s3c6410_setup_sdhci0_cfg_gpio; s3c_hsmmc0_def_platdata.cfg_card = s3c6410_setup_sdhci0_cfg_card; } #else static inline void s3c6410_default_sdhci0(void) { } #endif /* CONFIG_S3C_DEV_HSMMC */ #ifdef CONFIG_S3C_DEV_HSMMC1 static inline void s3c6410_default_sdhci1(void) { s3c_hsmmc1_def_platdata.clocks = s3c6410_hsmmc_clksrcs; s3c_hsmmc1_def_platdata.cfg_gpio = s3c6410_setup_sdhci1_cfg_gpio; s3c_hsmmc1_def_platdata.cfg_card = s3c6410_setup_sdhci0_cfg_card; } #else static inline void s3c6410_default_sdhci1(void) { } #endif /* CONFIG_S3C_DEV_HSMMC1 */ #ifdef CONFIG_S3C_DEV_HSMMC2 static inline void s3c6410_default_sdhci2(void) { s3c_hsmmc2_def_platdata.clocks = s3c6410_hsmmc_clksrcs; s3c_hsmmc2_def_platdata.cfg_gpio = s3c6410_setup_sdhci2_cfg_gpio; s3c_hsmmc2_def_platdata.cfg_card = s3c6410_setup_sdhci0_cfg_card; } #else static inline void s3c6410_default_sdhci2(void) { } #endif /* CONFIG_S3C_DEV_HSMMC2 */ #else static inline void s3c6410_default_sdhci0(void) { } static inline void s3c6410_default_sdhci1(void) { } static inline void s3c6410_default_sdhci2(void) { } #endif /* CONFIG_S3C6410_SETUP_SDHCI */ #endif /* __PLAT_S3C_SDHCI_H */
/* Copyright 2011 by Marco Martin <mart@kde.org> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef DRAGANDDROPPLUGIN_H #define DRAGANDDROPPLUGIN_H #include <QDeclarativeExtensionPlugin> class DragAndDropPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT public: void registerTypes(const char *uri); }; #endif
/* * This string-include defines all string functions as inline * functions. Use gcc. It also assumes ds=es=data space, this should be * normal. Most of the string-functions are rather heavily hand-optimized, * see especially strtok,strstr,str[c]spn. They should work, but are not * very easy to understand. Everything is done entirely within the register * set, making the functions fast and clean. String instructions have been * used through-out, making for "slightly" unclear code :-) * * NO Copyright (C) 1991, 1992 Linus Torvalds, * consider these trivial functions to be PD. */ /* * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ /* * Modified for uClibc by Erik Andersen <andersen@codepoet.org> * These make no attempt to use nifty things like mmx/3dnow/etc. * These are not inline, and will therefore not be as fast as * modifying the headers to use inlines (and cannot therefore * do tricky things when dealing with const memory). But they * should (I hope!) be faster than their generic equivalents.... * * More importantly, these should provide a good example for * others to follow when adding arch specific optimizations. * -Erik */ #include <string.h> libc_hidden_proto(strcat) char *strcat(char * dest, const char * src) { int d0, d1, d2, d3; __asm__ __volatile__( "repne\n\t" "scasb\n\t" "decl %1\n" "1:\tlodsb\n\t" "stosb\n\t" "testb %%al,%%al\n\t" "jne 1b" : "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3) : "0" (src), "1" (dest), "2" (0), "3" (0xffffffff):"memory"); return dest; } libc_hidden_def(strcat)
// -*- C++ -*- // Module: Log4CPLUS // File: loggerfactory.h // Created: 6/2001 // Author: Tad E. Smith // // // Copyright 2001-2013 Tad E. Smith // // 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. /** @file */ #ifndef LOG4CPLUS_SPI_LOGGER_FACTORY_HEADER #define LOG4CPLUS_SPI_LOGGER_FACTORY_HEADER #include <log4cplus/config.hxx> #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) #pragma once #endif #include <log4cplus/tstring.h> namespace log4cplus { // Forward Declarations class Logger; class Hierarchy; namespace spi { /** * Implement this interface to create new instances of Logger or * a sub-class of Logger. */ class LOG4CPLUS_EXPORT LoggerFactory { public: /** * Creates a new <code>Logger</code> object. */ virtual Logger makeNewLoggerInstance(const log4cplus::tstring& name, Hierarchy& h) = 0; virtual ~LoggerFactory() = 0; }; } // end namespace spi } // end namespace log4cplus #endif // LOG4CPLUS_SPI_LOGGER_FACTORY_HEADER
#pragma once class IVDebugOverlay { public: bool ScreenPosition(const Vector& vIn, Vector& vOut) { typedef bool (* oScreenPosition)(void*, const Vector&, Vector&); return getvfunc<oScreenPosition>(this, 11)(this, vIn, vOut); } };
#ifndef __CR_SYSFS_PARSE_H__ #define __CR_SYSFS_PARSE_H__ #define SYSFS_AUFS "/sys/fs/aufs/" #define SBINFO_LEN (3 + 16 + 1) /* si_%lx */ #define SBINFO_PATH_LEN (sizeof SYSFS_AUFS + SBINFO_LEN) /* /sys/fs/aufs/<sbinfo> */ #define AUFSBR_PATH_LEN (SBINFO_PATH_LEN + 6 + 1) /* /sys/fs/aufs/<sbinfo>/br%3d */ struct mount_info; struct vma_area; extern int parse_aufs_branches(struct mount_info *mi); extern int fixup_aufs_vma_fd(struct vma_area *vma, int vm_file_fd); extern void free_aufs_branches(void); #endif /* __CR_SYSFS_PARSE_H__ */
// // ______ _ _ _ _____ _____ _ __ // | ____| | | (_) | | / ____| __ \| |/ / // | |__ ___| |_ _ _ __ ___ ___ | |_ ___ | (___ | | | | ' / // | __| / __| __| | '_ ` _ \ / _ \| __/ _ \ \___ \| | | | < // | |____\__ \ |_| | | | | | | (_) | || __/ ____) | |__| | . \ // |______|___/\__|_|_| |_| |_|\___/ \__\___| |_____/|_____/|_|\_\ // // // Copyright (c) 2015 Estimote. All rights reserved. #import <Foundation/Foundation.h> #import "ESTSettingReadWrite.h" @class ESTSettingEddystoneUIDEnable; NS_ASSUME_NONNULL_BEGIN /** * Block used as a result of read/write setting Enable operation for Eddystone UID packet. * * @param enabled Enable setting carrying value. * @param error Operation error. No error means success. */ typedef void(^ESTSettingEddystoneUIDEnableCompletionBlock)(ESTSettingEddystoneUIDEnable * _Nullable enabledSetting, NSError * _Nullable error); /** * ESTSettingEddystoneUIDEnable represents Eddystone UID Enable value. */ @interface ESTSettingEddystoneUIDEnable : ESTSettingReadWrite <NSCopying> /** * Designated initializer. * * @param enabled Eddystone UID Enable value. * * @return Initialized object. */ - (instancetype)initWithValue:(BOOL)enabled; /** * Returns current value of Eddystone UID Enable setting. * * @return Eddystone UID Enable value. */ - (BOOL)getValue; /** * Method allows to read value of initialized Eddystone UID Enable setting object. * * @param completion Block to be invoked when operation is complete. * * @return Initialized operation object. */ - (void)readValueWithCompletion:(ESTSettingEddystoneUIDEnableCompletionBlock)completion; /** * Method allows to create write operation from already initialized Eddystone UID Enable setting object. * Value provided during initialization will be used as a desired value. * * @param enabled Enable value to be written to the device. * @param completion Block to be invoked when operation is complete. * * @return Initialized operation object. */ - (void)writeValue:(BOOL)enabled completion:(ESTSettingEddystoneUIDEnableCompletionBlock)completion; @end NS_ASSUME_NONNULL_END
RUN: diagtool list-warnings > %t 2>&1 RUN: FileCheck --input-file=%t %s This test serves two purposes: (1) It documents all existing warnings that currently have no associated -W flag, and ensures that the list never grows. If you take an existing warning and add a flag, this test will fail. To fix this test, simply remove that warning from the list below. (2) It prevents us adding new warnings to Clang that have no -W flag. All new warnings should have -W flags. If you add a new warning without a flag, this test will fail. To fix this test, simply add a warning group to that warning. The list of warnings below should NEVER grow. It should gradually shrink to 0. CHECK: Warnings without flags (74): CHECK-NEXT: ext_excess_initializers CHECK-NEXT: ext_excess_initializers_in_char_array_initializer CHECK-NEXT: ext_expected_semi_decl_list CHECK-NEXT: ext_explicit_specialization_storage_class CHECK-NEXT: ext_initializer_string_for_char_array_too_long CHECK-NEXT: ext_missing_declspec CHECK-NEXT: ext_missing_whitespace_after_macro_name CHECK-NEXT: ext_new_paren_array_nonconst CHECK-NEXT: ext_plain_complex CHECK-NEXT: ext_template_arg_extra_parens CHECK-NEXT: ext_typecheck_cond_incompatible_operands CHECK-NEXT: ext_typecheck_ordered_comparison_of_pointer_integer CHECK-NEXT: ext_using_undefined_std CHECK-NEXT: pp_invalid_string_literal CHECK-NEXT: pp_out_of_date_dependency CHECK-NEXT: pp_poisoning_existing_macro CHECK-NEXT: warn_accessor_property_type_mismatch CHECK-NEXT: warn_arcmt_nsalloc_realloc CHECK-NEXT: warn_asm_label_on_auto_decl CHECK-NEXT: warn_c_kext CHECK-NEXT: warn_call_wrong_number_of_arguments CHECK-NEXT: warn_case_empty_range CHECK-NEXT: warn_char_constant_too_large CHECK-NEXT: warn_collection_expr_type CHECK-NEXT: warn_conflicting_variadic CHECK-NEXT: warn_conv_to_base_not_used CHECK-NEXT: warn_conv_to_self_not_used CHECK-NEXT: warn_conv_to_void_not_used CHECK-NEXT: warn_delete_array_type CHECK-NEXT: warn_double_const_requires_fp64 CHECK-NEXT: warn_drv_assuming_mfloat_abi_is CHECK-NEXT: warn_drv_clang_unsupported CHECK-NEXT: warn_drv_pch_not_first_include CHECK-NEXT: warn_dup_category_def CHECK-NEXT: warn_enum_value_overflow CHECK-NEXT: warn_expected_qualified_after_typename CHECK-NEXT: warn_extraneous_char_constant CHECK-NEXT: warn_fe_cc_log_diagnostics_failure CHECK-NEXT: warn_fe_cc_print_header_failure CHECK-NEXT: warn_fe_macro_contains_embedded_newline CHECK-NEXT: warn_ignoring_ftabstop_value CHECK-NEXT: warn_implements_nscopying CHECK-NEXT: warn_incompatible_qualified_id CHECK-NEXT: warn_inline_namespace_reopened_noninline CHECK-NEXT: warn_invalid_asm_cast_lvalue CHECK-NEXT: warn_maynot_respond CHECK-NEXT: warn_method_param_redefinition CHECK-NEXT: warn_missing_case_for_condition CHECK-NEXT: warn_missing_dependent_template_keyword CHECK-NEXT: warn_missing_whitespace_after_macro_name CHECK-NEXT: warn_mt_message CHECK-NEXT: warn_no_constructor_for_refconst CHECK-NEXT: warn_not_compound_assign CHECK-NEXT: warn_objc_property_copy_missing_on_block CHECK-NEXT: warn_objc_protocol_qualifier_missing_id CHECK-NEXT: warn_on_superclass_use CHECK-NEXT: warn_pp_convert_to_positive CHECK-NEXT: warn_pp_expr_overflow CHECK-NEXT: warn_pp_line_decimal CHECK-NEXT: warn_pragma_pack_pop_identifier_and_alignment CHECK-NEXT: warn_pragma_pack_show CHECK-NEXT: warn_property_getter_owning_mismatch CHECK-NEXT: warn_register_objc_catch_parm CHECK-NEXT: warn_related_result_type_compatibility_class CHECK-NEXT: warn_related_result_type_compatibility_protocol CHECK-NEXT: warn_template_export_unsupported CHECK-NEXT: warn_template_spec_extra_headers CHECK-NEXT: warn_tentative_incomplete_array CHECK-NEXT: warn_typecheck_function_qualifiers CHECK-NEXT: warn_undef_interface CHECK-NEXT: warn_undef_interface_suggest CHECK-NEXT: warn_undef_protocolref CHECK-NEXT: warn_weak_identifier_undeclared CHECK-NEXT: warn_weak_import The list of warnings in -Wpedantic should NEVER grow. CHECK: Number in -Wpedantic (not covered by other -W flags): 27
// // FacebookNativeCustomEvent.h // MoPub // // Copyright (c) 2014 MoPub. All rights reserved. // #if __has_include(<MoPub/MoPub.h>) #import <MoPub/MoPub.h> #else #import "MPNativeCustomEvent.h" #endif /* * Please reference the Supported Mediation Partner page at http://bit.ly/2mqsuFH for the * latest version and ad format certifications. */ @interface FacebookNativeCustomEvent : MPNativeCustomEvent /** * Toggle FB video ads on/off. If it is enabled, it means you are open yourself to video inventory. * If it is not enabled, it is gauranteed you won't get video ads. * * IMPORTANT: If you choose to use this method, be sure to call it before making any ad requests, * and avoid calling it more than once. */ + (void)setVideoEnabled:(BOOL)enabled; @end
/* mbed Microcontroller Library * Copyright (c) 2006-2013 ARM Limited * * 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. */ #ifndef BLE_GAP_ADVERTISINGDATAPARSER_H #define BLE_GAP_ADVERTISINGDATAPARSER_H #include <stdint.h> #include "ble/gap/AdvertisingDataTypes.h" namespace ble { /** * @addtogroup ble * @{ * @addtogroup gap * @{ */ /** * Parse and iterate over advertising data */ class AdvertisingDataParser { enum { DATA_SIZE_INDEX = 0, TYPE_INDEX = 1, VALUE_INDEX = 2, TYPE_SIZE = 1, DATA_SIZE_SIZE = 1 }; public: /** * Representation of an Advertising Data element. */ struct element_t { adv_data_type_t type; mbed::Span<const uint8_t> value; }; /** * Build a parser from an array of bytes. * @param data The data to parse. */ AdvertisingDataParser(mbed::Span<const uint8_t> data) : data(data), position(0) { } /** * Return if there is advertising data element left to parse. */ bool hasNext() const { if (position >= data.size()) { return false; } /* early termination of packet, no more meaningful octets */ if (current_length() == 0) { return false; } if (position + current_length() >= data.size()) { return false; } return true; } /** * Return the next advertising data element. * * @note Calling this function if there is no next element is undefined * behavior. */ element_t next() { element_t element = { (ble::adv_data_type_t::type) data[position + TYPE_INDEX], data.subspan(position + VALUE_INDEX, current_length() - (TYPE_SIZE)) }; position += (DATA_SIZE_SIZE + current_length()); return element; } /** * Reset the parser. */ void reset() { position = 0; } private: uint8_t current_length() const { return data[position + DATA_SIZE_INDEX]; } mbed::Span<const uint8_t> data; size_t position; }; /** * @} * @} */ } // namespace ble #endif //BLE_GAP_ADVERTISINGDATAPARSER_H
/* * Copyright (c) 2011-2014, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation and/or * other materials provided with the distribution. * * 3. Neither the name of the copyright holder nor the names of its contributors * may be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #pragma once #include "ParameterAccessContext.h" #include <string> class CConfigurationAccessContext : public CParameterAccessContext { public: CConfigurationAccessContext(std::string &strError, CParameterBlackboard *pParameterBlackboard, bool bValueSpaceIsRaw, bool bOutputRawFormatIsHex, bool bSerializeOut); CConfigurationAccessContext(std::string &strError, bool bSerializeOut); // Serialization direction bool serializeOut() const; bool serializeSettings() const final { return true; } private: // Serialization direction bool _bSerializeOut; };
// Filename: sedContext.h // Created by: drose (24Oct00) // //////////////////////////////////////////////////////////////////// #ifndef SEDCONTEXT_H #define SEDCONTEXT_H #include "ppremake.h" /////////////////////////////////////////////////////////////////// // Class : SedContext // Description : This contains the current context of the sed process // as it is running: the pattern space, the hold space, // and the current line numbers, etc. It is updated as // each line is read in and as each command is executed. //////////////////////////////////////////////////////////////////// class SedContext { public: SedContext(ostream &out); int _line_number; bool _is_last_line; string _pattern_space; string _hold_space; bool _deleted; ostream &_out; }; #endif
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) #define MINSIGSTKSZ 4096 #define SIGSTKSZ 10240 #endif #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) typedef unsigned long greg_t, gregset_t[27]; typedef struct { unsigned long mask; unsigned long addr; } __psw_t; typedef union { double d; float f; } fpreg_t; typedef struct { unsigned fpc; fpreg_t fprs[16]; } fpregset_t; typedef struct { __psw_t psw; unsigned long gregs[16]; unsigned aregs[16]; fpregset_t fpregs; } mcontext_t; struct sigcontext { unsigned long oldmask[1]; struct { struct { __psw_t psw; unsigned long gprs[16]; unsigned acrs[16]; } regs; struct { unsigned fpc; double fprs[16]; } fpregs; } *sregs; }; #else typedef struct { unsigned long __regs1[18]; unsigned __regs2[18]; double __regs3[16]; } mcontext_t; #endif struct sigaltstack { void *ss_sp; int ss_flags; size_t ss_size; }; typedef struct __ucontext { unsigned long uc_flags; struct __ucontext *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; } ucontext_t; #define SA_NOCLDSTOP 1U #define SA_NOCLDWAIT 2U #define SA_SIGINFO 4U #define SA_ONSTACK 0x08000000U #define SA_RESTART 0x10000000U #define SA_NODEFER 0x40000000U #define SA_RESETHAND 0x80000000U #define SA_RESTORER 0x04000000U #endif #define SIGHUP 1 #define SIGINT 2 #define SIGQUIT 3 #define SIGILL 4 #define SIGTRAP 5 #define SIGABRT 6 #define SIGIOT SIGABRT #define SIGBUS 7 #define SIGFPE 8 #define SIGKILL 9 #define SIGUSR1 10 #define SIGSEGV 11 #define SIGUSR2 12 #define SIGPIPE 13 #define SIGALRM 14 #define SIGTERM 15 #define SIGSTKFLT 16 #define SIGCHLD 17 #define SIGCONT 18 #define SIGSTOP 19 #define SIGTSTP 20 #define SIGTTIN 21 #define SIGTTOU 22 #define SIGURG 23 #define SIGXCPU 24 #define SIGXFSZ 25 #define SIGVTALRM 26 #define SIGPROF 27 #define SIGWINCH 28 #define SIGIO 29 #define SIGPOLL SIGIO #define SIGPWR 30 #define SIGSYS 31 #define SIGUNUSED SIGSYS #define _NSIG 65
/* * Copyright (c) 2016, The OpenThread Authors. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include <stddef.h> #include <stdint.h> #include <stdio.h> #include <string.h> #include <openthread/platform/toolchain.h> #include "test_util.h" uint32_t otNetifAddress_Size_c() { return sizeof(otNetifAddress); } uint32_t otNetifAddress_offset_mNext_c() { return offsetof(otNetifAddress, mNext); } otNetifAddress CreateNetif_c() { otNetifAddress addr; memset(&addr, 0, sizeof(addr)); addr.mScopeOverrideValid = true; return addr; }
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============// // // Purpose: // //=============================================================================// #ifndef GAMETRACE_H #define GAMETRACE_H #ifdef _WIN32 #pragma once #endif #include "cmodel.h" #include "utlvector.h" #include "ihandleentity.h" #include "ispatialpartition.h" #if defined( CLIENT_DLL ) class C_BaseEntity; #else class CBaseEntity; #endif //----------------------------------------------------------------------------- // Purpose: A trace is returned when a box is swept through the world // NOTE: eventually more of this class should be moved up into the base class!! //----------------------------------------------------------------------------- class CGameTrace : public CBaseTrace { public: // Returns true if hEnt points at the world entity. // If this returns true, then you can't use GetHitBoxIndex(). bool DidHitWorld() const; // Returns true if we hit something and it wasn't the world. bool DidHitNonWorldEntity() const; // Gets the entity's network index if the trace has hit an entity. // If not, returns -1. int GetEntityIndex() const; // Returns true if there was any kind of impact at all bool DidHit() const; // The engine doesn't know what a CBaseEntity is, so it has a backdoor to // let it get at the edict. #if defined( ENGINE_DLL ) void SetEdict( edict_t *pEdict ); edict_t* GetEdict() const; #endif public: float fractionleftsolid; // time we left a solid, only valid if we started in solid csurface_t surface; // surface hit (impact surface) int hitgroup; // 0 == generic, non-zero is specific body part short physicsbone; // physics bone hit by trace in studio #if defined( CLIENT_DLL ) C_BaseEntity *m_pEnt; #else CBaseEntity *m_pEnt; #endif // NOTE: this member is overloaded. // If hEnt points at the world entity, then this is the static prop index. // Otherwise, this is the hitbox index. int hitbox; // box hit by trace in studio CGameTrace() {} private: // No copy constructors allowed CGameTrace(const CGameTrace& vOther); }; //----------------------------------------------------------------------------- // Returns true if there was any kind of impact at all //----------------------------------------------------------------------------- inline bool CGameTrace::DidHit() const { return fraction < 1 || allsolid || startsolid; } typedef CGameTrace trace_t; //============================================================================= #define TLD_DEF_LEAF_MAX 256 #define TLD_DEF_ENTITY_MAX 1024 class CTraceListData : public IPartitionEnumerator { public: CTraceListData( int nLeafMax = TLD_DEF_LEAF_MAX, int nEntityMax = TLD_DEF_ENTITY_MAX ) { MEM_ALLOC_CREDIT(); m_nLeafCount = 0; m_aLeafList.SetSize( nLeafMax ); m_nEntityCount = 0; m_aEntityList.SetSize( nEntityMax ); } ~CTraceListData() { m_nLeafCount = 0; m_aLeafList.RemoveAll(); m_nEntityCount = 0; m_aEntityList.RemoveAll(); } void Reset( void ) { m_nLeafCount = 0; m_nEntityCount = 0; } bool IsEmpty( void ) const { return ( m_nLeafCount == 0 && m_nEntityCount == 0 ); } int LeafCount( void ) const { return m_nLeafCount; } int LeafCountMax( void ) const { return m_aLeafList.Count(); } void LeafCountReset( void ) { m_nLeafCount = 0; } int EntityCount( void ) const { return m_nEntityCount; } int EntityCountMax( void ) const { return m_aEntityList.Count(); } void EntityCountReset( void ) { m_nEntityCount = 0; } // For leaves... void AddLeaf( int iLeaf ) { if ( m_nLeafCount >= m_aLeafList.Count() ) { DevMsg( "CTraceListData: Max leaf count along ray exceeded!\n" ); m_aLeafList.AddMultipleToTail( m_aLeafList.Count() ); } m_aLeafList[m_nLeafCount] = iLeaf; m_nLeafCount++; } // For entities... IterationRetval_t EnumElement( IHandleEntity *pHandleEntity ) { if ( m_nEntityCount >= m_aEntityList.Count() ) { DevMsg( "CTraceListData: Max entity count along ray exceeded!\n" ); m_aEntityList.AddMultipleToTail( m_aEntityList.Count() ); } m_aEntityList[m_nEntityCount] = pHandleEntity; m_nEntityCount++; return ITERATION_CONTINUE; } public: int m_nLeafCount; CUtlVector<int> m_aLeafList; int m_nEntityCount; CUtlVector<IHandleEntity*> m_aEntityList; }; #endif // GAMETRACE_H
#include <signal.h> #include <errno.h> #include "syscall.h" int sigaltstack(const stack_t *restrict ss, stack_t *restrict old) { if (ss) { if (!(ss->ss_flags & SS_DISABLE) && ss->ss_size < MINSIGSTKSZ) { errno = ENOMEM; return -1; } if (ss->ss_flags & SS_ONSTACK) { errno = EINVAL; return -1; } } return syscall(SYS_sigaltstack, ss, old); }
/* * linux/fs/nls_gb2312.c */ #include <linux/module.h> #include <linux/kernel.h> #include <linux/string.h> #include <linux/nls.h> #include <linux/errno.h> static struct nls_table *p_nls; static struct nls_table table = { "gb2312", NULL, NULL, NULL, NULL, THIS_MODULE, }; static int __init init_nls_gb2312(void) { p_nls = load_nls("cp936"); if (p_nls) { table.uni2char = p_nls->uni2char; table.char2uni = p_nls->char2uni; table.charset2upper = p_nls->charset2upper; table.charset2lower = p_nls->charset2lower; return register_nls(&table); } return -EINVAL; } static void __exit exit_nls_gb2312(void) { unregister_nls(&table); unload_nls(p_nls); } module_init(init_nls_gb2312) module_exit(exit_nls_gb2312) /* * Overrides for Emacs so that we follow Linus's tabbing style. * Emacs will notice this stuff at the end of the file and automatically * adjust the settings for this buffer only. This must remain at the end * of the file. * --------------------------------------------------------------------------- * Local variables: * c-indent-level: 8 * c-brace-imaginary-offset: 0 * c-brace-offset: -8 * c-argdecl-indent: 8 * c-label-offset: -8 * c-continued-statement-offset: 8 * c-continued-brace-offset: 0 * End: */
/* * This is the source code of Telegram for iOS v. 1.1 * It is licensed under GNU GPL v. 2 or later. * You should have received a copy of the license in this archive (see LICENSE). * * Copyright Peter Iakovlev, 2013. */ /* crypto/rand/rand.h */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes cryptographic software written by * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */ #ifndef HEADER_RAND_H #define HEADER_RAND_H #include <stdlib.h> #include <openssl/ossl_typ.h> #include <openssl/e_os2.h> #if defined(OPENSSL_SYS_WINDOWS) #include <windows.h> #endif #ifdef __cplusplus extern "C" { #endif #if defined(OPENSSL_FIPS) #define FIPS_RAND_SIZE_T size_t #endif /* Already defined in ossl_typ.h */ /* typedef struct rand_meth_st RAND_METHOD; */ struct rand_meth_st { void (*seed)(const void *buf, int num); int (*bytes)(unsigned char *buf, int num); void (*cleanup)(void); void (*add)(const void *buf, int num, double entropy); int (*pseudorand)(unsigned char *buf, int num); int (*status)(void); }; #ifdef BN_DEBUG extern int rand_predictable; #endif int RAND_set_rand_method(const RAND_METHOD *meth); const RAND_METHOD *RAND_get_rand_method(void); #ifndef OPENSSL_NO_ENGINE int RAND_set_rand_engine(ENGINE *engine); #endif RAND_METHOD *RAND_SSLeay(void); void RAND_cleanup(void ); int RAND_bytes(unsigned char *buf,int num); int RAND_pseudo_bytes(unsigned char *buf,int num); void RAND_seed(const void *buf,int num); void RAND_add(const void *buf,int num,double entropy); int RAND_load_file(const char *file,long max_bytes); int RAND_write_file(const char *file); const char *RAND_file_name(char *file,size_t num); int RAND_status(void); int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes); int RAND_egd(const char *path); int RAND_egd_bytes(const char *path,int bytes); int RAND_poll(void); #if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) void RAND_screen(void); int RAND_event(UINT, WPARAM, LPARAM); #endif #ifdef OPENSSL_FIPS void RAND_set_fips_drbg_type(int type, int flags); int RAND_init_fips(void); #endif /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes * made after this point may be overwritten when the script is next run. */ void ERR_load_RAND_strings(void); /* Error codes for the RAND functions. */ /* Function codes. */ #define RAND_F_RAND_GET_RAND_METHOD 101 #define RAND_F_RAND_INIT_FIPS 102 #define RAND_F_SSLEAY_RAND_BYTES 100 /* Reason codes. */ #define RAND_R_ERROR_INITIALISING_DRBG 102 #define RAND_R_ERROR_INSTANTIATING_DRBG 103 #define RAND_R_NO_FIPS_RANDOM_METHOD_SET 101 #define RAND_R_PRNG_NOT_SEEDED 100 #ifdef __cplusplus } #endif #endif
/* * Copyright (c) 2014, NVIDIA CORPORATION. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __TEGRA_PPM_H #define __TEGRA_PPM_H #include <linux/clk.h> #include <linux/fs.h> struct fv_relation; struct fv_relation *fv_relation_create( struct clk *, int, ssize_t, int (*)(struct clk *, long unsigned int)); void fv_relation_destroy(struct fv_relation *); #define TEGRA_PPM_MAX_CORES 4 struct tegra_ppm_params { int n_cores; /* activity factor in nA/MHz (aka fF, femtofarads) */ u32 dyn_consts_n[TEGRA_PPM_MAX_CORES]; /* leakage scaling factor based on number of cores. Expressed permill */ u32 leakage_consts_n[TEGRA_PPM_MAX_CORES]; /* Coefficients to a tricubic model of leakage. Model inputs are: * Voltage in Volts * IDDQ in Amps * Temperature in *deciCelcius* * * This unusual choice of units helps with the accuracy of fixed point * calculations by keeping all of the coefficients near the same order * of magnitude. * * All of the coefficients are expressed as ijk_scaled times their true * value so that they fit nicely in 32-bit integers with minimal * quantization error. */ s32 leakage_consts_ijk[4][4][4]; u32 ijk_scaled; u32 leakage_min; /* minimum leakage current */ }; struct tegra_ppm; struct dt; struct tegra_ppm_params *of_read_tegra_ppm_params(struct device_node *np); struct tegra_ppm *tegra_ppm_create(const char *name, struct fv_relation *fv, struct tegra_ppm_params *params, int iddq_ma, struct dentry *debugfs_dir); void tegra_ppm_destroy(struct tegra_ppm *doomed, struct fv_relation **fv, struct tegra_ppm_params **params); #define TEGRA_PPM_UNITS_MILLIAMPS 0 #define TEGRA_PPM_UNITS_MILLIWATTS 1 unsigned tegra_ppm_get_maxf(struct tegra_ppm *ctx, unsigned int limit, int units, int temp_c, int cores); void tegra_ppm_drop_cache(struct tegra_ppm *ctx); #endif
/* * Copyright (C) 2010, Samsung Electronics Co. Ltd. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #ifndef __MXT224_H__ #define __MXT224_H__ #define MXT224_DEV_NAME "Atmel MXT224" #define MXT224_THRESHOLD 40 #define MXT224_MAX_MT_FINGERS 10 #ifdef CONFIG_TOUCHSCREEN_MXT768E enum { RESERVED_T0 = 0, RESERVED_T1, DEBUG_DELTAS_T2, DEBUG_REFERENCES_T3, DEBUG_SIGNALS_T4, GEN_MESSAGEPROCESSOR_T5, GEN_COMMANDPROCESSOR_T6, GEN_POWERCONFIG_T7, GEN_ACQUISITIONCONFIG_T8, TOUCH_MULTITOUCHSCREEN_T9, TOUCH_SINGLETOUCHSCREEN_T10, TOUCH_XSLIDER_T11, TOUCH_YSLIDER_T12, TOUCH_XWHEEL_T13, TOUCH_YWHEEL_T14, TOUCH_KEYARRAY_T15, PROCG_SIGNALFILTER_T16, PROCI_LINEARIZATIONTABLE_T17, SPT_COMCONFIG_T18, RESERVED_T19, RESERVED_T20, RESERVED_T21, RESERVED_T22, RESERVED_T23, PROCI_ONETOUCHGESTUREPROCESSOR_T24, SPT_SELFTEST_T25, DEBUG_CTERANGE_T26, PROCI_TWOTOUCHGESTUREPROCESSOR_T27, RESERVED_T28, SPT_GPI_T29, SPT_GATE_T30, TOUCH_KEYSET_T31, TOUCH_XSLIDERSET_T32, RESERVED_T33, GEN_MESSAGEBLOCK_T34, SPT_GENERICDATA_T35, RESERVED_T36, DEBUG_DIAGNOSTIC_T37, SPARE_T38, SPARE_T39, PROCI_GRIPSUPPRESSION_T40, SPARE_T41, PROCI_TOUCHSUPPRESSION_T42, SPT_DIGITIZER_T43, SPARE_T44, SPARE_T45, SPT_CTECONFIG_T46, SPARE_T47, PROCG_NOISESUPPRESSION_T48, SPARE_T49, SPARE_T50, RESERVED_T255 = 255, }; #else enum { RESERVED_T0 = 0, RESERVED_T1, DEBUG_DELTAS_T2, DEBUG_REFERENCES_T3, DEBUG_SIGNALS_T4, GEN_MESSAGEPROCESSOR_T5, GEN_COMMANDPROCESSOR_T6, GEN_POWERCONFIG_T7, GEN_ACQUISITIONCONFIG_T8, TOUCH_MULTITOUCHSCREEN_T9, TOUCH_SINGLETOUCHSCREEN_T10, TOUCH_XSLIDER_T11, TOUCH_YSLIDER_T12, TOUCH_XWHEEL_T13, TOUCH_YWHEEL_T14, TOUCH_KEYARRAY_T15, PROCG_SIGNALFILTER_T16, PROCI_LINEARIZATIONTABLE_T17, SPT_COMCONFIG_T18, SPT_GPIOPWM_T19, PROCI_GRIPFACESUPPRESSION_T20, RESERVED_T21, PROCG_NOISESUPPRESSION_T22, TOUCH_PROXIMITY_T23, PROCI_ONETOUCHGESTUREPROCESSOR_T24, SPT_SELFTEST_T25, DEBUG_CTERANGE_T26, PROCI_TWOTOUCHGESTUREPROCESSOR_T27, SPT_CTECONFIG_T28, SPT_GPI_T29, SPT_GATE_T30, TOUCH_KEYSET_T31, TOUCH_XSLIDERSET_T32, RESERVED_T33, GEN_MESSAGEBLOCK_T34, SPT_GENERICDATA_T35, RESERVED_T36, DEBUG_DIAGNOSTIC_T37, SPT_USERDATA_T38, SPARE_T39, PROCI_GRIPSUPPRESSION_T40, SPARE_T41, PROCI_TOUCHSUPPRESSION_T42, SPARE_T43, SPARE_T44, SPARE_T45, SPT_CTECONFIG_T46, PROCI_STYLUS_T47, PROCG_NOISESUPPRESSION_T48, SPARE_T49, SPARE_T50, RESERVED_T255 = 255, }; #endif struct mxt224_platform_data { int max_finger_touches; const u8 **config; const u8 **config_e; int gpio_read_done; int min_x; int max_x; int min_y; int max_y; int min_z; int max_z; int min_w; int max_w; void (*power_on)(void); void (*power_off)(void); void (*register_cb)(void*); void (*read_ta_status)(void*); }; typedef enum { QT_PAGE_UP = 0x01, QT_PAGE_DOWN = 0x02, QT_DELTA_MODE = 0x10, QT_REFERENCE_MODE = 0x11, QT_CTE_MODE = 0x31 }diagnostic_debug_command; #endif
/** * Marlin 3D Printer Firmware * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ /** * Teensy++ 2.0 Breadboard pin assignments (AT90USB1286) * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE! * http://www.pjrc.com/teensy/teensyduino.html * See http://reprap.org/wiki/Printrboard for more info * * CLI build: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make * * DaveX plan for Teensylu/printrboard-type pinouts for a TeensyBreadboard: * (ref teensylu & sprinter) * * USB * GND GND |-----#####-----| +5V ATX +5SB * ATX PS_ON PWM 27 |b7 ##### b6| 26 PWM* Stepper Enable * PWM 0 |d0 b5| 25 PWM* * PWM 1 |d1 b4| 24 PWM * X_MIN 2 |d2 b3| 23 MISO_PIN * Y_MIN 3 |d3 b2| 22 MOSI_PIN * Z_MIN 4 |d4 * * b1| 21 SCK_PIN * 5 |d5 e e b0| 20 SDSS * LED 6 |d6 5 4 e7| 19 * 7 |d7 e6| 18 * LCD RS 8 |e0 | GND * LCD EN 9 |e1 a4 a0 R| AREF * LCD D4 10 |c0 a5 a1 f0| 38 A0 ENC_1 * LCD D5 11 |c1 a6 a2 f1| 39 A1 ENC_2 * LCD D6 12 |c2 a7 a3 f2| 40 A2 ENC_CLK * LCD D6 13 |c3 f3| 41 A3 * Bed Heat PWM 14 |c4 V G R f4| 42 A4 * Extruder Heat PWM 15 |c5 c n S f5| 43 A5 * Fan PWM 16 |c6 c d T f6| 44 A6 Bed TC * 17 |c7 * * * f7| 45 A7 Extruder TC * 4.7k * +5 * ----------------- * * Interior E4: 36, INT4 * Interior E5: 37, INT5 * Interior PA0-7: 28-35 -- Printrboard and Teensylu use these pins for step & direction: * T++ PA Signal Marlin * * Z STEP 32 a4 a0 28 X STEP * Z DIR 33 a5 a1 29 X DIR * E STEP 34 a6 a2 30 Y STEP * E DIR 35 a7 a3 31 Y DIR */ #ifndef __AVR_AT90USB1286__ #error "Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu." #endif #if DISABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS) // use Teensyduino Teensy++2.0 pin assignments instead of Marlin alphabetical. #error "Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config" // (or build from command line) #endif #define BOARD_NAME "Teensy++2.0" #define USBCON 1286 // Disable MarlinSerial etc. #define LARGE_FLASH true // // Limit Switches // #define X_STOP_PIN 2 #define Y_STOP_PIN 3 #define Z_STOP_PIN 4 // // Steppers // #define X_STEP_PIN 28 // 0 Marlin #define X_DIR_PIN 29 // 1 Marlin #define X_ENABLE_PIN 26 #define Y_STEP_PIN 30 // 2 Marlin #define Y_DIR_PIN 31 // 3 #define Y_ENABLE_PIN 26 // Shared w/x #define Z_STEP_PIN 32 // 4 #define Z_DIR_PIN 33 // 5 #define Z_ENABLE_PIN 26 // Shared w/x #define E0_STEP_PIN 34 // 6 #define E0_DIR_PIN 35 // 7 #define E0_ENABLE_PIN 26 // Shared w/x // // Temperature Sensors // #define TEMP_0_PIN 7 // Analog Input (Extruder) #define TEMP_BED_PIN 6 // Analog Input (Bed) // // Heaters / Fans // #define HEATER_0_PIN 15 // 21 // Extruder #define HEATER_BED_PIN 14 // 20 // Bed #define FAN_PIN 16 // 22 // Fan // // Misc. Functions // #define SDSS 20 // 8 #define LED_PIN 6 #define PS_ON_PIN 27 #define CASE_LIGHT_PIN 1 // MUST BE HARDWARE PWM // // LCD / Controller // #if ENABLED(ULTIPANEL) #define LCD_PINS_RS 8 #define LCD_PINS_ENABLE 9 #define LCD_PINS_D4 10 #define LCD_PINS_D5 11 #define LCD_PINS_D6 12 #define LCD_PINS_D7 13 #define BTN_EN1 38 #define BTN_EN2 39 #define BTN_ENC 40 #endif // // M3/M4/M5 - Spindle/Laser Control // #define SPINDLE_LASER_ENABLE_PIN 5 // Pin should have a pullup! #define SPINDLE_LASER_PWM_PIN 0 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 7
/********************************************************************** * SQLGetCursorName * ********************************************************************** * * This code was created by Peter Harvey (mostly during Christmas 98/99). * This code is LGPL. Please ensure that this message remains in future * distributions and uses of this code (thats about all I get out of it). * - Peter Harvey pharvey@codebydesign.com * **********************************************************************/ #include <config.h> #include "driver.h" SQLRETURN SQLGetCursorName( SQLHSTMT hDrvStmt, SQLCHAR *szCursor, SQLSMALLINT nCursorMaxLength, SQLSMALLINT *pnCursorLength ) { HDRVSTMT hStmt = (HDRVSTMT)hDrvStmt; int ci; /* counter variable */ /* SANITY CHECKS */ if ( NULL == hStmt ) return SQL_INVALID_HANDLE; sprintf( hStmt->szSqlMsg, "hStmt = $%08lX", hStmt ); logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg ); if ( NULL == szCursor ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR No cursor name." ); return SQL_ERROR; } /* ** copy cursor name */ strncpy( szCursor, hStmt->szCursorName, nCursorMaxLength ); /* ** set length of transfered data */ ci = strlen( hStmt->szCursorName ); /* if ( NULL != pnCursorLength ) *pnCursorLength = MIN( ci, nCursorMaxLength ); */ if ( nCursorMaxLength < ci ) { logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_SUCCESS_WITH_INFO Cursor was truncated" ); return SQL_SUCCESS_WITH_INFO; } logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" ); return SQL_SUCCESS; }
/* * Copyright 2010-2011 Brian Uechi <buasst@gmail.com> * * This file is part of mochad. * * mochad is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. * * mochad is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with mochad. If not, see <http://www.gnu.org/licenses/>. */ int processcommandline(int fd, char *aLine); void cm15a_encode(int fd, unsigned char * buf, size_t buflen);
// // ViewController.h // adblockfast // // Created by Brian Kennish on 8/19/15. // Copyright © 2015 Rocketship. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end
/* Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef SVGZoomAndPan_h #define SVGZoomAndPan_h #if ENABLE(SVG) #include "PlatformString.h" namespace WebCore { class MappedAttribute; class QualifiedName; class SVGZoomAndPan { public: enum SVGZoomAndPanType { SVG_ZOOMANDPAN_UNKNOWN = 0, SVG_ZOOMANDPAN_DISABLE = 1, SVG_ZOOMANDPAN_MAGNIFY = 2 }; SVGZoomAndPan(); virtual ~SVGZoomAndPan(); unsigned short zoomAndPan() const; virtual void setZoomAndPan(unsigned short zoomAndPan); bool parseMappedAttribute(MappedAttribute*); bool isKnownAttribute(const QualifiedName&); bool parseZoomAndPan(const UChar*& start, const UChar* end); private: unsigned short m_zoomAndPan; }; } // namespace WebCore #endif // ENABLE(SVG) #endif // SVGZoomAndPan_h
/* ------------------------------------------------------------------ * Copyright (C) 1998-2009 PacketVideo * * 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. * ------------------------------------------------------------------- */ /* Pathname: ./include/e_tMP4AudioObjectType.h This file contains enumerated types for MP4 Audio Object Types, as defined in ISO/IEC 14496-3, AMMENDMENT 1 Dated 2000-09-15 ------------------------------------------------------------------------------ */ /*---------------------------------------------------------------------------- ; CONTINUE ONLY IF NOT ALREADY DEFINED ----------------------------------------------------------------------------*/ #ifndef E_TMP4AUDIOOBJECTTYPE_H #define E_TMP4AUDIOOBJECTTYPE_H #ifdef __cplusplus extern "C" { #endif /*---------------------------------------------------------------------------- ; INCLUDES ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- ; MACROS ; Define module specific macros here ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- ; DEFINES ; Include all pre-processor statements here. ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- ; EXTERNAL VARIABLES REFERENCES ; Declare variables used in this module but defined elsewhere ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- ; SIMPLE TYPEDEF'S ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- ; ENUMERATED TYPEDEF'S ----------------------------------------------------------------------------*/ typedef enum eMP4AudioObjectType { MP4AUDIO_NULL = 0, /* */ MP4AUDIO_AAC_MAIN = 1, /* */ MP4AUDIO_AAC_LC = 2, /* LC = Low Complexity */ MP4AUDIO_AAC_SSR = 3, /* SSR = Scalable Sampling Rate */ MP4AUDIO_LTP = 4, /* LTP = Long Term Prediction */ MP4AUDIO_SBR = 5, /* SBR = Spectral Band Replication */ MP4AUDIO_AAC_SCALABLE = 6, /* scales both bitrate and sampling rate */ MP4AUDIO_TWINVQ = 7, /* low bit rate */ MP4AUDIO_CELP = 8, MP4AUDIO_HVXC = 9, /* 10 is reserved */ /* 11 is reserved */ MP4AUDIO_TTSI = 12, /* 13-16 are synthesis and MIDI types */ MP4AUDIO_ER_AAC_LC = 17, /* */ /* 18 is reserved */ MP4AUDIO_ER_AAC_LTP = 19, /* */ MP4AUDIO_ER_AAC_SCALABLE = 20, /* */ MP4AUDIO_ER_TWINVQ = 21, /* */ MP4AUDIO_ER_BSAC = 22, /* */ MP4AUDIO_ER_AAC_LD = 23, /* */ MP4AUDIO_ER_CELP = 24, /* */ MP4AUDIO_ER_HVXC = 25, /* */ MP4AUDIO_ER_HILN = 26, /* */ MP4AUDIO_PARAMETRIC = 27, /* */ MP4AUDIO_PS = 29 /* Explicit Parametric Stereo */ } tMP4AudioObjectType; /*---------------------------------------------------------------------------- ; STRUCTURES TYPEDEF'S ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- ; GLOBAL FUNCTION DEFINITIONS ; Function Prototype declaration ----------------------------------------------------------------------------*/ /* Should not be any function declarations in this file */ /*---------------------------------------------------------------------------- ; END ----------------------------------------------------------------------------*/ #ifdef __cplusplus } #endif #endif /* E_TMP4AUDIOOBJECTTYPE_H */
// // SynthesizeSingleton.h // iTrackSportsBets // // Created by Matt Gallagher on 20/10/08. // Copyright 2008 Matt Gallagher. All rights reserved. // // Permission is given to use this source code file, free of charge, in any // project, commercial or otherwise, entirely at your risk, with the condition // that any redistribution (in part or whole) of source code must retain // this copyright and permission notice. Attribution in compiled projects is // appreciated but not required. // #define SYNTHESIZE_SINGLETON_FOR_CLASS(classname) \ \ static classname *shared##classname = nil; \ \ + (classname *)shared##classname \ { \ @synchronized(self) \ { \ if (shared##classname == nil) \ { \ shared##classname = [[self alloc] init]; \ } \ } \ \ return shared##classname; \ } \ \ + (id)allocWithZone:(NSZone *)zone \ { \ @synchronized(self) \ { \ if (shared##classname == nil) \ { \ shared##classname = [super allocWithZone:zone]; \ return shared##classname; \ } \ } \ \ return nil; \ } \ \ - (id)copyWithZone:(NSZone *)zone \ { \ return self; \ } \ \ - (id)retain \ { \ return self; \ } \ \ - (NSUInteger)retainCount \ { \ return NSUIntegerMax; \ } \ \ - (void)release \ { \ } \ \ - (id)autorelease \ { \ return self; \ }
#include "../src/tcontentheader.h"
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef IOS_CHROME_BROWSER_UI_READING_LIST_READING_LIST_CONSTANTS_H_ #define IOS_CHROME_BROWSER_UI_READING_LIST_READING_LIST_CONSTANTS_H_ #import <UIKit/UIKit.h> // Accessibility identifier for reading list view. extern NSString* const kReadingListViewID; // Accessibility identifier for the badge icon. extern NSString* const kTableViewURLCellFaviconBadgeViewID; // Accessibility identifiers for reading list toolbar buttons. extern NSString* const kReadingListToolbarEditButtonID; extern NSString* const kReadingListToolbarDeleteButtonID; extern NSString* const kReadingListToolbarDeleteAllReadButtonID; extern NSString* const kReadingListToolbarCancelButtonID; extern NSString* const kReadingListToolbarMarkButtonID; // NSUserDefault key to save last time a Messages prompt was shown. extern NSString* const kLastTimeUserShownReadingListMessages; extern NSString* const kLastReadingListEntryAddedFromMessages; extern NSString* const kShouldAnimateReadingListNTPUnreadCountBadge; extern NSString* const kShouldAnimateReadingListOverflowMenuUnreadCountBadge; extern CGFloat const kReadingListUnreadCountBadgeAnimationDuration; // ChromeBrowserState pref key to never show the Reading List Message prompt. extern const char kPrefReadingListMessagesNeverShow[]; #endif // IOS_CHROME_BROWSER_UI_READING_LIST_READING_LIST_CONSTANTS_H_
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2007-2010, Image Engine Design Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // * Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // * Neither the name of Image Engine Design nor the names of any // other contributors to this software may be used to endorse or // promote products derived from this software without specific prior // written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ////////////////////////////////////////////////////////////////////////// #ifndef IECOREPYTHON_NUMERICPARAMETERBINDING_H #define IECOREPYTHON_NUMERICPARAMETERBINDING_H namespace IECorePython { void bindNumericParameter(); } #endif // IECOREPYTHON_NUMERICPARAMETERBINDING_H
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Defines all the command-line switches used by gpu/command_buffer/service/. #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_SWITCHES_H_ #define GPU_COMMAND_BUFFER_SERVICE_GPU_SWITCHES_H_ #include "gpu/config/gpu_switches.h" #include "gpu/gpu_export.h" namespace switches { GPU_EXPORT extern const char kCompileShaderAlwaysSucceeds[]; GPU_EXPORT extern const char kDisableGLErrorLimit[]; GPU_EXPORT extern const char kDisableGLSLTranslator[]; GPU_EXPORT extern const char kDisableShaderNameHashing[]; GPU_EXPORT extern const char kEnableGPUCommandLogging[]; GPU_EXPORT extern const char kEnableGPUDebugging[]; GPU_EXPORT extern const char kEnableGPUServiceLoggingGPU[]; GPU_EXPORT extern const char kEnableGPUDriverDebugLogging[]; GPU_EXPORT extern const char kDisableGpuProgramCache[]; GPU_EXPORT extern const char kEnforceGLMinimums[]; GPU_EXPORT extern const char kForceGpuMemAvailableMb[]; GPU_EXPORT extern const char kForceGpuMemDiscardableLimitMb[]; GPU_EXPORT extern const char kForceMaxTextureSize[]; GPU_EXPORT extern const char kGpuProgramCacheSizeKb[]; GPU_EXPORT extern const char kDisableGpuShaderDiskCache[]; GPU_EXPORT extern const char kEnableThreadedTextureMailboxes[]; GPU_EXPORT extern const char kGLShaderIntermOutput[]; GPU_EXPORT extern const char kUseVulkan[]; GPU_EXPORT extern const char kVulkanImplementationNameNative[]; GPU_EXPORT extern const char kVulkanImplementationNameSwiftshader[]; GPU_EXPORT extern const char kDisableVulkanSurface[]; } // namespace switches #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_SWITCHES_H_
/* * Copyright (C) 2014 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef SVGAnimatedLength_h #define SVGAnimatedLength_h #include "core/svg/SVGLengthTearOff.h" #include "core/svg/properties/SVGAnimatedProperty.h" namespace blink { class SVGAnimatedLength : public SVGAnimatedProperty<SVGLength> { DEFINE_WRAPPERTYPEINFO(); public: static PassRefPtrWillBeRawPtr<SVGAnimatedLength> create(SVGElement* contextElement, const QualifiedName& attributeName, PassRefPtrWillBeRawPtr<SVGLength> initialValue) { return adoptRefWillBeNoop(new SVGAnimatedLength(contextElement, attributeName, initialValue)); } void setDefaultValueAsString(const String&); SVGParsingError setBaseValueAsString(const String&) override; protected: SVGAnimatedLength(SVGElement* contextElement, const QualifiedName& attributeName, PassRefPtrWillBeRawPtr<SVGLength> initialValue) : SVGAnimatedProperty<SVGLength>(contextElement, attributeName, initialValue) { } }; } // namespace blink #endif // SVGAnimatedLength_h
/*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef __mitkToFCameraPMDCamCubeController_h #define __mitkToFCameraPMDCamCubeController_h #include <MitkPMDExports.h> #include "mitkCommon.h" #include "mitkToFCameraPMDController.h" #include "itkObject.h" #include "itkObjectFactory.h" namespace mitk { /** * @brief Interface to the Time-of-Flight (ToF) camera PMD CamCube * * * @ingroup ToFHardware */ class MITKPMD_EXPORT ToFCameraPMDCamCubeController : public ToFCameraPMDController { public: mitkClassMacro( ToFCameraPMDCamCubeController , ToFCameraPMDController ); itkFactorylessNewMacro(Self) itkCloneMacro(Self) /*! \brief opens a connection to the ToF camera and initializes the hardware specific members \return returns whether the connection was successful (true) or not (false) */ virtual bool OpenCameraConnection(); /*! \brief sets an additional distance offset which will be added to all distance values. \param offset offset in m \return returns whether set operation was successful (true) or not (false) */ bool SetDistanceOffset( float offset ); /*! \brief returns the currently applied distance offset in m \param offset offset in m */ float GetDistanceOffset(); /*! \brief Setting the region of interest, the camera is configured to only output a certain area of the image. \param leftUpperCornerX x value of left upper corner of region \param leftUpperCornerX y value of left upper corner of region \param width width of region \param height height of region \return returns whether set operation was successful (true) or not (false) */ bool SetRegionOfInterest( unsigned int leftUpperCornerX, unsigned int leftUpperCornerY, unsigned int width, unsigned int height ); /*! \brief Setting the region of interest, the camera is configured to only output a certain area of the image. \param roi region of interest. roi[0]: x value of left upper corner, roi[1]: y value of left upper corner, roi[2]: width, roi[3]: height \return returns whether set operation was successful (true) or not (false) */ bool SetRegionOfInterest( unsigned int roi[4] ); /*! \brief returns the region of interest currently set \return currently set region of interest. */ unsigned int* GetRegionOfInterest(); /*! \brief sets the exposure mode of the CamCube \param mode exposure mode. 0: normal mode (one exposure), 1: Suppression of motion blur (SMB), minimizes the time needed to capture a distance image from the camera which results in a reduced amount of motion artifact but may lead to increased noise. \return returns whether set operation was successful (true) or not (false) */ bool SetExposureMode( int mode ); /*! \brief Sets the field of view of the camera lens. \param fov field of view in degrees. The default value is 40 degrees. \return returns whether set operation was successful (true) or not (false) */ bool SetFieldOfView( float fov ); /*! \brief Enable/Disable PMD fixed pattern noise (FPN) calibration \param on enabled (true), disabled (false) \return returns whether set operation was successful (true) or not (false) */ bool SetFPNCalibration( bool on ); /*! \brief Enable/Disable PMD fixed pattern phase noise (FPPN) calibration \param on enabled (true), disabled (false) \return returns whether set operation was successful (true) or not (false) */ bool SetFPPNCalibration( bool on ); /*! \brief Enable/Disable PMD linearity calibration \param on enabled (true), disabled (false) \return returns whether set operation was successful (true) or not (false) */ bool SetLinearityCalibration( bool on ); /*! \brief Enable/Disable PMD lens calibration \param on enabled (true), disabled (false) \return returns whether set operation was successful (true) or not (false) */ bool SetLensCalibration( bool on ); protected: virtual void TransformCameraOutput(float* in, float* out, bool isDist); ToFCameraPMDCamCubeController(); ~ToFCameraPMDCamCubeController(); private: }; } //END mitk namespace #endif
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ASH_WINDOW_ROTATION_H_ #define ASH_WINDOW_ROTATION_H_ #include "ash/ash_export.h" #include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "ui/compositor/layer_animation_element.h" #include "ui/gfx/geometry/point.h" namespace ui { class InterpolatedTransform; class Layer; } namespace aura { class RootWindow; } namespace ash { // A window rotation represents a single transition from one window orientation // to another. The intended usage is that a new instance of the class is // created for every transition. It is possible to update the target orientation // in the middle of a transition. class ASH_EXPORT WindowRotation : public ui::LayerAnimationElement { public: // |degrees| are clockwise. |layer| is the target of the animation. Does not // take ownership of |layer|. WindowRotation(int degrees, ui::Layer* layer); ~WindowRotation() override; private: // Generates the intermediate transformation matrices used during the // animation. void InitTransform(ui::Layer* layer); // Implementation of ui::LayerAnimationDelegate void OnStart(ui::LayerAnimationDelegate* delegate) override; bool OnProgress(double t, ui::LayerAnimationDelegate* delegate) override; void OnGetTarget(TargetValue* target) const override; void OnAbort(ui::LayerAnimationDelegate* delegate) override; scoped_ptr<ui::InterpolatedTransform> interpolated_transform_; // The number of degrees to rotate. int degrees_; // The target origin. gfx::Point new_origin_; DISALLOW_COPY_AND_ASSIGN(WindowRotation); }; } // namespace ash #endif // ASH_WINDOW_ROTATION_H_
/* * This file is a part of the open source stm32plus library. * Copyright (c) 2011,2012,2013,2014 Andy Brown <www.andybrown.me.uk> * Please see website for licensing terms. */ #pragma once /* * Useful typedefs to ease the pain of typing out template parameters */ namespace stm32plus { namespace display { /** * Panel traits for the LG KF700 display. The panel is 480x240 pixels in size. */ class LG_KF700 { public: enum { LONG_SIDE = 480, SHORT_SIDE = 240 }; public: template<class TAccessMode> static void initialise(TAccessMode& accessMode); template<class TAccessMode> static void wake(TAccessMode& accessMode); }; /* * Post reset initialisation for the panel */ template<class TAccessMode> inline void LG_KF700::initialise(TAccessMode& accessMode) { // do the startup sequence MillisecondTimer::delay(160); accessMode.writeCommand(hx8352a::TEST_MODE_CONTROL,0x02); // TESTM=1 accessMode.writeCommand(hx8352a::VDDD_CONTROL,0x02); // VDC_SEL=010. accessMode.writeCommand(hx8352a::SOURCE_GAMMA_RESISTOR_1,0x00); // STBA[15:8]=0x00 accessMode.writeCommand(hx8352a::SOURCE_GAMMA_RESISTOR_2,0xB3); // STBA[7]=1, STBA[5:4]=11, STBA[1:0]=11 accessMode.writeCommand(hx8352a::TEST_MODE_CONTROL,0x00); // TESTM=0 // Power Supply Setting accessMode.writeCommand(hx8352a::OSC_CONTROL_1,0x91); // RADJ=0, OSC_EN=1 (100%) accessMode.writeCommand(hx8352a::DISPLAY_CONTROL_1,0x01); // TE ON accessMode.writeCommand(hx8352a::CYCLE_CONTROL_1,0x14); // N_DCDC=0x14 MillisecondTimer::delay(20); accessMode.writeCommand(hx8352a::POWER_CONTROL_3,0x13); // BT=0001, AP=100 accessMode.writeCommand(hx8352a::POWER_CONTROL_2,0x11); // VC3=001, VC1=001 (VLCD/DDVDH)=6.45V) accessMode.writeCommand(hx8352a::POWER_CONTROL_4,0x0); // gamma x2.8 accessMode.writeCommand(hx8352a::POWER_CONTROL_5,0x08); // VBGP=1111 accessMode.writeCommand(hx8352a::VCOM_CONTROL,0x3B); // VCM=011_1011 MillisecondTimer::delay(30); accessMode.writeCommand(hx8352a::POWER_CONTROL_1,0x0A); // GASENB=0, PON=0, DK=1, XDK=0, VLCD_TRI=1, STB=0 accessMode.writeCommand(hx8352a::POWER_CONTROL_1,0x1A); // GASENB=0, PON=1, DK=1, XDK=0, VLCD_TRI=1, STB=0 MillisecondTimer::delay(50); accessMode.writeCommand(hx8352a::POWER_CONTROL_1,0x12); // GASENB=0, PON=1, DK=0, XDK=0, VLCD_TRI=1, STB=0, // VLCD=2XVCI by 2 CAPs MillisecondTimer::delay(50); accessMode.writeCommand(hx8352a::POWER_CONTROL_6,0x2E); // VCOMG=1, VDV=0_1110 //VCOMG NEW LOCATION accessMode.writeCommand(hx8352a::TEST_MODE_CONTROL,0x02); // TESTM=1 accessMode.writeCommand(0x93,0x10); // R93[4]=1, VCOMG=1 ...undocumented!!! accessMode.writeCommand(hx8352a::TEST_MODE_CONTROL,0x00); // DGC Function disabled accessMode.writeCommand(0x5A,0x00); // Display ON Setting accessMode.writeCommand(hx8352a::SOURCE_CONTROL_1,0xFF); // N_SAP=0111 1111 accessMode.writeCommand(hx8352a::SOURCE_CONTROL_2,0x0E); // I_SAP=0000 1110 accessMode.writeCommand(hx8352a::CYCLE_CONTROL_10,0x38); // EQS=1000 0111 accessMode.writeCommand(hx8352a::CYCLE_CONTROL_11,0x38); // EQP=0011 1000 accessMode.writeCommand(hx8352a::DISPLAY_CONTROL_2,0x38); // GON=1, DTE=1, D=10 MillisecondTimer::delay(50); accessMode.writeCommand(hx8352a::DISPLAY_CONTROL_2,0x3C); // GON=1, DTE=1, D=11 accessMode.writeCommand(hx8352a::DISPLAY_MODE_CONTROL,0x02); // INVON=0, NORNO=1 } /** * Wake the panel up from standby mode. Only a subset of the initialisation sequence is actually * required but we'll save some code and just call initialise() again to bring it back to life. * @param accessMode The access mode */ template<class TAccessMode> inline void LG_KF700::wake(TAccessMode& accessMode) { initialise(accessMode); } } }
/*=========================================================================== Copyright (c) 1998-2000, The Santa Cruz Operation All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: *Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. *Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. *Neither name of The Santa Cruz Operation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =========================================================================*/ /* cscope - interactive C symbol cross-reference * * file editing functions */ #include "global.h" #if defined(USE_NCURSES) && !defined(RENAMED_NCURSES) #include <ncurses.h> #else #include <curses.h> #endif static char const rcsid[] = "$Id: edit.c,v 1.7 2009/04/10 13:39:23 broeker Exp $"; /* edit this displayed reference */ void editref(int i) { char file[PATHLEN + 1]; /* file name */ char linenum[NUMLEN + 1]; /* line number */ /* verify that there is a references found file */ if (refsfound == NULL) { return; } /* get the selected line */ seekline(i + topline); /* get the file name and line number */ if (fscanf(refsfound, "%" PATHLEN_STR "s%*s%" NUMLEN_STR "s", file, linenum) == 2) { edit(file, linenum); /* edit it */ } seekline(topline); /* restore the line pointer */ } /* edit all references */ void editall(void) { char file[PATHLEN + 1]; /* file name */ char linenum[NUMLEN + 1]; /* line number */ int c; /* verify that there is a references found file */ if (refsfound == NULL) { return; } /* get the first line */ seekline(1); /* get each file name and line number */ while (fscanf(refsfound, "%" PATHLEN_STR "s%*s%" NUMLEN_STR "s%*[^\n]", file, linenum) == 2) { edit(file, linenum); /* edit it */ if (editallprompt == YES) { addstr("Type ^D to stop editing all lines, or any other character to continue: "); if ((c = mygetch()) == EOF || c == ctrl('D') || c == ctrl('Z')) { break; } } } seekline(topline); } /* call the editor */ void edit(char *file, char *linenum) { char msg[MSGLEN + 1]; /* message */ char plusnum[NUMLEN + 20]; /* line number option: allow space for wordy line# flag */ char *s; file = filepath(file); (void) snprintf(msg, sizeof(msg), "%s +%s %s", mybasename(editor), linenum, file); postmsg(msg); (void) snprintf(plusnum, sizeof(plusnum), lineflag, linenum); /* if this is the more or page commands */ if (strcmp(s = mybasename(editor), "more") == 0 || strcmp(s, "page") == 0) { /* get it to pause after displaying a file smaller than the screen length */ (void) execute(editor, editor, plusnum, file, "/dev/null", NULL); } else if (lineflagafterfile) { (void) execute(editor, editor, file, plusnum, NULL); } else { (void) execute(editor, editor, plusnum, file, NULL); } clear(); /* redisplay screen */ } /* if requested, prepend a path to a relative file name */ char * filepath(char *file) { static char path[PATHLEN + 1]; if (prependpath != NULL && *file != '/' #ifdef WIN32 && *file != '\\' && *file != '\0' && file[1] != ':' #endif ) { (void) snprintf(path, sizeof(path), "%s/%s", prependpath, file); file = path; } return(file); }
/* Copyright ©2007-2010 Kris Maglione <maglione.k at Gmail> * See LICENSE file for license details. */ #include "../x11.h" int mapwin(Window *w) { assert(w->type == WWindow); if(!w->mapped) { XMapWindow(display, w->xid); w->mapped = 1; return 1; } return 0; }
#import <Foundation/Foundation.h> #import "YapDatabaseExtension.h" #import "YapDatabaseViewTypes.h" #import "YapDatabaseViewOptions.h" #import "YapDatabaseViewConnection.h" #import "YapDatabaseViewTransaction.h" #import "YapDatabaseViewMappings.h" #import "YapDatabaseViewChange.h" #import "YapDatabaseViewRangeOptions.h" NS_ASSUME_NONNULL_BEGIN /** * Welcome to YapDatabase! * * https://github.com/yapstudios/YapDatabase * * The project wiki has a wealth of documentation if you have any questions. * https://github.com/yapstudios/YapDatabase/wiki * * YapDatabaseView is an extension designed to work with YapDatabase. * It gives you a persistent sorted "view" of a configurable subset of your data. * * For the full documentation on Views, please see the related wiki article: * https://github.com/yapstudios/YapDatabase/wiki/Views **/ @interface YapDatabaseView : YapDatabaseExtension /** * See the wiki for an example of how to initialize a view: * https://github.com/yapstudios/YapDatabase/wiki/Views#wiki-initializing_a_view * * @param grouping * * The grouping block handles both filtering and grouping. * There are multiple groupingBlock types that are supported. * * @see YapDatabaseViewTypes.h for block type definitions. * * @param sorting * * The sorting block handles sorting of objects within their group. * There are multiple sortingBlock types that are supported. * * @see YapDatabaseViewTypes.h for block type definitions. * * @param versionTag * * If, after creating a view, you need to change either the groupingBlock or sortingBlock, * then simply use the versionTag parameter. If you pass a versionTag that is different from the last * initialization of the view, then the view will automatically flush its tables, and re-populate itself. * * @param options * * The options allow you to specify things like creating an in-memory-only view (non persistent). **/ - (instancetype)initWithGrouping:(YapDatabaseViewGrouping *)grouping sorting:(YapDatabaseViewSorting *)sorting; - (instancetype)initWithGrouping:(YapDatabaseViewGrouping *)grouping sorting:(YapDatabaseViewSorting *)sorting versionTag:(nullable NSString *)versionTag; - (instancetype)initWithGrouping:(YapDatabaseViewGrouping *)grouping sorting:(YapDatabaseViewSorting *)sorting versionTag:(nullable NSString *)versionTag options:(nullable YapDatabaseViewOptions *)options; @property (nonatomic, strong, readonly) YapDatabaseViewGrouping *grouping; @property (nonatomic, strong, readonly) YapDatabaseViewSorting *sorting; /** * The versionTag assists you in updating your blocks. * * If you need to change the groupingBlock or sortingBlock, * then simply pass a different versionTag during the init method, and the view will automatically update itself. * * If you want to keep things simple, you can use something like @"1", * representing version 1 of my groupingBlock & sortingBlock. * * For more advanced applications, you may also include within the versionTag string: * - localization information (if you're using localized sorting routines) * - configuration information (if your sorting routine is based on some in-app configuration) * * For example, if you're sorting strings using a localized string compare method, then embedding the localization * information into your versionTag means the view will automatically re-populate itself (re-sort) * if the user launches the app in a different language than last time. * * NSString *localeIdentifier = [[NSLocale currentLocale] localeIdentifier]; * NSString *versionTag = [NSString stringWithFormat:@"1-%@", localeIdentifier]; * * The groupingBlock/sortingBlock/versionTag can me changed after the view has been created. * See YapDatabaseViewTransaction(ReadWrite). * * Note: * - [YapDatabaseView versionTag] = versionTag of most recent commit * - [YapDatabaseViewTransaction versionTag] = versionTag of this commit **/ @property (nonatomic, copy, readonly) NSString *versionTag; /** * The options allow you to specify things like creating an in-memory-only view (non persistent). **/ @property (nonatomic, copy, readonly) YapDatabaseViewOptions *options; /** * Allows you to fetch the versionTag from a view that was registered during the last app launch. * * For example, let's say you have a view that sorts contacts. * And you support 2 different sort options: * - First, Last * - Last, First * * To support this, you use 2 different versionTags: * - "First,Last" * - "Last,First" * * And you want to ensure that when you first register the view (during app launch), * you choose the same block & versionTag from a previous app launch (if possible). * This prevents the view from enumerating the database & re-populating itself * during registration if the versionTag is different from last time. * * So you can use this method to fetch the previous versionTag. **/ + (NSString *)previousVersionTagForRegisteredViewName:(NSString *)name withTransaction:(YapDatabaseReadTransaction *)transaction; @end NS_ASSUME_NONNULL_END
/* Copyright ©2008-2010 Kris Maglione <maglione.k at Gmail> * See LICENSE file for license details. */ #include <ctype.h> #include <string.h> #include <stuff/util.h> #define strbcmp(str, const) (strncmp((str), (const), sizeof(const)-1)) int getbase(const char **s, long *sign) { const char *p; int ret; ret = 10; *sign = 1; if(**s == '-') { *sign = -1; *s += 1; }else if(**s == '+') *s += 1; p = *s; if(!strbcmp(p, "0x")) { *s += 2; ret = 16; } else if(isdigit(p[0])) { if(p[1] == 'r') { *s += 2; ret = p[0] - '0'; } else if(isdigit(p[1]) && p[2] == 'r') { *s += 3; ret = 10*(p[0]-'0') + (p[1]-'0'); } } else if(p[0] == '0') { ret = 8; } if(ret != 10 && (**s == '-' || **s == '+')) *sign = 0; return ret; }
#ifndef __YAFFS_FSX_H__ #define __YAFFS_FSX_H__ int yaffs_fsx_main(const char *mountpt,int n_cycles); int yaffs_fsx_init(const char *mountpt); int yaffs_fsx_complete(void); void yaffs_fsx_do_op(void); #endif
// -*- C++ -*- /** * \file numpunct_lyx_char_type.h * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * * \author Peter Kümmel * * Full author contact details are available in file CREDITS. */ #ifndef LYX_NUMPUNCT_LYX_CHAR_TYPE_H #define LYX_NUMPUNCT_LYX_CHAR_TYPE_H #include <locale> namespace std { template<> class numpunct<lyx::char_type> : public numpunct<char> { public: typedef lyx::char_type char_type; typedef basic_string<lyx::char_type> string_type; static locale::id id; explicit numpunct(size_t __refs = 0) : numpunct<char>(__refs) {} char_type decimal_point() const { return numpunct<char>::decimal_point(); } char_type thousands_sep() const { return numpunct<char>::thousands_sep(); } string grouping() const { return numpunct<char>::grouping(); } string_type truename() const { return lyx::from_ascii(numpunct<char>::truename()); } string_type falsename() const { return lyx::from_ascii(numpunct<char>::falsename()); } protected: virtual ~numpunct(); }; // Fixed in VC11: // http://connect.microsoft.com/VisualStudio/feedback/details/572376/msvc10-c-std-numpunct-has-a-hardcoded-dllimport-in-definition } #endif
/* Stub for common/downtime.c */ unsigned long next_downtime_id = 0; int schedule_downtime(int type, char *host_name, char *service_description, time_t entry_time, char *author, char *comment_data, time_t start_time, time_t end_time, int fixed, unsigned long triggered_by, unsigned long duration, unsigned long *new_downtime_id) {} int unschedule_downtime(int type, unsigned long downtime_id) {} int check_pending_flex_host_downtime(host *hst) {} int check_pending_flex_service_downtime(service *svc) { return OK; } int handle_scheduled_downtime_by_id(unsigned long downtime_id) { return OK; } int check_for_expired_downtime(void) { return OK; }
/* { dg-require-effective-target arm_v8_1m_mve_ok } */ /* { dg-add-options arm_v8_1m_mve } */ /* { dg-additional-options "-O2" } */ #include "arm_mve.h" uint32x4_t foo (uint32_t a, mve_pred16_t p) { return vdupq_x_n_u32 (a, p); } /* { dg-final { scan-assembler "vpst" } } */ /* { dg-final { scan-assembler "vdupt.32" } } */
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_POWER_PROCESS_POWER_COLLECTOR_H_ #define CHROME_BROWSER_POWER_PROCESS_POWER_COLLECTOR_H_ #include <map> #include "base/memory/linked_ptr.h" #include "base/process/process_handle.h" #include "base/process/process_metrics.h" #include "base/timer/timer.h" #include "components/power/origin_power_map_factory.h" #include "url/gurl.h" #if defined(OS_CHROMEOS) #include "chromeos/dbus/power_manager_client.h" #endif class Profile; namespace content { class RenderProcessHost; } #if defined(OS_CHROMEOS) namespace power_manager { class PowerSupplyProperties; } #endif // Manages regular updates of the profile power consumption. class ProcessPowerCollector #if defined(OS_CHROMEOS) : public chromeos::PowerManagerClient::Observer #endif { public: class PerProcessData { public: PerProcessData(scoped_ptr<base::ProcessMetrics> metrics, const GURL& origin, Profile* profile); PerProcessData(); ~PerProcessData(); base::ProcessMetrics* metrics() const { return metrics_.get(); } Profile* profile() const { return profile_; } GURL last_origin() const { return last_origin_; } int last_cpu_percent() const { return last_cpu_percent_; } bool seen_this_cycle() const { return seen_this_cycle_; } void set_last_cpu_percent(double new_cpu) { last_cpu_percent_ = new_cpu; } void set_seen_this_cycle(bool seen) { seen_this_cycle_ = seen; } private: // |metrics_| holds the ProcessMetrics information for the given process. scoped_ptr<base::ProcessMetrics> metrics_; // |profile| is the profile that is visiting the |last_origin_|. // It is not owned by PerProcessData. Profile* profile_; // |last_origin_| is the last origin visited by the process. GURL last_origin_; // |last_cpu_percent_| is the proportion of the CPU used since the last // query. double last_cpu_percent_; // |seen_this_cycle| represents if the process still exists in this cycle. // If it doesn't, we erase the PerProcessData. bool seen_this_cycle_; DISALLOW_COPY_AND_ASSIGN(PerProcessData); }; // A map from all process handles to a metric. typedef std::map<base::ProcessHandle, linked_ptr<PerProcessData> > ProcessMetricsMap; // A callback used to define mock CPU usage for testing. typedef base::Callback<double(base::ProcessHandle)> CpuUsageCallback; // On Chrome OS, can only be initialized after the DBusThreadManager has been // initialized. ProcessPowerCollector(); // On Chrome OS, can only be destroyed before DBusThreadManager is. virtual ~ProcessPowerCollector(); void set_cpu_usage_callback_for_testing(const CpuUsageCallback& callback) { cpu_usage_callback_ = callback; } ProcessMetricsMap* metrics_map_for_testing() { return &metrics_map_; } #if defined(OS_CHROMEOS) // PowerManagerClient::Observer implementation: virtual void PowerChanged( const power_manager::PowerSupplyProperties& prop) override; #endif // Begin periodically updating the power consumption numbers by profile. void Initialize(); // Calls UpdatePowerConsumption() and returns the total CPU percent. double UpdatePowerConsumptionForTesting(); private: // Starts the timer for updating the power consumption. void StartTimer(); // Calls SynchronizerProcesses() and RecordCpuUsageByOrigin() to update the // |metrics_map_| and attribute power consumption. Invoked by |timer_| and as // a helper method for UpdatePowerConsumptionForTesting(). double UpdatePowerConsumption(); // Calls UpdatePowerConsumption(). Invoked by |timer_|. void HandleUpdateTimeout(); // Synchronizes the currently active processes to the |metrics_map_| and // returns the total amount of cpu usage in the cycle. double SynchronizeProcesses(); // Attributes the power usage to the profiles and origins using the // information from SynchronizeProcesses() given a total amount // of CPU used in this cycle, |total_cpu_percent|. void RecordCpuUsageByOrigin(double total_cpu_percent); // Adds the information from a given RenderProcessHost to the |metrics_map_| // for a given origin. Called by SynchronizeProcesses(). void UpdateProcessInMap(const content::RenderProcessHost* render_process, const GURL& origin); ProcessMetricsMap metrics_map_; base::RepeatingTimer<ProcessPowerCollector> timer_; // Callback to use to get CPU usage if set. CpuUsageCallback cpu_usage_callback_; // The factor to scale the CPU usage by. double scale_factor_; DISALLOW_COPY_AND_ASSIGN(ProcessPowerCollector); }; #endif // CHROME_BROWSER_POWER_PROCESS_POWER_COLLECTOR_H_
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef IOS_CHROME_BROWSER_UI_SIDE_SWIPE_SWIPE_VIEW_H_ #define IOS_CHROME_BROWSER_UI_SIDE_SWIPE_SWIPE_VIEW_H_ #import <UIKit/UIKit.h> @interface SwipeView : UIView // Space reserved at the top for the toolbar. @property(nonatomic, assign) CGFloat topMargin; - (instancetype)initWithFrame:(CGRect)frame topMargin:(CGFloat)topMargin; - (void)setTopToolbarImage:(UIImage*)image; - (void)setImage:(UIImage*)image; - (void)setBottomToolbarImage:(UIImage*)image; @end #endif // IOS_CHROME_BROWSER_UI_SIDE_SWIPE_SWIPE_VIEW_H_
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef GIN_TEST_V8_TEST_H_ #define GIN_TEST_V8_TEST_H_ #include "base/compiler_specific.h" #include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "testing/gtest/include/gtest/gtest.h" #include "v8/include/v8.h" namespace gin { class IsolateHolder; // V8Test is a simple harness for testing interactions with V8. V8Test doesn't // have any dependencies on Gin's module system. class V8Test : public testing::Test { public: V8Test(); ~V8Test() override; void SetUp() override; void TearDown() override; protected: base::MessageLoop message_loop_; scoped_ptr<IsolateHolder> instance_; v8::Persistent<v8::Context> context_; private: DISALLOW_COPY_AND_ASSIGN(V8Test); }; } // namespace gin #endif // GIN_TEST_V8_TEST_H_
/* * (C) Copyright 2013 * Emcraft Systems, <www.emcraft.com> * Vladimir Skvortsov <vskvortsov@emcraft.com> * * See file CREDITS for list of people who contributed to this * project. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ #include <linux/init.h> #include <linux/spinlock.h> #include <asm/io.h> #include <mach/gpio.h> /* * GPIO registers map */ #define MSS_GPIO_CFG 0x40013000 #define MSS_GPIO_IRQ 0x40013080 #define MSS_GPIO_IN 0x40013084 #define MSS_GPIO_OUT 0x40013088 #define FPGA_GPIO_CFG CONFIG_A2F_FPGA_GPIO_ADDR #define FPGA_GPIO_IRQ (FPGA_GPIO_CFG + 0x80) #define FPGA_GPIO_IN (FPGA_GPIO_CFG + 0x90) #define FPGA_GPIO_OUT (FPGA_GPIO_CFG + 0xa0) #define FPGA_GPIO_BASE 32 /* Base number of the FPGA GPIOs in Linux */ #define A2F_GPIO_CFG(base, port) ((base) + ((port) << 2)) /* * GPIO configuration register bits */ #define GPIO_OUT_REG_EN (1 << 0) #define GPIO_IN_REG_EN (1 << 1) #define GPIO_OUT_BUF_EN (1 << 2) #define GPIO_INT_EN (1 << 3) struct a2f_gpio_chip { struct gpio_chip chip; u32 gpio_cfg; u32 gpio_irq; u32 gpio_in; u32 gpio_out; spinlock_t lock; }; /* * Get the current state of a GPIO input pin */ static int a2f_gpio_get_value(struct gpio_chip *chip, unsigned gpio) { struct a2f_gpio_chip *a2f_chip = container_of(chip, struct a2f_gpio_chip, chip); return (readl(a2f_chip->gpio_in) >> gpio) & 1; } /* * Change the direction of a GPIO pin to input */ static int a2f_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) { struct a2f_gpio_chip *a2f_chip = container_of(chip, struct a2f_gpio_chip, chip); u32 gpio_cfg; unsigned long f; spin_lock_irqsave(&a2f_chip->lock, f); gpio_cfg = readl(A2F_GPIO_CFG(a2f_chip->gpio_cfg, gpio)); gpio_cfg |= GPIO_IN_REG_EN; gpio_cfg &= ~(GPIO_OUT_REG_EN | GPIO_OUT_BUF_EN); writel(gpio_cfg, A2F_GPIO_CFG(a2f_chip->gpio_cfg, gpio)); spin_unlock_irqrestore(&a2f_chip->lock, f); return 0; } /* * Set the state of a GPIO output pin */ static void a2f_gpio_set_value_locked(struct a2f_gpio_chip *a2f_chip, unsigned gpio, int value) { u32 gpio_out = readl(a2f_chip->gpio_out); if (value) { gpio_out |= 1 << gpio; } else { gpio_out &= ~(1 << gpio); } writel(gpio_out, a2f_chip->gpio_out); } static void a2f_gpio_set_value(struct gpio_chip *chip, unsigned gpio, int value) { struct a2f_gpio_chip *a2f_chip = container_of(chip, struct a2f_gpio_chip, chip); unsigned long f; spin_lock_irqsave(&a2f_chip->lock, f); a2f_gpio_set_value_locked(a2f_chip, gpio, value); spin_unlock_irqrestore(&a2f_chip->lock, f); } /* * Change the direction of a GPIO pin to output and * set the level on this pin. */ static int a2f_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int level) { struct a2f_gpio_chip *a2f_chip = container_of(chip, struct a2f_gpio_chip, chip); u32 gpio_cfg; unsigned long f; spin_lock_irqsave(&a2f_chip->lock, f); gpio_cfg = readl(A2F_GPIO_CFG(a2f_chip->gpio_cfg, gpio)); gpio_cfg |= GPIO_OUT_REG_EN | GPIO_OUT_BUF_EN; gpio_cfg &= ~(GPIO_IN_REG_EN); writel(0, A2F_GPIO_CFG(a2f_chip->gpio_cfg, gpio)); a2f_gpio_set_value_locked(a2f_chip, gpio, level); writel(gpio_cfg, A2F_GPIO_CFG(a2f_chip->gpio_cfg, gpio)); spin_unlock_irqrestore(&a2f_chip->lock, f); return 0; } #if defined (CONFIG_A2F_MSS_GPIO) static struct a2f_gpio_chip mss_gpio_chip = { .chip = { .label = "mss_gpio", .direction_input = a2f_gpio_direction_input, .get = a2f_gpio_get_value, .direction_output = a2f_gpio_direction_output, .set = a2f_gpio_set_value, .base = 0, .ngpio = 32, .can_sleep = 0, }, .gpio_cfg = MSS_GPIO_CFG, .gpio_irq = MSS_GPIO_IRQ, .gpio_in = MSS_GPIO_IN, .gpio_out = MSS_GPIO_OUT, .lock = SPIN_LOCK_UNLOCKED, }; #endif #if defined (CONFIG_A2F_FPGA_GPIO) static struct a2f_gpio_chip fpga_gpio_chip = { .chip = { .label = "fpga_gpio", .direction_input = a2f_gpio_direction_input, .get = a2f_gpio_get_value, .direction_output = a2f_gpio_direction_output, .set = a2f_gpio_set_value, .base = FPGA_GPIO_BASE, .ngpio = 32, .can_sleep = 0, }, .gpio_cfg = FPGA_GPIO_CFG, .gpio_irq = FPGA_GPIO_IRQ, .gpio_in = FPGA_GPIO_IN, .gpio_out = FPGA_GPIO_OUT, .lock = SPIN_LOCK_UNLOCKED, }; #endif void __init a2f_gpio_init(void) { #if defined (CONFIG_A2F_MSS_GPIO) if (gpiochip_add(&mss_gpio_chip.chip) < 0) { pr_err("%s: gpiochip_add failed.\n", __func__); } #endif #if defined (CONFIG_A2F_FPGA_GPIO) if (gpiochip_add(&fpga_gpio_chip.chip) < 0) { pr_err("%s: gpiochip_add failed.\n", __func__); } #endif }
/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #ifndef __MSM_CHARGER_H__ #define __MSM_CHARGER_H__ #include <linux/power_supply.h> enum { CHG_TYPE_USB, CHG_TYPE_AC }; enum msm_hardware_charger_event { CHG_INSERTED_EVENT, CHG_ENUMERATED_EVENT, CHG_REMOVED_EVENT, CHG_DONE_EVENT, CHG_BATT_BEGIN_FAST_CHARGING, CHG_BATT_CHG_RESUME, CHG_BATT_TEMP_OUTOFRANGE, CHG_BATT_TEMP_INRANGE, CHG_BATT_INSERTED, CHG_BATT_REMOVED, CHG_BATT_STATUS_CHANGE, //#ifdef CONFIG_LGE_PM_BATTERY_ALARM CHG_BATT_REMOVE_EVENT, /* [LGE_UPDAET : for battery remove] */ //#endif CHG_BATT_REFRESH_EVENT, /* [LGE_UPDATE: for Fuel Gauge BUG] */ CHG_BATT_NEEDS_RECHARGING, }; /** * enum hardware_charger_state * @CHG_ABSENT_STATE: charger cable is unplugged * @CHG_PRESENT_STATE: charger cable is plugged but charge current isnt drawn * @CHG_READY_STATE: charger cable is plugged and kernel knows how much current * it can draw * @CHG_CHARGING_STATE: charger cable is plugged and current is drawn for * charging */ enum msm_hardware_charger_state { CHG_ABSENT_STATE, CHG_PRESENT_STATE, CHG_READY_STATE, CHG_CHARGING_STATE, }; struct msm_hardware_charger { int type; int rating; const char *name; int (*start_charging) (struct msm_hardware_charger *hw_chg, int chg_voltage, int chg_current); int (*stop_charging) (struct msm_hardware_charger *hw_chg); int (*charging_switched) (struct msm_hardware_charger *hw_chg); void (*start_system_current) (struct msm_hardware_charger *hw_chg, int chg_current); void (*stop_system_current) (struct msm_hardware_charger *hw_chg); void *charger_private; /* used by the msm_charger.c */ }; struct msm_battery_gauge { int (*get_battery_mvolts) (void); int (*get_battery_temperature) (void); int (*is_battery_present) (void); int (*is_battery_temp_within_range) (void); int (*is_battery_id_valid) (void); int (*get_battery_status)(void); int (*get_batt_remaining_capacity) (void); #ifdef CONFIG_LGE_CHARGER_TEMP_SCENARIO int (*get_battery_temperature_adc) (void); #endif int (*monitor_for_recharging) (void); #ifdef CONFIG_LGE_PM uint32_t (*get_hw_fsm_state) (void); #endif }; /** * struct msm_charger_platform_data * @safety_time: max charging time in minutes * @update_time: how often the userland be updated of the charging progress * @max_voltage: the max voltage the battery should be charged upto * @min_voltage: the voltage where charging method switches from trickle to fast * @get_batt_capacity_percent: a board specific function to return battery * capacity. Can be null - a default one will be used */ struct msm_charger_platform_data { unsigned int safety_time; unsigned int update_time; unsigned int max_voltage; unsigned int min_voltage; unsigned int (*get_batt_capacity_percent) (void); }; typedef void (*notify_vbus_state) (int); #if defined(CONFIG_BATTERY_MSM8X60) || defined(CONFIG_BATTERY_MSM8X60_MODULE) void msm_battery_gauge_register(struct msm_battery_gauge *batt_gauge); void msm_battery_gauge_unregister(struct msm_battery_gauge *batt_gauge); int msm_charger_register(struct msm_hardware_charger *hw_chg); int msm_charger_unregister(struct msm_hardware_charger *hw_chg); int msm_charger_notify_event(struct msm_hardware_charger *hw_chg, enum msm_hardware_charger_event event); void msm_charger_vbus_draw(unsigned int mA); int msm_charger_register_vbus_sn(void (*callback)(int)); void msm_charger_unregister_vbus_sn(void (*callback)(int)); #else static inline void msm_battery_gauge_register(struct msm_battery_gauge *gauge) { } static inline void msm_battery_gauge_unregister(struct msm_battery_gauge *gauge) { } static inline int msm_charger_register(struct msm_hardware_charger *hw_chg) { return -ENXIO; } static inline int msm_charger_unregister(struct msm_hardware_charger *hw_chg) { return -ENXIO; } static inline int msm_charger_notify_event(struct msm_hardware_charger *hw_chg, enum msm_hardware_charger_event event) { return -ENXIO; } static inline void msm_charger_vbus_draw(unsigned int mA) { } static inline int msm_charger_register_vbus_sn(void (*callback)(int)) { return -ENXIO; } static inline void msm_charger_unregister_vbus_sn(void (*callback)(int)) { } #endif #endif /* __MSM_CHARGER_H__ */
/* * This file is part of the coreboot project. * * Copyright (C) 2013 secunet Security Networks AG * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; version 2 of * the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #ifndef EC_KONTRON_IT8516E_CHIP_H #define EC_KONTRON_IT8516E_CHIP_H #include "ec.h" struct ec_kontron_it8516e_config { /* * Fan settings (fan1: CPU; fan2: System) * Can be overwritten by * systemp_type, * fan1_mode, fan2_mode, * fan1_target, fan2_target, * fan1_min, fan2_min, fan1_max, and fan2_max * nvram options. */ enum it8516e_systemp_types default_systemp; enum it8516e_fan_modes default_fan_mode[2]; u16 default_fan_target[2]; /* PWM: % / Speed: RPM / Thermal: degree C */ u8 default_fan_min[2]; /* min PWM in % */ u8 default_fan_max[2]; /* max PWM in % */ }; #endif /* EC_KONTRON_IT8516E_CHIP_H */
/* * drivers/usb/sun5i_usb/hcd/include/sw_hcd_regs_i.h * * (C) Copyright 2007-2012 * Allwinner Technology Co., Ltd. <www.allwinnertech.com> * javen <javen@allwinnertech.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ #ifndef __SW_HCD_REGS_I_H__ #define __SW_HCD_REGS_I_H__ #include <linux/io.h> #include "sw_hcd_config.h" #define sw_hcd_ep_select(usbc_base, epnum) USBC_Writeb(epnum, USBC_REG_EPIND(usbc_base)) static inline void sw_hcd_readsl(const void __iomem *addr, void *buf, int len) { insl((unsigned long)addr, buf, len); } static inline void sw_hcd_readsw(const void __iomem *addr, void *buf, int len) { insw((unsigned long)addr, buf, len); } static inline void sw_hcd_readsb(const void __iomem *addr, void *buf, int len) { insb((unsigned long)addr, buf, len); } static inline void sw_hcd_writesl(const void __iomem *addr, const void *buf, int len) { outsl((unsigned long)addr, buf, len); } static inline void sw_hcd_writesw(const void __iomem *addr, const void *buf, int len) { outsw((unsigned long)addr, buf, len); } static inline void sw_hcd_writesb(const void __iomem *addr, const void *buf, int len) { outsb((unsigned long)addr, buf, len); } /* "bus control"/target registers, for host side multipoint (external hubs) */ #define USBC_REG_OFFSET_TXFUNCADDR 0x00 #define USBC_REG_OFFSET_TXHUBADDR 0x02 #define USBC_REG_OFFSET_TXHUBPORT 0x03 #define USBC_REG_OFFSET_RXFUNCADDR 0x04 #define USBC_REG_OFFSET_RXHUBADDR 0x06 #define USBC_REG_OFFSET_RXHUBPORT 0x07 static inline void sw_hcd_write_txfifosz(void __iomem *usbc_base, u8 c_size) { USBC_Writeb(c_size, USBC_REG_TXFIFOSZ(usbc_base)); } static inline void sw_hcd_write_txfifoadd(void __iomem *usbc_base, u16 c_off) { USBC_Writeb(c_off, USBC_REG_TXFIFOAD(usbc_base)); } static inline void sw_hcd_write_rxfifosz(void __iomem *usbc_base, u8 c_size) { USBC_Writeb(c_size, USBC_REG_RXFIFOSZ(usbc_base)); } static inline void sw_hcd_write_rxfifoadd(void __iomem *usbc_base, u16 c_off) { USBC_Writeb(c_off, USBC_REG_RXFIFOAD(usbc_base)); } static inline u8 sw_hcd_read_configdata(void __iomem *usbc_base) { return USBC_Readb(USBC_REG_CONFIGDATA(usbc_base)); } static inline void __iomem *sw_hcd_read_target_reg_base(u8 i, void __iomem *usbc_base) { return USBC_REG_TXFADDRx(usbc_base, i); } static inline void sw_hcd_write_rxfunaddr(void __iomem *ep_target_regs, u8 qh_addr_reg) { USBC_Writeb(qh_addr_reg, (ep_target_regs + USBC_REG_OFFSET_RXFUNCADDR)); } static inline void sw_hcd_write_rxhubaddr(void __iomem *ep_target_regs, u8 qh_h_addr_reg) { USBC_Writeb(qh_h_addr_reg, (ep_target_regs + USBC_REG_OFFSET_RXHUBADDR)); } static inline void sw_hcd_write_rxhubport(void __iomem *ep_target_regs, u8 qh_h_port_reg) { USBC_Writeb(qh_h_port_reg, (ep_target_regs + USBC_REG_OFFSET_RXHUBPORT)); } static inline void sw_hcd_write_txfunaddr(void __iomem *usbc_base, u8 epnum, u8 qh_addr_reg) { USBC_Writeb(qh_addr_reg, USBC_REG_TXFADDRx(usbc_base, epnum)); } static inline void sw_hcd_write_txhubaddr(void __iomem *usbc_base, u8 epnum, u8 qh_h_addr_reg) { USBC_Writeb(qh_h_addr_reg, USBC_REG_TXHADDRx(usbc_base, epnum)); } static inline void sw_hcd_write_txhubport(void __iomem *usbc_base, u8 epnum, u8 qh_h_port_reg) { USBC_Writeb(qh_h_port_reg, USBC_REG_TXHPORTx(usbc_base, epnum)); } #endif //__SW_HCD_REGS_I_H__
/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */ #include "test_sve_acle.h" /* ** acgt_f16_tied: ** ( ** facgt p0\.h, p0/z, z0\.h, z1\.h ** | ** faclt p0\.h, p0/z, z1\.h, z0\.h ** ) ** ret */ TEST_COMPARE_Z (acgt_f16_tied, svfloat16_t, p0 = svacgt_f16 (p0, z0, z1), p0 = svacgt (p0, z0, z1)) /* ** acgt_f16_untied: ** ( ** facgt p0\.h, p1/z, z0\.h, z1\.h ** | ** faclt p0\.h, p1/z, z1\.h, z0\.h ** ) ** ret */ TEST_COMPARE_Z (acgt_f16_untied, svfloat16_t, p0 = svacgt_f16 (p1, z0, z1), p0 = svacgt (p1, z0, z1)) /* ** acgt_h4_f16: ** mov (z[0-9]+\.h), h4 ** ( ** facgt p0\.h, p1/z, z0\.h, \1 ** | ** faclt p0\.h, p1/z, \1, z0\.h ** ) ** ret */ TEST_COMPARE_ZD (acgt_h4_f16, svfloat16_t, float16_t, p0 = svacgt_n_f16 (p1, z0, d4), p0 = svacgt (p1, z0, d4)) /* ** acgt_0_f16: ** mov (z[0-9]+\.h), #0 ** ( ** facgt p0\.h, p1/z, z0\.h, \1 ** | ** faclt p0\.h, p1/z, \1, z0\.h ** ) ** ret */ TEST_COMPARE_Z (acgt_0_f16, svfloat16_t, p0 = svacgt_n_f16 (p1, z0, 0), p0 = svacgt (p1, z0, 0)) /* ** acgt_1_f16: ** fmov (z[0-9]+\.h), #1\.0(?:e\+0)? ** ( ** facgt p0\.h, p1/z, z0\.h, \1 ** | ** faclt p0\.h, p1/z, \1, z0\.h ** ) ** ret */ TEST_COMPARE_Z (acgt_1_f16, svfloat16_t, p0 = svacgt_n_f16 (p1, z0, 1), p0 = svacgt (p1, z0, 1))
/******************************************************* Copyright (C) 2014 Stefano Giorgio This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Placeuite 330, Boston, MA 02111-1307 USA ********************************************************/ #include "mmHook.h" //---------------------------------------------------------------------------- class wxFrame; class wxInfoBar; /**************************************************************************** This frame serves as a test base for dialogs. *****************************************************************************/ class TestFrameBase : public wxFrame { public: /** This is the base frame */ TestFrameBase(int frame_count); /** Create subsequent frames using parent TestFrameBase * Set the required window size. Base size: (400, 180) */ TestFrameBase(wxWindow* parent, int size_x, int size_y); ~TestFrameBase(); /** Constructor used to create the instruction page*/ TestFrameBase(wxWindow* parent, const wxString& heading = "Test: User Action Request"); void Show_InfoBarMessage(const wxString& info_message); private: wxInfoBar *m_infoBar; wxDECLARE_EVENT_TABLE(); };
/* { dg-do compile } */ /* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=thunk -mindirect-branch=thunk " } */ /* { dg-additional-options "-fno-pic" { target { ! *-*-darwin* } } } */ extern void (*bar) (void); int foo (void) { bar (); return 0; } /* { dg-final { scan-assembler "jmp\[ \t\]*_?__x86_return_thunk" } } */ /* { dg-final { scan-assembler {jmp[ \t]+\.?LIND} } } */ /* { dg-final { scan-assembler {call[ \t]+\.?LIND} } } */ /* { dg-final { scan-assembler "_?__x86_return_thunk:" } } */ /* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar" { target *-*-linux* } } } */ /* { dg-final { scan-assembler {movq[ \t]*_bar} { target { lp64 && *-*-darwin* } } } } */ /* { dg-final { scan-assembler {movl[ \t]*[Ll]_bar\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ /* { dg-final { scan-assembler-times {\tpause} 2 } } */ /* { dg-final { scan-assembler-times {\tlfence} 2 } } */ /* { dg-final { scan-assembler "call\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ /* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
/* -*- c++ -*- */ /* * Copyright 2008 Free Software Foundation, Inc. * * This file is part of GNU Radio * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ // This file stores all the RIFF file type knowledge for the gr_wavfile_* // blocks. #include <cstdio> /*! * \brief Read signal information from a given WAV file. * * \p fp File pointer to an opened, empty file. * \p sample_rate Stores the sample rate [S/s] * \p nchans Number of channels * \p bytes_per_sample Bytes per sample, can either be 1 or 2 (corresponding to * 8 or 16 bit samples, respectively) * \p first_sample_pos Number of the first byte containing a sample. Use this * with fseek() to jump from the end of the file to the first sample * when in repeat mode. * \p samples_per_chan Number of samples per channel * \p normalize_fac The normalization factor with which you need to divide the * integer values of the samples to get them within [-1;1] * \p normalize_shift The value by which the sample values need to be shifted * after normalization (reason being, 8-bit WAV files store samples as * unsigned char and 16-bit as signed short int) * \return True on a successful read, false if the file could not be read or is * not a valid WAV file. */ bool gri_wavheader_parse(FILE *fp, unsigned int &sample_rate, int &nchans, int &bytes_per_sample, int &first_sample_pos, unsigned int &samples_per_chan); /*! * \brief Read one sample from an open WAV file at the current position. * * Takes care of endianness. */ short int gri_wav_read_sample(FILE *fp, int bytes_per_sample); /*! * \brief Write a valid RIFF file header * * Note: Some header values are kept blank because they're usually not known * a-priori (file and chunk lengths). Use gri_wavheader_complete() to fill * these in. */ bool gri_wavheader_write(FILE *fp, unsigned int sample_rate, int nchans, int bytes_per_sample); /*! * \brief Write one sample to an open WAV file at the current position. * * Takes care of endianness. */ void gri_wav_write_sample(FILE *fp, short int sample, int bytes_per_sample); /*! * \brief Complete a WAV header * * Note: The stream position is changed during this function. If anything * needs to be written to the WAV file after calling this function (which * shouldn't happen), you need to fseek() to the end of the file (or * whereever). * * \p fp File pointer to an open WAV file with a blank header * \p byte_count Length of all samples written to the file in bytes. */ bool gri_wavheader_complete(FILE *fp, unsigned int byte_count);
/* * opencog/embodiment/Learning/LearningServer/LS.h * * Copyright (C) 2002-2009 Novamente LLC * All Rights Reserved * Author(s): Nil Geisweiller, Carlos Lopes * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License v3 as * published by the Free Software Foundation and including the exceptions * at http://opencog.org/wiki/Licenses * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program; if not, write to: * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef LS_H #define LS_H #include <moses/comboreduct/combo/vertex.h> #include <opencog/util/Logger.h> #include <opencog/embodiment/Learning/behavior/WorldProvider.h> #include <opencog/embodiment/Control/EmbodimentConfig.h> #include <opencog/embodiment/Control/MessagingSystem/MessageCogServer.h> #include <opencog/embodiment/Learning/LearningServerMessages/LSCmdMessage.h> #include <opencog/embodiment/Learning/LearningServerMessages/LearnMessage.h> #include <opencog/embodiment/Learning/LearningServerMessages/RewardMessage.h> #include <opencog/embodiment/Learning/LearningServerMessages/TrySchemaMessage.h> #include <opencog/embodiment/Learning/LearningServerMessages/StopLearningMessage.h> #include "ImitationLearningAgent.h" namespace opencog { namespace learningserver { using namespace opencog::messaging; class LS : public MessageCogServer { public: static opencog::BaseServer* derivedCreateInstance(); /** * Constructor and Destructor */ LS(const std::string &myId, const std::string &ip, int portNumber); LS(); ~LS(); void init(const std::string &myId, const std::string &ip, int portNumber); /** * Method inherited from network element */ bool processNextMessage(opencog::messaging::Message *msg); /** * Informs whenever the LS is busy performing a learning action or not. * * @return True if LS is busy, false otherwise. */ bool isBusy(); /** * Try a candidate schema of the schema being learned. This schema is * send to OAC in order to be evaluated by the pet owner. In order to * send a candidate schema, the learning algorithm is pause and waits * for a feedback from the user (a reward message) * * @param schema The combo combo_tree representation of the schema */ void sendCandidateSchema(const combo::combo_tree & schema); /** * Send the best schema so far to be stored in the OAC procedure repository * * @param schema The combo combo_tree representation of the schema */ void sendBestSchema(const combo::combo_tree & schema); private: WorldProvider *wp; // store behavior descriptors and space server // with latest map bool busy; // LS busy learning trick? std::string learningPet; // the id of the pet using the LS std::string ownerID; // the id of the owner of the pet std::string avatarID; // the id of the avatar to imitate std::string learningSchema; // the trick being learned int candidateSchemaCnt; //imitation learning task (can plug hillclimbing or MOSES) ImitationLearningAgentPtr ILAgent; Factory<ImitationLearningAgent, Agent> factory; /** * Return the candidate schema name according to the acctual candidate * schema count. * * @return A std::string with the candidate schema name */ const std::string getCandidateSchemaName(); /** * Set the learning algorithm environment with data passed within the * learn message (schema to learn, world map, example actions) * * @param msg Learning message with enviroment data */ void initLearn(learningserver::messages::LearnMessage * msg); /** * Add new data into the learning algorithm enviroment. This data represents * new schema examples and new world map data. This data is merged with * previous received data. * * @param msg Learning message with enviroment data */ void addLearnExample(learningserver::messages::LearnMessage * msg); /** * Insert user feedback into the learning process (via RewardMessage). * * @param msg A RewardMessage with user feedback about a candidate schema */ void rewardCandidateSchema(learningserver::messages::RewardMessage * msg); /** * Clear all LS structures used during learning process. */ void resetLearningServer(); /** * Encapsulate the combo combo_tree representation of the learned schema, its * name and possible its candidate name (if trying a candidate schema). * * @param schema A combo combo_tree representation of the schema * @param schemaName The name of the schema * @param candidateName The name of the candidate schema of the schema * being learned (optional). */ void sendSchema(const combo::combo_tree & schema, std::string schemaName, std::string candidateName = ""); /** * Finishs the learning process, get the best schema so far and send it to * the OAC to be added into pet's procedure repository. */ void stopLearn(); /** * Get the best schema so far during learning process and send it to * the OAC in order to be evaluated by the owner of the pet. Note: the * learning process is paused when a candidate schema is sent to evaluation. */ void trySchema(); }; // class } } // namespace opencog::learningserver #endif
/* Ppmd8Dec.c -- PPMdI Decoder 2010-04-16 : Igor Pavlov : Public domain This code is based on: PPMd var.I (2002): Dmitry Shkarin : Public domain Carryless rangecoder (1999): Dmitry Subbotin : Public domain */ #include "Precomp.h" #include "Ppmd8.h" #define kTop (1 << 24) #define kBot (1 << 15) Bool Ppmd8_RangeDec_Init(CPpmd8 *p) { unsigned i; p->Low = 0; p->Range = 0xFFFFFFFF; p->Code = 0; for (i = 0; i < 4; i++) p->Code = (p->Code << 8) | p->Stream.In->Read(p->Stream.In); return (p->Code < 0xFFFFFFFF); } static UInt32 RangeDec_GetThreshold(CPpmd8 *p, UInt32 total) { return p->Code / (p->Range /= total); } static void RangeDec_Decode(CPpmd8 *p, UInt32 start, UInt32 size) { start *= p->Range; p->Low += start; p->Code -= start; p->Range *= size; while ((p->Low ^ (p->Low + p->Range)) < kTop || (p->Range < kBot && ((p->Range = (0 - p->Low) & (kBot - 1)), 1))) { p->Code = (p->Code << 8) | p->Stream.In->Read(p->Stream.In); p->Range <<= 8; p->Low <<= 8; } } #define MASK(sym) ((signed char *)charMask)[sym] int Ppmd8_DecodeSymbol(CPpmd8 *p) { size_t charMask[256 / sizeof(size_t)]; if (p->MinContext->NumStats != 0) { CPpmd_State *s = Ppmd8_GetStats(p, p->MinContext); unsigned i; UInt32 count, hiCnt; if ((count = RangeDec_GetThreshold(p, p->MinContext->SummFreq)) < (hiCnt = s->Freq)) { Byte symbol; RangeDec_Decode(p, 0, s->Freq); p->FoundState = s; symbol = s->Symbol; Ppmd8_Update1_0(p); return symbol; } p->PrevSuccess = 0; i = p->MinContext->NumStats; do { if ((hiCnt += (++s)->Freq) > count) { Byte symbol; RangeDec_Decode(p, hiCnt - s->Freq, s->Freq); p->FoundState = s; symbol = s->Symbol; Ppmd8_Update1(p); return symbol; } } while (--i); if (count >= p->MinContext->SummFreq) return -2; RangeDec_Decode(p, hiCnt, p->MinContext->SummFreq - hiCnt); PPMD_SetAllBitsIn256Bytes(charMask); MASK(s->Symbol) = 0; i = p->MinContext->NumStats; do { MASK((--s)->Symbol) = 0; } while (--i); } else { UInt16 *prob = Ppmd8_GetBinSumm(p); if (((p->Code / (p->Range >>= 14)) < *prob)) { Byte symbol; RangeDec_Decode(p, 0, *prob); *prob = (UInt16)PPMD_UPDATE_PROB_0(*prob); symbol = (p->FoundState = Ppmd8Context_OneState(p->MinContext))->Symbol; Ppmd8_UpdateBin(p); return symbol; } RangeDec_Decode(p, *prob, (1 << 14) - *prob); *prob = (UInt16)PPMD_UPDATE_PROB_1(*prob); p->InitEsc = PPMD8_kExpEscape[*prob >> 10]; PPMD_SetAllBitsIn256Bytes(charMask); MASK(Ppmd8Context_OneState(p->MinContext)->Symbol) = 0; p->PrevSuccess = 0; } for (;;) { CPpmd_State *ps[256], *s; UInt32 freqSum, count, hiCnt; CPpmd_See *see; unsigned i, num, numMasked = p->MinContext->NumStats; do { p->OrderFall++; if (!p->MinContext->Suffix) return -1; p->MinContext = Ppmd8_GetContext(p, p->MinContext->Suffix); } while (p->MinContext->NumStats == numMasked); hiCnt = 0; s = Ppmd8_GetStats(p, p->MinContext); i = 0; num = p->MinContext->NumStats - numMasked; do { int k = (int)(MASK(s->Symbol)); hiCnt += (s->Freq & k); ps[i] = s++; i -= k; } while (i != num); see = Ppmd8_MakeEscFreq(p, numMasked, &freqSum); freqSum += hiCnt; count = RangeDec_GetThreshold(p, freqSum); if (count < hiCnt) { Byte symbol; CPpmd_State **pps = ps; for (hiCnt = 0; (hiCnt += (*pps)->Freq) <= count; pps++); s = *pps; RangeDec_Decode(p, hiCnt - s->Freq, s->Freq); Ppmd_See_Update(see); p->FoundState = s; symbol = s->Symbol; Ppmd8_Update2(p); return symbol; } if (count >= freqSum) return -2; RangeDec_Decode(p, hiCnt, freqSum - hiCnt); see->Summ = (UInt16)(see->Summ + freqSum); do { MASK(ps[--i]->Symbol) = 0; } while (i != 0); } }
/* * Header file for gtkfont.c. Has to be separate from unix.h * because it depends on GTK data types, hence can't be included * from cross-platform code (which doesn't go near GTK). */ #ifndef PUTTY_GTKFONT_H #define PUTTY_GTKFONT_H /* * Exports from gtkfont.c. */ struct unifont_vtable; /* contents internal to gtkfont.c */ typedef struct unifont { const struct unifont_vtable *vt; /* * `Non-static data members' of the `class', accessible to * external code. */ /* * public_charset is the charset used when the user asks for * `Use font encoding'. */ int public_charset; /* * Font dimensions needed by clients. */ int width, height, ascent, descent; /* * Indicates whether this font is capable of handling all glyphs * (Pango fonts can do this because Pango automatically supplies * missing glyphs from other fonts), or whether it would like a * fallback font to cope with missing glyphs. */ int want_fallback; } unifont; unifont *unifont_create(GtkWidget *widget, const char *name, int wide, int bold, int shadowoffset, int shadowalways); void unifont_destroy(unifont *font); void unifont_draw_text(GdkDrawable *target, GdkGC *gc, unifont *font, int x, int y, const wchar_t *string, int len, int wide, int bold, int cellwidth); /* * This function behaves exactly like the low-level unifont_create, * except that as well as the requested font it also allocates (if * necessary) a fallback font for filling in replacement glyphs. * * Return value is usable with unifont_destroy and unifont_draw_text * as if it were an ordinary unifont. */ unifont *multifont_create(GtkWidget *widget, const char *name, int wide, int bold, int shadowoffset, int shadowalways); /* * Unified font selector dialog. I can't be bothered to do a * proper GTK subclassing today, so this will just be an ordinary * data structure with some useful members. * * (Of course, these aren't the only members; this structure is * contained within a bigger one which holds data visible only to * the implementation.) */ typedef struct unifontsel { void *user_data; /* settable by the user */ GtkWindow *window; GtkWidget *ok_button, *cancel_button; } unifontsel; unifontsel *unifontsel_new(const char *wintitle); void unifontsel_destroy(unifontsel *fontsel); void unifontsel_set_name(unifontsel *fontsel, const char *fontname); char *unifontsel_get_name(unifontsel *fontsel); #endif /* PUTTY_GTKFONT_H */
#define PJ_LIB__ #include <projects.h> PROJ_HEAD(eck1, "Eckert I") "\n\tPCyl., Sph."; #define FC .92131773192356127802 #define RP .31830988618379067154 FORWARD(s_forward); /* spheroid */ (void) P; xy.x = FC * lp.lam * (1. - RP * fabs(lp.phi)); xy.y = FC * lp.phi; return (xy); } INVERSE(s_inverse); /* spheroid */ (void) P; lp.phi = xy.y / FC; lp.lam = xy.x / (FC * (1. - RP * fabs(lp.phi))); return (lp); } FREEUP; if (P) pj_dalloc(P); } ENTRY0(eck1) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_CONTEXT_H_ #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_CONTEXT_H_ #include <memory> #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/sequence_checker.h" namespace base { class SequencedTaskRunner; class SingleThreadTaskRunner; } namespace drive { class DriveServiceInterface; class DriveUploaderInterface; } namespace sync_file_system { class RemoteChangeProcessor; class TaskLogger; namespace drive_backend { class MetadataDatabase; class SyncEngineContext { public: SyncEngineContext( std::unique_ptr<drive::DriveServiceInterface> drive_service, std::unique_ptr<drive::DriveUploaderInterface> drive_uploader, TaskLogger* task_logger, const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner, const scoped_refptr<base::SequencedTaskRunner>& worker_task_runner, const scoped_refptr<base::SequencedWorkerPool>& worker_pool); ~SyncEngineContext(); void SetMetadataDatabase(std::unique_ptr<MetadataDatabase> metadata_database); void SetRemoteChangeProcessor( RemoteChangeProcessor* remote_change_processor); drive::DriveServiceInterface* GetDriveService(); drive::DriveUploaderInterface* GetDriveUploader(); base::WeakPtr<TaskLogger> GetTaskLogger(); MetadataDatabase* GetMetadataDatabase(); RemoteChangeProcessor* GetRemoteChangeProcessor(); base::SingleThreadTaskRunner* GetUITaskRunner(); base::SequencedTaskRunner* GetWorkerTaskRunner(); base::SequencedWorkerPool* GetWorkerPool(); std::unique_ptr<MetadataDatabase> PassMetadataDatabase(); void DetachFromSequence(); private: friend class DriveBackendSyncTest; std::unique_ptr<drive::DriveServiceInterface> drive_service_; std::unique_ptr<drive::DriveUploaderInterface> drive_uploader_; base::WeakPtr<TaskLogger> task_logger_; RemoteChangeProcessor* remote_change_processor_; // Not owned. std::unique_ptr<MetadataDatabase> metadata_database_; scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; scoped_refptr<base::SequencedTaskRunner> worker_task_runner_; scoped_refptr<base::SequencedWorkerPool> worker_pool_; base::SequenceChecker sequence_checker_; DISALLOW_COPY_AND_ASSIGN(SyncEngineContext); }; } // namespace drive_backend } // namespace sync_file_system #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_CONTEXT_H_
// Check that SDKROOT does not infer simulator on when it points to a regular // SDK. // REQUIRES: system-darwin && native // // RUN: rm -rf %t/SDKs/iPhoneOS8.0.0.sdk // RUN: mkdir -p %t/SDKs/iPhoneOS8.0.0.sdk // RUN: env SDKROOT=%t/SDKs/iPhoneOS8.0.0.sdk %clang %s -### 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-IPHONE %s // RUN: env SDKROOT=%t/SDKs/iPhoneOS8.0.0.sdk IPHONEOS_DEPLOYMENT_TARGET=8.0 %clang %s -### 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-IPHONE %s // CHECK-IPHONE: clang // CHECK-IPHONE: "-cc1" // CHECK-IPHONE: -apple-ios8.0.0" // CHECK-IPHONE: ld // CHECK-IPHONE: "-iphoneos_version_min" "8.0.0" // // // RUN: rm -rf %t/SDKs/iPhoneSimulator8.0.sdk // RUN: mkdir -p %t/SDKs/iPhoneSimulator8.0.sdk // RUN: env SDKROOT=%t/SDKs/iPhoneSimulator8.0.sdk %clang %s -### 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-SIMULATOR %s // // CHECK-SIMULATOR: clang // CHECK-SIMULATOR: "-cc1" // CHECK-SIMULATOR: -apple-ios8.0.0-simulator" // CHECK-SIMULATOR: ld // CHECK-SIMULATOR: "-ios_simulator_version_min" "8.0.0" // // // RUN: rm -rf %t/SDKs/WatchOS3.0.sdk // RUN: mkdir -p %t/SDKs/WatchOS3.0.sdk // RUN: env SDKROOT=%t/SDKs/WatchOS3.0.sdk %clang %s -### 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-WATCH %s // RUN: env WATCHOS_DEPLOYMENT_TARGET=3.0 %clang %s -isysroot %t/SDKs/WatchOS3.0.sdk -### 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-WATCH %s // // CHECK-WATCH: clang // CHECK-WATCH: "-cc1" // CHECK-WATCH: -apple-watchos3.0.0" // CHECK-WATCH: ld // CHECK-WATCH: "-watchos_version_min" "3.0.0" // // // RUN: rm -rf %t/SDKs/WatchSimulator3.0.sdk // RUN: mkdir -p %t/SDKs/WatchSimulator3.0.sdk // RUN: env SDKROOT=%t/SDKs/WatchSimulator3.0.sdk %clang %s -### 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-WATCH-SIMULATOR %s // // CHECK-WATCH-SIMULATOR: clang // CHECK-WATCH-SIMULATOR: "-cc1" // CHECK-WATCH-SIMULATOR: -apple-watchos3.0.0-simulator" // CHECK-WATCH-SIMULATOR: ld // CHECK-WATCH-SIMULATOR: "-watchos_simulator_version_min" "3.0.0" // // // RUN: rm -rf %t/SDKs/AppleTVOS10.0.sdk // RUN: mkdir -p %t/SDKs/AppleTVOS10.0.sdk // RUN: env SDKROOT=%t/SDKs/AppleTVOS10.0.sdk %clang %s -### 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-TV %s // // CHECK-TV: clang // CHECK-TV: "-cc1" // CHECK-TV: -apple-tvos10.0.0" // CHECK-TV: ld // CHECK-TV: "-tvos_version_min" "10.0.0" // // // RUN: rm -rf %t/SDKs/AppleTVSimulator10.0.sdk // RUN: mkdir -p %t/SDKs/AppleTVSimulator10.0.sdk // RUN: env SDKROOT=%t/SDKs/AppleTVSimulator10.0.sdk %clang %s -### 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-TV-SIMULATOR %s // // CHECK-TV-SIMULATOR: clang // CHECK-TV-SIMULATOR: "-cc1" // CHECK-TV-SIMULATOR: -apple-tvos10.0.0-simulator" // CHECK-TV-SIMULATOR: ld // CHECK-TV-SIMULATOR: "-tvos_simulator_version_min" "10.0.0"
#ifndef _ROS_geometry_msgs_Vector3_h #define _ROS_geometry_msgs_Vector3_h #include <stdint.h> #include <string.h> #include <stdlib.h> #include "ros/msg.h" namespace geometry_msgs { class Vector3 : public ros::Msg { public: float x; float y; float z; virtual int serialize(unsigned char *outbuffer) const { int offset = 0; int32_t * val_x = (int32_t *) &(this->x); int32_t exp_x = (((*val_x)>>23)&255); if(exp_x != 0) exp_x += 1023-127; int32_t sig_x = *val_x; *(outbuffer + offset++) = 0; *(outbuffer + offset++) = 0; *(outbuffer + offset++) = 0; *(outbuffer + offset++) = (sig_x<<5) & 0xff; *(outbuffer + offset++) = (sig_x>>3) & 0xff; *(outbuffer + offset++) = (sig_x>>11) & 0xff; *(outbuffer + offset++) = ((exp_x<<4) & 0xF0) | ((sig_x>>19)&0x0F); *(outbuffer + offset++) = (exp_x>>4) & 0x7F; if(this->x < 0) *(outbuffer + offset -1) |= 0x80; int32_t * val_y = (int32_t *) &(this->y); int32_t exp_y = (((*val_y)>>23)&255); if(exp_y != 0) exp_y += 1023-127; int32_t sig_y = *val_y; *(outbuffer + offset++) = 0; *(outbuffer + offset++) = 0; *(outbuffer + offset++) = 0; *(outbuffer + offset++) = (sig_y<<5) & 0xff; *(outbuffer + offset++) = (sig_y>>3) & 0xff; *(outbuffer + offset++) = (sig_y>>11) & 0xff; *(outbuffer + offset++) = ((exp_y<<4) & 0xF0) | ((sig_y>>19)&0x0F); *(outbuffer + offset++) = (exp_y>>4) & 0x7F; if(this->y < 0) *(outbuffer + offset -1) |= 0x80; int32_t * val_z = (int32_t *) &(this->z); int32_t exp_z = (((*val_z)>>23)&255); if(exp_z != 0) exp_z += 1023-127; int32_t sig_z = *val_z; *(outbuffer + offset++) = 0; *(outbuffer + offset++) = 0; *(outbuffer + offset++) = 0; *(outbuffer + offset++) = (sig_z<<5) & 0xff; *(outbuffer + offset++) = (sig_z>>3) & 0xff; *(outbuffer + offset++) = (sig_z>>11) & 0xff; *(outbuffer + offset++) = ((exp_z<<4) & 0xF0) | ((sig_z>>19)&0x0F); *(outbuffer + offset++) = (exp_z>>4) & 0x7F; if(this->z < 0) *(outbuffer + offset -1) |= 0x80; return offset; } virtual int deserialize(unsigned char *inbuffer) { int offset = 0; uint32_t * val_x = (uint32_t*) &(this->x); offset += 3; *val_x = ((uint32_t)(*(inbuffer + offset++))>>5 & 0x07); *val_x |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<3; *val_x |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<11; *val_x |= ((uint32_t)(*(inbuffer + offset)) & 0x0f)<<19; uint32_t exp_x = ((uint32_t)(*(inbuffer + offset++))&0xf0)>>4; exp_x |= ((uint32_t)(*(inbuffer + offset)) & 0x7f)<<4; if(exp_x !=0) *val_x |= ((exp_x)-1023+127)<<23; if( ((*(inbuffer+offset++)) & 0x80) > 0) this->x = -this->x; uint32_t * val_y = (uint32_t*) &(this->y); offset += 3; *val_y = ((uint32_t)(*(inbuffer + offset++))>>5 & 0x07); *val_y |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<3; *val_y |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<11; *val_y |= ((uint32_t)(*(inbuffer + offset)) & 0x0f)<<19; uint32_t exp_y = ((uint32_t)(*(inbuffer + offset++))&0xf0)>>4; exp_y |= ((uint32_t)(*(inbuffer + offset)) & 0x7f)<<4; if(exp_y !=0) *val_y |= ((exp_y)-1023+127)<<23; if( ((*(inbuffer+offset++)) & 0x80) > 0) this->y = -this->y; uint32_t * val_z = (uint32_t*) &(this->z); offset += 3; *val_z = ((uint32_t)(*(inbuffer + offset++))>>5 & 0x07); *val_z |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<3; *val_z |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<11; *val_z |= ((uint32_t)(*(inbuffer + offset)) & 0x0f)<<19; uint32_t exp_z = ((uint32_t)(*(inbuffer + offset++))&0xf0)>>4; exp_z |= ((uint32_t)(*(inbuffer + offset)) & 0x7f)<<4; if(exp_z !=0) *val_z |= ((exp_z)-1023+127)<<23; if( ((*(inbuffer+offset++)) & 0x80) > 0) this->z = -this->z; return offset; } const char * getType(){ return "geometry_msgs/Vector3"; }; const char * getMD5(){ return "4a842b65f413084dc2b10fb484ea7f17"; }; }; } #endif
/* cx25840 internal API header * * Copyright (C) 2003-2004 Chris Kennedy * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _CX25840_CORE_H_ #define _CX25840_CORE_H_ #include <linux/videodev2.h> #include <media/v4l2-device.h> #include <linux/i2c.h> /* ENABLE_PVR150_WORKAROUND activates a workaround for a hardware bug that is present in Hauppauge PVR-150 (and possibly PVR-500) cards that have certain NTSC tuners (tveeprom tuner model numbers 85, 99 and 112). The audio autodetect fails on some channels for these models and the workaround is to select the audio standard explicitly. Many thanks to Hauppauge for providing this information. */ #define CX25840_CID_ENABLE_PVR150_WORKAROUND (V4L2_CID_PRIVATE_BASE+0) struct cx25840_state { struct i2c_client *c; struct v4l2_subdev sd; int pvr150_workaround; int radio; v4l2_std_id std; enum cx25840_video_input vid_input; enum cx25840_audio_input aud_input; u32 audclk_freq; int audmode; int unmute_volume; /* -1 if not muted */ int default_volume; int vbi_line_offset; u32 id; u32 rev; int is_cx25836; int is_cx23885; int is_cx231xx; int is_initialized; wait_queue_head_t fw_wait; /* wake up when the fw load is finished */ struct work_struct fw_work; /* work entry for fw load */ }; static inline struct cx25840_state *to_state(struct v4l2_subdev *sd) { return container_of(sd, struct cx25840_state, sd); } /* ----------------------------------------------------------------------- */ /* cx25850-core.c */ int cx25840_write(struct i2c_client *client, u16 addr, u8 value); int cx25840_write4(struct i2c_client *client, u16 addr, u32 value); u8 cx25840_read(struct i2c_client *client, u16 addr); u32 cx25840_read4(struct i2c_client *client, u16 addr); int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned mask, u8 value); void cx25840_std_setup(struct i2c_client *client); /* ----------------------------------------------------------------------- */ /* cx25850-firmware.c */ int cx25840_loadfw(struct i2c_client *client); /* ----------------------------------------------------------------------- */ /* cx25850-audio.c */ void cx25840_audio_set_path(struct i2c_client *client); int cx25840_s_clock_freq(struct v4l2_subdev *sd, u32 freq); int cx25840_audio_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl); int cx25840_audio_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl); /* ----------------------------------------------------------------------- */ /* cx25850-vbi.c */ int cx25840_vbi_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt); int cx25840_vbi_g_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt); int cx25840_decode_vbi_line(struct v4l2_subdev *sd, struct v4l2_decode_vbi_line *vbi); #endif
/********************************************************************** * * Filename: crc.h * * Description: A header file describing the various CRC standards. * * Notes: * * * Copyright (c) 2000 by Michael Barr. This software is placed into * the public domain and may be used for any purpose. However, this * notice must not be changed or removed and no warranty is either * expressed or implied by its publication or distribution. **********************************************************************/ #ifndef _crc_h #define _crc_h #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif /* * Select the CRC standard from the list that follows. */ #define CRC32 #if defined(CRC_CCITT) typedef unsigned short crc; #define CRC_NAME "CRC-CCITT" #define POLYNOMIAL 0x1021 #define INITIAL_REMAINDER 0xFFFF #define FINAL_XOR_VALUE 0x0000 #define REFLECT_DATA FALSE #define REFLECT_REMAINDER FALSE #define CHECK_VALUE 0x29B1 #elif defined(CRC16) typedef unsigned short crc; #define CRC_NAME "CRC-16" #define POLYNOMIAL 0x8005 #define INITIAL_REMAINDER 0x0000 #define FINAL_XOR_VALUE 0x0000 #define REFLECT_DATA TRUE #define REFLECT_REMAINDER TRUE #define CHECK_VALUE 0xBB3D #elif defined(CRC32) typedef unsigned long crc; #define CRC_NAME "CRC-32" #define POLYNOMIAL 0x04C11DB7 #define INITIAL_REMAINDER 0xFFFFFFFF #define FINAL_XOR_VALUE 0xFFFFFFFF #define REFLECT_DATA TRUE #define REFLECT_REMAINDER TRUE #define CHECK_VALUE 0xCBF43926 #else #error "One of CRC_CCITT, CRC16, or CRC32 must be #define'd." #endif void crcInit(void); crc crcSlow(unsigned char const message[], int nBytes); crc crcFast(unsigned char const message[], int nBytes); #endif /* _crc_h */
// // OCHamcrest - HCIsIn.h // Copyright 2011 hamcrest.org. See LICENSE.txt // // Created by: Jon Reid // #import <OCHamcrest/HCBaseMatcher.h> /** Is the object present in the given collection? @b Factory: @ref isIn @ingroup collection_matchers */ @interface HCIsIn : HCBaseMatcher { id collection; } + (id)isInCollection:(id)aCollection; - (id)initWithCollection:(id)aCollection; @end #pragma mark - /** Is the object present in the given collection? @b Synonym: @ref isIn @see HCIsIn @ingroup collection_matchers */ OBJC_EXPORT id<HCMatcher> HC_isIn(id aCollection); /** isIn(collection) - Is the object present in the given collection? Synonym for @ref HC_isIn, available if @c HC_SHORTHAND is defined. @see HCIsIn @ingroup collection_matchers */ #ifdef HC_SHORTHAND #define isIn HC_isIn #endif
/* * This file is part of the coreboot project. * * Copyright (C) 2007-2008 coresystems GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <delay.h> #include <stdint.h> #include <cpu/x86/tsc.h> #include <cpu/x86/msr.h> /** * Intel Sandy Bridge/Ivy Bridge CPUs always run the TSC at BCLK=100MHz */ void udelay(u32 us) { u32 dword; tsc_t tsc, tsc1, tscd; msr_t msr; u32 fsb = 100, divisor; u32 d; /* ticks per us */ msr = rdmsr(0xce); divisor = (msr.lo >> 8) & 0xff; d = fsb * divisor; /* On Core/Core2 this is divided by 4 */ multiply_to_tsc(&tscd, us, d); tsc1 = rdtsc(); dword = tsc1.lo + tscd.lo; if ((dword < tsc1.lo) || (dword < tscd.lo)) { tsc1.hi++; } tsc1.lo = dword; tsc1.hi += tscd.hi; do { tsc = rdtsc(); } while ((tsc.hi < tsc1.hi) || ((tsc.hi == tsc1.hi) && (tsc.lo < tsc1.lo))); }
/* /////////////////////////////////////////////////////////////////////////// // Name: win_gtk.h // Purpose: native GTK+ widget for wxWindow // Author: Robert Roebling // Id: $Id$ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////// */ #ifndef _WX_GTK_PIZZA_H_ #define _WX_GTK_PIZZA_H_ #include <gtk/gtkfixed.h> #define WX_PIZZA(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, wxPizza::type(), wxPizza) #define WX_IS_PIZZA(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, wxPizza::type()) struct WXDLLIMPEXP_CORE wxPizza { // borders styles which can be used with wxPizza enum { BORDER_STYLES = wxBORDER_SIMPLE | wxBORDER_RAISED | wxBORDER_SUNKEN | wxBORDER_THEME }; static GtkWidget* New(long windowStyle = 0); static GType type(); void move(GtkWidget* widget, int x, int y); void put(GtkWidget* widget, int x, int y); void scroll(int dx, int dy); void get_border_widths(int& x, int& y); GtkFixed m_fixed; int m_scroll_x; int m_scroll_y; int m_border_style; bool m_is_scrollable; }; #endif // _WX_GTK_PIZZA_H_
#ifndef FX_EXPORT_H_INC #define FX_EXPORT_H_INC int FX_RegisterEffect(const char *file); void FX_PlaySimpleEffect( const char *file, vec3_t org ); // uses a default up axis void FX_PlayEffect( const char *file, vec3_t org, vec3_t fwd ); // builds arbitrary perp. right vector, does a cross product to define up void FX_PlayEntityEffect( const char *file, vec3_t org, vec3_t axis[3], const int boltInfo, const int entNum ); void FX_PlaySimpleEffectID( int id, vec3_t org ); // uses a default up axis void FX_PlayEffectID( int id, vec3_t org, vec3_t fwd ); // builds arbitrary perp. right vector, does a cross product to define up void FX_PlayEntityEffectID( int id, vec3_t org, vec3_t axis[3], const int boltInfo, const int entNum ); void FX_PlayBoltedEffectID( int id, sharedBoltInterface_t *fxObj ); void FX_AddScheduledEffects( void ); int FX_InitSystem( void ); // called in CG_Init to purge the fx system. qboolean FX_FreeSystem( void ); // ditches all active effects; void FX_AdjustTime_Pos( int time, vec3_t refdef_vieworg, vec3_t refdef_viewaxis[3] ); #endif // FX_EXPORT_H_INC
/* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-ivopts-details" } */ int *a; int foo (signed char s, signed char l) { signed char i; int sum = 0; for (i = s; i < l; i++) { sum += a[i]; } return sum; } /* Address of array reference is scev. */ /* { dg-final { scan-tree-dump-times " Type:\\tADDRESS\n Use \[0-9\].\[0-9\]:" 1 "ivopts" } } */
// Copyright 2017 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. #pragma once #include <atomic> #include <string> #include "Common/CommonTypes.h" #include "Common/IniFile.h" #include "InputCommon/ControlReference/ControlReference.h" #include "InputCommon/ControllerInterface/Device.h" namespace ControllerEmu { enum class SettingType { Int, Double, Bool, }; struct NumericSettingDetails { NumericSettingDetails(const char* const _ini_name, const char* const _ui_suffix = nullptr, const char* const _ui_description = nullptr, const char* const _ui_name = nullptr) : ini_name(_ini_name), ui_suffix(_ui_suffix), ui_description(_ui_description), ui_name(_ui_name ? _ui_name : _ini_name) { } // The name used in ini files. const char* const ini_name; // A string applied to the number in the UI (unit of measure). const char* const ui_suffix; // Detailed description of the setting. const char* const ui_description; // The name used in the UI (if different from ini file). const char* const ui_name; }; class NumericSettingBase { public: NumericSettingBase(const NumericSettingDetails& details); virtual ~NumericSettingBase() = default; virtual void LoadFromIni(const IniFile::Section& section, const std::string& group_name) = 0; virtual void SaveToIni(IniFile::Section& section, const std::string& group_name) const = 0; virtual InputReference& GetInputReference() = 0; virtual const InputReference& GetInputReference() const = 0; virtual bool IsSimpleValue() const = 0; // Convert a literal expression e.g. "7.0" to a regular value. (disables expression parsing) virtual void SimplifyIfPossible() = 0; // Convert a regular value to an expression. (used before expression editing) virtual void SetExpressionFromValue() = 0; virtual SettingType GetType() const = 0; const char* GetUIName() const; const char* GetUISuffix() const; const char* GetUIDescription() const; protected: NumericSettingDetails m_details; }; template <typename T> class SettingValue; template <typename T> class NumericSetting final : public NumericSettingBase { public: using ValueType = T; static_assert(std::is_same<ValueType, int>() || std::is_same<ValueType, double>() || std::is_same<ValueType, bool>(), "NumericSetting is only implemented for int, double, and bool."); NumericSetting(SettingValue<ValueType>* value, const NumericSettingDetails& details, ValueType default_value, ValueType min_value, ValueType max_value) : NumericSettingBase(details), m_value(*value), m_default_value(default_value), m_min_value(min_value), m_max_value(max_value) { m_value.SetValue(m_default_value); } void LoadFromIni(const IniFile::Section& section, const std::string& group_name) override { std::string str_value; if (section.Get(group_name + m_details.ini_name, &str_value)) { m_value.m_input.SetExpression(std::move(str_value)); SimplifyIfPossible(); } else { SetValue(m_default_value); } } void SaveToIni(IniFile::Section& section, const std::string& group_name) const override { if (IsSimpleValue()) section.Set(group_name + m_details.ini_name, GetValue(), m_default_value); else section.Set(group_name + m_details.ini_name, m_value.m_input.GetExpression(), ""); } bool IsSimpleValue() const override { return m_value.IsSimpleValue(); } void SimplifyIfPossible() override { ValueType value; if (TryParse(m_value.m_input.GetExpression(), &value)) m_value.SetValue(value); } void SetExpressionFromValue() override; InputReference& GetInputReference() override { return m_value.m_input; } const InputReference& GetInputReference() const override { return m_value.m_input; } ValueType GetValue() const { return m_value.GetValue(); } void SetValue(ValueType value) { m_value.SetValue(value); } ValueType GetDefaultValue() const { return m_default_value; } ValueType GetMinValue() const { return m_min_value; } ValueType GetMaxValue() const { return m_max_value; } SettingType GetType() const override; private: SettingValue<ValueType>& m_value; const ValueType m_default_value; const ValueType m_min_value; const ValueType m_max_value; }; template <typename T> class SettingValue { using ValueType = T; friend class NumericSetting<T>; public: ValueType GetValue() const { // Only update dynamic values when the input gate is enabled. // Otherwise settings will all change to 0 when window focus is lost. // This is very undesirable for things like battery level or attached extension. if (!IsSimpleValue() && ControlReference::GetInputGate()) m_value = m_input.GetState<ValueType>(); return m_value; } bool IsSimpleValue() const { return m_input.GetExpression().empty(); } private: void SetValue(ValueType value) { m_value = value; // Clear the expression to use our new "simple" value. m_input.SetExpression(""); } // Values are R/W by both UI and CPU threads. mutable std::atomic<ValueType> m_value = {}; // Unfortunately InputReference's state grabbing is non-const requiring mutable here. mutable InputReference m_input; }; } // namespace ControllerEmu
// Copyright 2012 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_HEAP_SWEEPER_THREAD_H_ #define V8_HEAP_SWEEPER_THREAD_H_ #include "src/base/atomicops.h" #include "src/base/platform/platform.h" #include "src/flags.h" #include "src/utils.h" #include "src/heap/spaces.h" #include "src/heap/heap.h" namespace v8 { namespace internal { class SweeperThread : public base::Thread { public: explicit SweeperThread(Isolate* isolate); ~SweeperThread() {} void Run(); void Stop(); void StartSweeping(); void WaitForSweeperThread(); bool SweepingCompleted(); static int NumberOfThreads(int max_available); private: Isolate* isolate_; Heap* heap_; MarkCompactCollector* collector_; base::Semaphore start_sweeping_semaphore_; base::Semaphore end_sweeping_semaphore_; base::Semaphore stop_semaphore_; volatile base::AtomicWord stop_thread_; }; } } // namespace v8::internal #endif // V8_HEAP_SWEEPER_THREAD_H_
#ifndef HEADER_CURL_INET_PTON_H #define HEADER_CURL_INET_PTON_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at https://curl.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * ***************************************************************************/ #include "curl_setup.h" int Curl_inet_pton(int, const char *, void *); #ifdef HAVE_INET_PTON #ifdef HAVE_ARPA_INET_H #include <arpa/inet.h> #elif defined(HAVE_WS2TCPIP_H) /* inet_pton() exists in Vista or later */ #include <ws2tcpip.h> #endif #define Curl_inet_pton(x,y,z) inet_pton(x,y,z) #endif #endif /* HEADER_CURL_INET_PTON_H */
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. * */ #pragma once #include "HAL.h" #include <SPI.h> extern "C" { #include <utility/spi_com.h> } /** * Marlin currently requires 3 SPI classes: * * SPIClass: * This class is normally provided by frameworks and has a semi-default interface. * This is needed because some libraries reference it globally. * * SPISettings: * Container for SPI configs for SPIClass. As above, libraries may reference it globally. * * These two classes are often provided by frameworks so we cannot extend them to add * useful methods for Marlin. * * MarlinSPI: * Provides the default SPIClass interface plus some Marlin goodies such as a simplified * interface for SPI DMA transfer. * */ #define DATA_SIZE_8BIT SPI_DATASIZE_8BIT #define DATA_SIZE_16BIT SPI_DATASIZE_16BIT class MarlinSPI { public: MarlinSPI() : MarlinSPI(NC, NC, NC, NC) {} MarlinSPI(pin_t mosi, pin_t miso, pin_t sclk, pin_t ssel = (pin_t)NC) : _mosiPin(mosi), _misoPin(miso), _sckPin(sclk), _ssPin(ssel) { _spi.pin_miso = digitalPinToPinName(_misoPin); _spi.pin_mosi = digitalPinToPinName(_mosiPin); _spi.pin_sclk = digitalPinToPinName(_sckPin); _spi.pin_ssel = digitalPinToPinName(_ssPin); _dataSize = DATA_SIZE_8BIT; _bitOrder = MSBFIRST; _dataMode = SPI_MODE_0; _spi.handle.State = HAL_SPI_STATE_RESET; setClockDivider(SPI_SPEED_CLOCK_DIV2_MHZ); } void begin(void); void end(void) {} byte transfer(uint8_t _data); uint8_t dmaTransfer(const void *transmitBuf, void *receiveBuf, uint16_t length); uint8_t dmaSend(const void * transmitBuf, uint16_t length, bool minc = true); /* These methods are deprecated and kept for compatibility. * Use SPISettings with SPI.beginTransaction() to configure SPI parameters. */ void setBitOrder(BitOrder _order) { _bitOrder = _order; } void setDataMode(uint8_t _mode) { switch (_mode) { case SPI_MODE0: _dataMode = SPI_MODE_0; break; case SPI_MODE1: _dataMode = SPI_MODE_1; break; case SPI_MODE2: _dataMode = SPI_MODE_2; break; case SPI_MODE3: _dataMode = SPI_MODE_3; break; } } void setClockDivider(uint8_t _div); private: void setupDma(SPI_HandleTypeDef &_spiHandle, DMA_HandleTypeDef &_dmaHandle, uint32_t direction, bool minc = false); spi_t _spi; DMA_HandleTypeDef _dmaTx; DMA_HandleTypeDef _dmaRx; BitOrder _bitOrder; spi_mode_e _dataMode; uint8_t _clockDivider; uint32_t _speed; uint32_t _dataSize; pin_t _mosiPin; pin_t _misoPin; pin_t _sckPin; pin_t _ssPin; };
/*************************************************************************** levels.h - description ------------------- begin : Thu Sep 6 2001 copyright : (C) 2001 by Michael Speck email : kulkanie@gmx.net ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef __LEVELS_H #define __LEVELS_H #include "../client/lbreakout.h" #define NEW_SET _("<CREATE SET>") #define TOURNAMENT _("!FREAKOUT!") /* ==================================================================== Open a levelset file by name. ==================================================================== */ FILE *levelset_open( char *fname, char *mode ); /* ==================================================================== Load all levels from file and add them to the list. ==================================================================== */ int levels_load( char *fname, List *levels, int *version, int *update ); /* ==================================================================== Load all levels from either home directory (fname begins with ~) or installation directory. ==================================================================== */ LevelSet *levelset_load( char *fname, int addBonusLevels ); /* ==================================================================== Load all levelSETS listed in 'levelsets' (names) into one big levelset and shake the levels a bit. Use a fixed seed for this and reinit random generator with current time when done. ==================================================================== */ LevelSet *levelset_load_all( List *levelsets, int seed, int addBonusLevels ); /* ==================================================================== Build a levelset from a level list and delete the list. The levels are taken from the list so it must not have AUTO_DELETE enabled! ==================================================================== */ LevelSet *levelset_build_from_list( List *levels, char *name, int version, int update ); /* ==================================================================== Save levelset to home directory (regardsless of ~ in front of it). Return Value: True if successful. ==================================================================== */ int levelset_save( LevelSet *set, char *fname ); /* ==================================================================== Create an all empty levelset. ==================================================================== */ LevelSet *levelset_create_empty( int count, char *author, char *name ); /* ==================================================================== Delete levels and set pointer NULL. Second version is for use with lists. ==================================================================== */ void levelset_delete( LevelSet **set ); void levelset_list_delete( void *ptr ); /* ==================================================================== Get first/next level from a set starting at the first level. If no more levels remain, NULL is returned. ==================================================================== */ Level* levelset_get_first( LevelSet *set ); Level* levelset_get_next( LevelSet *set ); /* ==================================================================== Return list id of this level or -1 if not within this set. ==================================================================== */ int levelset_get_id( LevelSet *set, Level *level ); /* ==================================================================== Load level from current file position. ==================================================================== */ Level* level_load( FILE *file ); /* ==================================================================== Create an empty level ==================================================================== */ Level* level_create_empty( char *author, char *name ); /* ==================================================================== Delete level pointer. ==================================================================== */ void level_delete( void *level_ptr ); /* ==================================================================== Get version and current update of levelset: x.x Will reset the file pointer to beginning. ==================================================================== */ void levelset_get_version( FILE *file, int *version, int *update ); /* ==================================================================== Get the name of the author of the first level. ==================================================================== */ void levelset_get_first_author( FILE *file, char *author ); #endif
/* Copyright 2008 Google Inc. 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. */ #ifndef EXTENSIONS_SMJS_SCRIPT_RUNTIME_JSON_H__ #define EXTENSIONS_SMJS_SCRIPT_RUNTIME_JSON_H__ #include <string> #include "libmozjs_glue.h" namespace ggadget { namespace smjs { /** * Encodes a JavaScript value into JSON string. */ JSBool JSONEncode(JSContext *cx, jsval js_val, std::string *json); /** * Decodes a JSON string into a JavaScript value. */ JSBool JSONDecode(JSContext *cx, const char *json, jsval *js_val); } // namespace smjs } // namespace ggadget #endif // EXTENSIONS_SMJS_SCRIPT_RUNTIME_JSON_H__
// // UIButton+BackgroundColor.h // JKCategories (https://github.com/shaojiankui/JKCategories) // // Created by 符现超 on 15/5/9. // Copyright (c) 2015年 http://weibo.com/u/1655766025 All rights reserved. // #import <UIKit/UIKit.h> @interface UIButton (JKBackgroundColor) /** * @brief 使用颜色设置按钮背景 * * @param backgroundColor 背景颜色 * @param state 按钮状态 */ - (void)jk_setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state; @end
/* This file was generated automatically by the Snowball to ISO C compiler */ /* http://snowballstem.org/ */ #ifdef __cplusplus extern "C" { #endif extern struct SN_env * english_ISO_8859_1_create_env(void); extern void english_ISO_8859_1_close_env(struct SN_env * z); extern int english_ISO_8859_1_stem(struct SN_env * z); #ifdef __cplusplus } #endif
/*========================================================================= * * Copyright Insight Software Consortium * * 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.txt * * 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. * *=========================================================================*/ #ifndef GDCMCECHOMESSAGES_H #define GDCMCECHOMESSAGES_H #include "gdcmBaseCompositeMessage.h" namespace gdcm{ namespace network{ class ULConnection; /** * \brief CEchoRQ * this file defines the messages for the cecho action */ class CEchoRQ : public BaseCompositeMessage { public: std::vector<PresentationDataValue> ConstructPDV(const ULConnection &inConnection, const BaseRootQuery* inRootQuery); }; /** * \brief CEchoRSP * this file defines the messages for the cecho action */ class CEchoRSP : public BaseCompositeMessage { public: std::vector<PresentationDataValue> ConstructPDVByDataSet(const DataSet* inDataSet); }; } } #endif // GDCMCECHOMESSAGES_H
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_MOBILE_EMULATION_OVERRIDE_MANAGER_H_ #define CHROME_TEST_CHROMEDRIVER_CHROME_MOBILE_EMULATION_OVERRIDE_MANAGER_H_ #include <memory> #include <string> #include "base/compiler_specific.h" #include "base/macros.h" #include "chrome/test/chromedriver/chrome/devtools_event_listener.h" namespace base { class DictionaryValue; } class DevToolsClient; struct DeviceMetrics; class Status; // Overrides the device metrics, if requested, for the duration of the // given |DevToolsClient|'s lifetime. class MobileEmulationOverrideManager : public DevToolsEventListener { public: MobileEmulationOverrideManager(DevToolsClient* client, const DeviceMetrics* device_metrics); ~MobileEmulationOverrideManager() override; // Overridden from DevToolsEventListener: Status OnConnected(DevToolsClient* client) override; Status OnEvent(DevToolsClient* client, const std::string& method, const base::DictionaryValue& params) override; bool IsEmulatingTouch(); private: Status ApplyOverrideIfNeeded(); DevToolsClient* client_; const DeviceMetrics* overridden_device_metrics_; DISALLOW_COPY_AND_ASSIGN(MobileEmulationOverrideManager); }; #endif // CHROME_TEST_CHROMEDRIVER_CHROME_MOBILE_EMULATION_OVERRIDE_MANAGER_H_
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_INTERESTS_INTERESTS_FETCHER_H_ #define CHROME_BROWSER_INTERESTS_INTERESTS_FETCHER_H_ #include <string> #include <vector> #include "base/callback.h" #include "base/gtest_prod_util.h" #include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "chrome/browser/profiles/profile.h" #include "components/signin/core/browser/signin_manager.h" #include "google_apis/gaia/oauth2_token_service.h" #include "net/url_request/url_fetcher.h" #include "net/url_request/url_fetcher_delegate.h" // Class to fetch topics of interest for a user as computed by Google Now. Each // interest is a tuple of a name, a thumbnail URL and a relevance score. This // class is one-shot. To retrieve interests multiple times use multiple // instances of this class. // // Authentication is done via OAuth2 and requires the // https://www.googleapis.com/auth/googlenow scope. // // If the InterestsFetcher is deleted before the callback is called then the // request will be aborted. It is up to the user to ensure that both the // Profile and the OAuth2TokenService outlive the InterestsFetcher. // // The server required for this feature is not publicly available yet. class InterestsFetcher : public net::URLFetcherDelegate, public OAuth2TokenService::Consumer { public: struct Interest { Interest(const std::string& name, const GURL& image_url, double relevance); ~Interest(); bool operator==(const Interest& interest) const; std::string name; GURL image_url; double relevance; }; using InterestsCallback = base::Callback<void(scoped_ptr<std::vector<Interest>>)>; InterestsFetcher(OAuth2TokenService* oauth2_token_service, const std::string& account_id, net::URLRequestContextGetter* context); ~InterestsFetcher() override; static scoped_ptr<InterestsFetcher> CreateFromProfile(Profile* profile); void FetchInterests(const InterestsCallback& callback); private: // net::URLFetcherDelegate implementation. void OnURLFetchComplete(const net::URLFetcher* source) override; // OAuth2TokenService::Consumer implementation. void OnGetTokenSuccess(const OAuth2TokenService::Request* request, const std::string& access_token, const base::Time& experiation_time) override; void OnGetTokenFailure(const OAuth2TokenService::Request* request, const GoogleServiceAuthError& error) override; void StartOAuth2Request(); OAuth2TokenService::ScopeSet GetApiScopes(); scoped_ptr<net::URLFetcher> CreateFetcher(); // Parse the json response. scoped_ptr<std::vector<Interest>> ExtractInterests(const std::string& response); InterestsCallback callback_; scoped_ptr<net::URLFetcher> fetcher_; std::string account_id_; net::URLRequestContextGetter* url_request_context_; bool access_token_expired_; std::string access_token_; scoped_ptr<OAuth2TokenService::Request> oauth_request_; OAuth2TokenService* token_service_; DISALLOW_COPY_AND_ASSIGN(InterestsFetcher); }; #endif // CHROME_BROWSER_INTERESTS_INTERESTS_FETCHER_H_
/* Parameters derived from machine and compiler architecture. */ /* This file is generated mechanically by genarch.c. */ /* ---------------- Scalar alignments ---------------- */ #define ARCH_ALIGN_SHORT_MOD 2 #define ARCH_ALIGN_INT_MOD 4 #define ARCH_ALIGN_LONG_MOD 4 #define ARCH_ALIGN_PTR_MOD 4 #define ARCH_ALIGN_FLOAT_MOD 4 #define ARCH_ALIGN_DOUBLE_MOD 8 /* ---------------- Scalar sizes ---------------- */ #define ARCH_LOG2_SIZEOF_CHAR 0 #define ARCH_LOG2_SIZEOF_SHORT 1 #define ARCH_LOG2_SIZEOF_INT 2 #define ARCH_LOG2_SIZEOF_LONG 2 #define ARCH_LOG2_SIZEOF_LONG_LONG 3 #define ARCH_SIZEOF_GX_COLOR_INDEX 4 #define ARCH_SIZEOF_PTR 4 #define ARCH_SIZEOF_FLOAT 4 #define ARCH_SIZEOF_DOUBLE 8 #define ARCH_FLOAT_MANTISSA_BITS 24 #define ARCH_DOUBLE_MANTISSA_BITS 53 /* ---------------- Unsigned max values ---------------- */ #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) /* ---------------- Miscellaneous ---------------- */ #define ARCH_IS_BIG_ENDIAN 1 #define ARCH_PTRS_ARE_SIGNED 0 #define ARCH_FLOATS_ARE_IEEE 1 #define ARCH_ARITH_RSHIFT 2 #define ARCH_DIV_NEG_POS_TRUNCATES 1
// // Generated by the J2ObjC translator. DO NOT EDIT! // source: /Users/ex3ndr/Develop/actor-platform/actor-apps/core/src/main/java/im/actor/model/entity/content/FileSource.java // #ifndef _AMFileSource_H_ #define _AMFileSource_H_ #include "J2ObjC_header.h" @interface AMFileSource : NSObject #pragma mark Public - (instancetype)init; - (NSString *)getFileName; - (jint)getSize; @end J2OBJC_EMPTY_STATIC_INIT(AMFileSource) FOUNDATION_EXPORT void AMFileSource_init(AMFileSource *self); J2OBJC_TYPE_LITERAL_HEADER(AMFileSource) typedef AMFileSource ImActorModelEntityContentFileSource; #endif // _AMFileSource_H_
#pragma once #ifndef GWEN_CONTROLS_MODAL_H #define GWEN_CONTROLS_MODAL_H #include "Gwen/Controls/Base.h" #include "Gwen/Gwen.h" #include "Gwen/Skin.h" namespace Gwen { namespace ControlsInternal { class Modal : public Controls::Base { GWEN_CONTROL_INLINE( Modal, Controls::Base ) { SetKeyboardInputEnabled( true ); SetMouseInputEnabled( true ); SetShouldDrawBackground( true ); SetBounds( 0, 0, GetParent()->Width(), GetParent()->Height() ); } virtual void Layout( Skin::Base* /*skin*/ ) { SetBounds( 0, 0, GetCanvas()->Width(), GetCanvas()->Height() ); } virtual void Render( Skin::Base* skin ) { skin->DrawModalControl( this ); } }; } } #endif
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #pragma mark - // // File: /Applications/Xcode-7GM.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB // UUID: 2DB69E65-55DC-3135-A72B-65743E2556C7 // // Arch: x86_64 // Current version: 340.4.70 // Compatibility version: 1.0.0 // Source version: 340.4.6.0.0 // Minimum Mac OS X version: 10.10.0 // SDK version: 10.11.0 // // Objective-C Garbage Collection: Unsupported //
/* for dbm and dbz */ typedef struct { char *dptr; int dsize; } datum; /* standard dbm functions */ extern int dbminit(); extern datum fetch(); extern int store(); extern int delete(); /* not in dbz */ extern datum firstkey(); /* not in dbz */ extern datum nextkey(); /* not in dbz */ extern int dbmclose(); /* in dbz, but not in old dbm */ /* new stuff for dbz */ extern int dbzfresh(); extern int dbzagain(); extern datum dbzfetch(); extern int dbzstore(); extern int dbzsync(); extern long dbzsize(); extern int dbzincore(); extern int dbzcancel(); extern int dbzdebug(); /* * In principle we could handle unlimited-length keys by operating a chunk * at a time, but it's not worth it in practice. Setting a nice large * bound on them simplifies the code and doesn't hurt anything. */ #define DBZMAXKEY 255