commit
stringlengths
40
40
old_file
stringlengths
4
112
new_file
stringlengths
4
112
old_contents
stringlengths
0
2.05k
new_contents
stringlengths
28
3.9k
subject
stringlengths
17
736
message
stringlengths
18
4.78k
lang
stringclasses
1 value
license
stringclasses
13 values
repos
stringlengths
7
111k
d5105abdf717676f4801fb5e31c7cb0f62f11eab
src/utils/cuda_helper.h
src/utils/cuda_helper.h
#ifndef SRC_UTILS_CUDA_HELPER_H_ #define SRC_UTILS_CUDA_HELPER_H_ #include <cuda.h> #include <cuda_runtime.h> #include <iostream> #include <stdexcept> static void HandleError(cudaError_t error, const char *file, int line) { if (error != cudaSuccess) { printf("%s in %s at line %d\n", cudaGetErrorString(error), file, line); throw std::runtime_error(cudaGetErrorString(error)); } } #define HANDLE_ERROR(error) (HandleError(error, __FILE__, __LINE__)) #define HANDLE_NULL(a) \ { \ if (a == NULL) \ { \ printf("Host memory failed in %s at line %d\n", __FILE__, __LINE__); \ exit(EXIT_FAILURE); \ } \ } #endif // SRC_UTILS_CUDA_HELPER_H_
#ifndef SRC_UTILS_CUDA_HELPER_H_ #define SRC_UTILS_CUDA_HELPER_H_ #include <cuda.h> #include <cuda_runtime.h> #include <iostream> #include <stdexcept> #define HANDLE_ERROR(error) \ { \ if (error != cudaSuccess) \ { \ printf("%s in %s at line %d\n", cudaGetErrorString(error), __FILE__, \ __LINE__); \ throw std::runtime_error(cudaGetErrorString(error)); \ } \ } #define HANDLE_NULL(a) \ { \ if (a == NULL) \ { \ printf("Host memory failed in %s at line %d\n", __FILE__, __LINE__); \ exit(EXIT_FAILURE); \ } \ } #endif // SRC_UTILS_CUDA_HELPER_H_
Move static function into macro to circumvent unused function waringn-erros.
Move static function into macro to circumvent unused function waringn-erros.
C
mit
Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller
76e0a594de107adf654bf8b13a6bcc1480d05184
include/lomse_version.h
include/lomse_version.h
//--------------------------------------------------------------------------------------- // This file is part of the Lomse library. // Do not alter layout. Will affect CMakeLists.txt data extraction code // // | All values aligned here #define LOMSE_VERSION_MAJOR 0 #define LOMSE_VERSION_MINOR 16 #define LOMSE_VERSION_TYPE ' ' #define LOMSE_VERSION_PATCH 2 #define LOMSE_VERSION_REVNO 134 #define LOMSE_VERSION_DATE "2016-01-25 12:41:25 +01:00"
//--------------------------------------------------------------------------------------- // This file is part of the Lomse library. // Do not alter layout. Will affect CMakeLists.txt data extraction code // // | All values aligned here #define LOMSE_VERSION_MAJOR 0 #define LOMSE_VERSION_MINOR 16 #define LOMSE_VERSION_TYPE ' ' #define LOMSE_VERSION_PATCH 2 #define LOMSE_VERSION_REVNO 139 #define LOMSE_VERSION_DATE "2016-01-25 13:59:34 +01:00"
Update revno in config file
Update revno in config file
C
mit
lenmus/lomse,lenmus/lomse,lenmus/lomse
54a079f94107a1ad655ee0cb3314eb76c90f09c0
check/tests/check_check_main.c
check/tests/check_check_main.c
#include <stdlib.h> #include <stdio.h> #include <check.h> #include "check_check.h" int main (void) { int n; SRunner *sr; fork_setup(); setup_fixture(); sr = srunner_create (make_master_suite()); srunner_add_suite(sr, make_list_suite()); srunner_add_suite(sr, make_msg_suite()); srunner_add_suite(sr, make_log_suite()); srunner_add_suite(sr, make_limit_suite()); srunner_add_suite(sr, make_fork_suite()); srunner_add_suite(sr, make_fixture_suite()); srunner_add_suite(sr, make_pack_suite()); setup(); printf ("Ran %d tests in subordinate suite\n", sub_nfailed); srunner_run_all (sr, CK_NORMAL); cleanup(); fork_teardown(); teardown_fixture(); n = srunner_ntests_failed(sr); srunner_free(sr); return (n == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
#include <stdlib.h> #include <stdio.h> #include <check.h> #include "check_check.h" int main (void) { int n; SRunner *sr; fork_setup(); setup_fixture(); sr = srunner_create (make_master_suite()); srunner_add_suite(sr, make_list_suite()); srunner_add_suite(sr, make_msg_suite()); srunner_add_suite(sr, make_log_suite()); srunner_add_suite(sr, make_limit_suite()); srunner_add_suite(sr, make_fork_suite()); srunner_add_suite(sr, make_fixture_suite()); srunner_add_suite(sr, make_pack_suite()); setup(); printf ("Ran %d tests in subordinate suite\n", sub_ntests); srunner_run_all (sr, CK_NORMAL); cleanup(); fork_teardown(); teardown_fixture(); n = srunner_ntests_failed(sr); srunner_free(sr); return (n == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
Use correct variable for number of tests
Use correct variable for number of tests git-svn-id: ae38cf1093b87151f738d2b2220cac7742ad2e55@230 64e312b2-a51f-0410-8e61-82d0ca0eb02a
C
lgpl-2.1
lubosz/check,lubosz/check,lubosz/check,lubosz/check
e60f388234367f69c295b2b291d7339eb9cac7b7
inline_dbg_lbl.c
inline_dbg_lbl.c
// ucc -g tim.c _Noreturn void abort() { __builtin_unreachable(); } void realloc() { int local = 5; abort(); }
Debug label inline function bug
Debug label inline function bug
C
mit
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
d697806b15a0bb6158146f545554d8aa6ffcadc9
src/powerman.c
src/powerman.c
/*! \file * \\brief This file is for later use for power management functions as we see fit for them. * May not even use at all. */ //test test
/*! \file * \\brief This file is for later use for power management functions as we see fit for them. * May not even use at all. */
Revert "added testing comment for testing!"
Revert "added testing comment for testing!" This reverts commit ffc29b89462973571224e523eaf0c69fef88b1f2.
C
bsd-2-clause
bplainia/galaxyLightingSystem,bplainia/galaxyLightingSystem,bplainia/galaxyLightingSystem,bplainia/galaxyLightingSystem,bplainia/galaxyLightingSystem
7788edff9108cafc593759e9e406d6da6509c799
test/tstnmem.c
test/tstnmem.c
/* * Copyright (c) 2002-2004, Index Data * See the file LICENSE for details. * * $Id: tstnmem.c,v 1.2 2004-09-29 20:15:48 adam Exp $ */ #if HAVE_CONFIG_H #include <config.h> #endif #include <errno.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <yaz/nmem.h> int main (int argc, char **argv) { void *cp; NMEM n; int j; nmem_init(); n = nmem_create(); if (!n) exit (1); for (j = 1; j<500; j++) { cp = nmem_malloc(n, j); if (!cp) exit(2); } for (j = 2000; j<20000; j+= 2000) { cp = nmem_malloc(n, j); if (!cp) exit(3); } nmem_destroy(n); nmem_exit(); exit(0); }
/* * Copyright (c) 2002-2004, Index Data * See the file LICENSE for details. * * $Id: tstnmem.c,v 1.3 2005-01-05 10:29:42 adam Exp $ */ #if HAVE_CONFIG_H #include <config.h> #endif #include <errno.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <yaz/nmem.h> int main (int argc, char **argv) { void *cp; NMEM n; int j; nmem_init(); n = nmem_create(); if (!n) exit (1); for (j = 1; j<500; j++) { cp = nmem_malloc(n, j); if (!cp) exit(2); if (sizeof(long) >= j) *(long*) cp = 123L; #if HAVE_LONG_LONG if (sizeof(long long) >= j) *(long long*) cp = 123L; #endif if (sizeof(double) >= j) *(double*) cp = 12.2; } for (j = 2000; j<20000; j+= 2000) { cp = nmem_malloc(n, j); if (!cp) exit(3); } nmem_destroy(n); nmem_exit(); exit(0); }
Check that assignments to NMEM memory for some basic types
Check that assignments to NMEM memory for some basic types
C
bsd-3-clause
dcrossleyau/yaz,nla/yaz,dcrossleyau/yaz,nla/yaz,nla/yaz,dcrossleyau/yaz,nla/yaz
e7deadc8985652879ec54c0943d6b396eba60598
libmultipath/defaults.h
libmultipath/defaults.h
#define DEFAULT_GETUID "/lib/udev/scsi_id --whitelisted --device=/dev/%n" #define DEFAULT_UDEVDIR "/dev" #define DEFAULT_MULTIPATHDIR "/" LIB_STRING "/multipath" #define DEFAULT_SELECTOR "round-robin 0" #define DEFAULT_ALIAS_PREFIX "mpath" #define DEFAULT_FEATURES "0" #define DEFAULT_HWHANDLER "0" #define DEFAULT_MINIO 1000 #define DEFAULT_MINIO_RQ 1 #define DEFAULT_PGPOLICY FAILOVER #define DEFAULT_FAILBACK -FAILBACK_MANUAL #define DEFAULT_RR_WEIGHT RR_WEIGHT_NONE #define DEFAULT_NO_PATH_RETRY NO_PATH_RETRY_UNDEF #define DEFAULT_PGTIMEOUT -PGTIMEOUT_NONE #define DEFAULT_USER_FRIENDLY_NAMES 0 #define DEFAULT_VERBOSITY 2 #define DEFAULT_CHECKINT 5 #define MAX_CHECKINT(a) (a << 2) #define DEFAULT_PIDFILE "/var/run/multipathd.pid" #define DEFAULT_SOCKET "/var/run/multipathd.sock" #define DEFAULT_CONFIGFILE "/etc/multipath.conf" #define DEFAULT_BINDINGS_FILE "/etc/multipath/bindings" char * set_default (char * str);
#define DEFAULT_GETUID "/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/%n" #define DEFAULT_UDEVDIR "/dev" #define DEFAULT_MULTIPATHDIR "/" LIB_STRING "/multipath" #define DEFAULT_SELECTOR "round-robin 0" #define DEFAULT_ALIAS_PREFIX "mpath" #define DEFAULT_FEATURES "0" #define DEFAULT_HWHANDLER "0" #define DEFAULT_MINIO 1000 #define DEFAULT_MINIO_RQ 1 #define DEFAULT_PGPOLICY FAILOVER #define DEFAULT_FAILBACK -FAILBACK_MANUAL #define DEFAULT_RR_WEIGHT RR_WEIGHT_NONE #define DEFAULT_NO_PATH_RETRY NO_PATH_RETRY_UNDEF #define DEFAULT_PGTIMEOUT -PGTIMEOUT_NONE #define DEFAULT_USER_FRIENDLY_NAMES 0 #define DEFAULT_VERBOSITY 2 #define DEFAULT_CHECKINT 5 #define MAX_CHECKINT(a) (a << 2) #define DEFAULT_PIDFILE "/var/run/multipathd.pid" #define DEFAULT_SOCKET "/var/run/multipathd.sock" #define DEFAULT_CONFIGFILE "/etc/multipath.conf" #define DEFAULT_BINDINGS_FILE "/etc/multipath/bindings" char * set_default (char * str);
Use '--replace-whitespace' option for scsi_id
Use '--replace-whitespace' option for scsi_id Some SCSI devices will return an identifier with spaces in it. As we're using this name as the default device-mapper name we should be reformatting it to replace all spaces with underscores so as not to confuse device-mapper. References: bnc#572209 Signed-off-by: Hannes Reinecke <[email protected]>
C
lgpl-2.1
vijaychauhan/multipath-tools,unakatsuo/multipath-tools,unakatsuo/multipath-tools,vijaychauhan/multipath-tools,unakatsuo/multipath-tools
8ef343ed77f1b614d859fee967741f951b59943f
lily_vm.c
lily_vm.c
#include "lily_impl.h" #include "lily_symtab.h" #include "lily_opcode.h" static void builtin_print(lily_symbol *s) { if (s->val_type == vt_str) lily_impl_send_html(((lily_strval *)s->sym_value)->str); } void lily_vm_execute(lily_symbol *sym) { lily_symbol **regs; int *code, ci; regs = lily_impl_malloc(8 * sizeof(lily_symbol *)); code = sym->code_data->code; ci = 0; while (1) { switch (code[ci]) { case o_load_reg: regs[code[ci+1]] = (lily_symbol *)code[ci+2]; ci += 3; break; case o_builtin_print: builtin_print(regs[code[ci+1]]); ci += 2; case o_assign: regs[code[ci]]->sym_value = (void *)code[ci+1]; regs[code[ci]]->val_type = (lily_val_type)code[ci+2]; ci += 3; case o_vm_return: free(regs); return; } } }
#include "lily_impl.h" #include "lily_symtab.h" #include "lily_opcode.h" static void builtin_print(lily_symbol *s) { if (s->val_type == vt_str) lily_impl_send_html(((lily_strval *)s->sym_value)->str); } void lily_vm_execute(lily_symbol *sym) { lily_symbol **regs; int *code, ci; regs = lily_impl_malloc(8 * sizeof(lily_symbol *)); code = sym->code_data->code; ci = 0; while (1) { switch (code[ci]) { case o_load_reg: regs[code[ci+1]] = (lily_symbol *)code[ci+2]; ci += 3; break; case o_builtin_print: builtin_print(regs[code[ci+1]]); ci += 2; break; case o_assign: regs[code[ci]]->sym_value = (void *)code[ci+1]; regs[code[ci]]->val_type = (lily_val_type)code[ci+2]; ci += 3; break; case o_vm_return: free(regs); return; } } }
Fix o_builtin_print and o_assign cases not breaking.
vm: Fix o_builtin_print and o_assign cases not breaking. This was causing the hello_world.ly test to segfault.
C
mit
crasm/lily,crasm/lily,crasm/lily,boardwalk/lily,boardwalk/lily
09eb6e7c2599f2deee888c751e7f547d7c64ce13
test/CFrontend/2007-05-07-NestedStructReturn.c
test/CFrontend/2007-05-07-NestedStructReturn.c
// RUN: %llvmgcc %s -S -fnested-functions -o - | grep {sret *%agg.result} struct X { int m, n, o, p; }; struct X p(int n) { struct X c(int m) { struct X x; x.m = m; x.n = n; return x; } return c(n); }
// RUN: %llvmgcc %s -S -fnested-functions -o - | grep {sret *%agg.result} struct X { long m, n, o, p; }; struct X p(int n) { struct X c(int m) { struct X x; x.m = m; x.n = n; return x; } return c(n); }
Make the struct bigger, to ensure it is returned by struct return.
Make the struct bigger, to ensure it is returned by struct return. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@50037 91177308-0d34-0410-b5e6-96231b3b80d8
C
bsd-2-clause
chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm
8ba15da9e2b2bc104a1ffec542aca9086369202b
tests/regression/36-octapron/34-large-bigint.c
tests/regression/36-octapron/34-large-bigint.c
// SKIP PARAM: --sets ana.activated[+] octApron #include <assert.h> void main() { // requires bigint, not int64 unsigned long long x, y, z; if (x < y && y < z) { assert(x < y); assert(y < z); assert(x < z); if (18446744073709551612ull <= x && z <= 18446744073709551615ull) { assert(18446744073709551612ull <= x); assert(x <= 18446744073709551613ull); assert(18446744073709551613ull <= y); assert(y <= 18446744073709551614ull); assert(18446744073709551614ull <= z); assert(z <= 18446744073709551615ull); assert(x >= x - x); // avoid base from answering to check if octApron doesn't say x == -3 assert(y >= y - y); // avoid base from answering to check if octApron doesn't say y == -3 assert(z >= z - z); // avoid base from answering to check if octApron doesn't say z == -3 } } }
Add octApron test where bigint is required
Add octApron test where bigint is required
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
66dd652a48418ecdd7ed24fc8f9aa76918e94473
src/liborbit/orbit_platforms.h
src/liborbit/orbit_platforms.h
// // orbit_platforms.h // OrbitVM // // Created by Cesar Parent on 2016-11-14. // Copyright © 2016 cesarparent. All rights reserved. // #ifndef OrbitPlatforms_h #define OrbitPlatforms_h #if __STDC_VERSION__ >= 199901L #define ORBIT_FLEXIBLE_ARRAY_MEMB #else #define ORBIT_FLEXIBLE_ARRRAY_MEMB 0 #endif #endif /* OrbitPlatforms_h */
// // orbit_platforms.h // OrbitVM // // Created by Cesar Parent on 2016-11-14. // Copyright © 2016 cesarparent. All rights reserved. // #ifndef OrbitPlatforms_h #define OrbitPlatforms_h #ifdef _WIN32 #define ORBIT_PLATFORM "Windows" #elif __APPLE__ #include "TargetConditionals.h" #if TARGET_IPHONE_SIMULATOR #define ORBIT_PLATFORM "iOS-x86" #elif TARGET_OS_IPHONE #define ORBIT_PLATFORM "iOS-arm" #elif TARGET_OS_MAC #define ORBIT_PLATFORM "macOS" #endif #elif __linux__ #define ORBIT_PLATFORM "Linux" #elif __unix__ #define ORBIT_PLATFORM "UNIX" #else #define ORBIT_PLATFORM "Unknown Platform" #endif #if __STDC_VERSION__ >= 199901L #define ORBIT_FLEXIBLE_ARRAY_MEMB #else #define ORBIT_FLEXIBLE_ARRRAY_MEMB 0 #endif #endif /* OrbitPlatforms_h */
Add platform names in orbit_platform.h
Add platform names in orbit_platform.h
C
mit
amyinorbit/orbitvm,amyinorbit/orbitvm,amyinorbit/orbitvm,cesarparent/orbitvm,cesarparent/orbitvm
e78f945e54fe4d6fb4ee5a0ac6eeb1a9d724e9b1
vm/capi/defines.h
vm/capi/defines.h
/* Stub file provided for C extensions that expect it. All regular * defines and prototypes are in ruby.h */ #define RUBY /* These are defines directly related to MRI C-API symbols that the * mkmf.rb discovery code (e.g. have_func("rb_str_set_len")) would * attempt to find by linking against libruby. Rubinius does not * have an appropriate lib to link against, so we are adding these * explicit defines for now. */ #define HAVE_RB_STR_SET_LEN
/* Stub file provided for C extensions that expect it. All regular * defines and prototypes are in ruby.h */ #define RUBY /* These are defines directly related to MRI C-API symbols that the * mkmf.rb discovery code (e.g. have_func("rb_str_set_len")) would * attempt to find by linking against libruby. Rubinius does not * have an appropriate lib to link against, so we are adding these * explicit defines for now. */ #define HAVE_RB_STR_SET_LEN #define HAVE_RB_DEFINE_ALLOC_FUNC
Define HAVE_RB_DEFINE_ALLOC_FUNC for postgres gem.
Define HAVE_RB_DEFINE_ALLOC_FUNC for postgres gem.
C
mpl-2.0
digitalextremist/rubinius,kachick/rubinius,kachick/rubinius,jsyeo/rubinius,Wirachmat/rubinius,lgierth/rubinius,dblock/rubinius,Wirachmat/rubinius,slawosz/rubinius,lgierth/rubinius,kachick/rubinius,jsyeo/rubinius,sferik/rubinius,lgierth/rubinius,jemc/rubinius,Azizou/rubinius,ruipserra/rubinius,dblock/rubinius,ruipserra/rubinius,jemc/rubinius,travis-repos/rubinius,pH14/rubinius,jsyeo/rubinius,benlovell/rubinius,mlarraz/rubinius,ruipserra/rubinius,lgierth/rubinius,sferik/rubinius,travis-repos/rubinius,slawosz/rubinius,ngpestelos/rubinius,jemc/rubinius,mlarraz/rubinius,mlarraz/rubinius,ngpestelos/rubinius,ngpestelos/rubinius,digitalextremist/rubinius,dblock/rubinius,dblock/rubinius,pH14/rubinius,sferik/rubinius,heftig/rubinius,dblock/rubinius,jemc/rubinius,jemc/rubinius,benlovell/rubinius,slawosz/rubinius,mlarraz/rubinius,Wirachmat/rubinius,digitalextremist/rubinius,ruipserra/rubinius,Wirachmat/rubinius,heftig/rubinius,ngpestelos/rubinius,Azizou/rubinius,Azizou/rubinius,pH14/rubinius,jsyeo/rubinius,ruipserra/rubinius,Wirachmat/rubinius,pH14/rubinius,kachick/rubinius,heftig/rubinius,pH14/rubinius,dblock/rubinius,kachick/rubinius,heftig/rubinius,Azizou/rubinius,kachick/rubinius,lgierth/rubinius,kachick/rubinius,sferik/rubinius,pH14/rubinius,heftig/rubinius,heftig/rubinius,travis-repos/rubinius,benlovell/rubinius,benlovell/rubinius,Wirachmat/rubinius,pH14/rubinius,sferik/rubinius,mlarraz/rubinius,jsyeo/rubinius,digitalextremist/rubinius,kachick/rubinius,dblock/rubinius,mlarraz/rubinius,travis-repos/rubinius,mlarraz/rubinius,ngpestelos/rubinius,slawosz/rubinius,ngpestelos/rubinius,lgierth/rubinius,slawosz/rubinius,jemc/rubinius,ruipserra/rubinius,jemc/rubinius,slawosz/rubinius,digitalextremist/rubinius,benlovell/rubinius,heftig/rubinius,digitalextremist/rubinius,jsyeo/rubinius,sferik/rubinius,ruipserra/rubinius,sferik/rubinius,Azizou/rubinius,digitalextremist/rubinius,benlovell/rubinius,benlovell/rubinius,slawosz/rubinius,travis-repos/rubinius,Azizou/rubinius,travis-repos/rubinius,Wirachmat/rubinius,lgierth/rubinius,ngpestelos/rubinius,Azizou/rubinius,jsyeo/rubinius,travis-repos/rubinius
7cadae9b8de07afaec308fb6b11d299cac1a67bc
macros.h
macros.h
#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 6 #define ACQUIRE_IMAGE_PIXELS(im, x, y, w, h, ex) ({ \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \ AcquireImagePixels(im, x, y, w, h, ex); \ _Pragma("GCC diagnostic pop") \ }) #else #define ACQUIRE_IMAGE_PIXELS(im, x, y, w, h, ex) AcquireImagePixels(im, x, y, w, h, ex) #endif
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ > 4) #define ACQUIRE_IMAGE_PIXELS(im, x, y, w, h, ex) ({ \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \ AcquireImagePixels(im, x, y, w, h, ex); \ _Pragma("GCC diagnostic pop") \ }) #else #define ACQUIRE_IMAGE_PIXELS(im, x, y, w, h, ex) AcquireImagePixels(im, x, y, w, h, ex) #endif
Fix warnings building with GCC 5
Fix warnings building with GCC 5
C
mit
rainycape/magick,rainycape/magick,rainycape/magick
8145f404c1628880a393a1422051aa4235ed2e0d
WordPressCom-Stats-iOS/StatsSection.h
WordPressCom-Stats-iOS/StatsSection.h
typedef NS_ENUM(NSInteger, StatsSection) { StatsSectionGraph, StatsSectionPeriodHeader, StatsSectionEvents, StatsSectionPosts, StatsSectionReferrers, StatsSectionClicks, StatsSectionCountry, StatsSectionVideos, StatsSectionComments, StatsSectionTagsCategories, StatsSectionFollowers, StatsSectionPublicize, StatsSectionWebVersion }; typedef NS_ENUM(NSInteger, StatsSubSection) { StatsSubSectionCommentsByAuthor = 100, StatsSubSectionCommentsByPosts, StatsSubSectionFollowersDotCom, StatsSubSectionFollowersEmail, StatsSubSectionNone };
typedef NS_ENUM(NSInteger, StatsSection) { StatsSectionGraph, StatsSectionPeriodHeader, StatsSectionEvents, StatsSectionPosts, StatsSectionReferrers, StatsSectionClicks, StatsSectionCountry, StatsSectionVideos, StatsSectionAuthors, StatsSectionSearchTerms, StatsSectionComments, StatsSectionTagsCategories, StatsSectionFollowers, StatsSectionPublicize, StatsSectionWebVersion }; typedef NS_ENUM(NSInteger, StatsSubSection) { StatsSubSectionCommentsByAuthor = 100, StatsSubSectionCommentsByPosts, StatsSubSectionFollowersDotCom, StatsSubSectionFollowersEmail, StatsSubSectionNone };
Add search terms and authors section to enum
Add search terms and authors section to enum
C
mit
wordpress-mobile/WordPressCom-Stats-iOS,wordpress-mobile/WordPressCom-Stats-iOS
580cc435808f83633892f76abb4147c16f6cf810
You-QueryEngine/internal/task_graph.h
You-QueryEngine/internal/task_graph.h
/// \file task_graph.h /// Defines the TaskGraph class /// \author A0112054Y #pragma once #ifndef YOU_QUERYENGINE_INTERNAL_TASK_GRAPH_H_ #define YOU_QUERYENGINE_INTERNAL_TASK_GRAPH_H_ #include <vector> #include "../api.h" namespace You { namespace QueryEngine { namespace Internal { /// Defines the task dependency graph class TaskGraph { }; } // namespace Internal } // namespace QueryEngine } // namespace You #endif // YOU_QUERYENGINE_INTERNAL_TASK_GRAPH_H_
Add the stub for task graph
Add the stub for task graph
C
mit
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
72abb169d78b014b41c2471936f7891832c38fdb
src/tests/marquise_hash_test.c
src/tests/marquise_hash_test.c
#include <glib.h> #include <stdlib.h> #include <string.h> #include "../marquise.h" void test_hash_identifier() { const char *id = "hostname:fe1.example.com,metric:BytesUsed,service:memory,"; size_t id_len = strlen(id); uint64_t address = marquise_hash_identifier((const unsigned char*) id, id_len); g_assert_cmpint(address, ==, 7602883380529707052); } int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); g_test_add_func("/marquise_hash_identifier/hash", test_hash_identifier); return g_test_run(); }
#include <glib.h> #include <stdlib.h> #include <string.h> #include "../marquise.h" void test_hash_identifier() { const char *id = "hostname:fe1.example.com,metric:BytesUsed,service:memory,"; size_t id_len = strlen(id); uint64_t address = marquise_hash_identifier((const unsigned char*) id, id_len); g_assert_cmpint(address, ==, 7602883380529707052); } void test_hash_clear_lsb() { const char *id = "bytes:tx,collection_point:syd1,ip:110.173.152.33,"; size_t id_len = strlen(id); uint64_t address = marquise_hash_identifier((const unsigned char*) id, id_len); g_assert_cmpint(address, ==, -8873247187777138600); } int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); g_test_add_func("/marquise_hash_identifier/hash", test_hash_identifier); g_test_add_func("/marquise_hash_identifier/clear_lsb", test_hash_clear_lsb); return g_test_run(); }
Add test for LSB-clearing in marquise_hash_identifier
Add test for LSB-clearing in marquise_hash_identifier
C
bsd-3-clause
anchor/libmarquise,anchor/libmarquise
c5086f08be3c610fd97b541b9d61c1cdfb1f9637
test/CodeCompletion/preamble.c
test/CodeCompletion/preamble.c
#include "some_struct.h" void foo() { struct X x; x. // RUN: CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:4:5 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s // CHECK-CC1: FieldDecl:{ResultType int}{TypedText m} (35) (parent: StructDecl 'X')
#include "some_struct.h" void foo() { struct X x; x. // RUN: env CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:4:5 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s // CHECK-CC1: FieldDecl:{ResultType int}{TypedText m} (35) (parent: StructDecl 'X')
Add 'env' in hopes of making this test pass on Windows.
Add 'env' in hopes of making this test pass on Windows. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@154785 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
5e2039ff24433d469ff05f9517dad1ccacabbd6f
polygon.h
polygon.h
/** Author : Paul TREHIOU & Victor SENE * Date : November 2014 **/ #include <stdlib.h> #include <stdio.h> /** * Declaration Point structure * x - real wich is the abscisse of the point * y - real wich is the ordinate of the point */ typedef struct { double x; double y; }Point; /** * Declaration of the Element structure * value - value of the point of the current element of the polygon * next - pointer on the next element * previous - pointer on the previous element */ typedef struct pointelem{ Point value; struct pointelem* next; struct pointelem* previous; }PointElement; /** * Declaration of the Polygon */ typedef struct { PointElement* head; int size; }Polygon; /** * Function wich create a point with a specified abscisse and ordinate * abscisse - real * ordinate - real * return a new point */ Point createPoint(double abscisse, double ordinate); /** * Function wich create a new empty Polygon * return the new empty polygon */ Polygon createPolygon(); /** * Function wich add a point at the end of an existing polygon * inpoly - Polygon * inpoint - Point * return a new polygon */ Polygon addPoint(Polygon inpoly, Point inpoint);
/** Author : Paul TREHIOU & Victor SENE * Date : November 2014 **/ #include <stdlib.h> #include <stdio.h> /** * Declaration Point structure * x - real wich is the abscisse of the point * y - real wich is the ordinate of the point */ typedef struct { double x; double y; }Point; /** * Declaration of the Element structure * value - value of the point of the current element of the polygon * next - pointer on the next element * previous - pointer on the previous element */ typedef struct pointelem{ Point value; struct pointelem* next; struct pointelem* previous; }PointElement; /** * Declaration of the Polygon */ typedef struct { PointElement* head; int size; }Polygon; /** * Function wich create a point with a specified abscisse and ordinate * abscisse - real * ordinate - real * return a new point */ Point createPoint(double abscisse, double ordinate); /** * Function wich create a new empty Polygon * return the new empty polygon */ Polygon createPolygon(); /** * Function wich add a point at the end of an existing polygon * inpoly - Polygon * inpoint - Point * return a new polygon */ Polygon addPoint(Polygon inpoly, Point inpoint); /** * Function wich remove a point at a given place in an existing polygon * inpoly - Polygon * index - int * return a new polygon */ Polygon removePoint(Polygon inpoly, int index);
Add the prototype for removePoint
Add the prototype for removePoint
C
mit
UTBroM/GeometricLib
149fb0729d1136bbad077be0d1e29fe47c4e22ab
webkit/glue/webkit_constants.h
webkit/glue/webkit_constants.h
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ #define WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ namespace webkit_glue { // Chromium sets the minimum interval timeout to 4ms, overriding the // default of 10ms. We'd like to go lower, however there are poorly // coded websites out there which do create CPU-spinning loops. Using // 4ms prevents the CPU from spinning too busily and provides a balance // between CPU spinning and the smallest possible interval timer. const double kForegroundTabTimerInterval = 0.004; // Provides control over the minimum timer interval for background tabs. const double kBackgroundTabTimerInterval = 1.0; } // namespace webkit_glue #endif // WEBKIT_GLUE_WEBKIT_CONSTANTS_H_
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ #define WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ namespace webkit_glue { // Chromium sets the minimum interval timeout to 4ms, overriding the // default of 10ms. We'd like to go lower, however there are poorly // coded websites out there which do create CPU-spinning loops. Using // 4ms prevents the CPU from spinning too busily and provides a balance // between CPU spinning and the smallest possible interval timer. const double kForegroundTabTimerInterval = 0.004; // Provides control over the minimum timer interval for background tabs. const double kBackgroundTabTimerInterval = 0.004; } // namespace webkit_glue #endif // WEBKIT_GLUE_WEBKIT_CONSTANTS_H_
Revert 75430 because it's causing failures in dom_checker_tests. : Increase the minimum interval for timers on background tabs to reduce their CPU consumption.
Revert 75430 because it's causing failures in dom_checker_tests. : Increase the minimum interval for timers on background tabs to reduce their CPU consumption. The new interval is 1000 ms, or once per second. We can easily adjust this value up or down, but this seems like a reasonable value to judge the compatibility impact of this change. BUG=66078 TEST=none (tested manually with minimal test case) Review URL: http://codereview.chromium.org/6546021 [email protected] Review URL: http://codereview.chromium.org/6538073 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@75490 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
yitian134/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,ropik/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,adobe/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium
fbc9dce9bce1097692f5ce1bbab2d6b4ac2297e6
ext/foo/foo_vector.h
ext/foo/foo_vector.h
// ext/foo/foo_vector.h // Declarations for wrapped struct #ifndef FOO_VECTOR_H #define FOO_VECTOR_H #include <ruby.h> #include <math.h> // Ruby 1.8.7 compatibility patch #ifndef DBL2NUM #define DBL2NUM( dbl_val ) rb_float_new( dbl_val ) #endif void init_foo_vector( VALUE parent_module ); // This is the struct that the rest of the code wraps typedef struct _fv { double x; double y; double z; } FVStruct; #endif
// ext/foo/foo_vector.h // Declarations for wrapped struct #ifndef FOO_VECTOR_H #define FOO_VECTOR_H #include <ruby.h> #include <math.h> // Ruby 1.8.7 compatibility patch #ifndef DBL2NUM #define DBL2NUM( dbl_val ) rb_float_new( dbl_val ) #endif void init_foo_vector( VALUE parent_module ); // This is the struct that the rest of the code wraps typedef struct _fv { double x; double y; double z; } FVStruct; FVStruct *create_fv_struct(); void destroy_fv_struct( FVStruct *fv ); FVStruct *copy_fv_struct( FVStruct *orig ); double fv_magnitude( FVStruct *fv ); #endif
Add sharable methods to header file
Add sharable methods to header file
C
mit
neilslater/ruby_nex_c,neilslater/ruby_nex_c
9220eaea6f9afba4cc3bc6a0ff240f3492ff5997
ext/hitimes/hitimes_instant_osx.c
ext/hitimes/hitimes_instant_osx.c
#ifdef USE_INSTANT_OSX #include "hitimes_interval.h" #include <mach/mach.h> #include <mach/mach_time.h> /* All this OSX code is adapted from http://developer.apple.com/library/mac/#qa/qa1398/_index.html */ /* * returns the conversion factor, this value is used to convert * the value from hitimes_get_current_instant() into seconds */ long double hitimes_instant_conversion_factor() { static mach_timebase_info_data_t s_timebase_info; static long double conversion_factor; /** * If this is the first time we've run, get the timebase. * We can use denom == 0 to indicate that s_timebase_info is * uninitialised because it makes no sense to have a zero * denominator is a fraction. */ if ( s_timebase_info.denom == 0 ) { (void) mach_timebase_info(&s_timebase_info); uint64_t nano_conversion = s_timebase_info.numer / s_timebase_info.denom; conversion_factor = (long double) (nano_conversion) * (1e9l); } return conversion_factor; } /* * returns the mach absolute time, which has no meaning outside of a conversion * factor. */ hitimes_instant_t hitimes_get_current_instant() { return mach_absolute_time(); } #endif
#ifdef USE_INSTANT_OSX #include "hitimes_interval.h" #include <mach/mach.h> #include <mach/mach_time.h> /* All this OSX code is adapted from http://developer.apple.com/library/mac/#qa/qa1398/_index.html */ /* * returns the conversion factor, this value is used to convert * the value from hitimes_get_current_instant() into seconds */ long double hitimes_instant_conversion_factor() { static mach_timebase_info_data_t s_timebase_info; static long double conversion_factor; static uint64_t nano_conversion; /** * If this is the first time we've run, get the timebase. * We can use denom == 0 to indicate that s_timebase_info is * uninitialised because it makes no sense to have a zero * denominator is a fraction. */ if ( s_timebase_info.denom == 0 ) { mach_timebase_info(&s_timebase_info); nano_conversion = s_timebase_info.numer / s_timebase_info.denom; conversion_factor = (long double) (nano_conversion) * (1e9l); } return conversion_factor; } /* * returns the mach absolute time, which has no meaning outside of a conversion * factor. */ hitimes_instant_t hitimes_get_current_instant() { return mach_absolute_time(); } #endif
Clean up C Compiler warning about declaration of variables.
Clean up C Compiler warning about declaration of variables.
C
isc
copiousfreetime/hitimes,modulexcite/hitimes,modulexcite/hitimes,modulexcite/hitimes
126d937b48e5d84399e4050f48daeb560291fb19
webkit/glue/webkit_constants.h
webkit/glue/webkit_constants.h
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ #define WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ namespace webkit_glue { // Chromium sets the minimum interval timeout to 4ms, overriding the // default of 10ms. We'd like to go lower, however there are poorly // coded websites out there which do create CPU-spinning loops. Using // 4ms prevents the CPU from spinning too busily and provides a balance // between CPU spinning and the smallest possible interval timer. const double kForegroundTabTimerInterval = 0.004; // Provides control over the minimum timer interval for background tabs. const double kBackgroundTabTimerInterval = 1.0; } // namespace webkit_glue #endif // WEBKIT_GLUE_WEBKIT_CONSTANTS_H_
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ #define WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ namespace webkit_glue { // Chromium sets the minimum interval timeout to 4ms, overriding the // default of 10ms. We'd like to go lower, however there are poorly // coded websites out there which do create CPU-spinning loops. Using // 4ms prevents the CPU from spinning too busily and provides a balance // between CPU spinning and the smallest possible interval timer. const double kForegroundTabTimerInterval = 0.004; // Provides control over the minimum timer interval for background tabs. const double kBackgroundTabTimerInterval = 0.004; } // namespace webkit_glue #endif // WEBKIT_GLUE_WEBKIT_CONSTANTS_H_
Revert 75430 because it's causing failures in dom_checker_tests. : Increase the minimum interval for timers on background tabs to reduce their CPU consumption.
Revert 75430 because it's causing failures in dom_checker_tests. : Increase the minimum interval for timers on background tabs to reduce their CPU consumption. The new interval is 1000 ms, or once per second. We can easily adjust this value up or down, but this seems like a reasonable value to judge the compatibility impact of this change. BUG=66078 TEST=none (tested manually with minimal test case) Review URL: http://codereview.chromium.org/6546021 [email protected] Review URL: http://codereview.chromium.org/6538073 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@75490 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
keishi/chromium,jaruba/chromium.src,patrickm/chromium.src,nacl-webkit/chrome_deps,robclark/chromium,rogerwang/chromium,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,hujiajie/pa-chromium,hujiajie/pa-chromium,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,dednal/chromium.src,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,krieger-od/nwjs_chromium.src,littlstar/chromium.src,nacl-webkit/chrome_deps,ltilve/chromium,ltilve/chromium,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,robclark/chromium,keishi/chromium,junmin-zhu/chromium-rivertrail,ltilve/chromium,Jonekee/chromium.src,timopulkkinen/BubbleFish,robclark/chromium,Jonekee/chromium.src,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,ltilve/chromium,dushu1203/chromium.src,Just-D/chromium-1,keishi/chromium,fujunwei/chromium-crosswalk,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,keishi/chromium,patrickm/chromium.src,littlstar/chromium.src,hgl888/chromium-crosswalk,patrickm/chromium.src,krieger-od/nwjs_chromium.src,Chilledheart/chromium,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,junmin-zhu/chromium-rivertrail,PeterWangIntel/chromium-crosswalk,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,Just-D/chromium-1,anirudhSK/chromium,chuan9/chromium-crosswalk,rogerwang/chromium,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,littlstar/chromium.src,fujunwei/chromium-crosswalk,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,rogerwang/chromium,patrickm/chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,rogerwang/chromium,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,hujiajie/pa-chromium,anirudhSK/chromium,Fireblend/chromium-crosswalk,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk,robclark/chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,patrickm/chromium.src,robclark/chromium,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,rogerwang/chromium,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,zcbenz/cefode-chromium,markYoungH/chromium.src,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,keishi/chromium,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,zcbenz/cefode-chromium,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,jaruba/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,Just-D/chromium-1,markYoungH/chromium.src,mogoweb/chromium-crosswalk,dednal/chromium.src,Just-D/chromium-1,rogerwang/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,jaruba/chromium.src,keishi/chromium,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,markYoungH/chromium.src,dednal/chromium.src,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,junmin-zhu/chromium-rivertrail,jaruba/chromium.src,ltilve/chromium,M4sse/chromium.src,ondra-novak/chromium.src,robclark/chromium,Chilledheart/chromium,keishi/chromium,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,patrickm/chromium.src,markYoungH/chromium.src,Just-D/chromium-1,ondra-novak/chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,dednal/chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,markYoungH/chromium.src,rogerwang/chromium,dednal/chromium.src,ChromiumWebApps/chromium,robclark/chromium,jaruba/chromium.src,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,robclark/chromium,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,littlstar/chromium.src,ondra-novak/chromium.src,littlstar/chromium.src,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,fujunwei/chromium-crosswalk,anirudhSK/chromium,Chilledheart/chromium,robclark/chromium,chuan9/chromium-crosswalk,jaruba/chromium.src,bright-sparks/chromium-spacewalk,keishi/chromium,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,bright-sparks/chromium-spacewalk,M4sse/chromium.src,ChromiumWebApps/chromium,M4sse/chromium.src,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,dednal/chromium.src,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,mogoweb/chromium-crosswalk,keishi/chromium,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,rogerwang/chromium,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,patrickm/chromium.src,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,keishi/chromium,chuan9/chromium-crosswalk,ltilve/chromium,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,nacl-webkit/chrome_deps,markYoungH/chromium.src,Chilledheart/chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,ltilve/chromium,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,jaruba/chromium.src,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,nacl-webkit/chrome_deps,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,dushu1203/chromium.src,axinging/chromium-crosswalk,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,zcbenz/cefode-chromium,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,timopulkkinen/BubbleFish,dushu1203/chromium.src,robclark/chromium,littlstar/chromium.src,keishi/chromium,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,M4sse/chromium.src,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,ltilve/chromium,Fireblend/chromium-crosswalk,dushu1203/chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,zcbenz/cefode-chromium,markYoungH/chromium.src,dednal/chromium.src,jaruba/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,Chilledheart/chromium,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,rogerwang/chromium,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,dushu1203/chromium.src,markYoungH/chromium.src,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk
01c754ddbddc85d6e84a5312fec9fa07d9f7aa2d
src/r-svd-impute.h
src/r-svd-impute.h
/* r-svd-impute.h */ #ifndef _R_SVD_IMPUTE_H #define _R_SVD_IMPUTE_H SEXP R_svd_impute (SEXP xx, SEXP KK, SEXP tol, SEXP maxiter); #endif /* _R_SVD_IMPUTE_H */
/* r-svd-impute.h */ #ifndef _R_SVD_IMPUTE_H #define _R_SVD_IMPUTE_H SEXP R_svd_impute (SEXP x, SEXP k, SEXP tol, SEXP maxiter); #endif /* _R_SVD_IMPUTE_H */
Fix parameter names for svd.impute
Fix parameter names for svd.impute
C
bsd-3-clause
patperry/r-bcv,patperry/r-bcv,patperry/r-bcv
8a580e79156666d46fa59aae21fecb05746b25e2
src/platform.h
src/platform.h
/** * machina * * Copyright (c) 2011, drmats * All rights reserved. * * https://github.com/drmats/machina */ #ifndef __PLATFORM_H_ #define __PLATFORM_H_ 1 #if defined(linux) || defined(__linux) || defined(__linux__) #undef __LINUX__ #define __LINUX__ 1 #endif #if defined(WIN32) || defined(_WIN32) #undef __WIN32__ #define __WIN32__ 1 #endif #ifdef __WIN32__ #pragma warning( disable : 4290 ) #endif #endif
/** * machina * * Copyright (c) 2011, drmats * All rights reserved. * * https://github.com/drmats/machina */ #ifndef __PLATFORM_H_ #define __PLATFORM_H_ 1 #if defined(linux) || defined(__linux) || defined(__linux__) #undef __LINUX__ #define __LINUX__ 1 #endif #if defined(WIN32) || defined(_WIN32) #undef __WIN32__ #define __WIN32__ 1 #endif #if defined(__WIN32__) && defined(_MSC_VER) #pragma warning( disable : 4290 ) #endif #endif
Disable function exception specification warning only in cl (Visual Studio).
Disable function exception specification warning only in cl (Visual Studio).
C
bsd-2-clause
drmats/machina
57a022230f9ae1b3f5901e26babafb2d321b4511
tornado/speedups.c
tornado/speedups.c
#include <Python.h> static PyObject* websocket_mask(PyObject* self, PyObject* args) { const char* mask; int mask_len; const char* data; int data_len; int i; if (!PyArg_ParseTuple(args, "s#s#", &mask, &mask_len, &data, &data_len)) { return NULL; } PyObject* result = PyBytes_FromStringAndSize(NULL, data_len); if (!result) { return NULL; } char* buf = PyBytes_AsString(result); for (i = 0; i < data_len; i++) { buf[i] = data[i] ^ mask[i % 4]; } return result; } static PyMethodDef methods[] = { {"websocket_mask", websocket_mask, METH_VARARGS, ""}, {NULL, NULL, 0, NULL} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef speedupsmodule = { PyModuleDef_HEAD_INIT, "speedups", NULL, -1, methods }; PyMODINIT_FUNC PyInit_speedups() { return PyModule_Create(&speedupsmodule); } #else // Python 2.x PyMODINIT_FUNC initspeedups() { Py_InitModule("tornado.speedups", methods); } #endif
#define PY_SSIZE_T_CLEAN #include <Python.h> static PyObject* websocket_mask(PyObject* self, PyObject* args) { const char* mask; Py_ssize_t mask_len; const char* data; Py_ssize_t data_len; Py_ssize_t i; PyObject* result; char* buf; if (!PyArg_ParseTuple(args, "s#s#", &mask, &mask_len, &data, &data_len)) { return NULL; } result = PyBytes_FromStringAndSize(NULL, data_len); if (!result) { return NULL; } buf = PyBytes_AsString(result); for (i = 0; i < data_len; i++) { buf[i] = data[i] ^ mask[i % 4]; } return result; } static PyMethodDef methods[] = { {"websocket_mask", websocket_mask, METH_VARARGS, ""}, {NULL, NULL, 0, NULL} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef speedupsmodule = { PyModuleDef_HEAD_INIT, "speedups", NULL, -1, methods }; PyMODINIT_FUNC PyInit_speedups() { return PyModule_Create(&speedupsmodule); } #else // Python 2.x PyMODINIT_FUNC initspeedups() { Py_InitModule("tornado.speedups", methods); } #endif
Fix msvc compile error and improve 64 bit compatibility
Fix msvc compile error and improve 64 bit compatibility
C
apache-2.0
whip112/tornado,wujuguang/tornado,kippandrew/tornado,legnaleurc/tornado,sxfmol/tornado,VShangxiao/tornado,andyaguiar/tornado,jparise/tornado,takeshineshiro/tornado,futurechallenger/tornado,0x73/tornado,InverseLina/tornado,dongpinglai/my_tornado,ymero/tornado,elelianghh/tornado,wxhzk/tornado-1,Aaron1992/tornado,icejoywoo/tornado,hzruandd/tornado,tianyk/tornado-research,yangkf1985/tornado,eXcomm/tornado,Polyconseil/tornado,wsyzxcn/tornado,codeb2cc/tornado,codecov/tornado,xinyu7/tornado,anandology/tornado,VShangxiao/tornado,tianyk/tornado-research,tianyk/tornado-research,anandology/tornado,Geoion/tornado,hzruandd/tornado,arthurdarcet/tornado,noxiouz/tornado,yuezhonghua/tornado,ymero/tornado,ovidiucp/tornado,allenl203/tornado,Lancher/tornado,jarrahwu/tornado,Lancher/tornado,VShangxiao/tornado,felixonmars/tornado,fengsp/tornado,yuezhonghua/tornado,ajdavis/tornado,elijah513/tornado,bywbilly/tornado,bdarnell/tornado,cyrusin/tornado,Aaron1992/tornado,pombredanne/tornado,zguangyu/tornado,kangbiao/tornado,ZhuPeng/tornado,arthurdarcet/tornado,djt5019/tornado,ZhuPeng/tornado,anjan-srivastava/tornado,0x73/tornado,BencoLee/tornado,ydaniv/tornado,QuanZag/tornado,frtmelody/tornado,Windsooon/tornado,ColorFuzzy/tornado,AlphaStaxLLC/tornado,Fydot/tornado,0xkag/tornado,yuyangit/tornado,johan--/tornado,NoyaInRain/tornado,Geoion/tornado,kangbiao/tornado,Snamint/tornado,djt5019/tornado,whip112/tornado,shaohung001/tornado,mehmetkose/tornado,pombredanne/tornado,Polyconseil/tornado,liqueur/tornado,gwillem/tornado,hzruandd/tornado,djt5019/tornado,johan--/tornado,nordaux/tornado,gwillem/tornado,Fydot/tornado,304471720/tornado,ydaniv/tornado,Windsooon/tornado,ubear/tornado,AlphaStaxLLC/tornado,mehmetkose/tornado,lsanotes/tornado,shashankbassi92/tornado,shashankbassi92/tornado,yuezhonghua/tornado,zhuochenKIDD/tornado,Polyconseil/tornado,akalipetis/tornado,lilydjwg/tornado,jehiah/tornado,fengshao0907/tornado,mivade/tornado,gwillem/tornado,dongpinglai/my_tornado,sevenguin/tornado,cyrilMargaria/tornado,legnaleurc/tornado,noxiouz/tornado,MjAbuz/tornado,kaushik94/tornado,Windsooon/tornado,wujuguang/tornado,djt5019/tornado,LTD-Beget/tornado,noxiouz/tornado,ymero/tornado,cyrusin/tornado,cyrusin/tornado,kippandrew/tornado,liqueur/tornado,sunjeammy/tornado,dsseter/tornado,bywbilly/tornado,bdarnell/tornado,whip112/tornado,Polyconseil/tornado,gitchs/tornado,coderhaoxin/tornado,Callwoola/tornado,kevinge314gh/tornado,arthurdarcet/tornado,elijah513/tornado,0x73/tornado,liqueur/tornado,gitchs/tornado,LTD-Beget/tornado,sxfmol/tornado,frtmelody/tornado,mehmetkose/tornado,erichuang1994/tornado,mr-ping/tornado,shashankbassi92/tornado,NoyaInRain/tornado,importcjj/tornado,lsanotes/tornado,dongpinglai/my_tornado,pombredanne/tornado,codeb2cc/tornado,eklitzke/tornado,eXcomm/tornado,mivade/tornado,dsseter/tornado,insflow/tornado,ajdavis/tornado,nephics/tornado,obsh/tornado,fengsp/tornado,wujuguang/tornado,chenxiaba/tornado,sxfmol/tornado,anjan-srivastava/tornado,noxiouz/tornado,andyaguiar/tornado,takeshineshiro/tornado,ajdavis/tornado,importcjj/tornado,arthurdarcet/tornado,kippandrew/tornado,dongpinglai/my_tornado,0x73/tornado,jarrahwu/tornado,wechasing/tornado,sxfmol/tornado,zhuochenKIDD/tornado,takeshineshiro/tornado,AlphaStaxLLC/tornado,304471720/tornado,fengshao0907/tornado,yangkf1985/tornado,ms7s/tornado,drewmiller/tornado,SuminAndrew/tornado,shashankbassi92/tornado,chenxiaba/tornado,Polyconseil/tornado,futurechallenger/tornado,leekchan/tornado_test,InverseLina/tornado,obsh/tornado,elijah513/tornado,arthurdarcet/tornado,hhru/tornado,allenl203/tornado,wxhzk/tornado-1,kevinge314gh/tornado,jehiah/tornado,ifduyue/tornado,jarrahwu/tornado,ZhuPeng/tornado,elijah513/tornado,0xkag/tornado,jonashagstedt/tornado,sevenguin/tornado,drewmiller/tornado,whip112/tornado,xinyu7/tornado,Batterfii/tornado,cyrilMargaria/tornado,lujinda/tornado,InverseLina/tornado,andyaguiar/tornado,nbargnesi/tornado,jparise/tornado,codeb2cc/tornado,codecov/tornado,jarrahwu/tornado,sunjeammy/tornado,chenxiaba/tornado,cyrilMargaria/tornado,ms7s/tornado,QuanZag/tornado,elijah513/tornado,Acidburn0zzz/tornado,QuanZag/tornado,mlyundin/tornado,chenxiaba/tornado,sevenguin/tornado,z-fork/tornado,wxhzk/tornado-1,codecov/tornado,jsjohnst/tornado,InverseLina/tornado,coderhaoxin/tornado,MjAbuz/tornado,anandology/tornado,fengshao0907/tornado,icejoywoo/tornado,shashankbassi92/tornado,mr-ping/tornado,z-fork/tornado,Batterfii/tornado,drewmiller/tornado,nordaux/tornado,Geoion/tornado,ColorFuzzy/tornado,mlyundin/tornado,zhuochenKIDD/tornado,eklitzke/tornado,eXcomm/tornado,Lancher/tornado,nbargnesi/tornado,takeshineshiro/tornado,ListFranz/tornado,cyrilMargaria/tornado,ColorFuzzy/tornado,allenl203/tornado,andyaguiar/tornado,futurechallenger/tornado,importcjj/tornado,djt5019/tornado,hhru/tornado,fengsp/tornado,gitchs/tornado,bdarnell/tornado,kaushik94/tornado,Geoion/tornado,SuminAndrew/tornado,allenl203/tornado,tornadoweb/tornado,LTD-Beget/tornado,sunjeammy/tornado,gwillem/tornado,drewmiller/tornado,Drooids/tornado,elelianghh/tornado,ListFranz/tornado,lsanotes/tornado,futurechallenger/tornado,anjan-srivastava/tornado,MjAbuz/tornado,Callwoola/tornado,LTD-Beget/tornado,cyrusin/tornado,nordaux/tornado,djt5019/tornado,sunjeammy/tornado,jsjohnst/tornado,NoyaInRain/tornado,kangbiao/tornado,304471720/tornado,Drooids/tornado,nbargnesi/tornado,SuminAndrew/tornado,Aaron1992/tornado,Drooids/tornado,zhuochenKIDD/tornado,johan--/tornado,importcjj/tornado,yuezhonghua/tornado,yangkf1985/tornado,Fydot/tornado,kevinge314gh/tornado,jonashagstedt/tornado,fengsp/tornado,cyrilMargaria/tornado,tornadoweb/tornado,ListFranz/tornado,allenl203/tornado,kangbiao/tornado,jampp/tornado,ifduyue/tornado,jsjohnst/tornado,icejoywoo/tornado,ovidiucp/tornado,futurechallenger/tornado,ListFranz/tornado,ZhuPeng/tornado,ymero/tornado,Acidburn0zzz/tornado,nbargnesi/tornado,Windsooon/tornado,Drooids/tornado,eklitzke/tornado,LTD-Beget/tornado,icejoywoo/tornado,coderhaoxin/tornado,MjAbuz/tornado,nephics/tornado,wsyzxcn/tornado,fengshao0907/tornado,kaushik94/tornado,jampp/tornado,wxhzk/tornado-1,jampp/tornado,Batterfii/tornado,andyaguiar/tornado,dsseter/tornado,erichuang1994/tornado,arthurdarcet/tornado,NoyaInRain/tornado,VShangxiao/tornado,mr-ping/tornado,Fydot/tornado,elelianghh/tornado,wsyzxcn/tornado,zguangyu/tornado,Windsooon/tornado,pombredanne/tornado,gwillem/tornado,mivade/tornado,Polyconseil/tornado,ymero/tornado,dsseter/tornado,frtmelody/tornado,lsanotes/tornado,cyrusin/tornado,yuyangit/tornado,eXcomm/tornado,tianyk/tornado-research,mlyundin/tornado,jparise/tornado,sevenguin/tornado,NoyaInRain/tornado,mlyundin/tornado,liqueur/tornado,eklitzke/tornado,ubear/tornado,dsseter/tornado,jsjohnst/tornado,jarrahwu/tornado,jarrahwu/tornado,bywbilly/tornado,erichuang1994/tornado,codecov/tornado,mr-ping/tornado,ovidiucp/tornado,BencoLee/tornado,Acidburn0zzz/tornado,yuyangit/tornado,pombredanne/tornado,obsh/tornado,jonashagstedt/tornado,codeb2cc/tornado,zguangyu/tornado,noxiouz/tornado,leekchan/tornado_test,lsanotes/tornado,304471720/tornado,VShangxiao/tornado,0x73/tornado,johan--/tornado,ydaniv/tornado,jehiah/tornado,gitchs/tornado,Geoion/tornado,wechasing/tornado,ms7s/tornado,kangbiao/tornado,lujinda/tornado,jampp/tornado,hzruandd/tornado,shashankbassi92/tornado,insflow/tornado,gitchs/tornado,Geoion/tornado,codeb2cc/tornado,coderhaoxin/tornado,bywbilly/tornado,0xkag/tornado,liqueur/tornado,fengsp/tornado,kaushik94/tornado,Callwoola/tornado,SuminAndrew/tornado,noxiouz/tornado,wujuguang/tornado,ColorFuzzy/tornado,kevinge314gh/tornado,drewmiller/tornado,elelianghh/tornado,shaohung001/tornado,felixonmars/tornado,jparise/tornado,futurechallenger/tornado,anjan-srivastava/tornado,eXcomm/tornado,wechasing/tornado,dongpinglai/my_tornado,legnaleurc/tornado,chenxiaba/tornado,icejoywoo/tornado,hhru/tornado,akalipetis/tornado,z-fork/tornado,gitchs/tornado,obsh/tornado,ymero/tornado,wsyzxcn/tornado,yuezhonghua/tornado,wechasing/tornado,tianyk/tornado-research,xinyu7/tornado,elelianghh/tornado,ajdavis/tornado,erichuang1994/tornado,anjan-srivastava/tornado,hhru/tornado,kevinge314gh/tornado,anjan-srivastava/tornado,zhuochenKIDD/tornado,wsyzxcn/tornado,fengshao0907/tornado,jonashagstedt/tornado,ifduyue/tornado,yuyangit/tornado,sxfmol/tornado,Fydot/tornado,lujinda/tornado,zhuochenKIDD/tornado,Snamint/tornado,xinyu7/tornado,nbargnesi/tornado,elijah513/tornado,jparise/tornado,andyaguiar/tornado,Drooids/tornado,cyrusin/tornado,chenxiaba/tornado,jsjohnst/tornado,akalipetis/tornado,johan--/tornado,xinyu7/tornado,QuanZag/tornado,fengsp/tornado,kangbiao/tornado,hhru/tornado,jparise/tornado,MjAbuz/tornado,xinyu7/tornado,ms7s/tornado,ifduyue/tornado,insflow/tornado,frtmelody/tornado,jehiah/tornado,importcjj/tornado,z-fork/tornado,felixonmars/tornado,erichuang1994/tornado,shaohung001/tornado,Callwoola/tornado,sunjeammy/tornado,mlyundin/tornado,Batterfii/tornado,mr-ping/tornado,wujuguang/tornado,leekchan/tornado_test,jampp/tornado,shaohung001/tornado,wechasing/tornado,Callwoola/tornado,Acidburn0zzz/tornado,ovidiucp/tornado,Callwoola/tornado,SuminAndrew/tornado,shaohung001/tornado,icejoywoo/tornado,lilydjwg/tornado,InverseLina/tornado,ydaniv/tornado,mehmetkose/tornado,304471720/tornado,sevenguin/tornado,gwillem/tornado,ajdavis/tornado,LTD-Beget/tornado,yangkf1985/tornado,z-fork/tornado,mehmetkose/tornado,0xkag/tornado,mlyundin/tornado,bdarnell/tornado,felixonmars/tornado,sevenguin/tornado,nephics/tornado,Drooids/tornado,nordaux/tornado,leekchan/tornado_test,hzruandd/tornado,jsjohnst/tornado,Aaron1992/tornado,eXcomm/tornado,takeshineshiro/tornado,Snamint/tornado,zguangyu/tornado,yangkf1985/tornado,BencoLee/tornado,ubear/tornado,yangkf1985/tornado,frtmelody/tornado,QuanZag/tornado,nordaux/tornado,Windsooon/tornado,Batterfii/tornado,kevinge314gh/tornado,yuezhonghua/tornado,whip112/tornado,mivade/tornado,ovidiucp/tornado,kippandrew/tornado,tornadoweb/tornado,cyrilMargaria/tornado,akalipetis/tornado,tornadoweb/tornado,mehmetkose/tornado,Aaron1992/tornado,jonashagstedt/tornado,anandology/tornado,AlphaStaxLLC/tornado,hzruandd/tornado,jehiah/tornado,ydaniv/tornado,legnaleurc/tornado,Acidburn0zzz/tornado,coderhaoxin/tornado,AlphaStaxLLC/tornado,Batterfii/tornado,z-fork/tornado,Fydot/tornado,fengshao0907/tornado,liqueur/tornado,whip112/tornado,ZhuPeng/tornado,lsanotes/tornado,BencoLee/tornado,Snamint/tornado,coderhaoxin/tornado,drewmiller/tornado,ms7s/tornado,ydaniv/tornado,0xkag/tornado,felixonmars/tornado,legnaleurc/tornado,Snamint/tornado,obsh/tornado,ms7s/tornado,ZhuPeng/tornado,AlphaStaxLLC/tornado,bywbilly/tornado,ColorFuzzy/tornado,ubear/tornado,lujinda/tornado,anandology/tornado,leekchan/tornado_test,MjAbuz/tornado,bywbilly/tornado,sxfmol/tornado,shaohung001/tornado,johan--/tornado,Snamint/tornado,lujinda/tornado,BencoLee/tornado,mivade/tornado,mr-ping/tornado,nephics/tornado,wxhzk/tornado-1,elelianghh/tornado,kippandrew/tornado,zguangyu/tornado,ColorFuzzy/tornado,ListFranz/tornado,dsseter/tornado,codeb2cc/tornado,InverseLina/tornado,Lancher/tornado,Lancher/tornado,ifduyue/tornado,bdarnell/tornado,wechasing/tornado,VShangxiao/tornado,nephics/tornado,Acidburn0zzz/tornado,ListFranz/tornado,akalipetis/tornado,QuanZag/tornado,pombredanne/tornado,yuyangit/tornado,kippandrew/tornado,wsyzxcn/tornado,erichuang1994/tornado,frtmelody/tornado,lilydjwg/tornado,insflow/tornado,dongpinglai/my_tornado,ovidiucp/tornado,BencoLee/tornado,ubear/tornado,lujinda/tornado,NoyaInRain/tornado,kaushik94/tornado,zguangyu/tornado,ubear/tornado,obsh/tornado,304471720/tornado,anandology/tornado,eklitzke/tornado,insflow/tornado,jampp/tornado,importcjj/tornado,lilydjwg/tornado,wxhzk/tornado-1,nbargnesi/tornado,wsyzxcn/tornado,insflow/tornado,akalipetis/tornado,takeshineshiro/tornado
490a3468fb50601f00e56965a531f0bbb804f806
Python/getcopyright.c
Python/getcopyright.c
/* Return the copyright string. This is updated manually. */ #include "Python.h" static char cprt[] = "Copyright (c) 2000 BeOpen.com.\n\ All Rights Reserved.\n\ \n\ Copyright (c) 1995-2000 Corporation for National Research Initiatives.\n\ All Rights Reserved.\n\ \n\ Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.\n\ All Rights Reserved."; const char * Py_GetCopyright(void) { return cprt; }
/* Return the copyright string. This is updated manually. */ #include "Python.h" static char cprt[] = "\ Copyright (c) 2000, 2001 Guido van Rossum.\n\ All Rights Reserved.\n\ \n\ Copyright (c) 2000 BeOpen.com.\n\ All Rights Reserved.\n\ \n\ Copyright (c) 1995-2000 Corporation for National Research Initiatives.\n\ All Rights Reserved.\n\ \n\ Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.\n\ All Rights Reserved."; const char * Py_GetCopyright(void) { return cprt; }
Add my name to the copyright notice.
Add my name to the copyright notice.
C
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
8727a3517c834cb9e4929de70ad0571038b0cc0f
engine/os/OsTypes.h
engine/os/OsTypes.h
/* Copyright (c) 2013 Daniele Bartolini, Michele Rossi Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto 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. */ #pragma once #include "Types.h" namespace crown { /// Represents an event fired by the OS enum OsEventType { OSET_NONE = 0, OSET_KEY_PRESS = 1, OSET_KEY_RELEASE = 2, OSET_BUTTON_PRESS = 3, OSET_BUTTON_RELEASE = 4, OSET_MOTION_NOTIFY = 5, OSET_TOUCH_DOWN = 6, OSET_TOUCH_MOVE = 7, OSET_TOUCH_UP = 8, OSET_ACCELEROMETER = 9 }; /// Represents an event fired by mouse. struct OsMouseEvent { uint32_t button; uint32_t x; uint32_t y; }; /// Represents an event fired by keyboard. struct OsKeyboardEvent { uint32_t key; uint32_t modifier; }; /// Represents an event fired by touch screen. struct OsTouchEvent { uint32_t pointer_id; uint32_t x; uint32_t y; }; /// Represents an event fired by accelerometer. struct OsAccelerometerEvent { float x; float y; float z; }; } // namespace crown
Fix documentation: DO NOT USE __ to emphasize text
Fix documentation: DO NOT USE __ to emphasize text
C
mit
taylor001/crown,mikymod/crown,galek/crown,galek/crown,dbartolini/crown,galek/crown,mikymod/crown,galek/crown,taylor001/crown,dbartolini/crown,mikymod/crown,taylor001/crown,dbartolini/crown,mikymod/crown,dbartolini/crown,taylor001/crown
b151044a0d9307e4ab78c9b63c334604fbed41d6
platform/ozone_platform_wayland.h
platform/ozone_platform_wayland.h
// Copyright (c) 2013 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 OZONE_PLATFORM_OZONE_PLATFORM_WAYLAND_H_ #define OZONE_PLATFORM_OZONE_PLATFORM_WAYLAND_H_ namespace ui { class OzonePlatform; // Constructor hook for use in ozone_platform_list.cc OzonePlatform* CreateOzonePlatformWayland(); } // namespace ui #endif // OZONE_PLATFORM_OZONE_PLATFORM_WAYLAND_H_
// Copyright (c) 2013 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 OZONE_PLATFORM_OZONE_PLATFORM_WAYLAND_H_ #define OZONE_PLATFORM_OZONE_PLATFORM_WAYLAND_H_ #include "ozone/platform/ozone_export_wayland.h" namespace ui { class OzonePlatform; // Constructor hook for use in ozone_platform_list.cc OZONE_WAYLAND_EXPORT OzonePlatform* CreateOzonePlatformWayland(); } // namespace ui #endif // OZONE_PLATFORM_OZONE_PLATFORM_WAYLAND_H_
Fix shared_component build for Ozone platform.
Fix shared_component build for Ozone platform. This patch makes necessary changes in Ozone Wayland code base to fix shared_component build.
C
bsd-3-clause
Tarnyko/ozone-wayland,baillaw/ozone-wayland,qjia7/ozone-wayland,kalyankondapally/ozone-wayland,kuscsik/ozone-wayland,hongzhang-yan/ozone-wayland,baillaw/ozone-wayland,racarr-ubuntu/ozone-mir,qjia7/ozone-wayland,sjnewbury/ozone-wayland,siteshwar/ozone-wayland,01org/ozone-wayland,01org/ozone-wayland,nagineni/ozone-wayland,kishansheshagiri/ozone-wayland,shaochangbin/ozone-wayland,siteshwar/ozone-wayland,rakuco/ozone-wayland,AndriyP/ozone-wayland,kuscsik/ozone-wayland,likewise/ozone-wayland,nagineni/ozone-wayland,kalyankondapally/ozone-wayland,joone/ozone-wayland,darktears/ozone-wayland,kalyankondapally/ozone-wayland,darktears/ozone-wayland,tiagovignatti/ozone-wayland,AndriyP/ozone-wayland,Tarnyko/ozone-wayland,mrunalk/ozone-wayland,clopez/ozone-wayland,shaochangbin/ozone-wayland,kishansheshagiri/ozone-wayland,joone/ozone-wayland,tiagovignatti/ozone-wayland,tiagovignatti/ozone-wayland,hongzhang-yan/ozone-wayland,siteshwar/ozone-wayland,mrunalk/ozone-wayland,darktears/ozone-wayland,tiagovignatti/ozone-wayland,nicoguyo/ozone-wayland,mrunalk/ozone-wayland,joone/ozone-wayland,shaochangbin/ozone-wayland,racarr-ubuntu/ozone-mir,nagineni/ozone-wayland,AndriyP/ozone-wayland,likewise/ozone-wayland,nicoguyo/ozone-wayland,rakuco/ozone-wayland,rakuco/ozone-wayland,siteshwar/ozone-wayland,kuscsik/ozone-wayland,joone/ozone-wayland,clopez/ozone-wayland,darktears/ozone-wayland,sjnewbury/ozone-wayland,mrunalk/ozone-wayland,rakuco/ozone-wayland,01org/ozone-wayland,kuscsik/ozone-wayland,sjnewbury/ozone-wayland,sjnewbury/ozone-wayland,Tarnyko/ozone-wayland,01org/ozone-wayland,clopez/ozone-wayland,racarr-ubuntu/ozone-mir,racarr-ubuntu/ozone-mir,clopez/ozone-wayland,kishansheshagiri/ozone-wayland,nicoguyo/ozone-wayland,Tarnyko/ozone-wayland,qjia7/ozone-wayland,kalyankondapally/ozone-wayland,kishansheshagiri/ozone-wayland,likewise/ozone-wayland,likewise/ozone-wayland,nicoguyo/ozone-wayland,hongzhang-yan/ozone-wayland,shaochangbin/ozone-wayland,nagineni/ozone-wayland,baillaw/ozone-wayland,qjia7/ozone-wayland,AndriyP/ozone-wayland,baillaw/ozone-wayland,hongzhang-yan/ozone-wayland
ca31b33140cddb563d9e7749bd75a9d3763c5908
lib/libncp/ncp_mod.h
lib/libncp/ncp_mod.h
/* * Describes all ncp_lib kernel functions * * $FreeBSD$ */ #ifndef _NCP_MOD_H_ #define _NCP_MOD_H_ /* order of calls in syscall table relative to offset in system table */ #define NCP_SE(callno) (callno+sysentoffset) #define NCP_CONNSCAN NCP_SE(0) #define NCP_CONNECT NCP_SE(1) #define NCP_INTFN NCP_SE(2) #define SNCP_REQUEST NCP_SE(3) #endif /* !_NCP_MOD_H_ */
/* * Describes all ncp_lib kernel functions * * $FreeBSD$ */ #ifndef _NCP_MOD_H_ #define _NCP_MOD_H_ /* order of calls in syscall table relative to offset in system table */ #define NCP_SE(callno) (callno+sysentoffset) #define NCP_CONNSCAN NCP_SE(0) #define NCP_CONNECT NCP_SE(1) #define NCP_INTFN NCP_SE(2) #define SNCP_REQUEST NCP_SE(3) #endif /* !_NCP_MOD_H_ */
Add missing newline at end of file.
Add missing newline at end of file.
C
bsd-3-clause
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
94710706b818acd113d6f56c0cdaa787f13b74eb
content/common/gpu/surface_handle_types_mac.h
content/common/gpu/surface_handle_types_mac.h
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_COMMON_GPU_SURFACE_HANDLE_TYPES_MAC_H_ #define CONTENT_COMMON_GPU_SURFACE_HANDLE_TYPES_MAC_H_ #include <OpenGL/CGLIOSurface.h> #include "base/basictypes.h" #include "ui/base/cocoa/remote_layer_api.h" namespace content { // The surface handle passed between the GPU and browser process may refer to // an IOSurface or a CAContext. These helper functions must be used to identify // and translate between the types. enum SurfaceHandleType { kSurfaceHandleTypeInvalid, kSurfaceHandleTypeIOSurface, kSurfaceHandleTypeCAContext, }; SurfaceHandleType GetSurfaceHandleType(uint64 surface_handle); CAContextID CAContextIDFromSurfaceHandle(uint64 surface_handle); IOSurfaceID IOSurfaceIDFromSurfaceHandle(uint64 surface_handle); uint64 SurfaceHandleFromIOSurfaceID(IOSurfaceID io_surface_id); uint64 SurfaceHandleFromCAContextID(CAContextID ca_context_id); } // namespace content #endif // CONTENT_COMMON_GPU_HANDLE_TYPES_MAC_H_
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_COMMON_GPU_SURFACE_HANDLE_TYPES_MAC_H_ #define CONTENT_COMMON_GPU_SURFACE_HANDLE_TYPES_MAC_H_ #include <IOSurface/IOSurface.h> #include <OpenGL/CGLIOSurface.h> #include "base/basictypes.h" #include "ui/base/cocoa/remote_layer_api.h" namespace content { // The surface handle passed between the GPU and browser process may refer to // an IOSurface or a CAContext. These helper functions must be used to identify // and translate between the types. enum SurfaceHandleType { kSurfaceHandleTypeInvalid, kSurfaceHandleTypeIOSurface, kSurfaceHandleTypeCAContext, }; SurfaceHandleType GetSurfaceHandleType(uint64 surface_handle); CAContextID CAContextIDFromSurfaceHandle(uint64 surface_handle); IOSurfaceID IOSurfaceIDFromSurfaceHandle(uint64 surface_handle); uint64 SurfaceHandleFromIOSurfaceID(IOSurfaceID io_surface_id); uint64 SurfaceHandleFromCAContextID(CAContextID ca_context_id); } // namespace content #endif // CONTENT_COMMON_GPU_HANDLE_TYPES_MAC_H_
Fix build on OSX 10.9.
Fix build on OSX 10.9. This fixes a build error on OSX 10.9 introduced by https://codereview.chromium.org/347653005/ BUG=388160 [email protected],[email protected],[email protected] Review URL: https://codereview.chromium.org/350833002 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@279428 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,Just-D/chromium-1,dushu1203/chromium.src,dushu1203/chromium.src,dushu1203/chromium.src,dednal/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,littlstar/chromium.src,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,Chilledheart/chromium,markYoungH/chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,dednal/chromium.src,bright-sparks/chromium-spacewalk,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,dushu1203/chromium.src,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,dednal/chromium.src,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,M4sse/chromium.src,hgl888/chromium-crosswalk,M4sse/chromium.src,dushu1203/chromium.src,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,ondra-novak/chromium.src,dednal/chromium.src,Chilledheart/chromium,dushu1203/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,ltilve/chromium,ltilve/chromium,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,jaruba/chromium.src,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,markYoungH/chromium.src,fujunwei/chromium-crosswalk,ltilve/chromium,Jonekee/chromium.src,Jonekee/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,Chilledheart/chromium,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,Fireblend/chromium-crosswalk,jaruba/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,dednal/chromium.src,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,littlstar/chromium.src,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,dednal/chromium.src,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,M4sse/chromium.src,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,jaruba/chromium.src,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,chuan9/chromium-crosswalk,dushu1203/chromium.src,ltilve/chromium,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,ltilve/chromium,axinging/chromium-crosswalk,dednal/chromium.src,littlstar/chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,dednal/chromium.src,bright-sparks/chromium-spacewalk,Chilledheart/chromium,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ltilve/chromium,chuan9/chromium-crosswalk,Jonekee/chromium.src,Just-D/chromium-1,Just-D/chromium-1,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,Just-D/chromium-1,ltilve/chromium,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,M4sse/chromium.src,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,M4sse/chromium.src,ltilve/chromium,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,jaruba/chromium.src,Just-D/chromium-1,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,ltilve/chromium,fujunwei/chromium-crosswalk,littlstar/chromium.src,axinging/chromium-crosswalk
04ca2f943ec928a383c7a9ab71ffc0d0a583223f
UIforETW/Version.h
UIforETW/Version.h
#pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. const float kCurrentVersion = 1.45f; // Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version // increment that won't trigger the new-version checks, handy for minor // releases that I don't want to bother users about. //#define VERSION_SUFFIX 'b'
#pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. const float kCurrentVersion = 1.46f; // Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version // increment that won't trigger the new-version checks, handy for minor // releases that I don't want to bother users about. //#define VERSION_SUFFIX 'b'
Increase version to 1.46 in preparation for new release
Increase version to 1.46 in preparation for new release
C
apache-2.0
ariccio/UIforETW,google/UIforETW,MikeMarcin/UIforETW,MikeMarcin/UIforETW,google/UIforETW,ariccio/UIforETW,google/UIforETW,mwinterb/UIforETW,MikeMarcin/UIforETW,mwinterb/UIforETW,ariccio/UIforETW,google/UIforETW,mwinterb/UIforETW,ariccio/UIforETW
19fce5e178d3f071c86da34008108f8f4bb2c994
src/parse/type.h
src/parse/type.h
#ifndef __parse_type_h__ #define __parse_type_h__ typedef enum { PARSE_TYPE_NONE, PARSE_TYPE_LOGICAL, PARSE_TYPE_CHARACTER, PARSE_TYPE_INTEGER, PARSE_TYPE_REAL, PARSE_TYPE_COMPLEX, PARSE_TYPE_BYTE, } parse_type_e; typedef struct { parse_type_e type; unsigned kind; unsigned count; } parse_type_t; static const parse_type_t PARSE_TYPE_INTEGER_DEFAULT = { .type = PARSE_TYPE_INTEGER, .kind = 0, .count = 0, }; static const parse_type_t PARSE_TYPE_REAL_DEFAULT = { .type = PARSE_TYPE_REAL, .kind = 0, .count = 0, }; unsigned parse_type( const sparse_t* src, const char* ptr, parse_type_t* type); #endif
#ifndef __parse_type_h__ #define __parse_type_h__ typedef enum { PARSE_TYPE_NONE, PARSE_TYPE_LOGICAL, PARSE_TYPE_CHARACTER, PARSE_TYPE_INTEGER, PARSE_TYPE_REAL, PARSE_TYPE_COMPLEX, PARSE_TYPE_BYTE, } parse_type_e; typedef struct { parse_type_e type; unsigned kind; unsigned count; } parse_type_t; #define PARSE_TYPE_INTEGER_DEFAULT (parse_type_t)\ {\ .type = PARSE_TYPE_INTEGER,\ .kind = 0,\ .count = 0,\ } #define PARSE_TYPE_REAL_DEFAULT (parse_type_t)\ {\ .type = PARSE_TYPE_REAL,\ .kind = 0,\ .count = 0,\ } unsigned parse_type( const sparse_t* src, const char* ptr, parse_type_t* type); #endif
Fix issue with static consts
Fix issue with static consts
C
apache-2.0
CodethinkLabs/ofc,CodethinkLabs/ofc,CodethinkLabs/ofc,CodethinkLabs/ofc
e855173835d8911edd09dcdfc0529ebacdc9fe55
src/thermostat.h
src/thermostat.h
#pragma once #include <core.h> #define DHT22_PIN 6 #define DHT22_SAMPLE_RATE 3000 #define TEMPORATURE_TARGET (204) #define HEATER_PIN 10 #define HEATER_ACTION_DELAY (15*60) // minimal seconds to open/close heater, prevent switch heater too frequently. // pin connect to 315/433 transmitter #define TRANSMIT_PIN 8 // Log temperature and humidity every 5mins #define TEMPE_HUMI_LOG_INTERVAL ((uint32_t)5 * 60 * 1000) #define DISPLAY_PIN1 5 #define DISPLAY_PIN2 4 #define DISPLAY_PIN3 3 #define DISPLAY_PIN4 2 #define DISPLAY_PIN5 11 #define DISPLAY_PIN6 12 extern core::idType idTempe, idHumi; // Set digital value idHeaterReq to turn on/off, heater module // has a throttle inside to prevent turn on/off too frequently, // idHeaterAct digtial value is the heater actual state. extern core::idType idHeaterReq, idHeaterAct; #define KEY_MODE_PIN 7 #define KEY_UP_PIN 9 #define KEY_DOWN_PIN 10 #define KEY_SETUP_PIN 13 extern core::idType idKeyMode, idKeyUp, idKeyDown, idKeySetup;
#pragma once #include <core.h> #define DHT22_PIN 6 #define DHT22_SAMPLE_RATE 3000 #define TEMPORATURE_TARGET (204) #define HEATER_PIN 10 #define HEATER_ACTION_DELAY (15*60) // minimal seconds to open/close heater, prevent switch heater too frequently. // pin connect to 315/433 transmitter #define TRANSMIT_PIN 8 // Log temperature and humidity every 5mins #define TEMPE_HUMI_LOG_INTERVAL ((uint32_t)5 * 60 * 1000) #define DISPLAY_PIN1 5 #define DISPLAY_PIN2 4 #define DISPLAY_PIN3 3 #define DISPLAY_PIN4 2 #define DISPLAY_PIN5 11 #define DISPLAY_PIN6 12 extern core::idType idTempe, idHumi; // Set digital value idHeaterReq to turn on/off, heater module // has a throttle inside to prevent turn on/off too frequently, // idHeaterAct digtial value is the heater actual state. extern core::idType idHeaterReq, idHeaterAct; #define KEY_MODE_PIN 7 #define KEY_UP_PIN 9 #define KEY_DOWN_PIN A0 #define KEY_SETUP_PIN 13 extern core::idType idKeyMode, idKeyUp, idKeyDown, idKeySetup;
Use A0 instead 10 as button down input PIN
Use A0 instead 10 as button down input PIN All digital pins are used, 10 used by heater relay, so borrow an analog input pin.
C
apache-2.0
redforks/thermostat,redforks/thermostat
a4f0a6e8749227e6eabb8ae0f4af155a95721f5a
tests/regression/61-evalAssert/01-union_evalAssert.c
tests/regression/61-evalAssert/01-union_evalAssert.c
// PARAM: --set trans.activated[+] "assert" // Running the assert transformation on this test yields in code that is not compilable by gcc struct s { int a; int b; }; union u { struct s str; int i; }; int main(){ union u un; struct s* ptr; un.str.a = 1; un.str.b = 2; ptr = &un.str; int r; int x; if(r){ x = 2; } else { x = 3; } return 0; }
Add test case for invariant generation for unions.
Add test case for invariant generation for unions.
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
b8f325d491a751bb8478b36f85493c728b5d098e
src/condor_includes/condor_constants.h
src/condor_includes/condor_constants.h
#ifndef CONSTANTS_H #define CONSTANTS_H #if !defined(__STDC__) && !defined(__cplusplus) #define const #endif /* Set up a boolean variable type. Since this definition could conflict with other reasonable definition of BOOLEAN, i.e. using an enumeration, it is conditional. */ #ifndef BOOLEAN_TYPE_DEFINED typedef int BOOLEAN; #endif #if defined(TRUE) # undef TRUE # undef FALSE #endif static const int TRUE = 1; static const int FALSE = 0; /* Useful constants for turning seconds into larger units of time. Since these constants may have already been defined elsewhere, they are conditional. */ #ifndef TIME_CONSTANTS_DEFINED static const int MINUTE = 60; static const int HOUR = 60 * 60; static const int DAY = 24 * 60 * 60; #endif /* This is for use with strcmp() and related functions which will return 0 upon a match. */ #ifndef MATCH static const int MATCH = 0; #endif #endif
#ifndef CONSTANTS_H #define CONSTANTS_H #if !defined(__STDC__) && !defined(__cplusplus) #define const #endif /* Set up a boolean variable type. Since this definition could conflict with other reasonable definition of BOOLEAN, i.e. using an enumeration, it is conditional. */ #ifndef BOOLEAN_TYPE_DEFINED typedef int BOOLEAN; typedef int BOOL; #endif #if defined(TRUE) # undef TRUE # undef FALSE #endif static const int TRUE = 1; static const int FALSE = 0; /* Useful constants for turning seconds into larger units of time. Since these constants may have already been defined elsewhere, they are conditional. */ #ifndef TIME_CONSTANTS_DEFINED static const int MINUTE = 60; static const int HOUR = 60 * 60; static const int DAY = 24 * 60 * 60; #endif /* This is for use with strcmp() and related functions which will return 0 upon a match. */ #ifndef MATCH static const int MATCH = 0; #endif #endif
Add BOOL typedef becuase BOOLEAN is too verbose.
Add BOOL typedef becuase BOOLEAN is too verbose.
C
apache-2.0
djw8605/condor,htcondor/htcondor,neurodebian/htcondor,bbockelm/condor-network-accounting,clalancette/condor-dcloud,htcondor/htcondor,neurodebian/htcondor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,clalancette/condor-dcloud,bbockelm/condor-network-accounting,djw8605/htcondor,clalancette/condor-dcloud,htcondor/htcondor,djw8605/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,mambelli/osg-bosco-marco,clalancette/condor-dcloud,neurodebian/htcondor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,djw8605/condor,djw8605/htcondor,zhangzhehust/htcondor,djw8605/htcondor,clalancette/condor-dcloud,neurodebian/htcondor,djw8605/htcondor,htcondor/htcondor,djw8605/htcondor,neurodebian/htcondor,mambelli/osg-bosco-marco,neurodebian/htcondor,djw8605/condor,djw8605/htcondor,zhangzhehust/htcondor,djw8605/condor,djw8605/htcondor,bbockelm/condor-network-accounting,zhangzhehust/htcondor,djw8605/htcondor,bbockelm/condor-network-accounting,zhangzhehust/htcondor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,djw8605/condor,djw8605/condor,neurodebian/htcondor,htcondor/htcondor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,djw8605/condor,neurodebian/htcondor,clalancette/condor-dcloud,djw8605/condor,htcondor/htcondor,htcondor/htcondor,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,clalancette/condor-dcloud,htcondor/htcondor
4313cb62c47240baa244e521db53531686286afd
tensorflow/lite/core/shims/cc/kernels/register.h
tensorflow/lite/core/shims/cc/kernels/register.h
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_LITE_CORE_SHIMS_CC_KERNELS_REGISTER_H_ #define TENSORFLOW_LITE_CORE_SHIMS_CC_KERNELS_REGISTER_H_ #include "tensorflow/lite/kernels/register.h" #endif // TENSORFLOW_LITE_CORE_SHIMS_CC_KERNELS_REGISTER_H_
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_LITE_CORE_SHIMS_CC_KERNELS_REGISTER_H_ #define TENSORFLOW_LITE_CORE_SHIMS_CC_KERNELS_REGISTER_H_ #include "tensorflow/lite/kernels/register.h" namespace tflite_shims { namespace ops { namespace builtin { using BuiltinOpResolver = ::tflite::ops::builtin::BuiltinOpResolver; } // namespace builtin } // namespace ops } // namespace tflite_shims #endif // TENSORFLOW_LITE_CORE_SHIMS_CC_KERNELS_REGISTER_H_
Fix wrong namespace in recently-added shim header.
Fix wrong namespace in recently-added shim header. PiperOrigin-RevId: 344072784 Change-Id: I8e1de38f2bb932afd9e905551953f45046db45c9
C
apache-2.0
petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,sarvex/tensorflow,annarev/tensorflow,Intel-tensorflow/tensorflow,petewarden/tensorflow,frreiss/tensorflow-fred,frreiss/tensorflow-fred,cxxgtxy/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,paolodedios/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,freedomtan/tensorflow,petewarden/tensorflow,frreiss/tensorflow-fred,sarvex/tensorflow,tensorflow/tensorflow,Intel-Corporation/tensorflow,Intel-Corporation/tensorflow,annarev/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,sarvex/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,yongtang/tensorflow,karllessard/tensorflow,annarev/tensorflow,sarvex/tensorflow,petewarden/tensorflow,petewarden/tensorflow,freedomtan/tensorflow,yongtang/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,freedomtan/tensorflow,paolodedios/tensorflow,cxxgtxy/tensorflow,annarev/tensorflow,gautam1858/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-Corporation/tensorflow,karllessard/tensorflow,Intel-Corporation/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,Intel-Corporation/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,freedomtan/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,freedomtan/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,freedomtan/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,cxxgtxy/tensorflow,yongtang/tensorflow,gautam1858/tensorflow,cxxgtxy/tensorflow,paolodedios/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,sarvex/tensorflow,gautam1858/tensorflow,freedomtan/tensorflow,annarev/tensorflow,annarev/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,sarvex/tensorflow,yongtang/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,sarvex/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,annarev/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,sarvex/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,karllessard/tensorflow,petewarden/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,paolodedios/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow,gautam1858/tensorflow,karllessard/tensorflow,freedomtan/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,petewarden/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,cxxgtxy/tensorflow,Intel-Corporation/tensorflow,petewarden/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,cxxgtxy/tensorflow,frreiss/tensorflow-fred,yongtang/tensorflow,Intel-Corporation/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow
7bcc2cb0b099c2ae9a39160886e5974d58c38329
test/bugs/cpp/strip_comment_ice.c
test/bugs/cpp/strip_comment_ice.c
#ifdef GNU_VARIADIC # define FOO(args...) do { foo(args); } while (0) #else # define FOO(...) do { foo(__VA_ARGS__); } while (0) #endif #define BAR(x) FOO("x"); FOO(")"); void foo(char *a) { BAR(); }
Add cpp comment stripping bug
Add cpp comment stripping bug
C
mit
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
235202c66e7fd405c0b43fdf5a4de93f8e7d0950
elsa/in/k0059.c
elsa/in/k0059.c
struct S { int a; }; struct S foo () { struct S s; int i; s.a = i; return s; } int main() { int u; u = foo().a; }
Test case for returning structs by value (missing from previous checkin)
Test case for returning structs by value (missing from previous checkin)
C
bsd-3-clause
angavrilov/olmar,angavrilov/olmar,angavrilov/olmar,angavrilov/olmar
04981f7369b37585c856a32feb71eb264bf0db84
tools/spiffsimg/spiffs_typedefs.h
tools/spiffsimg/spiffs_typedefs.h
#include <stdint.h> #include <stdlib.h> #include <stdio.h> #include <string.h> typedef int32_t s32_t; typedef uint32_t u32_t; typedef int16_t s16_t; typedef uint16_t u16_t; typedef int8_t s8_t; typedef uint8_t u8_t; typedef long long ptrdiff_t; #define offsetof(type, member) __builtin_offsetof (type, member)
#include <stdint.h> #include <stdlib.h> #include <stdio.h> #include <string.h> typedef int32_t s32_t; typedef uint32_t u32_t; typedef int16_t s16_t; typedef uint16_t u16_t; typedef int8_t s8_t; typedef uint8_t u8_t; #ifndef __CYGWIN__ typedef long long ptrdiff_t; #define offsetof(type, member) __builtin_offsetof (type, member) #endif
Add cygwin support for compiling spiffsimg
Add cygwin support for compiling spiffsimg
C
mit
FelixPe/nodemcu-firmware,HEYAHONG/nodemcu-firmware,nwf/nodemcu-firmware,FelixPe/nodemcu-firmware,devsaurus/nodemcu-firmware,eku/nodemcu-firmware,marcelstoer/nodemcu-firmware,vsky279/nodemcu-firmware,TerryE/nodemcu-firmware,TerryE/nodemcu-firmware,devsaurus/nodemcu-firmware,nwf/nodemcu-firmware,nodemcu/nodemcu-firmware,TerryE/nodemcu-firmware,FelixPe/nodemcu-firmware,vsky279/nodemcu-firmware,FelixPe/nodemcu-firmware,eku/nodemcu-firmware,eku/nodemcu-firmware,devsaurus/nodemcu-firmware,nodemcu/nodemcu-firmware,marcelstoer/nodemcu-firmware,HEYAHONG/nodemcu-firmware,marcelstoer/nodemcu-firmware,vsky279/nodemcu-firmware,marcelstoer/nodemcu-firmware,HEYAHONG/nodemcu-firmware,marcelstoer/nodemcu-firmware,nwf/nodemcu-firmware,TerryE/nodemcu-firmware,FelixPe/nodemcu-firmware,nodemcu/nodemcu-firmware,nodemcu/nodemcu-firmware,TerryE/nodemcu-firmware,eku/nodemcu-firmware,HEYAHONG/nodemcu-firmware,devsaurus/nodemcu-firmware,nwf/nodemcu-firmware,HEYAHONG/nodemcu-firmware,devsaurus/nodemcu-firmware,nwf/nodemcu-firmware,vsky279/nodemcu-firmware,vsky279/nodemcu-firmware,nodemcu/nodemcu-firmware
e8b7e4110f4f652baf8badb3b63a8ea2fa644fa4
Hamming_Weigth/C/Hamming_Weigth.c
Hamming_Weigth/C/Hamming_Weigth.c
#include <stdint.h> int32_t NumberOfSetBits(int32_t i) { i = i - ((i >> 1) & 0x55555555); i = (i & 0x33333333) + ((i >> 2) & 0x33333333); return (((i + (i >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24; }
Add Hamming weigth in C
Add Hamming weigth in C
C
mit
jb1717/Algorithm-Implementations,aayushKumarJarvis/Algorithm-Implementations,AntonioModer/Algorithm-Implementations,Yonaba/Algorithm-Implementations,Endika/Algorithm-Implementations,imrandomizer/Algorithm-Implementations,pravsingh/Algorithm-Implementations,AntonioModer/Algorithm-Implementations,imrandomizer/Algorithm-Implementations,imrandomizer/Algorithm-Implementations,Sweet-kid/Algorithm-Implementations,Etiene/Algorithm-Implementations,sugiartocokrowibowo/Algorithm-Implementations,imrandomizer/Algorithm-Implementations,n1ghtmare/Algorithm-Implementations,varunparkhe/Algorithm-Implementations,pravsingh/Algorithm-Implementations,vikas17a/Algorithm-Implementations,joshimoo/Algorithm-Implementations,Etiene/Algorithm-Implementations,imrandomizer/Algorithm-Implementations,Endika/Algorithm-Implementations,praveenjha527/Algorithm-Implementations,kennyledet/Algorithm-Implementations,Yonaba/Algorithm-Implementations,Sweet-kid/Algorithm-Implementations,imrandomizer/Algorithm-Implementations,n1ghtmare/Algorithm-Implementations,varunparkhe/Algorithm-Implementations,Yonaba/Algorithm-Implementations,varunparkhe/Algorithm-Implementations,joshimoo/Algorithm-Implementations,n1ghtmare/Algorithm-Implementations,jiang42/Algorithm-Implementations,sugiartocokrowibowo/Algorithm-Implementations,warreee/Algorithm-Implementations,warreee/Algorithm-Implementations,kennyledet/Algorithm-Implementations,kidaa/Algorithm-Implementations,jiang42/Algorithm-Implementations,praveenjha527/Algorithm-Implementations,aayushKumarJarvis/Algorithm-Implementations,rohanp/Algorithm-Implementations,Etiene/Algorithm-Implementations,joshimoo/Algorithm-Implementations,kidaa/Algorithm-Implementations,movb/Algorithm-Implementations,sugiartocokrowibowo/Algorithm-Implementations,movb/Algorithm-Implementations,movb/Algorithm-Implementations,sugiartocokrowibowo/Algorithm-Implementations,AntonioModer/Algorithm-Implementations,varunparkhe/Algorithm-Implementations,varunparkhe/Algorithm-Implementations,Yonaba/Algorithm-Implementations,n1ghtmare/Algorithm-Implementations,Yonaba/Algorithm-Implementations,jb1717/Algorithm-Implementations,Sweet-kid/Algorithm-Implementations,vikas17a/Algorithm-Implementations,imrandomizer/Algorithm-Implementations,Sweet-kid/Algorithm-Implementations,praveenjha527/Algorithm-Implementations,kennyledet/Algorithm-Implementations,pravsingh/Algorithm-Implementations,Sweet-kid/Algorithm-Implementations,Yonaba/Algorithm-Implementations,vikas17a/Algorithm-Implementations,aayushKumarJarvis/Algorithm-Implementations,isalnikov/Algorithm-Implementations,sugiartocokrowibowo/Algorithm-Implementations,imanmafi/Algorithm-Implementations,varunparkhe/Algorithm-Implementations,jb1717/Algorithm-Implementations,kidaa/Algorithm-Implementations,kennyledet/Algorithm-Implementations,movb/Algorithm-Implementations,isalnikov/Algorithm-Implementations,vikas17a/Algorithm-Implementations,Endika/Algorithm-Implementations,AntonioModer/Algorithm-Implementations,rohanp/Algorithm-Implementations,girishramnani/Algorithm-Implementations,pravsingh/Algorithm-Implementations,praveenjha527/Algorithm-Implementations,joshimoo/Algorithm-Implementations,imanmafi/Algorithm-Implementations,movb/Algorithm-Implementations,rohanp/Algorithm-Implementations,jb1717/Algorithm-Implementations,joshimoo/Algorithm-Implementations,jb1717/Algorithm-Implementations,sugiartocokrowibowo/Algorithm-Implementations,warreee/Algorithm-Implementations,Endika/Algorithm-Implementations,rohanp/Algorithm-Implementations,aayushKumarJarvis/Algorithm-Implementations,jb1717/Algorithm-Implementations,aayushKumarJarvis/Algorithm-Implementations,AntonioModer/Algorithm-Implementations,imanmafi/Algorithm-Implementations,AntonioModer/Algorithm-Implementations,joshimoo/Algorithm-Implementations,Yonaba/Algorithm-Implementations,warreee/Algorithm-Implementations,Etiene/Algorithm-Implementations,Etiene/Algorithm-Implementations,pravsingh/Algorithm-Implementations,joshimoo/Algorithm-Implementations,imrandomizer/Algorithm-Implementations,jb1717/Algorithm-Implementations,Endika/Algorithm-Implementations,kidaa/Algorithm-Implementations,n1ghtmare/Algorithm-Implementations,mishin/Algorithm-Implementations,varunparkhe/Algorithm-Implementations,warreee/Algorithm-Implementations,warreee/Algorithm-Implementations,kidaa/Algorithm-Implementations,imrandomizer/Algorithm-Implementations,isalnikov/Algorithm-Implementations,AntonioModer/Algorithm-Implementations,kidaa/Algorithm-Implementations,isalnikov/Algorithm-Implementations,vikas17a/Algorithm-Implementations,jb1717/Algorithm-Implementations,girishramnani/Algorithm-Implementations,jiang42/Algorithm-Implementations,kennyledet/Algorithm-Implementations,jiang42/Algorithm-Implementations,jb1717/Algorithm-Implementations,isalnikov/Algorithm-Implementations,aayushKumarJarvis/Algorithm-Implementations,girishramnani/Algorithm-Implementations,joshimoo/Algorithm-Implementations,jiang42/Algorithm-Implementations,sugiartocokrowibowo/Algorithm-Implementations,sugiartocokrowibowo/Algorithm-Implementations,Sweet-kid/Algorithm-Implementations,kennyledet/Algorithm-Implementations,Yonaba/Algorithm-Implementations,mishin/Algorithm-Implementations,imanmafi/Algorithm-Implementations,jiang42/Algorithm-Implementations,jiang42/Algorithm-Implementations,mishin/Algorithm-Implementations,AntonioModer/Algorithm-Implementations,kidaa/Algorithm-Implementations,Sweet-kid/Algorithm-Implementations,girishramnani/Algorithm-Implementations,vikas17a/Algorithm-Implementations,isalnikov/Algorithm-Implementations,Endika/Algorithm-Implementations,warreee/Algorithm-Implementations,kidaa/Algorithm-Implementations,AntonioModer/Algorithm-Implementations,n1ghtmare/Algorithm-Implementations,mishin/Algorithm-Implementations,Etiene/Algorithm-Implementations,Etiene/Algorithm-Implementations,sugiartocokrowibowo/Algorithm-Implementations,joshimoo/Algorithm-Implementations,isalnikov/Algorithm-Implementations,pravsingh/Algorithm-Implementations,sugiartocokrowibowo/Algorithm-Implementations,Sweet-kid/Algorithm-Implementations,mishin/Algorithm-Implementations,jb1717/Algorithm-Implementations,kidaa/Algorithm-Implementations,pravsingh/Algorithm-Implementations,Yonaba/Algorithm-Implementations,AntonioModer/Algorithm-Implementations,sugiartocokrowibowo/Algorithm-Implementations,vikas17a/Algorithm-Implementations,aayushKumarJarvis/Algorithm-Implementations,Endika/Algorithm-Implementations,rohanp/Algorithm-Implementations,mishin/Algorithm-Implementations,aayushKumarJarvis/Algorithm-Implementations,kidaa/Algorithm-Implementations,movb/Algorithm-Implementations,mishin/Algorithm-Implementations,kidaa/Algorithm-Implementations,varunparkhe/Algorithm-Implementations,Endika/Algorithm-Implementations,aayushKumarJarvis/Algorithm-Implementations,imanmafi/Algorithm-Implementations,rohanp/Algorithm-Implementations,imanmafi/Algorithm-Implementations,vikas17a/Algorithm-Implementations,Etiene/Algorithm-Implementations,rohanp/Algorithm-Implementations,isalnikov/Algorithm-Implementations,jiang42/Algorithm-Implementations,Etiene/Algorithm-Implementations,aayushKumarJarvis/Algorithm-Implementations,aayushKumarJarvis/Algorithm-Implementations,imanmafi/Algorithm-Implementations,vikas17a/Algorithm-Implementations,mishin/Algorithm-Implementations,vikas17a/Algorithm-Implementations,praveenjha527/Algorithm-Implementations,praveenjha527/Algorithm-Implementations,girishramnani/Algorithm-Implementations,kidaa/Algorithm-Implementations,kennyledet/Algorithm-Implementations,movb/Algorithm-Implementations,imanmafi/Algorithm-Implementations,rohanp/Algorithm-Implementations,kennyledet/Algorithm-Implementations,girishramnani/Algorithm-Implementations,jiang42/Algorithm-Implementations,movb/Algorithm-Implementations,n1ghtmare/Algorithm-Implementations,AntonioModer/Algorithm-Implementations,isalnikov/Algorithm-Implementations,varunparkhe/Algorithm-Implementations,rohanp/Algorithm-Implementations,warreee/Algorithm-Implementations,aayushKumarJarvis/Algorithm-Implementations,Yonaba/Algorithm-Implementations,rohanp/Algorithm-Implementations,jb1717/Algorithm-Implementations,imrandomizer/Algorithm-Implementations,kennyledet/Algorithm-Implementations,Yonaba/Algorithm-Implementations,Yonaba/Algorithm-Implementations,imrandomizer/Algorithm-Implementations,Etiene/Algorithm-Implementations,Sweet-kid/Algorithm-Implementations,mishin/Algorithm-Implementations,Endika/Algorithm-Implementations,movb/Algorithm-Implementations,imanmafi/Algorithm-Implementations,imanmafi/Algorithm-Implementations,kennyledet/Algorithm-Implementations,isalnikov/Algorithm-Implementations,Endika/Algorithm-Implementations,isalnikov/Algorithm-Implementations,jb1717/Algorithm-Implementations,AntonioModer/Algorithm-Implementations,praveenjha527/Algorithm-Implementations,joshimoo/Algorithm-Implementations,pravsingh/Algorithm-Implementations,imanmafi/Algorithm-Implementations,rohanp/Algorithm-Implementations,pravsingh/Algorithm-Implementations,Etiene/Algorithm-Implementations,warreee/Algorithm-Implementations,Yonaba/Algorithm-Implementations,Endika/Algorithm-Implementations,warreee/Algorithm-Implementations,mishin/Algorithm-Implementations,movb/Algorithm-Implementations,n1ghtmare/Algorithm-Implementations,Sweet-kid/Algorithm-Implementations,n1ghtmare/Algorithm-Implementations,varunparkhe/Algorithm-Implementations,pravsingh/Algorithm-Implementations,joshimoo/Algorithm-Implementations,jiang42/Algorithm-Implementations,warreee/Algorithm-Implementations,kennyledet/Algorithm-Implementations,vikas17a/Algorithm-Implementations,mishin/Algorithm-Implementations,n1ghtmare/Algorithm-Implementations,jb1717/Algorithm-Implementations,Yonaba/Algorithm-Implementations,girishramnani/Algorithm-Implementations,imanmafi/Algorithm-Implementations,pravsingh/Algorithm-Implementations,girishramnani/Algorithm-Implementations,warreee/Algorithm-Implementations,rohanp/Algorithm-Implementations,isalnikov/Algorithm-Implementations,pravsingh/Algorithm-Implementations,joshimoo/Algorithm-Implementations,varunparkhe/Algorithm-Implementations,kennyledet/Algorithm-Implementations,mishin/Algorithm-Implementations,jiang42/Algorithm-Implementations,n1ghtmare/Algorithm-Implementations,imrandomizer/Algorithm-Implementations,movb/Algorithm-Implementations,vikas17a/Algorithm-Implementations,Endika/Algorithm-Implementations,Endika/Algorithm-Implementations,vikas17a/Algorithm-Implementations,kennyledet/Algorithm-Implementations,jb1717/Algorithm-Implementations,Endika/Algorithm-Implementations,mishin/Algorithm-Implementations,praveenjha527/Algorithm-Implementations,kidaa/Algorithm-Implementations,praveenjha527/Algorithm-Implementations,sugiartocokrowibowo/Algorithm-Implementations,Sweet-kid/Algorithm-Implementations,sugiartocokrowibowo/Algorithm-Implementations,kidaa/Algorithm-Implementations,Sweet-kid/Algorithm-Implementations,jiang42/Algorithm-Implementations,girishramnani/Algorithm-Implementations,AntonioModer/Algorithm-Implementations,joshimoo/Algorithm-Implementations,Etiene/Algorithm-Implementations,joshimoo/Algorithm-Implementations,girishramnani/Algorithm-Implementations,praveenjha527/Algorithm-Implementations,imrandomizer/Algorithm-Implementations,girishramnani/Algorithm-Implementations,Sweet-kid/Algorithm-Implementations,movb/Algorithm-Implementations,mishin/Algorithm-Implementations,joshimoo/Algorithm-Implementations,imanmafi/Algorithm-Implementations,girishramnani/Algorithm-Implementations,rohanp/Algorithm-Implementations,warreee/Algorithm-Implementations,sugiartocokrowibowo/Algorithm-Implementations,jb1717/Algorithm-Implementations,kennyledet/Algorithm-Implementations,pravsingh/Algorithm-Implementations,imanmafi/Algorithm-Implementations,vikas17a/Algorithm-Implementations,isalnikov/Algorithm-Implementations,imrandomizer/Algorithm-Implementations,n1ghtmare/Algorithm-Implementations,jiang42/Algorithm-Implementations,mishin/Algorithm-Implementations,rohanp/Algorithm-Implementations,isalnikov/Algorithm-Implementations,n1ghtmare/Algorithm-Implementations,rohanp/Algorithm-Implementations,kidaa/Algorithm-Implementations,varunparkhe/Algorithm-Implementations,sugiartocokrowibowo/Algorithm-Implementations,pravsingh/Algorithm-Implementations,isalnikov/Algorithm-Implementations,warreee/Algorithm-Implementations,kennyledet/Algorithm-Implementations,Yonaba/Algorithm-Implementations,varunparkhe/Algorithm-Implementations,n1ghtmare/Algorithm-Implementations,praveenjha527/Algorithm-Implementations,vikas17a/Algorithm-Implementations,imrandomizer/Algorithm-Implementations,praveenjha527/Algorithm-Implementations,Etiene/Algorithm-Implementations,Endika/Algorithm-Implementations,pravsingh/Algorithm-Implementations,movb/Algorithm-Implementations,Sweet-kid/Algorithm-Implementations,warreee/Algorithm-Implementations,jiang42/Algorithm-Implementations,Etiene/Algorithm-Implementations,praveenjha527/Algorithm-Implementations,varunparkhe/Algorithm-Implementations,movb/Algorithm-Implementations,movb/Algorithm-Implementations,warreee/Algorithm-Implementations,imanmafi/Algorithm-Implementations,jiang42/Algorithm-Implementations,Sweet-kid/Algorithm-Implementations
e2a56532a31b57dbe6e8f6bec74899deb724b2a3
chrome/browser/extensions/extension_message_handler.h
chrome/browser/extensions/extension_message_handler.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_EXTENSIONS_EXTENSION_MESSAGE_HANDLER_H_ #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_HANDLER_H_ #pragma once #include "content/browser/renderer_host/render_view_host_observer.h" class Profile; struct ExtensionHostMsg_DomMessage_Params; // Filters and dispatches extension-related IPC messages that arrive from // renderer/extension processes. This object is created for renderers and also // ExtensionHost/BackgroundContents. Contrast this with ExtensionTabHelper, // which is only created for TabContents. class ExtensionMessageHandler : public RenderViewHostObserver { public: // |sender| is guaranteed to outlive this object. explicit ExtensionMessageHandler(RenderViewHost* render_view_host); virtual ~ExtensionMessageHandler(); // RenderViewHostObserver overrides. virtual bool OnMessageReceived(const IPC::Message& message); private: // Message handlers. void OnPostMessage(int port_id, const std::string& message); void OnRequest(const ExtensionHostMsg_DomMessage_Params& params); DISALLOW_COPY_AND_ASSIGN(ExtensionMessageHandler); }; #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_HANDLER_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_EXTENSIONS_EXTENSION_MESSAGE_HANDLER_H_ #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_HANDLER_H_ #pragma once #include "content/browser/renderer_host/render_view_host_observer.h" class Profile; struct ExtensionHostMsg_DomMessage_Params; // Filters and dispatches extension-related IPC messages that arrive from // renderers. There is one of these objects for each RenderViewHost in Chrome. // Contrast this with ExtensionTabHelper, which is only created for TabContents. class ExtensionMessageHandler : public RenderViewHostObserver { public: // |sender| is guaranteed to outlive this object. explicit ExtensionMessageHandler(RenderViewHost* render_view_host); virtual ~ExtensionMessageHandler(); // RenderViewHostObserver overrides. virtual bool OnMessageReceived(const IPC::Message& message); private: // Message handlers. void OnPostMessage(int port_id, const std::string& message); void OnRequest(const ExtensionHostMsg_DomMessage_Params& params); DISALLOW_COPY_AND_ASSIGN(ExtensionMessageHandler); }; #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_HANDLER_H_
Clarify class comment for ExtensionMessageHandler.
Clarify class comment for ExtensionMessageHandler. [email protected] git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@82674 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
patrickm/chromium.src,rogerwang/chromium,pozdnyakov/chromium-crosswalk,ltilve/chromium,axinging/chromium-crosswalk,zcbenz/cefode-chromium,ltilve/chromium,fujunwei/chromium-crosswalk,markYoungH/chromium.src,ondra-novak/chromium.src,robclark/chromium,axinging/chromium-crosswalk,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,dushu1203/chromium.src,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Just-D/chromium-1,littlstar/chromium.src,littlstar/chromium.src,hujiajie/pa-chromium,markYoungH/chromium.src,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,ltilve/chromium,dushu1203/chromium.src,M4sse/chromium.src,chuan9/chromium-crosswalk,junmin-zhu/chromium-rivertrail,M4sse/chromium.src,Chilledheart/chromium,mogoweb/chromium-crosswalk,Chilledheart/chromium,zcbenz/cefode-chromium,anirudhSK/chromium,Just-D/chromium-1,rogerwang/chromium,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,anirudhSK/chromium,dushu1203/chromium.src,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,littlstar/chromium.src,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,M4sse/chromium.src,markYoungH/chromium.src,hujiajie/pa-chromium,rogerwang/chromium,dednal/chromium.src,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,keishi/chromium,Jonekee/chromium.src,ChromiumWebApps/chromium,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,chuan9/chromium-crosswalk,junmin-zhu/chromium-rivertrail,keishi/chromium,ChromiumWebApps/chromium,ltilve/chromium,chuan9/chromium-crosswalk,keishi/chromium,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,rogerwang/chromium,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,rogerwang/chromium,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,markYoungH/chromium.src,littlstar/chromium.src,zcbenz/cefode-chromium,Just-D/chromium-1,nacl-webkit/chrome_deps,hujiajie/pa-chromium,zcbenz/cefode-chromium,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,junmin-zhu/chromium-rivertrail,axinging/chromium-crosswalk,dushu1203/chromium.src,hujiajie/pa-chromium,patrickm/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Chilledheart/chromium,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,Jonekee/chromium.src,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,robclark/chromium,fujunwei/chromium-crosswalk,robclark/chromium,Jonekee/chromium.src,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,krieger-od/nwjs_chromium.src,anirudhSK/chromium,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,Chilledheart/chromium,bright-sparks/chromium-spacewalk,keishi/chromium,mogoweb/chromium-crosswalk,ltilve/chromium,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,timopulkkinen/BubbleFish,Just-D/chromium-1,Fireblend/chromium-crosswalk,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,robclark/chromium,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,anirudhSK/chromium,rogerwang/chromium,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,markYoungH/chromium.src,Just-D/chromium-1,anirudhSK/chromium,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,anirudhSK/chromium,patrickm/chromium.src,dednal/chromium.src,hujiajie/pa-chromium,littlstar/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,zcbenz/cefode-chromium,rogerwang/chromium,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,keishi/chromium,ChromiumWebApps/chromium,patrickm/chromium.src,robclark/chromium,Jonekee/chromium.src,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,dednal/chromium.src,dednal/chromium.src,Chilledheart/chromium,hujiajie/pa-chromium,timopulkkinen/BubbleFish,keishi/chromium,chuan9/chromium-crosswalk,rogerwang/chromium,robclark/chromium,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,dushu1203/chromium.src,patrickm/chromium.src,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,chuan9/chromium-crosswalk,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,junmin-zhu/chromium-rivertrail,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,ltilve/chromium,Fireblend/chromium-crosswalk,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,rogerwang/chromium,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,ltilve/chromium,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,hujiajie/pa-chromium,Chilledheart/chromium,timopulkkinen/BubbleFish,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,dednal/chromium.src,keishi/chromium,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,anirudhSK/chromium,dushu1203/chromium.src,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,Chilledheart/chromium,dednal/chromium.src,patrickm/chromium.src,mogoweb/chromium-crosswalk,keishi/chromium,axinging/chromium-crosswalk,jaruba/chromium.src,dednal/chromium.src,Fireblend/chromium-crosswalk,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,robclark/chromium,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,ChromiumWebApps/chromium,ltilve/chromium,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,M4sse/chromium.src,keishi/chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,keishi/chromium,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,ondra-novak/chromium.src,Jonekee/chromium.src,robclark/chromium,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,ondra-novak/chromium.src,ltilve/chromium,Jonekee/chromium.src,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,M4sse/chromium.src,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,dednal/chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,nacl-webkit/chrome_deps,M4sse/chromium.src,jaruba/chromium.src,keishi/chromium,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,robclark/chromium,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,bright-sparks/chromium-spacewalk,anirudhSK/chromium,zcbenz/cefode-chromium,Just-D/chromium-1,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,rogerwang/chromium,littlstar/chromium.src,robclark/chromium,Jonekee/chromium.src
93bab8bda167cd28c0b356001a043927ff9f9a50
test/Driver/XRay/xray-instrument-os.c
test/Driver/XRay/xray-instrument-os.c
// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s // XFAIL: -linux- // REQUIRES-ANY: amd64, x86_64, x86_64h, arm, aarch64, arm64 typedef int a;
// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s // XFAIL: -linux- // REQUIRES: amd64 || x86_64 || x86_64h || arm || aarch64 || arm64 typedef int a;
Replace `REQUIRES-ANY: a, b, c` with `REQUIRES: a || b || c`.
[test] Replace `REQUIRES-ANY: a, b, c` with `REQUIRES: a || b || c`. Requires the new `lit` boolean expressions in LLVM r292896. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@292897 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
090cf42f736ad66ecc9360cf2770d83f8ea30574
3RVX/Controllers/Volume/VolumeTransformation.h
3RVX/Controllers/Volume/VolumeTransformation.h
#pragma once class VolumeTransformation { public: /// <summary> /// Transforms a given volume level to a new ("virtual") level based on a /// formula or set of rules (e.g., a volume curve transformation). /// </summary> virtual float Apply(float vol) = 0; /// <summary> /// Given a transformed ("virtual") volume value, this function reverts it /// back to its original value (assuming the given value was produced /// by the ToVirtual() function). /// </summary> virtual float Revert(float vol) = 0; };
#pragma once class VolumeTransformation { public: /// <summary> /// Transforms a given volume level to a new ("virtual") level based on a /// formula or set of rules (e.g., a volume curve transformation). /// </summary> virtual float Apply(float vol) = 0; /// <summary> /// Given a transformed ("virtual") volume value, this function reverts it /// back to its original value (assuming the given value was produced /// by the ToVirtual() function). /// </summary> virtual float Revert(float vol) = 0; /// <summary> /// Applies several transformations supplied as a vector to the initial /// value provided. The transformations are applied in order of appearance /// in the vector. /// </summary> static float ApplyTransformations( std::vector<VolumeTransformation *> &transforms, float initialVal) { float newVal = initialVal; for (VolumeTransformation *trans : transforms) { newVal = trans->Apply(newVal); } return newVal; } /// <summary> /// Reverts several transformations, starting with a transformed ("virtual") /// value. This method reverts the transformations in reverse order. /// </summary> static float RevertTransformations( std::vector<VolumeTransformation *> &transforms, float virtVal) { float newVal = virtVal; for (auto it = transforms.rbegin(); it != transforms.rend(); ++it) { newVal = (*it)->Revert(newVal); } return newVal; } };
Add methods to apply multiple transformations
Add methods to apply multiple transformations
C
bsd-2-clause
malensek/3RVX,malensek/3RVX,malensek/3RVX
0d2669635000a9815823129f10641fecfbe68da3
master/types.h
master/types.h
//Declarations for master types typedef enum { Register = 0 } MODBUSDataType; //MODBUS data types enum (coil, register, input, etc.) typedef struct { uint8_t Address; //Device address uint8_t Code; //Exception code } MODBUSExceptionLog; //Parsed exception data typedef struct { uint8_t Address; //Device address MODBUSDataType DataType; //Data type uint16_t Register; //Register, coil, input ID uint16_t Value; //Value of data } MODBUSData; typedef struct { uint8_t Length; //Length of frame, if it's equal to 0, frame is not ready uint8_t *Frame; //Request frame content } MODBUSRequestStatus; //Type containing information about frame that is set up at master side typedef struct { MODBUSData *Data; //Data read from slave MODBUSExceptionLog Exception; //Optional exception read MODBUSRequestStatus Request; //Formatted request for slave uint8_t DataLength; //Count of data type instances read from slave uint8_t Error; //Have any error occured? } MODBUSMasterStatus; //Type containing master device configuration data
//Declarations for master types typedef enum { Register = 0 } MODBUSDataType; //MODBUS data types enum (coil, register, input, etc.) typedef struct { uint8_t Address; //Device address uint8_t Function; //Function called, in which exception occured uint8_t Code; //Exception code } MODBUSExceptionLog; //Parsed exception data typedef struct { uint8_t Address; //Device address MODBUSDataType DataType; //Data type uint16_t Register; //Register, coil, input ID uint16_t Value; //Value of data } MODBUSData; typedef struct { uint8_t Length; //Length of frame, if it's equal to 0, frame is not ready uint8_t *Frame; //Request frame content } MODBUSRequestStatus; //Type containing information about frame that is set up at master side typedef struct { MODBUSData *Data; //Data read from slave MODBUSExceptionLog Exception; //Optional exception read MODBUSRequestStatus Request; //Formatted request for slave uint8_t DataLength; //Count of data type instances read from slave uint8_t Error; //Have any error occured? } MODBUSMasterStatus; //Type containing master device configuration data
Add function ID member in MODBUSExceptionLog structure
Add function ID member in MODBUSExceptionLog structure
C
mit
Jacajack/modlib
3463c9ea4607dd986af7d82c905acbb8b2e21f27
test/Analysis/std-c-library-functions-inlined.c
test/Analysis/std-c-library-functions-inlined.c
// RUN: %clang_analyze_cc1 -analyzer-checker=unix.StdCLibraryFunctions -verify %s // RUN: %clang_analyze_cc1 -triple i686-unknown-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s // RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s // RUN: %clang_analyze_cc1 -triple armv7-a15-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s // RUN: %clang_analyze_cc1 -triple thumbv7-a15-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s // This test tests crashes that occur when standard functions are available // for inlining. // expected-no-diagnostics int isdigit(int _) { return !0; } void test_redefined_isdigit(int x) { int (*func)(int) = isdigit; for (; func(x);) // no-crash ; }
Add a test forgotten in r339088.
[analyzer] Add a test forgotten in r339088. Differential Revision: https://reviews.llvm.org/D50363 git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@339726 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
9705782c98265c05bc87a10b1fb69bd35781c754
decoder/dict.h
decoder/dict.h
#ifndef DICT_H_ #define DICT_H_ #include <cassert> #include <cstring> #include <tr1/unordered_map> #include <string> #include <vector> #include <boost/functional/hash.hpp> #include "wordid.h" class Dict { typedef std::tr1::unordered_map<std::string, WordID, boost::hash<std::string> > Map; public: Dict() : b0_("<bad0>") { words_.reserve(1000); } inline int max() const { return words_.size(); } inline WordID Convert(const std::string& word, bool frozen = false) { Map::iterator i = d_.find(word); if (i == d_.end()) { if (frozen) return 0; words_.push_back(word); d_[word] = words_.size(); return words_.size(); } else { return i->second; } } inline const std::string& Convert(const WordID& id) const { if (id == 0) return b0_; assert(id <= words_.size()); return words_[id-1]; } void clear() { words_.clear(); d_.clear(); } private: const std::string b0_; std::vector<std::string> words_; Map d_; }; #endif
#ifndef DICT_H_ #define DICT_H_ #include <cassert> #include <cstring> #include <tr1/unordered_map> #include <string> #include <vector> #include <boost/functional/hash.hpp> #include "wordid.h" class Dict { typedef std::tr1::unordered_map<std::string, WordID, boost::hash<std::string> > Map; public: Dict() : b0_("<bad0>") { words_.reserve(1000); } inline int max() const { return words_.size(); } inline WordID Convert(const std::string& word, bool frozen = false) { Map::iterator i = d_.find(word); if (i == d_.end()) { if (frozen) return 0; words_.push_back(word); d_[word] = words_.size(); return words_.size(); } else { return i->second; } } inline WordID Convert(const std::vector<std::string>& words, bool frozen = false) { std::string word= ""; for (std::vector<std::string>::const_iterator it=words.begin(); it != words.end(); ++it) { if (it != words.begin()) word += "__"; word += *it; } return Convert(word, frozen); } inline const std::string& Convert(const WordID& id) const { if (id == 0) return b0_; assert(id <= words_.size()); return words_[id-1]; } void clear() { words_.clear(); d_.clear(); } private: const std::string b0_; std::vector<std::string> words_; Map d_; }; #endif
Update utility functions to work with pyp-topics.
Update utility functions to work with pyp-topics. git-svn-id: 357248c53bdac2d7b36f7ee045286eb205fcf757@49 ec762483-ff6d-05da-a07a-a48fb63a330f
C
apache-2.0
pks/cdec-dtrain-legacy,kho/mr-cdec,kho/mr-cdec,agesmundo/FasterCubePruning,agesmundo/FasterCubePruning,kho/mr-cdec,agesmundo/FasterCubePruning,pks/cdec-dtrain-legacy,pks/cdec-dtrain-legacy,agesmundo/FasterCubePruning,pks/cdec-dtrain-legacy,agesmundo/FasterCubePruning,kho/mr-cdec,kho/mr-cdec,agesmundo/FasterCubePruning,pks/cdec-dtrain-legacy,kho/mr-cdec,pks/cdec-dtrain-legacy
723fda1013baccca0a0686d465fb47b426ebc6b8
bayesiannetwork.h
bayesiannetwork.h
#include "bayesian.h" namespace baysian { class bayesianNetwork : public bayesian { private: long double ***cpt; double *classCount; // this array store the total number of each // decision's class in training data int *discrete; int *classNum; // this array store the number of classes of each attribute int **parent; public: bayesianNetwork(char *); ~bayesianNetwork(); // initialize all the information we need from training data void predict(char *); // calculate the probability of each choice and choose the greatest one as our // prediction void train(char *); }; template <class Type> struct data { double key; Type value1; Type value2; }; } // namespace baysian
#include "bayesian.h" namespace baysian { class bayesianNetwork : public bayesian { private: long double ***cpt; int **parent; public: bayesianNetwork(char *); ~bayesianNetwork(); // initialize all the information we need from training data void predict(char *); // calculate the probability of each choice and choose the greatest one as our // prediction void train(char *); }; template <class Type> struct data { double key; Type value1; Type value2; }; } // namespace baysian
Move variable to base class
Move variable to base class
C
mit
lrvine/Bayesian
a4dc43cdec3a5bdee8829e4104ff732f995c8cc6
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 97 #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 98 #endif
Update Skia milestone to 98
Update Skia milestone to 98 Change-Id: I937e0594b8fa3a1cc5ac2e2b80d1f0f406772817 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/468338 Reviewed-by: Eric Boren <[email protected]> Commit-Queue: Heather Miller <[email protected]>
C
bsd-3-clause
aosp-mirror/platform_external_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,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia
7acf4549932adde2961864023db47ebfde07440d
test/Frontend/dependency-gen.c
test/Frontend/dependency-gen.c
// rdar://6533411 // RUN: %clang -MD -MF %t.d -S -x c -o %t.o %s // RUN: grep '.*dependency-gen.*:' %t.d // RUN: grep 'dependency-gen.c' %t.d // RUN: %clang -S -M -x c %s -o %t.d // RUN: grep '.*dependency-gen.*:' %t.d // RUN: grep 'dependency-gen.c' %t.d // PR8974 // XFAIL: win32 // RUN: rm -rf %t.dir // RUN: mkdir %t.dir // RUN: echo > %t.dir/x.h // RUN: %clang -include %t.dir/x.h -MD -MF %t.d -S -x c -o %t.o %s // RUN: grep ' %t.dir/x.h' %t.d
// rdar://6533411 // RUN: %clang -MD -MF %t.d -S -x c -o %t.o %s // RUN: grep '.*dependency-gen.*:' %t.d // RUN: grep 'dependency-gen.c' %t.d // RUN: %clang -S -M -x c %s -o %t.d // RUN: grep '.*dependency-gen.*:' %t.d // RUN: grep 'dependency-gen.c' %t.d // PR8974 // XFAIL: win32 // RUN: rm -rf %t.dir // RUN: mkdir -p %t.dir/a/b // RUN: echo > %t.dir/a/b/x.h // RUN: cd %t.dir // RUN: %clang -include a/b/x.h -MD -MF %t.d -S -x c -o %t.o %s // RUN: grep ' a/b/x\.h' %t.d
Tweak this test a bit further to make it easier on grep. Who knows what characters get dropped into the regular expression from %t.
Tweak this test a bit further to make it easier on grep. Who knows what characters get dropped into the regular expression from %t. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@126361 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/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,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
3df2ab08d7c3be79b496ebc746ca371ba25a3db1
util/malloccache.h
util/malloccache.h
#ifndef MALLOCCACHE_H #define MALLOCCACHE_H template <size_t blockSize, size_t blockCount> class MallocCache { public: MallocCache() : m_blocksCached(0) { } ~MallocCache() { assert(m_blocksCached >= 0 && m_blocksCached <= blockCount); for (size_t i = 0; i < m_blocksCached; i++) { ::free(m_blocks[i]); } } void *allocate() { assert(m_blocksCached >= 0 && m_blocksCached <= blockCount); if (m_blocksCached) { return m_blocks[--m_blocksCached]; } else { return ::malloc(blockSize); } } void free(void *allocation) { assert(m_blocksCached >= 0 && m_blocksCached <= blockCount); if (m_blocksCached < blockCount) { m_blocks[m_blocksCached++] = allocation; } else { ::free(allocation); } } private: void *m_blocks[blockCount]; size_t m_blocksCached; }; #endif MALLOCCACHE_H
#ifndef MALLOCCACHE_H #define MALLOCCACHE_H template <size_t blockSize, size_t blockCount> class MallocCache { public: MallocCache() : m_blocksCached(0) { } ~MallocCache() { assert(m_blocksCached >= 0 && m_blocksCached <= blockCount); for (size_t i = 0; i < m_blocksCached; i++) { ::free(m_blocks[i]); } } void *allocate() { assert(m_blocksCached >= 0 && m_blocksCached <= blockCount); if (m_blocksCached) { return m_blocks[--m_blocksCached]; } else { return ::malloc(blockSize); } } void free(void *allocation) { assert(m_blocksCached >= 0 && m_blocksCached <= blockCount); if (m_blocksCached < blockCount) { m_blocks[m_blocksCached++] = allocation; } else { ::free(allocation); } } private: void *m_blocks[blockCount]; size_t m_blocksCached; }; #endif // MALLOCCACHE_H
Fix a preprocessor syntax error. Strangely, the file still compiled.
Fix a preprocessor syntax error. Strangely, the file still compiled.
C
lgpl-2.1
KDE/dferry,KDE/dferry
ddde9def184d2a4aae122a74db99ec1b732504e5
benchmarks/halide/wrapper_fusion.h
benchmarks/halide/wrapper_fusion.h
#ifndef HALIDE__build___wrapper_fusion_o_h #define HALIDE__build___wrapper_fusion_o_h #include <coli/utils.h> #ifdef __cplusplus extern "C" { #endif int fusion_coli(buffer_t *_b_input_buffer, buffer_t *_b_output_f_buffer, buffer_t *_b_output_g_buffer) HALIDE_FUNCTION_ATTRS; int fusion_coli_argv(void **args) HALIDE_FUNCTION_ATTRS; int fusion_ref(buffer_t *_b_input_buffer, buffer_t *_b_output_f_buffer, buffer_t *_b_output_g_buffer) HALIDE_FUNCTION_ATTRS; int fusion_ref_argv(void **args) HALIDE_FUNCTION_ATTRS; // Result is never null and points to constant static data const struct halide_filter_metadata_t *fusion_coli_metadata() HALIDE_FUNCTION_ATTRS; const struct halide_filter_metadata_t *fusion_ref_metadata() HALIDE_FUNCTION_ATTRS; #ifdef __cplusplus } // extern "C" #endif #endif
#ifndef HALIDE__build___wrapper_fusion_o_h #define HALIDE__build___wrapper_fusion_o_h #include <coli/utils.h> #ifdef __cplusplus extern "C" { #endif int fusion_coli(buffer_t *_b_input_buffer, buffer_t *_b_output_f_buffer, buffer_t *_b_output_g_buffer, buffer_t *_b_output_h_buffer, buffer_t *_b_output_k_buffer) HALIDE_FUNCTION_ATTRS; int fusion_coli_argv(void **args) HALIDE_FUNCTION_ATTRS; int fusion_ref(buffer_t *_b_input_buffer, buffer_t *_b_output_f_buffer, buffer_t *_b_output_g_buffer, buffer_t *_b_output_h_buffer, buffer_t *_b_output_k_buffer) HALIDE_FUNCTION_ATTRS; int fusion_ref_argv(void **args) HALIDE_FUNCTION_ATTRS; // Result is never null and points to constant static data const struct halide_filter_metadata_t *fusion_coli_metadata() HALIDE_FUNCTION_ATTRS; const struct halide_filter_metadata_t *fusion_ref_metadata() HALIDE_FUNCTION_ATTRS; #ifdef __cplusplus } // extern "C" #endif #endif
Update wrapper fusion header file
Update wrapper fusion header file
C
mit
rbaghdadi/tiramisu,rbaghdadi/COLi,rbaghdadi/ISIR,rbaghdadi/tiramisu,rbaghdadi/ISIR,rbaghdadi/COLi,rbaghdadi/tiramisu,rbaghdadi/tiramisu
9c3742a8d8a829ec746e0a974aa30fb5dd0e3d1a
src/tslib-private.h
src/tslib-private.h
#ifndef _TSLIB_PRIVATE_H_ #define _TSLIB_PRIVATE_H_ /* * tslib/src/tslib-private.h * * Copyright (C) 2001 Russell King. * * This file is placed under the LGPL. * * * Internal touch screen library definitions. */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "tslib.h" #include "tslib-filter.h" struct tsdev { int fd; struct tslib_module_info *list; struct tslib_module_info *list_raw; /* points to position in 'list' where raw reads come from. default is the position of the ts_read_raw module. */ unsigned int res_x; unsigned int res_y; int rotation; }; int __ts_attach(struct tsdev *ts, struct tslib_module_info *info); int __ts_attach_raw(struct tsdev *ts, struct tslib_module_info *info); int ts_load_module(struct tsdev *dev, const char *module, const char *params); int ts_load_module_raw(struct tsdev *dev, const char *module, const char *params); int ts_error(const char *fmt, ...); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _TSLIB_PRIVATE_H_ */
#ifndef _TSLIB_PRIVATE_H_ #define _TSLIB_PRIVATE_H_ /* * tslib/src/tslib-private.h * * Copyright (C) 2001 Russell King. * * This file is placed under the LGPL. * * * Internal touch screen library definitions. */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "tslib.h" #include "tslib-filter.h" #define DEBUG struct tsdev { int fd; struct tslib_module_info *list; struct tslib_module_info *list_raw; /* points to position in 'list' where raw reads come from. default is the position of the ts_read_raw module. */ unsigned int res_x; unsigned int res_y; int rotation; }; int __ts_attach(struct tsdev *ts, struct tslib_module_info *info); int __ts_attach_raw(struct tsdev *ts, struct tslib_module_info *info); int ts_load_module(struct tsdev *dev, const char *module, const char *params); int ts_load_module_raw(struct tsdev *dev, const char *module, const char *params); int ts_error(const char *fmt, ...); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _TSLIB_PRIVATE_H_ */
Enable debug option for all components
Enable debug option for all components
C
lgpl-2.1
kergoth/tslib,vpeter4/tslib,lin2724/tslib,lin2724/tslib,vpeter4/tslib,pssc/tslib,kergoth/tslib,kobolabs/tslib,etmatrix/tslib,jaretcantu/tslib,leighmurray/tslib,pssc/tslib,kobolabs/tslib,etmatrix/tslib,pssc/tslib,leighmurray/tslib,folkien/tslib,folkien/tslib,etmatrix/tslib,kergoth/tslib,kergoth/tslib,jaretcantu/tslib,kobolabs/tslib
c5600ec92f953554dbb2f34ab8b17938620cff65
src/os/Win32/os_common.h
src/os/Win32/os_common.h
#ifndef OS_COMMON_H_ #define OS_COMMON_H_ #include <stddef.h> #include <fcntl.h> #include <io.h> #include <stdio.h> /* * MinGW lfind() and friends use `unsigned int *` where they should use a * `size_t *` according to the man page. */ typedef unsigned int lfind_size_t; // timeradd doesn't exist on MinGW #ifndef timeradd #define timeradd(a, b, result) \ do { \ (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ (result)->tv_sec += (result)->tv_usec / 1000000; \ (result)->tv_usec %= 1000000; \ } while (0) \ // #endif struct param_state; char *os_find_self(const char *); FILE *os_fopen(const char *, const char *); int os_get_tsimrc_path(char buf[], size_t sz); long os_getpagesize(void); int os_preamble(void); int os_set_buffering(FILE *stream, int mode); #endif /* vi: set ts=4 sw=4 et: */
#ifndef OS_COMMON_H_ #define OS_COMMON_H_ #include <stddef.h> #include <fcntl.h> #include <io.h> #include <stdio.h> #include <sys/time.h> /* * MinGW lfind() and friends use `unsigned int *` where they should use a * `size_t *` according to the man page. */ typedef unsigned int lfind_size_t; // timeradd doesn't exist on MinGW #ifndef timeradd #define timeradd timeradd static inline void timeradd(struct timeval *a, struct timeval *b, struct timeval *result) { result->tv_sec = a->tv_sec + b->tv_sec; result->tv_usec = a->tv_usec + b->tv_usec; result->tv_sec += result->tv_usec / 1000000; result->tv_usec %= 1000000; } #endif struct param_state; char *os_find_self(const char *); FILE *os_fopen(const char *, const char *); int os_get_tsimrc_path(char buf[], size_t sz); long os_getpagesize(void); int os_preamble(void); int os_set_buffering(FILE *stream, int mode); #endif /* vi: set ts=4 sw=4 et: */
Implement timeradd as an inline function
Implement timeradd as an inline function
C
mit
kulp/tenyr,kulp/tenyr,kulp/tenyr
9004e0e41a58b5af376d169bf91d320ce6705b36
adapters/Vungle/Public/Headers/VungleAdNetworkExtras.h
adapters/Vungle/Public/Headers/VungleAdNetworkExtras.h
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #import <Foundation/Foundation.h> #import <GoogleMobileAds/GADAdNetworkExtras.h> @interface VungleAdNetworkExtras : NSObject<GADAdNetworkExtras> /*! * @brief NSString with user identifier that will be passed if the ad is incentivized. * @discussion Optional. The value passed as 'user' in the an incentivized server-to-server call. */ @property(nonatomic, copy) NSString *_Nullable userId; /*! * @brief Controls whether presented ads will start in a muted state or not. */ @property(nonatomic, assign) BOOL muted; @property(nonatomic, assign) NSUInteger ordinal; @property(nonatomic, assign) NSTimeInterval flexViewAutoDismissSeconds; @property(nonatomic, copy) NSArray<NSString *> *_Nullable allPlacements; @property(nonatomic, copy) NSString *_Nullable playingPlacement; @end
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #import <Foundation/Foundation.h> #import <GoogleMobileAds/GADAdNetworkExtras.h> @interface VungleAdNetworkExtras : NSObject<GADAdNetworkExtras> /*! * @brief NSString with user identifier that will be passed if the ad is incentivized. * @discussion Optional. The value passed as 'user' in the an incentivized server-to-server call. */ @property(nonatomic, copy) NSString *_Nullable userId; /*! * @brief Controls whether presented ads will start in a muted state or not. */ @property(nonatomic, assign) BOOL muted; @property(nonatomic, assign) NSUInteger ordinal; @property(nonatomic, assign) NSTimeInterval flexViewAutoDismissSeconds; @property(nonatomic, copy) NSArray<NSString *> *_Nullable allPlacements; @property(nonatomic, copy) NSString *_Nullable playingPlacement; @property(nonatomic, copy) NSNumber *_Nullable orientations; @end
Add video orientation to play ad option
Add video orientation to play ad option
C
apache-2.0
googleads/googleads-mobile-ios-mediation,googleads/googleads-mobile-ios-mediation,googleads/googleads-mobile-ios-mediation,googleads/googleads-mobile-ios-mediation
7c73373b2c3a3b22afa807ac64d468cdf5e0f570
hellow_ioctl.h
hellow_ioctl.h
#ifndef HELLOW_IOCTL_H #define HELLOW_IOCTL_H #define HWM_LOG_OFF 0xff00 #define HWM_LOG_ON 0xff01 #endif
#ifndef HELLOW_IOCTL_H #define HELLOW_IOCTL_H #define HWM_LOG_OFF 0xff00 #define HWM_LOG_ON 0xff01 #define HWM_GET_LOG_ENT_SIZE 0xff02 #define HWM_GET_LOG_ENT 0xff03 #endif
Add macros for ioctl fetching of log data.
Add macros for ioctl fetching of log data.
C
apache-2.0
utsaslab/crashmonkey,utsaslab/crashmonkey,utsaslab/crashmonkey,utsaslab/crashmonkey
f7629773ce822641fcb918f68c4c47d79c90f903
Artsy/Classes/Views/ARArtworkRelatedArtworksView.h
Artsy/Classes/Views/ARArtworkRelatedArtworksView.h
#import "ARArtworkMasonryModule.h" #import "ARArtworkViewController.h" typedef NS_ENUM(NSInteger, ARRelatedArtworksSubviewOrder) { ARRelatedArtworksSameShow = 1, ARRelatedArtworksSameFair, ARRelatedArtworksSameAuction, ARRelatedArtworksArtistArtworks, ARRelatedArtworks, }; @class ARArtworkRelatedArtworksView; @protocol ARArtworkRelatedArtworksViewParentViewController <NSObject> @required - (void)relatedArtworksView:(ARArtworkRelatedArtworksView *)view shouldShowViewController:(UIViewController *)viewController; - (void)relatedArtworksView:(ARArtworkRelatedArtworksView *)view didAddSection:(UIView *)section; @optional - (Fair *)fair; @end @interface ARArtworkRelatedArtworksView : ORTagBasedAutoStackView <ARArtworkMasonryLayoutProvider> @property (nonatomic, weak) ARArtworkViewController<ARArtworkRelatedArtworksViewParentViewController> *parentViewController; - (void)cancelRequests; - (void)updateWithArtwork:(Artwork *)artwork; - (void)updateWithArtwork:(Artwork *)artwork withCompletion:(void(^)())completion; // TODO make all these private // Use this when showing an artwork in the context of a fair. - (void)addSectionsForFair:(Fair *)fair; // Use this when showing an artwork in the context of a show. - (void)addSectionsForShow:(PartnerShow *)show; // Use this when showing an artwork in the context of an auction. - (void)addSectionsForAuction:(Sale *)auction; // In all other cases, this should be used to simply show related artworks. - (void)addSectionWithRelatedArtworks; @end
#import "ARArtworkMasonryModule.h" #import "ARArtworkViewController.h" typedef NS_ENUM(NSInteger, ARRelatedArtworksSubviewOrder) { ARRelatedArtworksSameShow = 1, ARRelatedArtworksSameFair, ARRelatedArtworksSameAuction, ARRelatedArtworksArtistArtworks, ARRelatedArtworks, }; @class ARArtworkRelatedArtworksView; @protocol ARArtworkRelatedArtworksViewParentViewController <NSObject> @required - (void)relatedArtworksView:(ARArtworkRelatedArtworksView *)view shouldShowViewController:(UIViewController *)viewController; - (void)relatedArtworksView:(ARArtworkRelatedArtworksView *)view didAddSection:(UIView *)section; @optional - (Fair *)fair; @end @interface ARArtworkRelatedArtworksView : ORTagBasedAutoStackView <ARArtworkMasonryLayoutProvider> @property (nonatomic, weak) ARArtworkViewController<ARArtworkRelatedArtworksViewParentViewController> *parentViewController; - (void)cancelRequests; - (void)updateWithArtwork:(Artwork *)artwork; - (void)updateWithArtwork:(Artwork *)artwork withCompletion:(void(^)())completion; @end
Make adding related works sections private.
[Artwork] Make adding related works sections private.
C
mit
1aurabrown/eigen,artsy/eigen,Havi4/eigen,artsy/eigen,mbogh/eigen,TribeMedia/eigen,gaurav1981/eigen,Havi4/eigen,artsy/eigen,ichu501/eigen,sarahscott/eigen,orta/eigen,ichu501/eigen,gaurav1981/eigen,ashkan18/eigen,ayunav/eigen,liduanw/eigen,ACChe/eigen,artsy/eigen,artsy/eigen,foxsofter/eigen,Shawn-WangDapeng/eigen,ayunav/eigen,ppamorim/eigen,srrvnn/eigen,liduanw/eigen,1aurabrown/eigen,neonichu/eigen,TribeMedia/eigen,ashkan18/eigen,Shawn-WangDapeng/eigen,artsy/eigen,1aurabrown/eigen,liduanw/eigen,TribeMedia/eigen,Shawn-WangDapeng/eigen,liduanw/eigen,Havi4/eigen,xxclouddd/eigen,ppamorim/eigen,Havi4/eigen,xxclouddd/eigen,ashkan18/eigen,ACChe/eigen,gaurav1981/eigen,sarahscott/eigen,neonichu/eigen,liduanw/eigen,ichu501/eigen,mbogh/eigen,ppamorim/eigen,foxsofter/eigen,ayunav/eigen,orta/eigen,srrvnn/eigen,ayunav/eigen,xxclouddd/eigen,sarahscott/eigen,TribeMedia/eigen,foxsofter/eigen,ichu501/eigen,Shawn-WangDapeng/eigen,mbogh/eigen,zhuzhengwei/eigen,zhuzhengwei/eigen,ACChe/eigen,xxclouddd/eigen,neonichu/eigen,srrvnn/eigen,gaurav1981/eigen,ayunav/eigen,1aurabrown/eigen,srrvnn/eigen,ashkan18/eigen,srrvnn/eigen,orta/eigen,ACChe/eigen,ichu501/eigen,artsy/eigen,foxsofter/eigen,zhuzhengwei/eigen,foxsofter/eigen,sarahscott/eigen,xxclouddd/eigen,Shawn-WangDapeng/eigen,ashkan18/eigen,mbogh/eigen,gaurav1981/eigen,neonichu/eigen,ppamorim/eigen,zhuzhengwei/eigen,ACChe/eigen,neonichu/eigen,TribeMedia/eigen,orta/eigen
5699bd2a8106b4fefd59fb4c3a5a63a295a86a6a
OutputBitmap.h
OutputBitmap.h
#ifndef OUTPUTBITMAP_H #define OUTPUTBITMAP_H #include <iostream> #include "common.h" using std::ostream; class OutputBitmap { protected: unsigned int width, height; OutputBitmap(unsigned int width, unsigned int height) : width(width), height(height) {}; public: unsigned int getWidth() const { return width; }; unsigned int getHeight() const { return height; }; void setPixel(unsigned int x, unsigned int y, const color& c) = 0; void getPixel(unsigned int x, unsigned int y, color& c) = 0; color getPixel(unsigned int x, unsigned int y) = 0; void commit() = 0; void write(ostream& output) = 0; }; operator << (ofstream& output, OutputBitmap bitmap) { bitmap.write(output); }
Add an abstract bitmap class.
Add an abstract bitmap class.
C
mit
bertptrs/raytracpp
c183c2b8aac1bfaefe82c9532bd16ec0f373142b
lib/callbacks.c
lib/callbacks.c
#include <libterm_internal.h> void term_update(term_t_i *term) { if( term->dirty.exists && term->update != NULL ) { term->update(TO_H(term), term->dirty.x, term->dirty.y, term->dirty.width, term->dirty.height); term->dirty.exists = false; } } void term_cursor_update(term_t_i *term) { if( term->dirty_cursor.exists && term->cursor_update != NULL ) { term->cursor_update(TO_H(term), term->dirty_cursor.old_ccol, term->dirty_cursor.old_crow - (term->grid.history - term->grid.height), term->ccol, term->crow - (term->grid.history - term->grid.height)); term->dirty_cursor.exists = false; term->dirty_cursor.old_ccol = term->ccol; term->dirty_cursor.old_crow = term->crow; } }
#include <libterm_internal.h> void term_update(term_t_i *term) { if( term->dirty.exists && term->update != NULL ) { term->update(TO_H(term), term->dirty.x, term->dirty.y - (term->grid.history - term->grid.height), term->dirty.width, term->dirty.height); term->dirty.exists = false; } } void term_cursor_update(term_t_i *term) { if( term->dirty_cursor.exists && term->cursor_update != NULL ) { term->cursor_update(TO_H(term), term->dirty_cursor.old_ccol, term->dirty_cursor.old_crow - (term->grid.history - term->grid.height), term->ccol, term->crow - (term->grid.history - term->grid.height)); term->dirty_cursor.exists = false; term->dirty_cursor.old_ccol = term->ccol; term->dirty_cursor.old_crow = term->crow; } }
Fix update callback position to be grid-relative not scrollback-relative.
Fix update callback position to be grid-relative not scrollback-relative.
C
apache-2.0
absmall/libterm,absmall/libterm
21c2371374733091f549f1c7451261e6237af646
ext/ffi_c/rbffi.h
ext/ffi_c/rbffi.h
/* * File: rbffi.h * Author: wayne * * Created on August 27, 2008, 5:40 PM */ #ifndef _RBFFI_H #define _RBFFI_H #include <ruby.h> #ifdef __cplusplus extern "C" { #endif #define MAX_PARAMETERS (32) extern void rb_FFI_AbstractMemory_Init(); extern void rb_FFI_MemoryPointer_Init(); extern void rb_FFI_Buffer_Init(); extern void rb_FFI_Callback_Init(); extern void rb_FFI_Invoker_Init(); extern VALUE rb_FFI_AbstractMemory_class; #ifdef __cplusplus } #endif #endif /* _RBFFI_H */
#ifndef _RBFFI_H #define _RBFFI_H #include <ruby.h> #ifdef __cplusplus extern "C" { #endif #define MAX_PARAMETERS (32) extern void rb_FFI_AbstractMemory_Init(); extern void rb_FFI_MemoryPointer_Init(); extern void rb_FFI_Buffer_Init(); extern void rb_FFI_Callback_Init(); extern void rb_FFI_Invoker_Init(); extern VALUE rb_FFI_AbstractMemory_class; #ifdef __cplusplus } #endif #endif /* _RBFFI_H */
Remove comment at top of file
Remove comment at top of file
C
bsd-3-clause
ffi/ffi,sparkchaser/ffi,yghannam/ffi,yghannam/ffi,sparkchaser/ffi,tduehr/ffi,MikaelSmith/ffi,sparkchaser/ffi,MikaelSmith/ffi,sparkchaser/ffi,MikaelSmith/ffi,mvz/ffi,ferventcoder/ffi,yghannam/ffi,ferventcoder/ffi,majioa/ffi,mvz/ffi,ferventcoder/ffi,tduehr/ffi,MikaelSmith/ffi,ferventcoder/ffi,ffi/ffi,tduehr/ffi,mvz/ffi,yghannam/ffi,majioa/ffi,tduehr/ffi,majioa/ffi,mvz/ffi,yghannam/ffi,majioa/ffi,ffi/ffi
8504c7c838219029c7e92818f663c777b8bbe5b6
common_audio/signal_processing/cross_correlation.c
common_audio/signal_processing/cross_correlation.c
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" /* C version of WebRtcSpl_CrossCorrelation() for generic platforms. */ void WebRtcSpl_CrossCorrelationC(int32_t* cross_correlation, const int16_t* seq1, const int16_t* seq2, int16_t dim_seq, int16_t dim_cross_correlation, int right_shifts, int step_seq2) { int i = 0, j = 0; for (i = 0; i < dim_cross_correlation; i++) { int32_t corr = 0; /* Unrolling doesn't seem to improve performance. */ for (j = 0; j < dim_seq; j++) { // It's not clear why casting |right_shifts| here helps performance. corr += (seq1[j] * seq2[j]) >> (int16_t)right_shifts; } seq2 += step_seq2; *cross_correlation++ = corr; } }
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" /* C version of WebRtcSpl_CrossCorrelation() for generic platforms. */ void WebRtcSpl_CrossCorrelationC(int32_t* cross_correlation, const int16_t* seq1, const int16_t* seq2, int16_t dim_seq, int16_t dim_cross_correlation, int right_shifts, int step_seq2) { int i = 0, j = 0; for (i = 0; i < dim_cross_correlation; i++) { int32_t corr = 0; /* Unrolling doesn't seem to improve performance. */ for (j = 0; j < dim_seq; j++) corr += (seq1[j] * seq2[j]) >> right_shifts; seq2 += step_seq2; *cross_correlation++ = corr; } }
Test whether removing a cast still hurts performance.
Test whether removing a cast still hurts performance. BUG=499241 TEST=none TBR=andrew Review URL: https://codereview.webrtc.org/1206653002 Cr-Original-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#9491} Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc Cr-Mirrored-Commit: 6bfc82aaf18e42fcc7328b81ffb3ec3cf360d732
C
bsd-3-clause
jchavanton/webrtc,aleonliao/webrtc-trunk,jchavanton/webrtc,Alkalyne/webrtctrunk,jchavanton/webrtc,aleonliao/webrtc-trunk,Alkalyne/webrtctrunk,aleonliao/webrtc-trunk,sippet/webrtc,jchavanton/webrtc,Alkalyne/webrtctrunk,Alkalyne/webrtctrunk,jchavanton/webrtc,sippet/webrtc,jchavanton/webrtc,Alkalyne/webrtctrunk,aleonliao/webrtc-trunk,Alkalyne/webrtctrunk,Alkalyne/webrtctrunk,aleonliao/webrtc-trunk,sippet/webrtc,aleonliao/webrtc-trunk,sippet/webrtc,Alkalyne/webrtctrunk,jchavanton/webrtc,sippet/webrtc,sippet/webrtc
8d3fcee6c93cff3bded1a37cdd052da1ef89c65d
src/shared/Threading/AEThread.h
src/shared/Threading/AEThread.h
#pragma once #include "ThreadState.h" #include <atomic> #include <mutex> #include <thread> // Lightweight wrapper for std::thread to provide extensibility namespace AscEmu { namespace Threading { class AEThread { typedef std::function<void(AEThread&)> ThreadFunc; static std::atomic<unsigned int> ThreadIdCounter; const long long m_longSleepDelay = 64; // Meta std::string m_name; unsigned int m_id; ThreadFunc m_func; std::chrono::milliseconds m_interval; // State std::mutex m_mtx; std::thread m_thread; bool m_killed; bool m_done; bool m_longSleep; void threadRunner(); void killThread(); public: AEThread(std::string name, ThreadFunc func, std::chrono::milliseconds intervalMs, bool autostart = false); ~AEThread(); std::chrono::milliseconds getInterval() const; std::chrono::milliseconds setInterval(std::chrono::milliseconds val); std::chrono::milliseconds unsafeSetInterval(std::chrono::milliseconds val); std::string getName() const; unsigned int getId() const; bool isKilled() const; void requestKill(); void join(); void reboot(); void lock(); void unlock(); }; }}
#pragma once #include "ThreadState.h" #include <atomic> #include <mutex> #include <thread> // Lightweight wrapper for std::thread to provide extensibility namespace AscEmu { namespace Threading { class AEThread { typedef std::function<void(AEThread&)> ThreadFunc; static std::atomic<unsigned int> ThreadIdCounter; const long long m_longSleepDelay = 64; // Meta std::string m_name; unsigned int m_id; ThreadFunc m_func; std::chrono::milliseconds m_interval; // State std::mutex m_mtx; std::thread m_thread; bool m_killed; bool m_done; bool m_longSleep; void threadRunner(); void killThread(); public: AEThread(std::string name, ThreadFunc func, std::chrono::milliseconds intervalMs, bool autostart = true); ~AEThread(); std::chrono::milliseconds getInterval() const; std::chrono::milliseconds setInterval(std::chrono::milliseconds val); std::chrono::milliseconds unsafeSetInterval(std::chrono::milliseconds val); std::string getName() const; unsigned int getId() const; bool isKilled() const; void requestKill(); void join(); void reboot(); void lock(); void unlock(); }; }}
Make threads autostart by default
Make threads autostart by default
C
agpl-3.0
master312/AscEmu,Appled/AscEmu,master312/AscEmu,AscEmu/AscEmu,Appled/AscEmu,master312/AscEmu,AscEmu/AscEmu,Appled/AscEmu,AscEmu/AscEmu,master312/AscEmu,master312/AscEmu,master312/AscEmu
dec3653d15e4bbe71c1652d9f75e8a0b8573a3ee
libpkg/pkg_error.h
libpkg/pkg_error.h
#ifndef _PKG_ERROR_H #define _PKG_ERROR_H #ifdef DEBUG # define pkg_error_set(code, fmt, ...) \ _pkg_error_set(code, fmt " [at %s:%d]", ##__VA_ARGS__, __FILE__, __LINE__) #else # define pkg_error_set _pkg_error_set #endif #define ERROR_BAD_ARG(name) \ pkg_error_set(EPKG_FATAL, "Bad argument `%s` in %s", name, __FUNCTION__) #define ERROR_SQLITE(db) \ pkg_error_set(EPKG_FATAL, "%s (sqlite at %s:%d)", sqlite3_errmsg(db), __FILE__, __LINE__) pkg_error_t _pkg_error_set(pkg_error_t, const char *, ...); #endif
#ifndef _PKG_ERROR_H #define _PKG_ERROR_H #ifdef DEBUG # define pkg_error_set(code, fmt, ...) \ _pkg_error_set(code, fmt " [at %s:%d]", ##__VA_ARGS__, __FILE__, __LINE__) #else # define pkg_error_set _pkg_error_set #endif #define ERROR_BAD_ARG(name) \ pkg_error_set(EPKG_FATAL, "Bad argument `%s` in %s", name, __FUNCTION__) #define ERROR_SQLITE(db) \ pkg_error_set(EPKG_FATAL, "%s (sqlite)", sqlite3_errmsg(db)) pkg_error_t _pkg_error_set(pkg_error_t, const char *, ...); #endif
Revert "Indicate the location of sqlite failures."
Revert "Indicate the location of sqlite failures." This reverts commit 2686383409d98488ae7b2c39d531af9ef380e21a.
C
bsd-2-clause
junovitch/pkg,Open343/pkg,junovitch/pkg,khorben/pkg,khorben/pkg,skoef/pkg,Open343/pkg,skoef/pkg,khorben/pkg,en90/pkg,en90/pkg
7ef1bd0d3543ec940405f94e3c908771b6a3c210
lib/uart.h
lib/uart.h
/** * This is used to setup the UART device on an AVR unit. */ #pragma once #include <avr/io.h> #ifndef BAUD # define BAUD 9600 # warning BAUD rate not set. Setting BAUD rate to 9600. #endif // BAUD #define BAUDRATE ((F_CPU)/(BAUD*16UL)-1) static inline void uart_enable(void) { UBRR0H = BAUDRATE >> 8; UBRR0L = BAUDRATE; UCSR0B |= _BV(TXEN0) | _BV(RXEN0); UCSR0C |= _BV(UMSEL00) | _BV(UCSZ01) | _BV(UCSZ00); } static inline void uart_transmit(unsigned char data) { while (!(UCSR0A & _BV(UDRE0))); UDR0 = data; } static inline unsigned char uart_receive(void) { while (!(UCSR0A & _BV(RXC0))); return UDR0; }
/** * This is used to setup the UART device on an AVR unit. */ #pragma once #include <avr/io.h> #ifndef BAUD # define BAUD 9600 # warning BAUD rate not set. Setting BAUD rate to 9600. #endif // BAUD #define BAUDRATE ((F_CPU)/(BAUD*16UL)-1) static inline void uart_enable(void) { UBRR0H = BAUDRATE >> 8; UBRR0L = BAUDRATE; // Set RX/TN enabled UCSR0B |= _BV(TXEN0) | _BV(RXEN0); // Set asynchronous USART // Set frame format: 8-bit data, 2-stop bit UCSR0C |= _BV(USBS0) | _BV(UCSZ01) | _BV(UCSZ00); } static inline void uart_transmit(unsigned char data) { while (!(UCSR0A & _BV(UDRE0))); UDR0 = data; } static inline unsigned char uart_receive(void) { while (!(UCSR0A & _BV(RXC0))); return UDR0; }
Correct the frame format and async mode for the UART. Add useful comments.
Correct the frame format and async mode for the UART. Add useful comments.
C
mpl-2.0
grimwm/avr,grimwm/avr,grimwm/avr,grimwm/avr
c3592830e44ccb737e9df0b86d310c1d7dcfc17d
set-1/5-repeating-key-xor.c
set-1/5-repeating-key-xor.c
#include <stdio.h> char input[] = "Burning 'em, if you ain't quick and nimble\nI go crazy when I hear a cymbal"; char key[] = "ICE"; char lookup[] = "0123456789abcdef"; int main() { for(unsigned int i = 0; i < (sizeof(input) - 1); ++i) { char num = input[i] ^ key[i % (sizeof(key) - 1)]; printf("%c%c", lookup[(num >> 4)], lookup[num & 0x0F]); } return 0; }
Set 1 challenge 5 Implement repeating-key XOR
Set 1 challenge 5 Implement repeating-key XOR
C
mit
shantanugoel/cryptopals-solutions,shantanugoel/cryptopals-solutions
eb310eabb13ab391eb3feaccae8c937b29f726fe
src/main.c
src/main.c
#include "common.h" int main(int argc, char **argv) { return 0; }
#include "common.h" #include <stdlib.h> #include <stdio.h> #include <string.h> internal void usage() { fprintf(stderr, "usage: mepa <command> [<options>] [<args>]\n" "\n" "Commands:\n" " help - show this usage text\n" " format [<file>] - reformat code\n"); } internal __attribute__((noreturn)) void die() { perror("mepa"); exit(1); } internal void *nonnull_or_die(void *ptr) { if (ptr == NULL) { die(); } return ptr; } internal int help_main(int argc, char **argv) { (void) argc; (void) argv; usage(); return 0; } internal int format_main(int argc, char **argv) { FILE *file; if (argc == 2 || strcmp(argv[2], "-") == 0) { file = stdin; } else { file = nonnull_or_die(fopen(argv[2], "r")); } u32 cap = 4096; u32 size = 0; u8 *contents = malloc(cap); while (true) { u32 wanted = cap - size; usize result = fread(contents + size, 1, wanted, file); if (result != wanted) { if (ferror(file)) { die(); } size += result; break; } size += result; cap += cap >> 1; contents = realloc(contents, cap); } contents = realloc(contents, size); fclose(file); fwrite(contents, 1, size, stdout); return 0; } typedef struct { char *command; int (*func)(int, char**); } Command; internal Command commands[] = { {"help", help_main}, {"-h", help_main}, {"--help", help_main}, {"-help", help_main}, {"format", format_main}, }; int main(int argc, char **argv) { if (argc == 1) { return help_main(argc, argv); } for (u32 i = 0; i < array_count(commands); i++) { if (strcmp(argv[1], commands[i].command) == 0) { return commands[i].func(argc, argv); } } fprintf(stderr, "Unknown command %s\n", argv[1]); usage(); return 1; }
Add basic argument parsing and file reading
Add basic argument parsing and file reading
C
isc
klkblake/mepa,klkblake/mepa
dd552085c82924e28eaab28fad410b459c3fd71a
src/main.c
src/main.c
#include <stdio.h> #include "src/sea.h" int main(int argc, char* argv[]) { // parse arguments while((opt = getopt(argc, argv, "d:")) != -1) { switch(opt) { case 'd': { extern int yydebug; yydebug = 1; } default: { fprintf(stderr, "Usage: %s [-d] input_filename\n", argv[0]); exit(EXIT_FAILURE); } } } if (optind >= argc) { fprintf(stderr, "Expected argument after options\n"); exit(EXIT_FAILURE); } // use arguments char* filename = argv[optind]; FILE* input_file; int is_stdin = strcmp(filename, "-") == 0; input_file = is_stdin ? stdin : fopen(filename, "rb"); if (!input_file) { perror("An error occured whilst reading from the input file"); return -1; } // main part of program sea* s = create_sea(); int stat = execute_file(s, input_file); free_sea(s); // cleanup if (!is_stdin) { if (ferror(input_file)) { fprintf(stderr, "An error occured during reading from the file\n"); } fclose(input_file); } if (stat != 0) { fprintf(stderr, "An occured during parsing\n"); return stat; } else { return 0; } }
#include <stdlib.h> #include <stdio.h> #include "src/sea.h" int main(int argc, char* argv[]) { // parse arguments char opt; extern int optind; while((opt = getopt(argc, argv, "d")) != -1) { switch(opt) { case 'd': { extern int yydebug; yydebug = 1; break; } case '?': { fprintf(stderr, "Usage: %s [-d] input_filename\n", argv[0]); exit(EXIT_FAILURE); } } } if (optind >= argc) { fprintf(stderr, "Expected argument after options\n"); exit(EXIT_FAILURE); } // use arguments char* filename = argv[optind]; FILE* input_file; int is_stdin = strcmp(filename, "-") == 0; input_file = is_stdin ? stdin : fopen(filename, "rb"); if (!input_file) { perror("An error occured whilst reading from the input file"); return -1; } // main part of program sea* s = create_sea(); int stat = execute_file(s, input_file); free_sea(s); // cleanup if (!is_stdin) { if (ferror(input_file)) { fprintf(stderr, "An error occured during reading from the file\n"); } fclose(input_file); } if (stat != 0) { fprintf(stderr, "An occured during parsing\n"); return stat; } else { return 0; } }
Mend command line flag parsing
Mend command line flag parsing
C
mit
Mause/sea_lang,Mause/sea_lang,Mause/sea_lang
68b86d666521178f1b994c6c86a5539e35f66a52
paddle/fluid/framework/details/execution_strategy.h
paddle/fluid/framework/details/execution_strategy.h
// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #pragma once #include <cstddef> // for size_t namespace paddle { namespace framework { namespace details { struct ExecutionStrategy { enum ExecutorType { kDefault = 0, kExperimental = 1 }; size_t num_threads_{0}; bool use_cuda_{true}; bool allow_op_delay_{false}; size_t num_iteration_per_drop_scope_{100}; ExecutorType type_{kDefault}; bool dry_run_{false}; }; } // namespace details } // namespace framework } // namespace paddle
// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #pragma once #include <cstddef> // for size_t namespace paddle { namespace framework { namespace details { struct ExecutionStrategy { enum ExecutorType { kDefault = 0, kExperimental = 1 }; size_t num_threads_{0}; bool use_cuda_{true}; bool allow_op_delay_{false}; size_t num_iteration_per_drop_scope_{1}; ExecutorType type_{kDefault}; bool dry_run_{false}; }; } // namespace details } // namespace framework } // namespace paddle
Change default value to align with the original react
Change default value to align with the original react test=develop
C
apache-2.0
chengduoZH/Paddle,PaddlePaddle/Paddle,tensor-tang/Paddle,tensor-tang/Paddle,luotao1/Paddle,chengduoZH/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,baidu/Paddle,luotao1/Paddle,chengduoZH/Paddle,chengduoZH/Paddle,baidu/Paddle,chengduoZH/Paddle,luotao1/Paddle,tensor-tang/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,baidu/Paddle,baidu/Paddle,PaddlePaddle/Paddle,tensor-tang/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,tensor-tang/Paddle,PaddlePaddle/Paddle,baidu/Paddle,PaddlePaddle/Paddle,luotao1/Paddle
7d8a38b200cd70bef0300ce482c0723e8d64406b
log/log_singleton.h
log/log_singleton.h
#ifndef _LOG_SINGLETON_H_ #define _LOG_SINGLETON_H_ #include "log.h" #include "basedefs.h" namespace anp { class LogSingleton: public anp::Log { public: static LogSingleton &getInstance(); static void releaseInstance(); private: LogSingleton() { } ~LogSingleton() { } static uint32 m_refCount; static LogSingleton *m_instance; }; /** Makes sure that LogSingleton::releaseInstance() gets called. */ class LogSingletonHelper { public: LogSingletonHelper(): m_log(LogSingleton::getInstance()) { } ~LogSingletonHelper() { LogSingleton::releaseInstance(); } void addMessage(const anp::dstring &message) { m_log.addMessage(message); } private: LogSingleton &m_log; }; } #endif // _LOG_SINGLETON_H_
#ifndef _LOG_SINGLETON_H_ #define _LOG_SINGLETON_H_ #include "log.h" #include "basedefs.h" namespace anp { class LogSingleton: public anp::Log { public: static LogSingleton &getInstance(); static void releaseInstance(); private: LogSingleton() { } ~LogSingleton() { } static uint32 m_refCount; static LogSingleton *m_instance; }; /** Makes sure that LogSingleton::releaseInstance() gets called. */ class LogSingletonHelper { public: LogSingletonHelper(): m_log(LogSingleton::getInstance()) { } ~LogSingletonHelper() { LogSingleton::releaseInstance(); } void addMessage(const anp::dstring &message) { m_log.addMessage(message); } void operator()(const anp::dstring message) { m_log.addMessage(message); } private: LogSingleton &m_log; }; #define LOG_SINGLETON_MSG(message) LogSingleton::getInstance().addMessage(message);\ LogSingleton::releaseInstance(); } #endif // _LOG_SINGLETON_H_
Add overloaded () operator to LogSingletonHelper.
Add overloaded () operator to LogSingletonHelper.
C
bsd-2-clause
antonp/anpcode,antonp/anpcode
b85b078b0ce485c342dc726069a2f8cb9c23411f
src/libstat/learn_cache/learn_cache.h
src/libstat/learn_cache/learn_cache.h
/* * Copyright (c) 2015, Vsevolod Stakhov * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR ''AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL AUTHOR BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef LEARN_CACHE_H_ #define LEARN_CACHE_H_ #include "config.h" #include "ucl.h" typedef enum rspamd_learn_cache_result { RSPAMD_LEARN_OK = 0, RSPAMD_LEARN_UNLEARN, RSPAMD_LEARN_INGORE } rspamd_learn_t; struct rspamd_stat_cache { const char *name; gpointer (*init)(struct rspamd_stat_ctx *ctx, struct rspamd_config *cfg); rspamd_learn_t (*process)(GTree *input, gboolean is_spam, gpointer ctx); gpointer ctx; }; #endif /* LEARN_CACHE_H_ */
Add preliminary API definition for learn cache.
Add preliminary API definition for learn cache.
C
bsd-2-clause
amohanta/rspamd,andrejzverev/rspamd,dark-al/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,minaevmike/rspamd,minaevmike/rspamd,AlexeySa/rspamd,andrejzverev/rspamd,amohanta/rspamd,dark-al/rspamd,awhitesong/rspamd,andrejzverev/rspamd,amohanta/rspamd,minaevmike/rspamd,andrejzverev/rspamd,minaevmike/rspamd,amohanta/rspamd,awhitesong/rspamd,minaevmike/rspamd,andrejzverev/rspamd,andrejzverev/rspamd,AlexeySa/rspamd,minaevmike/rspamd,awhitesong/rspamd,dark-al/rspamd,AlexeySa/rspamd,minaevmike/rspamd,andrejzverev/rspamd,AlexeySa/rspamd,minaevmike/rspamd,dark-al/rspamd,AlexeySa/rspamd,amohanta/rspamd,awhitesong/rspamd,AlexeySa/rspamd,dark-al/rspamd,minaevmike/rspamd,andrejzverev/rspamd
1f78619803e925c12e7d222bf1af0d1de96e930c
static_block.c
static_block.c
extern int printf(char *, ...); void (^pb)() = ^{ return; }; int i, j; int *(^funcs[])() = { [0 ... 1] = ^{ printf("1!\n"); return &i; }, ^{ printf("2!\n"); return &j; }, }; void *f(int x) { return funcs[x](); } main() { printf("&i = %p\n", &i); printf("&j = %p\n", &j); for(int i = 0; i < 3; i++) printf("f(%d) = %p\n", i, f(i)); }
Test case for static storage blocks
Test case for static storage blocks
C
mit
8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler
9a1a3f47cc175cb4588451e2c6bf2147407e16f0
test/Analysis/null-deref-path-notes.c
test/Analysis/null-deref-path-notes.c
// RUN: %clang_analyze_cc1 -w -x c -analyzer-checker=core -analyzer-output=text -verify %s // Avoid the crash when finding the expression for tracking the origins // of the null pointer for path notes. Apparently, not much actual tracking // needs to be done in this example. void pr34373() { int *a = 0; // expected-note{{'a' initialized to a null pointer value}} (a + 0)[0]; // expected-warning{{Array access results in a null pointer dereference}} // expected-note@-1{{Array access results in a null pointer dereference}} }
// RUN: %clang_analyze_cc1 -w -x c -analyzer-checker=core -analyzer-output=text -verify %s // Avoid the crash when finding the expression for tracking the origins // of the null pointer for path notes. void pr34373() { int *a = 0; // expected-note{{'a' initialized to a null pointer value}} (a + 0)[0]; // expected-warning{{Array access results in a null pointer dereference}} // expected-note@-1{{Array access results in a null pointer dereference}} }
Fix an outdated comment in a test. NFC.
[analyzer] Fix an outdated comment in a test. NFC. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@314298 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
8bc349742bc3c97da5bb88d382bc0860f7eb3399
SearchEngine/UnicodeUtf16StringSearcher.h
SearchEngine/UnicodeUtf16StringSearcher.h
#pragma once class UnicodeUtf16StringSearcher { private: const wchar_t* m_Pattern; uint32_t m_PatternLength; public: UnicodeUtf16StringSearcher() : m_Pattern(nullptr) { } void Initialize(const wchar_t* pattern, size_t patternLength) { if (patternLength > std::numeric_limits<uint32_t>::max() / 2) __fastfail(1); m_Pattern = pattern; m_PatternLength = static_cast<uint32_t>(patternLength); } template <typename TextIterator> bool HasSubstring(TextIterator textBegin, TextIterator textEnd) { while (textEnd - textBegin >= m_PatternLength) { auto comparisonResult = CompareStringEx(LOCALE_NAME_SYSTEM_DEFAULT, NORM_IGNORECASE, textBegin, static_cast<int>(textEnd - textBegin), m_Pattern, static_cast<int>(m_PatternLength), nullptr, nullptr, 0); if (comparisonResult == CSTR_EQUAL) return true; textBegin++; } return false; } };
#pragma once class UnicodeUtf16StringSearcher { private: const wchar_t* m_Pattern; uint32_t m_PatternLength; public: UnicodeUtf16StringSearcher() : m_Pattern(nullptr) { } void Initialize(const wchar_t* pattern, size_t patternLength) { if (patternLength > std::numeric_limits<uint32_t>::max() / 2) __fastfail(1); m_Pattern = pattern; m_PatternLength = static_cast<uint32_t>(patternLength); } template <typename TextIterator> bool HasSubstring(TextIterator textBegin, TextIterator textEnd) { while (textEnd - textBegin >= m_PatternLength) { auto comparisonResult = CompareStringEx(LOCALE_NAME_SYSTEM_DEFAULT, NORM_IGNORECASE, textBegin, static_cast<int>(m_PatternLength), m_Pattern, static_cast<int>(m_PatternLength), nullptr, nullptr, 0); if (comparisonResult == CSTR_EQUAL) return true; textBegin++; } return false; } };
Fix case insensitive UTF16 string search.
Fix case insensitive UTF16 string search.
C
mit
TautvydasZilys/FileSystemSearch,TautvydasZilys/FileSystemSearch,TautvydasZilys/FileSystemSearch
ada0b227c20f2ee303c5f9c7bec59f2c252dc9a2
src/Charmap.h
src/Charmap.h
#ifndef CHARMAP_H #define CHARMAP_H #include <unordered_map> class Charmap { public: void cfToAscii(); void asciiToCf(); private: std::unordered_map<uint8_t, uint8_t> map; }; #endif
Add character mapper stub class
Add character mapper stub class
C
mit
malensek/cryctl,malensek/cryctl
1b37acc75816e0c079aebbb3473bfee5762829bb
tests/regression/13-privatized/22-traces-paper.c
tests/regression/13-privatized/22-traces-paper.c
// PARAM: --enable ana.int.interval --sets exp.solver.td3.side_widen cycle_self #include <pthread.h> #include <assert.h> int g = 6; pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { int x = 1; pthread_mutex_lock(&A); assert(g == 6); assert(x == 1); g = 5; assert(g == 5); assert(x == 1); pthread_mutex_lock(&B); assert(g == 5); assert(x == 1); pthread_mutex_unlock(&B); assert(g == 5); assert(x == 1); x = g; assert(x == 5); g = x + 1; assert(g == 6); pthread_mutex_unlock(&A); assert(x == 5); return NULL; } int main(void) { pthread_t id; assert(g == 6); pthread_create(&id, NULL, t_fun, NULL); assert(5 <= g); assert(g <= 6); pthread_join(id, NULL); return 0; }
Add example from traces paper
Add example from traces paper
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
1c242f3f29c36dc6cc5d8233d51c5e4c18be079b
src/QGCConfig.h
src/QGCConfig.h
#ifndef QGC_CONFIGURATION_H #define QGC_CONFIGURATION_H #include <QString> /** @brief Polling interval in ms */ #define SERIAL_POLL_INTERVAL 4 /** @brief Heartbeat emission rate, in Hertz (times per second) */ #define MAVLINK_HEARTBEAT_DEFAULT_RATE 1 #define WITH_TEXT_TO_SPEECH 1 // If you need to make an incompatible changes to stored settings, bump this version number // up by 1. This will caused store settings to be cleared on next boot. #define QGC_SETTINGS_VERSION 4 #define QGC_APPLICATION_NAME "QGroundControl" #define QGC_ORG_NAME "QGroundControl.org" #define QGC_ORG_DOMAIN "org.qgroundcontrol" #define QGC_APPLICATION_VERSION_MAJOR 2 #define QGC_APPLICATION_VERSION_MINOR 3 // The following #definess can be overriden from the command line so that automated build systems can // add additional build identification. // Only comes from command line //#define QGC_APPLICATION_VERSION_COMMIT "..." #ifndef QGC_APPLICATION_VERSION_BUILDNUMBER #define QGC_APPLICATION_VERSION_BUILDNUMBER 0 #endif #ifndef QGC_APPLICATION_VERSION_BUILDTYPE #define QGC_APPLICATION_VERSION_BUILDTYPE "(Developer Build)" #endif #endif // QGC_CONFIGURATION_H
#ifndef QGC_CONFIGURATION_H #define QGC_CONFIGURATION_H #include <QString> /** @brief Polling interval in ms */ #define SERIAL_POLL_INTERVAL 4 /** @brief Heartbeat emission rate, in Hertz (times per second) */ #define MAVLINK_HEARTBEAT_DEFAULT_RATE 1 #define WITH_TEXT_TO_SPEECH 1 // If you need to make an incompatible changes to stored settings, bump this version number // up by 1. This will caused store settings to be cleared on next boot. #define QGC_SETTINGS_VERSION 4 #define QGC_APPLICATION_NAME "QGroundControl" #define QGC_ORG_NAME "QGroundControl.org" #define QGC_ORG_DOMAIN "org.qgroundcontrol" #define QGC_APPLICATION_VERSION_MAJOR 2 #define QGC_APPLICATION_VERSION_MINOR 3 // The following #definess can be overriden from the command line so that automated build systems can // add additional build identification. // Only comes from command line //#define QGC_APPLICATION_VERSION_COMMIT "..." #ifndef QGC_APPLICATION_VERSION_BUILDNUMBER #define QGC_APPLICATION_VERSION_BUILDNUMBER 0 #endif #ifndef QGC_APPLICATION_VERSION_BUILDTYPE #define QGC_APPLICATION_VERSION_BUILDTYPE "(Stable)" #endif #endif // QGC_CONFIGURATION_H
Switch to Stable V2.3 Release Candidates
Switch to Stable V2.3 Release Candidates
C
agpl-3.0
RedoXyde/PX4_qGCS,fizzaly/qgroundcontrol,CornerOfSkyline/qgroundcontrol,greenoaktree/qgroundcontrol,Hunter522/qgroundcontrol,CornerOfSkyline/qgroundcontrol,hejunbok/qgroundcontrol,catch-twenty-two/qgroundcontrol,remspoor/qgroundcontrol,UAVenture/qgroundcontrol,caoxiongkun/qgroundcontrol,devbharat/qgroundcontrol,CornerOfSkyline/qgroundcontrol,scott-eddy/qgroundcontrol,TheIronBorn/qgroundcontrol,BMP-TECH/qgroundcontrol,TheIronBorn/qgroundcontrol,LIKAIMO/qgroundcontrol,remspoor/qgroundcontrol,fizzaly/qgroundcontrol,RedoXyde/PX4_qGCS,devbharat/qgroundcontrol,catch-twenty-two/qgroundcontrol,catch-twenty-two/qgroundcontrol,caoxiongkun/qgroundcontrol,dagoodma/qgroundcontrol,remspoor/qgroundcontrol,dagoodma/qgroundcontrol,iidioter/qgroundcontrol,scott-eddy/qgroundcontrol,dagoodma/qgroundcontrol,Hunter522/qgroundcontrol,nado1688/qgroundcontrol,cfelipesouza/qgroundcontrol,dagoodma/qgroundcontrol,LIKAIMO/qgroundcontrol,scott-eddy/qgroundcontrol,hejunbok/qgroundcontrol,greenoaktree/qgroundcontrol,jy723/qgroundcontrol,CornerOfSkyline/qgroundcontrol,mihadyuk/qgroundcontrol,ethz-asl/qgc_asl,Hunter522/qgroundcontrol,iidioter/qgroundcontrol,mihadyuk/qgroundcontrol,LIKAIMO/qgroundcontrol,kd0aij/qgroundcontrol,greenoaktree/qgroundcontrol,CornerOfSkyline/qgroundcontrol,kd0aij/qgroundcontrol,TheIronBorn/qgroundcontrol,nado1688/qgroundcontrol,Hunter522/qgroundcontrol,BMP-TECH/qgroundcontrol,devbharat/qgroundcontrol,RedoXyde/PX4_qGCS,cfelipesouza/qgroundcontrol,dagoodma/qgroundcontrol,fizzaly/qgroundcontrol,jy723/qgroundcontrol,devbharat/qgroundcontrol,UAVenture/qgroundcontrol,UAVenture/qgroundcontrol,caoxiongkun/qgroundcontrol,scott-eddy/qgroundcontrol,RedoXyde/PX4_qGCS,fizzaly/qgroundcontrol,dagoodma/qgroundcontrol,mihadyuk/qgroundcontrol,cfelipesouza/qgroundcontrol,catch-twenty-two/qgroundcontrol,jy723/qgroundcontrol,TheIronBorn/qgroundcontrol,nado1688/qgroundcontrol,RedoXyde/PX4_qGCS,iidioter/qgroundcontrol,iidioter/qgroundcontrol,remspoor/qgroundcontrol,hejunbok/qgroundcontrol,mihadyuk/qgroundcontrol,scott-eddy/qgroundcontrol,BMP-TECH/qgroundcontrol,Hunter522/qgroundcontrol,jy723/qgroundcontrol,iidioter/qgroundcontrol,BMP-TECH/qgroundcontrol,kd0aij/qgroundcontrol,nado1688/qgroundcontrol,ethz-asl/qgc_asl,devbharat/qgroundcontrol,LIKAIMO/qgroundcontrol,remspoor/qgroundcontrol,UAVenture/qgroundcontrol,fizzaly/qgroundcontrol,UAVenture/qgroundcontrol,iidioter/qgroundcontrol,caoxiongkun/qgroundcontrol,nado1688/qgroundcontrol,jy723/qgroundcontrol,caoxiongkun/qgroundcontrol,greenoaktree/qgroundcontrol,BMP-TECH/qgroundcontrol,cfelipesouza/qgroundcontrol,LIKAIMO/qgroundcontrol,greenoaktree/qgroundcontrol,RedoXyde/PX4_qGCS,kd0aij/qgroundcontrol,fizzaly/qgroundcontrol,catch-twenty-two/qgroundcontrol,ethz-asl/qgc_asl,TheIronBorn/qgroundcontrol,cfelipesouza/qgroundcontrol,remspoor/qgroundcontrol,scott-eddy/qgroundcontrol,ethz-asl/qgc_asl,hejunbok/qgroundcontrol,CornerOfSkyline/qgroundcontrol,TheIronBorn/qgroundcontrol,mihadyuk/qgroundcontrol,Hunter522/qgroundcontrol,catch-twenty-two/qgroundcontrol,kd0aij/qgroundcontrol,LIKAIMO/qgroundcontrol,jy723/qgroundcontrol,UAVenture/qgroundcontrol,BMP-TECH/qgroundcontrol,greenoaktree/qgroundcontrol,caoxiongkun/qgroundcontrol,hejunbok/qgroundcontrol,hejunbok/qgroundcontrol,mihadyuk/qgroundcontrol,ethz-asl/qgc_asl,nado1688/qgroundcontrol,kd0aij/qgroundcontrol,cfelipesouza/qgroundcontrol,devbharat/qgroundcontrol
3310df62860d762d150833524c9bc5dc3126dbee
src/logging.c
src/logging.c
#include <stdio.h> #include <stdlib.h> #include <syslog.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <US/unitscript.h> #include <US/logging.h> int us_syslog_redirect( struct us_unitscript* unit, int priority ){ int fds[2]; if( pipe(fds) ){ perror("pipe failed"); return -1; } int ret = fork(); if( ret == -1 ){ perror("fork failed\n"); close(fds[0]); close(fds[1]); return -1; } if( ret ){ close(fds[0]); return fds[1]; } close(fds[1]); const char* file = strrchr(unit->file,'/'); if(!file){ file = unit->file; }else{ file++; } openlog(file,0,LOG_DAEMON); do { char msg[1024*4]; size_t i = 0; while( i<sizeof(msg)-1 && ( ( (ret=read(fds[0],msg+i,1)) == -1 && errno == EAGAIN ) || ( ret==1 && msg[i] != '\n' ) ) ) i++; msg[i] = 0; if(i) syslog( priority, "%s", msg ); } while(ret); us_free(unit); exit(0); }
#include <stdio.h> #include <stdlib.h> #include <syslog.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <US/unitscript.h> #include <US/logging.h> int us_syslog_redirect( struct us_unitscript* unit, int priority ){ int fds[2]; if( pipe(fds) ){ perror("pipe failed"); return -1; } int ret = fork(); if( ret == -1 ){ perror("fork failed\n"); close(fds[0]); close(fds[1]); return -1; } if( ret ){ close(fds[0]); return fds[1]; } close(fds[1]); const char* file = strrchr(unit->file,'/'); if(!file){ file = unit->file; }else{ file++; } openlog(file,0,LOG_DAEMON); us_free(unit); do { char msg[1024*4]; size_t i = 0; while( i<sizeof(msg)-1 && ( ( (ret=read(fds[0],msg+i,1)) == -1 && errno == EAGAIN ) || ( ret==1 && msg[i] != '\n' ) ) ) i++; msg[i] = 0; if(i) syslog( priority, "%s", msg ); } while(ret); exit(0); }
Reduce memory usage of us_syslog_redirect
Reduce memory usage of us_syslog_redirect
C
mit
Daniel-Abrecht/unitscript
b94f14c84c567c1c0433bba0e4f12d0d4771b718
extensions/protocol_extension.h
extensions/protocol_extension.h
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ #ifndef EXAMPLE_PROTOCOL_H #define EXAMPLE_PROTOCOL_H #include <daemon/settings.h> #include <memcached/engine.h> #ifdef __cplusplus extern "C" { #endif MEMCACHED_PUBLIC_API EXTENSION_ERROR_CODE memcached_extensions_initialize(const char *config, GET_SERVER_API get_server_api); #ifdef __cplusplus } MEMCACHED_PUBLIC_API EXTENSION_ERROR_CODE file_logger_initialize(const LoggerConfig& config, GET_SERVER_API get_server_api); #endif #endif
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ #ifndef EXAMPLE_PROTOCOL_H #define EXAMPLE_PROTOCOL_H #include <daemon/settings.h> #include <memcached/engine.h> #ifdef __cplusplus extern "C" { #endif MEMCACHED_PUBLIC_API EXTENSION_ERROR_CODE memcached_extensions_initialize(const char *config, GET_SERVER_API get_server_api); MEMCACHED_PUBLIC_API EXTENSION_ERROR_CODE file_logger_initialize(const LoggerConfig& config, GET_SERVER_API get_server_api); #ifdef __cplusplus } #endif #endif
Fix dlsym error 'Could not find symbol "file_logger_initialize"'
Fix dlsym error 'Could not find symbol "file_logger_initialize"' Wrap file_logger_initialize into extern "C" to prevent name mangling, which caused the error above. Change-Id: I8c8e1e61599f2afb6dedf4e0b71c0a5a013ccbb7 Reviewed-on: http://review.couchbase.org/86829 Tested-by: Build Bot <[email protected]> Reviewed-by: Dave Rigby <[email protected]>
C
bsd-3-clause
daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine
f87946732ab9e2e9be8e90793ca0c5939f9a939e
source/target/freescale/kl82z/target.c
source/target/freescale/kl82z/target.c
/** * @file target.c * @brief Target information for the kl46z * * DAPLink Interface Firmware * Copyright (c) 2009-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "target_config.h" // The file flash_blob.c must only be included in target.c #include "flash_blob.c" // target information target_cfg_t target_device = { .sector_size = 1024, .sector_cnt = (KB(96) / 1024), .flash_start = 0, .flash_end = KB(128), .ram_start = 0x1FFFA000, .ram_end = 0x2002000, .flash_algo = (program_target_t *) &flash, };
/** * @file target.c * @brief Target information for the kl46z * * DAPLink Interface Firmware * Copyright (c) 2009-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "target_config.h" // The file flash_blob.c must only be included in target.c #include "flash_blob.c" // target information target_cfg_t target_device = { .sector_size = 1024, .sector_cnt = (KB(96) / 1024), .flash_start = 0, .flash_end = KB(128), .ram_start = 0x1FFFA000, .ram_end = 0x20012000, .flash_algo = (program_target_t *) &flash, };
Fix ram end for kl82z
Fix ram end for kl82z Fix typo in target_device for the kl82z. This fixes programming for this device.
C
apache-2.0
google/DAPLink-port,google/DAPLink-port,sg-/DAPLink,google/DAPLink-port,sg-/DAPLink,sg-/DAPLink,google/DAPLink-port
ac0afc8c605ab6039b1a5c25f2b7105f7e5456f5
test/Preprocessor/headermap-rel2.c
test/Preprocessor/headermap-rel2.c
// This uses a headermap with this entry: // someheader.h -> Product/someheader.h // RUN: %clang_cc1 -v -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H // RUN: %clang_cc1 -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H 2> %t.out // RUN: FileCheck %s -input-file %t.out // CHECK: Product/someheader.h // CHECK: system/usr/include/someheader.h // CHECK: system/usr/include/someheader.h #include "someheader.h" #include <someheader.h> #include <someheader.h>
// This uses a headermap with this entry: // someheader.h -> Product/someheader.h // RUN: %clang_cc1 -triple x86_64-apple-darwin13 -v -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H // RUN: %clang_cc1 -triple x86_64-apple-darwin13 -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H 2> %t.out // RUN: FileCheck %s -input-file %t.out // CHECK: Product/someheader.h // CHECK: system/usr/include/someheader.h // CHECK: system/usr/include/someheader.h #include "someheader.h" #include <someheader.h> #include <someheader.h>
Add a triple to the test.
[test] Add a triple to the test. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@205073 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
c2d3e92d424bb2084050589c9e7e1214bbb565b5
test/wasm/soft/float/extenddftf2.c
test/wasm/soft/float/extenddftf2.c
#include "src/math/reinterpret.h" #include <math.h> #include <stdint.h> #include <assert.h> double __trunctfdf2(long double); static _Bool run(double x) { return reinterpret(uint64_t, x) == reinterpret(uint64_t, __trunctfdf2(x)); } int main(void) { const uint64_t step = 0x00000034CBF126F8; assert(run(INFINITY)); assert(run(-INFINITY)); for (uint64_t i = 0; i < 0x7FF0000000000000; i += step) { double x = reinterpret(double, i); assert(run(x)); assert(run(-x)); } for (uint64_t i = 0x7FF0000000000001; i < 0x8000000000000000; i += step) { double x = reinterpret(double, i); assert(isnan(__trunctfdf2(x))); assert(isnan(__trunctfdf2(-x))); } }
Test double -> long double
Test double -> long double
C
mit
jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic
9785f6c7f58c21a10221aee23657cca4aa4ff883
MatrixSDK/Crypto/SecretStorage/MXSecretStorage_Private.h
MatrixSDK/Crypto/SecretStorage/MXSecretStorage_Private.h
/* Copyright 2020 The Matrix.org Foundation C.I.C Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #import "MXSecretStorage.h" @class MXSession; NS_ASSUME_NONNULL_BEGIN @interface MXSecretStorage () /** Constructor. @param mxSession the related 'MXSession' instance. */ - (instancetype)initWithMatrixSession:(MXSession *)mxSession processingQueue:(dispatch_queue_t)processingQueue; @end NS_ASSUME_NONNULL_END
/* Copyright 2020 The Matrix.org Foundation C.I.C Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #import "MXSecretStorage.h" @class MXSession; @class MXEncryptedSecretContent; NS_ASSUME_NONNULL_BEGIN @interface MXSecretStorage () /** Constructor. @param mxSession the related 'MXSession' instance. */ - (instancetype)initWithMatrixSession:(MXSession *)mxSession processingQueue:(dispatch_queue_t)processingQueue; - (nullable MXEncryptedSecretContent *)encryptedZeroStringWithPrivateKey:(NSData*)privateKey iv:(nullable NSData*)iv error:(NSError**)error; - (nullable MXEncryptedSecretContent *)encryptSecret:(NSString*)unpaddedBase64Secret withSecretId:(nullable NSString*)secretId privateKey:(NSData*)privateKey iv:(nullable NSData*)iv error:(NSError**)error; - (nullable NSString *)decryptSecretWithSecretId:(NSString*)secretId secretContent:(MXEncryptedSecretContent*)secretContent withPrivateKey:(NSData*)privateKey error:(NSError**)error; @end NS_ASSUME_NONNULL_END
Make aes-hmac-sha2 encryption methods from `MXSecretStorage` available in SDK
Make aes-hmac-sha2 encryption methods from `MXSecretStorage` available in SDK
C
apache-2.0
matrix-org/matrix-ios-sdk,matrix-org/matrix-ios-sdk,matrix-org/matrix-ios-sdk,matrix-org/matrix-ios-sdk,matrix-org/matrix-ios-sdk
dc95f76e50db1a65d39630c854ebe40620fe9f00
You-DataStore/datastore.h
You-DataStore/datastore.h
#pragma once #ifndef YOU_DATASTORE_DATASTORE_H_ #define YOU_DATASTORE_DATASTORE_H_ #include <memory> #include "task_typedefs.h" #include "transaction.h" namespace You { namespace DataStore { namespace UnitTests {} class DataStore { public: Transaction && begin(); static DataStore& get(); // Modifying methods void post(TaskId, SerializedTask&); void put(TaskId, SerializedTask&); void erase(TaskId); std::vector<SerializedTask> getAllTask(); private: bool isServing = false; }; } // namespace DataStore } // namespace You #endif // YOU_DATASTORE_DATASTORE_H_
#pragma once #ifndef YOU_DATASTORE_DATASTORE_H_ #define YOU_DATASTORE_DATASTORE_H_ #include <memory> #include "task_typedefs.h" #include "transaction.h" namespace You { namespace DataStore { namespace UnitTests {} class DataStore { public: Transaction && begin(); static DataStore& get(); // Modifying methods void post(TaskId, SerializedTask&); void put(TaskId, SerializedTask&); void erase(TaskId); std::vector<SerializedTask> getAllTask(); private: bool isServing = false; std::unique_ptr<Transaction> activeTransaction; }; } // namespace DataStore } // namespace You #endif // YOU_DATASTORE_DATASTORE_H_
Add active transaction member variable to DataStore
Add active transaction member variable to DataStore
C
mit
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
376adcdd2b1aae6e7465a4307214447bc0de0a75
resources/standard_file_template.h
resources/standard_file_template.h
/******************************************************************************/ /** @file @author AUTHOR NAME HERE. @brief BRIEF HERE. @copyright Copyright 2016 The University of British Columbia, IonDB Project Contributors (see @ref AUTHORS.md) @par 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 @par 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. */ /******************************************************************************/ #if !defined(CHANGE_ME_H) #define CHANGE_ME_H #if defined(__cplusplus) extern “ C ” { #endif /* Actual header file contents go in here. */ #if defined(__cplusplus) } #endif #endif
/******************************************************************************/ /** @file @author AUTHOR NAME HERE. @brief BRIEF HERE. @copyright Copyright 2016 The University of British Columbia, IonDB Project Contributors (see @ref AUTHORS.md) @par 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 @par 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. */ /******************************************************************************/ #if !defined(CHANGE_ME_H) #define CHANGE_ME_H #if defined(__cplusplus) extern "C" { #endif /* Actual header file contents go in here. */ #if defined(__cplusplus) } #endif #endif
Fix smart quote in file template
Fix smart quote in file template
C
bsd-3-clause
iondbproject/iondb,iondbproject/iondb
1e0998cf1d80b72eafd1639c839c86ac6f38a6ef
test/util/SeqUtils.h
test/util/SeqUtils.h
#pragma once #include "rapidcheck/seq/Operations.h" namespace rc { namespace test { //! Forwards Seq a random amount and copies it to see if it is equal to the //! original. template<typename T> void assertEqualCopies(Seq<T> seq) { std::size_t len = seq::length(seq); std::size_t n = *gen::ranged<std::size_t>(0, len * 2); while (n--) seq.next(); const auto copy = seq; RC_ASSERT(copy == seq); } } // namespace test } // namespace rc
#pragma once #include "rapidcheck/seq/Operations.h" namespace rc { namespace test { //! Forwards Seq a random amount and copies it to see if it is equal to the //! original. Must not be infinite, of course. template<typename T> void assertEqualCopies(Seq<T> seq) { std::size_t len = seq::length(seq); std::size_t n = *gen::ranged<std::size_t>(0, len * 2); while (n--) seq.next(); const auto copy = seq; RC_ASSERT(copy == seq); } } // namespace test } // namespace rc
Add clarifying comment for assertEqualCopies
Add clarifying comment for assertEqualCopies
C
bsd-2-clause
whoshuu/rapidcheck,tm604/rapidcheck,whoshuu/rapidcheck,emil-e/rapidcheck,tm604/rapidcheck,emil-e/rapidcheck,unapiedra/rapidfuzz,emil-e/rapidcheck,whoshuu/rapidcheck,tm604/rapidcheck,unapiedra/rapidfuzz,unapiedra/rapidfuzz
7f21701f058014bfb2fec187ef5330799adaf7a4
tests/test-tp-feed.c
tests/test-tp-feed.c
#include <anerley/anerley-tp-feed.h> #include <libmissioncontrol/mission-control.h> #include <glib.h> #include <dbus/dbus-glib.h> int main (int argc, char **argv) { GMainLoop *main_loop; MissionControl *mc; McAccount *account; AnerleyTpFeed *feed; DBusGConnection *conn; if (argc < 2) { g_print ("Usage: ./test-tp-feed <account-name>"); return 1; } g_type_init (); main_loop = g_main_loop_new (NULL, FALSE); conn = dbus_g_bus_get (DBUS_BUS_SESSION, NULL); mc = mission_control_new (conn); account = mc_account_lookup (argv[1]); feed = anerley_tp_feed_new (mc, account); g_main_loop_run (main_loop); return 0; }
#include <anerley/anerley-tp-feed.h> #include <libmissioncontrol/mission-control.h> #include <glib.h> #include <dbus/dbus-glib.h> int main (int argc, char **argv) { GMainLoop *main_loop; MissionControl *mc; McAccount *account; AnerleyTpFeed *feed; DBusGConnection *conn; if (argc < 2) { g_print ("Usage: ./test-tp-feed <account-name>\n"); return 1; } g_type_init (); main_loop = g_main_loop_new (NULL, FALSE); conn = dbus_g_bus_get (DBUS_BUS_SESSION, NULL); mc = mission_control_new (conn); account = mc_account_lookup (argv[1]); feed = anerley_tp_feed_new (mc, account); g_main_loop_run (main_loop); return 0; }
Add missing newline to usage print call.
Add missing newline to usage print call.
C
lgpl-2.1
meego-netbook-ux/anerley,meego-netbook-ux/anerley
5492c5f1f68623bab36842c5cc3fbb325e82d33b
src/lock.h
src/lock.h
#ifndef LOCK_H #define LOCK_H enum lockstat { GET_LOCK_NOT_GOT=0, GET_LOCK_ERROR, GET_LOCK_GOT }; typedef struct lock lock_t; struct lock { int fd; enum lockstat status; char *path; lock_t *next; }; extern struct lock *lock_alloc(void); extern int lock_init(struct lock *lock, const char *path); extern struct lock *lock_alloc_and_init(const char *path); extern void lock_free(struct lock **lock); // Need to test lock->status to find out what happened when calling these. extern void lock_get_quick(struct lock *lock); extern void lock_get(struct lock *lock); extern int lock_test(const char *path); extern int lock_release(struct lock *lock); extern void lock_add_to_list(struct lock **locklist, struct lock *lock); extern void locks_release_and_free(struct lock **locklist); #endif
#ifndef LOCK_H #define LOCK_H enum lockstat { GET_LOCK_NOT_GOT=0, GET_LOCK_ERROR, GET_LOCK_GOT }; struct lock { int fd; enum lockstat status; char *path; struct lock *next; }; extern struct lock *lock_alloc(void); extern int lock_init(struct lock *lock, const char *path); extern struct lock *lock_alloc_and_init(const char *path); extern void lock_free(struct lock **lock); // Need to test lock->status to find out what happened when calling these. extern void lock_get_quick(struct lock *lock); extern void lock_get(struct lock *lock); extern int lock_test(const char *path); extern int lock_release(struct lock *lock); extern void lock_add_to_list(struct lock **locklist, struct lock *lock); extern void locks_release_and_free(struct lock **locklist); #endif
Fix a build issue on Solaris
Fix a build issue on Solaris
C
agpl-3.0
rubenk/burp,rubenk/burp,rubenk/burp
06d500a9bf493403b1c9a9502f687f8d82cae1a6
LYCategory/Classes/_UIKit/UINavigationBar+Fix.h
LYCategory/Classes/_UIKit/UINavigationBar+Fix.h
// // UINavigationBar+Fix.h // LYCategory // // Created by Luo Yu on 2017/02/11. // Copyright (c) 2014 Luo Yu. All rights reserved. // #import <UIKit/UIKit.h> @interface UINavigationBar (Fix) @end
Add : navigation bar fix
Add : navigation bar fix
C
mit
blodely/LYCategory,blodely/LYCategory,blodely/LYCategory,blodely/LYCategory
d48a0e271421d2f6020ac6ac41384be83e3f2c6e
tests/regression/37-congruence/10-overflow-special-cases.c
tests/regression/37-congruence/10-overflow-special-cases.c
// PARAM: --enable ana.int.congruence #include <goblint.h> // #include <assert.h> // #define __goblint_check(e) assert(e) int basic(){ unsigned int two_pow_16 = 65536; unsigned int a; unsigned int b; if (a % two_pow_16 == 3) { if (b % two_pow_16 == 5) { __goblint_check(a % two_pow_16 == 3); __goblint_check(b % two_pow_16 == 5); int e = a * b; __goblint_check(e % two_pow_16 == 15); __goblint_check(e == 15); // UNKNOWN! } } } int special(){ unsigned int two_pow_18 = 262144; unsigned int two_pow_17 = 131072; unsigned int a; unsigned int b; if (a % two_pow_18 == two_pow_17) { if (b % two_pow_18 == two_pow_17) { __goblint_check(a % two_pow_18 == two_pow_17); __goblint_check(b % two_pow_18 == two_pow_17); int e = a * b; __goblint_check(e == 0); } } // Hint why the above works: __goblint_check( two_pow_17 * two_pow_17 == 0); } int special2(){ unsigned int two_pow_30 = 1073741824; unsigned int two_pow_18 = 262144; unsigned int two_pow_17 = 131072; unsigned int two_pow_16 = 65536; unsigned int two_pow_15 = 32768; unsigned int x = two_pow_17 + two_pow_15; unsigned int a; unsigned int b; if (a % two_pow_18 == x) { if (b % two_pow_18 == x) { __goblint_check(a % two_pow_18 == x); __goblint_check(b % two_pow_18 == x); int e = a * b; __goblint_check(e == two_pow_30); } } // Hint why the above holds: __goblint_check( x * x == two_pow_30); } int main() { basic(); special(); special2(); }
Add additional test case for handling of overflows in congruence domain.
Add additional test case for handling of overflows in congruence domain.
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
a9e2b1a5c66b837b0a25ddd571f96b71a95453cb
assembler/d16-main/main.c
assembler/d16-main/main.c
// // main.c // d16-asm // // Created by Michael Nolan on 6/17/16. // Copyright © 2016 Michael Nolan. All rights reserved. // #include <stdio.h> #include <stdlib.h> #include "parser.h" #include "assembler.h" #include <string.h> #include "instruction.h" #include <unistd.h> extern int yyparse (FILE* output_file); extern FILE* yyin; extern int yydebug; int main(int argc, char * const argv[]) { FILE *f,*o; opterr = 0; int c; while ((c=getopt(argc,argv,"o:")) != -1){ switch(c){ case 'o': o = fopen(optarg,"wb"); } } if(optind<argc) f = fopen(argv[optind],"r"); else{ fprintf(stderr,"d16: No input files specified\n"); exit(-1); } if(o==NULL){ o=fopen("a.out","wb"); } yyin = f; init_hash_table(); do { yyparse(o); } while (!feof(yyin)); fclose(f); fclose(o); return 0; }
// // main.c // d16-asm // // Created by Michael Nolan on 6/17/16. // Copyright © 2016 Michael Nolan. All rights reserved. // #include <stdio.h> #include <stdlib.h> #include "parser.h" #include "assembler.h" #include <string.h> #include "instruction.h" #include <unistd.h> extern int yyparse (FILE* output_file); extern FILE* yyin; extern int yydebug; bool binary_mode = false; int main(int argc, char * const argv[]) { FILE *f,*o; opterr = 0; int c; while ((c=getopt(argc,argv,"o:bh")) != -1){ switch(c){ case 'o': o = fopen(optarg,"wb"); break; case 'b': binary_mode = true; break; case 'h': puts("Usage: d16 [-bh] -o [outputfile] [input]\n"); exit(0); break; } } if(optind<argc) f = fopen(argv[optind],"r"); else{ fprintf(stderr,"d16: No input files specified\n"); exit(-1); } if(o==NULL){ o=fopen("a.out","wb"); } yyin = f; init_hash_table(); do { yyparse(o); } while (!feof(yyin)); fclose(f); fclose(o); return 0; }
Add help and binary options
Add help and binary options
C
mit
d16-processor/d16,d16-processor/d16,d16-processor/d16,d16-processor/d16,d16-processor/d16
970da55f2320bef2103f879f4b6c7278b431bfbe
cast/cast.h
cast/cast.h
/* * CAST-128 in C * Written by Steve Reid <[email protected]> * 100% Public Domain - no warranty * Released 1997.10.11 */ #ifndef _CAST_H_ #define _CAST_H_ typedef unsigned char u8; /* 8-bit unsigned */ typedef unsigned long u32; /* 32-bit unsigned */ typedef struct { u32 xkey[32]; /* Key, after expansion */ int rounds; /* Number of rounds to use, 12 or 16 */ } cast_key; void cast_setkey(cast_key* key, u8* rawkey, int keybytes); void cast_encrypt(cast_key* key, u8* inblock, u8* outblock); void cast_decrypt(cast_key* key, u8* inblock, u8* outblock); #endif /* ifndef _CAST_H_ */
/* * CAST-128 in C * Written by Steve Reid <[email protected]> * 100% Public Domain - no warranty * Released 1997.10.11 */ #ifndef _CAST_H_ #define _CAST_H_ #include <stdint.h> typedef uint8_t u8; /* 8-bit unsigned */ typedef uint32_t u32; /* 32-bit unsigned */ typedef struct { u32 xkey[32]; /* Key, after expansion */ int rounds; /* Number of rounds to use, 12 or 16 */ } cast_key; void cast_setkey(cast_key* key, u8* rawkey, int keybytes); void cast_encrypt(cast_key* key, u8* inblock, u8* outblock); void cast_decrypt(cast_key* key, u8* inblock, u8* outblock); #endif /* ifndef _CAST_H_ */
Use stdint.h in CAST to implement 32 bit and 8 bit unsigned integers.
Use stdint.h in CAST to implement 32 bit and 8 bit unsigned integers.
C
bsd-3-clause
wilx/apg,wilx/apg,wilx/apg,rogerapras/apg,rogerapras/apg,rogerapras/apg,rogerapras/apg,wilx/apg
82b7e62e178e87e9288f62ed0b90d824f426eb02
kernel/kernel_debug.h
kernel/kernel_debug.h
/* * Copyright 2011-2014 Blender Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ CCL_NAMESPACE_BEGIN ccl_device_inline void debug_data_init(DebugData *debug_data) { debug_data->num_bvh_traversal_steps = 0; } ccl_device_inline void kernel_write_debug_passes(KernelGlobals *kg, ccl_global float *buffer, PathState *state, DebugData *debug_data, int sample) { kernel_write_pass_float(buffer + kernel_data.film.pass_bvh_traversal_steps, sample, debug_data->num_bvh_traversal_steps); } CCL_NAMESPACE_END
/* * Copyright 2011-2014 Blender Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ CCL_NAMESPACE_BEGIN ccl_device_inline void debug_data_init(DebugData *debug_data) { debug_data->num_bvh_traversal_steps = 0; } ccl_device_inline void kernel_write_debug_passes(KernelGlobals *kg, ccl_global float *buffer, PathState *state, DebugData *debug_data, int sample) { int flag = kernel_data.film.pass_flag; if(flag & PASS_BVH_TRAVERSAL_STEPS) { kernel_write_pass_float(buffer + kernel_data.film.pass_bvh_traversal_steps, sample, debug_data->num_bvh_traversal_steps); } } CCL_NAMESPACE_END
Fix for viewport rendering with debug enabled
Cycles: Fix for viewport rendering with debug enabled
C
apache-2.0
tangent-opensource/coreBlackbird,pyrochlore/cycles,pyrochlore/cycles,tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird,pyrochlore/cycles
eb3d6f8d292110e86a39b0e0f0fbc24821286aaf
JavaScriptCore/wtf/MathExtras.h
JavaScriptCore/wtf/MathExtras.h
/* * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <math.h> #if PLATFORM(WIN) inline float roundf(float num) { return num > 0 ? floorf(num + 0.5f) : ceilf(num - 0.5f); } inline long lroundf(float num) { return num > 0 ? num + 0.5f : ceilf(num - 0.5f); } #endif
Add mathextras.h to wtf to give win32 roundf/lroundf support.
Add mathextras.h to wtf to give win32 roundf/lroundf support. git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@14506 bbb929c8-8fbe-4397-9dbb-9b2b20218538
C
bsd-3-clause
primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs
3155d4daa5bb7c1a93aebc890240589cdcfa3e88
ObjectiveRocks/ObjectiveRocks.h
ObjectiveRocks/ObjectiveRocks.h
// // ObjectiveRocks.h // ObjectiveRocks // // Created by Iska on 20/11/14. // Copyright (c) 2014 BrainCookie. All rights reserved. // #import "RocksDB.h" #import "RocksDBOptions.h" #import "RocksDBReadOptions.h" #import "RocksDBWriteOptions.h" #import "RocksDBWriteBatch.h" #import "RocksDBIterator.h" #import "RocksDBSnapshot.h" #import "RocksDBComparator.h"
// // ObjectiveRocks.h // ObjectiveRocks // // Created by Iska on 20/11/14. // Copyright (c) 2014 BrainCookie. All rights reserved. // #import "RocksDB.h" #import "RocksDBOptions.h" #import "RocksDBReadOptions.h" #import "RocksDBWriteOptions.h" #import "RocksDBWriteBatch.h" #import "RocksDBIterator.h" #import "RocksDBSnapshot.h" #import "RocksDBComparator.h" #import "RocksDBMergeOperator.h"
Add RocksDB merge operator import to the main public header
Add RocksDB merge operator import to the main public header
C
mit
iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks
6c12c50736a7f2cce5d8776c9d64b85e3435aec6
chrome/browser/extensions/external_install_ui.h
chrome/browser/extensions/external_install_ui.h
// Copyright (c) 2012 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_EXTENSIONS_EXTERNAL_INSTALL_UI_H_ #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_UI_H_ class Browser; class ExtensionService; // Only enable the external install UI on Windows and Mac, because those // are the platforms where external installs are the biggest issue. #if defined(OS_WINDOWS) || defined(OS_MACOSX) #define ENABLE_EXTERNAL_INSTALL_UI 1 #else #define ENABLE_EXTERNAL_INSTALL_UI 0 #endif namespace extensions { class Extension; // Adds/Removes a global error informing the user that an external extension // was installed. bool AddExternalInstallError(ExtensionService* service, const Extension* extension); void RemoveExternalInstallError(ExtensionService* service); // Used for testing. bool HasExternalInstallError(ExtensionService* service); } // namespace extensions #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_UI_H_
// Copyright (c) 2012 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_EXTENSIONS_EXTERNAL_INSTALL_UI_H_ #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_UI_H_ #include "build/build_config.h" class Browser; class ExtensionService; // Only enable the external install UI on Windows and Mac, because those // are the platforms where external installs are the biggest issue. #if defined(OS_WIN) || defined(OS_MACOSX) #define ENABLE_EXTERNAL_INSTALL_UI 1 #else #define ENABLE_EXTERNAL_INSTALL_UI 0 #endif namespace extensions { class Extension; // Adds/Removes a global error informing the user that an external extension // was installed. bool AddExternalInstallError(ExtensionService* service, const Extension* extension); void RemoveExternalInstallError(ExtensionService* service); // Used for testing. bool HasExternalInstallError(ExtensionService* service); } // namespace extensions #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_UI_H_
Fix external extension install (post-sideload) restriction on Windows.
Fix external extension install (post-sideload) restriction on Windows. I had #ifdef'd it to OS_WINDOWS. It should be OS_WIN. BUG=156727 Review URL: https://codereview.chromium.org/11238042 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@163418 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
Jonekee/chromium.src,chuan9/chromium-crosswalk,dushu1203/chromium.src,markYoungH/chromium.src,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,dednal/chromium.src,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,Chilledheart/chromium,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,Jonekee/chromium.src,markYoungH/chromium.src,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,littlstar/chromium.src,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,dednal/chromium.src,littlstar/chromium.src,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,littlstar/chromium.src,dednal/chromium.src,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,littlstar/chromium.src,Just-D/chromium-1,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,patrickm/chromium.src,mogoweb/chromium-crosswalk,dednal/chromium.src,Just-D/chromium-1,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,anirudhSK/chromium,jaruba/chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,jaruba/chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswalk,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,Fireblend/chromium-crosswalk,littlstar/chromium.src,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,Jonekee/chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,crosswalk-project/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,anirudhSK/chromium,anirudhSK/chromium,axinging/chromium-crosswalk,markYoungH/chromium.src,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,dednal/chromium.src,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,zcbenz/cefode-chromium,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,nacl-webkit/chrome_deps,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,Just-D/chromium-1,M4sse/chromium.src,Chilledheart/chromium,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,markYoungH/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,Jonekee/chromium.src,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,fujunwei/chromium-crosswalk,Just-D/chromium-1,axinging/chromium-crosswalk,Jonekee/chromium.src,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,M4sse/chromium.src,ltilve/chromium,markYoungH/chromium.src,M4sse/chromium.src,dednal/chromium.src,zcbenz/cefode-chromium,hgl888/chromium-crosswalk,dushu1203/chromium.src,ltilve/chromium,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,hujiajie/pa-chromium,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,dushu1203/chromium.src,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,hujiajie/pa-chromium,anirudhSK/chromium,axinging/chromium-crosswalk,dednal/chromium.src,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,ltilve/chromium,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,axinging/chromium-crosswalk,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,zcbenz/cefode-chromium,jaruba/chromium.src,M4sse/chromium.src,jaruba/chromium.src,nacl-webkit/chrome_deps,dushu1203/chromium.src,hgl888/chromium-crosswalk,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,jaruba/chromium.src,patrickm/chromium.src,jaruba/chromium.src,Chilledheart/chromium,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,fujunwei/chromium-crosswalk,patrickm/chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,timopulkkinen/BubbleFish,ondra-novak/chromium.src,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,junmin-zhu/chromium-rivertrail,chuan9/chromium-crosswalk,anirudhSK/chromium,ChromiumWebApps/chromium,hujiajie/pa-chromium,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,ltilve/chromium,ChromiumWebApps/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,patrickm/chromium.src,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,zcbenz/cefode-chromium,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,hujiajie/pa-chromium,axinging/chromium-crosswalk,anirudhSK/chromium,fujunwei/chromium-crosswalk,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,zcbenz/cefode-chromium,chuan9/chromium-crosswalk,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,ltilve/chromium,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,ltilve/chromium,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,dushu1203/chromium.src,markYoungH/chromium.src,axinging/chromium-crosswalk,ltilve/chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,anirudhSK/chromium,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,junmin-zhu/chromium-rivertrail,markYoungH/chromium.src,patrickm/chromium.src,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,ltilve/chromium,hujiajie/pa-chromium,timopulkkinen/BubbleFish,dednal/chromium.src,ondra-novak/chromium.src,hujiajie/pa-chromium
c3d0d1fa21c0302241b35fde7d591b27f6eb3afa
common_audio/signal_processing/cross_correlation.c
common_audio/signal_processing/cross_correlation.c
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" /* C version of WebRtcSpl_CrossCorrelation() for generic platforms. */ void WebRtcSpl_CrossCorrelationC(int32_t* cross_correlation, const int16_t* seq1, const int16_t* seq2, int16_t dim_seq, int16_t dim_cross_correlation, int right_shifts, int step_seq2) { int i = 0, j = 0; for (i = 0; i < dim_cross_correlation; i++) { int32_t corr = 0; // Linux 64-bit performance is improved by the int16_t cast below. // Presumably this is some sort of compiler bug, as there's no obvious // reason why that should result in better code. for (j = 0; j < dim_seq; j++) corr += (seq1[j] * seq2[j]) >> (int16_t)right_shifts; seq2 += step_seq2; *cross_correlation++ = corr; } }
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" /* C version of WebRtcSpl_CrossCorrelation() for generic platforms. */ void WebRtcSpl_CrossCorrelationC(int32_t* cross_correlation, const int16_t* seq1, const int16_t* seq2, int16_t dim_seq, int16_t dim_cross_correlation, int right_shifts, int step_seq2) { int i = 0, j = 0; for (i = 0; i < dim_cross_correlation; i++) { int32_t corr = 0; for (j = 0; j < dim_seq; j++) corr += (seq1[j] * seq2[j]) >> right_shifts; seq2 += step_seq2; *cross_correlation++ = corr; } }
Remove a cast again, after it was shown to worsen Windows perf.
Remove a cast again, after it was shown to worsen Windows perf. This will hurt Linux x64 perf, but we think that's a compiler bug and we're willing to take the hit for the better clarity of the code sans cast as well as the better Windows perf. Hopefully eventually the compiler will improve. BUG=504813 TEST=none TBR=andrew Review URL: https://codereview.webrtc.org/1215053002 Cr-Original-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#9516} Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc Cr-Mirrored-Commit: 3c60d614636a858e18fda9e52045fd1192517b8d
C
bsd-3-clause
sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc
0420ff2a64e441402a14ab10ea5fcf12badc6c42
util.h
util.h
#ifndef UTIL_H #define UTIL_H #include "fibrile.h" /** Atomics. */ #define fence() fibrile_fence() #define fadd(ptr, n) __sync_fetch_and_add(ptr, n) #define cas(...) __sync_val_compare_and_swap(__VA_ARGS__) /** Lock. */ #define lock(ptr) fibrile_lock(ptr) #define unlock(ptr) fibrile_unlock(ptr) #define trylock(ptr) (!__sync_lock_test_and_set(ptr, 1)) /** Barrier. */ static inline void barrier(int n) { static volatile int count = 0; static volatile int sense = 0; int local_sense = !fibrile_deq.sense; if (fadd(&count, 1) == n - 1) { count = 0; sense = local_sense; } while (sense != local_sense); } /** Others. */ typedef struct _frame_t { void * rsp; void * rip; } frame_t; #define this_frame() ((frame_t *) __builtin_frame_address(0)) #define unreachable() __builtin_unreachable() #define adjust(addr, offset) ((void *) addr - offset) #endif /* end of include guard: UTIL_H */
#ifndef UTIL_H #define UTIL_H #include "fibrile.h" /** Atomics. */ #define fence() fibrile_fence() #define fadd(ptr, n) __sync_fetch_and_add(ptr, n) #define cas(...) __sync_val_compare_and_swap(__VA_ARGS__) /** Lock. */ #define lock(ptr) fibrile_lock(ptr) #define unlock(ptr) fibrile_unlock(ptr) #define trylock(ptr) (!__sync_lock_test_and_set(ptr, 1)) /** Barrier. */ static inline void barrier(int n) { static volatile int count = 0; static volatile int sense = 0; int local_sense = !fibrile_deq.sense; if (fadd(&count, 1) == n - 1) { count = 0; sense = local_sense; } while (sense != local_sense); fence(); } /** Others. */ typedef struct _frame_t { void * rsp; void * rip; } frame_t; #define this_frame() ((frame_t *) __builtin_frame_address(0)) #define unreachable() __builtin_unreachable() #define adjust(addr, offset) ((void *) addr - offset) #endif /* end of include guard: UTIL_H */
Add a fence in barrier.
Add a fence in barrier.
C
mit
chaoran/fibril,chaoran/fibril,chaoran/fibril
6bed2ffc047130faf3beb32aacc75aa251d355bc
extensions/flac/src/main/jni/include/data_source.h
extensions/flac/src/main/jni/include/data_source.h
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef INCLUDE_DATA_SOURCE_H_ #define INCLUDE_DATA_SOURCE_H_ #include <jni.h> #include <sys/types.h> class DataSource { public: // Returns the number of bytes read, or -1 on failure. It's not an error if // this returns zero; it just means the given offset is equal to, or // beyond, the end of the source. virtual ssize_t readAt(off64_t offset, void* const data, size_t size) = 0; }; #endif // INCLUDE_DATA_SOURCE_H_
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef INCLUDE_DATA_SOURCE_H_ #define INCLUDE_DATA_SOURCE_H_ #include <jni.h> #include <sys/types.h> class DataSource { public: virtual ~DataSource() {} // Returns the number of bytes read, or -1 on failure. It's not an error if // this returns zero; it just means the given offset is equal to, or // beyond, the end of the source. virtual ssize_t readAt(off64_t offset, void* const data, size_t size) = 0; }; #endif // INCLUDE_DATA_SOURCE_H_
Remove ndk-build from [] flac build rules
Remove ndk-build from [] flac build rules Android NDK r9 in [] is deprecated (see [] Update the ExoPlayer flac extensions to use android_jni_library. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=182017669
C
apache-2.0
KiminRyu/ExoPlayer,ebr11/ExoPlayer,saki4510t/ExoPlayer,ened/ExoPlayer,amzn/exoplayer-amazon-port,ened/ExoPlayer,MaTriXy/ExoPlayer,tntcrowd/ExoPlayer,kiall/ExoPlayer,stari4ek/ExoPlayer,superbderrick/ExoPlayer,MaTriXy/ExoPlayer,saki4510t/ExoPlayer,superbderrick/ExoPlayer,tntcrowd/ExoPlayer,androidx/media,superbderrick/ExoPlayer,saki4510t/ExoPlayer,google/ExoPlayer,ebr11/ExoPlayer,tntcrowd/ExoPlayer,ebr11/ExoPlayer,amzn/exoplayer-amazon-port,KiminRyu/ExoPlayer,androidx/media,MaTriXy/ExoPlayer,stari4ek/ExoPlayer,kiall/ExoPlayer,google/ExoPlayer,ened/ExoPlayer,amzn/exoplayer-amazon-port,stari4ek/ExoPlayer,google/ExoPlayer,KiminRyu/ExoPlayer,androidx/media,kiall/ExoPlayer
9dc95fbb934b842c8c055541d727477eb5de8d44
Criollo/Source/Extensions/NSDate+RFC1123.h
Criollo/Source/Extensions/NSDate+RFC1123.h
// // NSDate+RFC1123.h // MKNetworkKit // // Created by Marcus Rohrmoser // http://blog.mro.name/2009/08/nsdateformatter-http-header/ // http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 // No obvious license attached /** Convert RFC1123 format dates */ @interface NSDate (RFC1123) /** * @name Convert a string to NSDate */ /** * Convert a RFC1123 'Full-Date' string * (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1) * into NSDate. * * @param value_ NSString* the string to convert * @return NSDate* */ +(NSDate*)dateFromRFC1123:(NSString*)value_; /** * @name Retrieve NSString value of the current date */ /** * Convert NSDate into a RFC1123 'Full-Date' string * (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1). * * @return NSString* */ @property (nonatomic, readonly, copy) NSString *rfc1123String; @end
// // NSDate+RFC1123.h // MKNetworkKit // // Created by Marcus Rohrmoser // http://blog.mro.name/2009/08/nsdateformatter-http-header/ // http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 // No obvious license attached #import <Foundation/Foundation.h> /** Convert RFC1123 format dates */ @interface NSDate (RFC1123) /** * @name Convert a string to NSDate */ /** * Convert a RFC1123 'Full-Date' string * (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1) * into NSDate. * * @param value_ NSString* the string to convert * @return NSDate* */ +(NSDate*)dateFromRFC1123:(NSString*)value_; /** * @name Retrieve NSString value of the current date */ /** * Convert NSDate into a RFC1123 'Full-Date' string * (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1). * * @return NSString* */ @property (nonatomic, readonly, copy) NSString *rfc1123String; @end
Add explicit Foundation import to NSDate extension (for spm compatibility)
Add explicit Foundation import to NSDate extension (for spm compatibility)
C
mit
thecatalinstan/Criollo,thecatalinstan/Criollo,thecatalinstan/Criollo
a9aeb47a0bbf847dbe899e5cc875b25dc9ee71d7
gtksourceview2.h
gtksourceview2.h
#include "gtk2hs_macros.h" #include <gtksourceview/gtksourcebuffer.h> #if GTK_MAJOR_VERSION < 3 #include <gtksourceview/gtksourceiter.h> #endif #include <gtksourceview/gtksourcelanguage.h> #include <gtksourceview/gtksourcelanguagemanager.h> #include <gtksourceview/gtksourcestyle.h> #include <gtksourceview/gtksourcestylescheme.h> #include <gtksourceview/gtksourcestyleschememanager.h> #include <gtksourceview/gtksourceview.h> #include <gtksourceview/gtksourceview-typebuiltins.h> #include <gtksourceview/gtksourceundomanager.h> #include <gtksourceview/gtksourcecompletionitem.h>
#include "gtk2hs_macros.h" #include <gtksourceview/gtksourcebuffer.h> #if GTK_MAJOR_VERSION < 3 #include <gtksourceview/gtksourceiter.h> #endif #include <gtksourceview/gtksourcelanguage.h> #include <gtksourceview/gtksourcelanguagemanager.h> #include <gtksourceview/gtksourcestyle.h> #include <gtksourceview/gtksourcestylescheme.h> #include <gtksourceview/gtksourcestyleschememanager.h> #include <gtksourceview/gtksourceview.h> #include <gtksourceview/gtksourceview-typebuiltins.h> #include <gtksourceview/gtksourceundomanager.h> #include <gtksourceview/gtksourcecompletionitem.h> #include <gtksourceview/gtksourcegutter.h> #include <gtksourceview/gtksourcecompletionprovider.h> #include <gtksourceview/gtksourcecompletionproposal.h> #include <gtksourceview/gtksourcemark.h> #include <gtksourceview/gtksourcecompletioninfo.h>
Fix for new versions of gtksourceview provided by Oleg Chiruhin
Fix for new versions of gtksourceview provided by Oleg Chiruhin
C
lgpl-2.1
gtk2hs/gtksourceview,gtk2hs/gtksourceview
b80f4b7f7354507616789b1753f115ecfe111013
tests/regression/27-inv_invariants/04-ints-not-interval.c
tests/regression/27-inv_invariants/04-ints-not-interval.c
//PARAM: --disable ana.int.def_exc --enable ana.int.interval int main() { int x; if(!x) { assert(x==0); } else { assert(x==1); //UNKNOWN! } }
//PARAM: --disable ana.int.def_exc --enable ana.int.interval int main() { int x; if(!x) { } else { assert(x==1); //UNKNOWN! } }
Remove assert that is unknown when runinng only with interval
27/04: Remove assert that is unknown when runinng only with interval
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer