commit
stringlengths
40
40
old_file
stringlengths
4
112
new_file
stringlengths
4
112
old_contents
stringlengths
0
2.05k
new_contents
stringlengths
28
3.9k
subject
stringlengths
17
736
message
stringlengths
18
4.78k
lang
stringclasses
1 value
license
stringclasses
13 values
repos
stringlengths
7
111k
de2899279eea8bf9500363738630d5afc27f05f8
features/mbedtls/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/mbedtls_device.h
features/mbedtls/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/mbedtls_device.h
/* * mbedtls_device.h ******************************************************************************* * Copyright (c) 2017, STMicroelectronics * SPDX-License-Identifier: Apache-2.0 * * 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 MBEDTLS_DEVICE_H #define MBEDTLS_DEVICE_H #define MBEDTLS_AES_ALT #define MBEDTLS_SHA256_ALT #define MBEDTLS_SHA1_ALT #endif /* MBEDTLS_DEVICE_H */
/* * mbedtls_device.h ******************************************************************************* * Copyright (c) 2017, STMicroelectronics * SPDX-License-Identifier: Apache-2.0 * * 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 MBEDTLS_DEVICE_H #define MBEDTLS_DEVICE_H #define MBEDTLS_AES_ALT #define MBEDTLS_SHA256_ALT #define MBEDTLS_SHA1_ALT #define MBEDTLS_MD5_ALT #define MBEDTLS_MD5_C #endif /* MBEDTLS_DEVICE_H */
Move MBEDTLS_MD5_C from mbetdls_device.h to targets.json
Move MBEDTLS_MD5_C from mbetdls_device.h to targets.json
C
apache-2.0
CalSol/mbed,karsev/mbed-os,HeadsUpDisplayInc/mbed,svogl/mbed-os,catiedev/mbed-os,kjbracey-arm/mbed,mazimkhan/mbed-os,c1728p9/mbed-os,betzw/mbed-os,YarivCol/mbed-os,infinnovation/mbed-os,HeadsUpDisplayInc/mbed,ryankurte/mbed-os,ryankurte/mbed-os,c1728p9/mbed-os,mazimkhan/mbed-os,YarivCol/mbed-os,Archcady/mbed-os,mbedmicro/mbed,catiedev/mbed-os,Archcady/mbed-os,betzw/mbed-os,Archcady/mbed-os,mbedmicro/mbed,ryankurte/mbed-os,andcor02/mbed-os,mbedmicro/mbed,andcor02/mbed-os,catiedev/mbed-os,mbedmicro/mbed,c1728p9/mbed-os,catiedev/mbed-os,svogl/mbed-os,nRFMesh/mbed-os,YarivCol/mbed-os,mazimkhan/mbed-os,andcor02/mbed-os,YarivCol/mbed-os,catiedev/mbed-os,CalSol/mbed,CalSol/mbed,nRFMesh/mbed-os,andcor02/mbed-os,HeadsUpDisplayInc/mbed,kjbracey-arm/mbed,catiedev/mbed-os,betzw/mbed-os,CalSol/mbed,kjbracey-arm/mbed,karsev/mbed-os,kjbracey-arm/mbed,betzw/mbed-os,HeadsUpDisplayInc/mbed,betzw/mbed-os,ryankurte/mbed-os,infinnovation/mbed-os,Archcady/mbed-os,infinnovation/mbed-os,mbedmicro/mbed,betzw/mbed-os,c1728p9/mbed-os,c1728p9/mbed-os,karsev/mbed-os,andcor02/mbed-os,svogl/mbed-os,nRFMesh/mbed-os,HeadsUpDisplayInc/mbed,svogl/mbed-os,Archcady/mbed-os,svogl/mbed-os,karsev/mbed-os,infinnovation/mbed-os,mazimkhan/mbed-os,nRFMesh/mbed-os,YarivCol/mbed-os,Archcady/mbed-os,nRFMesh/mbed-os,mazimkhan/mbed-os,YarivCol/mbed-os,karsev/mbed-os,andcor02/mbed-os,CalSol/mbed,mazimkhan/mbed-os,svogl/mbed-os,c1728p9/mbed-os,infinnovation/mbed-os,karsev/mbed-os,ryankurte/mbed-os,ryankurte/mbed-os,CalSol/mbed,infinnovation/mbed-os,nRFMesh/mbed-os,HeadsUpDisplayInc/mbed
7c437002355eeda375cc4616e6cde5729a871b23
modules/luni/src/main/native/include/shared/exceptions.h
modules/luni/src/main/native/include/shared/exceptions.h
/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable * * 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 EXCEPTIONS_H #define EXCEPTIONS_H #include <string.h> #include "vmi.h" void throwNewExceptionByName(JNIEnv* env, const char* name, const char* message); void throwNewOutOfMemoryError(JNIEnv* env, const char* message); void throwJavaIoIOException(JNIEnv* env, const char* message); void throwJavaIoIOExceptionClosed(JNIEnv* env); void throwNPException(JNIEnv* env, const char* message); void throwIndexOutOfBoundsException(JNIEnv* env); #endif
/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable * * 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 EXCEPTIONS_H #define EXCEPTIONS_H #include <string.h> #include "vmi.h" #ifdef __cplusplus extern "C" { #endif void throwNewExceptionByName(JNIEnv* env, const char* name, const char* message); void throwNewOutOfMemoryError(JNIEnv* env, const char* message); void throwJavaIoIOException(JNIEnv* env, const char* message); void throwJavaIoIOExceptionClosed(JNIEnv* env); void throwNPException(JNIEnv* env, const char* message); void throwIndexOutOfBoundsException(JNIEnv* env); #ifdef __cplusplus } #endif #endif
Fix C++ compilation on windows.
Fix C++ compilation on windows. svn path=/incubator/harmony/enhanced/classlib/trunk/; revision=423414
C
apache-2.0
freeVM/freeVM,freeVM/freeVM,freeVM/freeVM,freeVM/freeVM,freeVM/freeVM
e454c0d607937d13dbd72e4b28b8fc76cc18c281
include/llvm/Transforms/Utils/FunctionUtils.h
include/llvm/Transforms/Utils/FunctionUtils.h
//===-- Transform/Utils/FunctionUtils.h - Function Utils --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This family of transformations manipulate LLVM functions. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_UTILS_FUNCTION_H #define LLVM_TRANSFORMS_UTILS_FUNCTION_H namespace llvm { class Function; class Loop; /// ExtractCodeRegion - rip out a sequence of basic blocks into a new function /// Function* ExtractCodeRegion(const std::vector<BasicBlock*> &code); /// ExtractLoop - rip out a natural loop into a new function /// Function* ExtractLoop(Loop *L); /// ExtractBasicBlock - rip out a basic block into a new function /// Function* ExtractBasicBlock(BasicBlock *BB); } #endif
//===-- Transform/Utils/FunctionUtils.h - Function Utils --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This family of transformations manipulate LLVM functions. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_UTILS_FUNCTION_H #define LLVM_TRANSFORMS_UTILS_FUNCTION_H #include <vector> namespace llvm { class BasicBlock; class Function; class Loop; /// ExtractCodeRegion - rip out a sequence of basic blocks into a new function /// Function* ExtractCodeRegion(const std::vector<BasicBlock*> &code); /// ExtractLoop - rip out a natural loop into a new function /// Function* ExtractLoop(Loop *L); /// ExtractBasicBlock - rip out a basic block into a new function /// Function* ExtractBasicBlock(BasicBlock *BB); } #endif
Make this header file self-contained
Make this header file self-contained git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@12480 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap
a345f80417166e9ebd13957fdc6d57a24aff64a7
Settings/Updater/Version.h
Settings/Updater/Version.h
#pragma once #include <string> struct Version { public: const int major; const int minor; const int revision; Version(int major, int minor = 0, int revision = 0) : major(major), minor(minor), revision(revision) { } std::wstring ToString() { return std::to_wstring(major) + L"." + std::to_wstring(minor) + L"." + std::to_wstring(revision); } };
Add class to encapsulate app versions
Add class to encapsulate app versions
C
bsd-2-clause
malensek/3RVX,malensek/3RVX,malensek/3RVX
80365a877eb48595507fe83a7b32a634a413d689
HLT/PHOS/AliHLTPHOSModuleCellEnergyData.h
HLT/PHOS/AliHLTPHOSModuleCellEnergyData.h
#ifndef ALIHLTPHOSNODULECELLENERGYDATA_H #define ALIHLTPHOSNODULECELLENERGYDATA_H struct AliHLTPHOSModuleCellEnergyData { AliHLTUInt8_t fModuleID; unsigned long cellEnergies[64][56][2]; }; #endif
Structure to hold cell energy data for a PHOS module
Structure to hold cell energy data for a PHOS module
C
bsd-3-clause
ALICEHLT/AliRoot,shahor02/AliRoot,coppedis/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,miranov25/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,coppedis/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,ALICEHLT/AliRoot,jgrosseo/AliRoot,sebaleh/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,ALICEHLT/AliRoot,shahor02/AliRoot,miranov25/AliRoot,alisw/AliRoot,alisw/AliRoot,miranov25/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,jgrosseo/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,ALICEHLT/AliRoot,jgrosseo/AliRoot,alisw/AliRoot,miranov25/AliRoot,shahor02/AliRoot,alisw/AliRoot,coppedis/AliRoot,jgrosseo/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,jgrosseo/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,sebaleh/AliRoot,sebaleh/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,miranov25/AliRoot,coppedis/AliRoot,jgrosseo/AliRoot,alisw/AliRoot,coppedis/AliRoot,mkrzewic/AliRoot,coppedis/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,ecalvovi/AliRoot,ecalvovi/AliRoot,ecalvovi/AliRoot,shahor02/AliRoot,shahor02/AliRoot,shahor02/AliRoot,coppedis/AliRoot
ef8f03fe761ede729d5e1ee93f70ae6c40994bad
ir/be/ia32/ia32_optimize.h
ir/be/ia32/ia32_optimize.h
/* * This file is part of libFirm. * Copyright (C) 2012 University of Karlsruhe. */ /** * @file * @brief Implements several optimizations for IA32. * @author Christian Wuerdig */ #ifndef FIRM_BE_IA32_IA32_OPTIMIZE_H #define FIRM_BE_IA32_IA32_OPTIMIZE_H #include "firm_types.h" /** * Prepares irg for codegeneration. */ void ia32_pre_transform_phase(ir_graph *irg); /** * Performs conv and address mode optimizations. * @param cg The ia32 codegenerator object */ void ia32_optimize_graph(ir_graph *irg); /** * Performs Peephole Optimizations an a graph. * * @param irg the graph * @param cg the code generator object */ void ia32_peephole_optimization(ir_graph *irg); /** Initialize the ia32 address mode optimizer. */ void ia32_init_optimize(void); #endif
/* * This file is part of libFirm. * Copyright (C) 2012 University of Karlsruhe. */ /** * @file * @brief Implements several optimizations for IA32. * @author Christian Wuerdig */ #ifndef FIRM_BE_IA32_IA32_OPTIMIZE_H #define FIRM_BE_IA32_IA32_OPTIMIZE_H #include "firm_types.h" /** * Performs conv and address mode optimizations. * @param cg The ia32 codegenerator object */ void ia32_optimize_graph(ir_graph *irg); /** * Performs Peephole Optimizations an a graph. * * @param irg the graph * @param cg the code generator object */ void ia32_peephole_optimization(ir_graph *irg); /** Initialize the ia32 address mode optimizer. */ void ia32_init_optimize(void); #endif
Remove stale declaration of 'ia32_pre_transform_phase()'.
ia32: Remove stale declaration of 'ia32_pre_transform_phase()'. This function was deleted in 2007!
C
lgpl-2.1
jonashaag/libfirm,libfirm/libfirm,MatzeB/libfirm,libfirm/libfirm,jonashaag/libfirm,jonashaag/libfirm,jonashaag/libfirm,MatzeB/libfirm,jonashaag/libfirm,MatzeB/libfirm,libfirm/libfirm,jonashaag/libfirm,MatzeB/libfirm,libfirm/libfirm,MatzeB/libfirm,libfirm/libfirm,jonashaag/libfirm,MatzeB/libfirm,MatzeB/libfirm
4770277ec7a285f0f96e9a88af9d4992b7f4b50b
src/google/protobuf/stubs/atomicops_internals_pnacl.h
src/google/protobuf/stubs/atomicops_internals_pnacl.h
// Protocol Buffers - Google's data interchange format // Copyright 2012 Google Inc. All rights reserved. // http://code.google.com/p/protobuf/ // // 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. // This file is an internal atomic implementation, use atomicops.h instead. #ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_PNACL_H_ #define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_PNACL_H_ namespace google { namespace protobuf { namespace internal { inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, Atomic32 old_value, Atomic32 new_value) { return __sync_val_compare_and_swap(ptr, old_value, new_value); } inline void MemoryBarrier() { __sync_synchronize(); } inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr, Atomic32 old_value, Atomic32 new_value) { Atomic32 ret = NoBarrier_CompareAndSwap(ptr, old_value, new_value); MemoryBarrier(); return ret; } inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) { MemoryBarrier(); *ptr = value; } inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) { Atomic32 value = *ptr; MemoryBarrier(); return value; } } // namespace internal } // namespace protobuf } // namespace google #endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_PNACL_H_
Add the missing PNaCl atomicops support.
Add the missing PNaCl atomicops support.
C
bsd-3-clause
orangeholic/protobuf,google/protobuf,rzagabe/protobuf,Livefyre/protobuf,rzagabe/protobuf,google/protobuf,google/protobuf,wang-xinhong/protobuf,Livefyre/protobuf,google/protobuf,rzagabe/protobuf,google/protobuf,google/protobuf,Livefyre/protobuf,wang-xinhong/protobuf,google/protobuf,orangeholic/protobuf,google/protobuf,orangeholic/protobuf,rzagabe/protobuf,rzagabe/protobuf,Livefyre/protobuf,Livefyre/protobuf,google/protobuf,google/protobuf,wang-xinhong/protobuf,wang-xinhong/protobuf,orangeholic/protobuf,google/protobuf
0fe071307ac99f08e8160df36413065a3bafe1a6
arch/sparc/include/atomic.h
arch/sparc/include/atomic.h
/* $OpenBSD: atomic.h,v 1.2 2007/02/19 17:18:43 deraadt Exp $ */ /* Public Domain */ #ifndef __SPARC_ATOMIC_H__ #define __SPARC_ATOMIC_H__ #if defined(_KERNEL) static __inline void atomic_setbits_int(__volatile unsigned int *uip, unsigned int v) { *uip |= v; } static __inline void atomic_clearbits_int(__volatile unsigned int *uip, unsigned int v) { *uip &= ~v; } #endif /* defined(_KERNEL) */ #endif /* __SPARC_ATOMIC_H__ */
/* $OpenBSD: atomic.h,v 1.3 2007/04/27 19:22:47 miod Exp $ */ /* Public Domain */ #ifndef __SPARC_ATOMIC_H__ #define __SPARC_ATOMIC_H__ #if defined(_KERNEL) static __inline void atomic_setbits_int(__volatile unsigned int *uip, unsigned int v) { int psr; psr = getpsr(); setpsr(psr | PSR_PIL); *uip |= v; setpsr(psr); } static __inline void atomic_clearbits_int(__volatile unsigned int *uip, unsigned int v) { int psr; psr = getpsr(); setpsr(psr | PSR_PIL); *uip &= ~v; setpsr(psr); } #endif /* defined(_KERNEL) */ #endif /* __SPARC_ATOMIC_H__ */
Disable interrupts around bit operations; ok deraadt@
Disable interrupts around bit operations; ok deraadt@
C
isc
orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars
060812dc5b6fe3c2f0005da3559af6694153fae5
base/macros.h
base/macros.h
// Please don't add a copyright notice to this file. It contains source code // owned by other copyright holders (used under license). #ifndef BASE_MACROS_H_ #define BASE_MACROS_H_ // From Google C++ Style Guide // http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml // Accessed February 8, 2013 // // A macro to disallow the copy constructor and operator= functions // This should be used in the private: declarations for a class // // TODO(dss): Use C++11's "= delete" syntax to suppress the creation of default // class members. #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&); \ void operator=(const TypeName&) // Example from the Google C++ Style Guide: // // class Foo { // public: // Foo(int f); // ~Foo(); // // private: // DISALLOW_COPY_AND_ASSIGN(Foo); // }; // A macro to compute the number of elements in a statically allocated array. #define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0])) #endif // BASE_MACROS_H_
// Please don't add a copyright notice to this file. It contains source code // owned by other copyright holders (used under license). #ifndef BASE_MACROS_H_ #define BASE_MACROS_H_ // A macro to disallow the copy constructor and operator= functions. #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&) = delete; \ void operator=(const TypeName&) = delete // A macro to compute the number of elements in a statically allocated array. #define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0])) #endif // BASE_MACROS_H_
Modify the DISALLOW_COPY_AND_ASSIGN macro to use C++11's '= delete' syntax.
Modify the DISALLOW_COPY_AND_ASSIGN macro to use C++11's '= delete' syntax.
C
apache-2.0
snyderek/floating_temple,snyderek/floating_temple,snyderek/floating_temple
ebdb000f40a6a2a8f560314e15616000a3c56b7a
tmcd/decls.h
tmcd/decls.h
/* * EMULAB-COPYRIGHT * Copyright (c) 2000-2004 University of Utah and the Flux Group. * All rights reserved. */ #define TBSERVER_PORT 7777 #define TBSERVER_PORT2 14447 #define MYBUFSIZE 2048 #define BOSSNODE_FILENAME "bossnode" /* * As the tmcd changes, incompatable changes with older version of * the software cause problems. Starting with version 3, the client * will tell tmcd what version they are. If no version is included, * assume its DEFAULT_VERSION. * * Be sure to update the versions as the TMCD changes. Both the * tmcc and tmcd have CURRENT_VERSION compiled in, so be sure to * install new versions of each binary when the current version * changes. libsetup.pm module also encodes a current version, so be * sure to change it there too! * * Note, this is assumed to be an integer. No need for 3.23.479 ... * NB: See ron/libsetup.pm. That is version 4! I'll merge that in. */ #define DEFAULT_VERSION 2 #define CURRENT_VERSION 17
/* * EMULAB-COPYRIGHT * Copyright (c) 2000-2004 University of Utah and the Flux Group. * All rights reserved. */ #define TBSERVER_PORT 7777 #define TBSERVER_PORT2 14447 #define MYBUFSIZE 2048 #define BOSSNODE_FILENAME "bossnode" /* * As the tmcd changes, incompatable changes with older version of * the software cause problems. Starting with version 3, the client * will tell tmcd what version they are. If no version is included, * assume its DEFAULT_VERSION. * * Be sure to update the versions as the TMCD changes. Both the * tmcc and tmcd have CURRENT_VERSION compiled in, so be sure to * install new versions of each binary when the current version * changes. libsetup.pm module also encodes a current version, so be * sure to change it there too! * * Note, this is assumed to be an integer. No need for 3.23.479 ... * NB: See ron/libsetup.pm. That is version 4! I'll merge that in. */ #define DEFAULT_VERSION 2 #define CURRENT_VERSION 18
Update current version 18. Described in tmcd/tmcd.c commit 1.232.
Update current version 18. Described in tmcd/tmcd.c commit 1.232.
C
agpl-3.0
nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome
2c9d05ccc2de24724c90cea330cc607bc2f4e1e7
tests/regression/01-cpa/72-library-function-pointer.c
tests/regression/01-cpa/72-library-function-pointer.c
#include <fcntl.h> #include <unistd.h> typedef void (*fnct_ptr)(void); typedef int (*open_t)(const char*,int,int); typedef int (*ftruncate_t)(int,off_t); // Goblint used to crash on this example because the number of supplied arguments for myopen is bigger than // than the expected number of arguments for the library function descriptior of ftruncate. // -- "open" expects 3 arguments, while "ftruncate" expects only 2. int main(){ fnct_ptr ptr; int top; if (top){ ptr = &open; } else { ptr = &ftruncate; } if (top) { // Some (nonsensical, but compiling) call to open open_t myopen; myopen = (open_t) ptr; myopen("some/path", O_CREAT, 0); } else { // Some (nonsensical, but compiling) call to ftruncate ftruncate_t myftruncate; myftruncate = (ftruncate_t) ptr; myftruncate(0, 100); } return 0; }
Add test case revealing crash of Goblint due to call of library function via function pointer
Add test case revealing crash of Goblint due to call of library function via function pointer
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
688f0e388bbb0ae4420c8e3145e83cb15d9b3829
ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h
ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h
#define MICROPY_HW_BOARD_NAME "Arduino MKR1300" #define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_PORT_A (PORT_PA24 | PORT_PA25) #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) #include "internal_flash.h" #define CIRCUITPY_INTERNAL_NVM_SIZE 0 #define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) #define DEFAULT_I2C_BUS_SCL (&pin_PA09) #define DEFAULT_I2C_BUS_SDA (&pin_PA08) #define DEFAULT_SPI_BUS_SCK (&pin_PA13) #define DEFAULT_SPI_BUS_MOSI (&pin_PA12) #define DEFAULT_SPI_BUS_MISO (&pin_PA15) #define DEFAULT_UART_BUS_RX (&pin_PB23) #define DEFAULT_UART_BUS_TX (&pin_PB22) // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1
#define MICROPY_HW_BOARD_NAME "Arduino MKR1300" #define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_PORT_A (0) #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) #define CIRCUITPY_INTERNAL_NVM_SIZE 0 #define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) #define DEFAULT_I2C_BUS_SCL (&pin_PA09) #define DEFAULT_I2C_BUS_SDA (&pin_PA08) #define DEFAULT_SPI_BUS_SCK (&pin_PA13) #define DEFAULT_SPI_BUS_MOSI (&pin_PA12) #define DEFAULT_SPI_BUS_MISO (&pin_PA15) #define DEFAULT_UART_BUS_RX (&pin_PB23) #define DEFAULT_UART_BUS_TX (&pin_PB22) // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1
Update MKR1300 board definition too
Update MKR1300 board definition too
C
mit
adafruit/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython
4326070fe4b5f9f92c6dca263b9cfb53236537c8
fs/fs/src/fs_mkdir.c
fs/fs/src/fs_mkdir.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ #include <fs/fs.h> #include <fs/fs_if.h> #include "fs_priv.h" int fs_rename(const char *from, const char *to) { struct fs_ops *fops = safe_fs_ops_for("fatfs"); return fops->f_rename(from, to); } int fs_mkdir(const char *path) { struct fs_ops *fops = safe_fs_ops_for("fatfs"); return fops->f_mkdir(path); }
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ #include <fs/fs.h> #include <fs/fs_if.h> #include "fs_priv.h" struct fs_ops *fops_from_filename(const char *); int fs_rename(const char *from, const char *to) { struct fs_ops *fops = fops_from_filename(from); return fops->f_rename(from, to); } int fs_mkdir(const char *path) { struct fs_ops *fops = fops_from_filename(path); return fops->f_mkdir(path); }
Update for compatibility with multiple FS
Update for compatibility with multiple FS
C
apache-2.0
mlaz/mynewt-core,andrzej-kaczmarek/apache-mynewt-core,wes3/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,wes3/incubator-mynewt-core,andrzej-kaczmarek/apache-mynewt-core,mlaz/mynewt-core,wes3/incubator-mynewt-core,mlaz/mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,wes3/incubator-mynewt-core,mlaz/mynewt-core,andrzej-kaczmarek/apache-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,wes3/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,andrzej-kaczmarek/apache-mynewt-core,mlaz/mynewt-core,IMGJulian/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core
35297cc39022d1e00ba0465e9346308fff79c856
source/common/hal/cortex_m.h
source/common/hal/cortex_m.h
/* CMSIS-DAP Interface Firmware * Copyright (c) 2009-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 CORTEX_M_H #define CORTEX_M_H #include <stdint.h> typedef int cortex_int_state_t; __attribute__((always_inline)) static cortex_int_state_t cortex_int_get_and_disable(void) { cortex_int_state_t state; state = __disable_irq(); return state; } __attribute__((always_inline)) static void cortex_int_restore(cortex_int_state_t state) { if (!state) { __enable_irq(); } } #endif
Add functions to disable and restore interrupts
Add functions to disable and restore interrupts Add the two functions cortex_int_get_and_disable and cortex_int_restore. This allows interrupts to be disabled globally.
C
apache-2.0
sg-/DAPLink,google/DAPLink-port,google/DAPLink-port,google/DAPLink-port,sg-/DAPLink,sg-/DAPLink,google/DAPLink-port
b0daf7e3a2529dd9950d77a96a10233d68778f32
json-glib/json-glib.h
json-glib/json-glib.h
#ifndef __JSON_GLIB_H__ #define __JSON_GLIB_H__ #include <json-glib/json-types.h> #include <json-glib/json-scanner.h> #include <json-glib/json-generator.h> #include <json-glib/json-parser.h> #include <json-glib/json-version.h> #endif /* __JSON_GLIB_H__ */
#ifndef __JSON_GLIB_H__ #define __JSON_GLIB_H__ #include <json-glib/json-types.h> #include <json-glib/json-scanner.h> #include <json-glib/json-generator.h> #include <json-glib/json-parser.h> #include <json-glib/json-version.h> #include <json-glib/json-enum-types.h> #endif /* __JSON_GLIB_H__ */
Include the newly added json-enum-types.h header
Include the newly added json-enum-types.h header When including json-glib/json-glib.h we get everything json-glib expose as a public symbol.
C
lgpl-2.1
frida/json-glib,GNOME/json-glib,robtaylor/json-glib-gvariant,oerdnj/json-glib,ebassi/json-glib,robtaylor/json-glib-gvariant,frida/json-glib,GNOME/json-glib,Distrotech/json-glib,oerdnj/json-glib,oerdnj/json-glib,Distrotech/json-glib,brauliobo/json-glib,brauliobo/json-glib,oerdnj/json-glib,brauliobo/json-glib,ebassi/json-glib,Distrotech/json-glib,ebassi/json-glib
a827c1facd4eba0f308796e9cda7a8815c06c7f8
3RVX/SettingsDefaults.h
3RVX/SettingsDefaults.h
#pragma once #include "MeterWnd/Animations/AnimationTypes.h" #include "Settings.h" class SettingsDefaults { public: /* Default settings */ static const bool OnTop = true; static const AnimationTypes::HideAnimation DefaultHideAnim = AnimationTypes::Fade; static const bool HideFullscreen = false; static const bool HideDirectX = false; static const int HideSpeed = 765; static const int HideTime = 800; static constexpr const float VolumeLimit = 1.0f; static const bool NotifyIcon = true; static const bool ShowOnStartup = true; static const bool SoundsEnabled = true; static const int OSDOffset = 140; static const Settings::OSDPos OSDPosition = Settings::OSDPos::Bottom; static const bool AutoUpdate = false; static const bool MuteLock = false; static const bool SubscribeVolumeEvents = true; static const bool SubscribeEjectEvents = true; static const bool VolumeOSDEnabled = true; static const bool EjectOSDEnabled = true; static const bool BrightnessOSDEnabled = true; static const bool KeyboardOSDEnabled = false; };
#pragma once #include "MeterWnd/Animations/AnimationTypes.h" #include "Settings.h" class SettingsDefaults { public: /* String Constants*/ static constexpr const wchar_t *Language = L"English"; static constexpr const wchar_t *Skin = L"Classic"; static constexpr const wchar_t *MainAppName = L"3RVX.exe"; static constexpr const wchar_t *SettingsAppName = L"Settings.exe"; static constexpr const wchar_t *SettingsFileName = L"Settings.xml"; static constexpr const wchar_t *LanguageDirName = L"Languages"; static constexpr const wchar_t *SkinDirName = L"Skins"; static constexpr const wchar_t *SkinFileName = L"Skin.xml"; /* OSDs */ static const bool VolumeOSDEnabled = true; static const bool EjectOSDEnabled = true; static const bool BrightnessOSDEnabled = true; static const bool KeyboardOSDEnabled = false; static const bool OnTop = true; static const bool HideFullscreen = false; static const bool HideDirectX = false; static const AnimationTypes::HideAnimation DefaultHideAnim = AnimationTypes::Fade; static const int HideSpeed = 765; static const int HideTime = 800; static constexpr const float VolumeLimit = 1.0f; static const bool NotifyIcon = true; static const bool ShowOnStartup = true; static const bool SoundsEnabled = true; static const int OSDOffset = 140; static const Settings::OSDPos OSDPosition = Settings::OSDPos::Bottom; static const bool AutoUpdate = false; static const bool MuteLock = false; static const bool SubscribeVolumeEvents = true; static const bool SubscribeEjectEvents = true; };
Add string constants and reorganize defaults
Add string constants and reorganize defaults
C
bsd-2-clause
malensek/3RVX,malensek/3RVX,malensek/3RVX
3d5c1b923efb1e93a6bae83bcce6f57fd3e03bf8
src/cstubs/cstubs_internals.h
src/cstubs/cstubs_internals.h
/* * Copyright (c) 2014 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. */ #ifndef CSTUBS_INTERNALS_H #define CSTUBS_INTERNALS_H /* Types and functions used by generated C code. */ #include "ctypes/primitives.h" #include "ctypes/complex_stubs.h" #include "ctypes/raw_pointer.h" #include "ctypes/managed_buffer_stubs.h" #endif /* CSTUBS_INTERNALS_H */
Add a single header file with everything needed by generated stubs.
Add a single header file with everything needed by generated stubs.
C
mit
sjfloat/ocaml-ctypes,whitequark/ocaml-ctypes,ocamllabs/ocaml-ctypes,dsheets/ocaml-ctypes,yallop/ocaml-ctypes,whitequark/ocaml-ctypes,fdopen/ocaml-ctypes,dsheets/ocaml-ctypes,fdopen/ocaml-ctypes,ocamllabs/ocaml-ctypes,fdopen/ocaml-ctypes,sjfloat/ocaml-ctypes,yallop/ocaml-ctypes,dsheets/ocaml-ctypes,sjfloat/ocaml-ctypes,whitequark/ocaml-ctypes
1bf082ea8864b04f6bb15889fba66e092fd6b2f8
lib/shared/mem.h
lib/shared/mem.h
#ifndef MEM_H__ #define MEM_H__ #include <stdlib.h> #include "ocomm/o_log.h" void *xmalloc (size_t size); void *xcalloc (size_t count, size_t size); void *xrealloc (void *ptr, size_t size); size_t xmalloc_usable_size(void *ptr); char *xstralloc (size_t len); void *xmemdupz (const void *data, size_t len); char *xstrndup (const char *str, size_t len); void xfree (void *ptr); size_t xmembytes(); size_t xmemnew(); size_t xmemfreed(); char *xmemsummary (); void xmemreport (int loglevel); #endif /* MEM_H__ */ /* Local Variables: mode: C tab-width: 2 indent-tabs-mode: nil End: vim: sw=2:sts=2:expandtab */
#ifndef MEM_H__ #define MEM_H__ #include <stdlib.h> #include "ocomm/o_log.h" void *xmalloc (size_t size); void *xcalloc (size_t count, size_t size); void *xrealloc (void *ptr, size_t size); size_t xmalloc_usable_size(void *ptr); char *xstralloc (size_t len); void *xmemdupz (const void *data, size_t len); char *xstrndup (const char *str, size_t len); void xfree (void *ptr); size_t xmembytes(); size_t xmemnew(); size_t xmemfreed(); char *xmemsummary (); void xmemreport (int loglevel); /* Duplicate nil-terminated string * * \param str string to copy in the new xchunk * \return the newly allocated xchunk, or NULL * \see xstrndup * \see strndup(3), strlen(3) */ #define xstrdup(str) xstrndup((str), strlen((str))) #endif /* MEM_H__ */ /* Local Variables: mode: C tab-width: 2 indent-tabs-mode: nil End: vim: sw=2:sts=2:expandtab */
Add xstrdup as a convenience macro around xstrndup
Add xstrdup as a convenience macro around xstrndup Signed-off-by: Olivier Mehani <[email protected]>
C
mit
alco90/soml,mytestbed/oml,lees0414/EUproject,mytestbed/oml,mytestbed/oml,lees0414/EUproject,lees0414/EUproject,mytestbed/oml,mytestbed/oml,alco90/soml,lees0414/EUproject,alco90/soml,lees0414/EUproject,alco90/soml,alco90/soml
79ad033eb47e12d5ea50015d10855c6ff3bc535b
src/ctypes/type_info_stubs.h
src/ctypes/type_info_stubs.h
/* * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. */ #ifndef TYPE_INFO_STUBS_H #define TYPE_INFO_STUBS_H #include <caml/mlvalues.h> #include <caml/fail.h> #include <caml/callback.h> /* allocate_unpassable_struct_type_info : (size, alignment) -> _ ctype */ value ctypes_allocate_unpassable_struct_type_info(int size, int alignment); /* Read a C value from a block of memory */ /* read : 'a prim -> offset:int -> raw_pointer -> 'a */ extern value ctypes_read(value ctype, value offset, value buffer); /* Write a C value to a block of memory */ /* write : 'a prim -> offset:int -> 'a -> raw_pointer -> unit */ extern value ctypes_write(value ctype, value offset, value v, value buffer); #endif /* TYPE_INFO_STUBS_H */
/* * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. */ #ifndef TYPE_INFO_STUBS_H #define TYPE_INFO_STUBS_H #include <caml/mlvalues.h> /* Read a C value from a block of memory */ /* read : 'a prim -> offset:int -> raw_pointer -> 'a */ extern value ctypes_read(value ctype, value offset, value buffer); /* Write a C value to a block of memory */ /* write : 'a prim -> offset:int -> 'a -> raw_pointer -> unit */ extern value ctypes_write(value ctype, value offset, value v, value buffer); #endif /* TYPE_INFO_STUBS_H */
Remove another obsolete function declaration.
Remove another obsolete function declaration.
C
mit
yallop/ocaml-ctypes,fdopen/ocaml-ctypes,dsheets/ocaml-ctypes,sjfloat/ocaml-ctypes,yallop/ocaml-ctypes,whitequark/ocaml-ctypes,whitequark/ocaml-ctypes,sjfloat/ocaml-ctypes,sjfloat/ocaml-ctypes,dsheets/ocaml-ctypes,fdopen/ocaml-ctypes,fdopen/ocaml-ctypes,whitequark/ocaml-ctypes,dsheets/ocaml-ctypes,ocamllabs/ocaml-ctypes,ocamllabs/ocaml-ctypes
d2ed7959a892af6dfe0fc07d772ee3e7bfc70235
src/systems/SimplePhysics.h
src/systems/SimplePhysics.h
#pragma once #include "../IFactory.h" #include "../ISystem.h" #include <string> #include <vector> #include <map> #include "../AABBTree.h" class Property; class IMoverComponent; class SimplePhysics : public Sigma::IFactory, public ISystem<IMoverComponent> { public: SimplePhysics() { } ~SimplePhysics() { }; /** * \brief Starts the Simple Physics system. * * \return bool Returns false on startup failure. */ bool Start() { } /** * \brief Causes an update in the system based on the change in time. * * Updates the state of the system based off how much time has elapsed since the last update. * \param[in] const float delta The change in time since the last update * \return bool Returns true if we had an update interval passed. */ bool Update(const double delta); std::map<std::string,FactoryFunction> getFactoryFunctions(); void createPhysicsMover(const unsigned int entityID, std::vector<Property> &properties) ; void createViewMover(const unsigned int entityID, std::vector<Property> &properties) ; void createAABBTree(const unsigned int entityID, std::vector<Property> &properties) ; private: std::map<unsigned int, Sigma::AABBTree*> colliders; };
#pragma once #include "../IFactory.h" #include "../ISystem.h" #include <string> #include <vector> #include <map> #include "../AABBTree.h" class Property; class IMoverComponent; class SimplePhysics : public Sigma::IFactory, public ISystem<IMoverComponent> { public: SimplePhysics() { } ~SimplePhysics() { }; /** * \brief Starts the Simple Physics system. * * \return bool Returns false on startup failure. */ bool Start() { } /** * \brief Causes an update in the system based on the change in time. * * Updates the state of the system based off how much time has elapsed since the last update. * \param[in] const float delta The change in time since the last update * \return bool Returns true if we had an update interval passed. */ bool Update(const double delta); std::map<std::string,FactoryFunction> getFactoryFunctions(); void createPhysicsMover(const unsigned int entityID, std::vector<Property> &properties) ; void createViewMover(const unsigned int entityID, std::vector<Property> &properties) ; void createAABBTree(const unsigned int entityID, std::vector<Property> &properties) ; Sigma::AABBTree* GetCollider(const unsigned int entityID) { if (this->colliders.find(entityID) != this->colliders.end()) { return this->colliders[entityID]; } return nullptr; } private: std::map<unsigned int, Sigma::AABBTree*> colliders; };
Add the ability to get Colliders from SImplePhysics
Add the ability to get Colliders from SImplePhysics
C
mit
adam4813/Sigma,adam4813/Sigma
218edbbeb90d26f3c1a3934b8eae931ac972b957
PWGCF/PWGCFChaoticityLinkDef.h
PWGCF/PWGCFChaoticityLinkDef.h
#pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class AliChaoticity+; #pragma link C++ class AliThreePionRadii+; #pragma link C++ class AliChaoticityEventCollection+; #pragma link C++ class AliChaoticityEventStruct+; #pragma link C++ class AliChaoticityTrackStruct+; #pragma link C++ class AliChaoticityMCStruct+; #pragma link C++ class AliChaoticityPairStruct+; #pragma link C++ class AliChaoticityNormPairStruct+;
#pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class AliChaoticity+; #pragma link C++ class AliThreePionRadii+; #pragma link C++ class AliChaoticityEventCollection+; #pragma link C++ class AliChaoticityEventStruct+; #pragma link C++ class AliChaoticityTrackStruct+; #pragma link C++ class AliChaoticityMCStruct+; #pragma link C++ class AliChaoticityPairStruct+; #pragma link C++ class AliChaoticityNormPairStruct+; #pragma link C++ class AliFourPion+; #pragma link C++ class AliFourPionEventCollection+; #pragma link C++ class AliFourPionEventStruct+; #pragma link C++ class AliFourPionTrackStruct+; #pragma link C++ class AliFourPionMCStruct+;
Update compile code for 4-pion analysis
Update compile code for 4-pion analysis
C
bsd-3-clause
alisw/AliPhysics,jmargutt/AliPhysics,btrzecia/AliPhysics,btrzecia/AliPhysics,victor-gonzalez/AliPhysics,amaringarcia/AliPhysics,akubera/AliPhysics,fcolamar/AliPhysics,lcunquei/AliPhysics,dstocco/AliPhysics,sebaleh/AliPhysics,mkrzewic/AliPhysics,mazimm/AliPhysics,mazimm/AliPhysics,akubera/AliPhysics,nschmidtALICE/AliPhysics,AMechler/AliPhysics,dmuhlhei/AliPhysics,sebaleh/AliPhysics,hzanoli/AliPhysics,mkrzewic/AliPhysics,jmargutt/AliPhysics,sebaleh/AliPhysics,mbjadhav/AliPhysics,hcab14/AliPhysics,aaniin/AliPhysics,dmuhlhei/AliPhysics,ppribeli/AliPhysics,mpuccio/AliPhysics,AMechler/AliPhysics,mbjadhav/AliPhysics,dlodato/AliPhysics,victor-gonzalez/AliPhysics,fcolamar/AliPhysics,preghenella/AliPhysics,amatyja/AliPhysics,fcolamar/AliPhysics,mazimm/AliPhysics,dlodato/AliPhysics,rihanphys/AliPhysics,ppribeli/AliPhysics,dmuhlhei/AliPhysics,mvala/AliPhysics,jmargutt/AliPhysics,yowatana/AliPhysics,btrzecia/AliPhysics,nschmidtALICE/AliPhysics,AMechler/AliPhysics,pchrista/AliPhysics,adriansev/AliPhysics,amaringarcia/AliPhysics,fbellini/AliPhysics,kreisl/AliPhysics,lcunquei/AliPhysics,AMechler/AliPhysics,kreisl/AliPhysics,fbellini/AliPhysics,victor-gonzalez/AliPhysics,hzanoli/AliPhysics,dlodato/AliPhysics,pbatzing/AliPhysics,alisw/AliPhysics,rbailhac/AliPhysics,AudreyFrancisco/AliPhysics,akubera/AliPhysics,pbuehler/AliPhysics,hcab14/AliPhysics,mvala/AliPhysics,mpuccio/AliPhysics,fcolamar/AliPhysics,adriansev/AliPhysics,ALICEHLT/AliPhysics,yowatana/AliPhysics,rbailhac/AliPhysics,preghenella/AliPhysics,lfeldkam/AliPhysics,alisw/AliPhysics,AudreyFrancisco/AliPhysics,pchrista/AliPhysics,pchrista/AliPhysics,hzanoli/AliPhysics,hcab14/AliPhysics,kreisl/AliPhysics,mazimm/AliPhysics,ppribeli/AliPhysics,nschmidtALICE/AliPhysics,jmargutt/AliPhysics,fcolamar/AliPhysics,lfeldkam/AliPhysics,AudreyFrancisco/AliPhysics,rderradi/AliPhysics,mpuccio/AliPhysics,dstocco/AliPhysics,mvala/AliPhysics,akubera/AliPhysics,mvala/AliPhysics,rihanphys/AliPhysics,dmuhlhei/AliPhysics,aaniin/AliPhysics,rderradi/AliPhysics,hcab14/AliPhysics,dstocco/AliPhysics,lfeldkam/AliPhysics,aaniin/AliPhysics,nschmidtALICE/AliPhysics,jmargutt/AliPhysics,dlodato/AliPhysics,sebaleh/AliPhysics,dstocco/AliPhysics,fcolamar/AliPhysics,rihanphys/AliPhysics,mkrzewic/AliPhysics,mvala/AliPhysics,ALICEHLT/AliPhysics,yowatana/AliPhysics,kreisl/AliPhysics,mkrzewic/AliPhysics,lcunquei/AliPhysics,SHornung1/AliPhysics,rbailhac/AliPhysics,jgronefe/AliPhysics,pbatzing/AliPhysics,carstooon/AliPhysics,jgronefe/AliPhysics,yowatana/AliPhysics,pbuehler/AliPhysics,ppribeli/AliPhysics,pbuehler/AliPhysics,lcunquei/AliPhysics,ALICEHLT/AliPhysics,AMechler/AliPhysics,jmargutt/AliPhysics,victor-gonzalez/AliPhysics,rbailhac/AliPhysics,rihanphys/AliPhysics,lcunquei/AliPhysics,SHornung1/AliPhysics,preghenella/AliPhysics,AudreyFrancisco/AliPhysics,aaniin/AliPhysics,sebaleh/AliPhysics,hcab14/AliPhysics,ALICEHLT/AliPhysics,rihanphys/AliPhysics,pbatzing/AliPhysics,pchrista/AliPhysics,amatyja/AliPhysics,aaniin/AliPhysics,akubera/AliPhysics,preghenella/AliPhysics,mvala/AliPhysics,amatyja/AliPhysics,victor-gonzalez/AliPhysics,hzanoli/AliPhysics,akubera/AliPhysics,preghenella/AliPhysics,aaniin/AliPhysics,amaringarcia/AliPhysics,mbjadhav/AliPhysics,rihanphys/AliPhysics,carstooon/AliPhysics,AMechler/AliPhysics,amaringarcia/AliPhysics,carstooon/AliPhysics,dlodato/AliPhysics,jgronefe/AliPhysics,adriansev/AliPhysics,SHornung1/AliPhysics,kreisl/AliPhysics,lcunquei/AliPhysics,nschmidtALICE/AliPhysics,preghenella/AliPhysics,dmuhlhei/AliPhysics,hzanoli/AliPhysics,carstooon/AliPhysics,adriansev/AliPhysics,pbatzing/AliPhysics,jgronefe/AliPhysics,dmuhlhei/AliPhysics,pbatzing/AliPhysics,adriansev/AliPhysics,rbailhac/AliPhysics,fbellini/AliPhysics,SHornung1/AliPhysics,dlodato/AliPhysics,lfeldkam/AliPhysics,AudreyFrancisco/AliPhysics,hcab14/AliPhysics,rderradi/AliPhysics,ALICEHLT/AliPhysics,rihanphys/AliPhysics,preghenella/AliPhysics,ppribeli/AliPhysics,jgronefe/AliPhysics,AudreyFrancisco/AliPhysics,adriansev/AliPhysics,hcab14/AliPhysics,lcunquei/AliPhysics,btrzecia/AliPhysics,btrzecia/AliPhysics,pbuehler/AliPhysics,mpuccio/AliPhysics,kreisl/AliPhysics,dmuhlhei/AliPhysics,fbellini/AliPhysics,dlodato/AliPhysics,mazimm/AliPhysics,kreisl/AliPhysics,victor-gonzalez/AliPhysics,pbuehler/AliPhysics,mpuccio/AliPhysics,yowatana/AliPhysics,pbuehler/AliPhysics,ppribeli/AliPhysics,SHornung1/AliPhysics,lfeldkam/AliPhysics,amatyja/AliPhysics,fbellini/AliPhysics,dstocco/AliPhysics,SHornung1/AliPhysics,mazimm/AliPhysics,sebaleh/AliPhysics,jmargutt/AliPhysics,carstooon/AliPhysics,amatyja/AliPhysics,mkrzewic/AliPhysics,mkrzewic/AliPhysics,ALICEHLT/AliPhysics,rderradi/AliPhysics,rderradi/AliPhysics,mpuccio/AliPhysics,carstooon/AliPhysics,alisw/AliPhysics,mazimm/AliPhysics,mkrzewic/AliPhysics,dstocco/AliPhysics,nschmidtALICE/AliPhysics,amaringarcia/AliPhysics,fbellini/AliPhysics,alisw/AliPhysics,ALICEHLT/AliPhysics,pchrista/AliPhysics,mbjadhav/AliPhysics,mbjadhav/AliPhysics,dstocco/AliPhysics,btrzecia/AliPhysics,pchrista/AliPhysics,pbatzing/AliPhysics,lfeldkam/AliPhysics,amatyja/AliPhysics,sebaleh/AliPhysics,AudreyFrancisco/AliPhysics,btrzecia/AliPhysics,carstooon/AliPhysics,yowatana/AliPhysics,alisw/AliPhysics,AMechler/AliPhysics,rbailhac/AliPhysics,pbatzing/AliPhysics,rbailhac/AliPhysics,mpuccio/AliPhysics,amaringarcia/AliPhysics,jgronefe/AliPhysics,fcolamar/AliPhysics,rderradi/AliPhysics,pbuehler/AliPhysics,nschmidtALICE/AliPhysics,amaringarcia/AliPhysics,mbjadhav/AliPhysics,alisw/AliPhysics,victor-gonzalez/AliPhysics,ppribeli/AliPhysics,jgronefe/AliPhysics,adriansev/AliPhysics,aaniin/AliPhysics,yowatana/AliPhysics,fbellini/AliPhysics,lfeldkam/AliPhysics,mbjadhav/AliPhysics,rderradi/AliPhysics,amatyja/AliPhysics,pchrista/AliPhysics,hzanoli/AliPhysics,mvala/AliPhysics,hzanoli/AliPhysics,SHornung1/AliPhysics,akubera/AliPhysics
ef7d0d8445f2f0953af9c87929e0a4d9859fa017
slave.h
slave.h
#include "modlib.h" #include "parser.h" #include "exception.h" //Types typedef struct { uint8_t Length; //Length of frame, if it's equal to 0, frame is not ready uint8_t *Frame; //Response frame content } MODBUSResponseStatus; //Type containing information about frame that is set up at slave side typedef struct { uint8_t Address; uint16_t *Registers; uint16_t RegisterCount; MODBUSResponseStatus Response; } MODBUSSlaveStatus; //Type containing slave device configuration data //Variables definitions extern MODBUSSlaveStatus MODBUSSlave; //Slave configuration //Function prototypes extern void MODBUSParseRequest( uint8_t *, uint8_t ); //Parse and interpret given modbus frame on slave-side extern void MODBUSSlaveInit( uint8_t, uint16_t *, uint16_t ); //Very basic init of slave side
#include "modlib.h" #include "parser.h" #include "exception.h" //Types typedef struct { uint8_t Length; //Length of frame, if it's equal to 0, frame is not ready uint8_t *Frame; //Response frame content } MODBUSResponseStatus; //Type containing information about frame that is set up at slave side typedef struct { uint8_t Address; uint16_t *Registers; uint16_t RegisterCount; MODBUSResponseStatus Response; } MODBUSSlaveStatus; //Type containing slave device configuration data //Variables definitions extern MODBUSSlaveStatus MODBUSSlave; //Slave configuration //Function prototypes extern void MODBUSException( uint8_t, uint8_t ); //Generate exception response to response frame buffer extern void MODBUSParseRequest( uint8_t *, uint8_t ); //Parse and interpret given modbus frame on slave-side extern void MODBUSSlaveInit( uint8_t, uint16_t *, uint16_t ); //Very basic init of slave side
Add prototype of MODBUSException function
Add prototype of MODBUSException function
C
mit
Jacajack/modlib
ed4932362d20af4c06610592b0a13016df4aad16
sys/posix/include/sys/bytes.h
sys/posix/include/sys/bytes.h
/* * Copyright (C) 2015 Martine Lenders <[email protected]> * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @addtogroup posix_sockets */ /** * @{ * * @file * @brief System-internal byte operations. * * @author Martine Lenders <[email protected]> */ #ifndef SYS_BYTES_H #define SYS_BYTES_H #include <stddef.h> #include "byteorder.h" #ifdef __cplusplus extern "C" { #endif #ifndef __MACH__ typedef size_t socklen_t; /**< socket address length */ #else /* Defined for OSX with a different type */ typedef __darwin_socklen_t socklen_t; /**< socket address length */ #endif #ifdef __cplusplus } #endif #endif /* SYS_BYTES_H */ /** @} */
/* * Copyright (C) 2015 Martine Lenders <[email protected]> * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @addtogroup posix_sockets */ /** * @{ * * @file * @brief System-internal byte operations. * * @author Martine Lenders <[email protected]> */ #ifndef SYS_BYTES_H #define SYS_BYTES_H #include <stddef.h> #include "byteorder.h" #ifdef __cplusplus extern "C" { #endif typedef size_t socklen_t; /**< socket address length */ #ifdef __cplusplus } #endif #endif /* SYS_BYTES_H */ /** @} */
Revert "posix/osx: fix type conflict on OSX native"
Revert "posix/osx: fix type conflict on OSX native" This reverts commit dcebfb11bc5a861c711e58838eec5b0131d020e2.
C
lgpl-2.1
OlegHahm/RIOT,yogo1212/RIOT,toonst/RIOT,toonst/RIOT,josephnoir/RIOT,mfrey/RIOT,rfuentess/RIOT,avmelnikoff/RIOT,BytesGalore/RIOT,x3ro/RIOT,lazytech-org/RIOT,A-Paul/RIOT,toonst/RIOT,rfuentess/RIOT,biboc/RIOT,kbumsik/RIOT,BytesGalore/RIOT,aeneby/RIOT,smlng/RIOT,yogo1212/RIOT,kbumsik/RIOT,cladmi/RIOT,smlng/RIOT,kYc0o/RIOT,lazytech-org/RIOT,OlegHahm/RIOT,neiljay/RIOT,miri64/RIOT,RIOT-OS/RIOT,aeneby/RIOT,BytesGalore/RIOT,RIOT-OS/RIOT,kaspar030/RIOT,authmillenon/RIOT,neiljay/RIOT,biboc/RIOT,gebart/RIOT,avmelnikoff/RIOT,basilfx/RIOT,x3ro/RIOT,kYc0o/RIOT,cladmi/RIOT,mfrey/RIOT,A-Paul/RIOT,kYc0o/RIOT,smlng/RIOT,authmillenon/RIOT,cladmi/RIOT,ant9000/RIOT,ant9000/RIOT,kaspar030/RIOT,ant9000/RIOT,mtausig/RIOT,kaspar030/RIOT,jasonatran/RIOT,OlegHahm/RIOT,BytesGalore/RIOT,cladmi/RIOT,RIOT-OS/RIOT,mfrey/RIOT,OTAkeys/RIOT,yogo1212/RIOT,toonst/RIOT,miri64/RIOT,RIOT-OS/RIOT,josephnoir/RIOT,gebart/RIOT,authmillenon/RIOT,avmelnikoff/RIOT,aeneby/RIOT,rfuentess/RIOT,gebart/RIOT,x3ro/RIOT,avmelnikoff/RIOT,A-Paul/RIOT,rfuentess/RIOT,gebart/RIOT,BytesGalore/RIOT,x3ro/RIOT,authmillenon/RIOT,neiljay/RIOT,yogo1212/RIOT,kbumsik/RIOT,OTAkeys/RIOT,basilfx/RIOT,OTAkeys/RIOT,kYc0o/RIOT,lazytech-org/RIOT,josephnoir/RIOT,kbumsik/RIOT,neiljay/RIOT,ant9000/RIOT,neiljay/RIOT,lazytech-org/RIOT,jasonatran/RIOT,rfuentess/RIOT,biboc/RIOT,josephnoir/RIOT,mfrey/RIOT,mtausig/RIOT,basilfx/RIOT,A-Paul/RIOT,basilfx/RIOT,aeneby/RIOT,kYc0o/RIOT,kaspar030/RIOT,OTAkeys/RIOT,toonst/RIOT,authmillenon/RIOT,miri64/RIOT,mfrey/RIOT,ant9000/RIOT,OlegHahm/RIOT,biboc/RIOT,aeneby/RIOT,x3ro/RIOT,miri64/RIOT,kaspar030/RIOT,yogo1212/RIOT,josephnoir/RIOT,jasonatran/RIOT,smlng/RIOT,biboc/RIOT,smlng/RIOT,kbumsik/RIOT,yogo1212/RIOT,cladmi/RIOT,mtausig/RIOT,jasonatran/RIOT,A-Paul/RIOT,mtausig/RIOT,RIOT-OS/RIOT,avmelnikoff/RIOT,authmillenon/RIOT,OTAkeys/RIOT,basilfx/RIOT,gebart/RIOT,OlegHahm/RIOT,jasonatran/RIOT,miri64/RIOT,mtausig/RIOT,lazytech-org/RIOT
d5e8df788f3d98034edc66090d33eaeaa3179d23
ext/fast_stack/fast_stack.c
ext/fast_stack/fast_stack.c
#include <stdio.h> #include <ruby.h> #include <ruby/encoding.h> static VALUE profiler_start(VALUE module, VALUE usec) { struct itimerval timer; timer.it_interval.tv_sec = 0; timer.it_interval.tv_usec = NUM2LONG(usec); timer.it_value = timer.it_interval; setitimer(ITIMER_PROF, &timer, 0); return Qnil; } static VALUE profiler_stop(VALUE module) { struct itimerval timer; memset(&timer, 0, sizeof(timer)); setitimer(ITIMER_PROF, &timer, 0); return Qnil; } static VALUE rb_profile_block(VALUE module, VALUE usec) { rb_need_block(); profiler_start(module, usec); rb_yield(Qundef); profiler_stop(module); return Qnil; } void Init_fast_stack( void ) { VALUE rb_mFastStack = rb_define_module("FastStack"); rb_define_module_function(rb_mFastStack, "profile_block", rb_profile_block, 1); }
#include <stdio.h> #include <sys/time.h> #include <ruby.h> #include <ruby/encoding.h> static VALUE profiler_start(VALUE module, VALUE usec) { struct itimerval timer; timer.it_interval.tv_sec = 0; timer.it_interval.tv_usec = NUM2LONG(usec); timer.it_value = timer.it_interval; setitimer(ITIMER_PROF, &timer, 0); return Qnil; } static VALUE profiler_stop(VALUE module) { struct itimerval timer; memset(&timer, 0, sizeof(timer)); setitimer(ITIMER_PROF, &timer, 0); return Qnil; } static VALUE rb_profile_block(VALUE module, VALUE usec) { rb_need_block(); profiler_start(module, usec); rb_yield(Qundef); profiler_stop(module); return Qnil; } void Init_fast_stack( void ) { VALUE rb_mFastStack = rb_define_module("FastStack"); rb_define_module_function(rb_mFastStack, "profile_block", rb_profile_block, 1); }
Fix "storage size of 'timer' isn't known" on Debian Squeeze
Fix "storage size of 'timer' isn't known" on Debian Squeeze struct itimerval defined in sys/time.h
C
mit
SamSaffron/fast_stack,joshuaflanagan/fast_stack,lowjoel/fast_stack,lowjoel/fast_stack,joshuaflanagan/fast_stack,SamSaffron/fast_stack
89e72b73d34f176c3002e79f52219a9647593d3b
extensions/tabs-minimized.c
extensions/tabs-minimized.c
/* Copyright (C) 2008-2010 Christian Dywan <[email protected]> This library 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. See the file COPYING for the full license text. */ #include <midori/midori.h> #include <midori/sokoke.h> static void tabs_minimized_app_add_browser_cb (MidoriApp* app, MidoriBrowser* browser, MidoriExtension* extension); static void tabs_minimized_deactivate_cb (MidoriExtension* extension, MidoriBrowser* browser) { MidoriApp* app = midori_extension_get_app (extension); g_signal_handlers_disconnect_by_func ( extension, tabs_minimized_deactivate_cb, browser); g_signal_handlers_disconnect_by_func ( app, tabs_minimized_app_add_browser_cb, extension); } static void tabs_minimized_add_tab_cb (MidoriApp* app, MidoriView* tab, MidoriExtension* extension) { g_object_set (tab, "minimized", TRUE, NULL); } static void tabs_minimized_app_add_browser_cb (MidoriApp* app, MidoriBrowser* browser, MidoriExtension* extension) { g_signal_connect (browser, "add-tab", G_CALLBACK (tabs_minimized_add_tab_cb), extension); g_signal_connect (extension, "deactivate", G_CALLBACK (tabs_minimized_deactivate_cb), browser); } static void tabs_minimized_activate_cb (MidoriExtension* extension, MidoriApp* app) { KatzeArray* browsers; MidoriBrowser* browser; guint i; browsers = katze_object_get_object (app, "browsers"); i = 0; while ((browser = katze_array_get_nth_item (browsers, i++))) tabs_minimized_app_add_browser_cb (app, browser, extension); g_object_unref (browsers); g_signal_connect (app, "add-browser", G_CALLBACK (tabs_minimized_app_add_browser_cb), extension); } MidoriExtension* extension_init (void) { MidoriExtension* extension = g_object_new (MIDORI_TYPE_EXTENSION, "name", _("Minimize new Tabs"), "description", _("New tabs open minimized"), "version", "0.1", "authors", "MonkeyOfDoom <[email protected]>", NULL); g_signal_connect (extension, "activate", G_CALLBACK (tabs_minimized_activate_cb), NULL); return extension; }
Add extension 'Minimize new Tabs'
Add extension 'Minimize new Tabs' Once it is activated the extension will minimize all newly opened tabs by default.
C
lgpl-2.1
OoberMick/Midori,OoberMick/Midori
dece25be6d34c098514ada240a52e13b6c8946c1
common/sdp-dummy.c
common/sdp-dummy.c
/* * * BlueZ - Bluetooth protocol stack for Linux * * Copyright (C) 2005-2006 Marcel Holtmann <[email protected]> * * * 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 St, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <stdio.h> #include <errno.h> #include "logging.h" #include "sdp-xml.h" sdp_record_t *sdp_xml_parse_record(const char *data, int size) { error("No XML parser available"); return -1; }
/* * * BlueZ - Bluetooth protocol stack for Linux * * Copyright (C) 2005-2006 Marcel Holtmann <[email protected]> * * * 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 St, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <stdio.h> #include <errno.h> #include "logging.h" #include "sdp-xml.h" sdp_record_t *sdp_xml_parse_record(const char *data, int size) { error("No XML parser available"); return NULL; }
Return NULL in case of the dummy XML parser
Return NULL in case of the dummy XML parser
C
lgpl-2.1
pstglia/external-bluetooth-bluez,ComputeCycles/bluez,silent-snowman/bluez,pkarasev3/bluez,pkarasev3/bluez,mapfau/bluez,ComputeCycles/bluez,mapfau/bluez,mapfau/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez,mapfau/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez,ComputeCycles/bluez,pkarasev3/bluez,pkarasev3/bluez,pstglia/external-bluetooth-bluez,ComputeCycles/bluez,silent-snowman/bluez
dd4a5df6e1e2b17a0f8963674bea6e94cc6c9b0e
tools/llvm-c-test/metadata.c
tools/llvm-c-test/metadata.c
/*===-- object.c - tool for testing libLLVM and llvm-c API ----------------===*\ |* *| |* The LLVM Compiler Infrastructure *| |* *| |* This file is distributed under the University of Illinois Open Source *| |* License. See LICENSE.TXT for details. *| |* *| |*===----------------------------------------------------------------------===*| |* *| |* This file implements the --add-named-metadata-operand and --set-metadata *| |* commands in llvm-c-test. *| |* *| \*===----------------------------------------------------------------------===*/ #include "llvm-c-test.h" #include "llvm-c/Core.h" int add_named_metadata_operand(void) { LLVMModuleRef m = LLVMModuleCreateWithName("Mod"); LLVMValueRef values[] = { LLVMConstInt(LLVMInt32Type(), 0, 0) }; // This used to trigger an assertion LLVMAddNamedMetadataOperand(m, "name", LLVMMDNode(values, 1)); return 0; } int set_metadata(void) { LLVMBuilderRef b = LLVMCreateBuilder(); LLVMValueRef values[] = { LLVMConstInt(LLVMInt32Type(), 0, 0) }; // This used to trigger an assertion LLVMSetMetadata( LLVMBuildRetVoid(b), LLVMGetMDKindID("kind", 4), LLVMMDNode(values, 1)); return 0; }
/*===-- object.c - tool for testing libLLVM and llvm-c API ----------------===*\ |* *| |* The LLVM Compiler Infrastructure *| |* *| |* This file is distributed under the University of Illinois Open Source *| |* License. See LICENSE.TXT for details. *| |* *| |*===----------------------------------------------------------------------===*| |* *| |* This file implements the --add-named-metadata-operand and --set-metadata *| |* commands in llvm-c-test. *| |* *| \*===----------------------------------------------------------------------===*/ #include "llvm-c-test.h" #include "llvm-c/Core.h" int add_named_metadata_operand(void) { LLVMModuleRef m = LLVMModuleCreateWithName("Mod"); LLVMValueRef values[] = { LLVMConstInt(LLVMInt32Type(), 0, 0) }; // This used to trigger an assertion LLVMAddNamedMetadataOperand(m, "name", LLVMMDNode(values, 1)); LLVMDisposeModule(m); return 0; } int set_metadata(void) { LLVMBuilderRef b = LLVMCreateBuilder(); LLVMValueRef values[] = { LLVMConstInt(LLVMInt32Type(), 0, 0) }; // This used to trigger an assertion LLVMSetMetadata( LLVMBuildRetVoid(b), LLVMGetMDKindID("kind", 4), LLVMMDNode(values, 1)); LLVMDisposeBuilder(b); return 0; }
Fix build breakage caused by memory leaks in llvm-c-test
Fix build breakage caused by memory leaks in llvm-c-test I accidently introduced those in r227319. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@227339 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm
d8af9b16eff306c9720964e4fb89be81a7a31eec
src/base/file_unit.h
src/base/file_unit.h
#ifndef FILE_UNIT_H_ #define FILE_UNIT_H_ #include <string> template <typename T> class FileUnit { public: std::string filename; T *file; FileUnit(std::string& filename); virtual ~FileUnit(); }; #endif
#ifndef FILE_UNIT_H_ #define FILE_UNIT_H_ #include <string> template <typename T> class FileUnit { public: FileUnit(std::string& filename); virtual ~FileUnit(); private: std::string filename; T *file; }; #endif
Change privacy to private for the filename and generic representation
Change privacy to private for the filename and generic representation
C
mit
stefanmirea/mangler,SilentControl/mangler
b76b3ff068ccd610b54b750ca80779881ec2fd5a
tests/regression/36-octapron/36-special-unknown-globals.c
tests/regression/36-octapron/36-special-unknown-globals.c
// SKIP PARAM: --sets ana.activated[+] octApron #include <assert.h> extern void magic(); int g; int h; void main() { int r, x; x = r; g = r; h = r + 1; assert(g < h); magic(); // invalidates (forgets) globals assert(g < h); // UNKNOWN! assert(x == r); // shouldn't forget locals }
Add octApron test for special globals invalidation
Add octApron test for special globals invalidation
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
3f1086d456acca81f5ed6fed1a98d3af92a05bf0
src/imap/cmd-close.c
src/imap/cmd-close.c
/* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */ #include "common.h" #include "commands.h" #include "imap-expunge.h" bool cmd_close(struct client_command_context *cmd) { struct client *client = cmd->client; struct mailbox *mailbox = client->mailbox; struct mail_storage *storage; if (!client_verify_open_mailbox(cmd)) return TRUE; storage = mailbox_get_storage(mailbox); client->mailbox = NULL; if (!imap_expunge(mailbox, NULL)) client_send_untagged_storage_error(client, storage); if (mailbox_close(&mailbox) < 0) client_send_untagged_storage_error(client, storage); client_update_mailbox_flags(client, NULL); client_send_tagline(cmd, "OK Close completed."); return TRUE; }
/* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */ #include "common.h" #include "commands.h" #include "imap-expunge.h" bool cmd_close(struct client_command_context *cmd) { struct client *client = cmd->client; struct mailbox *mailbox = client->mailbox; struct mail_storage *storage; if (!client_verify_open_mailbox(cmd)) return TRUE; storage = mailbox_get_storage(mailbox); client->mailbox = NULL; if (!imap_expunge(mailbox, NULL)) client_send_untagged_storage_error(client, storage); else if (mailbox_sync(mailbox, 0, 0, NULL) < 0) client_send_untagged_storage_error(client, storage); if (mailbox_close(&mailbox) < 0) client_send_untagged_storage_error(client, storage); client_update_mailbox_flags(client, NULL); client_send_tagline(cmd, "OK Close completed."); return TRUE; }
Synchronize the mailbox after expunging messages to actually get them expunged.
CLOSE: Synchronize the mailbox after expunging messages to actually get them expunged.
C
mit
Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot
43c98041f7746f8d9445bdea873d86eca966b2b8
include/clang/AST/StmtCXX.h
include/clang/AST/StmtCXX.h
//===--- StmtCXX.h - Classes for representing C++ statements ----*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file defines the C++ statement AST node classes. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_AST_STMTCXX_H #define LLVM_CLANG_AST_STMTCXX_H #include "clang/AST/Stmt.h" namespace clang { /// CXXCatchStmt - This represents a C++ catch block. /// class CXXCatchStmt : public Stmt { SourceLocation CatchLoc; /// The exception-declaration of the type. Decl *ExceptionDecl; /// The handler block. Stmt *HandlerBlock; public: CXXCatchStmt(SourceLocation catchLoc, Decl *exDecl, Stmt *handlerBlock) : Stmt(CXXCatchStmtClass), CatchLoc(catchLoc), ExceptionDecl(exDecl), HandlerBlock(handlerBlock) {} virtual void Destroy(ASTContext& Ctx); virtual SourceRange getSourceRange() const { return SourceRange(CatchLoc, HandlerBlock->getLocEnd()); } Decl *getExceptionDecl() { return ExceptionDecl; } QualType getCaughtType(); Stmt *getHandlerBlock() { return HandlerBlock; } static bool classof(const Stmt *T) { return T->getStmtClass() == CXXCatchStmtClass; } static bool classof(const CXXCatchStmt *) { return true; } virtual child_iterator child_begin(); virtual child_iterator child_end(); }; /// CXXTryStmt - A C++ try block, including all handlers. /// class CXXTryStmt : public Stmt { SourceLocation TryLoc; // First place is the guarded CompoundStatement. Subsequent are the handlers. // More than three handlers should be rare. llvm::SmallVector<Stmt*, 4> Stmts; public: CXXTryStmt(SourceLocation tryLoc, Stmt *tryBlock, Stmt **handlers, unsigned numHandlers); virtual SourceRange getSourceRange() const { return SourceRange(TryLoc, Stmts.back()->getLocEnd()); } CompoundStmt *getTryBlock() { return llvm::cast<CompoundStmt>(Stmts[0]); } const CompoundStmt *getTryBlock() const { return llvm::cast<CompoundStmt>(Stmts[0]); } unsigned getNumHandlers() const { return Stmts.size() - 1; } CXXCatchStmt *getHandler(unsigned i) { return llvm::cast<CXXCatchStmt>(Stmts[i + 1]); } const CXXCatchStmt *getHandler(unsigned i) const { return llvm::cast<CXXCatchStmt>(Stmts[i + 1]); } static bool classof(const Stmt *T) { return T->getStmtClass() == CXXTryStmtClass; } static bool classof(const CXXTryStmt *) { return true; } virtual child_iterator child_begin(); virtual child_iterator child_end(); }; } // end namespace clang #endif
Split C++ statements out to their own file.
Split C++ statements out to their own file. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@70107 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
156ca90ad0861b4ebe467b9ea67edc01b5d73d3d
Code/ContentfulDeliveryAPI.h
Code/ContentfulDeliveryAPI.h
// // ContentfulDeliveryAPI.h // ContentfulSDK // // Created by Boris Bügling on 04/03/14. // // #import <Foundation/Foundation.h> #import <ContentfulDeliveryAPI/CDAArray.h> #import <ContentfulDeliveryAPI/CDAAsset.h> #import <ContentfulDeliveryAPI/CDAClient.h> #import <ContentfulDeliveryAPI/CDAConfiguration.h> #import <ContentfulDeliveryAPI/CDAContentType.h> #import <ContentfulDeliveryAPI/CDAEntry.h> #import <ContentfulDeliveryAPI/CDAField.h> #import <ContentfulDeliveryAPI/CDAPersistenceManager.h> #import <ContentfulDeliveryAPI/CDARequest.h> #import <ContentfulDeliveryAPI/CDAResponse.h> #import <ContentfulDeliveryAPI/CDASpace.h> #import <ContentfulDeliveryAPI/CDASyncedSpace.h> #if TARGET_OS_IPHONE #import <ContentfulDeliveryAPI/CDAEntriesViewController.h> #import <ContentfulDeliveryAPI/CDAFieldsViewController.h> #import <ContentfulDeliveryAPI/CDAMapViewController.h> #import <ContentfulDeliveryAPI/CDAResourceCell.h> #import <ContentfulDeliveryAPI/CDAResourcesCollectionViewController.h> #import <ContentfulDeliveryAPI/CDAResourcesViewController.h> #endif extern NSString* const CDAErrorDomain;
// // ContentfulDeliveryAPI.h // ContentfulSDK // // Created by Boris Bügling on 04/03/14. // // #import <Foundation/Foundation.h> #import <ContentfulDeliveryAPI/CDAArray.h> #import <ContentfulDeliveryAPI/CDAAsset.h> #import <ContentfulDeliveryAPI/CDAClient.h> #import <ContentfulDeliveryAPI/CDAConfiguration.h> #import <ContentfulDeliveryAPI/CDAContentType.h> #import <ContentfulDeliveryAPI/CDAEntry.h> #import <ContentfulDeliveryAPI/CDAField.h> #import <ContentfulDeliveryAPI/CDAPersistenceManager.h> #import <ContentfulDeliveryAPI/CDARequest.h> #import <ContentfulDeliveryAPI/CDAResponse.h> #import <ContentfulDeliveryAPI/CDASpace.h> #import <ContentfulDeliveryAPI/CDASyncedSpace.h> #if TARGET_OS_IPHONE #import <ContentfulDeliveryAPI/CDAEntriesViewController.h> #import <ContentfulDeliveryAPI/CDAFieldsViewController.h> #import <ContentfulDeliveryAPI/CDAMapViewController.h> #import <ContentfulDeliveryAPI/CDAResourceCell.h> #import <ContentfulDeliveryAPI/CDAResourcesCollectionViewController.h> #import <ContentfulDeliveryAPI/CDAResourcesViewController.h> #import <ContentfulDeliveryAPI/UIImageView+CDAAsset.h> #endif extern NSString* const CDAErrorDomain;
Include image view category in framework header.
Include image view category in framework header.
C
mit
contentful/contentful.objc,akfreas/contentful.objc,danieleggert/contentful.objc,akfreas/contentful.objc,davidmdavis/contentful.objc,contentful/contentful.objc,akfreas/contentful.objc,danieleggert/contentful.objc,davidmdavis/contentful.objc,contentful/contentful.objc,danieleggert/contentful.objc,davidmdavis/contentful.objc
1a6633da200909e9c71ba7a0c40eebe56746c3f5
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2006 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.01.00-k9"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2006 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k1"
Update driver version to 5.02.00-k1
[SCSI] qla4xxx: Update driver version to 5.02.00-k1 Signed-off-by: Vikas Chaudhary <[email protected]> Signed-off-by: Ravi Anand <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas
05b269d5b3f82a64efe9c8d7650803bc181af3a1
src/bf_alloc.c
src/bf_alloc.c
#include <bf_alloc.h> #include <sys/mman.h> uint8_t *allocate_executable_space(size_t size) { uint8_t *memory = (uint8_t*) mmap( NULL, /* No existing address. */ size, /* At LEAST this size. */ PROT_EXEC|PROT_WRITE, /* Writable and executable memory. */ MAP_PRIVATE|MAP_ANONYMOUS, /* An anonymous mapping; using private mapping is most portable. */ -1, /* Using fd = -1 is most portable in conjunction with MAP_ANONYMOUS. */ 0 /* Irrelevant for MAP_ANONYMOUS. */ ); if (memory == MAP_FAILED) { return NULL; } return memory; } /* TODO: fairly certain this will lead to a memory leak if the mapping is * larger than the page size... */ bool free_executable_space(uint8_t *space) { if (munmap(space, 1) == 0) { return true; } return false; }
#include <bf_alloc.h> /* So that MAP_ANONYMOUS is available on glibc. */ #define _BSD_SOURCE #include <sys/mman.h> uint8_t *allocate_executable_space(size_t size) { uint8_t *memory = (uint8_t*) mmap( NULL, /* No existing address. */ size, /* At LEAST this size. */ PROT_EXEC|PROT_WRITE, /* Writable and executable memory. */ MAP_PRIVATE|MAP_ANONYMOUS, /* An anonymous mapping; using private mapping is most portable. */ -1, /* Using fd = -1 is most portable in conjunction with MAP_ANONYMOUS. */ 0 /* Irrelevant for MAP_ANONYMOUS. */ ); if (memory == MAP_FAILED) { return NULL; } return memory; } /* TODO: fairly certain this will lead to a memory leak if the mapping is * larger than the page size... */ bool free_executable_space(uint8_t *space) { if (munmap(space, 1) == 0) { return true; } return false; }
Add feature-test macro for MAP_ANONYMOUS.
Add feature-test macro for MAP_ANONYMOUS.
C
mit
eddieantonio/brainmuk,eddieantonio/brainmuk
02013988cb1406f3b557bf05603cc726cc1a1889
chrome/gpu/gpu_config.h
chrome/gpu/gpu_config.h
// Copyright (c) 2010 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_GPU_GPU_CONFIG_H_ #define CHROME_GPU_GPU_CONFIG_H_ // This file declares common preprocessor configuration for the GPU process. #include "build/build_config.h" #if defined(OS_LINUX) && !defined(ARCH_CPU_X86) // Only define GLX support for Intel CPUs for now until we can get the // proper dependencies and build setup for ARM. #define GPU_USE_GLX #endif #endif // CHROME_GPU_GPU_CONFIG_H_
// Copyright (c) 2010 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_GPU_GPU_CONFIG_H_ #define CHROME_GPU_GPU_CONFIG_H_ // This file declares common preprocessor configuration for the GPU process. #include "build/build_config.h" #if defined(OS_LINUX) && defined(ARCH_CPU_X86) // Only define GLX support for Intel CPUs for now until we can get the // proper dependencies and build setup for ARM. #define GPU_USE_GLX #endif #endif // CHROME_GPU_GPU_CONFIG_H_
Fix stupid error for Linux build.
Fix stupid error for Linux build. TEST=none BUG=none Review URL: http://codereview.chromium.org/555096 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@37093 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,dednal/chromium.src,ltilve/chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,zcbenz/cefode-chromium,keishi/chromium,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,anirudhSK/chromium,markYoungH/chromium.src,rogerwang/chromium,dednal/chromium.src,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,dushu1203/chromium.src,robclark/chromium,chuan9/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,M4sse/chromium.src,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,zcbenz/cefode-chromium,hujiajie/pa-chromium,anirudhSK/chromium,dednal/chromium.src,Just-D/chromium-1,M4sse/chromium.src,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,hujiajie/pa-chromium,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,M4sse/chromium.src,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,ltilve/chromium,M4sse/chromium.src,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,Chilledheart/chromium,ChromiumWebApps/chromium,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,rogerwang/chromium,dushu1203/chromium.src,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,keishi/chromium,jaruba/chromium.src,Chilledheart/chromium,M4sse/chromium.src,keishi/chromium,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,Chilledheart/chromium,zcbenz/cefode-chromium,dednal/chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,dushu1203/chromium.src,patrickm/chromium.src,nacl-webkit/chrome_deps,littlstar/chromium.src,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,robclark/chromium,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,bright-sparks/chromium-spacewalk,dednal/chromium.src,bright-sparks/chromium-spacewalk,littlstar/chromium.src,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,keishi/chromium,hujiajie/pa-chromium,rogerwang/chromium,keishi/chromium,markYoungH/chromium.src,ondra-novak/chromium.src,rogerwang/chromium,pozdnyakov/chromium-crosswalk,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,patrickm/chromium.src,littlstar/chromium.src,jaruba/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,rogerwang/chromium,Jonekee/chromium.src,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,jaruba/chromium.src,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,krieger-od/nwjs_chromium.src,anirudhSK/chromium,patrickm/chromium.src,Just-D/chromium-1,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,anirudhSK/chromium,ondra-novak/chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,timopulkkinen/BubbleFish,keishi/chromium,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,M4sse/chromium.src,hujiajie/pa-chromium,zcbenz/cefode-chromium,Just-D/chromium-1,Fireblend/chromium-crosswalk,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,pozdnyakov/chromium-crosswalk,junmin-zhu/chromium-rivertrail,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,dednal/chromium.src,anirudhSK/chromium,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,robclark/chromium,Jonekee/chromium.src,robclark/chromium,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,Jonekee/chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,patrickm/chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk,anirudhSK/chromium,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,hujiajie/pa-chromium,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,chuan9/chromium-crosswalk,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,Jonekee/chromium.src,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,robclark/chromium,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,robclark/chromium,Jonekee/chromium.src,robclark/chromium,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,jaruba/chromium.src,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,Just-D/chromium-1,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,rogerwang/chromium,robclark/chromium,markYoungH/chromium.src,axinging/chromium-crosswalk,markYoungH/chromium.src,fujunwei/chromium-crosswalk,rogerwang/chromium,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,axinging/chromium-crosswalk,markYoungH/chromium.src,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,markYoungH/chromium.src,jaruba/chromium.src,ondra-novak/chromium.src,rogerwang/chromium,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,ltilve/chromium,anirudhSK/chromium,robclark/chromium,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,rogerwang/chromium,ondra-novak/chromium.src,dushu1203/chromium.src,rogerwang/chromium,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,robclark/chromium,junmin-zhu/chromium-rivertrail,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,jaruba/chromium.src,anirudhSK/chromium,keishi/chromium,timopulkkinen/BubbleFish,dednal/chromium.src,markYoungH/chromium.src,anirudhSK/chromium,Jonekee/chromium.src,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,ltilve/chromium,dushu1203/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,keishi/chromium,Chilledheart/chromium,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,keishi/chromium,Just-D/chromium-1,keishi/chromium,ChromiumWebApps/chromium,hujiajie/pa-chromium,patrickm/chromium.src,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,keishi/chromium,mogoweb/chromium-crosswalk,M4sse/chromium.src,ondra-novak/chromium.src,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,dednal/chromium.src,Fireblend/chromium-crosswalk,littlstar/chromium.src,ChromiumWebApps/chromium,M4sse/chromium.src,Jonekee/chromium.src,Fireblend/chromium-crosswalk,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,Chilledheart/chromium,hujiajie/pa-chromium,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,junmin-zhu/chromium-rivertrail
9aeeff90e1fab8a397365ff74c7d814355241a18
tests/auto/common/declarativewebutils.h
tests/auto/common/declarativewebutils.h
/**************************************************************************** ** ** Copyright (C) 2014 Jolla Ltd. ** Contact: Raine Makelainen <[email protected]> ** ****************************************************************************/ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef DECLARATIVEWEBUTILS_H #define DECLARATIVEWEBUTILS_H #include <QObject> #include <QString> #include <QColor> #include <qqml.h> class DeclarativeWebUtils : public QObject { Q_OBJECT Q_PROPERTY(QString homePage READ homePage NOTIFY homePageChanged FINAL) public: explicit DeclarativeWebUtils(QObject *parent = 0); Q_INVOKABLE int getLightness(QColor color) const; Q_INVOKABLE QString displayableUrl(QString fullUrl) const; static DeclarativeWebUtils *instance(); QString homePage() const; bool firstUseDone() const; void setFirstUseDone(bool firstUseDone); signals: void homePageChanged(); private: QString m_homePage; bool m_firstUseDone; }; QML_DECLARE_TYPE(DeclarativeWebUtils) #endif
/**************************************************************************** ** ** Copyright (C) 2014 Jolla Ltd. ** Contact: Raine Makelainen <[email protected]> ** ****************************************************************************/ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef DECLARATIVEWEBUTILS_H #define DECLARATIVEWEBUTILS_H #include <QObject> #include <QString> #include <QColor> #include <qqml.h> class DeclarativeWebUtils : public QObject { Q_OBJECT Q_PROPERTY(QString homePage READ homePage NOTIFY homePageChanged FINAL) Q_PROPERTY(bool firstUseDone READ firstUseDone NOTIFY firstUseDoneChanged FINAL) public: explicit DeclarativeWebUtils(QObject *parent = 0); Q_INVOKABLE int getLightness(QColor color) const; Q_INVOKABLE QString displayableUrl(QString fullUrl) const; static DeclarativeWebUtils *instance(); QString homePage() const; bool firstUseDone() const; void setFirstUseDone(bool firstUseDone); signals: void homePageChanged(); void firstUseDoneChanged(); private: QString m_homePage; bool m_firstUseDone; }; QML_DECLARE_TYPE(DeclarativeWebUtils) #endif
Add missing property for WebUtils mock
[sailfish-browser] Add missing property for WebUtils mock A warning was printed when running unit tests.
C
mpl-2.0
rojkov/sailfish-browser,alinelena/sailfish-browser,alinelena/sailfish-browser,alinelena/sailfish-browser,sailfishos/sailfish-browser,rojkov/sailfish-browser,sailfishos/sailfish-browser,sailfishos/sailfish-browser,rojkov/sailfish-browser,sailfishos/sailfish-browser,alinelena/sailfish-browser,sailfishos/sailfish-browser
492c63393fd3429b2c7f9da853241eea322514b1
Control/UIButton+PPiAwesome.h
Control/UIButton+PPiAwesome.h
// // UIButton+PPiAwesome.h // PPiAwesomeButton-Demo // // Created by Pedro Piñera Buendía on 19/08/13. // Copyright (c) 2013 PPinera. All rights reserved. // #import <UIKit/UIKit.h> #import "NSString+FontAwesome.h" #import <QuartzCore/QuartzCore.h> #import <objc/runtime.h> typedef enum { IconPositionRight, IconPositionLeft, } IconPosition; @interface UIButton (PPiAwesome) +(UIButton*)buttonWithType:(UIButtonType)type text:(NSString*)text icon:(NSString*)icon textAttributes:(NSDictionary*)attributes andIconPosition:(IconPosition)position; -(id)initWithFrame:(CGRect)frame text:(NSString*)text icon:(NSString*)icon textAttributes:(NSDictionary*)attributes andIconPosition:(IconPosition)position; -(void)setTextAttributes:(NSDictionary*)attributes forUIControlState:(UIControlState)state; -(void)setBackgroundColor:(UIColor*)color forUIControlState:(UIControlState)state; -(void)setIconPosition:(IconPosition)position; -(void)setButtonText:(NSString*)text; -(void)setButtonIcon:(NSString*)icon; -(void)setRadius:(CGFloat)radius; -(void)setSeparation:(NSUInteger)separation; @end
// // UIButton+PPiAwesome.h // PPiAwesomeButton-Demo // // Created by Pedro Piñera Buendía on 19/08/13. // Copyright (c) 2013 PPinera. All rights reserved. // #import <UIKit/UIKit.h> #import "NSString+FontAwesome.h" #import <QuartzCore/QuartzCore.h> #import <objc/runtime.h> typedef enum { IconPositionRight, IconPositionLeft, } IconPosition; @interface UIButton (PPiAwesome) +(UIButton*)buttonWithType:(UIButtonType)type text:(NSString*)text icon:(NSString*)icon textAttributes:(NSDictionary*)attributes andIconPosition:(IconPosition)position; -(id)initWithFrame:(CGRect)frame text:(NSString*)text icon:(NSString*)icon textAttributes:(NSDictionary*)attributes andIconPosition:(IconPosition)position; -(void)setTextAttributes:(NSDictionary*)attributes forUIControlState:(UIControlState)state; -(void)setBackgroundColor:(UIColor*)color forUIControlState:(UIControlState)state; -(void)setIconPosition:(IconPosition)position; -(void)setButtonText:(NSString*)text; -(void)setButtonIcon:(NSString*)icon; -(void)setRadius:(CGFloat)radius; -(void)setSeparation:(NSUInteger)separation; -(void)setIsAwesome:(BOOL)isAwesome; @end
Make isAwesome public to convert nib-based buttons.
Make isAwesome public to convert nib-based buttons.
C
mit
pepibumur/PPiAwesomeButton
caa8bfc990f7f71a9b46b63a4191d26ebc62df2d
src/dramsim3.h
src/dramsim3.h
#ifndef __MEMORY_SYSTEM__H #define __MEMORY_SYSTEM__H #include <functional> #include <string> namespace dramsim3 { // This should be the interface class that deals with CPU class MemorySystem { public: MemorySystem(const std::string &config_file, const std::string &output_dir, std::function<void(uint64_t)> read_callback, std::function<void(uint64_t)> write_callback); ~MemorySystem(); void ClockTick(); void RegisterCallbacks(std::function<void(uint64_t)> read_callback, std::function<void(uint64_t)> write_callback); double GetTCK() const; int GetBusBits() const; int GetBurstLength() const; int GetQueueSize() const; void PrintStats() const; bool WillAcceptTransaction(uint64_t hex_addr, bool is_write) const; bool AddTransaction(uint64_t hex_addr, bool is_write); }; } // namespace dramsim3 #endif
Add header file for external use (e.g. SST)
Add header file for external use (e.g. SST)
C
mit
umd-memsys/DRAMsim3,umd-memsys/DRAMsim3,umd-memsys/DRAMsim3
25677943d30e2b6a64a8be9628c12bd5a2290c46
include/kernel/mbr.h
include/kernel/mbr.h
#ifndef MBR_H #define MBR_H #include <stdint.h> struct MBREntry { uint8_t boot_indicator; uint8_t starting_head; uint16_t starting_sector : 6; uint16_t starting_cylinder : 10; uint8_t system_id; uint8_t ending_head; uint16_t ending_sector : 6; uint16_t ending_cylinder : 10; uint32_t starting_lba; uint32_t sector_count; } __attribute__((packed)); struct MBR { uint8_t padding[0x1BE]; MBREntry entries[4]; } __attribute__((packed)); MBR mbr_read(void); #endif
#ifndef MBR_H #define MBR_H #include <stdint.h> struct MBREntry { uint8_t boot_indicator; uint8_t starting_head; uint16_t starting_sector : 6; uint16_t starting_cylinder : 10; uint8_t system_id; uint8_t ending_head; uint16_t ending_sector : 6; uint16_t ending_cylinder : 10; uint32_t starting_lba; uint32_t sector_count; } __attribute__((packed)); struct MBR { uint8_t padding[0x1BE]; MBREntry entries[4]; uint16_t boot_signature; } __attribute__((packed)); MBR mbr_read(void); #endif
Add boot sig to MBR structure
Add boot sig to MBR structure
C
apache-2.0
shockkolate/shockk-os,shockkolate/shockk-os,shockkolate/shockk-os
11e76e19c17cc102c0e0aff431e4058ba6d3b730
YouLocal/Views/Cells/NotificationTableViewCell.h
YouLocal/Views/Cells/NotificationTableViewCell.h
// // UINotificationTableViewCell.h // YouLocal // // Created by Mihail Velikov on 5/3/15. // Copyright (c) 2015 YouLoc.al. All rights reserved. // #import <UIKit/UIKit.h> @interface NotificationTableViewCell : UITableViewCell @property (nonatomic, weak) UIImageView *avatarImage; @property (nonatomic, weak) UIImageView *typeImage; @property (nonatomic, weak) UILabel *authorNameLabel; @property (nonatomic, weak) UILabel *createdBeforeLabel; @property (nonatomic, weak) UILabel *messageLabel; @end
// // UINotificationTableViewCell.h // YouLocal // // Created by Mihail Velikov on 5/3/15. // Copyright (c) 2015 YouLoc.al. All rights reserved. // #import <UIKit/UIKit.h> @interface NotificationTableViewCell : UITableViewCell @property (weak, nonatomic) IBOutlet UIImageView *avatarImage; @property (weak, nonatomic) IBOutlet UIImageView *typeImage; @property (weak, nonatomic) IBOutlet UILabel *nameLabel; @property (weak, nonatomic) IBOutlet UILabel *typeLabel; @property (weak, nonatomic) IBOutlet UILabel *messageLabel; @property (weak, nonatomic) IBOutlet UILabel *createdBeforeLabel; @property (weak, nonatomic) IBOutlet UILabel *createdBeforeSign; @end
Add Storyboard outlets in Notifications cell class
Add Storyboard outlets in Notifications cell class
C
mit
mvelikov/notifications-ios-app-example
b766d280380d5445046232cbb437393949936e5b
Magick++/fuzz/encoder_format.h
Magick++/fuzz/encoder_format.h
class EncoderFormat { public: std::string get() { return std::string(_format.begin(), _format.end()); } const void set(const std::wstring fileName, const std::wstring extension) { if (fileName.find(L"clusterfuzz-testcase-") == -1) { if (extension.length() > 1) _format = extension.substr(1, extension.size() - 1); return; } std::wstring format=fileName; size_t index = format.find(L"_", 0); if (index == std::wstring::npos) return; format=format.substr(index + 1); index = format.find(L"_", 0); if (index != std::wstring::npos) _format=format.substr(0, index); } private: std::wstring _format = L".notset"; };
class EncoderFormat { public: std::string get() { return std::string(_format.begin(), _format.end()); } const void set(const std::wstring fileName, const std::wstring extension) { if (fileName.find(L"clusterfuzz-testcase-") == -1) { if (extension.length() > 1) _format = extension.substr(1, extension.size() - 1); return; } std::wstring format=fileName; size_t index = format.find(L"_", 0); if (index == std::wstring::npos) return; format=format.substr(index + 1); index = format.find(L"_", 0); if (index != std::wstring::npos) _format=format.substr(0, index); else if (extension.length() > 1) _format=extension.substr(1, extension.size() - 1); } private: std::wstring _format = L".notset"; };
Use file extension as fallback.
Use file extension as fallback.
C
apache-2.0
Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick
78306c6f140c57f45336f77ef72d027887632581
src/dyn-register.c
src/dyn-register.c
#include <libunwind.h> #ifndef HAVE_CMP8XCHG16 #include <pthread.h> /* Make it easy to write thread-safe code which may or may not be linked against libpthread. The macros below can be used unconditionally and if -lpthread is around, they'll call the corresponding routines otherwise, they do nothing. */ #pragma weak pthread_rwlock_rdlock #pragma weak pthread_rwlock_wrlock #pragma weak pthread_rwlock_unlock #define rw_rdlock(l) (pthread_rwlock_rdlock ? pthread_rwlock_rdlock (l) : 0) #define rw_wrlock(l) (pthread_rwlock_wrlock ? pthread_rwlock_wrlock (l) : 0) #define rw_unlock(l) (pthread_rwlock_unlock ? pthread_rwlock_unlock (l) : 0) static pthread_rwlock_t registration_lock = PTHREAD_RWLOCK_INITIALIZER; #endif extern unw_dyn_info_list_t _U_dyn_info_list; int _U_dyn_register (unw_dyn_info_t *di) { #ifdef HAVE_CMP8XCHG16 unw_dyn_info_t *old_list_head, *new_list_head; unsigned long old_gen, new_gen; do { old_gen = _U_dyn_info_list.generation; old_list_head = _U_dyn_info_list.first; new_gen = old_gen + 1; new_list_head = di; di->next = old_list_head; } while (cmp8xchg16 (&_U_dyn_info_list, new_gen, new_list_head) != old_gen); #else rw_wrlock (&registration_lock); { ++_U_dyn_info_list.generation; di->next = _U_dyn_info_list.first; _U_dyn_info_list.first = di; } rw_unlock (&registration_lock); #endif }
#include "internal.h" pthread_mutex_t _U_dyn_info_list_lock = PTHREAD_MUTEX_INITIALIZER; void _U_dyn_register (unw_dyn_info_t *di) { mutex_lock (&_U_dyn_info_list_lock); { ++_U_dyn_info_list.generation; di->next = _U_dyn_info_list.first; di->prev = NULL; if (di->next) di->next->prev = di; _U_dyn_info_list.first = di; } mutex_unlock (&_U_dyn_info_list_lock); }
Move pthread-locking stuff to "internal.h". (_U_dyn_info_list_lock): Rename from "registration_lock" and change from r/w-lock to a simple mutex (spin) lock. (_U_dyn_register): Insert into doubly-linked list.
Move pthread-locking stuff to "internal.h". (_U_dyn_info_list_lock): Rename from "registration_lock" and change from r/w-lock to a simple mutex (spin) lock. (_U_dyn_register): Insert into doubly-linked list. (Logical change 1.30)
C
mit
atanasyan/libunwind,unkadoug/libunwind,unkadoug/libunwind,bo-on-software/libunwind,atanasyan/libunwind,zeldin/platform_external_libunwind,ehsan/libunwind,olibc/libunwind,maltek/platform_external_libunwind,rantala/libunwind,geekboxzone/lollipop_external_libunwind,dreal-deps/libunwind,dropbox/libunwind,Keno/libunwind,wdv4758h/libunwind,geekboxzone/lollipop_external_libunwind,rntz/libunwind,libunwind/libunwind,dagar/libunwind,DroidSim/platform_external_libunwind,Chilledheart/libunwind,olibc/libunwind,CyanogenMod/android_external_libunwind,lat/libunwind,adsharma/libunwind,maltek/platform_external_libunwind,igprof/libunwind,tkelman/libunwind,martyone/libunwind,geekboxzone/mmallow_external_libunwind,yuyichao/libunwind,tony/libunwind,rogwfu/libunwind,rogwfu/libunwind,mpercy/libunwind,rantala/libunwind,Keno/libunwind,zliu2014/libunwind-tilegx,martyone/libunwind,androidarmv6/android_external_libunwind,vegard/libunwind,tkelman/libunwind,project-zerus/libunwind,bo-on-software/libunwind,androidarmv6/android_external_libunwind,igprof/libunwind,cms-externals/libunwind,Chilledheart/libunwind,vegard/libunwind,rantala/libunwind,fillexen/libunwind,dreal-deps/libunwind,jrmuizel/libunwind,0xlab/0xdroid-external_libunwind,tronical/libunwind,tony/libunwind,android-ia/platform_external_libunwind,project-zerus/libunwind,tkelman/libunwind,joyent/libunwind,bo-on-software/libunwind,CyanogenMod/android_external_libunwind,atanasyan/libunwind-android,adsharma/libunwind,dreal-deps/libunwind,igprof/libunwind,atanasyan/libunwind-android,vtjnash/libunwind,Keno/libunwind,unkadoug/libunwind,geekboxzone/lollipop_external_libunwind,lat/libunwind,vegard/libunwind,yuyichao/libunwind,geekboxzone/mmallow_external_libunwind,0xlab/0xdroid-external_libunwind,vtjnash/libunwind,tony/libunwind,frida/libunwind,tronical/libunwind,DroidSim/platform_external_libunwind,fillexen/libunwind,tronical/libunwind,wdv4758h/libunwind,rogwfu/libunwind,dagar/libunwind,pathscale/libunwind,cloudius-systems/libunwind,olibc/libunwind,ehsan/libunwind,android-ia/platform_external_libunwind,CyanogenMod/android_external_libunwind,libunwind/libunwind,martyone/libunwind,krytarowski/libunwind,zeldin/platform_external_libunwind,cloudius-systems/libunwind,evaautomation/libunwind,SyndicateRogue/libunwind,evaautomation/libunwind,atanasyan/libunwind-android,joyent/libunwind,cms-externals/libunwind,maltek/platform_external_libunwind,atanasyan/libunwind,ehsan/libunwind,dropbox/libunwind,geekboxzone/mmallow_external_libunwind,android-ia/platform_external_libunwind,0xlab/0xdroid-external_libunwind,krytarowski/libunwind,rntz/libunwind,frida/libunwind,mpercy/libunwind,SyndicateRogue/libunwind,jrmuizel/libunwind,krytarowski/libunwind,project-zerus/libunwind,fillexen/libunwind,fdoray/libunwind,evaautomation/libunwind,cloudius-systems/libunwind,djwatson/libunwind,fdoray/libunwind,androidarmv6/android_external_libunwind,pathscale/libunwind,jrmuizel/libunwind,dropbox/libunwind,lat/libunwind,frida/libunwind,adsharma/libunwind,dagar/libunwind,joyent/libunwind,libunwind/libunwind,zliu2014/libunwind-tilegx,wdv4758h/libunwind,zeldin/platform_external_libunwind,fdoray/libunwind,yuyichao/libunwind,djwatson/libunwind,mpercy/libunwind,rntz/libunwind,zliu2014/libunwind-tilegx,SyndicateRogue/libunwind,djwatson/libunwind,cms-externals/libunwind,pathscale/libunwind,vtjnash/libunwind,Chilledheart/libunwind,DroidSim/platform_external_libunwind
1947dff2376fbd98dde548ee18c8868da9f36709
src/eigen_qdebug.h
src/eigen_qdebug.h
#ifndef SRC_EIGEN_QDEBUG_H_ #define SRC_EIGEN_QDEBUG_H_ #include <iostream> #include <QDebug> #include <Eigen/Core> QDebug operator<<(QDebug dbg, const Eigen::Vector2f &vector) { dbg << "[" << vector.x() << "|" << vector.y() << "]"; return dbg.maybeSpace(); } QDebug operator<<(QDebug dbg, const Eigen::Vector3f &vector) { dbg << "[" << vector.x() << "|" << vector.y() << "|" << vector.z() << "]"; return dbg.maybeSpace(); } QDebug operator<<(QDebug dbg, const Eigen::Matrix4f &vector) { const Eigen::IOFormat cleanFormat(4, 0, ", ", "\n", "[", "]"); std::stringstream stream; stream << vector.format(cleanFormat); dbg << stream.str().c_str(); return dbg.maybeSpace(); } #endif // SRC_EIGEN_QDEBUG_H_
Add overloads for qDebug << and some eigen types.
Add overloads for qDebug << and some eigen types.
C
mit
Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller
ee912d3abbdcbbde6a46d5a3a3a27008d374710c
src/rtpp_module.h
src/rtpp_module.h
#define MODULE_API_REVISION 1 struct api_version { int rev; size_t mi_size; }; struct moduleinfo { const char *name; struct api_version ver; }; #define MI_VER_INIT(sname) {.rev = MODULE_API_REVISION, .mi_size = sizeof(sname)}
#define MODULE_API_REVISION 2 struct rtpp_cfg_stable; struct rtpp_module_priv; struct rtpp_accounting; DEFINE_METHOD(rtpp_cfg_stable, rtpp_module_ctor, struct rtpp_module_priv *); DEFINE_METHOD(rtpp_module_priv, rtpp_module_dtor, void); DEFINE_METHOD(rtpp_module_priv, rtpp_module_on_session_end, void, struct rtpp_accounting *); struct api_version { int rev; size_t mi_size; }; struct moduleinfo { const char *name; struct api_version ver; rtpp_module_ctor_t ctor; rtpp_module_dtor_t dtor; rtpp_module_on_session_end_t on_session_end; }; #define MI_VER_INIT(sname) {.rev = MODULE_API_REVISION, .mi_size = sizeof(sname)} #define MI_VER_CHCK(sname, sptr) ((sptr)->ver.rev == MODULE_API_REVISION && \ (sptr)->ver.mi_size == sizeof(sname))
Define constructor, destructor and on_session_end methods.
Define constructor, destructor and on_session_end methods.
C
bsd-2-clause
sippy/rtpproxy,sippy/rtpproxy,jevonearth/rtpproxy,jevonearth/rtpproxy,dsanders11/rtpproxy,dsanders11/rtpproxy,jevonearth/rtpproxy,sippy/rtpproxy,dsanders11/rtpproxy,synety-jdebp/rtpproxy,synety-jdebp/rtpproxy,synety-jdebp/rtpproxy,jevonearth/rtpproxy,synety-jdebp/rtpproxy
e6d46509fa05529bdefd5d5c39544a9b28c7f959
Demo-iOS/Demo-iOS-Bridging-Header.h
Demo-iOS/Demo-iOS-Bridging-Header.h
// // Use this file to import your target's public headers that you would like to expose to Swift. // #import "DetailViewController.h" #import "LoremIpsum.h"
// // Use this file to import your target's public headers that you would like to expose to Swift. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #import "DetailViewController.h" #import "LoremIpsum.h"
Add license to bridging header
Add license to bridging header
C
apache-2.0
Kosoku/Ditko,Kosoku/Ditko,Kosoku/Ditko,Kosoku/Ditko
ba289c0ae2bae2199af17ebac18347fbc5026186
system/check.c
system/check.c
#include <clib/dos_protos.h> #include <inline/dos_protos.h> #include <proto/dos.h> #include <proto/exec.h> #include <proto/graphics.h> #include <exec/execbase.h> #include <graphics/gfxbase.h> #include "system/check.h" bool SystemCheck() { bool kickv40 = (SysBase->LibNode.lib_Version >= 40) ? TRUE : FALSE; bool chipaga = (GfxBase->ChipRevBits0 & (GFXF_AA_ALICE|GFXF_AA_LISA)) ? TRUE : FALSE; bool cpu68040 = (SysBase->AttnFlags & AFF_68040) ? TRUE : FALSE; bool fpu68882 = (SysBase->AttnFlags & AFF_68882) ? TRUE : FALSE; Printf("System check:\n"); Printf(" - Kickstart v40 : %s\n", kickv40 ? "yes" : "no"); Printf(" - ChipSet AGA : %s\n", chipaga ? "yes" : "no"); Printf(" - CPU 68040 : %s\n", cpu68040 ? "yes" : "no"); Printf(" - FPU 68882 : %s\n", fpu68882 ? "yes" : "no"); return (kickv40 && cpu68040 && fpu68882 && chipaga); }
#include <clib/dos_protos.h> #include <inline/dos_protos.h> #include <proto/dos.h> #include <proto/exec.h> #include <proto/graphics.h> #include <exec/execbase.h> #include <graphics/gfxbase.h> #include "system/check.h" bool SystemCheck() { bool kickv40 = SysBase->LibNode.lib_Version >= 40; bool chipaga = GfxBase->ChipRevBits0 & (GFXF_AA_ALICE|GFXF_AA_LISA); bool cpu68040 = SysBase->AttnFlags & AFF_68040; bool fpu68882 = SysBase->AttnFlags & AFF_68882; Printf("System check:\n"); Printf(" - Kickstart v40 : %s\n", kickv40 ? "yes" : "no"); Printf(" - ChipSet AGA : %s\n", chipaga ? "yes" : "no"); Printf(" - CPU 68040 : %s\n", cpu68040 ? "yes" : "no"); Printf(" - FPU 68882 : %s\n", fpu68882 ? "yes" : "no"); return (kickv40 && cpu68040 && fpu68882 && chipaga); }
Remove explicit conversion to boolean value.
Remove explicit conversion to boolean value.
C
artistic-2.0
cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene
35aedef6490dae31cb00b09c826c18977c2a9128
doc/doxygen.h
doc/doxygen.h
/** * @mainpage * * This is an automatically generated API documentation for the @c cpp-bencoding project. */
/** * @mainpage * * This is an automatically generated API documentation for the @c cpp-bencoding project. */ // Document the bencoding namespace (there is no better place). /// @namespace bencoding Main namespace of the bencoding library.
Add a documentation for the bencoding namespace.
Add a documentation for the bencoding namespace.
C
bsd-3-clause
s3rvac/cpp-bencoding,s3rvac/cpp-bencoding
4dd1625af301b0fe78c062559b878e944d57448f
functional/state.h
functional/state.h
/*! \file state.h \brief The definition and its controls for a state monad. */ #ifndef FUNCTIONAL_STATE_H_ #define FUNCTIONAL_STATE_H_ #include <functional> #include <type_traits> #include <utility> namespace functional { template <typename S, typename T> using State = std::function<std::pair<T, S>(S)>; template <typename T, typename S, typename F> constexpr functional::State<S, T> make_state(F f) { return functional::State<S, T>(f); } template <typename T, typename S, typename F> constexpr typename std::result_of<F(T)>::type bind( functional::State<S, T> state, F f ) { return typename std::result_of<F(T)>::type( [state, f](S s) { auto new_state = state(std::move(s)); return f(std::move(new_state.first))(std::move(new_state.second)); } ); } template <typename T, typename S, typename F, typename... Args> constexpr typename std::result_of<F(T, Args...)>::type bind( functional::State<S, T> state, F f, Args&&... args ) { return typename std::result_of<F(T, Args...)>::type( [&, state, f](S s) { auto g = std::bind(f, std::placeholders::_1, std::forward<Args>(args)...); auto new_state = state(std::move(s)); return g(std::move(new_state.first))(std::move(new_state.second)); } ); } template <typename T, typename S, typename F> constexpr auto bind_void(functional::State<S, T> state, F f) -> decltype(f()) { return decltype(f())( [state, f](S s) { auto new_state = state(std::move(s)); return f()(std::move(new_state.second)); } ); } template <typename T, typename S, typename F, typename... Args> constexpr auto bind_void( functional::State<S, T> state, F f, Args&&... args ) -> decltype(f(args...)) { return decltype(f(args...))( [&, state, f](S s) { auto g = std::bind(f, std::forward<Args>(args)...); auto new_state = state(std::move(s)); return g()(std::move(new_state.second)); } ); } template <typename T, typename S, typename F> constexpr functional::State<S, T> fmap(functional::State<S, T> state, F f) { return functional::make_state<T, S>( [state, f](S s) { auto new_state = state(std::move(s)); return std::make_pair( std::move(f(new_state.first)), std::move(new_state.second) ); } ); } } // namespace functional #endif
Add functional::State and its controls.
Add functional::State and its controls.
C
mit
RATATATO/functional
00f536dc1c7711d510e5e88943a39b619ec597f1
xchainer/backend.h
xchainer/backend.h
#pragma once #include <memory> #include "xchainer/array.h" #include "xchainer/device.h" #include "xchainer/scalar.h" namespace xchainer { class Backend { public: virtual ~Backend() = default; virtual std::shared_ptr<void> Allocate(const Device& device, size_t bytesize) = 0; virtual void MemoryCopy(void* dst_ptr, const void* src_ptr, size_t bytesize) = 0; virtual std::shared_ptr<void> FromBuffer(const Device& device, const std::shared_ptr<void>& src_ptr, size_t bytesize) = 0; virtual void Fill(Array& out, Scalar value) = 0; virtual void Add(const Array& lhs, const Array& rhs, Array& out) = 0; virtual void Mul(const Array& lhs, const Array& rhs, Array& out) = 0; virtual void Synchronize() = 0; }; } // namespace xchainer
#pragma once #include <memory> #include "xchainer/array.h" #include "xchainer/device.h" #include "xchainer/scalar.h" namespace xchainer { class Backend { public: virtual ~Backend() = default; // Allocates a memory chunk on the specified device. virtual std::shared_ptr<void> Allocate(const Device& device, size_t bytesize) = 0; // Copies the data between two memory chunks. virtual void MemoryCopy(void* dst_ptr, const void* src_ptr, size_t bytesize) = 0; // Creates a data buffer filled with the specified data on the specified device. // // It may allocate a new memory or return an alias. // src_ptr is guaranteed to reside in the main RAM. virtual std::shared_ptr<void> FromBuffer(const Device& device, const std::shared_ptr<void>& src_ptr, size_t bytesize) = 0; virtual void Fill(Array& out, Scalar value) = 0; virtual void Add(const Array& lhs, const Array& rhs, Array& out) = 0; virtual void Mul(const Array& lhs, const Array& rhs, Array& out) = 0; virtual void Synchronize() = 0; }; } // namespace xchainer
Comment on Backend member functions
Comment on Backend member functions
C
mit
jnishi/chainer,jnishi/chainer,hvy/chainer,pfnet/chainer,niboshi/chainer,okuta/chainer,ktnyt/chainer,wkentaro/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,okuta/chainer,okuta/chainer,tkerola/chainer,okuta/chainer,ktnyt/chainer,hvy/chainer,hvy/chainer,wkentaro/chainer,ktnyt/chainer,hvy/chainer,wkentaro/chainer,chainer/chainer,wkentaro/chainer,niboshi/chainer,ktnyt/chainer,chainer/chainer,jnishi/chainer,jnishi/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,chainer/chainer,niboshi/chainer,chainer/chainer,niboshi/chainer
b5348f8e51840d03037538e41ef2efd7a59766b5
Source/Main/xcode_SourceFileDefinition.h
Source/Main/xcode_SourceFileDefinition.h
//////////////////////////////////////////////////////////////////////////////// // // EXPANZ // Copyright 2008-2011 EXPANZ // All Rights Reserved. // // NOTICE: Expanz permits you to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // //////////////////////////////////////////////////////////////////////////////// #import <Foundation/Foundation.h> #import "xcode_AbstractDefinition.h" #import "XcodeSourceFileType.h" @interface xcode_SourceFileDefinition : xcode_AbstractDefinition; @property(nonatomic, strong, readonly) NSString* sourceFileName; @property(nonatomic, strong, readonly) NSData* data; @property(nonatomic, readonly) XcodeSourceFileType type; + (xcode_SourceFileDefinition*) sourceDefinitionWithName:(NSString*)name text:(NSString*)text type:(XcodeSourceFileType)type; + (xcode_SourceFileDefinition*) sourceDefinitionWithName:(NSString*)name data:(NSData*)data type:(XcodeSourceFileType)type; - (id) initWithName:(NSString*)name text:(NSString*)text type:(XcodeSourceFileType)type; - (id) initWithName:(NSString*)name data:(NSData*)data type:(XcodeSourceFileType)type; @end /* ================================================================================================================== */ @compatibility_alias SourceFileDefinition xcode_SourceFileDefinition;
//////////////////////////////////////////////////////////////////////////////// // // EXPANZ // Copyright 2008-2011 EXPANZ // All Rights Reserved. // // NOTICE: Expanz permits you to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // //////////////////////////////////////////////////////////////////////////////// #import <Foundation/Foundation.h> #import "xcode_AbstractDefinition.h" #import "XcodeSourceFileType.h" @interface xcode_SourceFileDefinition : xcode_AbstractDefinition { NSString* _sourceFileName; XcodeSourceFileType _type; NSData* _data; } @property(nonatomic, strong, readonly) NSString* sourceFileName; @property(nonatomic, strong, readonly) NSData* data; @property(nonatomic, readonly) XcodeSourceFileType type; + (xcode_SourceFileDefinition*) sourceDefinitionWithName:(NSString*)name text:(NSString*)text type:(XcodeSourceFileType)type; + (xcode_SourceFileDefinition*) sourceDefinitionWithName:(NSString*)name data:(NSData*)data type:(XcodeSourceFileType)type; - (id) initWithName:(NSString*)name text:(NSString*)text type:(XcodeSourceFileType)type; - (id) initWithName:(NSString*)name data:(NSData*)data type:(XcodeSourceFileType)type; @end /* ================================================================================================================== */ @compatibility_alias SourceFileDefinition xcode_SourceFileDefinition;
Fix to allow compile under 32 bit.
Fix to allow compile under 32 bit.
C
apache-2.0
khanhtbh/XcodeEditor,appsquickly/XcodeEditor,JoelGerboreLaser/XcodeEditor,appsquickly/XcodeEditor,JoelGerboreLaser/XcodeEditor,iosdevzone/XcodeEditor,cezheng/XcodeEditor,andyvand/XcodeEditor,service2media/XcodeEditor,appsquickly/XcodeEditor,cezheng/XcodeEditor,khanhtbh/XcodeEditor
915db9a6c7ec08544e52923c380c0fc3072d0bfb
tests/regression/13-privatized/55-widen-dependent-local.c
tests/regression/13-privatized/55-widen-dependent-local.c
// PARAM: --enable ana.int.interval #include <pthread.h> #include <assert.h> // global priv succeeds // global-history fails due to [1,+inf] widen ([1,+inf] join [0,+inf]) -> [-inf,+inf] // sensitive to eval and widen order! int g = 0; int limit; // unknown pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; void *worker(void *arg ) { // just for going to multithreaded mode return NULL; } int put() { pthread_mutex_lock(&A); while (g >= limit) { // problematic widen } assert(g >= 0); g++; pthread_mutex_unlock(&A); } int main(int argc , char **argv ) { pthread_t tid; pthread_create(& tid, NULL, & worker, NULL); int r; limit = r; // only problematic if limit unknown while (1) { // only problematic if not inlined put(); } return 0; }
Add regression tests where global is more precise than global-history due to non-side widen order
Add regression tests where global is more precise than global-history due to non-side widen order
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
82b7274cf268372802ee66fb8ce9a11a766cf778
include/Map.h
include/Map.h
#ifndef LAND_H #define LAND_H #include <string> #include "Plant.h" class Land { public: ~Land(); bool put(Plant & plant); bool getStood()const{return isStood_;} Plant & getPlant() { return *plant_; } const Plant & getPlant() const { return *plant_; } private: Plant * plant_ = nullptr; bool isStood_ = false; }; #endif // LAND_H #ifndef MAP_H #define MAP_H #include <vector> class Map { public: // with this constructor, you could get a map with [land_num] empty land Map(int land_num); Land operator[] (int i) { return lands_[i]; } const Land operator[] (int i) const { return lands_[i]; } int size() { return lands_.size(); } bool put(Plant & plant, int position) { return lands_[position].put(plant); } private: constexpr static int max_land_num = 10; std::vector<Land> lands_; }; #endif // MAP_H
#ifndef LAND_H #define LAND_H #include <string> #include "Plant.h" class Land { public: ~Land(); bool put(Plant & plant); bool getStood()const{return isStood_;} Plant * getPlant() { return plant_; } const Plant * getPlant() const { return plant_; } private: Plant * plant_ = nullptr; bool isStood_ = false; }; #endif // LAND_H #ifndef MAP_H #define MAP_H #include <vector> class Map { public: // with this constructor, you could get a map with [land_num] empty land Map(int land_num); Land operator[] (int i) { return lands_[i]; } const Land operator[] (int i) const { return lands_[i]; } int size() { return lands_.size(); } bool put(Plant & plant, int position) { return lands_[position].put(plant); } private: constexpr static int max_land_num = 10; std::vector<Land> lands_; }; #endif // MAP_H
Make Land getPlant return pointer
Make Land getPlant return pointer
C
mit
wi1d5ky/AP-Team-Project
1c60ea6ad60006299a47fd5fe4c1be0f670a04c0
src/python/helpers/python_wrap_vil_smart_ptr.h
src/python/helpers/python_wrap_vil_smart_ptr.h
/*ckwg +5 * Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to * KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, * Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. */ #ifndef VISTK_PYTHON_HELPERS_PYTHON_WRAP_VIL_SMART_PTR_H #define VISTK_PYTHON_HELPERS_PYTHON_WRAP_VIL_SMART_PTR_H #include <boost/python/pointee.hpp> #include <boost/get_pointer.hpp> #include <vil/vil_smart_ptr.h> namespace boost { namespace python { template <typename T> inline T* get_pointer(vil_smart_ptr<T> const& p) { return p.ptr(); } template <typename T> struct pointee<vil_smart_ptr<T> > { typedef T type; }; // Don't hide other get_pointer instances. using boost::python::get_pointer; using boost::get_pointer; } } #endif // VISTK_PYTHON_HELPERS_PYTHON_WRAP_VIL_SMART_PTR_H
Add a pointer wrapper for vil_smart_ptr
Add a pointer wrapper for vil_smart_ptr
C
bsd-3-clause
linus-sherrill/sprokit,mathstuf/sprokit,Kitware/sprokit,mathstuf/sprokit,linus-sherrill/sprokit,linus-sherrill/sprokit,Kitware/sprokit,mathstuf/sprokit,Kitware/sprokit,mathstuf/sprokit,linus-sherrill/sprokit,Kitware/sprokit
41021611b9bccbc524ababfab256fe7d7f28cf1c
src/lib/ems_server.c
src/lib/ems_server.c
#ifdef HAVE_CONFIG_H # include <config.h> #endif #include <Azy.h> #include "EMS_Config.azy_server.h" /*============================================================================* * Local * *============================================================================*/ /*============================================================================* * Global * *============================================================================*/ void ems_server_init(void) { Azy_Server *serv; Azy_Server_Module_Def **mods; azy_init(); //Define the list of module used by the server. Azy_Server_Module_Def *modules[] = { EMS_Config_module_def(), NULL }; serv = azy_server_new(EINA_FALSE); azy_server_addr_set(serv, "0.0.0.0"); azy_server_port_set(serv, 2000); for (mods = modules; mods && *mods; mods++) { if (!azy_server_module_add(serv, *mods)) ERR("Unable to create server\n"); } INF("Start Azy server"); azy_server_start(serv); } /*============================================================================* * API * *============================================================================*/
#ifdef HAVE_CONFIG_H # include <config.h> #endif #include <Azy.h> #include "EMS_Config.azy_server.h" /*============================================================================* * Local * *============================================================================*/ Azy_Server *_serv; /*============================================================================* * Global * *============================================================================*/ void ems_server_init(void) { Azy_Server_Module_Def **mods; azy_init(); //Define the list of module used by the server. Azy_Server_Module_Def *modules[] = { EMS_Config_module_def(), NULL }; _serv = azy_server_new(EINA_FALSE); azy_server_addr_set(_serv, "0.0.0.0"); azy_server_port_set(_serv, ems_config->port); for (mods = modules; mods && *mods; mods++) { if (!azy_server_module_add(_serv, *mods)) ERR("Unable to create server\n"); } } void ems_server_run(void) { INF("Start Azy server"); azy_server_run(_serv); } /*============================================================================* * API * *============================================================================*/
Use azy_server_run as a replacement for ecore_main_loop_begin
Use azy_server_run as a replacement for ecore_main_loop_begin
C
bsd-2-clause
enna-project/Enna-Media-Server,raoulh/Enna-Media-Server,enna-project/Enna-Media-Server,raoulh/Enna-Media-Server,enna-project/Enna-Media-Server,enna-project/Enna-Media-Server,raoulh/Enna-Media-Server,enna-project/Enna-Media-Server,raoulh/Enna-Media-Server,raoulh/Enna-Media-Server
a59e4b3c4135a31f15c8cfd4b48ea32c1060a505
react/React.h
react/React.h
// // react-objc - a library for functional-reactive-like programming // https://github.com/tconkling/react-objc/blob/master/LICENSE #import "RAConnection.h" #import "RAConnectionGroup.h" #import "RABoolSignal.h" #import "RABoolValue.h" #import "RADoubleSignal.h" #import "RADoubleValue.h" #import "RAFloatSignal.h" #import "RAFloatValue.h" #import "RAIntSignal.h" #import "RAIntValue.h" #import "RAObjectSignal.h" #import "RAObjectValue.h" #import "RAUnitSignal.h" #import "RAFuture.h" #import "RAPromise.h" #import "RAMultiFailureError.h" #import "RATry.h" #import "RAMappedSignal.h"
// // react-objc - a library for functional-reactive-like programming // https://github.com/tconkling/react-objc/blob/master/LICENSE #import "RAConnection.h" #import "RAConnectionGroup.h" #import "RABoolSignal.h" #import "RABoolValue.h" #import "RADoubleSignal.h" #import "RADoubleValue.h" #import "RAFloatSignal.h" #import "RAFloatValue.h" #import "RAIntSignal.h" #import "RAIntValue.h" #import "RAObjectSignal.h" #import "RAObjectValue.h" #import "RAStringSignal.h" #import "RAStringValue.h" #import "RAUnitSignal.h" #import "RAFuture.h" #import "RAPromise.h" #import "RAMultiFailureError.h" #import "RATry.h" #import "RAMappedSignal.h"
Add RAStringSignal and RAStringValue to header
Add RAStringSignal and RAStringValue to header
C
bsd-3-clause
tconkling/react-objc
774d58de16c4a105f4555fd5616a8077cae6c808
Assist/InputOutput/rootPath.h
Assist/InputOutput/rootPath.h
/* * Copyright (c) 2010-2014, Delft University of Technology * Copyright (c) 2010-2014, K. Kumar ([email protected]) * All rights reserved. * See http://bit.ly/1jern3m for license details. */ #ifndef ASSIST_INPUT_OUTPUT_H #define ASSIST_INPUT_OUTPUT_H #include <string> namespace assist { namespace input_output { //! Get root-path for Assist directory. /*! * Returns root-path corresponding with root-directory of Assist as a string with * trailing slash included. * \return Assist root-path. */ static inline std::string getAssistRootPath( ) { #ifdef ASSIST_CUSTOM_ROOT_PATH return std::string( ASSIST_CUSTOM_ROOT_PATH ); #else // Declare file path string assigned to filePath. // __FILE__ only gives the absolute path in the header file! std::string filePath_( __FILE__ ); // Strip filename from temporary string and return root-path string. return filePath_.substr( 0, filePath_.length( ) - std::string( "InputOutput/rootPath.h" ).length( ) ); #endif } } // namespace input_output } // namespace assist #endif // ASSIST_INPUT_OUTPUT_H
/* * Copyright (c) 2010-2014, Delft University of Technology * Copyright (c) 2010-2014, K. Kumar ([email protected]) * All rights reserved. * See http://bit.ly/1jern3m for license details. */ #ifndef ASSIST_ROOT_PATH_H #define ASSIST_ROOT_PATH_H #include <string> namespace assist { namespace input_output { //! Get root-path for Assist directory. /*! * Returns root-path corresponding with root-directory of Assist as a string with * trailing slash included. * \return Assist root-path. */ static inline std::string getAssistRootPath( ) { #ifdef ASSIST_CUSTOM_ROOT_PATH return std::string( ASSIST_CUSTOM_ROOT_PATH ); #else // Declare file path string assigned to filePath. // __FILE__ only gives the absolute path in the header file! std::string filePath_( __FILE__ ); // Strip filename from temporary string and return root-path string. return filePath_.substr( 0, filePath_.length( ) - std::string( "InputOutput/rootPath.h" ).length( ) ); #endif } } // namespace input_output } // namespace assist #endif // ASSIST_ROOT_PATH_H
Update header include guard for root-path file.
Update header include guard for root-path file.
C
bsd-3-clause
kartikkumar/assist,kartikkumar/assist
5e9486e5c6ce931557c1463b381d7f6f03ac9acd
c/src/ta_data/ta_adddatasourceparam_priv.h
c/src/ta_data/ta_adddatasourceparam_priv.h
#ifndef TA_ADDDATASOURCEPARAM_PRIV_H #define TA_ADDDATASOURCEPARAM_PRIV_H /* The following is a private copy of the user provided * parameters for a TA_AddDataSource call. * * Code is in 'ta_data_interface.c' */ typedef struct { TA_SourceId id; TA_SourceFlag flags; TA_Period period; TA_String *location; TA_String *info; TA_String *username; TA_String *password; TA_String *category; TA_String *country; TA_String *exchange; TA_String *type; TA_String *symbol; TA_String *name; } TA_AddDataSourceParamPriv; /* Function to alloc/free a TA_AddDataSourceParamPriv. */ TA_AddDataSourceParamPriv *TA_AddDataSourceParamPrivAlloc( const TA_AddDataSourceParam *param ); TA_RetCode TA_AddDataSourceParamPrivFree( TA_AddDataSourceParamPriv *toBeFreed ); #endif
#ifndef TA_ADDDATASOURCEPARAM_PRIV_H #define TA_ADDDATASOURCEPARAM_PRIV_H /* The following is a private copy of the user provided * parameters for a TA_AddDataSource call. * * Code is in 'ta_data_interface.c' */ typedef struct { TA_SourceId id; TA_SourceFlag flags; TA_Period period; TA_String *location; TA_String *info; TA_String *username; TA_String *password; TA_String *category; TA_String *country; TA_String *exchange; TA_String *type; TA_String *symbol; TA_String *name; } TA_AddDataSourceParamPriv; #endif
Remove function prototype that are now static in ta_data_interface.c
Remove function prototype that are now static in ta_data_interface.c git-svn-id: 33305d871a58cfd02b407b81d5206d2a785211eb@618 159cb52c-178a-4f3c-8eb8-d0aff033d058
C
bsd-3-clause
shamanland/ta-lib,shamanland/ta-lib,shamanland/ta-lib,shamanland/ta-lib,shamanland/ta-lib,shamanland/ta-lib
0ccd98dff05616696f78572c46bf055dc244a605
test/FixIt/fixit-include.c
test/FixIt/fixit-include.c
// RUN: %clang_cc1 -fsyntax-only -Wall -pedantic -verify %s // RUN: cp %s %t // RUN: cp %S/fixit-include.h %T // RUN: not %clang_cc1 -fsyntax-only -fixit %t // RUN: %clang_cc1 -Wall -pedantic %t #include <fixit-include.h> // expected-error {{'fixit-include.h' file not found with <angled> include; use "quotes" instead}} #pragma does_not_exist // expected-warning {{unknown pragma ignored}} int main( void ) { return 0; }
// RUN: %clang_cc1 -fsyntax-only -Wall -pedantic -verify %s // RUN: cp %s %t // RUN: cp %S/fixit-include.h %T // RUN: not %clang_cc1 -fsyntax-only -fixit %t // RUN: %clang_cc1 -Wall -pedantic %t #include <fixit-include.h> // expected-error {{'fixit-include.h' file not found with <angled> include; use "quotes" instead}} #pragma does_not_exist // expected-warning {{unknown pragma ignored}} int main( void ) { return 0; }
Remove dos line endings. Please remember to configure your windows SVN clients to default text files to 'eol-native'.
Remove dos line endings. Please remember to configure your windows SVN clients to default text files to 'eol-native'. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@160534 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
f78169f840c0a551e90df1c45ef17325263ee95c
lab3/mytests/tstworst.c
lab3/mytests/tstworst.c
#include <stdio.h> #include <stdlib.h> #include "../brk.h" #include <unistd.h> #include "clock.h" int main(int argc, char *argv[]) { int nbytes = 5; void **ptrs; long num; long i; num = atol(argv[1]); ptrs = malloc(sizeof(void*) * num); for(i = 0; i < num; i++) { ptrs[i] = malloc(nbytes); malloc(1); } for(i = 0; i < num; i++) { free(ptrs[i]); } _reset_clock(); for(i = 0; i < num; i++) { _resume(); ptrs[i] = malloc(nbytes + 1); _pause(); } _print_elapsed_time(); return 0; }
#include <stdio.h> #include <stdlib.h> #include "../brk.h" #include <unistd.h> #include "clock.h" #define MIN_ALLOC (1024) #define HEADER_SIZE (16) int main(int argc, char *argv[]) { void **ptrs; long num; long i; int small_malloc = HEADER_SIZE; int medium_malloc = (MIN_ALLOC - 3) * HEADER_SIZE; int large_malloc = (MIN_ALLOC - 1) * HEADER_SIZE; num = atol(argv[1]); ptrs = malloc(sizeof(void*) * num); for(i = 0; i < num; i++) { ptrs[i] = malloc(medium_malloc); malloc(small_malloc); } for(i = 0; i < num; i++) { free(ptrs[i]); } _reset_clock(); for(i = 0; i < num; i++) { _resume(); ptrs[i] = malloc(large_malloc); _pause(); } _print_elapsed_time(); return 0; }
Make worst case actual worst case.
Make worst case actual worst case.
C
mit
mbark/os14,mbark/os14,mbark/os14
f743432d55d26c1c97b20c2895a479318368d5e8
libc/signal/sigsetops.c
libc/signal/sigsetops.c
/* Define the real-function versions of all inline functions defined in signal.h (or bits/sigset.h). */ #include <features.h> #define _EXTERN_INLINE #ifndef __USE_EXTERN_INLINES # define __USE_EXTERN_INLINES 1 #endif #include "signal.h"
/* Define the real-function versions of all inline functions defined in signal.h (or bits/sigset.h). */ #include <features.h> #define _EXTERN_INLINE #ifndef __USE_EXTERN_INLINES # define __USE_EXTERN_INLINES 1 #endif #include <signal.h>
Use <> instead of \"\"
Use <> instead of \"\"
C
lgpl-2.1
atgreen/uClibc-moxie,hwoarang/uClibc,brgl/uclibc-ng,brgl/uclibc-ng,kraj/uClibc,majek/uclibc-vx32,majek/uclibc-vx32,gittup/uClibc,ysat0/uClibc,wbx-github/uclibc-ng,klee/klee-uclibc,ndmsystems/uClibc,skristiansson/uClibc-or1k,hwoarang/uClibc,klee/klee-uclibc,hwoarang/uClibc,atgreen/uClibc-moxie,hjl-tools/uClibc,m-labs/uclibc-lm32,ndmsystems/uClibc,ChickenRunjyd/klee-uclibc,ddcc/klee-uclibc-0.9.33.2,waweber/uclibc-clang,ffainelli/uClibc,groundwater/uClibc,groundwater/uClibc,groundwater/uClibc,ysat0/uClibc,czankel/xtensa-uclibc,OpenInkpot-archive/iplinux-uclibc,waweber/uclibc-clang,gittup/uClibc,wbx-github/uclibc-ng,groundwater/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,hjl-tools/uClibc,ffainelli/uClibc,OpenInkpot-archive/iplinux-uclibc,foss-xtensa/uClibc,kraj/uClibc,atgreen/uClibc-moxie,mephi42/uClibc,majek/uclibc-vx32,ysat0/uClibc,brgl/uclibc-ng,ChickenRunjyd/klee-uclibc,foss-for-synopsys-dwc-arc-processors/uClibc,klee/klee-uclibc,kraj/uclibc-ng,kraj/uclibc-ng,kraj/uclibc-ng,wbx-github/uclibc-ng,ffainelli/uClibc,ddcc/klee-uclibc-0.9.33.2,brgl/uclibc-ng,ffainelli/uClibc,klee/klee-uclibc,foss-xtensa/uClibc,ysat0/uClibc,kraj/uclibc-ng,hjl-tools/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,waweber/uclibc-clang,foss-xtensa/uClibc,ChickenRunjyd/klee-uclibc,ndmsystems/uClibc,czankel/xtensa-uclibc,OpenInkpot-archive/iplinux-uclibc,atgreen/uClibc-moxie,OpenInkpot-archive/iplinux-uclibc,mephi42/uClibc,ChickenRunjyd/klee-uclibc,kraj/uClibc,m-labs/uclibc-lm32,czankel/xtensa-uclibc,foss-for-synopsys-dwc-arc-processors/uClibc,hwoarang/uClibc,m-labs/uclibc-lm32,hjl-tools/uClibc,wbx-github/uclibc-ng,kraj/uClibc,skristiansson/uClibc-or1k,groundwater/uClibc,mephi42/uClibc,skristiansson/uClibc-or1k,czankel/xtensa-uclibc,gittup/uClibc,mephi42/uClibc,gittup/uClibc,ndmsystems/uClibc,ffainelli/uClibc,m-labs/uclibc-lm32,hjl-tools/uClibc,ddcc/klee-uclibc-0.9.33.2,ddcc/klee-uclibc-0.9.33.2,majek/uclibc-vx32,waweber/uclibc-clang,skristiansson/uClibc-or1k,foss-xtensa/uClibc
5eed19c98a7ea45568360d20b9b4f676a2cc5f15
src/lib/serviceRoutines/putIndividualContextEntityAttribute.h
src/lib/serviceRoutines/putIndividualContextEntityAttribute.h
#ifndef PUT_INDIVIDUAL_CONTEXT_ENTITY_ATTRIBUTE_H #define PUT_INDIVIDUAL_CONTEXT_ENTITY_ATTRIBUTE_H /* * * Copyright 2013 Telefonica Investigacion y Desarrollo, S.A.U * * This file is part of Orion Context Broker. * * Orion Context Broker is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * Orion Context Broker 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 Affero * General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Orion Context Broker. If not, see http://www.gnu.org/licenses/. * * For those usages not covered by this license please contact with * fermin at tid dot es * * Author: TID Developer */ #include <string> #include <vector> #include "rest/ConnectionInfo.h" #include "ngsi/ParseData.h" /* **************************************************************************** * * putIndividualContextEntityAttribute - */ extern std::string putIndividualContextEntityAttribute(ConnectionInfo* ciP, int components, std::vector<std::string> compV, ParseData* parseDataP); #endif
#ifndef PUT_INDIVIDUAL_CONTEXT_ENTITY_ATTRIBUTE_H #define PUT_INDIVIDUAL_CONTEXT_ENTITY_ATTRIBUTE_H /* * * Copyright 2014 Telefonica Investigacion y Desarrollo, S.A.U * * This file is part of Orion Context Broker. * * Orion Context Broker is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * Orion Context Broker 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 Affero * General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Orion Context Broker. If not, see http://www.gnu.org/licenses/. * * For those usages not covered by this license please contact with * fermin at tid dot es * * Author: TID Developer */ #include <string> #include <vector> #include "rest/ConnectionInfo.h" #include "ngsi/ParseData.h" /* **************************************************************************** * * putIndividualContextEntityAttribute - */ extern std::string putIndividualContextEntityAttribute(ConnectionInfo* ciP, int components, std::vector<std::string> compV, ParseData* parseDataP); #endif
Change date of copyright notice
Change date of copyright notice
C
agpl-3.0
jmcanterafonseca/fiware-orion,fiwareulpgcmirror/fiware-orion,McMutton/fiware-orion,McMutton/fiware-orion,McMutton/fiware-orion,telefonicaid/fiware-orion,telefonicaid/fiware-orion,jmcanterafonseca/fiware-orion,yalp/fiware-orion,yalp/fiware-orion,pacificIT/fiware-orion,guerrerocarlos/fiware-orion,fortizc/fiware-orion,yalp/fiware-orion,telefonicaid/fiware-orion,Fiware/data.Orion,pacificIT/fiware-orion,gavioto/fiware-orion,McMutton/fiware-orion,Fiware/context.Orion,fortizc/fiware-orion,guerrerocarlos/fiware-orion,jmcanterafonseca/fiware-orion,McMutton/fiware-orion,guerrerocarlos/fiware-orion,yalp/fiware-orion,j1fig/fiware-orion,fiwareulpgcmirror/fiware-orion,pacificIT/fiware-orion,Fiware/context.Orion,j1fig/fiware-orion,pacificIT/fiware-orion,Fiware/context.Orion,gavioto/fiware-orion,Fiware/data.Orion,fiwareulpgcmirror/fiware-orion,fiwareulpgcmirror/fiware-orion,McMutton/fiware-orion,jmcanterafonseca/fiware-orion,j1fig/fiware-orion,fiwareulpgcmirror/fiware-orion,Fiware/data.Orion,telefonicaid/fiware-orion,Fiware/context.Orion,pacificIT/fiware-orion,j1fig/fiware-orion,McMutton/fiware-orion,telefonicaid/fiware-orion,Fiware/data.Orion,Fiware/context.Orion,fiwareulpgcmirror/fiware-orion,yalp/fiware-orion,gavioto/fiware-orion,fortizc/fiware-orion,guerrerocarlos/fiware-orion,fortizc/fiware-orion,jmcanterafonseca/fiware-orion,j1fig/fiware-orion,telefonicaid/fiware-orion,fortizc/fiware-orion,guerrerocarlos/fiware-orion,gavioto/fiware-orion,gavioto/fiware-orion,jmcanterafonseca/fiware-orion,Fiware/data.Orion,Fiware/data.Orion,Fiware/context.Orion,fortizc/fiware-orion
240a18f3955c0c2749c867b32c231b19672d83e0
src/problem.h
src/problem.h
#ifndef PROBLEM_H #define PROBLEM_H #include "sense.h" class Problem { public: int objcnt; // Number of objectives double* rhs; int** objind; // Objective indices double** objcoef; // Objective coefficients Sense objsen; // Objective sense. Note that all objectives must have the same // sense (i.e., either all objectives are to be minimised, or // all objectives are to be maximised). int* conind; char* consense; ~Problem(); }; inline Problem::~Problem() { for(int j = 0; j < objcnt; ++j) { delete[] objind[j]; delete[] objcoef[j]; } delete[] objind; delete[] objcoef; delete[] rhs; delete[] conind; delete[] consense; } #endif /* PROBLEM_H */
#ifndef PROBLEM_H #define PROBLEM_H #include "sense.h" class Problem { public: int objcnt; // Number of objectives double* rhs; int** objind; // Objective indices double** objcoef; // Objective coefficients Sense objsen; // Objective sense. Note that all objectives must have the same // sense (i.e., either all objectives are to be minimised, or // all objectives are to be maximised). int* conind; char* consense; Problem(); ~Problem(); }; inline Problem::Problem() : objcnt(0) { } inline Problem::~Problem() { // If objcnt == 0, then no problem has been assigned and no memory allocated if (objcnt == 0) return; for(int j = 0; j < objcnt; ++j) { delete[] objind[j]; delete[] objcoef[j]; } delete[] objind; delete[] objcoef; delete[] rhs; delete[] conind; delete[] consense; } #endif /* PROBLEM_H */
Fix invalid delete[] calls in ~Problem
Fix invalid delete[] calls in ~Problem If objcnt is 0, then no memory has been allocated.
C
bsd-2-clause
WPettersson/moip_aira,WPettersson/moip_aira,WPettersson/moip_aira,WPettersson/moip_aira
759e89dfa1972fdcf84cd0e5eb5dbbd125381cd3
src/version.h
src/version.h
#ifndef _version_h_ # define _version_h_ # define PROGRAM_NAME "xyzzy" # define PROGRAM_COPYRIGHT "Copyright (C) 1996-2005 T.Kamei" # define PROGRAM_MAJOR_VERSION 0 # define PROGRAM_MINOR_VERSION 2 # define PROGRAM_MAJOR_REVISION 3 # define PROGRAM_MINOR_REVISION 5 # define PROGRAM_PATCH_LEVEL 0 # define TITLE_BAR_STRING_SIZE 256 extern char TitleBarString[]; extern const char VersionString[]; extern const char DisplayVersionString[]; extern const char ProgramName[]; extern const char ProgramNameWithVersion[]; #endif
#ifndef _version_h_ # define _version_h_ # define PROGRAM_NAME "xyzzy" # define PROGRAM_COPYRIGHT "Copyright (C) 1996-2005 T.Kamei" # define PROGRAM_MAJOR_VERSION 0 # define PROGRAM_MINOR_VERSION 2 # define PROGRAM_MAJOR_REVISION 3 # define PROGRAM_MINOR_REVISION 5 # define PROGRAM_PATCH_LEVEL 1 # define TITLE_BAR_STRING_SIZE 256 extern char TitleBarString[]; extern const char VersionString[]; extern const char DisplayVersionString[]; extern const char ProgramName[]; extern const char ProgramNameWithVersion[]; #endif
Update patch level for update test.
Update patch level for update test.
C
mit
NobuoK/xyzzy,NobuoK/xyzzy,NobuoK/xyzzy,NobuoK/xyzzy,NobuoK/xyzzy
c676cae40dc7b43a6159ffed0ff08cf5675a84d6
testmud/mud/home/Text/sys/verb/ooc/wiz/system/oreglist.c
testmud/mud/home/Text/sys/verb/ooc/wiz/system/oreglist.c
/* * This file is part of Kotaka, a mud library for DGD * http://github.com/shentino/kotaka * * Copyright (C) 2013 Raymond Jennings * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero 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 Affero 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, see <http://www.gnu.org/licenses/>. */ #include <kotaka/paths.h> #include <account/paths.h> #include <text/paths.h> #include <game/paths.h> inherit LIB_RAWVERB; void main(object actor, string args) { string owner; mapping seen; object first; object obj; if (query_user()->query_class() < 2) { send_out("Only a wizard can list objregd.\n"); return; } seen = ([ ]); first = KERNELD->first_link(args); if (!first) { send_out(args + " owns no objects.\n"); return; } obj = first; send_out("Objects owned by " + args + ":\n"); do { send_out(object_name(obj) + "\n"); seen[obj] = 1; obj = KERNELD->next_link(obj); if (!obj) { send_out("nil\n"); break; } } while (!seen[obj]); }
Add command to list all objects owned by a given user
Add command to list all objects owned by a given user
C
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
45731725e296f521e4ae2867742e7ea33a6a2ef6
libpkg/pkg_error.h
libpkg/pkg_error.h
#ifndef _PKG_ERROR_H #define _PKG_ERROR_H #ifdef DEBUG # define pkg_error_set(code, fmt, ...) \ _pkg_error_set(code, fmt " [at %s:%d]", ##__VA_ARGS__, __FILE__, __LINE__) #else # define pkg_error_set _pkg_error_set #endif #define ERROR_BAD_ARG(name) \ pkg_error_set(EPKG_FATAL, "Bad argument `%s` in %s", name, __FUNCTION__) #define ERROR_SQLITE(db) \ pkg_error_set(EPKG_FATAL, "%s (sqlite at %s:%d)", sqlite3_errmsg(db), __FILE__, __LINE__) pkg_error_t _pkg_error_set(pkg_error_t, const char *, ...); #endif
#ifndef _PKG_ERROR_H #define _PKG_ERROR_H #ifdef DEBUG # define pkg_error_set(code, fmt, ...) \ _pkg_error_set(code, fmt " [at %s:%d]", ##__VA_ARGS__, __FILE__, __LINE__) #else # define pkg_error_set _pkg_error_set #endif #define ERROR_BAD_ARG(name) \ pkg_error_set(EPKG_FATAL, "Bad argument `%s` in %s", name, __FUNCTION__) #define ERROR_SQLITE(db) \ pkg_error_set(EPKG_FATAL, "%s (sqlite)", sqlite3_errmsg(db)) pkg_error_t _pkg_error_set(pkg_error_t, const char *, ...); #endif
Revert "Indicate the location of sqlite failures."
Revert "Indicate the location of sqlite failures." This reverts commit 2686383409d98488ae7b2c39d531af9ef380e21a.
C
bsd-2-clause
khorben/pkg,junovitch/pkg,skoef/pkg,skoef/pkg,junovitch/pkg,en90/pkg,khorben/pkg,Open343/pkg,en90/pkg,khorben/pkg,Open343/pkg
da1c4e94c3cfa8b74ba81c83b91885dc50c857bd
test/Sema/arm64-neon-args.c
test/Sema/arm64-neon-args.c
// RUN: %clang_cc1 -triple arm64-apple-darwin -target-feature +neon -fsyntax-only -ffreestanding -verify %s #include <arm_neon.h> // rdar://13527900 void vcopy_reject(float32x4_t vOut0, float32x4_t vAlpha, int t) { vcopyq_laneq_f32(vOut0, 1, vAlpha, t); // expected-error {{argument to '__builtin_neon_vgetq_lane_f32' must be a constant integer}} expected-error {{initializing 'float32_t' (aka 'float') with an expression of incompatible type 'void'}} } // rdar://problem/15256199 float32x4_t test_vmlsq_lane(float32x4_t accum, float32x4_t lhs, float32x2_t rhs) { return vmlsq_lane_f32(accum, lhs, rhs, 1); }
// RUN: %clang_cc1 -triple arm64-apple-darwin -target-feature +neon -fsyntax-only -ffreestanding -verify %s // RUN: %clang_cc1 -triple arm64_be-none-linux-gnu -target-feature +neon -fsyntax-only -ffreestanding -verify %s #include <arm_neon.h> // rdar://13527900 void vcopy_reject(float32x4_t vOut0, float32x4_t vAlpha, int t) { vcopyq_laneq_f32(vOut0, 1, vAlpha, t); // expected-error {{argument to '__builtin_neon_vgetq_lane_f32' must be a constant integer}} expected-error {{initializing 'float32_t' (aka 'float') with an expression of incompatible type 'void'}} } // rdar://problem/15256199 float32x4_t test_vmlsq_lane(float32x4_t accum, float32x4_t lhs, float32x2_t rhs) { return vmlsq_lane_f32(accum, lhs, rhs, 1); }
Add a test for big-endian NEON on ARM64.
Add a test for big-endian NEON on ARM64. The enabled test #includes <arm_neon.h>, which is sufficient to test all the code in r207624. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@207641 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
2b8300582a7e62df81ab5a32efee5c0053d61161
fw/libs/AdapterBoard/usb_commands.h
fw/libs/AdapterBoard/usb_commands.h
#ifndef USB_COMMANDS_H #define USB_COMMANDS_H #define CMD_ACK 0xAF #define CMD_RESP 0xBF #define CMD_BL_ON 0x10 #define CMD_BL_OFF 0x11 #define CMD_BL_LEVEL 0x12 #define CMD_BL_UP 0x13 #define CMD_BL_DOWN 0x14 #define CMD_BL_GET_STATE 0x1F #define CMD_RGB_SET 0x20 #define CMD_RGB_GET 0x2F #endif
/* USB commands use the first byte as the 'type' variable. * Subsequent bytes are generally the 'arguments'. * So host->device usb packets usually look like: * [command, arg1, arg2, 0, 0, ... , 0, 0] * to which the device will respond with * [CMD_ACK, command, 0, 0, 0 ..., 0, 0] * * The exception to this, are the commands which 'GET' * For them host->device generally looks like: * [command, 0, ..., 0, 0] * to which the device responds * [CMD_RESP, command, arg1, arg2, 0, ..., 0, 0] * */ #ifndef USB_COMMANDS_H #define USB_COMMANDS_H #define CMD_ACK 0xAF #define CMD_RESP 0xBF #define CMD_BL_ON 0x10 #define CMD_BL_OFF 0x11 #define CMD_BL_LEVEL 0x12 #define CMD_BL_UP 0x13 #define CMD_BL_DOWN 0x14 #define CMD_BL_GET_STATE 0x1F #define CMD_RGB_SET 0x20 #define CMD_RGB_GET 0x2F #endif
Document the usb protocol (ish)
Document the usb protocol (ish)
C
bsd-3-clause
OSCARAdapter/OSCAR,OSCARAdapter/OSCAR
749fc33213dda5fdee346dfbe6cc4845c2bdbff2
reflex/test/testDict2/ClassN.h
reflex/test/testDict2/ClassN.h
#ifndef DICT2_CLASSN_H #define DICT2_CLASSN_H #include "ClassI.h" #include "ClassL.h" class ClassN: /* public ClassI, */ public ClassL { public: ClassN() : fN('n') {} virtual ~ClassN() {} int n() { return fN; } void setN(int v) { fN = v; } private: int fN; }; #endif // DICT2_CLASSN_H
Test class to check for ambiguities in the dictionary source code in case of non virtual diamonds
Test class to check for ambiguities in the dictionary source code in case of non virtual diamonds git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@16987 27541ba8-7e3a-0410-8455-c3a389f83636
C
lgpl-2.1
bbannier/ROOT,dawehner/root,dawehner/root,bbannier/ROOT,dawehner/root,dawehner/root,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,dawehner/root,dawehner/root,bbannier/ROOT,dawehner/root,dawehner/root,bbannier/ROOT
7f4a6b31a7c33625be1f3f3aec199c4c0dcc55f6
mach/i86/ce/mach.c
mach/i86/ce/mach.c
#define CODE_EXPANDER #include <system.h> #include "back.h" #include "mach.h" #ifdef DEBUG arg_error( s, arg) char *s; int arg; { fprint( STDERR, "arg_error %s %d\n", s, arg); } #endif int push_waiting = FALSE; int fit_byte( val) int val; { return( val >= -128 && val <= 127); } #include <con_float>
#define CODE_EXPANDER #include <system.h> #include "back.h" #include "mach.h" #ifdef DEBUG arg_error( s, arg) char *s; int arg; { fprint( STDERR, "arg_error %s %d\n", s, arg); } #endif int push_waiting = FALSE; int fit_byte( val) int val; { return( val >= -128 && val <= 127); } #define IEEEFLOAT #define FL_MSL_AT_LOW_ADDRESS 0 #define FL_MSW_AT_LOW_ADDRESS 0 #define FL_MSB_AT_LOW_ADDRESS 0 #include <con_float>
Use Intel byte order for floating point
Use Intel byte order for floating point
C
bsd-3-clause
Godzil/ack,Godzil/ack,Godzil/ack,Godzil/ack,Godzil/ack
2359f8a30abd107f48b2aa0c3fff361da0963ac5
lib/win32/wrappers/security_buffer_descriptor.h
lib/win32/wrappers/security_buffer_descriptor.h
#ifndef SECURITY_BUFFER_DESCRIPTOR_H #define SECURITY_BUFFER_DESCRIPTOR_H #include <node.h> #include <node_object_wrap.h> #include <v8.h> #include <windows.h> #include <sspi.h> #include "nan.h" using namespace v8; using namespace node; class SecurityBufferDescriptor : public ObjectWrap { public: Local<Array> arrayObject; SecBufferDesc secBufferDesc; SecurityBufferDescriptor(); SecurityBufferDescriptor(const Persistent<Array>& arrayObjectPersistent); ~SecurityBufferDescriptor(); // Has instance check static inline bool HasInstance(Handle<Value> val) { if (!val->IsObject()) return false; Local<Object> obj = val->ToObject(); return NanNew(constructor_template)->HasInstance(obj); }; char *toBuffer(); size_t bufferSize(); // Functions available from V8 static void Initialize(Handle<Object> target); static NAN_METHOD(ToBuffer); // Constructor used for creating new Long objects from C++ static Persistent<FunctionTemplate> constructor_template; private: static NAN_METHOD(New); }; #endif
#ifndef SECURITY_BUFFER_DESCRIPTOR_H #define SECURITY_BUFFER_DESCRIPTOR_H #include <node.h> #include <node_object_wrap.h> #include <v8.h> #include <WinSock2.h> #include <windows.h> #include <sspi.h> #include "nan.h" using namespace v8; using namespace node; class SecurityBufferDescriptor : public ObjectWrap { public: Local<Array> arrayObject; SecBufferDesc secBufferDesc; SecurityBufferDescriptor(); SecurityBufferDescriptor(const Persistent<Array>& arrayObjectPersistent); ~SecurityBufferDescriptor(); // Has instance check static inline bool HasInstance(Handle<Value> val) { if (!val->IsObject()) return false; Local<Object> obj = val->ToObject(); return NanNew(constructor_template)->HasInstance(obj); }; char *toBuffer(); size_t bufferSize(); // Functions available from V8 static void Initialize(Handle<Object> target); static NAN_METHOD(ToBuffer); // Constructor used for creating new Long objects from C++ static Persistent<FunctionTemplate> constructor_template; private: static NAN_METHOD(New); }; #endif
Fix windows build issue for node v0.12
Fix windows build issue for node v0.12
C
apache-2.0
dmansfield/kerberos,dmansfield/kerberos,artakvg/kerberos,bazineta/kerberos,artakvg/kerberos,bazineta/kerberos,artakvg/kerberos,christkv/kerberos,christkv/kerberos,artakvg/kerberos,christkv/kerberos,bazineta/kerberos,bazineta/kerberos,christkv/kerberos,dmansfield/kerberos,dmansfield/kerberos
2cce788361f527358010a60e5e78b731ea21ac3e
Programs/scr_hurd.h
Programs/scr_hurd.h
/* * BRLTTY - A background process providing access to the console screen (when in * text mode) for a blind person using a refreshable braille display. * * Copyright (C) 1995-2005 by The BRLTTY Team. All rights reserved. * * BRLTTY comes with ABSOLUTELY NO WARRANTY. * * This is free software, placed under the terms of the * GNU General Public License, as published by the Free Software * Foundation. Please see the file COPYING for details. * * Web Page: http://mielke.cc/brltty/ * * This software is maintained by Dave Mielke <[email protected]>. */ #ifndef BRLTTY_INCLUDED_SCR_HURD #define BRLTTY_INCLUDED_SCR_HURD #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define HURD_CONSDIR "/dev/cons" #define HURD_VCSDIR "/dev/vcs" #define HURD_INPUTPATH HURD_VCSDIR "/input" #define HURD_DISPLAYPATH HURD_VCSDIR "/display" #define HURD_CURVCSPATH HURD_CONSDIR "/vcs" #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* BRLTTY_INCLUDED_SCR_HURD */
/* * BRLTTY - A background process providing access to the console screen (when in * text mode) for a blind person using a refreshable braille display. * * Copyright (C) 1995-2005 by The BRLTTY Team. All rights reserved. * * BRLTTY comes with ABSOLUTELY NO WARRANTY. * * This is free software, placed under the terms of the * GNU General Public License, as published by the Free Software * Foundation. Please see the file COPYING for details. * * Web Page: http://mielke.cc/brltty/ * * This software is maintained by Dave Mielke <[email protected]>. */ #ifndef BRLTTY_INCLUDED_SCR_HURD #define BRLTTY_INCLUDED_SCR_HURD #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define HURD_CONSDIR "/dev/cons" #define HURD_VCSDIR "/dev/vcs" #define HURD_INPUTPATH HURD_VCSDIR "/%u/input" #define HURD_DISPLAYPATH HURD_VCSDIR "/%u/display" #define HURD_CURVCSPATH HURD_CONSDIR "/vcs" #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* BRLTTY_INCLUDED_SCR_HURD */
Support access to individual Hurd consoles. (st)
Support access to individual Hurd consoles. (st) git-svn-id: 30a5f035a20f1bc647618dbad7eea2a951b61b7c@1435 91a5dbb7-01b9-0310-9b5f-b28072856b6e
C
lgpl-2.1
brltty/brltty,brltty/brltty,brltty/brltty,brltty/brltty,brltty/brltty,brltty/brltty
d369eecbd4599661c420631d60fc357590bfb04a
mordor/streams/timeout.h
mordor/streams/timeout.h
#ifndef __MORDOR_TIMEOUT_STREAM__ #define __MORDOR_TIMEOUT_STREAM__ // Copyright (c) 2010 - Mozy, Inc. #include "filter.h" #include "scheduler.h" namespace Mordor { class TimerManager; class Timer; class TimeoutStream : public FilterStream { public: typedef boost::shared_ptr<TimeoutStream> ptr; public: TimeoutStream(Stream::ptr parent, TimerManager &timerManager, bool own = true) : FilterStream(parent), m_timerManager(timerManager), m_readTimeout(~0ull), m_writeTimeout(~0ull) {} unsigned long long readTimeout() const { return m_readTimeout; } void readTimeout(unsigned long long readTimeout); unsigned long long writeTimeout() const { return m_writeTimeout; } void writeTimeout(unsigned long long writeTimeout); size_t read(Buffer &buffer, size_t length); size_t write(const Buffer &buffer, size_t length); private: TimerManager &m_timerManager; unsigned long long m_readTimeout, m_writeTimeout; bool m_readTimedOut, m_writeTimedOut; boost::shared_ptr<Timer> m_readTimer, m_writeTimer; FiberMutex m_mutex; }; } #endif
#ifndef __MORDOR_TIMEOUT_STREAM__ #define __MORDOR_TIMEOUT_STREAM__ // Copyright (c) 2010 - Mozy, Inc. #include "filter.h" #include "scheduler.h" namespace Mordor { class TimerManager; class Timer; class TimeoutStream : public FilterStream { public: typedef boost::shared_ptr<TimeoutStream> ptr; public: TimeoutStream(Stream::ptr parent, TimerManager &timerManager, bool own = true) : FilterStream(parent), m_timerManager(timerManager), m_readTimeout(~0ull), m_writeTimeout(~0ull), m_readTimedOut(true), m_writeTimedOut(true) {} unsigned long long readTimeout() const { return m_readTimeout; } void readTimeout(unsigned long long readTimeout); unsigned long long writeTimeout() const { return m_writeTimeout; } void writeTimeout(unsigned long long writeTimeout); size_t read(Buffer &buffer, size_t length); size_t write(const Buffer &buffer, size_t length); private: TimerManager &m_timerManager; unsigned long long m_readTimeout, m_writeTimeout; bool m_readTimedOut, m_writeTimedOut; boost::shared_ptr<Timer> m_readTimer, m_writeTimer; FiberMutex m_mutex; }; } #endif
Initialize some vars so we don't register for a timer when there's not a call oustanding
Initialize some vars so we don't register for a timer when there's not a call oustanding Change-Id: I690bc333f35cb5aaa196d4f4bbcc11dfee4083df Reviewed-on: https://gerrit.dechocorp.com/4912 Reviewed-by: Jeremy Stanley <[email protected]>
C
bsd-3-clause
cgaebel/mordor,mtanski/mordor,mtanski/mordor,mtanski/mordor,adfin/mordor,adfin/mordor,ccutrer/mordor,mozy/mordor,adfin/mordor,ccutrer/mordor,mozy/mordor,ccutrer/mordor,cgaebel/mordor,mozy/mordor
dce2fa5ec185b39846e93204b2e273beae2e7ff6
ext/libzdb/connection_pool.c
ext/libzdb/connection_pool.c
#include <connection_pool.h> static void deallocate(ConnectionPool_T *pool) { ConnectionPool_stop(*pool); ConnectionPool_free(pool); } /* * Wrap libzdb's connection pool in a ruby object */ static VALUE allocate(VALUE klass) { ConnectionPool_T *pool; return Data_Wrap_Struct(klass, NULL, deallocate, pool); } static VALUE initialize(VALUE self, VALUE rb_string) { Check_Type(rb_string, T_STRING); ConnectionPool_T *poolPtr; ConnectionPool_T pool; URL_T url; char *url_string; Data_Get_Struct(self, ConnectionPool_T, poolPtr); url_string = StringValueCStr(rb_string); url = URL_new(url_string); pool = ConnectionPool_new(url); ConnectionPool_start(pool); poolPtr = &pool; URL_free(&url); return self; } VALUE cLibzdbConnectionPool; void init_connection_pool() { VALUE libzdb = rb_define_module("Libzdb"); VALUE klass = rb_define_class_under(libzdb, "ConnectionPool", rb_cObject); cLibzdbConnectionPool = klass; rb_define_alloc_func(cLibzdbConnectionPool, allocate); rb_define_method(cLibzdbConnectionPool, "initialize", initialize, 1); }
#include <connection_pool.h> static void deallocate(ConnectionPool_T *pool) { ConnectionPool_stop(*pool); ConnectionPool_free(pool); } static VALUE allocate(VALUE klass) { ConnectionPool_T *pool = malloc(sizeof(ConnectionPool_T)); return Data_Wrap_Struct(klass, NULL, deallocate, pool); } static VALUE initialize(VALUE self, VALUE rb_string) { Check_Type(rb_string, T_STRING); ConnectionPool_T *pool; char *url_string = StringValueCStr(rb_string); URL_T url = URL_new(url_string); Data_Get_Struct(self, ConnectionPool_T, pool); *pool = ConnectionPool_new(url); ConnectionPool_start(*pool); URL_free(&url); return self; } VALUE cLibzdbConnectionPool; void init_connection_pool() { VALUE libzdb = rb_define_module("Libzdb"); VALUE klass = rb_define_class_under(libzdb, "ConnectionPool", rb_cObject); cLibzdbConnectionPool = klass; rb_define_alloc_func(cLibzdbConnectionPool, allocate); rb_define_method(cLibzdbConnectionPool, "initialize", initialize, 1); }
Make sure that we allocate something at our pointer and assign our init’d pool to the pointers value.
Make sure that we allocate something at our pointer and assign our init’d pool to the pointers value.
C
mit
clowder/libzdb
b374c810d36bffa656b626855d79f19efc6dd2ef
src/android/AndroidOpenGLInitEvent.h
src/android/AndroidOpenGLInitEvent.h
#ifndef _ANDROIDOPENGLINITEVENT_H_ #define _ANDROIDOPENGLINITEVENT_H_ #include <OpenGLInitEvent.h> #include <android/native_window.h> class AndroidOpenGLInitEvent : public OpenGLInitEvent { public: AndroidOpenGLInitEvent(double _timestamp, int _opengl_es_version, ANativeWindow * _window) : OpenGLInitEvent(_timestamp, _opengl_es_version), window(_window) { } ANativeWindow * getWindow() { return window; } std::shared_ptr<EventBase> dup() const { return std::make_shared<AndroidOpenGLInitEvent>(*this); } void dispatch(Element & element); private: ANativeWindow * window = 0; }; #endif
#ifndef _ANDROIDOPENGLINITEVENT_H_ #define _ANDROIDOPENGLINITEVENT_H_ #include <OpenGLInitEvent.h> #include <android/native_window.h> class AndroidOpenGLInitEvent : public OpenGLInitEvent { public: AndroidOpenGLInitEvent(double _timestamp, int _opengl_es_version, ANativeWindow * _window) : OpenGLInitEvent(_timestamp, _opengl_es_version), window(_window) { } ANativeWindow * getWindow() { return window; } std::shared_ptr<EventBase> dup() const { return std::make_shared<AndroidOpenGLInitEvent>(*this); } void dispatch(Element & element) { } private: ANativeWindow * window = 0; }; #endif
Add Todo implementation to dispatch
Add Todo implementation to dispatch
C
mit
Sometrik/framework,Sometrik/framework,Sometrik/framework
06e1571bd5cd88cac8f764b0e4e8a48503c737f5
src/Walker.h
src/Walker.h
//! \file Walker.h #ifndef _WALKER_H #define _WALKER_H #include "ArticleCollection.h" //! Base class for article analyzers class Walker { protected: //! article collection, used as cache, for walked articles ArticleCollection articleSet; }; #endif // _WALKER_H
//! \file Walker.h #ifndef _WALKER_H #define _WALKER_H #include "ArticleCollection.h" //! Base class for article analyzers class Walker { public: const ArticleCollection& getCollection() const { return articleSet; } protected: //! article collection, used as cache, for walked articles ArticleCollection articleSet; }; #endif // _WALKER_H
Add method to get const article collection in walker
Add method to get const article collection in walker so I don't have to do everything within that class...
C
mit
dueringa/WikiWalker
c8d52465f95c4187871f8e65666c07806ca06d41
include/linux/compiler-gcc.h
include/linux/compiler-gcc.h
/* Never include this file directly. Include <linux/compiler.h> instead. */ /* * Common definitions for all gcc versions go here. */ /* Optimization barrier */ /* The "volatile" is due to gcc bugs */ #define barrier() __asm__ __volatile__("": : :"memory") /* This macro obfuscates arithmetic on a variable address so that gcc shouldn't recognize the original var, and make assumptions about it */ #define RELOC_HIDE(ptr, off) \ ({ unsigned long __ptr; \ __asm__ ("" : "=g"(__ptr) : "0"(ptr)); \ (typeof(ptr)) (__ptr + (off)); }) #define inline inline __attribute__((always_inline)) #define __inline__ __inline__ __attribute__((always_inline)) #define __inline __inline __attribute__((always_inline)) #define __deprecated __attribute__((deprecated)) #define noinline __attribute__((noinline)) #define __attribute_pure__ __attribute__((pure)) #define __attribute_const__ __attribute__((__const__))
/* Never include this file directly. Include <linux/compiler.h> instead. */ /* * Common definitions for all gcc versions go here. */ /* Optimization barrier */ /* The "volatile" is due to gcc bugs */ #define barrier() __asm__ __volatile__("": : :"memory") /* This macro obfuscates arithmetic on a variable address so that gcc shouldn't recognize the original var, and make assumptions about it */ /* * Versions of the ppc64 compiler before 4.1 had a bug where use of * RELOC_HIDE could trash r30. The bug can be worked around by changing * the inline assembly constraint from =g to =r, in this particular * case either is valid. */ #define RELOC_HIDE(ptr, off) \ ({ unsigned long __ptr; \ __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ (typeof(ptr)) (__ptr + (off)); }) #define inline inline __attribute__((always_inline)) #define __inline__ __inline__ __attribute__((always_inline)) #define __inline __inline __attribute__((always_inline)) #define __deprecated __attribute__((deprecated)) #define noinline __attribute__((noinline)) #define __attribute_pure__ __attribute__((pure)) #define __attribute_const__ __attribute__((__const__))
Work around ppc64 compiler bug
[PATCH] Work around ppc64 compiler bug In the process of optimising our per cpu data code, I found a ppc64 compiler bug that has been around forever. Basically the current RELOC_HIDE can end up trashing r30. Details of the bug can be found at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25572 This bug is present in all compilers before 4.1. It is masked by the fact that our current per cpu data code is inefficient and causes other loads that end up marking r30 as used. A workaround identified by Alan Modra is to use the =r asm constraint instead of =g. Signed-off-by: Anton Blanchard <[email protected]> [ Verified that this makes no real difference on x86[-64] */ Signed-off-by: Linus Torvalds <[email protected]>
C
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
ee852c74a5ac7993cc3868bb5a1f7e5e243a2a4c
tests/regression/35-int-refinements/interval-congruence.c
tests/regression/35-int-refinements/interval-congruence.c
// PARAM: --disable ana.int.def_exc --enable ana.int.interval --enable ana.int.congruence #include <assert.h> int main(){ int r = -103; for (int i = 0; i < 40; i++) { r = r + 5; } // At this point r in the congr. dom should be 2 + 5Z int k = r; if (k >= 3) { // After refinement with congruences, the lower bound should be 7 as the numbers 3 - 6 are not in the congr. class assert (k < 7); // FAIL } if (r >= -11 && r <= -4) { assert (r == -8); } return 0; }
Add (deactivated) refinement test for interval/congruence domain
Add (deactivated) refinement test for interval/congruence domain
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
535aa1e979070a2f57d1a7e17e03d2dd1a4aae1e
ReQL.h
ReQL.h
/** * @author Adam Grandquist */ #include "ReQL-ast.h" #ifndef _REQL_H #define _REQL_H struct _ReQL_Conn_s { int socket; int error; char *buf; unsigned int max_token; struct _ReQL_Cur_s **cursor; }; typedef struct _ReQL_Conn_s _ReQL_Conn_t; struct _ReQL_Cur_s { }; typedef struct _ReQL_Cur_s _ReQL_Cur_t; int _reql_connect(_ReQL_Conn_t *conn, unsigned char host_len, char *host, unsigned char port); int _reql_close_conn(_ReQL_Conn_t *conn); _ReQL_Cur_t *_reql_run(_ReQL_Op_t *query, _ReQL_Conn_t *conn, _ReQL_Op_t *kwargs); void _reql_next(_ReQL_Cur_t *cur); void _reql_close_cur(_ReQL_Cur_t *cur); #endif
/** * @author Adam Grandquist */ #include "ReQL-ast.h" #ifndef _REQL_H #define _REQL_H struct _ReQL_Conn_s { int socket; int error; char *buf; unsigned int max_token; struct _ReQL_Cur_s **cursor; }; typedef struct _ReQL_Conn_s _ReQL_Conn_t; struct _ReQL_Cur_s { _ReQL_Conn_t *conn; unsigned int idx; _ReQL_Op_t *response; }; typedef struct _ReQL_Cur_s _ReQL_Cur_t; int _reql_connect(_ReQL_Conn_t *conn, unsigned char host_len, char *host, unsigned char port); int _reql_close_conn(_ReQL_Conn_t *conn); _ReQL_Cur_t *_reql_run(_ReQL_Op_t *query, _ReQL_Conn_t *conn, _ReQL_Op_t *kwargs); void _reql_next(_ReQL_Cur_t *cur); void _reql_close_cur(_ReQL_Cur_t *cur); #endif
Add connection and response to cursors.
Add connection and response to cursors.
C
apache-2.0
grandquista/ReQL-Core,grandquista/ReQL-Core,grandquista/ReQL-Core,grandquista/ReQL-Core
0d16255d093a3292abaf0b07e21ddebc956e7ca3
tests/utils.h
tests/utils.h
#include <string> #include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <sys/fcntl.h> using namespace std; inline string copyFile(const string &filename, const string &ext) { string newname = string(tempnam(NULL, NULL)) + ext; string oldname = string("data/") + filename + ext; char buffer[4096]; int bytes; int inf = open(oldname.c_str(), O_RDONLY); int outf = open(newname.c_str(), O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR); while((bytes = read(inf, buffer, sizeof(buffer))) > 0) write(outf, buffer, bytes); close(outf); close(inf); return newname; } inline void deleteFile(const string &filename) { remove(filename.c_str()); } class ScopedFileCopy { public: ScopedFileCopy(const string &filename, const string &ext) { m_filename = copyFile(filename, ext); } ~ScopedFileCopy() { deleteFile(m_filename); } string fileName() { return m_filename; } private: string m_filename; };
#ifdef _WIN32 #include <windows.h> #else #include <unistd.h> #include <fcntl.h> #include <sys/fcntl.h> #endif #include <stdio.h> #include <string> using namespace std; inline string copyFile(const string &filename, const string &ext) { string newname = string(tempnam(NULL, NULL)) + ext; string oldname = string("data/") + filename + ext; #ifdef _WIN32 CopyFile(oldname.c_str(), newname.c_str(), FALSE); SetFileAttributes(newname.c_str(), GetFileAttributes(newname.c_str()) & ~FILE_ATTRIBUTE_READONLY); #else char buffer[4096]; int bytes; int inf = open(oldname.c_str(), O_RDONLY); int outf = open(newname.c_str(), O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR); while((bytes = read(inf, buffer, sizeof(buffer))) > 0) write(outf, buffer, bytes); close(outf); close(inf); #endif return newname; } inline void deleteFile(const string &filename) { remove(filename.c_str()); } class ScopedFileCopy { public: ScopedFileCopy(const string &filename, const string &ext) { m_filename = copyFile(filename, ext); } ~ScopedFileCopy() { deleteFile(m_filename); } string fileName() { return m_filename; } private: string m_filename; };
Fix compilation fo the test runner on Windows
Fix compilation fo the test runner on Windows Patch by Stephen Hewitt git-svn-id: 7928e23e4d58c5ca14aa7b47c53aeff82ee1dd0c@1078612 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
C
lgpl-2.1
dlz1123/taglib,black78/taglib,taglib/taglib,davispuh/taglib,pbhd/taglib,videolabs/taglib,videolabs/taglib,TsudaKageyu/taglib,taglib/taglib,MaxLeb/taglib,pbhd/taglib,Distrotech/taglib,pbhd/taglib,crystax/cosp-android-taglib,dlz1123/taglib,crystax/cosp-android-taglib,davispuh/taglib,Distrotech/taglib,dlz1123/taglib,TsudaKageyu/taglib,i80and/taglib,i80and/taglib,TsudaKageyu/taglib,taglib/taglib,i80and/taglib,Distrotech/taglib,videolabs/taglib,MaxLeb/taglib,MaxLeb/taglib,black78/taglib,davispuh/taglib,black78/taglib
ffbc0b4a8ff278d4eefd47f4ae0016eaf75641b1
framework/Source/iOS/GPUImageView.h
framework/Source/iOS/GPUImageView.h
#import <UIKit/UIKit.h> #import "GPUImageContext.h" typedef enum { kGPUImageFillModeStretch, // Stretch to fill the full view, which may distort the image outside of its normal aspect ratio kGPUImageFillModePreserveAspectRatio, // Maintains the aspect ratio of the source image, adding bars of the specified background color kGPUImageFillModePreserveAspectRatioAndFill // Maintains the aspect ratio of the source image, zooming in on its center to fill the view } GPUImageFillModeType; /** UIView subclass to use as an endpoint for displaying GPUImage outputs */ @interface GPUImageView : UIView <GPUImageInput> { GPUImageRotationMode inputRotation; } /** The fill mode dictates how images are fit in the view, with the default being kGPUImageFillModePreserveAspectRatio */ @property(readwrite, nonatomic) GPUImageFillModeType fillMode; /** This calculates the current display size, in pixels, taking into account Retina scaling factors */ @property(readonly, nonatomic) CGSize sizeInPixels; @property(nonatomic) BOOL enabled; /** Handling fill mode @param redComponent Red component for background color @param greenComponent Green component for background color @param blueComponent Blue component for background color @param alphaComponent Alpha component for background color */ - (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent; - (void)setCurrentlyReceivingMonochromeInput:(BOOL)newValue; @end
#import <UIKit/UIKit.h> #import "GPUImageContext.h" typedef NS_ENUM(NSUInteger, GPUImageFillModeType) { kGPUImageFillModeStretch, // Stretch to fill the full view, which may distort the image outside of its normal aspect ratio kGPUImageFillModePreserveAspectRatio, // Maintains the aspect ratio of the source image, adding bars of the specified background color kGPUImageFillModePreserveAspectRatioAndFill // Maintains the aspect ratio of the source image, zooming in on its center to fill the view }; /** UIView subclass to use as an endpoint for displaying GPUImage outputs */ @interface GPUImageView : UIView <GPUImageInput> { GPUImageRotationMode inputRotation; } /** The fill mode dictates how images are fit in the view, with the default being kGPUImageFillModePreserveAspectRatio */ @property(readwrite, nonatomic) GPUImageFillModeType fillMode; /** This calculates the current display size, in pixels, taking into account Retina scaling factors */ @property(readonly, nonatomic) CGSize sizeInPixels; @property(nonatomic) BOOL enabled; /** Handling fill mode @param redComponent Red component for background color @param greenComponent Green component for background color @param blueComponent Blue component for background color @param alphaComponent Alpha component for background color */ - (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent; - (void)setCurrentlyReceivingMonochromeInput:(BOOL)newValue; @end
Update GPUImageFillModeType enum to use NS_ENUM
Update GPUImageFillModeType enum to use NS_ENUM
C
bsd-3-clause
wysaid/GPUImage,eighteight/GPUImage,UndaApp/GPUImage,lacyrhoades/GPUImage,wfxiang08/GPUImage,wfxiang08/GPUImage,catbus/GPUImage,eighteight/GPUImage,BradLarson/GPUImage,birthmark/GPUImage,wysaid/GPUImage,PlanetaToBe/GPUImage,lacyrhoades/GPUImage,shi-yan/GPUImage,eighteight/GPUImage,catbus/GPUImage,msfeldstein/GPUImage,jakeva/GPUImage,wysaid/GPUImage,birthmark/GPUImage,PlanetaToBe/GPUImage,msfeldstein/GPUImage,BradLarson/GPUImage,jakeva/GPUImage,BradLarson/GPUImage,shi-yan/GPUImage,UndaApp/GPUImage
82ea549661f657e5925808355322ad6606808428
rand.h
rand.h
/** * Copyright (c) 2013-2014 Tomas Dzetkulic * Copyright (c) 2013-2014 Pavol Rusnak * * 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 __RAND_H__ #define __RAND_H__ #include <stdint.h> void init_rand(void); int finalize_rand(void); uint32_t random32(void); void random_buffer(uint8_t *buf, size_t len); #endif
/** * Copyright (c) 2013-2014 Tomas Dzetkulic * Copyright (c) 2013-2014 Pavol Rusnak * * 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 __RAND_H__ #define __RAND_H__ #include <stdlib.h> #include <stdint.h> void init_rand(void); int finalize_rand(void); uint32_t random32(void); void random_buffer(uint8_t *buf, size_t len); #endif
Add `stdlib.h` to header. Needed for `size_t`.
Add `stdlib.h` to header. Needed for `size_t`.
C
mit
romanz/trezor-crypto,trezor/trezor-crypto,trezor/trezor-crypto,01BTC10/trezor-crypto,trezor/trezor-crypto,trezor/trezor-crypto,runn1ng/trezor-crypto,runn1ng/trezor-crypto,01BTC10/trezor-crypto,trezor/trezor-crypto,jhoenicke/trezor-crypto,romanz/trezor-crypto,romanz/trezor-crypto,runn1ng/trezor-crypto,runn1ng/trezor-crypto,runn1ng/trezor-crypto,romanz/trezor-crypto,jhoenicke/trezor-crypto,romanz/trezor-crypto,jhoenicke/trezor-crypto,01BTC10/trezor-crypto,jhoenicke/trezor-crypto,jhoenicke/trezor-crypto
5702f86c31305d5029f8d9d8bff02bb6b727a06a
utils/Hash.h
utils/Hash.h
#ifndef HASH_H #define HASH_H #include <unordered_map> #include <unordered_set> template <typename K, typename V> using HashMap = std::unordered_map<K, V>; template <typename T> using HashSet = std::unordered_set<T>; #endif // HASH_H
#ifndef HASH_H #define HASH_H #include <cstdint> #include <unordered_map> #include <unordered_set> template <typename K, typename V> using HashMap = std::unordered_map<K, V>; template <typename T> using HashSet = std::unordered_set<T>; // These come from boost // Copyright 2005-2014 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) static inline uint32_t combineHashes(uint32_t seed, uint32_t value) { seed ^= value + 0x9e3779b9 + (seed << 6) + (seed >> 2); return seed; } static inline uint64_t combineHashes(uint64_t h, uint64_t k) { const uint64_t m = 0xc6a4a7935bd1e995UL; const int r = 47; k *= m; k ^= k >> r; k *= m; h ^= k; h *= m; // Completely arbitrary number, to prevent 0's // from hashing to 0. h += 0xe6546b64; return h; } template <typename It> size_t hashRange(It b, It e) { size_t h = 0; for (It it = b; it != e; it++) { h = combineHashes(h, std::hash<typename It::value_type>()(*it)); } return h; } #endif // HASH_H
Add some hashing utility functions
Add some hashing utility functions
C
mit
turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo
0e2a0195a37b492cfa9bfc1b985d8c82fc957e70
src/heap_example.c
src/heap_example.c
// cc heap_example.c heap.c #include <assert.h> #include <stdio.h> #include "bool.h" #include "heap.h" /* heap data comparator: return true if a < b */ bool cmp(void *a, void *b) { return *(int *)a < *(int *)b; } int main(int argc, const char *argv[]) { /* allocate empty heap with comparator */ struct heap *heap = heap(cmp); /* push data into heap */ int a = 4, b = 1, c = 3, d = 2; assert(heap_push(heap, &a) == HEAP_OK); assert(heap_push(heap, &b) == HEAP_OK); assert(heap_push(heap, &c) == HEAP_OK); assert(heap_push(heap, &d) == HEAP_OK); /* get current smallest data */ printf("smallest: %d\n", *(int *)heap_top(heap)); /* pop and print all data (should be in order) */ while (heap_len(heap) != 0) printf("%d\n", *(int *)heap_pop(heap)); /* free heap */ heap_free(heap); return 0; }
// cc heap_example.c heap.c #include <assert.h> #include <stdio.h> #include "bool.h" #include "heap.h" /* heap data comparator: return true if a < b */ bool cmp(void *a, void *b) { return *(int *)a < *(int *)b; } int main(int argc, const char *argv[]) { /* allocate empty heap with comparator */ struct heap *heap = heap(cmp); /* push data into heap */ int a = 4, b = 1, c = 3, d = 2, e = 5; assert(heap_push(heap, &a) == HEAP_OK); assert(heap_push(heap, &b) == HEAP_OK); assert(heap_push(heap, &c) == HEAP_OK); assert(heap_push(heap, &d) == HEAP_OK); assert(heap_push(heap, &e) == HEAP_OK); /* get current heap memory capacity (or memory allocated) */ printf("current heap allocated memory: %zu\n", heap_cap(heap)); printf("current heap length: %zu\n", heap_len(heap)); /* get current smallest data */ printf("smallest: %d\n", *(int *)heap_top(heap)); /* pop and print all data (should be in order) */ while (heap_len(heap) != 0) printf("%d\n", *(int *)heap_pop(heap)); /* free heap */ heap_free(heap); return 0; }
Add `heap_len` and `heap_cap` to example
Add `heap_len` and `heap_cap` to example
C
bsd-2-clause
hit9/C-Snip,hit9/C-Snip
48fdf76623cdc40fdf94eae554eb13b5c9c512c9
src/mlt++/config.h
src/mlt++/config.h
/** * config.h - Convenience header file for all mlt++ objects * Copyright (C) 2004-2005 Charles Yates * Author: Charles Yates <[email protected]> * * 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 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 MLTPP_CONFIG_H_ #define MLTPP_CONFIG_H_ #ifdef WIN32 #ifdef MLTPP_EXPORTS #define MLTPP_DECLSPEC __declspec( dllexport ) #else #define MLTPP_DECLSPEC __declspec( dllimport ) #endif #else #define MLTPP_DECLSPEC #endif #endif
/** * config.h - Convenience header file for all mlt++ objects * Copyright (C) 2004-2005 Charles Yates * Author: Charles Yates <[email protected]> * * This library 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 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef MLTPP_CONFIG_H_ #define MLTPP_CONFIG_H_ #ifdef WIN32 #ifdef MLTPP_EXPORTS #define MLTPP_DECLSPEC __declspec( dllexport ) #else #define MLTPP_DECLSPEC __declspec( dllimport ) #endif #else #define MLTPP_DECLSPEC #endif #endif
Fix license in comment header.
Fix license in comment header. Signed-off-by: Dan Dennedy <[email protected]>
C
lgpl-2.1
ttill/MLT-roto-tracking,xzhavilla/mlt,j-b-m/mlt,ttill/MLT-roto-tracking,rayl/MLT,wideioltd/mlt,ttill/MLT-roto-tracking,rayl/MLT,ttill/MLT-roto-tracking,xzhavilla/mlt,wideioltd/mlt,mltframework/mlt,ttill/MLT,xzhavilla/mlt,xzhavilla/mlt,zzhhui/mlt,zzhhui/mlt,xzhavilla/mlt,siddharudh/mlt,ttill/MLT-roto,ttill/MLT-roto,rayl/MLT,wideioltd/mlt,gmarco/mlt-orig,anba8005/mlt,gmarco/mlt-orig,wideioltd/mlt,ttill/MLT-roto-tracking,gmarco/mlt-orig,wideioltd/mlt,ttill/MLT,zzhhui/mlt,ttill/MLT,ttill/MLT-roto,mltframework/mlt,anba8005/mlt,zzhhui/mlt,xzhavilla/mlt,xzhavilla/mlt,ttill/MLT,mltframework/mlt,mltframework/mlt,j-b-m/mlt,ttill/MLT-roto-tracking,anba8005/mlt,gmarco/mlt-orig,rayl/MLT,mltframework/mlt,rayl/MLT,gmarco/mlt-orig,anba8005/mlt,rayl/MLT,ttill/MLT-roto,ttill/MLT,xzhavilla/mlt,j-b-m/mlt,ttill/MLT-roto,ttill/MLT-roto-tracking,ttill/MLT-roto,siddharudh/mlt,j-b-m/mlt,wideioltd/mlt,ttill/MLT-roto,ttill/MLT-roto-tracking,siddharudh/mlt,ttill/MLT-roto-tracking,gmarco/mlt-orig,zzhhui/mlt,ttill/MLT,ttill/MLT,gmarco/mlt-orig,rayl/MLT,ttill/MLT-roto,anba8005/mlt,j-b-m/mlt,zzhhui/mlt,zzhhui/mlt,ttill/MLT,siddharudh/mlt,j-b-m/mlt,zzhhui/mlt,j-b-m/mlt,siddharudh/mlt,siddharudh/mlt,zzhhui/mlt,xzhavilla/mlt,mltframework/mlt,siddharudh/mlt,anba8005/mlt,mltframework/mlt,siddharudh/mlt,ttill/MLT,wideioltd/mlt,mltframework/mlt,mltframework/mlt,rayl/MLT,mltframework/mlt,ttill/MLT-roto,gmarco/mlt-orig,anba8005/mlt,wideioltd/mlt,j-b-m/mlt,j-b-m/mlt,siddharudh/mlt,wideioltd/mlt,anba8005/mlt,gmarco/mlt-orig,j-b-m/mlt,anba8005/mlt
1a36fe45121967f5dd2f94e673d6403339cd6e62
include/config/SkUserConfigManual.h
include/config/SkUserConfigManual.h
/* * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkUserConfigManual_DEFINED #define SkUserConfigManual_DEFINED #define GR_TEST_UTILS 1 #define SK_BUILD_FOR_ANDROID_FRAMEWORK #define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024) #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024) #define SK_USE_FREETYPE_EMBOLDEN // Disable these Ganesh features #define SK_DISABLE_EXPLICIT_GPU_RESOURCE_ALLOCATION #define SK_DISABLE_RENDER_TARGET_SORTING // Check error is expensive. HWUI historically also doesn't check its allocations #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0 // Legacy flags #define SK_IGNORE_GPU_DITHER #define SK_SUPPORT_DEPRECATED_CLIPOPS #define SK_SUPPORT_LEGACY_DRAWLOOPER // Needed until we fix https://bug.skia.org/2440 #define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG #define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER #define SK_SUPPORT_LEGACY_AA_CHOICE #define SK_SUPPORT_LEGACY_AAA_CHOICE #define SK_DISABLE_DAA // skbug.com/6886 #endif // SkUserConfigManual_DEFINED
/* * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkUserConfigManual_DEFINED #define SkUserConfigManual_DEFINED #define GR_TEST_UTILS 1 #define SK_BUILD_FOR_ANDROID_FRAMEWORK #define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024) #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024) #define SK_USE_FREETYPE_EMBOLDEN // Disable these Ganesh features #define SK_DISABLE_EXPLICIT_GPU_RESOURCE_ALLOCATION #define SK_DISABLE_RENDER_TARGET_SORTING // Check error is expensive. HWUI historically also doesn't check its allocations #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0 // Legacy flags #define SK_IGNORE_GPU_DITHER #define SK_SUPPORT_DEPRECATED_CLIPOPS #define SK_SUPPORT_LEGACY_DRAWLOOPER #define SK_IGNORE_LINEAR_METRICS_FIX // Needed until we fix https://bug.skia.org/2440 #define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG #define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER #define SK_SUPPORT_LEGACY_AA_CHOICE #define SK_SUPPORT_LEGACY_AAA_CHOICE #define SK_DISABLE_DAA // skbug.com/6886 #endif // SkUserConfigManual_DEFINED
Add SK_IGNORE_LINEAR_METRICS_FIX flag for Skia.
Add SK_IGNORE_LINEAR_METRICS_FIX flag for Skia. This will hold out a Skia change to glyph metric calculation until the framework can be updated to handle it. Test: Adds build flag, does nothing right now. Change-Id: Ibce90e396002ea493cdf545857e0b84f13738ff6
C
bsd-3-clause
aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia
324a12829b108130e3d3c5ae27cca2f35186e844
src/util/logging.c
src/util/logging.c
#include <stdlib.h> #include "logging.h" char out[512]; debug_mask_t debug_mask = 0; static int debug_init = 0; char *print_hex(uint8_t *buf, int count) { memset(out, 0, count); int zz; for(zz = 0; zz < count; zz++) { sprintf(out + (zz * 2), "%02X", buf[zz]); } return out; } void debug(char *file, int line, uint32_t mask, const char *format, ...) { char *env; // Only call getenv() once. if (!debug_init) { debug_init = 1; if ((env = getenv("BD_DEBUG_MASK"))) { debug_mask = atoi(env); } else { debug_mask = 0xffff; } } if (mask & debug_mask) { char buffer[512]; va_list args; va_start(args, format); vsprintf(buffer, format, args); va_end(args); fprintf(stderr, "%s:%d: %s", file, line, buffer); } }
#include <stdlib.h> #include "logging.h" char out[512]; debug_mask_t debug_mask = 0; static int debug_init = 0; char *print_hex(uint8_t *buf, int count) { memset(out, 0, sizeof(out)); int zz; for(zz = 0; zz < count; zz++) { sprintf(out + (zz * 2), "%02X", buf[zz]); } return out; } void debug(char *file, int line, uint32_t mask, const char *format, ...) { char *env; // Only call getenv() once. if (!debug_init) { debug_init = 1; if ((env = getenv("BD_DEBUG_MASK"))) { debug_mask = atoi(env); } else { debug_mask = 0xffff; } } if (mask & debug_mask) { char buffer[512]; va_list args; va_start(args, format); vsprintf(buffer, format, args); va_end(args); fprintf(stderr, "%s:%d: %s", file, line, buffer); } }
Fix potential data corruption bug
Fix potential data corruption bug
C
lgpl-2.1
mwgoldsmith/aacs,rraptorr/libaacs,ShiftMediaProject/libaacs,ShiftMediaProject/libaacs,mwgoldsmith/aacs,zxlooong/libaacs,rraptorr/libaacs,zxlooong/libaacs
16bdf0090336003786974288f7655d8fcd50c900
src/trainer/training_failure.h
src/trainer/training_failure.h
// This file is part of UDPipe <http://github.com/ufal/udpipe/>. // // Copyright 2016 Institute of Formal and Applied Linguistics, Faculty of // Mathematics and Physics, Charles University in Prague, Czech Republic. // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #pragma once #include <sstream> #include <stdexcept> #include "common.h" namespace ufal { namespace udpipe { class training_error : public runtime_error { public: training_error(); static ostringstream message_collector; }; #define training_failure(message) throw (training_error::message_collector << message, training_error()) } // namespace udpipe } // namespace ufal
// This file is part of UDPipe <http://github.com/ufal/udpipe/>. // // Copyright 2016 Institute of Formal and Applied Linguistics, Faculty of // Mathematics and Physics, Charles University in Prague, Czech Republic. // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #pragma once #include <sstream> #include <stdexcept> #include "common.h" namespace ufal { namespace udpipe { namespace utils { class training_error : public runtime_error { public: training_error(); static ostringstream message_collector; }; #define training_failure(message) throw (training_error::message_collector << message, training_error()) } // namespace utils } // namespace udpipe } // namespace ufal
Add training_error to utils namespace.
Add training_error to utils namespace. The training_error is used by binary_encoder, which includes only utils/common.h -- that opens std only in utils namespace, not in whole ufal::udpipe.
C
mpl-2.0
ufal/udpipe,ufal/udpipe,ufal/udpipe,ufal/udpipe,ufal/udpipe,ufal/udpipe,ufal/udpipe,ufal/udpipe,ufal/udpipe,ufal/udpipe
8277a4cdfd0904aa78d144716674aa879bc8ddf8
src/test-brightness-manager.c
src/test-brightness-manager.c
#include <dalston/dalston-brightness-manager.h> static void _manager_num_levels_changed_cb (DalstonBrightnessManager *manager, gint num_levels) { g_debug (G_STRLOC ": Num levels changed: %d", num_levels); } int main (int argc, char **argv) { GMainLoop *loop; DalstonBrightnessManager *manager; g_type_init (); loop = g_main_loop_new (NULL, TRUE); manager = dalston_brightness_manager_new (); g_signal_connect (manager, "num-levels-changed", _manager_num_levels_changed_cb, NULL); g_main_loop_run (loop); }
#include <dalston/dalston-brightness-manager.h> static void _manager_num_levels_changed_cb (DalstonBrightnessManager *manager, gint num_levels) { g_debug (G_STRLOC ": Num levels changed: %d", num_levels); } static void _brightness_changed_cb (DalstonBrightnessManager *manager, gint value) { g_debug (G_STRLOC ": Brightness: %d", value); } int main (int argc, char **argv) { GMainLoop *loop; DalstonBrightnessManager *manager; g_type_init (); loop = g_main_loop_new (NULL, TRUE); manager = dalston_brightness_manager_new (); g_signal_connect (manager, "num-levels-changed", _manager_num_levels_changed_cb, NULL); dalston_brightness_manager_start_monitoring (manager); g_signal_connect (manager, "brightness-changed", _brightness_changed_cb, NULL); g_main_loop_run (loop); }
Update the test to listen for brightness changed.
Update the test to listen for brightness changed.
C
lgpl-2.1
meego-netbook-ux/meego-panel-devices,meego-netbook-ux/meego-panel-devices,meego-netbook-ux/meego-panel-devices
ec21d12e8b0d2fd1ace564304f3384d1a76819e4
test2/inline/inline_addr_arg.c
test2/inline/inline_addr_arg.c
// RUN: %ocheck 3 %s __attribute((always_inline)) inline f(int x) { int i = x; &x; i++; return i; } main() { int added = 5; added = f(2); return added; }
Test for lvalue-argument function inlinling
Test for lvalue-argument function inlinling
C
mit
8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler
8938e5782969537a9574862a73de7dac41aad0c6
tests/test_queue_using_array.c
tests/test_queue_using_array.c
#include <check.h> #include "../src/queue_using_array/queue.h" queue q; void setup() { init( &q ); } void teardown() { } START_TEST( test_normal_ops ) { enqueue( &q, 10 ); enqueue( &q, 12 ); ck_assert_int_eq( dequeue( &q ), 10 ); ck_assert_int_eq( dequeue( &q ), 12 ); } END_TEST START_TEST( test_abnormal_enqueue ) { enqueue( &q, 12 ); enqueue( &q, 14 ); enqueue( &q, 16 ); enqueue( &q, 18 ); enqueue( &q, 10 ); ck_assert_int_eq( enqueue( &q, 15 ), -2 ); } END_TEST START_TEST( test_abnormal_dequeue ) { enqueue( &q, 12 ); ck_assert_int_eq( dequeue( &q ), 12 ); ck_assert_int_eq( dequeue( &q ), -3 ); } END_TEST START_TEST( test_null ) { ck_assert_int_eq( enqueue( NULL, 10 ), -1 ); ck_assert_int_eq( dequeue( NULL ), -1 ); ck_assert_int_eq( peek( NULL ), -1 ); ck_assert_int_eq( init( NULL ), -1 ); } END_TEST Suite * queue_suite(void) { Suite *s; TCase *tc_core, *tc_abnormal; s = suite_create("Queue"); /* Core test case */ tc_core = tcase_create("Core"); /* Abnormal test case */ tc_abnormal = tcase_create("Abnormal"); tcase_add_checked_fixture(tc_core, setup, teardown); tcase_add_checked_fixture(tc_abnormal, setup, teardown); tcase_add_test(tc_core, test_normal_ops); tcase_add_test(tc_abnormal, test_abnormal_enqueue); tcase_add_test(tc_abnormal, test_abnormal_dequeue); tcase_add_test(tc_abnormal, test_null); suite_add_tcase(s, tc_core); suite_add_tcase(s, tc_abnormal); return s; } int main() { int number_failed; Suite *s; SRunner *sr; s = queue_suite(); sr = srunner_create(s); srunner_run_all(sr, CK_NORMAL); number_failed = srunner_ntests_failed(sr); srunner_free(sr); return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
Test for queue using array
Test for queue using array
C
mit
TejasR/data-structures-in-c,TejasR/data-structures-in-c
7817e2e0a03e4f9d469ae54c89297c413d4d5b01
src/unit_VEHICLE/subsys/ChTerrain.h
src/unit_VEHICLE/subsys/ChTerrain.h
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All right reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of the distribution and at // http://projectchrono.org/license-chrono.txt. // // ============================================================================= // Authors: Radu Serban // ============================================================================= // // Base class for a terrain subsystem. // // ============================================================================= #ifndef CH_TERRAIN_H #define CH_TERRAIN_H #include "core/ChShared.h" #include "subsys/ChApiSubsys.h" namespace chrono { class CH_SUBSYS_API ChTerrain : public ChShared { public: ChTerrain() {} virtual ~ChTerrain() {} virtual void Update(double time) {} virtual void Advance(double step) {} virtual double GetHeight(double x, double y) const = 0; }; } // end namespace chrono #endif
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All right reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of the distribution and at // http://projectchrono.org/license-chrono.txt. // // ============================================================================= // Authors: Radu Serban // ============================================================================= // // Base class for a terrain subsystem. // // ============================================================================= #ifndef CH_TERRAIN_H #define CH_TERRAIN_H #include "core/ChShared.h" #include "core/ChVector.h" #include "subsys/ChApiSubsys.h" namespace chrono { class CH_SUBSYS_API ChTerrain : public ChShared { public: ChTerrain() {} virtual ~ChTerrain() {} virtual void Update(double time) {} virtual void Advance(double step) {} virtual double GetHeight(double x, double y) const = 0; //// TODO: make this a pure virtual function... virtual ChVector<> GetNormal(double x, double y) const { return ChVector<>(0, 0, 1); } }; } // end namespace chrono #endif
Add normal information to terrain.
Add normal information to terrain.
C
bsd-3-clause
Milad-Rakhsha/chrono,amelmquist/chrono,armanpazouki/chrono,rserban/chrono,armanpazouki/chrono,amelmquist/chrono,Milad-Rakhsha/chrono,Milad-Rakhsha/chrono,jcmadsen/chrono,dariomangoni/chrono,projectchrono/chrono,Milad-Rakhsha/chrono,tjolsen/chrono,Bryan-Peterson/chrono,andrewseidl/chrono,rserban/chrono,projectchrono/chrono,tjolsen/chrono,jcmadsen/chrono,rserban/chrono,armanpazouki/chrono,tjolsen/chrono,Milad-Rakhsha/chrono,tjolsen/chrono,jcmadsen/chrono,amelmquist/chrono,rserban/chrono,amelmquist/chrono,amelmquist/chrono,Bryan-Peterson/chrono,andrewseidl/chrono,jcmadsen/chrono,rserban/chrono,projectchrono/chrono,jcmadsen/chrono,andrewseidl/chrono,jcmadsen/chrono,dariomangoni/chrono,dariomangoni/chrono,tjolsen/chrono,projectchrono/chrono,armanpazouki/chrono,Milad-Rakhsha/chrono,dariomangoni/chrono,projectchrono/chrono,armanpazouki/chrono,rserban/chrono,Bryan-Peterson/chrono,jcmadsen/chrono,Bryan-Peterson/chrono,dariomangoni/chrono,andrewseidl/chrono,amelmquist/chrono,rserban/chrono,andrewseidl/chrono,dariomangoni/chrono,Bryan-Peterson/chrono,projectchrono/chrono,armanpazouki/chrono
eff661b69750fba61fd49e19c1918eac139f5e7d
KSPhotoBrowser/KSPhotoItem.h
KSPhotoBrowser/KSPhotoItem.h
// // KSPhotoItem.h // KSPhotoBrowser // // Created by Kyle Sun on 12/25/16. // Copyright © 2016 Kyle Sun. All rights reserved. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface KSPhotoItem : NSObject @property (nonatomic, strong, readonly) UIView *sourceView; @property (nonatomic, strong, readonly) UIImage *thumbImage; @property (nonatomic, strong, readonly) UIImage *image; @property (nonatomic, strong, readonly) NSURL *imageUrl; @property (nonatomic, assign) BOOL finished; - (instancetype)initWithSourceView:(UIView *)view thumbImage:(UIImage *)image imageUrl:(NSURL *)url; - (instancetype)initWithSourceView:(UIImageView *)view imageUrl:(NSURL *)url; - (instancetype)initWithSourceView:(UIImageView *)view image:(UIImage *)image; + (instancetype)itemWithSourceView:(UIView *)view thumbImage:(UIImage *)image imageUrl:(NSURL *)url; + (instancetype)itemWithSourceView:(UIImageView *)view imageUrl:(NSURL *)url; + (instancetype)itemWithSourceView:(UIImageView *)view image:(UIImage *)image; @end NS_ASSUME_NONNULL_END
// // KSPhotoItem.h // KSPhotoBrowser // // Created by Kyle Sun on 12/25/16. // Copyright © 2016 Kyle Sun. All rights reserved. // #import <UIKit/UIKit.h> @interface KSPhotoItem : NSObject @property (nonatomic, strong, readonly, nullable) UIView *sourceView; @property (nonatomic, strong, readonly, nullable) UIImage *thumbImage; @property (nonatomic, strong, readonly, nullable) UIImage *image; @property (nonatomic, strong, readonly, nullable) NSURL *imageUrl; @property (nonatomic, assign) BOOL finished; - (nonnull instancetype)initWithSourceView:(nullable UIView *)view thumbImage:(nullable UIImage *)image imageUrl:(nullable NSURL *)url; - (nonnull instancetype)initWithSourceView:(nullable UIImageView * )view imageUrl:(nullable NSURL *)url; - (nonnull instancetype)initWithSourceView:(nullable UIImageView *)view image:(nullable UIImage *)image; + (nonnull instancetype)itemWithSourceView:(nullable UIView *)view thumbImage:(nullable UIImage *)image imageUrl:(nullable NSURL *)url; + (nonnull instancetype)itemWithSourceView:(nullable UIImageView *)view imageUrl:(nullable NSURL *)url; + (nonnull instancetype)itemWithSourceView:(nullable UIImageView *)view image:(nullable UIImage *)image; @end
Support nullable Item sourceView in Swift.
Support nullable Item sourceView in Swift.
C
mit
skx926/KSPhotoBrowser
a82eba7c6c263e67ad58f5211dbc6d32d3963cb3
contrib/bind/port/freebsd/include/port_after.h
contrib/bind/port/freebsd/include/port_after.h
#define CAN_RECONNECT #define USE_POSIX #define POSIX_SIGNALS #define USE_UTIME #define USE_WAITPID #define HAVE_GETRUSAGE #define HAVE_FCHMOD #define NEED_PSELECT #define HAVE_SA_LEN #define USE_LOG_CONS #define HAVE_CHROOT #define CAN_CHANGE_ID #define _TIMEZONE timezone #define PORT_NONBLOCK O_NONBLOCK #define PORT_WOULDBLK EWOULDBLOCK #define WAIT_T int #define KSYMS "/kernel" #define KMEM "/dev/kmem" #define UDPSUM "udpcksum" /* * We need to know the IPv6 address family number even on IPv4-only systems. * Note that this is NOT a protocol constant, and that if the system has its * own AF_INET6, different from ours below, all of BIND's libraries and * executables will need to be recompiled after the system <sys/socket.h> * has had this type added. The type number below is correct on most BSD- * derived systems for which AF_INET6 is defined. */ #ifndef AF_INET6 #define AF_INET6 24 #endif
#define CAN_RECONNECT #define USE_POSIX #define POSIX_SIGNALS #define USE_UTIME #define USE_WAITPID #define HAVE_GETRUSAGE #define HAVE_FCHMOD #define NEED_PSELECT #define HAVE_SA_LEN #define SETPWENT_VOID #define RLIMIT_TYPE rlim_t #define RLIMIT_LONGLONG #define RLIMIT_FILE_INFINITY #define HAVE_CHROOT #define CAN_CHANGE_ID #define _TIMEZONE timezone #define PORT_NONBLOCK O_NONBLOCK #define PORT_WOULDBLK EWOULDBLOCK #define WAIT_T int #define KSYMS "/kernel" #define KMEM "/dev/kmem" #define UDPSUM "udpcksum" /* * We need to know the IPv6 address family number even on IPv4-only systems. * Note that this is NOT a protocol constant, and that if the system has its * own AF_INET6, different from ours below, all of BIND's libraries and * executables will need to be recompiled after the system <sys/socket.h> * has had this type added. The type number below is correct on most BSD- * derived systems for which AF_INET6 is defined. */ #ifndef AF_INET6 #define AF_INET6 24 #endif
Update for some -current quirks, and some other things taken from the *bsd bind-8 ports. (our setpwent() was changed to return void, but our setgrent() returns int still!)
Update for some -current quirks, and some other things taken from the *bsd bind-8 ports. (our setpwent() was changed to return void, but our setgrent() returns int still!)
C
bsd-3-clause
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
a7b3191a27c28c798c64b6bc012ffc0bf680ace6
include/read_and_write_data.h
include/read_and_write_data.h
#ifndef READ_AND_WRITE_DATA_H #define READ_AND_WRITE_DATA_H #include <objects.h> using namespace std; class FileReader { protected: string inputFile; public: FileReader(const string &inputFile) : inputFile(inputFile) {} virtual bool hasNextLine() = 0; virtual void readNextLine(DataInstance &instance) = 0; ~FileReader(); }; class FileWriter { protected: string outputFile; public: FileWriter(const string &outputFile) : outputFile(outputFile) {} virtual void writeNextLine(DataInstance &instance) = 0; ~FileWriter(); }; void importData(FileReader &reader, vector<DataObject> &data); void exportData(FileWriter &writer, const vector<DataObject> &data); #endif
Define interface for data reader and writer objects
Define interface for data reader and writer objects Also declare functions for data import and export
C
mit
Akshay809/kopSkylines,Akshay809/kopSkylines
41c21c9cfde906d9c3f6521eddbdd7750bbfb92a
include/Texture.h
include/Texture.h
// Copyright 2016 Zheng Xian Qiu // #pragma once #include "Seeker.h" #ifndef _TEXTURE_H #define _TEXTURE_H using std::string; namespace Seeker { class Texture : public IResource { public: Texture(string path); Texture(int width, int height, bool alpha = false); ~Texture(); int Width = 0; int Height = 0; void Prepare(SDL_Renderer* renderer); void Draw(int x, int y); void Draw(int x, int y, int w, int h); void Destroy(); void AsRenderTarget(SDL_Renderer* renderer); static string ResourceKey(string filename); protected: SDL_Texture* CreateTextureFromSurface(SDL_Renderer* renderer); SDL_Texture* CreateTexture(SDL_Renderer* renderer); private: string filename; bool alpha = false; SDL_Texture* texture = nullptr; }; } #endif
// Copyright 2016 Zheng Xian Qiu // #pragma once #include "Seeker.h" #ifndef _TEXTURE_H #define _TEXTURE_H using std::string; namespace Seeker { class Texture : public IResource { public: Texture(string path); Texture(int width, int height, bool alpha = true); ~Texture(); int Width = 0; int Height = 0; void Prepare(SDL_Renderer* renderer); void Draw(int x, int y); void Draw(int x, int y, int w, int h); void Destroy(); void AsRenderTarget(SDL_Renderer* renderer); static string ResourceKey(string filename); protected: SDL_Texture* CreateTextureFromSurface(SDL_Renderer* renderer); SDL_Texture* CreateTexture(SDL_Renderer* renderer); private: string filename; bool alpha = true; SDL_Texture* texture = nullptr; }; } #endif
Set empty texture default to transparent
Set empty texture default to transparent
C
apache-2.0
elct9620/seeker,elct9620/seeker,elct9620/seeker
8557aff3b74bb0bf240fcc05ae73ff05caf1ce97
CPPWebFramework/cwf/dbstorage.h
CPPWebFramework/cwf/dbstorage.h
#include "sqldatabasestorage.h" CWF_BEGIN_NAMESPACE namespace DbStorage { CPPWEBFRAMEWORKSHARED_EXPORT static CWF::SqlDatabaseStorage _storage; CPPWEBFRAMEWORKSHARED_EXPORT static QString _secret; } CWF_END_NAMESPACE
#include "sqldatabasestorage.h" CWF_BEGIN_NAMESPACE namespace DbStorage { static CWF::SqlDatabaseStorage _storage; static QString _secret; } CWF_END_NAMESPACE
Remove the dll export flag
Remove the dll export flag
C
mit
HerikLyma/CPPWebFramework,HerikLyma/CPPWebFramework
fe45ca036fe90600a9a6d99bea17a2b36d04a071
lib/luwra/common.h
lib/luwra/common.h
/* Luwra * Minimal-overhead Lua wrapper for C++ * * Copyright (C) 2015, Ole Krüger <[email protected]> */ #ifndef LUWRA_COMMON_H_ #define LUWRA_COMMON_H_ #include <lua.hpp> // Check for proper Lua version #if defined(LUA_VERSION_NUM) #if LUA_VERSION_NUM < 503 || LUA_VERSION >= 600 #warning "Luwra has not been tested against your installed version of Lua" #end #else #error "Your Lua library does not define LUA_VERSION_NUM" #end #define LUWRA_NS_BEGIN namespace luwra { #define LUWRA_NS_END } #endif
/* Luwra * Minimal-overhead Lua wrapper for C++ * * Copyright (C) 2015, Ole Krüger <[email protected]> */ #ifndef LUWRA_COMMON_H_ #define LUWRA_COMMON_H_ // Check C++ version #if !defined(__cplusplus) || __cplusplus < 201402L #error "You need a C++14 compliant compiler" #endif #include <lua.hpp> // Check for proper Lua version #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 503 || LUA_VERSION >= 600 #warning "Luwra has not been tested against your installed version of Lua" #endif #define LUWRA_NS_BEGIN namespace luwra { #define LUWRA_NS_END } #endif
Check for C++14 and Lua version properly
Check for C++14 and Lua version properly
C
bsd-3-clause
vapourismo/luwra
905a30860e08f0264c746ca7a92d5b405015196c
libedataserverui/gtk-compat.h
libedataserverui/gtk-compat.h
#ifndef __GTK_COMPAT_H__ #define __GTK_COMPAT_H__ #include <gtk/gtk.h> /* Provide a compatibility layer for accessor functions introduced * in GTK+ 2.22 which we need to build with sealed GDK. * That way it is still possible to build with GTK+ 2.20. */ #if !GTK_CHECK_VERSION(2,21,2) #define gdk_drag_context_get_actions(context) (context)->actions #define gdk_drag_context_get_suggested_action(context) (context)->suggested_action #define gdk_drag_context_get_selected_action(context) (context)->action #endif /* GTK_CHECK_VERSION(2, 21, 0) */ #endif /* __GTK_COMPAT_H__ */
#ifndef __GTK_COMPAT_H__ #define __GTK_COMPAT_H__ #include <gtk/gtk.h> /* Provide a compatibility layer for accessor functions introduced * in GTK+ 2.21.1 which we need to build with sealed GDK. * That way it is still possible to build with GTK+ 2.20. */ #if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 21) \ || (GTK_MINOR_VERSION == 21 && GTK_MICRO_VERSION < 1) #define gdk_drag_context_get_actions(context) (context)->actions #define gdk_drag_context_get_suggested_action(context) (context)->suggested_action #define gdk_drag_context_get_selected_action(context) (context)->action #endif #endif /* __GTK_COMPAT_H__ */
Check for gtk version below 2.21.1 for comptability with gseal changes
Check for gtk version below 2.21.1 for comptability with gseal changes
C
lgpl-2.1
Distrotech/evolution-data-server,gcampax/evolution-data-server,tintou/evolution-data-server,Distrotech/evolution-data-server,matzipan/evolution-data-server,matzipan/evolution-data-server,gcampax/evolution-data-server,gcampax/evolution-data-server,gcampax/evolution-data-server,matzipan/evolution-data-server,tintou/evolution-data-server,matzipan/evolution-data-server,Distrotech/evolution-data-server,Distrotech/evolution-data-server,matzipan/evolution-data-server,Distrotech/evolution-data-server,tintou/evolution-data-server,tintou/evolution-data-server
dd0c830ae3af87e8d354b9848d045bf0acd1d5e9
kmail/kmversion.h
kmail/kmversion.h
// KMail Version Information // #ifndef kmversion_h #define kmversion_h #define KMAIL_VERSION "1.6.50" #endif /*kmversion_h*/
// KMail Version Information // #ifndef kmversion_h #define kmversion_h #define KMAIL_VERSION "1.6.51" #endif /*kmversion_h*/
Update the version a tick so that we can tell who has the recently committed critical fixes.
Update the version a tick so that we can tell who has the recently committed critical fixes. svn path=/trunk/kdepim/; revision=285464
C
lgpl-2.1
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
a882990c9d05497540efca385ebb55c200e01e76
MUON/mapping/AliMpStationType.h
MUON/mapping/AliMpStationType.h
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ // $Id$ // $MpId: AliMpStationType.h,v 1.5 2005/10/28 15:05:04 ivana Exp $ /// \ingroup basic /// \enum AliMpStationType /// Enumeration for refering to a MUON station /// /// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_STATION_TYPE_H #define ALI_MP_STATION_TYPE_H enum AliMpStationType { kStationInvalid = -1,///< invalid station kStation1 = 0, ///< station 1 (quadrants) kStation2, ///< station 2 (quadrants) kStation345, ///< station 3,4,5 (slats) kStationTrigger ///< trigger stations (slats) }; inline const char* StationTypeName(AliMpStationType stationType) { switch ( stationType ) { case kStation1: return "st1"; break; case kStation2: return "st2"; break; case kStation345: return "slat"; break; case kStationTrigger: return "trigger"; break; case kStationInvalid: default: return "unknown"; break; } } #endif //ALI_MP_STATION_TYPE_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ // $Id$ // $MpId: AliMpStationType.h,v 1.5 2005/10/28 15:05:04 ivana Exp $ /// \ingroup basic /// \enum AliMpStationType /// Enumeration for refering to a MUON station /// /// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_STATION_TYPE_H #define ALI_MP_STATION_TYPE_H enum AliMpStationType { kStationInvalid = -1,///< invalid station kStation1 = 0, ///< station 1 (quadrants) kStation2, ///< station 2 (quadrants) kStation345, ///< station 3,4,5 (slats) kStationTrigger ///< trigger stations (slats) }; inline const char* StationTypeName(AliMpStationType stationType) { switch ( stationType ) { case kStation1: return "st1"; break; case kStation2: return "st2"; break; case kStation345: return "slat"; break; case kStationTrigger: return "trigger"; break; case kStationInvalid: default: return "invalid"; break; } return "unknown"; } #endif //ALI_MP_STATION_TYPE_H
Fix warning from gcc4 (Laurent)
Fix warning from gcc4 (Laurent)
C
bsd-3-clause
ALICEHLT/AliRoot,shahor02/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,miranov25/AliRoot,mkrzewic/AliRoot,ecalvovi/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,alisw/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,coppedis/AliRoot,alisw/AliRoot,sebaleh/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,coppedis/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,sebaleh/AliRoot,miranov25/AliRoot,shahor02/AliRoot,shahor02/AliRoot,miranov25/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot,ALICEHLT/AliRoot,ecalvovi/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,alisw/AliRoot,coppedis/AliRoot,coppedis/AliRoot,ALICEHLT/AliRoot,alisw/AliRoot,alisw/AliRoot,coppedis/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,jgrosseo/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,jgrosseo/AliRoot