commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
1
4.87k
subject
stringlengths
15
778
message
stringlengths
15
8.75k
lang
stringclasses
266 values
license
stringclasses
13 values
repos
stringlengths
5
127k
79d2c8944e8cb838cf6fba47d8f857672f05855d
src/clientversion.h
src/clientversion.h
#ifndef CLIENTVERSION_H #define CLIENTVERSION_H // // client versioning // // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 8 #define CLIENT_VERSION_REVISION 0 #define CLIENT_VERSION_BUILD 0 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true // Converts the parameter X to a string after macro replacement on X has been performed. // Don't merge these into one macro! #define STRINGIZE(X) DO_STRINGIZE(X) #define DO_STRINGIZE(X) #X #endif // CLIENTVERSION_H
#ifndef CLIENTVERSION_H #define CLIENTVERSION_H // // client versioning // // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 8 #define CLIENT_VERSION_REVISION 1 #define CLIENT_VERSION_BUILD 99 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE false // Converts the parameter X to a string after macro replacement on X has been performed. // Don't merge these into one macro! #define STRINGIZE(X) DO_STRINGIZE(X) #define DO_STRINGIZE(X) #X #endif // CLIENTVERSION_H
Switch version numbers to 0.8.1.99
Switch version numbers to 0.8.1.99
C
mit
bmp02050/ReddcoinUpdates,ahmedbodi/poscoin,reddcoin-project/reddcoin,coinkeeper/2015-06-22_19-10_cannacoin,coinkeeper/2015-06-22_19-10_cannacoin,bmp02050/ReddcoinUpdates,joroob/reddcoin,coinkeeper/2015-06-22_19-10_cannacoin,reddink/reddcoin,bmp02050/ReddcoinUpdates,reddink/reddcoin,reddink/reddcoin,Cannacoin-Project/Cannacoin,joroob/reddcoin,ahmedbodi/poscoin,Cannacoin-Project/Cannacoin,coinkeeper/2015-06-22_18-46_reddcoin,coinkeeper/2015-06-22_18-46_reddcoin,reddcoin-project/reddcoin,reddcoin-project/reddcoin,bmp02050/ReddcoinUpdates,reddcoin-project/reddcoin,Cannacoin-Project/Cannacoin,reddcoin-project/reddcoin,Cannacoin-Project/Cannacoin,reddcoin-project/reddcoin,ahmedbodi/poscoin,Cannacoin-Project/Cannacoin,reddink/reddcoin,joroob/reddcoin,coinkeeper/2015-06-22_19-10_cannacoin,bmp02050/ReddcoinUpdates,ahmedbodi/poscoin,coinkeeper/2015-06-22_18-46_reddcoin,coinkeeper/2015-06-22_18-46_reddcoin,coinkeeper/2015-06-22_19-10_cannacoin,coinkeeper/2015-06-22_18-46_reddcoin,joroob/reddcoin,ahmedbodi/poscoin,reddink/reddcoin,joroob/reddcoin
486c59553f64771f7bc1c984324b71442b45dfa2
TDTChocolate/TDTCoreDataAdditions.h
TDTChocolate/TDTCoreDataAdditions.h
#import "CoreDataAdditions/NSManagedObject+TDTAdditions.h" #import "CoreDataAdditions/NSManagedObjectContext+TDTAdditions.h" #import "CoreDataAdditions/TDTCoreDataUtilityMacros.h" #ifdef TARGET_IPHONE_OS #import "CoreDataAdditions/NSFetchedResultsController+TDTAdditions.h" #endif
#import "CoreDataAdditions/NSManagedObject+TDTAdditions.h" #import "CoreDataAdditions/NSManagedObjectContext+TDTAdditions.h" #import "CoreDataAdditions/TDTCoreDataUtilityMacros.h" #import "TargetConditionals.h" #if TARGET_OS_IPHONE #import "CoreDataAdditions/NSFetchedResultsController+TDTAdditions.h" #endif
Fix conditional compilation mechanism for ios
Fix conditional compilation mechanism for ios
C
bsd-3-clause
talk-to/Chocolate,talk-to/Chocolate
78604e09580cac8f6e3adcb79e250adad46b04f7
Wikipedia/Code/WKScriptMessage+WMFScriptMessage.h
Wikipedia/Code/WKScriptMessage+WMFScriptMessage.h
#import <WebKit/WebKit.h> typedef NS_ENUM (NSInteger, WMFWKScriptMessageType) { WMFWKScriptMessagePeek, WMFWKScriptMessageConsoleMessage, WMFWKScriptMessageClickLink, WMFWKScriptMessageClickImage, WMFWKScriptMessageClickReference, WMFWKScriptMessageClickEdit, WMFWKScriptMessageNonAnchorTouchEndedWithoutDragging, WMFWKScriptMessageLateJavascriptTransform, WMFWKScriptMessageArticleState, WMFWKScriptMessageUnknown }; @interface WKScriptMessage (WMFScriptMessage) + (WMFWKScriptMessageType)wmf_typeForMessageName:(NSString*)name; + (Class)wmf_expectedMessageBodyClassForType:(WMFWKScriptMessageType)type; @end
#import <WebKit/WebKit.h> typedef NS_ENUM (NSInteger, WMFWKScriptMessageType) { WMFWKScriptMessageUnknown, WMFWKScriptMessagePeek, WMFWKScriptMessageConsoleMessage, WMFWKScriptMessageClickLink, WMFWKScriptMessageClickImage, WMFWKScriptMessageClickReference, WMFWKScriptMessageClickEdit, WMFWKScriptMessageNonAnchorTouchEndedWithoutDragging, WMFWKScriptMessageLateJavascriptTransform, WMFWKScriptMessageArticleState }; @interface WKScriptMessage (WMFScriptMessage) + (WMFWKScriptMessageType)wmf_typeForMessageName:(NSString*)name; + (Class)wmf_expectedMessageBodyClassForType:(WMFWKScriptMessageType)type; @end
Move unknown enum entry to top.
Move unknown enum entry to top.
C
mit
montehurd/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,wikimedia/wikipedia-ios,wikimedia/apps-ios-wikipedia,josve05a/wikipedia-ios,anirudh24seven/wikipedia-ios,julienbodet/wikipedia-ios,anirudh24seven/wikipedia-ios,wikimedia/apps-ios-wikipedia,josve05a/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/wikipedia-ios,julienbodet/wikipedia-ios,anirudh24seven/wikipedia-ios,wikimedia/apps-ios-wikipedia,josve05a/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,josve05a/wikipedia-ios,josve05a/wikipedia-ios,montehurd/apps-ios-wikipedia,josve05a/wikipedia-ios,anirudh24seven/wikipedia-ios,wikimedia/apps-ios-wikipedia,julienbodet/wikipedia-ios,josve05a/wikipedia-ios,anirudh24seven/wikipedia-ios,wikimedia/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,julienbodet/wikipedia-ios,julienbodet/wikipedia-ios,julienbodet/wikipedia-ios,wikimedia/wikipedia-ios,montehurd/apps-ios-wikipedia,anirudh24seven/wikipedia-ios,montehurd/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,julienbodet/wikipedia-ios,wikimedia/wikipedia-ios,anirudh24seven/wikipedia-ios,anirudh24seven/wikipedia-ios,julienbodet/wikipedia-ios,montehurd/apps-ios-wikipedia,wikimedia/wikipedia-ios
bc8356bb8359e531c793a2c9fc4a0e46c34361f3
src/xenia/base/bit_field.h
src/xenia/base/bit_field.h
/** ****************************************************************************** * Xenia : Xbox 360 Emulator Research Project * ****************************************************************************** * Copyright 2017 Ben Vanik. All rights reserved. * * Released under the BSD license - see LICENSE in the root for more details. * ****************************************************************************** */ #ifndef XENIA_BASE_BIT_FIELD_H_ #define XENIA_BASE_BIT_FIELD_H_ #include <cstdint> #include <cstdlib> #include <type_traits> namespace xe { // Bitfield, where position starts at the LSB. template <typename T, size_t position, size_t n_bits> struct bf { bf() = default; inline operator T() const { return value(); } inline T value() const { return static_cast<T>((storage & mask()) >> position); } // For enum values, we strip them down to an underlying type. typedef typename std::conditional<std::is_enum<T>::value, std::underlying_type<T>, std::identity<T>>::type::type value_type; inline value_type mask() const { return (((value_type)~0) >> (8 * sizeof(value_type) - n_bits)) << position; } value_type storage; }; } // namespace xe #endif // XENIA_BASE_BIT_FIELD_H_
/** ****************************************************************************** * Xenia : Xbox 360 Emulator Research Project * ****************************************************************************** * Copyright 2017 Ben Vanik. All rights reserved. * * Released under the BSD license - see LICENSE in the root for more details. * ****************************************************************************** */ #ifndef XENIA_BASE_BIT_FIELD_H_ #define XENIA_BASE_BIT_FIELD_H_ #include <cstdint> #include <cstdlib> #include <type_traits> namespace xe { // Bitfield, where position starts at the LSB. template <typename T, size_t position, size_t n_bits> struct bf { bf() = default; inline operator T() const { return value(); } inline T value() const { return static_cast<T>((storage & mask()) >> position); } // For enum values, we strip them down to an underlying type. typedef typename std::conditional<std::is_enum<T>::value, std::underlying_type<T>, std::remove_reference<T>>::type::type value_type; inline value_type mask() const { return (((value_type)~0) >> (8 * sizeof(value_type) - n_bits)) << position; } value_type storage; }; } // namespace xe #endif // XENIA_BASE_BIT_FIELD_H_
Remove usage of non standard identity struct
Remove usage of non standard identity struct std::identity was removed from the standards, but Visual Studio kept it as an extension. Replace it by std::remove_reference, which does just a little bit more than std::identity does, but without impact in this case.
C
bsd-3-clause
sephiroth99/xenia,sephiroth99/xenia,sephiroth99/xenia
c6813f627f8facb973616f1cec551013b46ebb00
bin/check_it.c
bin/check_it.c
#include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <pwd.h> int main(int argc, char** argv) { struct passwd *passwd = getpwuid(getuid()); int errno = setreuid(geteuid(), geteuid()); // errno = execle("/usr/bin/id", (char *) 0, envp); if (errno == 0 && passwd != 0) { // CHECKIT_USER will contain the name of the user that invoked us. char user_evar[100]; snprintf(user_evar, 80, "CHECKIT_USER=%s", passwd->pw_name); // Use a nice clean PATH. char * envp[] = { "PATH=/bin:/usr/bin" , "HOME=/home2/ling572_00" , "JAVA_HOME=/usr/java/latest" , "JAVA_OPTS=-Xmx300m -Xms140m" , user_evar , (char *) 0 }; // Do it! errno = execve("/home2/ling572_00/Projects/CheckIt/bin/check_it.groovy", argv, envp); } printf("An error occured %d\n", errno); return errno; }
#include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <pwd.h> int main(int argc, char** argv) { struct passwd *passwd = getpwuid(getuid()); int errno = setreuid(geteuid(), geteuid()); // errno = execle("/usr/bin/id", (char *) 0, envp); if (errno == 0 && passwd != 0) { // CHECKIT_USER will contain the name of the user that invoked us. char user_evar[100]; snprintf(user_evar, 80, "CHECKIT_USER=%s", passwd->pw_name); // Use a nice clean PATH. char * envp[] = { "PATH=/bin:/usr/bin" , "HOME=/home2/ling572_00" , "JAVA_HOME=/usr/java/latest" , "JAVA_OPTS=-Xmx300m -Xms140m" , "LC_ALL=en_US.UTF-8" , user_evar , (char *) 0 }; // Do it! errno = execve("/home2/ling572_00/Projects/CheckIt/bin/check_it.groovy", argv, envp); } printf("An error occured %d\n", errno); return errno; }
Set LC_ALL to UTF-8 so that SSH is clean.
Set LC_ALL to UTF-8 so that SSH is clean.
C
agpl-3.0
jimwhite/CheckIt,jimwhite/CheckIt,jimwhite/CheckIt,jimwhite/CheckIt
c4f3c0153378f2a49adf47940d4de489642d8be1
src/common/matrix.h
src/common/matrix.h
#ifndef COMMON_MATRIX_H #define COMMON_MATRIX_H /* * Printipi/common/matrix.h * (c) 2014 Colin Wallace * * This file exposes classes and templates used to construct 3x3 matrices. * Matrices are useful in applying linear transformations. Notably, they can be used to adjust coordinates to a different coordinate-space in order to account for an unlevel bed. */ class Matrix3x3 { float a00, a01, a02; float a10, a11, a12; float a20, a21, a22; public: Matrix3x3() : a00(0), a01(0), a02(0), a10(0), a11(0), a12(0), a20(0), a21(0), a22(0) {} Matrix3x3(float a00, float a01, float a02, float a10, float a11, float a12, float a20, float a21, float a22) : a00(a00), a01(a01), a02(a02), a10(a10), a11(a11), a12(a12), a20(a20), a21(a21), a22(a22) {} template <typename VecT> VecT transform(const VecT &xyz) const { return VecT( a00*xyz.x() + a01*xyz.y() + a02*xyz.z(), a10*xyz.x() + a11*xyz.y() + a12*xyz.z(), a20*xyz.x() + a21*xyz.y() + a22*xyz.z() ); } }; #endif
#ifndef COMMON_MATRIX_H #define COMMON_MATRIX_H #include "common/vector3.h" /* * Matrices are useful in applying linear transformations. * Notably, they can be used to adjust coordinates to a different coordinate-space in order to account for an unlevel bed. */ class Matrix3x3 { //r0, r1, r2 each represent one row of the matrix. Vector3f r0, r1, r2; public: Matrix3x3() : r0(), r1(), r2() {} Matrix3x3(float a00, float a01, float a02, float a10, float a11, float a12, float a20, float a21, float a22) : r0(a00, a01, a02), r1(a10, a11, a12), r2(a20, a21, a22) {} template <typename VecT> VecT transform(const VecT &xyz) const { return VecT(r0.dot(xyz), r1.dot(xyz), r2.dot(xyz)); } }; #endif
Refactor Matrix3x3 to internally use Vector3's
Refactor Matrix3x3 to internally use Vector3's
C
mit
harry159821/printipi,Wallacoloo/printipi,Wallacoloo/printipi,harry159821/printipi,Igor-Rast/printipi,Igor-Rast/printipi,harry159821/printipi,Igor-Rast/printipi,harry159821/printipi,Wallacoloo/printipi,Igor-Rast/printipi,Wallacoloo/printipi
ec2c60ee36437d0bf817a836aa78130087c36fc7
bcl/stm/src/main.c
bcl/stm/src/main.c
#include <bc_scheduler.h> #include <bc_module_core.h> #include <stm32l0xx.h> void application_init(void); void application_task(void *param); int main(void) { bc_module_core_init(); bc_scheduler_init(); application_init(); bc_scheduler_register(application_task, NULL, 0); bc_scheduler_run(); } __attribute__((weak)) void application_init(void) { } __attribute__((weak)) void application_task(void *param) { (void) param; }
#include <bc_scheduler.h> #include <bc_module_core.h> #include <stm32l0xx.h> void application_init(void); void application_task(void *param); int main(void) { bc_module_core_init(); bc_scheduler_init(); bc_scheduler_register(application_task, NULL, 0); application_init(); bc_scheduler_run(); } __attribute__((weak)) void application_init(void) { } __attribute__((weak)) void application_task(void *param) { (void) param; }
Move app_task() scheduler registration before app_init() so app_task() has task_id 0
Move app_task() scheduler registration before app_init() so app_task() has task_id 0
C
mit
bigclownlabs/bc-core-module-sdk,bigclownlabs/bc-core-module-sdk,bigclownlabs/bc-core-module-sdk
ba93087ebd43c0f7b3e980dc9e49a9313d9c9f01
test/Analysis/malloc.c
test/Analysis/malloc.c
// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-experimental-checks -analyzer-store=region -verify %s #include <stdlib.h> void f1() { int *p = malloc(10); return; // expected-warning{{Allocated memory never released. Potential memory leak.}} } void f2() { int *p = malloc(10); free(p); free(p); // expected-warning{{Try to free a memory block that has been released}} }
// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-experimental-checks -analyzer-store=region -verify %s #include <stdlib.h> void f1() { int *p = malloc(10); return; // expected-warning{{Allocated memory never released. Potential memory leak.}} } // THIS TEST CURRENTLY FAILS. void f1_b() { int *p = malloc(10); } void f2() { int *p = malloc(10); free(p); free(p); // expected-warning{{Try to free a memory block that has been released}} }
Add test case that shows a leak we don't catch.
Add test case that shows a leak we don't catch. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@88683 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
9c0a2f00ec83264534269aab1b97dc7f78bd2a4d
testing/test_hashmap.c
testing/test_hashmap.c
#include <CUnit/CUnit.h> #include <CUnit/Basic.h> #include <utils/hashmap.h> void test_hashmap_create(void) { return; } int main(int argc, char **argv) { CU_pSuite suite = NULL; if(CU_initialize_registry() != CUE_SUCCESS) { return CU_get_error(); } // Init suite suite = CU_add_suite("Hashmap", NULL, NULL); if(suite == NULL) { goto end; } // Add tests if(CU_add_test(suite, "test of hashmap_create", test_hashmap_create) == NULL) { goto end; } // Run tests CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); end: CU_cleanup_registry(); return CU_get_error(); }
#include <CUnit/CUnit.h> #include <CUnit/Basic.h> #include <utils/hashmap.h> void test_hashmap_create(void) { return; } void test_hashmap_free(void) { return; } void test_hashmap_delete(void) { return; } void test_hashmap_insert(void) { return; } void test_hashmap_get(void) { return; } void test_hashmap_iterator(void) { return; } int main(int argc, char **argv) { CU_pSuite suite = NULL; if(CU_initialize_registry() != CUE_SUCCESS) { return CU_get_error(); } // Init suite suite = CU_add_suite("Hashmap", NULL, NULL); if(suite == NULL) { goto end; } // Add tests if(CU_add_test(suite, "Test for hashmap create", test_hashmap_create) == NULL) { goto end; } if(CU_add_test(suite, "Test for hashmap delete operation", test_hashmap_delete) == NULL) { goto end; } if(CU_add_test(suite, "Test for hashmap insert operation", test_hashmap_insert) == NULL) { goto end; } if(CU_add_test(suite, "Test for hashmap get operation", test_hashmap_get) == NULL) { goto end; } if(CU_add_test(suite, "Test for hashmap iterator", test_hashmap_iterator) == NULL) { goto end; } if(CU_add_test(suite, "Test for hashmap free operation", test_hashmap_free) == NULL) { goto end; } // Run tests CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); end: CU_cleanup_registry(); return CU_get_error(); }
Add some more test function stubs
Add some more test function stubs
C
mit
pmjdebruijn/openomf,gdeda/openomf,omf2097/openomf,pmjdebruijn/openomf,omf2097/openomf,omf2097/openomf,gdeda/openomf,pmjdebruijn/openomf,gdeda/openomf
ceec0a0fc3e0d263641ab546f84a2ff14a2b3adf
includes/sv-comp.c
includes/sv-comp.c
void __VERIFIER_error() { abort(); } // Some files define __VERIFIER_assume, some declare as extern. What happens when redefined? void __VERIFIER_assume(int expression) { if (!expression) { LOOP: goto LOOP; }; return; } // #define __VERIFIER_nondet(X) X __VERIFIER_nondet_##X() { X val; return val; } #define __VERIFIER_nondet2(X, Y) X __VERIFIER_nondet_##Y() { X val; return val; } #define __VERIFIER_nondet(X) __VERIFIER_nondet2(X, X) __VERIFIER_nondet2(_Bool, bool) __VERIFIER_nondet(char) __VERIFIER_nondet2(unsigned char, uchar) // int __VERIFIER_nondet_int() { int val; return val; } __VERIFIER_nondet(int) __VERIFIER_nondet2(unsigned int, uint) __VERIFIER_nondet(long) __VERIFIER_nondet2(unsigned long, ulong) // void* __VERIFIER_nondet_pointer() { void* val; return val; } __VERIFIER_nondet2(void*, pointer)
void __VERIFIER_error() { abort(); } // Some files define __VERIFIER_assume, some declare as extern. What happens when redefined? void __VERIFIER_assume(int expression) { if (!expression) { LOOP: goto LOOP; }; return; } // #define __VERIFIER_nondet(X) X __VERIFIER_nondet_##X() { X val; return val; } #define __VERIFIER_nondet2(X, Y) X __VERIFIER_nondet_##Y() { X val; return val; } #define __VERIFIER_nondet(X) __VERIFIER_nondet2(X, X) __VERIFIER_nondet2(_Bool, bool) __VERIFIER_nondet(char) __VERIFIER_nondet2(unsigned char, uchar) // int __VERIFIER_nondet_int() { int val; return val; } __VERIFIER_nondet(int) __VERIFIER_nondet2(unsigned int, uint) __VERIFIER_nondet(long) __VERIFIER_nondet2(unsigned long, ulong) // void* __VERIFIER_nondet_pointer() { void* val; return val; } __VERIFIER_nondet2(void*, pointer) void __VERIFIER_atomic_begin() { } // TODO: use atomic marker in Goblint void __VERIFIER_atomic_end() { } // TODO: use atomic marker in Goblint
Add empty definitions for __VERIFIER_atomic_begin and end
Add empty definitions for __VERIFIER_atomic_begin and end
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
ebbc4230bee4c02e6b33bc523d746f9225b3082d
inc/microbit/MicroBitCustomConfig.h
inc/microbit/MicroBitCustomConfig.h
/** * MicroBitCustomConfig.h * * This file is automatically included by the microbit DAL compilation * process. Use this to define any custom configration options needed * for your build of the micro:bit runtime. * * See microbit-dal/inc/MicroBitConfig.h for a complete list of options. * Any options you define here will take prescedence over those defined there. */ #ifndef MICROBIT_CUSTOM_CONFIG_H #define MICROBIT_CUSTOM_CONFIG_H #define MICROBIT_HEAP_REUSE_SD 0 #define MICROBIT_BLE_ENABLED 0 #define MICROBIT_BLE_BLUEZONE 0 #define MICROBIT_BLE_DFU_SERVICE 0 #define MICROBIT_BLE_EVENT_SERVICE 0 #define MICROBIT_BLE_DEVICE_INFORMATION_SERVICE 0 #define MICROBIT_BLE_PAIRING_MODE 0 #endif
/** * MicroBitCustomConfig.h * * This file is automatically included by the microbit DAL compilation * process. Use this to define any custom configration options needed * for your build of the micro:bit runtime. * * See microbit-dal/inc/MicroBitConfig.h for a complete list of options. * Any options you define here will take prescedence over those defined there. */ #ifndef MICROBIT_CUSTOM_CONFIG_H #define MICROBIT_CUSTOM_CONFIG_H #define MICROBIT_HEAP_REUSE_SD 0 #define MICROBIT_BLE_ENABLED 0 #define MICROBIT_BLE_BLUEZONE 0 #define MICROBIT_BLE_DFU_SERVICE 0 #define MICROBIT_BLE_EVENT_SERVICE 0 #define MICROBIT_BLE_DEVICE_INFORMATION_SERVICE 0 #define MICROBIT_BLE_PAIRING_MODE 0 #define MICROBIT_RADIO_ENABLED 0 #endif
Disable the DAL's radio IRQ handler so we can use our own.
Disable the DAL's radio IRQ handler so we can use our own.
C
mit
JoeGlancy/micropython,JoeGlancy/micropython,JoeGlancy/micropython
3869a1728808fc9e075d0091bb03826fa6ed58b0
drivers/scsi/qla2xxx/qla_version.h
drivers/scsi/qla2xxx/qla_version.h
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2008 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.02.01-k8" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 2 #define QLA_DRIVER_PATCH_VER 1 #define QLA_DRIVER_BETA_VER 0
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2008 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.02.01-k9" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 2 #define QLA_DRIVER_PATCH_VER 1 #define QLA_DRIVER_BETA_VER 0
Update version number to 8.02.01-k9.
[SCSI] qla2xxx: Update version number to 8.02.01-k9. Signed-off-by: Andrew Vasquez <67840a4977006af7f584bdc4c86d7243c1629cad@qlogic.com> Signed-off-by: James Bottomley <407b36959ca09543ccda8f8e06721c791bc53435@HansenPartnership.com>
C
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
15a3758dc9e1c9d862e46acdf607de70c302fa6a
drivers/scsi/qla2xxx/qla_version.h
drivers/scsi/qla2xxx/qla_version.h
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2005 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.01.05-k4" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 1 #define QLA_DRIVER_PATCH_VER 5 #define QLA_DRIVER_BETA_VER 0
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2005 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.01.07-k1" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 1 #define QLA_DRIVER_PATCH_VER 7 #define QLA_DRIVER_BETA_VER 0
Update version number to 8.01.07-k1.
[SCSI] qla2xxx: Update version number to 8.01.07-k1. Signed-off-by: Andrew Vasquez <67840a4977006af7f584bdc4c86d7243c1629cad@qlogic.com> Signed-off-by: James Bottomley <407b36959ca09543ccda8f8e06721c791bc53435@SteelEye.com>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
2d18ac2cf8aa2503545d0bd4d3ff883c407ccd99
src/assert.c
src/assert.c
static char rcsid[] = "$Id: H:/drh/idioms/book/RCS/except.doc,v 1.10 1997/02/21 19:43:55 drh Exp $"; #include "assert.h" const Except_T Assert_Failed = { "Assertion failed" }; void (assert)(int e) { assert(e); }
/** * assert.c * * Copyright (C) 2017 Nickolas Burr <nickolasburr@gmail.com> */ #include "assert.h" const Except_T Assert_Failed = { "Assertion failed" }; void (assert)(int e) { assert(e); }
Update formatting, remove CII vars
Update formatting, remove CII vars
C
mit
nickolasburr/git-stashd,nickolasburr/git-stashd,nickolasburr/git-stashd
48a21d9a1a91d1f4c15095ee848941df5bac0e8f
src/diskio.c
src/diskio.c
#include <stdlib.h> #include <stdio.h> #include "diskio.h" char* loadDataFromDiskFile(char* fileName) { FILE* diskFile = fopen(fileName, "rb"); if(diskFile == NULL) return NULL; char* diskData = (char*)malloc(sizeof(char) * DISK_SIZE); if(!fgets(diskData, DISK_SIZE, diskFile)) { if(diskFile) fclose(diskFile); free(diskData); return NULL; } fclose(diskFile); return diskData; } int saveDiskFile(char* fileName, char* data) { FILE* diskFile = fopen(fileName, "wb"); if(!diskFile) return -1; if(!fwrite(data, sizeof(char), DISK_SIZE, diskFile)) { fclose(diskFile); return -1; } fclose(diskFile); return 1; } void freeDiskData(char* diskData) { free(diskData); } char* getSegmentData(char* data, int tracknum, int sectornum) { return &data[ ((tracknum & TRACK_ID_MASK) * TRACK_SIZE) + ((sectornum & SECTOR_ID_MASK) * SECTOR_SIZE) ]; }
#include <stdlib.h> #include <stdio.h> #include "diskio.h" char* loadDataFromDiskFile(char* fileName) { FILE* diskFile = fopen(fileName, "rb"); if(diskFile == NULL) return NULL; char* diskData = (char*)malloc(sizeof(char) * DISK_SIZE); /* TODO: Return null if bytes read is less than expected*/ if(!fread(diskData, sizeof(char), DISK_SIZE, diskFile)){ if(diskFile) fclose(diskFile); free(diskData); return NULL; } fclose(diskFile); return diskData; } int saveDiskFile(char* fileName, char* data) { FILE* diskFile = fopen(fileName, "wb"); if(!diskFile) return -1; if(!fwrite(data, sizeof(char), DISK_SIZE, diskFile)) { fclose(diskFile); return -1; } fclose(diskFile); return 1; } void freeDiskData(char* diskData) { free(diskData); } char* getSegmentData(char* data, int tracknum, int sectornum) { return &data[ ((tracknum & TRACK_ID_MASK) * TRACK_SIZE) + ((sectornum & SECTOR_ID_MASK) * SECTOR_SIZE) ]; }
Use correct file io function for binary reads
Use correct file io function for binary reads
C
mit
drdanick/apricos-fs-manager
01d189c2149e3a1bc84aef1e08d138aae553f51a
include/ethernet.h
include/ethernet.h
#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
Fix wrong eth payload data type
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
C
mit
saminiir/level-ip,saminiir/level-ip
c8467aa2b596b499d07951e729aa7932001e3257
src/imap/cmd-logout.c
src/imap/cmd-logout.c
/* Copyright (C) 2002 Timo Sirainen */ #include "common.h" #include "commands.h" int cmd_logout(struct client *client) { client_send_line(client, "* BYE Logging out"); if (client->mailbox != NULL) { /* this could be done at client_disconnect() as well, but eg. mbox rewrite takes a while so the waiting is better to happen before "OK" message. */ mailbox_close(client->mailbox); client->mailbox = NULL; } client_send_tagline(client, "OK Logout completed."); client_disconnect(client); return TRUE; }
/* Copyright (C) 2002 Timo Sirainen */ #include "common.h" #include "commands.h" int cmd_logout(struct client *client) { client_send_line(client, "* BYE Logging out"); o_stream_uncork(client->output); if (client->mailbox != NULL) { /* this could be done at client_disconnect() as well, but eg. mbox rewrite takes a while so the waiting is better to happen before "OK" message. */ mailbox_close(client->mailbox); client->mailbox = NULL; } client_send_tagline(client, "OK Logout completed."); client_disconnect(client); return TRUE; }
Send the "* BYE Logging out" before closing mailbox.
Send the "* BYE Logging out" before closing mailbox. --HG-- branch : HEAD
C
mit
dscho/dovecot,dscho/dovecot,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jkerihuel/dovecot,jkerihuel/dovecot,jkerihuel/dovecot,jwm/dovecot-notmuch,dscho/dovecot,jwm/dovecot-notmuch,jkerihuel/dovecot,dscho/dovecot,dscho/dovecot,jkerihuel/dovecot,jwm/dovecot-notmuch
ae9bf18bde6fd548f5e598cc33f2f99bbfb49d44
source/target/siliconlabs/efm32gg/target_reset.c
source/target/siliconlabs/efm32gg/target_reset.c
/* CMSIS-DAP Interface Firmware * Copyright (c) 2009-2013 ARM Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "RTL.h" #include "debug_cm.h" #include "target_reset.h" #include "swd_host.h" #include "DAP_Config.h" void target_before_init_debug(void) { return; } uint8_t target_unlock_sequence(void) { return 1; } uint8_t target_set_state(TARGET_RESET_STATE state) { return swd_set_target_state_hw(state); } uint8_t security_bits_set(uint32_t addr, uint8_t *data, uint32_t size) { return 0; }
/* CMSIS-DAP Interface Firmware * Copyright (c) 2009-2013 ARM Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "RTL.h" #include "debug_cm.h" #include "target_reset.h" #include "swd_host.h" #include "DAP_Config.h" void target_before_init_debug(void) { return; } uint8_t target_unlock_sequence(void) { return 1; } uint8_t target_set_state(TARGET_RESET_STATE state) { return swd_set_target_state_sw(state); } uint8_t security_bits_set(uint32_t addr, uint8_t *data, uint32_t size) { return 0; }
Change the EFM32 reset type to a software reset
Change the EFM32 reset type to a software reset Change the reset type from a hardware reset to a software reset. It appears that hardware resets cause the debug logic to get reset causing a failure in the initialization sequence. This needs to be investigated further.
C
apache-2.0
sg-/DAPLink,sg-/DAPLink,sg-/DAPLink,google/DAPLink-port,google/DAPLink-port,google/DAPLink-port,google/DAPLink-port
5439e60468398c955f2448df853a11a8e36d9dcd
link-grammar/dict-common/dict-impl.h
link-grammar/dict-common/dict-impl.h
#include "link-includes.h" // Already declared in link-includes.h // const char * linkgrammar_get_dict_locale(Dictionary dict); // const char * linkgrammar_get_version(void); // const char * linkgrammar_get_dict_version(Dictionary dict); void dictionary_setup_locale(Dictionary dict); void dictionary_setup_defines(Dictionary dict); void afclass_init(Dictionary dict); bool afdict_init(Dictionary dict); void affix_list_add(Dictionary afdict, Afdict_class *, const char *);
#include "link-includes.h" #include "utilities.h" // Already declared in link-includes.h // const char * linkgrammar_get_dict_locale(Dictionary dict); // const char * linkgrammar_get_version(void); // const char * linkgrammar_get_dict_version(Dictionary dict); void dictionary_setup_locale(Dictionary dict); void dictionary_setup_defines(Dictionary dict); void afclass_init(Dictionary dict); bool afdict_init(Dictionary dict); void affix_list_add(Dictionary afdict, Afdict_class *, const char *); #ifdef __MINGW32__ int callGetLocaleInfoEx(LPCWSTR, LCTYPE, LPWSTR, int); #endif /* __MINGW32__ */
Add a missing prototype (callGetLocaleInfoEx())
MinGW: Add a missing prototype (callGetLocaleInfoEx())
C
lgpl-2.1
ampli/link-grammar,ampli/link-grammar,ampli/link-grammar,ampli/link-grammar,linas/link-grammar,opencog/link-grammar,opencog/link-grammar,linas/link-grammar,linas/link-grammar,ampli/link-grammar,linas/link-grammar,opencog/link-grammar,ampli/link-grammar,opencog/link-grammar,opencog/link-grammar,linas/link-grammar,opencog/link-grammar,opencog/link-grammar,ampli/link-grammar,linas/link-grammar,opencog/link-grammar,linas/link-grammar,ampli/link-grammar,linas/link-grammar,linas/link-grammar,ampli/link-grammar,opencog/link-grammar
5f0ef4eda80a6db44b091bb8693589ccba5544c6
src/lib/marble/geodata/data/GeoDataTimeStamp_p.h
src/lib/marble/geodata/data/GeoDataTimeStamp_p.h
// // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Harshit Jain <hjain.itbhu@gmail.com> // #ifndef GEODATATIMESTAMPPRIVATE_H #define GEODATATIMESTAMPPRIVATE_H #include <QDateTime> #include "GeoDataTypes.h" #include <GeoDataTimeStamp.h> namespace Marble { class GeoDataTimeStampPrivate { public: QDateTime m_when; GeoDataTimeStamp::TimeResolution m_resolution; }; } // namespace Marble #endif //GEODATATIMESTAMPPRIVATE_H
// // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Harshit Jain <hjain.itbhu@gmail.com> // #ifndef GEODATATIMESTAMPPRIVATE_H #define GEODATATIMESTAMPPRIVATE_H #include <QDateTime> #include "GeoDataTypes.h" #include <GeoDataTimeStamp.h> namespace Marble { class GeoDataTimeStampPrivate { public: QDateTime m_when; GeoDataTimeStamp::TimeResolution m_resolution; GeoDataTimeStampPrivate(); }; GeoDataTimeStampPrivate::GeoDataTimeStampPrivate() : m_resolution( GeoDataTimeStamp::SecondResolution ) { // nothing to do } } // namespace Marble #endif //GEODATATIMESTAMPPRIVATE_H
Add missing initialization of time resolution
Add missing initialization of time resolution
C
lgpl-2.1
quannt24/marble,probonopd/marble,probonopd/marble,probonopd/marble,David-Gil/marble-dev,tucnak/marble,probonopd/marble,David-Gil/marble-dev,tzapzoor/marble,quannt24/marble,tzapzoor/marble,quannt24/marble,probonopd/marble,tucnak/marble,David-Gil/marble-dev,tzapzoor/marble,tzapzoor/marble,tucnak/marble,quannt24/marble,tzapzoor/marble,quannt24/marble,tucnak/marble,tzapzoor/marble,quannt24/marble,David-Gil/marble-dev,tucnak/marble,quannt24/marble,tucnak/marble,probonopd/marble,tucnak/marble,probonopd/marble,David-Gil/marble-dev,tzapzoor/marble,tzapzoor/marble,David-Gil/marble-dev
b4baf13b85a2dff0525998cd3138d2433b25580b
Other/AardvarkDefines.h
Other/AardvarkDefines.h
// // AardvarkDefines.h // Aardvark // // Created by Dan Federman on 10/4/14. // Copyright (c) 2014 Square, Inc. All rights reserved. // /** Provides the ability to verify key paths at compile time. If "keyPath" does not exist, a compile-time error will be generated. Example: // Verifies "isFinished" exists on "operation". NSString *key = ARKKeyPath(operation, isFinished); // Verifies "isFinished" exists on self. NSString *key = ARKSelfKeyPath(isFinished); */ #define ARKKeyPath(object, keyPath) \ ({ if (NO) { (void)((object).keyPath); } @#keyPath; }) #define ARKSelfKeyPath(keyPath) ARKKeyPath(self, keyPath) /** Throws a caught exception and returns "return_statement" if "condition" is false. Example: ARKCheckCondition(isProperlyConfigured, nil, @"Foo was not properly configured."); */ #define ARKCheckCondition(condition, result, desc, ...) \ do { \ if (!(condition)) { \ @try { \ NSAssert(condition, (desc), ##__VA_ARGS__); \ } @catch (NSException *exception) { \ NSLog(@"Aardvark API Misuse: %s %@", __PRETTY_FUNCTION__, exception.reason); \ return result;\ } \ } \ } while(0)
// // AardvarkDefines.h // Aardvark // // Created by Dan Federman on 10/4/14. // Copyright (c) 2014 Square, Inc. All rights reserved. // /** Provides the ability to verify key paths at compile time. If "keyPath" does not exist, a compile-time error will be generated. Example: // Verifies "isFinished" exists on "operation". NSString *key = ARKKeyPath(operation, isFinished); // Verifies "isFinished" exists on self. NSString *key = ARKSelfKeyPath(isFinished); */ #define ARKKeyPath(object, keyPath) \ ({ if (NO) { (void)((object).keyPath); } @#keyPath; }) #define ARKSelfKeyPath(keyPath) ARKKeyPath(self, keyPath) /** Throws a caught exception and returns "return_statement" if "condition" is false. Example: ARKCheckCondition(isProperlyConfigured, nil, @"Foo was not properly configured."); */ #define ARKCheckCondition(condition, result, desc, ...) \ do { \ if (!(condition)) { \ @try { \ NSAssert(condition, (desc), ##__VA_ARGS__); \ } @catch (NSException *exception) { \ NSLog(@"Aardvark API Misuse: %s %@", __PRETTY_FUNCTION__, exception.reason); \ return result;\ } \ } \ } while(0)
Add newline to end of file
Add newline to end of file
C
apache-2.0
square/Aardvark,square/Aardvark,mtxs007/Aardvark,square/Aardvark,tinyspeck/Aardvark,vamsirajendra/Aardvark
44b3e6b16c70304cca687e7bc0bbd175f7400926
include/stdbool.h
include/stdbool.h
#ifndef _UCC_STDBOOL_H #define _UCC_STDBOOL_H #define __bool_true_false_are_defined 1 typedef _Bool bool; #define bool bool #define false 0 #define true 1 #endif
#ifndef _UCC_STDBOOL_H #define _UCC_STDBOOL_H #define __bool_true_false_are_defined 1 #define bool _Bool #define false 0 #define true 1 #endif
Change bool to a macro instead of typedef
Change bool to a macro instead of typedef
C
mit
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
f455dfb106916d855d59686fe16575c2ceb2cb2a
arch/arm/mach-shark/include/mach/io.h
arch/arm/mach-shark/include/mach/io.h
/* * arch/arm/mach-shark/include/mach/io.h * * by Alexander Schulz * * derived from: * arch/arm/mach-ebsa110/include/mach/io.h * Copyright (C) 1997,1998 Russell King */ #ifndef __ASM_ARM_ARCH_IO_H #define __ASM_ARM_ARCH_IO_H #define PCIO_BASE 0xe0000000 #define IO_SPACE_LIMIT 0xffffffff #define __io(a) __typesafe_io(PCIO_BASE + (a)) #define __mem_pci(addr) (addr) #endif
/* * arch/arm/mach-shark/include/mach/io.h * * by Alexander Schulz * * derived from: * arch/arm/mach-ebsa110/include/mach/io.h * Copyright (C) 1997,1998 Russell King */ #ifndef __ASM_ARM_ARCH_IO_H #define __ASM_ARM_ARCH_IO_H #define PCIO_BASE 0xe0000000 #define IO_SPACE_LIMIT 0xffffffff #define __io(a) __typesafe_io(PCIO_BASE + (a)) #define __mem_pci(addr) (addr) #endif
Fix up merge with the ARM tree
ASoC: Fix up merge with the ARM tree The same change has been made with the final lines in slightly differnet orders. Signed-off-by: Mark Brown <b51b9a92386687a9ac927cebfa0f978adeb8cea5@opensource.wolfsonmicro.com>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas
ce1c5ee0155b47403c63232a5e073929e6243897
ruby/ext/bson/native.c
ruby/ext/bson/native.c
#include <ruby.h> #include <stdint.h> static VALUE rb_integer_to_bson(VALUE self) { const int32_t v = NUM2INT(self); const char bytes[4] = { v & 255, (v >> 8) & 255, (v >> 16) & 255, (v >> 24) & 255 }; return rb_str_new(bytes, 4); } void Init_native() { VALUE bson = rb_const_get(rb_cObject, rb_intern("BSON")); VALUE integer = rb_const_get(bson, rb_intern("Integer")); rb_remove_method(integer, "to_bson"); rb_define_method(integer, "to_bson", rb_integer_to_bson, 0); }
#include <ruby.h> #include <stdint.h> static VALUE rb_integer_to_bson(VALUE self) { /* const int32_t v = NUM2INT(self); */ /* const char bytes[4] = { v & 255, (v >> 8) & 255, (v >> 16) & 255, (v >> 24) & 255 }; */ /* return rb_str_new(bytes, 4); */ } void Init_native() { /* VALUE bson = rb_const_get(rb_cObject, rb_intern("BSON")); */ /* VALUE integer = rb_const_get(bson, rb_intern("Integer")); */ /* rb_remove_method(integer, "to_bson"); */ /* rb_define_method(integer, "to_bson", rb_integer_to_bson, 0); */ }
Comment out the c for now
Comment out the c for now
C
apache-2.0
johnsimon/bson-ruby,agis-/bson-ruby,hudon/bson-ruby,mongodb/bson-ruby,mongodb/bson-ruby,mongodb/bson-ruby,estolfo/bson-ruby,ukblewis/bson-ruby,agis-/bson-ruby,johnsimon/bson-ruby,hudon/bson-ruby,ukblewis/bson-ruby,estolfo/bson-ruby,agis-/bson-ruby,ukblewis/bson-ruby,mongodb/bson-ruby,estolfo/bson-ruby,ukblewis/bson-ruby,hudon/bson-ruby,johnsimon/bson-ruby,estolfo/bson-ruby
67d05f55509bf9bad5876e0d2dcd0a540543d199
selftest.c
selftest.c
#include <string.h> #include "iobuf/iobuf.h" #include "msg/msg.h" #include "str/str.h" void NL(void) { obuf_putc(&outbuf, LF); } void debugstr(const str* s) { obuf_puts(&outbuf, "len="); obuf_putu(&outbuf, s->len); obuf_puts(&outbuf, " size="); obuf_putu(&outbuf, s->size); if (s->s == 0) obuf_puts(&outbuf, " s is NULL"); else { obuf_puts(&outbuf, " s="); obuf_putstr(&outbuf, s); } NL(); } void debugstrfn(int result, const str* s) { obuf_puts(&outbuf, "result="); obuf_puti(&outbuf, result); obuf_putc(&outbuf, ' '); debugstr(s); } void debugfn(int result) { obuf_puts(&outbuf, "result="); obuf_puti(&outbuf, result); NL(); } #define MAIN void selftest(void) MAIN; int main(void) { selftest(); obuf_flush(&outbuf); return 0; }
#include <string.h> #include "iobuf/iobuf.h" #include "msg/msg.h" #include "str/str.h" void NL(void) { obuf_putc(&outbuf, LF); } void debugstr(const str* s) { obuf_puts(&outbuf, "len="); obuf_putu(&outbuf, s->len); obuf_puts(&outbuf, " size="); obuf_putu(&outbuf, s->size); if (s->s == 0) obuf_puts(&outbuf, " s is NULL"); else { obuf_puts(&outbuf, " s="); obuf_putstr(&outbuf, s); } NL(); } int debugstrfn(int result, const str* s) { obuf_puts(&outbuf, "result="); obuf_puti(&outbuf, result); obuf_putc(&outbuf, ' '); debugstr(s); return result; } int debugfn(int result) { obuf_puts(&outbuf, "result="); obuf_puti(&outbuf, result); NL(); return result; } #define MAIN void selftest(void) MAIN; int main(void) { selftest(); obuf_flush(&outbuf); obuf_flush(&errbuf); return 0; }
Return the result of debugged functions, and flush stderr on exit.
Return the result of debugged functions, and flush stderr on exit.
C
lgpl-2.1
bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs
bd1ce049956272df99ec52598a2234afa32b3055
Paystack/PublicHeaders/PSTCKTransactionParams.h
Paystack/PublicHeaders/PSTCKTransactionParams.h
// // PSTCKTransactionParams.h // Paystack // #import <Foundation/Foundation.h> #import "PSTCKFormEncodable.h" /** * Representation of the transaction to perform on a card */ @interface PSTCKTransactionParams : NSObject<PSTCKFormEncodable> @property (nonatomic, copy, nonnull) NSString *email; @property (nonatomic) NSUInteger amount; @property (nonatomic, copy, nullable) NSString *reference; @property (nonatomic, copy, nullable) NSString *subaccount; @property (nonatomic) NSInteger transaction_charge; @property (nonatomic, copy, nullable) NSString *bearer; @property (nonatomic, readonly, nullable) NSString *metadata; @property (nonatomic, readonly, nullable) NSString *plan; @property (nonatomic, readonly, nullable) NSString *currency; - (nullable PSTCKTransactionParams *) setMetadataValue:(nonnull NSString*)value forKey:(nonnull NSString*)key error:(NSError * _Nullable __autoreleasing * _Nonnull) error; - (nullable PSTCKTransactionParams *) setCustomFieldValue:(nonnull NSString*)value displayedAs:(nonnull NSString*)display_name error:(NSError * _Nullable __autoreleasing * _Nonnull) error; @end
// // PSTCKTransactionParams.h // Paystack // #import <Foundation/Foundation.h> #import "PSTCKFormEncodable.h" /** * Representation of the transaction to perform on a card */ @interface PSTCKTransactionParams : NSObject<PSTCKFormEncodable> @property (nonatomic, copy, nonnull) NSString *email; @property (nonatomic) NSUInteger amount; @property (nonatomic, copy, nullable) NSString *reference; @property (nonatomic, copy, nullable) NSString *subaccount; @property (nonatomic) NSInteger transaction_charge; @property (nonatomic, copy, nullable) NSString *bearer; @property (nonatomic, readonly, nullable) NSString *metadata; @property (nonatomic, nullable) NSString *plan; @property (nonatomic, nullable) NSString *currency; - (nullable PSTCKTransactionParams *) setMetadataValue:(nonnull NSString*)value forKey:(nonnull NSString*)key error:(NSError * _Nullable __autoreleasing * _Nonnull) error; - (nullable PSTCKTransactionParams *) setCustomFieldValue:(nonnull NSString*)value displayedAs:(nonnull NSString*)display_name error:(NSError * _Nullable __autoreleasing * _Nonnull) error; @end
Make sure plan and currency are not readonly
[fix] Make sure plan and currency are not readonly
C
mit
PaystackHQ/paystack-ios,PaystackHQ/paystack-ios,PaystackHQ/paystack-ios,PaystackHQ/paystack-ios
e0540dc80d92c82729dc8b40aeae20d3011dc46e
decl.h
decl.h
#ifndef DECL_H #define DECL_H #include <stdlib.h> typedef enum DeclSpec { DECL_SPEC_NONE = 0x0, DECL_SPEC_FLOAT = 0x1, DECL_SPEC_INT = 0x2, DECL_SPEC_SIGNED = 0x4, DECL_SPEC_UNSIGNED = 0x8, DECL_SPEC_VOID = 0x10, } DeclSpec; typedef size_t DeclSpecs; #endif
#ifndef DECL_H #define DECL_H #include <stdint.h> typedef enum DeclSpec { DECL_SPEC_NONE = 0x0, DECL_SPEC_FLOAT = 0x1, DECL_SPEC_INT = 0x2, DECL_SPEC_SIGNED = 0x4, DECL_SPEC_UNSIGNED = 0x8, DECL_SPEC_VOID = 0x10, } DeclSpec; typedef uint16_t DeclSpecs; #endif
Change type of DeclSpecs to uint16_t
Change type of DeclSpecs to uint16_t Using size_t was a bit overkill.
C
unlicense
InternetUnexplorer/Periapsis-CC
8be89090023f91110dd9cabc7e716a85942abbe0
ext/dlib/missing.h
ext/dlib/missing.h
#ifndef DLIB_MISSING_H #define DLIB_MISSING_H #include <ruby/ruby.h> #if defined(__cplusplus) extern "C" { #if 0 } /* satisfy cc-mode */ #endif #endif #ifndef HAVE_RB_GET_KWARGS int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *values); #endif #if defined(__cplusplus) #if 0 { /* satisfy cc-mode */ #endif } /* extern "C" { */ #endif #endif /* DLIB_MISSING_H */
#ifndef DLIB_MISSING_H #define DLIB_MISSING_H #include <ruby/ruby.h> #if defined(__cplusplus) extern "C" { #if 0 } /* satisfy cc-mode */ #endif #endif int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *values); #if defined(__cplusplus) #if 0 { /* satisfy cc-mode */ #endif } /* extern "C" { */ #endif #endif /* DLIB_MISSING_H */
Remove gard around of the prototype declaration of rb_get_kwargs for Ruby 2.1.x
Remove gard around of the prototype declaration of rb_get_kwargs for Ruby 2.1.x
C
mit
mrkn/ruby-dlib,ruby-dlib/ruby-dlib,mrkn/ruby-dlib,ruby-dlib/ruby-dlib,ruby-dlib/ruby-dlib,ruby-dlib/ruby-dlib,mrkn/ruby-dlib,ruby-dlib/ruby-dlib,mrkn/ruby-dlib,mrkn/ruby-dlib,ruby-dlib/ruby-dlib,mrkn/ruby-dlib,ruby-dlib/ruby-dlib,ruby-dlib/ruby-dlib,mrkn/ruby-dlib,mrkn/ruby-dlib,ruby-dlib/ruby-dlib
38b86922ff11a6b6ce4c44109e303195230c9483
include/config/SkUserConfigManual.h
include/config/SkUserConfigManual.h
/* * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkUserConfigManual_DEFINED #define SkUserConfigManual_DEFINED #define GR_TEST_UTILS 1 #define SK_BUILD_FOR_ANDROID_FRAMEWORK #define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024) #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024) #define SK_USE_FREETYPE_EMBOLDEN // Disable these Ganesh features #define SK_DISABLE_REDUCE_OPLIST_SPLITTING // Check error is expensive. HWUI historically also doesn't check its allocations #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0 // Legacy flags #define SK_IGNORE_GPU_DITHER #define SK_SUPPORT_DEPRECATED_CLIPOPS // Needed until we fix https://bug.skia.org/2440 #define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG #define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER #define SK_SUPPORT_LEGACY_AA_CHOICE #define SK_SUPPORT_LEGACY_AAA_CHOICE #define SK_DISABLE_DAA // skbug.com/6886 // b/145995037 #define SK_LEGACY_WEBP_LOOP_COUNT #endif // SkUserConfigManual_DEFINED
/* * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkUserConfigManual_DEFINED #define SkUserConfigManual_DEFINED #define GR_TEST_UTILS 1 #define SK_BUILD_FOR_ANDROID_FRAMEWORK #define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024) #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024) #define SK_USE_FREETYPE_EMBOLDEN // Disable these Ganesh features #define SK_DISABLE_REDUCE_OPLIST_SPLITTING // Check error is expensive. HWUI historically also doesn't check its allocations #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0 // Legacy flags #define SK_IGNORE_GPU_DITHER #define SK_SUPPORT_DEPRECATED_CLIPOPS // Needed until we fix https://bug.skia.org/2440 #define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG #define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER #define SK_SUPPORT_LEGACY_AA_CHOICE #define SK_SUPPORT_LEGACY_AAA_CHOICE #define SK_DISABLE_DAA // skbug.com/6886 #endif // SkUserConfigManual_DEFINED
Enable a WebP AID to show its animation one time
Enable a WebP AID to show its animation one time Bug: 145995037 Test: I3d1032b5605c5b6ea64cee0cda91c2ba2a769da8 As described in https://skia-review.googlesource.com/c/skia/+/259161, Skia has modified its interpretation of a WebP file's encoded loop count to match Chromium and the latest WebP intent. This updates to the new behavior. Revert "Maintain the legacy behavior for WebP loop count" This reverts commit c33df657a16fbc23df2b6ec1c38060060cd3608a. Change-Id: I821744336bab9fd494d6666268c6c95b24b69909
C
bsd-3-clause
aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia
8ac7ff143a5bd654ce8092586f887a846a268805
include/rtupdate.h
include/rtupdate.h
#ifndef _RTUPDATE_H_ #define _RTUPDATE_H_ 1 #define MAXPUPARR 100 #define MAXPUPS 20 #define NOPUPDATE 78787878 // hopefully never a real p-value! /* For rtperf */ /* DJT: modified to work with JG's objlib.h */ typedef enum { NONE, ATTACK, DECAY, SUSTAIN, RELEASE, END } EnvType; GLOBAL int curtag; /* current note tag */ GLOBAL int tags_on; /* using note tags for rtupdates */ GLOBAL int tag_sem; /* contains the values to be updated -- a recirculating array */ GLOBAL float pupdatevals[MAXPUPARR][MAXPUPS]; #endif
#ifndef _RTUPDATE_H_ #define _RTUPDATE_H_ 1 #define MAXPUPARR 100 #define MAXPUPS 20 #define NOPUPDATE 78787878 // hopefully never a real p-value! /* For rtperf */ /* DJT: modified to work with JG's objlib.h */ typedef enum { NONE, RISE, SUSTAIN, DECAY } EnvType; #ifndef GLOBAL #define GLOBAL extern #endif GLOBAL int curtag; /* current note tag */ GLOBAL int tags_on; /* using note tags for rtupdates */ GLOBAL int tag_sem; /* contains the values to be updated -- a recirculating array */ GLOBAL float pupdatevals[MAXPUPARR][MAXPUPS]; #endif
Reset EnvType and changed objdefs.h
Reset EnvType and changed objdefs.h
C
apache-2.0
RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix
2ee76a586066f76ded155a910c4065fbbe198032
src/rosecommon/include/components/warpgate.h
src/rosecommon/include/components/warpgate.h
#pragma once #include <cmath> #include <tuple> namespace Component { struct Warpgate { int16_t id; float min_x; float min_y; float min_z; float max_x; float max_y; float max_z; static constexpr float character_size = 2000.f; uint16_t dest_map; static constexpr inline float squared(float x) { return x * x; } std::tuple<float, float, float> get_center() const { return {(max_x + min_x) / 2.f, (max_y + min_y) / 2.f, (max_z + min_z) / 2.f}; } bool is_point_in(float x, float y, [[maybe_unused]] float z) { float dist_squared = squared(character_size); if (x < min_x) dist_squared -= squared(x - min_x); else if (x > max_x) dist_squared -= squared(x - max_x); if (y < min_y) dist_squared -= squared(y - min_y); else if (y > max_y) dist_squared -= squared(y - max_y); //if (z < min_z) dist_squared -= squared(z - min_z); //else if (z > max_z) dist_squared -= squared(z - max_z); return dist_squared > 0; } }; }
#pragma once #include <cmath> #include <tuple> namespace Component { struct Warpgate { int16_t id; float min_x; float min_y; float min_z; float max_x; float max_y; float max_z; static constexpr float character_size = 200.f; uint16_t dest_map; static constexpr inline float squared(float x) { return x * x; } std::tuple<float, float, float> get_center() const { return {(max_x + min_x) / 2.f, (max_y + min_y) / 2.f, (max_z + min_z) / 2.f}; } bool is_point_in(float x, float y, [[maybe_unused]] float z) { float dist_squared = squared(character_size); if (x < min_x) dist_squared -= squared(x - min_x); else if (x > max_x) dist_squared -= squared(x - max_x); if (y < min_y) dist_squared -= squared(y - min_y); else if (y > max_y) dist_squared -= squared(y - max_y); //if (z < min_z) dist_squared -= squared(z - min_z); //else if (z > max_z) dist_squared -= squared(z - max_z); return dist_squared > 0; } }; }
Reduce character size to 2 units
Reduce character size to 2 units
C
apache-2.0
RavenX8/osIROSE-new,dev-osrose/osIROSE-new,RavenX8/osIROSE-new,dev-osrose/osIROSE-new,RavenX8/osIROSE-new,dev-osrose/osIROSE-new
38fdeceb8c64ea45498275abaa15956f73712423
src/app/contextBroker/version.h
src/app/contextBroker/version.h
#ifndef SRC_APP_CONTEXTBROKER_VERSION_H_ #define SRC_APP_CONTEXTBROKER_VERSION_H_ /* * * Copyright 2013 Telefonica Investigacion y Desarrollo, S.A.U * * This file is part of Orion Context Broker. * * Orion Context Broker is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * Orion Context Broker is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero * General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Orion Context Broker. If not, see http://www.gnu.org/licenses/. * * For those usages not covered by this license please contact with * iot_support at tid dot es * * Author: Ken Zangelin */ #define ORION_VERSION "0.21.0-nextç" #endif // SRC_APP_CONTEXTBROKER_VERSION_H_
#ifndef SRC_APP_CONTEXTBROKER_VERSION_H_ #define SRC_APP_CONTEXTBROKER_VERSION_H_ /* * * Copyright 2013 Telefonica Investigacion y Desarrollo, S.A.U * * This file is part of Orion Context Broker. * * Orion Context Broker is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * Orion Context Broker is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero * General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Orion Context Broker. If not, see http://www.gnu.org/licenses/. * * For those usages not covered by this license please contact with * iot_support at tid dot es * * Author: Ken Zangelin */ #define ORION_VERSION "0.21.0-next" #endif // SRC_APP_CONTEXTBROKER_VERSION_H_
FIX typo: 0.21-nextç -> 0.21.0-next
FIX typo: 0.21-nextç -> 0.21.0-next
C
agpl-3.0
telefonicaid/fiware-orion,fortizc/fiware-orion,yalp/fiware-orion,j1fig/fiware-orion,gavioto/fiware-orion,pacificIT/fiware-orion,McMutton/fiware-orion,fortizc/fiware-orion,Fiware/context.Orion,McMutton/fiware-orion,pacificIT/fiware-orion,fiwareulpgcmirror/fiware-orion,Fiware/data.Orion,pacificIT/fiware-orion,jmcanterafonseca/fiware-orion,fortizc/fiware-orion,jmcanterafonseca/fiware-orion,Fiware/context.Orion,j1fig/fiware-orion,Fiware/data.Orion,jmcanterafonseca/fiware-orion,fiwareulpgcmirror/fiware-orion,yalp/fiware-orion,fiwareulpgcmirror/fiware-orion,telefonicaid/fiware-orion,telefonicaid/fiware-orion,fortizc/fiware-orion,Fiware/data.Orion,gavioto/fiware-orion,j1fig/fiware-orion,yalp/fiware-orion,j1fig/fiware-orion,McMutton/fiware-orion,guerrerocarlos/fiware-orion,fiwareulpgcmirror/fiware-orion,telefonicaid/fiware-orion,McMutton/fiware-orion,gavioto/fiware-orion,gavioto/fiware-orion,McMutton/fiware-orion,McMutton/fiware-orion,Fiware/context.Orion,Fiware/data.Orion,jmcanterafonseca/fiware-orion,telefonicaid/fiware-orion,yalp/fiware-orion,fiwareulpgcmirror/fiware-orion,guerrerocarlos/fiware-orion,telefonicaid/fiware-orion,Fiware/context.Orion,guerrerocarlos/fiware-orion,fortizc/fiware-orion,pacificIT/fiware-orion,Fiware/data.Orion,McMutton/fiware-orion,j1fig/fiware-orion,yalp/fiware-orion,Fiware/context.Orion,jmcanterafonseca/fiware-orion,gavioto/fiware-orion,guerrerocarlos/fiware-orion,pacificIT/fiware-orion,jmcanterafonseca/fiware-orion,fiwareulpgcmirror/fiware-orion,fortizc/fiware-orion,Fiware/data.Orion,Fiware/context.Orion,guerrerocarlos/fiware-orion
941fc625118da6210a2d666d596d7ca318110803
elang/lir/emitters/code_buffer_user.h
elang/lir/emitters/code_buffer_user.h
// Copyright 2015 Project Vogue. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ELANG_LIR_EMITTERS_CODE_BUFFER_USER_H_ #define ELANG_LIR_EMITTERS_CODE_BUFFER_USER_H_ #include "base/basictypes.h" namespace elang { namespace lir { class CodeBuffer; struct Value; ////////////////////////////////////////////////////////////////////// // // CodeBufferUser // class CodeBufferUser { protected: explicit CodeBufferUser(CodeBuffer* code_buffer); ~CodeBufferUser(); void AssociateValue(Value value); void Emit16(int data); void Emit32(uint32_t data); void Emit64(uint64_t data); void Emit8(int data); private: CodeBuffer* const code_buffer_; DISALLOW_COPY_AND_ASSIGN(CodeBufferUser); }; } // namespace lir } // namespace elang #endif // ELANG_LIR_EMITTERS_CODE_BUFFER_USER_H_
// Copyright 2015 Project Vogue. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ELANG_LIR_EMITTERS_CODE_BUFFER_USER_H_ #define ELANG_LIR_EMITTERS_CODE_BUFFER_USER_H_ #include "base/basictypes.h" namespace elang { namespace lir { class CodeBuffer; struct Value; ////////////////////////////////////////////////////////////////////// // // CodeBufferUser // class CodeBufferUser { protected: explicit CodeBufferUser(CodeBuffer* code_buffer); ~CodeBufferUser(); CodeBuffer* code_buffer() const { return code_buffer_; } void AssociateValue(Value value); void Emit16(int data); void Emit32(uint32_t data); void Emit64(uint64_t data); void Emit8(int data); private: CodeBuffer* const code_buffer_; DISALLOW_COPY_AND_ASSIGN(CodeBufferUser); }; } // namespace lir } // namespace elang #endif // ELANG_LIR_EMITTERS_CODE_BUFFER_USER_H_
Introduce |CodeBufferUser::code_buffer()| to use |CodeBuffer::EmitJump()| for 'br' instruction emitter.
elang/lir/emitters: Introduce |CodeBufferUser::code_buffer()| to use |CodeBuffer::EmitJump()| for 'br' instruction emitter.
C
apache-2.0
eval1749/elang,eval1749/elang,eval1749/elang,eval1749/elang,eval1749/elang
0eaaa9f685cb0200d69f9df901828bb0baf959e5
list.h
list.h
#include <stdlib.h> #ifndef __LIST_H__ #define __LIST_H__ struct ListNode; struct List; typedef struct ListNode ListNode; typedef struct List List; List* List_Create(void); void List_Destroy(List* l); ListNode* ListNode_Create(void *); #endif
#include <stdlib.h> #ifndef __LIST_H__ #define __LIST_H__ struct ListNode; struct List; typedef struct ListNode ListNode; typedef struct List List; List* List_Create(void); void List_Destroy(List* l); ListNode* ListNode_Create(void *); void ListNode_Destroy(ListNode* n); #endif
Add List Node destroy function declaration
Add List Node destroy function declaration
C
mit
MaxLikelihood/CADT
94ada1be3db0c968c4948074ee38144d98389e71
test/Frontend/rewrite-includes-bom.c
test/Frontend/rewrite-includes-bom.c
// RUN: %clang -E -frewrite-includes -I %S/Inputs %s -o - | %clang -fsyntax-only -Xclang -verify -x c - // expected-no-diagnostics #include "rewrite-includes-bom.h"
// RUN: grep '^\xEF\xBB\xBF' %S/Inputs/rewrite-includes-bom.h // RUN: %clang_cc1 -E -frewrite-includes -I %S/Inputs %s -o - | %clang_cc1 -fsyntax-only -verify -x c - | not grep '\xEF\xBB\xBF' // expected-no-diagnostics #include "rewrite-includes-bom.h"
Improve BOM test from r195877
Improve BOM test from r195877 1) Use %clang_cc1 instead of the driver 2) Validate that the input contains a BOM 3) Validate that the BOM has been stripped from the output git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@195886 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
0c46e1fccad4e19eda5c380eb648324eb7c8a32e
src/common/file_manager_interface.h
src/common/file_manager_interface.h
#ifndef _FILE_MANAGER_INTERFACE_ #define _FILE_MANAGER_INTERFACE_ #include <string> #include <cstdint> class FileManagerInterface { public: virtual bool send( const std::string & host, const unsigned short host_port, std::string & file_path, uint64_t from = 0, uint64_t to = -1) = 0; virtual ~FileManagerInterface(){}; }; #endif // _FILE_MANAGER_INTERFACE_
#ifndef _FILE_MANAGER_INTERFACE_ #define _FILE_MANAGER_INTERFACE_ #include <string> #include <cstdint> class FileManagerInterface { public: virtual uint64_t send( const std::string & host, const unsigned short host_port, std::string & file_path, uint64_t from = 0, uint64_t to = -1) = 0; virtual std::std::vector<uint64_t> getIds() = 0; virtual ~FileManagerInterface(){}; }; #endif // _FILE_MANAGER_INTERFACE_
Add getIds to file manager
Add getIds to file manager
C
mit
Plamenod/P2P
88a88431d2d22fd5f2ba1844670b7b67f58ad92f
templates/c/main.c
templates/c/main.c
#include <display.h> /* Warning! C support in KnightOS is highly experimental. Your milage may vary. */ void main(void) { SCREEN *screen; get_lcd_lock(); screen = screen_allocate(); screen_clear(screen); draw_string(screen, 0, 0, "Hello world!"); screen_draw(screen); while (1); }
#include <display.h> /* Warning! C support in KnightOS is highly experimental. Your mileage may vary. */ void main(void) { SCREEN *screen; get_lcd_lock(); screen = screen_allocate(); screen_clear(screen); draw_string(screen, 0, 0, "Hello world!"); screen_draw(screen); while (1); }
Fix typo in C template
Fix typo in C template Thanks @klange
C
mit
KnightOS/sdk,KnightOS/sdk,KnightOS/sdk
7b421e3feaffdc8a7daaeb4f0da65cf23a7166c5
bst.h
bst.h
#include <stdlib.h> #ifndef __BST_H__ #define __BST_H__ struct BSTNode; struct BST; typedef struct BSTNode BSTNode; typedef struct BST BST; BST* BST_Create(void); #endif
#include <stdlib.h> #ifndef __BST_H__ #define __BST_H__ struct BSTNode; struct BST; typedef struct BSTNode BSTNode; typedef struct BST BST; BST* BST_Create(void); BSTNode* BSTNode_Create(void* k); #endif
Add BSTNode Create function declaration
Add BSTNode Create function declaration
C
mit
MaxLikelihood/CADT
8f91e164d1d23a3b0dc751bc0f9185af27dcb2c7
os/gl/gl_context.h
os/gl/gl_context.h
// LAF OS Library // Copyright (C) 2022 Igara Studio S.A. // Copyright (C) 2015-2016 David Capello // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. #ifndef OS_GL_CONTEXT_INCLUDED #define OS_GL_CONTEXT_INCLUDED #pragma once namespace os { class GLContext { public: virtual ~GLContext() { } virtual bool isValid() { return false; } virtual bool createGLContext() { } virtual void destroyGLContext() { } virtual void makeCurrent() { } virtual void swapBuffers() { } }; } // namespace os #endif
// LAF OS Library // Copyright (C) 2022 Igara Studio S.A. // Copyright (C) 2015-2016 David Capello // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. #ifndef OS_GL_CONTEXT_INCLUDED #define OS_GL_CONTEXT_INCLUDED #pragma once namespace os { class GLContext { public: virtual ~GLContext() { } virtual bool isValid() { return false; } virtual bool createGLContext() { return false; } virtual void destroyGLContext() { } virtual void makeCurrent() { } virtual void swapBuffers() { } }; } // namespace os #endif
Fix GLContext::createGLContext() impl (must return a value)
Fix GLContext::createGLContext() impl (must return a value)
C
mit
aseprite/laf,aseprite/laf
0303c2c8b394679f28154451d59cfcf153487e71
test/Driver/integrated-as.c
test/Driver/integrated-as.c
// RUN: %clang -### -c -save-temps -integrated-as %s 2>&1 | FileCheck %s // CHECK: cc1as // CHECK: -mrelax-all // RUN: %clang -### -fintegrated-as -c -save-temps %s 2>&1 | FileCheck %s -check-prefix FIAS // FIAS: cc1as // RUN: %clang -### -fno-integrated-as -S %s 2>&1 \ // RUN: | FileCheck %s -check-prefix NOFIAS // NOFIAS-NOT: cc1as // NOFIAS: -cc1 // NOFIAS: -no-integrated-as
// RUN: %clang -### -c -save-temps -integrated-as %s 2>&1 | FileCheck %s // CHECK: cc1as // CHECK: -mrelax-all // RUN: %clang -### -fintegrated-as -c -save-temps %s 2>&1 | FileCheck %s -check-prefix FIAS // FIAS: cc1as // RUN: %clang -target none -### -fno-integrated-as -S %s 2>&1 \ // RUN: | FileCheck %s -check-prefix NOFIAS // NOFIAS-NOT: cc1as // NOFIAS: -cc1 // NOFIAS: -no-integrated-as
Use a dummy target so the test passes when default target is for a toolchain implements useIntegratedAs() -> true
Use a dummy target so the test passes when default target is for a toolchain implements useIntegratedAs() -> true git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@338553 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
aca0e26e885f5996cc27c1bf8524a36da3c68431
bpf/sockops/sockops_config.h
bpf/sockops/sockops_config.h
/* * Copyright (C) 2018 Authors of Cilium * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef SOCK_OPS_MAP #define SOCK_OPS_MAP cilium_sock_ops #endif #define SOCKOPS_MAP_SIZE 65535
/* * Copyright (C) 2018-2019 Authors of Cilium * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef SOCK_OPS_MAP #define SOCK_OPS_MAP cilium_sock_ops #endif #define SOCKOPS_MAP_SIZE 65535 #ifndef CALLS_MAP #define CALLS_MAP test_cilium_calls #endif
Fix sockops map name for testing
bpf: Fix sockops map name for testing For testing purposes, this config file should contain the testing name of the map which should be different from the static name used by the Cilium agent. Signed-off-by: Joe Stringer <16a9a54ddf4259952e3c118c763138e83693d7fd@cilium.io>
C
apache-2.0
cilium/cilium,tgraf/cilium,cilium/cilium,michi-covalent/cilium,michi-covalent/cilium,tgraf/cilium,tklauser/cilium,tgraf/cilium,cilium/cilium,michi-covalent/cilium,tklauser/cilium,tklauser/cilium,tklauser/cilium,michi-covalent/cilium,tgraf/cilium,cilium/cilium,michi-covalent/cilium,tgraf/cilium,cilium/cilium,tklauser/cilium,tgraf/cilium,cilium-team/cilium,cilium-team/cilium
f418b2182b8dbae45906ded6b4aedc07ffb7d90c
ext/glib/glib.c
ext/glib/glib.c
#include <ruby.h> #include <glib.h> static VALUE utf8_size(VALUE self, VALUE string) { VALUE result; Check_Type(string, T_STRING); result = ULONG2NUM(g_utf8_strlen(StringValuePtr(string), RSTRING(string)->len)); return result; } static VALUE utf8_upcase(VALUE self, VALUE string) { VALUE result; gchar *temp; Check_Type(string, T_STRING); temp = g_utf8_strup(StringValuePtr(string), RSTRING(string)->len); result = rb_str_new2(temp); return result; } static VALUE utf8_downcase(VALUE self, VALUE string) { VALUE result; gchar *temp; Check_Type(string, T_STRING); temp = g_utf8_strdown(StringValuePtr(string), RSTRING(string)->len); result = rb_str_new2(temp); return result; } void Init_glib() { VALUE mGlib; mGlib = rb_define_module("Glib"); rb_define_method(mGlib, "utf8_size", utf8_size, 1); rb_define_method(mGlib, "utf8_upcase", utf8_upcase, 1); rb_define_method(mGlib, "utf8_downcase", utf8_downcase, 1); }
#include <ruby.h> #include <glib.h> static VALUE utf8_size(VALUE self, VALUE string) { VALUE result; Check_Type(string, T_STRING); result = ULONG2NUM(g_utf8_strlen(StringValuePtr(string), RSTRING(string)->len)); return result; } static VALUE utf8_upcase(VALUE self, VALUE string) { VALUE result; gchar *temp; Check_Type(string, T_STRING); temp = g_utf8_strup(StringValuePtr(string), RSTRING(string)->len); result = rb_str_new2(temp); return result; } static VALUE utf8_downcase(VALUE self, VALUE string) { VALUE result; gchar *temp; Check_Type(string, T_STRING); temp = g_utf8_strdown(StringValuePtr(string), RSTRING(string)->len); result = rb_str_new2(temp); return result; } void Init_glib() { VALUE mGlib; mGlib = rb_define_module("Glib"); rb_define_module_function(mGlib, "utf8_size", utf8_size, 1); rb_define_module_function(mGlib, "utf8_upcase", utf8_upcase, 1); rb_define_module_function(mGlib, "utf8_downcase", utf8_downcase, 1); }
Define the Glib functions as module functions.
Define the Glib functions as module functions.
C
mit
Manfred/unichars,Manfred/unichars
5be7b1cb2ca955b29e43536422ce6f81f5a790bd
Tests/testing_util.h
Tests/testing_util.h
#pragma once #ifndef TESTING_UTIL_H #define TESTING_UTIL_H 1 #include <Python.h> /** Use RAII to Py_XDECREF a pointer. Inspired by std::unique_ptr. */ template <class T> class py_ptr { private: T* m_ptr; public: py_ptr() : m_ptr(nullptr) {} py_ptr(T* ptr) : m_ptr(ptr) {} ~py_ptr() { Py_XDECREF(m_ptr); } void reset(T* ptr) { Py_XDECREF(m_ptr); m_ptr = ptr; } T* get() { return m_ptr; } T* operator->() { return m_ptr; } }; /** A concrete PyObject instance of py_ptr. */ class PyObject_ptr : public py_ptr<PyObject> { public: PyObject_ptr(PyObject *ptr) : py_ptr(ptr) {} }; PyCodeObject* CompileCode(const char*); #endif // !TESTING_UTIL_H
#pragma once #ifndef TESTING_UTIL_H #define TESTING_UTIL_H 1 #include <Python.h> /** Use RAII to Py_XDECREF a pointer. Inspired by std::unique_ptr. */ template <class T> class py_ptr { private: T* m_ptr; public: py_ptr() : m_ptr(nullptr) {} py_ptr(T* ptr) : m_ptr(ptr) {} py_ptr(const py_ptr& copy) { m_ptr = copy.get(); Py_INCREF(m_ptr); } ~py_ptr() { Py_XDECREF(m_ptr); } void reset(T* ptr) { Py_XDECREF(m_ptr); m_ptr = ptr; } T* get() { return m_ptr; } T* operator->() { return m_ptr; } T* operator*() { return m_ptr; } }; /** A concrete PyObject instance of py_ptr. */ class PyObject_ptr : public py_ptr<PyObject> { public: PyObject_ptr(PyObject *ptr) : py_ptr(ptr) {} }; PyCodeObject* CompileCode(const char*); #endif // !TESTING_UTIL_H
Add a copy constructor and * overload
Add a copy constructor and * overload
C
mit
Microsoft/Pyjion,Microsoft/Pyjion,DinoV/Pyjion-1,DinoV/Pyjion-1,Microsoft/Pyjion,brettcannon/Pyjion,brettcannon/Pyjion,DinoV/Pyjion-1,Microsoft/Pyjion,DinoV/Pyjion-1,brettcannon/Pyjion
1fd1905d4c7ef06723099f082b6cedfc50171c8d
kilo.c
kilo.c
#include <unistd.h> int main(int argc, char *argv[]) { char c; // Read 1 byte at a time while(read(STDIN_FILENO, &c, 1) == 1); return 0; }
#include <ctype.h> #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <termios.h> struct termios orig_termios; void enableRawMode(); void disableRawMode(); int main(int argc, char *argv[]) { enableRawMode(); // Read 1 byte at a time while(1){ char input = '\0'; // Input from user read(STDIN_FILENO, &input, 1); if(iscntrl(input)) { printf("%d\r\n", input); } else { printf("%d ('%c')\r\n", input, input); } if(input == 'q') break; } return 0; } void enableRawMode(){ tcgetattr(STDIN_FILENO, &orig_termios); atexit(disableRawMode); struct termios raw; tcgetattr(STDIN_FILENO,&raw); // Flags to enable raw mode raw.c_iflag &= ~(BRKINT | ICRNL | IXON | ISTRIP | INPCK); raw.c_oflag &= ~(OPOST); raw.c_cflag |= (CS8); raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG); // raw.c_cc[VMIN] = 0; // Value sets minimum number of bytes of input needed bfore read() can return. Set so it returns right away raw.c_cc[VTIME] = 1; // Maximum amount of time read waits to return, in tenths of seconds tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw); } void disableRawMode(){ tcsetattr(STDERR_FILENO,TCSAFLUSH,&orig_termios); }
Enable and disable raw mode in terminal
Enable and disable raw mode in terminal
C
bsd-2-clause
justinbarclay/tedit
965b215fcf513150671168750f77f624dc369abe
src/proxy.h
src/proxy.h
// Copyright 2014 Toggl Desktop developers. #ifndef SRC_PROXY_H_ #define SRC_PROXY_H_ #include <string> #include "./types.h" #include "Poco/Types.h" namespace kopsik { class Proxy { public: Proxy() : host(""), port(0), username(""), password("") {} bool IsConfigured() const; bool HasCredentials() const; std::string String() const; std::string host; Poco::UInt16 port; std::string username; std::string password; }; } // namespace kopsik #endif // SRC_PROXY_H_
// Copyright 2014 Toggl Desktop developers. #ifndef SRC_PROXY_H_ #define SRC_PROXY_H_ #include <string> #include "./types.h" #include "Poco/Types.h" namespace kopsik { class Proxy { public: Proxy() : host(""), port(0), username(""), password("") {} bool IsConfigured() const; bool HasCredentials() const; std::string String() const; std::string host; Poco::UInt64 port; std::string username; std::string password; }; } // namespace kopsik #endif // SRC_PROXY_H_
Use same int 64 type
Use same int 64 type
C
bsd-3-clause
codeman38/toggldesktop,codeman38/toggldesktop,codeman38/toggldesktop,codeman38/toggldesktop,codeman38/toggldesktop,codeman38/toggldesktop
229a3770f699e8688d0d6c798920ac5a497ada44
include/llvm/Transforms/Utils/BasicBlockUtils.h
include/llvm/Transforms/Utils/BasicBlockUtils.h
//===-- Transform/Utils/BasicBlockUtils.h - BasicBlock Utilities -*- C++ -*-==// // // This family of functions perform manipulations on basic blocks, and // instructions contained within basic blocks. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_UTILS_BASICBLOCK_H #define LLVM_TRANSFORMS_UTILS_BASICBLOCK_H // FIXME: Move to this file: BasicBlock::removePredecessor, BB::splitBasicBlock #include "llvm/BasicBlock.h" class Instruction; // ReplaceInstWithValue - Replace all uses of an instruction (specified by BI) // with a value, then remove and delete the original instruction. // void ReplaceInstWithValue(BasicBlock::InstListType &BIL, BasicBlock::iterator &BI, Value *V); // ReplaceInstWithInst - Replace the instruction specified by BI with the // instruction specified by I. The original instruction is deleted and BI is // updated to point to the new instruction. // void ReplaceInstWithInst(BasicBlock::InstListType &BIL, BasicBlock::iterator &BI, Instruction *I); // ReplaceInstWithInst - Replace the instruction specified by From with the // instruction specified by To. Note that this is slower than providing an // iterator directly, because the basic block containing From must be searched // for the instruction. // void ReplaceInstWithInst(Instruction *From, Instruction *To); #endif
//===-- Transform/Utils/BasicBlockUtils.h - BasicBlock Utilities -*- C++ -*-==// // // This family of functions perform manipulations on basic blocks, and // instructions contained within basic blocks. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_UTILS_BASICBLOCK_H #define LLVM_TRANSFORMS_UTILS_BASICBLOCK_H // FIXME: Move to this file: BasicBlock::removePredecessor, BB::splitBasicBlock #include "llvm/BasicBlock.h" class Instruction; // ReplaceInstWithValue - Replace all uses of an instruction (specified by BI) // with a value, then remove and delete the original instruction. // void ReplaceInstWithValue(BasicBlock::InstListType &BIL, BasicBlock::iterator &BI, Value *V); // ReplaceInstWithInst - Replace the instruction specified by BI with the // instruction specified by I. The original instruction is deleted and BI is // updated to point to the new instruction. // void ReplaceInstWithInst(BasicBlock::InstListType &BIL, BasicBlock::iterator &BI, Instruction *I); // ReplaceInstWithInst - Replace the instruction specified by From with the // instruction specified by To. // void ReplaceInstWithInst(Instruction *From, Instruction *To); // RemoveSuccessor - Change the specified terminator instruction such that its // successor #SuccNum no longer exists. Because this reduces the outgoing // degree of the current basic block, the actual terminator instruction itself // may have to be changed. In the case where the last successor of the block is // deleted, a return instruction is inserted in its place which can cause a // suprising change in program behavior if it is not expected. // void RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum); #endif
Implement a new RemoveSuccessor function
Implement a new RemoveSuccessor function git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@3130 91177308-0d34-0410-b5e6-96231b3b80d8
C
bsd-2-clause
chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm
f2adc842293ce4fe889309e16da706f321ff713d
bindings/perl/Champlain/champlain-perl.h
bindings/perl/Champlain/champlain-perl.h
#ifndef _CHAMPLAIN_PERL_H_ #include <clutter-perl.h> #include <champlain/champlain.h> #ifdef CHAMPLAINPERL_GTK #include <champlain-gtk/champlain-gtk.h> #endif #include "champlain-autogen.h" #endif /* _CHAMPLAIN_PERL_H_ */
#ifndef _CHAMPLAIN_PERL_H_ #include <clutter-perl.h> #include <champlain/champlain.h> #ifdef CHAMPLAINPERL_GTK #include <gtk2perl.h> #include <champlain-gtk/champlain-gtk.h> #endif #include "champlain-autogen.h" #endif /* _CHAMPLAIN_PERL_H_ */
Revert "Don't include gtk2perl because it redeclares the Pango types"
Revert "Don't include gtk2perl because it redeclares the Pango types" This reverts commit 421074211a234119276a6fdbb76d13d9f5bec9a4.
C
lgpl-2.1
GNOME/perl-Gtk2-Champlain,PabloCastellano/libchamplain,potyl/champlain,PabloCastellano/libchamplain,PabloCastellano/libchamplain,PabloCastellano/libchamplain,PabloCastellano/libchamplain,GNOME/libchamplain,StanciuMarius/Libchamplain-map-wrapping,StanciuMarius/Libchamplain-map-wrapping,StanciuMarius/Libchamplain-map-wrapping,Distrotech/libchamplain,Distrotech/libchamplain,GNOME/libchamplain,GNOME/perl-Gtk2-Champlain,potyl/champlain,Distrotech/libchamplain,Distrotech/libchamplain,GNOME/perl-Champlain,Distrotech/libchamplain,potyl/champlain,GNOME/perl-Champlain,potyl/champlain,StanciuMarius/Libchamplain-map-wrapping,StanciuMarius/Libchamplain-map-wrapping
d32cc52fc99f4e4aafc893e13e0b801f0586cadb
chrome/browser/ui/panels/panel_browser_window_gtk.h
chrome/browser/ui/panels/panel_browser_window_gtk.h
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ #include "chrome/browser/ui/gtk/browser_window_gtk.h" class Panel; class PanelBrowserWindowGtk : public BrowserWindowGtk { public: PanelBrowserWindowGtk(Browser* browser, Panel* panel); virtual ~PanelBrowserWindowGtk() {} // BrowserWindowGtk overrides virtual void Init() OVERRIDE; // BrowserWindow overrides virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; protected: // BrowserWindowGtk overrides virtual bool GetWindowEdge(int x, int y, GdkWindowEdge* edge) OVERRIDE; virtual bool HandleTitleBarLeftMousePress( GdkEventButton* event, guint32 last_click_time, gfx::Point last_click_position) OVERRIDE; virtual void SaveWindowPosition() OVERRIDE; virtual void SetGeometryHints() OVERRIDE; virtual bool UseCustomFrame() OVERRIDE; private: void SetBoundsImpl(); Panel* panel_; DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk); }; #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ #include "chrome/browser/ui/gtk/browser_window_gtk.h" class Panel; class PanelBrowserWindowGtk : public BrowserWindowGtk { public: PanelBrowserWindowGtk(Browser* browser, Panel* panel); virtual ~PanelBrowserWindowGtk() {} // BrowserWindowGtk overrides virtual void Init() OVERRIDE; // BrowserWindow overrides virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; protected: // BrowserWindowGtk overrides virtual bool GetWindowEdge(int x, int y, GdkWindowEdge* edge) OVERRIDE; virtual bool HandleTitleBarLeftMousePress( GdkEventButton* event, guint32 last_click_time, gfx::Point last_click_position) OVERRIDE; virtual void SaveWindowPosition() OVERRIDE; virtual void SetGeometryHints() OVERRIDE; virtual bool UseCustomFrame() OVERRIDE; private: void SetBoundsImpl(); scoped_ptr<Panel> panel_; DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk); }; #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
Use scoped_ptr for Panel in PanelBrowserWindowGTK.
Use scoped_ptr for Panel in PanelBrowserWindowGTK. BUG=None TEST=Verified WindowOpenPanel test now hits Panel destructor. Review URL: http://codereview.chromium.org/7120011 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@88154 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
adobe/chromium,adobe/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium
3e4aba119168140015b87dfabccd45b4275dcbd8
test/lib/c/01-con-discon-success.c
test/lib/c/01-con-discon-success.c
#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <mosquitto.h> static int run = -1; void on_connect(struct mosquitto *mosq, void *obj, int rc) { if(rc){ exit(1); }else{ mosquitto_disconnect(mosq); } } void on_disconnect(struct mosquitto *mosq, void *obj, int rc) { run = rc; } int main(int argc, char *argv[]) { int rc; struct mosquitto *mosq; mosq = mosquitto_new("01-con-discon-success", true, NULL); mosquitto_connect_callback_set(mosq, on_connect); mosquitto_disconnect_callback_set(mosq, on_disconnect); rc = mosquitto_connect(mosq, "localhost", 1888, 60); while(run == -1){ mosquitto_loop(mosq, -1); } return run; }
#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <mosquitto.h> static int run = -1; void on_connect(struct mosquitto *mosq, void *obj, int rc) { if(rc){ exit(1); }else{ mosquitto_disconnect(mosq); } } void on_disconnect(struct mosquitto *mosq, void *obj, int rc) { run = rc; } int main(int argc, char *argv[]) { int rc; struct mosquitto *mosq; mosquitto_lib_init(); mosq = mosquitto_new("01-con-discon-success", true, NULL); mosquitto_connect_callback_set(mosq, on_connect); mosquitto_disconnect_callback_set(mosq, on_disconnect); rc = mosquitto_connect(mosq, "localhost", 1888, 60); while(run == -1){ mosquitto_loop(mosq, -1); } mosquitto_lib_cleanup(); return run; }
Call lib init/cleanup in C client test.
Call lib init/cleanup in C client test.
C
bsd-3-clause
zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto
423355ecbff46ef0dddc5e7a48ae10af2a2d1bea
src/main/c/emulator/src/config.h
src/main/c/emulator/src/config.h
#ifndef CONFIG_H #define CONFIG_H //#define QEMU #define SIM #define OS_CALL 0xC0000000 #define DTB 0xC3000000 #endif
#ifndef CONFIG_H #define CONFIG_H //#define QEMU #define SIM #ifndef OS_CALL #define OS_CALL 0xC0000000 #endif #ifndef DTB #define DTB 0xC3000000 #endif #endif
Allow to set custom DTB/OS_CALL addresses
Allow to set custom DTB/OS_CALL addresses Setting those from command line during compilation allows to create a custom setup without the need of modifying the sources.
C
mit
SpinalHDL/VexRiscv,SpinalHDL/VexRiscv,SpinalHDL/VexRiscv,SpinalHDL/VexRiscv,SpinalHDL/VexRiscv
ba7874bd648cf81182d4c36331525fc72944743a
include/config/SkUserConfigManual.h
include/config/SkUserConfigManual.h
/* * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkUserConfigManual_DEFINED #define SkUserConfigManual_DEFINED #define GR_TEST_UTILS 1 #define SK_BUILD_FOR_ANDROID_FRAMEWORK #define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024) #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024) #define SK_USE_FREETYPE_EMBOLDEN // Disable these Ganesh features #define SK_DISABLE_REDUCE_OPLIST_SPLITTING // Check error is expensive. HWUI historically also doesn't check its allocations #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0 // Staging flags #define SK_LEGACY_PATH_ARCTO_ENDPOINT #define SK_SUPPORT_STROKEANDFILL // Needed until we fix https://bug.skia.org/2440 #define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG #define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER #define SK_SUPPORT_LEGACY_AA_CHOICE #define SK_SUPPORT_LEGACY_AAA_CHOICE #define SK_DISABLE_DAA // skbug.com/6886 #endif // SkUserConfigManual_DEFINED
/* * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkUserConfigManual_DEFINED #define SkUserConfigManual_DEFINED #include <android/log.h> #define GR_TEST_UTILS 1 #define SK_BUILD_FOR_ANDROID_FRAMEWORK #define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024) #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024) #define SK_USE_FREETYPE_EMBOLDEN // Disable these Ganesh features #define SK_DISABLE_REDUCE_OPLIST_SPLITTING // Check error is expensive. HWUI historically also doesn't check its allocations #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0 // Staging flags #define SK_LEGACY_PATH_ARCTO_ENDPOINT #define SK_SUPPORT_STROKEANDFILL // Needed until we fix https://bug.skia.org/2440 #define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG #define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER #define SK_SUPPORT_LEGACY_AA_CHOICE #define SK_SUPPORT_LEGACY_AAA_CHOICE #define SK_DISABLE_DAA // skbug.com/6886 #ifdef LOG_TAG #undef LOG_TAG #endif #define LOG_TAG "skia" #define SK_ABORT(...) __android_log_assert(nullptr, LOG_TAG, ##__VA_ARGS__) #endif // SkUserConfigManual_DEFINED
Print the message from SK_ABORT in stack traces
Print the message from SK_ABORT in stack traces This will make debugging easier. Instead of using LOG_ALWAYS_FATAL, use __android_log_assert (which the former uses internally) directly, since SkQP can only access NDK APIs. Depends on https://skia-review.googlesource.com/c/skia/+/521001. Bug: 224771432 Test: manual Change-Id: Ib9bec1e1d72169a18e6ad1ce8f9008a65dbe5a71
C
bsd-3-clause
aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia
a451476a98df41bf57a658d7d532e10c25158ea9
Reducers/REDIterable.h
Reducers/REDIterable.h
// Copyright (c) 2014 Rob Rix. All rights reserved. #import <Foundation/Foundation.h> @protocol REDIterable <NSObject> @property (readonly) id(^red_iterator)(void); @end
// Copyright (c) 2014 Rob Rix. All rights reserved. #import <Foundation/Foundation.h> /// A nullary block iterating the elements of a collection over successive calls. /// /// \return The next object in the collection, or nil if it has iterated the entire collection. typedef id (^REDIteratingBlock)(void); /// A collection which can be iterated. @protocol REDIterable <NSObject> /// An iterator for this collection. @property (readonly) REDIteratingBlock red_iterator; @end
Add a typedef for iterators.
Add a typedef for iterators.
C
mit
policp/Reducers,robrix/Reducers
41acb0a75b1ed5b4cf2feb74c64113a06a284e85
React/Fabric/RCTFabricPlatformUIOperationManager.h
React/Fabric/RCTFabricPlatformUIOperationManager.h
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import <memory> #include <fabric/IFabricPlatformUIOperationManager.h> @class RCTFabricPlatformUIOperationManager; namespace facebook { namespace react { /** * Connector class (from C++ to ObjC++) to allow FabricUIManager to invoke native UI operations/updates. * UIKit-related impl doesn't live here, but this class gets passed to the FabricUIManager C++ impl directly. */ class RCTFabricPlatformUIOperationManagerConnector : public IFabricPlatformUIOperationManager { public: RCTFabricPlatformUIOperationManagerConnector(); ~RCTFabricPlatformUIOperationManagerConnector(); void performUIOperation(); private: void *self_; RCTFabricPlatformUIOperationManager *manager_; }; } // namespace react } // namespace facebook /** * Actual ObjC++ implementation of the UI operations. */ @interface RCTFabricPlatformUIOperationManager : NSObject - (void)performUIOperation; @end
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import <memory> #include <fabric/IFabricPlatformUIOperationManager.h> @class RCTFabricPlatformUIOperationManager; namespace facebook { namespace react { /** * Connector class (from C++ to ObjC++) to allow FabricUIManager to invoke native UI operations/updates. * UIKit-related impl doesn't live here, but this class gets passed to the FabricUIManager C++ impl directly. */ class RCTFabricPlatformUIOperationManagerConnector : public IFabricPlatformUIOperationManager { public: RCTFabricPlatformUIOperationManagerConnector(); virtual ~RCTFabricPlatformUIOperationManagerConnector(); void performUIOperation(); private: void *self_; RCTFabricPlatformUIOperationManager *manager_; }; } // namespace react } // namespace facebook /** * Actual ObjC++ implementation of the UI operations. */ @interface RCTFabricPlatformUIOperationManager : NSObject - (void)performUIOperation; @end
Fix clang-6 compile error (virtual destructor)
Fix clang-6 compile error (virtual destructor) Reviewed By: smeenai Differential Revision: D7264312 fbshipit-source-id: f0567452127ceba6cfa13d05bb2a00a5af7aac05
C
mit
myntra/react-native,javache/react-native,hoangpham95/react-native,facebook/react-native,facebook/react-native,exponentjs/react-native,javache/react-native,facebook/react-native,janicduplessis/react-native,javache/react-native,exponent/react-native,myntra/react-native,hoangpham95/react-native,hammerandchisel/react-native,myntra/react-native,hammerandchisel/react-native,exponentjs/react-native,janicduplessis/react-native,hammerandchisel/react-native,arthuralee/react-native,exponent/react-native,hammerandchisel/react-native,javache/react-native,arthuralee/react-native,hammerandchisel/react-native,janicduplessis/react-native,janicduplessis/react-native,myntra/react-native,pandiaraj44/react-native,exponentjs/react-native,myntra/react-native,pandiaraj44/react-native,myntra/react-native,facebook/react-native,hoangpham95/react-native,pandiaraj44/react-native,exponent/react-native,exponentjs/react-native,javache/react-native,arthuralee/react-native,facebook/react-native,exponentjs/react-native,arthuralee/react-native,exponentjs/react-native,exponent/react-native,myntra/react-native,myntra/react-native,hoangpham95/react-native,myntra/react-native,exponent/react-native,javache/react-native,exponent/react-native,facebook/react-native,pandiaraj44/react-native,arthuralee/react-native,pandiaraj44/react-native,javache/react-native,javache/react-native,facebook/react-native,hammerandchisel/react-native,pandiaraj44/react-native,hoangpham95/react-native,javache/react-native,exponent/react-native,exponentjs/react-native,janicduplessis/react-native,hammerandchisel/react-native,hoangpham95/react-native,exponent/react-native,facebook/react-native,exponentjs/react-native,facebook/react-native,hoangpham95/react-native,hammerandchisel/react-native,janicduplessis/react-native,hoangpham95/react-native,pandiaraj44/react-native,janicduplessis/react-native,pandiaraj44/react-native,janicduplessis/react-native
6a989a7bb29ee5a16b6b059b61581cdc9458f765
main.c
main.c
// Copyright 2016, Jeffrey E. Bedard #include "xstatus.h" #include "config.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> static const char helptext[] = "DESCRIPTION: Simple X toolbar for minimalistic" " window managers.\n" "USAGE: xstatus [-d DELAY][-f FILE][-h]\n" "\t-d DELAY Set delay between status updates," " in seconds.\n" "\t-f FILE Set FILE to be continuously polled and" " displayed.\n" "\t-h Print this usage information. \n" "Copyright 2016, Jeffrey E. Bedard <jefbed@gmail.com>\n" "Project page: https://github.com/jefbed/xstatus\n"; int main(int argc, char ** argv) { char *filename=XSTATUS_STATUS_FILE; uint8_t delay=1; int opt; while((opt = getopt(argc, argv, "d:f:h")) != -1) { switch(opt) { case 'd': delay=atoi(optarg); break; case 'f': filename=optarg; break; case 'h': default: write(2, helptext, sizeof(helptext)); exit(0); } } run_xstatus(filename, delay); }
// Copyright 2016, Jeffrey E. Bedard #include "xstatus.h" #include "config.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> static const char helptext[] = "DESCRIPTION: Simple X toolbar for minimalistic" " window managers.\n" "USAGE: xstatus [-d DELAY][-f FILE][-h]\n" "\t-d DELAY\tSet delay between status updates," " in seconds.\n" "\t-f FILE\t\tSet FILE to be continuously polled and" " displayed.\n" "\t-h\t\tPrint this usage information.\n" "Copyright 2016, Jeffrey E. Bedard <jefbed@gmail.com>\n" "Project page: https://github.com/jefbed/xstatus\n"; int main(int argc, char ** argv) { char *filename=XSTATUS_STATUS_FILE; uint8_t delay=1; int opt; while((opt = getopt(argc, argv, "d:f:h")) != -1) { switch(opt) { case 'd': delay=atoi(optarg); break; case 'f': filename=optarg; break; case 'h': default: write(2, helptext, sizeof(helptext)); exit(0); } } run_xstatus(filename, delay); }
Use tab characters in help text.
Use tab characters in help text.
C
mit
jefbed/xstatus,jefbed/xstatus,jefbed/xstatus,jefbed/xstatus
d8f546320062c3c8848c1d50bf6a7e8ab3a673b0
ffi-cdecl/mxcfb_kobo_decl.c
ffi-cdecl/mxcfb_kobo_decl.c
// standard Linux framebuffer headers #include <linux/fb.h> #include <linux/ioctl.h> // specialized eink framebuffer headers typedef unsigned int uint; #include "include/mxcfb-kobo.h" #include "cdecl.h" cdecl_struct(mxcfb_rect) cdecl_struct(mxcfb_alt_buffer_data) cdecl_struct(mxcfb_update_data) cdecl_const(MXCFB_SEND_UPDATE)
// standard Linux framebuffer headers #include <linux/fb.h> #include <linux/ioctl.h> // specialized eink framebuffer headers typedef unsigned int uint; #include "include/mxcfb-kobo.h" #include "cdecl.h" cdecl_struct(mxcfb_rect) cdecl_struct(mxcfb_alt_buffer_data) cdecl_struct(mxcfb_update_data) cdecl_const(MXCFB_SEND_UPDATE) /* Might come in handy one day... */ cdecl_const(MXCFB_WAIT_FOR_UPDATE_COMPLETE) /* Aura */ cdecl_struct(mxcfb_update_data_org) cdecl_const(MXCFB_SEND_UPDATE_ORG)
Tweak the kobo mxcfb cdecl
Tweak the kobo mxcfb cdecl
C
agpl-3.0
frankyifei/koreader-base,apletnev/koreader-base,NiLuJe/koreader-base,Hzj-jie/koreader-base,houqp/koreader-base,houqp/koreader-base,Hzj-jie/koreader-base,NiLuJe/koreader-base,NiLuJe/koreader-base,frankyifei/koreader-base,Hzj-jie/koreader-base,Hzj-jie/koreader-base,Frenzie/koreader-base,apletnev/koreader-base,koreader/koreader-base,houqp/koreader-base,koreader/koreader-base,houqp/koreader-base,apletnev/koreader-base,Frenzie/koreader-base,frankyifei/koreader-base,frankyifei/koreader-base,koreader/koreader-base,NiLuJe/koreader-base,Frenzie/koreader-base,koreader/koreader-base,Frenzie/koreader-base,apletnev/koreader-base
429d7cdce99df7b26eb6f15b819be98074f48695
main.c
main.c
#include "js.h" int main(int argc, char **argv) { js_State *J; int i; J = js_newstate(); for (i = 1; i < argc; i++) { js_loadfile(J, argv[1]); // js_run(J); } js_close(J); return 0; }
#include "js.h" int main(int argc, char **argv) { js_State *J; int i; J = js_newstate(); for (i = 1; i < argc; i++) { js_loadfile(J, argv[i]); // js_run(J); } js_close(J); return 0; }
Fix typo so all arguments are loaded.
Fix typo so all arguments are loaded.
C
isc
BOGY/mujs,lsm/mujs,earthling42/mujs,ccxvii/mujs,ccxvii/mujs,guiquanz/mujs,Frky/mujs,ccxvii/mujs,ccxvii/mujs,thurday/mujs,evanlabs/mujs
0db1fc1c5d71d4952975293647f087c22a265628
ghighlighter/main.c
ghighlighter/main.c
#include <gtk/gtk.h> #include "main-window.h" int main (int argc, char *argv[]) { GtkWidget *window; gtk_init(&argc, &argv); window = main_window_create(); gtk_widget_show(window); gtk_main(); return 0; }
#include <gtk/gtk.h> #include "main-window.h" int main (int argc, char *argv[]) { GtkWidget *window; gtk_init(&argc, &argv); window = main_window_create(); gtk_widget_show_all(window); gtk_main(); return 0; }
Use gtk_widget_show_all instead of just show
Use gtk_widget_show_all instead of just show
C
mit
chdorner/ghighlighter-c
e8fb39c9a7aaa172a528142fb5b24aa03e224083
inc/ArgParse/ArgParse.h
inc/ArgParse/ArgParse.h
/* ArgParser - C++ Argument Parser reflecting the python module ArgParse. Copyright (C) 2014-2015 Matthew Scott Krafczyk This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef ARGPARSE_ArgParse_HDR #define ARGPARSE_ArgParse_HDR #include "ArgParse/Message.h" #include "ArgParse/Option.h" #include "ArgParse/ArgParser.h" #endif
/* ArgParser - C++ Argument Parser reflecting the python module ArgParse. Copyright (C) 2014-2015 Matthew Scott Krafczyk This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef ARGPARSE_ArgParse_HDR #define ARGPARSE_ArgParse_HDR #include "ArgParse/Message.h" #include "ArgParse/Argument.h" #include "ArgParse/ArgParser.h" #endif
Change an old Option.h to Argument.h
Change an old Option.h to Argument.h
C
mit
krafczyk/ArgParse,krafczyk/ArgParse
de630eb49412f0ef25cb5a010efd6922a5c4d28b
common.h
common.h
#ifndef MLCD_COMMON_H #define MLCD_COMMON_H #define BYTE_TO_ASCII(byte) \ (byte & 0x80 ? '#' : ' '), \ (byte & 0x40 ? '#' : ' '), \ (byte & 0x20 ? '#' : ' '), \ (byte & 0x10 ? '#' : ' '), \ (byte & 0x08 ? '#' : ' '), \ (byte & 0x04 ? '#' : ' '), \ (byte & 0x02 ? '#' : ' '), \ (byte & 0x01 ? '#' : ' ') #define MLCD_WIDTH 48 #define MLCD_HEIGHT 32 #define MLCD_BYTES ((MLCD_WIDTH * MLCD_HEIGHT) / 8) #endif /* MLCD_COMMON_H */
#ifndef MLCD_COMMON_H #define MLCD_COMMON_H #define BYTE_TO_ASCII(byte) \ (byte & 0x80 ? '1' : '0'), \ (byte & 0x40 ? '1' : '0'), \ (byte & 0x20 ? '1' : '0'), \ (byte & 0x10 ? '1' : '0'), \ (byte & 0x08 ? '1' : '0'), \ (byte & 0x04 ? '1' : '0'), \ (byte & 0x02 ? '1' : '0'), \ (byte & 0x01 ? '1' : '0') #define MLCD_WIDTH 48 #define MLCD_HEIGHT 32 #define MLCD_BYTES ((MLCD_WIDTH * MLCD_HEIGHT) / 8) #endif /* MLCD_COMMON_H */
Fix asm generation with mlcd -a
Fix asm generation with mlcd -a
C
bsd-2-clause
travispaul/mlcd
45d03888d28f1126c051ec5a870dcb9829ad8d27
ObjCBridge.h
ObjCBridge.h
// // Use this file to import your target's public headers that you would like to expose to Swift. // #import "Konashi.h" #import "Colorkit.h" #import <EstimoteSDK/EstimoteSDK.h> #import "ActionSheetPicker.h"
// // Use this file to import your target's public headers that you would like to expose to Swift. // #import <Konashi.h> #import <Colorkit.h> #import <EstimoteSDK/EstimoteSDK.h> #import <ActionSheetPicker.h>
Use <> instead of ""
Use <> instead of "" ""は、自作クラスの時に使用するらしい
C
mit
karappo/PlayTheWheels,karappo/PlayTheWheels
8fd0d0b7089303d141b08913bcf6a1f92469f754
include/effects/SkStippleMaskFilter.h
include/effects/SkStippleMaskFilter.h
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkStippleMaskFilter_DEFINED #define SkStippleMaskFilter_DEFINED #include "SkMaskFilter.h" /** * Simple MaskFilter that creates a screen door stipple pattern */ class SkStippleMaskFilter : public SkMaskFilter { public: SkStippleMaskFilter() : INHERITED() { } virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix& matrix, SkIPoint* margin) SK_OVERRIDE; // getFormat is from SkMaskFilter virtual SkMask::Format getFormat() SK_OVERRIDE { return SkMask::kA8_Format; } SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkStippleMaskFilter); protected: SkStippleMaskFilter::SkStippleMaskFilter(SkFlattenableReadBuffer& buffer) : SkMaskFilter(buffer) { } private: typedef SkMaskFilter INHERITED; }; #endif // SkStippleMaskFilter_DEFINED
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkStippleMaskFilter_DEFINED #define SkStippleMaskFilter_DEFINED #include "SkMaskFilter.h" /** * Simple MaskFilter that creates a screen door stipple pattern */ class SkStippleMaskFilter : public SkMaskFilter { public: SkStippleMaskFilter() : INHERITED() { } virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix& matrix, SkIPoint* margin) SK_OVERRIDE; // getFormat is from SkMaskFilter virtual SkMask::Format getFormat() SK_OVERRIDE { return SkMask::kA8_Format; } SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkStippleMaskFilter); protected: SkStippleMaskFilter(SkFlattenableReadBuffer& buffer) : SkMaskFilter(buffer) { } private: typedef SkMaskFilter INHERITED; }; #endif // SkStippleMaskFilter_DEFINED
Fix for compiler error in r4154
Fix for compiler error in r4154 git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@4155 2bbb7eff-a529-9590-31e7-b0007b416f81
C
bsd-3-clause
Frankie-666/color-emoji.skia,Hankuo/color-emoji.skia,MatChung/color-emoji.skia,hbwhlklive/color-emoji.skia,Hankuo/color-emoji.skia,Frankie-666/color-emoji.skia,hbwhlklive/color-emoji.skia,Hankuo/color-emoji.skia,Hankuo/color-emoji.skia,hbwhlklive/color-emoji.skia,MatChung/color-emoji.skia,Hankuo/color-emoji.skia,Frankie-666/color-emoji.skia,MatChung/color-emoji.skia,MatChung/color-emoji.skia,Hankuo/color-emoji.skia,Frankie-666/color-emoji.skia,Frankie-666/color-emoji.skia,hbwhlklive/color-emoji.skia,hbwhlklive/color-emoji.skia,MatChung/color-emoji.skia,Frankie-666/color-emoji.skia,hbwhlklive/color-emoji.skia,MatChung/color-emoji.skia
c0346b75f26d982b0d8bf5c062b7a728025100a8
include/truth/cpu.h
include/truth/cpu.h
#pragma once #include <truth/types.h> // The state of the CPU before an interrupt occurs. struct cpu_state; // Interrupt Service Routine function signature. // ISRs with this signature are installed to a dispatch table. typedef void (isr_f)(struct cpu_state *); /* Install an interrupt handler. * The handler will have the interrupt number @num, and when triggered it will * execute @function. If @privileged is set to false, the interrupt will be * able to be raised by ring 3 code. If false, it will only be able to be * raised by ring 0 code. @return 0 if the interrupt is successfully installed * and -1 if that interrupt number has already been registered. */ int install_interrupt(uint8_t num, isr_f function); // Sets up CPU interrupt tables and initializes interrupts void interrupts_init(void); // Disable interrupts extern void disable_interrupts(void); // Enable interrupts extern void enable_interrupts(void); // Halt CPU extern void halt(void); // Gets the CPU time step counter value extern uint64_t cpu_time(void);
#pragma once #include <truth/types.h> // Halt CPU. extern void halt(void); // Gets the CPU time step counter value. extern uint64_t cpu_time(void); // Puts CPU into sleep state until awoken by interrupt. void cpu_sleep_state(void);
Remove stuff moved to interrupts header
Remove stuff moved to interrupts header
C
mit
iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth
94cdb6e58f3407127089a412824180475bceb4e7
src/distributed.c
src/distributed.c
#include <fcntl.h> #include <stdio.h> #include <string.h> #include <sys/mman.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include "distributed.h" #include "stddefines.h" void shm_init() { int fd; /* Map the shmem region */ fd = open(SHM_DEV, O_RDWR); CHECK_ERROR(fd < 0); shm_base = mmap(SHM_LOC, SHM_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 1*getpagesize()); CHECK_ERROR(shm_base == MAP_FAILED); }
#include <fcntl.h> #include <stdio.h> #include <string.h> #include <sys/mman.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include "distributed.h" #include "stddefines.h" void shm_init() { int fd; /* Map the shmem region */ fd = open(SHM_DEV, O_RDWR); CHECK_ERROR(fd < 0); shm_base = mmap(SHM_LOC, SHM_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 1*getpagesize()); CHECK_ERROR(shm_base != SHM_LOC); }
Check that the mmap goes in the right place.
Check that the mmap goes in the right place.
C
bsd-3-clause
adamwg/elastic-phoenix,adamwg/elastic-phoenix,adamwg/elastic-phoenix
3e34f2f419583aa78b515b3027fb204b89202c92
include/8cc.h
include/8cc.h
#define _LP64 1 #define __8cc__ 1 #define __ELF__ 1 #define __LP64__ 1 #define __SIZEOF_DOUBLE__ 8 #define __SIZEOF_FLOAT__ 4 #define __SIZEOF_INT__ 4 #define __SIZEOF_LONG_DOUBLE__ 8 #define __SIZEOF_LONG_LONG__ 8 #define __SIZEOF_LONG__ 8 #define __SIZEOF_POINTER__ 8 #define __SIZEOF_PTRDIFF_T__ 8 #define __SIZEOF_SHORT__ 2 #define __SIZEOF_SIZE_T__ 8 #define __STDC_HOSTED__ 1 #define __STDC_NO_ATOMICS__ 1 #define __STDC_NO_COMPLEX__ 1 #define __STDC_NO_THREADS__ 1 #define __STDC_NO_VLA__ 1 #define __STDC_VERSION__ 201112L #define __STDC__ 1 #define __amd64 1 #define __amd64__ 1 #define __gnu_linux__ 1 #define __linux 1 #define __linux__ 1 #define __unix 1 #define __unix__ 1 #define __x86_64 1 #define __x86_64__ 1 #define linux 1
#define _LP64 1 #define __8cc__ 1 #define __ELF__ 1 #define __LP64__ 1 #define __SIZEOF_DOUBLE__ 8 #define __SIZEOF_FLOAT__ 4 #define __SIZEOF_INT__ 4 #define __SIZEOF_LONG_DOUBLE__ 8 #define __SIZEOF_LONG_LONG__ 8 #define __SIZEOF_LONG__ 8 #define __SIZEOF_POINTER__ 8 #define __SIZEOF_PTRDIFF_T__ 8 #define __SIZEOF_SHORT__ 2 #define __SIZEOF_SIZE_T__ 8 #define __STDC_HOSTED__ 1 #define __STDC_NO_ATOMICS__ 1 #define __STDC_NO_COMPLEX__ 1 #define __STDC_NO_THREADS__ 1 #define __STDC_NO_VLA__ 1 #define __STDC_VERSION__ 201112L #define __STDC__ 1 #define __amd64 1 #define __amd64__ 1 #define __gnu_linux__ 1 #define __linux 1 #define __linux__ 1 #define __unix 1 #define __unix__ 1 #define __x86_64 1 #define __x86_64__ 1 #define linux 1 #define __restrict restrict #define __restrict__ restrict
Define __restrict__ and __restrict as synonyms for restrict.
Define __restrict__ and __restrict as synonyms for restrict. C99/C11 defines only restrict, but popular compilers including GCC define these synonyms (so that you can use __restrict in C++, in which restrict keyword is not a part of the language standard).
C
mit
andrewchambers/8cc,andrewchambers/8cc,vastin/8cc,nobody1986/8cc,jtramm/8cc,8l/8cc,cpjreynolds/8cc,rui314/8cc,vastin/8cc,cpjreynolds/8cc,rui314/8cc,gergo-/8cc,rui314/8cc,rui314/8cc,nobody1986/8cc,jtramm/8cc,8l/8cc,andrewchambers/8cc,vastin/8cc,abc00/8cc,8l/8cc,gergo-/8cc,gergo-/8cc,jtramm/8cc,abc00/8cc,abc00/8cc,jtramm/8cc,andrewchambers/8cc,8l/8cc,abc00/8cc,cpjreynolds/8cc,vastin/8cc,nobody1986/8cc,nobody1986/8cc,cpjreynolds/8cc
bc62ff6ea6705bc68e2993fd2ee06c1f4ecf2c93
Plugins/Drift/Source/RapidJson/Public/JsonUtils.h
Plugins/Drift/Source/RapidJson/Public/JsonUtils.h
// Copyright 2015-2017 Directive Games Limited - All Rights Reserved #pragma once #include "JsonArchive.h" #include "IHttpRequest.h" #include "Core.h" #include "Interfaces/IHttpRequest.h" RAPIDJSON_API DECLARE_LOG_CATEGORY_EXTERN(JsonUtilsLog, Log, All); class RAPIDJSON_API JsonUtils { public: template<class T> static bool ParseResponse(FHttpResponsePtr response, T& parsed) { const auto respStr = response->GetContentAsString(); bool success = JsonArchive::LoadObject(*respStr, parsed); if (!success) { UE_LOG(JsonUtilsLog, Error, TEXT("Failed to parse json response '%s'"), *respStr); } return success; } };
// Copyright 2015-2017 Directive Games Limited - All Rights Reserved #pragma once #include "JsonArchive.h" #include "IHttpRequest.h" #include "Core.h" #include "Interfaces/IHttpRequest.h" #include "Interfaces/IHttpResponse.h" RAPIDJSON_API DECLARE_LOG_CATEGORY_EXTERN(JsonUtilsLog, Log, All); class RAPIDJSON_API JsonUtils { public: template<class T> static bool ParseResponse(FHttpResponsePtr response, T& parsed) { const auto respStr = response->GetContentAsString(); bool success = JsonArchive::LoadObject(*respStr, parsed); if (!success) { UE_LOG(JsonUtilsLog, Error, TEXT("Failed to parse json response '%s'"), *respStr); } return success; } };
Fix another Linux build error
Fix another Linux build error - Was missing #include statements
C
mit
dgnorth/DriftUe4Plugin,dgnorth/DriftUe4Plugin,dgnorth/DriftUe4Plugin,dgnorth/DriftUe4Plugin
bcccfa6cd2b6e4335b479bdfc137567fd5585f37
OctoKit/OCTClient+Activity.h
OctoKit/OCTClient+Activity.h
// // OCTClient+Activity.h // OctoKit // // Created by Piet Brauer on 14.02.14. // Copyright (c) 2014 GitHub. All rights reserved. // #import "OCTClient.h" @class RACSignal; @class OCTRepository; @interface OCTClient (Activity) // Check if the user starred the `repository`. // // repository - The repository used to check the starred status. Cannot be nil. // // Returns a signal, which will send completed on success. If the client // is not `authenticated`, the signal will error immediately. - (RACSignal *)hasUserStarredRepository:(OCTRepository *)repository; // Star the given `repository` // // repository - The repository to star. Cannot be nil. // // Returns a signal, which will send completed on success. If the client // is not `authenticated`, the signal will error immediately. - (RACSignal *)starRepository:(OCTRepository *)repository; // Unstar the given `repository` // // repository - The repository to unstar. Cannot be nil. // // Returns a signal, which will send completed on success. If the client // is not `authenticated`, the signal will error immediately. - (RACSignal *)unstarRepository:(OCTRepository *)repository; @end
// // OCTClient+Activity.h // OctoKit // // Created by Piet Brauer on 14.02.14. // Copyright (c) 2014 GitHub. All rights reserved. // #import "OCTClient.h" @class RACSignal; @class OCTRepository; @interface OCTClient (Activity) // Check if the user starred the `repository`. // // repository - The repository used to check the starred status. Cannot be nil. // // Returns a signal, which will send a NSNumber valued @YES or @NO. // If the client is not `authenticated`, the signal will error immediately. - (RACSignal *)hasUserStarredRepository:(OCTRepository *)repository; // Star the given `repository` // // repository - The repository to star. Cannot be nil. // // Returns a signal, which will send completed on success. If the client // is not `authenticated`, the signal will error immediately. - (RACSignal *)starRepository:(OCTRepository *)repository; // Unstar the given `repository` // // repository - The repository to unstar. Cannot be nil. // // Returns a signal, which will send completed on success. If the client // is not `authenticated`, the signal will error immediately. - (RACSignal *)unstarRepository:(OCTRepository *)repository; @end
Change documentation to fit return of NSNumber
Change documentation to fit return of NSNumber
C
mit
CHNLiPeng/octokit.objc,jonesgithub/octokit.objc,cnbin/octokit.objc,leichunfeng/octokit.objc,jonesgithub/octokit.objc,cnbin/octokit.objc,CleanShavenApps/octokit.objc,Acidburn0zzz/octokit.objc,wrcj12138aaa/octokit.objc,Palleas/octokit.objc,daemonchen/octokit.objc,CHNLiPeng/octokit.objc,GroundControl-Solutions/octokit.objc,phatblat/octokit.objc,Palleas/octokit.objc,daukantas/octokit.objc,xantage/octokit.objc,wrcj12138aaa/octokit.objc,yeahdongcn/octokit.objc,leichunfeng/octokit.objc,daukantas/octokit.objc,phatblat/octokit.objc,daemonchen/octokit.objc,xantage/octokit.objc,GroundControl-Solutions/octokit.objc,Acidburn0zzz/octokit.objc
b43db0113a50f2999a6e93eaf8dbc1e6b89a60ff
Pod/Classes/BCBalancedMultilineLabel.h
Pod/Classes/BCBalancedMultilineLabel.h
#import <UIKit/UIKit.h> @interface BCBalancedMultilineLabel : UILabel @end
#import <UIKit/UIKit.h> /** * A simple label subclass that draws itself such that each of its * lines have as close to the same length as possible. It can be * used anywhere that you could use an ordinary `UILabel` by simply * changing the instantiated class. */ @interface BCBalancedMultilineLabel : UILabel @end
Add Appledoc to the header
Add Appledoc to the header
C
mit
briancroom/BCBalancedMultilineLabel
4d4804f71ce6dbfe3ad2e9a5110d516732c0ba90
src/glcontext_nsgl.h
src/glcontext_nsgl.h
/* * Copyright 2011-2016 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #ifndef BGFX_GLCONTEXT_NSGL_H_HEADER_GUARD #define BGFX_GLCONTEXT_NSGL_H_HEADER_GUARD #if BX_PLATFORM_OSX namespace bgfx { namespace gl { struct SwapChainGL; struct GlContext { GlContext() : m_context(0) { } void create(uint32_t _width, uint32_t _height); void destroy(); void resize(uint32_t _width, uint32_t _height, uint32_t _flags); uint64_t getCaps() const; SwapChainGL* createSwapChain(void* _nwh); void destroySwapChain(SwapChainGL* _swapChain); void swap(SwapChainGL* _swapChain = NULL); void makeCurrent(SwapChainGL* _swapChain = NULL); void import(); bool isValid() const { return 0 != m_context; } void* m_view; void* m_context; }; } /* namespace gl */ } // namespace bgfx #endif // BX_PLATFORM_OSX #endif // BGFX_GLCONTEXT_NSGL_H_HEADER_GUARD
/* * Copyright 2011-2016 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #ifndef BGFX_GLCONTEXT_NSGL_H_HEADER_GUARD #define BGFX_GLCONTEXT_NSGL_H_HEADER_GUARD #if BX_PLATFORM_OSX namespace bgfx { namespace gl { struct SwapChainGL; struct GlContext { GlContext() : m_context(0) , m_view(0) { } void create(uint32_t _width, uint32_t _height); void destroy(); void resize(uint32_t _width, uint32_t _height, uint32_t _flags); uint64_t getCaps() const; SwapChainGL* createSwapChain(void* _nwh); void destroySwapChain(SwapChainGL* _swapChain); void swap(SwapChainGL* _swapChain = NULL); void makeCurrent(SwapChainGL* _swapChain = NULL); void import(); bool isValid() const { return 0 != m_context; } void* m_view; void* m_context; }; } /* namespace gl */ } // namespace bgfx #endif // BX_PLATFORM_OSX #endif // BGFX_GLCONTEXT_NSGL_H_HEADER_GUARD
Set m_view to 0 in GlContext ctor
Set m_view to 0 in GlContext ctor
C
bsd-2-clause
jpcy/bgfx,andr3wmac/bgfx,mendsley/bgfx,mmicko/bgfx,jdryg/bgfx,LWJGL-CI/bgfx,jdryg/bgfx,attilaz/bgfx,emoon/bgfx,Synxis/bgfx,elmindreda/bgfx,LWJGL-CI/bgfx,andr3wmac/bgfx,Synxis/bgfx,aonorin/bgfx,kondrak/bgfx,emoon/bgfx,septag/bgfx,bkaradzic/bgfx,v3n/bgfx,jpcy/bgfx,fluffyfreak/bgfx,andr3wmac/bgfx,LWJGL-CI/bgfx,MikePopoloski/bgfx,mmicko/bgfx,v3n/bgfx,fluffyfreak/bgfx,jdryg/bgfx,jdryg/bgfx,Synxis/bgfx,kondrak/bgfx,elmindreda/bgfx,fluffyfreak/bgfx,bkaradzic/bgfx,attilaz/bgfx,0-wiz-0/bgfx,v3n/bgfx,fluffyfreak/bgfx,jpcy/bgfx,LWJGL-CI/bgfx,elmindreda/bgfx,MikePopoloski/bgfx,MikePopoloski/bgfx,0-wiz-0/bgfx,kondrak/bgfx,attilaz/bgfx,bkaradzic/bgfx,mmicko/bgfx,emoon/bgfx,mendsley/bgfx,septag/bgfx,mendsley/bgfx,aonorin/bgfx,septag/bgfx,bkaradzic/bgfx,aonorin/bgfx,jpcy/bgfx,0-wiz-0/bgfx
b3ccbaf655e28b48384a8955398d248384558b45
lottie-ios/Classes/PublicHeaders/Lottie.h
lottie-ios/Classes/PublicHeaders/Lottie.h
// // Lottie.h // Pods // // Created by brandon_withrow on 1/27/17. // // @import Foundation; #ifndef Lottie_h #define Lottie_h //! Project version number for Lottie. FOUNDATION_EXPORT double LottieVersionNumber; //! Project version string for Lottie. FOUNDATION_EXPORT const unsigned char LottieVersionString[]; #import "LOTAnimationTransitionController.h" #import "LOTAnimationView.h" #endif /* Lottie_h */
// // Lottie.h // Pods // // Created by brandon_withrow on 1/27/17. // // #if __has_feature(modules) @import Foundation; #else #import <Foundation/Foundation.h> #endif #ifndef Lottie_h #define Lottie_h //! Project version number for Lottie. FOUNDATION_EXPORT double LottieVersionNumber; //! Project version string for Lottie. FOUNDATION_EXPORT const unsigned char LottieVersionString[]; #import "LOTAnimationTransitionController.h" #import "LOTAnimationView.h" #endif /* Lottie_h */
Fix @import compatibility with .mm files
Fix @import compatibility with .mm files
C
apache-2.0
airbnb/lottie-ios,airbnb/lottie-ios,airbnb/lottie-ios
9bfa112e81a0dc6dfec4697c3f5e4014a60073bf
applications/plugins/SofaPython/PythonCommon.h
applications/plugins/SofaPython/PythonCommon.h
#ifndef SOFAPYTHON_PYTHON_H #define SOFAPYTHON_PYTHON_H // This header simply includes Python.h, taking care of platform-specific stuff // It should be included before any standard headers: // "Since Python may define some pre-processor definitions which affect the // standard headers on some systems, you must include Python.h before any // standard headers are included." #if defined(_MSC_VER) && defined(_DEBUG) // undefine _DEBUG since we want to always link agains the release version of // python and pyconfig.h automatically links debug version if _DEBUG is defined. // ocarre: no we don't, in debug on Windows we cannot link with python release, if we want to build SofaPython in debug we have to compile python in debug //# undef _DEBUG # include <Python.h> //# define _DEBUG #elif defined(__APPLE__) && defined(__MACH__) # include <Python/Python.h> #else # include <Python.h> #endif #endif
#ifndef SOFAPYTHON_PYTHON_H #define SOFAPYTHON_PYTHON_H // This header simply includes Python.h, taking care of platform-specific stuff // It should be included before any standard headers: // "Since Python may define some pre-processor definitions which affect the // standard headers on some systems, you must include Python.h before any // standard headers are included." #if defined(_WIN32) # define MS_NO_COREDLL // deactivate pragma linking on Win32 done in Python.h #endif #if defined(_MSC_VER) && defined(_DEBUG) // undefine _DEBUG since we want to always link agains the release version of // python and pyconfig.h automatically links debug version if _DEBUG is defined. // ocarre: no we don't, in debug on Windows we cannot link with python release, if we want to build SofaPython in debug we have to compile python in debug //# undef _DEBUG # include <Python.h> //# define _DEBUG #elif defined(__APPLE__) && defined(__MACH__) # include <Python/Python.h> #else # include <Python.h> #endif #endif
Disable auto linking on windows so that CMake settings are not overriden.
Disable auto linking on windows so that CMake settings are not overriden. Former-commit-id: 3e43e87772ab712bab8778502c22411288f0eb31
C
lgpl-2.1
hdeling/sofa,FabienPean/sofa,Anatoscope/sofa,FabienPean/sofa,hdeling/sofa,FabienPean/sofa,hdeling/sofa,hdeling/sofa,FabienPean/sofa,Anatoscope/sofa,FabienPean/sofa,Anatoscope/sofa,FabienPean/sofa,Anatoscope/sofa,FabienPean/sofa,Anatoscope/sofa,FabienPean/sofa,Anatoscope/sofa,hdeling/sofa,hdeling/sofa,hdeling/sofa,Anatoscope/sofa,hdeling/sofa,Anatoscope/sofa,hdeling/sofa,hdeling/sofa,FabienPean/sofa,Anatoscope/sofa,FabienPean/sofa
4aaa5c8f5777910ace7d4c65908d42f16f446c30
ProvisionQL/Shared.h
ProvisionQL/Shared.h
#include <CoreFoundation/CoreFoundation.h> #include <CoreServices/CoreServices.h> #include <QuickLook/QuickLook.h> #import <Foundation/Foundation.h> #import <Cocoa/Cocoa.h> #import <Security/Security.h> #import <NSBezierPath+IOS7RoundedRect.h> static NSString * const kPluginBundleId = @"com.FerretSyndicate.ProvisionQL"; static NSString * const kDataType_ipa = @"com.apple.itunes.ipa"; static NSString * const kDataType_app = @"com.apple.application-bundle"; static NSString * const kDataType_ios_provision = @"com.apple.mobileprovision"; static NSString * const kDataType_ios_provision_old = @"com.apple.iphone.mobileprovision"; static NSString * const kDataType_osx_provision = @"com.apple.provisionprofile"; #define SIGNED_CODE 0 NSImage *roundCorners(NSImage *image); NSImage *imageFromApp(NSURL *URL, NSString *dataType, NSString *fileName); NSString *mainIconNameForApp(NSDictionary *appPropertyList); int expirationStatus(NSDate *date, NSCalendar *calendar);
#include <CoreFoundation/CoreFoundation.h> #include <CoreServices/CoreServices.h> #include <QuickLook/QuickLook.h> #import <Foundation/Foundation.h> #import <Cocoa/Cocoa.h> #import <Security/Security.h> #import <NSBezierPath+IOS7RoundedRect.h> static NSString * const kPluginBundleId = @"com.ealeksandrov.ProvisionQL"; static NSString * const kDataType_ipa = @"com.apple.itunes.ipa"; static NSString * const kDataType_app = @"com.apple.application-bundle"; static NSString * const kDataType_ios_provision = @"com.apple.mobileprovision"; static NSString * const kDataType_ios_provision_old = @"com.apple.iphone.mobileprovision"; static NSString * const kDataType_osx_provision = @"com.apple.provisionprofile"; #define SIGNED_CODE 0 NSImage *roundCorners(NSImage *image); NSImage *imageFromApp(NSURL *URL, NSString *dataType, NSString *fileName); NSString *mainIconNameForApp(NSDictionary *appPropertyList); int expirationStatus(NSDate *date, NSCalendar *calendar);
Set bundle identifier constant to be identical to Info.plist
Set bundle identifier constant to be identical to Info.plist
C
mit
ealeksandrov/ProvisionQL,ealeksandrov/ProvisionQL,ealeksandrov/ProvisionQL
a5eb8bfdc1affa6d2330484800808c4d34f23103
ui/expandablegroup.h
ui/expandablegroup.h
#pragma once #include "uitypes.h" #include <QtWidgets/QToolButton> #include <QtCore/QParallelAnimationGroup> #include <QtWidgets/QScrollArea> #include <QtCore/QPropertyAnimation> class BINARYNINJAUIAPI ExpandableGroup : public QWidget { Q_OBJECT private: QToolButton* m_button; QParallelAnimationGroup* m_animation; QScrollArea* m_content; int m_duration = 100; private Q_SLOTS: void toggled(bool expanded); public: explicit ExpandableGroup( QLayout* contentLayout, const QString& title = "", QWidget* parent = nullptr, bool expanded = false); void setupAnimation(QLayout* contentLayout); void setTitle(const QString& title) { m_button->setText(title); } void toggle(bool expanded); };
#pragma once #include "uitypes.h" #include <QtWidgets/QLabel> #include <QtWidgets/QToolButton> #include <QtCore/QParallelAnimationGroup> #include <QtWidgets/QScrollArea> #include <QtCore/QPropertyAnimation> class BINARYNINJAUIAPI ExpandableGroup : public QWidget { Q_OBJECT private: QToolButton* m_button; QLabel* m_title; QParallelAnimationGroup* m_animation; QScrollArea* m_content; int m_duration = 100; private Q_SLOTS: void toggled(bool expanded); public: explicit ExpandableGroup(QLayout* contentLayout, const QString& title = "", QWidget* parent = nullptr, bool expanded = false); void setupAnimation(QLayout* contentLayout); void setTitle(const QString& title) { m_title->setText(title); } void toggle(bool expanded); };
Fix UI arrow artifact in Cross References and Search widgets.
Fix UI arrow artifact in Cross References and Search widgets.
C
mit
Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api
60b33a957f46e635909e45b24d5de0c242994bef
pebble/src/common.c
pebble/src/common.c
/*** * Multi Timer * Copyright © 2013 Matthew Tole * * common.c ***/ #include <pebble.h> #include "libs/xprintf.h" void uppercase(char* str) { char* point = str; while (*point != '\0') { if (*point >= 97 && *point <= 122) { *point -= 32; } point += 1; } } int patoi(char* str) { long num; xatoi(&str, &num); return (int)num; } void timer_duration_str(int duration, bool showHours, char* str, int str_len) { int hours = duration / 3600; int minutes = (duration % 3600) / 60; int seconds = (duration % 3600) % 60; if (showHours) { snprintf(str, str_len, "%02d:%02d:%02d", hours, minutes, seconds); } else { snprintf(str, str_len, "%02d:%02d", minutes, seconds); } }
/*** * Multi Timer * Copyright © 2013 Matthew Tole * * common.c ***/ #include <pebble.h> #include "libs/xprintf.h" void uppercase(char* str) { char* point = str; while (*point != '\0') { if (*point >= 97 && *point <= 122) { *point -= 32; } point += 1; } } int patoi(char* str) { long num; xatoi(&str, &num); return (int)num; } void timer_duration_str(int duration, bool showHours, char* str, int str_len) { int hours = duration / 3600; int minutes = (showHours ? (duration % 3600) : duration) / 60; int seconds = (showHours ? (duration % 3600) : duration) % 60; if (showHours) { snprintf(str, str_len, "%02d:%02d:%02d", hours, minutes, seconds); } else { snprintf(str, str_len, "%02d:%02d", minutes, seconds); } }
Fix bug in rendering of timer duration.
Fix bug in rendering of timer duration.
C
mit
ThiagoVinicius/multi-timer,sdoo12/multi-timer,sdoo12/multi-timer,ThiagoVinicius/multi-timer,smallstoneapps/multi-timer,ThiagoVinicius/multi-timer,ThiagoVinicius/multi-timer,smallstoneapps/multi-timer,smallstoneapps/multi-timer,sdoo12/multi-timer,smallstoneapps/multi-timer,smallstoneapps/multi-timer,ThiagoVinicius/multi-timer
7a6f9bd873ea97f9a5e129e5ef6cc12ea216f9cb
EnumeratorKit/Core/NSArray+EKFlatten.h
EnumeratorKit/Core/NSArray+EKFlatten.h
// // NSArray+EKFlatten.h // EnumeratorKit // // Created by Adam Sharp on 23/07/13. // Copyright (c) 2013 Adam Sharp. All rights reserved. // #import <Foundation/Foundation.h> #import "NSArray+EKEnumerable.h" /** * Extends NSArray with a single method `-flatten` to recursively * build a single-level array with all objects from all child arrays. */ @interface NSArray (EKFlatten) /** * Recursively builds a new array by adding all objects from all child * arrays. The order of children is preserved. For example: * * [@[@[@1, @2], @3] flatten] // => @[@1, @2, @3] * * and * * @[@1, @[@2, @[@3, @4]], @5, @[@6]] // => @[@1, @2, @3, @4, @5, @6] */ - (NSArray *)flatten; @end
// // NSArray+EKFlatten.h // EnumeratorKit // // Created by Adam Sharp on 23/07/13. // Copyright (c) 2013 Adam Sharp. All rights reserved. // #import <Foundation/Foundation.h> #import "NSArray+EKEnumerable.h" /** Extends NSArray with a single method `-flatten` to recursively build a single-level array with all objects from all child arrays. */ @interface NSArray (EKFlatten) /** Recursively builds a new array by adding all objects from all child arrays. The order of children is preserved. For example: [@[@[@1, @2], @3] flatten] // => @[@1, @2, @3] and @[@1, @[@2, @[@3, @4]], @5, @[@6]] // => @[@1, @2, @3, @4, @5, @6] */ - (NSArray *)flatten; @end
Improve [NSArray flatten] doc formatting
Improve [NSArray flatten] doc formatting
C
mit
sharplet/EnumeratorKit
bdde085c7d376ce0aff368249164c9ee504eba97
src/ipc/ipc.h
src/ipc/ipc.h
#ifndef IPC_H #define IPC_H #include "../process/process.h" void current_fds(proc_t *proc); #endif
#ifndef IPC_H #define IPC_H int current_fds(char *pidstr); #endif
Adjust declaration for returning int
Adjust declaration for returning int
C
mit
tijko/dashboard
c02fc5091d062d255e43bd69c419d29693b7494e
include/ActionBar.h
include/ActionBar.h
#ifndef _ACTIONBAR_H_ #define _ACTIONBAR_H_ #include <InputElement.h> #include <Command.h> #include <FWPlatform.h> class ActionBar : public Element { public: ActionBar() { } bool isA(const std::string & className) override { if (className == "ActionBar") return true; return Element::isA(className); } protected: void initialize(FWPlatform * _platform) override { Element::initialize(_platform); Command c(Command::CREATE_ACTIONBAR, getParentInternalId(), getInternalId()); sendCommand(c); } }; #endif
#ifndef _ACTIONBAR_H_ #define _ACTIONBAR_H_ #include <InputElement.h> #include <Command.h> #include <FWPlatform.h> class ActionBar : public Element { public: ActionBar() { } ActionBar(const char * _title) : title(_title) { } bool isA(const std::string & className) override { if (className == "ActionBar") return true; return Element::isA(className); } protected: void initialize(FWPlatform * _platform) override { Element::initialize(_platform); Command c(Command::CREATE_ACTIONBAR, getParentInternalId(), getInternalId()); c.setTextValue(title); sendCommand(c); } const char * title; }; #endif
Add constructor with title attached
Add constructor with title attached
C
mit
Sometrik/framework,Sometrik/framework,Sometrik/framework
63234eb83899ecedd935ecebde76e7776b59012e
Analytics/SEGAnalyticsUtils.h
Analytics/SEGAnalyticsUtils.h
// AnalyticsUtils.h // Copyright (c) 2014 Segment.io. All rights reserved. #import <Foundation/Foundation.h> #define SEGStringize_helper(x) #x #define SEGStringize(x) @SEGStringize_helper(x) NSURL *SEGAnalyticsURLForFilename(NSString *filename); // Async Utils dispatch_queue_t seg_dispatch_queue_create_specific(const char *label, dispatch_queue_attr_t attr); BOOL seg_dispatch_is_on_specific_queue(dispatch_queue_t queue); void seg_dispatch_specific(dispatch_queue_t queue, dispatch_block_t block, BOOL waitForCompletion); void seg_dispatch_specific_async(dispatch_queue_t queue, dispatch_block_t block); void seg_dispatch_specific_sync(dispatch_queue_t queue, dispatch_block_t block); // Logging void SEGSetShowDebugLogs(BOOL showDebugLogs); void SEGLog(NSString *format, ...); // JSON Utils NSDictionary *SEGCoerceDictionary(NSDictionary *dict); NSString *SEGIDFA(); NSString *SEGEventNameForScreenTitle(NSString *title);
// AnalyticsUtils.h // Copyright (c) 2014 Segment.io. All rights reserved. #import <Foundation/Foundation.h> #define SEGStringize_helper(x) #x #define SEGStringize(x) @SEGStringize_helper(x) NSURL *SEGAnalyticsURLForFilename(NSString *filename); // Async Utils dispatch_queue_t seg_dispatch_queue_create_specific(const char *label, dispatch_queue_attr_t attr); BOOL seg_dispatch_is_on_specific_queue(dispatch_queue_t queue); void seg_dispatch_specific(dispatch_queue_t queue, dispatch_block_t block, BOOL waitForCompletion); void seg_dispatch_specific_async(dispatch_queue_t queue, dispatch_block_t block); void seg_dispatch_specific_sync(dispatch_queue_t queue, dispatch_block_t block); // Logging void SEGSetShowDebugLogs(BOOL showDebugLogs); void SEGLog(NSString *format, ...); // JSON Utils NSDictionary *SEGCoerceDictionary(NSDictionary *dict); NSString *SEGIDFA(); NSString *SEGEventNameForScreenTitle(NSString *title);
Fix "No new line at end of file" warning.
Fix "No new line at end of file" warning.
C
mit
djfink-carglass/analytics-ios,graingert/analytics-ios,dbachrach/analytics-ios,string-team/analytics-ios,vinod1988/analytics-ios,jtomson-mdsol/analytics-ios,jlandon/analytics-ios,vinod1988/analytics-ios,ldiqual/analytics-ios,jonathannorris/analytics-ios,graingert/analytics-ios,ldiqual/analytics-ios,abodo-dev/analytics-ios,abodo-dev/analytics-ios,string-team/analytics-ios,cfraz89/analytics-ios,djfink-carglass/analytics-ios,cfraz89/analytics-ios,hzalaz/analytics-ios,rudywen/analytics-ios,operator/analytics-ios,operator/analytics-ios,segmentio/analytics-ios,jtomson-mdsol/analytics-ios,orta/analytics-ios,vinod1988/analytics-ios,string-team/analytics-ios,jlandon/analytics-ios,hzalaz/analytics-ios,dbachrach/analytics-ios,cfraz89/analytics-ios,orta/analytics-ios,lumoslabs/analytics-ios,hzalaz/analytics-ios,segmentio/analytics-ios,jlandon/analytics-ios,jtomson-mdsol/analytics-ios,orta/analytics-ios,jonathannorris/analytics-ios,operator/analytics-ios,dcaunt/analytics-ios,dcaunt/analytics-ios,lumoslabs/analytics-ios,rudywen/analytics-ios,rudywen/analytics-ios,dbachrach/analytics-ios,djfink-carglass/analytics-ios,dcaunt/analytics-ios,jonathannorris/analytics-ios,graingert/analytics-ios,segmentio/analytics-ios,ldiqual/analytics-ios,segmentio/analytics-ios,lumoslabs/analytics-ios,abodo-dev/analytics-ios
0124323b5e2c77ce639fe7db80e442b8db5cea96
GrizSpace/MapAnnotationList.h
GrizSpace/MapAnnotationList.h
// // MapAnnotationList.h // GrizSpace // // Created by Kevin Scott on 3/15/12. // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // #import <Foundation/Foundation.h> #import "MapAnnotation.h" @interface MapAnnotationList : NSObject { //int currentAnnotationIndex; //the currently selected annotation index } //@property (nonatomic, readwrite) bool currentAnnotationIndexSet; //used to determin if the current annotation index is set. @property (nonatomic, readwrite) NSMutableArray* myAnnotationItems; //gets the list of annotation items -(MapAnnotation*) GetNextAnnotation; //gets the next annotation item -(MapAnnotation*) GetCurrentAnnotation; //gets the current annotation item @end
// // MapAnnotationList.h // GrizSpace // // Created by Kevin Scott on 3/15/12. // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // #import <Foundation/Foundation.h> #import "MapAnnotation.h" @interface MapAnnotationList : NSObject { //int currentAnnotationIndex; //the currently selected annotation index } //@property (nonatomic, readwrite) bool currentAnnotationIndexSet; //used to determin if the current annotation index is set. @property (nonatomic, readwrite) NSMutableArray* myAnnotationItems; //gets the list of annotation items -(MapAnnotation*) GetNextAnnotation; //gets the next annotation item -(MapAnnotation*) GetCurrentAnnotation; //gets the current annotation item @end
Add space, commit to main
Add space, commit to main
C
mit
GrizSpace/GrizSpace,GrizSpace/GrizSpace
4bfb9c8913d63130dd6579a38b6969a8f75a74ee
src/cog.h
src/cog.h
//main void cog_init(); void cog_mainloop(); void cog_destroy();
//main void cog_init(); void cog_mainloop(); void cog_destroy(); //anim typedef struct cog_sprite { }cog_sprite; cog_sprite* cog_add_anim(char* animimg, int milliseconds, ...); void cog_play_anim(cog_sprite* sprite);
Test for animation which hasn't been implemented yet.
Test for animation which hasn't been implemented yet.
C
mit
df3n5/cog,df3n5/cog,df3n5/cog,df3n5/cog
8fab47ede9d17225812312c380649b06b2ee46e2
src/main/main.c
src/main/main.c
#include <stdio.h> #include <stdint.h> #if PROJECT == 1 # include "project_1.h" #else # error Unsupported project number in PROJECT macro. Valid values: 1 #endif int main(int argc, char **argv) { printf("Hello, world!\n"); # if PROJECT == 1 project_1_report(); # endif return 0; }
#include <stdio.h> #include <stdint.h> #if PROJECT == 0 # // NOTE(bja, 2017-02): Building main with no project code. #elif PROJECT == 1 # include "project_1.h" #else # error "Unsupported project number in PROJECT macro. Valid values: 0, 1" #endif int main(int argc, char **argv) { printf("Hello, world!\n"); # if PROJECT == 1 project_1_report(); # endif return 0; }
Allow building executable without any project code.
Allow building executable without any project code. Change the logic in main to allow building an executable without any project code. Testing: pass macOS: make clean; make test make clean; make project=0 test make clean; make project=1 test make clean; make project=2 test make clean; make platform=frdm project=0 all make clean; make platform=frdm project=1 all make clean; make platform=frdm project=2 all
C
mpl-2.0
bjandre/embedded-software-essentials,bjandre/embedded-software-essentials,bjandre/embedded-software-essentials
ed16ce94936816566eafad1075d5a7425f7a563e
test/SyscallsMock.h
test/SyscallsMock.h
#ifndef __EVIL_TEST_SYSCALLS_MOCK_H #define __EVIL_TEST_SYSCALLS_MOCK_H #include <gmock/gmock.h> #include <string> #include <stack> #include "os/syscalls.h" namespace evil { class SyscallsMock { private: static thread_local std::stack<SyscallsMock *> _instance_stack; public: SyscallsMock() { _instance_stack.push(this); } ~SyscallsMock() { _instance_stack.pop(); } static SyscallsMock *instance() { return _instance_stack.top(); } MOCK_METHOD2(_access, int(const char *path, int mode)); MOCK_METHOD1(_close, int(int fd)); MOCK_METHOD1(_isatty, int(int fd)); MOCK_METHOD2(_kill, int(long pid, int sig)); MOCK_METHOD3(_open, int(const char *path, int flags, int mode)); MOCK_METHOD0(_getpid, long(void)); MOCK_METHOD3(_write, ssize_t(int fd, const void *buf, size_t count)); MOCK_METHOD1(_sbrk, void *(ptrdiff_t increment)); MOCK_METHOD1(_exit, void(int exit_code)); }; } // namespace evil #endif // __EVIL_TEST_SYSCALLS_MOCK_H
#ifndef __EVIL_TEST_SYSCALLS_MOCK_H #define __EVIL_TEST_SYSCALLS_MOCK_H #include <gmock/gmock.h> #include <string> #include <stack> #include "os/syscalls.h" namespace evil { class SyscallsMock { private: static thread_local std::stack<SyscallsMock *> _instance_stack; public: SyscallsMock() { _instance_stack.push(this); } ~SyscallsMock() { _instance_stack.pop(); } static SyscallsMock *instance() { return _instance_stack.top(); } MOCK_METHOD2(_access, int(const std::string &path, int mode)); MOCK_METHOD1(_close, int(int fd)); MOCK_METHOD1(_isatty, int(int fd)); MOCK_METHOD2(_kill, int(long pid, int sig)); MOCK_METHOD3(_open, int(const std::string &path, int flags, int mode)); MOCK_METHOD0(_getpid, long(void)); MOCK_METHOD3(_write, ssize_t(int fd, const void *buf, size_t count)); MOCK_METHOD1(_sbrk, void *(ptrdiff_t increment)); MOCK_METHOD1(_exit, void(int exit_code)); }; } // namespace evil #endif // __EVIL_TEST_SYSCALLS_MOCK_H
Make mocked functions take std::string to allow == compare
Make mocked functions take std::string to allow == compare
C
mit
dextero/evilibc,dextero/evilibc,dextero/evilibc
95dd7be8d2c69dc5ff8d91a0d876f51893bdf1d2
mbc.h
mbc.h
#pragma once #include <vector> #include "types.h" class MemoryBankController { public: MemoryBankController() = delete; MemoryBankController(const std::vector<u8> &rom, std::vector<u8> &ram) : rom(rom), ram(ram) {} virtual ~MemoryBankController() {} virtual u8 get8(uint address) const = 0; virtual void set8(uint address, u8 value) = 0; enum class BankingMode { ROM, RAM }; protected: const std::vector<u8> &rom; std::vector<u8> &ram; uint active_rom_bank = 1; uint active_ram_bank = 0; bool ram_enabled = false; BankingMode banking_mode = BankingMode::ROM; }; class MBC1 final : public MemoryBankController { public: using MemoryBankController::MemoryBankController; u8 get8(uint address) const override; void set8(uint address, u8 value) override; };
#pragma once #include <vector> #include "types.h" class MemoryBankController { public: MemoryBankController() = delete; MemoryBankController(const std::vector<u8> &rom, std::vector<u8> &ram) : rom(rom), ram(ram) {} virtual ~MemoryBankController() {} virtual u8 get8(uint address) const = 0; virtual void set8(uint address, u8 value) = 0; protected: const std::vector<u8> &rom; std::vector<u8> &ram; uint active_rom_bank = 1; uint active_ram_bank = 0; bool ram_enabled = false; }; class MBC1 final : public MemoryBankController { enum class BankingMode { ROM, RAM }; BankingMode banking_mode = BankingMode::ROM; public: using MemoryBankController::MemoryBankController; u8 get8(uint address) const override; void set8(uint address, u8 value) override; };
Move BankingMode enum from base class to MBC1
MBC: Move BankingMode enum from base class to MBC1
C
mit
alastair-robertson/gameboy,alastair-robertson/gameboy,alastair-robertson/gameboy
3345e7878878529abc29a37aa18207c708c108d5
webkit/glue/plugins/ppb_private.h
webkit/glue/plugins/ppb_private.h
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ #define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ #include "ppapi/c/pp_var.h" #define PPB_PRIVATE_INTERFACE "PPB_Private;1" typedef enum _ppb_ResourceString { PPB_RESOURCE_STRING_PDF_GET_PASSWORD = 0, } PP_ResourceString; typedef struct _ppb_Private { // Returns a localized string. PP_Var (*GetLocalizedString)(PP_ResourceString string_id); } PPB_Private; #endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ #define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ #include "third_party/ppapi/c/pp_var.h" #define PPB_PRIVATE_INTERFACE "PPB_Private;1" typedef enum _ppb_ResourceString { PPB_RESOURCE_STRING_PDF_GET_PASSWORD = 0, } PP_ResourceString; typedef struct _ppb_Private { // Returns a localized string. PP_Var (*GetLocalizedString)(PP_ResourceString string_id); } PPB_Private; #endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
Add third_party/ prefix to ppapi include for checkdeps.
Add third_party/ prefix to ppapi include for checkdeps. The only users of this ppb should be inside chrome so this should work fine. TBR=jam@chromium.org Review URL: http://codereview.chromium.org/3019006 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@52766 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
ropik/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,ropik/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium,ropik/chromium,ropik/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium
e13fe9f79af4185ac245b36e9c426c7a6c3fedb2
src/jaguar_helper.h
src/jaguar_helper.h
#ifndef JAGUAR_HELPER_H_ #define JAGUAR_HELPER_H_ #include <boost/detail/endian.hpp> #include <stdint.h> #include "jaguar_api.h" #ifdef BOOST_LITTLE_ENDIAN #define htole16(x) x #define htole32(x) x #define le16toh(x) x #define le32toh(x) x #elif BOOST_BIG_ENDIAN #error big endian architectures are unsupported #else #error unknown endiannes #endif namespace jaguar { int16_t double_to_s8p8(double x); uint16_t double_to_u8p8(double x); int32_t double_to_s16p16(double x); double s8p8_to_double(int16_t x); double s16p16_to_double(int32_t x); uint32_t pack_id(uint8_t num, Manufacturer::Enum man, DeviceType::Enum type, APIClass::Enum api_class, uint8_t api_index); }; #endif
#ifndef JAGUAR_HELPER_H_ #define JAGUAR_HELPER_H_ #include <boost/detail/endian.hpp> #include <stdint.h> #include "jaguar_api.h" #ifndef __GLIBC__ # ifdef BOOST_LITTLE_ENDIAN # define htole16(x) x # define htole32(x) x # define le16toh(x) x # define le32toh(x) x # elif BOOST_BIG_ENDIAN # error big endian architectures are unsupported # else # error unknown endiannes # endif #endif namespace jaguar { int16_t double_to_s8p8(double x); uint16_t double_to_u8p8(double x); int32_t double_to_s16p16(double x); double s8p8_to_double(int16_t x); double s16p16_to_double(int32_t x); uint32_t pack_id(uint8_t num, Manufacturer::Enum man, DeviceType::Enum type, APIClass::Enum api_class, uint8_t api_index); }; #endif
Use provided byteorder convertions on GLIBC systems
Use provided byteorder convertions on GLIBC systems
C
bsd-2-clause
mkoval/jaguar,mkoval/jaguar
048a65bb19412639c3abdaded8ad6d3d10e4033e
ext/narray_ffi_c/narray_ffi.c
ext/narray_ffi_c/narray_ffi.c
#include "ruby.h" #include "narray.h" VALUE na_address(VALUE self) { struct NARRAY *ary; void * ptr; VALUE ret; GetNArray(self,ary); ptr = ary->ptr; ret = ULL2NUM( (unsigned long long int) ptr); return ret; } void Init_narray_ffi_c() { ID id; VALUE klass; id = rb_intern("NArray"); klass = rb_const_get(rb_cObject, id); rb_define_private_method(klass, "address", na_address, 0); }
#include "ruby.h" #include "narray.h" VALUE na_address(VALUE self) { struct NARRAY *ary; void * ptr; VALUE ret; GetNArray(self,ary); ptr = ary->ptr; ret = ULL2NUM( sizeof(ptr) == 4 ? (unsigned long long int) (unsigned long int) ptr : (unsigned long long int) ptr ); return ret; } void Init_narray_ffi_c() { ID id; VALUE klass; id = rb_intern("NArray"); klass = rb_const_get(rb_cObject, id); rb_define_private_method(klass, "address", na_address, 0); }
Fix nasty sign propagation bug on gcc and 32 bit architectures.
Fix nasty sign propagation bug on gcc and 32 bit architectures.
C
bsd-2-clause
Nanosim-LIG/narray-ffi,Nanosim-LIG/narray-ffi
c1464c4787ee7dcb3fc4c0fc0622cb7f336a4fe6
config.h
config.h
/* Uncomment to compile with tcpd/libwrap support. */ //#define WITH_WRAP /* Compile with database upgrading support? If disabled, mosquitto won't * automatically upgrade old database versions. */ //#define WITH_DB_UPGRADE /* Compile with memory tracking support? If disabled, mosquitto won't track * heap memory usage nor export '$SYS/broker/heap/current size', but will use * slightly less memory and CPU time. */ #define WITH_MEMORY_TRACKING
/* Uncomment to compile with tcpd/libwrap support. */ //#define WITH_WRAP /* Compile with database upgrading support? If disabled, mosquitto won't * automatically upgrade old database versions. */ //#define WITH_DB_UPGRADE /* Compile with memory tracking support? If disabled, mosquitto won't track * heap memory usage nor export '$SYS/broker/heap/current size', but will use * slightly less memory and CPU time. */ #define WITH_MEMORY_TRACKING /* Compile with the ability to upgrade from old style sqlite persistent * databases to the new mosquitto format. This means a dependency on sqlite. It * isn't needed for new installations. */ #define WITH_SQLITE_UPGRADE
Add compile option for sqlite db upgrades.
Add compile option for sqlite db upgrades.
C
bsd-3-clause
tempbottle/mosquitto,tempbottle/mosquitto,tempbottle/mosquitto,tempbottle/mosquitto,tempbottle/mosquitto
3295ea8d703c9a3f19178a38798eef5d8ee26e7c
include/core/SkMilestone.h
include/core/SkMilestone.h
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 91 #endif
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 92 #endif
Update Skia milestone to 92
Update Skia milestone to 92 Change-Id: Ic8528149f531dfa78cfb994d9e6f080a4cc3139c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393917 Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com> Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com> Auto-Submit: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
C
bsd-3-clause
aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia
d2aa84fc27c36e3cf079d99ddb25d7c602579dc3
config/config_exporter.h
config/config_exporter.h
#ifndef CONFIG_EXPORTER_H #define CONFIG_EXPORTER_H class ConfigClass; class ConfigObject; class ConfigValue; class ConfigExporter { protected: ConfigExporter(void) { } ~ConfigExporter() { } public: virtual void field(const ConfigValue *, const std::string&) = 0; virtual void object(const ConfigClass *, const ConfigObject *) = 0; virtual void value(const ConfigValue *, const std::string&) = 0; }; #endif /* !CONFIG_EXPORTER_H */
#ifndef CONFIG_EXPORTER_H #define CONFIG_EXPORTER_H class ConfigClass; class ConfigObject; class ConfigValue; class ConfigExporter { protected: ConfigExporter(void) { } virtual ~ConfigExporter() { } public: virtual void field(const ConfigValue *, const std::string&) = 0; virtual void object(const ConfigClass *, const ConfigObject *) = 0; virtual void value(const ConfigValue *, const std::string&) = 0; }; #endif /* !CONFIG_EXPORTER_H */
Fix per Noris Datum's E-Mail.
Fix per Noris Datum's E-Mail.
C
bsd-2-clause
wanproxy/wanproxy,wanproxy/wanproxy,wanproxy/wanproxy
fc7e89841372166b9f41f605e2102109d12a8bf7
config.h
config.h
#define SOCK_PATH "/var/run/devd.pipe" #define REGEX "subsystem=CDEV type=(CREATE|DESTROY) cdev=(da[0-9]+[a-z]+[0-9]?[a-z]?)"
#define SOCK_PATH "/var/run/devd.pipe" #define REGEX "subsystem=CDEV type=(CREATE|DESTROY) cdev=((da|mmcsd)[0-9]+[a-z]+[0-9]?[a-z]?)"
Support notifications for SD cards.
Support notifications for SD cards. Tweak the regular expression a bit. SD cards are using device nodes such as mmcsd0s1, so no notification would appear when we were looking for da0s1 device nodes.
C
bsd-2-clause
funglaub/devd-notifier
726f5edaf516838c22f9c8e89b7abee974a84b94
include/arch/x86/arch/types.h
include/arch/x86/arch/types.h
/* * Copyright 2014, General Dynamics C4 Systems * * This software may be distributed and modified according to the terms of * the GNU General Public License version 2. Note that NO WARRANTY is provided. * See "LICENSE_GPLv2.txt" for details. * * @TAG(GD_GPL) */ #ifndef __ARCH_TYPES_H #define __ARCH_TYPES_H #include <assert.h> #include <stdint.h> compile_assert(long_is_32bits, sizeof(unsigned long) == 4) typedef unsigned long word_t; typedef word_t vptr_t; typedef word_t paddr_t; typedef word_t pptr_t; typedef word_t cptr_t; typedef word_t dev_id_t; typedef word_t cpu_id_t; typedef word_t node_id_t; typedef word_t dom_t; /* for libsel4 headers that the kernel shares */ typedef word_t seL4_Word; typedef cptr_t seL4_CPtr; typedef uint32_t seL4_Uint32; typedef uint8_t seL4_Uint8; typedef node_id_t seL4_NodeId; typedef paddr_t seL4_PAddr; typedef dom_t seL4_Domain; #endif
/* * Copyright 2014, General Dynamics C4 Systems * * This software may be distributed and modified according to the terms of * the GNU General Public License version 2. Note that NO WARRANTY is provided. * See "LICENSE_GPLv2.txt" for details. * * @TAG(GD_GPL) */ #ifndef __ARCH_TYPES_H #define __ARCH_TYPES_H #include <config.h> #include <assert.h> #include <stdint.h> #if defined(CONFIG_ARCH_IA32) compile_assert(long_is_32bits, sizeof(unsigned long) == 4) #elif defined(CONFIG_ARCH_X86_64) compile_assert(long_is_64bits, sizeof(unsigned long) == 8) #endif typedef unsigned long word_t; typedef word_t vptr_t; typedef word_t paddr_t; typedef word_t pptr_t; typedef word_t cptr_t; typedef word_t dev_id_t; typedef word_t cpu_id_t; typedef word_t node_id_t; typedef word_t dom_t; /* for libsel4 headers that the kernel shares */ typedef word_t seL4_Word; typedef cptr_t seL4_CPtr; typedef uint32_t seL4_Uint32; typedef uint8_t seL4_Uint8; typedef node_id_t seL4_NodeId; typedef paddr_t seL4_PAddr; typedef dom_t seL4_Domain; #endif
Check size of unsigned long
x64: Check size of unsigned long
C
bsd-2-clause
cmr/seL4,cmr/seL4,cmr/seL4
82ae93830b9bd7f2e55bf20057ed5c6ce873fe94
AESTextEncryption/constants.h
AESTextEncryption/constants.h
// // constants.h // AESTextEncryption // // Created by Evgenii Neumerzhitckii on 21/02/2015. // Copyright (c) 2015 Evgenii Neumerzhitckii. All rights reserved. // #define aesCompactHeight 400 #define aesPasswordTopMargin 11 #define aesPasswordTopMargin_compact 4 #define aesMessageTopMargin 10 #define aesMessageTopMargin_compact 0 #define aesPasswordHeightMargin 40 #define aesPasswordHeightMargin_compact 30
// // Created by Evgenii Neumerzhitckii on 21/02/2015. // Copyright (c) 2015 Evgenii Neumerzhitckii. All rights reserved. // #define aesCompactHeight 400 #define aesPasswordTopMargin 11 #define aesPasswordTopMargin_compact 4 #define aesMessageTopMargin 10 #define aesMessageTopMargin_compact 0 #define aesPasswordHeightMargin 40 #define aesPasswordHeightMargin_compact 30
Add compact mode for phone landscape orientation
Add compact mode for phone landscape orientation
C
mit
evgenyneu/aes-text-encryption-ios,evgenyneu/aes-text-encryption-ios
cf3a6c448ccddcefd84cc2be5f8c8927e2e5468d
test/Driver/diagnostics.c
test/Driver/diagnostics.c
// Parse diagnostic arguments in the driver // PR12181 // RUN: !%clang -target x86_64-apple-darwin10 \ // RUN: -fsyntax-only -fzyzzybalubah \ // RUN: -Werror=unused-command-line-argument %s // RUN: !%clang -target x86_64-apple-darwin10 \ // RUN: -fsyntax-only -fzyzzybalubah -Werror %s
// Parse diagnostic arguments in the driver // PR12181 // RUN: not %clang -target x86_64-apple-darwin10 \ // RUN: -fsyntax-only -fzyzzybalubah \ // RUN: -Werror=unused-command-line-argument %s // RUN: not %clang -target x86_64-apple-darwin10 \ // RUN: -fsyntax-only -fzyzzybalubah -Werror %s
Update test case to use not tool.
Update test case to use not tool. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@152664 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
16b705020c91b938660284734afd4218a826e96b
interp.h
interp.h
#include "lorito.h" #ifndef LORITO_INTERP_H_GUARD #define LORITO_INTERP_H_GUARD Lorito_Ctx * lorito_ctx_init(Lorito_Ctx *next_ctx, Lorito_Codeseg *codeseg); Lorito_Interp * lorito_init(); int lorito_run(Lorito_Interp *interp); #endif /* LORITO_INTERP_H_GUARD */
#include "lorito.h" #ifndef LORITO_INTERP_H_GUARD #define LORITO_INTERP_H_GUARD Lorito_Ctx * lorito_ctx_init(Lorito_Ctx *next_ctx, Lorito_Codeseg *codeseg); Lorito_PMC * lorito_pmc_init(Lorito_Interp *interp, int size); Lorito_Interp * lorito_init(); int lorito_run(Lorito_Interp *interp); #endif /* LORITO_INTERP_H_GUARD */
Add lorito_pmc_init to the proper header.
Add lorito_pmc_init to the proper header.
C
artistic-2.0
atrodo/lorito,atrodo/lorito
ce0749117f31ad1052ead228acfe0ddbb431b04e
lib/CL/clSetUserEventStatus.c
lib/CL/clSetUserEventStatus.c
#include "pocl_cl.h" #include "pocl_timing.h" CL_API_ENTRY cl_int CL_API_CALL POname(clSetUserEventStatus)(cl_event event , cl_int execution_status ) CL_API_SUFFIX__VERSION_1_1 { /* Must be a valid user event */ POCL_RETURN_ERROR_COND((event == NULL), CL_INVALID_EVENT); POCL_RETURN_ERROR_COND((event->command_type != CL_COMMAND_USER), CL_INVALID_EVENT); /* Can only be set to CL_COMPLETE (0) or negative values */ POCL_RETURN_ERROR_COND((execution_status > CL_COMPLETE), CL_INVALID_VALUE); /* Can only be done once */ POCL_RETURN_ERROR_COND((event->status <= CL_COMPLETE), CL_INVALID_OPERATION); POCL_LOCK_OBJ (event); event->status = execution_status; if (execution_status == CL_COMPLETE) { pocl_broadcast (event); } POCL_UNLOCK_OBJ (event); return CL_SUCCESS; } POsym(clSetUserEventStatus)
#include "pocl_cl.h" #include "pocl_timing.h" CL_API_ENTRY cl_int CL_API_CALL POname(clSetUserEventStatus)(cl_event event , cl_int execution_status ) CL_API_SUFFIX__VERSION_1_1 { /* Must be a valid user event */ POCL_RETURN_ERROR_COND((event == NULL), CL_INVALID_EVENT); POCL_RETURN_ERROR_COND((event->command_type != CL_COMMAND_USER), CL_INVALID_EVENT); /* Can only be set to CL_COMPLETE (0) or negative values */ POCL_RETURN_ERROR_COND((execution_status > CL_COMPLETE), CL_INVALID_VALUE); /* Can only be done once */ POCL_RETURN_ERROR_COND((event->status <= CL_COMPLETE), CL_INVALID_OPERATION); POCL_LOCK_OBJ (event); event->status = execution_status; if (execution_status == CL_COMPLETE) { pocl_broadcast (event); pocl_event_updated (event, CL_COMPLETE); } POCL_UNLOCK_OBJ (event); return CL_SUCCESS; } POsym(clSetUserEventStatus)
Make sure callbacks are called for user events
Make sure callbacks are called for user events
C
mit
pocl/pocl,rjodin/pocl,franz/pocl,franz/pocl,Oblomov/pocl,pocl/pocl,Oblomov/pocl,Oblomov/pocl,Oblomov/pocl,franz/pocl,Oblomov/pocl,pocl/pocl,pocl/pocl,franz/pocl,rjodin/pocl,rjodin/pocl,pocl/pocl,franz/pocl,rjodin/pocl
f777d09f375c1206cd0cea649bd0b2c04d668bfa
lib/DebugInfo/DWARFRelocMap.h
lib/DebugInfo/DWARFRelocMap.h
//===-- DWARFRelocMap.h -----------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_DEBUGINFO_DWARFRELOCMAP_H #define LLVM_DEBUGINFO_DWARFRELOCMAP_H #include "llvm/ADT/DenseMap.h" namespace llvm { typedef DenseMap<uint64_t, std::pair<uint8_t, int64_t> > RelocAddrMap; } // namespace llvm #endif // LLVM_DEBUGINFO_DWARFRELOCMAP_H
//===-- DWARFRelocMap.h -----------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_DEBUGINFO_DWARFRELOCMAP_H #define LLVM_DEBUGINFO_DWARFRELOCMAP_H #include "llvm/ADT/DenseMap.h" namespace llvm { typedef DenseMap<uint64_t, std::pair<uint8_t, int64_t> > RelocAddrMap; } // namespace llvm #endif // LLVM_DEBUGINFO_DWARFRELOCMAP_H
Fix a warning in the new DWARFheader. Add a new line at the end of the file.
Fix a warning in the new DWARFheader. Add a new line at the end of the file. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@173518 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm
48d0c9e8bcc7b2f204eff8feef3b0fe6df0cae4f
include/types.h
include/types.h
// Machine types typedef unsigned char Byte; /* 8 bits */ typedef unsigned short SWord; /* 16 bits */ typedef unsigned int DWord; /* 32 bits */ typedef unsigned int dword; /* 32 bits */ typedef unsigned int Word; /* 32 bits */ typedef unsigned int ADDRESS; /* 32-bit unsigned */ #define STD_SIZE 32 // Standard size #define NO_ADDRESS ((ADDRESS)-1) // For invalid ADDRESSes #ifndef _MSC_VER typedef long unsigned long QWord; // 64 bits #else typedef unsigned __int64 QWord; #endif #if defined(_MSC_VER) #pragma warning(disable:4390) #endif #if defined(_MSC_VER) && _MSC_VER <= 1200 // For MSVC 5 or 6: warning about debug into truncated to 255 chars #pragma warning(disable:4786) #endif
/* * types.h: some often used basic type definitions * $Revision$ */ #ifndef __TYPES_H__ #define __TYPES_H__ // Machine types typedef unsigned char Byte; /* 8 bits */ typedef unsigned short SWord; /* 16 bits */ typedef unsigned int DWord; /* 32 bits */ typedef unsigned int dword; /* 32 bits */ typedef unsigned int Word; /* 32 bits */ typedef unsigned int ADDRESS; /* 32-bit unsigned */ #define STD_SIZE 32 // Standard size // Note: there is a known name collision with NO_ADDRESS in WinSock.h #ifdef NO_ADDRESS #undef NO_ADDRESS #endif #define NO_ADDRESS ((ADDRESS)-1) // For invalid ADDRESSes #ifndef _MSC_VER typedef long unsigned long QWord; // 64 bits #else typedef unsigned __int64 QWord; #endif #if defined(_MSC_VER) #pragma warning(disable:4390) #endif #if defined(_MSC_VER) && _MSC_VER <= 1200 // For MSVC 5 or 6: warning about debug into truncated to 255 chars #pragma warning(disable:4786) #endif #endif // #ifndef __TYPES_H__
Handle the name collision (with WinSock.h) for NO_ADDRESS
Handle the name collision (with WinSock.h) for NO_ADDRESS
C
bsd-3-clause
TambourineReindeer/boomerang,nemerle/boomerang,xujun10110/boomerang,xujun10110/boomerang,nemerle/boomerang,nemerle/boomerang,TambourineReindeer/boomerang,xujun10110/boomerang,nemerle/boomerang,xujun10110/boomerang,TambourineReindeer/boomerang,TambourineReindeer/boomerang,xujun10110/boomerang,nemerle/boomerang,nemerle/boomerang,nemerle/boomerang,xujun10110/boomerang,xujun10110/boomerang,TambourineReindeer/boomerang,TambourineReindeer/boomerang,nemerle/boomerang,xujun10110/boomerang,TambourineReindeer/boomerang,TambourineReindeer/boomerang
3ab883a6e155fb1f6a36a4fe341abb97d15994d4
src/ast/node_counter.h
src/ast/node_counter.h
#pragma once #include "bpftrace.h" #include "log.h" #include "pass_manager.h" #include "visitors.h" namespace bpftrace { namespace ast { class NodeCounter : public Visitor { public: void Visit(Node &node) { count_++; Visitor::Visit(node); } size_t get_count() { return count_; }; private: size_t count_ = 0; }; Pass CreateCounterPass() { auto fn = [](Node &n, PassContext &ctx) { NodeCounter c; c.Visit(n); auto node_count = c.get_count(); auto max = ctx.b.ast_max_nodes_; if (bt_verbose) { LOG(INFO) << "node count: " << node_count; } if (node_count >= max) { LOG(ERROR) << "node count (" << node_count << ") exceeds the limit (" << max << ")"; return PassResult::Error("node count exceeded"); } return PassResult::Success(); }; return Pass("NodeCounter", fn); } } // namespace ast } // namespace bpftrace
#pragma once #include "bpftrace.h" #include "log.h" #include "pass_manager.h" #include "visitors.h" namespace bpftrace { namespace ast { class NodeCounter : public Visitor { public: void Visit(Node &node) override { count_++; Visitor::Visit(node); } size_t get_count() { return count_; }; private: size_t count_ = 0; }; Pass CreateCounterPass() { auto fn = [](Node &n, PassContext &ctx) { NodeCounter c; c.Visit(n); auto node_count = c.get_count(); auto max = ctx.b.ast_max_nodes_; if (bt_verbose) { LOG(INFO) << "node count: " << node_count; } if (node_count >= max) { LOG(ERROR) << "node count (" << node_count << ") exceeds the limit (" << max << ")"; return PassResult::Error("node count exceeded"); } return PassResult::Success(); }; return Pass("NodeCounter", fn); } } // namespace ast } // namespace bpftrace
Add override keyword to overridden method
Add override keyword to overridden method
C
apache-2.0
iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace
b91a8ad3931b320e2c5d0b53c1481a5407d98725
src/lib/str-sanitize.c
src/lib/str-sanitize.c
/* Copyright (c) 2004 Timo Sirainen */ #include "lib.h" #include "str.h" #include "str-sanitize.h" void str_sanitize_append(string_t *dest, const char *src, size_t max_len) { const char *p; for (p = src; *p != '\0'; p++) { if ((unsigned char)*p < 32) break; } str_append_n(dest, src, (size_t)(p - src)); for (; *p != '\0' && max_len > 0; p++, max_len--) { if ((unsigned char)*p < 32) str_append_c(dest, '?'); else str_append_c(dest, *p); } if (*p != '\0') { str_truncate(dest, str_len(dest)-3); str_append(dest, "..."); } } const char *str_sanitize(const char *src, size_t max_len) { string_t *str; str = t_str_new(I_MIN(max_len, 256)); str_sanitize_append(str, src, max_len); return str_c(str); }
/* Copyright (c) 2004 Timo Sirainen */ #include "lib.h" #include "str.h" #include "str-sanitize.h" void str_sanitize_append(string_t *dest, const char *src, size_t max_len) { const char *p; for (p = src; *p != '\0'; p++) { if (((unsigned char)*p & 0x7f) < 32) break; } str_append_n(dest, src, (size_t)(p - src)); for (; *p != '\0' && max_len > 0; p++, max_len--) { if (((unsigned char)*p & 0x7f) < 32) str_append_c(dest, '?'); else str_append_c(dest, *p); } if (*p != '\0') { str_truncate(dest, str_len(dest)-3); str_append(dest, "..."); } } const char *str_sanitize(const char *src, size_t max_len) { string_t *str; str = t_str_new(I_MIN(max_len, 256)); str_sanitize_append(str, src, max_len); return str_c(str); }
Convert also 0x80..0x9f characters to '?'
Convert also 0x80..0x9f characters to '?'
C
mit
LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot
dde630e7f828d49fa7fd8e01887b4645ac7572fc
src/Magnum/Implementation/maxTextureSize.h
src/Magnum/Implementation/maxTextureSize.h
#ifndef Magnum_Implementation_maxTextureSize_h #define Magnum_Implementation_maxTextureSize_h /* This file is part of Magnum. Copyright © 2010, 2011, 2012, 2013, 2014, 2015 Vladimír Vondruš <mosra@centrum.cz> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "Magnum/OpenGL.h" namespace Magnum { namespace Implementation { GLint maxTextureSideSize(); GLint max3DTextureDepth(); GLint maxTextureArrayLayers(); GLint maxCubeMapTextureSideSize(); }} #endif
#ifndef Magnum_Implementation_maxTextureSize_h #define Magnum_Implementation_maxTextureSize_h /* This file is part of Magnum. Copyright © 2010, 2011, 2012, 2013, 2014, 2015 Vladimír Vondruš <mosra@centrum.cz> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "Magnum/OpenGL.h" namespace Magnum { namespace Implementation { GLint maxTextureSideSize(); GLint max3DTextureDepth(); #ifndef MAGNUM_TARGET_GLES2 GLint maxTextureArrayLayers(); #endif GLint maxCubeMapTextureSideSize(); }} #endif
Hide internal function declaration on ES2 builds.
Hide internal function declaration on ES2 builds. The implementation was already hidden so this is not needed too.
C
mit
DerThorsten/magnum,DerThorsten/magnum,DerThorsten/magnum,MiUishadow/magnum,MiUishadow/magnum,ashimidashajia/magnum,ashimidashajia/magnum,MiUishadow/magnum,ashimidashajia/magnum,MiUishadow/magnum,ashimidashajia/magnum,MiUishadow/magnum,DerThorsten/magnum,DerThorsten/magnum,MiUishadow/magnum,ashimidashajia/magnum
5103d9b68accfc116275636d1a6068aa14df2d33
iotests/trim.c
iotests/trim.c
#define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <pthread.h> #include <getopt.h> #include <sys/uio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <signal.h> #include "utils.h" #include "logSpeed.h" int keepRunning = 1; int main(int argc, char *argv[]) { // int index = handle_args(argc, argv); int index = 1; // signal(SIGTERM, intHandler); // signal(SIGINT, intHandler); for (size_t i = index; i < argc; i++) { int fd = open(argv[i], O_WRONLY | O_EXCL | O_DIRECT); if (fd >= 0) { size_t bdsize = blockDeviceSizeFromFD(fd); trimDevice(fd, argv[i], 0, bdsize); // only sending 1GiB for now close(fd); } else { perror("open"); } } return 0; }
#define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <pthread.h> #include <getopt.h> #include <sys/uio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <signal.h> #include "utils.h" #include "logSpeed.h" int keepRunning = 1; int main(int argc, char *argv[]) { // int index = handle_args(argc, argv); int index = 1; // signal(SIGTERM, intHandler); // signal(SIGINT, intHandler); for (size_t i = index; i < argc; i++) { int fd = open(argv[i], O_RDWR | O_EXCL | O_DIRECT ); if (fd >= 0) { size_t bdsize = blockDeviceSizeFromFD(fd); trimDevice(fd, argv[i], 0, bdsize - 512); close(fd); } else { perror("open"); } } return 0; }
Subtract one old school sector
Subtract one old school sector
C
apache-2.0
dr-who/stutools,dr-who/stutools