commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
1
4.87k
subject
stringlengths
15
778
message
stringlengths
15
8.75k
lang
stringclasses
266 values
license
stringclasses
13 values
repos
stringlengths
5
127k
6346f9be0ecd911c67e523d8eb765bf84cd1dea6
src/common.h
src/common.h
// Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved. // Please see the AUTHORS file for details. Use of this source code is governed // by a BSD license that can be found in the LICENSE file. #ifndef SCALLOC_COMMON_H_ #define SCALLOC_COMMON_H_ #define UNLIKELY(x) __builtin_expect((x), 0) #define LIKELY(x) __builtin_expect((x), 1) #define cache_aligned __attribute__((aligned(64))) #define always_inline inline __attribute__((always_inline)) #define no_inline __attribute__((noinline)) const size_t kSystemPageSize = 4096; always_inline size_t PadSize(size_t size, size_t multiple) { return (size + multiple - 1) / multiple * multiple; } #endif // SCALLOC_COMMON_H_
// Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved. // Please see the AUTHORS file for details. Use of this source code is governed // by a BSD license that can be found in the LICENSE file. #ifndef SCALLOC_COMMON_H_ #define SCALLOC_COMMON_H_ #define UNLIKELY(x) __builtin_expect((x), 0) #define LIKELY(x) __builtin_expect((x), 1) #define cache_aligned __attribute__((aligned(64))) #define always_inline inline __attribute__((always_inline)) #define no_inline __attribute__((noinline)) const size_t kSystemPageSize = 4096; // Prohibit reordering of instructions by the compiler. inline void CompilerBarrier() { __asm__ __volatile__("" : : : "memory"); } // Full memory fence on x86-64 inline void MemoryBarrier() { __asm__ __volatile__("mfence" : : : "memory"); } always_inline size_t PadSize(size_t size, size_t multiple) { return (size + multiple - 1) / multiple * multiple; } #endif // SCALLOC_COMMON_H_
Add CompilerBarrier() and MemoryBarrier() functions.
Add CompilerBarrier() and MemoryBarrier() functions. Signed-off-by: Michael Lippautz <0d543840881a2c189b4f7636b15eebd6a8f60ace@gmail.com>
C
bsd-2-clause
cksystemsgroup/scalloc,cksystemsgroup/scalloc,cksystemsgroup/scalloc
9fb5888c9c8de8c942f5524c3857f8186c2edc6d
input.c
input.c
#include "input.h" #include <ctype.h> #include <stdio.h> #include <string.h> void read_line(char *p) { if (fgets(p, MAX_SIZE, stdin) == NULL){ p[0] = '\0'; return; } remove_space(p); } int is_exit(const char* p) { const char* exit_words[] = { "exit", "quit", "bye", }; int len = (int)(sizeof(exit_words) / sizeof(char*)); int i; if (strlen(p) == 0){ return (1); } for (i = 0; i < len; i++){ if (strcmp(p, exit_words[i]) == 0){ return (1); } } return (0); } void remove_space(char* p) { int i, j; i = j = 0; while (p[i] != '\0'){ while (isspace(p[j])){ j++; } while (!isspace(p[j])){ p[i] = p[j]; if (p[i] == '\0'){ break; } else { i++; j++; } } } }
#include "input.h" #include <ctype.h> #include <stdio.h> #include <string.h> void read_line(char *p) { if (fgets(p, MAX_SIZE, stdin) == NULL){ p[0] = '\0'; return; } remove_space(p); } int is_exit(const char* p) { const char* exit_words[] = { "", "exit", "quit", "bye", }; int len = (int)(sizeof(exit_words) / sizeof(char*)); int i; if (strlen(p) == 0){ return (1); } for (i = 0; i < len; i++){ if (strcmp(p, exit_words[i]) == 0){ return (1); } } return (0); } void remove_space(char* p) { int i, j; i = j = 0; while (p[i] != '\0'){ while (isspace(p[j])){ j++; } while (!isspace(p[j])){ p[i] = p[j]; if (p[i] == '\0'){ break; } else { i++; j++; } } } }
Add empty string to exit words
Add empty string to exit words
C
mit
Roadagain/Calculator,Roadagain/Calculator
48f0a31143545af70b16b4ff079cc255acdf9419
alura/c/forca.c
alura/c/forca.c
#include <stdio.h> int main() { int notas[10]; notas[0] = 10; notas[2] = 9; notas[3] = 8; notas[9] = 4; printf("%d %d %d\n", notas[0], notas[2], notas[9]); }
#include <stdio.h> int main() { char palavrasecreta[20]; sprintf(palavrasecreta, "MELANCIA"); printf("%s\n", palavrasecreta); /* palavrasecreta[0] = 'M'; palavrasecreta[1] = 'E'; palavrasecreta[2] = 'L'; palavrasecreta[3] = 'A'; palavrasecreta[4] = 'N'; palavrasecreta[5] = 'C'; palavrasecreta[6] = 'I'; palavrasecreta[7] = 'A'; printf("%c%c%c%c%c%c%c%c\n", palavrasecreta[0], palavrasecreta[1], palavrasecreta[2], palavrasecreta[3], palavrasecreta[4], palavrasecreta[5], palavrasecreta[6], palavrasecreta[7]); */ }
Update files, Alura, Introdução a C - Parte 2, Aula 2.2
Update files, Alura, Introdução a C - Parte 2, Aula 2.2
C
mit
fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs
a7f3d5712d54ae80ca6a2a747522f8ae65c0ed98
webkit/glue/form_data.h
webkit/glue/form_data.h
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_FORM_DATA_H__ #define WEBKIT_GLUE_FORM_DATA_H__ #include <vector> #include "base/string_util.h" #include "googleurl/src/gurl.h" #include "webkit/glue/form_field.h" namespace webkit_glue { // Holds information about a form to be filled and/or submitted. struct FormData { // The name of the form. string16 name; // GET or POST. string16 method; // The URL (minus query parameters) containing the form. GURL origin; // The action target of the form. GURL action; // true if this form was submitted by a user gesture and not javascript. bool user_submitted; // A vector of all the input fields in the form. std::vector<FormField> fields; // Used by FormStructureTest. inline bool operator==(const FormData& form) const { return (name == form.name && StringToLowerASCII(method) == StringToLowerASCII(form.method) && origin == form.origin && action == form.action && user_submitted == form.user_submitted && fields == form.fields); } }; } // namespace webkit_glue #endif // WEBKIT_GLUE_FORM_DATA_H__
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_FORM_DATA_H__ #define WEBKIT_GLUE_FORM_DATA_H__ #include <vector> #include "base/string_util.h" #include "googleurl/src/gurl.h" #include "webkit/glue/form_field.h" namespace webkit_glue { // Holds information about a form to be filled and/or submitted. struct FormData { // The name of the form. string16 name; // GET or POST. string16 method; // The URL (minus query parameters) containing the form. GURL origin; // The action target of the form. GURL action; // true if this form was submitted by a user gesture and not javascript. bool user_submitted; // A vector of all the input fields in the form. std::vector<FormField> fields; FormData() : user_submitted(false) {} // Used by FormStructureTest. inline bool operator==(const FormData& form) const { return (name == form.name && StringToLowerASCII(method) == StringToLowerASCII(form.method) && origin == form.origin && action == form.action && user_submitted == form.user_submitted && fields == form.fields); } }; } // namespace webkit_glue #endif // WEBKIT_GLUE_FORM_DATA_H__
Add a default constructor for FormData. There are too many places that create FormDatas, and we shouldn't need to initialize user_submitted for each call site.
AutoFill: Add a default constructor for FormData. There are too many places that create FormDatas, and we shouldn't need to initialize user_submitted for each call site. BUG=50423 TEST=none Review URL: http://codereview.chromium.org/3074023 git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@54641 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
C
bsd-3-clause
wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser
c840bf5d4905d023d6495550759bc9cf08bb3aa3
test/main.c
test/main.c
#define CGLTF_IMPLEMENTATION #include "../cgltf.h" #include <stdio.h> int main(int argc, char** argv) { if (argc < 2) { printf("err\n"); return -1; } FILE* f = fopen(argv[1], "rb"); if (!f) { return -2; } fseek(f, 0, SEEK_END); long size = ftell(f); fseek(f, 0, SEEK_SET); void* buf = malloc(size); fread(buf, size, 1, f); fclose(f); cgltf_options options = {0}; cgltf_data* data = NULL; cgltf_result result = cgltf_parse(&options, buf, size, &data); printf("Result: %d\n", result); if (result == cgltf_result_success) { printf("Type: %u\n", data->file_type); printf("Meshes: %lu\n", data->meshes_count); } free(buf); cgltf_free(data); return result; }
#define CGLTF_IMPLEMENTATION #include "../cgltf.h" #include <stdio.h> int main(int argc, char** argv) { if (argc < 2) { printf("err\n"); return -1; } cgltf_options options = {0}; cgltf_data* data = NULL; cgltf_result result = cgltf_parse_file(&options, argv[1], &data); if (result == cgltf_result_success) result = cgltf_load_buffers(&options, data, argv[1]); printf("Result: %d\n", result); if (result == cgltf_result_success) { printf("Type: %u\n", data->file_type); printf("Meshes: %lu\n", data->meshes_count); } cgltf_free(data); return result; }
Add cgltf_parse_file and cgltf_load_buffers to test program
Add cgltf_parse_file and cgltf_load_buffers to test program With this CI tests will run almost all of the code on glTF sample models - this will validate that the code that loads external buffers and parses Base64 data URIs is correct.
C
mit
jkuhlmann/cgltf,jkuhlmann/cgltf,jkuhlmann/cgltf
1c284ac5ec72c86b9ed787b3f4e1a6978c919370
lib/Target/PowerPC/PPCTargetMachine.h
lib/Target/PowerPC/PPCTargetMachine.h
//===-- PPC32TargetMachine.h - PowerPC/Darwin TargetMachine ---*- C++ -*-=// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file declares the PowerPC/Darwin specific subclass of TargetMachine. // //===----------------------------------------------------------------------===// #ifndef POWERPC_DARWIN_TARGETMACHINE_H #define POWERPC_DARWIN_TARGETMACHINE_H #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetFrameInfo.h" #include "llvm/PassManager.h" #include "PowerPCTargetMachine.h" #include <set> namespace llvm { class GlobalValue; class IntrinsicLowering; class PPC32TargetMachine : public PowerPCTargetMachine { public: PPC32TargetMachine(const Module &M, IntrinsicLowering *IL); /// addPassesToEmitMachineCode - Add passes to the specified pass manager to /// get machine code emitted. This uses a MachineCodeEmitter object to handle /// actually outputting the machine code and resolving things like the address /// of functions. This method should returns true if machine code emission is /// not supported. /// virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM, MachineCodeEmitter &MCE); static unsigned getModuleMatchQuality(const Module &M); }; } // end namespace llvm #endif
//===-- PPC32TargetMachine.h - PowerPC/Darwin TargetMachine ---*- C++ -*-=// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file declares the PowerPC/Darwin specific subclass of TargetMachine. // //===----------------------------------------------------------------------===// #ifndef POWERPC_DARWIN_TARGETMACHINE_H #define POWERPC_DARWIN_TARGETMACHINE_H #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetFrameInfo.h" #include "llvm/PassManager.h" #include "PowerPCTargetMachine.h" namespace llvm { class IntrinsicLowering; class PPC32TargetMachine : public PowerPCTargetMachine { public: PPC32TargetMachine(const Module &M, IntrinsicLowering *IL); /// addPassesToEmitMachineCode - Add passes to the specified pass manager to /// get machine code emitted. This uses a MachineCodeEmitter object to handle /// actually outputting the machine code and resolving things like the address /// of functions. This method should returns true if machine code emission is /// not supported. /// virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM, MachineCodeEmitter &MCE); static unsigned getModuleMatchQuality(const Module &M); }; } // end namespace llvm #endif
Remove an unneeded header and forward declaration
Remove an unneeded header and forward declaration git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@15722 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap
27206db97255a92a96619810727c8bb03e7907e0
Globals.h
Globals.h
/* Mace - http://www.macehq.cx Copyright 1999-2004 See the file README for more information */ #ifndef GLOBALS_H #define GLOBALS_H #ifndef _MaceTypes #define _MaceTypes typedef unsigned char U8; typedef char S8; typedef unsigned short U16; typedef signed short S16; //Note: on 64-bit machines, replace "long" with "int" typedef unsigned long U32; typedef signed long S32; #endif void App_Exit(void); //Same as App_Exit2(), except that this calls setdis() void App_Exit2(void); U16 FlipW(U16 a); U32 FlipL(U32 a); void HexW (U16 n, char * String); void HexL (U32 n, char * String); #endif //GLOBALS_H
/* Mace - http://www.macehq.cx Copyright 1999-2004 See the file README for more information */ #ifndef GLOBALS_H #define GLOBALS_H #ifndef _MaceTypes #define _MaceTypes typedef unsigned char U8; typedef signed char S8; typedef unsigned short U16; typedef signed short S16; //Note: on 64-bit machines, replace "long" with "int" #if __LP64__ typedef unsigned int U32; typedef signed int S32; #else typedef unsigned long U32; typedef signed long S32; #endif #endif void App_Exit(void); //Same as App_Exit2(), except that this calls setdis() void App_Exit2(void); U16 FlipW(U16 a); U32 FlipL(U32 a); void HexW (U16 n, char * String); void HexL (U32 n, char * String); #endif //GLOBALS_H
Fix U32 and S32 on LP64 architectures.
Fix U32 and S32 on LP64 architectures.
C
lgpl-2.1
MaddTheSane/Mace,MaddTheSane/Mace
219edae4202ef451a3d084a4678c0cf861ccff0a
testsuite/breakdancer/disable_optimize.h
testsuite/breakdancer/disable_optimize.h
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ #ifndef DISABLE_OPTIMIZE_H #define DISABLE_OPTIMIZE_H 1 /* avoid wasting time trying to optimize those countless test functions */ #if defined(__clang__) /* * Works for Alk since clang-3.5. * Unfortunately it looks like Apple have their own versioning scheme for * clang, because mine (Trond) reports itself as 5.1 and does not have * the pragma. */ #if ((__clang_major__ * 0x100 + __clang_minor) >= 0x305) && !defined(__APPLE__) #pragma clang optimize off #endif #elif defined(__GNUC__) /* * gcc docs indicate that pragma optimize is supported since 4.4. Earlier * versions will emit harmless warning. */ #if ((__GNUC__ * 0x100 + __GNUC_MINOR__) >= 0x0404) #pragma GCC optimize ("O0") #endif #endif /* __GNUC__ */ #endif
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ #ifndef DISABLE_OPTIMIZE_H #define DISABLE_OPTIMIZE_H 1 /* According to MB-11846 we have some misconfigured vm's unable to * compile the source code without enabling optimization. Add a workaround * for those vm's until they're fixed */ #ifndef COUCHBASE_OPTIMIZE_BREAKDANCER_TEST /* avoid wasting time trying to optimize those countless test functions */ #if defined(__clang__) /* * Works for Alk since clang-3.5. * Unfortunately it looks like Apple have their own versioning scheme for * clang, because mine (Trond) reports itself as 5.1 and does not have * the pragma. */ #if ((__clang_major__ * 0x100 + __clang_minor) >= 0x305) && !defined(__APPLE__) #pragma clang optimize off #endif #elif defined(__GNUC__) /* * gcc docs indicate that pragma optimize is supported since 4.4. Earlier * versions will emit harmless warning. */ #if ((__GNUC__ * 0x100 + __GNUC_MINOR__) >= 0x0404) #pragma GCC optimize ("O0") #endif #endif /* __GNUC__ */ #endif /* COUCHBASE_OPTIMIZE_BREAKDANCER_TEST */ #endif
Add workaround for broken builders
MB-11846: Add workaround for broken builders According to MB-11846 we have some misconfigured vm's unable to compile the source code without enabling optimization. This patch introduce a workaround to enable the optimization of the breakdancer tests until the vm's is fixed. To use the workaround define COUCHBASE_OPTIMIZE_BREAKDANCER_TEST during compilation. Add -D CMAKE_C_FLAGS=-DCOUCHBASE_OPTIMIZE_BREAKDANCER_TEST to the command line when invoking cmake. Change-Id: I067548b39be9f52951afed0c30221e1d77926b93 Reviewed-on: http://review.couchbase.org/40165 Reviewed-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com> Tested-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
C
bsd-3-clause
jimwwalker/memcached,daverigby/kv_engine,couchbase/memcached,cloudrain21/memcached-1,cloudrain21/memcached-1,daverigby/kv_engine,couchbase/memcached,cloudrain21/memcached-1,daverigby/kv_engine,cloudrain21/memcached-1,mrkwse/memcached,daverigby/memcached,daverigby/memcached,owendCB/memcached,owendCB/memcached,daverigby/memcached,jimwwalker/memcached,owendCB/memcached,daverigby/kv_engine,couchbase/memcached,mrkwse/memcached,mrkwse/memcached,couchbase/memcached,owendCB/memcached,jimwwalker/memcached,mrkwse/memcached,daverigby/memcached
d8462d5c45ef1ae42d19bb0ade365b8017282228
cpp/module_impl.h
cpp/module_impl.h
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef PPAPI_CPP_MODULE_IMPL_H_ #define PPAPI_CPP_MODULE_IMPL_H_ #include "ppapi/cpp/module.h" namespace { template <typename T> class DeviceFuncs { public: explicit DeviceFuncs(const char* ifname) : ifname_(ifname) {} operator T const*() { if (!funcs_) { funcs_ = reinterpret_cast<T const*>( pp::Module::Get()->GetBrowserInterface(ifname_)); } return funcs_; } // This version doesn't check for existence of the function object. It is // used so that, for DeviceFuncs f, the expression: // if (f) f->doSomething(); // checks the existence only once. T const* operator->() const { return funcs_; } private: DeviceFuncs(const DeviceFuncs&other); DeviceFuncs &operator=(const DeviceFuncs &other); const char* ifname_; T const* funcs_; }; } // namespace #endif // PPAPI_CPP_MODULE_IMPL_H_
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef PPAPI_CPP_MODULE_IMPL_H_ #define PPAPI_CPP_MODULE_IMPL_H_ #include "ppapi/cpp/module.h" namespace { template <typename T> class DeviceFuncs { public: explicit DeviceFuncs(const char* ifname) : ifname_(ifname), funcs_(NULL) {} operator T const*() { if (!funcs_) { funcs_ = reinterpret_cast<T const*>( pp::Module::Get()->GetBrowserInterface(ifname_)); } return funcs_; } // This version doesn't check for existence of the function object. It is // used so that, for DeviceFuncs f, the expression: // if (f) f->doSomething(); // checks the existence only once. T const* operator->() const { return funcs_; } private: DeviceFuncs(const DeviceFuncs&other); DeviceFuncs &operator=(const DeviceFuncs &other); const char* ifname_; T const* funcs_; }; } // namespace #endif // PPAPI_CPP_MODULE_IMPL_H_
Initialize DeviceFuncs::ifuncs_ to zero in constructor
Initialize DeviceFuncs::ifuncs_ to zero in constructor
C
bsd-3-clause
humanai/ppapi,LinRaise/ppapi,Iwan12/ppapi,lio972/ppapi,macressler/ppapi,iofcas/ppapi,kaijajan/ppapi,Iwan12/ppapi,LinRaise/ppapi,thecocce/ppapi,jmnjmn/ppapi,melchi45/ppapi,johnnnylm/ppapi,melchi45/ppapi,johnnnylm/ppapi,melchi45/ppapi,Iwan12/ppapi,macressler/ppapi,Iwan12/ppapi,johnnnylm/ppapi,lio972/ppapi,kaijajan/ppapi,lio972/ppapi,Iwan12/ppapi,melchi45/ppapi,macressler/ppapi,johnnnylm/ppapi,jmnjmn/ppapi,jmnjmn/ppapi,humanai/ppapi,Gitzk/ppapi,iofcas/ppapi,Gitzk/ppapi,lio972/ppapi,lio972/ppapi,thecocce/ppapi,macressler/ppapi,iofcas/ppapi,humanai/ppapi,humanai/ppapi,thecocce/ppapi,macressler/ppapi,LinRaise/ppapi,kaijajan/ppapi,kaijajan/ppapi,johnnnylm/ppapi,thecocce/ppapi,LinRaise/ppapi,melchi45/ppapi,Gitzk/ppapi,jmnjmn/ppapi,iofcas/ppapi,thecocce/ppapi,LinRaise/ppapi,kaijajan/ppapi,jmnjmn/ppapi,iofcas/ppapi,Gitzk/ppapi,humanai/ppapi,Gitzk/ppapi
cfc80a8794b405ccc2127fe6fa52100fe5cfcdfd
wocky/wocky-namespaces.h
wocky/wocky-namespaces.h
#define WOCKY_XMPP_NS_STREAM \ (const gchar *)"http://etherx.jabber.org/streams" #define WOCKY_XMPP_NS_TLS \ (const gchar *)"urn:ietf:params:xml:ns:xmpp-tls" #define WOCKY_XMPP_NS_SASL_AUTH \ (const gchar *)"urn:ietf:params:xml:ns:xmpp-sasl"
#define WOCKY_XMPP_NS_STREAM \ (const gchar *)"http://etherx.jabber.org/streams" #define WOCKY_XMPP_NS_TLS \ (const gchar *)"urn:ietf:params:xml:ns:xmpp-tls" #define WOCKY_XMPP_NS_SASL_AUTH \ (const gchar *)"urn:ietf:params:xml:ns:xmpp-sasl" #define WOCKY_XMPP_NS_XHTML_IM \ (const gchar *)"http://jabber.org/protocol/xhtml-im" #define WOCKY_W3C_NS_XHTML \ (const gchar *)"http://www.w3.org/1999/xhtml"
Add xhtml-im and w3c xhtml namespace
Add xhtml-im and w3c xhtml namespace 20070316212630-93b9a-bcdbd042585561b0f20076b5e7f5f1c41c1e2867.gz
C
lgpl-2.1
freedesktop-unofficial-mirror/wocky,noonien-d/wocky,freedesktop-unofficial-mirror/wocky,freedesktop-unofficial-mirror/wocky,noonien-d/wocky,noonien-d/wocky
e09a55881f98ea0796fe591e6e3f9b8ea0c791ac
Sources/Docs/GPDocsSync.h
Sources/Docs/GPDocsSync.h
// // Copyright (c) 2008 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #import <Foundation/Foundation.h> #import <GData/GData.h> #import "GPSyncProtocol.h" // Source for documents, spreadsheets, and presentations in Google Docs. // Note: presentations currently won't have content data. @interface GPDocsSync : NSObject <GPSyncSource> { id<GPSyncManager> manager_; // weak reference GDataServiceGoogleDocs* docService_; GDataServiceGoogleSpreadsheet* spreadsheetService_; NSMutableArray* docsToInflate_; } @end
// // Copyright (c) 2008 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #import <Foundation/Foundation.h> #import <GData/GData.h> #import "GPSyncProtocol.h" // Source for documents, spreadsheets, presentations, and PDFs in Google Docs. // Note: PDFs currently won't have content data. @interface GPDocsSync : NSObject <GPSyncSource> { id<GPSyncManager> manager_; // weak reference GDataServiceGoogleDocs* docService_; GDataServiceGoogleSpreadsheet* spreadsheetService_; NSMutableArray* docsToInflate_; } @end
Update header comment to reflect the current state of the source.
Update header comment to reflect the current state of the source. git-svn-id: c46e06cb57945f24bc44ee3ee8f795d5b6e634f5@64 c4e13eb7-e550-0410-89ee-d7df1d48aa01
C
apache-2.0
nagyistoce/precipitate,ericmckean/precipitate
42f61a65bf3d78263b54e74a70d52badbab53638
include/login.h
include/login.h
/** * The login information to access a server * * This class combines login, password and vhost * * @copyright 2014 Copernica BV */ /** * Set up namespace */ namespace AMQP { /** * Class definition */ class Login { private: /** * The username * @var string */ std::string _user; /** * The password * @var string */ std::string _password; public: /** * Constructor * @param user * @param password */ Login(const std::string &user, const std::string &password) : _user(user), _password(password) {} /** * Constructor */ Login() : _user("guest"), _password("guest") {} /** * Destructor */ virtual ~Login() {} /** * String representation in SASL PLAIN mode * @return string */ std::string saslPlain() { // we need an initial string std::string result("\0", 1); // append other elements return result.append(_user).append("\0",1).append(_password); } }; /** * End of namespace */ }
/** * The login information to access a server * * This class combines login, password and vhost * * @copyright 2014 Copernica BV */ /** * Set up namespace */ namespace AMQP { /** * Class definition */ class Login { private: /** * The username * @var string */ std::string _user; /** * The password * @var string */ std::string _password; public: /** * Constructor * @param user * @param password */ Login(const std::string &user, const std::string &password) : _user(user), _password(password) {} /** * Copy constructor * @param login */ Login(const Login &login) : _user(login._user), _password(login._password) {} /** * Constructor */ Login() : _user("guest"), _password("guest") {} /** * Destructor */ virtual ~Login() {} /** * String representation in SASL PLAIN mode * @return string */ std::string saslPlain() { // we need an initial string std::string result("\0", 1); // append other elements return result.append(_user).append("\0",1).append(_password); } }; /** * End of namespace */ }
Copy constructor added to Login class
Copy constructor added to Login class
C
apache-2.0
fantastory/AMQP-CPP,tangkingchun/AMQP-CPP,antoniomonty/AMQP-CPP,antoniomonty/AMQP-CPP,toolking/AMQP-CPP,fantastory/AMQP-CPP,tm604/AMQP-CPP,CopernicaMarketingSoftware/AMQP-CPP,CopernicaMarketingSoftware/AMQP-CPP,tangkingchun/AMQP-CPP,tm604/AMQP-CPP,toolking/AMQP-CPP,Kojoley/AMQP-CPP,Kojoley/AMQP-CPP
6b272ab78968323483602717e140d60ad4ea93eb
core/base/inc/TVersionCheck.h
core/base/inc/TVersionCheck.h
// @(#)root/base:$Id$ // Author: Fons Rademakers 9/5/2007 /************************************************************************* * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TVersionCheck #define ROOT_TVersionCheck ////////////////////////////////////////////////////////////////////////// // // // TVersionCheck // // // // Used to check if the shared library or plugin is compatible with // // the current version of ROOT. // // // ////////////////////////////////////////////////////////////////////////// #ifdef R__CXXMODULES #ifndef ROOT_TObject #error "Building with modules currently requires this file to be #included through TObject.h" #endif #endif // R__CXXMODULES #include "RVersion.h" class TVersionCheck { public: TVersionCheck(int versionCode); // implemented in TSystem.cxx }; // FIXME: Due to a modules bug: https://llvm.org/bugs/show_bug.cgi?id=31056 // our .o files get polluted with the gVersionCheck symbol despite it was not // visible in this TU. #ifndef R__CXXMODULES #ifndef __CINT__ namespace ROOT { static TVersionCheck gVersionCheck(ROOT_VERSION_CODE); } #endif #endif #endif
// @(#)root/base:$Id$ // Author: Fons Rademakers 9/5/2007 /************************************************************************* * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TVersionCheck #define ROOT_TVersionCheck ////////////////////////////////////////////////////////////////////////// // // // TVersionCheck // // // // Used to check if the shared library or plugin is compatible with // // the current version of ROOT. // // // ////////////////////////////////////////////////////////////////////////// #include "RVersion.h" class TVersionCheck { public: TVersionCheck(int versionCode); // implemented in TSystem.cxx }; namespace ROOT { static TVersionCheck gVersionCheck(ROOT_VERSION_CODE); } #endif
Remove special cxxmodules case now that gVersionCheck is on ROOT::.
[core] Remove special cxxmodules case now that gVersionCheck is on ROOT::.
C
lgpl-2.1
olifre/root,olifre/root,root-mirror/root,olifre/root,root-mirror/root,root-mirror/root,root-mirror/root,karies/root,karies/root,karies/root,olifre/root,karies/root,karies/root,root-mirror/root,root-mirror/root,root-mirror/root,olifre/root,olifre/root,olifre/root,olifre/root,karies/root,root-mirror/root,olifre/root,karies/root,olifre/root,root-mirror/root,root-mirror/root,olifre/root,karies/root,karies/root,karies/root,root-mirror/root,karies/root
78a22a1dd7608accc960623f8e59c997c75602ea
RNUnifiedContacts/RNUnifiedContacts-Bridging-Header.h
RNUnifiedContacts/RNUnifiedContacts-Bridging-Header.h
// // RNUnifiedContacts.h // RNUnifiedContacts // // Created by Joshua Pinter on 2016-03-23. // Copyright © 2016 Joshua Pinter. All rights reserved. // #ifndef RNUnifiedContacts_Bridging_Header_h #define RNUnifiedContacts_Bridging_Header_h #import <React/RCTBridgeModule.h> #endif /* RNUnifiedContacts_Bridging_Header_h */
// // RNUnifiedContacts.h // RNUnifiedContacts // // Created by Joshua Pinter on 2016-03-23. // Copyright © 2016 Joshua Pinter. All rights reserved. // #ifndef RNUnifiedContacts_Bridging_Header_h #define RNUnifiedContacts_Bridging_Header_h #if __has_include("RCTBridgeModule.h") #import "RCTBridgeModule.h" #else #import <React/RCTBridgeModule.h> #endif #endif /* RNUnifiedContacts_Bridging_Header_h */
Support Pre 0.40 and Post 0.40 React Native.
Support Pre 0.40 and Post 0.40 React Native. Handle if else for importing `React/RCTBridgeModule.h`.
C
mit
joshuapinter/react-native-unified-contacts,joshuapinter/react-native-unified-contacts,joshuapinter/react-native-unified-contacts,joshuapinter/react-native-unified-contacts
e6f7f05225eab16f2a63fa32e5952f6c6adedc23
You-DataStore/operation.h
You-DataStore/operation.h
#pragma once #ifndef YOU_DATASTORE_OPERATION_H_ #define YOU_DATASTORE_OPERATION_H_ #include <unordered_map> #include "datastore.h" namespace You { namespace DataStore { /// A pure virtual class of operations to be put into transaction stack class IOperation { public: IOperation() = default; ~IOperation() = default; /// Executes the operation virtual void run(DataStore::STask) = 0; }; } // namespace DataStore } // namespace You #endif // YOU_DATASTORE_OPERATION_H_
#pragma once #ifndef YOU_DATASTORE_OPERATION_H_ #define YOU_DATASTORE_OPERATION_H_ #include <unordered_map> #include "datastore.h" namespace You { namespace DataStore { /// A pure virtual class of operations to be put into transaction stack class IOperation { public: IOperation(); virtual ~IOperation(); /// Executes the operation virtual void run(DataStore::STask) = 0; }; } // namespace DataStore } // namespace You #endif // YOU_DATASTORE_OPERATION_H_
Make IOperation destructor virtual, remove redundant default
Make IOperation destructor virtual, remove redundant default
C
mit
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
08b2bc83dbf7db69f59cc3b7ce0a23c735eee7a6
src/untrusted/irt/irt_ppapi.h
src/untrusted/irt/irt_ppapi.h
/* * Copyright (c) 2011 The Native Client 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 NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_PPAPI_H_ #define NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_PPAPI_H_ 1 #include <stddef.h> #include "ppapi/c/ppp.h" struct PP_StartFunctions { int32_t (*PPP_InitializeModule)(PP_Module module_id, PPB_GetInterface get_browser_interface); void (*PPP_ShutdownModule)(); const void *(*PPP_GetInterface)(const char *interface_name); }; struct PP_ThreadFunctions { /* * This is a cut-down version of pthread_create()/pthread_join(). * We omit thread creation attributes and the thread's return value. * * We use uintptr_t as the thread ID type because pthread_t is not * part of the stable ABI; a user thread library might choose an * arbitrary size for its own pthread_t. */ int (*thread_create)(uintptr_t *tid, void (*func)(void *thread_argument), void *thread_argument); int (*thread_join)(uintptr_t tid); }; typedef void (*PP_StartFunc)(const struct PP_StartFunctions *funcs); typedef void (*PP_RegisterThreadFuncs)(const struct PP_ThreadFunctions *funcs); #endif
/* * Copyright (c) 2011 The Native Client 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 NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_PPAPI_H_ #define NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_PPAPI_H_ 1 #include <stddef.h> #include "ppapi/c/ppp.h" struct PP_StartFunctions { int32_t (*PPP_InitializeModule)(PP_Module module_id, PPB_GetInterface get_browser_interface); void (*PPP_ShutdownModule)(); const void *(*PPP_GetInterface)(const char *interface_name); }; struct PP_ThreadFunctions { /* * This is a cut-down version of pthread_create()/pthread_join(). * We omit thread creation attributes and the thread's return value. * * We use uintptr_t as the thread ID type because pthread_t is not * part of the stable ABI; a user thread library might choose an * arbitrary size for its own pthread_t. */ int (*thread_create)(uintptr_t *tid, void (*func)(void *thread_argument), void *thread_argument); int (*thread_join)(uintptr_t tid); }; #endif
Remove two unused PPAPI-related typedefs
Remove two unused PPAPI-related typedefs These typedefs are left over from an earlier iteration of the IRT interface (prior to the interface being stabilised) which was removed in r5108. BUG=none TEST=build Review URL: https://codereview.chromium.org/11016034 git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@9913 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
C
bsd-3-clause
sbc100/native_client,nacl-webkit/native_client,sbc100/native_client,nacl-webkit/native_client,nacl-webkit/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,nacl-webkit/native_client,nacl-webkit/native_client
756875db5caa3eb90a02309d3fed22dd33a10999
include/lldb/Host/HostGetOpt.h
include/lldb/Host/HostGetOpt.h
//===-- GetOpt.h ------------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #pragma once #ifndef _MSC_VER #include <unistd.h> #include <getopt.h> #else #include <lldb/Host/windows/GetOptInc.h> #endif
//===-- GetOpt.h ------------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #pragma once #ifndef _MSC_VER #include <unistd.h> #include <getopt.h> #else #include <lldb/Host/windows/GetOptInc.h> #endif
Add newline at end of file, clang compiler warning.
Add newline at end of file, clang compiler warning. git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@201743 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb
91a0c9a9633a1d795934091fec5abd053730758c
hist/inc/TH1I.h
hist/inc/TH1I.h
// @(#)root/hist:$Name: $:$Id: TH1I.h,v 1.1 2002/05/18 11:02:49 brun Exp $ // Author: Rene Brun 08/09/2003 /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TH1I #define ROOT_TH1I ////////////////////////////////////////////////////////////////////////// // // // TH1I // // // // 1-Dim histogram with a 4 bits integer per channel // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_TH1 #include "TH1.h" #endif #endif
// @(#)root/hist:$Name: $:$Id: TH1I.h,v 1.1 2003/09/08 12:50:23 brun Exp $ // Author: Rene Brun 08/09/2003 /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TH1I #define ROOT_TH1I ////////////////////////////////////////////////////////////////////////// // // // TH1I // // // // 1-Dim histogram with a 32 bits integer per channel // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_TH1 #include "TH1.h" #endif #endif
Fix a typo (thanks to Robert Hatcher)
Fix a typo (thanks to Robert Hatcher) git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@10919 27541ba8-7e3a-0410-8455-c3a389f83636
C
lgpl-2.1
omazapa/root-old,arch1tect0r/root,perovic/root,nilqed/root,CristinaCristescu/root,esakellari/my_root_for_test,simonpf/root,abhinavmoudgil95/root,simonpf/root,mattkretz/root,Y--/root,tc3t/qoot,veprbl/root,0x0all/ROOT,buuck/root,sbinet/cxx-root,omazapa/root,smarinac/root,simonpf/root,bbockelm/root,beniz/root,vukasinmilosevic/root,buuck/root,nilqed/root,ffurano/root5,omazapa/root,olifre/root,dfunke/root,Duraznos/root,krafczyk/root,omazapa/root-old,ffurano/root5,CristinaCristescu/root,perovic/root,georgtroska/root,smarinac/root,davidlt/root,satyarth934/root,0x0all/ROOT,mkret2/root,gganis/root,simonpf/root,evgeny-boger/root,Duraznos/root,abhinavmoudgil95/root,BerserkerTroll/root,arch1tect0r/root,omazapa/root,mkret2/root,esakellari/my_root_for_test,Y--/root,mattkretz/root,CristinaCristescu/root,lgiommi/root,beniz/root,sbinet/cxx-root,veprbl/root,pspe/root,nilqed/root,simonpf/root,karies/root,beniz/root,bbockelm/root,CristinaCristescu/root,lgiommi/root,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,pspe/root,bbockelm/root,gbitzes/root,0x0all/ROOT,agarciamontoro/root,vukasinmilosevic/root,zzxuanyuan/root-compressor-dummy,strykejern/TTreeReader,agarciamontoro/root,arch1tect0r/root,root-mirror/root,olifre/root,abhinavmoudgil95/root,perovic/root,satyarth934/root,satyarth934/root,strykejern/TTreeReader,esakellari/root,Y--/root,BerserkerTroll/root,evgeny-boger/root,sirinath/root,davidlt/root,bbockelm/root,evgeny-boger/root,veprbl/root,mattkretz/root,perovic/root,abhinavmoudgil95/root,zzxuanyuan/root,vukasinmilosevic/root,mattkretz/root,Duraznos/root,bbockelm/root,alexschlueter/cern-root,buuck/root,omazapa/root-old,mhuwiler/rootauto,sawenzel/root,davidlt/root,zzxuanyuan/root,sbinet/cxx-root,perovic/root,olifre/root,lgiommi/root,zzxuanyuan/root-compressor-dummy,lgiommi/root,CristinaCristescu/root,omazapa/root-old,zzxuanyuan/root-compressor-dummy,mkret2/root,zzxuanyuan/root-compressor-dummy,bbockelm/root,simonpf/root,dfunke/root,tc3t/qoot,strykejern/TTreeReader,dfunke/root,arch1tect0r/root,sirinath/root,evgeny-boger/root,mattkretz/root,Dr15Jones/root,jrtomps/root,smarinac/root,davidlt/root,sbinet/cxx-root,davidlt/root,arch1tect0r/root,satyarth934/root,dfunke/root,beniz/root,jrtomps/root,alexschlueter/cern-root,vukasinmilosevic/root,jrtomps/root,thomaskeck/root,zzxuanyuan/root,krafczyk/root,arch1tect0r/root,dfunke/root,Y--/root,arch1tect0r/root,zzxuanyuan/root-compressor-dummy,veprbl/root,sirinath/root,georgtroska/root,smarinac/root,nilqed/root,karies/root,davidlt/root,esakellari/my_root_for_test,cxx-hep/root-cern,vukasinmilosevic/root,satyarth934/root,esakellari/root,pspe/root,esakellari/my_root_for_test,gganis/root,kirbyherm/root-r-tools,sawenzel/root,krafczyk/root,pspe/root,sirinath/root,evgeny-boger/root,Dr15Jones/root,veprbl/root,veprbl/root,nilqed/root,vukasinmilosevic/root,gbitzes/root,beniz/root,tc3t/qoot,mkret2/root,BerserkerTroll/root,gganis/root,0x0all/ROOT,esakellari/root,esakellari/root,karies/root,agarciamontoro/root,bbockelm/root,agarciamontoro/root,arch1tect0r/root,arch1tect0r/root,sbinet/cxx-root,ffurano/root5,mhuwiler/rootauto,jrtomps/root,karies/root,abhinavmoudgil95/root,tc3t/qoot,thomaskeck/root,mkret2/root,olifre/root,kirbyherm/root-r-tools,mattkretz/root,zzxuanyuan/root-compressor-dummy,sirinath/root,esakellari/root,root-mirror/root,davidlt/root,tc3t/qoot,satyarth934/root,Duraznos/root,georgtroska/root,mhuwiler/rootauto,BerserkerTroll/root,nilqed/root,zzxuanyuan/root-compressor-dummy,tc3t/qoot,agarciamontoro/root,pspe/root,thomaskeck/root,smarinac/root,olifre/root,pspe/root,kirbyherm/root-r-tools,Y--/root,tc3t/qoot,0x0all/ROOT,olifre/root,beniz/root,sbinet/cxx-root,sawenzel/root,sawenzel/root,georgtroska/root,smarinac/root,Duraznos/root,esakellari/root,esakellari/root,root-mirror/root,gganis/root,ffurano/root5,zzxuanyuan/root-compressor-dummy,omazapa/root,bbockelm/root,sbinet/cxx-root,mhuwiler/rootauto,pspe/root,sirinath/root,krafczyk/root,abhinavmoudgil95/root,karies/root,tc3t/qoot,0x0all/ROOT,omazapa/root-old,arch1tect0r/root,mkret2/root,cxx-hep/root-cern,georgtroska/root,evgeny-boger/root,davidlt/root,jrtomps/root,esakellari/my_root_for_test,mhuwiler/rootauto,karies/root,alexschlueter/cern-root,mhuwiler/rootauto,0x0all/ROOT,sawenzel/root,bbockelm/root,agarciamontoro/root,Duraznos/root,tc3t/qoot,gganis/root,zzxuanyuan/root-compressor-dummy,davidlt/root,lgiommi/root,gbitzes/root,Duraznos/root,zzxuanyuan/root,krafczyk/root,olifre/root,vukasinmilosevic/root,BerserkerTroll/root,tc3t/qoot,mattkretz/root,kirbyherm/root-r-tools,thomaskeck/root,Duraznos/root,mkret2/root,omazapa/root,Y--/root,sawenzel/root,root-mirror/root,thomaskeck/root,zzxuanyuan/root,olifre/root,georgtroska/root,veprbl/root,simonpf/root,karies/root,arch1tect0r/root,gbitzes/root,esakellari/my_root_for_test,buuck/root,buuck/root,gganis/root,abhinavmoudgil95/root,jrtomps/root,olifre/root,0x0all/ROOT,Dr15Jones/root,Dr15Jones/root,georgtroska/root,georgtroska/root,veprbl/root,esakellari/root,lgiommi/root,krafczyk/root,0x0all/ROOT,mattkretz/root,krafczyk/root,smarinac/root,evgeny-boger/root,dfunke/root,BerserkerTroll/root,karies/root,cxx-hep/root-cern,jrtomps/root,CristinaCristescu/root,perovic/root,root-mirror/root,root-mirror/root,sawenzel/root,perovic/root,satyarth934/root,beniz/root,omazapa/root,jrtomps/root,lgiommi/root,gbitzes/root,Y--/root,thomaskeck/root,thomaskeck/root,mattkretz/root,nilqed/root,perovic/root,evgeny-boger/root,sirinath/root,satyarth934/root,agarciamontoro/root,omazapa/root-old,alexschlueter/cern-root,beniz/root,BerserkerTroll/root,omazapa/root,kirbyherm/root-r-tools,sirinath/root,vukasinmilosevic/root,smarinac/root,lgiommi/root,satyarth934/root,satyarth934/root,abhinavmoudgil95/root,mhuwiler/rootauto,sirinath/root,omazapa/root-old,georgtroska/root,evgeny-boger/root,karies/root,evgeny-boger/root,esakellari/root,mkret2/root,gbitzes/root,strykejern/TTreeReader,jrtomps/root,buuck/root,davidlt/root,gbitzes/root,gbitzes/root,agarciamontoro/root,smarinac/root,dfunke/root,thomaskeck/root,agarciamontoro/root,omazapa/root,gbitzes/root,krafczyk/root,vukasinmilosevic/root,gbitzes/root,perovic/root,zzxuanyuan/root,buuck/root,root-mirror/root,sawenzel/root,CristinaCristescu/root,beniz/root,ffurano/root5,omazapa/root-old,ffurano/root5,esakellari/my_root_for_test,abhinavmoudgil95/root,buuck/root,mhuwiler/rootauto,zzxuanyuan/root,mattkretz/root,mhuwiler/rootauto,simonpf/root,sbinet/cxx-root,perovic/root,abhinavmoudgil95/root,BerserkerTroll/root,buuck/root,mattkretz/root,krafczyk/root,sbinet/cxx-root,lgiommi/root,mkret2/root,olifre/root,Y--/root,Duraznos/root,cxx-hep/root-cern,lgiommi/root,smarinac/root,pspe/root,kirbyherm/root-r-tools,pspe/root,dfunke/root,gganis/root,mkret2/root,beniz/root,alexschlueter/cern-root,zzxuanyuan/root,vukasinmilosevic/root,gganis/root,sbinet/cxx-root,vukasinmilosevic/root,cxx-hep/root-cern,pspe/root,cxx-hep/root-cern,cxx-hep/root-cern,CristinaCristescu/root,sirinath/root,strykejern/TTreeReader,satyarth934/root,veprbl/root,simonpf/root,sawenzel/root,CristinaCristescu/root,georgtroska/root,simonpf/root,perovic/root,veprbl/root,gganis/root,lgiommi/root,zzxuanyuan/root,jrtomps/root,gganis/root,gbitzes/root,buuck/root,omazapa/root-old,krafczyk/root,buuck/root,alexschlueter/cern-root,omazapa/root,simonpf/root,Y--/root,pspe/root,esakellari/root,BerserkerTroll/root,Dr15Jones/root,jrtomps/root,karies/root,zzxuanyuan/root,zzxuanyuan/root,abhinavmoudgil95/root,olifre/root,agarciamontoro/root,esakellari/my_root_for_test,thomaskeck/root,Y--/root,bbockelm/root,veprbl/root,Duraznos/root,nilqed/root,root-mirror/root,alexschlueter/cern-root,Duraznos/root,sawenzel/root,zzxuanyuan/root-compressor-dummy,dfunke/root,mkret2/root,davidlt/root,beniz/root,sawenzel/root,strykejern/TTreeReader,sbinet/cxx-root,dfunke/root,omazapa/root,evgeny-boger/root,gganis/root,ffurano/root5,root-mirror/root,thomaskeck/root,agarciamontoro/root,nilqed/root,krafczyk/root,esakellari/root,georgtroska/root,omazapa/root-old,Dr15Jones/root,mhuwiler/rootauto,sirinath/root,omazapa/root-old,nilqed/root,root-mirror/root,esakellari/my_root_for_test,cxx-hep/root-cern,dfunke/root,omazapa/root,nilqed/root,CristinaCristescu/root,root-mirror/root,Y--/root,CristinaCristescu/root,mhuwiler/rootauto,bbockelm/root,esakellari/my_root_for_test,zzxuanyuan/root,BerserkerTroll/root,strykejern/TTreeReader,kirbyherm/root-r-tools,karies/root,Dr15Jones/root
aebaf3931443eadaba8519dc96a25026e03eaf27
FastEasyMapping/Source/Core/Store/FEMManagedObjectStore.h
FastEasyMapping/Source/Core/Store/FEMManagedObjectStore.h
// For License please refer to LICENSE file in the root of FastEasyMapping project #import "FEMObjectStore.h" @class NSManagedObjectContext; @interface FEMManagedObjectStore : FEMObjectStore - (nonnull instancetype)initWithContext:(nonnull NSManagedObjectContext *)context NS_DESIGNATED_INITIALIZER; @property (nonatomic, strong, readonly, nonnull) NSManagedObjectContext *context; @property (nonatomic) BOOL saveContextOnCommit; @end
// For License please refer to LICENSE file in the root of FastEasyMapping project #import "FEMObjectStore.h" NS_ASSUME_NONNULL_BEGIN @class NSManagedObjectContext; @interface FEMManagedObjectStore : FEMObjectStore - (instancetype)init NS_UNAVAILABLE; - (instancetype)initWithContext:(NSManagedObjectContext *)context NS_DESIGNATED_INITIALIZER; @property (nonatomic, strong, readonly) NSManagedObjectContext *context; @property (nonatomic) BOOL saveContextOnCommit; @end NS_ASSUME_NONNULL_END
Mark init as unavailable for ObjectStore
Mark init as unavailable for ObjectStore
C
mit
k06a/FastEasyMapping
431a554ee2e450eae7eaceaf3c5d9c055b746ef8
Pod/Classes/SEEngineProtocol.h
Pod/Classes/SEEngineProtocol.h
// // SEEngineProtocol.h // Pods // // Created by Danil Tulin on 3/14/16. // // #import <Foundation/Foundation.h> @protocol EngineProtocol <NSObject> @required - (void)feedBGRAImageData:(u_int8_t *)data width:(NSUInteger)width height:(NSUInteger)height; @property (nonatomic) float progress; @property (nonatomic) BOOL isAbleToProcess; @end
// // SEEngineProtocol.h // Pods // // Created by Danil Tulin on 3/14/16. // // #import <Foundation/Foundation.h> @protocol EngineProtocol <NSObject> @required - (void)feedBGRAImageData:(u_int8_t *)data width:(NSUInteger)width height:(NSUInteger)height; @property (nonatomic) float progress; @property (nonatomic) BOOL isAbleToProcess; - (void)startSession; - (void)stopSession; @end
Add start / stop session methods
Add start / stop session methods
C
mit
tulindanil/SEUIKit
e3e83ed7cbf0a8bdca905ecacf29a57a99ebe01a
Source/Objects/GTLBatchQuery.h
Source/Objects/GTLBatchQuery.h
/* Copyright (c) 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // // GTLBatchQuery.h // #import "GTLQuery.h" @interface GTLBatchQuery : NSObject <GTLQueryProtocol> { @private NSMutableArray *queries_; NSMutableDictionary *requestIDMap_; BOOL skipAuthorization_; } // Queries included in this batch. Each query should have a unique requestID. @property (retain) NSArray *queries; // Clients may set this to NO to disallow authorization. Defaults to YES. @property (assign) BOOL shouldSkipAuthorization; + (id)batchQuery; + (id)batchQueryWithQueries:(NSArray *)array; - (void)addQuery:(GTLQuery *)query; - (GTLQuery *)queryForRequestID:(NSString *)requestID; @end
/* Copyright (c) 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // // GTLBatchQuery.h // #import "GTLQuery.h" @interface GTLBatchQuery : NSObject <GTLQueryProtocol> { @private NSMutableArray *queries_; NSMutableDictionary *requestIDMap_; BOOL skipAuthorization_; } // Queries included in this batch. Each query should have a unique requestID. @property (retain) NSArray *queries; // Clients may set this to YES to disallow authorization. Defaults to NO. @property (assign) BOOL shouldSkipAuthorization; + (id)batchQuery; + (id)batchQueryWithQueries:(NSArray *)array; - (void)addQuery:(GTLQuery *)query; - (GTLQuery *)queryForRequestID:(NSString *)requestID; @end
Fix comment on shouldSkipAuthorization property
Fix comment on shouldSkipAuthorization property
C
apache-2.0
creationst/google-api-objectivec-client
b18e2d7842de719b60e2902f201d745897749c4b
mt.h
mt.h
#ifndef _MATH_MT_H_ #define _MATH_MT_H_ //#if defined(_MSC_VER) && (_MSC_VER <= 1600) // sufficient #if defined(_MSC_VER) // better? typedef unsigned __int32 uint32_t; #elif defined(__linux__) || defined(__GLIBC__) || defined(__WIN32__) || defined(__APPLE__) #include <stdint.h> #elif defined(__osf__) #include <inttypes.h> #else #include <sys/types.h> #endif enum { N = 624, M = 397 }; struct mt { uint32_t mt[N]; int mti; uint32_t seed; }; struct mt *mt_init(void); void mt_free(struct mt *self); uint32_t mt_get_seed(struct mt *self); void mt_init_seed(struct mt *self, uint32_t seed); void mt_setup_array(struct mt *self, uint32_t *array, int n); double mt_genrand(struct mt *self); #endif
#ifndef _MATH_MT_H_ #define _MATH_MT_H_ #if defined(_MSC_VER) && (_MSC_VER < 1600) // for MS Visual Studio prior to 2010 typedef unsigned __int32 uint32_t; #elif defined(__linux__) || defined(__GLIBC__) || defined(__WIN32__) || defined(_MSC_VER) || defined(__APPLE__) #include <stdint.h> #elif defined(__osf__) #include <inttypes.h> #else #include <sys/types.h> #endif enum { N = 624, M = 397 }; struct mt { uint32_t mt[N]; int mti; uint32_t seed; }; struct mt *mt_init(void); void mt_free(struct mt *self); uint32_t mt_get_seed(struct mt *self); void mt_init_seed(struct mt *self, uint32_t seed); void mt_setup_array(struct mt *self, uint32_t *array, int n); double mt_genrand(struct mt *self); #endif
Include <stdint.h> for MS Visual Studio 2010 and above
Include <stdint.h> for MS Visual Studio 2010 and above
C
bsd-3-clause
amenonsen/Math-Random-MT,amenonsen/Math-Random-MT
caa860cede791d4787e773624a7627ef963fbeed
src/QGCConfig.h
src/QGCConfig.h
#ifndef QGC_CONFIGURATION_H #define QGC_CONFIGURATION_H #include <QString> /** @brief Polling interval in ms */ #define SERIAL_POLL_INTERVAL 4 /** @brief Heartbeat emission rate, in Hertz (times per second) */ #define MAVLINK_HEARTBEAT_DEFAULT_RATE 1 #define WITH_TEXT_TO_SPEECH 1 #define QGC_APPLICATION_NAME "QGroundControl" #define QGC_APPLICATION_VERSION "v. 2.0.3 (beta)" namespace QGC { const QString APPNAME = "QGROUNDCONTROL"; const QString ORG_NAME = "QGROUNDCONTROL.ORG"; //can be customized by forks to e.g. mycompany.com to maintain separate Settings for customized apps const QString ORG_DOMAIN = "org.qgroundcontrol";//can be customized by forks const int APPLICATIONVERSION = 203; // 2.0.3 } #endif // QGC_CONFIGURATION_H
#ifndef QGC_CONFIGURATION_H #define QGC_CONFIGURATION_H #include <QString> /** @brief Polling interval in ms */ #define SERIAL_POLL_INTERVAL 4 /** @brief Heartbeat emission rate, in Hertz (times per second) */ #define MAVLINK_HEARTBEAT_DEFAULT_RATE 1 #define WITH_TEXT_TO_SPEECH 1 #define QGC_APPLICATION_NAME "QGroundControl" #define QGC_APPLICATION_VERSION_BASE "v2.0.3" #define QGC_APPLICATION_VERSION_SUFFIX ".234 (Daily Build)" #ifdef QGC_APPLICATION_VERSION_SUFFIX #define QGC_APPLICATION_VERSION QGC_APPLICATION_VERSION_BASE QGC_APPLICATION_VERSION_SUFFIX #else #define QGC_APPLICATION_VERSION QGC_APPLICATION_VERSION_BASE " (Developer Build)" #endif namespace QGC { const QString APPNAME = "QGROUNDCONTROL"; const QString ORG_NAME = "QGROUNDCONTROL.ORG"; //can be customized by forks to e.g. mycompany.com to maintain separate Settings for customized apps const QString ORG_DOMAIN = "org.qgroundcontrol";//can be customized by forks const int APPLICATIONVERSION = 203; // 2.0.3 } #endif // QGC_CONFIGURATION_H
Allow version suffix from command line
Allow version suffix from command line
C
agpl-3.0
hejunbok/qgroundcontrol,caoxiongkun/qgroundcontrol,catch-twenty-two/qgroundcontrol,iidioter/qgroundcontrol,RedoXyde/PX4_qGCS,iidioter/qgroundcontrol,Hunter522/qgroundcontrol,TheIronBorn/qgroundcontrol,jy723/qgroundcontrol,ethz-asl/qgc_asl,LIKAIMO/qgroundcontrol,catch-twenty-two/qgroundcontrol,UAVenture/qgroundcontrol,dagoodma/qgroundcontrol,scott-eddy/qgroundcontrol,iidioter/qgroundcontrol,fizzaly/qgroundcontrol,remspoor/qgroundcontrol,RedoXyde/PX4_qGCS,ethz-asl/qgc_asl,scott-eddy/qgroundcontrol,scott-eddy/qgroundcontrol,greenoaktree/qgroundcontrol,LIKAIMO/qgroundcontrol,devbharat/qgroundcontrol,greenoaktree/qgroundcontrol,hejunbok/qgroundcontrol,catch-twenty-two/qgroundcontrol,kd0aij/qgroundcontrol,jy723/qgroundcontrol,CornerOfSkyline/qgroundcontrol,Hunter522/qgroundcontrol,TheIronBorn/qgroundcontrol,jy723/qgroundcontrol,lis-epfl/qgroundcontrol,CornerOfSkyline/qgroundcontrol,catch-twenty-two/qgroundcontrol,devbharat/qgroundcontrol,cfelipesouza/qgroundcontrol,iidioter/qgroundcontrol,LIKAIMO/qgroundcontrol,ethz-asl/qgc_asl,fizzaly/qgroundcontrol,iidioter/qgroundcontrol,fizzaly/qgroundcontrol,dagoodma/qgroundcontrol,scott-eddy/qgroundcontrol,TheIronBorn/qgroundcontrol,fizzaly/qgroundcontrol,kd0aij/qgroundcontrol,BMP-TECH/qgroundcontrol,TheIronBorn/qgroundcontrol,ethz-asl/qgc_asl,fizzaly/qgroundcontrol,nado1688/qgroundcontrol,greenoaktree/qgroundcontrol,caoxiongkun/qgroundcontrol,nado1688/qgroundcontrol,BMP-TECH/qgroundcontrol,greenoaktree/qgroundcontrol,caoxiongkun/qgroundcontrol,fizzaly/qgroundcontrol,UAVenture/qgroundcontrol,caoxiongkun/qgroundcontrol,RedoXyde/PX4_qGCS,UAVenture/qgroundcontrol,iidioter/qgroundcontrol,kd0aij/qgroundcontrol,BMP-TECH/qgroundcontrol,TheIronBorn/qgroundcontrol,jy723/qgroundcontrol,hejunbok/qgroundcontrol,catch-twenty-two/qgroundcontrol,scott-eddy/qgroundcontrol,lis-epfl/qgroundcontrol,hejunbok/qgroundcontrol,dagoodma/qgroundcontrol,remspoor/qgroundcontrol,cfelipesouza/qgroundcontrol,cfelipesouza/qgroundcontrol,mihadyuk/qgroundcontrol,CornerOfSkyline/qgroundcontrol,CornerOfSkyline/qgroundcontrol,nado1688/qgroundcontrol,lis-epfl/qgroundcontrol,dagoodma/qgroundcontrol,UAVenture/qgroundcontrol,UAVenture/qgroundcontrol,remspoor/qgroundcontrol,kd0aij/qgroundcontrol,mihadyuk/qgroundcontrol,kd0aij/qgroundcontrol,lis-epfl/qgroundcontrol,remspoor/qgroundcontrol,ethz-asl/qgc_asl,devbharat/qgroundcontrol,nado1688/qgroundcontrol,kd0aij/qgroundcontrol,mihadyuk/qgroundcontrol,caoxiongkun/qgroundcontrol,RedoXyde/PX4_qGCS,lis-epfl/qgroundcontrol,mihadyuk/qgroundcontrol,devbharat/qgroundcontrol,jy723/qgroundcontrol,LIKAIMO/qgroundcontrol,Hunter522/qgroundcontrol,cfelipesouza/qgroundcontrol,cfelipesouza/qgroundcontrol,caoxiongkun/qgroundcontrol,mihadyuk/qgroundcontrol,scott-eddy/qgroundcontrol,LIKAIMO/qgroundcontrol,CornerOfSkyline/qgroundcontrol,hejunbok/qgroundcontrol,remspoor/qgroundcontrol,remspoor/qgroundcontrol,greenoaktree/qgroundcontrol,UAVenture/qgroundcontrol,jy723/qgroundcontrol,BMP-TECH/qgroundcontrol,CornerOfSkyline/qgroundcontrol,nado1688/qgroundcontrol,nado1688/qgroundcontrol,Hunter522/qgroundcontrol,BMP-TECH/qgroundcontrol,LIKAIMO/qgroundcontrol,RedoXyde/PX4_qGCS,catch-twenty-two/qgroundcontrol,hejunbok/qgroundcontrol,devbharat/qgroundcontrol,TheIronBorn/qgroundcontrol,RedoXyde/PX4_qGCS,dagoodma/qgroundcontrol,Hunter522/qgroundcontrol,greenoaktree/qgroundcontrol,dagoodma/qgroundcontrol,mihadyuk/qgroundcontrol,Hunter522/qgroundcontrol,BMP-TECH/qgroundcontrol,cfelipesouza/qgroundcontrol,devbharat/qgroundcontrol
0a77cedc5dd384cead701b6c9b58d67da4971757
fetch.h
fetch.h
#ifndef CJET_FETCH_H #define CJET_FETCH_H #include "json/cJSON.h" #include "list.h" #include "peer.h" typedef int (*match_func)(const char *fetch_path, const char *state_path); struct path_matcher { char *fetch_path; match_func match_function; }; struct fetch { char *fetch_id; const struct peer *peer; struct list_head next_fetch; struct path_matcher matcher[12]; }; cJSON *add_fetch_to_peer(struct peer *p, cJSON *params); void remove_all_fetchers_from_peer(struct peer *p); #endif
#ifndef CJET_FETCH_H #define CJET_FETCH_H #include "json/cJSON.h" #include "list.h" #include "peer.h" typedef int (*match_func)(const char *fetch_path, const char *state_path); struct path_matcher { char *fetch_path; match_func match_function; uintptr_t cookie; }; struct fetch { char *fetch_id; const struct peer *peer; struct list_head next_fetch; struct path_matcher matcher[12]; }; cJSON *add_fetch_to_peer(struct peer *p, cJSON *params); void remove_all_fetchers_from_peer(struct peer *p); #endif
Add cookie entry for auxilary match data.
Add cookie entry for auxilary match data.
C
mit
gatzka/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,mloy/cjet,mloy/cjet,gatzka/cjet
bf55c4043cb6f4fab23e42e62cbd911c333c82f8
libs/samson/stream/QueuesManager.h
libs/samson/stream/QueuesManager.h
#ifndef _H_STREAM_QUEUE_MANAGER #define _H_STREAM_QUEUE_MANAGER /* **************************************************************************** * * FILE QueuesManager.h * * AUTHOR Andreu Urruela Planas * * All the queues contained in the system * */ #include "au/map.h" // au::map namespace samson { namespace stream { class Queue; class Block; class QueuesManager { au::map< std::string , Queue > queues; // Map with the current queues public: QueuesManager(); std::string getStatus(); void addBlock( std::string queue , Block *b); }; } } #endif
#ifndef _H_STREAM_QUEUE_MANAGER #define _H_STREAM_QUEUE_MANAGER /* **************************************************************************** * * FILE QueuesManager.h * * AUTHOR Andreu Urruela Planas * * All the queues contained in the system * */ #include "au/map.h" // au::map #include <string> namespace samson { namespace stream { class Queue; class Block; class QueuesManager { au::map< std::string , Queue > queues; // Map with the current queues public: QueuesManager(); std::string getStatus(); void addBlock( std::string queue , Block *b); }; } } #endif
Fix compilation broken for linux
Fix compilation broken for linux git-svn-id: 9714148d14941aebeae8d7f7841217f5ffc02bc5@1242 4143565c-f3ec-42ea-b729-f8ce0cf5cbc3
C
apache-2.0
telefonicaid/fiware-cosmos-platform,telefonicaid/fiware-cosmos-platform,telefonicaid/fiware-cosmos-platform,telefonicaid/fiware-cosmos-platform,telefonicaid/fiware-cosmos-platform
996c8b178b365009726f0d9fd5540439aafe7e9b
inc/ow_solver_container.h
inc/ow_solver_container.h
#ifndef OW_SOLVER_CONTAINER #define OW_SOLVER_CONTAINER #include "ow_isolver.h" #include "ow_cl_const.h" #include <string> #include <vector> namespace x_engine { namespace solver { enum SOLVER_TYPE { OCL = 1, CUDA, SINGLE, PARALLEL }; enum DEVICE { CPU = 0, GPU = 1, ALL = 2 }; struct device { DEVICE type; std::string name; bool is_buisy; }; class solver_container { public: solver_container(size_t devices_number = 1, SOLVER_TYPE s_t = OCL); ~solver_container() {} private: std::vector<std::shared_ptr<i_solver>> _solvers; std::vector<std::shared_ptr<device>> devices; }; } } #endif
#ifndef OW_SOLVER_CONTAINER #define OW_SOLVER_CONTAINER #include "ow_isolver.h" #include "ow_cl_const.h" #include <string> #include <vector> namespace x_engine { namespace solver { enum SOLVER_TYPE { OCL = 1, CUDA, SINGLE, PARALLEL }; enum DEVICE { CPU = 0, GPU = 1, ALL = 2 }; struct device { DEVICE type; std::string name; bool is_buisy; }; class solver_container { public: solver_container(const solver_container &) = delete; solver_container &operator=(const solver_container &) = delete; /** Classic Maer's singleton */ static solver_container &instance(size_t devices_number = 1, SOLVER_TYPE s_t = OCL) { static solver_container s(size_t devices_number, SOLVER_TYPE s_t); return s; } private: solver_container(size_t devices_number = 1, SOLVER_TYPE s_t = OCL); ~solver_container() {} std::vector<std::shared_ptr<i_solver>> _solvers; std::vector<std::shared_ptr<device>> devices; }; } } #endif
Change solver_container is singleton now.
Change solver_container is singleton now.
C
mit
skhayrulin/x_engine,skhayrulin/x_engine,skhayrulin/x_engine
981c98937d40a196cc09530504012a792a7b5348
Source/Core/HCSelfDescribing.h
Source/Core/HCSelfDescribing.h
// // OCHamcrest - HCSelfDescribing.h // Copyright 2013 hamcrest.org. See LICENSE.txt // // Created by: Jon Reid, http://qualitycoding.org/ // Docs: http://hamcrest.github.com/OCHamcrest/ // Source: https://github.com/hamcrest/OCHamcrest // #import <Foundation/Foundation.h> @protocol HCDescription; /** The ability of an object to describe itself. @ingroup core */ @protocol HCSelfDescribing <NSObject> /** Generates a description of the object. The description may be part of a description of a larger object of which this is just a component, so it should be worded appropriately. @param description The description to be built or appended to. */ - (void)describeTo:(id<HCDescription>)description; @end
// // OCHamcrest - HCSelfDescribing.h // Copyright 2013 hamcrest.org. See LICENSE.txt // // Created by: Jon Reid, http://qualitycoding.org/ // Docs: http://hamcrest.github.com/OCHamcrest/ // Source: https://github.com/hamcrest/OCHamcrest // #import <Foundation/Foundation.h> #import "HCDescription.h" /** The ability of an object to describe itself. @ingroup core */ @protocol HCSelfDescribing <NSObject> /** Generates a description of the object. The description may be part of a description of a larger object of which this is just a component, so it should be worded appropriately. @param description The description to be built or appended to. */ - (void)describeTo:(id<HCDescription>)description; @end
Change forward declaration to import for convenience.
Change forward declaration to import for convenience. https://github.com/hamcrest/OCHamcrest/issues/31
C
bsd-2-clause
nschum/OCHamcrest,hamcrest/OCHamcrest,hamcrest/OCHamcrest,klundberg/OCHamcrest,nschum/OCHamcrest,nschum/OCHamcrest,hamcrest/OCHamcrest,klundberg/OCHamcrest
e64358edc12b9a2fcbf57ecb2ce17ca609df8d43
Core/Assembler.h
Core/Assembler.h
#pragma once #include "../Util/FileClasses.h" #include "../Util/Util.h" #include "FileManager.h" #define ARMIPS_VERSION_MAJOR 0 #define ARMIPS_VERSION_MINOR 10 #define ARMIPS_VERSION_REVISION 0 enum class ArmipsMode { FILE, MEMORY }; struct LabelDefinition { std::wstring name; int64_t value; }; struct EquationDefinition { std::wstring name; std::wstring value; }; struct ArmipsArguments { // common ArmipsMode mode; int symFileVersion; bool errorOnWarning; bool silent; StringList* errorsResult; std::vector<EquationDefinition> equList; std::vector<LabelDefinition> labels; // file mode std::wstring inputFileName; std::wstring tempFileName; std::wstring symFileName; bool useAbsoluteFileNames; // memory mode std::shared_ptr<AssemblerFile> memoryFile; std::wstring content; ArmipsArguments() { mode = ArmipsMode::FILE; errorOnWarning = false; silent = false; errorsResult = nullptr; useAbsoluteFileNames = true; } }; bool runArmips(ArmipsArguments& arguments);
#pragma once #include "../Util/FileClasses.h" #include "../Util/Util.h" #include "FileManager.h" #define ARMIPS_VERSION_MAJOR 0 #define ARMIPS_VERSION_MINOR 10 #define ARMIPS_VERSION_REVISION 0 enum class ArmipsMode { FILE, MEMORY }; struct LabelDefinition { std::wstring name; int64_t value; }; struct EquationDefinition { std::wstring name; std::wstring value; }; struct ArmipsArguments { // common ArmipsMode mode; int symFileVersion; bool errorOnWarning; bool silent; StringList* errorsResult; std::vector<EquationDefinition> equList; std::vector<LabelDefinition> labels; // file mode std::wstring inputFileName; std::wstring tempFileName; std::wstring symFileName; bool useAbsoluteFileNames; // memory mode std::shared_ptr<AssemblerFile> memoryFile; std::wstring content; ArmipsArguments() { mode = ArmipsMode::FILE; symFileVersion = 0; errorOnWarning = false; silent = false; errorsResult = nullptr; useAbsoluteFileNames = true; } }; bool runArmips(ArmipsArguments& arguments);
Fix symFileVersion not being initialized in ArmipsArguments constructor
Fix symFileVersion not being initialized in ArmipsArguments constructor
C
mit
Kingcom/armips,Kingcom/armips,sp1187/armips,sp1187/armips,Kingcom/armips,sp1187/armips
48e9fb19e370828f69a2a449c9cdfd32b01d88f5
compiler.h
compiler.h
/* Copyright 2014-2015 Drew Thoreson * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _COMPILER_H #define _COMPILER_H #if __STDC_VERSION__ < 201112L #define _Static_assert(cond, msg) \ extern char navi_static_assert_fail[1/(cond)] #define _Noreturn #define _Alignas(n) __attribute__((aligned(n))) #endif /* * GCC 2.96 or compatible required */ #if defined(__GNUC__) #if __GNUC__ > 3 #undef offsetof #define offsetof(type, member) __builtin_offsetof(type, member) #endif /* Optimization: Condition @x is likely */ #define likely(x) __builtin_expect(!!(x), 1) /* Optimization: Condition @x is unlikely */ #define unlikely(x) __builtin_expect(!!(x), 0) #define __used __attribute__((used)) #define __unused __attribute__((unused)) #else #define likely(x) (x) #define unlikely(x) (x) #define __used #define __unused #endif /* defined(__GNUC__) */ #endif /* _COMPILER_H */
/* Copyright 2014-2015 Drew Thoreson * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _COMPILER_H #define _COMPILER_H #if __STDC_VERSION__ < 201112L #define _Static_assert(cond, msg) \ extern char navi_static_assert_fail[1/(cond)] #ifdef __GNUC__ #define _Noreturn __attribute__((noreturn)) #define _Alignas(n) __attribute__((aligned(n))) #else #define _Noreturn #define _Alignas(n) #pragma message "*** WARNING: _Alignas defined as NOP ***" #endif #endif /* * GCC 2.96 or compatible required */ #if defined(__GNUC__) /* Optimization: Condition @x is likely */ #define likely(x) __builtin_expect(!!(x), 1) /* Optimization: Condition @x is unlikely */ #define unlikely(x) __builtin_expect(!!(x), 0) #define __used __attribute__((used)) #define __unused __attribute__((unused)) #else #define likely(x) (x) #define unlikely(x) (x) #define __used #define __unused #endif /* defined(__GNUC__) */ #endif /* _COMPILER_H */
Use __attribute__s if __GNUC__ defined
Use __attribute__s if __GNUC__ defined Otherwise, define _Noreturn and _Alignas as NOPs, and issue a warning message.
C
mpl-2.0
drewt/navi-scheme,drewt/navi-scheme,drewt/navi-scheme
13dbcc3abd024bd5fbd47cc9b1094f5ade9d6f14
tests/regression/56-witness/05-prec-problem.c
tests/regression/56-witness/05-prec-problem.c
//PARAM: --enable witness.yaml.enabled --enable ana.int.interval #include <stdlib.h> int foo(int* ptr1, int* ptr2){ int result; if(ptr1 == ptr2){ result = 0; } else { result = 1; } // Look at the generated witness.yml to check whether there contradictory precondition_loop_invariant[s] return result; } int main(){ int five = 5; int five2 = 5; int y = foo(&five, &five); int z = foo(&five, &five2); assert(y != z); return 0; }
//PARAM: --enable witness.yaml.enabled --enable ana.int.interval #include <stdlib.h> int foo(int* ptr1, int* ptr2){ int result; if(ptr1 == ptr2){ result = 0; } else { result = 1; } // Look at the generated witness.yml to check whether there are contradictory precondition_loop_invariant[s] return result; } int main(){ int five = 5; int five2 = 5; int y = foo(&five, &five); int z = foo(&five, &five2); assert(y != z); return 0; }
Add missing word in comment
Add missing word in comment
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
6f132875296595c4f26f9eee940666b1a4ca8135
c_fs_monitor/test_fs_monitor.c
c_fs_monitor/test_fs_monitor.c
/* This is a simple C program which is a stub for the FS monitor. It takes one argument which would be a directory to monitor. In this case, the filename is discarded after argument validation. Every minute the */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main (int argc, char **argv) { if (argc != 2) { fprintf(stderr, "Not enough arguments"); exit(EXIT_FAILURE); } while (1) { fprintf(stdout, "{ \"key\": \"value\" }\n"); fflush(stdout); fprintf(stderr, "tick\n"); sleep(1); } }
/* This is a simple C program which is a stub for the FS monitor. It takes one argument which would be a directory to monitor. In this case, the filename is discarded after argument validation. Every minute the */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main (int argc, char **argv) { if (argc < 2) { fprintf(stderr, "Not enough arguments"); exit(EXIT_FAILURE); } while (1) { fprintf(stdout, "{ \"key\": \"value\" }\n"); fflush(stdout); fprintf(stderr, "tick\n"); sleep(1); } }
Fix arguments count check in test inotify program
Fix arguments count check in test inotify program
C
mit
iankronquist/senior-project-experiment,iankronquist/senior-project-experiment,iankronquist/senior-project-experiment,iankronquist/beeswax,iankronquist/beeswax,iankronquist/beeswax,iankronquist/senior-project-experiment,iankronquist/beeswax
a629c9dade4fae3915b632184427aec5e807bbe4
app/hwif.c
app/hwif.c
/* * Part of Jari Komppa's zx spectrum suite * https://github.com/jarikomppa/speccy * released under the unlicense, see http://unlicense.org * (practically public domain) */ // xxxsmbbb // where b = border color, m is mic, s is speaker void port254(const unsigned char color) __z88dk_fastcall { color; // color is in l // Direct border color setting __asm ld a,l ld hl, #_port254tonebit or a, (hl) out (254),a __endasm; } // practically waits for retrace void do_halt() { __asm halt __endasm; }
/* * Part of Jari Komppa's zx spectrum suite * https://github.com/jarikomppa/speccy * released under the unlicense, see http://unlicense.org * (practically public domain) */ // xxxsmbbb // where b = border color, m is mic, s is speaker void port254(const unsigned char color) __z88dk_fastcall { color; // color is in l // Direct border color setting __asm ld a,l ld hl, #_port254tonebit or a, (hl) out (254),a __endasm; } // practically waits for retrace void do_halt() { __asm ei halt __endasm; }
Make sure we've enabled interrupts before calling halt..
Make sure we've enabled interrupts before calling halt..
C
unlicense
jarikomppa/speccy,jarikomppa/speccy,jarikomppa/speccy
8c8d940e07c6ce48a8b342baaafb290e3f9abfac
SGCachePromise.h
SGCachePromise.h
// // SGCachePromise.h // Pods // // Created by James Van-As on 13/05/15. // // #import "Promise.h" #import "MGEvents.h" typedef void(^SGCacheFetchCompletion)(id obj); typedef void(^SGCacheFetchFail)(NSError *error, BOOL wasFatal); typedef void(^SGCacheFetchOnRetry)(); @interface SGCachePromise : PMKPromise @property (nonatomic, copy) SGCacheFetchOnRetry onRetry; @property (nonatomic, copy) SGCacheFetchFail onFail; @end
// // SGCachePromise.h // Pods // // Created by James Van-As on 13/05/15. // // #import <PromiseKit/Promise.h> #import <MGEvents/MGEvents.h> typedef void(^SGCacheFetchCompletion)(id obj); typedef void(^SGCacheFetchFail)(NSError *error, BOOL wasFatal); typedef void(^SGCacheFetchOnRetry)(); @interface SGCachePromise : PMKPromise @property (nonatomic, copy) SGCacheFetchOnRetry onRetry; @property (nonatomic, copy) SGCacheFetchFail onFail; @end
Use Framework style import statements for pod Framework compatibility
Use Framework style import statements for pod Framework compatibility
C
bsd-2-clause
seatgeek/SGImageCache
e4f1a58860b19753d4c887c3e5086b6232cb49ae
src/net/instaweb/util/public/re2.h
src/net/instaweb/util/public/re2.h
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Author: gagansingh@google.com (Gagan Singh) #ifndef NET_INSTAWEB_UTIL_PUBLIC_RE2_H_ #define NET_INSTAWEB_UTIL_PUBLIC_RE2_H_ #include "net/instaweb/util/public/string_util.h" #include "third_party/re2/src/re2/re2.h" using re2::RE2; // Converts a Google StringPiece into an RE2 StringPiece. These are of course // the same basic thing but are declared in distinct namespaces and as far as // C++ type-checking is concerned they are incompatible. // // TODO(jmarantz): In the re2 code itself there are no references to // re2::StringPiece, always just plain StringPiece, so if we can // arrange to get the right definition #included we should be all set. // We could somehow rewrite '#include "re2/stringpiece.h"' to // #include Chromium's stringpiece then everything would just work. inline re2::StringPiece StringPieceToRe2(StringPiece sp) { return re2::StringPiece(sp.data(), sp.size()); } #endif // NET_INSTAWEB_UTIL_PUBLIC_RE2_H_
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Author: gagansingh@google.com (Gagan Singh) #ifndef NET_INSTAWEB_UTIL_PUBLIC_RE2_H_ #define NET_INSTAWEB_UTIL_PUBLIC_RE2_H_ // TODO(morlovich): Remove this forwarding header and change all references. #include "pagespeed/kernel/util/re2.h" #endif // NET_INSTAWEB_UTIL_PUBLIC_RE2_H_
Make this a proper forwarding header rather than a duplication what's under pagespeed/util/
Make this a proper forwarding header rather than a duplication what's under pagespeed/util/
C
apache-2.0
crowell/modpagespeed_tmp,crowell/modpagespeed_tmp,crowell/modpagespeed_tmp,crowell/modpagespeed_tmp,crowell/modpagespeed_tmp,crowell/modpagespeed_tmp,crowell/modpagespeed_tmp
a926488619cbe3aa5b5cf367486f6e4b08d70e98
extensions/ringopengl/opengl11/ring_opengl11.c
extensions/ringopengl/opengl11/ring_opengl11.c
#include "ring.h" /* OpenGL 1.1 Extension Copyright (c) 2017 Mahmoud Fayed <msfclipper@yahoo.com> */ #include <GL/glew.h> #include <GL/glut.h> RING_FUNC(ring_get_gl_zero) { RING_API_RETNUMBER(GL_ZERO); } RING_API void ringlib_init(RingState *pRingState) { ring_vm_funcregister("get_gl_zero",ring_get_gl_zero); }
#include "ring.h" /* OpenGL 1.1 Extension Copyright (c) 2017 Mahmoud Fayed <msfclipper@yahoo.com> */ #include <GL/glew.h> #include <GL/glut.h> RING_FUNC(ring_get_gl_zero) { RING_API_RETNUMBER(GL_ZERO); } RING_FUNC(ring_get_gl_false) { RING_API_RETNUMBER(GL_FALSE); } RING_API void ringlib_init(RingState *pRingState) { ring_vm_funcregister("get_gl_zero",ring_get_gl_zero); ring_vm_funcregister("get_gl_false",ring_get_gl_false); }
Update RingOpenGL 1.1 - Add Constant (Source Code) : GL_FALSE
Update RingOpenGL 1.1 - Add Constant (Source Code) : GL_FALSE
C
mit
ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring
8f1e899485677eb8accfdc999fbd1e7e12187302
Classes/WeakUniqueCollection.h
Classes/WeakUniqueCollection.h
// // WeakUniqueCollection.h // book-shelf // // Created by Artem Gladkov on 28.06.16. // Copyright © 2016 Sibext Ltd. All rights reserved. // #import <Foundation/Foundation.h> @interface WeakUniqueCollection<ObjectType> : NSObject @property(readonly)NSUInteger count; - (void)addObject:(ObjectType)object; - (void)removeObject:(ObjectType)object; - (void)removeAllObjects; - (ObjectType)anyObject; - (NSArray <ObjectType> *)allObjects; - (BOOL)member:(ObjectType)object; @end
// // WeakUniqueCollection.h // book-shelf // // Created by Artem Gladkov on 28.06.16. // Copyright © 2016 Sibext Ltd. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN /** WeakUniqueCollection keeps weak references to the objects and maintains uniqueness. It's public API is fully thread safe. WeakUniqueCollection is not optimized for working with large amount of objects. */ @interface WeakUniqueCollection<ObjectType> : NSObject @property(readonly)NSUInteger count; /** Adds object to the collection @param object ObjectType to be added to the collection */ - (void)addObject:(ObjectType)object; /** Removes object from the collection (if collection contains it). @param object ObjectType to be removed from the collection */ - (void)removeObject:(ObjectType)object; /** Removes all objects from the collection. */ - (void)removeAllObjects; /** Returns any object from the collection. @return ObjectType or nil (if the collection is empty). */ - (nullable ObjectType)anyObject; /** Returns array with all objects from the collection. @return NSArray with objects (cound be empty if the collection is empty). */ - (NSArray <ObjectType> *)allObjects; /** Determines if the object is already contained in the collection. @param object ObjectType to be verified @return YES if object is in the collection NO if object is not in the collection */ - (BOOL)member:(ObjectType)object; @end NS_ASSUME_NONNULL_END
Add documentation for public API and nullability specification.
Add documentation for public API and nullability specification.
C
mit
sibext/WeakUniqueCollection,sibext/WeakUniqueCollection
db4a05949ff8e56fc4334f5b3776ee0f2aa1c8a8
stack.c
stack.c
#include "stack.h" struct Stack { size_t size; size_t top; void** e; } Stack* Stack_Create(size_t n) { Stack* s = (Stack *)malloc(sizeof(Stack)); s->size = n; s->top = 0; s->e = (void**)malloc(sizeof(void*) * (n + 1)); return s; } int Stack_Empty(Stack* s) { if (s->top == 0) { return 1; } else { return 0; } } void Stack_Push(Stack* s, void* e) { if (s == NULL) return; if (s->top == s->size) return; s->top = s->top + 1; s->e[s->top] = e; } void* Stack_Pop(Stack* s) { if (Stack_Empty(s)) return; s->top = s->top - 1; return s->e[s->top]; } void Stack_Destroy(Stack* s) { if (s == NULL) return; free(s->e); free(s); }
#include "stack.h" struct Stack { size_t size; size_t top; void** e; } Stack* Stack_Create(size_t n) { Stack* s = (Stack *)malloc(sizeof(Stack)); s->size = n; s->top = 0; s->e = (void**)malloc(sizeof(void*) * (n + 1)); return s; } int Stack_Empty(Stack* s) { if (s->top == 0) { return 1; } else { return 0; } } void Stack_Push(Stack* s, void* e) { if (s == NULL) return; if (s->top == s->size) return; s->top = s->top + 1; s->e[s->top] = e; } void* Stack_Pop(Stack* s) { if (Stack_Empty(s)) return; s->top = s->top - 1; return s->e[s->top+1]; } void Stack_Destroy(Stack* s) { if (s == NULL) return; free(s->e); free(s); }
Fix incorrect return in pop operation
Fix incorrect return in pop operation
C
mit
MaxLikelihood/CADT
0031954ff9ac9a1c6f080ceb3f9fcec3d3c9a0fd
ParticleSwarmOptimization/CppUtils/CppUtils.h
ParticleSwarmOptimization/CppUtils/CppUtils.h
// CppUtils.h #pragma once #include <algorithm> #include <functional> #include <vector> #include <random> using namespace System; namespace CppUtils { public ref class Random { public: double Random::random_double() { return Random::random_in_range(0.0, 1.0); } double Random::random_in_range(double min, double max) { std::uniform_real_distribution<float> distribution(min, max); std::random_device rd; std::default_random_engine e(rd()); return distribution(e); } std::vector<double> Random::random_vector(double len, double min, double max) { auto result = std::vector<double>(); std::uniform_real_distribution<float> distribution(min, max); std::mt19937 engine; auto generator = bind(distribution, engine); generate(result.begin(), result.end(), generator); return result; } }; }
// CppUtils.h #pragma once #ifdef DEBUG #define SEED(x) 100 #else #define SEED(x) x #endif #include <algorithm> #include <functional> #include <vector> #include <random> using namespace System; namespace CppUtils { public ref class Random { public: double Random::random_double() { return Random::random_in_range(0.0, 1.0); } double Random::random_in_range(double min, double max) { std::uniform_real_distribution<float> distribution(min, max); std::random_device rd; std::default_random_engine e(SEED(rd())); return distribution(e); } std::vector<double> Random::random_vector(double len, double min, double max) { auto result = std::vector<double>(); std::uniform_real_distribution<float> distribution(min, max); std::random_device rd; std::default_random_engine engine(SEED(rd())); auto generator = bind(distribution, engine); std::generate(result.begin(), result.end(), generator); return result; } }; }
Debug macro for seeding random generator.
Debug macro for seeding random generator.
C
mit
trojkac/effective_pso,trojkac/effective_pso
d480f70369ecb66d318357fb5dca71708bb1b91e
test/Preprocessor/headermap-rel2.c
test/Preprocessor/headermap-rel2.c
// This uses a headermap with this entry: // someheader.h -> Product/someheader.h // RUN: %clang_cc1 -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H 2> %t.out // RUN: FileCheck %s -input-file %t.out // CHECK: Product/someheader.h // CHECK: system/usr/include/someheader.h // CHECK: system/usr/include/someheader.h #include "someheader.h" #include <someheader.h> #include <someheader.h>
// This uses a headermap with this entry: // someheader.h -> Product/someheader.h // RUN: %clang_cc1 -v -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H // RUN: %clang_cc1 -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H 2> %t.out // RUN: FileCheck %s -input-file %t.out // CHECK: Product/someheader.h // CHECK: system/usr/include/someheader.h // CHECK: system/usr/include/someheader.h #include "someheader.h" #include <someheader.h> #include <someheader.h>
Add a RUN line to get a hint on why the test is failing at the buildbots.
[test] Add a RUN line to get a hint on why the test is failing at the buildbots. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@205072 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/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,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
6dec686bbe20f6c89b067d27f75eba3ac4cc3727
pose/src/pose_estimator_demo.c
pose/src/pose_estimator_demo.c
#include "estimator.h" #include <stdio.h> int main(int argc, char** argv) { void* estimator = create_estimator(argv[1]); candidates_t* candidates = estimate(estimator, argv[2]); for(unsigned int i = 0; i < candidates->candidates[0]->size; i++) { printf("x: %4lu y: %4lu confidence: %.4f \n", candidates->candidates[0]->parts[i]->x, candidates->candidates[0]->parts[i]->y, candidates->candidates[0]->confidence[i]); } printf("\n"); destroy_estimator(estimator); free_candidates(candidates); }
#include <stdio.h> #include <stdlib.h> #include "estimator.h" int main(int argc, char** argv) { //test(); if(argc < 3) { printf("Usage: PartsBasedDetector1 model_file image_file\n"); exit(0); } void* estimator = create_estimator(argv[1]); candidates_t* candidates = estimate(estimator, argv[2]); print_candidate(candidates->candidates[0]); destroy_estimator(estimator); free_candidates(candidates); }
Delete printing, show usage if arguments are not enough
Delete printing, show usage if arguments are not enough
C
mit
IshitaTakeshi/VirtualFitting,IshitaTakeshi/VirtualFitting
42c64152f63753877008fe6b9c432794c7fce1e3
libpthread/nptl/sysdeps/sh/pthread_spin_lock.c
libpthread/nptl/sysdeps/sh/pthread_spin_lock.c
/* Copyright (C) 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C 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 the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include "pthreadP.h" int pthread_spin_lock (lock) pthread_spinlock_t *lock; { unsigned int val; do __asm__ volatile ("tas.b @%1; movt %0" : "=&r" (val) : "r" (lock) : "memory"); while (val == 0); return 0; }
/* Copyright (C) 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C 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 the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include "pthreadP.h" int pthread_spin_lock (pthread_spinlock_t *lock) { unsigned int val; do __asm__ volatile ("tas.b @%1; movt %0" : "=&r" (val) : "r" (lock) : "memory"); while (val == 0); return 0; }
Remove compiler warning due to old-style function definition
nptl: Remove compiler warning due to old-style function definition Signed-off-by: Carmelo Amoroso <532378793705a04edd56deb76ad8c0442834d55d@st.com>
C
lgpl-2.1
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
103296e919020e156925eb6d57d1da7aad0551bf
config.h
config.h
#ifndef CJET_CONFIG_H #define CJET_CONFIG_H #define SERVER_PORT 11122 #define LISTEN_BACKLOG 40 #define MAX_MESSAGE_SIZE 128 /* 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 250 /* Linux specific configs */ #define MAX_EPOLL_EVENTS 100 #endif
Increase the size of the read buffer fpo testing.
Increase the size of the read buffer fpo testing.
C
mit
mloy/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,gatzka/cjet,mloy/cjet,gatzka/cjet
b1ddc60b6ead5220a101b1dd37479a8a990cc5ac
Include/atlstd.h
Include/atlstd.h
/* * atlstd.h * * Created: 3/31/2017 12:29:59 AM * Author: Vadim Zabavnov */ #ifndef ATLSTD_H_ #define ATLSTD_H_ #include <atlport.h> namespace atl { namespace std { using namespace atl; // standard ports #ifdef PORTA const Port PortA = Port(_SFR_IO_ADDR(PORTA), _SFR_IO_ADDR(DDRA), _SFR_IO_ADDR(PINA)); #endif #ifdef PORTB const Port PortB = Port(_SFR_IO_ADDR(PORTB), _SFR_IO_ADDR(DDRB), _SFR_IO_ADDR(PINB)); #endif #ifdef PORTC const Port PortC = Port(_SFR_IO_ADDR(PORTC), _SFR_IO_ADDR(DDRC), _SFR_IO_ADDR(PINC)); #endif #ifdef PORTD const Port PortD = Port(_SFR_IO_ADDR(PORTD), _SFR_IO_ADDR(DDRD), _SFR_IO_ADDR(PIND)); #endif } } #endif /* ATLSTD_H_ */
/* * atlstd.h * * Created: 3/31/2017 12:29:59 AM * Author: Vadim Zabavnov */ #ifndef ATLSTD_H_ #define ATLSTD_H_ #include <atlport.h> namespace atl { namespace std { using namespace atl; // standard ports #ifdef PORTA constexpr Port PortA = Port(_SFR_IO_ADDR(PORTA), _SFR_IO_ADDR(DDRA), _SFR_IO_ADDR(PINA)); #endif #ifdef PORTB constexpr Port PortB = Port(_SFR_IO_ADDR(PORTB), _SFR_IO_ADDR(DDRB), _SFR_IO_ADDR(PINB)); #endif #ifdef PORTC constexpr Port PortC = Port(_SFR_IO_ADDR(PORTC), _SFR_IO_ADDR(DDRC), _SFR_IO_ADDR(PINC)); #endif #ifdef PORTD constexpr Port PortD = Port(_SFR_IO_ADDR(PORTD), _SFR_IO_ADDR(DDRD), _SFR_IO_ADDR(PIND)); #endif } } #endif /* ATLSTD_H_ */
Make ports constexpr to further reduce binary size
Make ports constexpr to further reduce binary size
C
apache-2.0
vzabavnov/AVRTL,vzabavnov/AVRTL
58e3fdf77ae8adcb89ea5af6fc50a1b2859a485b
src/log_example.c
src/log_example.c
// cc log_example.c log.c #include "log.h" int main(int argc, const char *argv[]) { log_open("example", NULL, 0); /* set log level to info, also the default level */ log_setlevel(LOG_INFO); /* debug mesage won't be seen */ log_debug("debug message"); /* but info and warn message can be seen */ log_info("info message"); log_warn("warn message"); return 0; }
// cc log_example.c log.c #include "log.h" int main(int argc, const char *argv[]) { /* open global logger to stderr (by setting filename to NULL) */ log_open("example", NULL, 0); /* set log level to info, also the default level */ log_setlevel(LOG_INFO); /* debug mesage won't be seen */ log_debug("debug message"); /* but info and warn message can be seen */ log_info("info message"); log_warn("warn message"); return 0; }
Add minor comment for log_open
Add minor comment for log_open
C
bsd-2-clause
hit9/C-Snip,hit9/C-Snip
2485a7bb9de55290ece1edef973b40bae82f55be
src/main.c
src/main.c
#include <stdio.h> #include <stdlib.h> #include "apricosterm.h" #include "screen.h" int main(int argc, char** argv) { SDL_Event event; initScreen("Potato", SCREEN_WIDTH, SCREEN_HEIGHT); char done = 0; while(!done) { while(SDL_PollEvent(&event)) { switch(event.key.keysym.sym) { case SDLK_ESCAPE: done = 1; break; } } SDL_Delay(100); updateWindow(); } destroyScreen(); return EXIT_SUCCESS; }
#include <stdio.h> #include <stdlib.h> #include "apricosterm.h" #include "screen.h" #include "terminalrenderer.h" #include "managedtextures.h" int main(int argc, char** argv) { SDL_Event event; initScreen("Potato", SCREEN_WIDTH, SCREEN_HEIGHT); char done = 0; termRendererInit(); SDL_StartTextInput(); while(!done) { while(SDL_PollEvent(&event)) { switch(event.type) { case SDL_KEYDOWN: switch(event.key.keysym.sym) { case SDLK_ESCAPE: done = 1; break; case SDLK_RETURN: terminalNewLine(1, 1); break; case SDLK_BACKSPACE: terminalBackspace(1); break; default: break; } break; case SDL_TEXTINPUT: terminalPutStr(event.text.text); break; case SDL_QUIT: done = 1; break; default: break; } } SDL_Delay(10); terminalRefresh(); } SDL_StopTextInput(); destroyAllTextures(); destroyScreen(); return EXIT_SUCCESS; }
Integrate terminal renderer for testing
Integrate terminal renderer for testing
C
mit
drdanick/apricosterm
17d53a1d40b1d15f08a80f9f03dd3922156d9fb6
src/repo.c
src/repo.c
/** * repo.c * * Copyright (C) 2017 Nickolas Burr <nickolasburr@gmail.com> */ #include "repo.h" /** * Get all stashes for a repository. */ struct stash *get_stashes (struct repo *r) { return r->stashes; } /** * Set a copy of all stashes for a repository in memory. */ void set_stashes (struct repo *r) { // @todo: Build this function out. char *cmd; FILE *fp; printf("set_stashes -> r->path -> %s\n", r->path); sprintf(cmd, "/usr/bin/git -C %s -- stash list", r->path); fp = popen(cmd, "r"); if (!fp) { printf("Could not open pipe!\n"); exit(EXIT_FAILURE); } while (fgets(r->stashes->entries, (sizeof(r->stashes->entries) - 1), fp) != NULL) { printf("%s\n", r->stashes->entries); } pclose(fp); } /** * Check if the worktree has changed since our last check. */ int has_worktree_changed (struct repo *r) { return 1; }
/** * repo.c * * Copyright (C) 2017 Nickolas Burr <nickolasburr@gmail.com> */ #include "repo.h" /** * Get all stash entries for a repository. */ struct stash *get_stash (struct repo *r) { return r->stash; } /** * Set a copy of all stash entries for a repository. */ void set_stash (struct repo *r) { char *cmd; FILE *fp; // Allocate space for command string cmd = ALLOC(sizeof(char) * (strlen(r->path) + 100)); sprintf(cmd, "/usr/bin/git -C %s stash list", r->path); printf("set_stashes -> cmd -> %s\n", cmd); fp = popen(cmd, "r"); if (!fp) { printf("Could not open pipe!\n"); exit(EXIT_FAILURE); } while (fgets(r->stash->entries, (sizeof(r->stash->entries) - 1), fp) != NULL) { printf("%s\n", r->stash->entries); } // Free space allocated for commnad string FREE(cmd); pclose(fp); } /** * Check if the worktree has changed since the last check. */ int has_worktree_changed (struct repo *r) { return 1; }
Work on stash retrieval, memory allocation
Work on stash retrieval, memory allocation
C
mit
nickolasburr/git-stashd,nickolasburr/git-stashd,nickolasburr/git-stashd
ca1f8cba176ba3dbbbed7ebee2e0399f94c548a1
src/user.c
src/user.c
task usercontrol(){ int DY, DT; bool armsLocked = false; while(true){ //Driving DY = threshold(PAIRED_CH2, 15); DT = threshold(PAIRED_CH1, 15); drive(DY, DT); //Pistons (toggle) if(PAIRED_BTN7R){ pistons(!PISTON_POS); waitUntil(!PAIRED_BTN7R); } //Arms if(PAIRED_BTN7L){ armsLocked = !armsLocked; waitUntil(!PAIRED_BTN7L); } if(armsLocked){ arms(ARM_LOCK); } else { arms((PAIRED_BTN6U - PAIRED_BTN6D) * MAX_POWER); } //Lift lift((PAIRED_BTN7U - PAIRED_BTN7D) * MAX_POWER); //Intake intake((PAIRED_BTN5U - PAIRED_BTN5D) * MAX_POWER); } }
task usercontrol(){ int DY, DT; bool armsLocked = false; while(true){ //Driving DY = threshold(PAIRED_CH2, 15) + (PAIRED_BTN8U * MAX_POWER) - (PAIRED_BTN8D * MAX_POWER); DT = threshold(PAIRED_CH1, 15) + (PAIRED_BTN8R * MAX_POWER) - (PAIRED_BTN8L * MAX_POWER); drive(DY, DT); //Pistons (toggle) if(PAIRED_BTN7R){ pistons(!PISTON_POS); waitUntil(!PAIRED_BTN7R); } //Arms if(PAIRED_BTN7L){ armsLocked = !armsLocked; waitUntil(!PAIRED_BTN7L); } if(armsLocked){ arms(ARM_LOCK); } else { arms(threshold(PAIRED_CH3, 15) + ((PAIRED_BTN5U - PAIRED_BTN5D) * MAX_POWER)); } //Lift lift((PAIRED_BTN7U - PAIRED_BTN7D) * MAX_POWER); //Intake intake((PAIRED_BTN6U - PAIRED_BTN6D) * MAX_POWER); } }
Add buttons for driving, and swap intake and arm buttons
Add buttons for driving, and swap intake and arm buttons
C
mit
18moorei/code-red-in-the-zone
d19c36737dd3d2111911c411b19f1a270415b079
SMLTextViewPrivate.h
SMLTextViewPrivate.h
// // SMLTextViewPrivate.h // Fragaria // // Created by Daniele Cattaneo on 26/02/15. // // #import <Cocoa/Cocoa.h> #import "SMLTextView.h" #import "SMLAutoCompleteDelegate.h" @interface SMLTextView () /** The autocomplete delegate for this text view. This property is private * because it is set to an internal object when MGSFragaria's autocomplete * delegate is set to nil. */ @property id<SMLAutoCompleteDelegate> autocompleteDelegate; /** The controller which manages the accessory user interface for this text * view. */ @property (readonly) MGSExtraInterfaceController *interfaceController; /** Instances of this class will perform syntax highlighting in text views. */ @property (readonly) SMLSyntaxColouring *syntaxColouring; @end
// // SMLTextViewPrivate.h // Fragaria // // Created by Daniele Cattaneo on 26/02/15. // // #import <Cocoa/Cocoa.h> #import "SMLTextView.h" #import "SMLAutoCompleteDelegate.h" @interface SMLTextView () /** The autocomplete delegate for this text view. This property is private * because it is set to an internal object when MGSFragaria's autocomplete * delegate is set to nil. */ @property (weak) id<SMLAutoCompleteDelegate> autocompleteDelegate; /** The controller which manages the accessory user interface for this text * view. */ @property (readonly) MGSExtraInterfaceController *interfaceController; /** Instances of this class will perform syntax highlighting in text views. */ @property (readonly) SMLSyntaxColouring *syntaxColouring; @end
Use weak attribute for the autocompleteDelegate property of SMLTextView.
Use weak attribute for the autocompleteDelegate property of SMLTextView.
C
apache-2.0
shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,vakoc/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,bitstadium/Fragaria,shysaur/Fragaria,bitstadium/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,vakoc/Fragaria,shysaur/Fragaria
0d91ee8a0d9b26e4847ce5724a08a0d5160b38e8
app/src/main/jni/scavenger.c
app/src/main/jni/scavenger.c
#include <jni.h> #include <android/log.h> JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved) { __android_log_print(ANDROID_LOG_VERBOSE, "Scavenger Jni", "JNI_OnLoad is called"); }
#include <jni.h> #include <signal.h> #include <android/log.h> #define CATCHSIG(X) sigaction(X, &handler, &old_sa[X]) static struct sigaction old_sa[NSIG]; void android_sigaction(int signal, siginfo_t *info, void *reserved) { // TODO invoke java method } JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved) { __android_log_print(ANDROID_LOG_VERBOSE, "Scavenger Jni", "JNI_OnLoad is called"); struct sigaction handler; memset(&handler, 0, sizeof(sigaction)); handler.sa_sigaction = android_sigaction; handler.sa_flags = SA_RESETHAND; CATCHSIG(SIGILL); CATCHSIG(SIGABRT); CATCHSIG(SIGBUS); CATCHSIG(SIGFPE); CATCHSIG(SIGSEGV); CATCHSIG(SIGPIPE); return JNI_VERSION_1_4; }
Add jni code to catch crash signal
Add jni code to catch crash signal
C
apache-2.0
Shunix/Scavenger,Shunix/Scavenger
fce8f063e38d86725b6b4d81c1ff42a82194146b
test/acm_random.h
test/acm_random.h
/* * Copyright (c) 2012 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef LIBVPX_TEST_ACM_RANDOM_H_ #define LIBVPX_TEST_ACM_RANDOM_H_ #include <stdint.h> #include <stdlib.h> namespace libvpx_test { class ACMRandom { public: explicit ACMRandom(int seed) { Reset(seed); } void Reset(int seed) { srand(seed); } uint8_t Rand8(void) { return (rand() >> 8) & 0xff; } int PseudoUniform(int range) { return (rand() >> 8) % range; } int operator()(int n) { return PseudoUniform(n); } static int DeterministicSeed(void) { return 0xbaba; } }; } // namespace libvpx_test #endif // LIBVPX_TEST_ACM_RANDOM_H_
/* * Copyright (c) 2012 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef LIBVPX_TEST_ACM_RANDOM_H_ #define LIBVPX_TEST_ACM_RANDOM_H_ #include <stdlib.h> #include "vpx/vpx_integer.h" namespace libvpx_test { class ACMRandom { public: explicit ACMRandom(int seed) { Reset(seed); } void Reset(int seed) { srand(seed); } uint8_t Rand8(void) { return (rand() >> 8) & 0xff; } int PseudoUniform(int range) { return (rand() >> 8) % range; } int operator()(int n) { return PseudoUniform(n); } static int DeterministicSeed(void) { return 0xbaba; } }; } // namespace libvpx_test #endif // LIBVPX_TEST_ACM_RANDOM_H_
Use vpx_integer.h instead of stdint.h
Use vpx_integer.h instead of stdint.h vpx_integer accounts for win32, which does not have stdint.h Change-Id: I0ecf243ba56ed2e920e1293a6876c2e1ef1af99e
C
bsd-3-clause
gshORTON/webm.libvpx,jmvalin/aom,liqianggao/libvpx,iniwf/webm.libvpx,Acidburn0zzz/webm.libvpx,kalli123/webm.libvpx,ittiamvpx/libvpx-1,pcwalton/libvpx,turbulenz/libvpx,ShiftMediaProject/libvpx,kleopatra999/webm.libvpx,mwgoldsmith/vpx,mwgoldsmith/vpx,shareefalis/libvpx,goodleixiao/vpx,charup/https---github.com-webmproject-libvpx-,Laknot/libvpx,felipebetancur/libvpx,GrokImageCompression/aom,vasilvv/esvp8,luctrudeau/aom,thdav/aom,jdm/libvpx,pcwalton/libvpx,mbebenita/aom,webmproject/libvpx,n4t/libvpx,hsueceumd/test_hui,vasilvv/esvp8,iniwf/webm.libvpx,matanbs/webm.libvpx,VTCSecureLLC/libvpx,mwgoldsmith/vpx,Suvarna1488/webm.libvpx,goodleixiao/vpx,luctrudeau/aom,shareefalis/libvpx,ittiamvpx/libvpx,shyamalschandra/libvpx,running770/libvpx,jmvalin/aom,hsueceumd/test_hui,ShiftMediaProject/libvpx,shareefalis/libvpx,Topopiccione/libvpx,stewnorriss/libvpx,shyamalschandra/libvpx,ittiamvpx/libvpx-1,GrokImageCompression/aom,shyamalschandra/libvpx,ittiamvpx/libvpx-1,luctrudeau/aom,Distrotech/libvpx,running770/libvpx,n4t/libvpx,mbebenita/aom,kalli123/webm.libvpx,reimaginemedia/webm.libvpx,jacklicn/webm.libvpx,iniwf/webm.libvpx,shareefalis/libvpx,matanbs/webm.libvpx,ittiamvpx/libvpx-1,WebRTC-Labs/libvpx,reimaginemedia/webm.libvpx,Maria1099/webm.libvpx,kim42083/webm.libvpx,openpeer/libvpx_new,zofuthan/libvpx,running770/libvpx,kalli123/webm.libvpx,matanbs/webm.libvpx,n4t/libvpx,cinema6/libvpx,altogother/webm.libvpx,kim42083/webm.libvpx,jmvalin/aom,mwgoldsmith/vpx,goodleixiao/vpx,thdav/aom,hsueceumd/test_hui,cinema6/libvpx,Distrotech/libvpx,ittiamvpx/libvpx,goodleixiao/vpx,iniwf/webm.libvpx,lyx2014/libvpx_c,matanbs/webm.libvpx,shareefalis/libvpx,turbulenz/libvpx,kim42083/webm.libvpx,felipebetancur/libvpx,matanbs/vp982,matanbs/webm.libvpx,zofuthan/libvpx,jdm/libvpx,shacklettbp/aom,Topopiccione/libvpx,mbebenita/aom,mbebenita/aom,hsueceumd/test_hui,liqianggao/libvpx,openpeer/libvpx_new,lyx2014/libvpx_c,Laknot/libvpx,gshORTON/webm.libvpx,kleopatra999/webm.libvpx,reimaginemedia/webm.libvpx,Suvarna1488/webm.libvpx,zofuthan/libvpx,cinema6/libvpx,smarter/aom,stewnorriss/libvpx,vasilvv/esvp8,WebRTC-Labs/libvpx,stewnorriss/libvpx,zofuthan/libvpx,shacklettbp/aom,shyamalschandra/libvpx,gshORTON/webm.libvpx,turbulenz/libvpx,smarter/aom,ShiftMediaProject/libvpx,Maria1099/webm.libvpx,ittiamvpx/libvpx-1,Acidburn0zzz/webm.libvpx,turbulenz/libvpx,thdav/aom,Topopiccione/libvpx,VTCSecureLLC/libvpx,GrokImageCompression/aom,mwgoldsmith/vpx,shyamalschandra/libvpx,abwiz0086/webm.libvpx,Distrotech/libvpx,ShiftMediaProject/libvpx,liqianggao/libvpx,Suvarna1488/webm.libvpx,stewnorriss/libvpx,jacklicn/webm.libvpx,kleopatra999/webm.libvpx,lyx2014/libvpx_c,kalli123/webm.libvpx,lyx2014/libvpx_c,VTCSecureLLC/libvpx,smarter/aom,luctrudeau/aom,smarter/aom,zofuthan/libvpx,kalli123/webm.libvpx,webmproject/libvpx,ittiamvpx/libvpx-1,Distrotech/libvpx,mbebenita/aom,pcwalton/libvpx,ShiftMediaProject/libvpx,VTCSecureLLC/libvpx,turbulenz/libvpx,stewnorriss/libvpx,VTCSecureLLC/libvpx,mwgoldsmith/libvpx,charup/https---github.com-webmproject-libvpx-,running770/libvpx,hsueceumd/test_hui,pcwalton/libvpx,kim42083/webm.libvpx,gshORTON/webm.libvpx,mwgoldsmith/libvpx,running770/libvpx,turbulenz/libvpx,GrokImageCompression/aom,Suvarna1488/webm.libvpx,vasilvv/esvp8,charup/https---github.com-webmproject-libvpx-,Topopiccione/libvpx,Laknot/libvpx,vasilvv/esvp8,WebRTC-Labs/libvpx,WebRTC-Labs/libvpx,shacklettbp/aom,iniwf/webm.libvpx,charup/https---github.com-webmproject-libvpx-,Maria1099/webm.libvpx,altogother/webm.libvpx,sanyaade-teachings/libvpx,mwgoldsmith/libvpx,Distrotech/libvpx,jdm/libvpx,cinema6/libvpx,thdav/aom,jacklicn/webm.libvpx,jacklicn/webm.libvpx,cinema6/libvpx,webmproject/libvpx,felipebetancur/libvpx,matanbs/vp982,turbulenz/libvpx,ittiamvpx/libvpx,shacklettbp/aom,matanbs/vp982,mbebenita/aom,kleopatra999/webm.libvpx,Acidburn0zzz/webm.libvpx,mbebenita/aom,gshORTON/webm.libvpx,felipebetancur/libvpx,abwiz0086/webm.libvpx,sanyaade-teachings/libvpx,VTCSecureLLC/libvpx,sanyaade-teachings/libvpx,Topopiccione/libvpx,Maria1099/webm.libvpx,openpeer/libvpx_new,thdav/aom,webmproject/libvpx,shyamalschandra/libvpx,jmvalin/aom,running770/libvpx,mbebenita/aom,felipebetancur/libvpx,liqianggao/libvpx,goodleixiao/vpx,smarter/aom,Distrotech/libvpx,goodleixiao/vpx,ittiamvpx/libvpx,Acidburn0zzz/webm.libvpx,gshORTON/webm.libvpx,altogother/webm.libvpx,altogother/webm.libvpx,mwgoldsmith/libvpx,turbulenz/libvpx,altogother/webm.libvpx,pcwalton/libvpx,hsueceumd/test_hui,reimaginemedia/webm.libvpx,openpeer/libvpx_new,matanbs/vp982,mwgoldsmith/libvpx,n4t/libvpx,vasilvv/esvp8,zofuthan/libvpx,luctrudeau/aom,Suvarna1488/webm.libvpx,matanbs/vp982,shacklettbp/aom,felipebetancur/libvpx,kim42083/webm.libvpx,webmproject/libvpx,jdm/libvpx,mbebenita/aom,kim42083/webm.libvpx,abwiz0086/webm.libvpx,reimaginemedia/webm.libvpx,webmproject/libvpx,iniwf/webm.libvpx,jmvalin/aom,GrokImageCompression/aom,charup/https---github.com-webmproject-libvpx-,Acidburn0zzz/webm.libvpx,cinema6/libvpx,openpeer/libvpx_new,kleopatra999/webm.libvpx,abwiz0086/webm.libvpx,jacklicn/webm.libvpx,mwgoldsmith/libvpx,pcwalton/libvpx,turbulenz/libvpx,Laknot/libvpx,kleopatra999/webm.libvpx,Maria1099/webm.libvpx,stewnorriss/libvpx,ittiamvpx/libvpx,WebRTC-Labs/libvpx,openpeer/libvpx_new,abwiz0086/webm.libvpx,Laknot/libvpx,Maria1099/webm.libvpx,jdm/libvpx,vasilvv/esvp8,shareefalis/libvpx,matanbs/vp982,luctrudeau/aom,kalli123/webm.libvpx,lyx2014/libvpx_c,sanyaade-teachings/libvpx,altogother/webm.libvpx,jacklicn/webm.libvpx,lyx2014/libvpx_c,shacklettbp/aom,matanbs/vp982,Laknot/libvpx,Acidburn0zzz/webm.libvpx,GrokImageCompression/aom,charup/https---github.com-webmproject-libvpx-,smarter/aom,liqianggao/libvpx,mwgoldsmith/vpx,thdav/aom,ittiamvpx/libvpx,abwiz0086/webm.libvpx,matanbs/webm.libvpx,n4t/libvpx,Suvarna1488/webm.libvpx,jmvalin/aom,jdm/libvpx,Topopiccione/libvpx,cinema6/libvpx,liqianggao/libvpx,reimaginemedia/webm.libvpx,sanyaade-teachings/libvpx
1f3121d2ba227c0d3e7987b1297f00dfb83d7871
src/command_line_flags.h
src/command_line_flags.h
#ifndef COMMAND_LINE_FLAGS_H_ #define COMMAND_LINE_FLAGS_H_ #include "kinetic/kinetic.h" #include "gflags/gflags.h" DEFINE_string(host, "localhost", "Kinetic Host"); DEFINE_uint64(port, 8123, "Kinetic Port"); DEFINE_uint64(timeout, 30, "Timeout"); void parse_flags(int *argc, char*** argv, std::unique_ptr<kinetic::ConnectionHandle>& connection) { google::ParseCommandLineFlags(argc, argv, true); kinetic::ConnectionOptions options; options.host = FLAGS_host; options.port = FLAGS_port; options.user_id = 1; options.hmac_key = "asdfasdf"; kinetic::KineticConnectionFactory kinetic_connection_factory = kinetic::NewKineticConnectionFactory(); if (!kinetic_connection_factory.NewConnection(options, FLAGS_timeout, connection).ok()) { printf("Unable to connect\n"); exit(1); } } #endif // COMMAND_LINE_FLAGS_H_
#ifndef COMMAND_LINE_FLAGS_H_ #define COMMAND_LINE_FLAGS_H_ #include "kinetic/kinetic.h" #include "gflags/gflags.h" DEFINE_string(host, "localhost", "Kinetic Host"); DEFINE_uint64(port, 8123, "Kinetic Port"); DEFINE_uint64(timeout, 30, "Timeout"); DEFINE_uint64(user_id, 1, "Kinetic User ID"); DEFINE_string(hmac_key, "asdfasdf", "Kinetic User HMAC key"); void parse_flags(int *argc, char*** argv, std::unique_ptr<kinetic::ConnectionHandle>& connection) { google::ParseCommandLineFlags(argc, argv, true); kinetic::ConnectionOptions options; options.host = FLAGS_host; options.port = FLAGS_port; options.user_id = FLAGS_user_id; options.hmac_key = FLAGS_hmac_key; kinetic::KineticConnectionFactory kinetic_connection_factory = kinetic::NewKineticConnectionFactory(); if (!kinetic_connection_factory.NewConnection(options, FLAGS_timeout, connection).ok()) { printf("Unable to connect\n"); exit(1); } } #endif // COMMAND_LINE_FLAGS_H_
Allow setting user id/hmac key via command line params for setpin
Allow setting user id/hmac key via command line params for setpin
C
unknown
Kinetic/kinetic-cpp-examples,Seagate/kinetic-cpp-examples,chenchongli/kinetic-cpp-examples,chenchongli/kinetic-cpp-examples,daasbank/daasbank-kinetic-c-,Seagate/kinetic-cpp-examples,Kinetic/kinetic-cpp-examples,daasbank/daasbank-kinetic-c-
070a960b3f83eaaf5f64dfdd9dd467d1949082ce
src/prodbg/AmigaUAE/AmigaUAE.h
src/prodbg/AmigaUAE/AmigaUAE.h
#pragma once #include <QObject> #include <QProcess> #include <QString> #include "Config/AmigaUAEConfig.h" class QTemporaryDir; namespace prodbg { /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class AmigaUAE : public QObject { Q_OBJECT public: AmigaUAE(QObject* parent); ~AmigaUAE(); bool openFile(); void runExecutable(const QString& filename); bool validateSettings(); void launchUAE(); void killProcess(); // TODO: Structure this better QProcess* m_uaeProcess; uint16_t m_setFileId; uint16_t m_setHddPathId; QString m_uaeExe; QString m_config; QString m_cmdLineArgs; QString m_dh0Path; QString m_fileToRun; QString m_localExeToRun; QString m_romPath; bool m_copyFiles; bool m_skipUAELaunch; AmigaUAEConfig::ConfigMode m_configMode; private: Q_SLOT void started(); Q_SLOT void errorOccurred(QProcess::ProcessError error); QTemporaryDir* m_tempDir; void readSettings(); bool m_running = false; }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// }
#pragma once #include <QObject> #include <QProcess> #include <QString> #include "Config/AmigaUAEConfig.h" class QTemporaryDir; namespace prodbg { /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class AmigaUAE : public QObject { Q_OBJECT public: AmigaUAE(QObject* parent); ~AmigaUAE(); bool openFile(); void runExecutable(const QString& filename); bool validateSettings(); void launchUAE(); void killProcess(); // TODO: Structure this better QProcess* m_uaeProcess; uint16_t m_setFileId; uint16_t m_setHddPathId; QString m_uaeExe; QString m_config; QString m_cmdLineArgs; QString m_dh0Path; QString m_fileToRun; QString m_localExeToRun; QString m_romPath; bool m_copyFiles; bool m_skipUAELaunch; AmigaUAEConfig::ConfigMode m_configMode; private: Q_SLOT void started(); Q_SLOT void errorOccurred(QProcess::ProcessError error); QTemporaryDir* m_tempDir = nullptr; void readSettings(); bool m_running = false; }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// }
Set tempdir to null by default
Set tempdir to null by default
C
mit
emoon/ProDBG,emoon/ProDBG,emoon/ProDBG,emoon/ProDBG,emoon/ProDBG,emoon/ProDBG
aee358642015f5453dcca6831bc3f3a6c6df22e7
atom/browser/api/atom_api_menu_views.h
atom/browser/api/atom_api_menu_views.h
// Copyright (c) 2014 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #ifndef ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_ #define ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_ #include <map> #include <memory> #include "atom/browser/api/atom_api_menu.h" #include "base/memory/weak_ptr.h" #include "ui/display/screen.h" #include "ui/views/controls/menu/menu_runner.h" namespace atom { namespace api { class MenuViews : public Menu { public: MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper); protected: void PopupAt( Window* window, int x, int y, int positioning_item) override; void ClosePopupAt(int32_t window_id) override; private: // window ID -> open context menu std::map<int32_t, std::unique_ptr<views::MenuRunner>> menu_runners_; base::WeakPtrFactory<MenuViews> weak_factory_; DISALLOW_COPY_AND_ASSIGN(MenuViews); }; } // namespace api } // namespace atom #endif // ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
// Copyright (c) 2014 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #ifndef ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_ #define ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_ #include <map> #include <memory> #include "atom/browser/api/atom_api_menu.h" #include "base/memory/weak_ptr.h" #include "ui/display/screen.h" #include "ui/views/controls/menu/menu_runner.h" namespace atom { namespace api { class MenuViews : public Menu { public: MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper); protected: void PopupAt( Window* window, int x, int y, int positioning_item, CloseCallback callback) override; void ClosePopupAt(int32_t window_id) override; private: // window ID -> open context menu std::map<int32_t, std::unique_ptr<views::MenuRunner>> menu_runners_; base::WeakPtrFactory<MenuViews> weak_factory_; DISALLOW_COPY_AND_ASSIGN(MenuViews); }; } // namespace api } // namespace atom #endif // ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
Fix missing PopupAt overrides on windows/linux
Fix missing PopupAt overrides on windows/linux Auditors: 47e4a4954d6a66edd1210b9b46e0a144c1078e87@bsclifton
C
mit
brave/electron,brave/muon,brave/electron,brave/electron,brave/electron,brave/muon,brave/muon,brave/muon,brave/electron,brave/muon,brave/muon,brave/electron
44d689bc6ec53db0ec8572cc3bcd89e2a03a24da
benchmark/parse_records_benchmark.h
benchmark/parse_records_benchmark.h
#pragma once template<typename B, typename R> static void ParseRecordsBenchmark(benchmark::State &state, const simdjson::padded_string &json) { // Warmup and equality check (make sure the data is right!) B bench; bench.SetUp(); if (!bench.Run(json)) { state.SkipWithError("warmup tweet reading failed"); return; } { R reference; reference.SetUp(); if (!reference.Run(json)) { state.SkipWithError("reference tweet reading failed"); return; } // assert(bench.Records() == reference.Records()); reference.TearDown(); } // Run the benchmark event_collector<true> events; events.start(); for (SIMDJSON_UNUSED auto _ : state) { if (!bench.Run(json)) { state.SkipWithError("tweet reading failed"); return; } } state.SetBytesProcessed(json.size() * state.iterations()); state.SetItemsProcessed(bench.Records().size() * state.iterations()); auto counts = events.end(); if (events.has_events()) { state.counters["Instructions"] = counts.instructions(); state.counters["Cycles"] = counts.cycles(); state.counters["Branch Misses"] = counts.branch_misses(); state.counters["Cache References"] = counts.cache_references(); state.counters["Cache Misses"] = counts.cache_misses(); } }
#pragma once template<typename B, typename R> static void ParseRecordsBenchmark(benchmark::State &state, const simdjson::padded_string &json) { // Warmup and equality check (make sure the data is right!) B bench; bench.SetUp(); if (!bench.Run(json)) { state.SkipWithError("warmup tweet reading failed"); return; } { R reference; reference.SetUp(); if (!reference.Run(json)) { state.SkipWithError("reference tweet reading failed"); return; } // assert(bench.Records() == reference.Records()); reference.TearDown(); } // Run the benchmark event_collector<true> events; events.start(); for (SIMDJSON_UNUSED auto _ : state) { if (!bench.Run(json)) { state.SkipWithError("tweet reading failed"); return; } } auto bytes = json.size() * state.iterations(); state.SetBytesProcessed(bytes); state.SetItemsProcessed(bench.Records().size() * state.iterations()); auto counts = events.end(); if (events.has_events()) { state.counters["Ins./Byte"] = double(counts.instructions()) / double(bytes); state.counters["Ins./Cycle"] = double(counts.instructions()) / double(counts.cycles()); state.counters["Cycles/Byte"] = double(counts.cycles()) / double(bytes); state.counters["BranchMiss"] = benchmark::Counter(counts.branch_misses(), benchmark::Counter::kAvgIterations); state.counters["CacheMiss"] = benchmark::Counter(counts.cache_misses(), benchmark::Counter::kAvgIterations); state.counters["CacheRef"] = benchmark::Counter(counts.cache_references(), benchmark::Counter::kAvgIterations); } }
Make instructions / cycle counters more useful
Make instructions / cycle counters more useful
C
apache-2.0
lemire/simdjson,lemire/simdjson,lemire/simdjson,lemire/simdjson,lemire/simdjson,lemire/simdjson
0c84db950784ba4dd56f92220419490faff1f915
include/swift/Basic/Algorithm.h
include/swift/Basic/Algorithm.h
//===--- Algorithm.h - ------------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LICENSE.txt for license information // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// // // This file defines helper algorithms, some of which are ported from C++14, // which may not be available on all platforms yet. // //===----------------------------------------------------------------------===// #ifndef SWIFT_BASIC_ALGORITHM_H #define SWIFT_BASIC_ALGORITHM_H namespace swift { /// Returns the minimum of `a` and `b`, or `a` if they are equivalent. template <typename T> constexpr const T& min(const T &a, const T &b) { return !(b < a) ? a : b; } /// Returns the maximum of `a` and `b`, or `a` if they are equivalent. template <typename T> constexpr const T& max(const T &a, const T &b) { return (a < b) ? b : a; } } // end namespace swift #endif /* SWIFT_BASIC_ALGORITHM_H */
//===--- Algorithm.h - ------------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LICENSE.txt for license information // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// // // This file defines helper algorithms, some of which are ported from C++14, // which may not be available on all platforms yet. // //===----------------------------------------------------------------------===// #ifndef SWIFT_BASIC_ALGORITHM_H #define SWIFT_BASIC_ALGORITHM_H namespace swift { /// Returns the minimum of `a` and `b`, or `a` if they are equivalent. template <typename T> constexpr const T &min(const T &a, const T &b) { return !(b < a) ? a : b; } /// Returns the maximum of `a` and `b`, or `a` if they are equivalent. template <typename T> constexpr const T &max(const T &a, const T &b) { return (a < b) ? b : a; } } // end namespace swift #endif /* SWIFT_BASIC_ALGORITHM_H */
Fix methods return type ampersand location (NFC)
Fix methods return type ampersand location (NFC)
C
apache-2.0
hughbe/swift,ken0nek/swift,SwiftAndroid/swift,glessard/swift,djwbrown/swift,swiftix/swift,tjw/swift,austinzheng/swift,manavgabhawala/swift,allevato/swift,therealbnut/swift,xedin/swift,arvedviehweger/swift,aschwaighofer/swift,shajrawi/swift,zisko/swift,ahoppen/swift,OscarSwanros/swift,JaSpa/swift,parkera/swift,swiftix/swift,frootloops/swift,alblue/swift,ahoppen/swift,jmgc/swift,OscarSwanros/swift,danielmartin/swift,CodaFi/swift,kperryua/swift,modocache/swift,IngmarStein/swift,stephentyrone/swift,danielmartin/swift,gregomni/swift,kperryua/swift,practicalswift/swift,therealbnut/swift,johnno1962d/swift,kstaring/swift,jckarter/swift,gmilos/swift,calebd/swift,allevato/swift,tardieu/swift,swiftix/swift,sschiau/swift,JGiola/swift,glessard/swift,jmgc/swift,kperryua/swift,arvedviehweger/swift,modocache/swift,manavgabhawala/swift,johnno1962d/swift,russbishop/swift,amraboelela/swift,codestergit/swift,IngmarStein/swift,sschiau/swift,johnno1962d/swift,felix91gr/swift,jtbandes/swift,apple/swift,ben-ng/swift,return/swift,tardieu/swift,huonw/swift,xedin/swift,gribozavr/swift,lorentey/swift,calebd/swift,JaSpa/swift,gregomni/swift,tjw/swift,hooman/swift,gottesmm/swift,harlanhaskins/swift,apple/swift,milseman/swift,xedin/swift,ken0nek/swift,ben-ng/swift,jtbandes/swift,SwiftAndroid/swift,danielmartin/swift,modocache/swift,ken0nek/swift,shajrawi/swift,airspeedswift/swift,aschwaighofer/swift,return/swift,parkera/swift,harlanhaskins/swift,lorentey/swift,atrick/swift,frootloops/swift,jmgc/swift,natecook1000/swift,roambotics/swift,practicalswift/swift,sschiau/swift,allevato/swift,xwu/swift,jtbandes/swift,jmgc/swift,codestergit/swift,OscarSwanros/swift,lorentey/swift,milseman/swift,huonw/swift,jopamer/swift,Jnosh/swift,IngmarStein/swift,apple/swift,tkremenek/swift,tardieu/swift,return/swift,amraboelela/swift,jckarter/swift,karwa/swift,KrishMunot/swift,KrishMunot/swift,tkremenek/swift,shajrawi/swift,IngmarStein/swift,tinysun212/swift-windows,harlanhaskins/swift,austinzheng/swift,ahoppen/swift,frootloops/swift,tardieu/swift,bitjammer/swift,xedin/swift,amraboelela/swift,xwu/swift,karwa/swift,kstaring/swift,djwbrown/swift,bitjammer/swift,CodaFi/swift,return/swift,jopamer/swift,xwu/swift,johnno1962d/swift,hughbe/swift,aschwaighofer/swift,harlanhaskins/swift,modocache/swift,therealbnut/swift,aschwaighofer/swift,lorentey/swift,roambotics/swift,calebd/swift,russbishop/swift,shajrawi/swift,ken0nek/swift,ken0nek/swift,IngmarStein/swift,manavgabhawala/swift,felix91gr/swift,gribozavr/swift,therealbnut/swift,rudkx/swift,gmilos/swift,allevato/swift,shahmishal/swift,roambotics/swift,ahoppen/swift,kstaring/swift,milseman/swift,Jnosh/swift,brentdax/swift,aschwaighofer/swift,brentdax/swift,calebd/swift,CodaFi/swift,nathawes/swift,brentdax/swift,parkera/swift,deyton/swift,glessard/swift,rudkx/swift,ben-ng/swift,deyton/swift,shajrawi/swift,therealbnut/swift,therealbnut/swift,tkremenek/swift,kperryua/swift,dreamsxin/swift,djwbrown/swift,gregomni/swift,alblue/swift,austinzheng/swift,JGiola/swift,gmilos/swift,djwbrown/swift,benlangmuir/swift,huonw/swift,brentdax/swift,ahoppen/swift,austinzheng/swift,IngmarStein/swift,djwbrown/swift,bitjammer/swift,johnno1962d/swift,tinysun212/swift-windows,russbishop/swift,russbishop/swift,hughbe/swift,JGiola/swift,allevato/swift,natecook1000/swift,xwu/swift,natecook1000/swift,manavgabhawala/swift,nathawes/swift,amraboelela/swift,djwbrown/swift,arvedviehweger/swift,jmgc/swift,harlanhaskins/swift,shajrawi/swift,kstaring/swift,atrick/swift,alblue/swift,hughbe/swift,JaSpa/swift,benlangmuir/swift,danielmartin/swift,felix91gr/swift,uasys/swift,lorentey/swift,rudkx/swift,benlangmuir/swift,stephentyrone/swift,deyton/swift,gregomni/swift,ahoppen/swift,practicalswift/swift,roambotics/swift,kperryua/swift,devincoughlin/swift,xwu/swift,KrishMunot/swift,parkera/swift,huonw/swift,shahmishal/swift,shajrawi/swift,allevato/swift,frootloops/swift,karwa/swift,tjw/swift,karwa/swift,jmgc/swift,modocache/swift,gribozavr/swift,tjw/swift,OscarSwanros/swift,jtbandes/swift,arvedviehweger/swift,KrishMunot/swift,xedin/swift,hughbe/swift,codestergit/swift,sschiau/swift,atrick/swift,calebd/swift,KrishMunot/swift,austinzheng/swift,codestergit/swift,glessard/swift,tardieu/swift,kperryua/swift,JGiola/swift,airspeedswift/swift,JGiola/swift,jckarter/swift,shahmishal/swift,sschiau/swift,ken0nek/swift,amraboelela/swift,kstaring/swift,stephentyrone/swift,jopamer/swift,arvedviehweger/swift,stephentyrone/swift,uasys/swift,brentdax/swift,IngmarStein/swift,tjw/swift,manavgabhawala/swift,harlanhaskins/swift,manavgabhawala/swift,huonw/swift,modocache/swift,practicalswift/swift,arvedviehweger/swift,zisko/swift,jckarter/swift,brentdax/swift,parkera/swift,ben-ng/swift,milseman/swift,airspeedswift/swift,frootloops/swift,nathawes/swift,gmilos/swift,uasys/swift,tinysun212/swift-windows,aschwaighofer/swift,xedin/swift,felix91gr/swift,swiftix/swift,deyton/swift,calebd/swift,frootloops/swift,hooman/swift,hughbe/swift,Jnosh/swift,apple/swift,rudkx/swift,lorentey/swift,jtbandes/swift,rudkx/swift,nathawes/swift,karwa/swift,deyton/swift,SwiftAndroid/swift,gribozavr/swift,xwu/swift,amraboelela/swift,tkremenek/swift,swiftix/swift,tkremenek/swift,CodaFi/swift,nathawes/swift,modocache/swift,shahmishal/swift,allevato/swift,karwa/swift,milseman/swift,tkremenek/swift,JaSpa/swift,jckarter/swift,huonw/swift,gmilos/swift,benlangmuir/swift,xedin/swift,bitjammer/swift,practicalswift/swift,johnno1962d/swift,CodaFi/swift,danielmartin/swift,uasys/swift,zisko/swift,shahmishal/swift,bitjammer/swift,felix91gr/swift,practicalswift/swift,karwa/swift,hooman/swift,JGiola/swift,jtbandes/swift,tinysun212/swift-windows,swiftix/swift,stephentyrone/swift,felix91gr/swift,devincoughlin/swift,karwa/swift,atrick/swift,amraboelela/swift,shahmishal/swift,tardieu/swift,tinysun212/swift-windows,return/swift,kstaring/swift,kperryua/swift,alblue/swift,alblue/swift,jopamer/swift,atrick/swift,gottesmm/swift,milseman/swift,codestergit/swift,airspeedswift/swift,uasys/swift,OscarSwanros/swift,uasys/swift,russbishop/swift,ken0nek/swift,sschiau/swift,atrick/swift,danielmartin/swift,apple/swift,practicalswift/swift,gregomni/swift,dreamsxin/swift,gribozavr/swift,russbishop/swift,gribozavr/swift,austinzheng/swift,tinysun212/swift-windows,ben-ng/swift,devincoughlin/swift,arvedviehweger/swift,natecook1000/swift,xwu/swift,Jnosh/swift,jckarter/swift,therealbnut/swift,JaSpa/swift,shahmishal/swift,OscarSwanros/swift,gmilos/swift,danielmartin/swift,JaSpa/swift,ben-ng/swift,benlangmuir/swift,tjw/swift,swiftix/swift,gmilos/swift,tjw/swift,hooman/swift,glessard/swift,calebd/swift,OscarSwanros/swift,shajrawi/swift,parkera/swift,jopamer/swift,return/swift,glessard/swift,bitjammer/swift,gottesmm/swift,CodaFi/swift,roambotics/swift,gribozavr/swift,apple/swift,deyton/swift,devincoughlin/swift,russbishop/swift,gottesmm/swift,alblue/swift,lorentey/swift,natecook1000/swift,manavgabhawala/swift,jmgc/swift,parkera/swift,deyton/swift,CodaFi/swift,rudkx/swift,practicalswift/swift,return/swift,Jnosh/swift,KrishMunot/swift,djwbrown/swift,codestergit/swift,milseman/swift,natecook1000/swift,sschiau/swift,uasys/swift,jtbandes/swift,nathawes/swift,felix91gr/swift,gottesmm/swift,brentdax/swift,KrishMunot/swift,tkremenek/swift,stephentyrone/swift,codestergit/swift,airspeedswift/swift,gottesmm/swift,kstaring/swift,SwiftAndroid/swift,SwiftAndroid/swift,benlangmuir/swift,gribozavr/swift,hooman/swift,natecook1000/swift,xedin/swift,zisko/swift,Jnosh/swift,jckarter/swift,hooman/swift,aschwaighofer/swift,johnno1962d/swift,shahmishal/swift,jopamer/swift,SwiftAndroid/swift,jopamer/swift,sschiau/swift,devincoughlin/swift,gottesmm/swift,frootloops/swift,airspeedswift/swift,devincoughlin/swift,zisko/swift,stephentyrone/swift,alblue/swift,parkera/swift,Jnosh/swift,zisko/swift,huonw/swift,JaSpa/swift,nathawes/swift,zisko/swift,gregomni/swift,hooman/swift,devincoughlin/swift,ben-ng/swift,bitjammer/swift,harlanhaskins/swift,roambotics/swift,tardieu/swift,lorentey/swift,tinysun212/swift-windows,airspeedswift/swift,austinzheng/swift,devincoughlin/swift,SwiftAndroid/swift,hughbe/swift
89e8a07af3e24ae0f843b80906422d711f73de0a
test/Analysis/uninit-vals-ps.c
test/Analysis/uninit-vals-ps.c
// RUN: clang -checker-simple -verify %s struct FPRec { void (*my_func)(int * x); }; int bar(int x); int f1_a(struct FPRec* foo) { int x; (*foo->my_func)(&x); return bar(x)+1; // no-warning } int f1_b() { int x; return bar(x)+1; // expected-warning{{Pass-by-value argument in function is undefined.}} } int f2() { int x; if (x+1) // expected-warning{{Branch}} return 1; return 2; } int f2_b() { int x; return ((x+1)+2+((x))) + 1 ? 1 : 2; // expected-warning{{Branch}} } int f3(void) { int i; int *p = &i; if (*p > 0) // expected-warning{{Branch condition evaluates to an uninitialized value}} return 0; else return 1; }
// RUN: clang -checker-simple -verify %s struct FPRec { void (*my_func)(int * x); }; int bar(int x); int f1_a(struct FPRec* foo) { int x; (*foo->my_func)(&x); return bar(x)+1; // no-warning } int f1_b() { int x; return bar(x)+1; // expected-warning{{Pass-by-value argument in function is undefined.}} } int f2() { int x; if (x+1) // expected-warning{{Branch}} return 1; return 2; } int f2_b() { int x; return ((x+1)+2+((x))) + 1 ? 1 : 2; // expected-warning{{Branch}} } int f3(void) { int i; int *p = &i; if (*p > 0) // expected-warning{{Branch condition evaluates to an uninitialized value}} return 0; else return 1; } // RUN: clang -checker-simple -analyzer-store-region -verify %s struct s { int data; }; struct s global; void g(int); void f4() { int a; if (global.data == 0) a = 3; if (global.data == 0) g(a); // no-warning }
Add test for path-sensitive uninit-val detection involving struct field.
Add test for path-sensitive uninit-val detection involving struct field. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@59620 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,llvm-mirror/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,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
6d6fdef0cbc741e8f10ed1003a2e7fe5551b0227
collatz/c.c
collatz/c.c
#include <stdio.h> static int r( int n ) { printf("%d\n", n); if (n <= 1) return n; if (n%2) return r((n*3)+1); return r(n/2); } int main ( void ) { puts("Basic collatz fun - recursive C function"); r(15); return 0; }
#include <stdio.h> #include <stdlib.h> static long r( long n ) { printf("%ld\n", n); if (n <= 1) return n; if (n%2) return r((n*3)+1); return r(n/2); } int main (int argc, char **argv) { long n = 15; if (argc > 1) n = strtol(argv[1], NULL, 10); puts("Basic collatz fun - recursive C function"); r(n); return 0; }
Allow passing ints as arg
Allow passing ints as arg
C
mit
EVODelavega/gp-scripts,EVODelavega/gp-scripts,EVODelavega/gp-scripts,EVODelavega/gp-scripts,EVODelavega/gp-scripts,EVODelavega/gp-scripts,EVODelavega/gp-scripts,EVODelavega/gp-scripts,EVODelavega/gp-scripts,EVODelavega/gp-scripts,EVODelavega/gp-scripts,EVODelavega/gp-scripts
c6db019f4816249ea029648a1ca22127ee0e7480
module.c
module.c
#include <linux/module.h> #include <linux/string.h> #include <linux/fs.h> #include <adm/uaccess.h> // Module Stuff MODULE_LICENCE("Apache"); // Change this to "GPL" if you get annoyed about // the kernal playing a crying fit about non GPL stuff MODULE_DESCRIPTION("A Markov device driver."); MODULE_AUTHOR("Ben Cartwright-Cox"); static int dev_open(struct inode *, struct file *); static int dev_rls(struct inode *, struct file *); static ssize_t dev_read(strict file *, char *, size_t, loff_t *); static ssize_t dev_write(strict file *, const char *, size_t, loff_t *);
#include <linux/module.h> #include <linux/string.h> #include <linux/fs.h> #include <adm/uaccess.h> // Module Stuff MODULE_LICENCE("Apache"); // Change this to "GPL" if you get annoyed about // the kernal playing a crying fit about non GPL stuff MODULE_DESCRIPTION("A Markov device driver."); MODULE_AUTHOR("Ben Cartwright-Cox"); static int dev_open(struct inode *, struct file *); static int dev_rls(struct inode *, struct file *); static ssize_t dev_read(strict file *, char *, size_t, loff_t *); static ssize_t dev_write(strict file *, const char *, size_t, loff_t *);
Change tabs to spaces, Lets nip this one in the bud.
Change tabs to spaces, Lets nip this one in the bud.
C
apache-2.0
benjojo/dev_markov,benjojo/dev_markov
f2ffa408d7ed974fd830c1804ea345955476ec87
engines/default_engine/assoc.h
engines/default_engine/assoc.h
#ifndef ASSOC_H #define ASSOC_H struct assoc { /* how many powers of 2's worth of buckets we use */ unsigned int hashpower; /* Main hash table. This is where we look except during expansion. */ hash_item** primary_hashtable; /* * Previous hash table. During expansion, we look here for keys that haven't * been moved over to the primary yet. */ hash_item** old_hashtable; /* Number of items in the hash table. */ unsigned int hash_items; /* Flag: Are we in the middle of expanding now? */ bool expanding; /* * During expansion we migrate values with bucket granularity; this is how * far we've gotten so far. Ranges from 0 .. hashsize(hashpower - 1) - 1. */ unsigned int expand_bucket; /* * serialise access to the hashtable */ cb_mutex_t lock; }; /* associative array */ ENGINE_ERROR_CODE assoc_init(struct default_engine *engine); void assoc_destroy(void); hash_item *assoc_find(struct default_engine *engine, uint32_t hash, const hash_key* key); int assoc_insert(struct default_engine *engine, uint32_t hash, hash_item *item); void assoc_delete(struct default_engine *engine, uint32_t hash, const hash_key* key); int start_assoc_maintenance_thread(struct default_engine *engine); void stop_assoc_maintenance_thread(struct default_engine *engine); #endif
#ifndef ASSOC_H #define ASSOC_H struct assoc { /* how many powers of 2's worth of buckets we use */ unsigned int hashpower; /* Main hash table. This is where we look except during expansion. */ hash_item** primary_hashtable; /* * Previous hash table. During expansion, we look here for keys that haven't * been moved over to the primary yet. */ hash_item** old_hashtable; /* Number of items in the hash table. */ unsigned int hash_items; /* Flag: Are we in the middle of expanding now? */ bool expanding; /* * During expansion we migrate values with bucket granularity; this is how * far we've gotten so far. Ranges from 0 .. hashsize(hashpower - 1) - 1. */ unsigned int expand_bucket; /* * serialise access to the hashtable */ cb_mutex_t lock; }; /* associative array */ ENGINE_ERROR_CODE assoc_init(struct default_engine *engine); void assoc_destroy(void); hash_item *assoc_find(struct default_engine *engine, uint32_t hash, const hash_key* key); int assoc_insert(struct default_engine *engine, uint32_t hash, hash_item *item); void assoc_delete(struct default_engine *engine, uint32_t hash, const hash_key* key); #endif
Remove prototypes for nonexistent functions
Remove prototypes for nonexistent functions Change-Id: Ife8b66f32aa78159ea3cfdec17cbc5148d954f8d Reviewed-on: http://review.couchbase.org/80561 Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com> Reviewed-by: Jim Walker <1cd02e31b43620d7c664e038ca42a060d61727b9@couchbase.com>
C
bsd-3-clause
daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine
8d942517ca5d635a6510d1ebba97917b03eebb23
src/header/NovelProcessTool.h
src/header/NovelProcessTool.h
/* * NovelProcessTool.h * * Created on: 2015年2月19日 * Author: nemo */ #ifndef SRC_NOVELPROCESSTOOL_H_ #define SRC_NOVELPROCESSTOOL_H_ #include <string> #include <fstream> #include <vector> using namespace std; class NovelProcessTool { public: NovelProcessTool(); virtual ~NovelProcessTool(); protected: /// Check the work directory. void checkWorkingDirectory(); /// Open in and out file. int fileOpen(string novelName); /// Close in and out files. void fileClosed(); /// Analysis the temp folder. void analysisFile(); fstream _fileInStream; ///< The file input stream. fstream _fileOutStream; ///< The file out stream. string _tempDir; ///< The temp folder directory path. string _resultDir; ///< The result folder directory path. vector<string> _inputNovel; ///< The input file name. }; #endif /* SRC_NOVELPROCESSTOOL_H_ */
/* * NovelProcessTool.h * * Created on: 2015年2月19日 * Author: nemo */ #ifndef SRC_NOVELPROCESSTOOL_H_ #define SRC_NOVELPROCESSTOOL_H_ #include <string> #include <fstream> #include <vector> using namespace std; class NovelProcessTool { public: NovelProcessTool(); virtual ~NovelProcessTool(); protected: /// Check the work directory. void checkWorkingDirectory(); /// Open in and out file. int fileOpen(string novelName); /// Close in and out files. void fileClosed(); /// Analysis the temp folder. void analysisFile(); /// Novel tool action, implement in sub class. virtual void parseContents() = 0; fstream _fileInStream; ///< The file input stream. fstream _fileOutStream; ///< The file out stream. string _tempDir; ///< The temp folder directory path. string _resultDir; ///< The result folder directory path. vector<string> _inputNovel; ///< The input file name. }; #endif /* SRC_NOVELPROCESSTOOL_H_ */
Modify void parseContents(0) as pure virtual function.
Modify void parseContents(0) as pure virtual function.
C
apache-2.0
NemoChenTW/NovelProcessTools,NemoChenTW/NovelProcessTools,NemoChenTW/NovelProcessTools
1b32d0316ad790fdd178bca02f1af71c0ce15ef8
platforms/arm/mxrt1062/fastled_arm_mxrt1062.h
platforms/arm/mxrt1062/fastled_arm_mxrt1062.h
#ifndef __INC_FASTLED_ARM_MXRT1062_H #define __INC_FASTLED_ARM_MXRT1062_H #include "fastpin_arm_mxrt1062.h" #include "fastspi_arm_mxrt1062.h" #include "clockless_arm_mxrt1062.h" #include "block_clockless_arm_mxrt1062.h" #endif
#ifndef __INC_FASTLED_ARM_MXRT1062_H #define __INC_FASTLED_ARM_MXRT1062_H #include "fastpin_arm_mxrt1062.h" #include "fastspi_arm_mxrt1062.h" #include "../k20/octows2811_controller.h" #include "../k20/ws2812serial_controller.h" #include "../k20/smartmatrix_t3.h" #include "clockless_arm_mxrt1062.h" #include "block_clockless_arm_mxrt1062.h" #endif
Support WS2812Serial Library on Teensy T4
Support WS2812Serial Library on Teensy T4 Recently there was reported that the WS2812Serial library (github.com/PaulStoffregen/WS2812Serial) was not ported over to work on the new Teensy T4, so I thought I would take a look. I added the T4 support, which is now pending in a Pull Request. During that I also found that there were errors in one of the core header files for the T4, which I also fixed, which is now pending in another Pull Request (github.com/PaulStoffregen/Cores) After that was working, it was pointed out that the FastLED sample in the WS2812Serial librry did not compile. So... More details in the forum Thread: https://forum.pjrc.com/threads/58442-Non-Blocking-WS2812-LED-Library-and-Teensy-4-0
C
mit
FastLED/FastLED,PaulStoffregen/FastLED,PaulStoffregen/FastLED,FastLED/FastLED,FastLED/FastLED,FastLED/FastLED,PaulStoffregen/FastLED
c539b7d9bb3e40f7ac69d44771f56476c953629d
Pod/Classes/Foundation/runtime/NSObject+ASPropertyAttributes.h
Pod/Classes/Foundation/runtime/NSObject+ASPropertyAttributes.h
// // NSObject+ASPropertyAttributes.h // AppScaffold Cocoa Category // // Created by Whirlwind on 15/4/3. // Copyright (c) 2015年 AppScaffold. All rights reserved. // #import <Foundation/Foundation.h> #if __has_include("EXTRuntimeExtensions.h") // This category need pod 'libextobjc' #import "EXTRuntimeExtensions.h" @interface NSObject (PropertyAttributes) + (ext_propertyAttributes *)copyPropertyAttributesByName:(NSString *)name; @end #endif
// // NSObject+ASPropertyAttributes.h // AppScaffold Cocoa Category // // Created by Whirlwind on 15/4/3. // Copyright (c) 2015年 AppScaffold. All rights reserved. // #import <Foundation/Foundation.h> #if __has_include(<libextobjc/EXTRuntimeExtensions.h>) // This category need pod 'libextobjc' #import <libextobjc/EXTRuntimeExtensions.h> @interface NSObject (PropertyAttributes) + (ext_propertyAttributes *)copyPropertyAttributesByName:(NSString *)name; @end #endif
Fix check the libextobjc when it is framework
Fix check the libextobjc when it is framework
C
mit
AppScaffold/ASCocoaCategory,AppScaffold/ASCocoaCategory,Whirlwind/ASCocoaCategory,Whirlwind/ASCocoaCategory,Whirlwind/ASCocoaCategory,AppScaffold/ASCocoaCategory
6e96905b97bbb3c154a15e90b3dc3d118db7c96e
src/OI.h
src/OI.h
#ifndef OI_H #define OI_H #include "WPILib.h" #include "RobotMap.h" #include <math.h> class OI { private: Joystick joystick; public: OI(); inline float GetXplusY(){ float val; val = FractionOmitted(joystick.GetY() + joystick.GetX()); if(val > 1.2) val = 1.2; if(val < -1.2) val = -1.2; return val; } inline float GetXminusY(){ float val; val = FractionOmitted(joystick.GetY() - joystick.GetX()); if(val > 1.2) val = 1.2; if(val < -1.2) val = -1.2; return val; } inline float GetStickX(){ return FractionOmitted(joystick.GetX()); } inline float GetStickY(){ return FractionOmitted(joystick.GetY()); } inline float GetStickTwist(){ return FractionOmitted(joystick.GetTwist()); } inline float GetStickThrottle(){ return FractionOmitted(joystick.GetThrottle()); } inline float FractionOmitted(float original){ if(fabsf(original) < 0.01 ){ original = 0; } return original; } }; #endif
#ifndef OI_H #define OI_H #include "WPILib.h" #include "RobotMap.h" #include <math.h> class OI { private: Joystick joystick; public: OI(); inline float GetXplusY(){ float val; val = FractionOmitted(joystick.GetY() + joystick.GetX()); if(val > 1.2) val = 1.2; if(val < -1.2) val = -1.2; return val; } inline float GetXminusY(){ float val; val = FractionOmitted(joystick.GetY() - joystick.GetX()); if(val > 1.2) val = 1.2; if(val < -1.2) val = -1.2; return val; } inline float GetStickX(){ return FractionOmitted(joystick.GetX()); } inline float GetStickY(){ return FractionOmitted(joystick.GetY()); } inline float GetStickTwist(){ return FractionOmitted(joystick.GetTwist()); } inline float GetStickThrottle(){ return FractionOmitted(joystick.GetThrottle()); } inline float GetStickRightX(){ return FractionOmitted(joystick.GetRawAxis(5)); } inline float GetStcikRightY(){ return FractionOmitted(joystick.GetRawAxis(6)); } inline float FractionOmitted(float original){ if(fabsf(original) < 0.01 ){ original = 0; } return original; } }; #endif
Create RightStick X and Y value get Function
Create RightStick X and Y value get Function
C
epl-1.0
tokyotechnicalsamurai/shougun
30fa9d8675adbc9f0bb147949a77016f6e9ce11b
src/platform/sdl/sdl-events.h
src/platform/sdl/sdl-events.h
#ifndef SDL_EVENTS_H #define SDL_EVENTS_H #include "common.h" #include "gba-thread.h" #include <SDL.h> #define SDL_BINDING_KEY 0x53444C4B #define SDL_BINDING_BUTTON 0x53444C42 struct GBAVideoSoftwareRenderer; struct GBASDLEvents { struct GBAInputMap* bindings; SDL_Joystick* joystick; #if SDL_VERSION_ATLEAST(2, 0, 0) SDL_Window* window; int fullscreen; int windowUpdated; #endif }; bool GBASDLInitEvents(struct GBASDLEvents*); void GBASDLDeinitEvents(struct GBASDLEvents*); void GBASDLHandleEvent(struct GBAThread* context, struct GBASDLEvents* sdlContext, const union SDL_Event* event); enum GBAKey GBASDLMapButtonToKey(int button); #endif
#ifndef SDL_EVENTS_H #define SDL_EVENTS_H #include "common.h" #include "gba-thread.h" #include <SDL.h> #define SDL_BINDING_KEY 0x53444C4B #define SDL_BINDING_BUTTON 0x53444C42 struct GBAVideoSoftwareRenderer; struct GBASDLEvents { struct GBAInputMap* bindings; SDL_Joystick* joystick; #if SDL_VERSION_ATLEAST(2, 0, 0) SDL_Window* window; int fullscreen; int windowUpdated; #endif }; bool GBASDLInitEvents(struct GBASDLEvents*); void GBASDLDeinitEvents(struct GBASDLEvents*); void GBASDLHandleEvent(struct GBAThread* context, struct GBASDLEvents* sdlContext, const union SDL_Event* event); #endif
Remove prototype for removed function
Remove prototype for removed function
C
mpl-2.0
Anty-Lemon/mgba,Anty-Lemon/mgba,sergiobenrocha2/mgba,iracigt/mgba,iracigt/mgba,sergiobenrocha2/mgba,bentley/mgba,jeremyherbert/mgba,jeremyherbert/mgba,libretro/mgba,fr500/mgba,sergiobenrocha2/mgba,iracigt/mgba,MerryMage/mgba,Iniquitatis/mgba,Anty-Lemon/mgba,mgba-emu/mgba,jeremyherbert/mgba,matthewbauer/mgba,mgba-emu/mgba,Touched/mgba,askotx/mgba,bentley/mgba,libretro/mgba,MerryMage/mgba,AdmiralCurtiss/mgba,mgba-emu/mgba,fr500/mgba,nattthebear/mgba,AdmiralCurtiss/mgba,askotx/mgba,Iniquitatis/mgba,Iniquitatis/mgba,cassos/mgba,cassos/mgba,zerofalcon/mgba,zerofalcon/mgba,sergiobenrocha2/mgba,askotx/mgba,matthewbauer/mgba,libretro/mgba,libretro/mgba,fr500/mgba,iracigt/mgba,askotx/mgba,libretro/mgba,zerofalcon/mgba,Touched/mgba,Anty-Lemon/mgba,mgba-emu/mgba,AdmiralCurtiss/mgba,nattthebear/mgba,jeremyherbert/mgba,Iniquitatis/mgba,cassos/mgba,fr500/mgba,sergiobenrocha2/mgba,Touched/mgba,MerryMage/mgba
53f7a342568c675b686f817f2a11392e486d2e8d
test/CodeGen/builtins-arm64.c
test/CodeGen/builtins-arm64.c
// RUN: %clang_cc1 -triple arm64-apple-ios -O3 -emit-llvm -o - %s | FileCheck %s void f0(void *a, void *b) { __clear_cache(a,b); // CHECK: call {{.*}} @__clear_cache } // CHECK: call {{.*}} @llvm.aarch64.rbit.i32(i32 %a) void rbit(unsigned a) { __builtin_arm_rbit(a); } // CHECK: call {{.*}} @llvm.aarch64.rbit.i64(i64 %a) void rbit64(unsigned long long a) { __builtin_arm_rbit64(a); }
// RUN: %clang_cc1 -triple arm64-apple-ios -O3 -emit-llvm -o - %s | FileCheck %s void f0(void *a, void *b) { __clear_cache(a,b); // CHECK: call {{.*}} @__clear_cache } // CHECK: call {{.*}} @llvm.aarch64.rbit.i32(i32 %a) unsigned rbit(unsigned a) { return __builtin_arm_rbit(a); } // CHECK: call {{.*}} @llvm.aarch64.rbit.i64(i64 %a) unsigned long long rbit64(unsigned long long a) { return __builtin_arm_rbit64(a); }
Fix silly think-o in tests.
AArch64: Fix silly think-o in tests. rdar://9283021 git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@211064 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
58b154cf4aca7c4ad12f066496dade85fe58cbec
exec/cnex/util.h
exec/cnex/util.h
#ifndef UTIL_H #define UTIL_H #define estr(x) #x #define ENUM(x) estr(x) void exec_error(const char *msg, ...); void fatal_error(const char *msg, ...); typedef enum { FALSE, TRUE } BOOL; #endif
#ifndef UTIL_H #define UTIL_H #define estr(x) #x #define ENUM(x) estr(x) void exec_error(const char *msg, ...); #ifdef _MSC_VER __declspec(noreturn) #endif void fatal_error(const char *msg, ...) #ifdef __GNUC__ __attribute__((noreturn)) #endif ; typedef enum { FALSE, TRUE } BOOL; #endif
Add noreturn attribute to fatal_error
Add noreturn attribute to fatal_error
C
mit
gitlarryf/neon-lang,ghewgill/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,gitlarryf/neon-lang,gitlarryf/neon-lang
ad7c868c0515e2e8f67cb56c610a6341a258299d
Ch4-Linked-Lists/linked-lists.c
Ch4-Linked-Lists/linked-lists.c
/* * PROBLEM * Discuss the stack data structure. Implement a stack in C using either a linked list or a dynamic array, and justify your decision. * Design the interface to your stack to be complete, consistent, and easy to use. */ #include <stdio.h> #include <stdbool.h> #include <stdlib.h> typedef struct Element { struct Element *next; void *data; } Element; bool push (Element **stack, void *data){ Element *elem = malloc(sizeof(Element)); if (!elem) return false; elem->data = data; elem->next = *stack; *stack = elem; return true; } bool pop( Element **stack, void **data ) { Element *elem; if (!(elem=*stack)) return false; *data = elem->data; *stack = elem->next; free(elem); return true; } bool createStack( Element **stack ) { *stack = NULL; return true; } bool deleteStack ( Element **stack ){ Element *next; while ( *stack ) { next = (*stack)->next; free (*stack); *stack = next; } return true; } void main() { }
#include <stdio.h> #include <stdbool.h> #include <stdlib.h> typedef struct Element { struct Element *next; void *data; } Element; /* * PROBLEM * Discuss the stack data structure. Implement a stack in C using either a linked list or a dynamic array, and justify your decision. * Design the interface to your stack to be complete, consistent, and easy to use. * * The solution contains the following push, pop, createStack, and deleteStack functions. */ bool push (Element **stack, void *data){ Element *elem = malloc(sizeof(Element)); if (!elem) return false; elem->data = data; elem->next = *stack; *stack = elem; return true; } bool pop( Element **stack, void **data ) { Element *elem; if (!(elem=*stack)) return false; *data = elem->data; *stack = elem->next; free(elem); return true; } bool createStack( Element **stack ) { *stack = NULL; return true; } bool deleteStack ( Element **stack ){ Element *next; while ( *stack ) { next = (*stack)->next; free (*stack); *stack = next; } return true; } /* * PROBLEM * Find and fix the bugs in the following C function that is supposed to remove the head element from a singly linked list: * void removeHead (ListElement *head) { * free(head); // Line 1 * head = head->next; // Line 2 * } */ void removeHead (Element **head) { Element *temp; if (head && *head) { temp = (*head)->next; free (*head); *head = temp; } } void main() { }
Add the problem of 'Bugs in removeHead'.
Add the problem of 'Bugs in removeHead'.
C
unlicense
Conan1985/Programming-Interviews-Exposed,Conan1985/Programming-Interviews-Exposed,Conan1985/Programming-Interviews-Exposed
acc3cc239e62e1eb084cdc48cac8dd524a446abd
MCGraylog/MCGraylog/MCGraylog.h
MCGraylog/MCGraylog/MCGraylog.h
// // MCGraylog.h // MCGraylog // // Created by Jordan on 2013-05-06. // Copyright (c) 2013 Marketcircle. All rights reserved. // #import <Foundation/Foundation.h> typedef enum { GraylogLogLevelEmergency = 0, GraylogLogLevelAlert = 1, GraylogLogLevelCritical = 2, GraylogLogLevelError = 3, GraylogLogLevelWarning = 4, GraylogLogLevelNotice = 5, GraylogLogLevelInformational = 6, GraylogLogLevelDebug = 7 } GraylogLogLevel; /** * Perform some up front work needed for all future log messages * * @return 0 on success, otherwise -1. */ int graylog_init(const char* address, const char* port); void graylog_log(GraylogLogLevel lvl, const char* facility, const char* msg, NSDictionary *data);
// // MCGraylog.h // MCGraylog // // Created by Jordan on 2013-05-06. // Copyright (c) 2013 Marketcircle. All rights reserved. // #import <Foundation/Foundation.h> typedef enum { GraylogLogLevelEmergency = 0, GraylogLogLevelAlert = 1, GraylogLogLevelCritical = 2, GraylogLogLevelError = 3, GraylogLogLevelWarning = 4, GraylogLogLevelNotice = 5, GraylogLogLevelInformational = 6, GraylogLogLevelDebug = 7 } GraylogLogLevel; /** * Perform some up front work needed for all future log messages * * @return 0 on success, otherwise -1. */ int graylog_init(const char* address, const char* port); /** * Log a message to the Graylog server (or some other compatible service). * * @param lvl Log level, the severity of the message * @param facility Arbitrary string indicating the subsystem the message came * from (i.e. sync, persistence, etc.) * @param msg The actual log message * @param data Any additional information that might be useful that is JSON * serializable (e.g. numbers, strings, arrays, dictionaries) */ void graylog_log(GraylogLogLevel lvl, const char* facility, const char* msg, NSDictionary* data);
Add some basic documentation for graylog_log
Add some basic documentation for graylog_log
C
bsd-3-clause
Marketcircle/MCGraylog
bccbfb90b9680854a0656054582ced13683f3abd
VirtIO/osdep.h
VirtIO/osdep.h
////////////////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2007 Qumranet All Rights Reserved // // Module Name: // osdep.h // // Abstract: // Windows OS dependent definitions of data types // // Author: // Yan Vugenfirer - February 2007. // ////////////////////////////////////////////////////////////////////////////////////////// #if defined(IGNORE_VIRTIO_OSDEP_H) // to make simulation environment easy #include "external_os_dep.h" #else #ifndef __OS_DEP_H #define __OS_DEP_H #include <ntddk.h> #define ktime_t ULONGLONG #define ktime_get() KeQueryPerformanceCounter(NULL).QuadPart #define likely(x) x #define unlikely(x) x #define ENOSPC 1 #define BUG_ON(a) ASSERT(!(a)) #define WARN_ON(a) #define BUG() ASSERT(0) #if !defined(__cplusplus) && !defined(bool) #define bool int #define false FALSE #define true TRUE #endif #define inline __forceinline #ifdef DBG #define DEBUG #endif #define mb() KeMemoryBarrier() #define rmb() KeMemoryBarrier() #define wmb() KeMemoryBarrier() #define SMP_CACHE_BYTES 64 #endif #endif
////////////////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2007 Qumranet All Rights Reserved // // Module Name: // osdep.h // // Abstract: // Windows OS dependent definitions of data types // // Author: // Yan Vugenfirer - February 2007. // ////////////////////////////////////////////////////////////////////////////////////////// #if defined(IGNORE_VIRTIO_OSDEP_H) // to make simulation environment easy #include "external_os_dep.h" #else #ifndef __OS_DEP_H #define __OS_DEP_H #include <ntddk.h> #define ktime_t ULONGLONG #define ktime_get() KeQueryPerformanceCounter(NULL).QuadPart #define likely(x) x #define unlikely(x) x #define ENOSPC 1 #define BUG_ON(a) ASSERT(!(a)) #define WARN_ON(a) #define BUG() ASSERT(0) #if !defined(__cplusplus) && !defined(bool) // Important note: in MSFT C++ bool length is 1 bytes // C++ does not define length of bool // inconsistent definition of 'bool' may create compatibility problems #define bool u8 #define false FALSE #define true TRUE #endif #define inline __forceinline #ifdef DBG #define DEBUG #endif #define mb() KeMemoryBarrier() #define rmb() KeMemoryBarrier() #define wmb() KeMemoryBarrier() #define SMP_CACHE_BYTES 64 #endif #endif
Fix wrong bool definition in VirtIO library interface
Fix wrong bool definition in VirtIO library interface BZ#1389445: VirtIO definition of bool as int used by all drivers that use VirtIO library, except (currently) netkvm which is C++ and uses bool as fundamental C++ type. Microsoft-specific implementationdefines bool size as 1 byte. Different definition of bool in library interface creates compatibility problem. Example: when calling virtio_device_initialize(...) bool parameter msix_used passed incorrectly. Signed-off-by: Yuri Benditovich <88b9db763c3045958dd7f2a08b57403c2e6ebe14@redhat.com>
C
bsd-3-clause
YanVugenfirer/kvm-guest-drivers-windows,daynix/kvm-guest-drivers-windows,vrozenfe/kvm-guest-drivers-windows,gnif/kvm-guest-drivers-windows,vrozenfe/kvm-guest-drivers-windows,YanVugenfirer/kvm-guest-drivers-windows,virtio-win/kvm-guest-drivers-windows,virtio-win/kvm-guest-drivers-windows,daynix/kvm-guest-drivers-windows,YanVugenfirer/virtio-win-arm,ladipro/kvm-guest-drivers-windows,virtio-win/kvm-guest-drivers-windows,daynix/kvm-guest-drivers-windows,virtio-win/kvm-guest-drivers-windows,virtio-win/kvm-guest-drivers-windows,gnif/kvm-guest-drivers-windows,gnif/kvm-guest-drivers-windows,ladipro/kvm-guest-drivers-windows,vrozenfe/kvm-guest-drivers-windows,vrozenfe/kvm-guest-drivers-windows,daynix/kvm-guest-drivers-windows,YanVugenfirer/kvm-guest-drivers-windows,YanVugenfirer/virtio-win-arm,ladipro/kvm-guest-drivers-windows,gnif/kvm-guest-drivers-windows,ladipro/kvm-guest-drivers-windows,daynix/kvm-guest-drivers-windows,YanVugenfirer/virtio-win-arm,YanVugenfirer/kvm-guest-drivers-windows,YanVugenfirer/virtio-win-arm,vrozenfe/kvm-guest-drivers-windows,YanVugenfirer/kvm-guest-drivers-windows
f84df9f076038ad16e1ee412162c328cd091bc59
include/clang/Frontend/CodeGenAction.h
include/clang/Frontend/CodeGenAction.h
//===--- CodeGenAction.h - LLVM Code Generation Frontend Action -*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "clang/Frontend/FrontendAction.h" #include "llvm/ADT/OwningPtr.h" namespace llvm { class Module; } namespace clang { class CodeGenAction : public ASTFrontendAction { private: unsigned Act; llvm::OwningPtr<llvm::Module> TheModule; protected: CodeGenAction(unsigned _Act); ~CodeGenAction(); virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI, llvm::StringRef InFile); virtual void EndSourceFileAction(); public: /// takeModule - Take the generated LLVM module, for use after the action has /// been run. The result may be null on failure. llvm::Module *takeModule(); }; class EmitAssemblyAction : public CodeGenAction { public: EmitAssemblyAction(); }; class EmitBCAction : public CodeGenAction { public: EmitBCAction(); }; class EmitLLVMAction : public CodeGenAction { public: EmitLLVMAction(); }; class EmitLLVMOnlyAction : public CodeGenAction { public: EmitLLVMOnlyAction(); }; class EmitObjAction : public CodeGenAction { public: EmitObjAction(); }; }
//===--- CodeGenAction.h - LLVM Code Generation Frontend Action -*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "clang/Frontend/FrontendAction.h" #include "llvm/ADT/OwningPtr.h" namespace llvm { class Module; } namespace clang { class CodeGenAction : public ASTFrontendAction { private: unsigned Act; llvm::OwningPtr<llvm::Module> TheModule; protected: CodeGenAction(unsigned _Act); virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI, llvm::StringRef InFile); virtual void EndSourceFileAction(); public: ~CodeGenAction(); /// takeModule - Take the generated LLVM module, for use after the action has /// been run. The result may be null on failure. llvm::Module *takeModule(); }; class EmitAssemblyAction : public CodeGenAction { public: EmitAssemblyAction(); }; class EmitBCAction : public CodeGenAction { public: EmitBCAction(); }; class EmitLLVMAction : public CodeGenAction { public: EmitLLVMAction(); }; class EmitLLVMOnlyAction : public CodeGenAction { public: EmitLLVMOnlyAction(); }; class EmitObjAction : public CodeGenAction { public: EmitObjAction(); }; }
Make the destructor public. ddunbar, lemme know if you'd prefer a different fix, just trying to get the build bots happy again.
Make the destructor public. ddunbar, lemme know if you'd prefer a different fix, just trying to get the build bots happy again. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@97223 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,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
bb3bd956e8c53ccaba3a95940987a1e0133daf00
libgo/runtime/go-traceback.c
libgo/runtime/go-traceback.c
/* go-traceback.c -- stack backtrace for Go. 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 "config.h" #include "runtime.h" #include "go-string.h" /* Print a stack trace for the current goroutine. */ void runtime_traceback () { uintptr pcbuf[100]; int32 c; c = runtime_callers (1, pcbuf, sizeof pcbuf / sizeof pcbuf[0]); runtime_printtrace (pcbuf, c); } void runtime_printtrace (uintptr *pcbuf, int32 c) { int32 i; for (i = 0; i < c; ++i) { struct __go_string fn; struct __go_string file; int line; if (__go_file_line (pcbuf[i], &fn, &file, &line) && runtime_showframe (fn.__data)) { runtime_printf ("%s\n", fn.__data); runtime_printf ("\t%s:%d\n", file.__data, line); } } }
/* go-traceback.c -- stack backtrace for Go. 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 "config.h" #include "runtime.h" #include "go-string.h" /* Print a stack trace for the current goroutine. */ void runtime_traceback () { uintptr pcbuf[100]; int32 c; c = runtime_callers (1, pcbuf, sizeof pcbuf / sizeof pcbuf[0]); runtime_printtrace (pcbuf, c); } void runtime_printtrace (uintptr *pcbuf, int32 c) { int32 i; for (i = 0; i < c; ++i) { struct __go_string fn; struct __go_string file; int line; if (__go_file_line (pcbuf[i], &fn, &file, &line) && runtime_showframe (fn.__data)) { runtime_printf ("%S\n", fn); runtime_printf ("\t%S:%d\n", file, line); } } }
Fix printing of names in stack dumps.
runtime: Fix printing of names in stack dumps. R=iant CC=gofrontend-dev https://golang.org/cl/6305062
C
bsd-3-clause
golang/gofrontend,anlhord/gofrontend,golang/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,anlhord/gofrontend,golang/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,golang/gofrontend,qskycolor/gofrontend,anlhord/gofrontend
fe8b37bf3b859434de2bead4cd4fb00bda48f5c9
src/condor_includes/condor_common.h
src/condor_includes/condor_common.h
#include "_condor_fix_types.h" #include "condor_fix_stdio.h" #include <stdlib.h> #include "condor_fix_unistd.h" #include "condor_fix_limits.h" #include "condor_fix_string.h" #include <ctype.h> #include <fcntl.h> #include <errno.h> #if !defined(SUNOS41) #include <signal.h> #endif
#if defined(WIN32) #define NOGDI #define NOUSER #define NOSOUND #include <winsock2.h> #include <windows.h> #include "_condor_fix_nt.h" #include <stdlib.h> #else #include "_condor_fix_types.h" #include "condor_fix_stdio.h" #include <stdlib.h> #include "condor_fix_unistd.h" #include "condor_fix_limits.h" #include "condor_fix_string.h" #include <ctype.h> #include <fcntl.h> #include <errno.h> #include "condor_fix_signal.h" #if defined(Solaris) # define BSD_COMP #endif #include <sys/ioctl.h> #if defined(Solaris) # undef BSD_COMP #endif #endif // defined(WIN32)
Use condor_fix_signal.h, not <signal.h>, and include <sys/ioctl.h> properly. Also, NT specific changes committed to main trunk.
Use condor_fix_signal.h, not <signal.h>, and include <sys/ioctl.h> properly. Also, NT specific changes committed to main trunk.
C
apache-2.0
djw8605/condor,bbockelm/condor-network-accounting,neurodebian/htcondor,htcondor/htcondor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,neurodebian/htcondor,bbockelm/condor-network-accounting,neurodebian/htcondor,djw8605/condor,htcondor/htcondor,djw8605/condor,zhangzhehust/htcondor,zhangzhehust/htcondor,bbockelm/condor-network-accounting,neurodebian/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,clalancette/condor-dcloud,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,htcondor/htcondor,mambelli/osg-bosco-marco,neurodebian/htcondor,neurodebian/htcondor,neurodebian/htcondor,clalancette/condor-dcloud,djw8605/htcondor,djw8605/condor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,djw8605/htcondor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,djw8605/htcondor,htcondor/htcondor,djw8605/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,clalancette/condor-dcloud,zhangzhehust/htcondor,htcondor/htcondor,zhangzhehust/htcondor,djw8605/htcondor,bbockelm/condor-network-accounting,djw8605/condor,htcondor/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,htcondor/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,zhangzhehust/htcondor,clalancette/condor-dcloud,htcondor/htcondor,djw8605/htcondor,djw8605/condor,neurodebian/htcondor,zhangzhehust/htcondor,bbockelm/condor-network-accounting,djw8605/condor,djw8605/condor,djw8605/htcondor,djw8605/htcondor
74feaa2154590685a8702b9bab6aa2a4c2e58382
src/condor_includes/condor_common.h
src/condor_includes/condor_common.h
#include "condor_fix_stdio.h" #include <stdlib.h> #include "condor_fix_unistd.h" #include <limits.h> #include <string.h> #include <ctype.h> #include <fcntl.h> #include "_condor_fix_types.h" #include <errno.h>
#include "condor_fix_stdio.h" #include <stdlib.h> #include "condor_fix_unistd.h" #include <limits.h> #include <string.h> #include <ctype.h> #include "_condor_fix_types.h" #include <fcntl.h> #include <errno.h>
Add <fcntl.h> to list of commonly included files.
Add <fcntl.h> to list of commonly included files.
C
apache-2.0
htcondor/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,clalancette/condor-dcloud,clalancette/condor-dcloud,clalancette/condor-dcloud,djw8605/condor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,htcondor/htcondor,djw8605/condor,neurodebian/htcondor,neurodebian/htcondor,djw8605/htcondor,bbockelm/condor-network-accounting,htcondor/htcondor,zhangzhehust/htcondor,djw8605/condor,htcondor/htcondor,zhangzhehust/htcondor,htcondor/htcondor,clalancette/condor-dcloud,neurodebian/htcondor,mambelli/osg-bosco-marco,djw8605/htcondor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,clalancette/condor-dcloud,htcondor/htcondor,djw8605/condor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,zhangzhehust/htcondor,neurodebian/htcondor,bbockelm/condor-network-accounting,zhangzhehust/htcondor,htcondor/htcondor,djw8605/htcondor,djw8605/condor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,zhangzhehust/htcondor,djw8605/condor,htcondor/htcondor,djw8605/htcondor,djw8605/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,djw8605/htcondor,djw8605/condor,neurodebian/htcondor,neurodebian/htcondor,clalancette/condor-dcloud,djw8605/htcondor,zhangzhehust/htcondor,djw8605/condor,bbockelm/condor-network-accounting,neurodebian/htcondor,djw8605/htcondor,neurodebian/htcondor
e259496d6faec673557dc4b9b5bc2e86487e27a4
tests/regression/31-ikind-aware-ints/04-ptrdiff.c
tests/regression/31-ikind-aware-ints/04-ptrdiff.c
// PARAM: --enable ana.int.interval --enable exp.partition-arrays.enabled --set ana.activated "['base', 'mallocWrapper', 'expRelation', 'var_eq']" int *tmp; int main () { int pathbuf[2]; int *bound = pathbuf + sizeof(pathbuf)/sizeof(*pathbuf) - 1; int *p = pathbuf; while (p <= bound) { *p = 1; p++; } return 0; }
// PARAM: --enable ana.int.interval --enable exp.partition-arrays.enabled --set ana.activated "['base', 'mallocWrapper', 'escape', 'expRelation', 'var_eq']" int *tmp; int main () { int pathbuf[2]; int *bound = pathbuf + sizeof(pathbuf)/sizeof(*pathbuf) - 1; int *p = pathbuf; while (p <= bound) { *p = 1; p++; } return 0; }
Enable escape in 31/04 for global-history to pass
Enable escape in 31/04 for global-history to pass
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
c4dc456cdfc6fe4a67f41d2aa02f30bde9968d4c
set/test.c
set/test.c
int asserter_is_false(int); int set_empty(void); int set_size(int); int set_add(int, int); int main(void) { // set_empty tests if (asserter_is_false(set_empty() == 0)) return __LINE__; // set_add tests if (asserter_is_false(set_add(set_empty(), 0) != set_empty())) return __LINE__; if (asserter_is_false(set_add(set_empty(), 1) != set_add(set_empty(), 2))) return __LINE__; if (asserter_is_false(set_add(set_add(set_empty(), 1), 2) != set_add(set_empty(), 2))) return __LINE__; if (asserter_is_false(set_add(set_add(set_empty(), 1), 1) == set_add(set_empty(), 1))) return __LINE__; // set_size tests if (asserter_is_false(set_size(set_empty()) == 0)) return __LINE__; if (asserter_is_false(set_size(set_add(set_empty(), 1)) == 1)) return __LINE__; if (asserter_is_false(set_size(set_add(set_add(set_empty(), 1), 2)) == 2)) return __LINE__; return 0; }
int asserter_is_false(int); int set_empty(void); int set_size(int); int set_add(int, int); int main(void) { // set_empty tests if (asserter_is_false(set_empty() == 0)) return __LINE__; // set_add tests if (asserter_is_false(set_add(set_empty(), 0) != set_empty())) return __LINE__; if (asserter_is_false(set_add(set_empty(), 1) != set_add(set_empty(), 2))) return __LINE__; if (asserter_is_false(set_add(set_add(set_empty(), 1), 2) != set_add(set_empty(), 2))) return __LINE__; if (asserter_is_false(set_add(set_add(set_empty(), 1), 1) == set_add(set_empty(), 1))) return __LINE__; // TODO: add bigger than sizeof(int) * 8 elements // set_size tests if (asserter_is_false(set_size(set_empty()) == 0)) return __LINE__; if (asserter_is_false(set_size(set_add(set_empty(), 1)) == 1)) return __LINE__; if (asserter_is_false(set_size(set_add(set_add(set_empty(), 1), 2)) == 2)) return __LINE__; // TODO: add more than sizeof(int) * 8 elements return 0; }
Add TODOs for future work
[SET] REFACTOR: Add TODOs for future work
C
mit
w3ln4/open
c9d3145843ebb8a4fbd78484771dc0aa7fee4caf
include/cr-service.h
include/cr-service.h
#ifndef __CR_SERVICE_H__ #define __CR_SERVICE_H__ #include "protobuf/rpc.pb-c.h" #define CR_DEFAULT_SERVICE_ADDRESS "/tmp/criu_service.socket" #define MAX_MSG_SIZE 1024 int cr_service(bool deamon_mode); int send_criu_dump_resp(int socket_fd, bool success, bool restored); extern struct _cr_service_client *cr_service_client; extern unsigned int service_sk_ino; #endif
#ifndef __CR_SERVICE_H__ #define __CR_SERVICE_H__ #include "protobuf/rpc.pb-c.h" #define CR_DEFAULT_SERVICE_ADDRESS "/var/run/criu_service.socket" #define MAX_MSG_SIZE 1024 int cr_service(bool deamon_mode); int send_criu_dump_resp(int socket_fd, bool success, bool restored); extern struct _cr_service_client *cr_service_client; extern unsigned int service_sk_ino; #endif
Change default socket path to /var/run/
service: Change default socket path to /var/run/ This is where such stuff is typically placed. Signed-off-by: Pavel Emelyanov <c9a32589e048e044184536f7ac71ef92fe82df3e@parallels.com>
C
lgpl-2.1
fbocharov/criu,gonkulator/criu,ldu4/criu,KKoukiou/criu-remote,biddyweb/criu,efiop/criu,eabatalov/criu,efiop/criu,AuthenticEshkinKot/criu,KKoukiou/criu-remote,tych0/criu,gonkulator/criu,ldu4/criu,AuthenticEshkinKot/criu,LK4D4/criu,eabatalov/criu,gonkulator/criu,kawamuray/criu,sdgdsffdsfff/criu,svloyso/criu,LK4D4/criu,wtf42/criu,sdgdsffdsfff/criu,ldu4/criu,tych0/criu,LK4D4/criu,gablg1/criu,gonkulator/criu,kawamuray/criu,rentzsch/criu,eabatalov/criu,marcosnils/criu,svloyso/criu,KKoukiou/criu-remote,KKoukiou/criu-remote,marcosnils/criu,kawamuray/criu,efiop/criu,marcosnils/criu,gablg1/criu,AuthenticEshkinKot/criu,tych0/criu,svloyso/criu,kawamuray/criu,wtf42/criu,LK4D4/criu,sdgdsffdsfff/criu,gablg1/criu,wtf42/criu,wtf42/criu,svloyso/criu,rentzsch/criu,efiop/criu,ldu4/criu,fbocharov/criu,rentzsch/criu,sdgdsffdsfff/criu,kawamuray/criu,ldu4/criu,gonkulator/criu,rentzsch/criu,marcosnils/criu,rentzsch/criu,AuthenticEshkinKot/criu,KKoukiou/criu-remote,wtf42/criu,fbocharov/criu,gonkulator/criu,AuthenticEshkinKot/criu,biddyweb/criu,svloyso/criu,tych0/criu,tych0/criu,sdgdsffdsfff/criu,fbocharov/criu,KKoukiou/criu-remote,rentzsch/criu,LK4D4/criu,svloyso/criu,sdgdsffdsfff/criu,fbocharov/criu,ldu4/criu,efiop/criu,efiop/criu,biddyweb/criu,LK4D4/criu,eabatalov/criu,wtf42/criu,tych0/criu,kawamuray/criu,biddyweb/criu,biddyweb/criu,AuthenticEshkinKot/criu,eabatalov/criu,gablg1/criu,marcosnils/criu,fbocharov/criu,eabatalov/criu,marcosnils/criu,biddyweb/criu,gablg1/criu,gablg1/criu
ee6d21258db24ac2640a410bc27ea1b552b36ca1
stmt.c
stmt.c
#include <stddef.h> #include <stdint.h> #include "cc1.h" Symbol *curfun; extern Node *convert(Node *np, Type *tp1, char iscast); static void Return(void) { Node *np; Type *tp = curfun->type->type; expect(RETURN); np = expr(); if (np->type != tp) { if ((np = convert(np, tp, 0)) == NULL) error("incorrect type in return"); } emitret(tp); emitexp(np); } void compound(void) { expect('{'); while (!accept('}')) { switch (yytoken) { case TYPE: case SCLASS: case TQUALIFIER: decl(); break; case RETURN: Return(); break; default: emitexp(expr()); } expect(';'); } }
#include <stddef.h> #include <stdint.h> #include "cc1.h" Symbol *curfun; extern Node *convert(Node *np, Type *tp1, char iscast); static void Return(void) { Node *np; Type *tp = curfun->type->type; expect(RETURN); np = expr(); if (np->type != tp) { if (tp == voidtype) warn(1, "function returning void returns a value"); else if ((np = convert(np, tp, 0)) == NULL) error("incorrect type in return"); } emitret(tp); emitexp(np); } void compound(void) { expect('{'); while (!accept('}')) { switch (yytoken) { case TYPE: case SCLASS: case TQUALIFIER: decl(); break; case RETURN: Return(); break; default: emitexp(expr()); } expect(';'); } }
Check that void function can return a value
Check that void function can return a value
C
isc
k0gaMSX/scc,k0gaMSX/kcc,k0gaMSX/scc,k0gaMSX/scc,k0gaMSX/kcc,8l/scc,8l/scc,8l/scc
54925adacd0d75de68b955d6197b0b02da97f161
test/CodeGen/c-unicode.c
test/CodeGen/c-unicode.c
// RUN: %clang -S %s -o - | FileCheck %s -check-prefix=ALLOWED // RUN: not %clang -std=c89 -S %s -o - 2>&1 | FileCheck %s -check-prefix=DENIED int \uaccess = 0; // ALLOWED: "곎ss": // ALLOWED-NOT: "\uaccess": // DENIED: warning: universal character names are only valid in C99 or C++; treating as '\' followed by identifier [-Wunicode] // DENIED: error: expected identifier or '('
// RUN: %clang --target=x86_64--linux-gnu -S %s -o - | FileCheck %s -check-prefix=ALLOWED // RUN: not %clang --target=x86_64--linux-gnu -std=c89 -S %s -o - 2>&1 | FileCheck %s -check-prefix=DENIED int \uaccess = 0; // ALLOWED: "곎ss": // ALLOWED-NOT: "\uaccess": // DENIED: warning: universal character names are only valid in C99 or C++; treating as '\' followed by identifier [-Wunicode] // DENIED: error: expected identifier or '('
Fix testcase when building on darwin
Fix testcase when building on darwin Explicitely specify a target to avoid "_" prefixes on the names. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@253741 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/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,apple/swift-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,llvm-mirror/clang
12e777affa9dc0a5a7b9616a2f007ddc90e0e3f1
SSPSolution/AIDLL/AIComponent.h
SSPSolution/AIDLL/AIComponent.h
#ifndef AIDLL_AI_AICOMPONENT_H #define AIDLL_AI_AICOMPONENT_H #include <DirectXMath.h> enum Pattern : int { AI_LINEAR = 1, AI_CIRCULAR, AI_ROUNTRIP, AI_RANDOM, AI_NONE = -1 }; __declspec(align(16)) struct AIComponent { // System variables int AP_active = 0; int AP_entityID = -1; // AI variables bool AP_triggered; // Trigger handling int AP_time; // How long the component is active float AP_speed; // Movement speed DirectX::XMVECTOR AP_dir; // Normalised direction vector DirectX::XMVECTOR AP_position;// Current position int AP_pattern; // Traversing of waypoints int AP_direction; // Direction in array, might be removed due to AP_pattern's existance int AP_nextWaypointID; // Index to next waypoint int AP_latestWaypointID; // Index to latest visited waypoint int AP_nrOfWaypoint; // Nr of waypoints used in array DirectX::XMVECTOR AP_waypoints[8]; void* operator new(size_t i) { return _aligned_malloc(i, 16); }; void operator delete(void* p) { _aligned_free(p); }; }; #endif
#ifndef AIDLL_AI_AICOMPONENT_H #define AIDLL_AI_AICOMPONENT_H #include <DirectXMath.h> enum Pattern : int { AI_LINEAR = 1, AI_CIRCULAR, AI_ROUNTRIP, AI_RANDOM, AI_NONE = -1 }; __declspec(align(16)) struct AIComponent { // System variables int AP_active = 0; int AP_entityID = -1; // AI variables bool AP_triggered = false; // Trigger handling int AP_time = 0; // How long the component is active float AP_speed = 0; // Movement speed DirectX::XMVECTOR AP_dir = DirectX::XMVECTOR();// Normalised direction vector DirectX::XMVECTOR AP_position = DirectX::XMVECTOR();// Current position int AP_pattern = AI_NONE; // Traversing of waypoints int AP_direction = 0; // Direction in array, might be removed due to AP_pattern's existance int AP_nextWaypointID = 0; // Index to next waypoint int AP_latestWaypointID = 1;// Index to latest visited waypoint int AP_nrOfWaypoint = 0; // Nr of waypoints used in array DirectX::XMVECTOR AP_waypoints[8]; void* operator new(size_t i) { return _aligned_malloc(i, 16); }; void operator delete(void* p) { _aligned_free(p); }; }; #endif
UPDATE AIComp struct to initiate all variables except array
UPDATE AIComp struct to initiate all variables except array
C
apache-2.0
Chringo/SSP,Chringo/SSP
228ad56ee9f8e07cc2b81290d9fb081e36c10c55
libhostile/hostile.h
libhostile/hostile.h
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: * * libhostile * * Copyright (C) 2011 Data Differential, http://datadifferential.com/ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #pragma once #ifdef __cplusplus extern "C" { #endif #if defined(HAVE_LIBHOSTILE) && HAVE_LIBHOSTILE void set_recv_close(bool arg, int frequency, int not_until_arg); void set_send_close(bool arg, int frequency, int not_until_arg); #else #define set_recv_close(__arg, __frequency, __not_until_arg) #define set_send_close(__arg, __frequency, __not_until_arg) #endif #ifdef __cplusplus } #endif
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: * * libhostile * * Copyright (C) 2011 Data Differential, http://datadifferential.com/ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #pragma once #ifdef __cplusplus extern "C" { #endif void set_recv_close(bool arg, int frequency, int not_until_arg); void set_send_close(bool arg, int frequency, int not_until_arg); #ifdef __cplusplus } #endif
Revert changes on .h file.
Revert changes on .h file.
C
bsd-3-clause
beeksiwaais/gearmand,dm/gearmand,dm/gearmand,dm/gearmand,beeksiwaais/gearmand,beeksiwaais/gearmand,beeksiwaais/gearmand,dm/gearmand
45952868429c278087b68d0e0e96f33ec70388fa
webkit/support/webkit_support_gfx.h
webkit/support/webkit_support_gfx.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_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #define WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #include <string> #include <vector> // TODO(darin): Remove once this #include has been upstreamed to ImageDiff.cpp. // ImageDiff.cpp expects that PATH_MAX has already been defined :-/ #include <limits.h> namespace webkit_support { // Decode a PNG into an RGBA pixel array. bool DecodePNG(const unsigned char* input, size_t input_size, std::vector<unsigned char>* output, int* width, int* height); // Encode an RGBA pixel array into a PNG. bool EncodeRGBAPNG(const unsigned char* input, int width, int height, int row_byte_width, std::vector<unsigned char>* output); // Encode an BGRA pixel array into a PNG. bool EncodeBGRAPNG(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, std::vector<unsigned char>* output); bool EncodeBGRAPNGWithChecksum(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, const std::string& checksum, std::vector<unsigned char>* output); } // namespace webkit_support #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_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_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #define WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #include <string> #include <vector> namespace webkit_support { // Decode a PNG into an RGBA pixel array. bool DecodePNG(const unsigned char* input, size_t input_size, std::vector<unsigned char>* output, int* width, int* height); // Encode an RGBA pixel array into a PNG. bool EncodeRGBAPNG(const unsigned char* input, int width, int height, int row_byte_width, std::vector<unsigned char>* output); // Encode an BGRA pixel array into a PNG. bool EncodeBGRAPNG(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, std::vector<unsigned char>* output); bool EncodeBGRAPNGWithChecksum(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, const std::string& checksum, std::vector<unsigned char>* output); } // namespace webkit_support #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_
Remove an include which has been upstreamed to ImageDiff.cpp.
Remove an include which has been upstreamed to ImageDiff.cpp. BUG=none TEST=none Review URL: http://codereview.chromium.org/8392031 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@107382 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
hgl888/chromium-crosswalk-efl,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,keishi/chromium,rogerwang/chromium,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,mogoweb/chromium-crosswalk,dednal/chromium.src,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk,keishi/chromium,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,keishi/chromium,robclark/chromium,mogoweb/chromium-crosswalk,dednal/chromium.src,M4sse/chromium.src,timopulkkinen/BubbleFish,M4sse/chromium.src,keishi/chromium,ondra-novak/chromium.src,ChromiumWebApps/chromium,robclark/chromium,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,markYoungH/chromium.src,Jonekee/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,Just-D/chromium-1,krieger-od/nwjs_chromium.src,anirudhSK/chromium,dednal/chromium.src,M4sse/chromium.src,Just-D/chromium-1,Chilledheart/chromium,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,patrickm/chromium.src,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,markYoungH/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,M4sse/chromium.src,M4sse/chromium.src,axinging/chromium-crosswalk,Chilledheart/chromium,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,junmin-zhu/chromium-rivertrail,rogerwang/chromium,axinging/chromium-crosswalk,Just-D/chromium-1,zcbenz/cefode-chromium,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,dednal/chromium.src,chuan9/chromium-crosswalk,littlstar/chromium.src,chuan9/chromium-crosswalk,keishi/chromium,junmin-zhu/chromium-rivertrail,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,Chilledheart/chromium,jaruba/chromium.src,dednal/chromium.src,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,Chilledheart/chromium,fujunwei/chromium-crosswalk,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,Jonekee/chromium.src,dednal/chromium.src,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,robclark/chromium,dushu1203/chromium.src,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,keishi/chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,keishi/chromium,littlstar/chromium.src,hujiajie/pa-chromium,patrickm/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,chuan9/chromium-crosswalk,markYoungH/chromium.src,dednal/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,timopulkkinen/BubbleFish,markYoungH/chromium.src,robclark/chromium,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,dushu1203/chromium.src,Chilledheart/chromium,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,rogerwang/chromium,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,robclark/chromium,littlstar/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,hgl888/chromium-crosswalk,jaruba/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk,markYoungH/chromium.src,rogerwang/chromium,robclark/chromium,junmin-zhu/chromium-rivertrail,robclark/chromium,zcbenz/cefode-chromium,dushu1203/chromium.src,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,hgl888/chromium-crosswalk,dednal/chromium.src,pozdnyakov/chromium-crosswalk,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,dednal/chromium.src,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,ondra-novak/chromium.src,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,ltilve/chromium,patrickm/chromium.src,keishi/chromium,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,Jonekee/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,Jonekee/chromium.src,ltilve/chromium,littlstar/chromium.src,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,rogerwang/chromium,dednal/chromium.src,hgl888/chromium-crosswalk-efl,ltilve/chromium,anirudhSK/chromium,patrickm/chromium.src,hujiajie/pa-chromium,littlstar/chromium.src,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,anirudhSK/chromium,patrickm/chromium.src,Just-D/chromium-1,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,chuan9/chromium-crosswalk,keishi/chromium,ondra-novak/chromium.src,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,rogerwang/chromium,Jonekee/chromium.src,mogoweb/chromium-crosswalk,dednal/chromium.src,markYoungH/chromium.src,Just-D/chromium-1,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,timopulkkinen/BubbleFish,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,robclark/chromium,ondra-novak/chromium.src,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,nacl-webkit/chrome_deps,dushu1203/chromium.src,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,rogerwang/chromium,chuan9/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,Jonekee/chromium.src,dushu1203/chromium.src,ltilve/chromium,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,ltilve/chromium,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,rogerwang/chromium,Just-D/chromium-1,axinging/chromium-crosswalk,robclark/chromium,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,robclark/chromium,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,patrickm/chromium.src,M4sse/chromium.src,M4sse/chromium.src,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,anirudhSK/chromium,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,zcbenz/cefode-chromium,PeterWangIntel/chromium-crosswalk,rogerwang/chromium,anirudhSK/chromium,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,littlstar/chromium.src,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,dushu1203/chromium.src,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,axinging/chromium-crosswalk,patrickm/chromium.src,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,ltilve/chromium,keishi/chromium,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,keishi/chromium,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,timopulkkinen/BubbleFish,patrickm/chromium.src,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk
3afa50dec22e049ab56862b5a16412aec4e79dba
xmas3.c
xmas3.c
/*Build: gcc -std=c99 -o xmas3 xmas3.c*/ #include <stdlib.h> #include <stdio.h> int print_tree(int length) { int i = 0, j = 0; for (i = 0;i<length;i++) { for (j = 0;j<=i;j++) { printf("*"); } printf("\n"); } return 0; } int main(int argc, char*argv[]) { if (argc != 2) { printf("USAGE: %s [length]\n", argv[0]); exit(-1); } int length = atoi(argv[1]); print_tree(length); return 0; }
/*Build: gcc -std=c99 -o xmas3 xmas3.c*/ #include <stdlib.h> #include <stdio.h> #include <string.h> void usage(char *argv0) { printf("USAGE: %s [height] [half|full]\n", argv0); exit(-1); } int print_tree(int height, char half) { int i = 0, j = 0; if (half) // Half tree { for (i = 0;i < height;i++) { for (j = 0;j <= i;j++) { printf("*"); } printf("\n"); } } else if (!half) // full tree { int max_width = 2 * (height - 1) + 1; for (i = 0;i < height;i++) { int width = i + height; for (j = 0;j < width;j++) { if (j < (height-1) - i) printf(" "); else printf("*"); } printf("\n"); } } return 0; } int main(int argc, char *argv[]) { if (argc != 3) usage(argv[0]); int height = atoi(argv[1]); char half = -1; if (!strncmp("half", argv[2], sizeof 4)) half = 1; else if(!strncmp("full", argv[2], sizeof 4)) half = 0; else usage(argv[0]); print_tree(height, half); return 0; }
Add full/half option for tree.
Add full/half option for tree.
C
mit
svagionitis/xmas-tree
7d789e8c0e04aca179ff1f65dfff0ebb3fd066ff
src/m1/protocolo.h
src/m1/protocolo.h
#define PORT 50000 #define TIMEOUT 10; int waitforack(int sock); int sendack(int sock); int senderr(int sock, int ecode); int sendfin(int sock); int getsockfd(); int releasesockfd(int sock);
#define PORT 6012 #define TIMEOUT 10; int waitforack(int sock); int sendConnect(int sock); int sendack(int sock); int senderr(int sock, int ecode); int sendFile(int sock, char * file); int sendfin(int sock); int getsockfd(); int releasesockfd(int sock);
Add missing sendFile function declaration
Add missing sendFile function declaration
C
agpl-3.0
MikelAlejoBR/practica-sd1516
b239023198fbd527d8f3534d3e393e82213d3204
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
dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot
51889a9376cf256830db71764c72ef337e644094
src/CpuHelpers.h
src/CpuHelpers.h
#pragma once // This header mainly contains functions needed by both Cpu and Debugger #include "Base.h" // Convenience cast functions template <typename T> constexpr int16_t S16(T v) { return static_cast<int16_t>(v); } template <typename T> constexpr uint16_t U16(T v) { return static_cast<uint16_t>(v); } template <typename T> constexpr uint32_t U32(T v) { return static_cast<uint32_t>(v); } template <typename T> constexpr uint8_t U8(T v) { return static_cast<uint8_t>(v); } // Combine two 8-bit values into a 16-bit value constexpr uint16_t CombineToU16(uint8_t msb, uint8_t lsb) { return U16(msb) << 8 | U16(lsb); } constexpr int16_t CombineToS16(uint8_t msb, uint8_t lsb) { return static_cast<int16_t>(CombineToU16(msb, lsb)); }
#pragma once // This header mainly contains functions needed by both Cpu and Debugger #include "Base.h" #include <type_traits> // Convenience cast functions template <typename T> constexpr int16_t S16(T v) { return static_cast<int16_t>(static_cast<std::make_signed_t<T>>(v)); } template <typename T> constexpr uint16_t U16(T v) { return static_cast<uint16_t>(v); } template <typename T> constexpr uint32_t U32(T v) { return static_cast<uint32_t>(v); } template <typename T> constexpr uint8_t U8(T v) { return static_cast<uint8_t>(v); } // Combine two 8-bit values into a 16-bit value constexpr uint16_t CombineToU16(uint8_t msb, uint8_t lsb) { return U16(msb) << 8 | U16(lsb); } constexpr int16_t CombineToS16(uint8_t msb, uint8_t lsb) { return static_cast<int16_t>(CombineToU16(msb, lsb)); }
Fix indexed mode instructions failing to add negative offset because value would not be correctly sign extended
Cpu: Fix indexed mode instructions failing to add negative offset because value would not be correctly sign extended
C
mit
amaiorano/vectrexy,amaiorano/vectrexy,amaiorano/vectrexy
e4edb986c6acfb48e0d95b845bcdca75595f5308
pevents.h
pevents.h
#pragma once #include <pthread.h> #include <stdint.h> namespace neosmart { struct neosmart_event_t_; typedef neosmart_event_t_ * neosmart_event_t; neosmart_event_t CreateEvent(bool manualReset = false, bool initialState = false); int DestroyEvent(neosmart_event_t event); int WaitForEvent(neosmart_event_t event, uint32_t milliseconds = -1); int SetEvent(neosmart_event_t event); int ResetEvent(neosmart_event_t event); }
#pragma once #include <pthread.h> #include <stdint.h> namespace neosmart { //Type declarations struct neosmart_event_t_; typedef neosmart_event_t_ * neosmart_event_t; //WIN32-style pevent functions neosmart_event_t CreateEvent(bool manualReset = false, bool initialState = false); int DestroyEvent(neosmart_event_t event); int WaitForEvent(neosmart_event_t event, uint32_t milliseconds = -1); int SetEvent(neosmart_event_t event); int ResetEvent(neosmart_event_t event); //posix-style functions //TBD }
Add posix-styled functions for using neosmart_event_t objects
TBD: Add posix-styled functions for using neosmart_event_t objects
C
mit
neosmart/pevents,neosmart/pevents
8bafd7d816991e89b8599aff4f5a1ef6d27dc80e
kerberos5/include/crypto-headers.h
kerberos5/include/crypto-headers.h
/* $FreeBSD$ */ #ifndef __crypto_headers_h__ #define __crypto_headers_h__ #include <openssl/des.h> #include <openssl/rc4.h> #include <openssl/md4.h> #include <openssl/md5.h> #include <openssl/sha.h> #endif /* __crypto_headers_h__ */
/* $FreeBSD$ */ #ifndef __crypto_headers_h__ #define __crypto_headers_h__ #define OPENSSL_DES_LIBDES_COMPATIBILITY #include <openssl/des.h> #include <openssl/rc4.h> #include <openssl/md4.h> #include <openssl/md5.h> #include <openssl/sha.h> #endif /* __crypto_headers_h__ */
Define OPENSSL_DES_LIBDES_COMPATIBILITY so that Heimdal will build with OpenSSL 0.9.7 when it is imported. (This currently has no effect.)
Define OPENSSL_DES_LIBDES_COMPATIBILITY so that Heimdal will build with OpenSSL 0.9.7 when it is imported. (This currently has no effect.)
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
9135a146d451d9e165a81f787e80d6dde9338073
texor.c
texor.c
#include <unistd.h> int main() { char c; while (read(STDIN_FILENO, &c, 1) == 1); return 0; }
#include <unistd.h> int main() { char c; while (read(STDIN_FILENO, &c, 1) == 1 && c!= 'q'); return 0; }
Quit after reading a q
Quit after reading a q
C
bsd-2-clause
kyletolle/texor
727917c5605c2e140528a5e7e357cb312757f67f
maximum_pairwise_product.c
maximum_pairwise_product.c
#include <stdio.h> int MaxPairwiseProduct(int* numbers, int sizeofArray) { int result = 0; for (int i = 0; i < sizeofArray; ++i) { for (int j = i + 1; j < sizeofArray; ++j) { if (numbers[i] * numbers[j] > result) { result = numbers[i] * numbers[j]; } } } return result; } int main(void){ int n; char formatter[100]; scanf("%d", &n); int numbers[n], i = 0; while (i < n && scanf("%d", &numbers[i++]) == 1); int result = MaxPairwiseProduct(numbers, n); printf("%d\n", result); return 0; }
#include <stdio.h> long long MaxPairwiseProduct(int* numbers, int sizeofArray) { long long result = 0; for (int i = 0; i < sizeofArray; ++i) { for (int j = i + 1; j < sizeofArray; ++j) { if (((long long)numbers[i]) * numbers[j] > result) { result = ((long long)numbers[i]) * numbers[j]; } } } return result; } int main(void){ int n; char formatter[100]; scanf("%d", &n); int numbers[n], i = 0; while (i < n && scanf("%d", &numbers[i++]) == 1); long long result = MaxPairwiseProduct(numbers, n); printf("%lld\n", result); return 0; }
Change result data type to long long
Change result data type to long long
C
mit
sai-y/coursera_algorithmic_toolbox
04d4d10ab5ebb92244f07cf43ff9e89fcd548a44
Stripe/PublicHeaders/STPPaymentIntentSourceActionAuthorizeWithURL.h
Stripe/PublicHeaders/STPPaymentIntentSourceActionAuthorizeWithURL.h
// // STPPaymentIntentSourceActionAuthorizeWithURL.h // Stripe // // Created by Daniel Jackson on 11/7/18. // Copyright © 2018 Stripe, Inc. All rights reserved. // #import <Foundation/Foundation.h> #import "STPAPIResponseDecodable.h" NS_ASSUME_NONNULL_BEGIN /** The `STPPaymentIntentSourceAction` details when type is `authorize_with_url`. These are created & owned by the containing `STPPaymentIntent`. */ @interface STPPaymentIntentSourceActionAuthorizeWithURL: NSObject<STPAPIResponseDecodable> /** You cannot directly instantiate an `STPPaymentIntentSourceActionAuthorizeWithURL`. */ - (instancetype)init __attribute__((unavailable("You cannot directly instantiate an STPPaymentIntentSourceActionAuthorizeWithURL."))); /** The URL where the user will authorize this charge. */ @property (nonatomic, readonly) NSURL *url; /** The return URL that'll be redirected back to when the user is done authorizing the charge. */ @property (nonatomic, nullable, readonly) NSURL *returnURL; @end NS_ASSUME_NONNULL_END
// // STPPaymentIntentSourceActionAuthorizeWithURL.h // Stripe // // Created by Daniel Jackson on 11/7/18. // Copyright © 2018 Stripe, Inc. All rights reserved. // #import <Foundation/Foundation.h> #import "STPAPIResponseDecodable.h" NS_ASSUME_NONNULL_BEGIN /** The `STPPaymentIntentSourceAction` details when type is `STPPaymentIntentSourceActionTypeAuthorizeWithURL`. These are created & owned by the containing `STPPaymentIntent`. */ @interface STPPaymentIntentSourceActionAuthorizeWithURL: NSObject<STPAPIResponseDecodable> /** You cannot directly instantiate an `STPPaymentIntentSourceActionAuthorizeWithURL`. */ - (instancetype)init __attribute__((unavailable("You cannot directly instantiate an STPPaymentIntentSourceActionAuthorizeWithURL."))); /** The URL where the user will authorize this charge. */ @property (nonatomic, readonly) NSURL *url; /** The return URL that'll be redirected back to when the user is done authorizing the charge. */ @property (nonatomic, nullable, readonly) NSURL *returnURL; @end NS_ASSUME_NONNULL_END
Use SDK's enum value instead of server's string constant in documentation
Use SDK's enum value instead of server's string constant in documentation
C
mit
stripe/stripe-ios,stripe/stripe-ios,stripe/stripe-ios,stripe/stripe-ios,stripe/stripe-ios,stripe/stripe-ios
75053d92ff35f4b83f7edffe541c2526f04ecf17
arch/x86/libs/thread_x86/incs/ac_thread_stack_min.h
arch/x86/libs/thread_x86/incs/ac_thread_stack_min.h
/* * 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. */ #ifndef SADIE_ARCH_X86_LIBS_AC_THREAD_INCS_AC_THREAD_STACK_MIN_H #define SADIE_ARCH_X86_LIBS_AC_THREAD_INCS_AC_THREAD_STACK_MIN_H #define AC_THREAD_STACK_MIN 0x100 #endif
/* * 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. */ #ifndef SADIE_ARCH_X86_LIBS_AC_THREAD_INCS_AC_THREAD_STACK_MIN_H #define SADIE_ARCH_X86_LIBS_AC_THREAD_INCS_AC_THREAD_STACK_MIN_H #define AC_THREAD_STACK_MIN 0x1000 #endif
Increase x86 AC_THREAD_STACK_MIN to 4K from 256 bytes just incase
Increase x86 AC_THREAD_STACK_MIN to 4K from 256 bytes just incase
C
apache-2.0
winksaville/sadie,winksaville/sadie
d558b32f61aa23fa9237d875e59b5acec4dcb4e6
include/IrcCore/irccore.h
include/IrcCore/irccore.h
#include "irc.h" #include "irccommand.h" #include "ircconnection.h" #include "ircglobal.h" #include "ircmessage.h" #include "ircfilter.h" #include "ircnetwork.h"
#include "irc.h" #include "irccommand.h" #include "ircconnection.h" #include "ircglobal.h" #include "ircmessage.h" #include "ircfilter.h" #include "ircnetwork.h" #include "ircprotocol.h"
Include ircprotocol.h in the IrcCore module header
Include ircprotocol.h in the IrcCore module header
C
bsd-3-clause
jpnurmi/libcommuni,jpnurmi/libcommuni,communi/libcommuni,communi/libcommuni
809e023343ae13d40f21e4d03ff7b09b5ecf005a
device/vibration/vibration_manager_impl_android.h
device/vibration/vibration_manager_impl_android.h
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_ANDROID_H_ #define DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_ANDROID_H_ #include "base/android/jni_android.h" #include "device/vibration/vibration_manager.mojom.h" namespace device { // TODO(timvolodine): consider implementing the VibrationManager mojo service // directly in java, crbug.com/439434. class VibrationManagerImplAndroid : public mojo::InterfaceImpl<VibrationManager> { public: static VibrationManagerImplAndroid* Create(); static bool Register(JNIEnv* env); void Vibrate(int64 milliseconds) override; void Cancel() override; private: VibrationManagerImplAndroid(); virtual ~VibrationManagerImplAndroid(); base::android::ScopedJavaGlobalRef<jobject> j_vibration_provider_; }; } // namespace device #endif // DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_ANDROID_H_
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_ANDROID_H_ #define DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_ANDROID_H_ #include "base/android/jni_android.h" #include "device/vibration/vibration_manager.mojom.h" namespace device { // TODO(timvolodine): consider implementing the VibrationManager mojo service // directly in java, crbug.com/439434. class VibrationManagerImplAndroid : public mojo::InterfaceImpl<VibrationManager> { public: static VibrationManagerImplAndroid* Create(); static bool Register(JNIEnv* env); void Vibrate(int64 milliseconds) override; void Cancel() override; private: VibrationManagerImplAndroid(); ~VibrationManagerImplAndroid() override; base::android::ScopedJavaGlobalRef<jobject> j_vibration_provider_; }; } // namespace device #endif // DEVICE_VIBRATION_VIBRATION_MANAGER_IMPL_ANDROID_H_
Update {virtual,override,final} to follow C++11 style in device.
Update {virtual,override,final} to follow C++11 style in device. The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override. This patch was automatically generated with an OS=android build using a variation of https://codereview.chromium.org/598073004. BUG=417463 R=timvolodine@chromium.org Review URL: https://codereview.chromium.org/902973002 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#315079}
C
bsd-3-clause
chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,Chilledheart/chromium,hgl888/chromium-crosswalk,Chilledheart/chromium,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ltilve/chromium,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ltilve/chromium,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ltilve/chromium,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,Chilledheart/chromium,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,ltilve/chromium,Chilledheart/chromium,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ltilve/chromium,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,ltilve/chromium,ltilve/chromium,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,Chilledheart/chromium,chuan9/chromium-crosswalk,Just-D/chromium-1,Chilledheart/chromium
730f909e146b0ac5dbcf9b8be65cb8f82c68d883
test/CodeGen/x86_64-arguments.c
test/CodeGen/x86_64-arguments.c
// RUN: clang -triple x86_64-unknown-unknown -emit-llvm -o %t %s && // RUN: grep 'define signext i8 @f0()' %t && // RUN: grep 'define signext i16 @f1()' %t && // RUN: grep 'define i32 @f2()' %t && // RUN: grep 'define float @f3()' %t && // RUN: grep 'define double @f4()' %t && // RUN: grep 'define x86_fp80 @f5()' %t && // RUN: grep 'define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8\* %a4)' %t char f0(void) { } short f1(void) { } int f2(void) { } float f3(void) { } double f4(void) { } long double f5(void) { } void f6(char a0, short a1, int a2, long long a3, void *a4) { }
// RUN: clang -triple x86_64-unknown-unknown -emit-llvm -o %t %s && // RUN: grep 'define signext i8 @f0()' %t && // RUN: grep 'define signext i16 @f1()' %t && // RUN: grep 'define i32 @f2()' %t && // RUN: grep 'define float @f3()' %t && // RUN: grep 'define double @f4()' %t && // RUN: grep 'define x86_fp80 @f5()' %t && // RUN: grep 'define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8\* %a4)' %t && // RUN: grep 'define void @f7(i32 %a0)' %t char f0(void) { } short f1(void) { } int f2(void) { } float f3(void) { } double f4(void) { } long double f5(void) { } void f6(char a0, short a1, int a2, long long a3, void *a4) { } typedef enum { A, B, C } E; void f7(E a0) { }
Add test for enum types
Add test for enum types git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@65540 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-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,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
0fc6d355f3c7bcf56ce20d458d376098a6893884
views/controls/tabbed_pane/tabbed_pane_listener.h
views/controls/tabbed_pane/tabbed_pane_listener.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 VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_H_ #define VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_H_ #pragma once namespace views { // An interface implemented by an object to let it know that a tabbed pane was // selected by the user at the specified index. class TabbedPaneListener { public: // Called when the tab at |index| is selected by the user. virtual void TabSelectedAt(int index) = 0; }; } // namespace views #endif // VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_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 VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_H_ #define VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_H_ #pragma once namespace views { // An interface implemented by an object to let it know that a tabbed pane was // selected by the user at the specified index. class TabbedPaneListener { public: // Called when the tab at |index| is selected by the user. virtual void TabSelectedAt(int index) = 0; protected: virtual ~TabbedPaneListener() {} }; } // namespace views #endif // VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_H_
Add protected virtual destructor to TabbedPaneListener.
views: Add protected virtual destructor to TabbedPaneListener. The use of a protected virtual destructor is to prevent the destruction of a derived object via a base-class pointer. That's it, TabbedPaneListenere should only be deleted through derived class. Example: class FooListener { public: ... protected: virtual ~FooListener() {} }; class Foo : public FooListener { }; FooListener* listener = new Foo; delete listener; // It should prevent this situation! R=sky@chromium.org Review URL: http://codereview.chromium.org/8028030 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@102916 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
gavinp/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium
c304fe7966056ee3e246d69e9e330e048c21031c
support/main.c
support/main.c
/* * Mono managed-to-native support code. * * Author: * Joao Matos (joao.matos@xamarin.com) * * (C) 2016 Microsoft, Inc. * * 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 "mono_embeddinator.h" int main() { mono_m2n_context_t ctx; mono_m2n_init(&ctx, "mono_embeddinnator"); /* YOUR CODE HERE */ mono_m2n_destroy(&ctx); }
/* * Mono managed-to-native support code. * * Author: * Joao Matos (joao.matos@xamarin.com) * * (C) 2016 Microsoft, Inc. * * 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 "mono_embeddinator.h" int main() { mono_m2n_context_t ctx = {}; mono_m2n_init(&ctx, "mono_embeddinnator"); /* YOUR CODE HERE */ mono_m2n_destroy(&ctx); }
Initialize the local Mono context struct for deterministic behavior.
Initialize the local Mono context struct for deterministic behavior.
C
mit
jonathanpeppers/Embeddinator-4000,mono/Embeddinator-4000,mono/Embeddinator-4000,mono/Embeddinator-4000,mono/Embeddinator-4000,mono/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,mono/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,mono/Embeddinator-4000
95b99a670df31ca5271f503f378e5cac3aee8f5e
include/net/irda/irlan_filter.h
include/net/irda/irlan_filter.h
/********************************************************************* * * Filename: irlan_filter.h * Version: * Description: * Status: Experimental. * Author: Dag Brattli <dagb@cs.uit.no> * Created at: Fri Jan 29 15:24:08 1999 * Modified at: Sun Feb 7 23:35:31 1999 * Modified by: Dag Brattli <dagb@cs.uit.no> * * Copyright (c) 1998 Dag Brattli, All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * Neither Dag Brattli nor University of Troms admit liability nor * provide warranty for any of this software. This material is * provided "AS-IS" and at no charge. * ********************************************************************/ #ifndef IRLAN_FILTER_H #define IRLAN_FILTER_H void irlan_check_command_param(struct irlan_cb *self, char *param, char *value); void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb); void irlan_print_filter(struct seq_file *seq, int filter_type); #endif /* IRLAN_FILTER_H */
/********************************************************************* * * Filename: irlan_filter.h * Version: * Description: * Status: Experimental. * Author: Dag Brattli <dagb@cs.uit.no> * Created at: Fri Jan 29 15:24:08 1999 * Modified at: Sun Feb 7 23:35:31 1999 * Modified by: Dag Brattli <dagb@cs.uit.no> * * Copyright (c) 1998 Dag Brattli, All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * Neither Dag Brattli nor University of Troms admit liability nor * provide warranty for any of this software. This material is * provided "AS-IS" and at no charge. * ********************************************************************/ #ifndef IRLAN_FILTER_H #define IRLAN_FILTER_H void irlan_check_command_param(struct irlan_cb *self, char *param, char *value); void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb); #ifdef CONFIG_PROC_FS void irlan_print_filter(struct seq_file *seq, int filter_type); #endif #endif /* IRLAN_FILTER_H */
Fix compile warning when CONFIG_PROC_FS=n
[IRDA] irlan: Fix compile warning when CONFIG_PROC_FS=n include/net/irda/irlan_filter.h:31: warning: 'struct seq_file' declared inside parameter list include/net/irda/irlan_filter.h:31: warning: its scope is only this definition or declaration, which is probably not what you want Signed-off-by: Randy Dunlap <e1d10faa7e2a0c027bf1ff1d20e7fd10154be7ea@oracle.com> Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>
C
apache-2.0
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,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
d1adc4294f0b62951d24ac84f0d397fb0385bf07
src/rest_server/string_piece.h
src/rest_server/string_piece.h
// This file is part of MicroRestD <http://github.com/ufal/microrestd/>. // // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of // Mathematics and Physics, Charles University in Prague, Czech Republic. // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #pragma once #include <cstring> #include <string> namespace ufal { namespace microrestd { struct string_piece { const char* str; size_t len; string_piece() : str(nullptr), len(0) {} string_piece(const char* str) : str(str), len(strlen(str)) {} string_piece(const char* str, size_t len) : str(str), len(len) {} string_piece(const std::string& str) : str(str.c_str()), len(str.size()) {} }; } // namespace microrestd } // namespace ufal
// This file is part of MicroRestD <http://github.com/ufal/microrestd/>. // // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of // Mathematics and Physics, Charles University in Prague, Czech Republic. // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #pragma once #include <cstring> #include <string> namespace ufal { namespace microrestd { struct string_piece { const char* str; size_t len; string_piece() : str(nullptr), len(0) {} string_piece(const char* str) : str(str), len(str ? strlen(str) : 0) {} string_piece(const char* str, size_t len) : str(str), len(len) {} string_piece(const std::string& str) : str(str.c_str()), len(str.size()) {} }; } // namespace microrestd } // namespace ufal
Allow passing nullptr as only const char* argument.
Allow passing nullptr as only const char* argument.
C
mpl-2.0
ufal/microrestd,ufal/microrestd,ufal/microrestd,ufal/microrestd,ufal/microrestd
e1367466f6d7c816d29fd6c103af7875d9855f9b
LYPopView/Classes/LYPopView.h
LYPopView/Classes/LYPopView.h
// // LYPopView.h // LYPOPVIEW // // CREATED BY LUO YU ON 19/12/2016. // COPYRIGHT © 2016 LUO YU. ALL RIGHTS RESERVED. // #import <UIKit/UIKit.h> @interface LYPopView : UIView { CGFloat padding; CGFloat cornerRadius; CGFloat maxHeight; __weak UIView *vCont; } @property (nonatomic, strong) NSString *title; @property (nonatomic, assign) BOOL autoDismiss; - (void)show; - (NSDictionary *)configurations; @end
// // LYPopView.h // LYPOPVIEW // // CREATED BY LUO YU ON 19/12/2016. // COPYRIGHT © 2016 LUO YU. ALL RIGHTS RESERVED. // #import <UIKit/UIKit.h> @interface LYPopView : UIView { CGFloat padding; CGFloat cornerRadius; CGFloat maxHeight; __weak UIView *vCont; } @property (nonatomic, strong) NSString *title; @property (nonatomic, assign) BOOL autoDismiss; - (void)show; - (void)dismiss; - (NSDictionary *)configurations; @end
Modify : enable dismiss method
Modify : enable dismiss method
C
mit
blodely/LYPopView,blodely/LYPopView
dfdb3a90d41a8d784e39321f64f2c9cca2bbcfb3
proxygen/lib/utils/test/MockTime.h
proxygen/lib/utils/test/MockTime.h
/* * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #pragma once #include <glog/logging.h> #include <proxygen/lib/utils/Time.h> namespace proxygen { class MockTimeUtil : public TimeUtil { public: void advance(std::chrono::milliseconds ms) { t_ += ms; } void setCurrentTime(TimePoint t) { CHECK(t.time_since_epoch() > t_.time_since_epoch()) << "Time can not move backwards"; t_ = t; } void verifyAndClear() { } TimePoint now() const override { return t_; } private: TimePoint t_; }; }
/* * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #pragma once #include <glog/logging.h> #include <proxygen/lib/utils/Time.h> namespace proxygen { template <typename ClockType = std::chrono::steady_clock> class MockTimeUtilGeneric : public TimeUtilGeneric<ClockType> { public: void advance(std::chrono::milliseconds ms) { t_ += ms; } void setCurrentTime(std::chrono::time_point<ClockType> t) { CHECK(t.time_since_epoch() > t_.time_since_epoch()) << "Time can not move backwards"; t_ = t; } void verifyAndClear() { } std::chrono::time_point<ClockType> now() const override { return t_; } private: std::chrono::time_point<ClockType> t_; }; using MockTimeUtil = MockTimeUtilGeneric<>; }
Expire cached TLS session tickets using tlsext_tick_lifetime_hint
Expire cached TLS session tickets using tlsext_tick_lifetime_hint Summary: Our current TLS cache in liger does not respect timeout hints. We should start doing that because it will limit certain kinds of attacks if an attacker gets access to a master key. Test Plan: Added new test in SSLSessionPersistentCacheTest to test expiration Reviewed By: subodh@fb.com Subscribers: bmatheny, seanc, yfeldblum, devonharris FB internal diff: D2299744 Tasks: 7633098 Signature: t1:2299744:1439331830:9d0770149e49b6094ca61bac4e1e4ef16938c4dc
C
bsd-3-clause
LilMeyer/proxygen,songfj/proxygen,raphaelamorim/proxygen,raphaelamorim/proxygen,raphaelamorim/proxygen,KublaikhanGeek/proxygen,supriyantomaftuh/proxygen,hiproz/proxygen,pueril/proxygen,hongliangzhao/proxygen,raphaelamorim/proxygen,Werror/proxygen,chenmoshushi/proxygen,supriyantomaftuh/proxygen,hiproz/proxygen,jgli/proxygen,chenmoshushi/proxygen,Orvid/proxygen,chenmoshushi/proxygen,LilMeyer/proxygen,hnutank163/proxygen,zhiweicai/proxygen,songfj/proxygen,jgli/proxygen,KublaikhanGeek/proxygen,hiproz/proxygen,Werror/proxygen,songfj/proxygen,hongliangzhao/proxygen,zhiweicai/proxygen,pueril/proxygen,supriyantomaftuh/proxygen,Werror/proxygen,pueril/proxygen,zhiweicai/proxygen,Orvid/proxygen,hnutank163/proxygen,hiproz/proxygen,KublaikhanGeek/proxygen,jgli/proxygen,jgli/proxygen,hongliangzhao/proxygen,hnutank163/proxygen,fqihangf/proxygen,KublaikhanGeek/proxygen,chenmoshushi/proxygen,fqihangf/proxygen,fqihangf/proxygen,pueril/proxygen,supriyantomaftuh/proxygen,Orvid/proxygen,hongliangzhao/proxygen,zhiweicai/proxygen,LilMeyer/proxygen,Werror/proxygen,LilMeyer/proxygen,fqihangf/proxygen,Orvid/proxygen,songfj/proxygen,hnutank163/proxygen