after
stringlengths
72
2.11k
before
stringlengths
21
1.55k
diff
stringlengths
85
2.31k
instruction
stringlengths
20
1.71k
license
stringclasses
13 values
repos
stringlengths
7
82.6k
commit
stringlengths
40
40
#include <stdio.h> #include <stdlib.h> #include "chplcomm.h" #include "chplexit.h" #include "chplmem.h" #include "chplrt.h" #include "gdb.h" #undef exit static void _chpl_exit_common(int status, int all) { fflush(stdout); fflush(stderr); if (status != 0) { gdbShouldBreakHere(); } if (all) { _chpl_comm_barrier("_chpl_comm_exit_all"); exitChplThreads(); // tear down the threads _chpl_comm_exit_all(status); } else { _chpl_comm_exit_any(status); } exit(status); } void _chpl_exit_all(int status) { printFinalMemStat(0, 0); // print the final memory statistics _chpl_exit_common(status, 1); } void _chpl_exit_any(int status) { _chpl_exit_common(status, 0); }
#include <stdio.h> #include <stdlib.h> #include "chplcomm.h" #include "chplexit.h" #include "chplmem.h" #include "chplrt.h" #include "gdb.h" #undef exit static void _chpl_exit_common(int status, int all) { fflush(stdout); fflush(stderr); if (status != 0) { gdbShouldBreakHere(); } if (all) { exitChplThreads(); // tear down the threads } if (all) { _chpl_comm_barrier("_chpl_comm_exit_all"); _chpl_comm_exit_all(status); } else { _chpl_comm_exit_any(status); } exit(status); } void _chpl_exit_all(int status) { printFinalMemStat(0, 0); // print the final memory statistics _chpl_exit_common(status, 1); } void _chpl_exit_any(int status) { _chpl_exit_common(status, 0); }
--- +++ @@ -15,10 +15,8 @@ gdbShouldBreakHere(); } if (all) { + _chpl_comm_barrier("_chpl_comm_exit_all"); exitChplThreads(); // tear down the threads - } - if (all) { - _chpl_comm_barrier("_chpl_comm_exit_all"); _chpl_comm_exit_all(status); } else { _chpl_comm_exit_any(status);
Move a call to exitChplThreads() to after the final barrier When it was before the barrier, all nodes except 0 called it very early, but it should only be called at the very end of execution. git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@15138 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
apache-2.0
sungeunchoi/chapel,sungeunchoi/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,chizarlicious/chapel,chizarlicious/chapel,CoryMcCartan/chapel,CoryMcCartan/chapel,chizarlicious/chapel,hildeth/chapel,chizarlicious/chapel,sungeunchoi/chapel,sungeunchoi/chapel,chizarlicious/chapel,CoryMcCartan/chapel,hildeth/chapel,sungeunchoi/chapel,sungeunchoi/chapel,chizarlicious/chapel,sungeunchoi/chapel,hildeth/chapel,hildeth/chapel,CoryMcCartan/chapel,hildeth/chapel,CoryMcCartan/chapel,hildeth/chapel,CoryMcCartan/chapel,chizarlicious/chapel,hildeth/chapel
bb20ba06733ae80756392b75198de2b813bdd0eb
/* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org> * * GNU Library General Public License (LGPL) version 2 or later. * * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. */ #include "_stdio.h" link_warning(gets, "the 'gets' function is dangerous and should not be used.") /* UNSAFE FUNCTION -- do not bother optimizing */ libc_hidden_proto(getchar_unlocked) libc_hidden_proto(__fgetc_unlocked) #ifdef __STDIO_GETC_MACRO libc_hidden_proto(__stdin) #else #define __stdin stdin #endif char *gets(char *s) { register char *p = s; int c; __STDIO_AUTO_THREADLOCK_VAR; __STDIO_AUTO_THREADLOCK(stdin); /* Note: don't worry about performance here... this shouldn't be used! * Therefore, force actual function call. */ while (((c = getchar_unlocked()) != EOF) && ((*p = c) != '\n')) { ++p; } if ((c == EOF) || (s == p)) { s = NULL; } else { *p = 0; } __STDIO_AUTO_THREADUNLOCK(stdin); return s; }
/* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org> * * GNU Library General Public License (LGPL) version 2 or later. * * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. */ #include "_stdio.h" link_warning(gets, "the 'gets' function is dangerous and should not be used.") /* UNSAFE FUNCTION -- do not bother optimizing */ libc_hidden_proto(getchar_unlocked) libc_hidden_proto(__fgetc_unlocked) libc_hidden_proto(__stdin) char *gets(char *s) { register char *p = s; int c; __STDIO_AUTO_THREADLOCK_VAR; __STDIO_AUTO_THREADLOCK(stdin); /* Note: don't worry about performance here... this shouldn't be used! * Therefore, force actual function call. */ while (((c = getchar_unlocked()) != EOF) && ((*p = c) != '\n')) { ++p; } if ((c == EOF) || (s == p)) { s = NULL; } else { *p = 0; } __STDIO_AUTO_THREADUNLOCK(stdin); return s; }
--- +++ @@ -13,7 +13,11 @@ libc_hidden_proto(getchar_unlocked) libc_hidden_proto(__fgetc_unlocked) +#ifdef __STDIO_GETC_MACRO libc_hidden_proto(__stdin) +#else +#define __stdin stdin +#endif char *gets(char *s) {
Build if GETC_MACRO use is disabled
lgpl-2.1
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
f487686bba37f0a7a22f0f87d915b05115094948
//===--- OptSpecifier.h - Option Specifiers ---------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_OPTION_OPTSPECIFIER_H #define LLVM_OPTION_OPTSPECIFIER_H #include "llvm/Support/Compiler.h" namespace llvm { namespace opt { class Option; /// OptSpecifier - Wrapper class for abstracting references to option IDs. class OptSpecifier { unsigned ID; private: explicit OptSpecifier(bool) LLVM_DELETED_FUNCTION; public: OptSpecifier() : ID(0) {} /*implicit*/ OptSpecifier(unsigned _ID) : ID(_ID) {} /*implicit*/ OptSpecifier(const Option *Opt); bool isValid() const { return ID != 0; } unsigned getID() const { return ID; } bool operator==(OptSpecifier Opt) const { return ID == Opt.getID(); } bool operator!=(OptSpecifier Opt) const { return !(*this == Opt); } }; } } #endif
//===--- OptSpecifier.h - Option Specifiers ---------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_OPTION_OPTSPECIFIER_H #define LLVM_OPTION_OPTSPECIFIER_H namespace llvm { namespace opt { class Option; /// OptSpecifier - Wrapper class for abstracting references to option IDs. class OptSpecifier { unsigned ID; private: explicit OptSpecifier(bool) LLVM_DELETED_FUNCTION; public: OptSpecifier() : ID(0) {} /*implicit*/ OptSpecifier(unsigned _ID) : ID(_ID) {} /*implicit*/ OptSpecifier(const Option *Opt); bool isValid() const { return ID != 0; } unsigned getID() const { return ID; } bool operator==(OptSpecifier Opt) const { return ID == Opt.getID(); } bool operator!=(OptSpecifier Opt) const { return !(*this == Opt); } }; } } #endif
--- +++ @@ -9,6 +9,8 @@ #ifndef LLVM_OPTION_OPTSPECIFIER_H #define LLVM_OPTION_OPTSPECIFIER_H + +#include "llvm/Support/Compiler.h" namespace llvm { namespace opt {
Add missing include, found by modules build. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@207158 91177308-0d34-0410-b5e6-96231b3b80d8
bsd-2-clause
chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap
e434cc2a4d7de10c15ecf18ba27be5819e247910
/* * A solution to Exercise 1-12 in The C Programming Language (Second Edition). * * This file was written by Damien Dart <damiendart@pobox.com>. This is free * and unencumbered software released into the public domain. For more * information, please refer to the accompanying "UNLICENCE" file. */ #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> int main(void) { int16_t character = 0; bool in_whitespace = false; while ((character = getchar()) != EOF) { if ((character == ' ') || (character == '\t' || character == '\n')) { if (in_whitespace == false) { putchar('\n'); in_whitespace = true; } } else { putchar(character); in_whitespace = false; } } return EXIT_SUCCESS; }
/* * A solution to Exercise 1-12 in The C Programming Language (Second Edition). * * This file was written by Damien Dart <damiendart@pobox.com>. This is free * and unencumbered software released into the public domain. For more * information, please refer to the accompanying "UNLICENCE" file. */ #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> int main(void) { int16_t character = 0; bool in_whitespace = false; while ((character = getchar()) != EOF) { if ((character == ' ') || (character == '\t')) { if (in_whitespace == false) { putchar('\n'); in_whitespace = true; } } else { putchar(character); in_whitespace = false; } } return EXIT_SUCCESS; }
--- +++ @@ -16,7 +16,7 @@ int16_t character = 0; bool in_whitespace = false; while ((character = getchar()) != EOF) { - if ((character == ' ') || (character == '\t')) { + if ((character == ' ') || (character == '\t' || character == '\n')) { if (in_whitespace == false) { putchar('\n'); in_whitespace = true;
Fix solution to Exercise 1-12. Fix solution to Exercise 1-12 so that newline characters are processed correctly.
unlicense
damiendart/knr-solutions,damiendart/knr-solutions,damiendart/knr-solutions
57ca28bb8d019266a16ff18a87d71f12b59224b5
#import <CareKit/CareKit.h> typedef void(^CMHCareSaveCompletion)(NSString *_Nullable uploadStatus, NSError *_Nullable error); /** * This category adds properties and methods to the `OCKCarePlanEvent` class which * allow instances to be identified uniquely and saved to CloudMine's * HIPAA compliant Connected Health Cloud. */ @interface OCKCarePlanEvent (CMHealth) /** * The unique identifier assigned to this event based on its `OCKCarePlanActivity` * identifier, its schedule, and its days since start. * * @warning the CareKit component of this SDK is experimental and subject to change. Your * feedback is welcomed! */ @property (nonatomic, nonnull, readonly) NSString *cmh_objectId; /** * Save a representation of this `OCKCarePlanEvent` isntance to CloudMine. * The event is given a unique identifier based on its `OCKCarePlanActivity` identifier, * its schedule, and its days since start. Saving an event multiple times will update * the instance of that event on CloudMine. The callback will provide a string value * of `created` or `updated` if the operation was successful. * * @warning the CareKit component of this SDK is experimental and subject to change. Your * feedback is welcomed! * * @param block Executes when the request completes successfully or fails with an error. */ - (void)cmh_saveWithCompletion:(_Nullable CMHCareSaveCompletion)block; @end
#import <CareKit/CareKit.h> typedef void(^CMHCareSaveCompletion)(NSString *_Nullable uploadStatus, NSError *_Nullable error); @interface OCKCarePlanEvent (CMHealth) @property (nonatomic, nonnull, readonly) NSString *cmh_objectId; - (void)cmh_saveWithCompletion:(_Nullable CMHCareSaveCompletion)block; @end
--- +++ @@ -2,9 +2,34 @@ typedef void(^CMHCareSaveCompletion)(NSString *_Nullable uploadStatus, NSError *_Nullable error); +/** + * This category adds properties and methods to the `OCKCarePlanEvent` class which + * allow instances to be identified uniquely and saved to CloudMine's + * HIPAA compliant Connected Health Cloud. + */ @interface OCKCarePlanEvent (CMHealth) +/** + * The unique identifier assigned to this event based on its `OCKCarePlanActivity` + * identifier, its schedule, and its days since start. + * + * @warning the CareKit component of this SDK is experimental and subject to change. Your + * feedback is welcomed! + */ @property (nonatomic, nonnull, readonly) NSString *cmh_objectId; + +/** + * Save a representation of this `OCKCarePlanEvent` isntance to CloudMine. + * The event is given a unique identifier based on its `OCKCarePlanActivity` identifier, + * its schedule, and its days since start. Saving an event multiple times will update + * the instance of that event on CloudMine. The callback will provide a string value + * of `created` or `updated` if the operation was successful. + * + * @warning the CareKit component of this SDK is experimental and subject to change. Your + * feedback is welcomed! + * + * @param block Executes when the request completes successfully or fails with an error. + */ - (void)cmh_saveWithCompletion:(_Nullable CMHCareSaveCompletion)block; @end
Add appledoc header comments to the 'OCKCarePlanEvent' class
mit
cloudmine/CMHealthSDK-iOS,cloudmine/CMHealthSDK-iOS,cloudmine/CMHealthSDK
0a7fe1761cdb101263afa617fd31c3cef357ad40
/** * cpuid.c * * Checks if CPU has support of SHA instructions * * @author kryukov@frtk.ru * @version 4.0 * * For Putty AES NI project * http://putty-aes-ni.googlecode.com/ */ #ifndef SILENT #include <stdio.h> #endif #if defined(__clang__) || defined(__GNUC__) #include <cpuid.h> static int CheckCPUsupportSHA() { unsigned int CPUInfo[4]; __cpuid(0, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3]); if (CPUInfo[0] < 7) return 0; __cpuid_count(7, 0, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3]); return CPUInfo[1] & (1 << 29); /* Check SHA */ } #else /* defined(__clang__) || defined(__GNUC__) */ static int CheckCPUsupportSHA() { unsigned int CPUInfo[4]; __cpuid(CPUInfo, 0); if (CPUInfo[0] < 7) return 0; __cpuidex(CPUInfo, 7, 0); return CPUInfo[1] & (1 << 29); /* Check SHA */ } #endif /* defined(__clang__) || defined(__GNUC__) */ int main(int argc, char ** argv) { const int res = !CheckCPUsupportSHA(); #ifndef SILENT printf("This CPU %s SHA-NI\n", res ? "does not support" : "supports"); #endif return res; }
/** * cpuid.c * * Checks if CPU has support of SHA instructions * * @author kryukov@frtk.ru * @version 4.0 * * For Putty AES NI project * http://putty-aes-ni.googlecode.com/ */ #ifndef SILENT #include <stdio.h> #endif #if defined(__clang__) || defined(__GNUC__) #include <cpuid.h> static int CheckCPUsupportSHA() { unsigned int CPUInfo[4]; __cpuid_count(7, 0, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3]); return CPUInfo[1] & (1 << 29); /* Check SHA */ } #else /* defined(__clang__) || defined(__GNUC__) */ static int CheckCPUsupportSHA() { unsigned int CPUInfo[4]; __cpuidex(CPUInfo, 7, 0); return CPUInfo[1] & (1 << 29); /* Check SHA */ } #endif /* defined(__clang__) || defined(__GNUC__) */ int main(int argc, char ** argv) { const int res = !CheckCPUsupportSHA(); #ifndef SILENT printf("This CPU %s SHA-NI\n", res ? "does not support" : "supports"); #endif return res; }
--- +++ @@ -20,6 +20,10 @@ static int CheckCPUsupportSHA() { unsigned int CPUInfo[4]; + __cpuid(0, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3]); + if (CPUInfo[0] < 7) + return 0; + __cpuid_count(7, 0, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3]); return CPUInfo[1] & (1 << 29); /* Check SHA */ } @@ -29,6 +33,10 @@ static int CheckCPUsupportSHA() { unsigned int CPUInfo[4]; + __cpuid(CPUInfo, 0); + if (CPUInfo[0] < 7) + return 0; + __cpuidex(CPUInfo, 7, 0); return CPUInfo[1] & (1 << 29); /* Check SHA */ }
Add leaf checks to SHA CPUID checks
mit
pavelkryukov/putty-aes-ni,pavelkryukov/putty-aes-ni
4263a8238353aeef9721f826c5b6c55d81ddca1f
#ifndef _ASM_POWERPC_CODE_PATCHING_H #define _ASM_POWERPC_CODE_PATCHING_H /* * Copyright 2008, Michael Ellerman, IBM Corporation. * * 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. */ #include <asm/types.h> /* Flags for create_branch: * "b" == create_branch(addr, target, 0); * "ba" == create_branch(addr, target, BRANCH_ABSOLUTE); * "bl" == create_branch(addr, target, BRANCH_SET_LINK); * "bla" == create_branch(addr, target, BRANCH_ABSOLUTE | BRANCH_SET_LINK); */ #define BRANCH_SET_LINK 0x1 #define BRANCH_ABSOLUTE 0x2 unsigned int create_branch(const unsigned int *addr, unsigned long target, int flags); void patch_branch(unsigned int *addr, unsigned long target, int flags); void patch_instruction(unsigned int *addr, unsigned int instr); static inline unsigned long ppc_function_entry(void *func) { #ifdef CONFIG_PPC64 /* * On PPC64 the function pointer actually points to the function's * descriptor. The first entry in the descriptor is the address * of the function text. */ return ((func_descr_t *)func)->entry; #else return (unsigned long)func; #endif } #endif /* _ASM_POWERPC_CODE_PATCHING_H */
#ifndef _ASM_POWERPC_CODE_PATCHING_H #define _ASM_POWERPC_CODE_PATCHING_H /* * Copyright 2008, Michael Ellerman, IBM Corporation. * * 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. */ /* Flags for create_branch: * "b" == create_branch(addr, target, 0); * "ba" == create_branch(addr, target, BRANCH_ABSOLUTE); * "bl" == create_branch(addr, target, BRANCH_SET_LINK); * "bla" == create_branch(addr, target, BRANCH_ABSOLUTE | BRANCH_SET_LINK); */ #define BRANCH_SET_LINK 0x1 #define BRANCH_ABSOLUTE 0x2 unsigned int create_branch(const unsigned int *addr, unsigned long target, int flags); void patch_branch(unsigned int *addr, unsigned long target, int flags); void patch_instruction(unsigned int *addr, unsigned int instr); #endif /* _ASM_POWERPC_CODE_PATCHING_H */
--- +++ @@ -9,6 +9,8 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ + +#include <asm/types.h> /* Flags for create_branch: * "b" == create_branch(addr, target, 0); @@ -24,4 +26,18 @@ void patch_branch(unsigned int *addr, unsigned long target, int flags); void patch_instruction(unsigned int *addr, unsigned int instr); +static inline unsigned long ppc_function_entry(void *func) +{ +#ifdef CONFIG_PPC64 + /* + * On PPC64 the function pointer actually points to the function's + * descriptor. The first entry in the descriptor is the address + * of the function text. + */ + return ((func_descr_t *)func)->entry; +#else + return (unsigned long)func; +#endif +} + #endif /* _ASM_POWERPC_CODE_PATCHING_H */
powerpc: Add ppc_function_entry() which gets the entry point for a function Because function pointers point to different things on 32-bit vs 64-bit, add a macro that deals with dereferencing the OPD on 64-bit. The soon to be merged ftrace wants this, as well as other code I am working on. Signed-off-by: Michael Ellerman <17b9e1c64588c7fa6419b4d29dc1f4426279ba01@ellerman.id.au> Acked-by: Kumar Gala <383ef5577c6e1178b93f59ec8d0936f76d2a98c4@kernel.crashing.org> Signed-off-by: Paul Mackerras <19a0ba370c443ba08d20b5061586430ab449ee8c@samba.org>
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs
07630a37beefe8e4401c602f04e3e5bcbba50b31
/** * Touhou Community Reliant Automatic Patcher * Main DLL * * ---- * * Logging functions. * Log to both a file and, if requested, an on-screen console. * * As of now, we do not enforce char strings to be in UTF-8. */ #pragma once /// --------------- /// Standard output /// --------------- // Basic void log_print(const char *text); // Specific length void log_nprint(const char *text, size_t n); // Formatted void log_vprintf(const char *text, va_list va); void log_printf(const char *text, ...); #ifdef _MSC_VER # define log_func_printf(text, ...) \ log_printf("["__FUNCTION__"]: "text, __VA_ARGS__) #else # define log_func_printf(text, ...) \ log_printf("[%s]: "text, __func__, ##__VA_ARGS__) #endif /// --------------- /// ------------- /// Message boxes // Technically not a "logging function", but hey, it has variable arguments. /// ------------- // Basic int log_mbox(const char *caption, const UINT type, const char *text); // Formatted int log_vmboxf(const char *caption, const UINT type, const char *text, va_list va); int log_mboxf(const char *caption, const UINT type, const char *text, ...); /// ------------- void log_init(int console); void log_exit(void);
/** * Touhou Community Reliant Automatic Patcher * Main DLL * * ---- * * Logging functions. * Log to both a file and, if requested, an on-screen console. * * As of now, we do not enforce char strings to be in UTF-8. */ #pragma once /// --------------- /// Standard output /// --------------- // Basic void log_print(const char *text); // Specific length void log_nprint(const char *text, size_t n); // Formatted void log_vprintf(const char *text, va_list va); void log_printf(const char *text, ...); #define log_func_printf(text, ...) \ log_printf("["__FUNCTION__"]: "##text, __VA_ARGS__) /// --------------- /// ------------- /// Message boxes // Technically not a "logging function", but hey, it has variable arguments. /// ------------- // Basic int log_mbox(const char *caption, const UINT type, const char *text); // Formatted int log_vmboxf(const char *caption, const UINT type, const char *text, va_list va); int log_mboxf(const char *caption, const UINT type, const char *text, ...); /// ------------- void log_init(int console); void log_exit(void);
--- +++ @@ -23,8 +23,13 @@ void log_vprintf(const char *text, va_list va); void log_printf(const char *text, ...); -#define log_func_printf(text, ...) \ - log_printf("["__FUNCTION__"]: "##text, __VA_ARGS__) +#ifdef _MSC_VER +# define log_func_printf(text, ...) \ + log_printf("["__FUNCTION__"]: "text, __VA_ARGS__) +#else +# define log_func_printf(text, ...) \ + log_printf("[%s]: "text, __func__, ##__VA_ARGS__) +#endif /// --------------- /// -------------
Use C99 __func__ instead of __FUNCTION__ when not compiling with Visual C++. Couldn't they standardize __FUNCTION__ instead? A string literal that can be concatenated with other string literals is much more flexible than a char[] variable.
unlicense
thpatch/thcrap,thpatch/thcrap,thpatch/thcrap,thpatch/thcrap,thpatch/thcrap
c03ade8e87b3848bbb1d30d6e8a09633fbe22a7c
#include <cgreen/slurp.h> #include <stdlib.h> #include <stdio.h> #include <strings.h> static char *read_all(FILE *file, int gulp); char *slurp(const char *file_name, int gulp) { FILE *file = fopen(file_name, "r"); if (file == NULL) { return NULL; } char *content = read_all(file, gulp); fclose(file); return content; } static char *read_all(FILE *file, int gulp) { char *content = (char *)malloc(0); int sblock = (gulp + 1) * sizeof(char); char *block = (char *)malloc(sblock); int len = 0; int add = 0; char *p; for ( ; ; ) { if (fgets(block, sblock, file) == NULL) { break; } len = strlen(block); add += len; p = (char *)realloc(content, add + 1); if (p == NULL) { exit(1); } content = p; strncat(content, block, len); } content[add + 1] = '\0'; free(block); return content; }
#include <cgreen/slurp.h> #include <stdlib.h> #include <stdio.h> static char *read_all(FILE *file, int gulp); char *slurp(const char *file_name, int gulp) { FILE *file = fopen(file_name, "r"); if (file == NULL) { return NULL; } char *content = read_all(file, gulp); fclose(file); return content; } static char *read_all(FILE *file, int gulp) { char *content = (char *)malloc((gulp + 1) * sizeof(char)); char *block = content; for ( ; ; ) { if (fgets(block, gulp + 1, file) == NULL) { break; } block += gulp; content = (char *)realloc(content, (block - content + 1) * sizeof(char)); } return content; }
--- +++ @@ -1,6 +1,7 @@ #include <cgreen/slurp.h> #include <stdlib.h> #include <stdio.h> +#include <strings.h> static char *read_all(FILE *file, int gulp); @@ -15,14 +16,30 @@ } static char *read_all(FILE *file, int gulp) { - char *content = (char *)malloc((gulp + 1) * sizeof(char)); - char *block = content; + char *content = (char *)malloc(0); + int sblock = (gulp + 1) * sizeof(char); + char *block = (char *)malloc(sblock); + int len = 0; + int add = 0; + char *p; for ( ; ; ) { - if (fgets(block, gulp + 1, file) == NULL) { + if (fgets(block, sblock, file) == NULL) { break; } - block += gulp; - content = (char *)realloc(content, (block - content + 1) * sizeof(char)); + + len = strlen(block); + add += len; + + p = (char *)realloc(content, add + 1); + if (p == NULL) { + exit(1); + } + content = p; + + strncat(content, block, len); } + content[add + 1] = '\0'; + free(block); return content; } +
Fix read_all and return content without segment fault
isc
matthargett/cgreen,gardenia/cgreen,matthargett/cgreen,cgreen-devs/cgreen,gardenia/cgreen,gardenia/cgreen,cgreen-devs/cgreen,cgreen-devs/cgreen,matthargett/cgreen,thoni56/cgreen,gardenia/cgreen,matthargett/cgreen,ykaliuta/cgreen,thoni56/cgreen,cgreen-devs/cgreen,thoni56/cgreen,thoni56/cgreen,ykaliuta/cgreen,ykaliuta/cgreen,cgreen-devs/cgreen,thoni56/cgreen,ykaliuta/cgreen,gardenia/cgreen,matthargett/cgreen,ykaliuta/cgreen
3e7ab39853701277f637eed91630b4b152212d26
#include <errno.h> #include <asm/ptrace.h> #include <sys/syscall.h> int ptrace(int request, int pid, int addr, int data) { long ret; long res; if (request > 0 && request < 4) data = (int)&ret; __asm__ volatile ("movel %1,%/d0\n\t" "movel %2,%/d1\n\t" "movel %3,%/d2\n\t" "movel %4,%/d3\n\t" "movel %5,%/d4\n\t" "trap #0\n\t" "movel %/d0,%0" :"=g" (res) :"i" (__NR_ptrace), "g" (request), "g" (pid), "g" (addr), "g" (data) : "%d0", "%d1", "%d2", "%d3", "%d4"); if (res >= 0) { if (request > 0 && request < 4) { __set_errno(0); return (ret); } return (int) res; } __set_errno(-res); return -1; }
#include <errno.h> #include <asm/ptrace.h> #include <sys/syscall.h> int ptrace(int request, int pid, int addr, int data) { long ret; long res; if (request > 0 && request < 4) (long *)data = &ret; __asm__ volatile ("movel %1,%/d0\n\t" "movel %2,%/d1\n\t" "movel %3,%/d2\n\t" "movel %4,%/d3\n\t" "movel %5,%/d4\n\t" "trap #0\n\t" "movel %/d0,%0" :"=g" (res) :"i" (__NR_ptrace), "g" (request), "g" (pid), "g" (addr), "g" (data) : "%d0", "%d1", "%d2", "%d3", "%d4"); if (res >= 0) { if (request > 0 && request < 4) { __set_errno(0); return (ret); } return (int) res; } __set_errno(-res); return -1; }
--- +++ @@ -8,7 +8,8 @@ { long ret; long res; - if (request > 0 && request < 4) (long *)data = &ret; + if (request > 0 && request < 4) data = (int)&ret; + __asm__ volatile ("movel %1,%/d0\n\t" "movel %2,%/d1\n\t"
Patch from Bernardo Innocenti: Remove use of cast-as-l-value extension, removed in GCC 3.5.
lgpl-2.1
kraj/uClibc,ysat0/uClibc,majek/uclibc-vx32,atgreen/uClibc-moxie,ffainelli/uClibc,skristiansson/uClibc-or1k,ddcc/klee-uclibc-0.9.33.2,groundwater/uClibc,skristiansson/uClibc-or1k,wbx-github/uclibc-ng,ChickenRunjyd/klee-uclibc,hjl-tools/uClibc,OpenInkpot-archive/iplinux-uclibc,ysat0/uClibc,czankel/xtensa-uclibc,kraj/uClibc,ChickenRunjyd/klee-uclibc,brgl/uclibc-ng,klee/klee-uclibc,hjl-tools/uClibc,hwoarang/uClibc,wbx-github/uclibc-ng,czankel/xtensa-uclibc,ChickenRunjyd/klee-uclibc,skristiansson/uClibc-or1k,ndmsystems/uClibc,foss-xtensa/uClibc,foss-xtensa/uClibc,hjl-tools/uClibc,brgl/uclibc-ng,waweber/uclibc-clang,hwoarang/uClibc,foss-xtensa/uClibc,groundwater/uClibc,ndmsystems/uClibc,hjl-tools/uClibc,ysat0/uClibc,hwoarang/uClibc,hwoarang/uClibc,brgl/uclibc-ng,gittup/uClibc,kraj/uclibc-ng,OpenInkpot-archive/iplinux-uclibc,ndmsystems/uClibc,majek/uclibc-vx32,OpenInkpot-archive/iplinux-uclibc,mephi42/uClibc,ffainelli/uClibc,ndmsystems/uClibc,waweber/uclibc-clang,wbx-github/uclibc-ng,wbx-github/uclibc-ng,klee/klee-uclibc,gittup/uClibc,ddcc/klee-uclibc-0.9.33.2,OpenInkpot-archive/iplinux-uclibc,kraj/uclibc-ng,foss-for-synopsys-dwc-arc-processors/uClibc,klee/klee-uclibc,czankel/xtensa-uclibc,foss-for-synopsys-dwc-arc-processors/uClibc,m-labs/uclibc-lm32,gittup/uClibc,skristiansson/uClibc-or1k,groundwater/uClibc,kraj/uClibc,m-labs/uclibc-lm32,kraj/uClibc,groundwater/uClibc,groundwater/uClibc,kraj/uclibc-ng,mephi42/uClibc,klee/klee-uclibc,atgreen/uClibc-moxie,brgl/uclibc-ng,mephi42/uClibc,waweber/uclibc-clang,ysat0/uClibc,foss-xtensa/uClibc,ffainelli/uClibc,kraj/uclibc-ng,atgreen/uClibc-moxie,ddcc/klee-uclibc-0.9.33.2,foss-for-synopsys-dwc-arc-processors/uClibc,ffainelli/uClibc,waweber/uclibc-clang,czankel/xtensa-uclibc,m-labs/uclibc-lm32,ChickenRunjyd/klee-uclibc,majek/uclibc-vx32,foss-for-synopsys-dwc-arc-processors/uClibc,ffainelli/uClibc,hjl-tools/uClibc,atgreen/uClibc-moxie,gittup/uClibc,majek/uclibc-vx32,m-labs/uclibc-lm32,ddcc/klee-uclibc-0.9.33.2,mephi42/uClibc
b3e4a879a534add27e8435b11628d4d79d706434
//===----------------------------- config.h -------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // // // Defines macros used within the libc++abi project. // //===----------------------------------------------------------------------===// #ifndef LIBCXXABI_CONFIG_H #define LIBCXXABI_CONFIG_H #include <unistd.h> #if !defined(LIBCXXABI_SINGLE_THREADED) && \ defined(_POSIX_THREADS) && _POSIX_THREADS > 0 # define LIBCXXABI_SINGLE_THREADED 0 #else # define LIBCXXABI_SINGLE_THREADED 1 #endif // Set this in the CXXFLAGS when you need it, because otherwise we'd have to // #if !defined(__linux__) && !defined(__APPLE__) && ... // and so-on for *every* platform. #ifndef LIBCXXABI_BAREMETAL # define LIBCXXABI_BAREMETAL 0 #endif #endif // LIBCXXABI_CONFIG_H
//===----------------------------- config.h -------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // // // Defines macros used within the libc++abi project. // //===----------------------------------------------------------------------===// #ifndef LIBCXXABI_CONFIG_H #define LIBCXXABI_CONFIG_H #include <unistd.h> #if defined(_POSIX_THREADS) && _POSIX_THREADS > 0 # define LIBCXXABI_SINGLE_THREADED 0 #else # define LIBCXXABI_SINGLE_THREADED 1 #endif // Set this in the CXXFLAGS when you need it, because otherwise we'd have to // #if !defined(__linux__) && !defined(__APPLE__) && ... // and so-on for *every* platform. #ifndef LIBCXXABI_BAREMETAL # define LIBCXXABI_BAREMETAL 0 #endif #endif // LIBCXXABI_CONFIG_H
--- +++ @@ -16,7 +16,8 @@ #include <unistd.h> -#if defined(_POSIX_THREADS) && _POSIX_THREADS > 0 +#if !defined(LIBCXXABI_SINGLE_THREADED) && \ + defined(_POSIX_THREADS) && _POSIX_THREADS > 0 # define LIBCXXABI_SINGLE_THREADED 0 #else # define LIBCXXABI_SINGLE_THREADED 1
Allow LIBCXXABI_SINGLE_THREADED to be defined by build scripts git-svn-id: 6a9f6578bdee8d959f0ed58970538b4ab6004734@216952 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi
a69d4d917316e4123ec6510845d21ae53b3ecf45
#ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class TPython; #endif
#ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ function TPython::Exec; #pragma link C++ function TPython::Eval; #pragma link C++ function TPython::Bind; #pragma link C++ function TPython::Prompt; #endif
--- +++ @@ -4,9 +4,6 @@ #pragma link off all classes; #pragma link off all functions; -#pragma link C++ function TPython::Exec; -#pragma link C++ function TPython::Eval; -#pragma link C++ function TPython::Bind; -#pragma link C++ function TPython::Prompt; +#pragma link C++ class TPython; #endif
Declare the class TPython instead of the static functions. With this change, make map will add TPython in system.rootmap and it is possible to do directly root > TPython::Prompt() git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@9107 27541ba8-7e3a-0410-8455-c3a389f83636
lgpl-2.1
Dr15Jones/root,vukasinmilosevic/root,gganis/root,simonpf/root,mkret2/root,pspe/root,alexschlueter/cern-root,veprbl/root,Y--/root,vukasinmilosevic/root,gbitzes/root,beniz/root,zzxuanyuan/root-compressor-dummy,davidlt/root,simonpf/root,sirinath/root,nilqed/root,root-mirror/root,sbinet/cxx-root,jrtomps/root,arch1tect0r/root,abhinavmoudgil95/root,esakellari/my_root_for_test,cxx-hep/root-cern,simonpf/root,beniz/root,smarinac/root,perovic/root,davidlt/root,zzxuanyuan/root-compressor-dummy,bbockelm/root,Y--/root,karies/root,mhuwiler/rootauto,buuck/root,strykejern/TTreeReader,sbinet/cxx-root,sirinath/root,BerserkerTroll/root,mkret2/root,Y--/root,Dr15Jones/root,mattkretz/root,lgiommi/root,gbitzes/root,0x0all/ROOT,lgiommi/root,abhinavmoudgil95/root,krafczyk/root,tc3t/qoot,beniz/root,pspe/root,omazapa/root,lgiommi/root,sawenzel/root,strykejern/TTreeReader,karies/root,evgeny-boger/root,pspe/root,mkret2/root,nilqed/root,thomaskeck/root,jrtomps/root,sbinet/cxx-root,ffurano/root5,georgtroska/root,dfunke/root,tc3t/qoot,BerserkerTroll/root,nilqed/root,georgtroska/root,davidlt/root,kirbyherm/root-r-tools,gganis/root,zzxuanyuan/root,tc3t/qoot,gbitzes/root,nilqed/root,perovic/root,root-mirror/root,mkret2/root,beniz/root,agarciamontoro/root,evgeny-boger/root,mkret2/root,krafczyk/root,Duraznos/root,abhinavmoudgil95/root,esakellari/my_root_for_test,satyarth934/root,krafczyk/root,cxx-hep/root-cern,georgtroska/root,0x0all/ROOT,sirinath/root,davidlt/root,root-mirror/root,dfunke/root,nilqed/root,alexschlueter/cern-root,Duraznos/root,dfunke/root,evgeny-boger/root,lgiommi/root,zzxuanyuan/root,cxx-hep/root-cern,lgiommi/root,evgeny-boger/root,cxx-hep/root-cern,jrtomps/root,abhinavmoudgil95/root,krafczyk/root,ffurano/root5,arch1tect0r/root,beniz/root,zzxuanyuan/root,nilqed/root,smarinac/root,arch1tect0r/root,nilqed/root,abhinavmoudgil95/root,jrtomps/root,Y--/root,georgtroska/root,ffurano/root5,mkret2/root,mattkretz/root,olifre/root,bbockelm/root,krafczyk/root,pspe/root,agarciamontoro/root,CristinaCristescu/root,gbitzes/root,sbinet/cxx-root,jrtomps/root,zzxuanyuan/root-compressor-dummy,satyarth934/root,sawenzel/root,sbinet/cxx-root,mkret2/root,0x0all/ROOT,vukasinmilosevic/root,cxx-hep/root-cern,Duraznos/root,zzxuanyuan/root-compressor-dummy,simonpf/root,karies/root,perovic/root,agarciamontoro/root,evgeny-boger/root,Duraznos/root,simonpf/root,ffurano/root5,tc3t/qoot,jrtomps/root,mattkretz/root,sbinet/cxx-root,georgtroska/root,0x0all/ROOT,nilqed/root,sawenzel/root,vukasinmilosevic/root,buuck/root,mattkretz/root,abhinavmoudgil95/root,karies/root,zzxuanyuan/root-compressor-dummy,Duraznos/root,vukasinmilosevic/root,gbitzes/root,olifre/root,CristinaCristescu/root,BerserkerTroll/root,alexschlueter/cern-root,veprbl/root,mhuwiler/rootauto,olifre/root,kirbyherm/root-r-tools,omazapa/root-old,vukasinmilosevic/root,sawenzel/root,esakellari/my_root_for_test,gbitzes/root,gbitzes/root,abhinavmoudgil95/root,bbockelm/root,ffurano/root5,mkret2/root,mattkretz/root,nilqed/root,Duraznos/root,vukasinmilosevic/root,esakellari/root,lgiommi/root,davidlt/root,sirinath/root,evgeny-boger/root,jrtomps/root,0x0all/ROOT,zzxuanyuan/root,beniz/root,Y--/root,strykejern/TTreeReader,evgeny-boger/root,smarinac/root,arch1tect0r/root,thomaskeck/root,gganis/root,alexschlueter/cern-root,tc3t/qoot,satyarth934/root,Duraznos/root,vukasinmilosevic/root,olifre/root,satyarth934/root,mattkretz/root,gbitzes/root,sbinet/cxx-root,jrtomps/root,mhuwiler/rootauto,alexschlueter/cern-root,davidlt/root,cxx-hep/root-cern,perovic/root,agarciamontoro/root,zzxuanyuan/root-compressor-dummy,veprbl/root,sawenzel/root,root-mirror/root,gganis/root,buuck/root,karies/root,omazapa/root-old,thomaskeck/root,esakellari/root,omazapa/root-old,root-mirror/root,root-mirror/root,sawenzel/root,perovic/root,satyarth934/root,esakellari/my_root_for_test,satyarth934/root,esakellari/root,simonpf/root,perovic/root,CristinaCristescu/root,sawenzel/root,BerserkerTroll/root,zzxuanyuan/root,simonpf/root,krafczyk/root,sawenzel/root,georgtroska/root,veprbl/root,CristinaCristescu/root,jrtomps/root,CristinaCristescu/root,arch1tect0r/root,dfunke/root,Y--/root,georgtroska/root,omazapa/root,CristinaCristescu/root,omazapa/root,karies/root,georgtroska/root,omazapa/root,zzxuanyuan/root,veprbl/root,sirinath/root,Dr15Jones/root,agarciamontoro/root,buuck/root,esakellari/root,lgiommi/root,tc3t/qoot,root-mirror/root,kirbyherm/root-r-tools,thomaskeck/root,beniz/root,mhuwiler/rootauto,omazapa/root-old,CristinaCristescu/root,ffurano/root5,agarciamontoro/root,krafczyk/root,smarinac/root,gganis/root,zzxuanyuan/root-compressor-dummy,gbitzes/root,ffurano/root5,arch1tect0r/root,evgeny-boger/root,simonpf/root,Duraznos/root,vukasinmilosevic/root,Dr15Jones/root,Duraznos/root,gganis/root,sirinath/root,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root,esakellari/root,veprbl/root,evgeny-boger/root,zzxuanyuan/root-compressor-dummy,arch1tect0r/root,agarciamontoro/root,abhinavmoudgil95/root,root-mirror/root,bbockelm/root,perovic/root,pspe/root,veprbl/root,georgtroska/root,tc3t/qoot,bbockelm/root,sirinath/root,veprbl/root,sawenzel/root,thomaskeck/root,Duraznos/root,agarciamontoro/root,karies/root,BerserkerTroll/root,beniz/root,gganis/root,dfunke/root,omazapa/root,CristinaCristescu/root,omazapa/root-old,sirinath/root,vukasinmilosevic/root,mkret2/root,mkret2/root,jrtomps/root,krafczyk/root,zzxuanyuan/root-compressor-dummy,davidlt/root,dfunke/root,Y--/root,zzxuanyuan/root,krafczyk/root,olifre/root,mattkretz/root,arch1tect0r/root,omazapa/root,strykejern/TTreeReader,thomaskeck/root,BerserkerTroll/root,cxx-hep/root-cern,olifre/root,esakellari/my_root_for_test,vukasinmilosevic/root,esakellari/root,BerserkerTroll/root,tc3t/qoot,CristinaCristescu/root,nilqed/root,gganis/root,perovic/root,zzxuanyuan/root,thomaskeck/root,esakellari/root,omazapa/root,omazapa/root,abhinavmoudgil95/root,CristinaCristescu/root,kirbyherm/root-r-tools,omazapa/root-old,buuck/root,dfunke/root,esakellari/root,BerserkerTroll/root,bbockelm/root,root-mirror/root,satyarth934/root,omazapa/root,davidlt/root,esakellari/root,karies/root,0x0all/ROOT,Y--/root,buuck/root,bbockelm/root,omazapa/root-old,buuck/root,mattkretz/root,Dr15Jones/root,agarciamontoro/root,karies/root,nilqed/root,sirinath/root,pspe/root,mhuwiler/rootauto,0x0all/ROOT,bbockelm/root,perovic/root,georgtroska/root,strykejern/TTreeReader,lgiommi/root,alexschlueter/cern-root,buuck/root,0x0all/ROOT,beniz/root,agarciamontoro/root,olifre/root,davidlt/root,gganis/root,krafczyk/root,mhuwiler/rootauto,satyarth934/root,buuck/root,thomaskeck/root,davidlt/root,sawenzel/root,mattkretz/root,Y--/root,arch1tect0r/root,kirbyherm/root-r-tools,olifre/root,satyarth934/root,pspe/root,bbockelm/root,simonpf/root,krafczyk/root,lgiommi/root,zzxuanyuan/root,zzxuanyuan/root-compressor-dummy,smarinac/root,sbinet/cxx-root,zzxuanyuan/root,dfunke/root,mattkretz/root,bbockelm/root,esakellari/root,omazapa/root,veprbl/root,gganis/root,sbinet/cxx-root,smarinac/root,evgeny-boger/root,thomaskeck/root,sbinet/cxx-root,veprbl/root,tc3t/qoot,omazapa/root,dfunke/root,esakellari/my_root_for_test,omazapa/root-old,esakellari/my_root_for_test,root-mirror/root,esakellari/my_root_for_test,satyarth934/root,CristinaCristescu/root,abhinavmoudgil95/root,dfunke/root,alexschlueter/cern-root,Y--/root,omazapa/root-old,esakellari/my_root_for_test,omazapa/root-old,buuck/root,davidlt/root,arch1tect0r/root,gbitzes/root,sirinath/root,BerserkerTroll/root,smarinac/root,mkret2/root,gbitzes/root,beniz/root,evgeny-boger/root,veprbl/root,smarinac/root,root-mirror/root,agarciamontoro/root,beniz/root,kirbyherm/root-r-tools,mattkretz/root,cxx-hep/root-cern,buuck/root,0x0all/ROOT,sawenzel/root,mhuwiler/rootauto,zzxuanyuan/root,lgiommi/root,jrtomps/root,sirinath/root,simonpf/root,tc3t/qoot,dfunke/root,strykejern/TTreeReader,olifre/root,abhinavmoudgil95/root,BerserkerTroll/root,pspe/root,bbockelm/root,georgtroska/root,karies/root,omazapa/root-old,Dr15Jones/root,olifre/root,sbinet/cxx-root,lgiommi/root,mhuwiler/rootauto,pspe/root,smarinac/root,thomaskeck/root,strykejern/TTreeReader,mhuwiler/rootauto,esakellari/root,perovic/root,kirbyherm/root-r-tools,Duraznos/root,smarinac/root,Y--/root,arch1tect0r/root,mhuwiler/rootauto,Dr15Jones/root,pspe/root,mhuwiler/rootauto,satyarth934/root,gganis/root,simonpf/root,pspe/root,perovic/root,olifre/root,karies/root,BerserkerTroll/root,esakellari/my_root_for_test
bbd0db9d8b3329cacffc55cdca9a5e63911ed510
#pragma once #ifndef YOU_DATASTORE_DATASTORE_H_ #define YOU_DATASTORE_DATASTORE_H_ #include <deque> #include <functional> #include "boost/variant.hpp" #include "task_typedefs.h" #include "internal/operation.h" #include "transaction.h" namespace You { namespace DataStore { namespace UnitTests { class DataStoreApiTest; } class DataStore { friend class UnitTests::DataStoreApiTest; public: Transaction && begin(); // Modifying methods bool post(TaskId, SerializedTask&); bool put(TaskId, SerializedTask&); bool erase(TaskId); std::vector<SerializedTask> getAllTask(); private: static DataStore& get(); bool isServing = false; std::deque<Internal::IOperation> operationsQueue; }; } // namespace DataStore } // namespace You #endif // YOU_DATASTORE_DATASTORE_H_
#pragma once #ifndef YOU_DATASTORE_DATASTORE_H_ #define YOU_DATASTORE_DATASTORE_H_ #include <deque> #include <functional> #include "boost/variant.hpp" #include "task_typedefs.h" #include "internal/operation.h" #include "transaction.h" namespace You { namespace DataStore { namespace UnitTests {} class DataStore { public: Transaction && begin(); // Modifying methods bool post(TaskId, SerializedTask&); bool put(TaskId, SerializedTask&); bool erase(TaskId); std::vector<SerializedTask> getAllTask(); private: static DataStore& get(); bool isServing = false; std::deque<Internal::IOperation> operationsQueue; }; } // namespace DataStore } // namespace You #endif // YOU_DATASTORE_DATASTORE_H_
--- +++ @@ -11,9 +11,10 @@ namespace You { namespace DataStore { -namespace UnitTests {} +namespace UnitTests { class DataStoreApiTest; } class DataStore { + friend class UnitTests::DataStoreApiTest; public: Transaction && begin();
Add unit test class declaration and friend class it in DataStore
mit
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
a293b49d5c09b0e54d3a75c9141d78d5ed990f02
/** * @file * @brief * * @date 16.05.12 * @author Anton Bondarev * @author Ilia Vaprol */ #include <stdint.h> uint64_t __udivdi3(uint64_t num, uint64_t den) { uint64_t result = 0; int steps; if (den == 0) { return 0; } steps = 0; result = 0; while (!(den & 0x8000000000000000)) { den <<= 1; ++steps; } do { result <<= 1; if (num >= den) { result |= 1; num -= den; } den >>= 1; } while (steps--); return result; }
/** * @file * @brief * * @date 16.05.12 * @author Anton Bondarev * @author Ilia Vaprol */ #include <limits.h> #include <stdint.h> #define MASK_DWORD (uint64_t)1 << ((WORD_BIT * 2) - 1) uint64_t __udivdi3(uint64_t num, uint64_t den) { uint64_t result = 0; int steps; if (den == 0) { return 0; } steps = 0; result = 0; while (!(den & MASK_DWORD)) { den <<= 1; ++steps; } do { result <<= 1; if (num >= den) { result |= 1; num -= den; } den >>= 1; } while (steps--); return result; }
--- +++ @@ -6,10 +6,8 @@ * @author Anton Bondarev * @author Ilia Vaprol */ -#include <limits.h> + #include <stdint.h> - -#define MASK_DWORD (uint64_t)1 << ((WORD_BIT * 2) - 1) uint64_t __udivdi3(uint64_t num, uint64_t den) { uint64_t result = 0; @@ -22,7 +20,7 @@ steps = 0; result = 0; - while (!(den & MASK_DWORD)) { + while (!(den & 0x8000000000000000)) { den <<= 1; ++steps; }
Revert __udivi3 (word in compiler always 32 bit)
bsd-2-clause
abusalimov/embox,gzoom13/embox,abusalimov/embox,Kefir0192/embox,Kakadu/embox,embox/embox,vrxfile/embox-trik,abusalimov/embox,gzoom13/embox,vrxfile/embox-trik,Kefir0192/embox,embox/embox,gzoom13/embox,Kefir0192/embox,Kakadu/embox,Kefir0192/embox,vrxfile/embox-trik,vrxfile/embox-trik,Kakadu/embox,Kefir0192/embox,mike2390/embox,embox/embox,Kakadu/embox,Kakadu/embox,embox/embox,Kakadu/embox,abusalimov/embox,Kakadu/embox,abusalimov/embox,vrxfile/embox-trik,Kefir0192/embox,gzoom13/embox,vrxfile/embox-trik,mike2390/embox,embox/embox,gzoom13/embox,mike2390/embox,vrxfile/embox-trik,gzoom13/embox,mike2390/embox,gzoom13/embox,mike2390/embox,abusalimov/embox,mike2390/embox,embox/embox,Kefir0192/embox,mike2390/embox
6eabd231276a1206adcca059a9efe9a95c61172b
#ifndef __ADR_MAIN_H__ #define __ADR_MAIN_H__ // Libraries // #include "craftable.h" #include "resource.h" #include "villager.h" #include "location.h" // Forward Declarations // struct adr_state { enum LOCATION loc; enum FIRE_STATE fire; enum ROOM_TEMP temp; unsigned int rs [ALIEN_ALLOY + 1]; unsigned short cs [RIFLE + 1]; unsigned short vs [MUNITIONIST + 1]; }; #endif // __ADR_MAIN_H__ // vim: set ts=4 sw=4 et:
#ifndef __ADR_MAIN_H__ #define __ADR_MAIN_H__ // Libraries // #include "craftable.h" #include "resource.h" #include "villager.h" #include "location.h" // Forward Declarations // struct adr_state { enum LOCATION adr_loc; enum FIRE_STATE adr_fire; enum ROOM_TEMP adr_temp; unsigned int adr_rs [ALIEN_ALLOY + 1]; unsigned short adr_cs [RIFLE + 1]; unsigned short adr_vs [MUNITIONIST + 1]; }; #endif // __ADR_MAIN_H__ // vim: set ts=4 sw=4 et:
--- +++ @@ -9,12 +9,12 @@ // Forward Declarations // struct adr_state { - enum LOCATION adr_loc; - enum FIRE_STATE adr_fire; - enum ROOM_TEMP adr_temp; - unsigned int adr_rs [ALIEN_ALLOY + 1]; - unsigned short adr_cs [RIFLE + 1]; - unsigned short adr_vs [MUNITIONIST + 1]; + enum LOCATION loc; + enum FIRE_STATE fire; + enum ROOM_TEMP temp; + unsigned int rs [ALIEN_ALLOY + 1]; + unsigned short cs [RIFLE + 1]; + unsigned short vs [MUNITIONIST + 1]; }; #endif // __ADR_MAIN_H__
Remove unnecessary state variable adr_ prefixes
mpl-2.0
HalosGhost/adarcroom
2bb49affe3bc123a13cc0e05d94dd8c32ac087e1
/* * Copyright (C) 1999, 2000 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ #ifndef DNS_RDATASTRUCT_H #define DNS_RDATASTRUCT_H 1 #include <isc/lang.h> #include <isc/sockaddr.h> #include <dns/types.h> ISC_LANG_BEGINDECLS typedef struct dns_rdatacommon { dns_rdataclass_t rdclass; dns_rdatatype_t rdtype; ISC_LINK(struct dns_rdatacommon) link; } dns_rdatacommon_t; #define DNS_RDATACOMMON_INIT(DATA, RDTYPE, RDCLASS) \ do { \ (DATA)->common.rdtype = (RDTYPE); \ (DATA)->common.rdclass = (RDCLASS); \ ISC_LINK_INIT(&(DATA)->common, link); \ } while (0)
/* * Copyright (C) 1999, 2000 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ #ifndef DNS_RDATASTRUCT_H #define DNS_RDATASTRUCT_H 1 #include <isc/lang.h> #include <isc/sockaddr.h> #include <dns/types.h> ISC_LANG_BEGINDECLS typedef struct dns_rdatacommon { dns_rdataclass_t rdclass; dns_rdatatype_t rdtype; ISC_LINK(struct dns_rdatacommon) link; } dns_rdatacommon_t;
--- +++ @@ -31,3 +31,9 @@ ISC_LINK(struct dns_rdatacommon) link; } dns_rdatacommon_t; +#define DNS_RDATACOMMON_INIT(DATA, RDTYPE, RDCLASS) \ + do { \ + (DATA)->common.rdtype = (RDTYPE); \ + (DATA)->common.rdclass = (RDCLASS); \ + ISC_LINK_INIT(&(DATA)->common, link); \ + } while (0)
Add macro to initalise the common part of a rdata struct.
mpl-2.0
pecharmin/bind9,pecharmin/bind9,each/bind9-collab,pecharmin/bind9,each/bind9-collab,each/bind9-collab,each/bind9-collab,pecharmin/bind9,pecharmin/bind9,each/bind9-collab,pecharmin/bind9,each/bind9-collab
ba6f0d85b45a08112bafe9a92c7174a46bc18bfd
#include <stddef.h> #include <time.h> #include <pthread.h> #include <stdlib.h> #include "timers.h" struct timer_data_t { long millis; timer_callback_t timer_callback; void* data; }; void *timer_thread(void *data) { struct timer_data_t *timer_data = data; struct timespec t; t.tv_sec = timer_data->millis / 1000; t.tv_nsec = 1000 * 1000 * (timer_data->millis % 1000); if (t.tv_sec == 0 && t.tv_nsec == 0) { t.tv_nsec = 1; /* Evidently needed on Ubuntu 14.04 */ } nanosleep(&t, NULL); timer_data->timer_callback(timer_data->data); free(data); return NULL; } void start_timer(long millis, timer_callback_t timer_callback, void *data) { struct timer_data_t *timer_data = malloc(sizeof(struct timer_data_t)); timer_data->millis = millis; timer_data->timer_callback = timer_callback; timer_data->data = data; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); pthread_t thread; pthread_create(&thread, &attr, timer_thread, timer_data); }
#include <stddef.h> #include <time.h> #include <pthread.h> #include <stdlib.h> #include "timers.h" struct timer_data_t { long millis; timer_callback_t timer_callback; void* data; }; void *timer_thread(void *data) { struct timer_data_t *timer_data = data; struct timespec t; t.tv_sec = timer_data->millis / 1000; t.tv_nsec = 1000 * 1000 * (timer_data->millis % 1000); nanosleep(&t, NULL); timer_data->timer_callback(timer_data->data); free(data); return NULL; } void start_timer(long millis, timer_callback_t timer_callback, void *data) { struct timer_data_t *timer_data = malloc(sizeof(struct timer_data_t)); timer_data->millis = millis; timer_data->timer_callback = timer_callback; timer_data->data = data; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); pthread_t thread; pthread_create(&thread, &attr, timer_thread, timer_data); }
--- +++ @@ -17,6 +17,9 @@ struct timespec t; t.tv_sec = timer_data->millis / 1000; t.tv_nsec = 1000 * 1000 * (timer_data->millis % 1000); + if (t.tv_sec == 0 && t.tv_nsec == 0) { + t.tv_nsec = 1; /* Evidently needed on Ubuntu 14.04 */ + } nanosleep(&t, NULL); timer_data->timer_callback(timer_data->data);
Fix bug if timer executed with 0 ms
epl-1.0
mfikes/planck,slipset/planck,mfikes/planck,mfikes/planck,slipset/planck,slipset/planck,slipset/planck,mfikes/planck,mfikes/planck,mfikes/planck,slipset/planck
d463708dd79dc9c1689a8ec5aa6ae6fc4d84d8c8
/* * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef VkTestUtils_DEFINED #define VkTestUtils_DEFINED #include "SkTypes.h" #ifdef SK_VULKAN #include "vk/GrVkDefines.h" namespace sk_gpu_test { bool LoadVkLibraryAndGetProcAddrFuncs(PFN_vkGetInstanceProcAddr*, PFN_vkGetDeviceProcAddr*); } #endif #endif
/* * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef VkTestUtils_DEFINED #define VkTestUtils_DEFINED #ifdef SK_VULKAN #include "vk/GrVkDefines.h" namespace sk_gpu_test { bool LoadVkLibraryAndGetProcAddrFuncs(PFN_vkGetInstanceProcAddr*, PFN_vkGetDeviceProcAddr*); } #endif #endif
--- +++ @@ -7,6 +7,8 @@ #ifndef VkTestUtils_DEFINED #define VkTestUtils_DEFINED + +#include "SkTypes.h" #ifdef SK_VULKAN
Fix VkTextUtils to include SkTypes before ifdef Bug: skia: Change-Id: I4286f0e15ee427345d7d793760c85c9743fc4c6c Reviewed-on: https://skia-review.googlesource.com/70200 Reviewed-by: Derek Sollenberger <d9b232705cad36bae5cfccf14f9650bb292e6c71@google.com> Commit-Queue: Greg Daniel <39df0a804564ccb6cf75f18db79653821f37c1c5@google.com>
bsd-3-clause
rubenvb/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,rubenvb/skia,google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,google/skia,google/skia,rubenvb/skia,rubenvb/skia,rubenvb/skia,HalCanary/skia-hc,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,rubenvb/skia,google/skia,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,google/skia,google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia
63b8a434dc46efa3fd53e85bad9121da8f690889
#import <Cocoa/Cocoa.h> #include <gtk/gtk.h> #if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_5) @interface _GNSMenuDelegate : NSObject <NSMenuDelegate> {} #else @interface _GNSMenuDelegate : NSObject {} #endif @end
#import <Cocoa/Cocoa.h> #include <gtk/gtk.h> #if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6) @interface _GNSMenuDelegate : NSObject <NSMenuDelegate> {} #else @interface _GNSMenuDelegate : NSObject {} #endif @end
--- +++ @@ -1,7 +1,7 @@ #import <Cocoa/Cocoa.h> #include <gtk/gtk.h> -#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6) +#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_5) @interface _GNSMenuDelegate : NSObject <NSMenuDelegate> {} #else @interface _GNSMenuDelegate : NSObject {}
Fix minimum version to one that exists in 10.5
lgpl-2.1
sharoonthomas/gtk-mac-integration,GNOME/gtk-mac-integration,jralls/gtk-mac-integration,GNOME/gtk-mac-integration,jralls/gtk-mac-integration,sharoonthomas/gtk-mac-integration,GNOME/gtk-mac-integration,jralls/gtk-mac-integration,sharoonthomas/gtk-mac-integration,sharoonthomas/gtk-mac-integration,sharoonthomas/gtk-mac-integration
2240257c7f7cb075b43e844bae0749bd59005c80
#ifndef TACHYON_TEST_UTILS_MOCK_QUEUE_H_ #define TACHYON_TEST_UTILS_MOCK_QUEUE_H_ #include "gmock/gmock.h" #include "lib/queue_interface.h" namespace tachyon { namespace testing { // Mock class for queues. template <class T> class MockQueue : public QueueInterface<T> { public: MOCK_METHOD1_T(Enqueue, bool(const T &item)); MOCK_METHOD1_T(EnqueueBlocking, bool(const T &item)); MOCK_METHOD1_T(DequeueNext, bool(T *item)); MOCK_METHOD1_T(DequeueNextBlocking, void(T *item)); MOCK_CONST_METHOD0_T(GetOffset, int()); MOCK_METHOD0_T(FreeQueue, void()); }; } // namespace testing } // namespace tachyon #endif // TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#ifndef TACHYON_TEST_UTILS_MOCK_QUEUE_H_ #define TACHYON_TEST_UTILS_MOCK_QUEUE_H_ #include "gmock/gmock.h" #include "lib/queue_interface.h" namespace tachyon { namespace testing { // Mock class for queues. template <class T> class MockQueue : public QueueInterface<T> { public: MOCK_METHOD1_T(Enqueue, bool(const T &item)); MOCK_METHOD1_T(EnqueueBlocking, bool(const T &item)); MOCK_METHOD1_T(DequeueNext, bool(T *item)); MOCK_METHOD1_T(DequeueNextBlocking, void(T *item)); MOCK_METHOD0_T(GetOffset, int()); MOCK_METHOD0_T(FreeQueue, void()); }; } // namespace testing } // namespace tachyon #endif // TACHYON_TEST_UTILS_MOCK_QUEUE_H_
--- +++ @@ -18,7 +18,7 @@ MOCK_METHOD1_T(DequeueNext, bool(T *item)); MOCK_METHOD1_T(DequeueNextBlocking, void(T *item)); - MOCK_METHOD0_T(GetOffset, int()); + MOCK_CONST_METHOD0_T(GetOffset, int()); MOCK_METHOD0_T(FreeQueue, void()); };
Fix issue with mock method.
mit
djpetti/gaia,djpetti/gaia,djpetti/gaia
991fa7648b54c6d03bfe0d112a37d17dd2054d52
/* Copyright 2002-2004 The Apache Software Foundation * * 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. */ static MP_INLINE U32 mpxs_APR__OS_current_thread_id(pTHX) { #if APR_HAS_THREADS return (U32)apr_os_thread_current(); #else return 0; #endif }
/* Copyright 2002-2004 The Apache Software Foundation * * 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. */ static MP_INLINE U32 mpxs_APR__OS_current_thread_id(pTHX) { #if APR_HAS_THREADS return apr_os_thread_current(); #else return 0; #endif }
--- +++ @@ -16,7 +16,7 @@ static MP_INLINE U32 mpxs_APR__OS_current_thread_id(pTHX) { #if APR_HAS_THREADS - return apr_os_thread_current(); + return (U32)apr_os_thread_current(); #else return 0; #endif
Make a proper case to U32 to avoid a warning PR: Obtained from: Submitted by: Reviewed by: git-svn-id: b4be4a41b2a3352907de631eb6da1671a2f7b614@71435 13f79535-47bb-0310-9956-ffa450edef68
apache-2.0
Distrotech/mod_perl,Distrotech/mod_perl,Distrotech/mod_perl,Distrotech/mod_perl
38dc7e5f12c1fb18c292dcd2ade8f8de9102c79c
#include <stdio.h> #include "player_key.h" bool_t key_is_goalie(player_key_t *key) { return key->position == 'G'; } void show_key_player(player_key_t *key, size_t ofs_key) { size_t i; printf("T: %3u NO: %2u POS: %c NAME: %-15s %-15s", key->team, key->jersey, key->position, key->first, key->last); printf(" OFS_KEY: %4x OFS_ATT: %4x OFS_CAR: %4x OFS_SEA: %4x", ofs_key, key->ofs_attributes, key->ofs_career_stats, key->ofs_season_stats); printf(" UNKNOWN: "); for (i = 0; i < sizeof(key->unknown); i++) { printf("%3u ", key->unknown[i]); } }
#include <stdio.h> #include "player_key.h" bool_t key_is_goalie(player_key_t *key) { return key->position == 'G'; } void show_key_player(player_key_t *key, size_t ofs_key) { size_t i; printf("T: %2u NO: %2u POS: %c NAME: %-15s %-15s", key->team, key->jersey, key->position, key->first, key->last); printf(" OFS_KEY: %4x OFS_ATT: %4x OFS_CAR: %4x OFS_SEA: %4x", ofs_key, key->ofs_attributes, key->ofs_career_stats, key->ofs_season_stats); printf(" UNKNOWN: "); for (i = 0; i < sizeof(key->unknown); i++) { printf("%3u ", key->unknown[i]); } }
--- +++ @@ -10,7 +10,7 @@ { size_t i; - printf("T: %2u NO: %2u POS: %c NAME: %-15s %-15s", + printf("T: %3u NO: %2u POS: %c NAME: %-15s %-15s", key->team, key->jersey, key->position, key->first, key->last); printf(" OFS_KEY: %4x OFS_ATT: %4x OFS_CAR: %4x OFS_SEA: %4x",
Align free agents (team index 255) with the rest
mit
peruukki/NHL95DBEditor,peruukki/NHL95DBEditor
aa960ff4ec71089b69be81ec1f6d3f86f10c61ee
#include "../small1/testharness.h" #include "../small1/testkinds.h" // NUMERRORS 3 struct foo { int a[8]; int *b; } gfoo; struct bar { int a[8]; int *b; }; #if ERROR == 2 struct s1 { int a[8]; int *b; } * s1; struct s2 { int *c; int d[8]; } * s2; #endif #if ERROR == 3 struct s_with_index { int __INDEX arr[8] __INDEX; } * s1; struct s_with_non_array { int a,b,c,d,e,f,g,h; } * s2; #endif int main() { int * __INDEX p = & gfoo.a[2]; // Force gfoo.a to have a length // This should be Ok, but pbar->b is gfoo.a[7] struct bar *pbar = (struct bar*)&gfoo; pbar->b = 0; gfoo.a[7] = 5; printf("Pointer is %lx\n", (unsigned long)pbar->b); *(pbar->b) = 0; //ERROR(1): Null s1 = s2; if (HAS_KIND(s1, WILD_KIND)) E(2); // ERROR(2):Error #if ERROR == 3 s1 = s2; // ERROR(3): compared with a non-array #endif SUCCESS; }
#include "../small1/testharness.h" // NUMERRORS 1 struct foo { int a[8]; int *b; } gfoo; struct bar { int a[8]; int *b; }; int main() { int * __INDEX p = & gfoo.a[2]; // Force gfoo.a to have a length // This should be Ok, but pbar->b is gfoo.a[7] struct bar *pbar = (struct bar*)&gfoo; gfoo.a[7] = 5; pbar->b = 0; printf("Pointer is %lx\n", (unsigned long)pbar->b); *(pbar->b) = 0; //ERROR(1): Null SUCCESS; }
--- +++ @@ -1,6 +1,7 @@ #include "../small1/testharness.h" +#include "../small1/testkinds.h" -// NUMERRORS 1 +// NUMERRORS 3 struct foo { int a[8]; @@ -12,16 +13,44 @@ int *b; }; +#if ERROR == 2 +struct s1 { + int a[8]; + int *b; +} * s1; +struct s2 { + int *c; + int d[8]; +} * s2; +#endif + +#if ERROR == 3 +struct s_with_index { + int __INDEX arr[8] __INDEX; +} * s1; + +struct s_with_non_array { + int a,b,c,d,e,f,g,h; +} * s2; +#endif + int main() { int * __INDEX p = & gfoo.a[2]; // Force gfoo.a to have a length // This should be Ok, but pbar->b is gfoo.a[7] struct bar *pbar = (struct bar*)&gfoo; + pbar->b = 0; gfoo.a[7] = 5; - pbar->b = 0; printf("Pointer is %lx\n", (unsigned long)pbar->b); *(pbar->b) = 0; //ERROR(1): Null + + s1 = s2; if (HAS_KIND(s1, WILD_KIND)) E(2); // ERROR(2):Error + +#if ERROR == 3 + s1 = s2; // ERROR(3): compared with a non-array +#endif + SUCCESS; }
Change the solver handling of arrays. Previously we were calling compat on the pointers underneath matching arrays. However, this led to problems: union { char a[8]; int b[2]; } This is in fact fine, but we'd end up with compat edges between a node pointing to char and a node pointing to int and they wouldn't be congruent so they would end up being WILD. However, if one of them is INDEX, the other should be as well. So we remember whenever an array is compared against another array and we make sure that they have the same flags. However: union { char a[4] __INDEX; int b; } Should fail. So we remember whenever an array is compared with a non-array. Later, if any such array ends up being INDEX we die with an error in the solver. This commit also beefs up the test-bad/index1 testcase.
bsd-3-clause
samuelhavron/obliv-c,samuelhavron/obliv-c,samuelhavron/obliv-c,samuelhavron/obliv-c
8493cdb9c63ed7a720a4b8e6077c07fa1513659b
#include <stdio.h> #include <stdlib.h> #include "udon.h" int main (int argc, char *argv[]) { int i; if(argc < 2) return 1; UdonParser *udon = udon_new_parser_from_file(argv[1]); if(udon == NULL) { udon_emit_error(stderr); return udon_error_value(); } int res = udon_parse(udon); if(res) udon_emit_error(stderr); udon_reset_parser(udon); udon_free_parser(udon); return res; }
#include <stdio.h> #include <stdlib.h> #include "udon.h" int main (int argc, char *argv[]) { int i; int found = 0; if(argc < 2) return 1; UdonParser *udon = udon_new_parser_from_file(argv[1]); if(udon == NULL) { udon_emit_error(stderr); return udon_error_value(); } for(i=0; i<10000; i++) { found += udon_parse(udon); udon_reset_parser(udon); } udon_free_parser(udon); printf("%d\n", found); }
--- +++ @@ -4,18 +4,16 @@ int main (int argc, char *argv[]) { int i; - int found = 0; if(argc < 2) return 1; UdonParser *udon = udon_new_parser_from_file(argv[1]); if(udon == NULL) { udon_emit_error(stderr); return udon_error_value(); } - for(i=0; i<10000; i++) { - found += udon_parse(udon); - udon_reset_parser(udon); - } + int res = udon_parse(udon); + if(res) udon_emit_error(stderr); + udon_reset_parser(udon); udon_free_parser(udon); - printf("%d\n", found); + return res; }
Remove older benchmarking loop and do correct error handling with real parse interface.
mit
josephwecker/udon-c,josephwecker/udon-c,josephwecker/udon-c,josephwecker/udon-c
2067da7189ec2e5d0266e16578b156f6a6bbf215
class AdminHook : public Module { public: virtual ~AdminHook(); virtual std::vector<std::vector<std::string> > adminCommands(); virtual void onAdminCommand(std::string server, std::string nick, std::string command, std::string message, bool dcc, bool master); }; class AdminMod { public: virtual ~AdminMod(); virtual void sendVerbose(int verboseLevel, std::string message); }; AdminHook::~AdminHook() {} std::vector<std::vector<std::string> > AdminHook::adminCommands() { return std::vector<std::vector<std::string> > (); } void AdminHook::onAdminCommand(std::string server, std::string nick, std::string command, std::string message, bool dcc, bool master) {} AdminMod::~AdminMod() {} void AdminMod::sendVerbose(int verboseLevel, std::string message) {}
class AdminHook : public Module { public: virtual ~AdminHook(); virtual std::vector<std::vector<std::string> > adminCommands(); virtual void onAdminCommand(std::string server, std::string nick, std::string command, std::string message, bool dcc, bool master); }; class AdminMod : public Module { public: virtual ~AdminMod(); virtual void sendVerbose(int verboseLevel, std::string message); }; AdminHook::~AdminHook() {} std::vector<std::vector<std::string> > AdminHook::adminCommands() { return std::vector<std::vector<std::string> > (); } void AdminHook::onAdminCommand(std::string server, std::string nick, std::string command, std::string message, bool dcc, bool master) {} AdminMod::~AdminMod() {} void AdminMod::sendVerbose(int verboseLevel, std::string message) {}
--- +++ @@ -5,7 +5,7 @@ virtual void onAdminCommand(std::string server, std::string nick, std::string command, std::string message, bool dcc, bool master); }; -class AdminMod : public Module { +class AdminMod { public: virtual ~AdminMod(); virtual void sendVerbose(int verboseLevel, std::string message);
Change this so it works. This may be tricky to work through when a lot of modules depend on a lot of other modules.
mit
ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo
0bedca3d5d44c2bd13218defeedade16fb30ba9f
// // PBWebViewController.h // Pinbrowser // // Created by Mikael Konutgan on 11/02/2013. // Copyright (c) 2013 Mikael Konutgan. All rights reserved. // #import <UIKit/UIKit.h> @interface PBWebViewController : UIViewController <UIWebViewDelegate> /** * The URL that will be loaded by the web view controller. * If there is one present when the web view appears, it will be automatically loaded, by calling `load`, * Otherwise, you can set a `URL` after the web view has already been loaded and then manually call `load`. */ @property (strong, nonatomic) NSURL *URL; /** The array of data objects on which to perform the activity. */ @property (strong, nonatomic) NSArray *activityItems; /** An array of UIActivity objects representing the custom services that your application supports. */ @property (strong, nonatomic) NSArray *applicationActivities; /** The list of services that should not be displayed. */ @property (strong, nonatomic) NSArray *excludedActivityTypes; /** * A Boolean indicating whether the web view controller’s toolbar, * which displays a stop/refresh, back, forward and share button, is shown. * The default value of this property is `YES`. */ @property (assign, nonatomic) BOOL showsNavigationToolbar; /** * Loads the given `URL`. This is called automatically when the when the web view appears if a `URL` exists, * otehrwise it can be called manually. */ - (void)load; /** * Clears the contents of the web view. */ - (void)clear; @end
// // PBWebViewController.h // Pinbrowser // // Created by Mikael Konutgan on 11/02/2013. // Copyright (c) 2013 Mikael Konutgan. All rights reserved. // #import <UIKit/UIKit.h> @interface PBWebViewController : UIViewController <UIWebViewDelegate> @property (strong, nonatomic) NSURL *URL; @property (strong, nonatomic) NSArray *activityItems; @property (strong, nonatomic) NSArray *applicationActivities; @property (strong, nonatomic) NSArray *excludedActivityTypes; /** * A Boolean indicating whether the web view controller’s toolbar, * which displays a stop/refresh, back, forward and share button, is shown. * The default value of this property is `YES`. */ @property (assign, nonatomic) BOOL showsNavigationToolbar; - (void)load; - (void)clear; @end
--- +++ @@ -10,10 +10,20 @@ @interface PBWebViewController : UIViewController <UIWebViewDelegate> +/** + * The URL that will be loaded by the web view controller. + * If there is one present when the web view appears, it will be automatically loaded, by calling `load`, + * Otherwise, you can set a `URL` after the web view has already been loaded and then manually call `load`. + */ @property (strong, nonatomic) NSURL *URL; +/** The array of data objects on which to perform the activity. */ @property (strong, nonatomic) NSArray *activityItems; + +/** An array of UIActivity objects representing the custom services that your application supports. */ @property (strong, nonatomic) NSArray *applicationActivities; + +/** The list of services that should not be displayed. */ @property (strong, nonatomic) NSArray *excludedActivityTypes; /** @@ -23,7 +33,15 @@ */ @property (assign, nonatomic) BOOL showsNavigationToolbar; +/** + * Loads the given `URL`. This is called automatically when the when the web view appears if a `URL` exists, + * otehrwise it can be called manually. + */ - (void)load; + +/** + * Clears the contents of the web view. + */ - (void)clear; @end
Document all the public properties and methods
mit
kmikael/PBWebViewController,jhmcclellandii/PBWebViewController,mobitar/MBXWebViewController,junjie/PBWebViewController
00429da5931314964a3f9d91ed93e32a0a6ab7b2
#include <stdio.h> #include <stdlib.h> #include "../lib/libunshield.h" int main(int argc, char** argv) { unsigned seed = 0; FILE* input = NULL; FILE* output = NULL; size_t size; unsigned char buffer[16384]; if (argc != 3) { fprintf(stderr, "Syntax:\n" " %s INPUT-FILE OUTPUT-FILE\n", argv[0]); exit(1); } input = fopen(argv[1], "rb"); if (!input) { fprintf(stderr, "Failed to open %s for reading\n", argv[1]); exit(2); } output = fopen(argv[2], "wb"); if (!output) { fprintf(stderr, "Failed to open %s for writing\n", argv[2]); exit(3); } while ((size = fread(buffer, 1, sizeof(buffer), input)) != 0) { unshield_deobfuscate(buffer, size, &seed); if (fwrite(buffer, 1, size, output) != size) { fprintf(stderr, "Failed to write %lu bytes to %s\n", (unsigned long)size, argv[2]); exit(4); } } fclose(input); fclose(output); return 0; }
#include <stdio.h> #include <stdlib.h> #include "../lib/libunshield.h" int main(int argc, char** argv) { unsigned seed = 0; FILE* input = NULL; FILE* output = NULL; size_t size; unsigned char buffer[16384]; if (argc != 3) { fprintf(stderr, "Syntax:\n" " %s INPUT-FILE OUTPUT-FILE\n", argv[0]); exit(1); } input = fopen(argv[1], "r"); if (!input) { fprintf(stderr, "Failed to open %s for reading\n", argv[1]); exit(2); } output = fopen(argv[2], "w"); if (!output) { fprintf(stderr, "Failed to open %s for writing\n", argv[2]); exit(3); } while ((size = fread(buffer, 1, sizeof(buffer), input)) != 0) { unshield_deobfuscate(buffer, size, &seed); if (fwrite(buffer, 1, size, output) != size) { fprintf(stderr, "Failed to write %lu bytes to %s\n", (unsigned long)size, argv[2]); exit(4); } } fclose(input); fclose(output); return 0; }
--- +++ @@ -20,7 +20,7 @@ exit(1); } - input = fopen(argv[1], "r"); + input = fopen(argv[1], "rb"); if (!input) { fprintf(stderr, @@ -29,7 +29,7 @@ exit(2); } - output = fopen(argv[2], "w"); + output = fopen(argv[2], "wb"); if (!output) { fprintf(stderr,
Fix for binary files on Windows Thanks @Djamana Closes #46
mit
twogood/unshield,twogood/unshield
01cfab200399196583a306ad90e56349caf1925d
// Copyright (c) 2006- Facebook // Distributed under the Thrift Software License // // See accompanying file LICENSE or visit the Thrift site at: // http://developers.facebook.com/thrift/ #ifndef T_ENUM_H #define T_ENUM_H #include "t_enum_value.h" #include <vector> /** * An enumerated type. A list of constant objects with a name for the type. * * @author Mark Slee <mcslee@facebook.com> */ class t_enum : public t_type { public: t_enum(t_program* program) : t_type(program) {} void set_name(const std::string& name) { name_ = name; } void append(t_enum_value* constant) { constants_.push_back(constant); } const std::vector<t_enum_value*>& get_constants() { return constants_; } bool is_enum() const { return true; } virtual std::string get_fingerprint_material() const { return "enum"; } private: std::vector<t_enum_value*> constants_; }; #endif
// Copyright (c) 2006- Facebook // Distributed under the Thrift Software License // // See accompanying file LICENSE or visit the Thrift site at: // http://developers.facebook.com/thrift/ #ifndef T_ENUM_H #define T_ENUM_H #include "t_enum_value.h" #include <vector> /** * An enumerated type. A list of constant objects with a name for the type. * * @author Mark Slee <mcslee@facebook.com> */ class t_enum : public t_type { public: t_enum(t_program* program) : t_type(program) {} void set_name(std::string name) { name_ = name; } void append(t_enum_value* constant) { constants_.push_back(constant); } const std::vector<t_enum_value*>& get_constants() { return constants_; } bool is_enum() const { return true; } virtual std::string get_fingerprint_material() const { return "enum"; } private: std::vector<t_enum_value*> constants_; }; #endif
--- +++ @@ -20,10 +20,10 @@ t_enum(t_program* program) : t_type(program) {} - void set_name(std::string name) { + void set_name(const std::string& name) { name_ = name; } - + void append(t_enum_value* constant) { constants_.push_back(constant); }
Fix set_name compiler method signature Reviewed By: kholst Other Notes: Follow up from 78130 git-svn-id: 8d8e29b1fb681c884914062b88f3633e3a187774@665434 13f79535-47bb-0310-9956-ffa450edef68
apache-2.0
JoeEnnever/thrift,authbox-lib/thrift,ijuma/thrift,collinmsn/thrift,authbox-lib/thrift,creker/thrift,3013216027/thrift,afds/thrift,alfredtofu/thrift,Jimdo/thrift,msonnabaum/thrift,theopolis/thrift,i/thrift,flandr/thrift,selaselah/thrift,Jimdo/thrift,prathik/thrift,bufferoverflow/thrift,tanmaykm/thrift,fernandobt8/thrift,wfxiang08/thrift,huahang/thrift,ykwd/thrift,chenbaihu/thrift,Jens-G/thrift,tanmaykm/thrift,SirWellington/thrift,lion117/lib-thrift,ijuma/thrift,zzmp/thrift,zhaorui1/thrift,pinterest/thrift,spicavigo/thrift,siemens/thrift,mway08/thrift,windofthesky/thrift,windofthesky/thrift,jeking3/thrift,strava/thrift,bmiklautz/thrift,zzmp/thrift,vashstorm/thrift,siemens/thrift,springheeledjak/thrift,bufferoverflow/thrift,jeking3/thrift,springheeledjak/thrift,bforbis/thrift,dongjiaqiang/thrift,NOMORECOFFEE/thrift,terminalcloud/thrift,msonnabaum/thrift,SuperAwesomeLTD/thrift,nsuke/thrift,dtmuller/thrift,evanweible-wf/thrift,creker/thrift,gadLinux/thrift,markerickson-wf/thrift,afds/thrift,gadLinux/thrift,yongju-hong/thrift,dcelasun/thrift,RobberPhex/thrift,creker/thrift,jeking3/thrift,dongjiaqiang/thrift,rewardStyle/apache.thrift,adamvduke/thrift-adamd,crisish/thrift,edvakf/thrift,bitfinder/thrift,Fitbit/thrift,ochinchina/thrift,afds/thrift,guodongxiaren/thrift,authbox-lib/thrift,msonnabaum/thrift,jackscott/thrift,ahnqirage/thrift,windofthesky/thrift,theopolis/thrift,i/thrift,wfxiang08/thrift,EasonYi/thrift,markerickson-wf/thrift,Fitbit/thrift,gadLinux/thrift,Sean-Der/thrift,reTXT/thrift,BluechipSystems/thrift,zhaorui1/thrift,Pertino/thrift,jeking3/thrift,terminalcloud/thrift,bufferoverflow/thrift,timse/thrift,vashstorm/thrift,koofr/thrift,msonnabaum/thrift,prathik/thrift,Jens-G/thrift,dcelasun/thrift,ijuma/thrift,BluechipSystems/thrift,flandr/thrift,hcorg/thrift,strava/thrift,flamholz/thrift,ykwd/thrift,eonezhang/thrift,yongju-hong/thrift,zhaorui1/thrift,roshan/thrift,bufferoverflow/thrift,akshaydeo/thrift,bgould/thrift,bgould/thrift,rewardStyle/apache.thrift,3013216027/thrift,bforbis/thrift,SirWellington/thrift,msonnabaum/thrift,roshan/thrift,mindcandy/thrift,reTXT/thrift,koofr/thrift,bholbrook73/thrift,prashantv/thrift,jfarrell/thrift,jeking3/thrift,windofthesky/thrift,dcelasun/thrift,bgould/thrift,rewardStyle/apache.thrift,jackscott/thrift,jeking3/thrift,jfarrell/thrift,bmiklautz/thrift,x1957/thrift,chenbaihu/thrift,rmhartog/thrift,prashantv/thrift,EasonYi/thrift,Jimdo/thrift,upfluence/thrift,NOMORECOFFEE/thrift,pinterest/thrift,timse/thrift,fernandobt8/thrift,guodongxiaren/thrift,flamholz/thrift,rewardStyle/apache.thrift,ahnqirage/thrift,collinmsn/thrift,roshan/thrift,lion117/lib-thrift,dwnld/thrift,akshaydeo/thrift,wfxiang08/thrift,weweadsl/thrift,weweadsl/thrift,chenbaihu/thrift,SuperAwesomeLTD/thrift,jfarrell/thrift,RobberPhex/thrift,authbox-lib/thrift,i/thrift,reTXT/thrift,crisish/thrift,NOMORECOFFEE/thrift,mindcandy/thrift,tanmaykm/thrift,chentao/thrift,vashstorm/thrift,gadLinux/thrift,Fitbit/thrift,RobberPhex/thrift,jfarrell/thrift,chentao/thrift,chentao/thrift,mway08/thrift,theopolis/thrift,terminalcloud/thrift,prathik/thrift,bmiklautz/thrift,3013216027/thrift,chenbaihu/thrift,bgould/thrift,markerickson-wf/thrift,bgould/thrift,strava/thrift,apache/thrift,jpgneves/thrift,EasonYi/thrift,ykwd/thrift,nsuke/thrift,lion117/lib-thrift,wfxiang08/thrift,apache/thrift,BluechipSystems/thrift,prashantv/thrift,Jens-G/thrift,crisish/thrift,dsturnbull/thrift,msonnabaum/thrift,Fitbit/thrift,evanweible-wf/thrift,zzmp/thrift,elloray/thrift,afds/thrift,timse/thrift,hcorg/thrift,springheeledjak/thrift,RobberPhex/thrift,koofr/thrift,haruwo/thrift-with-java-annotation-support,pinterest/thrift,JoeEnnever/thrift,tanmaykm/thrift,strava/thrift,Pertino/thrift,elloray/thrift,bforbis/thrift,springheeledjak/thrift,fernandobt8/thrift,dwnld/thrift,flandr/thrift,i/thrift,tanmaykm/thrift,adamvduke/thrift-adamd,ahnqirage/thrift,bitemyapp/thrift,tylertreat/thrift,gadLinux/thrift,RobberPhex/thrift,bmiklautz/thrift,bufferoverflow/thrift,Pertino/thrift,siemens/thrift,nsuke/thrift,project-zerus/thrift,bitfinder/thrift,cjmay/thrift,dtmuller/thrift,jeking3/thrift,siemens/thrift,zhaorui1/thrift,Jens-G/thrift,Sean-Der/thrift,SentientTechnologies/thrift,wfxiang08/thrift,dwnld/thrift,pinterest/thrift,jackscott/thrift,Fitbit/thrift,elloray/thrift,vashstorm/thrift,creker/thrift,pinterest/thrift,Jens-G/thrift,apache/thrift,mway08/thrift,koofr/thrift,apache/thrift,theopolis/thrift,bitfinder/thrift,theopolis/thrift,BluechipSystems/thrift,roshan/thrift,project-zerus/thrift,x1957/thrift,msonnabaum/thrift,jfarrell/thrift,springheeledjak/thrift,NOMORECOFFEE/thrift,windofthesky/thrift,tylertreat/thrift,nsuke/thrift,terminalcloud/thrift,haruwo/thrift-with-java-annotation-support,Jens-G/thrift,NOMORECOFFEE/thrift,bforbis/thrift,jpgneves/thrift,wingedkiwi/thrift,Jens-G/thrift,msonnabaum/thrift,markerickson-wf/thrift,joshuabezaleel/thrift,zzmp/thrift,timse/thrift,lion117/lib-thrift,roshan/thrift,terminalcloud/thrift,hcorg/thrift,theopolis/thrift,jackscott/thrift,hcorg/thrift,dtmuller/thrift,jpgneves/thrift,tylertreat/thrift,guodongxiaren/thrift,rewardStyle/apache.thrift,3013216027/thrift,alfredtofu/thrift,pinterest/thrift,SuperAwesomeLTD/thrift,BluechipSystems/thrift,jeking3/thrift,Fitbit/thrift,x1957/thrift,chenbaihu/thrift,vashstorm/thrift,jpgneves/thrift,ykwd/thrift,windofthesky/thrift,lion117/lib-thrift,ochinchina/thrift,ijuma/thrift,theopolis/thrift,SentientTechnologies/thrift,theopolis/thrift,evanweible-wf/thrift,3013216027/thrift,hcorg/thrift,afds/thrift,bitemyapp/thrift,steven-sheffey-tungsten/thrift,nsuke/thrift,gadLinux/thrift,bforbis/thrift,collinmsn/thrift,huahang/thrift,cjmay/thrift,bholbrook73/thrift,akshaydeo/thrift,Sean-Der/thrift,yongju-hong/thrift,project-zerus/thrift,ahnqirage/thrift,collinmsn/thrift,prathik/thrift,flandr/thrift,jackscott/thrift,flandr/thrift,NOMORECOFFEE/thrift,flandr/thrift,hcorg/thrift,rmhartog/thrift,dtmuller/thrift,mindcandy/thrift,dwnld/thrift,ijuma/thrift,JoeEnnever/thrift,eamosov/thrift,dtmuller/thrift,dtmuller/thrift,terminalcloud/thrift,joshuabezaleel/thrift,Sean-Der/thrift,ykwd/thrift,Fitbit/thrift,bitemyapp/thrift,jfarrell/thrift,markerickson-wf/thrift,bgould/thrift,tylertreat/thrift,chentao/thrift,bmiklautz/thrift,apache/thrift,SentientTechnologies/thrift,upfluence/thrift,dcelasun/thrift,selaselah/thrift,rmhartog/thrift,ochinchina/thrift,Pertino/thrift,jpgneves/thrift,timse/thrift,3013216027/thrift,SuperAwesomeLTD/thrift,Sean-Der/thrift,SuperAwesomeLTD/thrift,NOMORECOFFEE/thrift,crisish/thrift,dsturnbull/thrift,jfarrell/thrift,windofthesky/thrift,SentientTechnologies/thrift,dsturnbull/thrift,collinmsn/thrift,yongju-hong/thrift,RobberPhex/thrift,bgould/thrift,zzmp/thrift,jfarrell/thrift,wfxiang08/thrift,windofthesky/thrift,SentientTechnologies/thrift,haruwo/thrift-with-java-annotation-support,Pertino/thrift,ahnqirage/thrift,SirWellington/thrift,akshaydeo/thrift,SirWellington/thrift,bitemyapp/thrift,ahnqirage/thrift,upfluence/thrift,guodongxiaren/thrift,SuperAwesomeLTD/thrift,wfxiang08/thrift,gadLinux/thrift,siemens/thrift,pinterest/thrift,eamosov/thrift,dcelasun/thrift,afds/thrift,collinmsn/thrift,guodongxiaren/thrift,afds/thrift,selaselah/thrift,EasonYi/thrift,authbox-lib/thrift,jpgneves/thrift,yongju-hong/thrift,elloray/thrift,SentientTechnologies/thrift,eonezhang/thrift,project-zerus/thrift,chentao/thrift,weweadsl/thrift,lion117/lib-thrift,rewardStyle/apache.thrift,yongju-hong/thrift,spicavigo/thrift,Pertino/thrift,akshaydeo/thrift,bitemyapp/thrift,dongjiaqiang/thrift,lion117/lib-thrift,bitfinder/thrift,bholbrook73/thrift,guodongxiaren/thrift,strava/thrift,pinterest/thrift,roshan/thrift,gadLinux/thrift,evanweible-wf/thrift,mway08/thrift,bufferoverflow/thrift,apache/thrift,crisish/thrift,cjmay/thrift,ykwd/thrift,NOMORECOFFEE/thrift,project-zerus/thrift,bitemyapp/thrift,joshuabezaleel/thrift,joshuabezaleel/thrift,afds/thrift,mindcandy/thrift,bitfinder/thrift,dsturnbull/thrift,jpgneves/thrift,jfarrell/thrift,jackscott/thrift,spicavigo/thrift,SuperAwesomeLTD/thrift,dcelasun/thrift,evanweible-wf/thrift,msonnabaum/thrift,dtmuller/thrift,wingedkiwi/thrift,3013216027/thrift,roshan/thrift,project-zerus/thrift,spicavigo/thrift,creker/thrift,bufferoverflow/thrift,NOMORECOFFEE/thrift,weweadsl/thrift,BluechipSystems/thrift,weweadsl/thrift,terminalcloud/thrift,strava/thrift,bitfinder/thrift,yongju-hong/thrift,pinterest/thrift,wingedkiwi/thrift,i/thrift,upfluence/thrift,JoeEnnever/thrift,Sean-Der/thrift,bforbis/thrift,bgould/thrift,dcelasun/thrift,upfluence/thrift,ochinchina/thrift,elloray/thrift,steven-sheffey-tungsten/thrift,huahang/thrift,bmiklautz/thrift,jpgneves/thrift,vashstorm/thrift,joshuabezaleel/thrift,Sean-Der/thrift,jeking3/thrift,authbox-lib/thrift,bitfinder/thrift,haruwo/thrift-with-java-annotation-support,3013216027/thrift,tanmaykm/thrift,elloray/thrift,jeking3/thrift,haruwo/thrift-with-java-annotation-support,project-zerus/thrift,SentientTechnologies/thrift,haruwo/thrift-with-java-annotation-support,mway08/thrift,roshan/thrift,reTXT/thrift,ijuma/thrift,prathik/thrift,markerickson-wf/thrift,gadLinux/thrift,dsturnbull/thrift,apache/thrift,project-zerus/thrift,cjmay/thrift,Jens-G/thrift,windofthesky/thrift,hcorg/thrift,creker/thrift,timse/thrift,fernandobt8/thrift,prashantv/thrift,terminalcloud/thrift,creker/thrift,ahnqirage/thrift,guodongxiaren/thrift,Jens-G/thrift,nsuke/thrift,Jimdo/thrift,joshuabezaleel/thrift,Sean-Der/thrift,jackscott/thrift,alfredtofu/thrift,reTXT/thrift,dwnld/thrift,wingedkiwi/thrift,roshan/thrift,akshaydeo/thrift,jfarrell/thrift,Jens-G/thrift,eamosov/thrift,yongju-hong/thrift,huahang/thrift,SirWellington/thrift,haruwo/thrift-with-java-annotation-support,bmiklautz/thrift,3013216027/thrift,crisish/thrift,evanweible-wf/thrift,dtmuller/thrift,steven-sheffey-tungsten/thrift,authbox-lib/thrift,markerickson-wf/thrift,jfarrell/thrift,collinmsn/thrift,eamosov/thrift,guodongxiaren/thrift,hcorg/thrift,rmhartog/thrift,jackscott/thrift,zhaorui1/thrift,Jimdo/thrift,vashstorm/thrift,bforbis/thrift,nsuke/thrift,creker/thrift,adamvduke/thrift-adamd,JoeEnnever/thrift,hcorg/thrift,collinmsn/thrift,3013216027/thrift,flandr/thrift,strava/thrift,prathik/thrift,NOMORECOFFEE/thrift,cjmay/thrift,flamholz/thrift,selaselah/thrift,roshan/thrift,gadLinux/thrift,strava/thrift,JoeEnnever/thrift,markerickson-wf/thrift,Jimdo/thrift,flandr/thrift,dcelasun/thrift,edvakf/thrift,hcorg/thrift,bmiklautz/thrift,SuperAwesomeLTD/thrift,ijuma/thrift,huahang/thrift,bforbis/thrift,zhaorui1/thrift,creker/thrift,jpgneves/thrift,evanweible-wf/thrift,steven-sheffey-tungsten/thrift,flamholz/thrift,SuperAwesomeLTD/thrift,koofr/thrift,SirWellington/thrift,SirWellington/thrift,wfxiang08/thrift,roshan/thrift,dsturnbull/thrift,Pertino/thrift,bmiklautz/thrift,siemens/thrift,flandr/thrift,markerickson-wf/thrift,x1957/thrift,Sean-Der/thrift,fernandobt8/thrift,dwnld/thrift,haruwo/thrift-with-java-annotation-support,steven-sheffey-tungsten/thrift,crisish/thrift,timse/thrift,gadLinux/thrift,weweadsl/thrift,creker/thrift,SuperAwesomeLTD/thrift,windofthesky/thrift,adamvduke/thrift-adamd,pinterest/thrift,bholbrook73/thrift,ykwd/thrift,rewardStyle/apache.thrift,tylertreat/thrift,dongjiaqiang/thrift,JoeEnnever/thrift,bmiklautz/thrift,gadLinux/thrift,JoeEnnever/thrift,JoeEnnever/thrift,wingedkiwi/thrift,zhaorui1/thrift,strava/thrift,guodongxiaren/thrift,strava/thrift,RobberPhex/thrift,ahnqirage/thrift,fernandobt8/thrift,mway08/thrift,upfluence/thrift,dsturnbull/thrift,wfxiang08/thrift,Pertino/thrift,rmhartog/thrift,rewardStyle/apache.thrift,eamosov/thrift,steven-sheffey-tungsten/thrift,afds/thrift,tanmaykm/thrift,weweadsl/thrift,nsuke/thrift,SuperAwesomeLTD/thrift,msonnabaum/thrift,weweadsl/thrift,steven-sheffey-tungsten/thrift,ykwd/thrift,selaselah/thrift,rmhartog/thrift,dcelasun/thrift,upfluence/thrift,ochinchina/thrift,apache/thrift,prathik/thrift,Jimdo/thrift,Jimdo/thrift,koofr/thrift,x1957/thrift,steven-sheffey-tungsten/thrift,3013216027/thrift,joshuabezaleel/thrift,guodongxiaren/thrift,hcorg/thrift,evanweible-wf/thrift,apache/thrift,rmhartog/thrift,bforbis/thrift,reTXT/thrift,prathik/thrift,crisish/thrift,ykwd/thrift,bholbrook73/thrift,SentientTechnologies/thrift,akshaydeo/thrift,BluechipSystems/thrift,spicavigo/thrift,dwnld/thrift,eamosov/thrift,alfredtofu/thrift,eonezhang/thrift,flandr/thrift,edvakf/thrift,ochinchina/thrift,koofr/thrift,chentao/thrift,ahnqirage/thrift,ykwd/thrift,wfxiang08/thrift,RobberPhex/thrift,adamvduke/thrift-adamd,bforbis/thrift,flandr/thrift,elloray/thrift,eamosov/thrift,tanmaykm/thrift,nsuke/thrift,ahnqirage/thrift,flamholz/thrift,RobberPhex/thrift,authbox-lib/thrift,nsuke/thrift,lion117/lib-thrift,steven-sheffey-tungsten/thrift,selaselah/thrift,tylertreat/thrift,x1957/thrift,bmiklautz/thrift,nsuke/thrift,eamosov/thrift,dongjiaqiang/thrift,timse/thrift,i/thrift,upfluence/thrift,BluechipSystems/thrift,creker/thrift,siemens/thrift,evanweible-wf/thrift,prathik/thrift,koofr/thrift,reTXT/thrift,koofr/thrift,dwnld/thrift,ochinchina/thrift,dcelasun/thrift,tylertreat/thrift,koofr/thrift,siemens/thrift,dtmuller/thrift,jackscott/thrift,fernandobt8/thrift,eamosov/thrift,timse/thrift,yongju-hong/thrift,upfluence/thrift,wingedkiwi/thrift,roshan/thrift,pinterest/thrift,prashantv/thrift,SirWellington/thrift,fernandobt8/thrift,collinmsn/thrift,EasonYi/thrift,dwnld/thrift,BluechipSystems/thrift,gadLinux/thrift,vashstorm/thrift,dongjiaqiang/thrift,SentientTechnologies/thrift,Sean-Der/thrift,bufferoverflow/thrift,siemens/thrift,elloray/thrift,bforbis/thrift,cjmay/thrift,jpgneves/thrift,3013216027/thrift,flandr/thrift,huahang/thrift,afds/thrift,ochinchina/thrift,joshuabezaleel/thrift,tylertreat/thrift,terminalcloud/thrift,Sean-Der/thrift,dongjiaqiang/thrift,vashstorm/thrift,alfredtofu/thrift,zhaorui1/thrift,afds/thrift,JoeEnnever/thrift,jeking3/thrift,creker/thrift,spicavigo/thrift,markerickson-wf/thrift,upfluence/thrift,chenbaihu/thrift,huahang/thrift,msonnabaum/thrift,bufferoverflow/thrift,bitfinder/thrift,BluechipSystems/thrift,Jimdo/thrift,Sean-Der/thrift,bgould/thrift,lion117/lib-thrift,wingedkiwi/thrift,jeking3/thrift,project-zerus/thrift,edvakf/thrift,SuperAwesomeLTD/thrift,bgould/thrift,mway08/thrift,theopolis/thrift,chenbaihu/thrift,huahang/thrift,collinmsn/thrift,akshaydeo/thrift,bufferoverflow/thrift,authbox-lib/thrift,springheeledjak/thrift,hcorg/thrift,edvakf/thrift,crisish/thrift,dongjiaqiang/thrift,mway08/thrift,nsuke/thrift,spicavigo/thrift,prashantv/thrift,cjmay/thrift,chentao/thrift,pinterest/thrift,flamholz/thrift,Fitbit/thrift,alfredtofu/thrift,springheeledjak/thrift,mway08/thrift,Fitbit/thrift,joshuabezaleel/thrift,Jimdo/thrift,msonnabaum/thrift,huahang/thrift,ykwd/thrift,selaselah/thrift,authbox-lib/thrift,crisish/thrift,msonnabaum/thrift,alfredtofu/thrift,mindcandy/thrift,chentao/thrift,selaselah/thrift,zzmp/thrift,haruwo/thrift-with-java-annotation-support,Fitbit/thrift,Sean-Der/thrift,chentao/thrift,Pertino/thrift,x1957/thrift,theopolis/thrift,zhaorui1/thrift,prashantv/thrift,evanweible-wf/thrift,bgould/thrift,mindcandy/thrift,dongjiaqiang/thrift,wingedkiwi/thrift,springheeledjak/thrift,zhaorui1/thrift,siemens/thrift,authbox-lib/thrift,RobberPhex/thrift,jeking3/thrift,EasonYi/thrift,springheeledjak/thrift,dsturnbull/thrift,afds/thrift,alfredtofu/thrift,bforbis/thrift,spicavigo/thrift,ykwd/thrift,Jimdo/thrift,EasonYi/thrift,prathik/thrift,spicavigo/thrift,akshaydeo/thrift,guodongxiaren/thrift,wfxiang08/thrift,elloray/thrift,bholbrook73/thrift,reTXT/thrift,jackscott/thrift,dtmuller/thrift,lion117/lib-thrift,zzmp/thrift,nsuke/thrift,nsuke/thrift,SirWellington/thrift,spicavigo/thrift,RobberPhex/thrift,SentientTechnologies/thrift,jeking3/thrift,Jens-G/thrift,theopolis/thrift,adamvduke/thrift-adamd,mindcandy/thrift,windofthesky/thrift,3013216027/thrift,rewardStyle/apache.thrift,jpgneves/thrift,bholbrook73/thrift,edvakf/thrift,ijuma/thrift,ahnqirage/thrift,eonezhang/thrift,RobberPhex/thrift,eamosov/thrift,steven-sheffey-tungsten/thrift,rmhartog/thrift,cjmay/thrift,prathik/thrift,dongjiaqiang/thrift,strava/thrift,flamholz/thrift,RobberPhex/thrift,ochinchina/thrift,huahang/thrift,yongju-hong/thrift,mway08/thrift,Pertino/thrift,reTXT/thrift,jfarrell/thrift,cjmay/thrift,crisish/thrift,i/thrift,fernandobt8/thrift,ijuma/thrift,tanmaykm/thrift,dcelasun/thrift,Fitbit/thrift,afds/thrift,bholbrook73/thrift,evanweible-wf/thrift,upfluence/thrift,x1957/thrift,tanmaykm/thrift,bitfinder/thrift,reTXT/thrift,tylertreat/thrift,wfxiang08/thrift,chentao/thrift,EasonYi/thrift,bforbis/thrift,edvakf/thrift,wfxiang08/thrift,creker/thrift,flamholz/thrift,fernandobt8/thrift,i/thrift,edvakf/thrift,eonezhang/thrift,siemens/thrift,ijuma/thrift,zzmp/thrift,eonezhang/thrift,eamosov/thrift,edvakf/thrift,rmhartog/thrift,Jens-G/thrift,RobberPhex/thrift,3013216027/thrift,koofr/thrift,dsturnbull/thrift,Fitbit/thrift,dcelasun/thrift,mindcandy/thrift,yongju-hong/thrift,apache/thrift,prashantv/thrift,yongju-hong/thrift,jfarrell/thrift,dwnld/thrift,apache/thrift,gadLinux/thrift,jfarrell/thrift,x1957/thrift,eonezhang/thrift,bitemyapp/thrift,Jens-G/thrift,bholbrook73/thrift,gadLinux/thrift,bmiklautz/thrift,rewardStyle/apache.thrift,wfxiang08/thrift,haruwo/thrift-with-java-annotation-support,flamholz/thrift,SentientTechnologies/thrift,lion117/lib-thrift,SirWellington/thrift,weweadsl/thrift,chenbaihu/thrift,adamvduke/thrift-adamd,afds/thrift,bforbis/thrift,RobberPhex/thrift,Jens-G/thrift,selaselah/thrift,steven-sheffey-tungsten/thrift,bufferoverflow/thrift,haruwo/thrift-with-java-annotation-support,adamvduke/thrift-adamd,ochinchina/thrift,apache/thrift,edvakf/thrift,project-zerus/thrift,project-zerus/thrift,hcorg/thrift,chenbaihu/thrift,guodongxiaren/thrift,theopolis/thrift,strava/thrift,pinterest/thrift,strava/thrift,huahang/thrift,dwnld/thrift,apache/thrift,Jimdo/thrift,springheeledjak/thrift,SentientTechnologies/thrift,zzmp/thrift,evanweible-wf/thrift,cjmay/thrift,vashstorm/thrift,theopolis/thrift,JoeEnnever/thrift,Jens-G/thrift,BluechipSystems/thrift,strava/thrift,gadLinux/thrift,elloray/thrift,ahnqirage/thrift,eonezhang/thrift,mindcandy/thrift,weweadsl/thrift,ijuma/thrift,dongjiaqiang/thrift,siemens/thrift,vashstorm/thrift,roshan/thrift,bgould/thrift,bmiklautz/thrift,haruwo/thrift-with-java-annotation-support,Fitbit/thrift,eamosov/thrift,i/thrift,Pertino/thrift,jackscott/thrift,flamholz/thrift,elloray/thrift,NOMORECOFFEE/thrift,siemens/thrift,BluechipSystems/thrift,chenbaihu/thrift,huahang/thrift,eonezhang/thrift,chenbaihu/thrift,chentao/thrift,eonezhang/thrift,terminalcloud/thrift,alfredtofu/thrift,nsuke/thrift,Fitbit/thrift,siemens/thrift,chenbaihu/thrift,prashantv/thrift,adamvduke/thrift-adamd,Fitbit/thrift,yongju-hong/thrift,rmhartog/thrift,bholbrook73/thrift,ochinchina/thrift,jfarrell/thrift,3013216027/thrift,Jens-G/thrift,tylertreat/thrift,RobberPhex/thrift,i/thrift,mway08/thrift,weweadsl/thrift,zzmp/thrift,tylertreat/thrift,Fitbit/thrift,chentao/thrift,roshan/thrift,adamvduke/thrift-adamd,markerickson-wf/thrift,springheeledjak/thrift,reTXT/thrift,joshuabezaleel/thrift,markerickson-wf/thrift,i/thrift,akshaydeo/thrift,dcelasun/thrift,dwnld/thrift,Jens-G/thrift,cjmay/thrift,dtmuller/thrift,collinmsn/thrift,project-zerus/thrift,tanmaykm/thrift,eamosov/thrift,nsuke/thrift,crisish/thrift,cjmay/thrift,windofthesky/thrift,dtmuller/thrift,eonezhang/thrift,joshuabezaleel/thrift,fernandobt8/thrift,selaselah/thrift,RobberPhex/thrift,terminalcloud/thrift,springheeledjak/thrift,rmhartog/thrift,akshaydeo/thrift,ahnqirage/thrift,apache/thrift,bforbis/thrift,EasonYi/thrift,lion117/lib-thrift,dtmuller/thrift,mindcandy/thrift,alfredtofu/thrift,prashantv/thrift,nsuke/thrift,bforbis/thrift,strava/thrift,mindcandy/thrift,mindcandy/thrift,bufferoverflow/thrift,bitemyapp/thrift,yongju-hong/thrift,bitfinder/thrift,dtmuller/thrift,selaselah/thrift,yongju-hong/thrift,SirWellington/thrift,ijuma/thrift,NOMORECOFFEE/thrift,collinmsn/thrift,eonezhang/thrift,wingedkiwi/thrift,dcelasun/thrift,authbox-lib/thrift,authbox-lib/thrift,ochinchina/thrift,edvakf/thrift,edvakf/thrift,vashstorm/thrift,zzmp/thrift,prathik/thrift,tanmaykm/thrift,EasonYi/thrift,Jimdo/thrift,yongju-hong/thrift,i/thrift,bitfinder/thrift,elloray/thrift,terminalcloud/thrift,zhaorui1/thrift,collinmsn/thrift,prashantv/thrift,jackscott/thrift,ahnqirage/thrift,hcorg/thrift,Pertino/thrift,cjmay/thrift,jeking3/thrift,jackscott/thrift,bufferoverflow/thrift,dsturnbull/thrift,gadLinux/thrift,dcelasun/thrift,rewardStyle/apache.thrift,Sean-Der/thrift,terminalcloud/thrift,msonnabaum/thrift,SirWellington/thrift,Jimdo/thrift,upfluence/thrift,x1957/thrift,reTXT/thrift,jpgneves/thrift,dcelasun/thrift,flamholz/thrift,koofr/thrift,markerickson-wf/thrift,jfarrell/thrift,bgould/thrift,pinterest/thrift,creker/thrift,bitfinder/thrift,eamosov/thrift,weweadsl/thrift,spicavigo/thrift,EasonYi/thrift,apache/thrift,afds/thrift,bitemyapp/thrift,dsturnbull/thrift,adamvduke/thrift-adamd,theopolis/thrift,SentientTechnologies/thrift,yongju-hong/thrift,chentao/thrift,x1957/thrift,eamosov/thrift,bforbis/thrift,jeking3/thrift,mway08/thrift,prashantv/thrift,joshuabezaleel/thrift,x1957/thrift,fernandobt8/thrift,project-zerus/thrift,timse/thrift,bitemyapp/thrift,wfxiang08/thrift,timse/thrift,collinmsn/thrift,EasonYi/thrift,dcelasun/thrift,bholbrook73/thrift,timse/thrift,zhaorui1/thrift,ochinchina/thrift,apache/thrift,reTXT/thrift,dwnld/thrift,wingedkiwi/thrift,BluechipSystems/thrift,dongjiaqiang/thrift,tylertreat/thrift,selaselah/thrift,Jens-G/thrift,strava/thrift,strava/thrift,BluechipSystems/thrift,bmiklautz/thrift,steven-sheffey-tungsten/thrift,reTXT/thrift,apache/thrift,bgould/thrift,eamosov/thrift,SentientTechnologies/thrift,bitemyapp/thrift,cjmay/thrift,chentao/thrift,bufferoverflow/thrift,lion117/lib-thrift,zzmp/thrift,alfredtofu/thrift,bgould/thrift,prathik/thrift,bholbrook73/thrift,JoeEnnever/thrift,wingedkiwi/thrift,bitemyapp/thrift,apache/thrift,alfredtofu/thrift,i/thrift,markerickson-wf/thrift
32007a555cc2d10207e65a163f6ab809534d47e4
// // m3_api_defs.h // // Created by Volodymyr Shymanskyy on 12/20/19. // Copyright © 2019 Volodymyr Shymanskyy. All rights reserved. // #ifndef m3_api_defs_h #define m3_api_defs_h #include "m3_core.h" #define m3ApiReturnType(TYPE) TYPE* raw_return = ((TYPE*) (_sp)); #define m3ApiGetArg(TYPE, NAME) TYPE NAME = * ((TYPE *) (_sp++)); #define m3ApiGetArgMem(TYPE, NAME) TYPE NAME = (TYPE) (_mem + * (u32 *) _sp++); #define m3ApiRawFunction(NAME) m3ret_t NAME (IM3Runtime runtime, u64 * _sp, u8 * _mem) #define m3ApiReturn(VALUE) { *raw_return = (VALUE); return NULL; } #endif /* m3_api_defs_h */
// // m3_api_defs.h // // Created by Volodymyr Shymanskyy on 12/20/19. // Copyright © 2019 Volodymyr Shymanskyy. All rights reserved. // #ifndef m3_api_defs_h #define m3_api_defs_h #include "m3_core.h" #define m3ApiReturnType(TYPE) TYPE* raw_return = ((TYPE*) (_sp)); #define m3ApiGetArg(TYPE, NAME) TYPE NAME = * ((TYPE *) (_sp++)); #define m3ApiGetArgMem(TYPE, NAME) TYPE NAME = (TYPE) (_mem + * (u32 *) _sp++); #define m3ApiRawFunction(NAME) void NAME (IM3Runtime runtime, u64 * _sp, u8 * _mem) #define m3ApiReturn(VALUE) { *raw_return = (VALUE); return; } #endif /* m3_api_defs_h */
--- +++ @@ -14,7 +14,7 @@ #define m3ApiGetArg(TYPE, NAME) TYPE NAME = * ((TYPE *) (_sp++)); #define m3ApiGetArgMem(TYPE, NAME) TYPE NAME = (TYPE) (_mem + * (u32 *) _sp++); -#define m3ApiRawFunction(NAME) void NAME (IM3Runtime runtime, u64 * _sp, u8 * _mem) -#define m3ApiReturn(VALUE) { *raw_return = (VALUE); return; } +#define m3ApiRawFunction(NAME) m3ret_t NAME (IM3Runtime runtime, u64 * _sp, u8 * _mem) +#define m3ApiReturn(VALUE) { *raw_return = (VALUE); return NULL; } #endif /* m3_api_defs_h */
Fix type missmatch (crucial for wasienv)
mit
wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3
3e69b820d360bd96ce3c8c6714835115847c49a4
#include <iostream> #include <vector> #include <stdlib.h> template <typename T> void swap(T& a, T& b) { T tmp = b; b = a; a = tmp; } template <typename T> T bubblesort(T& vec) { auto f = vec.begin(); auto s = vec.begin(); ++s; bool swapped = false; while (s != vec.end()) { if (*f > *s) { swap(*f, *s); swapped = true; } ++f; ++s; } if (swapped) { bubblesort(vec); } return vec; }
#include <iostream> #include <vector> #include <stdlib.h> template <typename T> void swap(T& a, T& b) { T tmp = b; b = a; a = tmp; } template <typename T> void bubblesort(T& vec) { auto f = vec.begin(); auto s = vec.begin(); ++s; bool swapped = false; while (s != vec.end()) { if (*f > *s) { swap(*f, *s); swapped = true; } ++f; ++s; } if (swapped) { bubblesort(vec); } }
--- +++ @@ -10,7 +10,7 @@ } template <typename T> -void bubblesort(T& vec) { +T bubblesort(T& vec) { auto f = vec.begin(); auto s = vec.begin(); ++s; @@ -25,4 +25,5 @@ if (swapped) { bubblesort(vec); } + return vec; }
Bubblesort: Return the sorted object as well as sort it in-place
bsd-3-clause
AeroNotix/algostructure,AeroNotix/algostructure,AeroNotix/algostructure,AeroNotix/algostructure,AeroNotix/algostructure,AeroNotix/algostructure
3699f58d3f06fee8b4b0e096f32b699c518d9baf
/* * Copyright (c) 2012 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. */ #include <errno.h> #include <pthread.h> #include <unistd.h> #include "native_client/src/untrusted/nacl/tls.h" /* * libstdc++ makes minimal use of pthread_key_t stuff. */ #undef PTHREAD_KEYS_MAX #define PTHREAD_KEYS_MAX 32 #define NC_TSD_NO_MORE_KEYS irt_tsd_no_more_keys() static void irt_tsd_no_more_keys(void) { static const char msg[] = "IRT: too many pthread keys\n"; write(2, msg, sizeof msg - 1); } #define NACL_IN_IRT /* @IGNORE_LINES_FOR_CODE_HYGIENE[2] */ #include "native_client/src/untrusted/pthread/nc_init_private.c" #include "native_client/src/untrusted/pthread/nc_thread.c"
/* * Copyright (c) 2012 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. */ #include <errno.h> #include <pthread.h> #include <unistd.h> #include "native_client/src/untrusted/nacl/tls.h" /* * libstdc++ makes minimal use of pthread_key_t stuff. */ #undef PTHREAD_KEYS_MAX #define PTHREAD_KEYS_MAX 16 #define NC_TSD_NO_MORE_KEYS irt_tsd_no_more_keys() static void irt_tsd_no_more_keys(void) { static const char msg[] = "IRT: too many pthread keys\n"; write(2, msg, sizeof msg - 1); } #define NACL_IN_IRT /* @IGNORE_LINES_FOR_CODE_HYGIENE[2] */ #include "native_client/src/untrusted/pthread/nc_init_private.c" #include "native_client/src/untrusted/pthread/nc_thread.c"
--- +++ @@ -15,7 +15,7 @@ */ #undef PTHREAD_KEYS_MAX -#define PTHREAD_KEYS_MAX 16 +#define PTHREAD_KEYS_MAX 32 #define NC_TSD_NO_MORE_KEYS irt_tsd_no_more_keys() static void irt_tsd_no_more_keys(void) {
Increase the number of pthread keys available to the IRT The Mojo EDK uses an additional key for thread-local storage and is now necessary to bring up IPC in Chrome. This is apparently enough to push us over the 16 key limit in some cases. Doubling to 32 to leave some room for further expansion. BUG=https://code.google.com/p/chromium/issues/detail?id=612500 Review-Url: https://codereview.chromium.org/2050043004
bsd-3-clause
sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client
33ea6a02332d0944150e9445a584d6f26718509b
// // APLifecycleHooks.h // LoyaltyRtr // // Created by David Benko on 7/22/14. // Copyright (c) 2014 David Benko. All rights reserved. // #import <Foundation/Foundation.h> #define __VERBOSE @interface APLifecycleHooks : NSObject + (void)connectionWillStart:(NSURLRequest * (^)(NSURLRequest * req))connectionWillStartCallback didStart:(void (^)(NSURLRequest * req, NSURLConnection *conn))connectionDidStartCallback; + (void)connectionReceievedResponse:(void (^)(NSURLConnection *connection, NSURLResponse *response))connectionReceievedResponseCallback; + (void)checkConnectionResponse:(BOOL (^)(NSURLResponse *response, NSError **error))checkConnectionResponseCallback; + (void)connectionFinished:(BOOL (^)(NSURLResponse *response, NSMutableData *downloadedData, NSError *error))connectionDidFinishCallback; @end
// // APLifecycleHooks.h // LoyaltyRtr // // Created by David Benko on 7/22/14. // Copyright (c) 2014 David Benko. All rights reserved. // #import <Foundation/Foundation.h> @interface APLifecycleHooks : NSObject +(void)setSDKLogging:(BOOL)shouldLog; +(void)synchronousConnectionFinished:(void (^)(NSData *downloadedData, NSError *error))hook; +(void)asyncConnectionStarted:(void (^)(NSURLRequest * req, NSURLConnection *conn))hook; +(void)asyncConnectionFinished:(BOOL (^)(NSMutableData *downloadedData, NSError *error))hook; @end
--- +++ @@ -8,9 +8,12 @@ #import <Foundation/Foundation.h> +#define __VERBOSE + @interface APLifecycleHooks : NSObject -+(void)setSDKLogging:(BOOL)shouldLog; -+(void)synchronousConnectionFinished:(void (^)(NSData *downloadedData, NSError *error))hook; -+(void)asyncConnectionStarted:(void (^)(NSURLRequest * req, NSURLConnection *conn))hook; -+(void)asyncConnectionFinished:(BOOL (^)(NSMutableData *downloadedData, NSError *error))hook; + ++ (void)connectionWillStart:(NSURLRequest * (^)(NSURLRequest * req))connectionWillStartCallback didStart:(void (^)(NSURLRequest * req, NSURLConnection *conn))connectionDidStartCallback; ++ (void)connectionReceievedResponse:(void (^)(NSURLConnection *connection, NSURLResponse *response))connectionReceievedResponseCallback; ++ (void)checkConnectionResponse:(BOOL (^)(NSURLResponse *response, NSError **error))checkConnectionResponseCallback; ++ (void)connectionFinished:(BOOL (^)(NSURLResponse *response, NSMutableData *downloadedData, NSError *error))connectionDidFinishCallback; @end
Update method defs for v7
mit
AnyPresence/APLifecycleHooks
08d54e91deb4163df649161abadd5de89852c474
// // SWXSLTransform.h // This file is part of the "SWXMLMapping" project, and is distributed under the MIT License. // // Created by Samuel Williams on 23/02/12. // Copyright (c) 2012 Samuel Williams. All rights reserved. // #import <Foundation/Foundation.h> @interface SWXSLTransform : NSObject { NSURL * _baseURL; void * _stylesheet; } /// The base URL that was used to load the stylesheet: @property(nonatomic,strong) NSURL * baseURL; - (instancetype) init NS_UNAVAILABLE; /// Initialize the XSL stylesheet from the given URL: - (instancetype) initWithURL:(NSURL *)url NS_DESIGNATED_INITIALIZER; /// Use the XSL stylesheet to process a string containing XML with a set of arguments. /// Arguments are typically evaluated by the XSLT processor, so, for example, strings must be passed with an additional set of quotes. - (NSData *) processDocument:(NSString *)xmlBuffer arguments:(NSDictionary *)arguments; @end
// // SWXSLTransform.h // This file is part of the "SWXMLMapping" project, and is distributed under the MIT License. // // Created by Samuel Williams on 23/02/12. // Copyright (c) 2012 Samuel Williams. All rights reserved. // #import <Foundation/Foundation.h> @interface SWXSLTransform : NSObject { NSURL * _baseURL; void * _stylesheet; } /// The base URL that was used to load the stylesheet: @property(nonatomic,strong) NSURL * baseURL; /// Initialize the XSL stylesheet from the given URL: - (instancetype) initWithURL:(NSURL *)url NS_DESIGNATED_INITIALIZER; /// Use the XSL stylesheet to process a string containing XML with a set of arguments. /// Arguments are typically evaluated by the XSLT processor, so, for example, strings must be passed with an additional set of quotes. - (NSData *) processDocument:(NSString *)xmlBuffer arguments:(NSDictionary *)arguments; @end
--- +++ @@ -16,6 +16,8 @@ /// The base URL that was used to load the stylesheet: @property(nonatomic,strong) NSURL * baseURL; +- (instancetype) init NS_UNAVAILABLE; + /// Initialize the XSL stylesheet from the given URL: - (instancetype) initWithURL:(NSURL *)url NS_DESIGNATED_INITIALIZER;
Mark init as being unavailable.
mit
oriontransfer/SWXMLMapping
40400617eba718214ec442d495ec9869c471f839
// Copyright 2012-2014 UX Productivity Pty Ltd // // 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 DocFormats_DFCommon_h #define DocFormats_DFCommon_h #include "DFTypes.h" #include <assert.h> #include <ctype.h> #include <errno.h> #include <fcntl.h> #include <iconv.h> #include <limits.h> #include <math.h> #include <stdarg.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #ifdef WIN32 #include <io.h> #define open _open #define creat _creat #define read _read #define write _write #define close _close #define snprintf _snprintf #define vsnprintf _vsnprintf #define strcasecmp _stricmp #define strncasecmp _strnicmp #define strdup _strdup #else // not WIN32 #include <dirent.h> #include <unistd.h> #endif #endif
// Copyright 2012-2014 UX Productivity Pty Ltd // // 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 DocFormats_DFCommon_h #define DocFormats_DFCommon_h #include <assert.h> #include <ctype.h> #include <dirent.h> #include <errno.h> #include <fcntl.h> #include <iconv.h> #include <limits.h> #include <math.h> #include <stdarg.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #endif
--- +++ @@ -15,9 +15,10 @@ #ifndef DocFormats_DFCommon_h #define DocFormats_DFCommon_h +#include "DFTypes.h" + #include <assert.h> #include <ctype.h> -#include <dirent.h> #include <errno.h> #include <fcntl.h> #include <iconv.h> @@ -30,6 +31,22 @@ #include <string.h> #include <sys/stat.h> #include <sys/types.h> + +#ifdef WIN32 +#include <io.h> +#define open _open +#define creat _creat +#define read _read +#define write _write +#define close _close +#define snprintf _snprintf +#define vsnprintf _vsnprintf +#define strcasecmp _stricmp +#define strncasecmp _strnicmp +#define strdup _strdup +#else // not WIN32 +#include <dirent.h> #include <unistd.h> +#endif #endif
Win32: Add macros for common functions like strdup For some reason, Microsoft have an aversion to including functions like strdup, open, read, write, and close that are part of the POSIX standard, but still keep them present with a _ prefix. This commit adds #defines for some of these functions so that we can keep using the existing code without having to add all lots of ugly underscores everywhere.
apache-2.0
corinthia/corinthia-docformats,apache/incubator-corinthia,corinthia/corinthia-docformats,apache/incubator-corinthia,corinthia/corinthia-docformats,apache/incubator-corinthia,apache/incubator-corinthia,apache/incubator-corinthia,apache/incubator-corinthia,corinthia/corinthia-docformats,corinthia/corinthia-docformats,apache/incubator-corinthia
44757e8d5b49d27a1dce19039100b9e2d2196ec9
#ifndef __PDFIUM_RUBY_H__ #define __PDFIUM_RUBY_H__ extern "C" { #include "ruby.h" } // Inspired by https://github.com/jasonroelofs/rice/blob/1740a6d12c99fce8c21eda3c5385738318ab9172/rice/detail/ruby.hpp#L33-L37 // Casts C functions into a type that C++ is happy calling extern "C" typedef VALUE (*CPP_RUBY_METHOD_FUNC)(ANYARGS); void Define_Document(); void Define_Page(); void Define_PageSet(); #endif
extern "C" { #include "ruby.h" } void Define_Document(); void Define_Page(); void Define_PageSet();
--- +++ @@ -1,7 +1,16 @@ +#ifndef __PDFIUM_RUBY_H__ +#define __PDFIUM_RUBY_H__ + extern "C" { #include "ruby.h" } +// Inspired by https://github.com/jasonroelofs/rice/blob/1740a6d12c99fce8c21eda3c5385738318ab9172/rice/detail/ruby.hpp#L33-L37 +// Casts C functions into a type that C++ is happy calling +extern "C" typedef VALUE (*CPP_RUBY_METHOD_FUNC)(ANYARGS); + void Define_Document(); void Define_Page(); void Define_PageSet(); + +#endif
Create a type to cast Ruby's C functions to a thing C++ is happy with.
mit
documentcloud/pdfshaver,documentcloud/pdfshaver,documentcloud/pdfshaver
f57b70c85808c0946e63d87f7947fb12d60fe23a
/* ------------------------------------------------------------------------------- Name: FPL-Demo | Console Description: A Hello-World Console Application testing Console Output/Input Requirements: No requirements Author: Torsten Spaete Changelog: ## 2018-04-23: - Initial creation of this description block - Changed from C++ to C99 - Forced Visual-Studio-Project to compile in C always - Added read char input ------------------------------------------------------------------------------- */ #define FPL_IMPLEMENTATION #define FPL_NO_WINDOW #define FPL_NO_VIDEO #define FPL_NO_AUDIO #include <final_platform_layer.h> int main(int argc, char *args[]) { if (fplPlatformInit(fplInitFlags_All, fpl_null)) { fplConsoleOut("Hello World\n"); fplConsoleFormatOut("%s %s %d\n", "Hello", "World", 42); fplConsoleError("Error: Hello World!\n"); fplConsoleFormatError("Error: %s %s %d!\n", "Hello", "World", 42); fplConsoleOut("Press enter a key: "); int key = fplConsoleWaitForCharInput(); fplConsoleFormatOut("You pressed '%c'\n", key); fplPlatformRelease(); } return 0; }
/* ------------------------------------------------------------------------------- Name: FPL-Demo | Console Description: A Hello-World Console Application testing Console Output/Input Requirements: No requirements Author: Torsten Spaete Changelog: ## 2018-04-23: - Initial creation of this description block - Changed from C++ to C99 - Forced Visual-Studio-Project to compile in C always - Added read char input ------------------------------------------------------------------------------- */ #define FPL_IMPLEMENTATION #define FPL_NO_WINDOW #define FPL_NO_VIDEO #define FPL_NO_AUDIO #include <final_platform_layer.h> int main(int argc, char *args[]) { if (fplPlatformInit(fplInitFlags_All, NULL)) { fplConsoleOut("Hello World\n"); fplConsoleFormatOut("%s %s %d\n", "Hello", "World", 42); fplConsoleError("Error: Hello World!\n"); fplConsoleFormatError("Error: %s %s %d!\n", "Hello", "World", 42); fplConsoleOut("Press enter a key: "); int key = fplConsoleWaitForCharInput(); fplConsoleFormatOut("You pressed '%c'\n", key); fplPlatformRelease(); } return 0; }
--- +++ @@ -24,7 +24,7 @@ #include <final_platform_layer.h> int main(int argc, char *args[]) { - if (fplPlatformInit(fplInitFlags_All, NULL)) { + if (fplPlatformInit(fplInitFlags_All, fpl_null)) { fplConsoleOut("Hello World\n"); fplConsoleFormatOut("%s %s %d\n", "Hello", "World", 42); fplConsoleError("Error: Hello World!\n");
Use fpl_null instead of NULL in console demo
mit
f1nalspace/final_game_tech,f1nalspace/final_game_tech,f1nalspace/final_game_tech
9f4f6bdacbc60fd318fb56c587467cf18b1375fb
#ifndef _WINDOW_H_ #define _WINDOW_H_ #include <string> #include <iostream> #include <cstdlib> class Window { std::string title; public: Window(const std::string& title): title(title) {} virtual void handle() = 0; void drawTitle() { #ifdef _WIN32 std::system("cls"); #else //assuming linux, yeah, I know std::system("clear"); #endif std::cout << " " << title << std::endl; std::cout << "================================" << std::endl; } std::string readCommand(const std::string& prompt) { std::cout << prompt; std::string cmd; std::getline(std::cin,cmd); return cmd; } std::string readCommand() { return readCommand("> "); } }; #endif
#ifndef _WINDOW_H_ #define _WINDOW_H_ #include <string> #include <iostream> class Window { std::string title; public: Window(const std::string& title): title(title) {} virtual void handle() = 0; void drawTitle() { //#ifdef _WIN32 //std::system("cls"); //#else //assuming linux, yeah, I know //std::system("clear"); //#endif std::cout << " " << title << std::endl; std::cout << "================================" << std::endl; } std::string readCommand(const std::string& prompt) { std::cout << prompt; std::string cmd; std::cin >> cmd; return cmd; } std::string readCommand() { return readCommand("> "); } }; #endif
--- +++ @@ -2,24 +2,25 @@ #define _WINDOW_H_ #include <string> #include <iostream> +#include <cstdlib> class Window { std::string title; public: Window(const std::string& title): title(title) {} virtual void handle() = 0; void drawTitle() { -//#ifdef _WIN32 - //std::system("cls"); -//#else //assuming linux, yeah, I know - //std::system("clear"); -//#endif +#ifdef _WIN32 + std::system("cls"); +#else //assuming linux, yeah, I know + std::system("clear"); +#endif std::cout << " " << title << std::endl; std::cout << "================================" << std::endl; } std::string readCommand(const std::string& prompt) { std::cout << prompt; std::string cmd; - std::cin >> cmd; + std::getline(std::cin,cmd); return cmd; } std::string readCommand() {
Enable clearing, use getline to read empty lines
mit
nyz93/advertapp,nyz93/advertapp
3f0057466acce1d8983cf0b6b8ef7abbe084f3f0
/* * mbedtls_device.h ******************************************************************************* * Copyright (c) 2017, STMicroelectronics * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef MBEDTLS_DEVICE_H #define MBEDTLS_DEVICE_H /* FIXME: Don't enable AES hardware acceleration until issue #4928 is fixed. * (https://github.com/ARMmbed/mbed-os/issues/4928) */ /* #define MBEDTLS_AES_ALT */ /* FIXME: Don't enable SHA1, SHA256 and MD5 hardware acceleration until issue * #5079 is fixed. (https://github.com/ARMmbed/mbed-os/issues/5079) */ /* #define MBEDTLS_SHA256_ALT */ /* #define MBEDTLS_SHA1_ALT */ /* #define MBEDTLS_MD5_ALT */ #endif /* MBEDTLS_DEVICE_H */
/* * mbedtls_device.h ******************************************************************************* * Copyright (c) 2017, STMicroelectronics * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef MBEDTLS_DEVICE_H #define MBEDTLS_DEVICE_H /* FIXME: Don't enable AES hardware acceleration until issue #4928 is fixed. * (https://github.com/ARMmbed/mbed-os/issues/4928) */ /* #define MBEDTLS_AES_ALT */ #define MBEDTLS_SHA256_ALT #define MBEDTLS_SHA1_ALT #define MBEDTLS_MD5_ALT #endif /* MBEDTLS_DEVICE_H */
--- +++ @@ -24,10 +24,12 @@ * (https://github.com/ARMmbed/mbed-os/issues/4928) */ /* #define MBEDTLS_AES_ALT */ -#define MBEDTLS_SHA256_ALT +/* FIXME: Don't enable SHA1, SHA256 and MD5 hardware acceleration until issue + * #5079 is fixed. (https://github.com/ARMmbed/mbed-os/issues/5079) */ +/* #define MBEDTLS_SHA256_ALT */ -#define MBEDTLS_SHA1_ALT +/* #define MBEDTLS_SHA1_ALT */ -#define MBEDTLS_MD5_ALT +/* #define MBEDTLS_MD5_ALT */ #endif /* MBEDTLS_DEVICE_H */
mbedtls: Disable MD5, SHA1, SHA256 HW ACC for STM32F439xI STM32F439xI-family MD5, SHA1 and SHA256 hardware acceleration occasionally produces incorrect output (#5079). Don't enable MD5, SHA1 and SHA256 HW acceleration on STM32F439xI-family targets by default until issue #5079 is fixed.
apache-2.0
mazimkhan/mbed-os,mbedmicro/mbed,infinnovation/mbed-os,betzw/mbed-os,ryankurte/mbed-os,karsev/mbed-os,ryankurte/mbed-os,mbedmicro/mbed,infinnovation/mbed-os,karsev/mbed-os,nRFMesh/mbed-os,karsev/mbed-os,c1728p9/mbed-os,catiedev/mbed-os,c1728p9/mbed-os,karsev/mbed-os,karsev/mbed-os,Archcady/mbed-os,andcor02/mbed-os,betzw/mbed-os,mazimkhan/mbed-os,nRFMesh/mbed-os,andcor02/mbed-os,nRFMesh/mbed-os,mazimkhan/mbed-os,Archcady/mbed-os,mbedmicro/mbed,catiedev/mbed-os,kjbracey-arm/mbed,CalSol/mbed,andcor02/mbed-os,catiedev/mbed-os,CalSol/mbed,HeadsUpDisplayInc/mbed,nRFMesh/mbed-os,andcor02/mbed-os,c1728p9/mbed-os,betzw/mbed-os,nRFMesh/mbed-os,infinnovation/mbed-os,HeadsUpDisplayInc/mbed,mazimkhan/mbed-os,Archcady/mbed-os,Archcady/mbed-os,c1728p9/mbed-os,HeadsUpDisplayInc/mbed,kjbracey-arm/mbed,kjbracey-arm/mbed,mbedmicro/mbed,c1728p9/mbed-os,mazimkhan/mbed-os,infinnovation/mbed-os,betzw/mbed-os,mazimkhan/mbed-os,ryankurte/mbed-os,betzw/mbed-os,kjbracey-arm/mbed,karsev/mbed-os,ryankurte/mbed-os,Archcady/mbed-os,mbedmicro/mbed,catiedev/mbed-os,CalSol/mbed,HeadsUpDisplayInc/mbed,catiedev/mbed-os,HeadsUpDisplayInc/mbed,betzw/mbed-os,ryankurte/mbed-os,infinnovation/mbed-os,andcor02/mbed-os,c1728p9/mbed-os,catiedev/mbed-os,CalSol/mbed,ryankurte/mbed-os,infinnovation/mbed-os,HeadsUpDisplayInc/mbed,Archcady/mbed-os,CalSol/mbed,nRFMesh/mbed-os,andcor02/mbed-os,CalSol/mbed
f928e7a707a09d471881dc77e46992a774ae5b44
/* * LZO 1x decompression * copyright (c) 2006 Reimar Doeffinger * * This file is part of FFmpeg. * * FFmpeg 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. * * FFmpeg 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 FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef LZO_H #define LZO_H #define LZO_INPUT_DEPLETED 1 #define LZO_OUTPUT_FULL 2 #define LZO_INVALID_BACKPTR 4 #define LZO_ERROR 8 #define LZO_INPUT_PADDING 4 #define LZO_OUTPUT_PADDING 12 int lzo1x_decode(void *out, int *outlen, void *in, int *inlen); #endif
/* * LZO 1x decompression * copyright (c) 2006 Reimar Doeffinger * * This file is part of FFmpeg. * * FFmpeg 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. * * FFmpeg 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 FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef _LZO_H #define LZO_H #define LZO_INPUT_DEPLETED 1 #define LZO_OUTPUT_FULL 2 #define LZO_INVALID_BACKPTR 4 #define LZO_ERROR 8 #define LZO_INPUT_PADDING 4 #define LZO_OUTPUT_PADDING 12 int lzo1x_decode(void *out, int *outlen, void *in, int *inlen); #endif
--- +++ @@ -19,7 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _LZO_H +#ifndef LZO_H #define LZO_H #define LZO_INPUT_DEPLETED 1
Fix _LZO_H vs. LZO_H typo git-svn-id: a4d7c1866f8397a4106e0b57fc4fbf792bbdaaaf@7732 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
lgpl-2.1
prajnashi/ffmpeg,prajnashi/ffmpeg,prajnashi/ffmpeg,prajnashi/ffmpeg
a141b0159da3f91cd0086552fd0a4056e7043546
//===- Transforms/SampleProfile.h - SamplePGO pass--------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// /// \file /// This file provides the interface for the sampled PGO loader pass. //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_SAMPLEPROFILE_H #define LLVM_TRANSFORMS_SAMPLEPROFILE_H #include "llvm/IR/PassManager.h" namespace llvm { /// The sample profiler data loader pass. class SampleProfileLoaderPass : public PassInfoMixin<SampleProfileLoaderPass> { public: PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM); }; } // End llvm namespace #endif
//===- Transforms/SampleProfile.h - SamplePGO pass--------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// /// \file /// This file provides the interface for the sampled PGO loader pass. //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_SAMPLEPROFILE_H #define LLVM_TRANSFORMS_SAMPLEPROFILE_H #include "llvm/IR/PassManager.h" namespace llvm { /// The instrumentation (profile-instr-gen) pass for IR based PGO. class SampleProfileLoaderPass : public PassInfoMixin<SampleProfileLoaderPass> { public: PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM); }; } // End llvm namespace #endif
--- +++ @@ -17,7 +17,7 @@ namespace llvm { -/// The instrumentation (profile-instr-gen) pass for IR based PGO. +/// The sample profiler data loader pass. class SampleProfileLoaderPass : public PassInfoMixin<SampleProfileLoaderPass> { public: PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
Fix wrong comment in header /NFC git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@271825 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm
bb45039fab4071893154345415ad961391733c2d
/** * 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; }
/** * 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; }
--- +++ @@ -3,27 +3,27 @@ * * Copyright (C) 2017 Nickolas Burr <nickolasburr@gmail.com> */ - #include "repo.h" /** - * Get all stashes for a repository. + * Get all stash entries for a repository. */ -struct stash *get_stashes (struct repo *r) { - return r->stashes; +struct stash *get_stash (struct repo *r) { + return r->stash; } /** - * Set a copy of all stashes for a repository in memory. + * Set a copy of all stash entries for a repository. */ -void set_stashes (struct repo *r) { - // @todo: Build this function out. +void set_stash (struct repo *r) { char *cmd; FILE *fp; - printf("set_stashes -> r->path -> %s\n", r->path); + // Allocate space for command string + cmd = ALLOC(sizeof(char) * (strlen(r->path) + 100)); - sprintf(cmd, "/usr/bin/git -C %s -- stash list", r->path); + sprintf(cmd, "/usr/bin/git -C %s stash list", r->path); + printf("set_stashes -> cmd -> %s\n", cmd); fp = popen(cmd, "r"); @@ -33,16 +33,18 @@ exit(EXIT_FAILURE); } - while (fgets(r->stashes->entries, (sizeof(r->stashes->entries) - 1), fp) != NULL) { - printf("%s\n", r->stashes->entries); + 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 our last check. + * 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
mit
nickolasburr/git-stashd,nickolasburr/git-stashd,nickolasburr/git-stashd
17d53a1d40b1d15f08a80f9f03dd3922156d9fb6
#ifndef __AUDIO_RX_H__ #define __AUDIO_RX_H__ #include <stdint.h> typedef void (*put_audio_samples_rx)(uint8_t *samples, int size, int nframe); int start_audio_rx(const char* sdp, int maxDelay, put_audio_samples_rx callback); int stop_audio_rx(); #endif /* __AUDIO_RX_H__ */
#ifndef __AUDIO_RX_H__ #define __AUDIO_RX_H__ #include <stdint.h> typedef void (*put_audio_samples_rx)(uint8_t*, int, int); int start_audio_rx(const char* sdp, int maxDelay, put_audio_samples_rx callback); int stop_audio_rx(); #endif /* __AUDIO_RX_H__ */
--- +++ @@ -3,7 +3,7 @@ #include <stdint.h> -typedef void (*put_audio_samples_rx)(uint8_t*, int, int); +typedef void (*put_audio_samples_rx)(uint8_t *samples, int size, int nframe); int start_audio_rx(const char* sdp, int maxDelay, put_audio_samples_rx callback); int stop_audio_rx();
Add params name in put_audio_samples_rx pointer function definition.
lgpl-2.1
shelsonjava/kc-media-native,Kurento/kc-media-native,Kurento/kc-media-native,shelsonjava/kc-media-native
0c641db27c8ef9501990544b093c0bbbe6244776
#include <stdio.h> #include <libssh/libssh.h> #include "torture.h" static int verbosity = 0; int torture_libssh_verbosity(void){ return verbosity; } int main(int argc, char **argv) { int rc; (void) argc; (void) argv; ssh_init(); rc = torture_run_tests(); ssh_finalize(); return rc; }
#include "torture.h" #include <stdio.h> static int verbosity = 0; int torture_libssh_verbosity(void){ return verbosity; } int main(int argc, char **argv) { (void) argc; (void) argv; return torture_run_tests(); }
--- +++ @@ -1,6 +1,7 @@ +#include <stdio.h> +#include <libssh/libssh.h> + #include "torture.h" - -#include <stdio.h> static int verbosity = 0; @@ -9,8 +10,16 @@ } int main(int argc, char **argv) { + int rc; + (void) argc; (void) argv; - return torture_run_tests(); + ssh_init(); + + rc = torture_run_tests(); + + ssh_finalize(); + + return rc; }
tests: Call ssh_init() and ssh_finalize() before we run the tests.
lgpl-2.1
DouglasHeriot/libssh,DouglasHeriot/libssh,rofl0r/libssh,jt1/honeypot-libssh,kedazo/libssh,kedazo/libssh,robxu9/libssh,bigcat26/libssh-mod,rofl0r/libssh,pouete/libssh,Distrotech/libssh,elastichosts/libssh,bigcat26/libssh-mod,substack/libssh,sebadoom/libssh,bigcat26/libssh-mod,rofl0r/libssh,mwgoldsmith/ssh,substack/libssh,kedazo/libssh,rofl0r/libssh,miloj/libssh-v0.5,jahrome/libssh,taikoo/libssh,taikoo/libssh,nviennot/libssh,nviennot/libssh,wangshawn/libssh,jahrome/libssh,miloj/libssh-v0.5,mwgoldsmith/libssh,substack/libssh,wangshawn/libssh,jahrome/libssh,bigcat26/libssh-mod,jt1/honeypot-libssh,substack/libssh,Distrotech/libssh,mwgoldsmith/libssh,jahrome/libssh,elastichosts/libssh,pouete/libssh,nviennot/libssh,Distrotech/libssh,DouglasHeriot/libssh,wangshawn/libssh,pouete/libssh,mwgoldsmith/libssh,mwgoldsmith/ssh,robxu9/libssh,robxu9/libssh,DouglasHeriot/libssh,wangshawn/libssh,mwgoldsmith/ssh,nviennot/libssh,sebadoom/libssh,mwgoldsmith/ssh,Distrotech/libssh,taikoo/libssh,kedazo/libssh,jt1/honeypot-libssh,sebadoom/libssh,robxu9/libssh,elastichosts/libssh,sebadoom/libssh,mwgoldsmith/libssh,taikoo/libssh,miloj/libssh-v0.5,jt1/honeypot-libssh,pouete/libssh,miloj/libssh-v0.5
ef1866db76ed10d64bf8cf97111554b2b2eb1278
#ifndef ETHERNET_H_ #define ETHERNET_H_ #include <linux/if_ether.h> struct eth_hdr { unsigned char dst_mac[6]; unsigned char src_mac[6]; unsigned short ethertype; unsigned char payload[]; }; struct eth_hdr* init_eth_hdr(char* buf); void print_eth_hdr(struct eth_hdr *ehdr); #endif
#ifndef ETHERNET_H_ #define ETHERNET_H_ #include <linux/if_ether.h> struct eth_hdr { unsigned char dst_mac[6]; unsigned char src_mac[6]; unsigned short ethertype; unsigned char* payload; }; struct eth_hdr* init_eth_hdr(char* buf); void print_eth_hdr(struct eth_hdr *ehdr); #endif
--- +++ @@ -7,7 +7,7 @@ unsigned char dst_mac[6]; unsigned char src_mac[6]; unsigned short ethertype; - unsigned char* payload; + unsigned char payload[]; }; struct eth_hdr* init_eth_hdr(char* buf);
Fix wrong eth payload data type Declaring a pointer here and type-casting the buffer to a eth struct just overwrites the pointer with the payloads contents! Oops! Declaring a flexible array member is better. https://en.wikipedia.org/wiki/Flexible_array_member
mit
saminiir/level-ip,saminiir/level-ip
01d189c2149e3a1bc84aef1e08d138aae553f51a
// Inspired by FrameAccessor // https://github.com/AlexDenisov/FrameAccessor/ #import <UIKit/UIKit.h> @interface UIView (Sizing) @property CGPoint origin; @property CGSize size; @property CGFloat x; @property CGFloat y; @property CGFloat height; @property CGFloat width; @property CGFloat centerX; @property CGFloat centerY; @end
// // UIView+Sizing.h // aaah // // Created by Stanislaw Pankevich on 5/10/13. // Copyright (c) 2013 IProjecting. All rights reserved. // #import <UIKit/UIKit.h> @interface UIView (Sizing) @property CGPoint origin; @property CGSize size; @property CGFloat x; @property CGFloat y; @property CGFloat height; @property CGFloat width; @property CGFloat centerX; @property CGFloat centerY; @end
--- +++ @@ -1,10 +1,5 @@ -// -// UIView+Sizing.h -// aaah -// -// Created by Stanislaw Pankevich on 5/10/13. -// Copyright (c) 2013 IProjecting. All rights reserved. -// +// Inspired by FrameAccessor +// https://github.com/AlexDenisov/FrameAccessor/ #import <UIKit/UIKit.h> @@ -22,3 +17,4 @@ @property CGFloat centerY; @end +
Add a note about FrameAccessor
mit
stanislaw/UIKitExtensions,stanislaw/UIKitExtensions,stanislaw/UIKitExtensions,stanislaw/UIKitExtensions
7b30aba561165ee173059cd3a65c732bd5bc9056
// // SQGlobalMarco.h // // Created by Shi Eric on 3/18/12. // Copyright (c) 2012 Safe&Quick[http://www.saick.net]. All rights reserved. // #ifndef _SQGlobalMarco_h #define _SQGlobalMarco_h #define kMinOSVersion 4.0f #define saferelease(foo) {if(foo != nil) {[foo release]; foo = nil;}} #define isLandscape (UIInterfaceOrientationIsLandscape\ ([[UIApplication sharedApplication] statusBarOrientation])) #define isPad ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)]\ && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) #define isPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO) #define kOSVersion (float)([[[UIDevice currentDevice] systemVersion] length] > 0 ? [[[UIDevice currentDevice] systemVersion] doubleValue] : kMinOSVersion) #define kScreenSize [[UIScreen mainScreen] bounds].size // Radians to degrees #define RADIANS_TO_DEGREES(radians) ((radians) * (180.0 / M_PI)) // Degrees to radians #define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI) #endif
// // SQGlobalMarco.h // // Created by Shi Eric on 3/18/12. // Copyright (c) 2012 Safe&Quick[http://www.saick.net]. All rights reserved. // #ifndef _SQGlobalMarco_h #define _SQGlobalMarco_h #define kMinOSVersion 4.0f #define saferelease(foo) {if(foo != nil) {[foo release]; foo = nil;}} #define isLandscape (UIInterfaceOrientationIsLandscape\ ([[UIApplication sharedApplication] statusBarOrientation])) #define isPad ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)]\ && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) #define isPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO) #define kOSVersion (float)([[[UIDevice currentDevice] systemVersion] length] > 0 ? [[[UIDevice currentDevice] systemVersion] doubleValue] : kMinOSVersion) #endif
--- +++ @@ -22,4 +22,11 @@ #define kOSVersion (float)([[[UIDevice currentDevice] systemVersion] length] > 0 ? [[[UIDevice currentDevice] systemVersion] doubleValue] : kMinOSVersion) +#define kScreenSize [[UIScreen mainScreen] bounds].size + +// Radians to degrees +#define RADIANS_TO_DEGREES(radians) ((radians) * (180.0 / M_PI)) +// Degrees to radians +#define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI) + #endif
Add kScreenSize and Radians to or from degrees
mit
shjborage/SQCommonUtils
b6170a2ec91bd2e15e17710c651f227adf1518c8
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkStippleMaskFilter_DEFINED #define SkStippleMaskFilter_DEFINED #include "SkMaskFilter.h" /** * Simple MaskFilter that creates a screen door stipple pattern */ class SkStippleMaskFilter : public SkMaskFilter { public: SkStippleMaskFilter() : INHERITED() { } virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix& matrix, SkIPoint* margin) SK_OVERRIDE; // getFormat is from SkMaskFilter virtual SkMask::Format getFormat() SK_OVERRIDE { return SkMask::kA8_Format; } SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkStippleMaskFilter); protected: SkStippleMaskFilter(SkFlattenableReadBuffer& buffer) : SkMaskFilter(buffer) { } private: typedef SkMaskFilter INHERITED; }; #endif // SkStippleMaskFilter_DEFINED
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkStippleMaskFilter_DEFINED #define SkStippleMaskFilter_DEFINED #include "SkMaskFilter.h" /** * Simple MaskFilter that creates a screen door stipple pattern */ class SkStippleMaskFilter : public SkMaskFilter { public: SkStippleMaskFilter() : INHERITED() { } virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix& matrix, SkIPoint* margin) SK_OVERRIDE; // getFormat is from SkMaskFilter virtual SkMask::Format getFormat() SK_OVERRIDE { return SkMask::kA8_Format; } SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkStippleMaskFilter); protected: SkStippleMaskFilter::SkStippleMaskFilter(SkFlattenableReadBuffer& buffer) : SkMaskFilter(buffer) { } private: typedef SkMaskFilter INHERITED; }; #endif // SkStippleMaskFilter_DEFINED
--- +++ @@ -30,7 +30,7 @@ SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkStippleMaskFilter); protected: - SkStippleMaskFilter::SkStippleMaskFilter(SkFlattenableReadBuffer& buffer) + SkStippleMaskFilter(SkFlattenableReadBuffer& buffer) : SkMaskFilter(buffer) { }
Fix for compiler error in r4154 git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@4155 2bbb7eff-a529-9590-31e7-b0007b416f81
bsd-3-clause
geekboxzone/mmallow_external_skia,geekboxzone/lollipop_external_skia,Igalia/skia,CyanogenMod/android_external_chromium_org_third_party_skia,android-ia/platform_external_chromium_org_third_party_skia,Fusion-Rom/external_chromium_org_third_party_skia,MIPS/external-chromium_org-third_party-skia,android-ia/platform_external_chromium_org_third_party_skia,xin3liang/platform_external_chromium_org_third_party_skia,Purity-Lollipop/platform_external_skia,BrokenROM/external_skia,InfinitiveOS/external_skia,nox/skia,AOSPA-L/android_external_skia,TeamBliss-LP/android_external_skia,Pure-Aosp/android_external_skia,akiss77/skia,MinimalOS/android_external_chromium_org_third_party_skia,w3nd1go/android_external_skia,mozilla-b2g/external_skia,Hybrid-Rom/external_skia,HalCanary/skia-hc,DesolationStaging/android_external_skia,RadonX-ROM/external_skia,DesolationStaging/android_external_skia,Android-AOSP/external_skia,aospo/platform_external_skia,Omegaphora/external_skia,MinimalOS/android_external_chromium_org_third_party_skia,ench0/external_chromium_org_third_party_skia,DiamondLovesYou/skia-sys,Igalia/skia,google/skia,TeamTwisted/external_skia,MinimalOS/external_skia,MyAOSP/external_chromium_org_third_party_skia,nfxosp/platform_external_skia,MinimalOS-AOSP/platform_external_skia,byterom/android_external_skia,Fusion-Rom/android_external_skia,vvuk/skia,AOSPB/external_skia,spezi77/android_external_skia,shahrzadmn/skia,AOSPU/external_chromium_org_third_party_skia,todotodoo/skia,OneRom/external_skia,mydongistiny/external_chromium_org_third_party_skia,MinimalOS/external_chromium_org_third_party_skia,MinimalOS/external_chromium_org_third_party_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,shahrzadmn/skia,Euphoria-OS-Legacy/android_external_skia,OptiPop/external_chromium_org_third_party_skia,OneRom/external_skia,UBERMALLOW/external_skia,TeamExodus/external_skia,aospo/platform_external_skia,noselhq/skia,codeaurora-unoffical/platform-external-skia,MinimalOS/android_external_skia,Infinitive-OS/platform_external_skia,pcwalton/skia,TeslaProject/external_skia,pcwalton/skia,Infusion-OS/android_external_skia,rubenvb/skia,sombree/android_external_skia,Plain-Andy/android_platform_external_skia,Samsung/skia,RadonX-ROM/external_skia,xin3liang/platform_external_chromium_org_third_party_skia,chenlian2015/skia_from_google,wildermason/external_skia,suyouxin/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,AOSP-YU/platform_external_skia,chenlian2015/skia_from_google,ctiao/platform-external-skia,BrokenROM/external_skia,pacerom/external_skia,ominux/skia,TeamExodus/external_skia,scroggo/skia,TeamTwisted/external_skia,fire855/android_external_skia,HealthyHoney/temasek_SKIA,amyvmiwei/skia,Asteroid-Project/android_external_skia,geekboxzone/lollipop_external_skia,sombree/android_external_skia,AOSPU/external_chromium_org_third_party_skia,NamelessRom/android_external_skia,GladeRom/android_external_skia,suyouxin/android_external_skia,TeamBliss-LP/android_external_skia,DARKPOP/external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,boulzordev/android_external_skia,Fusion-Rom/android_external_skia,ominux/skia,mmatyas/skia,OptiPop/external_skia,nvoron23/skia,aosp-mirror/platform_external_skia,AOSP-YU/platform_external_skia,mydongistiny/android_external_skia,FusionSP/external_chromium_org_third_party_skia,akiss77/skia,samuelig/skia,boulzordev/android_external_skia,jtg-gg/skia,NamelessRom/android_external_skia,pacerom/external_skia,AndroidOpenDevelopment/android_external_skia,Hikari-no-Tenshi/android_external_skia,DiamondLovesYou/skia-sys,invisiblek/android_external_skia,vvuk/skia,VRToxin-AOSP/android_external_skia,AOSPU/external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,mmatyas/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,ominux/skia,TeslaProject/external_skia,DARKPOP/external_chromium_org_third_party_skia,wildermason/external_skia,sudosurootdev/external_skia,akiss77/skia,w3nd1go/android_external_skia,geekboxzone/mmallow_external_skia,MonkeyZZZZ/platform_external_skia,samuelig/skia,AOSPB/external_skia,RadonX-ROM/external_skia,Asteroid-Project/android_external_skia,OneRom/external_skia,codeaurora-unoffical/platform-external-skia,w3nd1go/android_external_skia,larsbergstrom/skia,sudosurootdev/external_skia,YUPlayGodDev/platform_external_skia,TeamExodus/external_skia,MarshedOut/android_external_skia,nox/skia,AsteroidOS/android_external_skia,geekboxzone/lollipop_external_skia,HalCanary/skia-hc,fire855/android_external_skia,FusionSP/android_external_skia,TeslaOS/android_external_skia,Omegaphora/external_chromium_org_third_party_skia,OneRom/external_skia,vanish87/skia,Purity-Lollipop/platform_external_skia,Pure-Aosp/android_external_skia,sigysmund/platform_external_skia,DesolationStaging/android_external_skia,Hikari-no-Tenshi/android_external_skia,amyvmiwei/skia,MonkeyZZZZ/platform_external_skia,mmatyas/skia,invisiblek/android_external_skia,ench0/external_chromium_org_third_party_skia,codeaurora-unoffical/platform-external-skia,MyAOSP/external_chromium_org_third_party_skia,Hikari-no-Tenshi/android_external_skia,scroggo/skia,DesolationStaging/android_external_skia,pacerom/external_skia,timduru/platform-external-skia,Infinitive-OS/platform_external_skia,temasek/android_external_skia,Android-AOSP/external_skia,pcwalton/skia,larsbergstrom/skia,Khaon/android_external_skia,rubenvb/skia,mydongistiny/android_external_skia,Pure-Aosp/android_external_skia,Samsung/skia,MarshedOut/android_external_skia,Omegaphora/external_skia,VentureROM-L/android_external_skia,HealthyHoney/temasek_SKIA,spezi77/android_external_skia,AndroidOpenDevelopment/android_external_skia,Tesla-Redux/android_external_skia,Euphoria-OS-Legacy/android_external_skia,Infinitive-OS/platform_external_skia,jtg-gg/skia,invisiblek/android_external_skia,Purity-Lollipop/platform_external_skia,todotodoo/skia,Jichao/skia,Igalia/skia,TeamEOS/external_skia,FusionSP/external_chromium_org_third_party_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,AndroidOpenDevelopment/android_external_skia,mozilla-b2g/external_skia,larsbergstrom/skia,mmatyas/skia,DARKPOP/external_chromium_org_third_party_skia,google/skia,HealthyHoney/temasek_SKIA,todotodoo/skia,UBERMALLOW/external_skia,Euphoria-OS-Legacy/android_external_skia,wildermason/external_skia,TeamExodus/external_skia,VentureROM-L/android_external_skia,DiamondLovesYou/skia-sys,MinimalOS/external_chromium_org_third_party_skia,MinimalOS/external_chromium_org_third_party_skia,VentureROM-L/android_external_skia,temasek/android_external_skia,F-AOSP/platform_external_skia,google/skia,wildermason/external_skia,shahrzadmn/skia,HealthyHoney/temasek_SKIA,vanish87/skia,AOSPA-L/android_external_skia,ench0/external_skia,jtg-gg/skia,google/skia,vanish87/skia,TeslaOS/android_external_skia,amyvmiwei/skia,DARKPOP/external_chromium_org_third_party_skia,MinimalOS/android_external_skia,sigysmund/platform_external_skia,MyAOSP/external_chromium_org_third_party_skia,vvuk/skia,todotodoo/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,AOSPB/external_skia,UBERMALLOW/external_skia,F-AOSP/platform_external_skia,pcwalton/skia,MinimalOS/external_skia,samuelig/skia,ominux/skia,Igalia/skia,ench0/external_chromium_org_third_party_skia,ominux/skia,HalCanary/skia-hc,Euphoria-OS-Legacy/android_external_skia,Omegaphora/external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,SlimSaber/android_external_skia,SlimSaber/android_external_skia,pcwalton/skia,NamelessRom/android_external_skia,Jichao/skia,TeamEOS/external_chromium_org_third_party_skia,geekboxzone/lollipop_external_skia,Fusion-Rom/android_external_skia,fire855/android_external_skia,wildermason/external_skia,shahrzadmn/skia,akiss77/skia,mozilla-b2g/external_skia,InfinitiveOS/external_skia,AndroidOpenDevelopment/android_external_skia,nox/skia,MarshedOut/android_external_skia,DesolationStaging/android_external_skia,vanish87/skia,houst0nn/external_skia,geekboxzone/lollipop_external_skia,nfxosp/platform_external_skia,DesolationStaging/android_external_skia,sudosurootdev/external_skia,Infusion-OS/android_external_skia,qrealka/skia-hc,noselhq/skia,ominux/skia,samuelig/skia,RadonX-ROM/external_skia,Omegaphora/external_skia,noselhq/skia,qrealka/skia-hc,TeslaOS/android_external_skia,Infinitive-OS/platform_external_skia,TeamEOS/external_chromium_org_third_party_skia,Asteroid-Project/android_external_skia,noselhq/skia,YUPlayGodDev/platform_external_skia,Hikari-no-Tenshi/android_external_skia,sombree/android_external_skia,scroggo/skia,VentureROM-L/android_external_skia,byterom/android_external_skia,Tesla-Redux/android_external_skia,Omegaphora/external_chromium_org_third_party_skia,nvoron23/skia,amyvmiwei/skia,Khaon/android_external_skia,byterom/android_external_skia,nvoron23/skia,AOSPA-L/android_external_skia,MinimalOS-AOSP/platform_external_skia,suyouxin/android_external_skia,AOSPB/external_skia,Omegaphora/external_chromium_org_third_party_skia,mozilla-b2g/external_skia,AOSPA-L/android_external_skia,fire855/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,geekboxzone/mmallow_external_skia,PAC-ROM/android_external_skia,PAC-ROM/android_external_skia,Pure-Aosp/android_external_skia,aosp-mirror/platform_external_skia,NamelessRom/android_external_skia,noselhq/skia,Plain-Andy/android_platform_external_skia,AOSPU/external_chromium_org_third_party_skia,TeamBliss-LP/android_external_skia,PAC-ROM/android_external_skia,Fusion-Rom/android_external_skia,Infusion-OS/android_external_skia,VentureROM-L/android_external_skia,xzzz9097/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,mozilla-b2g/external_skia,sombree/android_external_skia,nox/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,GladeRom/android_external_skia,vvuk/skia,temasek/android_external_skia,geekboxzone/mmallow_external_skia,pacerom/external_skia,RadonX-ROM/external_skia,Omegaphora/external_chromium_org_third_party_skia,shahrzadmn/skia,Tesla-Redux/android_external_skia,PAC-ROM/android_external_skia,BrokenROM/external_skia,MIPS/external-chromium_org-third_party-skia,nox/skia,YUPlayGodDev/platform_external_skia,qrealka/skia-hc,Hikari-no-Tenshi/android_external_skia,w3nd1go/android_external_skia,TeslaProject/external_skia,YUPlayGodDev/platform_external_skia,Purity-Lollipop/platform_external_skia,AOSPB/external_skia,Fusion-Rom/external_chromium_org_third_party_skia,MinimalOS-AOSP/platform_external_skia,TeslaProject/external_skia,AOSPA-L/android_external_skia,vvuk/skia,DiamondLovesYou/skia-sys,mydongistiny/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,google/skia,Tesla-Redux/android_external_skia,vvuk/skia,rubenvb/skia,Hybrid-Rom/external_skia,geekboxzone/mmallow_external_skia,AndroidOpenDevelopment/android_external_skia,TeamEOS/external_skia,pacerom/external_skia,AOSPB/external_skia,Pure-Aosp/android_external_skia,sigysmund/platform_external_skia,Android-AOSP/external_skia,xzzz9097/android_external_skia,TeamEOS/external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,OneRom/external_skia,YUPlayGodDev/platform_external_skia,HealthyHoney/temasek_SKIA,todotodoo/skia,F-AOSP/platform_external_skia,YUPlayGodDev/platform_external_skia,Samsung/skia,TeamExodus/external_skia,rubenvb/skia,TeamExodus/external_skia,google/skia,PAC-ROM/android_external_skia,temasek/android_external_skia,NamelessRom/android_external_skia,temasek/android_external_skia,todotodoo/skia,Infusion-OS/android_external_skia,tmpvar/skia.cc,AsteroidOS/android_external_skia,Infusion-OS/android_external_skia,Plain-Andy/android_platform_external_skia,Plain-Andy/android_platform_external_skia,DiamondLovesYou/skia-sys,Euphoria-OS-Legacy/android_external_skia,larsbergstrom/skia,android-ia/platform_external_chromium_org_third_party_skia,FusionSP/android_external_skia,MinimalOS/external_skia,AOSP-YU/platform_external_skia,fire855/android_external_skia,DiamondLovesYou/skia-sys,geekboxzone/lollipop_external_skia,w3nd1go/android_external_skia,MIPS/external-chromium_org-third_party-skia,F-AOSP/platform_external_skia,android-ia/platform_external_chromium_org_third_party_skia,TeamTwisted/external_skia,mydongistiny/external_chromium_org_third_party_skia,samuelig/skia,akiss77/skia,android-ia/platform_external_skia,MarshedOut/android_external_skia,w3nd1go/android_external_skia,MinimalOS/external_skia,TeamBliss-LP/android_external_skia,AOSP-YU/platform_external_skia,NamelessRom/android_external_skia,MyAOSP/external_chromium_org_third_party_skia,Infinitive-OS/platform_external_skia,codeaurora-unoffical/platform-external-skia,TeslaProject/external_skia,byterom/android_external_skia,SlimSaber/android_external_skia,Omegaphora/external_chromium_org_third_party_skia,SlimSaber/android_external_skia,VRToxin-AOSP/android_external_skia,NamelessRom/android_external_skia,AOSP-YU/platform_external_skia,DesolationStaging/android_external_skia,nox/skia,fire855/android_external_skia,android-ia/platform_external_skia,MinimalOS-AOSP/platform_external_skia,timduru/platform-external-skia,TeamEOS/external_skia,Hybrid-Rom/external_skia,Android-AOSP/external_skia,Omegaphora/external_skia,F-AOSP/platform_external_skia,geekboxzone/mmallow_external_skia,TeamTwisted/external_skia,HalCanary/skia-hc,TeamTwisted/external_skia,Android-AOSP/external_skia,Jichao/skia,Tesla-Redux/android_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,InfinitiveOS/external_skia,shahrzadmn/skia,suyouxin/android_external_skia,AOSP-YU/platform_external_skia,HalCanary/skia-hc,Plain-Andy/android_platform_external_skia,vvuk/skia,invisiblek/android_external_skia,qrealka/skia-hc,TeamExodus/external_skia,shahrzadmn/skia,DARKPOP/external_chromium_org_third_party_skia,aospo/platform_external_skia,xin3liang/platform_external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,mmatyas/skia,Euphoria-OS-Legacy/android_external_skia,Khaon/android_external_skia,aospo/platform_external_skia,mydongistiny/android_external_skia,MonkeyZZZZ/platform_external_skia,vanish87/skia,AndroidOpenDevelopment/android_external_skia,mmatyas/skia,OneRom/external_skia,MinimalOS/android_external_skia,boulzordev/android_external_skia,invisiblek/android_external_skia,fire855/android_external_skia,ctiao/platform-external-skia,BrokenROM/external_skia,MonkeyZZZZ/platform_external_skia,Tesla-Redux/android_external_skia,Khaon/android_external_skia,boulzordev/android_external_skia,AOSPU/external_chromium_org_third_party_skia,sombree/android_external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,tmpvar/skia.cc,GladeRom/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,SlimSaber/android_external_skia,fire855/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,BrokenROM/external_skia,InfinitiveOS/external_skia,jtg-gg/skia,ench0/external_skia,DARKPOP/external_chromium_org_third_party_skia,Infinitive-OS/platform_external_skia,UBERMALLOW/external_skia,timduru/platform-external-skia,OptiPop/external_chromium_org_third_party_skia,akiss77/skia,Infinitive-OS/platform_external_skia,HealthyHoney/temasek_SKIA,zhaochengw/platform_external_skia,mmatyas/skia,MinimalOS-AOSP/platform_external_skia,mmatyas/skia,F-AOSP/platform_external_skia,GladeRom/android_external_skia,Hybrid-Rom/external_skia,YUPlayGodDev/platform_external_skia,Android-AOSP/external_skia,Samsung/skia,Fusion-Rom/external_chromium_org_third_party_skia,android-ia/platform_external_skia,Hybrid-Rom/external_skia,OptiPop/external_chromium_org_third_party_skia,TeamEOS/external_skia,Fusion-Rom/external_chromium_org_third_party_skia,aosp-mirror/platform_external_skia,TeamTwisted/external_skia,google/skia,OptiPop/external_skia,TeamEOS/external_chromium_org_third_party_skia,android-ia/platform_external_skia,RadonX-ROM/external_skia,xin3liang/platform_external_chromium_org_third_party_skia,Omegaphora/external_skia,AsteroidOS/android_external_skia,todotodoo/skia,geekboxzone/mmallow_external_skia,boulzordev/android_external_skia,Infusion-OS/android_external_skia,MyAOSP/external_chromium_org_third_party_skia,TeslaProject/external_skia,InfinitiveOS/external_skia,AOSPA-L/android_external_skia,TeamExodus/external_skia,Jichao/skia,sigysmund/platform_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,vvuk/skia,Asteroid-Project/android_external_skia,geekboxzone/mmallow_external_skia,Fusion-Rom/android_external_skia,Igalia/skia,Hikari-no-Tenshi/android_external_skia,TeamBliss-LP/android_external_skia,FusionSP/external_chromium_org_third_party_skia,android-ia/platform_external_skia,MIPS/external-chromium_org-third_party-skia,ench0/external_skia,TeamEOS/external_chromium_org_third_party_skia,scroggo/skia,DesolationStaging/android_external_skia,OptiPop/external_chromium_org_third_party_skia,spezi77/android_external_skia,tmpvar/skia.cc,VentureROM-L/android_external_skia,mydongistiny/android_external_skia,zhaochengw/platform_external_skia,TeamEOS/external_chromium_org_third_party_skia,larsbergstrom/skia,FusionSP/android_external_skia,nfxosp/platform_external_skia,jtg-gg/skia,suyouxin/android_external_skia,android-ia/platform_external_chromium_org_third_party_skia,VentureROM-L/android_external_skia,codeaurora-unoffical/platform-external-skia,MinimalOS-AOSP/platform_external_skia,MinimalOS/external_skia,ctiao/platform-external-skia,mozilla-b2g/external_skia,nox/skia,timduru/platform-external-skia,MonkeyZZZZ/platform_external_skia,HalCanary/skia-hc,BrokenROM/external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,MinimalOS/android_external_skia,ench0/external_skia,VRToxin-AOSP/android_external_skia,MonkeyZZZZ/platform_external_skia,xzzz9097/android_external_skia,aosp-mirror/platform_external_skia,Pure-Aosp/android_external_skia,larsbergstrom/skia,geekboxzone/mmallow_external_skia,Fusion-Rom/android_external_skia,nox/skia,Jichao/skia,aosp-mirror/platform_external_skia,AOSPU/external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,xzzz9097/android_external_skia,sudosurootdev/external_skia,qrealka/skia-hc,Asteroid-Project/android_external_skia,Purity-Lollipop/platform_external_skia,BrokenROM/external_skia,InfinitiveOS/external_skia,codeaurora-unoffical/platform-external-skia,zhaochengw/platform_external_skia,android-ia/platform_external_chromium_org_third_party_skia,temasek/android_external_skia,invisiblek/android_external_skia,mydongistiny/external_chromium_org_third_party_skia,Plain-Andy/android_platform_external_skia,houst0nn/external_skia,OptiPop/external_chromium_org_third_party_skia,houst0nn/external_skia,AsteroidOS/android_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,rubenvb/skia,timduru/platform-external-skia,nvoron23/skia,mydongistiny/external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,FusionSP/android_external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,Omegaphora/external_chromium_org_third_party_skia,tmpvar/skia.cc,AOSPB/external_skia,timduru/platform-external-skia,xin3liang/platform_external_chromium_org_third_party_skia,GladeRom/android_external_skia,Igalia/skia,F-AOSP/platform_external_skia,AsteroidOS/android_external_skia,houst0nn/external_skia,nfxosp/platform_external_skia,TeslaOS/android_external_skia,OptiPop/external_skia,TeamEOS/external_chromium_org_third_party_skia,AOSPU/external_chromium_org_third_party_skia,pacerom/external_skia,BrokenROM/external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,Khaon/android_external_skia,MinimalOS-AOSP/platform_external_skia,MarshedOut/android_external_skia,larsbergstrom/skia,rubenvb/skia,vanish87/skia,InfinitiveOS/external_skia,UBERMALLOW/external_skia,byterom/android_external_skia,TeslaOS/android_external_skia,TeamEOS/external_skia,UBERMALLOW/external_skia,AOSP-YU/platform_external_skia,AOSP-YU/platform_external_skia,SlimSaber/android_external_skia,Pure-Aosp/android_external_skia,MinimalOS-AOSP/platform_external_skia,larsbergstrom/skia,google/skia,Asteroid-Project/android_external_skia,AndroidOpenDevelopment/android_external_skia,AsteroidOS/android_external_skia,Euphoria-OS-Legacy/android_external_skia,HalCanary/skia-hc,F-AOSP/platform_external_skia,UBERMALLOW/external_skia,MarshedOut/android_external_skia,ominux/skia,codeaurora-unoffical/platform-external-skia,xzzz9097/android_external_skia,FusionSP/android_external_skia,OptiPop/external_skia,mydongistiny/android_external_skia,TeslaProject/external_skia,houst0nn/external_skia,sombree/android_external_skia,rubenvb/skia,geekboxzone/lollipop_external_skia,MIPS/external-chromium_org-third_party-skia,jtg-gg/skia,sudosurootdev/external_skia,ench0/external_skia,aosp-mirror/platform_external_skia,Omegaphora/external_skia,YUPlayGodDev/platform_external_skia,mydongistiny/android_external_skia,VentureROM-L/android_external_skia,TeamTwisted/external_skia,UBERMALLOW/external_skia,NamelessRom/android_external_skia,xzzz9097/android_external_skia,boulzordev/android_external_skia,rubenvb/skia,MinimalOS/android_external_skia,codeaurora-unoffical/platform-external-skia,OptiPop/external_skia,OneRom/external_skia,temasek/android_external_skia,TeamTwisted/external_skia,qrealka/skia-hc,FusionSP/android_external_skia,google/skia,aosp-mirror/platform_external_skia,Fusion-Rom/android_external_skia,mmatyas/skia,zhaochengw/platform_external_skia,nfxosp/platform_external_skia,mozilla-b2g/external_skia,Khaon/android_external_skia,Khaon/android_external_skia,ominux/skia,rubenvb/skia,amyvmiwei/skia,UBERMALLOW/external_skia,OptiPop/external_chromium_org_third_party_skia,ench0/external_chromium_org_third_party_skia,Hybrid-Rom/external_skia,AsteroidOS/android_external_skia,AOSPB/external_skia,MarshedOut/android_external_skia,spezi77/android_external_skia,todotodoo/skia,GladeRom/android_external_skia,pcwalton/skia,OneRom/external_skia,nvoron23/skia,nfxosp/platform_external_skia,Purity-Lollipop/platform_external_skia,ctiao/platform-external-skia,spezi77/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,qrealka/skia-hc,tmpvar/skia.cc,tmpvar/skia.cc,noselhq/skia,akiss77/skia,jtg-gg/skia,w3nd1go/android_external_skia,houst0nn/external_skia,w3nd1go/android_external_skia,MinimalOS/android_external_skia,wildermason/external_skia,VRToxin-AOSP/android_external_skia,MIPS/external-chromium_org-third_party-skia,zhaochengw/platform_external_skia,Tesla-Redux/android_external_skia,MIPS/external-chromium_org-third_party-skia,shahrzadmn/skia,OptiPop/external_skia,MinimalOS/android_external_skia,Jichao/skia,pacerom/external_skia,spezi77/android_external_skia,chenlian2015/skia_from_google,pcwalton/skia,vanish87/skia,TeamExodus/external_skia,Omegaphora/external_skia,TeslaProject/external_skia,AOSPA-L/android_external_skia,RadonX-ROM/external_skia,todotodoo/skia,nvoron23/skia,ench0/external_skia,aosp-mirror/platform_external_skia,OptiPop/external_skia,MinimalOS/external_skia,Jichao/skia,DiamondLovesYou/skia-sys,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,xzzz9097/android_external_skia,AsteroidOS/android_external_skia,aospo/platform_external_skia,android-ia/platform_external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,Hybrid-Rom/external_skia,Fusion-Rom/android_external_skia,Jichao/skia,nvoron23/skia,Euphoria-OS-Legacy/android_external_skia,ench0/external_chromium_org_third_party_skia,InfinitiveOS/external_skia,vvuk/skia,aospo/platform_external_skia,houst0nn/external_skia,Plain-Andy/android_platform_external_skia,MinimalOS/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,AOSPB/external_skia,OptiPop/external_skia,OneRom/external_skia,MyAOSP/external_chromium_org_third_party_skia,samuelig/skia,TeamBliss-LP/android_external_skia,scroggo/skia,sombree/android_external_skia,aospo/platform_external_skia,akiss77/skia,Samsung/skia,tmpvar/skia.cc,Android-AOSP/external_skia,MinimalOS/android_external_chromium_org_third_party_skia,chenlian2015/skia_from_google,DARKPOP/external_chromium_org_third_party_skia,mydongistiny/external_chromium_org_third_party_skia,nfxosp/platform_external_skia,RadonX-ROM/external_skia,SlimSaber/android_external_skia,Samsung/skia,TeslaOS/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,samuelig/skia,noselhq/skia,xin3liang/platform_external_chromium_org_third_party_skia,sudosurootdev/external_skia,android-ia/platform_external_skia,Tesla-Redux/android_external_skia,zhaochengw/platform_external_skia,OptiPop/external_chromium_org_third_party_skia,samuelig/skia,mydongistiny/external_chromium_org_third_party_skia,MonkeyZZZZ/platform_external_skia,invisiblek/android_external_skia,vanish87/skia,sudosurootdev/external_skia,MarshedOut/android_external_skia,MonkeyZZZZ/platform_external_skia,ench0/external_chromium_org_third_party_skia,DARKPOP/external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,boulzordev/android_external_skia,scroggo/skia,Omegaphora/external_chromium_org_third_party_skia,google/skia,nfxosp/platform_external_skia,boulzordev/android_external_skia,Infinitive-OS/platform_external_skia,sigysmund/platform_external_skia,mydongistiny/external_chromium_org_third_party_skia,amyvmiwei/skia,aosp-mirror/platform_external_skia,byterom/android_external_skia,wildermason/external_skia,Omegaphora/external_skia,sigysmund/platform_external_skia,TeslaOS/android_external_skia,nfxosp/platform_external_skia,Purity-Lollipop/platform_external_skia,tmpvar/skia.cc,temasek/android_external_skia,sudosurootdev/external_skia,sigysmund/platform_external_skia,byterom/android_external_skia,amyvmiwei/skia,timduru/platform-external-skia,HalCanary/skia-hc,suyouxin/android_external_skia,ench0/external_chromium_org_third_party_skia,MinimalOS/external_chromium_org_third_party_skia,Hybrid-Rom/external_skia,Jichao/skia,wildermason/external_skia,Khaon/android_external_skia,FusionSP/android_external_skia,scroggo/skia,OptiPop/external_chromium_org_third_party_skia,Igalia/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,ench0/external_chromium_org_third_party_skia,Igalia/skia,geekboxzone/lollipop_external_skia,AOSPA-L/android_external_skia,Samsung/skia,nvoron23/skia,TeamEOS/external_skia,suyouxin/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,aospo/platform_external_skia,SlimSaber/android_external_skia,Pure-Aosp/android_external_skia,mydongistiny/android_external_skia,MinimalOS/external_skia,HealthyHoney/temasek_SKIA,aosp-mirror/platform_external_skia,xzzz9097/android_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,pcwalton/skia,TeamBliss-LP/android_external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,zhaochengw/platform_external_skia,MyAOSP/external_chromium_org_third_party_skia,ctiao/platform-external-skia,MinimalOS/external_skia,MinimalOS-AOSP/platform_external_skia,GladeRom/android_external_skia,MonkeyZZZZ/platform_external_skia,android-ia/platform_external_chromium_org_third_party_skia,mydongistiny/external_chromium_org_third_party_skia,ominux/skia,VRToxin-AOSP/android_external_skia,Asteroid-Project/android_external_skia,w3nd1go/android_external_skia,MarshedOut/android_external_skia,MIPS/external-chromium_org-third_party-skia,mozilla-b2g/external_skia,ench0/external_skia,AOSP-YU/platform_external_skia,rubenvb/skia,ctiao/platform-external-skia,larsbergstrom/skia,sigysmund/platform_external_skia,PAC-ROM/android_external_skia,HalCanary/skia-hc,nox/skia,TeamTwisted/external_skia,akiss77/skia,android-ia/platform_external_skia,vanish87/skia,nvoron23/skia,MyAOSP/external_chromium_org_third_party_skia,scroggo/skia,YUPlayGodDev/platform_external_skia,chenlian2015/skia_from_google,qrealka/skia-hc,xin3liang/platform_external_chromium_org_third_party_skia,TeslaOS/android_external_skia,Infusion-OS/android_external_skia,android-ia/platform_external_skia,chenlian2015/skia_from_google,Infinitive-OS/platform_external_skia,GladeRom/android_external_skia,VRToxin-AOSP/android_external_skia,HealthyHoney/temasek_SKIA,tmpvar/skia.cc,invisiblek/android_external_skia,shahrzadmn/skia,noselhq/skia,amyvmiwei/skia,Asteroid-Project/android_external_skia,Infusion-OS/android_external_skia,ctiao/platform-external-skia,sombree/android_external_skia,zhaochengw/platform_external_skia,boulzordev/android_external_skia,ench0/external_skia,pcwalton/skia,Samsung/skia,chenlian2015/skia_from_google,HalCanary/skia-hc,noselhq/skia,Purity-Lollipop/platform_external_skia,byterom/android_external_skia
0090ec7cb0d38cc29bf18b31c31a142e8f199f33
#include <errno.h> #include <asm/ptrace.h> #include <sys/syscall.h> int ptrace(int request, int pid, int addr, int data) { long ret; long res; if (request > 0 && request < 4) data = (int)&ret; __asm__ volatile ("movel %1,%/d0\n\t" "movel %2,%/d1\n\t" "movel %3,%/d2\n\t" "movel %4,%/d3\n\t" "movel %5,%/d4\n\t" "trap #0\n\t" "movel %/d0,%0" :"=g" (res) :"i" (__NR_ptrace), "g" (request), "g" (pid), "g" (addr), "g" (data) : "%d0", "%d1", "%d2", "%d3", "%d4"); if (res >= 0) { if (request > 0 && request < 4) { __set_errno(0); return (ret); } return (int) res; } __set_errno(-res); return -1; }
#include <errno.h> #include <asm/ptrace.h> #include <sys/syscall.h> int ptrace(int request, int pid, int addr, int data) { long ret; long res; if (request > 0 && request < 4) (long *)data = &ret; __asm__ volatile ("movel %1,%/d0\n\t" "movel %2,%/d1\n\t" "movel %3,%/d2\n\t" "movel %4,%/d3\n\t" "movel %5,%/d4\n\t" "trap #0\n\t" "movel %/d0,%0" :"=g" (res) :"i" (__NR_ptrace), "g" (request), "g" (pid), "g" (addr), "g" (data) : "%d0", "%d1", "%d2", "%d3", "%d4"); if (res >= 0) { if (request > 0 && request < 4) { __set_errno(0); return (ret); } return (int) res; } __set_errno(-res); return -1; }
--- +++ @@ -8,7 +8,8 @@ { long ret; long res; - if (request > 0 && request < 4) (long *)data = &ret; + if (request > 0 && request < 4) data = (int)&ret; + __asm__ volatile ("movel %1,%/d0\n\t" "movel %2,%/d1\n\t"
Patch from Bernardo Innocenti: Remove use of cast-as-l-value extension, removed in GCC 3.5.
lgpl-2.1
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
8a8e7bb8f5de8c86d4e06ba934253bd355fa98dc
/* * Copyright (c) 2017, 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 <atomic> #include <string> #include <thread> #include <wangle/concurrent/ThreadFactory.h> #include <folly/Conv.h> #include <folly/Range.h> #include <folly/ThreadName.h> namespace wangle { class NamedThreadFactory : public ThreadFactory { public: explicit NamedThreadFactory(folly::StringPiece prefix) : prefix_(prefix.str()), suffix_(0) {} std::thread newThread(folly::Func&& func) override { auto thread = std::thread([&](folly::Func&& funct) { folly::setThreadName(folly::to<std::string>(prefix_, suffix_++)); funct(); }, std::move(func)); return thread; } void setNamePrefix(folly::StringPiece prefix) { prefix_ = prefix.str(); } std::string getNamePrefix() { return prefix_; } private: std::string prefix_; std::atomic<uint64_t> suffix_; }; } // namespace wangle
/* * Copyright (c) 2017, 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 <atomic> #include <string> #include <thread> #include <wangle/concurrent/ThreadFactory.h> #include <folly/Conv.h> #include <folly/Range.h> #include <folly/ThreadName.h> namespace wangle { class NamedThreadFactory : public ThreadFactory { public: explicit NamedThreadFactory(folly::StringPiece prefix) : prefix_(prefix.str()), suffix_(0) {} std::thread newThread(folly::Func&& func) override { auto thread = std::thread(std::move(func)); folly::setThreadName( thread.native_handle(), folly::to<std::string>(prefix_, suffix_++)); return thread; } void setNamePrefix(folly::StringPiece prefix) { prefix_ = prefix.str(); } std::string getNamePrefix() { return prefix_; } private: std::string prefix_; std::atomic<uint64_t> suffix_; }; } // namespace wangle
--- +++ @@ -27,10 +27,10 @@ : prefix_(prefix.str()), suffix_(0) {} std::thread newThread(folly::Func&& func) override { - auto thread = std::thread(std::move(func)); - folly::setThreadName( - thread.native_handle(), - folly::to<std::string>(prefix_, suffix_++)); + auto thread = std::thread([&](folly::Func&& funct) { + folly::setThreadName(folly::to<std::string>(prefix_, suffix_++)); + funct(); + }, std::move(func)); return thread; }
Switch various calls to folly::setThreadName to set the current thread's name Summary: This is in preparation for killing the pthread_t overload of folly::setThreadName. Reviewed By: yfeldblum Differential Revision: D5012627 fbshipit-source-id: a4e6e2c2cb5bd02b1ebea85c305eac59355a7d42
apache-2.0
facebook/wangle,facebook/wangle,facebook/wangle
fbf9f480bc7faebf123213c2932022c7e0ba4321
#ifndef CJET_STRING_H #define CJET_STRING_H #include <stdlib.h> #include <string.h> static inline char *duplicate_string(const char *s) { size_t length = strlen(s); char *new_string = malloc(length + 1); if (unlikely(new_string != NULL)) { strncpy(new_string, s, length + 1); } return new_string; } #endif
#ifndef CJET_STRING_H #define CJET_STRING_H #include <stdlib.h> #include <string.h> static inline char *duplicate_string(const char *s) { size_t length = strlen(s); char *new_string = malloc(length + 1); if (unlikely(new_string == NULL)) { return NULL; } strncpy(new_string, s, length + 1); return new_string; } #endif
--- +++ @@ -8,10 +8,9 @@ { size_t length = strlen(s); char *new_string = malloc(length + 1); - if (unlikely(new_string == NULL)) { - return NULL; + if (unlikely(new_string != NULL)) { + strncpy(new_string, s, length + 1); } - strncpy(new_string, s, length + 1); return new_string; }
Simplify string duplication function a bit.
mit
gatzka/cjet,mloy/cjet,mloy/cjet,mloy/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet
067133a2658b611718a8b111d6c7824dfbf19f56
#include <stdio.h> #if defined _WIN32 && !defined __TINYC__ # define _ "_" #else # define _ #endif static int x1_c(void) { printf("x1\n"); return 1; } asm(".text;"_"x1: call "_"x1_c; ret"); int main(int argc, char *argv[]) { asm("call "_"x1"); asm("call "_"x2"); asm("call "_"x3"); return 0; } static int x2(void) { printf("x2\n"); return 2; } extern int x3(void);
#include <stdio.h> #if defined _WIN32 && !defined __TINYC__ # define U "_" #else # define U #endif const char str[] = "x1\n"; #ifdef __x86_64__ asm(U"x1: push %rbp; mov $"U"str, %rdi; call "U"printf; pop %rbp; ret"); #elif defined (__i386__) asm(U"x1: push $"U"str; call "U"printf; pop %eax; ret"); #endif int main(int argc, char *argv[]) { asm("call "U"x1"); asm("call "U"x2"); asm("call "U"x3"); return 0; } static int x2(void) { printf("x2\n"); return 2; } extern int x3(void);
--- +++ @@ -1,23 +1,24 @@ #include <stdio.h> #if defined _WIN32 && !defined __TINYC__ -# define U "_" +# define _ "_" #else -# define U +# define _ #endif -const char str[] = "x1\n"; -#ifdef __x86_64__ -asm(U"x1: push %rbp; mov $"U"str, %rdi; call "U"printf; pop %rbp; ret"); -#elif defined (__i386__) -asm(U"x1: push $"U"str; call "U"printf; pop %eax; ret"); -#endif +static int x1_c(void) +{ + printf("x1\n"); + return 1; +} + +asm(".text;"_"x1: call "_"x1_c; ret"); int main(int argc, char *argv[]) { - asm("call "U"x1"); - asm("call "U"x2"); - asm("call "U"x3"); + asm("call "_"x1"); + asm("call "_"x2"); + asm("call "_"x3"); return 0; }
Adjust asm-c-connect testcase for Windows Calling conventions are different, let's use functions without any arguments.
lgpl-2.1
mirror/tinycc,mirror/tinycc,avih/tinycc,mirror/tinycc,mingodad/tinycc,mingodad/tinycc,mingodad/tinycc,mirror/tinycc,avih/tinycc,avih/tinycc,avih/tinycc,mingodad/tinycc
3494e5de3a03d021845666f55340d35af44e3bfc
#ifndef _ASM_CRIS_ARCH_CACHE_H #define _ASM_CRIS_ARCH_CACHE_H #include <arch/hwregs/dma.h> /* A cache-line is 32 bytes. */ #define L1_CACHE_BYTES 32 #define L1_CACHE_SHIFT 5 #define __read_mostly __attribute__((__section__(".data..read_mostly"))) void flush_dma_list(dma_descr_data *descr); void flush_dma_descr(dma_descr_data *descr, int flush_buf); #define flush_dma_context(c) \ flush_dma_list(phys_to_virt((c)->saved_data)); void cris_flush_cache_range(void *buf, unsigned long len); void cris_flush_cache(void); #endif /* _ASM_CRIS_ARCH_CACHE_H */
#ifndef _ASM_CRIS_ARCH_CACHE_H #define _ASM_CRIS_ARCH_CACHE_H #include <arch/hwregs/dma.h> /* A cache-line is 32 bytes. */ #define L1_CACHE_BYTES 32 #define L1_CACHE_SHIFT 5 #define __read_mostly __attribute__((__section__(".data.read_mostly"))) void flush_dma_list(dma_descr_data *descr); void flush_dma_descr(dma_descr_data *descr, int flush_buf); #define flush_dma_context(c) \ flush_dma_list(phys_to_virt((c)->saved_data)); void cris_flush_cache_range(void *buf, unsigned long len); void cris_flush_cache(void); #endif /* _ASM_CRIS_ARCH_CACHE_H */
--- +++ @@ -7,7 +7,7 @@ #define L1_CACHE_BYTES 32 #define L1_CACHE_SHIFT 5 -#define __read_mostly __attribute__((__section__(".data.read_mostly"))) +#define __read_mostly __attribute__((__section__(".data..read_mostly"))) void flush_dma_list(dma_descr_data *descr); void flush_dma_descr(dma_descr_data *descr, int flush_buf);
CRISv32: Correct name of read_mostly section. 54cb27a71f51d304342c79e62fd7667f2171062b renamed .data.read_mostly to .data..read_mostly for all architectures for 2.6.33. Reported-by: Ralf Baechle <92f48d309cda194c8eda36aa8f9ae28c488fa208@linux-mips.org> Signed-off-by: Jesper Nilsson <987a7dbc972893e93e5578401bedc3a0f2ccb5e3@axis.com>
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
06e44840368efdb359224b5d04db6c92f73bd373
// // BRScrollerUtilities.c // BRScroller // // Created by Matt on 7/11/13. // Copyright (c) 2013 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0. // #include "BRScrollerUtilities.h" #include <math.h> #include <sys/param.h> inline bool BRFloatsAreEqual(CGFloat a, CGFloat b) { const CGFloat d = a - b; return (d < 0 ? -d : d) < 1e-4; } inline CGSize BRAspectSizeToFit(CGSize aSize, CGSize maxSize) { CGFloat scale = 1.0; if ( aSize.width > 0.0 && aSize.height > 0.0 ) { CGFloat dw = maxSize.width / aSize.width; CGFloat dh = maxSize.height / aSize.height; scale = dw < dh ? dw : dh; } return CGSizeMake(MIN(floorf(maxSize.width), ceilf(aSize.width * scale)), MIN(floorf(maxSize.height), ceilf(aSize.height * scale))); }
// // BRScrollerUtilities.c // BRScroller // // Created by Matt on 7/11/13. // Copyright (c) 2013 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0. // #include "BRScrollerUtilities.h" #if !defined(MIN) #define MIN(A,B) ((A) < (B) ? (A) : (B)) #endif inline bool BRFloatsAreEqual(CGFloat a, CGFloat b) { const CGFloat d = a - b; return (d < 0 ? -d : d) < 1e-4; } inline CGSize BRAspectSizeToFit(CGSize aSize, CGSize maxSize) { CGFloat scale = 1.0; if ( aSize.width > 0.0 && aSize.height > 0.0 ) { CGFloat dw = maxSize.width / aSize.width; CGFloat dh = maxSize.height / aSize.height; scale = dw < dh ? dw : dh; } return CGSizeMake(MIN(floorf(maxSize.width), ceilf(aSize.width * scale)), MIN(floorf(maxSize.height), ceilf(aSize.height * scale))); }
--- +++ @@ -8,9 +8,8 @@ #include "BRScrollerUtilities.h" -#if !defined(MIN) - #define MIN(A,B) ((A) < (B) ? (A) : (B)) -#endif +#include <math.h> +#include <sys/param.h> inline bool BRFloatsAreEqual(CGFloat a, CGFloat b) { const CGFloat d = a - b;
Fix includes to just what is needed.
apache-2.0
Blue-Rocket/BRScroller,Blue-Rocket/BRScroller
db053d481db41887771dccc52a61b7123f5011a2
// Copyright 2010-2015 The CefSharp Project. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #pragma once #include "../CefSharp.Core/Internals/Messaging/ProcessMessageDelegate.h" namespace CefSharp { class CefAppUnmanagedWrapper; namespace Internals { namespace Messaging { //This class handles incoming evaluate script messages and responses to them after fulfillment. class EvaluateScriptDelegate : public ProcessMessageDelegate { private: DISALLOW_IMPLICIT_CONSTRUCTORS(EvaluateScriptDelegate); CefRefPtr<CefAppUnmanagedWrapper> _appUnmanagedWrapper; public: EvaluateScriptDelegate(CefRefPtr<CefAppUnmanagedWrapper> appUnmanagedWrapper); virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefProcessId sourceProcessId, CefRefPtr<CefProcessMessage> message) override; }; } } }
// Copyright 2010-2015 The CefSharp Project. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #pragma once #include "../CefSharp.Core/Internals/Messaging/ProcessMessageDelegate.h" namespace CefSharp { class CefAppUnmanagedWrapper; namespace Internals { namespace Messaging { //This class handles incoming evaluate script messages and responses to them after fulfillment. class EvaluateScriptDelegate : public ProcessMessageDelegate { private: DISALLOW_IMPLICIT_CONSTRUCTORS(EvaluateScriptDelegate); CefRefPtr<CefAppUnmanagedWrapper> _appUnmanagedWrapper; public: EvaluateScriptDelegate(CefRefPtr<CefAppUnmanagedWrapper> appUnmanagedWrapper); virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefProcessId source_process, CefRefPtr<CefProcessMessage> message) override; }; } } }
--- +++ @@ -23,7 +23,7 @@ CefRefPtr<CefAppUnmanagedWrapper> _appUnmanagedWrapper; public: EvaluateScriptDelegate(CefRefPtr<CefAppUnmanagedWrapper> appUnmanagedWrapper); - virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefProcessId source_process, CefRefPtr<CefProcessMessage> message) override; + virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefProcessId sourceProcessId, CefRefPtr<CefProcessMessage> message) override; }; } }
Rename variable to be more .net like
bsd-3-clause
Haraguroicha/CefSharp,ITGlobal/CefSharp,jamespearce2006/CefSharp,NumbersInternational/CefSharp,zhangjingpu/CefSharp,VioletLife/CefSharp,illfang/CefSharp,windygu/CefSharp,battewr/CefSharp,joshvera/CefSharp,battewr/CefSharp,Haraguroicha/CefSharp,ITGlobal/CefSharp,windygu/CefSharp,jamespearce2006/CefSharp,VioletLife/CefSharp,wangzheng888520/CefSharp,twxstar/CefSharp,gregmartinhtc/CefSharp,Livit/CefSharp,ruisebastiao/CefSharp,wangzheng888520/CefSharp,Haraguroicha/CefSharp,rlmcneary2/CefSharp,ruisebastiao/CefSharp,AJDev77/CefSharp,ITGlobal/CefSharp,joshvera/CefSharp,wangzheng888520/CefSharp,rlmcneary2/CefSharp,Livit/CefSharp,haozhouxu/CefSharp,gregmartinhtc/CefSharp,illfang/CefSharp,illfang/CefSharp,jamespearce2006/CefSharp,dga711/CefSharp,zhangjingpu/CefSharp,yoder/CefSharp,Livit/CefSharp,twxstar/CefSharp,joshvera/CefSharp,NumbersInternational/CefSharp,rlmcneary2/CefSharp,ruisebastiao/CefSharp,windygu/CefSharp,jamespearce2006/CefSharp,windygu/CefSharp,haozhouxu/CefSharp,VioletLife/CefSharp,yoder/CefSharp,Livit/CefSharp,wangzheng888520/CefSharp,illfang/CefSharp,dga711/CefSharp,VioletLife/CefSharp,ruisebastiao/CefSharp,ITGlobal/CefSharp,twxstar/CefSharp,yoder/CefSharp,gregmartinhtc/CefSharp,zhangjingpu/CefSharp,twxstar/CefSharp,zhangjingpu/CefSharp,dga711/CefSharp,haozhouxu/CefSharp,jamespearce2006/CefSharp,dga711/CefSharp,AJDev77/CefSharp,battewr/CefSharp,NumbersInternational/CefSharp,AJDev77/CefSharp,rlmcneary2/CefSharp,haozhouxu/CefSharp,yoder/CefSharp,AJDev77/CefSharp,battewr/CefSharp,joshvera/CefSharp,NumbersInternational/CefSharp,Haraguroicha/CefSharp,gregmartinhtc/CefSharp,Haraguroicha/CefSharp
d21808b5823bdf53fc969019969f700573a8eb69
#ifndef BITCOINADDRESSVALIDATOR_H #define BITCOINADDRESSVALIDATOR_H #include <QValidator> /** Base58 entry widget validator. Corrects near-miss characters and refuses characters that are not part of base58. */ class BitcoinAddressValidator : public QValidator { Q_OBJECT public: explicit BitcoinAddressValidator(QObject *parent = 0); State validate(QString &input, int &pos) const; static const int MaxAddressLength = 35; }; #endif // BITCOINADDRESSVALIDATOR_H
#ifndef BITCOINADDRESSVALIDATOR_H #define BITCOINADDRESSVALIDATOR_H #include <QValidator> /** Base48 entry widget validator. Corrects near-miss characters and refuses characters that are no part of base48. */ class BitcoinAddressValidator : public QValidator { Q_OBJECT public: explicit BitcoinAddressValidator(QObject *parent = 0); State validate(QString &input, int &pos) const; static const int MaxAddressLength = 35; }; #endif // BITCOINADDRESSVALIDATOR_H
--- +++ @@ -3,8 +3,8 @@ #include <QValidator> -/** Base48 entry widget validator. - Corrects near-miss characters and refuses characters that are no part of base48. +/** Base58 entry widget validator. + Corrects near-miss characters and refuses characters that are not part of base58. */ class BitcoinAddressValidator : public QValidator {
Fix typo in a comment: it's base58, not base48.
mit
MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin
380b06677936225540a538e032741e4ed7ef2d26
#ifndef _STDIO_H_ #define _STDIO_H_ /** * \file stdio.h * \brief This file handle the output to the terminal for the user. */ #ifdef __cplusplus extern "C" { #endif #ifndef EOF #define EOF -1 /*!< End of file value */ #endif /** * \brief Print a formatted string * * \param[in] format Format of the string * \param[in] ... Arguments for format specification * * \return Number of characters written */ int printf(const char* __restrict format, ...); /** * \brief Print a formatted string into another string * * \param[out] out String we want to write in * \param[in] format Format of the string * \param[in] ... Arguments for format specification * * \return Number of characters written */ int sprintf(char* out, const char* __restrict format, ...); /** * \brief Print a single char * * \param c Character to print * * \return The character written */ int putchar(int c); /** * \brief Print a string * * \param string The string to print * * \return The number of characters written */ int puts(const char* string); #ifdef __cplusplus } #endif #endif
#ifndef _STDIO_H_ #define _STDIO_H_ /** * \file stdio.h * \brief This file handle the output to the terminal for the user. */ #ifdef __cplusplus extern "C" { #endif #ifndef EOF #define EOF -1 /*!< End of file value */ #endif /** * \brief Print a formatted string * * \param[in] format Format of the string * \param[in] ... Arguments for format specification * * \return Number of characters written */ int printf(const char* __restrict format, ...); /** * \brief Print a single char * * \param c Character to print * * \return The character written */ int putchar(int c); /** * \brief Print a string * * \param string The string to print * * \return The number of characters written */ int puts(const char* string); #ifdef __cplusplus } #endif #endif
--- +++ @@ -25,6 +25,17 @@ int printf(const char* __restrict format, ...); /** + * \brief Print a formatted string into another string + * + * \param[out] out String we want to write in + * \param[in] format Format of the string + * \param[in] ... Arguments for format specification + * + * \return Number of characters written + */ +int sprintf(char* out, const char* __restrict format, ...); + +/** * \brief Print a single char * * \param c Character to print
feat(sprintf): Add signature for sprintf function
mit
Rarioty/FlowS
7293630908ab9fce7a0e23ca32fee5924bf7ff74
#include "stdio.h" #include "stdlib.h" #define TRIALS 4 #define MATRIX_SIZE 2048 short A[MATRIX_SIZE][MATRIX_SIZE], B[MATRIX_SIZE][MATRIX_SIZE], C[MATRIX_SIZE][MATRIX_SIZE] = {{0}}; int main(int argc, char* argv[]) { // Initalize array A and B with '1's for (int i = 0; i < MATRIX_SIZE; ++i) for (int k = 0; k < MATRIX_SIZE; ++k) A[i][k] = B[i][k] = 1; // Iterate through the block sizes for (int block_size = 4; block_size <= 256; block_size *= 2) { // Run TRIALS number of trials for each block size for (int trial = 0; trial < TRIALS; ++trial) { printf("size: %d\n", block_size); } } return 0; }
#include "stdio.h" #include "stdlib.h" #define TRIALS 4 #define MATRIX_SIZE 1024 int main(int argc, char* argv[]) { short A[MATRIX_SIZE][MATRIX_SIZE], B[MATRIX_SIZE][MATRIX_SIZE], C[MATRIX_SIZE][MATRIX_SIZE]; // Initalize array A and B with '1's for (int i = 0; i < MATRIX_SIZE; ++i) for (int k = 0; k < MATRIX_SIZE; ++k) A[i][k] = B[i][k] = 1; // Iterate through the block sizes for (int block_size = 4; block_size <= 256; block_size *= 2) { // Run TRIALS number of trials for each block size for (int trial = 0; trial < TRIALS; ++trial) { printf("size: %d\n", block_size); } } return 0; }
--- +++ @@ -2,14 +2,14 @@ #include "stdlib.h" #define TRIALS 4 -#define MATRIX_SIZE 1024 +#define MATRIX_SIZE 2048 + +short A[MATRIX_SIZE][MATRIX_SIZE], + B[MATRIX_SIZE][MATRIX_SIZE], + C[MATRIX_SIZE][MATRIX_SIZE] = {{0}}; int main(int argc, char* argv[]) { - short A[MATRIX_SIZE][MATRIX_SIZE], - B[MATRIX_SIZE][MATRIX_SIZE], - C[MATRIX_SIZE][MATRIX_SIZE]; - // Initalize array A and B with '1's for (int i = 0; i < MATRIX_SIZE; ++i) for (int k = 0; k < MATRIX_SIZE; ++k)
Move the arrays out of the stack into global mem
mit
EvanPurkhiser/CS-Matrix-Multiplication
925cd389862fe45b44921e1a8693fb8b927a9ed6
#ifndef __CR_ASM_GENERIC_STRING_H__ #define __CR_ASM_GENERIC_STRING_H__ #include "compiler.h" #ifndef HAS_BUILTIN_MEMCPY static always_inline void *builtin_memcpy(void *to, const void *from, unsigned int n) { int i; unsigned char *cto = to; const unsigned char *cfrom = from; for (i = 0; i < n; ++i, ++cto, ++cfrom) { *cto = *cfrom; } return to; } #endif #ifndef HAS_BUILTIN_MEMCMP static always_inline int builtin_memcmp(const void *cs, const void *ct, size_t count) { const unsigned char *su1, *su2; int res = 0; for (su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--) if ((res = *su1 - *su2) != 0) break; return res; } #endif #ifndef HAS_BUILTIN_STRCMP static always_inline int builtin_strcmp(const char *cs, const char *ct) { unsigned char c1, c2; while (1) { c1 = *cs++; c2 = *ct++; if (c1 != c2) return c1 < c2 ? -1 : 1; if (!c1) break; } return 0; } #endif #endif /* __CR_ASM_GENERIC_STRING_H__ */
#ifndef __CR_ASM_GENERIC_STRING_H__ #define __CR_ASM_GENERIC_STRING_H__ #include "compiler.h" #ifndef HAS_BUILTIN_MEMCPY static always_inline void *builtin_memcpy(void *to, const void *from, unsigned int n) { int i; unsigned char *cto = to; const unsigned char *cfrom = from; for (i = 0; i < n; ++i, ++cto, ++cfrom) { *cto = *cfrom; } return to; } #endif #endif /* __CR_ASM_GENERIC_STRING_H__ */
--- +++ @@ -18,4 +18,34 @@ } #endif +#ifndef HAS_BUILTIN_MEMCMP +static always_inline int builtin_memcmp(const void *cs, const void *ct, size_t count) +{ + const unsigned char *su1, *su2; + int res = 0; + + for (su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--) + if ((res = *su1 - *su2) != 0) + break; + return res; +} +#endif + +#ifndef HAS_BUILTIN_STRCMP +static always_inline int builtin_strcmp(const char *cs, const char *ct) +{ + unsigned char c1, c2; + + while (1) { + c1 = *cs++; + c2 = *ct++; + if (c1 != c2) + return c1 < c2 ? -1 : 1; + if (!c1) + break; + } + return 0; +} +#endif + #endif /* __CR_ASM_GENERIC_STRING_H__ */
asm: Add builtin_memcpy, builtin_memcmp generic helpers Will need them in pie code soon. Signed-off-by: Cyrill Gorcunov <7a1ea01eee6961eb1e372e3508c2670446d086f4@openvz.org> Signed-off-by: Pavel Emelyanov <c9a32589e048e044184536f7ac71ef92fe82df3e@parallels.com>
lgpl-2.1
efiop/criu,biddyweb/criu,svloyso/criu,efiop/criu,KKoukiou/criu-remote,KKoukiou/criu-remote,marcosnils/criu,kawamuray/criu,ldu4/criu,eabatalov/criu,efiop/criu,gablg1/criu,eabatalov/criu,AuthenticEshkinKot/criu,rentzsch/criu,svloyso/criu,svloyso/criu,wtf42/criu,ldu4/criu,biddyweb/criu,eabatalov/criu,AuthenticEshkinKot/criu,LK4D4/criu,eabatalov/criu,sdgdsffdsfff/criu,fbocharov/criu,tych0/criu,KKoukiou/criu-remote,sdgdsffdsfff/criu,tych0/criu,gonkulator/criu,tych0/criu,kawamuray/criu,LK4D4/criu,kawamuray/criu,gonkulator/criu,marcosnils/criu,rentzsch/criu,LK4D4/criu,kawamuray/criu,LK4D4/criu,sdgdsffdsfff/criu,marcosnils/criu,gablg1/criu,efiop/criu,ldu4/criu,KKoukiou/criu-remote,biddyweb/criu,sdgdsffdsfff/criu,rentzsch/criu,rentzsch/criu,svloyso/criu,tych0/criu,gonkulator/criu,LK4D4/criu,KKoukiou/criu-remote,AuthenticEshkinKot/criu,sdgdsffdsfff/criu,AuthenticEshkinKot/criu,wtf42/criu,LK4D4/criu,kawamuray/criu,gonkulator/criu,AuthenticEshkinKot/criu,ldu4/criu,gonkulator/criu,gablg1/criu,gonkulator/criu,eabatalov/criu,kawamuray/criu,wtf42/criu,gablg1/criu,gablg1/criu,marcosnils/criu,fbocharov/criu,biddyweb/criu,biddyweb/criu,marcosnils/criu,rentzsch/criu,fbocharov/criu,wtf42/criu,wtf42/criu,efiop/criu,svloyso/criu,gablg1/criu,wtf42/criu,KKoukiou/criu-remote,AuthenticEshkinKot/criu,ldu4/criu,rentzsch/criu,tych0/criu,efiop/criu,biddyweb/criu,fbocharov/criu,sdgdsffdsfff/criu,ldu4/criu,fbocharov/criu,marcosnils/criu,svloyso/criu,tych0/criu,fbocharov/criu,eabatalov/criu
a21cdb843767cc21a1b371105883c735784c8793
#ifndef COMPTONSPECTRUM #define COMPTONSPECTRUM #include "TH1F.h" class spectrum { public: spectrum(double initialEnergy = 0, double resolution = 0); void setNumberOfEvents(const int events); virtual TH1F* getHisto(); virtual void generateEvents(); protected: double fInitialEnergy = 0; double fResolution = 0; int fEvents = 0; std::vector<double> fSimEvents; }; #endif //COMPTONSPECTRUM
#ifndef COMPTONSPECTRUM #define COMPTONSPECTRUM #include "TH1F.h" class spectrum { public: spectrum(double initialEnergy, double resolution); void setNumberOfEvents(const int events); virtual TH1F* getHisto(); virtual void generateEvents(); protected: double fInitialEnergy; double fResolution; int fEvents; std::vector<double> fSimEvents; }; #endif //COMPTONSPECTRUM
--- +++ @@ -6,14 +6,14 @@ class spectrum { public: - spectrum(double initialEnergy, double resolution); + spectrum(double initialEnergy = 0, double resolution = 0); void setNumberOfEvents(const int events); virtual TH1F* getHisto(); virtual void generateEvents(); protected: - double fInitialEnergy; - double fResolution; - int fEvents; + double fInitialEnergy = 0; + double fResolution = 0; + int fEvents = 0; std::vector<double> fSimEvents; };
Add default values of variables
mit
wictus/comptonPlots
31679d8270f599c1a0927e5bcfd6f865d28167c1
#ifndef ARGON2_NODE_H #define ARGON2_NODE_H #include <memory> #include <nan.h> namespace NodeArgon2 { class HashAsyncWorker final: public Nan::AsyncWorker { public: explicit HashAsyncWorker(std::string&& plain, std::string&& salt, std::tuple<uint32_t, uint32_t, uint32_t, argon2_type>&& params); void Execute() override; void HandleOKCallback() override; void HandleErrorCallback() override; private: std::string plain; std::string salt; uint32_t time_cost; uint32_t memory_cost; uint32_t parallelism; argon2_type type; std::unique_ptr<char[]> output; }; class VerifyAsyncWorker final: public Nan::AsyncWorker { public: explicit VerifyAsyncWorker(std::string&& hash, std::string&& plain, argon2_type type); void Execute() override; void HandleOKCallback() override; void HandleErrorCallback() override; private: std::string hash; std::string plain; argon2_type type; bool output; }; NAN_METHOD(Hash); NAN_METHOD(HashSync); NAN_METHOD(Verify); NAN_METHOD(VerifySync); } #endif /* ARGON2_NODE_H */
#ifndef ARGON2_NODE_H #define ARGON2_NODE_H #include <memory> #include <nan.h> namespace NodeArgon2 { class HashAsyncWorker final: public Nan::AsyncWorker { public: HashAsyncWorker(std::string&& plain, std::string&& salt, std::tuple<uint32_t, uint32_t, uint32_t, argon2_type>&& params); void Execute() override; void HandleOKCallback() override; void HandleErrorCallback() override; private: std::string plain; std::string salt; uint32_t time_cost; uint32_t memory_cost; uint32_t parallelism; argon2_type type; std::unique_ptr<char[]> output; }; class VerifyAsyncWorker final: public Nan::AsyncWorker { public: VerifyAsyncWorker(std::string&& hash, std::string&& plain, argon2_type type); void Execute() override; void HandleOKCallback() override; void HandleErrorCallback() override; private: std::string hash; std::string plain; argon2_type type; bool output; }; NAN_METHOD(Hash); NAN_METHOD(HashSync); NAN_METHOD(Verify); NAN_METHOD(VerifySync); } #endif /* ARGON2_NODE_H */
--- +++ @@ -8,7 +8,7 @@ class HashAsyncWorker final: public Nan::AsyncWorker { public: - HashAsyncWorker(std::string&& plain, std::string&& salt, + explicit HashAsyncWorker(std::string&& plain, std::string&& salt, std::tuple<uint32_t, uint32_t, uint32_t, argon2_type>&& params); void Execute() override; @@ -29,7 +29,8 @@ class VerifyAsyncWorker final: public Nan::AsyncWorker { public: - VerifyAsyncWorker(std::string&& hash, std::string&& plain, argon2_type type); + explicit VerifyAsyncWorker(std::string&& hash, std::string&& plain, + argon2_type type); void Execute() override;
Use explicit constructors for correctness
mit
markfejes/node-argon2,markfejes/node-argon2,markfejes/node-argon2,ranisalt/node-argon2,ranisalt/node-argon2,ranisalt/node-argon2
62f68976927c28ad86144c596576d6311a21f2bd
#include <arv.h> #include <arvgvinterface.h> int main (int argc, char **argv) { ArvInterface *interface; ArvDevice *device; char buffer[100000]; g_type_init (); interface = arv_gv_interface_get_instance (); device = arv_interface_get_first_device (interface); if (device != NULL) { arv_device_read (device, 0x00014150, 8, buffer); arv_device_read (device, 0x000000e8, 16, buffer); arv_device_read (device, ARV_GVCP_GENICAM_FILENAME_ADDRESS_1, ARV_GVCP_GENICAM_FILENAME_SIZE, buffer); arv_device_read (device, ARV_GVCP_GENICAM_FILENAME_ADDRESS_2, ARV_GVCP_GENICAM_FILENAME_SIZE, buffer); arv_device_read (device, 0x00100000, 0x00015904, buffer); g_file_set_contents ("/tmp/genicam.xml", buffer, 0x00015904, NULL); g_object_unref (device); } else g_message ("No device found"); g_object_unref (interface); return 0; }
#include <arv.h> #include <arvgvinterface.h> int main (int argc, char **argv) { ArvInterface *interface; ArvDevice *device; char buffer[1024]; g_type_init (); interface = arv_gv_interface_get_instance (); device = arv_interface_get_first_device (interface); if (device != NULL) { arv_device_read (device, 0x00014150, 8, buffer); arv_device_read (device, 0x000000e8, 16, buffer); arv_device_read (device, ARV_GVCP_GENICAM_FILENAME_ADDRESS_1, ARV_GVCP_GENICAM_FILENAME_SIZE, buffer); arv_device_read (device, ARV_GVCP_GENICAM_FILENAME_ADDRESS_2, ARV_GVCP_GENICAM_FILENAME_SIZE, buffer); arv_device_read (device, 0x00100000, 0x00015904, buffer); g_object_unref (device); } else g_message ("No device found"); g_object_unref (interface); return 0; }
--- +++ @@ -6,7 +6,7 @@ { ArvInterface *interface; ArvDevice *device; - char buffer[1024]; + char buffer[100000]; g_type_init (); @@ -26,6 +26,8 @@ arv_device_read (device, 0x00100000, 0x00015904, buffer); + g_file_set_contents ("/tmp/genicam.xml", buffer, 0x00015904, NULL); + g_object_unref (device); } else g_message ("No device found");
Save the genicam file in /tmp/genicam.xml
lgpl-2.1
AravisProject/aravis,AnilRamachandran/aravis,AnilRamachandran/aravis,lu-zero/aravis,AravisProject/aravis,AravisProject/aravis,AnilRamachandran/aravis,AravisProject/aravis,lu-zero/aravis,lu-zero/aravis,AravisProject/aravis,lu-zero/aravis,AnilRamachandran/aravis,lu-zero/aravis,AnilRamachandran/aravis
1c2d7aaafef7a07c2b088142a57666ff51e5d5c5
#ifndef SRC_TRANSFER_FUNCTION_PARSER_H_ #define SRC_TRANSFER_FUNCTION_PARSER_H_ #include <QGradient> #include <QString> #include <QXmlDefaultHandler> class QGradientContentHandler; /** * \brief Parser for XML representation of a QGradient used as transfer function * */ class TransferFunctionParser { public: TransferFunctionParser(QString path); QGradient *parse(); private: QXmlSimpleReader *xmlReader; QXmlInputSource *source; QGradientContentHandler *handler; }; #endif // SRC_TRANSFER_FUNCTION_PARSER_H_
#ifndef SRC_TRANSFER_FUNCTION_PARSER_H_ #define SRC_TRANSFER_FUNCTION_PARSER_H_ #include <QGradient> #include <QString> #include <QXmlDefaultHandler> /** * \brief * * */ class QGradientContentHandler; class TransferFunctionParser { public: TransferFunctionParser(QString path); QGradient *parse(); private: QXmlSimpleReader *xmlReader; QXmlInputSource *source; QGradientContentHandler *handler; }; #endif // SRC_TRANSFER_FUNCTION_PARSER_H_
--- +++ @@ -6,13 +6,12 @@ #include <QString> #include <QXmlDefaultHandler> -/** - * \brief - * - * - */ class QGradientContentHandler; +/** + * \brief Parser for XML representation of a QGradient used as transfer function + * + */ class TransferFunctionParser { public:
Add brief description for TransferFunctionParser.
mit
Christof/tf-parser
e5e5f7dff34caa4772119ec04b7356abd25fde95
/* vim:set shiftwidth=4 ts=8: */ /********************************************************** * This software is part of the graphviz package * * http://www.graphviz.org/ * * * * Copyright (c) 1994-2004 AT&T Corp. * * and is licensed under the * * Common Public License, Version 1.0 * * by AT&T Corp. * * * * Information and Software Systems Research * * AT&T Research, Florham Park NJ * **********************************************************/ #ifndef TOPVIEWDATA_H #define TOPVIEWDATA_H #include <gtk/gtk.h> #include "cgraph.h" #include "smyrnadefs.h" #include "tvnodes.h" int prepare_nodes_for_groups(topview * t, topviewdata * td, int groupindex); int load_host_buttons(topview * t, Agraph_t * g, glCompSet * s); int click_group_button(int groupindex); void glhost_button_clicked_Slot(void *p); _BB void host_button_clicked_Slot(GtkWidget * widget, gpointer user_data); #endif
/* vim:set shiftwidth=4 ts=8: */ /********************************************************** * This software is part of the graphviz package * * http://www.graphviz.org/ * * * * Copyright (c) 1994-2004 AT&T Corp. * * and is licensed under the * * Common Public License, Version 1.0 * * by AT&T Corp. * * * * Information and Software Systems Research * * AT&T Research, Florham Park NJ * **********************************************************/ #ifndef TOPVIEWDATA_H #define TOPVIEWDATA_H #include <gtk/gtk.h> #include "cgraph.h" #include "smyrnadefs.h" #include "tvnodes.h" int prepare_nodes_for_groups(topview * t, topviewdata * td, int groupindex); int load_host_buttons(topview * t, Agraph_t * g, glCompSet * s); int validate_group_node(tv_node * TV_Node, char *regex_string); int click_group_button(int groupindex); void glhost_button_clicked_Slot(void *p); _BB void host_button_clicked_Slot(GtkWidget * widget, gpointer user_data); #endif
--- +++ @@ -21,14 +21,9 @@ #include "smyrnadefs.h" #include "tvnodes.h" - - - - int prepare_nodes_for_groups(topview * t, topviewdata * td, int groupindex); int load_host_buttons(topview * t, Agraph_t * g, glCompSet * s); -int validate_group_node(tv_node * TV_Node, char *regex_string); int click_group_button(int groupindex); void glhost_button_clicked_Slot(void *p); _BB void host_button_clicked_Slot(GtkWidget * widget, gpointer user_data);
Integrate topfish and sfdp into main tree, using GTS for triangulation; remove duplicated code
epl-1.0
kbrock/graphviz,BMJHayward/graphviz,kbrock/graphviz,BMJHayward/graphviz,jho1965us/graphviz,pixelglow/graphviz,jho1965us/graphviz,ellson/graphviz,pixelglow/graphviz,tkelman/graphviz,ellson/graphviz,kbrock/graphviz,jho1965us/graphviz,MjAbuz/graphviz,tkelman/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,pixelglow/graphviz,kbrock/graphviz,jho1965us/graphviz,kbrock/graphviz,BMJHayward/graphviz,jho1965us/graphviz,pixelglow/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,tkelman/graphviz,kbrock/graphviz,BMJHayward/graphviz,ellson/graphviz,ellson/graphviz,tkelman/graphviz,jho1965us/graphviz,MjAbuz/graphviz,tkelman/graphviz,tkelman/graphviz,tkelman/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,jho1965us/graphviz,MjAbuz/graphviz,tkelman/graphviz,jho1965us/graphviz,tkelman/graphviz,ellson/graphviz,kbrock/graphviz,BMJHayward/graphviz,ellson/graphviz,ellson/graphviz,kbrock/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,pixelglow/graphviz,kbrock/graphviz,ellson/graphviz,BMJHayward/graphviz,pixelglow/graphviz,pixelglow/graphviz,jho1965us/graphviz,kbrock/graphviz,ellson/graphviz,pixelglow/graphviz,BMJHayward/graphviz,tkelman/graphviz,jho1965us/graphviz,MjAbuz/graphviz,kbrock/graphviz,ellson/graphviz,BMJHayward/graphviz,pixelglow/graphviz,pixelglow/graphviz,tkelman/graphviz,jho1965us/graphviz,ellson/graphviz,pixelglow/graphviz
f7a22deb1c15605ae68b34ace8326fcf548427ca
#ifndef LIBTRADING_FAST_FEED_H #define LIBTRADING_FAST_FEED_H #include "libtrading/proto/fast_session.h" #include <sys/socket.h> #include <sys/types.h> struct fast_feed { struct fast_session *session; struct fast_session_cfg cfg; u64 recv_num; char xml[128]; char lip[32]; char sip[32]; char ip[32]; bool active; int port; }; static inline int socket_setopt(int sockfd, int level, int optname, int optval) { return setsockopt(sockfd, level, optname, (void *) &optval, sizeof(optval)); } static inline struct fast_message *fast_feed_recv(struct fast_feed *feed, int flags) { if (feed->session->reset) fast_session_reset(feed->session); return fast_session_recv(feed->session, flags); } int fast_feed_close(struct fast_feed *feed); int fast_feed_open(struct fast_feed *feed); #endif /* LIBTRADING_FAST_FEED_H */
#ifndef LIBTRADING_FAST_FEED_H #define LIBTRADING_FAST_FEED_H #include "libtrading/proto/fast_session.h" #include <sys/socket.h> #include <sys/types.h> struct fast_feed { struct fast_session *session; struct fast_session_cfg cfg; u64 recv_num; char xml[128]; char lip[32]; char sip[32]; char ip[32]; bool active; int port; }; static inline int socket_setopt(int sockfd, int level, int optname, int optval) { return setsockopt(sockfd, level, optname, (void *) &optval, sizeof(optval)); } static inline struct fast_message *fast_feed_recv(struct fast_feed *feed, int flags) { return fast_session_recv(feed->session, flags); } int fast_feed_close(struct fast_feed *feed); int fast_feed_open(struct fast_feed *feed); #endif /* LIBTRADING_FAST_FEED_H */
--- +++ @@ -26,6 +26,9 @@ static inline struct fast_message *fast_feed_recv(struct fast_feed *feed, int flags) { + if (feed->session->reset) + fast_session_reset(feed->session); + return fast_session_recv(feed->session, flags); }
FAST: Reset a session if implicit reset option is set Signed-off-by: Marat Stanichenko <146c4a279a7427b2cc19a19b6130cbb7ee404ab1@gmail.com> Signed-off-by: Pekka Enberg <add4fcd06328a394f0ad91feda7ee057316dc5ed@kernel.org>
bsd-2-clause
jvirtanen/libtrading,divaykin/libtrading,libtrading/libtrading,mstanichenko/libtrading,divaykin/libtrading,libtrading/libtrading,svdev/libtrading,penberg/libtrading,fengzhyuan/libtrading,femtotrader/libtrading,penberg/libtrading,NunoEdgarGub1/libtrading,etoestja/libtrading,mstanichenko/libtrading,Bitcoinsulting/libtrading,jvirtanen/libtrading,fengzhyuan/libtrading,etoestja/libtrading,femtotrader/libtrading,svdev/libtrading,NunoEdgarGub1/libtrading,Bitcoinsulting/libtrading
03763a26c09855a4ebf565ea7550c9f255e26e4d
/* File: connection.h * * Description: See "md.h" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __MD5_H__ #define __MD5_H__ #include "psqlodbc.h" #include <stdlib.h> #include <string.h> #ifdef WIN32 #define MD5_ODBC #define FRONTEND #endif #define MD5_PASSWD_LEN 35 /* From c.h */ #ifndef __BEOS__ #ifndef __cplusplus #ifndef bool typedef char bool; #endif #ifndef true #define true ((bool) 1) #endif #ifndef false #define false ((bool) 0) #endif #endif /* not C++ */ #endif /* __BEOS__ */ /* Also defined in include/c.h */ #if SIZEOF_UINT8 == 0 typedef unsigned char uint8; /* == 8 bits */ typedef unsigned short uint16; /* == 16 bits */ typedef unsigned int uint32; /* == 32 bits */ #endif /* SIZEOF_UINT8 == 0 */ extern bool EncryptMD5(const char *passwd, const char *salt, size_t salt_len, char *buf); #endif
/* File: connection.h * * Description: See "md.h" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __MD5_H__ #define __MD5_H__ #include "psqlodbc.h" #include <stdlib.h> #include <string.h> #ifdef WIN32 #define MD5_ODBC #define FRONTEND #endif #define MD5_PASSWD_LEN 35 /* From c.h */ #ifndef __BEOS__ #ifndef __cplusplus #ifndef bool typedef char bool; #endif #ifndef true #define true ((bool) 1) #endif #ifndef false #define false ((bool) 0) #endif #endif /* not C++ */ #endif /* __BEOS__ */ /* #if SIZEOF_UINT8 == 0 Can't get this from configure */ typedef unsigned char uint8; /* == 8 bits */ typedef unsigned short uint16; /* == 16 bits */ typedef unsigned int uint32; /* == 32 bits */ /* #endif */ extern bool EncryptMD5(const char *passwd, const char *salt, size_t salt_len, char *buf); #endif
--- +++ @@ -39,11 +39,12 @@ #endif /* not C++ */ #endif /* __BEOS__ */ -/* #if SIZEOF_UINT8 == 0 Can't get this from configure */ +/* Also defined in include/c.h */ +#if SIZEOF_UINT8 == 0 typedef unsigned char uint8; /* == 8 bits */ typedef unsigned short uint16; /* == 16 bits */ typedef unsigned int uint32; /* == 32 bits */ -/* #endif */ +#endif /* SIZEOF_UINT8 == 0 */ extern bool EncryptMD5(const char *passwd, const char *salt, size_t salt_len, char *buf);
Add configure result checks on odbc, per Peter E.
apache-2.0
adam8157/gpdb,randomtask1155/gpdb,ashwinstar/gpdb,xinzweb/gpdb,ovr/postgres-xl,zeroae/postgres-xl,yazun/postgres-xl,ahachete/gpdb,kmjungersen/PostgresXL,snaga/postgres-xl,rubikloud/gpdb,arcivanov/postgres-xl,ashwinstar/gpdb,jmcatamney/gpdb,techdragon/Postgres-XL,adam8157/gpdb,lintzc/gpdb,yuanzhao/gpdb,ahachete/gpdb,techdragon/Postgres-XL,lisakowen/gpdb,ovr/postgres-xl,foyzur/gpdb,zeroae/postgres-xl,ahachete/gpdb,CraigHarris/gpdb,janebeckman/gpdb,techdragon/Postgres-XL,greenplum-db/gpdb,foyzur/gpdb,lintzc/gpdb,xuegang/gpdb,ovr/postgres-xl,arcivanov/postgres-xl,chrishajas/gpdb,ahachete/gpdb,yuanzhao/gpdb,lisakowen/gpdb,janebeckman/gpdb,arcivanov/postgres-xl,kmjungersen/PostgresXL,foyzur/gpdb,zaksoup/gpdb,Quikling/gpdb,tpostgres-projects/tPostgres,postmind-net/postgres-xl,xuegang/gpdb,edespino/gpdb,zeroae/postgres-xl,cjcjameson/gpdb,postmind-net/postgres-xl,cjcjameson/gpdb,zaksoup/gpdb,zeroae/postgres-xl,cjcjameson/gpdb,50wu/gpdb,lpetrov-pivotal/gpdb,atris/gpdb,rvs/gpdb,tangp3/gpdb,ashwinstar/gpdb,xinzweb/gpdb,rvs/gpdb,randomtask1155/gpdb,jmcatamney/gpdb,tpostgres-projects/tPostgres,edespino/gpdb,zeroae/postgres-xl,yuanzhao/gpdb,cjcjameson/gpdb,pavanvd/postgres-xl,jmcatamney/gpdb,randomtask1155/gpdb,lintzc/gpdb,xinzweb/gpdb,rubikloud/gpdb,cjcjameson/gpdb,lisakowen/gpdb,atris/gpdb,jmcatamney/gpdb,zaksoup/gpdb,ahachete/gpdb,greenplum-db/gpdb,lpetrov-pivotal/gpdb,jmcatamney/gpdb,Chibin/gpdb,edespino/gpdb,tangp3/gpdb,kmjungersen/PostgresXL,lisakowen/gpdb,lintzc/gpdb,0x0FFF/gpdb,yazun/postgres-xl,50wu/gpdb,randomtask1155/gpdb,arcivanov/postgres-xl,oberstet/postgres-xl,tangp3/gpdb,tangp3/gpdb,xuegang/gpdb,lintzc/gpdb,yazun/postgres-xl,foyzur/gpdb,foyzur/gpdb,rubikloud/gpdb,edespino/gpdb,50wu/gpdb,Postgres-XL/Postgres-XL,0x0FFF/gpdb,Chibin/gpdb,kmjungersen/PostgresXL,oberstet/postgres-xl,greenplum-db/gpdb,greenplum-db/gpdb,janebeckman/gpdb,yuanzhao/gpdb,snaga/postgres-xl,rubikloud/gpdb,rubikloud/gpdb,lintzc/gpdb,xinzweb/gpdb,lpetrov-pivotal/gpdb,lisakowen/gpdb,50wu/gpdb,pavanvd/postgres-xl,chrishajas/gpdb,cjcjameson/gpdb,greenplum-db/gpdb,arcivanov/postgres-xl,janebeckman/gpdb,cjcjameson/gpdb,tangp3/gpdb,royc1/gpdb,janebeckman/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,atris/gpdb,randomtask1155/gpdb,0x0FFF/gpdb,lpetrov-pivotal/gpdb,Postgres-XL/Postgres-XL,Chibin/gpdb,ovr/postgres-xl,techdragon/Postgres-XL,edespino/gpdb,Quikling/gpdb,edespino/gpdb,lisakowen/gpdb,chrishajas/gpdb,Quikling/gpdb,edespino/gpdb,techdragon/Postgres-XL,janebeckman/gpdb,postmind-net/postgres-xl,ovr/postgres-xl,royc1/gpdb,50wu/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,tpostgres-projects/tPostgres,CraigHarris/gpdb,adam8157/gpdb,Chibin/gpdb,royc1/gpdb,tpostgres-projects/tPostgres,adam8157/gpdb,royc1/gpdb,kaknikhil/gpdb,Chibin/gpdb,pavanvd/postgres-xl,chrishajas/gpdb,Chibin/gpdb,Quikling/gpdb,rvs/gpdb,adam8157/gpdb,oberstet/postgres-xl,0x0FFF/gpdb,50wu/gpdb,0x0FFF/gpdb,atris/gpdb,janebeckman/gpdb,jmcatamney/gpdb,CraigHarris/gpdb,tangp3/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,Postgres-XL/Postgres-XL,lpetrov-pivotal/gpdb,foyzur/gpdb,atris/gpdb,CraigHarris/gpdb,kaknikhil/gpdb,yazun/postgres-xl,rvs/gpdb,yazun/postgres-xl,CraigHarris/gpdb,CraigHarris/gpdb,xinzweb/gpdb,rvs/gpdb,Quikling/gpdb,tangp3/gpdb,ashwinstar/gpdb,Chibin/gpdb,rubikloud/gpdb,ahachete/gpdb,greenplum-db/gpdb,xuegang/gpdb,lintzc/gpdb,greenplum-db/gpdb,kaknikhil/gpdb,cjcjameson/gpdb,lintzc/gpdb,ahachete/gpdb,xinzweb/gpdb,zaksoup/gpdb,kaknikhil/gpdb,kaknikhil/gpdb,rvs/gpdb,xinzweb/gpdb,kaknikhil/gpdb,lpetrov-pivotal/gpdb,rubikloud/gpdb,xuegang/gpdb,yuanzhao/gpdb,rubikloud/gpdb,royc1/gpdb,Quikling/gpdb,kaknikhil/gpdb,edespino/gpdb,snaga/postgres-xl,xuegang/gpdb,tangp3/gpdb,janebeckman/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,CraigHarris/gpdb,Chibin/gpdb,lisakowen/gpdb,Quikling/gpdb,xuegang/gpdb,50wu/gpdb,randomtask1155/gpdb,yuanzhao/gpdb,zaksoup/gpdb,edespino/gpdb,snaga/postgres-xl,greenplum-db/gpdb,rvs/gpdb,adam8157/gpdb,janebeckman/gpdb,zaksoup/gpdb,edespino/gpdb,atris/gpdb,chrishajas/gpdb,lintzc/gpdb,royc1/gpdb,xuegang/gpdb,snaga/postgres-xl,tpostgres-projects/tPostgres,xuegang/gpdb,0x0FFF/gpdb,kmjungersen/PostgresXL,ashwinstar/gpdb,chrishajas/gpdb,postmind-net/postgres-xl,Chibin/gpdb,ashwinstar/gpdb,xinzweb/gpdb,yuanzhao/gpdb,jmcatamney/gpdb,chrishajas/gpdb,Quikling/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,Postgres-XL/Postgres-XL,rvs/gpdb,royc1/gpdb,atris/gpdb,adam8157/gpdb,rvs/gpdb,atris/gpdb,lisakowen/gpdb,lpetrov-pivotal/gpdb,chrishajas/gpdb,Chibin/gpdb,Quikling/gpdb,zaksoup/gpdb,CraigHarris/gpdb,randomtask1155/gpdb,randomtask1155/gpdb,pavanvd/postgres-xl,0x0FFF/gpdb,oberstet/postgres-xl,royc1/gpdb,adam8157/gpdb,kaknikhil/gpdb,zaksoup/gpdb,janebeckman/gpdb,Quikling/gpdb,foyzur/gpdb,ahachete/gpdb,jmcatamney/gpdb,oberstet/postgres-xl,arcivanov/postgres-xl,ashwinstar/gpdb,foyzur/gpdb,postmind-net/postgres-xl,rvs/gpdb,Postgres-XL/Postgres-XL,50wu/gpdb,lpetrov-pivotal/gpdb
07de4cbbbb7c3f5ef9728342a35efc12f6d6080b
#pragma once #include <Windows.h> class FakeKeyboard { public: static void SimulateKeypress(unsigned short vk) { unsigned int scan = MapVirtualKey(vk, MAPVK_VK_TO_VSC); INPUT input[2]; input[0] = { 0 }; input[0].type = INPUT_KEYBOARD; input[0].ki.wVk = vk; input[0].ki.wScan = scan; input[0].ki.dwFlags = KEYEVENTF_SCANCODE; input[0].ki.time = 0; input[0].ki.dwExtraInfo = GetMessageExtraInfo(); input[1] = { 0 }; input[1].type = INPUT_KEYBOARD; input[1].ki.wVk = vk; input[1].ki.wScan = scan; input[1].ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP; input[1].ki.time = 0; input[1].ki.dwExtraInfo = GetMessageExtraInfo(); UINT result = SendInput(2, input, sizeof(INPUT)); } };
#pragma once #include <Windows.h> class FakeKeyboard { public: static void SimulateKeypress(unsigned short vk) { INPUT input = { 0 }; input.type = INPUT_KEYBOARD; input.ki.wVk = vk; input.ki.wScan = 0; input.ki.dwFlags = 0; input.ki.time = 0; input.ki.dwExtraInfo = GetMessageExtraInfo(); /* key down: */ SendInput(1, &input, sizeof(INPUT)); /* key up: */ input.ki.dwFlags = KEYEVENTF_KEYUP; SendInput(1, &input, sizeof(INPUT)); } };
--- +++ @@ -5,19 +5,26 @@ class FakeKeyboard { public: static void SimulateKeypress(unsigned short vk) { - INPUT input = { 0 }; - input.type = INPUT_KEYBOARD; - input.ki.wVk = vk; - input.ki.wScan = 0; - input.ki.dwFlags = 0; - input.ki.time = 0; - input.ki.dwExtraInfo = GetMessageExtraInfo(); + unsigned int scan = MapVirtualKey(vk, MAPVK_VK_TO_VSC); - /* key down: */ - SendInput(1, &input, sizeof(INPUT)); + INPUT input[2]; - /* key up: */ - input.ki.dwFlags = KEYEVENTF_KEYUP; - SendInput(1, &input, sizeof(INPUT)); + input[0] = { 0 }; + input[0].type = INPUT_KEYBOARD; + input[0].ki.wVk = vk; + input[0].ki.wScan = scan; + input[0].ki.dwFlags = KEYEVENTF_SCANCODE; + input[0].ki.time = 0; + input[0].ki.dwExtraInfo = GetMessageExtraInfo(); + + input[1] = { 0 }; + input[1].type = INPUT_KEYBOARD; + input[1].ki.wVk = vk; + input[1].ki.wScan = scan; + input[1].ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP; + input[1].ki.time = 0; + input[1].ki.dwExtraInfo = GetMessageExtraInfo(); + + UINT result = SendInput(2, input, sizeof(INPUT)); } };
Send simulated keystrokes as a single atomic event
bsd-2-clause
malensek/3RVX,Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX
a6cf12de9bae887b91767b2d3e1e4a4f64a410e9
#include <stdio.h> float K_5_BY_9 = 5.0 / 9.0; float K_32 = 32; int SUCCESS = 0; int main(void) { float fahrenheit, celsius; int lower, upper, step; lower = 0; upper = 300; step = 20; printf("|-----------|\n"); printf("|%4s|%6s|\n", "F", "C"); printf("|-----------|\n"); fahrenheit = lower; while (fahrenheit <= upper) { celsius = K_5_BY_9 * (fahrenheit - K_32); printf("|%4.0f|%6.1f|\n", fahrenheit, celsius); fahrenheit = fahrenheit + step; } printf("|-----------|\n"); return SUCCESS; }
#include <stdio.h> float K_5_BY_9 = 5.0 / 9.0; float K_32 = 32; int main(void) { float fahr, celsius; int lower, upper, step; lower = 0; upper = 300; step = 20; printf("|-----------|\n"); printf("|%4s|%6s|\n", "F", "C"); printf("|-----------|\n"); fahr = lower; while (fahr <= upper) { celsius = K_5_BY_9 * (fahr - K_32); printf("|%4.0f|%6.1f|\n", fahr, celsius); fahr = fahr + step; } printf("|-----------|\n"); return 0; }
--- +++ @@ -4,10 +4,12 @@ float K_5_BY_9 = 5.0 / 9.0; float K_32 = 32; +int SUCCESS = 0; + int main(void) { - float fahr, celsius; + float fahrenheit, celsius; int lower, upper, step; lower = 0; @@ -18,14 +20,14 @@ printf("|%4s|%6s|\n", "F", "C"); printf("|-----------|\n"); - fahr = lower; - while (fahr <= upper) { - celsius = K_5_BY_9 * (fahr - K_32); - printf("|%4.0f|%6.1f|\n", fahr, celsius); - fahr = fahr + step; + fahrenheit = lower; + while (fahrenheit <= upper) { + celsius = K_5_BY_9 * (fahrenheit - K_32); + printf("|%4.0f|%6.1f|\n", fahrenheit, celsius); + fahrenheit = fahrenheit + step; } printf("|-----------|\n"); - return 0; + return SUCCESS; }
Update ch1/ex3 v2 exercise with more readable code
bsd-3-clause
rmk135/the-c-programming-language
63aed9a9b6c82e1c9114784721c9a2edff7d0e68
#ifndef __INCLUDED_ECE554E80AF211E7AA6EA088B4D1658C #define __INCLUDED_ECE554E80AF211E7AA6EA088B4D1658C #include <pt/pt.h> class RCoRoutineRunner { public: RCoRoutineRunner(); virtual ~RCoRoutineRunner(); virtual char run() = 0; public: struct pt mPt; }; #endif // __INCLUDED_ECE554E80AF211E7AA6EA088B4D1658C
#ifndef __INCLUDED_ECE554E80AF211E7AA6EA088B4D1658C #define __INCLUDED_ECE554E80AF211E7AA6EA088B4D1658C #include <pt/pt.h> class RCoRoutineRunner { public: RCoRoutineRunner(); virtual ~RCoRoutineRunner(); virtual char run(); public: struct pt mPt; }; #endif // __INCLUDED_ECE554E80AF211E7AA6EA088B4D1658C
--- +++ @@ -11,7 +11,7 @@ ~RCoRoutineRunner(); virtual char - run(); + run() = 0; public: struct pt mPt;
Mark run() as pure virtual function
mit
starofrainnight/ArduinoRabirdTookit,starofrainnight/ArduinoRabirdToolkit,starofrainnight/ArduinoRabirdToolkit
a5df96b98e206885fcd5010bec59f080c5b630ab
// // SwiftDevHints.h // SwiftDevHints // // Created by ZHOU DENGFENG on 15/7/17. // Copyright © 2017 ZHOU DENGFENG DEREK. All rights reserved. // @import Foundation; #import <CommonCrypto/CommonCrypto.h> //! Project version number for SwiftDevHints. FOUNDATION_EXPORT double SwiftDevHintsVersionNumber; //! Project version string for SwiftDevHints. FOUNDATION_EXPORT const unsigned char SwiftDevHintsVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <SwiftDevHints/PublicHeader.h>
// // SwiftDevHints.h // SwiftDevHints // // Created by ZHOU DENGFENG on 15/7/17. // Copyright © 2017 ZHOU DENGFENG DEREK. All rights reserved. // #import <UIKit/UIKit.h> #import <CommonCrypto/CommonCrypto.h> //! Project version number for SwiftDevHints. FOUNDATION_EXPORT double SwiftDevHintsVersionNumber; //! Project version string for SwiftDevHints. FOUNDATION_EXPORT const unsigned char SwiftDevHintsVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <SwiftDevHints/PublicHeader.h>
--- +++ @@ -6,7 +6,7 @@ // Copyright © 2017 ZHOU DENGFENG DEREK. All rights reserved. // -#import <UIKit/UIKit.h> +@import Foundation; #import <CommonCrypto/CommonCrypto.h>
Remove UIKit import to support macOS
mit
derekcoder/SwiftDevHints,derekcoder/SwiftDevHints
91dbe918a3ed65fa8a057d7ced6ffc2016857d50
#pragma once #include "Services\MenuManager\ServiceMenuManager.h" #include "InternalLogger.h" namespace AIMP { namespace SDK { using namespace System; using namespace AIMP::SDK::Interfaces; public ref class AimpPlugin abstract : public AimpPluginBase { public: AimpPlugin() { } property IAimpCore^ AimpCore { IAimpCore^ get() { return Player->Core; } } property IAimpPlayer^ Player { IAimpPlayer^ get() { return (IAimpPlayer^) AimpPlayer; } } property AIMP::SDK::Logger::ILogger ^LoggerManager { AIMP::SDK::Logger::ILogger ^get() { return AIMP::SDK::InternalLogger::Instance; } } private: ServiceMenuManager^ _menuManager; }; } }
#pragma once #include "Services\MenuManager\ServiceMenuManager.h" #include "InternalLogger.h" namespace AIMP { namespace SDK { using namespace System; using namespace AIMP::SDK::Interfaces; public ref class AimpPlugin abstract : public AimpPluginBase { public: AimpPlugin() { } property IAimpCore^ AimpCore { IAimpCore^ get() { return _aimpCore; } } property IAimpPlayer^ Player { IAimpPlayer^ get() { return (IAimpPlayer^) AimpPlayer; } } property AIMP::SDK::Logger::ILogger ^LoggerManager { AIMP::SDK::Logger::ILogger ^get() { return AIMP::SDK::InternalLogger::Instance; } } private: IAimpCore^ _aimpCore; ServiceMenuManager^ _menuManager; }; } }
--- +++ @@ -21,7 +21,7 @@ { IAimpCore^ get() { - return _aimpCore; + return Player->Core; } } @@ -42,7 +42,6 @@ } private: - IAimpCore^ _aimpCore; ServiceMenuManager^ _menuManager; }; }
Fix AimpPlugin.AimpCore property which was never initialized. Remove the _aimpCore field and use Player instead.
apache-2.0
martin211/aimp_dotnet,martin211/aimp_dotnet,martin211/aimp_dotnet,martin211/aimp_dotnet,martin211/aimp_dotnet
a99df4d6c91366304dcf55b986d555115e3cc6a6
/* * UsbDk filter/redirector driver * * Copyright (c) 2013 Red Hat, Inc. * * Authors: * Dmitry Fleytman <dfleytma@redhat.com> * */ #pragma once #include "UsbDkData.h" #include "UsbDkNames.h" #define USBDK_DEVICE_TYPE 50000 // UsbDk Control Device IOCTLs #define IOCTL_USBDK_COUNT_DEVICES \ ULONG(CTL_CODE( USBDK_DEVICE_TYPE, 0x851, METHOD_BUFFERED, FILE_READ_ACCESS )) #define IOCTL_USBDK_ENUM_DEVICES \ ULONG(CTL_CODE( USBDK_DEVICE_TYPE, 0x852, METHOD_BUFFERED, FILE_READ_ACCESS )) #define IOCTL_USBDK_ADD_REDIRECT \ ULONG(CTL_CODE( USBDK_DEVICE_TYPE, 0x854, METHOD_BUFFERED, FILE_WRITE_ACCESS )) #define IOCTL_USBDK_REMOVE_REDIRECT \ ULONG(CTL_CODE( USBDK_DEVICE_TYPE, 0x855, METHOD_BUFFERED, FILE_WRITE_ACCESS ))
/* * UsbDk filter/redirector driver * * Copyright (c) 2013 Red Hat, Inc. * * Authors: * Dmitry Fleytman <dfleytma@redhat.com> * */ #pragma once #include "UsbDkData.h" #include "UsbDkNames.h" #define USBDK_DEVICE_TYPE 50000 // UsbDk Control Device IOCTLs #define IOCTL_USBDK_COUNT_DEVICES \ ULONG(CTL_CODE( USBDK_DEVICE_TYPE, 0x851, METHOD_BUFFERED, FILE_READ_ACCESS )) #define IOCTL_USBDK_ENUM_DEVICES \ ULONG(CTL_CODE( USBDK_DEVICE_TYPE, 0x852, METHOD_BUFFERED, FILE_READ_ACCESS )) #define IOCTL_USBDK_ADD_REDIRECT \ ULONG(CTL_CODE( USBDK_DEVICE_TYPE, 0x854, METHOD_BUFFERED, FILE_READ_ACCESS )) #define IOCTL_USBDK_REMOVE_REDIRECT \ ULONG(CTL_CODE( USBDK_DEVICE_TYPE, 0x855, METHOD_BUFFERED, FILE_READ_ACCESS ))
--- +++ @@ -21,6 +21,6 @@ #define IOCTL_USBDK_ENUM_DEVICES \ ULONG(CTL_CODE( USBDK_DEVICE_TYPE, 0x852, METHOD_BUFFERED, FILE_READ_ACCESS )) #define IOCTL_USBDK_ADD_REDIRECT \ - ULONG(CTL_CODE( USBDK_DEVICE_TYPE, 0x854, METHOD_BUFFERED, FILE_READ_ACCESS )) + ULONG(CTL_CODE( USBDK_DEVICE_TYPE, 0x854, METHOD_BUFFERED, FILE_WRITE_ACCESS )) #define IOCTL_USBDK_REMOVE_REDIRECT \ - ULONG(CTL_CODE( USBDK_DEVICE_TYPE, 0x855, METHOD_BUFFERED, FILE_READ_ACCESS )) + ULONG(CTL_CODE( USBDK_DEVICE_TYPE, 0x855, METHOD_BUFFERED, FILE_WRITE_ACCESS ))
UsbDk: Fix control device IOCTLS access type Signed-off-by: Dmitry Fleytman <f50f56ffad4b379c2a89812e98b14900ef87e9ea@redhat.com>
apache-2.0
SPICE/win32-usbdk,freedesktop-unofficial-mirror/spice__win32__usbdk,freedesktop-unofficial-mirror/spice__win32__usbdk,daynix/UsbDk,SPICE/win32-usbdk,freedesktop-unofficial-mirror/spice__win32__usbdk,daynix/UsbDk
8ce936c7be896a867a44ce4a4d39b44f4dc7c9b5
/******************************************************************************* * Copyright 2014 Trevor Robinson * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ******************************************************************************/ #include <stddef.h> // size_t #if defined(_MSC_VER) && _MSC_VER < 1600 // stdint.h added in MSVC 2010 typedef __int8 int8_t; typedef __int16 int16_t; typedef __int32 int32_t; typedef __int64 int64_t; typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; #else # include <stdint.h> #endif #if defined(_MSC_VER) && _MSC_VER < 1900 // MSVC 2015 # define SIZE_T_FORMAT "%Iu" #else # define SIZE_T_FORMAT "%zu" #endif
/******************************************************************************* * Copyright 2014 Trevor Robinson * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ******************************************************************************/ #include <stddef.h> // size_t #ifdef _MSC_VER typedef __int8 int8_t; typedef __int16 int16_t; typedef __int32 int32_t; typedef __int64 int64_t; typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; # define SIZE_T_FORMAT "%Iu" #else # include <stdint.h> # define SIZE_T_FORMAT "%zu" #endif
--- +++ @@ -15,7 +15,7 @@ ******************************************************************************/ #include <stddef.h> // size_t -#ifdef _MSC_VER +#if defined(_MSC_VER) && _MSC_VER < 1600 // stdint.h added in MSVC 2010 typedef __int8 int8_t; typedef __int16 int16_t; @@ -26,12 +26,18 @@ typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; +#else + +# include <stdint.h> + +#endif + +#if defined(_MSC_VER) && _MSC_VER < 1900 // MSVC 2015 + # define SIZE_T_FORMAT "%Iu" #else -# include <stdint.h> - # define SIZE_T_FORMAT "%zu" #endif
Use platform stdint.h and standard size_t printf format in newer versions of MSVC
apache-2.0
trevorr/circe,trevorr/circe,trevorr/circe
7bb1bf38d038f8bbea217bd6431be6c2749bf8ad
//PARAM: --enable ana.int.interval --enable ana.int.enums --exp.privatization "write" #include<pthread.h> // Test case that shows how avoiding reading integral globals can reduce the number of solver evaluations. // Avoiding to evaluate integral globals when setting them reduced the number of necessary evaluations from 62 to 20 in this test case. pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; int glob = 10; void* t_fun(void* ptr) { pthread_mutex_lock(&mutex); glob = 3; glob = 4; glob = 1; pthread_mutex_unlock(&mutex); return NULL; } void bar() { glob = 2; } int main() { pthread_t t; pthread_create(&t, NULL, t_fun, NULL); pthread_mutex_lock(&mutex); bar(); pthread_mutex_unlock(&mutex); pthread_join(t, NULL); assert(glob >= 1); assert(glob <= 2); //UNKNOWN assert(glob <= 10); return 0; }
//PARAM: --enable ana.int.interval --enable ana.int.enums --exp.privatization "write" #include<pthread.h> // Test case that shows how avoiding reading integral globals can reduce the number of solver evaluations. // Avoiding to evaluate integral globals when setting them reduced the number of necessary evaluations from 62 to 20 in this test case. pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; int glob = 10; void* t_fun(void* ptr) { pthread_mutex_lock(&mutex); glob = 3; glob = 4; glob = 1; pthread_mutex_unlock(&mutex); return NULL; } void bar() { glob = 2; } int main() { pthread_t t; pthread_create(&t, NULL, t_fun, NULL); pthread_mutex_lock(&mutex); bar(); pthread_mutex_unlock(&mutex); pthread_join(t, NULL); assert(glob >= 1); assert(glob <= 2); return 0; }
--- +++ @@ -30,6 +30,7 @@ pthread_mutex_unlock(&mutex); pthread_join(t, NULL); assert(glob >= 1); - assert(glob <= 2); + assert(glob <= 2); //UNKNOWN + assert(glob <= 10); return 0; }
Fix test case to not fail due to imprecison of analysis
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
e95e9a6f76556afe4f266b0b527e8e4a30459a9c
// RUN: clang -checker-simple -verify %s struct s { int data; int data_array[10]; }; void f(void) { int a[10]; int (*p)[10]; p = &a; (*p)[3] = 1; struct s d; struct s *q; q = &d; q->data = 3; d.data_array[9] = 17; }
// RUN: clang -checker-simple -verify %s struct s {}; void f(void) { int a[10]; int (*p)[10]; p = &a; (*p)[3] = 1; struct s d; struct s *q; q = &d; }
--- +++ @@ -1,6 +1,9 @@ // RUN: clang -checker-simple -verify %s -struct s {}; +struct s { + int data; + int data_array[10]; +}; void f(void) { int a[10]; @@ -11,4 +14,6 @@ struct s d; struct s *q; q = &d; + q->data = 3; + d.data_array[9] = 17; }
Add random array and struct test code for SCA. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@58085 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
72e1682bbdfd497ce838d648bb2cb6047c015f6f
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* libft_trm.h :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: ncoden <ncoden@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2015/05/08 09:57:42 by ncoden #+# #+# */ /* Updated: 2015/05/12 00:42:36 by ncoden ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef LIBFT_TRM_H # define LIBFT_TRM_H # include <term.h> # include <termios.h> # include <curses.h> # include <sys/ioctl.h> # include <signal.h> typedef struct s_trm { struct termios *opts; t_ilst_evnt *on_key_press; t_evnt *on_resize; } t_trm; struct termios *ft_trmget(); t_bool ft_trmset(struct termios *trm); #endif
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* libft_trm.h :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: ncoden <ncoden@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2015/05/08 09:57:42 by ncoden #+# #+# */ /* Updated: 2015/05/11 18:53:58 by ncoden ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef LIBFT_TRM_H # define LIBFT_TRM_H # include <term.h> # include <termios.h> # include <curses.h> # include <sys/ioctl.h> # include <signal.h> typedef struct s_trm { struct termios *opts; t_ilst_evnt *on_key; t_evnt *on_resize; } t_trm; struct termios *ft_trmget(); t_bool ft_trmset(struct termios *trm); #endif
--- +++ @@ -6,7 +6,7 @@ /* By: ncoden <ncoden@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2015/05/08 09:57:42 by ncoden #+# #+# */ -/* Updated: 2015/05/11 18:53:58 by ncoden ### ########.fr */ +/* Updated: 2015/05/12 00:42:36 by ncoden ### ########.fr */ /* */ /* ************************************************************************** */ @@ -22,7 +22,7 @@ typedef struct s_trm { struct termios *opts; - t_ilst_evnt *on_key; + t_ilst_evnt *on_key_press; t_evnt *on_resize; } t_trm;
Change on_key term event to on_key_press
apache-2.0
ncoden/libft
9b04b3ca1184556181562ce79e23cf3dfb572396
uniform sampler2D m_SamplerY; uniform sampler2D m_SamplerU; uniform sampler2D m_SamplerV; uniform mediump mat3 yuvCoeff; // Y - 16, Cb - 128, Cr - 128 const mediump vec3 offsets = vec3(-0.0625, -0.5, -0.5); lowp vec3 sampleRgb(vec2 loc) { lowp float y = texture2D(m_SamplerY, loc).r; lowp float u = texture2D(m_SamplerU, loc).r; lowp float v = texture2D(m_SamplerV, loc).r; return yuvCoeff * (vec3(y, u, v) + offsets); }
uniform sampler2D m_SamplerY; uniform sampler2D m_SamplerU; uniform sampler2D m_SamplerV; uniform mat3 yuvCoeff; // Y - 16, Cb - 128, Cr - 128 const mediump vec3 offsets = vec3(-0.0625, -0.5, -0.5); lowp vec3 sampleRgb(vec2 loc) { float y = texture2D(m_SamplerY, loc).r; float u = texture2D(m_SamplerU, loc).r; float v = texture2D(m_SamplerV, loc).r; return yuvCoeff * (vec3(y, u, v) + offsets); }
--- +++ @@ -2,15 +2,15 @@ uniform sampler2D m_SamplerU; uniform sampler2D m_SamplerV; -uniform mat3 yuvCoeff; +uniform mediump mat3 yuvCoeff; // Y - 16, Cb - 128, Cr - 128 const mediump vec3 offsets = vec3(-0.0625, -0.5, -0.5); lowp vec3 sampleRgb(vec2 loc) { - float y = texture2D(m_SamplerY, loc).r; - float u = texture2D(m_SamplerU, loc).r; - float v = texture2D(m_SamplerV, loc).r; + lowp float y = texture2D(m_SamplerY, loc).r; + lowp float u = texture2D(m_SamplerU, loc).r; + lowp float v = texture2D(m_SamplerV, loc).r; return yuvCoeff * (vec3(y, u, v) + offsets); }
Add precision prefixes to shaders Co-Authored-By: Dan Balasescu <c9bd76907373126dff70d71f8b944159a669cbf1@smgi.me>
mit
ppy/osu-framework,ZLima12/osu-framework,EVAST9919/osu-framework,peppy/osu-framework,EVAST9919/osu-framework,ppy/osu-framework,ZLima12/osu-framework,smoogipooo/osu-framework,peppy/osu-framework,peppy/osu-framework,EVAST9919/osu-framework,smoogipooo/osu-framework,EVAST9919/osu-framework,ppy/osu-framework
b7206937d9779b2e90ec28fe3ca42d00916eab14
/* Copyright (c) 2014-present, 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. */ #import <FBSnapshotTestCase/FBSnapshotTestCase.h> #import <AsyncDisplayKit/ASDisplayNode.h> #define ASSnapshotVerifyNode(node__, identifier__) \ { \ [ASSnapshotTestCase hackilySynchronouslyRecursivelyRenderNode:node__]; \ FBSnapshotVerifyLayer(node__.layer, identifier__); \ [node__ setShouldRasterizeDescendants:YES]; \ [ASSnapshotTestCase hackilySynchronouslyRecursivelyRenderNode:node__]; \ FBSnapshotVerifyLayer(node__.layer, identifier__); \ [node__ setShouldRasterizeDescendants:NO]; \ [ASSnapshotTestCase hackilySynchronouslyRecursivelyRenderNode:node__]; \ FBSnapshotVerifyLayer(node__.layer, identifier__); \ } @interface ASSnapshotTestCase : FBSnapshotTestCase /** * Hack for testing. ASDisplayNode lacks an explicit -render method, so we manually hit its layout & display codepaths. */ + (void)hackilySynchronouslyRecursivelyRenderNode:(ASDisplayNode *)node; @end
/* Copyright (c) 2014-present, 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. */ #import <FBSnapshotTestCase/FBSnapshotTestCase.h> #import <AsyncDisplayKit/ASDisplayNode.h> #define ASSnapshotVerifyNode(node__, identifier__) \ { \ [ASSnapshotTestCase hackilySynchronouslyRecursivelyRenderNode:node__]; \ FBSnapshotVerifyLayer(node__.layer, identifier__); \ } @interface ASSnapshotTestCase : FBSnapshotTestCase /** * Hack for testing. ASDisplayNode lacks an explicit -render method, so we manually hit its layout & display codepaths. */ + (void)hackilySynchronouslyRecursivelyRenderNode:(ASDisplayNode *)node; @end
--- +++ @@ -14,6 +14,12 @@ { \ [ASSnapshotTestCase hackilySynchronouslyRecursivelyRenderNode:node__]; \ FBSnapshotVerifyLayer(node__.layer, identifier__); \ + [node__ setShouldRasterizeDescendants:YES]; \ + [ASSnapshotTestCase hackilySynchronouslyRecursivelyRenderNode:node__]; \ + FBSnapshotVerifyLayer(node__.layer, identifier__); \ + [node__ setShouldRasterizeDescendants:NO]; \ + [ASSnapshotTestCase hackilySynchronouslyRecursivelyRenderNode:node__]; \ + FBSnapshotVerifyLayer(node__.layer, identifier__); \ } @interface ASSnapshotTestCase : FBSnapshotTestCase
Add tests for enabling / disabling shouldRasterize
bsd-3-clause
rcancro/AsyncDisplayKit,rahul-malik/AsyncDisplayKit,jellenbogen/AsyncDisplayKit,rmls/AsyncDisplayKit,rcancro/AsyncDisplayKit,RuiAAPeres/AsyncDisplayKit,chrisdanford/AsyncDisplayKit,tomizimobile/AsyncDisplayKit,george-gw/AsyncDisplayKit,rcancro/AsyncDisplayKit,chrisdanford/AsyncDisplayKit,samhsiung/AsyncDisplayKit,Teino1978-Corp/Teino1978-Corp-AsyncDisplayKit,jellenbogen/AsyncDisplayKit,JetZou/AsyncDisplayKit,marmelroy/AsyncDisplayKit,marmelroy/AsyncDisplayKit,levi/AsyncDisplayKit,jellenbogen/AsyncDisplayKit,levi/AsyncDisplayKit,facebook/AsyncDisplayKit,lappp9/AsyncDisplayKit,nivanchikov/AsyncDisplayKit,rmls/AsyncDisplayKit,lappp9/AsyncDisplayKit,levi/AsyncDisplayKit,romyilano/AsyncDisplayKit,hannahmbanana/AsyncDisplayKit,aaronschubert0/AsyncDisplayKit,dskatz22/AsyncDisplayKit,levi/AsyncDisplayKit,garrettmoon/AsyncDisplayKit,Xinchi/AsyncDisplayKit,programming086/AsyncDisplayKit,JetZou/AsyncDisplayKit,romyilano/AsyncDisplayKit,george-gw/AsyncDisplayKit,maicki/AsyncDisplayKit,hannahmbanana/AsyncDisplayKit,nivanchikov/AsyncDisplayKit,Adlai-Holler/AsyncDisplayKit,RuiAAPeres/AsyncDisplayKit,nrcmedia/AsyncDisplayKit,tomizimobile/AsyncDisplayKit,marmelroy/AsyncDisplayKit,eanagel/AsyncDisplayKit,facebook/AsyncDisplayKit,yufenglv/AsyncDisplayKit,maicki/AsyncDisplayKit,harryworld/AsyncDisplayKit,facebook/AsyncDisplayKit,flovouin/AsyncDisplayKit,Teino1978-Corp/Teino1978-Corp-AsyncDisplayKit,paulyoung/AsyncDisplayKit,maicki/AsyncDisplayKit,gazreese/AsyncDisplayKit,rcancro/AsyncDisplayKit,aaronschubert0/AsyncDisplayKit,romyilano/AsyncDisplayKit,nrcmedia/AsyncDisplayKit,RuiAAPeres/AsyncDisplayKit,samhsiung/AsyncDisplayKit,Teino1978-Corp/Teino1978-Corp-AsyncDisplayKit,Adlai-Holler/AsyncDisplayKit,nrcmedia/AsyncDisplayKit,paulyoung/AsyncDisplayKit,garrettmoon/AsyncDisplayKit,aaronschubert0/AsyncDisplayKit,lappp9/AsyncDisplayKit,maicki/AsyncDisplayKit,Adlai-Holler/AsyncDisplayKit,rmls/AsyncDisplayKit,tomizimobile/AsyncDisplayKit,marmelroy/AsyncDisplayKit,Xinchi/AsyncDisplayKit,nivanchikov/AsyncDisplayKit,facebook/AsyncDisplayKit,Teino1978-Corp/Teino1978-Corp-AsyncDisplayKit,Xinchi/AsyncDisplayKit,tomizimobile/AsyncDisplayKit,bimawa/AsyncDisplayKit,harryworld/AsyncDisplayKit,dskatz22/AsyncDisplayKit,garrettmoon/AsyncDisplayKit,dskatz22/AsyncDisplayKit,garrettmoon/AsyncDisplayKit,rahul-malik/AsyncDisplayKit,Adlai-Holler/AsyncDisplayKit,samhsiung/AsyncDisplayKit,harryworld/AsyncDisplayKit,rcancro/AsyncDisplayKit,Xinchi/AsyncDisplayKit,flovouin/AsyncDisplayKit,aaronschubert0/AsyncDisplayKit,nivanchikov/AsyncDisplayKit,hannahmbanana/AsyncDisplayKit,jellenbogen/AsyncDisplayKit,eanagel/AsyncDisplayKit,smyrgl/AsyncDisplayKit,bimawa/AsyncDisplayKit,rahul-malik/AsyncDisplayKit,flovouin/AsyncDisplayKit,Teino1978-Corp/Teino1978-Corp-AsyncDisplayKit,hannahmbanana/AsyncDisplayKit,lappp9/AsyncDisplayKit,garrettmoon/AsyncDisplayKit,yufenglv/AsyncDisplayKit,programming086/AsyncDisplayKit,harryworld/AsyncDisplayKit,yufenglv/AsyncDisplayKit,smyrgl/AsyncDisplayKit,programming086/AsyncDisplayKit,bimawa/AsyncDisplayKit,JetZou/AsyncDisplayKit,eanagel/AsyncDisplayKit,eanagel/AsyncDisplayKit,maicki/AsyncDisplayKit,Xinchi/AsyncDisplayKit,tomizimobile/AsyncDisplayKit,nrcmedia/AsyncDisplayKit,paulyoung/AsyncDisplayKit,chrisdanford/AsyncDisplayKit,RuiAAPeres/AsyncDisplayKit,jellenbogen/AsyncDisplayKit,paulyoung/AsyncDisplayKit,smyrgl/AsyncDisplayKit,levi/AsyncDisplayKit,dskatz22/AsyncDisplayKit,paulyoung/AsyncDisplayKit,yufenglv/AsyncDisplayKit,eanagel/AsyncDisplayKit,rahul-malik/AsyncDisplayKit,JetZou/AsyncDisplayKit,dskatz22/AsyncDisplayKit,RuiAAPeres/AsyncDisplayKit,programming086/AsyncDisplayKit,yufenglv/AsyncDisplayKit,aaronschubert0/AsyncDisplayKit,rmls/AsyncDisplayKit,nivanchikov/AsyncDisplayKit,flovouin/AsyncDisplayKit,gazreese/AsyncDisplayKit,gazreese/AsyncDisplayKit,rmls/AsyncDisplayKit,Adlai-Holler/AsyncDisplayKit,programming086/AsyncDisplayKit,romyilano/AsyncDisplayKit,nrcmedia/AsyncDisplayKit,george-gw/AsyncDisplayKit,gazreese/AsyncDisplayKit,bimawa/AsyncDisplayKit,chrisdanford/AsyncDisplayKit,harryworld/AsyncDisplayKit,smyrgl/AsyncDisplayKit,JetZou/AsyncDisplayKit,flovouin/AsyncDisplayKit,george-gw/AsyncDisplayKit,samhsiung/AsyncDisplayKit,hannahmbanana/AsyncDisplayKit
1a8f66919b91e6892ed446276e601ce9efac08e7
/* This file is part of the Grantlee template system. Copyright (c) 2009 Stephen Kelly <steveire@gmail.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 only, as published by the Free Software Foundation. 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 version 3 for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see <http://www.gnu.org/licenses/>. */ #ifndef GRANTLEE_EXPORT_H #define GRANTLEE_EXPORT_H #if defined(_WIN32) || defined(_WIN64) # ifndef GRANTLEE_EXPORT # if defined(GRANTLEE_CORE_LIB_MAKEDLL) # define GRANTLEE_EXPORT __declspec(dllexport) # else # define GRANTLEE_EXPORT __declspec(dllimport) # endif # endif #else # define GRANTLEE_EXPORT #endif #endif
/* This file is part of the Grantlee template system. Copyright (c) 2009 Stephen Kelly <steveire@gmail.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 only, as published by the Free Software Foundation. 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 version 3 for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see <http://www.gnu.org/licenses/>. */ #ifndef GRANTLEE_EXPORT_H #define GRANTLEE_EXPORT_H #ifndef GRANTLEE_EXPORT # if defined(GRANTLEE_CORE_LIB_MAKEDLL) # define GRANTLEE_EXPORT __declspec(dllexport) # else # define GRANTLEE_EXPORT __declspec(dllimport) # endif #endif #endif
--- +++ @@ -20,12 +20,16 @@ #ifndef GRANTLEE_EXPORT_H #define GRANTLEE_EXPORT_H -#ifndef GRANTLEE_EXPORT -# if defined(GRANTLEE_CORE_LIB_MAKEDLL) -# define GRANTLEE_EXPORT __declspec(dllexport) -# else -# define GRANTLEE_EXPORT __declspec(dllimport) +#if defined(_WIN32) || defined(_WIN64) +# ifndef GRANTLEE_EXPORT +# if defined(GRANTLEE_CORE_LIB_MAKEDLL) +# define GRANTLEE_EXPORT __declspec(dllexport) +# else +# define GRANTLEE_EXPORT __declspec(dllimport) +# endif # endif +#else +# define GRANTLEE_EXPORT #endif #endif
Disable the export stuff on non-windows.
lgpl-2.1
cutelyst/grantlee,cutelyst/grantlee,simonwagner/grantlee,simonwagner/grantlee,simonwagner/grantlee,cutelyst/grantlee,simonwagner/grantlee,simonwagner/grantlee,cutelyst/grantlee,cutelyst/grantlee,simonwagner/grantlee
06fbd5ddb83944b92f2ed0eb67eb017a385c940f
/* * SearchCubePruning.h * * Created on: 16 Nov 2015 * Author: hieu */ #ifndef SEARCH_SEARCHCUBEPRUNING_H_ #define SEARCH_SEARCHCUBEPRUNING_H_ #include "Search.h" class SearchCubePruning : public Search { public: SearchCubePruning(Manager &mgr, Stacks &stacks); virtual ~SearchCubePruning(); void Decode(size_t stackInd); const Hypothesis *GetBestHypothesis() const; }; #endif /* SEARCH_SEARCHCUBEPRUNING_H_ */
/* * SearchCubePruning.h * * Created on: 16 Nov 2015 * Author: hieu */ #pragma once #include <vector> #include <boost/unordered_map.hpp> #include "Search.h" class Bitmap; class SearchCubePruning : public Search { public: SearchCubePruning(Manager &mgr, Stacks &stacks); virtual ~SearchCubePruning(); void Decode(size_t stackInd); const Hypothesis *GetBestHypothesis() const; protected: boost::unordered_map<Bitmap*, std::vector<const Hypothesis*> > m_hyposPerBM; };
--- +++ @@ -5,12 +5,10 @@ * Author: hieu */ -#pragma once -#include <vector> -#include <boost/unordered_map.hpp> +#ifndef SEARCH_SEARCHCUBEPRUNING_H_ +#define SEARCH_SEARCHCUBEPRUNING_H_ + #include "Search.h" - -class Bitmap; class SearchCubePruning : public Search { @@ -22,7 +20,6 @@ const Hypothesis *GetBestHypothesis() const; -protected: - boost::unordered_map<Bitmap*, std::vector<const Hypothesis*> > m_hyposPerBM; }; +#endif /* SEARCH_SEARCHCUBEPRUNING_H_ */
Revert "for each input path.2" This reverts commit 69e4cb0531ec93868ccc06ec54d52a4f88d62295.
lgpl-2.1
tofula/mosesdecoder,moses-smt/mosesdecoder,moses-smt/mosesdecoder,alvations/mosesdecoder,tofula/mosesdecoder,alvations/mosesdecoder,moses-smt/mosesdecoder,alvations/mosesdecoder,moses-smt/mosesdecoder,alvations/mosesdecoder,alvations/mosesdecoder,moses-smt/mosesdecoder,alvations/mosesdecoder,alvations/mosesdecoder,tofula/mosesdecoder,alvations/mosesdecoder,tofula/mosesdecoder,tofula/mosesdecoder,moses-smt/mosesdecoder,tofula/mosesdecoder,tofula/mosesdecoder,alvations/mosesdecoder,tofula/mosesdecoder,moses-smt/mosesdecoder,moses-smt/mosesdecoder,tofula/mosesdecoder,tofula/mosesdecoder,moses-smt/mosesdecoder,alvations/mosesdecoder,alvations/mosesdecoder,tofula/mosesdecoder,moses-smt/mosesdecoder,moses-smt/mosesdecoder
6978320135e27b7c13a90d26b2bf8b2ba990706d
/* * Copyright 2008-2009 Katholieke Universiteit Leuven * * Use of this software is governed by the MIT license * * Written by Sven Verdoolaege, K.U.Leuven, Departement * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium */ #ifndef ISL_SAMPLE_H #define ISL_SAMPLE_H #include <isl/set.h> #include <isl_tab.h> #if defined(__cplusplus) extern "C" { #endif __isl_give isl_vec *isl_basic_set_sample_vec(__isl_take isl_basic_set *bset); struct isl_vec *isl_basic_set_sample_bounded(struct isl_basic_set *bset); __isl_give isl_vec *isl_basic_set_sample_with_cone( __isl_take isl_basic_set *bset, __isl_take isl_basic_set *cone); __isl_give isl_basic_set *isl_basic_set_from_vec(__isl_take isl_vec *vec); int isl_tab_set_initial_basis_with_cone(struct isl_tab *tab, struct isl_tab *tab_cone); struct isl_vec *isl_tab_sample(struct isl_tab *tab); #if defined(__cplusplus) } #endif #endif
/* * Copyright 2008-2009 Katholieke Universiteit Leuven * * Use of this software is governed by the MIT license * * Written by Sven Verdoolaege, K.U.Leuven, Departement * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium */ #ifndef ISL_SAMPLE_H #define ISL_SAMPLE #include <isl/set.h> #include <isl_tab.h> #if defined(__cplusplus) extern "C" { #endif __isl_give isl_vec *isl_basic_set_sample_vec(__isl_take isl_basic_set *bset); struct isl_vec *isl_basic_set_sample_bounded(struct isl_basic_set *bset); __isl_give isl_vec *isl_basic_set_sample_with_cone( __isl_take isl_basic_set *bset, __isl_take isl_basic_set *cone); __isl_give isl_basic_set *isl_basic_set_from_vec(__isl_take isl_vec *vec); int isl_tab_set_initial_basis_with_cone(struct isl_tab *tab, struct isl_tab *tab_cone); struct isl_vec *isl_tab_sample(struct isl_tab *tab); #if defined(__cplusplus) } #endif #endif
--- +++ @@ -8,7 +8,7 @@ */ #ifndef ISL_SAMPLE_H -#define ISL_SAMPLE +#define ISL_SAMPLE_H #include <isl/set.h> #include <isl_tab.h>
Fix typo in header guard Signed-off-by: Tobias Grosser <059b8b880f8441509ec8a65b50b4c6ae74ebea76@grosser.es> Signed-off-by: Sven Verdoolaege <e5350bbed4977f5eb8ae1dc6abd9ae59d21ace75@kotnet.org>
mit
cfx-next/toolchain_isl-upstream,cfx-next/toolchain_isl-upstream,nicolasvasilache/isl,Meinersbur/isl,BenzoSM/isl,BobSaget-Mod/libisl,VanirLLVM/toolchain_isl,inducer/isl-mirror,tobig/isl,crossbuild/isl,BobSaget-Mod/libisl,inducer/isl-mirror,tobig/isl,UBERTC/isl,nicolasvasilache/isl,simbuerg/isl,KangDroidSMProject/ISL,KangDroidSMProject/ISL,Distrotech/isl,jleben/isl,KangDroidSMProject/ISL,jleben/isl,PollyLabs/isl,abduld/isl,SaberMod/isl-current,BobSaget-Mod/libisl,evaautomation/isl,BobSaget-Mod/libisl,nicolasvasilache/isl,Distrotech/isl,inducer/isl-mirror,abduld/isl,evaautomation/isl,VanirLLVM/toolchain_isl,PollyLabs/isl,crossbuild/isl,nicolasvasilache/isl,VanirLLVM/toolchain_isl,jleben/isl,nicolasvasilache/isl,SaberMod/isl-current,abduld/isl,BenzoSM/isl,Meinersbur/isl,SaberMod/isl-current,simbuerg/isl,VanirLLVM/toolchain_isl,tobig/isl,cfx-next/toolchain_isl-upstream,BenzoSM/isl,UBERTC/isl,inducer/isl-mirror,inducer/isl-mirror,evaautomation/isl,SaberMod/isl-current,PollyLabs/isl,Distrotech/isl,evaautomation/isl,UBERTC/isl,BobSaget-Mod/libisl,Distrotech/isl,cfx-next/toolchain_isl-upstream,cfx-next/toolchain_isl-upstream,abduld/isl,KangDroidSMProject/ISL,BenzoSM/isl,Meinersbur/isl,jleben/isl,simbuerg/isl,jleben/isl,Meinersbur/isl,simbuerg/isl,VanirLLVM/toolchain_isl,KangDroidSMProject/ISL,PollyLabs/isl,crossbuild/isl,Distrotech/isl,crossbuild/isl,simbuerg/isl,PollyLabs/isl,tobig/isl,BenzoSM/isl,UBERTC/isl
50620bdb6b217d53bcabda32764b7f3e21499bcc
#ifndef CLIENTVERSION_H #define CLIENTVERSION_H // // client versioning // // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 1 #define CLIENT_VERSION_MINOR 0 #define CLIENT_VERSION_REVISION 2 #define CLIENT_VERSION_BUILD 6 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true // Converts the parameter X to a string after macro replacement on X has been performed. // Don't merge these into one macro! #define STRINGIZE(X) DO_STRINGIZE(X) #define DO_STRINGIZE(X) #X #endif // CLIENTVERSION_H
#ifndef CLIENTVERSION_H #define CLIENTVERSION_H // // client versioning // // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 1 #define CLIENT_VERSION_MINOR 0 #define CLIENT_VERSION_REVISION 2 #define CLIENT_VERSION_BUILD 5 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true // Converts the parameter X to a string after macro replacement on X has been performed. // Don't merge these into one macro! #define STRINGIZE(X) DO_STRINGIZE(X) #define DO_STRINGIZE(X) #X #endif // CLIENTVERSION_H
--- +++ @@ -9,7 +9,7 @@ #define CLIENT_VERSION_MAJOR 1 #define CLIENT_VERSION_MINOR 0 #define CLIENT_VERSION_REVISION 2 -#define CLIENT_VERSION_BUILD 5 +#define CLIENT_VERSION_BUILD 6 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true
Increase version to 1.0.2.6 r6
mit
memeticproject/memetic-core,memeticproject/memetic-core,memeticproject/memetic-core,memeticproject/memetic-core,memeticproject/memetic-core,memeticproject/memetic-core
9d9b91c4dfe47ef3d32ecc241461955d3c26b3bc
#include <glib.h> #include <stdlib.h> #include <string.h> #include "../marquise.h" void test_hash_identifier() { const char *id = "hostname:fe1.example.com,metric:BytesUsed,service:memory,"; size_t id_len = strlen(id); uint64_t address = marquise_hash_identifier((const unsigned char*) id, id_len); g_assert_cmpint(address, ==, 7602883380529707052); } void test_hash_clear_lsb() { const char *id = "bytes:tx,collection_point:syd1,ip:110.173.152.33,"; size_t id_len = strlen(id); uint64_t address = marquise_hash_identifier((const unsigned char*) id, id_len); g_assert_cmpint(address, ==, -8873247187777138600); } int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); g_test_add_func("/marquise_hash_identifier/hash", test_hash_identifier); g_test_add_func("/marquise_hash_identifier/clear_lsb", test_hash_clear_lsb); return g_test_run(); }
#include <glib.h> #include <stdlib.h> #include <string.h> #include "../marquise.h" void test_hash_identifier() { const char *id = "hostname:fe1.example.com,metric:BytesUsed,service:memory,"; size_t id_len = strlen(id); uint64_t address = marquise_hash_identifier((const unsigned char*) id, id_len); g_assert_cmpint(address, ==, 7602883380529707052); } int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); g_test_add_func("/marquise_hash_identifier/hash", test_hash_identifier); return g_test_run(); }
--- +++ @@ -11,8 +11,16 @@ g_assert_cmpint(address, ==, 7602883380529707052); } +void test_hash_clear_lsb() { + const char *id = "bytes:tx,collection_point:syd1,ip:110.173.152.33,"; + size_t id_len = strlen(id); + uint64_t address = marquise_hash_identifier((const unsigned char*) id, id_len); + g_assert_cmpint(address, ==, -8873247187777138600); +} + int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); g_test_add_func("/marquise_hash_identifier/hash", test_hash_identifier); + g_test_add_func("/marquise_hash_identifier/clear_lsb", test_hash_clear_lsb); return g_test_run(); }
Add test for LSB-clearing in marquise_hash_identifier
bsd-3-clause
anchor/libmarquise,anchor/libmarquise
72abb169d78b014b41c2471936f7891832c38fdb
#ifdef _MSC_VER #include <intrin.h> #define BREAKPOINT_INTRINSIC() __debugbreak() #else #define BREAKPOINT_INTRINSIC() __asm__ __volatile__ ("int3") #endif int bar(int const *foo) { int count = 0, i = 0; for (; i < 10; ++i) { count += 1; BREAKPOINT_INTRINSIC(); count += 1; } return *foo; } int main(int argc, char **argv) { int foo = 42; bar(&foo); return 0; }
#ifdef _MSC_VER #include <intrin.h> #define BREAKPOINT_INTRINSIC() __debugbreak() #else #define BREAKPOINT_INTRINSIC() __asm__ __volatile__ ("int3") #endif int bar(int const *foo) { int count = 0; for (int i = 0; i < 10; ++i) { count += 1; BREAKPOINT_INTRINSIC(); count += 1; } return *foo; } int main(int argc, char **argv) { int foo = 42; bar(&foo); return 0; }
--- +++ @@ -8,8 +8,8 @@ int bar(int const *foo) { - int count = 0; - for (int i = 0; i < 10; ++i) + int count = 0, i = 0; + for (; i < 10; ++i) { count += 1; BREAKPOINT_INTRINSIC();
Fix TestDebugBreak.py failure with gcc, for loop declarations are not allowed by default with gcc - fix buildbot breakage after r257186 - move declaration outside of for loop git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@257228 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb
39ec68310c69c7f86f4a2fa638782094ef17ac6b
// RUN: %check %s // extern extern inline int f() { static int i; return i++; } // static static inline int h() { static int i; return i++; } // neither inline int g() { static int i; // CHECK: warning: mutable static variable in pure-inline function - may differ per file return i++; } // neither, but const inline int g2() { static const int i = 3; // CHECK: !/warn/ return i; } main() { return f() + g() + h(); }
// RUN: %check %s // extern extern inline int f() { static int i; return i++; } // static static inline int h() { static int i; return i++; } // neither inline int g() { static int i; // CHECK: warning: static variable in pure-inline function - may differ per file return i++; } // neither, but const inline int g2() { static const int i = 3; // CHECK: !/warn/ return i; } main() { return f() + g() + h(); }
--- +++ @@ -17,7 +17,7 @@ // neither inline int g() { - static int i; // CHECK: warning: static variable in pure-inline function - may differ per file + static int i; // CHECK: warning: mutable static variable in pure-inline function - may differ per file return i++; }
Fix inline static local warning
mit
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
57f0cb6232cef023a352bd120a328c520da9f211
/* * Represents an element which can be rendered as part of a scene. * Author: Dino Wernli */ #ifndef ELEMENT_H_ #define ELEMENT_H_ #include <cstddef> class IntersectionData; class Ray; class Element { public: virtual ~Element(); virtual bool Intersect(const Ray& ray, IntersectionData* data = NULL) = 0; }; #endif /* ELEMENT_H_ */
/* * Represents an element which can be rendered as part of a scene. * Author: Dino Wernli */ #ifndef ELEMENT_H_ #define ELEMENT_H_ #include <cstddef> class IntersectionData; class Ray; class Element { public: virtual ~Element(); bool Intersect(const Ray& ray, IntersectionData* data = NULL) = 0; }; #endif /* ELEMENT_H_ */
--- +++ @@ -14,7 +14,7 @@ class Element { public: virtual ~Element(); - bool Intersect(const Ray& ray, IntersectionData* data = NULL) = 0; + virtual bool Intersect(const Ray& ray, IntersectionData* data = NULL) = 0; }; #endif /* ELEMENT_H_ */
Fix build failure by adding virtual keyword.
mit
dinowernli/raytracer,dinowernli/raytracer,dinowernli/raytracer,dinowernli/raytracer
9f5f289c8cfc25ee4faac85cb4d13ac0668723e7
//===-- sancov_flags.h ------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // Sanitizer Coverage runtime flags. // //===----------------------------------------------------------------------===// #ifndef SANCOV_FLAGS_H #define SANCOV_FLAGS_H #include "sanitizer_flag_parser.h" #include "sanitizer_internal_defs.h" namespace __sancov { struct SancovFlags { #define SANCOV_FLAG(Type, Name, DefaultValue, Description) Type Name; #include "sancov_flags.inc" #undef SANCOV_FLAG void SetDefaults(); }; extern SancovFlags sancov_flags_dont_use_directly; inline SancovFlags* sancov_flags() { return &sancov_flags_dont_use_directly; } void InitializeSancovFlags(); } // namespace __sancov extern "C" SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE const char* __sancov_default_options(); #endif
//===-- sancov_flags.h ------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // Sanitizer Coverage runtime flags. // //===----------------------------------------------------------------------===// #ifndef SANCOV_FLAGS_H #define SANCOV_FLAGS_H #include "sanitizer_flag_parser.h" #include "sanitizer_internal_defs.h" namespace __sancov { struct SancovFlags { #define SANCOV_FLAG(Type, Name, DefaultValue, Description) Type Name; #include "sancov_flags.inc" #undef SANCOV_FLAG void SetDefaults(); }; extern SancovFlags sancov_flags_dont_use_directly; inline SancovFlags* sancov_flags() { return &sancov_flags_dont_use_directly; } void InitializeSancovFlags(); extern "C" SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE const char* __sancov_default_options(); } // namespace __sancov #endif
--- +++ @@ -32,9 +32,9 @@ void InitializeSancovFlags(); +} // namespace __sancov + extern "C" SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE const char* __sancov_default_options(); -} // namespace __sancov - #endif
[sancov] Move __sancov_default_options declaration outside the namespace __sancov After this commint, we can include sancov_flags.h and refer to __sancov_default_options without requiring the namespace prefix. Differential Revision: https://reviews.llvm.org/D29167 git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@293731 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
0360c3310a40c7d46877d0842f21233e8c6b7e60
// Please don't add a copyright notice to this file. It contains source code // owned by other copyright holders (used under license). #ifndef BASE_MACROS_H_ #define BASE_MACROS_H_ // A macro to disallow the copy constructor and operator= functions. #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&) = delete; \ void operator=(const TypeName&) = delete // A macro to compute the number of elements in a statically allocated array. #define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0])) #endif // BASE_MACROS_H_
// Please don't add a copyright notice to this file. It contains source code // owned by other copyright holders (used under license). #ifndef BASE_MACROS_H_ #define BASE_MACROS_H_ // From Google C++ Style Guide // http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml // Accessed February 8, 2013 // // A macro to disallow the copy constructor and operator= functions // This should be used in the private: declarations for a class // // TODO(dss): Use C++11's "= delete" syntax to suppress the creation of default // class members. #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&); \ void operator=(const TypeName&) // Example from the Google C++ Style Guide: // // class Foo { // public: // Foo(int f); // ~Foo(); // // private: // DISALLOW_COPY_AND_ASSIGN(Foo); // }; // A macro to compute the number of elements in a statically allocated array. #define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0])) #endif // BASE_MACROS_H_
--- +++ @@ -4,29 +4,10 @@ #ifndef BASE_MACROS_H_ #define BASE_MACROS_H_ -// From Google C++ Style Guide -// http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml -// Accessed February 8, 2013 -// -// A macro to disallow the copy constructor and operator= functions -// This should be used in the private: declarations for a class -// -// TODO(dss): Use C++11's "= delete" syntax to suppress the creation of default -// class members. +// A macro to disallow the copy constructor and operator= functions. #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ - TypeName(const TypeName&); \ - void operator=(const TypeName&) - -// Example from the Google C++ Style Guide: -// -// class Foo { -// public: -// Foo(int f); -// ~Foo(); -// -// private: -// DISALLOW_COPY_AND_ASSIGN(Foo); -// }; + TypeName(const TypeName&) = delete; \ + void operator=(const TypeName&) = delete // A macro to compute the number of elements in a statically allocated array. #define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0]))
Modify the DISALLOW_COPY_AND_ASSIGN macro to use C++11's '= delete' syntax.
apache-2.0
snyderek/floating_temple,snyderek/floating_temple,snyderek/floating_temple
060812dc5b6fe3c2f0005da3559af6694153fae5
/* * controldata_utils.h * Common code for pg_controldata output * * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/common/controldata_utils.h */ #ifndef COMMON_CONTROLDATA_UTILS_H #define COMMON_CONTROLDATA_UTILS_H #include "catalog/pg_control.h" extern ControlFileData *get_controlfile(char *DataDir, const char *progname); #endif /* COMMON_CONTROLDATA_UTILS_H */
/* * controldata_utils.h * Common code for pg_controldata output * * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/common/controldata_utils.h */ #ifndef COMMON_CONTROLDATA_UTILS_H #define COMMON_CONTROLDATA_UTILS_H extern ControlFileData *get_controlfile(char *DataDir, const char *progname); #endif /* COMMON_CONTROLDATA_UTILS_H */
--- +++ @@ -10,6 +10,8 @@ #ifndef COMMON_CONTROLDATA_UTILS_H #define COMMON_CONTROLDATA_UTILS_H +#include "catalog/pg_control.h" + extern ControlFileData *get_controlfile(char *DataDir, const char *progname); #endif /* COMMON_CONTROLDATA_UTILS_H */
Add missing include for self-containment
apache-2.0
greenplum-db/gpdb,greenplum-db/gpdb,adam8157/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,50wu/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,lisakowen/gpdb,xinzweb/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,adam8157/gpdb,50wu/gpdb,50wu/gpdb,xinzweb/gpdb,greenplum-db/gpdb,adam8157/gpdb,ashwinstar/gpdb,lisakowen/gpdb,50wu/gpdb,50wu/gpdb,xinzweb/gpdb,xinzweb/gpdb,jmcatamney/gpdb,adam8157/gpdb,lisakowen/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,adam8157/gpdb,xinzweb/gpdb,xinzweb/gpdb,lisakowen/gpdb,ashwinstar/gpdb,lisakowen/gpdb,50wu/gpdb,greenplum-db/gpdb,lisakowen/gpdb,jmcatamney/gpdb,50wu/gpdb,jmcatamney/gpdb,adam8157/gpdb,lisakowen/gpdb,lisakowen/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,adam8157/gpdb,xinzweb/gpdb,50wu/gpdb,xinzweb/gpdb,adam8157/gpdb,greenplum-db/gpdb
be6de4c1215a8ad5607b1fcc7e9e6da1de780877
#ifndef WIDGETS_SLIDERDIRECTJUMP_H #define WIDGETS_SLIDERDIRECTJUMP_H #include <QSlider> class QMouseEvent; class SliderDirectJump : public QSlider { Q_OBJECT public: explicit SliderDirectJump(QWidget* parent = nullptr); explicit SliderDirectJump(Qt::Orientation orientation, QWidget* parent = nullptr); ~SliderDirectJump() override; bool isPressed(); signals: void valueClicked(int value); private: void init(); protected: void mousePressEvent(QMouseEvent* event) override; void mouseReleaseEvent(QMouseEvent* event) override; int computeHorizontalValue(int x); private: bool m_isPressed{false}; int m_handleWidth{0}; }; #endif // WIDGETS_SLIDERDIRECTJUMP_H
#ifndef WIDGETS_SLIDERDIRECTJUMP_H #define WIDGETS_SLIDERDIRECTJUMP_H #include <QSlider> class QMouseEvent; class SliderDirectJump : public QSlider { Q_OBJECT public: explicit SliderDirectJump(QWidget* parent = nullptr); explicit SliderDirectJump(Qt::Orientation orientation, QWidget* parent = nullptr); ~SliderDirectJump() override; bool isPressed(); signals: void valueClicked(int value); private: void init(); protected: void mousePressEvent(QMouseEvent* event) override; void mouseReleaseEvent(QMouseEvent* event) override; int computeHorizontalValue(int x); private: bool m_isPressed; int m_handleWidth{0}; }; #endif // WIDGETS_SLIDERDIRECTJUMP_H
--- +++ @@ -28,7 +28,7 @@ int computeHorizontalValue(int x); private: - bool m_isPressed; + bool m_isPressed{false}; int m_handleWidth{0}; };
Fix playback slider initially acting as pressed
bsd-3-clause
hugbed/OpenS3D,hugbed/OpenS3D,hugbed/OpenS3D,hugbed/OpenS3D
fc211a706f4b8a87bea164cff7c1f80b95791ba1
// // APIConstant.h // PHPHub // // Created by Aufree on 9/30/15. // Copyright (c) 2015 ESTGroup. All rights reserved. // #define APIAccessTokenURL [NSString stringWithFormat:@"%@%@", APIBaseURL, @"/oauth/access_token"] #define QiniuUploadTokenIdentifier @"QiniuUploadTokenIdentifier" #if DEBUG #define APIBaseURL @"https://staging_api.phphub.org/v1" #else #define APIBaseURL @"https://api.phphub.org/v1" #endif #define PHPHubHost @"phphub.org" #define PHPHubUrl @"https://phphub.org/" #define GitHubURL @"https://github.com/" #define TwitterURL @"https://twitter.com/" #define ProjectURL @"https://github.com/aufree/phphub-ios" #define AboutPageURL @"https://phphub.org/about" #define ESTGroupURL @"http://est-group.org" #define AboutTheAuthorURL @"https://github.com/aufree" #define PHPHubGuide @"http://7xnqwn.com1.z0.glb.clouddn.com/index.html" #define PHPHubTopicURL @"https://phphub.org/topics/" #define SinaRedirectURL @"http://sns.whalecloud.com/sina2/callback" #define UpdateNoticeCount @"UpdateNoticeCount"
// // APIConstant.h // PHPHub // // Created by Aufree on 9/30/15. // Copyright (c) 2015 ESTGroup. All rights reserved. // #define APIAccessTokenURL [NSString stringWithFormat:@"%@%@", APIBaseURL, @"/oauth/access_token"] #define QiniuUploadTokenIdentifier @"QiniuUploadTokenIdentifier" #if DEBUG #define APIBaseURL @"https://staging_api.phphub.org/v1" #else #define APIBaseURL @"https://api.phphub.org/v1" #endif #define PHPHubHost @"phphub.org" #define PHPHubUrl @"https://phphub.org/" #define GitHubURL @"https://github.com/" #define TwitterURL @"https://twitter.com/" #define ProjectURL @"https://github.com/aufree/phphub-ios" #define AboutPageURL @"https://phphub.org/about" #define ESTGroupURL @"http://est-group.org" #define AboutTheAuthorURL @"weibo.com/jinfali" #define PHPHubGuide @"http://7xnqwn.com1.z0.glb.clouddn.com/index.html" #define PHPHubTopicURL @"https://phphub.org/topics/" #define SinaRedirectURL @"http://sns.whalecloud.com/sina2/callback" #define UpdateNoticeCount @"UpdateNoticeCount"
--- +++ @@ -22,7 +22,7 @@ #define ProjectURL @"https://github.com/aufree/phphub-ios" #define AboutPageURL @"https://phphub.org/about" #define ESTGroupURL @"http://est-group.org" -#define AboutTheAuthorURL @"weibo.com/jinfali" +#define AboutTheAuthorURL @"https://github.com/aufree" #define PHPHubGuide @"http://7xnqwn.com1.z0.glb.clouddn.com/index.html" #define PHPHubTopicURL @"https://phphub.org/topics/" #define SinaRedirectURL @"http://sns.whalecloud.com/sina2/callback"
Change about the author url
mit
Aufree/phphub-ios
7326541875f1df288b485711dda342fe09297e4e
#pragma once #include <array> #include <random> #include <chrono> #include "jkqtplotter/jkqtplotter.h" #define NDATA 500 class SpeedTestPlot: public JKQtPlotter { Q_OBJECT protected: std::array<double, NDATA> X, Y, Y2; const double dx; double x0; std::chrono::system_clock::time_point t_lastplot; public: SpeedTestPlot(); virtual ~SpeedTestPlot(); public slots: void plotNewData(); };
#pragma once #include <array> #include <random> #include "jkqtplotter/jkqtplotter.h" #define NDATA 500 class SpeedTestPlot: public JKQtPlotter { Q_OBJECT protected: std::array<double, NDATA> X, Y, Y2; const double dx; double x0; std::chrono::system_clock::time_point t_lastplot; public: SpeedTestPlot(); virtual ~SpeedTestPlot(); public slots: void plotNewData(); };
--- +++ @@ -1,6 +1,8 @@ #pragma once #include <array> #include <random> +#include <chrono> + #include "jkqtplotter/jkqtplotter.h"
MSVC: Include <chrono> needed for chrono::system_clock
lgpl-2.1
jkriege2/JKQtPlotter,jkriege2/JKQtPlotter,jkriege2/JKQtPlotter
a77d6c28473b9f106d5fc2d1d5ca4914e466ac16
#include <errno.h> #include <unistd.h> #include "iobuf.h" static const char errmsg[] = "ibuf_refill called with non-empty buffer!\n"; int ibuf_refill(ibuf* in) { iobuf* io; unsigned oldlen; unsigned rd; io = &(in->io); if (io->flags) return 0; if (io->bufstart != 0) { if (io->bufstart < io->buflen) { write(1, errmsg, sizeof errmsg); _exit(1); /* io->buflen -= io->bufstart; */ /* memcpy(io->buffer, io->buffer+io->bufstart, io->buflen); */ } else io->buflen = 0; io->bufstart = 0; } oldlen = io->buflen; if(io->buflen < io->bufsize) { if (io->timeout && !iobuf_timeout(io, 0)) return 0; rd = read(io->fd, io->buffer+io->buflen, io->bufsize-io->buflen); if(rd == (unsigned)-1) IOBUF_SET_ERROR(io); else if(rd == 0) io->flags |= IOBUF_EOF; else { io->buflen += rd; io->offset += rd; } } return io->buflen > oldlen; }
#include <errno.h> #include <unistd.h> #include "iobuf.h" static const char errmsg[] = "ibuf_refill called with non-empty buffer!\n"; int ibuf_refill(ibuf* in) { iobuf* io; unsigned oldlen; unsigned rd; io = &(in->io); if (io->flags) return 0; if (io->bufstart != 0) { if (io->bufstart < io->buflen) { write(1, errmsg, sizeof errmsg); exit(1); /* io->buflen -= io->bufstart; */ /* memcpy(io->buffer, io->buffer+io->bufstart, io->buflen); */ } else io->buflen = 0; io->bufstart = 0; } oldlen = io->buflen; if(io->buflen < io->bufsize) { if (io->timeout && !iobuf_timeout(io, 0)) return 0; rd = read(io->fd, io->buffer+io->buflen, io->bufsize-io->buflen); if(rd == (unsigned)-1) IOBUF_SET_ERROR(io); else if(rd == 0) io->flags |= IOBUF_EOF; else { io->buflen += rd; io->offset += rd; } } return io->buflen > oldlen; }
--- +++ @@ -15,7 +15,7 @@ if (io->bufstart != 0) { if (io->bufstart < io->buflen) { write(1, errmsg, sizeof errmsg); - exit(1); + _exit(1); /* io->buflen -= io->bufstart; */ /* memcpy(io->buffer, io->buffer+io->bufstart, io->buflen); */ }
Call _exit instead of exit on assertion failure.
lgpl-2.1
bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs
cb03d892cccf64b647986e07d0773fe0a8d1da29
// Check that -march works for all supported targets. // RUN: not %clang -target s390x -S -emit-llvm -march=z9 %s -o - 2>&1 | FileCheck --check-prefix=CHECK-Z9 %s // RUN: %clang -target s390x -### -S -emit-llvm -march=z10 %s 2>&1 | FileCheck --check-prefix=CHECK-Z10 %s // RUN: %clang -target s390x -### -S -emit-llvm -march=z196 %s 2>&1 | FileCheck --check-prefix=CHECK-Z196 %s // RUN: %clang -target s390x -### -S -emit-llvm -march=zEC12 %s 2>&1 | FileCheck --check-prefix=CHECK-ZEC12 %s // CHECK-Z9: error: unknown target CPU 'z9' // CHECK-Z10: "-target-cpu" "z10" // CHECK-Z196: "-target-cpu" "z196" // CHECK-ZEC12: "-target-cpu" "zEC12" int x;
// Check that -march works for all supported targets. // RUN: not %clang -target s390x -S -emit-llvm -march=z9 %s -o - 2>&1 | FileCheck --check-prefix=CHECK-Z9 %s // RUN: %clang -target s390x -S -emit-llvm -march=z10 %s // RUN: %clang -target s390x -S -emit-llvm -march=z196 %s // RUN: %clang -target s390x -S -emit-llvm -march=zEC12 %s // CHECK-Z9: error: unknown target CPU 'z9' // CHECK-Z10: "-target-cpu" "z10" // CHECK-Z196: "-target-cpu" "z196" // CHECK-ZEC12: "-target-cpu" "zEC12" int x;
--- +++ @@ -1,9 +1,9 @@ // Check that -march works for all supported targets. // RUN: not %clang -target s390x -S -emit-llvm -march=z9 %s -o - 2>&1 | FileCheck --check-prefix=CHECK-Z9 %s -// RUN: %clang -target s390x -S -emit-llvm -march=z10 %s -// RUN: %clang -target s390x -S -emit-llvm -march=z196 %s -// RUN: %clang -target s390x -S -emit-llvm -march=zEC12 %s +// RUN: %clang -target s390x -### -S -emit-llvm -march=z10 %s 2>&1 | FileCheck --check-prefix=CHECK-Z10 %s +// RUN: %clang -target s390x -### -S -emit-llvm -march=z196 %s 2>&1 | FileCheck --check-prefix=CHECK-Z196 %s +// RUN: %clang -target s390x -### -S -emit-llvm -march=zEC12 %s 2>&1 | FileCheck --check-prefix=CHECK-ZEC12 %s // CHECK-Z9: error: unknown target CPU 'z9' // CHECK-Z10: "-target-cpu" "z10"
Fix test to actually check things. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@186701 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
e36d31edd6020989bdb39f82dea54ef0e747e994
/* * libaacs by Doom9 ppl 2009, 2010 */ #ifndef AACS_H_ #define AACS_H_ #include "../file/configfile.h" #include <stdint.h> #define LIBAACS_VERSION "1.0" typedef struct aacs AACS; struct aacs { uint8_t pk[16], mk[16], vuk[16], vid[16]; uint8_t *uks; /* unit key array (size = 16 * num_uks, each key is * at 16-byte offset) */ uint16_t num_uks; /* number of unit keys */ uint8_t iv[16]; CONFIGFILE *kf; }; AACS *aacs_open(const char *path, const char *keyfile_path); void aacs_close(AACS *aacs); int aacs_decrypt_unit(AACS *aacs, uint8_t *buf, uint32_t len, uint64_t offset); uint8_t *aacs_get_vid(AACS *aacs); #endif /* AACS_H_ */
/* * libaacs by Doom9 ppl 2009, 2010 */ #ifndef AACS_H_ #define AACS_H_ #include <stdint.h> #include "../file/configfile.h" #define LIBAACS_VERSION "1.0" typedef struct aacs AACS; struct aacs { uint8_t pk[16], mk[16], vuk[16], vid[16]; uint8_t *uks; /* unit key array (size = 16 * num_uks, each key is * at 16-byte offset) */ uint16_t num_uks; /* number of unit keys */ uint8_t iv[16]; CONFIGFILE *kf; }; AACS *aacs_open(const char *path, const char *keyfile_path); void aacs_close(AACS *aacs); int aacs_decrypt_unit(AACS *aacs, uint8_t *buf, uint32_t len, uint64_t offset); uint8_t *aacs_get_vid(AACS *aacs); #endif /* AACS_H_ */
--- +++ @@ -5,9 +5,9 @@ #ifndef AACS_H_ #define AACS_H_ +#include "../file/configfile.h" + #include <stdint.h> - -#include "../file/configfile.h" #define LIBAACS_VERSION "1.0"
Move inclusion of internal headers before system headers
lgpl-2.1
rraptorr/libaacs,zxlooong/libaacs,zxlooong/libaacs,ShiftMediaProject/libaacs,mwgoldsmith/aacs,rraptorr/libaacs,ShiftMediaProject/libaacs,mwgoldsmith/aacs
9089cca24db36608825598e1cd32451a8e20bb2f
// RUN: %clang -S -emit-llvm -arch arm -march=armv7a %s typedef unsigned short uint16_t; typedef __attribute__((neon_vector_type(8))) uint16_t uint16x8_t; void b(uint16x8_t sat, uint16x8_t luma) { __asm__("vmov.16 %1, %0 \n\t" "vtrn.16 %0, %1 \n\t" :"=w"(luma), "=w"(sat) :"0"(luma) ); }
// RUN: %clang_cc1 -emit-llvm -march=armv7a %s // XFAIL: * // XTARGET: arm typedef struct __simd128_uint16_t { __neon_uint16x8_t val; } uint16x8_t; void b(uint16x8_t sat, uint16x8_t luma) { __asm__("vmov.16 %1, %0 \n\t" "vtrn.16 %0, %1 \n\t" :"=w"(luma), "=w"(sat) :"0"(luma) ); }
--- +++ @@ -1,12 +1,6 @@ -// RUN: %clang_cc1 -emit-llvm -march=armv7a %s - -// XFAIL: * -// XTARGET: arm - -typedef struct __simd128_uint16_t -{ - __neon_uint16x8_t val; -} uint16x8_t; +// RUN: %clang -S -emit-llvm -arch arm -march=armv7a %s +typedef unsigned short uint16_t; +typedef __attribute__((neon_vector_type(8))) uint16_t uint16x8_t; void b(uint16x8_t sat, uint16x8_t luma) {
Fix this test to work for arm and on all platforms. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@136307 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
0b2b76601a160cc5e38f5c1720084e6b872bc246
#ifndef _CSVWRITER_H_ #define _CSVWRITER_H_ #include <string> #include <istream> #include <stdexcept> namespace CSV { class Writer { public: static const char CSV_SEP = ','; /** * Construct a CSV::Writer that uses ',' as value separator. */ Writer(std::ostream& output); /** * Write the given value to the csv file */ Writer operator<< (const std::string& data); /** * Advance to the next line */ Writer next(); protected: /** * Clean up (escape) the given value to be used in this object. * Note: This is called internally in operator<<(const std::string&) */ std::string clean(const std::string& data); private: std::ostream& output; bool isFirstValue; }; } #endif
#ifndef _CSVWRITER_H_ #define _CSVWRITER_H_ #include <string> #include <istream> #include <stdexcept> namespace CSV { class Writer { public: static const char CSV_SEP = '|'; Writer(std::ostream& output); Writer operator<< (const std::string& data); Writer next(); private: std::ostream& output; bool isFirstValue; std::string clean(const std::string&); }; } #endif
--- +++ @@ -8,19 +8,32 @@ namespace CSV { class Writer { public: - static const char CSV_SEP = '|'; + static const char CSV_SEP = ','; + /** + * Construct a CSV::Writer that uses ',' as value separator. + */ Writer(std::ostream& output); + /** + * Write the given value to the csv file + */ Writer operator<< (const std::string& data); + /** + * Advance to the next line + */ + Writer next(); - Writer next(); + protected: + /** + * Clean up (escape) the given value to be used in this object. + * Note: This is called internally in operator<<(const std::string&) + */ + std::string clean(const std::string& data); private: std::ostream& output; bool isFirstValue; - - std::string clean(const std::string&); }; }
Improve and document CSV::Writer interface ',' is now the default value separator as in "comma-separated values".
mit
klemens/ALI-CC,klemens/ALI-CC,klemens/ALI-CC
d4cd3990499d349f671b5dcd6b2b8dd2e6a47f39
#ifndef GRAPH_H #define GRAPH_H #include <unordered_map> #include <unordered_set> template<typename T> class Graph { public: void connect(const T &a, const T &b); const std::unordered_set<T>& get_vertex_ids() const; inline const std::unordered_set<T>& get_neighbors(const T &vertex_id) const { return vertices_.at(vertex_id)->adjacent_ids_; } ~Graph(); private: struct Vertex { T id_; std::unordered_set<Vertex*> adjacent_; std::unordered_set<T> adjacent_ids_; Vertex(const T &id) : id_(id) {} bool has_neighbor(Vertex *v) { return adjacent_.find(v) != adjacent_.end(); } void add_neighbor(Vertex* v) { adjacent_.insert(v); adjacent_ids_.insert(v->id_); } }; std::unordered_map<T, Vertex*> vertices_; std::unordered_set<T> vertex_ids; Vertex* get_vertex(const T &a) const; Vertex* get_or_insert(const T &a); }; template class Graph<int>; #endif
#ifndef GRAPH_H #define GRAPH_H #include <unordered_map> #include <unordered_set> template<typename T> class Graph { public: void connect(const T &a, const T &b); const std::unordered_set<T>& get_vertex_ids() const; inline const std::unordered_set<T>& get_neighbors(const T &vertex_id) const { return vertices_.at(vertex_id)->adjacent_ids_; } ~Graph(); private: struct Vertex { T id_; std::unordered_set<Vertex*> adjacent_; std::unordered_set<T> adjacent_ids_; Vertex(T id) { id_ = id; } bool has_neighbor(Vertex *v) { return adjacent_.find(v) != adjacent_.end(); } void add_neighbor(Vertex* v) { adjacent_.insert(v); adjacent_ids_.insert(v->id_); } }; std::unordered_map<T, Vertex*> vertices_; std::unordered_set<T> vertex_ids; Vertex* get_vertex(const T &a) const; Vertex* get_or_insert(const T &a); }; template class Graph<int>; #endif
--- +++ @@ -22,9 +22,7 @@ T id_; std::unordered_set<Vertex*> adjacent_; std::unordered_set<T> adjacent_ids_; - Vertex(T id) { - id_ = id; - } + Vertex(const T &id) : id_(id) {} bool has_neighbor(Vertex *v) { return adjacent_.find(v) != adjacent_.end();
Move id initialization to initialization list
mit
chivay/betweenness-centrality
e4d4544dd5ebc59f9527f00cdd2494075b77b52e
#include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <string.h> #include <errno.h> #include "basic.h" #include "tuntap_if.h" #include "utils.h" int main(int argc, char** argv) { int tun_fd; char buf[100]; char *dev = calloc(10, 1); CLEAR(buf); tun_fd = tun_alloc(dev); if (set_if_up(dev) != 0) { printf("ERROR when setting up if\n"); } if (set_if_address(dev, "10.0.0.5/24") != 0) { printf("ERROR when setting address for if\n"); }; if (set_if_route(dev, "10.0.0.0/24") != 0) { printf("ERROR when setting route for if\n"); } while (1) { read(tun_fd, buf, 100); print_hexdump(buf, 100); } free(dev); }
#include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <string.h> #include <errno.h> #include "basic.h" #include "tuntap_if.h" #include "utils.h" int main(int argc, char** argv) { int tun_fd; char buf[100]; char *dev = calloc(10, 1); CLEAR(buf); tun_fd = tun_alloc(dev); if (set_if_up(dev) != 0) { printf("ERROR when setting up if\n"); } if (set_if_address(dev, "10.0.0.5/24") != 0) { printf("ERROR when setting address for if\n"); }; if (set_if_route(dev, "10.0.0.0/24") != 0) { printf("ERROR when setting route for if\n"); } read(tun_fd, buf, 100); print_hexdump(buf, 100); free(dev); }
--- +++ @@ -27,9 +27,11 @@ printf("ERROR when setting route for if\n"); } - read(tun_fd, buf, 100); + while (1) { + read(tun_fd, buf, 100); - print_hexdump(buf, 100); + print_hexdump(buf, 100); + } free(dev); }
Read from tun buffer and print hexdump in loop
mit
saminiir/level-ip,saminiir/level-ip
fa458a1f7c574c0fe8d40dff4c1af418c365b8ad
#ifndef _FILTER_H #define _FILTER_H #include <math.h> #if !defined(_FUSION_TEST) #if (ARDUINO >= 100) #include "Arduino.h" #else #include "WProgram.h" #endif #else #define PI (M_PI) #endif #include "quaternion.h" #define RAD_TO_DEG (180.0F / PI) class Filter { public: Filter(void); void setAccelXYZ(const float x, const float y, const float z); void setCompassXYZ(const float x, const float y, const float z); void setGyroXYZ(const float x, const float y, const float z); virtual void process(void) = 0; protected: float _accelData[3]; float _compassData[3]; float _gyroData[3]; }; #endif
#ifndef _FILTER_H #define _FILTER_H #include <math.h> #if (ARDUINO >= 100) #include "Arduino.h" #else #include "WProgram.h" #endif #include "quaternion.h" #define RAD_TO_DEG (180.0 / PI) class Filter { public: Filter(void); void setAccelXYZ(const float x, const float y, const float z); void setCompassXYZ(const float x, const float y, const float z); void setGyroXYZ(const float x, const float y, const float z); virtual void process(void) = 0; protected: float _accelData[3]; float _compassData[3]; float _gyroData[3]; }; #endif
--- +++ @@ -3,15 +3,19 @@ #include <math.h> -#if (ARDUINO >= 100) - #include "Arduino.h" +#if !defined(_FUSION_TEST) + #if (ARDUINO >= 100) + #include "Arduino.h" + #else + #include "WProgram.h" + #endif #else - #include "WProgram.h" + #define PI (M_PI) #endif #include "quaternion.h" -#define RAD_TO_DEG (180.0 / PI) +#define RAD_TO_DEG (180.0F / PI) class Filter { public:
Allow for native unit testing
mit
JCube001/Fusion,JCube001/Fusion
d544c99984735652807614ab04157e180eadfbe6
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- #pragma once #define CHAKRA_CORE_MAJOR_VERSION 1 #define CHAKRA_CORE_MINOR_VERSION 4 #define CHAKRA_CORE_VERSION_RELEASE 0 #define CHAKRA_CORE_VERSION_PRERELEASE 0 #define CHAKRA_CORE_VERSION_RELEASE_QFE 0 #define CHAKRA_VERSION_RELEASE 0 // NOTE: need to update the GUID in ByteCodeCacheReleaseFileVersion.h as well
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- #pragma once #define CHAKRA_CORE_MAJOR_VERSION 1 #define CHAKRA_CORE_MINOR_VERSION 3 #define CHAKRA_CORE_VERSION_RELEASE 0 #define CHAKRA_CORE_VERSION_PRERELEASE 0 #define CHAKRA_CORE_VERSION_RELEASE_QFE 0 #define CHAKRA_VERSION_RELEASE 0 // NOTE: need to update the GUID in ByteCodeCacheReleaseFileVersion.h as well
--- +++ @@ -5,7 +5,7 @@ #pragma once #define CHAKRA_CORE_MAJOR_VERSION 1 -#define CHAKRA_CORE_MINOR_VERSION 3 +#define CHAKRA_CORE_MINOR_VERSION 4 #define CHAKRA_CORE_VERSION_RELEASE 0 #define CHAKRA_CORE_VERSION_PRERELEASE 0 #define CHAKRA_CORE_VERSION_RELEASE_QFE 0
Update master branch version to 1.4
mit
mrkmarron/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore
e38845ec04ed22b4e2190695bd0395a90dcc1794