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_co...
#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) { exitChpl...
--- +++ @@ -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(st...
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,sungeuncho...
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 FU...
/* 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 FU...
--- +++ @@ -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. // //===-------------------------------------------------------...
//===--- 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. // //===-------------------------------------------------------...
--- +++ @@ -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/swif...
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 <stdbo...
/* * 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 <stdbo...
--- +++ @@ -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'); ...
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 Hea...
#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 Connect...
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 CheckCPUsupport...
/** * 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 CheckCPUsupport...
--- +++ @@ -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); /* C...
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 v...
#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 v...
--- +++ @@ -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, uns...
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 Elle...
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,Krist...
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 /// --------------- // Bas...
/** * 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 /// --------------- // Bas...
--- +++ @@ -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__)...
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); fcl...
#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...
--- +++ @@ -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 =...
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/cgr...
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" "...
#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" ...
--- +++ @@ -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/uCli...
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++a...
//===----------------------------- 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++a...
--- +++ @@ -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/ro...
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;...
#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 { pub...
--- +++ @@ -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; ++st...
/** * @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 =...
--- +++ @@ -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 (!(d...
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...
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]; unsi...
#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_ALLO...
--- +++ @@ -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;...
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...
/* * 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...
--- +++ @@ -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_d...
#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_d...
--- +++ @@ -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_ca...
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 LoadVkLibraryAnd...
/* * 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_v...
--- +++ @@ -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 <39df0a804564ccb6cf75f18db79653821f37c1...
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...
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-int...
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 ...
#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 ...
--- +++ @@ -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 applica...
/* 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 applica...
--- +++ @@ -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); p...
#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); p...
--- +++ @@ -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 ...
#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] = ...
--- +++ @@ -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...
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 would...
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); ...
#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; ...
--- +++ @@ -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++) { - ...
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(); ...
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: virtu...
--- +++ @@ -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. * ...
// // 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, nona...
--- +++ @@ -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 th...
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...
#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...
--- +++ @@ -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 objec...
// 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 objec...
--- +++ @@ -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...
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 N...
// // 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 N...
--- +++ @@ -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 ...
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 ...
#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 (...
--- +++ @@ -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 mini...
/* * 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 mini...
--- +++ @@ -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.goo...
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))connectionWill...
// // 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 *downloade...
--- +++ @@ -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,...
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 * _baseU...
// // 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 * _baseU...
--- +++ @@ -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 ...
// 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 ...
--- +++ @@ -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/typ...
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 us...
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,apa...
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_FU...
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 "...
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 - Cha...
/* ------------------------------------------------------------------------------- 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 - Cha...
--- +++ @@ -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("Er...
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, y...
#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 ...
--- +++ @@ -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"); ...
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 Li...
/* * 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 Li...
--- +++ @@ -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_SH...
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,betz...
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,...
/* * 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,...
--- +++ @@ -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. // //===--------------------------------------------------------...
//===- 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. // //===--------------------------------------------------------...
--- +++ @@ -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,llv...
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 *cm...
/** * 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) { // ...
--- +++ @@ -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 *...
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(); + + r...
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/libss...
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...
// // 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; @prope...
--- +++ @@ -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 CGFloa...
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 (UII...
// // 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 (UII...
--- +++ @@ -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)...
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 */ cla...
/* * 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 */ cla...
--- +++ @@ -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_externa...
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" "...
#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" ...
--- +++ @@ -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 onc...
/* * 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 onc...
--- +++ @@ -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::t...
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; ...
--- +++ @@ -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; ...
#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(in...
--- +++ @@ -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"x...
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_...
#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_d...
--- +++ @@ -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, ...
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 <987a7dbc972893e93e5578401bedc3a0f2...
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_k...
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...
// // 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(CGFl...
--- +++ @@ -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 CefAppUnmanagedWrappe...
// 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 CefAppUnmanagedWrappe...
--- +++ @@ -23,7 +23,7 @@ CefRefPtr<CefAppUnmanagedWrapper> _appUnmanagedWrapper; public: EvaluateScriptDelegate(CefRefPtr<CefAppUnmanagedWrapper> appUnmanagedWrapper); - virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefProcessId sou...
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/CefSh...
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 BitcoinAddressVal...
#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 BitcoinAddressVali...
--- +++ @@ -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 BitcoinAddre...
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 F...
#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 F...
--- +++ @@ -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...
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...
#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 = ...
--- +++ @@ -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], - ...
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, ++cfro...
#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, ++cfro...
--- +++ @@ -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; + re...
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/cr...
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 ...
#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 fEven...
--- +++ @@ -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; - ...
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); ...
#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 Exec...
--- +++ @@ -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 Exec...
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,...
#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, 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...
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: T...
#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(); priv...
--- +++ @@ -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...
/* 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...
--- +++ @@ -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...
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,kbro...
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];...
#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];...
--- +++ @@ -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/libtrad...
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 /*...
/* 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 /*...
--- +++ @@ -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 uint...
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,tec...
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...
#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.dwExtr...
--- +++ @@ -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.dwEx...
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"); f...
#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 (...
--- +++ @@ -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"); - ...
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_ECE554E80AF211E7AA6EA088B4D...
#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_ECE554E80AF211E7AA6EA088B4D1658...
--- +++ @@ -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; //! Proj...
// // 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; //! ...
--- +++ @@ -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 IAimp...
#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 IAimp...
--- +++ @@ -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( USB...
/* * 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( USB...
--- +++ @@ -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, METHO...
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.apach...
/******************************************************************************* * 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.apach...
--- +++ @@ -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 unsign...
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 fr...
//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 fr...
--- +++ @@ -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/cl...
72e1682bbdfd497ce838d648bb2cb6047c015f6f
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* libft_trm.h :+: :+: :+: ...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* libft_trm.h :+: :+: :+: ...
--- +++ @@ -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 ...
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_S...
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; ...
--- +++ @@ -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; - ...
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 <FBSna...
/* 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 <FBSna...
--- +++ @@ -14,6 +14,12 @@ { \ [ASSnapshotTestCase hackilySynchronouslyRecursivelyRenderNode:node__]; \ FBSnapshotVerifyLayer(node__.layer, identifier__); \ + [node__ setShouldRasterizeDescendants:YES]; \ + [ASSnapshotTestCase hackilySynchronouslyRecursivelyRenderNode:node__]; \ + FBSnapshotVerifyLayer(node...
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,Teino...
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 l...
/* 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 l...
--- +++ @@ -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 GRANT...
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 Decod...
/* * 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(); vo...
--- +++ @@ -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 Hypoth...
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,tofu...
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> #inclu...
/* * 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...
--- +++ @@ -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,Kan...
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 ...
#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 ...
--- +++ @@ -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 tr...
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...
#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...
--- +++ @@ -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(a...
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; ...
#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; ...
--- +++ @@ -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 i...
// 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 in...
--- +++ @@ -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; }; ...
/* * 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 ...
--- +++ @@ -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. // //===-------------------------------------------------------...
//===-- 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. // //===-------------------------------------------------------...
--- +++ @@ -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...
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 TypeNa...
// 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 mac...
--- +++ @@ -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: ...
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_CONTR...
/* * 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_CONTR...
--- +++ @@ -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,xi...
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); ~Sl...
#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); ~Sl...
--- +++ @@ -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 ...
// // 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 ...
--- +++ @@ -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 PHPHub...
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::chro...
#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::tim...
--- +++ @@ -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) {...
#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) {...
--- +++ @@ -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 -...
// 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-llv...
--- +++ @@ -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: %...
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-cl...
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 ...
/* * 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 ...
--- +++ @@ -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"(...
// 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"(sa...
--- +++ @@ -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...
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-cl...
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. */ Wr...
#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...
--- +++ @@ -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& ou...
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 { re...
#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 { re...
--- +++ @@ -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) != ...
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_i...
#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_i...
--- +++ @@ -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: Filte...
#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);...
--- +++ @@ -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 R...
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. //---------------------------------------------------------...
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //---------------------------------------------------------...
--- +++ @@ -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