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
1f5338e7b71f56c6d2451b9b23608c851bf90c8a
compiler/cbits/genSym.c
compiler/cbits/genSym.c
#include "Rts.h" static HsInt GenSymCounter = 0; HsInt genSym(void) { if (n_capabilities == 1) { return GenSymCounter++; } else { return atomic_inc((StgWord *)&GenSymCounter, 1); } }
#include "Rts.h" static HsInt GenSymCounter = 0; HsInt genSym(void) { #if defined(THREADED_RTS) if (n_capabilities == 1) { return GenSymCounter++; } else { return atomic_inc((StgWord *)&GenSymCounter, 1); } #else return GenSymCounter++; #endif }
Fix bootstrapping of GHC with earlier versions
Fix bootstrapping of GHC with earlier versions We can no longer use atomic_inc() in the stage1 compiler because its prototype was recently changed. Since the stage1 compiler is always single-threaded, only use atomic_inc() when THREADED_RTS is defined.
C
bsd-3-clause
mcschroeder/ghc,TomMD/ghc,fmthoma/ghc,urbanslug/ghc,da-x/ghc,olsner/ghc,vTurbine/ghc,olsner/ghc,anton-dessiatov/ghc,GaloisInc/halvm-ghc,sgillespie/ghc,ekmett/ghc,acowley/ghc,olsner/ghc,mettekou/ghc,ml9951/ghc,forked-upstream-packages-for-ghcjs/ghc,forked-upstream-packages-for-ghcjs/ghc,vTurbine/ghc,ryantm/ghc,gridaphobe/ghc,spacekitteh/smcghc,TomMD/ghc,ml9951/ghc,ezyang/ghc,sdiehl/ghc,bitemyapp/ghc,nkaretnikov/ghc,gridaphobe/ghc,tibbe/ghc,nkaretnikov/ghc,acowley/ghc,sgillespie/ghc,snoyberg/ghc,urbanslug/ghc,ryantm/ghc,shlevy/ghc,siddhanathan/ghc,GaloisInc/halvm-ghc,hferreiro/replay,hferreiro/replay,wxwxwwxxx/ghc,jstolarek/ghc,nkaretnikov/ghc,urbanslug/ghc,frantisekfarka/ghc-dsi,lukexi/ghc,wxwxwwxxx/ghc,TomMD/ghc,mfine/ghc,elieux/ghc,ezyang/ghc,nushio3/ghc,da-x/ghc,snoyberg/ghc,bitemyapp/ghc,elieux/ghc,sdiehl/ghc,nathyong/microghc-ghc,olsner/ghc,ekmett/ghc,sdiehl/ghc,nathyong/microghc-ghc,urbanslug/ghc,olsner/ghc,holzensp/ghc,elieux/ghc,mcschroeder/ghc,mettekou/ghc,GaloisInc/halvm-ghc,snoyberg/ghc,ghc-android/ghc,gridaphobe/ghc,green-haskell/ghc,GaloisInc/halvm-ghc,mfine/ghc,jstolarek/ghc,anton-dessiatov/ghc,jstolarek/ghc,tjakway/ghcjvm,christiaanb/ghc,mfine/ghc,anton-dessiatov/ghc,nathyong/microghc-ghc,frantisekfarka/ghc-dsi,gcampax/ghc,AlexanderPankiv/ghc,ryantm/ghc,green-haskell/ghc,gcampax/ghc,mettekou/ghc,forked-upstream-packages-for-ghcjs/ghc,elieux/ghc,anton-dessiatov/ghc,acowley/ghc,anton-dessiatov/ghc,snoyberg/ghc,tjakway/ghcjvm,tibbe/ghc,hferreiro/replay,fmthoma/ghc,sdiehl/ghc,tibbe/ghc,fmthoma/ghc,gridaphobe/ghc,nathyong/microghc-ghc,lukexi/ghc,tjakway/ghcjvm,bitemyapp/ghc,vTurbine/ghc,anton-dessiatov/ghc,ezyang/ghc,hferreiro/replay,mcschroeder/ghc,elieux/ghc,ml9951/ghc,shlevy/ghc,gcampax/ghc,nkaretnikov/ghc,snoyberg/ghc,GaloisInc/halvm-ghc,holzensp/ghc,lukexi/ghc,hferreiro/replay,acowley/ghc,anton-dessiatov/ghc,urbanslug/ghc,christiaanb/ghc,oldmanmike/ghc,ekmett/ghc,ghc-android/ghc,gcampax/ghc,vikraman/ghc,tjakway/ghcjvm,fmthoma/ghc,tjakway/ghcjvm,hferreiro/replay,oldmanmike/ghc,nushio3/ghc,ezyang/ghc,wxwxwwxxx/ghc,lukexi/ghc,jstolarek/ghc,ezyang/ghc,shlevy/ghc,AlexanderPankiv/ghc,snoyberg/ghc,ekmett/ghc,mettekou/ghc,nushio3/ghc,green-haskell/ghc,vikraman/ghc,AlexanderPankiv/ghc,mcschroeder/ghc,sgillespie/ghc,mfine/ghc,tibbe/ghc,forked-upstream-packages-for-ghcjs/ghc,sgillespie/ghc,tjakway/ghcjvm,siddhanathan/ghc,urbanslug/ghc,mfine/ghc,frantisekfarka/ghc-dsi,wxwxwwxxx/ghc,vikraman/ghc,siddhanathan/ghc,elieux/ghc,AlexanderPankiv/ghc,spacekitteh/smcghc,mfine/ghc,ekmett/ghc,oldmanmike/ghc,tibbe/ghc,mettekou/ghc,bitemyapp/ghc,nkaretnikov/ghc,fmthoma/ghc,da-x/ghc,ghc-android/ghc,wxwxwwxxx/ghc,oldmanmike/ghc,gridaphobe/ghc,vTurbine/ghc,forked-upstream-packages-for-ghcjs/ghc,mcschroeder/ghc,mcschroeder/ghc,elieux/ghc,oldmanmike/ghc,lukexi/ghc,shlevy/ghc,siddhanathan/ghc,tjakway/ghcjvm,fmthoma/ghc,holzensp/ghc,da-x/ghc,sdiehl/ghc,christiaanb/ghc,olsner/ghc,ezyang/ghc,mettekou/ghc,nushio3/ghc,wxwxwwxxx/ghc,sgillespie/ghc,nkaretnikov/ghc,christiaanb/ghc,christiaanb/ghc,urbanslug/ghc,acowley/ghc,mettekou/ghc,ezyang/ghc,frantisekfarka/ghc-dsi,forked-upstream-packages-for-ghcjs/ghc,vikraman/ghc,gridaphobe/ghc,lukexi/ghc-7.8-arm64,mcschroeder/ghc,TomMD/ghc,sdiehl/ghc,ghc-android/ghc,frantisekfarka/ghc-dsi,olsner/ghc,jstolarek/ghc,gcampax/ghc,TomMD/ghc,snoyberg/ghc,nkaretnikov/ghc,shlevy/ghc,sgillespie/ghc,lukexi/ghc-7.8-arm64,spacekitteh/smcghc,AlexanderPankiv/ghc,nushio3/ghc,holzensp/ghc,shlevy/ghc,vikraman/ghc,da-x/ghc,vTurbine/ghc,oldmanmike/ghc,AlexanderPankiv/ghc,sgillespie/ghc,hferreiro/replay,nathyong/microghc-ghc,ml9951/ghc,ml9951/ghc,GaloisInc/halvm-ghc,ml9951/ghc,oldmanmike/ghc,ghc-android/ghc,da-x/ghc,siddhanathan/ghc,fmthoma/ghc,siddhanathan/ghc,spacekitteh/smcghc,lukexi/ghc-7.8-arm64,christiaanb/ghc,spacekitteh/smcghc,nathyong/microghc-ghc,forked-upstream-packages-for-ghcjs/ghc,vTurbine/ghc,gcampax/ghc,nathyong/microghc-ghc,vikraman/ghc,ml9951/ghc,gcampax/ghc,holzensp/ghc,siddhanathan/ghc,wxwxwwxxx/ghc,da-x/ghc,ryantm/ghc,vTurbine/ghc,mfine/ghc,TomMD/ghc,acowley/ghc,vikraman/ghc,bitemyapp/ghc,TomMD/ghc,acowley/ghc,nushio3/ghc,sdiehl/ghc,green-haskell/ghc,gridaphobe/ghc,GaloisInc/halvm-ghc,ghc-android/ghc,lukexi/ghc-7.8-arm64,green-haskell/ghc,ghc-android/ghc,nushio3/ghc,shlevy/ghc,christiaanb/ghc,AlexanderPankiv/ghc,ryantm/ghc,ml9951/ghc,lukexi/ghc-7.8-arm64
6478bdce01f7e2363f78cb248f677c1db0bdc303
lib/TableGen/TGPreprocessor.h
lib/TableGen/TGPreprocessor.h
//===- TGPreprocessor.h - Preprocessor for TableGen Files -------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This class represents the Preprocessor for tablegen files. // //===----------------------------------------------------------------------===// #ifndef TGPREPROCESSOR_H #define TGPREPROCESSOR_H #include <vector> namespace llvm { class MemoryBuffer; class SourceMgr; class tool_output_file; class TGPPLexer; class TGPPRange; class TGPPRecord; typedef std::vector<TGPPRecord> TGPPRecords; class TGPreprocessor { SourceMgr &SrcMgr; tool_output_file &Out; TGPPLexer *Lexer; TGPPRecords *CurRecords; bool ParseBlock(bool TopLevel); bool ParseForLoop(); bool ParseRange(TGPPRange *Range); public: TGPreprocessor(SourceMgr &SM, tool_output_file &O) : SrcMgr(SM), Out(O), Lexer(NULL), CurRecords(NULL) { } /// PreprocessFile - Main entrypoint for preprocess a tblgen file. These /// preprocess routines return true on error, or false on success. bool PreprocessFile(); }; } // namespace llvm #endif /* TGPREPROCESSOR_H */
//===- TGPreprocessor.h - Preprocessor for TableGen Files -------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This class represents the Preprocessor for tablegen files. // //===----------------------------------------------------------------------===// #ifndef TGPREPROCESSOR_H #define TGPREPROCESSOR_H #include <vector> namespace llvm { class MemoryBuffer; class SourceMgr; class tool_output_file; class TGPPLexer; class TGPPRange; class TGPPRecord; typedef std::vector<TGPPRecord> TGPPRecords; class TGPreprocessor { SourceMgr &SrcMgr; tool_output_file &Out; TGPPLexer *Lexer; TGPPRecords *CurRecords; bool ParseBlock(bool TopLevel); bool ParseForLoop(); bool ParseRange(TGPPRange *Range); public: TGPreprocessor(SourceMgr &SM, tool_output_file &O) : SrcMgr(SM), Out(O), Lexer(0), CurRecords(0) { } /// PreprocessFile - Main entrypoint for preprocess a tblgen file. These /// preprocess routines return true on error, or false on success. bool PreprocessFile(); }; } // namespace llvm #endif /* TGPREPROCESSOR_H */
Fix compilation when using gcc-4.6. Patch by wanders.
Fix compilation when using gcc-4.6. Patch by wanders. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@141178 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap
768d6be6353fdc725edea610a89e360f52dead82
include/ft/sock/socket.h
include/ft/sock/socket.h
#ifndef FT_SOCK_SOCKET_H_ #define FT_SOCK_SOCKET_H_ struct ft_socket { struct ft_context * context; const char * socket_class; int ai_family; int ai_socktype; int ai_protocol; struct sockaddr_storage addr; socklen_t addrlen; // Custom data fields void * protocol; void * data; }; static inline bool ft_socket_init_( struct ft_socket * this, const char * socket_class, struct ft_context * context, int domain, int type, int protocol, const struct sockaddr * addr, socklen_t addrlen ) { assert(this != NULL); assert(context != NULL); this->context = context; this->socket_class = socket_class; this->ai_family = domain; this->ai_socktype = type; this->ai_protocol = protocol; if (addr != NULL) { memcpy(&this->addr, addr, addrlen); this->addrlen = addrlen; } else { assert(addrlen == 0); memset(&this->addr, 0, sizeof(this->addr)); } this->protocol = NULL; this->data = NULL; return true; } #endif //FT_SOCK_SOCKET_H_
#ifndef FT_SOCK_SOCKET_H_ #define FT_SOCK_SOCKET_H_ struct ft_socket { struct ft_context * context; const char * clazz; int ai_family; int ai_socktype; int ai_protocol; struct sockaddr_storage addr; socklen_t addrlen; // Custom data fields void * protocol; void * data; }; static inline bool ft_socket_init_( struct ft_socket * this, const char * clazz, struct ft_context * context, int domain, int type, int protocol, const struct sockaddr * addr, socklen_t addrlen ) { assert(this != NULL); assert(context != NULL); this->context = context; this->clazz = clazz; this->ai_family = domain; this->ai_socktype = type; this->ai_protocol = protocol; if (addr != NULL) { memcpy(&this->addr, addr, addrlen); this->addrlen = addrlen; } else { assert(addrlen == 0); memset(&this->addr, 0, sizeof(this->addr)); } this->protocol = NULL; this->data = NULL; return true; } #endif //FT_SOCK_SOCKET_H_
Unify name of the class.
Unify name of the class.
C
bsd-3-clause
TeskaLabs/Frame_Transporter,TeskaLabs/SeaCat-Common-Library,TeskaLabs/Frame_Transporter,TeskaLabs/Frame-Transporter,TeskaLabs/Frame-Transporter
f1648ed565efa9b59bf14081474b48aef1c0cea6
libgo/runtime/getncpu-linux.c
libgo/runtime/getncpu-linux.c
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include <features.h> #include <sched.h> // CPU_COUNT is only provided by glibc 2.6 or higher #if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 6) #define CPU_COUNT(set) _CPU_COUNT((unsigned int *)(set), sizeof(*(set))/sizeof(unsigned int)) static int _CPU_COUNT(unsigned int *set, size_t len) { int cnt; cnt = 0; while (len--) cnt += __builtin_popcount(*set++); return cnt; } #endif #include "runtime.h" #include "defs.h" int32 getproccount(void) { cpu_set_t set; int32 r, cnt; cnt = 0; r = sched_getaffinity(0, sizeof(set), &set); if(r == 0) cnt += CPU_COUNT(&set); return cnt ? cnt : 1; }
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include <features.h> #include <sched.h> // CPU_COUNT is only provided by glibc 2.6 or higher #ifndef CPU_COUNT #define CPU_COUNT(set) _CPU_COUNT((unsigned int *)(set), sizeof(*(set))/sizeof(unsigned int)) static int _CPU_COUNT(unsigned int *set, size_t len) { int cnt; cnt = 0; while (len--) cnt += __builtin_popcount(*set++); return cnt; } #endif #include "runtime.h" #include "defs.h" int32 getproccount(void) { cpu_set_t set; int32 r, cnt; cnt = 0; r = sched_getaffinity(0, sizeof(set), &set); if(r == 0) cnt += CPU_COUNT(&set); return cnt ? cnt : 1; }
Check for CPU_COUNT itself, don't check glibc version.
runtime: Check for CPU_COUNT itself, don't check glibc version. Fixes #38. R=iant CC=gofrontend-dev https://golang.org/cl/155740043
C
bsd-3-clause
qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,golang/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,anlhord/gofrontend,anlhord/gofrontend,anlhord/gofrontend,golang/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,golang/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,golang/gofrontend,qskycolor/gofrontend
3f995f317f7070e81e8e38bb11357d6671ab6969
include/linux/i2c-xiic.h
include/linux/i2c-xiic.h
/* * i2c-xiic.h * Copyright (c) 2009 Intel Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Supports: * Xilinx IIC */ #ifndef _LINUX_I2C_XIIC_H #define _LINUX_I2C_XIIC_H /** * struct xiic_i2c_platform_data - Platform data of the Xilinx I2C driver * @num_devices: Number of devices that shall be added when the driver * is probed. * @devices: The actuall devices to add. * * This purpose of this platform data struct is to be able to provide a number * of devices that should be added to the I2C bus. The reason is that sometimes * the I2C board info is not enough, a new PCI board can for instance be * plugged into a standard PC, and the bus number might be unknown at * early init time. */ struct xiic_i2c_platform_data { u8 num_devices; struct i2c_board_info const *devices; }; #endif /* _LINUX_I2C_XIIC_H */
Add the platform data include for the Xilinx XPS IIC Bus Interface
Add the platform data include for the Xilinx XPS IIC Bus Interface This file was missed in the original patch that went into Linus' tree. Cc: "Ben Dooks (embedded platforms)" <[email protected]> Cc: [email protected] Signed-off-by: Richard Röjfors <[email protected]> Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
C
mit
KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
b1fa4918bb74415352dc9ff60fd995c47b551c69
MS3/Sketches/CPU_Gridders/scatter_gridder.h
MS3/Sketches/CPU_Gridders/scatter_gridder.h
#if defined __AVX__ #include <immintrin.h> #endif #ifdef __CUDACC__ #include <cuComplex.h> typedef cuDoubleComplex complexd; #elif defined __cplusplus #include <complex> typedef std::complex<double> complexd; #else #include <complex.h> typedef double complex complexd; #endif struct Double4c { complexd XX; complexd XY; complexd YX; complexd YY; }; struct Double3 { double u; double v; double w; }; // We have original u,v,w, in meters. // To go to u,v,w in wavelengths we shall multiply them with freq/SPEED_OF_LIGHT #ifndef SPEED_OF_LIGHT #define SPEED_OF_LIGHT 299792458.0 #endif #ifndef WSTEP_CORRECT #define WSTEP_CORRECT 0.00001 #endif struct TaskCfg { double min_wave_length , max_inverse_wave_length , cellsize , cellsizeWL , scale , scaleWL , w_step , w_stepWL , w_shift , w_shiftWL ; };
#ifndef __SCATTER_GRIDDER_H #define __SCATTER_GRIDDER_H #if defined __AVX__ #include <immintrin.h> #endif #ifdef __CUDACC__ #include <cuComplex.h> typedef cuDoubleComplex complexd; #elif defined __cplusplus #include <complex> typedef std::complex<double> complexd; #else #include <complex.h> typedef double complex complexd; #endif struct Double4c { complexd XX; complexd XY; complexd YX; complexd YY; }; struct Double3 { double u; double v; double w; }; // We have original u,v,w, in meters. // To go to u,v,w in wavelengths we shall multiply them with freq/SPEED_OF_LIGHT #ifndef SPEED_OF_LIGHT #define SPEED_OF_LIGHT 299792458.0 #endif #ifndef WSTEP_CORRECT #define WSTEP_CORRECT 0.00001 #endif struct TaskCfg { double min_wave_length , max_inverse_wave_length , cellsize , cellsizeWL , scale , scaleWL , w_step , w_stepWL , w_shift , w_shiftWL ; }; #ifdef __CUDACC__ __device__ __inline__ static #else __inline static #endif int get_supp(int w) { if (w < 0) w = -w; return w * 8 + 1; } #endif
Add simplest as possible support size func.
Add simplest as possible support size func.
C
apache-2.0
SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC
a236747cee13f512f5f1708b41306533b67ebddb
PSET2/caesar.c
PSET2/caesar.c
#include <stdio.h> #include <cs50.h> int main(void) { return 0; }
#include <stdio.h> #include <cs50.h> int main(int argc, char *argv[]) { // check entered key if (argc != 2 || atoi(argv[1]) < 0) { printf("Usage: ./caesar k\nWhere k is a non negative integer.\n"); return 1; } int key = atoi(argv[1]); return 0; }
Add key check and convert key to int
Add key check and convert key to int
C
unlicense
Implaier/CS50,Implaier/CS50,Implaier/CS50,Implaier/CS50
48fa78cf488b227b33355362ee1d7110936a6671
compiler/modules/CommonMark/src/config.h
compiler/modules/CommonMark/src/config.h
#include "charmony.h" #ifdef CHY_HAS_STDBOOL_H # include <stdbool.h> #elif !defined(__cplusplus) typedef char bool; # define true 1 # define false 0 #endif #define CMARK_ATTRIBUTE(list) #ifndef CHY_HAS_VA_COPY #define va_copy(dest, src) ((dest) = (src)) #endif
#include "charmony.h" #ifdef CHY_HAS_STDBOOL_H # include <stdbool.h> #elif !defined(__cplusplus) typedef char bool; # define true 1 # define false 0 #endif #define CMARK_ATTRIBUTE(list) #ifndef CHY_HAS_VA_COPY #define va_copy(dest, src) ((dest) = (src)) #endif #define inline CHY_INLINE
Use CHY_INLINE in CommonMark source
Use CHY_INLINE in CommonMark source
C
apache-2.0
rectang/lucy-clownfish,nwellnhof/lucy-clownfish,rectang/lucy-clownfish,rectang/lucy-clownfish,apache/lucy-clownfish,apache/lucy-clownfish,apache/lucy-clownfish,rectang/lucy-clownfish,rectang/lucy-clownfish,nwellnhof/lucy-clownfish,apache/lucy-clownfish,nwellnhof/lucy-clownfish,nwellnhof/lucy-clownfish,rectang/lucy-clownfish,rectang/lucy-clownfish,nwellnhof/lucy-clownfish,apache/lucy-clownfish,rectang/lucy-clownfish,apache/lucy-clownfish,apache/lucy-clownfish,nwellnhof/lucy-clownfish,nwellnhof/lucy-clownfish,rectang/lucy-clownfish,apache/lucy-clownfish,nwellnhof/lucy-clownfish
cd17e3146d7c64acb8c2fe8cb0b028244d24d656
include/sauce/sauce.h
include/sauce/sauce.h
#ifndef SAUCE_SAUCE_H_ #define SAUCE_SAUCE_H_ #include <sauce/internal/bindings.h> #include <sauce/internal/new_delete.h> namespace sauce { template<typename Module, typename NewDelete = ::sauce::internal::NewDelete> struct Injector { friend class SauceTest; Injector(): newDelete() {} template<typename Iface> Iface provide() { return provide<Iface>(Module::template bindings<Injector<Module> >); } template<typename Iface> void dispose(Iface iface) { dispose<Iface>(Module::template bindings<Injector<Module> >, iface); } private: const NewDelete newDelete; template<typename Iface, typename Binding> Iface provide(Binding *binding (Iface)) { return Binding::provide(*this); } template<typename Iface, typename Binding> void dispose(Binding *binding (Iface), Iface iface) { Binding::dispose(*this, iface); } }; } // namespace sauce #endif
#ifndef SAUCE_SAUCE_H_ #define SAUCE_SAUCE_H_ #include <sauce/internal/bindings.h> #include <sauce/internal/new_delete.h> namespace sauce { template<typename Module, typename NewDelete = ::sauce::internal::NewDelete> struct Injector { friend class SauceTest; Injector(): new_delete() {} template<typename Iface> Iface provide() { return provide<Iface>(Module::template bindings<Injector<Module> >); } template<typename Iface> void dispose(Iface iface) { dispose<Iface>(Module::template bindings<Injector<Module> >, iface); } private: const NewDelete new_delete; template<typename Iface, typename Binding> Iface provide(Binding *binding (Iface)) { return Binding::provide(*this); } template<typename Iface, typename Binding> void dispose(Binding *binding (Iface), Iface iface) { Binding::dispose(*this, iface); } }; } // namespace sauce #endif
Rename member newDelete -> new_delete.
Rename member newDelete -> new_delete.
C
mit
phs/sauce,phs/sauce,phs/sauce,phs/sauce
5619bd4fa06e68e1491986b4f57dea11b5a85bac
c/boards/arduino_uno/riot_arduino_uno.h
c/boards/arduino_uno/riot_arduino_uno.h
/** Arduino/Genuino UNO PIN Configuration D0-D13 - 14 digital IN/OUT pins A0-A5 - 6 analog IN, digital OUT pins LED - D13 is also the on board LED */ /** The outputs to the board. The outputs are written internally. */ #include "stream_of_byte.h" struct riot_arduino_uno_sinks_t { stream_of_byte *D0; stream_of_byte *D1; stream_of_byte *D2; stream_of_byte *D3; stream_of_byte *D4; stream_of_byte *D5; stream_of_byte *D6; stream_of_byte *D7; stream_of_byte *D8; stream_of_byte *D9; stream_of_byte *D10; stream_of_byte *D11; stream_of_byte *D12; stream_of_byte *D13; stream_of_byte *A0; stream_of_byte *A1; stream_of_byte *A2; stream_of_byte *A3; stream_of_byte *A4; stream_of_byte *A5; stream_of_byte *LED; }; typedef struct riot_arduino_uno_sinks_t riot_arduino_uno_sinks;
Add arduino uno board configuration
Add arduino uno board configuration
C
mit
artfuldev/RIoT
2ace1bcd24aef90cc74a2d009eabc2afc6ff191f
test/number.c
test/number.c
// Copyright 2012 Rui Ueyama <[email protected]> // This program is free software licensed under the MIT license. #include "test.h" void testmain(void) { print("numeric constants"); expect(1, 0x1); expect(17, 0x11); expect(511, 0777); expect(11, 0b1011); // GNU extension expect(11, 0B1011); // GNU extension expect(3, 3L); expect(3, 3LL); expect(3, 3UL); expect(3, 3LU); expect(3, 3ULL); expect(3, 3LU); expect(3, 3LLU); expectd(55.3, 55.3); expectd(200, 2e2); expectd(0x0.DE488631p8, 0xDE.488631); expect(4, sizeof(5)); expect(8, sizeof(5L)); expect(4, sizeof(3.0f)); expect(8, sizeof(3.0)); expect(4, sizeof(0xe0)); }
// Copyright 2012 Rui Ueyama <[email protected]> // This program is free software licensed under the MIT license. #include "test.h" void testmain(void) { print("numeric constants"); expect(1, 0x1); expect(1, 0X1); expect(17, 0x11); expect(17, 0X11); expect(511, 0777); expect(11, 0b1011); // GNU extension expect(11, 0B1011); // GNU extension expect(3, 3L); expect(3, 3LL); expect(3, 3UL); expect(3, 3LU); expect(3, 3ULL); expect(3, 3LU); expect(3, 3LLU); expectd(55.3, 55.3); expectd(200, 2e2); expectd(0x0.DE488631p8, 0xDE.488631); expect(4, sizeof(5)); expect(8, sizeof(5L)); expect(4, sizeof(3.0f)); expect(8, sizeof(3.0)); expect(4, sizeof(0xe0)); }
Add tests for 0X prefix.
Add tests for 0X prefix.
C
mit
jtramm/8cc,cpjreynolds/8cc,jtramm/8cc,8l/8cc,rui314/8cc,andrewchambers/8cc,rui314/8cc,nobody1986/8cc,jtramm/8cc,andrewchambers/8cc,vastin/8cc,gergo-/8cc,cpjreynolds/8cc,cpjreynolds/8cc,nobody1986/8cc,abc00/8cc,nobody1986/8cc,vastin/8cc,rui314/8cc,8l/8cc,vastin/8cc,abc00/8cc,andrewchambers/8cc,8l/8cc,gergo-/8cc,abc00/8cc,rui314/8cc,abc00/8cc,andrewchambers/8cc,nobody1986/8cc,8l/8cc,cpjreynolds/8cc,jtramm/8cc,vastin/8cc,gergo-/8cc
8fe518a50830119365916f194dae8d458064ff70
ext/cowboy/cowboy.c
ext/cowboy/cowboy.c
#include "cowboy.h" VALUE mCowboy; VALUE fft_1d(VALUE m, VALUE nums){ fftw_complex *in, *out; fftw_plan fp; long n; Check_Type(nums, T_ARRAY); n = size_of_ary(nums); in = allocate_fftw_complex(n); out = allocate_fftw_complex(n); fp = fftw_plan_dft_1d(n, in, out, FFTW_FORWARD, FFTW_ESTIMATE); cast_nums_to_complex(in, nums); fftw_execute(fp); return complex_to_real_nums(out, n); } void Init_cowboy(){ mCowboy = rb_define_module("Cowboy"); Init_cowboy_complex(); rb_define_module_function(mCowboy, "fft_1d", fft_1d, 1); }
#include "cowboy.h" VALUE mCowboy; VALUE fft_1d(VALUE m, VALUE nums){ fftw_complex *in, *out; fftw_plan fp; long n; Check_Type(nums, T_ARRAY); n = size_of_ary(nums); if (n == 0){ rb_raise(rb_eException, "Can't use blank array"); } in = allocate_fftw_complex(n); out = allocate_fftw_complex(n); fp = fftw_plan_dft_1d(n, in, out, FFTW_FORWARD, FFTW_ESTIMATE); cast_nums_to_complex(in, nums); fftw_execute(fp); free(in); return complex_to_real_nums(out, n); } void Init_cowboy(){ mCowboy = rb_define_module("Cowboy"); Init_cowboy_complex(); rb_define_module_function(mCowboy, "fft_1d", fft_1d, 1); }
Handle call with empty array gracefully. (Compare to segfault earlier).
Handle call with empty array gracefully. (Compare to segfault earlier).
C
mit
ciniglio/cowboy,ciniglio/cowboy
e79f9d35c3fb014b4506d6b794abaac3fcd88182
wasm/Config.h
wasm/Config.h
//===- Config.h -------------------------------------------------*- C++ -*-===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLD_WASM_CONFIG_H #define LLD_WASM_CONFIG_H #include "llvm/ADT/StringRef.h" #include "llvm/BinaryFormat/Wasm.h" #include "Symbols.h" using llvm::wasm::WasmGlobal; #include <set> namespace lld { namespace wasm { struct Configuration { bool AllowUndefined; bool Demangle; bool EmitRelocs; bool ImportMemory; bool Relocatable; bool StripAll; bool StripDebug; uint32_t GlobalBase; uint32_t InitialMemory; uint32_t MaxMemory; uint32_t ZStackSize; llvm::StringRef Entry; llvm::StringRef OutputFile; llvm::StringRef Sysroot; std::set<llvm::StringRef> AllowUndefinedSymbols; std::vector<llvm::StringRef> SearchPaths; std::vector<std::pair<Symbol *, WasmGlobal>> SyntheticGlobals; }; // The only instance of Configuration struct. extern Configuration *Config; } // namespace wasm } // namespace lld #endif
//===- Config.h -------------------------------------------------*- C++ -*-===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLD_WASM_CONFIG_H #define LLD_WASM_CONFIG_H #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSet.h" #include "llvm/BinaryFormat/Wasm.h" #include "Symbols.h" using llvm::wasm::WasmGlobal; namespace lld { namespace wasm { struct Configuration { bool AllowUndefined; bool Demangle; bool EmitRelocs; bool ImportMemory; bool Relocatable; bool StripAll; bool StripDebug; uint32_t GlobalBase; uint32_t InitialMemory; uint32_t MaxMemory; uint32_t ZStackSize; llvm::StringRef Entry; llvm::StringRef OutputFile; llvm::StringRef Sysroot; llvm::StringSet<> AllowUndefinedSymbols; std::vector<llvm::StringRef> SearchPaths; std::vector<std::pair<Symbol *, WasmGlobal>> SyntheticGlobals; }; // The only instance of Configuration struct. extern Configuration *Config; } // namespace wasm } // namespace lld #endif
Use llvm::StringSet instead of std::set.
Use llvm::StringSet instead of std::set. std::set is pretty slow. We generally prefer llvm::StringSet if we don't need an sorted set. Differential Revision: https://reviews.llvm.org/D40579 git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@319371 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/lld,llvm-mirror/lld
9287eb6b842055a59b3b4bb21d8423dff057486d
generator.h
generator.h
// // generator.h // SequentialSA // // Created by Vincent Ramdhanie on 3/15/15. // Copyright (c) 2015 Vincent Ramdhanie. All rights reserved. // #ifndef __SequentialSA__generator__ #define __SequentialSA__generator__ #include <time.h> #include <stdlib.h> #include <stdio.h> #endif /* defined(__SequentialSA__generator__) */ #define PLOT_N 5 /*The size of the plot array*/ #define PLOT_M 5 #define TEMPERATURE 1000 /*Initial temperature*/ #define NUMBER_ITERATIONS 1000 /*Total number of iterations to execute*/ /* Performs the generation on the data and stores it in a file */ void generate(int a[][PLOT_M]); void print(int a[][PLOT_M]);
// // generator.h // SequentialSA // // Created by Vincent Ramdhanie on 3/15/15. // Copyright (c) 2015 Vincent Ramdhanie. All rights reserved. // #ifndef __SequentialSA__generator__ #define __SequentialSA__generator__ #include <time.h> #include <stdlib.h> #include <stdio.h> #endif /* defined(__SequentialSA__generator__) */ #define PLOT_N 5 /*The size of the plot array*/ #define PLOT_M 5 #define TEMPERATURE 1000 /*Initial temperature*/ #define NUMBER_ITERATIONS 1000 /*Total number of iterations to execute*/ /* Performs the generation on the data and stores it in a file */ void generate(int a[PLOT_N][PLOT_M]); void print(int a[PLOT_N][PLOT_M]);
Create header file with constants and function definitions
Create header file with constants and function definitions
C
mit
vramdhanie/sequentialsa,vramdhanie/sequentialsa
ed8efcea8af00e372992991903b316535ac9f095
TDTChocolate/TestingAdditions/TDTRandomFixtures.h
TDTChocolate/TestingAdditions/TDTRandomFixtures.h
#import <Foundation/Foundation.h> /** Category methods on commonly used types for generating random instances. Inspired by Haskell's QuickCheck. */ @interface NSString (TDTRandomFixtures) + (instancetype)randomString; @end @interface NSNumber (TDTRandomFixtures) + (instancetype)randomNumber; @end @interface NSArray (TDTRandomFixtures) + (instancetype)randomArrayOfLength:(NSUInteger)length; @end @interface NSURL (TDTRandomFixtures) + (instancetype)randomURL; @end
#import <Foundation/Foundation.h> /** Category methods on commonly used types for generating random instances. Inspired by Haskell's QuickCheck. */ @interface NSString (TDTRandomFixtures) /** @return A string consisting of random characters. It is guranteed to be non empty. */ + (instancetype)randomString; @end @interface NSNumber (TDTRandomFixtures) + (instancetype)randomNumber; @end @interface NSArray (TDTRandomFixtures) + (instancetype)randomArrayOfLength:(NSUInteger)length; @end @interface NSURL (TDTRandomFixtures) + (instancetype)randomURL; @end
Document that `randomString` will never return an empty string
Document that `randomString` will never return an empty string
C
bsd-3-clause
talk-to/Chocolate,talk-to/Chocolate
4593c769f1e6bf7b3a243bb1f74e00332bbdf6fc
ext/wikitext.h
ext/wikitext.h
// Copyright 2008 Wincent Colaiuta // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. #include <ruby/ruby.h> #include <stdint.h> // Wikitext extern VALUE mWikitext; // Wikitext::Parser extern VALUE cWikitextParser; // Wikitext::Parser::Error // error raised when scanning fails extern VALUE eWikitextParserError; // Wikitext::Parser::Token extern VALUE cWikitextParserToken;
// Copyright 2008 Wincent Colaiuta // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. #include <ruby/ruby.h> #include <stdint.h> #define ruby_inspect(obj) rb_funcall(rb_mKernel, rb_intern("p"), 1, obj) // Wikitext extern VALUE mWikitext; // Wikitext::Parser extern VALUE cWikitextParser; // Wikitext::Parser::Error // error raised when scanning fails extern VALUE eWikitextParserError; // Wikitext::Parser::Token extern VALUE cWikitextParserToken;
Add ruby_inspect macro for use when debugging
Add ruby_inspect macro for use when debugging Just calls Kernel#p passing in the specified Ruby object. Signed-off-by: Wincent Colaiuta <[email protected]>
C
bsd-2-clause
barnaclebarnes/wikitext,barnaclebarnes/wikitext,barnaclebarnes/wikitext,wincent/wikitext,wincent/wikitext,geni/wikitext,geni/wikitext,geni/wikitext
c7cbb920c0e1bd747de7728454d96ba83586b502
php_amf.h
php_amf.h
#ifndef PHP_AMF_H #define PHP_AMF_H 1 #define PHP_AMF_VERSION "0.1" #define PHP_AMF_WORLD_EXTNAME "amf" PHP_FUNCTION(amf_encode); PHP_FUNCTION(amf_decode); extern zend_module_entry amf_module_entry; #define phpext_amf_ptr &amf_module_entry #endif
/** * PHP7 extension for Action Message Format (AMF) encoding and decoding with support for AMF0 and AMF3 * * amfext (http://emilmalinov.com/amfext) * * @copyright Copyright (c) 2015 Emil Malinov * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 * @link http://github.com/emilkm/amfext * @package amfext * * @author Emanuele Ruffaldi [email protected] - original version for PHP 5.2 * @author Emil Malinov - PHP 7.X, PHP 5.X maintenance, unit tests, enhancements, bug fixes */ #ifndef PHP_AMF_H #define PHP_AMF_H 1 #define PHP_AMF_VERSION "0.1" #define PHP_AMF_WORLD_EXTNAME "amf" PHP_FUNCTION(amf_encode); PHP_FUNCTION(amf_decode); extern zend_module_entry amf_module_entry; #define phpext_amf_ptr &amf_module_entry #endif
Add license comment to the header file.
Add license comment to the header file.
C
apache-2.0
emilkm/amfext,emilkm/amfext,emilkm/amfext,emilkm/amfext
d952bf54fe5be958b735a3285a3f153b362aace1
EVGEN/EVGENLinkDef.h
EVGEN/EVGENLinkDef.h
#ifdef __CINT__ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ enum Process_t; #pragma link C++ enum Decay_t; #pragma link C++ enum StrucFunc_t; #pragma link C++ enum Param_t; #pragma link C++ class AliGenHIJINGpara; #pragma link C++ class AliGenFixed; #pragma link C++ class AliGenBox; #pragma link C++ class AliGenParam; #pragma link C++ class AliGenPythia; #pragma link C++ class AliGenCocktail-; #pragma link C++ class AliGenCocktailEntry; #pragma link C++ class AliGenExtFile; #pragma link C++ class AliGenScan; #pragma link C++ class AliPythia; #pragma link C++ class AliGenMUONlib; #pragma link C++ class AliGenFLUKAsource; #pragma link C++ class AliGenHalo; #pragma link C++ class AliDimuCombinator; #endif
#ifdef __CINT__ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ enum Process_t; #pragma link C++ enum Decay_t; #pragma link C++ enum StrucFunc_t; #pragma link C++ enum Param_t; #pragma link C++ enum Weighting_t; #pragma link C++ class AliGenHIJINGpara; #pragma link C++ class AliGenFixed; #pragma link C++ class AliGenBox; #pragma link C++ class AliGenParam; #pragma link C++ class AliGenPythia; #pragma link C++ class AliGenCocktail-; #pragma link C++ class AliGenCocktailEntry; #pragma link C++ class AliGenExtFile; #pragma link C++ class AliGenScan; #pragma link C++ class AliPythia; #pragma link C++ class AliGenMUONlib; #pragma link C++ class AliGenFLUKAsource; #pragma link C++ class AliGenHalo; #pragma link C++ class AliDimuCombinator; #endif
Add Weighting_t in the LinkDef
Add Weighting_t in the LinkDef
C
bsd-3-clause
shahor02/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,shahor02/AliRoot,ecalvovi/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,alisw/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,miranov25/AliRoot,coppedis/AliRoot,jgrosseo/AliRoot,sebaleh/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,shahor02/AliRoot,shahor02/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,alisw/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,ecalvovi/AliRoot,miranov25/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,ALICEHLT/AliRoot,alisw/AliRoot,coppedis/AliRoot,alisw/AliRoot,alisw/AliRoot,coppedis/AliRoot,coppedis/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,ecalvovi/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot,sebaleh/AliRoot
f18cd042b17d28811ae308c0c7b9e4b20d2068e9
Expecta/EXPDefines.h
Expecta/EXPDefines.h
// // EXPDefines.h // Expecta // // Created by Luke Redpath on 26/03/2012. // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. // #ifndef Expecta_EXPDefines_h #define Expecta_EXPDefines_h typedef void (^EXPBasicBlock)(); typedef id (^EXPIdBlock)(); typedef BOOL (^EXPBoolBlock)(); typedef NSString *(^EXPStringBlock)(); #endif
// // EXPDefines.h // Expecta // // Created by Luke Redpath on 26/03/2012. // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. // #ifndef Expecta_EXPDefines_h #define Expecta_EXPDefines_h typedef void (^EXPBasicBlock)(void); typedef id (^EXPIdBlock)(void); typedef BOOL (^EXPBoolBlock)(void); typedef NSString *(^EXPStringBlock)(void); #endif
Fix warning ‘This function declaration is not a prototype’
Fix warning ‘This function declaration is not a prototype’
C
mit
specta/expecta
6c4824bd141e06780af1ea4700046689af4edfb2
src/hotplug_generic.c
src/hotplug_generic.c
/* * MUSCLE SmartCard Development ( http://www.linuxnet.com ) * * Copyright (C) 2000-2003 * David Corcoran <[email protected]> * * $Id$ */ /** * @file * @brief This provides a search API for hot pluggble devices. * * Check for platforms that have their own specific support. * It's easier and flexible to do it here, rather than * with automake conditionals in src/Makefile.am. * No, it's still not a perfect solution design wise. */ #include "config.h" #include "pcsclite.h" #if !defined(__APPLE__) && !defined(HAVE_LIBUSB) && !defined(__linux__) LONG HPSearchHotPluggables(void) { return 0; } ULONG HPRegisterForHotplugEvents(void) { return 0; } LONG HPStopHotPluggables(void) { return 0; } #endif
/* * MUSCLE SmartCard Development ( http://www.linuxnet.com ) * * Copyright (C) 2000-2003 * David Corcoran <[email protected]> * * $Id$ */ /** * @file * @brief This provides a search API for hot pluggble devices. * * Check for platforms that have their own specific support. * It's easier and flexible to do it here, rather than * with automake conditionals in src/Makefile.am. * No, it's still not a perfect solution design wise. */ #include "config.h" #include "pcsclite.h" #ifndef TRUE #define TRUE 1 #define FALSE 0 #endif #if !defined(__APPLE__) && !defined(HAVE_LIBUSB) && !defined(__linux__) char ReCheckSerialReaders = FALSE; LONG HPSearchHotPluggables(void) { return 0; } ULONG HPRegisterForHotplugEvents(void) { return 0; } LONG HPStopHotPluggables(void) { return 0; } void HPReCheckSerialReaders(void) { ReCheckSerialReaders = TRUE; } #endif
Add missing ReCheckSerialReaders and HPReCheckSerialReaders() so pcsc-lite can compile on FreeBSD and others
Add missing ReCheckSerialReaders and HPReCheckSerialReaders() so pcsc-lite can compile on FreeBSD and others git-svn-id: f2d781e409b7e36a714fc884bb9b2fc5091ddd28@1786 0ce88b0d-b2fd-0310-8134-9614164e65ea
C
bsd-3-clause
vicamo/pcsc-lite-android,vicamo/pcsc-lite-android,vicamo/pcsc-lite-android,vicamo/pcsc-lite-android,vicamo/pcsc-lite-android
edb65bb8be45202ec4b1b0dbaeb4cbe0b50e1553
src/modules/comm.c
src/modules/comm.c
#include "comm.h" static void inbox_received_handler(DictionaryIterator *iter, void *context) { #if defined(PBL_COLOR) Tuple *background_t = dict_find(iter, AppKeyColorBackground); if(background_t) { data_set_color(ColorBackground, (GColor){ .argb = background_t->value->int32 }); } Tuple *sides_t = dict_find(iter, AppKeyColorSides); if(sides_t) { data_set_color(ColorSides, (GColor){ .argb = sides_t->value->int32 }); } Tuple *face_t = dict_find(iter, AppKeyColorFace); if(face_t) { data_set_color(ColorFace, (GColor){ .argb = face_t->value->int32 }); } #endif // Other settings Tuple *anim_t = dict_find(iter, AppKeyAnimations); if(anim_t) { data_set_animations(anim_t->value->int32 == 1); } Tuple *bluetooth_t = dict_find(iter, AppKeyBluetooth); if(bluetooth_t) { data_set_bluetooth_alert(bluetooth_t->value->int32 == 1); } // Quit to be reloaded window_stack_pop_all(true); } void comm_init(int inbox, int outbox) { app_message_register_inbox_received(inbox_received_handler); app_message_open(inbox, outbox); }
#include "comm.h" static void inbox_received_handler(DictionaryIterator *iter, void *context) { #if defined(PBL_COLOR) Tuple *background_t = dict_find(iter, AppKeyColorBackground); if(background_t) { data_set_color(ColorBackground, (GColor){ .argb = background_t->value->int8 }); } Tuple *sides_t = dict_find(iter, AppKeyColorSides); if(sides_t) { data_set_color(ColorSides, (GColor){ .argb = sides_t->value->int8 }); } Tuple *face_t = dict_find(iter, AppKeyColorFace); if(face_t) { data_set_color(ColorFace, (GColor){ .argb = face_t->value->int8 }); } #endif // Other settings Tuple *anim_t = dict_find(iter, AppKeyAnimations); if(anim_t) { data_set_animations(anim_t->value->int8 == 1); } Tuple *bluetooth_t = dict_find(iter, AppKeyBluetooth); if(bluetooth_t) { data_set_bluetooth_alert(bluetooth_t->value->int8 == 1); } // Quit to be reloaded window_stack_pop_all(true); } void comm_init(int inbox, int outbox) { app_message_register_inbox_received(inbox_received_handler); app_message_open(inbox, outbox); }
Use more reliable union value
Use more reliable union value
C
mit
C-D-Lewis/isotime-appstore,C-D-Lewis/isotime-appstore,C-D-Lewis/isotime-appstore,C-D-Lewis/isotime-appstore
ae9ca499447425d2c98e0d1189b3be7bccbfe441
src/search/state.h
src/search/state.h
/* -*- mode:linux -*- */ /** * \file state.h * * * * \author Ethan Burns * \date 2008-10-08 */ #if !defined(_STATE_H_) #define _STATE_H_ #include <iostream> #include <vector> #include "search_domain.h" using namespace std; class State { public: State(const SearchDomain *d, const State *parent, int g); virtual int hash(void) const = 0; virtual bool is_goal(void) const = 0; virtual State *clone(void) const = 0; virtual void print(ostream &o) const = 0; virtual vector<const State*> *expand(void) const; virtual int get_g(void) const; virtual int get_h(void) const; virtual void set_parent(const State *); virtual const State *get_parent(void) const; protected: const State *parent; const SearchDomain *domain; int g; int h; }; #endif /* !_STATE_H_ */
/* -*- mode:linux -*- */ /** * \file state.h * * * * \author Ethan Burns * \date 2008-10-08 */ #if !defined(_STATE_H_) #define _STATE_H_ #include <iostream> #include <vector> #include "search_domain.h" using namespace std; class State { public: State(const SearchDomain *d, const State *parent, int g); virtual int hash(void) const = 0; virtual bool is_goal(void) const = 0; virtual State *clone(void) const = 0; virtual void print(ostream &o) const = 0; virtual vector<const State*> *expand(void) const; virtual int get_g(void) const; virtual int get_h(void) const; virtual void set_parent(const State *); virtual const State *get_parent(void) const; protected: const State *parent; const SearchDomain *domain; float g; float h; }; #endif /* !_STATE_H_ */
Use floats for cost and heuristic values.
Use floats for cost and heuristic values.
C
mit
eaburns/pbnf,eaburns/pbnf,eaburns/pbnf,eaburns/pbnf
eff9073790e1286aa12bf1c65814d3e0132b12e1
arch/x86/include/asm/numa_32.h
arch/x86/include/asm/numa_32.h
#ifndef _ASM_X86_NUMA_32_H #define _ASM_X86_NUMA_32_H extern int numa_off; extern int pxm_to_nid(int pxm); #ifdef CONFIG_NUMA extern int __cpuinit numa_cpu_node(int apicid); #else /* CONFIG_NUMA */ static inline int numa_cpu_node(int cpu) { return NUMA_NO_NODE; } #endif /* CONFIG_NUMA */ #ifdef CONFIG_HIGHMEM extern void set_highmem_pages_init(void); #else static inline void set_highmem_pages_init(void) { } #endif #endif /* _ASM_X86_NUMA_32_H */
#ifndef _ASM_X86_NUMA_32_H #define _ASM_X86_NUMA_32_H extern int numa_off; extern int pxm_to_nid(int pxm); #ifdef CONFIG_NUMA extern int __cpuinit numa_cpu_node(int cpu); #else /* CONFIG_NUMA */ static inline int numa_cpu_node(int cpu) { return NUMA_NO_NODE; } #endif /* CONFIG_NUMA */ #ifdef CONFIG_HIGHMEM extern void set_highmem_pages_init(void); #else static inline void set_highmem_pages_init(void) { } #endif #endif /* _ASM_X86_NUMA_32_H */
Rename incorrectly named parameter of numa_cpu_node()
x86: Rename incorrectly named parameter of numa_cpu_node() numa_cpu_node() prototype in numa_32.h has wrongly named parameter @apicid when it actually takes the CPU number. Change it to @cpu. Reported-by: Yinghai Lu <[email protected]> Signed-off-by: Tejun Heo <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
C
mit
KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas
b3a9eabe635e4440a85803b4a861853b7f04aacf
src/fclaw2d_forestclaw.c
src/fclaw2d_forestclaw.c
/* Copyright (c) 2012 Carsten Burstedde, Donna Calhoun All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <fclaw2d_forestclaw.h> void fclaw2d_after_regrid(fclaw2d_domain_t *domain) { if (fclaw2d_vt()->after_regrid != NULL) { fclaw2d_vt()->after_regrid(domain); } } void fclaw2d_problem_setup(fclaw2d_domain_t *domain) { /* User defined problem setup */ if (fclaw2d_vt()->problem_setup != NULL) { fclaw2d_vt()->problem_setup(domain); } }
Add function wrappers for forestclaw.c
Add function wrappers for forestclaw.c
C
bsd-2-clause
ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw
23a5b06f405219d8ea93d4d8d2ca0666d4b1105a
test/Driver/show-option-names.c
test/Driver/show-option-names.c
// RUN: %clang -c -isysroot /FOO %s 2>&1 | FileCheck --check-prefix=CHECK-SHOW-OPTION-NAMES %s // CHECK-SHOW-OPTION-NAMES: warning: no such sysroot directory: '{{([A-Za-z]:.*)?}}/FOO' [-Wmissing-sysroot] // RUN: %clang -c -fno-diagnostics-show-option -isysroot /FOO %s 2>&1 | FileCheck --check-prefix=CHECK-NO-SHOW-OPTION-NAMES %s // CHECK-NO-SHOW-OPTION-NAMES: warning: no such sysroot directory: '{{([A-Za-z]:.*)?}}/FOO'{{$}}
// REQUIRES: x86-registered-target // RUN: %clang -target x86_64-apple-darwin -c -isysroot /FOO %s 2>&1 | FileCheck --check-prefix=CHECK-SHOW-OPTION-NAMES %s // CHECK-SHOW-OPTION-NAMES: warning: no such sysroot directory: '{{([A-Za-z]:.*)?}}/FOO' [-Wmissing-sysroot] // RUN: %clang -target x86_64-apple-darwin -c -fno-diagnostics-show-option -isysroot /FOO %s 2>&1 | FileCheck --check-prefix=CHECK-NO-SHOW-OPTION-NAMES %s // CHECK-NO-SHOW-OPTION-NAMES: warning: no such sysroot directory: '{{([A-Za-z]:.*)?}}/FOO'{{$}}
Fix test from r283913 to unbreak bots
[Driver] Fix test from r283913 to unbreak bots Followup from r283913 & r283827 http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/55135 git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@283915 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/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
95c629782a429452c0cef4151a499ea1ce8786ca
core/pubnub_version_internal.h
core/pubnub_version_internal.h
/* -*- c-file-style:"stroustrup"; indent-tabs-mode: nil -*- */ #if !defined INC_PUBNUB_VERSION_INTERNAL #define INC_PUBNUB_VERSION_INTERNAL #define PUBNUB_SDK_VERSION "2.2.11" #endif /* !defined INC_PUBNUB_VERSION_INTERNAL */
Add internal/common version (number) header file.
Add internal/common version (number) header file.
C
mit
pubnub/c-core,pubnub/c-core,pubnub/c-core,pubnub/c-core
be6318b2f02e14a1b717d30691351e8415e246c1
test/Driver/tsan.c
test/Driver/tsan.c
// RUN: %clang -target i386-unknown-unknown -fthread-sanitizer %s -S -emit-llvm -o - | FileCheck %s // RUN: %clang -O1 -target i386-unknown-unknown -fthread-sanitizer %s -S -emit-llvm -o - | FileCheck %s // RUN: %clang -O2 -target i386-unknown-unknown -fthread-sanitizer %s -S -emit-llvm -o - | FileCheck %s // RUN: %clang -O3 -target i386-unknown-unknown -fthread-sanitizer %s -S -emit-llvm -o - | FileCheck %s // RUN: %clang -target i386-unknown-unknown -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s // Verify that -fthread-sanitizer invokes tsan instrumentation. int foo(int *a) { return *a; } // CHECK: __tsan_init
// RUN: %clang -target i386-unknown-unknown -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s // RUN: %clang -O1 -target i386-unknown-unknown -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s // RUN: %clang -O2 -target i386-unknown-unknown -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s // RUN: %clang -O3 -target i386-unknown-unknown -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s // RUN: %clang -target i386-unknown-unknown -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s // Verify that -fsanitize=thread invokes tsan instrumentation. int foo(int *a) { return *a; } // CHECK: __tsan_init
Use the -fsanitize=thread flag to unbreak buildbot.
Use the -fsanitize=thread flag to unbreak buildbot. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@167472 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
8166b9fe84e0dc3c8877366b58a9286b0258172f
src/modules/illume-keyboard/e_mod_main.c
src/modules/illume-keyboard/e_mod_main.c
#include "e.h" #include "e_mod_main.h" #include "e_mod_config.h" #include "e_kbd_int.h" /* local variables */ static E_Kbd_Int *ki = NULL; EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Illume Keyboard" }; EAPI void * e_modapi_init(E_Module *m) { if (!il_kbd_config_init(m)) return NULL; ki = e_kbd_int_new(mod_dir, mod_dir, mod_dir); return m; } EAPI int e_modapi_shutdown(E_Module *m) { if (ki) { e_kbd_int_free(ki); ki = NULL; } il_kbd_config_shutdown(); return 1; } EAPI int e_modapi_save(E_Module *m) { return il_kbd_config_save(); }
#include "e.h" #include "e_mod_main.h" #include "e_mod_config.h" #include "e_kbd_int.h" /* local variables */ static E_Kbd_Int *ki = NULL; EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Illume Keyboard" }; EAPI void * e_modapi_init(E_Module *m) { if (!il_kbd_config_init(m)) return NULL; ki = e_kbd_int_new(il_kbd_cfg->mod_dir, il_kbd_cfg->mod_dir, il_kbd_cfg->mod_dir); return m; } EAPI int e_modapi_shutdown(E_Module *m) { if (ki) { e_kbd_int_free(ki); ki = NULL; } il_kbd_config_shutdown(); return 1; } EAPI int e_modapi_save(E_Module *m) { return il_kbd_config_save(); }
Use correct module directory when making keyboard. Previous commit fixed compiler warnings also.
Use correct module directory when making keyboard. Previous commit fixed compiler warnings also. SVN revision: 43875
C
bsd-2-clause
FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment,rvandegrift/e,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment,tasn/enlightenment,rvandegrift/e,tizenorg/platform.upstream.enlightenment,tasn/enlightenment,tasn/enlightenment,rvandegrift/e,FlorentRevest/Enlightenment
c74e3fa443e193afb5274b672eccd58d2d7cff28
test/test_rtp.c
test/test_rtp.c
#include "rtp/kms-rtp-endpoint.h" #include <glib.h> #define LOCALNAME "kms/rtp/1" static KmsEndpoint* create_endpoint() { KmsEndpoint *ep; gchar *name; name = g_strdup_printf(LOCALNAME); ep = g_object_new(KMS_TYPE_RTP_ENDPOINT, "localname", name, NULL); g_free(name); return ep; } static void check_endpoint(KmsEndpoint *ep) { gchar *name; g_object_get(ep, "localname", &name, NULL); g_assert(g_strcmp0(name, LOCALNAME) == 0); g_free(name); } gint main(gint argc, gchar **argv) { KmsEndpoint *ep; g_type_init(); ep = create_endpoint(); check_endpoint(ep); g_object_unref(ep); return 0; }
#include "rtp/kms-rtp-endpoint.h" #include <glib.h> #define LOCALNAME "kms/rtp/1" static KmsEndpoint* create_endpoint() { KmsEndpoint *ep; gchar *name; name = g_strdup_printf(LOCALNAME); ep = g_object_new(KMS_TYPE_RTP_ENDPOINT, "localname", name, NULL); g_free(name); return ep; } static void check_endpoint(KmsEndpoint *ep) { gchar *name; g_object_get(ep, "localname", &name, NULL); g_assert(g_strcmp0(name, LOCALNAME) == 0); g_free(name); } gint main(gint argc, gchar **argv) { KmsEndpoint *ep; KmsConnection *conn; g_type_init(); ep = create_endpoint(); check_endpoint(ep); conn = kms_endpoint_create_connection(ep, KMS_CONNECTION_TYPE_RTP, NULL); kms_endpoint_delete_connection(ep, conn, NULL); g_object_unref(conn); check_endpoint(ep); g_object_unref(ep); return 0; }
Create and delete rtp connections
Create and delete rtp connections
C
lgpl-2.1
mparis/kurento-media-server,mparis/kurento-media-server,lulufei/kurento-media-server,shelsonjava/kurento-media-server,Kurento/kurento-media-server,todotobe1/kurento-media-server,Kurento/kurento-media-server,lulufei/kurento-media-server,TribeMedia/kurento-media-server,todotobe1/kurento-media-server,TribeMedia/kurento-media-server,shelsonjava/kurento-media-server
e135d72967f8dfc5c5cebea4caaf3d7240f7493c
ui/reflectionview.h
ui/reflectionview.h
#pragma once #include <QtGui/QMouseEvent> #include <QtGui/QPaintEvent> #include <QtWidgets/QWidget> #include "binaryninjaapi.h" #include "dockhandler.h" #include "uitypes.h" class ContextMenuManager; class DisassemblyContainer; class Menu; class ViewFrame; class BINARYNINJAUIAPI ReflectionView: public QWidget, public DockContextHandler { Q_OBJECT Q_INTERFACES(DockContextHandler) ViewFrame* m_frame; BinaryViewRef m_data; DisassemblyContainer* m_disassemblyContainer; public: ReflectionView(ViewFrame* frame, BinaryViewRef data); ~ReflectionView(); virtual void notifyOffsetChanged(uint64_t offset) override; virtual void notifyViewChanged(ViewFrame* frame) override; virtual void notifyVisibilityChanged(bool visible) override; virtual bool shouldBeVisible(ViewFrame* frame) override; protected: virtual void contextMenuEvent(QContextMenuEvent* event) override; };
#pragma once #include <QtGui/QMouseEvent> #include <QtGui/QPaintEvent> #include <QtWidgets/QWidget> #include "binaryninjaapi.h" #include "dockhandler.h" #include "uitypes.h" class ContextMenuManager; class DisassemblyContainer; class Menu; class ViewFrame; class BINARYNINJAUIAPI ReflectionView: public QWidget, public DockContextHandler { Q_OBJECT Q_INTERFACES(DockContextHandler) ViewFrame* m_frame; BinaryViewRef m_data; DisassemblyContainer* m_disassemblyContainer; public: ReflectionView(ViewFrame* frame, BinaryViewRef data); ~ReflectionView(); virtual void notifyViewLocationChanged(View* view, const ViewLocation& viewLocation) override; virtual void notifyVisibilityChanged(bool visible) override; virtual bool shouldBeVisible(ViewFrame* frame) override; protected: virtual void contextMenuEvent(QContextMenuEvent* event) override; };
Update reflection view to use view location notification.
Update reflection view to use view location notification.
C
mit
joshwatson/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api
f5cdd574a531ed156d30efe2e06c4cf463469588
libkmod/missing.h
libkmod/missing.h
#pragma once #include <unistd.h> #include <sys/syscall.h> #ifdef HAVE_LINUX_MODULE_H #include <linux/module.h> #endif #ifndef MODULE_INIT_IGNORE_MODVERSIONS # define MODULE_INIT_IGNORE_MODVERSIONS 1 #endif #ifndef MODULE_INIT_IGNORE_VERMAGIC # define MODULE_INIT_IGNORE_VERMAGIC 2 #endif #ifndef __NR_finit_module # define __NR_finit_module -1 #endif #ifndef HAVE_FINIT_MODULE #include <errno.h> static inline int finit_module(int fd, const char *uargs, int flags) { if (__NR_finit_module == -1) { errno = ENOSYS; return -1; } return syscall(__NR_finit_module, fd, uargs, flags); } #endif #if !HAVE_DECL_STRNDUPA #define strndupa(s, length) \ ({ \ size_t __len = strnlen((s), (length)); \ strncpy(alloca(__len + 1), (s), __len); \ }) #endif
#pragma once #include <unistd.h> #include <sys/syscall.h> #ifdef HAVE_LINUX_MODULE_H #include <linux/module.h> #endif #ifndef MODULE_INIT_IGNORE_MODVERSIONS # define MODULE_INIT_IGNORE_MODVERSIONS 1 #endif #ifndef MODULE_INIT_IGNORE_VERMAGIC # define MODULE_INIT_IGNORE_VERMAGIC 2 #endif #ifndef __NR_finit_module # define __NR_finit_module -1 #endif #ifndef HAVE_FINIT_MODULE #include <errno.h> static inline int finit_module(int fd, const char *uargs, int flags) { if (__NR_finit_module == -1) { errno = ENOSYS; return -1; } return syscall(__NR_finit_module, fd, uargs, flags); } #endif #if !HAVE_DECL_STRNDUPA #define strndupa(s, n) \ ({ \ const char *__old = (s); \ size_t __len = strnlen(__old, (n)); \ char *__new = alloca(__len + 1); \ __new[__len] = '\0'; \ memcpy(__new, __old, __len); \ }) #endif
Make sure there's NUL byte at the end of strndupa
Make sure there's NUL byte at the end of strndupa Since strcpy() doesn't ensure we have a NUL byte in the resulting string, use alloca() + memcpy(). Also make sure we don't evaluate "s" twice.
C
lgpl-2.1
pmmccorm/kmod,lpereira/kmod,Distrotech/kmod,pmmccorm/kmod,pmmccorm/kmod,lucasdemarchi/kmod,lpereira/kmod,Distrotech/kmod,lucasdemarchi/kmod,Distrotech/kmod,lpereira/kmod,lucasdemarchi/kmod
d1655ea772cb9f0c6ecad7a4523629ea4c6ce560
platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/val/val_client_defs.h
platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/val/val_client_defs.h
/** @file * Copyright (c) 2018-2019, Arm Limited or its affiliates. All rights reserved. * 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 _VAL_CLIENT_H_ #define _VAL_CLIENT_H_ #include "val.h" #include "psa/client.h" #include "crypto_values.h" #define INVALID_SID 0x0000FA20 #ifndef CLIENT_TEST_DISPATCHER_SID #define CLIENT_TEST_DISPATCHER_SID 0x0 #endif #ifndef SERVER_TEST_DISPATCHER_SID #define SERVER_TEST_DISPATCHER_SID 0x0 #endif #endif /* _VAL_CLIENT_H_ */
/** @file * Copyright (c) 2018-2019, Arm Limited or its affiliates. All rights reserved. * 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 _VAL_CLIENT_H_ #define _VAL_CLIENT_H_ #include "val.h" #include "psa/client.h" #include "psa/crypto_types.h" #include "psa/crypto_values.h" #define INVALID_SID 0x0000FA20 #ifndef CLIENT_TEST_DISPATCHER_SID #define CLIENT_TEST_DISPATCHER_SID 0x0 #endif #ifndef SERVER_TEST_DISPATCHER_SID #define SERVER_TEST_DISPATCHER_SID 0x0 #endif #endif /* _VAL_CLIENT_H_ */
Add missing inclusion of crypto_types.h
psa: Add missing inclusion of crypto_types.h val_client_defs.h includes crypto_values.h, but the latter requires type definitions from crypto_types.h.
C
apache-2.0
mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed
3964e5efebb9168526a9b098874177a68ec8e704
scaffolding.10.c
scaffolding.10.c
#include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <termios.h> #include <unistd.h> struct termios orig_termios; void disableRawMode() { tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios); } void enableRawMode() { tcgetattr(STDIN_FILENO, &orig_termios); atexit(disableRawMode); struct termios raw = orig_termios; raw.c_lflag &= ~(ECHO | ICANON); tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw); } int main() { enableRawMode(); char c; while (read(STDIN_FILENO, &c, 1) == 1 && c != 'q') { if (iscntrl(c)) { printf("%d\n", c); } else { printf("%d ('%c')\n", c, c); } } return 0; }
Include a Ruten code, demonstrating keystroke reading
Include a Ruten code, demonstrating keystroke reading
C
bsd-2-clause
eingaeph/pip.imbue.hood,eingaeph/pip.imbue.hood
e1d9f7f6473476c9da658edefe08fa0f9b3b4a50
include/rapidcheck/shrinkable/Transform.h
include/rapidcheck/shrinkable/Transform.h
#pragma once #include "rapidcheck/Shrinkable.h" namespace rc { namespace shrinkable { //! Maps the given shrinkable using the given mapping callable. template<typename T, typename Mapper> Shrinkable<typename std::result_of<Mapper(T)>::type> map(Mapper &&mapper, Shrinkable<T> shrinkable); //! Returns a shrinkable equal to the given shrinkable but with the shrinks //! (lazily) mapped by the given mapping callable. Since the value is not mapped //! also the output type is the same as the output type. template<typename T, typename Mapper> Shrinkable<T> mapShrinks(Mapper &&mapper, Shrinkable<T> shrinkable); //! Recursively filters the given shrinkable using the given predicate. Any //! subtree with a root for which the predicate returns false is discarded, //! including the passed in root which is why this function returns a `Maybe`. template<typename T, typename Predicate> Maybe<Shrinkable<T>> filter(Predicate pred, Shrinkable<T> shrinkable); //! Given two `Shrinkables`, returns a `Shrinkable` pair that first shrinks the //! first element and then the second. template<typename T1, typename T2> Shrinkable<std::pair<T1, T2>> pair(Shrinkable<T1> s1, Shrinkable<T2> s2); } // namespace shrinkable } // namespace rc #include "Transform.hpp"
#pragma once #include "rapidcheck/Shrinkable.h" namespace rc { namespace shrinkable { //! Maps the given shrinkable recursively using the given mapping callable. template<typename T, typename Mapper> Shrinkable<typename std::result_of<Mapper(T)>::type> map(Mapper &&mapper, Shrinkable<T> shrinkable); //! Returns a shrinkable equal to the given shrinkable but with the shrinks //! (lazily) mapped by the given mapping callable. Since the value is not mapped //! also the output type is the same as the output type. template<typename T, typename Mapper> Shrinkable<T> mapShrinks(Mapper &&mapper, Shrinkable<T> shrinkable); //! Recursively filters the given shrinkable using the given predicate. Any //! subtree with a root for which the predicate returns false is discarded, //! including the passed in root which is why this function returns a `Maybe`. template<typename T, typename Predicate> Maybe<Shrinkable<T>> filter(Predicate pred, Shrinkable<T> shrinkable); //! Given two `Shrinkables`, returns a `Shrinkable` pair that first shrinks the //! first element and then the second. template<typename T1, typename T2> Shrinkable<std::pair<T1, T2>> pair(Shrinkable<T1> s1, Shrinkable<T2> s2); } // namespace shrinkable } // namespace rc #include "Transform.hpp"
Clarify doc comment about shrinkable::map
Clarify doc comment about shrinkable::map
C
bsd-2-clause
whoshuu/rapidcheck,tm604/rapidcheck,whoshuu/rapidcheck,emil-e/rapidcheck,unapiedra/rapidfuzz,whoshuu/rapidcheck,unapiedra/rapidfuzz,tm604/rapidcheck,tm604/rapidcheck,emil-e/rapidcheck,emil-e/rapidcheck,unapiedra/rapidfuzz
0f6dd291a29fd99765469485ddea93c0c2b927d6
src/utils/cont.h
src/utils/cont.h
/* Copyright (c) 2012 250bpm s.r.o. 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 SP_CONT_INCLUDED #define SP_CONT_INCLUDED /* Takes a pointer to a member variable and computes pointer to the structure that contains it. 'type' is type of the structure, not the member. */ #define sp_cont(ptr, type, member) \ ((type*) (((char*) ptr) - ((size_t) &(((type*) 0)->member)))) #endif
/* Copyright (c) 2012 250bpm s.r.o. 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 SP_CONT_INCLUDED #define SP_CONT_INCLUDED #include <stddef.h> /* Takes a pointer to a member variable and computes pointer to the structure that contains it. 'type' is type of the structure, not the member. */ #define sp_cont(ptr, type, member) \ ((type*) (((char*) ptr) - offsetof(type, member))) #endif
Use offsetof() macro instead of expanded form.
Use offsetof() macro instead of expanded form. Signed-off-by: Martin Sustrik <[email protected]>
C
mit
pakozm/nanomsg,modulexcite/nanomsg,kaostao/nanomsg,reqshark/nanomsg,potatogim/nanomsg,krafczyk/nanomsg,modulexcite/nanomsg,JackDunaway/featherweight-nanomsg,cosin2008/nanomsg.NET,zerotacg/nanomsg,yan97ao/nanomsg,pch957/nanomsg,smithed/nanomsg,snikulov/nanomsg,gdamore/mamomsg,imp/nanomsg,tempbottle/nanomsg,pch957/nanomsg,wirebirdlabs/featherweight-nanomsg,JackDunaway/featherweight-nanomsg,wfxiang08/nanomsg,gdamore/mamomsg,simplestbest/nanomsg,potatogim/nanomsg,cosin2008/nanomsg.NET,nirs/nanomsg,wirebirdlabs/featherweight-nanomsg,featherweight/ftw-kernel-nanomsg,smithed/nanomsg,thisco-de/nanomsg,krafczyk/nanomsg,smithed/nanomsg,ttyangf/nanomsg,TTimo/nanomsg,TTimo/nanomsg,wirebirdlabs/featherweight-nanomsg,simplestbest/nanomsg,hyperfact/nanomsg,potatogim/nanomsg,tempbottle/nanomsg,zerotacg/nanomsg,kaostao/nanomsg,thisco-de/nanomsg,kaostao/nanomsg,modulexcite/nanomsg,linearregression/nanomsg,smithed/nanomsg,reqshark/nanomsg,ttyangf/nanomsg,hyperfact/nanomsg,pakozm/nanomsg,pakozm/nanomsg,pch957/nanomsg,wfxiang08/nanomsg,kaostao/nanomsg,zerotacg/nanomsg,yan97ao/nanomsg,linearregression/nanomsg,TTimo/nanomsg,tempbottle/nanomsg,yan97ao/nanomsg,featherweight/ftw-kernel-nanomsg,ttyangf/nanomsg,reqshark/nanomsg,TTimo/nanomsg,JackDunaway/featherweight-nanomsg,linearregression/nanomsg,gdamore/mamomsg,nirs/nanomsg,simplestbest/nanomsg,nirs/nanomsg,wfxiang08/nanomsg,imp/nanomsg,cosin2008/nanomsg.NET,ttyangf/nanomsg,snikulov/nanomsg,hyperfact/nanomsg,imp/nanomsg,krafczyk/nanomsg
f4a3cffb0a988313acdb83a6d658001c8c06e07b
src/lib/MSPUBConstants.h
src/lib/MSPUBConstants.h
namespace libmspub { const unsigned EMUS_IN_INCH = 914400; }
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* libmspub * Version: MPL 1.1 / GPLv2+ / LGPLv2+ * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License or as specified alternatively below. You may obtain a copy of * the License at http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * Major Contributor(s): * Copyright (C) 2012 Brennan Vincent <[email protected]> * * All Rights Reserved. * * For minor contributions see the git repository. * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPLv2+"), or * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable * instead of those above. */ #ifndef __MSPUBCONSTANTS_H__ #define __MSPUBCONSTANTS_H__ namespace libmspub { const unsigned EMUS_IN_INCH = 914400; } #endif /* __MSPUBCONSTANTS_H__ */ /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Add license header to the file
Add license header to the file
C
mpl-2.0
LibreOffice/libmspub,LibreOffice/libmspub,LibreOffice/libmspub
8106c20e81cb296b15da59763639b9dfe33752e8
sys/mips/include/pltfm.h
sys/mips/include/pltfm.h
/*- * JNPR: pltfm.h,v 1.5.2.1 2007/09/10 05:56:11 girish * $FreeBSD$ */ #ifndef _MACHINE_PLTFM_H_ #define _MACHINE_PLTFM_H_ /* * This files contains platform-specific definitions. */ #define SDRAM_ADDR_START 0 /* SDRAM addr space */ #define SDRAM_ADDR_END (SDRAM_ADDR_START + (1024*0x100000)) #define SDRAM_MEM_SIZE (SDRAM_ADDR_END - SDRAM_ADDR_START) #define UART_ADDR_START 0x1ef14000 /* UART */ #define UART_ADDR_END 0x1ef14fff #define UART_MEM_SIZE (UART_ADDR_END-UART_ADDR_START) /* * NS16550 UART address */ #ifdef ADDR_NS16550_UART1 #undef ADDR_NS16550_UART1 #endif #define ADDR_NS16550_UART1 0x1ef14000 /* UART */ #define VADDR_NS16550_UART1 0xbef14000 /* UART */ #endif /* !_MACHINE_PLTFM_H_ */
/*- * JNPR: pltfm.h,v 1.5.2.1 2007/09/10 05:56:11 girish * $FreeBSD$ */ #ifndef _MACHINE_PLTFM_H_ #define _MACHINE_PLTFM_H_ /* * This files contains platform-specific definitions. */ #define SDRAM_ADDR_START 0 /* SDRAM addr space */ #define SDRAM_ADDR_END (SDRAM_ADDR_START + (1024*0x100000)) #define SDRAM_MEM_SIZE (SDRAM_ADDR_END - SDRAM_ADDR_START) #endif /* !_MACHINE_PLTFM_H_ */
Trim unreferenced goo. SDRAM likely should be next, but it is still referenced.
Trim unreferenced goo. SDRAM likely should be next, but it is still referenced.
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
64c2495f3b46fc3bd623a7c1b534ffb7e58c7647
lib/CL/clIcdGetPlatformIDsKHR.c
lib/CL/clIcdGetPlatformIDsKHR.c
#include <assert.h> #include <string.h> #include "pocl_cl.h" /* * Provide the ICD loader the specified function to get the pocl platform. * * TODO: the functionality of this seems the same as that of clGetPlatformIDs. * but we cannot call that, as it is defined in the ICD loader itself. * */ extern struct _cl_platform_id _platforms[1]; CL_API_ENTRY cl_int CL_API_CALL clIcdGetPlatformIDsKHR(cl_uint num_entries, cl_platform_id * platforms, cl_uint * num_platforms) CL_API_SUFFIX__VERSION_1_0 { int const num = 1; int i; if (platforms != NULL) { if (num_entries < num) return CL_INVALID_VALUE; for (i=0; i<num; ++i) platforms[i] = &_platforms[i]; } if (num_platforms != NULL) *num_platforms = num; return CL_SUCCESS; }
#include <assert.h> #include <string.h> #include "pocl_cl.h" /* * GetPlatformIDs that support ICD. * This function is required by the ICD specification. */ extern struct _cl_platform_id _platforms[1]; CL_API_ENTRY cl_int CL_API_CALL clIcdGetPlatformIDsKHR(cl_uint num_entries, cl_platform_id * platforms, cl_uint * num_platforms) CL_API_SUFFIX__VERSION_1_0 { return clGetPlatformIDs( num_entries, platforms, num_platforms ); }
Fix nonsense comment + remove duplicate code.
Fix nonsense comment + remove duplicate code.
C
mit
vkorhonen/pocl,vkorhonen/pocl,0charleschen0/pocl,pocl/pocl,pocl/pocl,rjodin/pocl,0charleschen0/pocl,maZZZu/pocl,jrprice/pocl,pavanky/pocl,Oblomov/pocl,sting47/pocl,rjodin/pocl,Oblomov/pocl,dsandersimgtec/pocl,Oblomov/pocl,hugwijst/pocl,dsandersimgtec/pocl,sting47/pocl,jrprice/pocl,pocl/pocl,jrprice/pocl,franz/pocl,pavanky/pocl,pavanky/pocl,rjodin/pocl,pavanky/pocl,sting47/pocl,hugwijst/pocl,hugwijst/pocl,dsandersimgtec/pocl,pocl/pocl,Oblomov/pocl,vkorhonen/pocl,maZZZu/pocl,sting47/pocl,sting47/pocl,0charleschen0/pocl,hugwijst/pocl,rjodin/pocl,maZZZu/pocl,pocl/pocl,maZZZu/pocl,franz/pocl,0charleschen0/pocl,vkorhonen/pocl,hugwijst/pocl,dsandersimgtec/pocl,jrprice/pocl,franz/pocl,Oblomov/pocl,franz/pocl,franz/pocl
ebbbce3163cf277b8ece31f69f59c24545d58f86
src/win32/log_win.c
src/win32/log_win.c
/* *The MIT License (MIT) * * Copyright (c) <2017> <Stephan Gatzka> * * 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. */ #include <stdarg.h> #include <stdio.h> #include "log.h" static char log_buffer[200]; void log_err(const char *format, ...) { va_list args; va_start(args, format); vsnprintf(log_buffer, sizeof(log_buffer), format, args); printf("%s: %s", "Error", log_buffer); va_end(args); } void log_warn(const char *format, ...) { va_list args; va_start(args, format); vsnprintf(log_buffer, sizeof(log_buffer), format, args); printf("%s: %s", "Warning", log_buffer); va_end(args); } void log_info(const char *format, ...) { va_list args; va_start(args, format); vsnprintf(log_buffer, sizeof(log_buffer), format, args); printf("%s: %s", "Info", log_buffer); va_end(args); }
Add log functions for windows.
Add log functions for windows.
C
mit
gatzka/cjet,mloy/cjet,mloy/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet,gatzka/cjet
432db2cd6dd47eebf95e358af96c3c08962b57f6
Eigen/src/Core/util/ReenableStupidWarnings.h
Eigen/src/Core/util/ReenableStupidWarnings.h
#ifdef EIGEN_WARNINGS_DISABLED #undef EIGEN_WARNINGS_DISABLED #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS #ifdef _MSC_VER #pragma warning( pop ) #elif defined __INTEL_COMPILER #pragma warning pop #elif defined __clang__ #pragma clang diagnostic pop #elif defined __NVCC__ #pragma diag_warning code_is_unreachable #pragma diag_warning initialization_not_reachable #endif #endif #endif // EIGEN_WARNINGS_DISABLED
#ifdef EIGEN_WARNINGS_DISABLED #undef EIGEN_WARNINGS_DISABLED #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS #ifdef _MSC_VER #pragma warning( pop ) #elif defined __INTEL_COMPILER #pragma warning pop #elif defined __clang__ #pragma clang diagnostic pop #elif defined __NVCC__ #pragma diag_default code_is_unreachable #pragma diag_default initialization_not_reachable #endif #endif #endif // EIGEN_WARNINGS_DISABLED
Revert the nvcc messages to their default severity instead of the forcing them to be warnings
Revert the nvcc messages to their default severity instead of the forcing them to be warnings
C
bsd-3-clause
ROCmSoftwarePlatform/hipeigen,ritsu1228/eigen,pasuka/eigen,ROCmSoftwarePlatform/hipeigen,pasuka/eigen,pasuka/eigen,ROCmSoftwarePlatform/hipeigen,ritsu1228/eigen,ROCmSoftwarePlatform/hipeigen,ritsu1228/eigen,ritsu1228/eigen,pasuka/eigen,ritsu1228/eigen,pasuka/eigen
a3270e718aa0c5dd341968b80324ae6d09a52467
src/luaint/gen.h
src/luaint/gen.h
/* * Copyright (C) 2015 Luke San Antonio and Hazza Alkaabi * All rights reserved. */ #pragma once #include <string> #include <vector> #include "../gen/terrain.h" #include "common.h" extern "C" { #include "lua.h" } namespace game { namespace luaint { struct Terrain_Gen_Config { void add_option(std::string const& name, double def) noexcept; private: enum class Option_Type { Double }; struct Option { std::string name; Option_Type type; union { double d_num; } value; }; std::vector<Option> options_; }; struct Terrain_Gen_Mod { // Index into registry[naeme] where naeme is some implementation (?) // defined string. size_t table_index; Terrain_Gen_Config config; }; using Terrain_Gen_Mod_Vector = std::vector<Terrain_Gen_Mod>; // Use this to initialize a table to return from a lua require call. Table terrain_preload_table(Terrain_Gen_Mod_Vector&) noexcept; // Use this to push a grid void push_grid_table(lua_State*, gen::Grid_Map&) noexcept; } }
/* * Copyright (C) 2015 Luke San Antonio and Hazza Alkaabi * All rights reserved. */ #pragma once #include <string> #include <vector> #include "../gen/terrain.h" #include "common.h" extern "C" { #include "lua.h" } namespace game { namespace luaint { struct Terrain_Gen_Config { void add_option(std::string const& name, double def) noexcept; private: enum class Option_Type { Double }; struct Option { std::string name; Option_Type type; union { double d_num; } value; }; std::vector<Option> options_; }; struct Terrain_Gen_Mod { // Index into registry[naeme] where naeme is some implementation (?) // defined string. // The value of the registry[naeme][table_index] is the mod lua function. size_t table_index; Terrain_Gen_Config config; }; using Terrain_Gen_Mod_Vector = std::vector<Terrain_Gen_Mod>; // Use this to initialize a table to return from a lua require call. Table terrain_preload_table(Terrain_Gen_Mod_Vector&) noexcept; // Use this to push a grid void push_grid_table(lua_State*, gen::Grid_Map&) noexcept; } }
Add comment to the Terrain_Gen_Mod struct
Add comment to the Terrain_Gen_Mod struct
C
bsd-3-clause
RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine
1200ec14e9e0ec6b27033f59778c7c4dd6690ca4
c_src/indexed_ewah.h
c_src/indexed_ewah.h
#pragma once #include <stdint.h> #include <stdlib.h> #include "ewok.h" enum { N_DIVISIONS = 65536, LOG2_DIVISIONS = 16 }; struct indexed_ewah_map { struct ewah_bitmap *map; size_t bit_from_division[N_DIVISIONS], ptr_from_division[N_DIVISIONS]; }; /* Build an index on top of an existing libewok EWAH map. */ extern void ewah_build_index(struct indexed_ewah_map *); /* Test whether a given bit is set in an indexed EWAH map. */ extern bool indexed_ewah_get(struct indexed_ewah_map *, size_t);
#pragma once #include <stdint.h> #include <stdlib.h> #include "ewok.h" enum { N_DIVISIONS = 1<<14 }; struct indexed_ewah_map { struct ewah_bitmap *map; size_t bit_from_division[N_DIVISIONS], ptr_from_division[N_DIVISIONS]; }; /* Build an index on top of an existing libewok EWAH map. */ extern void ewah_build_index(struct indexed_ewah_map *); /* Test whether a given bit is set in an indexed EWAH map. */ extern bool indexed_ewah_get(struct indexed_ewah_map *, size_t);
Change number of divisions in index to 2^14
Change number of divisions in index to 2^14
C
mit
ratelle/erl_ip_index,ratelle/erl_ip_index,ratelle/erl_ip_index
cc79cb803ad27d92e3e44e89b59c5a6521e06d44
Alc/converter.h
Alc/converter.h
#ifndef CONVERTER_H #define CONVERTER_H #include "alMain.h" #include "alu.h" #ifdef __cpluspluc extern "C" { #endif typedef struct SampleConverter { enum DevFmtType mSrcType; enum DevFmtType mDstType; ALsizei mNumChannels; ALsizei mSrcTypeSize; ALsizei mDstTypeSize; ALint mSrcPrepCount; ALsizei mFracOffset; ALsizei mIncrement; ResamplerFunc mResample; alignas(16) ALfloat mSrcSamples[BUFFERSIZE+MAX_PRE_SAMPLES+MAX_POST_SAMPLES]; alignas(16) ALfloat mDstSamples[BUFFERSIZE]; struct { alignas(16) ALfloat mPrevSamples[MAX_PRE_SAMPLES+MAX_POST_SAMPLES]; } Chan[]; } SampleConverter; SampleConverter *CreateSampleConverter(enum DevFmtType srcType, enum DevFmtType dstType, ALsizei numchans, ALsizei srcRate, ALsizei dstRate); void DestroySampleConverter(SampleConverter **converter); ALsizei SampleConverterInput(SampleConverter *converter, const ALvoid *src, ALsizei *srcframes, ALvoid *dst, ALsizei dstframes); ALsizei SampleConverterAvailableOut(SampleConverter *converter, ALsizei srcframes); #ifdef __cpluspluc } #endif #endif /* CONVERTER_H */
#ifndef CONVERTER_H #define CONVERTER_H #include "alMain.h" #include "alu.h" #ifdef __cpluspluc extern "C" { #endif typedef struct SampleConverter { enum DevFmtType mSrcType; enum DevFmtType mDstType; ALsizei mNumChannels; ALsizei mSrcTypeSize; ALsizei mDstTypeSize; ALint mSrcPrepCount; ALsizei mFracOffset; ALsizei mIncrement; ResamplerFunc mResample; alignas(16) ALfloat mSrcSamples[BUFFERSIZE]; alignas(16) ALfloat mDstSamples[BUFFERSIZE]; struct { alignas(16) ALfloat mPrevSamples[MAX_PRE_SAMPLES+MAX_POST_SAMPLES]; } Chan[]; } SampleConverter; SampleConverter *CreateSampleConverter(enum DevFmtType srcType, enum DevFmtType dstType, ALsizei numchans, ALsizei srcRate, ALsizei dstRate); void DestroySampleConverter(SampleConverter **converter); ALsizei SampleConverterInput(SampleConverter *converter, const ALvoid *src, ALsizei *srcframes, ALvoid *dst, ALsizei dstframes); ALsizei SampleConverterAvailableOut(SampleConverter *converter, ALsizei srcframes); #ifdef __cpluspluc } #endif #endif /* CONVERTER_H */
Reduce the size of the temp input buffer
Reduce the size of the temp input buffer
C
lgpl-2.1
aaronmjacobs/openal-soft,aaronmjacobs/openal-soft
ab55a43fcd48953d0d76599671efa6f5a82bee80
uwsgiEngine/plugin.h
uwsgiEngine/plugin.h
/* * Copyright (C) 2013-2014 Daniel Nicoletti <[email protected]> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef PLUGIN_H #define PLUGIN_H #define CUTELYST_MODIFIER1 0 #ifdef __cplusplus extern "C" { #endif struct uwsgi_cutelyst { char *app; int reload; }; extern struct uwsgi_cutelyst options; #ifdef __cplusplus } #endif #endif // PLUGIN_H
/* * Copyright (C) 2013-2014 Daniel Nicoletti <[email protected]> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef PLUGIN_H #define PLUGIN_H #define CUTELYST_MODIFIER1 0 #ifdef __cplusplus extern "C" { #endif struct uwsgi_cutelyst { char *app; int reload; } options; #ifdef __cplusplus } #endif #endif // PLUGIN_H
Revert "Possibly fixed alignment warning"
Revert "Possibly fixed alignment warning" This reverts commit 3111a7ae00cf12f0f8e0f357fb122b24470e4051.
C
bsd-3-clause
buschmann23/cutelyst,buschmann23/cutelyst,cutelyst/cutelyst,simonaw/cutelyst,simonaw/cutelyst,cutelyst/cutelyst,buschmann23/cutelyst,cutelyst/cutelyst
4a01fda83c83febe335110ddead262bb280c4d24
gmond/core_metrics.c
gmond/core_metrics.c
#include <metric.h> #include <gm_mmn.h> #include <libmetrics.h> mmodule core_metrics; /* ** A helper function to determine the number of cpustates in /proc/stat (MKN) */ static int core_metrics_init ( apr_pool_t *p ) { int i; for (i = 0; core_metrics.metrics_info[i].name != NULL; i++) { /* Initialize the metadata storage for each of the metrics and then * store one or more key/value pairs. The define MGROUPS defines * the key for the grouping attribute. */ MMETRIC_INIT_METADATA(&(core_metrics.metrics_info[i]),p); MMETRIC_ADD_METADATA(&(core_metrics.metrics_info[i]),MGROUP,"core"); } return 0; } static void core_metrics_cleanup ( void ) { } static g_val_t core_metrics_handler ( int metric_index ) { g_val_t val; /* The metric_index corresponds to the order in which the metrics appear in the metric_info array */ switch (metric_index) { case 0: return gexec_func(); case 1: return heartbeat_func(); case 2: return location_func(); } /* default case */ val.int32 = 0; return val; } static Ganglia_25metric core_metrics_info[] = { {0, "gexec", 300, GANGLIA_VALUE_STRING, "", "zero", "%s", UDP_HEADER_SIZE+32, "gexec available"}, {0, "heartbeat", 20, GANGLIA_VALUE_UNSIGNED_INT, "", "", "%u", UDP_HEADER_SIZE+8, "Last heartbeat"}, {0, "location", 1200, GANGLIA_VALUE_STRING, "(x,y,z)", "", "%s", UDP_HEADER_SIZE+12, "Location of the machine"}, {0, NULL} }; mmodule core_metrics = { STD_MMODULE_STUFF, core_metrics_init, core_metrics_cleanup, core_metrics_info, core_metrics_handler, };
Move heartbeat, location and gexec metrics to a core module that will always be statically linked
Move heartbeat, location and gexec metrics to a core module that will always be statically linked
C
bsd-3-clause
fastly/monitor-core,NoodlesNZ/monitor-core,fastly/monitor-core,mjzhou/monitor-core,phreakocious/monitor-core,hinesmr/monitor-core,NoodlesNZ/monitor-core,dmourati/monitor-core,sdgdsffdsfff/monitor-core,mjzhou/monitor-core,torkelsson/monitor-core,hinesmr/monitor-core,sdgdsffdsfff/monitor-core,mjzhou/monitor-core,sdgdsffdsfff/monitor-core,phreakocious/monitor-core,dmourati/monitor-core,mjzhou/monitor-core,fastly/monitor-core,fastly/monitor-core,lawrencewu/monitor-core,phreakocious/monitor-core,ganglia/monitor-core,fastly/monitor-core,fastly/monitor-core,mjzhou/monitor-core,lawrencewu/monitor-core,torkelsson/monitor-core,phreakocious/monitor-core,phreakocious/monitor-core,phreakocious/monitor-core,mjzhou/monitor-core,mjzhou/monitor-core,hinesmr/monitor-core,phreakocious/monitor-core,lawrencewu/monitor-core,sdgdsffdsfff/monitor-core,lawrencewu/monitor-core,lawrencewu/monitor-core,torkelsson/monitor-core,hinesmr/monitor-core,ganglia/monitor-core,NoodlesNZ/monitor-core,ganglia/monitor-core,sdgdsffdsfff/monitor-core,torkelsson/monitor-core,torkelsson/monitor-core,NoodlesNZ/monitor-core,ganglia/monitor-core,fastly/monitor-core,NoodlesNZ/monitor-core,ganglia/monitor-core,NoodlesNZ/monitor-core,NoodlesNZ/monitor-core,dmourati/monitor-core,ganglia/monitor-core,dmourati/monitor-core,sdgdsffdsfff/monitor-core,dmourati/monitor-core,lawrencewu/monitor-core,torkelsson/monitor-core,ganglia/monitor-core,dmourati/monitor-core,sdgdsffdsfff/monitor-core,torkelsson/monitor-core,hinesmr/monitor-core,ganglia/monitor-core,lawrencewu/monitor-core
c26911e369cd35262a3ff74693024bab8e99c088
xchainer/macro.h
xchainer/macro.h
#pragma once #ifdef NDEBUG #define XCHAINER_DEBUG false #else // NDEBUG #define XCHAINER_DEBUG true #endif // NDEBUG #ifndef XCHAINER_HOST_DEVICE #ifdef __CUDACC__ #define XCHAINER_HOST_DEVICE __host__ __device__ #else // __CUDA__ #define XCHAINER_HOST_DEVICE #endif // __CUDACC__ #endif // XCHAINER_HOST_DEVICE #ifndef XCHAINER_NEVER_REACH #ifdef NDEBUG #include <cstdlib> #define XCHAINER_NEVER_REACH() (std::abort()) #else // NDEBUG #include <cassert> #define XCHAINER_NEVER_REACH() \ do { \ assert(false); /* NOLINT(cert-dcl03-c) */ \ std::abort(); \ } while (false) #endif // NDEBUG #endif // XCHAINER_NEVER_REACH
#pragma once #include <cassert> #ifdef NDEBUG #define XCHAINER_DEBUG false #else // NDEBUG #define XCHAINER_DEBUG true #endif // NDEBUG #define XCHAINER_ASSERT(...) \ do { \ if (XCHAINER_DEBUG) { \ (void)(false && (__VA_ARGS__)); /* maybe unused */ \ assert(__VA_ARGS__); \ } \ } while (false) #ifndef XCHAINER_HOST_DEVICE #ifdef __CUDACC__ #define XCHAINER_HOST_DEVICE __host__ __device__ #else // __CUDA__ #define XCHAINER_HOST_DEVICE #endif // __CUDACC__ #endif // XCHAINER_HOST_DEVICE #ifndef XCHAINER_NEVER_REACH #ifdef NDEBUG #include <cstdlib> #define XCHAINER_NEVER_REACH() (std::abort()) #else // NDEBUG #include <cassert> #define XCHAINER_NEVER_REACH() \ do { \ assert(false); /* NOLINT(cert-dcl03-c) */ \ std::abort(); \ } while (false) #endif // NDEBUG #endif // XCHAINER_NEVER_REACH
Add XCHAINER_ASSERT, an alternative assert that forcibly uses the expression syntactically
Add XCHAINER_ASSERT, an alternative assert that forcibly uses the expression syntactically
C
mit
chainer/chainer,keisuke-umezawa/chainer,wkentaro/chainer,hvy/chainer,keisuke-umezawa/chainer,jnishi/chainer,niboshi/chainer,jnishi/chainer,niboshi/chainer,ktnyt/chainer,niboshi/chainer,tkerola/chainer,ktnyt/chainer,keisuke-umezawa/chainer,niboshi/chainer,pfnet/chainer,wkentaro/chainer,hvy/chainer,chainer/chainer,hvy/chainer,okuta/chainer,chainer/chainer,chainer/chainer,hvy/chainer,ktnyt/chainer,keisuke-umezawa/chainer,wkentaro/chainer,jnishi/chainer,okuta/chainer,jnishi/chainer,wkentaro/chainer,okuta/chainer,ktnyt/chainer,okuta/chainer
9dc2130e92fb14cd7ceb259a08dabe5ace2d41d1
effects/startup.h
effects/startup.h
#ifndef __STARTUP_H__ #define __STARTUP_H__ #include "types.h" #ifndef X #define X(x) ((x) + 0x81) #endif #ifndef Y #define Y(y) ((y) + 0x2c) #endif extern int frameCount; extern int lastFrameCount; extern struct List *VBlankEvent; typedef struct Effect { /* AmigaOS is active during this step. Loads resources from disk. */ void (*Load)(void); /* Frees all resources allocated by "Load" step. */ void (*UnLoad)(void); /* * Does all initialization steps required to launch the effect. * 1) Allocate required memory. * 2) Run all precalc routines. * 2) Generate copper lists. * 3) Set up interrupts and DMA channels. */ void (*Init)(void); /* Frees all resources allocated by "Init" step. */ void (*Kill)(void); /* Renders single frame of an effect. */ void (*Render)(void); /* Handles all events and returns false to break the loop. */ bool (*HandleEvent)(void); } EffectT; #endif
#ifndef __STARTUP_H__ #define __STARTUP_H__ #include "types.h" #ifndef X #define X(x) ((x) + 0x81) #endif #ifndef HP #define HP(x) (X(x) / 2) #endif #ifndef Y #define Y(y) ((y) + 0x2c) #endif #ifndef VP #define VP(y) (Y(y) & 255) #endif extern int frameCount; extern int lastFrameCount; extern struct List *VBlankEvent; typedef struct Effect { /* AmigaOS is active during this step. Loads resources from disk. */ void (*Load)(void); /* Frees all resources allocated by "Load" step. */ void (*UnLoad)(void); /* * Does all initialization steps required to launch the effect. * 1) Allocate required memory. * 2) Run all precalc routines. * 2) Generate copper lists. * 3) Set up interrupts and DMA channels. */ void (*Init)(void); /* Frees all resources allocated by "Init" step. */ void (*Kill)(void); /* Renders single frame of an effect. */ void (*Render)(void); /* Handles all events and returns false to break the loop. */ bool (*HandleEvent)(void); } EffectT; #endif
Add default calculation of horizontal & vertical position.
Add default calculation of horizontal & vertical position.
C
artistic-2.0
cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene
d1aff3f0750596fbb1ffeffa858c9db2f09a215d
arch/amiga/include/psl.h
arch/amiga/include/psl.h
/* $NetBSD: psl.h,v 1.7 1994/10/26 02:06:31 cgd Exp $ */ #ifndef _MACHINE_PSL_H_ #define _MACHINE_PSL_H_ #include <m68k/psl.h> #endif
/* $NetBSD: psl.h,v 1.7 1994/10/26 02:06:31 cgd Exp $ */ #ifndef _MACHINE_PSL_H_ #define _MACHINE_PSL_H_ /* Interrupt priority `levels'; not mutually exclusive. */ #define IPL_NONE -1 #define IPL_BIO 3 /* block I/O */ #define IPL_NET 3 /* network */ #define IPL_TTY 4 /* terminal */ #define IPL_CLOCK 4 /* clock */ #define IPL_IMP 4 /* memory allocation */ /* Interrupt sharing types. */ #define IST_NONE 0 /* none */ #define IST_PULSE 1 /* pulsed */ #define IST_EDGE 2 /* edge-triggered */ #define IST_LEVEL 3 /* level-triggered */ #include <m68k/psl.h> #endif
Add IPL_ and IST_ constants in preparation for the Amiga ISA-kit
Add IPL_ and IST_ constants in preparation for the Amiga ISA-kit
C
isc
orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars
3ba54a5b44af53af3a3f1c7641261bd605c9a441
SSPSolution/ResourceLib/DefineHeader.h
SSPSolution/ResourceLib/DefineHeader.h
#pragma once #define DLLEXPORT #ifdef DLLEXPORT #define DLL_OPERATION __declspec(dllexport) #endif #include <iostream>
#pragma once #ifdef RESOURCELIB_EXPORTS #define DLL_OPERATION __declspec(dllexport) #else #define DLL_OPERATION __declspec(dllimport) #endif #include <iostream>
FIX dllcondition to use the correct macro name
FIX dllcondition to use the correct macro name RESOURCELIB_EXPORTS is a defined preprocessor macro, not DLLEXPORTS
C
apache-2.0
Chringo/SSP,Chringo/SSP
55559595b273d87c11951b14f051dddb14cb5939
test/CodeGen/bitscan-builtins.c
test/CodeGen/bitscan-builtins.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s // Don't include mm_malloc.h, it's system specific. #define __MM_MALLOC_H #include <immintrin.h> int test_bit_scan_forward(int a) { return _bit_scan_forward(a); // CHECK: @test_bit_scan_forward // CHECK: %[[call:.*]] = call i32 @llvm.cttz.i32( // CHECK: ret i32 %[[call]] } int test_bit_scan_reverse(int a) { return _bit_scan_reverse(a); // CHECK: %[[call:.*]] = call i32 @llvm.ctlz.i32( // CHECK: %[[sub:.*]] = sub nsw i32 31, %2 // CHECK: ret i32 %[[sub]] }
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s // Don't include mm_malloc.h, it's system specific. #define __MM_MALLOC_H #include <immintrin.h> int test_bit_scan_forward(int a) { return _bit_scan_forward(a); // CHECK: @test_bit_scan_forward // CHECK: %[[call:.*]] = call i32 @llvm.cttz.i32( // CHECK: ret i32 %[[call]] } int test_bit_scan_reverse(int a) { return _bit_scan_reverse(a); // CHECK: %[[call:.*]] = call i32 @llvm.ctlz.i32( // CHECK: %[[sub:.*]] = sub nsw i32 31, %[[call]] // CHECK: ret i32 %[[sub]] }
Test fix -- use captured call result instead of hardcoded %2.
Test fix -- use captured call result instead of hardcoded %2. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@272573 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
cdd545fda02f9cc72a309c473a32377b70f66946
WildcardPattern.h
WildcardPattern.h
#import <Cocoa/Cocoa.h> @interface WildcardPattern : NSObject { NSString* pattern_; } - (id) initWithString: (NSString*) s; - (BOOL) isMatch: (NSString*) s; @end
/* * Copyright (c) 2006 KATO Kazuyoshi <[email protected]> * This source code is released under the MIT license. */ #import <Cocoa/Cocoa.h> @interface WildcardPattern : NSObject { NSString* pattern_; } - (id) initWithString: (NSString*) s; - (BOOL) isMatch: (NSString*) s; @end
Add copyright and license header.
Add copyright and license header.
C
mit
kzys/greasekit,sohocoke/greasekit,chrismessina/greasekit,tbodt/greasekit
71b81539a49b9f1645e4e79fa27073f7b0aab55a
CPPace/CPPace.Lib/SetFunctions.h
CPPace/CPPace.Lib/SetFunctions.h
#pragma once #include "Export.h" #include <set> #include <vector> using namespace std; class DLLEXPORT SetFunctions { public: static set<int> set_union_two(set<int>& s1, set<int>& s2); static set<int> set_intersect_two(set<int>& s1, set<int>& s2); static set<int> set_intersect_three(set<int>& s1, set<int>& s2, set<int>& s3); };
#pragma once #include "EXPORT.h" #include <set> #include <vector> using namespace std; class DLLEXPORT SetFunctions { public: static set<int> set_union_two(set<int>& s1, set<int>& s2); static set<int> set_intersect_two(set<int>& s1, set<int>& s2); static set<int> set_intersect_three(set<int>& s1, set<int>& s2, set<int>& s3); };
Correct casing of EXPORT.h import
Correct casing of EXPORT.h import
C
mit
Madsen90/Pace17,Madsen90/Pace17,Madsen90/Pace17
bd55c2cbfc4524de918cbfb53812bd6b93fe227a
src/lib/hex-dec.c
src/lib/hex-dec.c
/* Copyright (c) 2005-2011 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "hex-dec.h" void dec2hex(unsigned char *hexstr, uintmax_t dec, unsigned int hexstr_size) { unsigned int i; for (i = 0; i < hexstr_size; i++) { unsigned int value = dec & 0x0f; if (value < 10) hexstr[hexstr_size-i-1] = value + '0'; else hexstr[hexstr_size-i-1] = value - 10 + 'A'; dec >>= 4; } } uintmax_t hex2dec(const unsigned char *data, unsigned int len) { unsigned int i; uintmax_t value = 0; for (i = 0; i < len; i++) { value = value*0x10; if (data[i] >= '0' && data[i] <= '9') value += data[i]-'0'; else if (data[i] >= 'A' && data[i] <= 'F') value += data[i]-'A' + 10; else return 0; } return value; }
/* Copyright (c) 2005-2011 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "hex-dec.h" void dec2hex(unsigned char *hexstr, uintmax_t dec, unsigned int hexstr_size) { unsigned int i; for (i = 0; i < hexstr_size; i++) { unsigned int value = dec & 0x0f; if (value < 10) hexstr[hexstr_size-i-1] = value + '0'; else hexstr[hexstr_size-i-1] = value - 10 + 'A'; dec >>= 4; } } uintmax_t hex2dec(const unsigned char *data, unsigned int len) { unsigned int i; uintmax_t value = 0; for (i = 0; i < len; i++) { value = value*0x10; if (data[i] >= '0' && data[i] <= '9') value += data[i]-'0'; else if (data[i] >= 'A' && data[i] <= 'F') value += data[i]-'A' + 10; else if (data[i] >= 'a' && data[i] <= 'f') value += data[i]-'a' + 10; else return 0; } return value; }
Allow data to contain also lowercase hex characters.
hex2dec(): Allow data to contain also lowercase hex characters.
C
mit
LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot
7b252163dd1e7fb08f1e2651524bd93f0c5ef87e
include-cpp/RSUtil.h
include-cpp/RSUtil.h
#include <stdio.h> #include <stdint.h> extern "C" void RSFatalError(char *message); extern "C" void* RSMallocOrDie(size_t size); extern "C" void* RSCallocOrDie(size_t size); extern "C" void RSFReadOrDie(void *dest, size_t size, FILE *file); extern "C" void RSFWriteOrDie(void *data, size_t size, FILE *file); extern "C" FILE* RSFOpenOrDie(char *path, char *mode); extern "C" void RSFCloseOrDie(FILE *file); extern "C" void* RSReadFileOrDie(char *path, uint32_t *size); extern "C" int8_t RSReadInt8(uint8_t *data, uint32_t *offset); extern "C" uint8_t RSReadUInt8(uint8_t *data, uint32_t *offset); extern "C" int16_t RSReadInt16(uint8_t *data, uint32_t *offset); extern "C" uint16_t RSReadUInt16(uint8_t *data, uint32_t *offset); extern "C" int32_t RSReadInt32(uint8_t *data, uint32_t *offset); extern "C" uint32_t RSReadUInt32(uint8_t *data, uint32_t *offset); extern "C" int64_t RSReadInt64(uint8_t *data, uint32_t *offset); extern "C" uint64_t RSReadUInt64(uint8_t *data, uint32_t *offset);
Add a header for use from C++
Add a header for use from C++
C
mit
ReclaimSoftware/RSUtil
8e84757da4fb5ba9aa28b384d5c9df6e4faa16ac
src/magicmatcher_p.h
src/magicmatcher_p.h
#ifndef MAGICMATCHER_P_H #define MAGICMATCHER_P_H #include "magicmatcher.h" #include "qmimetype.h" #include <QtCore/QFileInfo> QT_BEGIN_NAMESPACE class FileMatchContext { Q_DISABLE_COPY(FileMatchContext) public: // Max data to be read from a file enum { MaxData = 2500 }; explicit FileMatchContext(const QFileInfo &fi); inline QString fileName() const { return m_fileName; } // Return (cached) first MaxData bytes of file QByteArray data(); private: const QFileInfo m_fileInfo; const QString m_fileName; enum State { // File cannot be read/does not exist NoDataAvailable, // Not read yet DataNotRead, // Available DataRead } m_state; QByteArray m_data; }; QT_END_NAMESPACE #endif // MAGICMATCHER_P_H
#ifndef MAGICMATCHER_P_H #define MAGICMATCHER_P_H #include "magicmatcher.h" #include "qmimetype.h" #include <QtCore/QFileInfo> QT_BEGIN_NAMESPACE class FileMatchContext { Q_DISABLE_COPY(FileMatchContext) public: // Max data to be read from a file // TODO: hardcoded values are no good, this should be done on demand // in order to respect the spec. Use QIODevice-based code from KMimeMagicRule. enum { MaxData = 2500 }; explicit FileMatchContext(const QFileInfo &fi); inline QString fileName() const { return m_fileName; } // Return (cached) first MaxData bytes of file QByteArray data(); private: const QFileInfo m_fileInfo; const QString m_fileName; enum State { // File cannot be read/does not exist NoDataAvailable, // Not read yet DataNotRead, // Available DataRead } m_state; QByteArray m_data; }; QT_END_NAMESPACE #endif // MAGICMATCHER_P_H
Add TODO. But first we need to parse mime.cache
Add TODO. But first we need to parse mime.cache
C
lgpl-2.1
qtproject/playground-mimetypes,d1vanov/qt4-mimetypes,d1vanov/qt4-mimetypes,d1vanov/qt4-mimetypes,qtproject/playground-mimetypes,qtproject/playground-mimetypes,qtproject/playground-mimetypes,d1vanov/qt4-mimetypes,d1vanov/qt4-mimetypes,d1vanov/qt4-mimetypes,qtproject/playground-mimetypes,qtproject/playground-mimetypes,qtproject/playground-mimetypes,d1vanov/qt4-mimetypes,d1vanov/qt4-mimetypes,qtproject/playground-mimetypes,qtproject/playground-mimetypes,d1vanov/qt4-mimetypes
cc0fdd497c22d442297ec0ac33578272acb7a462
include/avarix/register.h
include/avarix/register.h
/** * @file * @brief Tools to work with registers */ //@{ #ifndef AVARIX_REGISTER_H__ #define AVARIX_REGISTER_H__ #include <avr/io.h> /** @brief Set a register with I/O CCP disabled * * Interrupts are not disabled during the process. * * @note This can be achieved in less cycles for some I/O registers but this way * is generic. */ inline void ccp_io_write(volatile uint8_t* addr, uint8_t value) { asm volatile ( "out %0, %1\n\t" "st Z, %3\n\t" : : "i" (&CCP) , "r" (CCP_IOREG_gc) , "z" ((uint16_t)addr) , "r" (value) ); } #endif
/** * @file * @brief Tools to work with registers */ //@{ #ifndef AVARIX_REGISTER_H__ #define AVARIX_REGISTER_H__ #include <avr/io.h> /** @brief Set a register with I/O CCP disabled * * Interrupts are not disabled during the process. * * @note This can be achieved in less cycles for some I/O registers but this way * is generic. */ static inline void ccp_io_write(volatile uint8_t* addr, uint8_t value) { asm volatile ( "out %0, %1\n\t" "st Z, %3\n\t" : : "i" (&CCP) , "r" (CCP_IOREG_gc) , "z" ((uint16_t)addr) , "r" (value) ); } #endif
Fix ccp_io_write() not being static as it should
Fix ccp_io_write() not being static as it should
C
mit
robotter/avarix,robotter/avarix,robotter/avarix
fc7577a0dfaefd763430cd42476b5d09ce1ef394
msgpack/msgpack.h
msgpack/msgpack.h
// // msgpack.h // msgpack // // Created by Ricardo Pereira on 13/10/2017. // // #import <UIKit/UIKit.h> //! Project version number for msgpack. FOUNDATION_EXPORT double msgpackVersionNumber; //! Project version string for msgpack. FOUNDATION_EXPORT const unsigned char msgpackVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <msgpack/PublicHeader.h> #import "MessagePack.h"
// // msgpack.h // msgpack // // Created by Ricardo Pereira on 13/10/2017. // // #import <Foundation/Foundation.h> //! Project version number for msgpack. FOUNDATION_EXPORT double msgpackVersionNumber; //! Project version string for msgpack. FOUNDATION_EXPORT const unsigned char msgpackVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <msgpack/PublicHeader.h> #import "MessagePack.h"
Remove UIKit usage by replacing it with Foundation
Remove UIKit usage by replacing it with Foundation
C
apache-2.0
rvi/msgpack-objective-C,rvi/msgpack-objective-C,rvi/msgpack-objective-C
7635604e1ee2f7537c01a23a00b7d69d43c6f9df
test/test-env.c
test/test-env.c
#include <stdio.h> #include <assert.h> #include <string.h> #include <stdlib.h> #include <env.h> int main(int argc, char** argv) { char** env = malloc(2 * sizeof(char*)); char* result; env[0] = "NAME=value"; env[1] = NULL; result = env_get(env, "NAME"); printf("NAME=%s\n", result); assert(strcmp(result, "value") == 0); return 0; }
Add a test for `env_get`
[test] Add a test for `env_get`
C
mit
mmalecki/env,mmalecki/env
6611ff0042232589522e2b0f8bfe0f30b67e6d5e
IRCCloud/config.h
IRCCloud/config.h
// // config.h // IRCCloud // // Created by Sam Steele on 7/13/13. // Copyright (c) 2013 IRCCloud, Ltd. All rights reserved. // #ifndef IRCCloud_config_h #define IRCCloud_config_h #define HOCKEYAPP_TOKEN nil #define CRASHLYTICS_TOKEN nil #define CRASHLYTICS_SECRET nil #endif
// // config.h // IRCCloud // // Created by Sam Steele on 7/13/13. // Copyright (c) 2013 IRCCloud, Ltd. All rights reserved. // #ifndef IRCCloud_config_h #define IRCCloud_config_h #endif
Remove nil tokens from conf
Remove nil tokens from conf
C
apache-2.0
irccloud/ios,irccloud/ios,irccloud/ios,iOSTestApps/irccloud-ios,DreamHill/ios,irccloud/ios,irccloud/ios
9ee259d9a29d83d79d912d1716b4044c63e90343
tests/unit/glkunit.h
tests/unit/glkunit.h
#ifndef GLKUNIT_H #define GLKUNIT_H #include <stdio.h> #define _BEGIN do { #define _END } while(0); /* msg must be a string literal */ #define _ASSERT(expr, msg, ...) _BEGIN \ if( !(expr) ) { \ fprintf(stderr, "Assertion failed: " msg "\n", __VA_ARGS__); \ return 0; \ } _END #define SUCCEED _BEGIN return 1; _END #define ASSERT(expr) _ASSERT(expr, "%s", #expr) #define ASSERT_EQUAL(expected, actual) _ASSERT((expected) == (actual), "%s == %s", #expected, #actual); struct TestDescription { char *name; int (*testfunc)(void); }; #endif /* GLKUNIT_H */
#ifndef GLKUNIT_H #define GLKUNIT_H #include <stdio.h> #define _BEGIN do { #define _END } while(0); /* msg must be a string literal */ #define _ASSERT(expr, msg, ...) _BEGIN \ if( !(expr) ) { \ fprintf(stderr, "Assertion failed: " msg "\n", __VA_ARGS__); \ return 0; \ } _END #define SUCCEED _BEGIN return 1; _END #define ASSERT(expr) _ASSERT(expr, "%s", #expr) /* This macro is meant for int-like things that can print with %d */ #define ASSERT_EQUAL(expected, actual) _ASSERT((expected) == (actual), \ "%s == %s (expected %d, was %d)", \ #actual, #expected, expected, actual); struct TestDescription { char *name; int (*testfunc)(void); }; #endif /* GLKUNIT_H */
Print more informative assert message
Print more informative assert message ASSERT_EQUAL() is for int-like types that will print with %d.
C
bsd-3-clause
wmvanvliet/Chimara,wmvanvliet/Chimara,wmvanvliet/Chimara,wmvanvliet/Chimara,wmvanvliet/Chimara
1fd63e3c050a4f111b3d16e57ff1486b8b4cd1d2
test/small2/union6.c
test/small2/union6.c
#include "../small1/testharness.h" // NUMERRORS 1 union { struct { int *a, *b; } f1; int f2; } __TAGGED u; int i; int main() { u.f2 = 5; // now u.f1.a = 5 u.f1.b = &i; // now the tag says that u.f1 is active i = * u.f1.a; //ERROR(1): Null-pointer }
#include "../small1/testharness.h" // NUMERRORS 1 union { struct { int *a, *b; } f1; int f2; } __TAGGED u; int i; int main() { u.f2 = 5; // now u.f1.a = 5 u.f1.b = &i; // now the tag says that u.f1 is active i = * u.f1.a; //ERROR(1): Null pointer }
Fix a soundness bug in tagged unions that have fields larger than one word. This fix uses memset to clear such fields, although we could probably optimize this if needed.
Fix a soundness bug in tagged unions that have fields larger than one word. This fix uses memset to clear such fields, although we could probably optimize this if needed.
C
bsd-3-clause
samuelhavron/obliv-c,samuelhavron/obliv-c,samuelhavron/obliv-c,samuelhavron/obliv-c
2ceeda7df57fe3b8b438c509a33585efbcbd6f80
virvo/virvo/private/vvmessages.h
virvo/virvo/private/vvmessages.h
// Virvo - Virtual Reality Volume Rendering // Copyright (C) 1999-2003 University of Stuttgart, 2004-2005 Brown University // Contact: Jurgen P. Schulze, [email protected] // // This file is part of Virvo. // // Virvo 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 (see license.txt); if not, write to the // Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef VV_PRIVATE_MESSAGES_H #define VV_PRIVATE_MESSAGES_H #include "../vvparam.h" #include "../vvrenderer.h" #include "../vvvecmath.h" #include <istream> #include <ostream> namespace virvo { namespace messages { struct CameraMatrix { // The model-view matrix vvMatrix view; // The projection matrix vvMatrix proj; CameraMatrix() { } CameraMatrix(vvMatrix const& view, vvMatrix const& proj) : view(view) , proj(proj) { } template<class A> void serialize(A& a, unsigned /*version*/) { a & view; a & proj; } }; struct Param { // The name of the parameter vvRenderState::ParameterType name; // The actual parameter vvParam value; Param() : name(static_cast<vvRenderState::ParameterType>(0)) , value() { } Param(vvRenderState::ParameterType name, vvParam const& value) : name(name) , value(value) { } template<class A> void serialize(A& a, unsigned /*version*/) { int t = 0; a & t; /*name*/ a & value; name = static_cast<vvRenderState::ParameterType>(t); } }; struct WindowResize { int w; int h; WindowResize() { } WindowResize(int w, int h) : w(w) , h(h) { } template<class A> void serialize(A& a, unsigned /*version*/) { a & w; a & h; } }; } // namespace messages } // namespace virvo #endif
Add a utility header for virvo::Message.
Add a utility header for virvo::Message. Defines some structs wrapping multiple objects which make working with virvo::Message easier. TODO: Rewrite virvo::Message.
C
lgpl-2.1
deskvox/deskvox,deskvox/deskvox,deskvox/deskvox,deskvox/deskvox,deskvox/deskvox
661a72f697ab5a4a5b3e78194181ae90391b97ad
pkg/stis/calstis/include/stisversion.h
pkg/stis/calstis/include/stisversion.h
/* This string is written to the output primary header as CAL_VER. */ # define STIS_CAL_VER "2.28 (09-March-2010) cfitsio test"
/* This string is written to the output primary header as CAL_VER. */ # define STIS_CAL_VER "2.29 (24-March-2010) cfitsio test"
Change the version number and date.
Change the version number and date. git-svn-id: cc674101e2b794ddc2100b657215d55256e3fd48@8968 fe389314-cf27-0410-b35b-8c050e845b92
C
bsd-3-clause
jhunkeler/hstcal,jhunkeler/hstcal,jhunkeler/hstcal
a52a248ec8d38168dd15989ec6daacad1d43bdbb
test/Driver/amdgpu-toolchain.c
test/Driver/amdgpu-toolchain.c
// RUN: %clang -### -target amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s // AS_LINK-LABEL: clang // AS_LINK: "-cc1as" // AS_LINK-LABEL: lld // AS_LINK: "-flavor" "gnu" "-target" "amdgcn--amdhsa" // REQUIRES: clang-driver
// RUN: %clang -### -target amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s // AS_LINK: /clang // AS_LINK-SAME: "-cc1as" // AS_LINK: /lld // AS_LINK-SAME: "-flavor" "gnu" "-target" "amdgcn--amdhsa"
Fix test to pass when the directory name has lld in it.
Fix test to pass when the directory name has lld in it. CHECK-LABEL assumes that there is only one occurrence of the match. The output looks like: clang version 3.8.0 (trunk 247999) .... /path/to/build/dir/bin/clang-3.8 .... If the path contains lld, the second CHECK-LABEL matches it and we fail since there is no -cc1as between clang and lld. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@248029 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
bc4ecce4a99d230fe3e17861ebe54b3622e61335
include/llvm/Transforms/Instrumentation/TraceValues.h
include/llvm/Transforms/Instrumentation/TraceValues.h
// $Id$ -*-c++-*- //*************************************************************************** // File: // TraceValues.h // // Purpose: // Support for inserting LLVM code to print values at basic block // and method exits. Also exports functions to create a call // "printf" instruction with one of the signatures listed below. // // History: // 10/11/01 - Vikram Adve - Created //**************************************************************************/ #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H #define LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H class Module; class Method; class BasicBlock; class Instruction; class Value; class Type; //************************** External Functions ****************************/ //-------------------------------------------------------------------------- // Function GetPrintMethodForType // // Creates an external declaration for "printf". // The signatures supported are: // int printf(sbyte*, sbyte*, sbyte*, sbyte*, int intValue) // int printf(sbyte*, sbyte*, sbyte*, sbyte*, unsigned uintValue) // int printf(sbyte*, sbyte*, sbyte*, sbyte*, float floatValue) // int printf(sbyte*, sbyte*, sbyte*, sbyte*, double doubleValue) // int printf(sbyte*, sbyte*, sbyte*, sbyte*, char* stringValue) // int printf(sbyte*, sbyte*, sbyte*, sbyte*, void* ptrValue) // // The invocation should be: // call "printf"(fmt, bbName, valueName, valueType, value). //-------------------------------------------------------------------------- const Method* GetPrintMethodForType (Module* module, Type* vtype); //-------------------------------------------------------------------------- // Function CreatePrintInstr // // Creates an invocation of printf for the value `val' at the exit of the // basic block `bb'. isMethodExit specifies if this is a method exit, //-------------------------------------------------------------------------- Instruction* CreatePrintInstr (Value* val, const BasicBlock* bb, Module* module, unsigned int indent, bool isMethodExit); //-------------------------------------------------------------------------- // Function InsertCodeToTraceValues // // Inserts tracing code for all live values at basic block and/or method exits // as specified by `traceBasicBlockExits' and `traceMethodExits'. //-------------------------------------------------------------------------- void InsertCodeToTraceValues (Method* method, bool traceBasicBlockExits, bool traceMethodExits); //**************************************************************************/ #endif LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H
Insert code to trace values at basic block and method exits.
Insert code to trace values at basic block and method exits. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@801 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm
acf0dedb0e15ebb0cc98df0e00a1e7616dc16f4e
src/xdictlib.h
src/xdictlib.h
#ifndef H_XDICTLIB #define H_XDICTLIB #ifdef __cplusplus extern "C" { #endif #include <stdlib.h> /* The |xdict| interface. */ #define XDICT_MAXLENGTH 10 /* 0..9 characters */ struct xdict { struct word_entry *words[XDICT_MAXLENGTH]; size_t cap[XDICT_MAXLENGTH]; size_t len[XDICT_MAXLENGTH]; int sorted; }; struct word_entry { char *word; }; void xdict_init(struct xdict *d); int xdict_load(struct xdict *d, const char *fname); int xdict_addword(struct xdict *d, const char *word, int len); int xdict_remword(struct xdict *d, const char *word, int len); int xdict_remmatch(struct xdict *d, const char *pat, int len); void xdict_sort(struct xdict *d); int xdict_save(struct xdict *d, const char *fname); void xdict_free(struct xdict *d); int xdict_find(struct xdict *d, const char *pattern, int (*f)(const char *, void *), void *info); int xdict_match_simple(const char *w, const char *p); int xdict_match(const char *w, const char *p); #ifdef __cplusplus } #endif #endif
#ifndef H_XDICTLIB #define H_XDICTLIB #ifdef __cplusplus extern "C" { #endif #include <stdlib.h> /* The |xdict| interface. */ #define XDICT_MAXLENGTH 16 /* 0..15 characters */ struct xdict { struct word_entry *words[XDICT_MAXLENGTH]; size_t cap[XDICT_MAXLENGTH]; size_t len[XDICT_MAXLENGTH]; int sorted; }; struct word_entry { char *word; }; void xdict_init(struct xdict *d); int xdict_load(struct xdict *d, const char *fname); int xdict_addword(struct xdict *d, const char *word, int len); int xdict_remword(struct xdict *d, const char *word, int len); int xdict_remmatch(struct xdict *d, const char *pat, int len); void xdict_sort(struct xdict *d); int xdict_save(struct xdict *d, const char *fname); void xdict_free(struct xdict *d); int xdict_find(struct xdict *d, const char *pattern, int (*f)(const char *, void *), void *info); int xdict_match_simple(const char *w, const char *p); int xdict_match(const char *w, const char *p); #ifdef __cplusplus } #endif #endif
Increase XDICT_MAXLENGTH from 9+1 to 15+1.
Increase XDICT_MAXLENGTH from 9+1 to 15+1.
C
mit
Quuxplusone/xword
8e335e624ff0d5fd175459f3fc7daa6fc1b8b1f5
examples/traverse.c
examples/traverse.c
#include <stdio.h> typedef struct { int **y; int *x; } _inner; typedef _inner inner; typedef struct { int *g; inner in[3]; } outer; void traverse(outer *o) { static int sss = 5; inner *in = &(o->in[0]); for (size_t i = 0; i < 3; i++) { in->x = &sss; in++; sss += 3; } } int main(int argc, char *argv[]) { outer o2; traverse(&o2); return 0; }
Add inner struct iteration example
Add inner struct iteration example
C
mit
plast-lab/llvm-datalog,plast-lab/cclyzer
2b803a4d6e2f425633eabf2a364ffd9972a1b3d0
src/Divider.h
src/Divider.h
#ifndef DIVIDER_H #define DIVIDER_H class Divider { public: Divider(int interval = 1) { setInterval(interval); } void setInterval(int interval) { this->interval = interval; clockCounter = interval - 1; } void tick() { clockCounter++; if (clockCounter == interval) { clockCounter = 0; } } bool hasClocked() { return clockCounter == 0; } private: int interval; int clockCounter; }; #endif
#ifndef DIVIDER_H #define DIVIDER_H class Divider { public: Divider(int interval = 1) { setInterval(interval); reset(); } void setInterval(int interval) { if (interval < 1) { resetValue = 0; } else { resetValue = interval - 1; } } void reset() { clockCounter = resetValue; } void tick() { if (clockCounter == 0) { clockCounter = resetValue; } else { --clockCounter; } } bool hasClocked() { return clockCounter == resetValue; } private: int resetValue; int clockCounter; }; #endif
Rewrite divider to change interval without resetting it
Rewrite divider to change interval without resetting it
C
mit
scottjcrouch/ScootNES,scottjcrouch/ScootNES,scottjcrouch/ScootNES
02768e952fd7f1789b146ebbfdc6ecdd54e3f72a
UIforETW/Version.h
UIforETW/Version.h
#pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. const float kCurrentVersion = 1.48f; // Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version // increment that won't trigger the new-version checks, handy for minor // releases that I don't want to bother users about. //#define VERSION_SUFFIX 'b'
#pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. const float kCurrentVersion = 1.49f; // Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version // increment that won't trigger the new-version checks, handy for minor // releases that I don't want to bother users about. //#define VERSION_SUFFIX 'b'
Increment version number to 1.49
Increment version number to 1.49
C
apache-2.0
google/UIforETW,mwinterb/UIforETW,mwinterb/UIforETW,ariccio/UIforETW,mwinterb/UIforETW,google/UIforETW,ariccio/UIforETW,ariccio/UIforETW,google/UIforETW,google/UIforETW,ariccio/UIforETW
619091d3ae52943e7dfd093073eb4027146e093f
platform/VersatilePB/srcs/poweroff.c
platform/VersatilePB/srcs/poweroff.c
/* * copyright 2015 wink saville * * 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. */ #include "poweroff.h" #include "inttypes.h" void poweroff(void) { uint32_t* pUnlockResetReg = (uint32_t*)0x10000020; uint32_t* pResetReg = (uint32_t*)0x10000040; // If qemu is executed with -no-reboot option then // resetting the board will cause qemu to exit // and it won't be necessary to ctrl-a, x to exit. // See http://lists.nongnu.org/archive/html/qemu-discuss/2015-10/msg00057.html // For arm926ej-s you unlock the reset register // then reset the board, I'm resetting to level 6 *pUnlockResetReg = 0xA05F; *pResetReg = 0x106; }
/* * copyright 2015 wink saville * * 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. */ #include "poweroff.h" #include "inttypes.h" void poweroff(void) { volatile uint32_t* pUnlockResetReg = (uint32_t*)0x10000020; volatile uint32_t* pResetReg = (uint32_t*)0x10000040; // If qemu is executed with -no-reboot option then // resetting the board will cause qemu to exit // and it won't be necessary to ctrl-a, x to exit. // See http://lists.nongnu.org/archive/html/qemu-discuss/2015-10/msg00057.html // For arm926ej-s you unlock the reset register // then reset the board, I'm resetting to level 6 *pUnlockResetReg = 0xA05F; *pResetReg = 0x106; }
Make the registers address point to volatile memory.
Make the registers address point to volatile memory.
C
apache-2.0
winksaville/sadie,winksaville/sadie
9dc6b784c3c1a4c800ee111e2d317d2ddd02fb2b
src/HDD/FileSystem.h
src/HDD/FileSystem.h
#ifndef FILESYSTEM_H #define FILESYSTEM_H #include "Partition.h" #include <vector> #include <string> class Directory; enum class FileType { File, Directory }; class File : public HDDBytes { std::string _name; public: std::string getName(){return _name;} //virtual void setName(const std::string& name) = 0; //virtual Directory * getParent() = 0; // null => root directory virtual FileType getType(); virtual Directory * dir() {return nullptr;}; }; class Directory : public virtual File { public : virtual std::vector<std::string> getFilesName () = 0; FileType getType(); virtual File * operator[](const std::string& name) = 0; // nullptr means it does not exists virtual Directory * dir() {return this;}; }; class FileSystem { protected : Partition* _part; public: explicit FileSystem (Partition * part); virtual Directory* getRoot() = 0; //virtual File* operator [] (const std::string& path) = 0; //return null when path is not valid }; #endif
#ifndef FILESYSTEM_H #define FILESYSTEM_H #include "Partition.h" #include <vector> #include <string> class Directory; enum class FileType { File, Directory }; class File : public HDDBytes { public: virtual FileType getType(); virtual Directory * dir() {return nullptr;}; }; class Directory : public virtual File { public : virtual std::vector<std::string> getFilesName () = 0; FileType getType(); virtual File * operator[](const std::string& name) = 0; // nullptr means it does not exists virtual Directory * dir() {return this;}; }; class FileSystem { protected : Partition* _part; public: explicit FileSystem (Partition * part); virtual Directory* getRoot() = 0; //virtual File* operator [] (const std::string& path) = 0; //return null when path is not valid }; #endif
Remove unused methods in File
Remove unused methods in File
C
mit
TWal/ENS_sysres,TWal/ENS_sysres,TWal/ENS_sysres,TWal/ENS_sysres
03e4a15a06dc49f066d3ead31abec4fb28ac4704
include/symbol.h
include/symbol.h
#ifndef SCC_SYMBOL_HEADER #define SCC_SYMBOL_HEADER #include "syntax.h" typedef struct Symbol { int level; char *name; // used in semantic analysis Syntax * declaration; // used in intermediate code generation char *var_name; } Symbol; Symbol * symbol_new(); void symbol_delete(Symbol * symbol); #endif
#ifndef SCC_SYMBOL_HEADER #define SCC_SYMBOL_HEADER #include "syntax.h" typedef struct Symbol { int level; char *name; union { // used in semantic analysis Syntax * declaration; // used in intermediate code generation char *var_name; // used in target code generation int address; }; } Symbol; Symbol * symbol_new(); void symbol_delete(Symbol * symbol); #endif
Add a member for target code generation.
Add a member for target code generation.
C
mit
RyanWangGit/scc
73e462ea03a4b93d911020d5f9cf0a0cb3f4e286
src/engine/entity/include/halley/entity/entity_id.h
src/engine/entity/include/halley/entity/entity_id.h
#pragma once #include <cstdint> #include "halley/bytes/config_node_serializer.h" namespace Halley { class World; struct alignas(8) EntityId { int64_t value; EntityId() : value(-1) {} explicit EntityId(const String& str); bool isValid() const { return value != -1; } bool operator==(const EntityId& other) const { return value == other.value; } bool operator!=(const EntityId& other) const { return value != other.value; } bool operator<(const EntityId& other) const { return value < other.value; } bool operator>(const EntityId& other) const { return value > other.value; } bool operator<=(const EntityId& other) const { return value <= other.value; } bool operator>=(const EntityId& other) const { return value >= other.value; } String toString() const; void serialize(Serializer& s) const; void deserialize(Deserializer& s); }; template <> class ConfigNodeSerializer<EntityId> { public: ConfigNode serialize(EntityId id, const EntitySerializationContext& context); EntityId deserialize(const EntitySerializationContext& context, const ConfigNode& node); }; } namespace std { template<> struct hash<Halley::EntityId> { size_t operator()(const Halley::EntityId& v) const noexcept { return std::hash<int64_t>()(v.value); } }; }
#pragma once #include <cstdint> #include "halley/bytes/config_node_serializer.h" namespace Halley { class World; struct alignas(8) EntityId { int64_t value; EntityId(int64_t value = -1) : value(value) {} explicit EntityId(const String& str); bool isValid() const { return value != -1; } bool operator==(const EntityId& other) const { return value == other.value; } bool operator!=(const EntityId& other) const { return value != other.value; } bool operator<(const EntityId& other) const { return value < other.value; } bool operator>(const EntityId& other) const { return value > other.value; } bool operator<=(const EntityId& other) const { return value <= other.value; } bool operator>=(const EntityId& other) const { return value >= other.value; } String toString() const; void serialize(Serializer& s) const; void deserialize(Deserializer& s); }; template <> class ConfigNodeSerializer<EntityId> { public: ConfigNode serialize(EntityId id, const EntitySerializationContext& context); EntityId deserialize(const EntitySerializationContext& context, const ConfigNode& node); }; } namespace std { template<> struct hash<Halley::EntityId> { size_t operator()(const Halley::EntityId& v) const noexcept { return std::hash<int64_t>()(v.value); } }; }
Allow creating EntityId directly from int64_t
Allow creating EntityId directly from int64_t
C
apache-2.0
amzeratul/halley,amzeratul/halley,amzeratul/halley
e3782eb8f2e649d1f6eaa00aa5f966a74d564d5d
src/brpc/session_log.h
src/brpc/session_log.h
// 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. #ifndef BRPC_SESSION_LOG_H #define BRPC_SESSION_LOG_H #include "butil/containers/flat_map.h" namespace brpc { class SessionLog { public: class Formatter { public: virtual ~Formatter() {} virtual void Print(std::ostream&, const SessionLog&) = 0; }; typedef butil::FlatMap<std::string, std::string> Map; typedef Map::const_iterator Iterator; SessionLog() {} // Exchange internal fields with another SessionLog. void Swap(SessionLog &rhs) { _entries.swap(rhs._entries); } // Reset internal fields as if they're just default-constructed. void Clear() { _entries.clear(); } // Get value of a key(case-sensitive) // Return pointer to the value, NULL on not found. const std::string* Get(const char* key) const { return _entries.seek(key); } const std::string* Get(const std::string& key) const { return _entries.seek(key); } // Set value of a key void Set(const std::string& key, const std::string& value) { GetOrAdd(key) = value; } void Set(const std::string& key, const char* value) { GetOrAdd(key) = value; } // Convert other types to string as well template <typename T> void Set(const std::string& key, const T& value) { GetOrAdd(key) = std::to_string(value); } // Remove a key void Remove(const char* key) { _entries.erase(key); } void Remove(const std::string& key) { _entries.erase(key); } // Get iterators to iterate key/value Iterator Begin() const { return _entries.begin(); } Iterator End() const { return _entries.end(); } // number of key/values size_t Count() const { return _entries.size(); } private: std::string& GetOrAdd(const std::string& key) { if (!_entries.initialized()) { _entries.init(29); } return _entries[key]; } Map _entries; }; } // namespace brpc #endif // BRPC_SESSION_LOG_H
Add SessionLog to remember session-level kv
Add SessionLog to remember session-level kv
C
apache-2.0
brpc/brpc,brpc/brpc,brpc/brpc,brpc/brpc,brpc/brpc
b2719779033044ea4d5fd85660c5ff44338cb6fe
graphgolf/graph.h
graphgolf/graph.h
#include "base/base.h" class Graph { public: typedef int16_t Node; typedef int16_t Degree; Graph(Node order, Degree degree) : order_(order), degree_(degree), edges_(order * degree, -1) {} inline Node order() { return order_; } inline Degree degree() { return degree_; } // Returns the de Node GetEdge(Node order_index, Degree degree_index); private: const Node order_; const Degree degree_; vector<Node> edges_; };
#include "base/base.h" class Graph { public: typedef int16_t Node; typedef int16_t Degree; Graph(Node order, Degree degree) : order_(order), degree_(degree), edges_(order * degree, -1) {} inline Node order() { return order_; } inline Degree degree() { return degree_; } // Returns the order_index node's degree_index-th edge's node. Returns -1 if // there is no such an edge. Node GetEdge(Node order_index, Degree degree_index); private: const Node order_; const Degree degree_; vector<Node> edges_; };
Update the comment for Graph::GetEdge.
Update the comment for Graph::GetEdge.
C
mit
imos/graphgolf,imos/graphgolf,imos/graphgolf
129344a783dc4f410f2afb6273a043628cb0a846
config.h
config.h
#ifndef CJET_CONFIG_H #define CJET_CONFIG_H #define SERVER_PORT \ 11122 #define LISTEN_BACKLOG \ 40 #define MAX_MESSAGE_SIZE \ 250 /* Linux specific configs */ #define MAX_EPOLL_EVENTS \ 100 #endif
#ifndef CJET_CONFIG_H #define CJET_CONFIG_H #define SERVER_PORT \ 11122 #define LISTEN_BACKLOG \ 40 #define MAX_MESSAGE_SIZE \ 256 /* Linux specific configs */ #define MAX_EPOLL_EVENTS \ 100 #endif
Change MAX_BUFFER_SIZE to something that is 32 bit aligned.
Change MAX_BUFFER_SIZE to something that is 32 bit aligned.
C
mit
gatzka/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,mloy/cjet,gatzka/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet
7293630908ab9fce7a0e23ca32fee5924bf7ff74
include/libc/stdio.h
include/libc/stdio.h
#ifndef _STDIO_H_ #define _STDIO_H_ /** * \file stdio.h * \brief This file handle the output to the terminal for the user. */ #ifdef __cplusplus extern "C" { #endif #ifndef EOF #define EOF -1 /*!< End of file value */ #endif /** * \brief Print a formatted string * * \param[in] format Format of the string * \param[in] ... Arguments for format specification * * \return Number of characters written */ int printf(const char* __restrict format, ...); /** * \brief Print a single char * * \param c Character to print * * \return The character written */ int putchar(int c); /** * \brief Print a string * * \param string The string to print * * \return The number of characters written */ int puts(const char* string); #ifdef __cplusplus } #endif #endif
#ifndef _STDIO_H_ #define _STDIO_H_ /** * \file stdio.h * \brief This file handle the output to the terminal for the user. */ #ifdef __cplusplus extern "C" { #endif #ifndef EOF #define EOF -1 /*!< End of file value */ #endif /** * \brief Print a formatted string * * \param[in] format Format of the string * \param[in] ... Arguments for format specification * * \return Number of characters written */ int printf(const char* __restrict format, ...); /** * \brief Print a formatted string into another string * * \param[out] out String we want to write in * \param[in] format Format of the string * \param[in] ... Arguments for format specification * * \return Number of characters written */ int sprintf(char* out, const char* __restrict format, ...); /** * \brief Print a single char * * \param c Character to print * * \return The character written */ int putchar(int c); /** * \brief Print a string * * \param string The string to print * * \return The number of characters written */ int puts(const char* string); #ifdef __cplusplus } #endif #endif
Add signature for sprintf function
feat(sprintf): Add signature for sprintf function
C
mit
Rarioty/FlowS
1aa266b2b3406f046e00b65bb747a19c6d4445d7
src/cons.h
src/cons.h
#ifndef MCLISP_CONS_H_ #define MCLISP_CONS_H_ #include <string> namespace mclisp { class ConsCell { public: ConsCell(): car(nullptr), cdr(nullptr) {} ConsCell(ConsCell* car, ConsCell* cdr): car(car), cdr(cdr) {} ConsCell* car; ConsCell* cdr; }; bool operator==(const ConsCell& lhs, const ConsCell& rhs); bool operator!=(const ConsCell& lhs, const ConsCell& rhs); bool operator< (const ConsCell& lhs, const ConsCell& rhs); bool operator> (const ConsCell& lhs, const ConsCell& rhs); bool operator<=(const ConsCell& lhs, const ConsCell& rhs); bool operator>=(const ConsCell& lhs, const ConsCell& rhs); std::ostream& operator<<(std::ostream& os, const ConsCell& cons); extern const ConsCell* kNil; extern const ConsCell* kT; void HackToFixNil(); const ConsCell* MakeSymbol(const std::string& name); const ConsCell* MakeCons(const ConsCell* car, const ConsCell* cdr); inline bool Symbolp(const ConsCell* c); inline bool Consp(const ConsCell* c); const std::string SymbolName(const ConsCell* symbol); } // namespace mclisp #endif // MCLISP_CONS_H_
#ifndef MCLISP_CONS_H_ #define MCLISP_CONS_H_ #include <string> namespace mclisp { struct ConsCell { ConsCell* car; ConsCell* cdr; }; typedef struct ConsCell ConsCell; bool operator==(const ConsCell& lhs, const ConsCell& rhs); bool operator!=(const ConsCell& lhs, const ConsCell& rhs); bool operator< (const ConsCell& lhs, const ConsCell& rhs); bool operator> (const ConsCell& lhs, const ConsCell& rhs); bool operator<=(const ConsCell& lhs, const ConsCell& rhs); bool operator>=(const ConsCell& lhs, const ConsCell& rhs); std::ostream& operator<<(std::ostream& os, const ConsCell& cons); extern const ConsCell* kNil; extern const ConsCell* kT; void HackToFixNil(); const ConsCell* MakeSymbol(const std::string& name); const ConsCell* MakeCons(const ConsCell* car, const ConsCell* cdr); inline bool Symbolp(const ConsCell* c); inline bool Consp(const ConsCell* c); const std::string SymbolName(const ConsCell* symbol); } // namespace mclisp #endif // MCLISP_CONS_H_
Convert ConsCell from class to POD.
Convert ConsCell from class to POD.
C
mit
appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp
67c8b90938cc84b1f1f5d9dbe0e84645ba448c5d
src/main.c
src/main.c
#include "config.h" #include "core/pwm.h" #include "core/usart.h" #include <avr/io.h> #include <util/delay.h> void delayms(uint16_t millis) { while ( millis ) { _delay_ms(1); millis--; } } int main(void) { DDRB |= 1<<PB0; usart_init(); pwm_init(); pwm_set(0); while(1) { if(char_fifo_is_empty(usart_recv_fifo())) usart_send_char(char_fifo_pop(usart_recv_fifo())); } return 0; }
#include "config.h" #include "core/pwm.h" #include "core/usart.h" #include "utils/char_fifo.h" #include <avr/io.h> #include <util/delay.h> void delayms(uint16_t millis) { while ( millis ) { _delay_ms(1); millis--; } } int main(void) { DDRB |= 1<<PB0; usart_init(); pwm_init(); pwm_set(0); char ch; while(1) { if(char_fifo_is_empty(usart_recv_fifo())) char_fifo_pop(usart_recv_fifo(), &ch); usart_send_char(ch); } return 0; }
Use correct args in usart test
Use correct args in usart test
C
mit
greghaynes/Convik,greghaynes/Convik
66e82787c9bf280da5f4f1e6562eff0cd751d9f8
str.c
str.c
#include <Python.h> int main(int argc, char *argv[]) { PyObject *expr[3]; int i, s, e, r; char *res; if(argc<5) { fprintf(stderr,"Usage: <string> <start> <end> <repeat>\n\n\ Print string[start:end]*repeat"); exit(0); } s = atoi(argv[2]); e = atoi(argv[3]); r = atoi(argv[4]); expr[0] = PyString_FromString(argv[1]); expr[1] = PySequence_GetSlice(expr[0], s, e); expr[2] = PySequence_Repeat(expr[1], r); res=PyString_AsString(expr[2]); printf("'%s'\n",res); for(i=0; i<3; i++) Py_CLEAR(expr[i]); return 0; }
#include <Python.h> int main(int argc, char *argv[]) { PyObject *expr[3]; int i, s, e, r; char *res; if(argc<5) { fprintf(stderr,"Usage: <string> <start> <end> <repeat>\n\n\ Print string[start:end]*repeat\n"); exit(0); } s = atoi(argv[2]); e = atoi(argv[3]); r = atoi(argv[4]); expr[0] = PyString_FromString(argv[1]); expr[1] = PySequence_GetSlice(expr[0], s, e); expr[2] = PySequence_Repeat(expr[1], r); res=PyString_AsString(expr[2]); printf("'%s'\n",res); for(i=0; i<3; i++) Py_CLEAR(expr[i]); return 0; }
Add newline end end of usage
Add newline end end of usage
C
mit
ein-shved/libpyhon,ein-shved/libpyhon
605cce4a8b87c2e92fcdd047383997ab1df0178d
src/lib/str-sanitize.c
src/lib/str-sanitize.c
/* Copyright (c) 2004 Timo Sirainen */ #include "lib.h" #include "str.h" #include "str-sanitize.h" void str_sanitize_append(string_t *dest, const char *src, size_t max_len) { const char *p; for (p = src; *p != '\0'; p++) { if ((unsigned char)*p < 32) break; } str_append_n(dest, src, (size_t)(p - src)); for (; *p != '\0' && max_len > 0; p++, max_len--) { if ((unsigned char)*p < 32) str_append_c(dest, '?'); else str_append_c(dest, *p); } if (*p != '\0') { str_truncate(dest, str_len(dest)-3); str_append(dest, "..."); } } const char *str_sanitize(const char *src, size_t max_len) { string_t *str; str = t_str_new(I_MIN(max_len, 256)); str_sanitize_append(str, src, max_len); return str_c(str); }
/* Copyright (c) 2004 Timo Sirainen */ #include "lib.h" #include "str.h" #include "str-sanitize.h" void str_sanitize_append(string_t *dest, const char *src, size_t max_len) { const char *p; for (p = src; *p != '\0'; p++) { if (((unsigned char)*p & 0x7f) < 32) break; } str_append_n(dest, src, (size_t)(p - src)); for (; *p != '\0' && max_len > 0; p++, max_len--) { if (((unsigned char)*p & 0x7f) < 32) str_append_c(dest, '?'); else str_append_c(dest, *p); } if (*p != '\0') { str_truncate(dest, str_len(dest)-3); str_append(dest, "..."); } } const char *str_sanitize(const char *src, size_t max_len) { string_t *str; str = t_str_new(I_MIN(max_len, 256)); str_sanitize_append(str, src, max_len); return str_c(str); }
Convert also 0x80..0x9f characters to '?'
Convert also 0x80..0x9f characters to '?' --HG-- branch : HEAD
C
mit
dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot
a31814531fae98e97d5f6938ed14e7f161e41a8f
list.h
list.h
#include <stdlib.h> #ifndef __LIST_H__ #define __LIST_H__ #endif
#include <stdlib.h> #ifndef __LIST_H__ #define __LIST_H__ struct ListNode; struct List; typedef struct ListNode ListNode; typedef struct List List; #endif
Add List & ListNode struct declarations
Add List & ListNode struct declarations
C
mit
MaxLikelihood/CADT
cae4a5ca43323eb861d702f880a6c62dd5ef4fc5
test/Sema/attr-print.c
test/Sema/attr-print.c
// RUN: %clang_cc1 %s -ast-print -fms-extensions | FileCheck %s // FIXME: we need to fix the "BoolArgument<"IsMSDeclSpec">" // hack in Attr.td for attribute "Aligned". // CHECK: int x __attribute__((aligned(4, 0))); int x __attribute__((aligned(4))); // FIXME: Print this at a valid location for a __declspec attr. // CHECK: int y __declspec(align(4, 1)); __declspec(align(4)) int y; // CHECK: void foo() __attribute__((const)); void foo() __attribute__((const)); // CHECK: void bar() __attribute__((__const)); void bar() __attribute__((__const));
// RUN: %clang_cc1 %s -ast-print -fms-extensions | FileCheck %s // FIXME: we need to fix the "BoolArgument<"IsMSDeclSpec">" // hack in Attr.td for attribute "Aligned". // CHECK: int x __attribute__((aligned(4, 0))); int x __attribute__((aligned(4))); // FIXME: Print this at a valid location for a __declspec attr. // CHECK: int y __declspec(align(4, 1)); __declspec(align(4)) int y; // CHECK: void foo() __attribute__((const)); void foo() __attribute__((const)); // CHECK: void bar() __attribute__((__const)); void bar() __attribute__((__const)); // FIXME: Print these at a valid location for these attributes. // CHECK: int *p32 __ptr32; int * __ptr32 p32; // CHECK: int *p64 __ptr64; int * __ptr64 p64;
Test that we print MS keyword attributes without a __declspec(...) adornment.
Test that we print MS keyword attributes without a __declspec(...) adornment. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@173754 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
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,apple/swift-clang,llvm-mirror/clang,apple/swift-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
e7b04e58651772a1356d3a44a9ef9698c85b04bc
tools/halide_image.h
tools/halide_image.h
#ifndef HALIDE_TOOLS_IMAGE_H #define HALIDE_TOOLS_IMAGE_H /* This allows code that relied on halide_image.h and Halide::Tools::Image to continue to work with newer versions of Halide where HalideBuffer.h and Halide::Buffer are the way to work with data. Besides mapping Halide::Tools::Image to Halide::Buffer, it defines USING_HALIDE_BUFFER to allow code to conditionally compile for one or the other. It is intended as a stop-gap measure until the code can be updated. */ #include "HalideBuffer.h" namespace Halide { namespace Tools { #define USING_HALIDE_BUFFER template< typename T > using Image = Buffer<T>; } // namespace Tools } // mamespace Halide #endif // #ifndef HALIDE_TOOLS_IMAGE_H
#ifndef HALIDE_TOOLS_IMAGE_H #define HALIDE_TOOLS_IMAGE_H /** \file * * This allows code that relied on halide_image.h and * Halide::Tools::Image to continue to work with newer versions of * Halide where HalideBuffer.h and Halide::Buffer are the way to work * with data. * * Besides mapping Halide::Tools::Image to Halide::Buffer, it defines * USING_HALIDE_BUFFER to allow code to conditionally compile for one * or the other. * * It is intended as a stop-gap measure until the code can be updated. */ #include "HalideBuffer.h" namespace Halide { namespace Tools { #define USING_HALIDE_BUFFER template< typename T > using Image = Buffer<T>; } // namespace Tools } // mamespace Halide #endif // #ifndef HALIDE_TOOLS_IMAGE_H
Reformat comment into Doxygen comment for file.
Reformat comment into Doxygen comment for file. Former-commit-id: f651d51d97b75f12ba68f1cbfca914724136d121
C
mit
Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide
b185c602c375f44bff2c9eb0362d0debbce728fd
K2Status-static-ImportExport/include/k2info.h
K2Status-static-ImportExport/include/k2info.h
#include "k2pktdef.h" #define TRACE2_STA_LEN 7 #define TRACE2_CHAN_LEN 9 /* 4 bytes plus padding for loc and version */ #define TRACE2_NET_LEN 9 #define TRACE2_LOC_LEN 3 #define K2INFO_TYPE_STRING "TYPE_K2INFO_PACKET" typedef struct { char net[TRACE2_NET_LEN]; /* Network name */ char sta[TRACE2_STA_LEN]; /* Site name */ qint16 data_type; /* see K2INFO_TYPE #defines below */ quint32 epoch_sent; /* local time sent */ quint16 reserved[5]; /* reserved for future use */ } K2INFO_HEADER; #define K2INFO_TYPE_HEADER 1 /* k2 header params */ #define K2INFO_TYPE_STATUS 2 /* k2 regular status packet */ #define K2INFO_TYPE_ESTATUS 3 /* k2 extended status packet (old) */ #define K2INFO_TYPE_E2STATUS 4 /* k2 extended status packet v2 */ #define K2INFO_TYPE_COMM 5 /* k2ew packet processing stats */ #define MAX_K2INFOBUF_SIZ 4096 typedef union { qint8 msg[MAX_K2INFOBUF_SIZ]; K2INFO_HEADER k2info; } K2infoPacket;
#include "k2pktdef.h" #define TRACE2_STA_LEN 7 #define TRACE2_CHAN_LEN 9 /* 4 bytes plus padding for loc and version */ #define TRACE2_NET_LEN 9 #define TRACE2_LOC_LEN 3 #define K2_TIME_CONV ((unsigned long)315532800) #define K2INFO_TYPE_STRING "TYPE_K2INFO_PACKET" typedef struct { char net[TRACE2_NET_LEN]; /* Network name */ char sta[TRACE2_STA_LEN]; /* Site name */ qint16 data_type; /* see K2INFO_TYPE #defines below */ quint32 epoch_sent; /* local time sent */ quint16 reserved[5]; /* reserved for future use */ } K2INFO_HEADER; #define K2INFO_TYPE_HEADER 1 /* k2 header params */ #define K2INFO_TYPE_STATUS 2 /* k2 regular status packet */ #define K2INFO_TYPE_ESTATUS 3 /* k2 extended status packet (old) */ #define K2INFO_TYPE_E2STATUS 4 /* k2 extended status packet v2 */ #define K2INFO_TYPE_COMM 5 /* k2ew packet processing stats */ #define MAX_K2INFOBUF_SIZ 4096 typedef union { qint8 msg[MAX_K2INFOBUF_SIZ]; K2INFO_HEADER k2info; } K2infoPacket;
Make 64Bit Friendly, NonStatic for Ubuntu 14.04 delete unneeded files
Make 64Bit Friendly, NonStatic for Ubuntu 14.04 delete unneeded files
C
lgpl-2.1
Fran89/K2Status,Fran89/K2Status
7ff47de1c579051233f28dd03e19755de3549246
libyara/include/yara/sizedstr.h
libyara/include/yara/sizedstr.h
/* Copyright (c) 2007-2014. The YARA Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #ifndef _SIZEDSTR_H #define _SIZEDSTR_H #include <stddef.h> #include <inttypes.h> // // This struct is used to support strings containing null chars. The length of // the string is stored along the string data. However the string data is also // terminated with a null char. // #define SIZED_STRING_FLAGS_NO_CASE 1 #define SIZED_STRING_FLAGS_DOT_ALL 2 #pragma pack(push) #pragma pack(8) typedef struct _SIZED_STRING { uint64_t length; uint32_t flags; char c_string[1]; } SIZED_STRING; #pragma pack(pop) int sized_string_cmp( SIZED_STRING* s1, SIZED_STRING* s2); #endif
/* Copyright (c) 2007-2014. The YARA Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #ifndef _SIZEDSTR_H #define _SIZEDSTR_H #include <stddef.h> #include <inttypes.h> // // This struct is used to support strings containing null chars. The length of // the string is stored along the string data. However the string data is also // terminated with a null char. // #define SIZED_STRING_FLAGS_NO_CASE 1 #define SIZED_STRING_FLAGS_DOT_ALL 2 #pragma pack(push) #pragma pack(8) typedef struct _SIZED_STRING { uint32_t length; uint32_t flags; char c_string[1]; } SIZED_STRING; #pragma pack(pop) int sized_string_cmp( SIZED_STRING* s1, SIZED_STRING* s2); #endif
Change type of SIZED_STRING's length to uint32_t
Change type of SIZED_STRING's length to uint32_t
C
bsd-3-clause
jpypi/yara,VirusTotal/yara,MeteorAdminz/yara,wxsBSD/yara,pombredanne/yara,plusvic/yara,hillu/yara,bmagistro/yara,bmagistro/yara,kallanreed/yara,wxsBSD/yara,plusvic/yara,cblichmann/yara,plusvic/yara,cblichmann/yara,rednaga/yara,hillu/yara,MeteorAdminz/yara,kallanreed/yara,VirusTotal/yara,hillu/yara,jpypi/yara,VirusTotal/yara,VirusTotal/yara,cblichmann/yara,msuvajac/yara,wxsBSD/yara,cblichmann/yara,pombredanne/yara,plusvic/yara,plusvic/yara,kallanreed/yara,wxsBSD/yara,pombredanne/yara,pombredanne/yara,hillu/yara,tanium/yara,tanium/yara,msuvajac/yara,MeteorAdminz/yara,tanium/yara,bmagistro/yara,cblichmann/yara,jpypi/yara,VirusTotal/yara,rednaga/yara,msuvajac/yara,rednaga/yara,hillu/yara,wxsBSD/yara,pombredanne/yara
55d1b6a7f7b1bece532c57cc05eb8b44812ce842
test/Sema/nonnull-check.c
test/Sema/nonnull-check.c
// RUN: clang-cc -Wnonnull -fsyntax-only -verify %s extern void func1 (void (^block1)(), void (^block2)(), int) __attribute__((nonnull)); extern void func3 (void (^block1)(), int, void (^block2)(), int) __attribute__((nonnull(1,3))); extern void func4 (void (^block1)(), void (^block2)()) __attribute__((nonnull(1))) __attribute__((nonnull(2))); void foo (int i1, int i2, int i3, void (^cp1)(), void (^cp2)(), void (^cp3)()) { func1(cp1, cp2, i1); func1(0, cp2, i1); // expected-warning {{argument is null where non-null is required}} func1(cp1, 0, i1); // expected-warning {{argument is null where non-null is required}} func1(cp1, cp2, 0); func3(0, i2, cp3, i3); // expected-warning {{argument is null where non-null is required}} func3(cp3, i2, 0, i3); // expected-warning {{argument is null where non-null is required}} func4(0, cp1); // expected-warning {{argument is null where non-null is required}} func4(cp1, 0); // expected-warning {{argument is null where non-null is required}} }
// RUN: clang-cc -fblocks -Wnonnull -fsyntax-only -verify %s extern void func1 (void (^block1)(), void (^block2)(), int) __attribute__((nonnull)); extern void func3 (void (^block1)(), int, void (^block2)(), int) __attribute__((nonnull(1,3))); extern void func4 (void (^block1)(), void (^block2)()) __attribute__((nonnull(1))) __attribute__((nonnull(2))); void foo (int i1, int i2, int i3, void (^cp1)(), void (^cp2)(), void (^cp3)()) { func1(cp1, cp2, i1); func1(0, cp2, i1); // expected-warning {{argument is null where non-null is required}} func1(cp1, 0, i1); // expected-warning {{argument is null where non-null is required}} func1(cp1, cp2, 0); func3(0, i2, cp3, i3); // expected-warning {{argument is null where non-null is required}} func3(cp3, i2, 0, i3); // expected-warning {{argument is null where non-null is required}} func4(0, cp1); // expected-warning {{argument is null where non-null is required}} func4(cp1, 0); // expected-warning {{argument is null where non-null is required}} }
Add -fblocks for the test.
Add -fblocks for the test. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@72280 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
f2f1a9893f57bf9a8aa207e2d3365df4010d28c6
TDTChocolate/FoundationAdditions/NSFileManager+TDTAdditions.h
TDTChocolate/FoundationAdditions/NSFileManager+TDTAdditions.h
#import <Foundation/Foundation.h> @interface NSFileManager (TDTAdditions) /** @return URL to the any directory which matches the given search path in the User's domain. */ - (NSURL *)userURLForDirectory:(NSSearchPathDirectory)directory; /** Creates a temporary file in a suitable temporary directory. The generated file has a name of the form "prefix-random.suffix", where "random" denotes a string of random integers to gurantee uniqueness. @return URL to the temporary file */ - (NSURL *)fileURLToTemporaryFileWithNamePrefix:(NSString *)prefix suffix:(NSString *)suffix; @end
#import <Foundation/Foundation.h> @interface NSFileManager (TDTAdditions) /** @return URL to the any directory which matches the given search path in the User's domain. */ - (NSURL *)userURLForDirectory:(NSSearchPathDirectory)directory; /** Creates a temporary file in a suitable temporary directory. The generated file has a name of the form "prefix-random.suffix", where "random" denotes a string of random integers to gurantee uniqueness. @return URL to the temporary file. */ - (NSURL *)fileURLToTemporaryFileWithNamePrefix:(NSString *)prefix suffix:(NSString *)suffix; @end
Remove trailing spaces from documentation comments
Remove trailing spaces from documentation comments
C
bsd-3-clause
talk-to/Chocolate,talk-to/Chocolate
b48f26eac7e5f2369cce423668d1554b3a682969
kilo.c
kilo.c
int main() { return 0; }
#include <unistd.h> int main() { char c; while (read(STDIN_FILENO, &c, 1) == 1); return 0; }
Read keypresses from the user
Read keypresses from the user
C
bsd-2-clause
oldsharp/kilo,oldsharp/kilo
4b7b88b94b98233ae714d8466ee86876fe9f3e42
elsa/xml_lexer.h
elsa/xml_lexer.h
// xml_lexer.h see license.txt for copyright and terms of use #ifndef XML_LEXER_H #define XML_LEXER_H #include <stdio.h> #include "fstream.h" // ifstream #include "str.h" // string #include "sm_flexlexer.h" // yyFlexLexer #include "baselexer.h" // FLEX_OUTPUT_METHOD_DECLS #include "xml_enum.h" // XTOK_* class XmlLexer : private yyFlexLexer { public: char const *inputFname; // just for error messages int linenumber; bool sawEof; XmlLexer() : inputFname(NULL) , linenumber(1) // file line counting traditionally starts at 1 , sawEof(false) {} // this is yylex() but does what I want it to with EOF int getToken(); // have we seen the EOF? bool haveSeenEof() { return sawEof; } // this is yytext char const *currentText() { return this->YYText(); } // this is yyrestart void restart(istream *in) { this->yyrestart(in); } int tok(XmlToken kind); int svalTok(XmlToken t); void err(char const *msg); string tokenKindDesc(int kind) const; FLEX_OUTPUT_METHOD_DECLS }; #endif // XML_LEXER_H
// xml_lexer.h see license.txt for copyright and terms of use #ifndef XML_LEXER_H #define XML_LEXER_H #include <stdio.h> #include "fstream.h" // ifstream #include "str.h" // string #include "sm_flexlexer.h" // yyFlexLexer #include "baselexer.h" // FLEX_OUTPUT_METHOD_DECLS #include "xml_enum.h" // XTOK_* class XmlLexer : private yyFlexLexer { public: char const *inputFname; // just for error messages int linenumber; bool sawEof; XmlLexer() : inputFname(NULL) , linenumber(1) // file line counting traditionally starts at 1 , sawEof(false) {} // this is yylex() but does what I want it to with EOF int getToken(); // have we seen the EOF? bool haveSeenEof() { return sawEof; } // this is yytext char const *currentText() { return this->YYText(); } // this is yyrestart void restart(istream *in) { this->yyrestart(in); sawEof = false; } int tok(XmlToken kind); int svalTok(XmlToken t); void err(char const *msg); string tokenKindDesc(int kind) const; FLEX_OUTPUT_METHOD_DECLS }; #endif // XML_LEXER_H
Fix bug where XmlLexer::restart() doesn't reset sawEof
Fix bug where XmlLexer::restart() doesn't reset sawEof
C
bsd-3-clause
angavrilov/olmar,angavrilov/olmar,angavrilov/olmar,angavrilov/olmar
702252414662d8e63f33715261399c8cc8a4767a
src/GameAsset.h
src/GameAsset.h
#ifndef GAMEASSET_H #define GAMEASSET_H #include <GL/gl.h> class GameAsset { public: virtual void Draw(GLuint) = 0; }; #endif
#ifndef GAMEASSET_H #define GAMEASSET_H #include <iostream> #include <GL/gl.h> class GameAsset { public: virtual void Draw(GLuint) = 0; }; #endif
Include cerr and endl in CubeAsset
Include cerr and endl in CubeAsset
C
mit
XenoWarrior/CI224-GamesDevelopment,XenoWarrior/CI224-GamesDevelopment,XenoWarrior/CI224-GamesDevelopment,XenoWarrior/CI224-GamesDevelopment,XenoWarrior/CI224-GamesDevelopment
6506bf4e205944a671ddcc148a88273ddce92409
Problem_9/Problem_9.c
Problem_9/Problem_9.c
#include "stdio.h" #include "stdbool.h" bool checkPythagoreanTriplet (int a, int b, int c); bool checkPythagoreanTriplet (int a, int b, int c) { if((a*a) + (b*b) == (c*c)) { return true; } else { return false; } } int main(int argc, char const *argv[]) { int i; int j; int k; for(i=1; i < 1000; i++) { for(j=i; j < (1000 - i); j++) { for(k=j; k < (1000 - j); k++){ if(checkPythagoreanTriplet(i,j,k) && (i + j + k) == 1000) { printf("%d %d %d\n", i, j, k); printf("%d\n", (i*j*k)); break; } } } } return 0; }
#include "stdio.h" #include "stdbool.h" bool checkPythagoreanTriplet(int a, int b, int c); bool checkPythagoreanTriplet(int a, int b, int c) { if ((a * a) + (b * b) == (c * c)) { return true; } else { return false; } } int main(int argc, char const *argv[]) { int i; int j; int k; for (i = 1; i < 1000; i++) { for (j = i; j < (1000 - i); j++) { for (k = j; k < (1000 - j); k++) { if (checkPythagoreanTriplet(i, j, k) && (i + j + k) == 1000) { printf("%d %d %d\n", i, j, k); printf("%d\n", (i * j * k)); break; } } } } return 0; }
Update format for Problem 9
Update format for Problem 9
C
mit
goparakeets21/Project_Euler
7c634a04a23171cc2356e3129fb16b8e9da3bf00
test/Sema/crash-invalid-array.c
test/Sema/crash-invalid-array.c
// RUN: not %clang_cc1 -O1 %s -emit-llvm // PR6913 #include <stdio.h> int main() { int x[10][10]; int (*p)[] = x; // expected-error {{invalid use of array with unspecified bounds} int i; for(i = 0; i < 10; ++i) { p[i][i] = i; } }
Bring over a test from llvm/test/FrontendC that is for Sema and not CodeGen.
Bring over a test from llvm/test/FrontendC that is for Sema and not CodeGen. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@135753 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
69051267d34c7d9ecfd9a947d762fc88d69f8822
src/Ultrasonick.h
src/Ultrasonick.h
/* Ultrasonick.h - Library for HC-SR04 Ultrasonic Ranging Module in a minimalist way. Created by EricK Simoes (@AloErickSimoes), April 3, 2014. Released into the Creative Commons Attribution-ShareAlike 4.0 International. */ #ifndef Ultrasonick_h #define Ultrasonick_h #if (ARDUINO >= 100) #include "Arduino.h" #else #include "WProgram.h" #endif #define CM 1 #define INC 0 /** * TODO: Remove the underscore of the private variables name * and use static keyword */ class Ultrasonick { public: Ultrasonick(uint8_t trigPin, uint8_t echoPin); int distanceRead(uint8_t und); int distanceRead(); private: uint8_t _trigPin; uint8_t _echoPin; int timing(); }; #endif // Ultrasonic_h
/* Ultrasonick.h - Library for HC-SR04 Ultrasonic Ranging Module in a minimalist way. Created by EricK Simoes (@AloErickSimoes), April 3, 2014. Released into the Creative Commons Attribution-ShareAlike 4.0 International. */ #ifndef Ultrasonick_h #define Ultrasonick_h #define CM 1 #define INC 0 /** * TODO: Remove the underscore of the private variables name * and use static keyword */ class Ultrasonick { public: Ultrasonick(uint8_t trigPin, uint8_t echoPin); int distanceRead(uint8_t und); int distanceRead(); private: uint8_t _trigPin; uint8_t _echoPin; int timing(); }; #endif // Ultrasonic_h
Remove duplicate include from Arduino.h
Fix: Remove duplicate include from Arduino.h The include is only required in the .cpp file. Resolves: #18
C
mit
ErickSimoes/Ultrasonic
7e3f93541e937d886652a8c16873efd93d98230b
src/win32port.h
src/win32port.h
#ifndef NINJA_WIN32PORT_H_ #define NINJA_WIN32PORT_H_ #pragma once /// A 64-bit integer type typedef unsigned long long int64_t; typedef unsigned long long uint64_t; #endif // NINJA_WIN32PORT_H_
#ifndef NINJA_WIN32PORT_H_ #define NINJA_WIN32PORT_H_ #pragma once /// A 64-bit integer type typedef signed long long int64_t; typedef unsigned long long uint64_t; #endif // NINJA_WIN32PORT_H_
Add new line to new file
Add new line to new file
C
apache-2.0
nico/ninja,colincross/ninja,chenyukang/ninja,kissthink/ninja,mydongistiny/ninja,maruel/ninja,mohamed/ninja,ukai/ninja,PetrWolf/ninja-main,mutac/ninja,nornagon/ninja,mathstuf/ninja,mgaunard/ninja,pathscale/ninja,ctiller/ninja,ctiller/ninja,lizh06/ninja,mdempsky/ninja,hnney/ninja,barak/ninja,syntheticpp/ninja,tychoish/ninja,metti/ninja,PetrWolf/ninja,SByer/ninja,AoD314/ninja,kimgr/ninja,nico/ninja,TheOneRing/ninja,guiquanz/ninja,mdempsky/ninja,dpwright/ninja,glensc/ninja,jhanssen/ninja,curinir/ninja,mgaunard/ninja,hnney/ninja,PetrWolf/ninja,sxlin/dist_ninja,nafest/ninja,Ju2ender/ninja,vvvrrooomm/ninja,atetubou/ninja,ilor/ninja,hnney/ninja,synaptek/ninja,LuaDist/ninja,Maratyszcza/ninja-pypi,sgraham/ninja,Qix-/ninja,okuoku/ninja,PetrWolf/ninja,dorgonman/ninja,vvvrrooomm/ninja,mohamed/ninja,metti/ninja,moroten/ninja,automeka/ninja,martine/ninja,liukd/ninja,kimgr/ninja,juntalis/ninja,Ju2ender/ninja,glensc/ninja,AoD314/ninja,barak/ninja,jsternberg/ninja,maximuska/ninja,purcell/ninja,nornagon/ninja,pck/ninja,nornagon/ninja,syntheticpp/ninja,chenyukang/ninja,tychoish/ninja,Qix-/ninja,LuaDist/ninja,jimon/ninja,jsternberg/ninja,ndsol/subninja,bradking/ninja,ignatenkobrain/ninja,maximuska/ninja,automeka/ninja,drbo/ninja,ignatenkobrain/ninja,nickhutchinson/ninja,sgraham/ninja,nickhutchinson/ninja,sxlin/dist_ninja,nicolasdespres/ninja,tychoish/ninja,jsternberg/ninja,automeka/ninja,LuaDist/ninja,autopulated/ninja,dendy/ninja,curinir/ninja,PetrWolf/ninja-main,PetrWolf/ninja-main,bradking/ninja,bmeurer/ninja,syntheticpp/ninja,dendy/ninja,automeka/ninja,nico/ninja,guiquanz/ninja,iwadon/ninja,sxlin/dist_ninja,sgraham/ninja,juntalis/ninja,mgaunard/ninja,juntalis/ninja,ThiagoGarciaAlves/ninja,TheOneRing/ninja,jhanssen/ninja,ThiagoGarciaAlves/ninja,juntalis/ninja,moroten/ninja,sxlin/dist_ninja,bradking/ninja,Maratyszcza/ninja-pypi,ninja-build/ninja,tfarina/ninja,vvvrrooomm/ninja,fuchsia-mirror/third_party-ninja,ehird/ninja,nickhutchinson/ninja,ninja-build/ninja,pathscale/ninja,Ju2ender/ninja,colincross/ninja,ikarienator/ninja,ehird/ninja,ukai/ninja,jsternberg/ninja,mydongistiny/ninja,ThiagoGarciaAlves/ninja,maruel/ninja,dorgonman/ninja,kissthink/ninja,kimgr/ninja,bmeurer/ninja,bmeurer/ninja,martine/ninja,atetubou/ninja,ukai/ninja,ninja-build/ninja,ikarienator/ninja,jendrikillner/ninja,pck/ninja,fuchsia-mirror/third_party-ninja,synaptek/ninja,kissthink/ninja,synaptek/ninja,syntheticpp/ninja,iwadon/ninja,jendrikillner/ninja,ehird/ninja,bmeurer/ninja,mgaunard/ninja,sxlin/dist_ninja,mutac/ninja,LuaDist/ninja,purcell/ninja,pck/ninja,nico/ninja,mathstuf/ninja,TheOneRing/ninja,dpwright/ninja,fifoforlifo/ninja,nicolasdespres/ninja,fifoforlifo/ninja,tfarina/ninja,glensc/ninja,PetrWolf/ninja-main,hnney/ninja,nocnokneo/ninja,moroten/ninja,maruel/ninja,mydongistiny/ninja,lizh06/ninja,rnk/ninja,sorbits/ninja,okuoku/ninja,kimgr/ninja,moroten/ninja,fuchsia-mirror/third_party-ninja,jendrikillner/ninja,dabrahams/ninja,fifoforlifo/ninja,ikarienator/ninja,rjogrady/ninja,dabrahams/ninja,nafest/ninja,ctiller/ninja,iwadon/ninja,nafest/ninja,mathstuf/ninja,mdempsky/ninja,ndsol/subninja,purcell/ninja,mydongistiny/ninja,rnk/ninja,liukd/ninja,SByer/ninja,purcell/ninja,tfarina/ninja,nafest/ninja,ilor/ninja,mohamed/ninja,maruel/ninja,jimon/ninja,ignatenkobrain/ninja,drbo/ninja,fuchsia-mirror/third_party-ninja,ThiagoGarciaAlves/ninja,glensc/ninja,liukd/ninja,SByer/ninja,vvvrrooomm/ninja,okuoku/ninja,dpwright/ninja,sxlin/dist_ninja,lizh06/ninja,chenyukang/ninja,SByer/ninja,autopulated/ninja,kissthink/ninja,jhanssen/ninja,dorgonman/ninja,dorgonman/ninja,rjogrady/ninja,dabrahams/ninja,chenyukang/ninja,ignatenkobrain/ninja,AoD314/ninja,sorbits/ninja,dendy/ninja,martine/ninja,curinir/ninja,ilor/ninja,nocnokneo/ninja,metti/ninja,jimon/ninja,bradking/ninja,iwadon/ninja,ukai/ninja,ndsol/subninja,rnk/ninja,PetrWolf/ninja,yannicklm/ninja,Qix-/ninja,fifoforlifo/ninja,pck/ninja,sgraham/ninja,Ju2ender/ninja,nocnokneo/ninja,nickhutchinson/ninja,tychoish/ninja,autopulated/ninja,AoD314/ninja,atetubou/ninja,dpwright/ninja,maximuska/ninja,sorbits/ninja,jimon/ninja,synaptek/ninja,tfarina/ninja,barak/ninja,ehird/ninja,yannicklm/ninja,colincross/ninja,ndsol/subninja,ctiller/ninja,martine/ninja,rjogrady/ninja,Maratyszcza/ninja-pypi,barak/ninja,ilor/ninja,Maratyszcza/ninja-pypi,curinir/ninja,maximuska/ninja,Qix-/ninja,okuoku/ninja,ikarienator/ninja,rnk/ninja,autopulated/ninja,mutac/ninja,mathstuf/ninja,jhanssen/ninja,nocnokneo/ninja,sxlin/dist_ninja,TheOneRing/ninja,yannicklm/ninja,liukd/ninja,colincross/ninja,mdempsky/ninja,sorbits/ninja,nornagon/ninja,pathscale/ninja,guiquanz/ninja,guiquanz/ninja,dendy/ninja,jendrikillner/ninja,dabrahams/ninja,nicolasdespres/ninja,nicolasdespres/ninja,rjogrady/ninja,metti/ninja,yannicklm/ninja,mutac/ninja,mohamed/ninja,pathscale/ninja,lizh06/ninja,drbo/ninja,ninja-build/ninja,drbo/ninja,atetubou/ninja
6e9096519e0ac3db0e92bafb43ad81c8040dc64c
src/CopyDevice.h
src/CopyDevice.h
#pragma once #ifndef COPYFS_LIB_COPYDEVICE_H_ #define COPYFS_LIB_COPYDEVICE_H_ #include <boost/filesystem.hpp> #include <messmer/fspp/fs_interface/Device.h> #include "messmer/cpp-utils/macros.h" namespace copyfs { namespace bf = boost::filesystem; class CopyDevice: public fspp::Device { public: CopyDevice(const bf::path &rootdir); virtual ~CopyDevice(); void statfs(const boost::filesystem::path &path, struct ::statvfs *fsstat) override; const bf::path &RootDir() const; private: std::unique_ptr<fspp::Node> Load(const bf::path &path) override; const bf::path _root_path; DISALLOW_COPY_AND_ASSIGN(CopyDevice); }; inline const bf::path &CopyDevice::RootDir() const { return _root_path; } } #endif
#pragma once #ifndef COPYFS_LIB_COPYDEVICE_H_ #define COPYFS_LIB_COPYDEVICE_H_ #include <boost/filesystem.hpp> #include <messmer/fspp/fs_interface/Device.h> #include "messmer/cpp-utils/macros.h" namespace copyfs { namespace bf = boost::filesystem; class CopyDevice: public fspp::Device { public: explicit CopyDevice(const bf::path &rootdir); virtual ~CopyDevice(); void statfs(const boost::filesystem::path &path, struct ::statvfs *fsstat) override; const bf::path &RootDir() const; private: std::unique_ptr<fspp::Node> Load(const bf::path &path) override; const bf::path _root_path; DISALLOW_COPY_AND_ASSIGN(CopyDevice); }; inline const bf::path &CopyDevice::RootDir() const { return _root_path; } } #endif
Make constructors explicit where adequate
Make constructors explicit where adequate
C
apache-2.0
cryfs/copyfs
c521df5dcf7410898cabdcb556f919535cf16d19
include/msvc_compat/C99/stdbool.h
include/msvc_compat/C99/stdbool.h
#ifndef stdbool_h #define stdbool_h #include <wtypes.h> /* MSVC doesn't define _Bool or bool in C, but does have BOOL */ /* Note this doesn't pass autoconf's test because (bool) 0.5 != true */ typedef BOOL _Bool; #define bool _Bool #define true 1 #define false 0 #define __bool_true_false_are_defined 1 #endif /* stdbool_h */
#ifndef stdbool_h #define stdbool_h #include <wtypes.h> /* MSVC doesn't define _Bool or bool in C, but does have BOOL */ /* Note this doesn't pass autoconf's test because (bool) 0.5 != true */ /* Clang-cl uses MSVC headers, so needs msvc_compat, but has _Bool as * a built-in type. */ #ifndef __clang__ typedef BOOL _Bool; #endif #define bool _Bool #define true 1 #define false 0 #define __bool_true_false_are_defined 1 #endif /* stdbool_h */
Allow to build with clang-cl
Allow to build with clang-cl
C
bsd-2-clause
ahmetmircik/jemalloc,leebaok/jemalloc-4.2.1-readcode,kmiku7/jemalloc,cpeterso/jemalloc,cpeterso/jemalloc,shekkbuilder/jemalloc,ahmetmircik/jemalloc,lilothar/jemalloc,TeamExodus/external_jemalloc,wqfish/jemalloc,awreece/jemalloc,jemalloc/jemalloc-cmake,tempbottle/jemalloc,wespelee/jemalloc,VRToxin/android_external_jemalloc,kmiku7/jemalloc,lilothar/jemalloc,tempbottle/jemalloc,yy-nm/jemalloc,ahmetmircik/jemalloc,wespelee/jemalloc,glandium/jemalloc,flyfeifan/jemalloc,lvfeng1130/jemalloc,AndroidExternal/jemalloc,TeamExodus/external_jemalloc,vashstorm/jemalloc,VRToxin/android_external_jemalloc,yy-nm/jemalloc,vashstorm/jemalloc,shekkbuilder/jemalloc,tempbottle/jemalloc,dxq-git/jemalloc,AndroidExternal/jemalloc,wfxiang08/jemalloc,CMRemix/android_external_jemalloc,CMRemix/android_external_jemalloc,Dmitry-Me/jemalloc,garoose/jemalloc,garoose/jemalloc,yy-nm/jemalloc,cpeterso/jemalloc,wqfish/jemalloc,lvfeng1130/jemalloc,leebaok/jemalloc-4.2.1-readcode,flyfeifan/jemalloc,8l/jemalloc,wqfish/jemalloc,flyfeifan/jemalloc,awreece/jemalloc,leebaok/jemalloc-4.2.1-readcode,wespelee/jemalloc,CMRemix/android_external_jemalloc,awreece/jemalloc,wqfish/jemalloc,Dmitry-Me/jemalloc,glandium/jemalloc,jemalloc/jemalloc-cmake,TeamExodus/external_jemalloc,8l/jemalloc,flyfeifan/jemalloc,tempbottle/jemalloc,lilothar/jemalloc,wfxiang08/jemalloc,kmiku7/jemalloc,AndroidExternal/jemalloc,geekboxzone/mmallow_external_jemalloc,jemalloc/jemalloc-cmake,kmiku7/jemalloc,VRToxin/android_external_jemalloc,Snaipe/jemalloc,wfxiang08/jemalloc,CMRemix/android_external_jemalloc,jemalloc/jemalloc-cmake,garoose/jemalloc,geekboxzone/mmallow_external_jemalloc,lvfeng1130/jemalloc,geekboxzone/mmallow_external_jemalloc,yy-nm/jemalloc,AndroidExternal/jemalloc,cpeterso/jemalloc,dxq-git/jemalloc,vashstorm/jemalloc,awreece/jemalloc,leebaok/jemalloc-4.2.1-readcode,garoose/jemalloc,lilothar/jemalloc,dxq-git/jemalloc,Snaipe/jemalloc,wqfish/jemalloc,shekkbuilder/jemalloc,lvfeng1130/jemalloc,shekkbuilder/jemalloc,ahmetmircik/jemalloc,VRToxin/android_external_jemalloc,glandium/jemalloc,TeamExodus/external_jemalloc,Dmitry-Me/jemalloc,Snaipe/jemalloc,geekboxzone/mmallow_external_jemalloc,8l/jemalloc,dxq-git/jemalloc,wfxiang08/jemalloc,glandium/jemalloc,Dmitry-Me/jemalloc,Snaipe/jemalloc,vashstorm/jemalloc,wespelee/jemalloc,8l/jemalloc
1554603f805eb2efb4757937b99092c7aa0d3aee
Graphics/SettingsDialog.h
Graphics/SettingsDialog.h
/* Copyright (c) nasser-sh 2016 * * Distributed under BSD-style license. See accompanying LICENSE.txt in project * directory. */ #pragma once #include <afxwin.h> #include "resource.h" namespace graphics { class CGraphicsApp; class CSettingsDialog : public CDialog { public: enum { IDD = IDD_SETTINGS_DIALOG }; CSettingsDialog(CGraphicsApp *pApp, CWnd *pParent = nullptr); virtual ~CSettingsDialog() = default; BOOL OnInitDialog() override; void OnOK() override; private: CComboBox *m_pMsaaComboBox; CGraphicsApp *m_pApp; protected: DECLARE_MESSAGE_MAP() }; }
/* Copyright (c) nasser-sh 2016 * * Distributed under BSD-style license. See accompanying LICENSE.txt in project * directory. */ #pragma once #include <afxwin.h> #include "resource.h" namespace graphics { class CGraphicsApp; class CSettingsDialog : public CDialog { public: enum { IDD = IDD_SETTINGS_DIALOG }; CSettingsDialog(CGraphicsApp *pApp, CWnd *pParent = nullptr); virtual ~CSettingsDialog() = default; BOOL OnInitDialog() override; void OnOK() override; private: CGraphicsApp *m_pApp; protected: DECLARE_MESSAGE_MAP() }; }
Remove unused attribute from Settings Dialog
Remove unused attribute from Settings Dialog
C
bsd-3-clause
nasser-sh/MFC-Samples,nasser-sh/MFC-Samples,nasser-sh/MFC-Samples,nasser-sh/MFC-Samples
18b60de4226ffd9add2643b2073969e1dceb6635
HTCopyableLabelDemo/HTCopyableLabel.h
HTCopyableLabelDemo/HTCopyableLabel.h
// // HTCopyableLabel.h // HotelTonight // // Created by Jonathan Sibley on 2/6/13. // Copyright (c) 2013 Hotel Tonight. All rights reserved. // #import <UIKit/UIKit.h> @class HTCopyableLabel; @protocol HTCopyableLabelDelegate <NSObject> @optional - (NSString *)stringToCopyForCopyableLabel:(HTCopyableLabel *)copyableLabel; - (CGRect)copyMenuTargetRectInCopyableLabelCoordinates:(HTCopyableLabel *)copyableLabel; @end @interface HTCopyableLabel : UILabel @property (nonatomic, assign) BOOL copyingEnabled; // Defaults to YES @property (nonatomic, weak) id<HTCopyableLabelDelegate> copyableLabelDelegate; @property (nonatomic, assign) UIMenuControllerArrowDirection copyMenuArrowDirection; // Defaults to UIMenuControllerArrowDefault // You may want to add longPressGestureRecognizer to a container view @property (nonatomic, strong, readonly) UILongPressGestureRecognizer *longPressGestureRecognizer; @end
// // HTCopyableLabel.h // HotelTonight // // Created by Jonathan Sibley on 2/6/13. // Copyright (c) 2013 Hotel Tonight. All rights reserved. // @class HTCopyableLabel; @protocol HTCopyableLabelDelegate <NSObject> @optional - (NSString *)stringToCopyForCopyableLabel:(HTCopyableLabel *)copyableLabel; - (CGRect)copyMenuTargetRectInCopyableLabelCoordinates:(HTCopyableLabel *)copyableLabel; @end @interface HTCopyableLabel : UILabel @property (nonatomic, assign) BOOL copyingEnabled; // Defaults to YES @property (nonatomic, weak) id<HTCopyableLabelDelegate> copyableLabelDelegate; @property (nonatomic, assign) UIMenuControllerArrowDirection copyMenuArrowDirection; // Defaults to UIMenuControllerArrowDefault // You may want to add longPressGestureRecognizer to a container view @property (nonatomic, strong, readonly) UILongPressGestureRecognizer *longPressGestureRecognizer; @end
Remove UIKit import to (hopefully) fix cocoapods travis-CI build
Remove UIKit import to (hopefully) fix cocoapods travis-CI build
C
mit
hoteltonight/HTCopyableLabel
f622310d2f63f1842f986448a67483be9aefdec1
webkit/fileapi/quota_file_util.h
webkit/fileapi/quota_file_util.h
// Copyright (c) 2011 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 WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_ #define WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_ #include "webkit/fileapi/file_system_file_util.h" #include "webkit/fileapi/file_system_operation_context.h" #pragma once namespace fileapi { class QuotaFileUtil : public FileSystemFileUtil { public: static QuotaFileUtil* GetInstance(); ~QuotaFileUtil() {} static const int64 kNoLimit; base::PlatformFileError CopyOrMoveFile( FileSystemOperationContext* fs_context, const FilePath& src_file_path, const FilePath& dest_file_path, bool copy); // TODO(dmikurube): Charge some amount of quota for directories. base::PlatformFileError Truncate( FileSystemOperationContext* fs_context, const FilePath& path, int64 length); friend struct DefaultSingletonTraits<QuotaFileUtil>; DISALLOW_COPY_AND_ASSIGN(QuotaFileUtil); protected: QuotaFileUtil() {} }; } // namespace fileapi #endif // WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_
// Copyright (c) 2011 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 WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_ #define WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_ #include "webkit/fileapi/file_system_file_util.h" #include "webkit/fileapi/file_system_operation_context.h" #pragma once namespace fileapi { class QuotaFileUtil : public FileSystemFileUtil { public: static QuotaFileUtil* GetInstance(); ~QuotaFileUtil() {} static const int64 kNoLimit; virtual base::PlatformFileError CopyOrMoveFile( FileSystemOperationContext* fs_context, const FilePath& src_file_path, const FilePath& dest_file_path, bool copy); // TODO(dmikurube): Charge some amount of quota for directories. virtual base::PlatformFileError Truncate( FileSystemOperationContext* fs_context, const FilePath& path, int64 length); friend struct DefaultSingletonTraits<QuotaFileUtil>; DISALLOW_COPY_AND_ASSIGN(QuotaFileUtil); protected: QuotaFileUtil() {} }; } // namespace fileapi #endif // WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_
Add virtual in QuitaFileUtil to fix the compilation error in r82441.
Add virtual in QuitaFileUtil to fix the compilation error in r82441. TBR=dmikurube,kinuko BUG=none TEST=none Review URL: http://codereview.chromium.org/6882112 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@82445 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
ChromiumWebApps/chromium,nacl-webkit/chrome_deps,dushu1203/chromium.src,zcbenz/cefode-chromium,hujiajie/pa-chromium,robclark/chromium,dednal/chromium.src,M4sse/chromium.src,littlstar/chromium.src,Jonekee/chromium.src,dednal/chromium.src,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,junmin-zhu/chromium-rivertrail,robclark/chromium,anirudhSK/chromium,anirudhSK/chromium,timopulkkinen/BubbleFish,keishi/chromium,dushu1203/chromium.src,keishi/chromium,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,fujunwei/chromium-crosswalk,patrickm/chromium.src,ltilve/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,markYoungH/chromium.src,dednal/chromium.src,mogoweb/chromium-crosswalk,anirudhSK/chromium,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,Jonekee/chromium.src,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,axinging/chromium-crosswalk,jaruba/chromium.src,keishi/chromium,robclark/chromium,rogerwang/chromium,dushu1203/chromium.src,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,hgl888/chromium-crosswalk,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,keishi/chromium,rogerwang/chromium,Pluto-tv/chromium-crosswalk,rogerwang/chromium,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,Just-D/chromium-1,patrickm/chromium.src,keishi/chromium,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,robclark/chromium,dednal/chromium.src,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,jaruba/chromium.src,mogoweb/chromium-crosswalk,anirudhSK/chromium,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,ltilve/chromium,axinging/chromium-crosswalk,littlstar/chromium.src,fujunwei/chromium-crosswalk,Just-D/chromium-1,ChromiumWebApps/chromium,Chilledheart/chromium,rogerwang/chromium,markYoungH/chromium.src,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,ondra-novak/chromium.src,junmin-zhu/chromium-rivertrail,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,Just-D/chromium-1,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,chuan9/chromium-crosswalk,markYoungH/chromium.src,Chilledheart/chromium,M4sse/chromium.src,robclark/chromium,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,chuan9/chromium-crosswalk,keishi/chromium,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,ondra-novak/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,Just-D/chromium-1,nacl-webkit/chrome_deps,ondra-novak/chromium.src,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,jaruba/chromium.src,keishi/chromium,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,anirudhSK/chromium,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk,ondra-novak/chromium.src,jaruba/chromium.src,littlstar/chromium.src,hujiajie/pa-chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,rogerwang/chromium,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,M4sse/chromium.src,ondra-novak/chromium.src,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,littlstar/chromium.src,Just-D/chromium-1,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,robclark/chromium,rogerwang/chromium,littlstar/chromium.src,Pluto-tv/chromium-crosswalk,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,patrickm/chromium.src,dednal/chromium.src,dednal/chromium.src,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,ltilve/chromium,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,littlstar/chromium.src,axinging/chromium-crosswalk,ltilve/chromium,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,keishi/chromium,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,robclark/chromium,markYoungH/chromium.src,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,anirudhSK/chromium,ltilve/chromium,ChromiumWebApps/chromium,littlstar/chromium.src,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,ltilve/chromium,Jonekee/chromium.src,axinging/chromium-crosswalk,M4sse/chromium.src,zcbenz/cefode-chromium,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,robclark/chromium,nacl-webkit/chrome_deps,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,robclark/chromium,zcbenz/cefode-chromium,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,robclark/chromium,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,Chilledheart/chromium,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,anirudhSK/chromium,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,dushu1203/chromium.src,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,ltilve/chromium,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,jaruba/chromium.src,ltilve/chromium,rogerwang/chromium,junmin-zhu/chromium-rivertrail,jaruba/chromium.src,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk,dednal/chromium.src,jaruba/chromium.src,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,jaruba/chromium.src,patrickm/chromium.src,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,anirudhSK/chromium,keishi/chromium,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,keishi/chromium,rogerwang/chromium,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,ltilve/chromium,rogerwang/chromium,Jonekee/chromium.src,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,Chilledheart/chromium,krieger-od/nwjs_chromium.src,keishi/chromium,Just-D/chromium-1,M4sse/chromium.src,dednal/chromium.src,zcbenz/cefode-chromium,jaruba/chromium.src,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,patrickm/chromium.src,hujiajie/pa-chromium