commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
1
4.87k
subject
stringlengths
15
778
message
stringlengths
15
8.75k
lang
stringclasses
266 values
license
stringclasses
13 values
repos
stringlengths
5
127k
780f85f9521ae28669cd25bad8ffe8d74f7c913c
src/hexutil/basics/datum.h
src/hexutil/basics/datum.h
#ifndef DATUM_H #define DATUM_H #include "hexutil/basics/atom.h" // The variant must be wrapped like this, otherwise the compiler will get confused about which overload to use struct Datum { Datum(): value(0) { } Datum(int x): value(x) { } boost::variant<Atom, int, float, std::string> value; Datum& operator=(const Datum& x) { value = x.value; return *this; } bool operator==(const Datum& x) const { return value == x.value; } Datum& operator=(const int& x) { value = x; return *this; } bool operator==(const int& x) const { return boost::get<int>(value) == x; } template<typename T> operator T() const { return boost::get<T>(value); } template<typename T> bool is() const { return boost::get<T>(&value) != nullptr; } template<typename T> const T& get() const { return boost::get<T>(value); } std::string get_as_str() const; Atom get_as_atom() const; int get_as_int() const; }; std::ostream& operator<<(std::ostream& os, const Datum& atom); #endif
#ifndef DATUM_H #define DATUM_H #include "hexutil/basics/atom.h" // The variant must be wrapped like this, otherwise the compiler will get confused about which overload to use struct Datum { Datum(): value(0) { } Datum(int x): value(x) { } Datum(const std::string& x): value(x) { } boost::variant<Atom, int, float, std::string> value; Datum& operator=(const Datum& x) { value = x.value; return *this; } bool operator==(const Datum& x) const { return value == x.value; } Datum& operator=(const Atom& x) { value = x; return *this; } bool operator==(const Atom& x) const { return boost::get<Atom>(value) == x; } Datum& operator=(const int& x) { value = x; return *this; } bool operator==(const int& x) const { return boost::get<int>(value) == x; } template<typename T> operator T() const { return boost::get<T>(value); } template<typename T> bool is() const { return boost::get<T>(&value) != nullptr; } template<typename T> const T& get() const { return boost::get<T>(value); } std::string get_as_str() const; Atom get_as_atom() const; int get_as_int() const; }; std::ostream& operator<<(std::ostream& os, const Datum& atom); #endif
Support comparing Datums against Atoms.
Support comparing Datums against Atoms.
C
mit
ejrh/hex,ejrh/hex
55ad95c141b0962dda7f3d530e6ec9c7f143ec1d
test/src/main.c
test/src/main.c
#include <stdio.h> #include "main.h" int main() { printf("Test goes here.\n"); }
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include "rtree.h" #include "minunit.h" #include "main.h" int tests_run = 0; static char *test_all_kept() { for (int count = 0; count < 1000; count++) { rtree_t *rt = rtree_create(); for (uintptr_t i = 0; i < count; i++) { rtree_add(rt, (void *) i, (double) drand48()); } char *recvd = calloc(count, sizeof(char)); for (int i = 0; i < count; i++) { int pos = (int) ((uintptr_t) rtree_rpop(rt)); recvd[pos]++; } for (int i = 0; i < count; i++) { char *err_msg = calloc(80, sizeof(char)); sprintf(err_msg, "Expected exactly 1 elt with value %d, but was %d\n", i, recvd[i]); mu_assert(err_msg, recvd[i] == 1); free(err_msg); } free(recvd); rtree_destroy(rt); } return 0; } static char *all_tests() { mu_run_test(test_all_kept); return 0; } int main() { char *result = all_tests(); if (result != 0) { printf("%s\n", result); } else { printf("All tests passed.\n"); } printf("Tests run: %d\n", tests_run); return result != 0; }
Add in check to ensure all elements are included.
Add in check to ensure all elements are included.
C
mit
hyPiRion/roulette-tree,hyPiRion/roulette-tree
9bce7326cef3665966a756236c5b9284e776aeed
src/omnicore/sto.h
src/omnicore/sto.h
#ifndef OMNICORE_STO_H #define OMNICORE_STO_H #include <stdint.h> #include <set> #include <string> #include <utility> namespace mastercore { //! Comparator for owner/receiver entries struct SendToOwners_compare { bool operator()(const std::pair<int64_t, std::string>& p1, const std::pair<int64_t, std::string>& p2) const; }; //! Fee required to be paid per owner/receiver, nominated in willets const int64_t TRANSFER_FEE_PER_OWNER = 1; const int64_t TRANSFER_FEE_PER_OWNER_V1 = 100; //! Set of owner/receivers, sorted by amount they own or might receive typedef std::set<std::pair<int64_t, std::string>, SendToOwners_compare> OwnerAddrType; /** Determines the receivers and amounts to distribute. */ OwnerAddrType STO_GetReceivers(const std::string& sender, uint32_t property, int64_t amount); } #endif // OMNICORE_STO_H
#ifndef OMNICORE_STO_H #define OMNICORE_STO_H #include <stdint.h> #include <set> #include <string> #include <utility> namespace mastercore { //! Comparator for owner/receiver entries struct SendToOwners_compare { bool operator()(const std::pair<int64_t, std::string>& p1, const std::pair<int64_t, std::string>& p2) const; }; //! Fee required to be paid per owner/receiver, nominated in willets const int64_t TRANSFER_FEE_PER_OWNER = 1; const int64_t TRANSFER_FEE_PER_OWNER_V1 = 1000; //! Set of owner/receivers, sorted by amount they own or might receive typedef std::set<std::pair<int64_t, std::string>, SendToOwners_compare> OwnerAddrType; /** Determines the receivers and amounts to distribute. */ OwnerAddrType STO_GetReceivers(const std::string& sender, uint32_t property, int64_t amount); } #endif // OMNICORE_STO_H
Change STOv1 fee per recipient to 0.00001000 OMNI
Change STOv1 fee per recipient to 0.00001000 OMNI
C
mit
OmniLayer/omnicore,OmniLayer/omnicore,OmniLayer/omnicore,OmniLayer/omnicore,OmniLayer/omnicore,OmniLayer/omnicore
e28dd839113fb558faf877c9c097de6c7dcf5361
games/hack/hack.version.c
games/hack/hack.version.c
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.version.c - version 1.0.3 */ /* $Header: hack.version.c,v 1.5 85/05/09 00:40:41 aeb Exp $ */ #include "date.h" doversion(){ pline("%s 1.0.3 - last edit %s.", ( #ifdef QUEST "Quest" #else "Hack" #endif QUEST ), datestring); return(0); }
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.version.c - version 1.0.3 */ /* $Id$ */ #include "date.h" doversion(){ pline("%s 1.0.3 - last edit %s.", ( #ifdef QUEST "Quest" #else "Hack" #endif QUEST ), datestring); return(0); }
Use Id instead of Header.
Use Id instead of Header.
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
d14e9e78e427139e30c538242c5e65e895890067
test/FrontendC/2007-03-27-VarLengthArray.c
test/FrontendC/2007-03-27-VarLengthArray.c
// RUN: %llvmgcc -S %s -o - | grep {getelementptr i32} extern void f(int *); int e(int m, int n) { int x[n]; f(x); return x[m]; }
// RUN: %llvmgcc -S %s -o - | grep {getelementptr \\\[0 x i32\\\]} extern void f(int *); int e(int m, int n) { int x[n]; f(x); return x[m]; }
Adjust this test for recent llvm-gcc changes.
Adjust this test for recent llvm-gcc changes. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@65771 91177308-0d34-0410-b5e6-96231b3b80d8
C
bsd-2-clause
dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm
32d67adf4196541bd6b4bc425886eb30e760978f
mud/home/Account/lib/blacklist.c
mud/home/Account/lib/blacklist.c
#include <kernel/kernel.h> #include <kotaka/paths/account.h> static int is_control_garbage(string input) { if (strlen(input) >= 1 && input[0] < ' ') { return 1; } return 0; } static int is_http_garbage(string input) { if (strlen(input) >= 4 && input[0 .. 3] == "GET ") { return 1; } return 0; } static string garbage(string input) { if (is_http_garbage(input)) { return "http"; } if (is_control_garbage(input)) { return "control"; } return nil; } static void siteban(string ip, string reason) { string creator; mapping ban; ban = ([ ]); creator = DRIVER->creator(object_name(this_object())); ban["message"] = reason; ban["expire"] = time() + 90 * 86400; ban["issuer"] = creator; BAND->ban_site(ip + "/32", ban); }
#include <kernel/kernel.h> #include <kotaka/paths/account.h> static int is_control_garbage(string input) { if (strlen(input) >= 1 && input[0] < ' ') { return 1; } return 0; } static int is_http_garbage(string input) { if (strlen(input) >= 4 && input[0 .. 3] == "GET ") { return 1; } return 0; } static string garbage(string input) { if (is_control_garbage(input)) { return "control"; } if (is_http_garbage(input)) { return "http"; } return nil; } static void siteban(string ip, string reason) { string creator; mapping ban; ban = ([ ]); creator = DRIVER->creator(object_name(this_object())); ban["message"] = reason; ban["expire"] = time() + 90 * 86400; ban["issuer"] = creator; BAND->ban_site(ip + "/32", ban); }
Check for control garbage before http garbage, httpd isn't detecting control garbage because it has http whitelisted
Check for control garbage before http garbage, httpd isn't detecting control garbage because it has http whitelisted
C
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
1bc3089d0dbfd30a3384c3e7d387a6269bc9f69f
kernel/arch/x86/x86.h
kernel/arch/x86/x86.h
#pragma once #include <stdint.h> #include <cpuid.h> #define cpu_equals(name) __builtin_cpu_is(name) #define cpu_supports(feature) __builtin_cpu_supports(feature) #define get_cpuid(a, b, c, d) __get_cpuid(0, a, b, c, d) typedef struct regs { uint32_t gs, fs, es, ds; uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; uint32_t int_no, err_code; uint32_t eip, cs, eflags, useresp, ss; } regs_t; #define IRQ_CHAIN_SIZE 16 #define IRQ_CHAIN_DEPTH 4 typedef void (*irq_handler_t) (regs_t *); typedef int (*irq_handler_chain_t) (regs_t *);
#pragma once #include <stdint.h> #include <cpuid.h> #define cpu_equals(name) __builtin_cpu_is(name) #define cpu_supports(feature) __builtin_cpu_supports(feature) #define get_cpuid(in, a, b, c, d) __get_cpuid(in, a, b, c, d) typedef struct regs { uint32_t gs, fs, es, ds; uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; uint32_t int_no, err_code; uint32_t eip, cs, eflags, useresp, ss; } regs_t; #define IRQ_CHAIN_SIZE 16 #define IRQ_CHAIN_DEPTH 4 typedef void (*irq_handler_t) (regs_t *); typedef int (*irq_handler_chain_t) (regs_t *);
Add first parameter to get_cpuid definition.
Add first parameter to get_cpuid definition.
C
mit
DirectMyFile/Raptor,DirectMyFile/Raptor
4814a4f313437938e31f150c2b8b9d4b25b659f3
extensions/ringraylib/ring_raylib.c
extensions/ringraylib/ring_raylib.c
/* Copyright (c) 2019 Mahmoud Fayed <msfclipper@yahoo.com> */ #define RING_EXTENSION // Don't call : windows.h (Avoid conflict with raylib.h) #include <ring.h> #include <raylib.h> RING_FUNC(ring_InitWindow) { if ( RING_API_PARACOUNT != 3 ) { RING_API_ERROR(RING_API_MISS3PARA); return ; } if ( ! RING_API_ISNUMBER(1) ) { RING_API_ERROR(RING_API_BADPARATYPE); return ; } if ( ! RING_API_ISNUMBER(2) ) { RING_API_ERROR(RING_API_BADPARATYPE); return ; } if ( ! RING_API_ISSTRING(3) ) { RING_API_ERROR(RING_API_BADPARATYPE); return ; } InitWindow( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2),RING_API_GETSTRING(3)); } RING_API void ringlib_init(RingState *pRingState) { ring_vm_funcregister("initwindow",ring_InitWindow); }
/* Copyright (c) 2019 Mahmoud Fayed <msfclipper@yahoo.com> */ #define RING_EXTENSION // Don't call : windows.h (Avoid conflict with raylib.h) #include <ring.h> #include <raylib.h> RING_FUNC(ring_InitWindow) { if ( RING_API_PARACOUNT != 3 ) { RING_API_ERROR(RING_API_MISS3PARA); return ; } if ( ! RING_API_ISNUMBER(1) ) { RING_API_ERROR(RING_API_BADPARATYPE); return ; } if ( ! RING_API_ISNUMBER(2) ) { RING_API_ERROR(RING_API_BADPARATYPE); return ; } if ( ! RING_API_ISSTRING(3) ) { RING_API_ERROR(RING_API_BADPARATYPE); return ; } InitWindow( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2),RING_API_GETSTRING(3)); } RING_FUNC(ring_WindowShouldClose) { if ( RING_API_PARACOUNT != 0 ) { RING_API_ERROR(RING_API_BADPARACOUNT); return ; } RING_API_RETNUMBER(WindowShouldClose()); } RING_API void ringlib_init(RingState *pRingState) { ring_vm_funcregister("initwindow",ring_InitWindow); ring_vm_funcregister("windowshouldclose",ring_WindowShouldClose); }
Update RingRayLib - raylib.c - Add Function : bool WindowShouldClose(void)
Update RingRayLib - raylib.c - Add Function : bool WindowShouldClose(void)
C
mit
ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring
69da97a9d0b256a4d9448bfa5f9569ac38156c1f
source/crate_demo/graphics_manager.h
source/crate_demo/graphics_manager.h
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #ifndef CRATE_DEMO_GRAPHICS_MANAGER_H #define CRATE_DEMO_GRAPHICS_MANAGER_H #include "common/graphics_manager_base.h" #include <d3d11.h> namespace CrateDemo { class GameStateManager; class GraphicsManager : public Common::GraphicsManagerBase { public: GraphicsManager(GameStateManager *gameStateManager); private: GameStateManager *m_gameStateManager; ID3D11RenderTargetView *m_renderTargetView; public: bool Initialize(int clientWidth, int clientHeight, HWND hwnd); void Shutdown(); void DrawFrame(); void OnResize(int newClientWidth, int newClientHeight); void GamePaused(); void GameUnpaused(); }; } // End of namespace CrateDemo #endif
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #ifndef CRATE_DEMO_GRAPHICS_MANAGER_H #define CRATE_DEMO_GRAPHICS_MANAGER_H #include "common/graphics_manager_base.h" #include <d3d11.h> #include "DirectXMath.h" namespace CrateDemo { class GameStateManager; struct Vertex { DirectX::XMFLOAT3 pos; DirectX::XMFLOAT4 color; }; class GraphicsManager : public Common::GraphicsManagerBase { public: GraphicsManager(GameStateManager *gameStateManager); private: GameStateManager *m_gameStateManager; ID3D11RenderTargetView *m_renderTargetView; public: bool Initialize(int clientWidth, int clientHeight, HWND hwnd); void Shutdown(); void DrawFrame(); void OnResize(int newClientWidth, int newClientHeight); void GamePaused(); void GameUnpaused(); }; } // End of namespace CrateDemo #endif
Create Vertex struct to hold vertex info
CRATE_DEMO: Create Vertex struct to hold vertex info
C
apache-2.0
RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject
cdcefd8721e2f8df853cdc0cd8a7a67a122b7be1
webkit/glue/simple_webmimeregistry_impl.h
webkit/glue/simple_webmimeregistry_impl.h
// Copyright (c) 2009 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 WEBMIMEREGISTRY_IMPL_H_ #define WEBMIMEREGISTRY_IMPL_H_ #include "third_party/WebKit/WebKit/chromium/public/WebMimeRegistry.h" namespace webkit_glue { class SimpleWebMimeRegistryImpl : public WebKit::WebMimeRegistry { public: // WebMimeRegistry methods: virtual WebKit::WebMimeRegistry::SupportsType supportsMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsImageMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsJavaScriptMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsMediaMIMEType( const WebKit::WebString&, const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsNonImageMIMEType( const WebKit::WebString&); virtual WebKit::WebString mimeTypeForExtension(const WebKit::WebString&); virtual WebKit::WebString mimeTypeFromFile(const WebKit::WebString&); virtual WebKit::WebString preferredExtensionForMIMEType( const WebKit::WebString&); }; } // namespace webkit_glue #endif // WEBMIMEREGISTRY_IMPL_H_
// Copyright (c) 2009 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 WEBMIMEREGISTRY_IMPL_H_ #define WEBMIMEREGISTRY_IMPL_H_ #include "third_party/WebKit/WebKit/chromium/public/WebMimeRegistry.h" namespace webkit_glue { class SimpleWebMimeRegistryImpl : public WebKit::WebMimeRegistry { public: SimpleWebMimeRegistryImpl() {} virtual ~SimpleWebMimeRegistryImpl() {} // WebMimeRegistry methods: virtual WebKit::WebMimeRegistry::SupportsType supportsMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsImageMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsJavaScriptMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsMediaMIMEType( const WebKit::WebString&, const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsNonImageMIMEType( const WebKit::WebString&); virtual WebKit::WebString mimeTypeForExtension(const WebKit::WebString&); virtual WebKit::WebString mimeTypeFromFile(const WebKit::WebString&); virtual WebKit::WebString preferredExtensionForMIMEType( const WebKit::WebString&); }; } // namespace webkit_glue #endif // WEBMIMEREGISTRY_IMPL_H_
Add a virtual destructor to SimpleWebMimeRegistryImpl so that child class destructors get called correctly.
Add a virtual destructor to SimpleWebMimeRegistryImpl so that child class destructors get called correctly. BUG=62828 TEST=No memory leak in TestShellWebMimeRegistryImpl Review URL: http://codereview.chromium.org/4880002 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@65967 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,dednal/chromium.src,patrickm/chromium.src,zcbenz/cefode-chromium,hujiajie/pa-chromium,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,dednal/chromium.src,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,keishi/chromium,keishi/chromium,bright-sparks/chromium-spacewalk,littlstar/chromium.src,krieger-od/nwjs_chromium.src,rogerwang/chromium,anirudhSK/chromium,robclark/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,robclark/chromium,Fireblend/chromium-crosswalk,M4sse/chromium.src,littlstar/chromium.src,nacl-webkit/chrome_deps,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Pluto-tv/chromium-crosswalk,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,axinging/chromium-crosswalk,robclark/chromium,Chilledheart/chromium,nacl-webkit/chrome_deps,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,mogoweb/chromium-crosswalk,M4sse/chromium.src,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,littlstar/chromium.src,nacl-webkit/chrome_deps,ltilve/chromium,anirudhSK/chromium,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,jaruba/chromium.src,zcbenz/cefode-chromium,zcbenz/cefode-chromium,hujiajie/pa-chromium,ltilve/chromium,junmin-zhu/chromium-rivertrail,robclark/chromium,markYoungH/chromium.src,dushu1203/chromium.src,anirudhSK/chromium,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,dushu1203/chromium.src,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,Fireblend/chromium-crosswalk,jaruba/chromium.src,littlstar/chromium.src,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,hujiajie/pa-chromium,M4sse/chromium.src,hgl888/chromium-crosswalk,ltilve/chromium,Just-D/chromium-1,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,keishi/chromium,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,ltilve/chromium,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,markYoungH/chromium.src,ChromiumWebApps/chromium,jaruba/chromium.src,rogerwang/chromium,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,markYoungH/chromium.src,ltilve/chromium,ChromiumWebApps/chromium,Just-D/chromium-1,Chilledheart/chromium,jaruba/chromium.src,chuan9/chromium-crosswalk,rogerwang/chromium,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,M4sse/chromium.src,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,dushu1203/chromium.src,ondra-novak/chromium.src,Jonekee/chromium.src,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,anirudhSK/chromium,ChromiumWebApps/chromium,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,keishi/chromium,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,rogerwang/chromium,dednal/chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,Jonekee/chromium.src,ondra-novak/chromium.src,timopulkkinen/BubbleFish,Jonekee/chromium.src,M4sse/chromium.src,ltilve/chromium,robclark/chromium,anirudhSK/chromium,Jonekee/chromium.src,robclark/chromium,pozdnyakov/chromium-crosswalk,keishi/chromium,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,anirudhSK/chromium,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,zcbenz/cefode-chromium,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,patrickm/chromium.src,rogerwang/chromium,markYoungH/chromium.src,patrickm/chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk,patrickm/chromium.src,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,Just-D/chromium-1,rogerwang/chromium,nacl-webkit/chrome_deps,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,anirudhSK/chromium,fujunwei/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,dushu1203/chromium.src,keishi/chromium,Chilledheart/chromium,mogoweb/chromium-crosswalk,keishi/chromium,junmin-zhu/chromium-rivertrail,keishi/chromium,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,Just-D/chromium-1,ChromiumWebApps/chromium,robclark/chromium,keishi/chromium,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,timopulkkinen/BubbleFish,markYoungH/chromium.src,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,dednal/chromium.src,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,jaruba/chromium.src,mogoweb/chromium-crosswalk,dednal/chromium.src,M4sse/chromium.src,dushu1203/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,Just-D/chromium-1,dushu1203/chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,markYoungH/chromium.src,zcbenz/cefode-chromium,hujiajie/pa-chromium,ChromiumWebApps/chromium,rogerwang/chromium,robclark/chromium,anirudhSK/chromium,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,dushu1203/chromium.src,keishi/chromium,chuan9/chromium-crosswalk,Just-D/chromium-1,jaruba/chromium.src,dednal/chromium.src,timopulkkinen/BubbleFish,patrickm/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,M4sse/chromium.src,Just-D/chromium-1,littlstar/chromium.src,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,robclark/chromium,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,ondra-novak/chromium.src,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,zcbenz/cefode-chromium,axinging/chromium-crosswalk,rogerwang/chromium,M4sse/chromium.src,markYoungH/chromium.src,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,dushu1203/chromium.src,axinging/chromium-crosswalk,ltilve/chromium,ltilve/chromium,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,chuan9/chromium-crosswalk,jaruba/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk,robclark/chromium,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish
6db0074fe5c581587b4d47b45308d59afcd560d6
ReactiveCocoaFramework/ReactiveCocoa/NSUserDefaults+RACSupport.h
ReactiveCocoaFramework/ReactiveCocoa/NSUserDefaults+RACSupport.h
// // NSUserDefaults+RACSupport.h // ReactiveCocoa // // Created by Matt Diephouse on 12/19/13. // Copyright (c) 2013 GitHub, Inc. All rights reserved. // #import <Foundation/Foundation.h> @class RACChannelTerminal; @interface NSUserDefaults (RACSupport) // Creates and returns a terminal for binding the user defaults key. // // key - The user defaults key to create the channel terminal for. // // This makes it easy to bind a property to a default by assigning to // `RACChannelTo`. // // Returns a channel terminal. - (RACChannelTerminal *)rac_channelTerminalForKey:(NSString *)key; @end
// // NSUserDefaults+RACSupport.h // ReactiveCocoa // // Created by Matt Diephouse on 12/19/13. // Copyright (c) 2013 GitHub, Inc. All rights reserved. // #import <Foundation/Foundation.h> @class RACChannelTerminal; @interface NSUserDefaults (RACSupport) // Creates and returns a terminal for binding the user defaults key. // // key - The user defaults key to create the channel terminal for. // // This makes it easy to bind a property to a default by assigning to // `RACChannelTo`. // // The terminal will send the value of the user defaults key upon subscription. // // Returns a channel terminal. - (RACChannelTerminal *)rac_channelTerminalForKey:(NSString *)key; @end
Clarify that the terminal sends a value upon subscription
Clarify that the terminal sends a value upon subscription
C
mit
Carthage/ReactiveCocoa,chieryw/ReactiveCocoa,Pingco/ReactiveCocoa,dachaoisme/ReactiveCocoa,sdhzwm/ReactiveCocoa,huiping192/ReactiveCocoa,eyu1988/ReactiveCocoa,chieryw/ReactiveCocoa,on99/ReactiveCocoa,OneSmallTree/ReactiveCocoa,pzw224/ReactiveCocoa,eliperkins/ReactiveCocoa,loupman/ReactiveCocoa,SuPair/ReactiveCocoa,Ray0218/ReactiveCocoa,shaohung001/ReactiveCocoa,clg0118/ReactiveCocoa,wpstarnice/ReactiveCocoa,WEIBP/ReactiveCocoa,ikesyo/ReactiveCocoa,brasbug/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,zxq3220122/ReactiveCocoa,OnTheWay1988/ReactiveCocoa,PSPDFKit-labs/ReactiveCocoa,walkingsmarts/ReactiveCocoa,sujeking/ReactiveCocoa,Liquidsoul/ReactiveCocoa,terry408911/ReactiveCocoa,eliperkins/ReactiveCocoa,mattpetters/ReactiveCocoa,jaylib/ReactiveCocoa,ioshger0125/ReactiveCocoa,OnTheWay1988/ReactiveCocoa,yangshengchaoios/ReactiveCocoa,LHDsimon/ReactiveCocoa,add715/ReactiveCocoa,wangqi211/ReactiveCocoa,Rupert-RR/ReactiveCocoa,xumaolin/ReactiveCocoa,cstars135/ReactiveCocoa,icepy/ReactiveCocoa,SanChain/ReactiveCocoa,clg0118/ReactiveCocoa,dz1111/ReactiveCocoa,ericzhou2008/ReactiveCocoa,esttorhe/ReactiveCocoa,bscarano/ReactiveCocoa,Pingco/ReactiveCocoa,jaylib/ReactiveCocoa,pzw224/ReactiveCocoa,BrooksWon/ReactiveCocoa,wpstarnice/ReactiveCocoa,hj3938/ReactiveCocoa,ailyanlu/ReactiveCocoa,BlessNeo/ReactiveCocoa,richeterre/ReactiveCocoa,cstars135/ReactiveCocoa,buildo/ReactiveCocoa,dachaoisme/ReactiveCocoa,sandyway/ReactiveCocoa,LHDsimon/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,mtxs007/ReactiveCocoa,ddc391565320/ReactiveCocoa,yonekawa/ReactiveCocoa,andersio/ReactiveCocoa,mxxiv/ReactiveCocoa,hoanganh6491/ReactiveCocoa,ohwutup/ReactiveCocoa,towik/ReactiveCocoa,Remitly/ReactiveCocoa,jianwoo/ReactiveCocoa,JohnJin007/ReactiveCocoa,hj3938/ReactiveCocoa,SuPair/ReactiveCocoa,yonekawa/ReactiveCocoa,cogddo/ReactiveCocoa,smilypeda/ReactiveCocoa,sugar2010/ReactiveCocoa,tonyarnold/ReactiveCocoa,Ray0218/ReactiveCocoa,liufeigit/ReactiveCocoa,Pingco/ReactiveCocoa,zzzworm/ReactiveCocoa,bensonday/ReactiveCocoa,monkeydbobo/ReactiveCocoa,stevielu/ReactiveCocoa,ericzhou2008/ReactiveCocoa,dachaoisme/ReactiveCocoa,ailyanlu/ReactiveCocoa,mxxiv/ReactiveCocoa,koamac/ReactiveCocoa,koamac/ReactiveCocoa,jaylib/ReactiveCocoa,dullgrass/ReactiveCocoa,stupidfive/ReactiveCocoa,kaylio/ReactiveCocoa,AllanChen/ReactiveCocoa,eliperkins/ReactiveCocoa,loupman/ReactiveCocoa,ShawnLeee/ReactiveCocoa,shuxiashusheng/ReactiveCocoa,tonyarnold/ReactiveCocoa,walkingsmarts/ReactiveCocoa,KJin99/ReactiveCocoa,zhenlove/ReactiveCocoa,almassapargali/ReactiveCocoa,Adlai-Holler/ReactiveCocoa,ztchena/ReactiveCocoa,ShawnLeee/ReactiveCocoa,PSPDFKit-labs/ReactiveCocoa,libiao88/ReactiveCocoa,mattpetters/ReactiveCocoa,WEIBP/ReactiveCocoa,msdgwzhy6/ReactiveCocoa,loupman/ReactiveCocoa,kaylio/ReactiveCocoa,jsslai/ReactiveCocoa,liufeigit/ReactiveCocoa,howandhao/ReactiveCocoa,Ricowere/ReactiveCocoa,200895045/ReactiveCocoa,nikita-leonov/ReactiveCocoa,msdgwzhy6/ReactiveCocoa,imkerberos/ReactiveCocoa,esttorhe/ReactiveCocoa,vincentiss/ReactiveCocoa,Khan/ReactiveCocoa,natestedman/ReactiveCocoa,Farteen/ReactiveCocoa,Rupert-RR/ReactiveCocoa,calebd/ReactiveCocoa,yangyangluoluo/ReactiveCocoa,emodeqidao/ReactiveCocoa,ioshger0125/ReactiveCocoa,esttorhe/ReactiveCocoa,zzzworm/ReactiveCocoa,hoanganh6491/ReactiveCocoa,yoichitgy/ReactiveCocoa,kiurentu/ReactiveCocoa,andersio/ReactiveCocoa,juliangrosshauser/ReactiveCocoa,zzqiltw/ReactiveCocoa,libiao88/ReactiveCocoa,dullgrass/ReactiveCocoa,xiaobing2007/ReactiveCocoa,jsslai/ReactiveCocoa,tiger8888/ReactiveCocoa,juliangrosshauser/ReactiveCocoa,icepy/ReactiveCocoa,CQXfly/ReactiveCocoa,ohwutup/ReactiveCocoa,DongDongDongDong/ReactiveCocoa,vincentiss/ReactiveCocoa,nickcheng/ReactiveCocoa,rpowelll/ReactiveCocoa,windgo/ReactiveCocoa,andersio/ReactiveCocoa,JackLian/ReactiveCocoa,hilllinux/ReactiveCocoa,calebd/ReactiveCocoa,Pikdays/ReactiveCocoa,dskatz22/ReactiveCocoa,alvinvarghese/ReactiveCocoa,llb1119/test,tzongw/ReactiveCocoa,natan/ReactiveCocoa,tornade0913/ReactiveCocoa,Ricowere/ReactiveCocoa,ddc391565320/ReactiveCocoa,takeshineshiro/ReactiveCocoa,bencochran/ReactiveCocoa,nickcheng/ReactiveCocoa,tornade0913/ReactiveCocoa,BrooksWon/ReactiveCocoa,200895045/ReactiveCocoa,xulibao/ReactiveCocoa,jrmiddle/ReactiveCocoa,j364960953/ReactiveCocoa,longv2go/ReactiveCocoa,yoichitgy/ReactiveCocoa,yangyangluoluo/ReactiveCocoa,walkingsmarts/ReactiveCocoa,shuxiashusheng/ReactiveCocoa,Eveian/ReactiveCocoa,Pikdays/ReactiveCocoa,brasbug/ReactiveCocoa,zhaoguohui/ReactiveCocoa,cstars135/ReactiveCocoa,Ethan89/ReactiveCocoa,yizzuide/ReactiveCocoa,dskatz22/ReactiveCocoa,brightcove/ReactiveCocoa,cogddo/ReactiveCocoa,DongDongDongDong/ReactiveCocoa,CQXfly/ReactiveCocoa,eyu1988/ReactiveCocoa,windgo/ReactiveCocoa,zzzworm/ReactiveCocoa,ceekayel/ReactiveCocoa,BlessNeo/ReactiveCocoa,Remitly/ReactiveCocoa,cogddo/ReactiveCocoa,ztchena/ReactiveCocoa,JohnJin007/ReactiveCocoa,BrooksWon/ReactiveCocoa,jam891/ReactiveCocoa,KJin99/ReactiveCocoa,zhigang1992/ReactiveCocoa,itschaitanya/ReactiveCocoa,GuitarPlayer-Ma/ReactiveCocoa,clg0118/ReactiveCocoa,tipbit/ReactiveCocoa,eyu1988/ReactiveCocoa,zhiwen1024/ReactiveCocoa,335g/ReactiveCocoa,GuitarPlayer-Ma/ReactiveCocoa,CCOOOOLL/ReactiveCocoa,xiaoliyang/ReactiveCocoa,jam891/ReactiveCocoa,qq644531343/ReactiveCocoa,yoichitgy/ReactiveCocoa,Ricowere/ReactiveCocoa,nickcheng/ReactiveCocoa,sugar2010/ReactiveCocoa,Farteen/ReactiveCocoa,yytong/ReactiveCocoa,zhukaixy/ReactiveCocoa,lixar/ReactiveCocoa,Farteen/ReactiveCocoa,GuitarPlayer-Ma/ReactiveCocoa,ericzhou2008/ReactiveCocoa,alvinvarghese/ReactiveCocoa,kiurentu/ReactiveCocoa,Adlai-Holler/ReactiveCocoa,xiaobing2007/ReactiveCocoa,bencochran/ReactiveCocoa,leichunfeng/ReactiveCocoa,SanChain/ReactiveCocoa,beni55/ReactiveCocoa,monkeydbobo/ReactiveCocoa,ohwutup/ReactiveCocoa,add715/ReactiveCocoa,emodeqidao/ReactiveCocoa,kevin-zqw/ReactiveCocoa,tonyli508/ReactiveCocoa,FelixYin66/ReactiveCocoa,on99/ReactiveCocoa,KuPai32G/ReactiveCocoa,beni55/ReactiveCocoa,SmartEncounter/ReactiveCocoa,yizzuide/ReactiveCocoa,DreamHill/ReactiveCocoa,tonyarnold/ReactiveCocoa,terry408911/ReactiveCocoa,zxq3220122/ReactiveCocoa,Carthage/ReactiveCocoa,zhiwen1024/ReactiveCocoa,esttorhe/ReactiveCocoa,monkeydbobo/ReactiveCocoa,yizzuide/ReactiveCocoa,fhchina/ReactiveCocoa,j364960953/ReactiveCocoa,PSPDFKit-labs/ReactiveCocoa,DreamHill/ReactiveCocoa,zhiwen1024/ReactiveCocoa,j364960953/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,AndyZhaoHe/ReactiveCocoa,chao95957/ReactiveCocoa,brightcove/ReactiveCocoa,tiger8888/ReactiveCocoa,Eveian/ReactiveCocoa,brightcove/ReactiveCocoa,fanghao085/ReactiveCocoa,Liquidsoul/ReactiveCocoa,KuPai32G/ReactiveCocoa,ceekayel/ReactiveCocoa,stupidfive/ReactiveCocoa,fanghao085/ReactiveCocoa,ztchena/ReactiveCocoa,victorlin/ReactiveCocoa,jeelun/ReactiveCocoa,buildo/ReactiveCocoa,Ray0218/ReactiveCocoa,Pikdays/ReactiveCocoa,imkerberos/ReactiveCocoa,Khan/ReactiveCocoa,DreamHill/ReactiveCocoa,jackywpy/ReactiveCocoa,huiping192/ReactiveCocoa,xulibao/ReactiveCocoa,goodheart/ReactiveCocoa,CCOOOOLL/ReactiveCocoa,CCOOOOLL/ReactiveCocoa,beni55/ReactiveCocoa,pzw224/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,jam891/ReactiveCocoa,paulyoung/ReactiveCocoa,victorlin/ReactiveCocoa,KJin99/ReactiveCocoa,cnbin/ReactiveCocoa,shaohung001/ReactiveCocoa,SmartEncounter/ReactiveCocoa,tzongw/ReactiveCocoa,leelili/ReactiveCocoa,imkerberos/ReactiveCocoa,llb1119/test,natestedman/ReactiveCocoa,leichunfeng/ReactiveCocoa,stevielu/ReactiveCocoa,calebd/ReactiveCocoa,Ricowere/ReactiveCocoa,hilllinux/ReactiveCocoa,sujeking/ReactiveCocoa,hbucius/ReactiveCocoa,isghe/ReactiveCocoa,FelixYin66/ReactiveCocoa,nickcheng/ReactiveCocoa,jackywpy/ReactiveCocoa,dskatz22/ReactiveCocoa,natan/ReactiveCocoa,sdhzwm/ReactiveCocoa,itschaitanya/ReactiveCocoa,longv2go/ReactiveCocoa,Ethan89/ReactiveCocoa,goodheart/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,takeshineshiro/ReactiveCocoa,JackLian/ReactiveCocoa,kevin-zqw/ReactiveCocoa,OneSmallTree/ReactiveCocoa,kaylio/ReactiveCocoa,yytong/ReactiveCocoa,leelili/ReactiveCocoa,richeterre/ReactiveCocoa,AlanJN/ReactiveCocoa,brasbug/ReactiveCocoa,wangqi211/ReactiveCocoa,Khan/ReactiveCocoa,gabemdev/ReactiveCocoa,Juraldinio/ReactiveCocoa,almassapargali/ReactiveCocoa,natestedman/ReactiveCocoa,zhigang1992/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,ikesyo/ReactiveCocoa,jrmiddle/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,kiurentu/ReactiveCocoa,rpowelll/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,ddc391565320/ReactiveCocoa,goodheart/ReactiveCocoa,kevin-zqw/ReactiveCocoa,nikita-leonov/ReactiveCocoa,stupidfive/ReactiveCocoa,zzqiltw/ReactiveCocoa,llb1119/test,zhukaixy/ReactiveCocoa,ioshger0125/ReactiveCocoa,AlanJN/ReactiveCocoa,tiger8888/ReactiveCocoa,gabemdev/ReactiveCocoa,LHDsimon/ReactiveCocoa,stevielu/ReactiveCocoa,zhigang1992/ReactiveCocoa,shuxiashusheng/ReactiveCocoa,BlessNeo/ReactiveCocoa,natan/ReactiveCocoa,shaohung001/ReactiveCocoa,emodeqidao/ReactiveCocoa,SanChain/ReactiveCocoa,howandhao/ReactiveCocoa,howandhao/ReactiveCocoa,OneSmallTree/ReactiveCocoa,Liquidsoul/ReactiveCocoa,dz1111/ReactiveCocoa,KuPai32G/ReactiveCocoa,yangshengchaoios/ReactiveCocoa,takeshineshiro/ReactiveCocoa,JohnJin007/ReactiveCocoa,qq644531343/ReactiveCocoa,jaylib/ReactiveCocoa,leelili/ReactiveCocoa,buildo/ReactiveCocoa,ShawnLeee/ReactiveCocoa,leichunfeng/ReactiveCocoa,jeelun/ReactiveCocoa,Carthage/ReactiveCocoa,taylormoonxu/ReactiveCocoa,tonyli508/ReactiveCocoa,cnbin/ReactiveCocoa,valleyman86/ReactiveCocoa,rpowelll/ReactiveCocoa,smilypeda/ReactiveCocoa,zhaoguohui/ReactiveCocoa,Ethan89/ReactiveCocoa,longv2go/ReactiveCocoa,mtxs007/ReactiveCocoa,add715/ReactiveCocoa,hbucius/ReactiveCocoa,Juraldinio/ReactiveCocoa,fanghao085/ReactiveCocoa,juliangrosshauser/ReactiveCocoa,200895045/ReactiveCocoa,nikita-leonov/ReactiveCocoa,tipbit/ReactiveCocoa,zhenlove/ReactiveCocoa,yytong/ReactiveCocoa,xiaoliyang/ReactiveCocoa,xumaolin/ReactiveCocoa,lixar/ReactiveCocoa,sandyway/ReactiveCocoa,chao95957/ReactiveCocoa,dz1111/ReactiveCocoa,xumaolin/ReactiveCocoa,mxxiv/ReactiveCocoa,smilypeda/ReactiveCocoa,yangyangluoluo/ReactiveCocoa,terry408911/ReactiveCocoa,gengjf/ReactiveCocoa,almassapargali/ReactiveCocoa,victorlin/ReactiveCocoa,hbucius/ReactiveCocoa,taylormoonxu/ReactiveCocoa,luerhouhou/ReactiveCocoa,towik/ReactiveCocoa,isghe/ReactiveCocoa,jianwoo/ReactiveCocoa,xiaobing2007/ReactiveCocoa,xiaoliyang/ReactiveCocoa,libiao88/ReactiveCocoa,jsslai/ReactiveCocoa,luerhouhou/ReactiveCocoa,Rupert-RR/ReactiveCocoa,zhenlove/ReactiveCocoa,taylormoonxu/ReactiveCocoa,335g/ReactiveCocoa,on99/ReactiveCocoa,xulibao/ReactiveCocoa,hoanganh6491/ReactiveCocoa,valleyman86/ReactiveCocoa,luerhouhou/ReactiveCocoa,richeterre/ReactiveCocoa,zhukaixy/ReactiveCocoa,sdhzwm/ReactiveCocoa,bensonday/ReactiveCocoa,sujeking/ReactiveCocoa,AllanChen/ReactiveCocoa,jrmiddle/ReactiveCocoa,isghe/ReactiveCocoa,sugar2010/ReactiveCocoa,jeelun/ReactiveCocoa,liufeigit/ReactiveCocoa,koamac/ReactiveCocoa,wangqi211/ReactiveCocoa,dullgrass/ReactiveCocoa,itschaitanya/ReactiveCocoa,paulyoung/ReactiveCocoa,windgo/ReactiveCocoa,hj3938/ReactiveCocoa,alvinvarghese/ReactiveCocoa,chieryw/ReactiveCocoa,yonekawa/ReactiveCocoa,OnTheWay1988/ReactiveCocoa,fhchina/ReactiveCocoa,mattpetters/ReactiveCocoa,jackywpy/ReactiveCocoa,gengjf/ReactiveCocoa,towik/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,zzqiltw/ReactiveCocoa,bscarano/ReactiveCocoa,icepy/ReactiveCocoa,bscarano/ReactiveCocoa,ailyanlu/ReactiveCocoa,valleyman86/ReactiveCocoa,yangshengchaoios/ReactiveCocoa,DongDongDongDong/ReactiveCocoa,Adlai-Holler/ReactiveCocoa,AlanJN/ReactiveCocoa,Remitly/ReactiveCocoa,chao95957/ReactiveCocoa,bensonday/ReactiveCocoa,335g/ReactiveCocoa,zxq3220122/ReactiveCocoa,mtxs007/ReactiveCocoa,jianwoo/ReactiveCocoa,huiping192/ReactiveCocoa,wpstarnice/ReactiveCocoa,SuPair/ReactiveCocoa,qq644531343/ReactiveCocoa,lixar/ReactiveCocoa,tornade0913/ReactiveCocoa,AndyZhaoHe/ReactiveCocoa,Juraldinio/ReactiveCocoa,paulyoung/ReactiveCocoa,sandyway/ReactiveCocoa,FelixYin66/ReactiveCocoa,cnbin/ReactiveCocoa,tonyli508/ReactiveCocoa,Eveian/ReactiveCocoa,vincentiss/ReactiveCocoa,ceekayel/ReactiveCocoa,JackLian/ReactiveCocoa,huiping192/ReactiveCocoa,WEIBP/ReactiveCocoa,gengjf/ReactiveCocoa,AndyZhaoHe/ReactiveCocoa,bencochran/ReactiveCocoa,tzongw/ReactiveCocoa,CQXfly/ReactiveCocoa,fhchina/ReactiveCocoa,zhaoguohui/ReactiveCocoa,hilllinux/ReactiveCocoa,msdgwzhy6/ReactiveCocoa
ab3d51e895884d5beb0ad836fa88dfe702408c07
common/sys_attr.h
common/sys_attr.h
/* * The OpenDiamond Platform for Interactive Search * Version 4 * * Copyright (c) 2002-2005 Intel Corporation * All rights reserved. * * This software is distributed under the terms of the Eclipse Public * License, Version 1.0 which can be found in the file named LICENSE. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS SOFTWARE CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT */ #ifndef _SYS_ATTR_H_ #define _SYS_ATTR_H_ /* * Names for some of the system defined attributes. * XXX update these from the spec. */ #define SIZE "SYS_SIZE" #define UID "SYS_UID" #define GID "SYS_GID" #define BLK_SIZE "SYS_BLKSIZE" #define ATIME "SYS_ATIME" #define MTIME "SYS_MTIME" #define CTIME "SYS_CTIME" #define OBJ_ID "_ObjectID" #define OBJ_DATA "" #define DISPLAY_NAME "Display-Name" #define DEVICE_NAME "Device-Name" #define OBJ_PATH "_path.cstring" #define FLTRTIME "_FIL_TIME.time" #define FLTRTIME_FN "_FIL_TIME_%s.time" #define PERMEABILITY_FN "_FIL_STAT_%s_permeability.float" #endif /* _SYS_ATTR_H_ */
/* * The OpenDiamond Platform for Interactive Search * Version 4 * * Copyright (c) 2002-2005 Intel Corporation * All rights reserved. * * This software is distributed under the terms of the Eclipse Public * License, Version 1.0 which can be found in the file named LICENSE. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS SOFTWARE CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT */ #ifndef _SYS_ATTR_H_ #define _SYS_ATTR_H_ /* * Names for some of the system defined attributes. */ #define OBJ_ID "_ObjectID" #define OBJ_DATA "" #define DISPLAY_NAME "Display-Name" #define DEVICE_NAME "Device-Name" #define FLTRTIME "_FIL_TIME.time" #define FLTRTIME_FN "_FIL_TIME_%s.time" #endif /* _SYS_ATTR_H_ */
Drop definitions of unused object attributes
Drop definitions of unused object attributes
C
epl-1.0
cmusatyalab/opendiamond,cmusatyalab/opendiamond,cmusatyalab/opendiamond,cmusatyalab/opendiamond,cmusatyalab/opendiamond
532f3759d71d1fceb494212187dacc5a78295dc3
arch/sh/include/asm/gpio.h
arch/sh/include/asm/gpio.h
/* * include/asm-sh/gpio.h * * Generic GPIO API and pinmux table support for SuperH. * * Copyright (c) 2008 Magnus Damm * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. */ #ifndef __ASM_SH_GPIO_H #define __ASM_SH_GPIO_H #include <linux/kernel.h> #include <linux/errno.h> #if defined(CONFIG_CPU_SH3) #include <cpu/gpio.h> #endif #define ARCH_NR_GPIOS 512 #include <linux/sh_pfc.h> #ifdef CONFIG_GPIOLIB static inline int gpio_get_value(unsigned gpio) { return __gpio_get_value(gpio); } static inline void gpio_set_value(unsigned gpio, int value) { __gpio_set_value(gpio, value); } static inline int gpio_cansleep(unsigned gpio) { return __gpio_cansleep(gpio); } static inline int gpio_to_irq(unsigned gpio) { WARN_ON(1); return -ENOSYS; } static inline int irq_to_gpio(unsigned int irq) { WARN_ON(1); return -EINVAL; } #endif /* CONFIG_GPIOLIB */ #endif /* __ASM_SH_GPIO_H */
/* * include/asm-sh/gpio.h * * Generic GPIO API and pinmux table support for SuperH. * * Copyright (c) 2008 Magnus Damm * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. */ #ifndef __ASM_SH_GPIO_H #define __ASM_SH_GPIO_H #include <linux/kernel.h> #include <linux/errno.h> #if defined(CONFIG_CPU_SH3) #include <cpu/gpio.h> #endif #define ARCH_NR_GPIOS 512 #include <linux/sh_pfc.h> #ifdef CONFIG_GPIOLIB static inline int gpio_get_value(unsigned gpio) { return __gpio_get_value(gpio); } static inline void gpio_set_value(unsigned gpio, int value) { __gpio_set_value(gpio, value); } static inline int gpio_cansleep(unsigned gpio) { return __gpio_cansleep(gpio); } static inline int gpio_to_irq(unsigned gpio) { return __gpio_to_irq(gpio); } static inline int irq_to_gpio(unsigned int irq) { return -ENOSYS; } #endif /* CONFIG_GPIOLIB */ #endif /* __ASM_SH_GPIO_H */
Allow GPIO chips to register IRQ mappings.
sh: Allow GPIO chips to register IRQ mappings. As non-PFC chips are added that may support IRQs, pass through to the generic helper instead of triggering the WARN_ON(). Signed-off-by: Paul Mundt <38b52dbb5f0b63d149982b6c5de788ec93a89032@linux-sh.org>
C
apache-2.0
TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas
c587b66bb438b95ad32c3c6ec9a329eea9f4ef8a
include/actions/MastodonAddVariableAction.h
include/actions/MastodonAddVariableAction.h
/*************************************************/ /* DO NOT MODIFY THIS HEADER */ /* */ /* MASTODON */ /* */ /* (c) 2015 Battelle Energy Alliance, LLC */ /* ALL RIGHTS RESERVED */ /* */ /* Prepared by Battelle Energy Alliance, LLC */ /* With the U. S. Department of Energy */ /* */ /* See COPYRIGHT for full restrictions */ /*************************************************/ /** * This action automatically creates the displacement Variables and the * velocity, acceleration, stress and strain AuxVariables based on the dimension of the mesh * of the problem. **/ #ifndef MASTODONADDVARIABLEACTION_H #define MASTODONADDVARIABLEACTION_H #include "Action.h" class MastodonAddVariableAction : public Action { public: MastodonAddVariableAction(const InputParameters & params); virtual void act() override; private: }; template <> InputParameters validParams<MastodonAddVariableAction>(); #endif // MASTODONADDVARIABLEACTION_H
/*************************************************/ /* DO NOT MODIFY THIS HEADER */ /* */ /* MASTODON */ /* */ /* (c) 2015 Battelle Energy Alliance, LLC */ /* ALL RIGHTS RESERVED */ /* */ /* Prepared by Battelle Energy Alliance, LLC */ /* With the U. S. Department of Energy */ /* */ /* See COPYRIGHT for full restrictions */ /*************************************************/ /** * This action automatically creates the displacement Variables and the * velocity, acceleration, stress and strain AuxVariables based on the dimension of the mesh * of the problem. **/ #ifndef MASTODONADDVARIABLEACTION_H #define MASTODONADDVARIABLEACTION_H #include "Action.h" class MastodonAddVariableAction : public Action { public: MastodonAddVariableAction(const InputParameters & params); virtual void act() override; }; template <> InputParameters validParams<MastodonAddVariableAction>(); #endif // MASTODONADDVARIABLEACTION_H
Remove private keyword that is not needed
Remove private keyword that is not needed (refs #100)
C
lgpl-2.1
idaholab/mastodon,idaholab/mastodon,idaholab/mastodon,idaholab/mastodon
d60cc9416f92dc9dd4e59ecc9883b77ad7acfb3f
packager/media/file/file_closer.h
packager/media/file/file_closer.h
// Copyright 2014 Google Inc. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd #ifndef MEDIA_FILE_FILE_CLOSER_H_ #define MEDIA_FILE_FILE_CLOSER_H_ #include "packager/base/logging.h" #include "packager/media/file/file.h" namespace edash_packager { namespace media { /// Used by scoped_ptr to automatically close the file when it goes out of /// scope. struct FileCloser { inline void operator()(File* file) const { if (file != NULL && !file->Close()) { LOG(WARNING) << "Failed to close the file properly: " << file->file_name(); } } }; } // namespace media } // namespace edash_packager #endif // MEDIA_FILE_FILE_CLOSER_H_
// Copyright 2014 Google Inc. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd #ifndef MEDIA_FILE_FILE_CLOSER_H_ #define MEDIA_FILE_FILE_CLOSER_H_ #include "packager/base/logging.h" #include "packager/media/file/file.h" namespace edash_packager { namespace media { /// Used by scoped_ptr to automatically close the file when it goes out of /// scope. struct FileCloser { inline void operator()(File* file) const { if (file != NULL) { const std::string filename = file->file_name(); if (!file->Close()) { LOG(WARNING) << "Failed to close the file properly: " << filename; } } } }; } // namespace media } // namespace edash_packager #endif // MEDIA_FILE_FILE_CLOSER_H_
Fix a possible crash if a file fails to be closed
Fix a possible crash if a file fails to be closed Change-Id: I6bc806a68b81ea5bde09bada1175f257c296afcd
C
bsd-3-clause
nevil/edash-packager,nevil/edash-packager,nevil/edash-packager
83bd4414808a6862969bd803631d26782ba3453e
include/gpu/vk/GrVkDefines.h
include/gpu/vk/GrVkDefines.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 GrVkDefines_DEFINED #define GrVkDefines_DEFINED #ifdef SK_VULKAN #if defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_WIN32) # if !defined(VK_USE_PLATFORM_WIN32_KHR) # define VK_USE_PLATFORM_WIN32_KHR # endif #elif defined(SK_BUILD_FOR_ANDROID) # if !defined(VK_USE_PLATFORM_ANDROID_KHR) # define VK_USE_PLATFORM_ANDROID_KHR # endif #elif defined(SK_BUILD_FOR_UNIX) # if defined(__Fuchsia__) # if !defined(VK_USE_PLATFORM_MAGMA_KHR) # define VK_USE_PLATFORM_MAGMA_KHR # endif # else # if !defined(VK_USE_PLATFORM_XCB_KHR) # define VK_USE_PLATFORM_XCB_KHR # endif # endif #endif #include <vulkan/vulkan.h> #define SKIA_REQUIRED_VULKAN_HEADER_VERSION 17 #if VK_HEADER_VERSION < SKIA_REQUIRED_VULKAN_HEADER_VERSION #error "Vulkan header version is too low" #endif #endif #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 GrVkDefines_DEFINED #define GrVkDefines_DEFINED #ifdef SK_VULKAN #if defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_WIN32) # if !defined(VK_USE_PLATFORM_WIN32_KHR) # define VK_USE_PLATFORM_WIN32_KHR # endif #elif defined(SK_BUILD_FOR_ANDROID) # if !defined(VK_USE_PLATFORM_ANDROID_KHR) # define VK_USE_PLATFORM_ANDROID_KHR # endif #elif defined(SK_BUILD_FOR_UNIX) # if defined(__Fuchsia__) # if !defined(VK_USE_PLATFORM_MAGMA_KHR) # define VK_USE_PLATFORM_MAGMA_KHR # endif # else # if !defined(VK_USE_PLATFORM_XCB_KHR) # define VK_USE_PLATFORM_XCB_KHR # endif # endif #endif // We create our own function table and never directly call any functions via vk*(). So no need to // include the prototype functions. #ifndef VK_NO_PROTOTYPES #define VK_NO_PROTOTYPES #endif #include <vulkan/vulkan.h> #define SKIA_REQUIRED_VULKAN_HEADER_VERSION 17 #if VK_HEADER_VERSION < SKIA_REQUIRED_VULKAN_HEADER_VERSION #error "Vulkan header version is too low" #endif #endif #endif
Set VK_NO_PROTOTYPES for vulkan backend
Set VK_NO_PROTOTYPES for vulkan backend Bug: skia: Change-Id: Id740efe6030b70271b0eb3a3bd6a111202f28fd8 Reviewed-on: https://skia-review.googlesource.com/69160 Commit-Queue: Greg Daniel <39df0a804564ccb6cf75f18db79653821f37c1c5@google.com> Reviewed-by: Chris Dalton <ef7fc3a08ada7d31f16e9a18b5f3c728256e041e@google.com>
C
bsd-3-clause
google/skia,aosp-mirror/platform_external_skia,google/skia,rubenvb/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,google/skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,rubenvb/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,google/skia,google/skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,google/skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,google/skia
97cf67c3c5e9324a6567f74ee3a272bdad24524d
hashtag-warrior/Game/Constants/Constants.h
hashtag-warrior/Game/Constants/Constants.h
// // Constants.h // hashtag-warrior // // Created by Daniel Wood on 20/04/2013. // Copyright (c) 2013 Ossum Games. All rights reserved. // #ifndef hashtag_warrior_Constants_h #define hashtag_warrior_Constants_h // UI & appearance #define kHWBackgroundColor ccc4(142, 193, 218, 255) #define kHWTextColor ccc3(8, 90, 124); #define kHWTextHeadingFamily @"Marker Felt" #define kHWTextBodyFamily @"Arial" // Gameplay #define kHWMinProjectileSize 2.0f // TODO net yet used #define kHWMaxProjectileSize 10.0f // TODO net yet used #define kHWMinProjectileStartVelocity 2.0f // TODO net yet used #define kHWMaxProjectileStartVelocity 8.0f // TODO net yet used #define kHWMinProjectileStartAngle -5 // TODO net yet used #define kHWMaxProjectileStartAngle 30 // TODO net yet used // Environment #define kHWMaxVelocity 10.0f #define kHWForceMagnifier 5 #endif
// // Constants.h // hashtag-warrior // // Created by Daniel Wood on 20/04/2013. // Copyright (c) 2013 Ossum Games. All rights reserved. // #ifndef hashtag_warrior_Constants_h #define hashtag_warrior_Constants_h // UI & appearance #define kHWBackgroundColor ccc4(142, 193, 218, 255) #define kHWTextColor ccc3(8, 90, 124); #define kHWTextHeadingFamily @"Marker Felt" #define kHWTextBodyFamily @"Arial" // Gameplay #define kHWMinProjectileSize 2.0f // TODO net yet used #define kHWMaxProjectileSize 10.0f // TODO net yet used #define kHWMinProjectileStartVelocity 2.0f // TODO net yet used #define kHWMaxProjectileStartVelocity 8.0f // TODO net yet used #define kHWMinProjectileStartAngle -5 // TODO net yet used #define kHWMaxProjectileStartAngle 30 // TODO net yet used // Environment #define kHWMaxVelocity 10.0f #define kHWForceMagnifier 5 // Misc #define kHWIsDebug 0 #endif
Add a constant for detecting whether we are in debug mode.
Add a constant for detecting whether we are in debug mode.
C
mit
TuftEntertainment/hashtag-warrior,TuftEntertainment/hashtag-warrior,TuftEntertainment/hashtag-warrior,TuftEntertainment/hashtag-warrior,TuftEntertainment/hashtag-warrior,TuftEntertainment/hashtag-warrior,TuftEntertainment/hashtag-warrior,TuftEntertainment/hashtag-warrior
01110b91b54b7a5aada4ba2c15819c608cce9633
c/ppb_find.h
c/ppb_find.h
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef PPAPI_C_PPB_FIND_H_ #define PPAPI_C_PPB_FIND_H_ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_stdint.h" #define PPB_FIND_INTERFACE "PPB_Find;1" typedef struct _ppb_Find { // Updates the number of find results for the current search term. If // there are no matches 0 should be passed in. Only when the plugin has // finished searching should it pass in the final count with finalResult set // to true. void NumberOfFindResultsChanged(PP_Instance instance, int32_t total, bool final_result); // Updates the index of the currently selected search item. void SelectedFindResultChanged(PP_Instance instance, int32_t index); } PPB_Find; #endif // PPAPI_C_PPB_FIND_H_
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef PPAPI_C_PPB_FIND_H_ #define PPAPI_C_PPB_FIND_H_ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_stdint.h" #define PPB_FIND_INTERFACE "PPB_Find;1" typedef struct _ppb_Find { // Updates the number of find results for the current search term. If // there are no matches 0 should be passed in. Only when the plugin has // finished searching should it pass in the final count with finalResult set // to true. void (*NumberOfFindResultsChanged)(PP_Instance instance, int32_t total, bool final_result); // Updates the index of the currently selected search item. void (*SelectedFindResultChanged)(PP_Instance instance, int32_t index); } PPB_Find; #endif // PPAPI_C_PPB_FIND_H_
Structure member should be function pointer
Structure member should be function pointer BUG=none TEST=compiles Review URL: http://codereview.chromium.org/2972004
C
bsd-3-clause
lio972/ppapi,Iwan12/ppapi,lio972/ppapi,macressler/ppapi,melchi45/ppapi,LinRaise/ppapi,kaijajan/ppapi,lio972/ppapi,lio972/ppapi,kaijajan/ppapi,thecocce/ppapi,Iwan12/ppapi,kaijajan/ppapi,Iwan12/ppapi,jmnjmn/ppapi,LinRaise/ppapi,LinRaise/ppapi,melchi45/ppapi,kaijajan/ppapi,LinRaise/ppapi,johnnnylm/ppapi,thecocce/ppapi,iofcas/ppapi,melchi45/ppapi,macressler/ppapi,Iwan12/ppapi,iofcas/ppapi,thecocce/ppapi,iofcas/ppapi,melchi45/ppapi,macressler/ppapi,jmnjmn/ppapi,johnnnylm/ppapi,johnnnylm/ppapi,humanai/ppapi,johnnnylm/ppapi,humanai/ppapi,humanai/ppapi,jmnjmn/ppapi,macressler/ppapi,Gitzk/ppapi,jmnjmn/ppapi,johnnnylm/ppapi,lio972/ppapi,iofcas/ppapi,Gitzk/ppapi,jmnjmn/ppapi,thecocce/ppapi,Gitzk/ppapi,thecocce/ppapi,melchi45/ppapi,LinRaise/ppapi,humanai/ppapi,kaijajan/ppapi,macressler/ppapi,iofcas/ppapi,Iwan12/ppapi,humanai/ppapi,Gitzk/ppapi,Gitzk/ppapi
986a9fa1b91d2ab0e0e11fb1dc5d05fa2e1a4a0d
lib/Target/CppBackend/CPPTargetMachine.h
lib/Target/CppBackend/CPPTargetMachine.h
//===-- CPPTargetMachine.h - TargetMachine for the C++ backend --*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file declares the TargetMachine that is used by the C++ backend. // //===----------------------------------------------------------------------===// #ifndef CPPTARGETMACHINE_H #define CPPTARGETMACHINE_H #include "llvm/IR/DataLayout.h" #include "llvm/Target/TargetMachine.h" namespace llvm { class formatted_raw_ostream; struct CPPTargetMachine : public TargetMachine { CPPTargetMachine(const Target &T, StringRef TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) : TargetMachine(T, TT, CPU, FS, Options) {} bool addPassesToEmitFile(PassManagerBase &PM, formatted_raw_ostream &Out, CodeGenFileType FileType, bool DisableVerify, AnalysisID StartAfter, AnalysisID StopAfter) override; const DataLayout *getDataLayout() const override { return nullptr; } }; extern Target TheCppBackendTarget; } // End llvm namespace #endif
//===-- CPPTargetMachine.h - TargetMachine for the C++ backend --*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file declares the TargetMachine that is used by the C++ backend. // //===----------------------------------------------------------------------===// #ifndef CPPTARGETMACHINE_H #define CPPTARGETMACHINE_H #include "llvm/IR/DataLayout.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetSubtargetInfo.h" namespace llvm { class formatted_raw_ostream; class CPPSubtarget : public TargetSubtargetInfo { }; struct CPPTargetMachine : public TargetMachine { CPPTargetMachine(const Target &T, StringRef TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) : TargetMachine(T, TT, CPU, FS, Options), Subtarget() {} private: CPPSubtarget Subtarget; public: const CPPSubtarget *getSubtargetImpl() const override { return &Subtarget; } bool addPassesToEmitFile(PassManagerBase &PM, formatted_raw_ostream &Out, CodeGenFileType FileType, bool DisableVerify, AnalysisID StartAfter, AnalysisID StopAfter) override; }; extern Target TheCppBackendTarget; } // End llvm namespace #endif
Add a dummy subtarget to the CPP backend target machine. This will allow us to forward all of the standard TargetMachine calls to the subtarget and still return null as we were before.
Add a dummy subtarget to the CPP backend target machine. This will allow us to forward all of the standard TargetMachine calls to the subtarget and still return null as we were before. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@214727 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm
57cc9fcf75e31ef88d66e03588bc2c0a08b0b2aa
src/framework/framework.h
src/framework/framework.h
// framework.h #ifndef HEADER_FRAMEWORK #define HEADER_FRAMEWORK // forward declaration typedef struct wookie_framework wookie_framework; /* Send an HTTP request back to the framework */ void *wookie_framework_request(void*); #include "../http_parser/parser.h" #include "../server.h" #include "framework.c" /* Create new framework */ wookie_framework *wookie_new_framework(char*, int); /* Add a route to the framework */ void wookie_add_route(wookie_framework*, wookie_route*); /* Start the framework */ int wookie_start_framework(wookie_framework*); #endif
// framework.h #ifndef HEADER_FRAMEWORK #define HEADER_FRAMEWORK // forward declaration typedef struct wookie_framework wookie_framework; /* Send an HTTP request back to the framework */ void *wookie_framework_request(void*); #include "../http_parser/parser.h" #include "../http_parser/http_response.h" #include "../server.h" #include "framework.c" /* Create new framework */ wookie_framework *wookie_new_framework(char*, int); /* Add a route to the framework */ void wookie_add_route(wookie_framework*, wookie_route*); /* Start the framework */ int wookie_start_framework(wookie_framework*); #endif
Include HTTP responses in server
Include HTTP responses in server
C
mit
brendanashworth/wookie,brendanashworth/wookie
2978caa3dace55323940bac7d35eefc11ad25c50
src/printdird/printdird.c
src/printdird/printdird.c
#include <sys/inotify.h> #include <unistd.h> #include <sys/wait.h> #include <limits.h> #define BUF_LEN ( sizeof(struct inotify_event) + NAME_MAX + 1 ) int main(int argc, char *argv[]) { int notify; char buf[BUF_LEN]; struct inotify_event *event; const char *watchpath = "/home/ian/.PRINT"; notify = inotify_init(); if (inotify_add_watch(notify, watchpath, IN_CLOSE_WRITE) == -1) return 1; if (chdir(watchpath) !=0) return 1; while (1) { read(notify, buf, BUF_LEN); event = (struct inotify_event *) &buf[0]; if (event->name[0] == '.') continue; if(fork() == 0) { execlp("lpr" ,"-r" , event->name, NULL); return 0; } wait(NULL); unlink(event->name); } }
#include <sys/inotify.h> #include <unistd.h> #include <sys/wait.h> #include <limits.h> #define BUF_LEN ( sizeof(struct inotify_event) + NAME_MAX + 1 ) int main(int argc, char *argv[]) { int notify; char buf[BUF_LEN]; struct inotify_event *event; const char *watchpath = "/home/ian/.PRINT"; notify = inotify_init(); if (inotify_add_watch(notify, watchpath, IN_CLOSE_WRITE) == -1) return 1; if (chdir(watchpath) !=0) return 1; while (1) { read(notify, buf, BUF_LEN); event = (struct inotify_event *) &buf[0]; if (event->name[0] == '.') continue; if(fork() == 0) { execlp("lpr" ,"-r" , event->name, NULL); return 0; } wait(NULL); unlink(event->name); } }
Replace tab w/ 4-space indent
Replace tab w/ 4-space indent
C
mit
ids1024/Utilities,ids1024/Utilities,ids1024/Utilities
0b08d34452583460b74fb31624a3e743641fc615
src/printdird/printdird.c
src/printdird/printdird.c
#include <sys/inotify.h> #include <unistd.h> #include <limits.h> #include <cups/cups.h> #define BUF_LEN ( sizeof(struct inotify_event) + NAME_MAX + 1 ) int main(int argc, char *argv[]) { int notify; char buf[BUF_LEN]; struct inotify_event *event; cups_dest_t *dest; char *printer; char *filename; int job_id; const char *watchpath = "/home/ian/.PRINT"; notify = inotify_init(); if (inotify_add_watch(notify, watchpath, IN_CLOSE_WRITE) == -1) return 1; if (chdir(watchpath) !=0) return 1; //Get default printer if ((dest = cupsGetNamedDest(NULL, NULL, NULL)) == NULL ) return 1; printer = dest->name; while (1) { read(notify, buf, BUF_LEN); event = (struct inotify_event *) &buf[0]; filename = event->name; if (filename[0] == '.') continue; job_id = cupsPrintFile(printer, filename, filename, 0, NULL); cupsStartDocument(CUPS_HTTP_DEFAULT, printer, job_id, NULL, CUPS_FORMAT_AUTO, 1); unlink(filename); } }
#include <sys/inotify.h> #include <unistd.h> #include <limits.h> #include <cups/cups.h> #define BUF_LEN ( sizeof(struct inotify_event) + NAME_MAX + 1 ) int main(int argc, char *argv[]) { int notify; cups_dest_t *dest; char *printer; const char *watchpath = "/home/ian/.PRINT"; notify = inotify_init(); if (inotify_add_watch(notify, watchpath, IN_CLOSE_WRITE) == -1) return 1; if (chdir(watchpath) !=0) return 1; //Get default printer if ((dest = cupsGetNamedDest(NULL, NULL, NULL)) == NULL ) return 1; printer = dest->name; while (1) { char buf[BUF_LEN]; struct inotify_event *event; char *filename; int job_id; read(notify, buf, BUF_LEN); event = (struct inotify_event *) &buf[0]; filename = event->name; if (filename[0] == '.') continue; job_id = cupsPrintFile(printer, filename, filename, 0, NULL); cupsStartDocument(CUPS_HTTP_DEFAULT, printer, job_id, NULL, CUPS_FORMAT_AUTO, 1); unlink(filename); } }
Move variable declarations to while loop
Move variable declarations to while loop
C
mit
ids1024/Utilities,ids1024/Utilities,ids1024/Utilities
f0d5e3667099a34ca060fc13de19ef5be0c84db2
inc/filter/movingaverage.h
inc/filter/movingaverage.h
#pragma once #include <array> namespace filter { template <typename T, size_t N> class MovingAverage { public: MovingAverage(T initial_value=static_cast<T>(0)); T output() const; // return average of data in buffer T output(T input); // add new value to buffer and return average private: std::array<T, N> m_data; // circular buffer containing samples size_t m_data_index; // index of oldest circular buffer element T m_sum; // sum of all elements in buffer }; } // namespace filter #include "filter/movingaverage.hh"
#pragma once #include <array> namespace filter { /* * Warning: This class does not protect against sum overflow. It is possible * that the sum of values exceeds the maximum value T can store. */ template <typename T, size_t N> class MovingAverage { public: MovingAverage(T initial_value=static_cast<T>(0)); T output() const; // return average of data in buffer T output(T input); // add new value to buffer and return average private: std::array<T, N> m_data; // circular buffer containing samples size_t m_data_index; // index of oldest circular buffer element T m_sum; // sum of all elements in buffer }; } // namespace filter #include "filter/movingaverage.hh"
Document possibility of sum overflow in MovingAverage
Document possibility of sum overflow in MovingAverage
C
bsd-2-clause
oliverlee/phobos,oliverlee/phobos,oliverlee/phobos,oliverlee/phobos
1d6ea657a965cbe59fa1b669d01422f3b8cbb193
src/modules/conf_randr/e_smart_randr.h
src/modules/conf_randr/e_smart_randr.h
#ifdef E_TYPEDEFS #else # ifndef E_SMART_RANDR_H # define E_SMART_RANDR_H Evas_Object *e_smart_randr_add(Evas *evas); void e_smart_randr_layout_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h); void e_smart_randr_current_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h); void e_smart_randr_monitors_create(Evas_Object *obj); void e_smart_randr_monitor_add(Evas_Object *obj, Evas_Object *mon); void e_smart_randr_monitor_del(Evas_Object *obj, Evas_Object *mon); Eina_List *e_smart_randr_monitors_get(Evas_Object *obj); Eina_Bool e_smart_randr_changed_get(Evas_Object *obj); void e_smart_randr_changes_apply(Evas_Object *obj, Ecore_X_Window root); # endif #endif
#ifdef E_TYPEDEFS #else # ifndef E_SMART_RANDR_H # define E_SMART_RANDR_H Evas_Object *e_smart_randr_add(Evas *evas); void e_smart_randr_layout_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h); void e_smart_randr_current_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h); void e_smart_randr_monitors_create(Evas_Object *obj); void e_smart_randr_monitor_add(Evas_Object *obj, Evas_Object *mon); void e_smart_randr_monitor_del(Evas_Object *obj, Evas_Object *mon); Eina_List *e_smart_randr_monitors_get(Evas_Object *obj); Eina_Bool e_smart_randr_changed_get(Evas_Object *obj); void e_smart_randr_changes_apply(Evas_Object *obj); # endif #endif
Remove root window as a function paramater (not used anymore).
Remove root window as a function paramater (not used anymore). Signed-off-by: Christopher Michael <cp.michael@samsung.com> SVN revision: 81262
C
bsd-2-clause
FlorentRevest/Enlightenment,FlorentRevest/Enlightenment,tasn/enlightenment,tasn/enlightenment,tasn/enlightenment,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment,rvandegrift/e,rvandegrift/e,tizenorg/platform.upstream.enlightenment,tizenorg/platform.upstream.enlightenment,rvandegrift/e
ee701dc2f7f1459af75f099c9c901352bc77c94e
SSPSolution/SSPSolution/System.h
SSPSolution/SSPSolution/System.h
#ifndef SSPAPPLICATION_CORE_SYSTEM_H #define SSPAPPLICATION_CORE_SYSTEM_H #include <SDL.h> #include <SDL_syswm.h> #include <iostream> #include "../GraphicsDLL/GraphicsHandler.h" #include "../GraphicsDLL/Camera.h" #include "InputHandler.h" #include "../physicsDLL/physicsDLL/PhysicsHandler.h" #pragma comment (lib, "../Debug/PhysicsDLL") const int SCREEN_WIDTH = 1280; const int SCREEN_HEIGHT = 720; class System { private: bool m_fullscreen; bool m_running; //The glorious window handle for the sdl window HWND m_hwnd; HINSTANCE m_hinstance; LPCWSTR m_applicationName; //This is the window we render to SDL_Window* m_window; Camera* m_camera; //These are the subsystems GraphicsHandler* m_graphicsHandler; InputHandler* m_inputHandler; //this is a physicsHandler PhysicsHandler m_physicsHandler; public: System(); ~System(); int Shutdown(); int Initialize(); //Do not place things here without talking to the system designers. Place any update method in the System::Update(float dt) method int Run(); int Update(float deltaTime); private: int HandleEvents(); int FullscreenToggle(); }; #endif
#ifndef SSPAPPLICATION_CORE_SYSTEM_H #define SSPAPPLICATION_CORE_SYSTEM_H #include <SDL.h> #include <SDL_syswm.h> #include <iostream> #include "../GraphicsDLL/GraphicsHandler.h" #include "../GraphicsDLL/Camera.h" #include "InputHandler.h" #include "../physicsDLL/PhysicsHandler.h" #pragma comment (lib, "../Debug/PhysicsDLL") const int SCREEN_WIDTH = 1280; const int SCREEN_HEIGHT = 720; class System { private: bool m_fullscreen; bool m_running; //The glorious window handle for the sdl window HWND m_hwnd; HINSTANCE m_hinstance; LPCWSTR m_applicationName; //This is the window we render to SDL_Window* m_window; Camera* m_camera; //These are the subsystems GraphicsHandler* m_graphicsHandler; InputHandler* m_inputHandler; //this is a physicsHandler PhysicsHandler m_physicsHandler; public: System(); ~System(); int Shutdown(); int Initialize(); //Do not place things here without talking to the system designers. Place any update method in the System::Update(float dt) method int Run(); int Update(float deltaTime); private: int HandleEvents(); int FullscreenToggle(); }; #endif
FIX physicsDLL include path FOR DLL to work
FIX physicsDLL include path FOR DLL to work
C
apache-2.0
Chringo/SSP,Chringo/SSP
753ceda15f9730e7e0a660b1a0e9d387a3c1bf66
Classes/NBNPhotoChooserViewController.h
Classes/NBNPhotoChooserViewController.h
#import <UIKit/UIKit.h> @protocol NBNPhotoChooserViewControllerDelegate; @interface NBNPhotoChooserViewController : UIViewController - (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate; - (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate maxCellWidth:(CGFloat)maxCellWidth cellSpacing:(CGFloat)cellSpacing; @property (nonatomic) NSString *navigationBarTitle; @property (nonatomic) NSString *cancelButtonTitle; @property (nonatomic) BOOL shouldAnimateImagePickerTransition; @end @protocol NBNPhotoChooserViewControllerDelegate <NSObject> - (void)photoChooserController:(NBNPhotoChooserViewController *)photoChooser didChooseImage:(UIImage *)image; - (void)photoChooserDidCancel:(NBNPhotoChooserViewController *)photoChooser; @end
#import <UIKit/UIKit.h> @protocol NBNPhotoChooserViewControllerDelegate; @interface NBNPhotoChooserViewController : UIViewController - (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate; - (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate maxCellWidth:(CGFloat)maxCellWidth cellSpacing:(CGFloat)cellSpacing; @property (nonatomic) NSString *navigationBarTitle; @property (nonatomic) NSString *cancelButtonTitle; @property (nonatomic) BOOL shouldAnimateImagePickerTransition; @end @protocol NBNPhotoChooserViewControllerDelegate <NSObject> - (void)photoChooserController:(NBNPhotoChooserViewController *)photoChooser didChooseImage:(UIImage *)image; @optional - (void)photoChooserDidCancel:(NBNPhotoChooserViewController *)photoChooser; @end
Make delegate method optional (cancellation is handled automatically when using UINavigationController)
Make delegate method optional (cancellation is handled automatically when using UINavigationController)
C
mit
nerdishbynature/NBNPhotoChooser,kimar/NBNPhotoChooser
0a7fe1761cdb101263afa617fd31c3cef357ad40
Pod/Classes/OCKCarePlanEvent+CMHealth.h
Pod/Classes/OCKCarePlanEvent+CMHealth.h
#import <CareKit/CareKit.h> typedef void(^CMHCareSaveCompletion)(NSString *_Nullable uploadStatus, NSError *_Nullable error); @interface OCKCarePlanEvent (CMHealth) @property (nonatomic, nonnull, readonly) NSString *cmh_objectId; - (void)cmh_saveWithCompletion:(_Nullable CMHCareSaveCompletion)block; @end
#import <CareKit/CareKit.h> typedef void(^CMHCareSaveCompletion)(NSString *_Nullable uploadStatus, NSError *_Nullable error); /** * This category adds properties and methods to the `OCKCarePlanEvent` class which * allow instances to be identified uniquely and saved to CloudMine's * HIPAA compliant Connected Health Cloud. */ @interface OCKCarePlanEvent (CMHealth) /** * The unique identifier assigned to this event based on its `OCKCarePlanActivity` * identifier, its schedule, and its days since start. * * @warning the CareKit component of this SDK is experimental and subject to change. Your * feedback is welcomed! */ @property (nonatomic, nonnull, readonly) NSString *cmh_objectId; /** * Save a representation of this `OCKCarePlanEvent` isntance to CloudMine. * The event is given a unique identifier based on its `OCKCarePlanActivity` identifier, * its schedule, and its days since start. Saving an event multiple times will update * the instance of that event on CloudMine. The callback will provide a string value * of `created` or `updated` if the operation was successful. * * @warning the CareKit component of this SDK is experimental and subject to change. Your * feedback is welcomed! * * @param block Executes when the request completes successfully or fails with an error. */ - (void)cmh_saveWithCompletion:(_Nullable CMHCareSaveCompletion)block; @end
Add appledoc header comments to the 'OCKCarePlanEvent' class
Add appledoc header comments to the 'OCKCarePlanEvent' class
C
mit
cloudmine/CMHealthSDK-iOS,cloudmine/CMHealthSDK-iOS,cloudmine/CMHealthSDK
03a80e429b8eb1568052406520957291b878dbbe
ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/board.c
ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/board.c
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include "supervisor/board.h" void board_init(void) { } bool board_requests_safe_mode(void) { return false; } void reset_board(void) { } void board_deinit(void) { }
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include "supervisor/board.h" void board_init(void) { } bool board_requests_safe_mode(void) { return false; } void reset_board(void) { } void board_deinit(void) { }
Add new line for pre-commit
Add new line for pre-commit
C
mit
adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython
c1f5a1944657ba6abe375e3bb2a3238a46849f70
fs/ext3/bitmap.c
fs/ext3/bitmap.c
/* * linux/fs/ext3/bitmap.c * * Copyright (C) 1992, 1993, 1994, 1995 * Remy Card (card@masi.ibp.fr) * Laboratoire MASI - Institut Blaise Pascal * Universite Pierre et Marie Curie (Paris VI) */ #ifdef EXT3FS_DEBUG #include <linux/buffer_head.h> #include "ext3_fs.h" static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0}; unsigned long ext3_count_free (struct buffer_head * map, unsigned int numchars) { unsigned int i; unsigned long sum = 0; if (!map) return (0); for (i = 0; i < numchars; i++) sum += nibblemap[map->b_data[i] & 0xf] + nibblemap[(map->b_data[i] >> 4) & 0xf]; return (sum); } #endif /* EXT3FS_DEBUG */
/* * linux/fs/ext3/bitmap.c * * Copyright (C) 1992, 1993, 1994, 1995 * Remy Card (card@masi.ibp.fr) * Laboratoire MASI - Institut Blaise Pascal * Universite Pierre et Marie Curie (Paris VI) */ #include <linux/buffer_head.h> #include <linux/jbd.h> #include <linux/ext3_fs.h> #ifdef EXT3FS_DEBUG static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0}; unsigned long ext3_count_free (struct buffer_head * map, unsigned int numchars) { unsigned int i; unsigned long sum = 0; if (!map) return (0); for (i = 0; i < numchars; i++) sum += nibblemap[map->b_data[i] & 0xf] + nibblemap[(map->b_data[i] >> 4) & 0xf]; return (sum); } #endif /* EXT3FS_DEBUG */
Fix debug logging-only compilation error
[PATCH] ext3: Fix debug logging-only compilation error When EXT3FS_DEBUG is #define-d, the compile breaks due to #include file issues. Signed-off-by: Kirk True <c65a0fb7e74ffd2c9fc3a0f9aacb0f6a24b0a68b@kirkandsheila.com> Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@osdl.org> Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@osdl.org>
C
mit
KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs
e2170f8cc32db962f0c67dc7862cca7c59e828d3
ui/gfx/favicon_size.h
ui/gfx/favicon_size.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 UI_GFX_FAVICON_SIZE_H_ #define UI_GFX_FAVICON_SIZE_H_ #pragma once namespace gfx { // Size (along each axis) of the favicon. extern const int kFaviconSize; // If the width or height is bigger than the favicon size, a new width/height // is calculated and returned in width/height that maintains the aspect // ratio of the supplied values. void CalculateFaviconTargetSize(int* width, int* height); } // namespace gfx #endif // UI_GFX_FAVICON_SIZE_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 UI_GFX_FAVICON_SIZE_H_ #define UI_GFX_FAVICON_SIZE_H_ #pragma once #include "ui/base/ui_export.h" namespace gfx { // Size (along each axis) of the favicon. UI_EXPORT extern const int kFaviconSize; // If the width or height is bigger than the favicon size, a new width/height // is calculated and returned in width/height that maintains the aspect // ratio of the supplied values. UI_EXPORT void CalculateFaviconTargetSize(int* width, int* height); } // namespace gfx #endif // UI_GFX_FAVICON_SIZE_H_
Fix Linux shared build by adding missing UI_EXPORT annotations.
ui/gfx: Fix Linux shared build by adding missing UI_EXPORT annotations. TBR=sky@chromium.org Review URL: http://codereview.chromium.org/8028029 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@102765 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,Just-D/chromium-1,Just-D/chromium-1,rogerwang/chromium,nacl-webkit/chrome_deps,rogerwang/chromium,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,littlstar/chromium.src,Just-D/chromium-1,nacl-webkit/chrome_deps,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,chuan9/chromium-crosswalk,anirudhSK/chromium,Jonekee/chromium.src,chuan9/chromium-crosswalk,Jonekee/chromium.src,timopulkkinen/BubbleFish,dushu1203/chromium.src,ondra-novak/chromium.src,ltilve/chromium,junmin-zhu/chromium-rivertrail,axinging/chromium-crosswalk,dednal/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,dednal/chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,ltilve/chromium,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,keishi/chromium,ChromiumWebApps/chromium,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,Chilledheart/chromium,Jonekee/chromium.src,hujiajie/pa-chromium,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,M4sse/chromium.src,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,dednal/chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,markYoungH/chromium.src,Jonekee/chromium.src,nacl-webkit/chrome_deps,M4sse/chromium.src,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,patrickm/chromium.src,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,keishi/chromium,keishi/chromium,chuan9/chromium-crosswalk,M4sse/chromium.src,Chilledheart/chromium,Jonekee/chromium.src,patrickm/chromium.src,jaruba/chromium.src,ChromiumWebApps/chromium,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,dushu1203/chromium.src,littlstar/chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,zcbenz/cefode-chromium,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,anirudhSK/chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,anirudhSK/chromium,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,keishi/chromium,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,Just-D/chromium-1,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,robclark/chromium,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,ltilve/chromium,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,robclark/chromium,pozdnyakov/chromium-crosswalk,ltilve/chromium,Jonekee/chromium.src,hujiajie/pa-chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,rogerwang/chromium,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,rogerwang/chromium,timopulkkinen/BubbleFish,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,littlstar/chromium.src,zcbenz/cefode-chromium,M4sse/chromium.src,patrickm/chromium.src,zcbenz/cefode-chromium,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,keishi/chromium,dushu1203/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,junmin-zhu/chromium-rivertrail,robclark/chromium,pozdnyakov/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,markYoungH/chromium.src,Chilledheart/chromium,fujunwei/chromium-crosswalk,robclark/chromium,ondra-novak/chromium.src,keishi/chromium,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk,Just-D/chromium-1,jaruba/chromium.src,axinging/chromium-crosswalk,robclark/chromium,keishi/chromium,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,rogerwang/chromium,M4sse/chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,dednal/chromium.src,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,chuan9/chromium-crosswalk,littlstar/chromium.src,dednal/chromium.src,bright-sparks/chromium-spacewalk,patrickm/chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,dednal/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,zcbenz/cefode-chromium,robclark/chromium,Jonekee/chromium.src,jaruba/chromium.src,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,robclark/chromium,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,Jonekee/chromium.src,ondra-novak/chromium.src,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,M4sse/chromium.src,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ltilve/chromium,patrickm/chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,dushu1203/chromium.src,dednal/chromium.src,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,anirudhSK/chromium,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,robclark/chromium,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,keishi/chromium,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,robclark/chromium,timopulkkinen/BubbleFish,M4sse/chromium.src,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,ChromiumWebApps/chromium,ltilve/chromium,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,M4sse/chromium.src,M4sse/chromium.src,keishi/chromium,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,ondra-novak/chromium.src,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,rogerwang/chromium,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,robclark/chromium,rogerwang/chromium,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,patrickm/chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,jaruba/chromium.src,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,ondra-novak/chromium.src,ltilve/chromium,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,rogerwang/chromium,rogerwang/chromium,zcbenz/cefode-chromium,Chilledheart/chromium,Just-D/chromium-1,markYoungH/chromium.src,rogerwang/chromium,keishi/chromium,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,fujunwei/chromium-crosswalk,anirudhSK/chromium,jaruba/chromium.src,timopulkkinen/BubbleFish,Chilledheart/chromium
46d883dacaba3d481e47cc96c163e33c43c2e33a
prime_divisors/benchmark.c
prime_divisors/benchmark.c
#include "stdio.h" #define MAX_SIZE 10000001 #define MAX_FACTORS 10000 int primes(int n) { int i, d; int factors[MAX_FACTORS]; for(i=0;i < MAX_FACTORS; i++) factors[i] = 0; i = 0; d = 2; while(d*d <= n){ if(n%d == 0){ while(n%d == 0){ n /= d; factors[i] = d; } i++; } d++; } if(n > 1) factors[i++] = d; return i; } int count(int a, int b, int k){ int ans = 0; for(int i = a; i < (b+1); i++){ if (primes(i)==k) ans++; } return ans; } int main(void) { int t,n,a,b,k; a = 2; b = 10000000; k = 2; printf(" Number of integers between %d and %d, each having exactly %d prime divisors : %d" ,a,b,k,count(a,b,k)); return 1; }
#include "stdio.h" #define MAX_SIZE 10000001 #define MAX_FACTORS 10000 int primes(int n) { int i, d; int factors[MAX_FACTORS]; for(i=0;i < MAX_FACTORS; i++) factors[i] = 0; i = 0; d = 2; while(d*d <= n){ if(n%d == 0){ while(n%d == 0){ n /= d; factors[i] = d; } i++; } d++; } if(n > 1) factors[i++] = d; return i; } int count(int a, int b, int k){ int ans = 0; for(int i = a; i < (b+1); i++){ if (primes(i)==k) ans++; } return ans; } int main(void) { int t,n,a,b,k; a = 2; b = 10000000; k = 2; printf(" Number of integers between %d and %d, each having exactly %d prime divisors : %d" ,a,b,k,count(a,b,k)); return 0; }
Fix return value of C program
Fix return value of C program
C
mit
zbard/benchmark,zbard/benchmark,zbard/benchmark,zbard/benchmark,zbard/benchmark
22fd3d429ee81a0d773d30b9a7b80741bdac8aba
lab3/timer.h
lab3/timer.h
#ifndef TIMER_H #define TIMER_H struct timespec t0, t1; /* Start/end time for timer */ /* Timer macros */ #define TIMER_START() clock_gettime(CLOCK_MONOTONIC_RAW, &t0) #define TIMER_STOP() clock_gettime(CLOCK_MONOTONIC_RAW, &t1) #define TIMER_ELAPSED_NS() \ (t1.tv_sec * 1000000000 + t1.tv_nsec) - \ (t0.tv_sec * 1000000000 + t0.tv_nsec) #define TIMER_ELAPSED_US() \ (t1.tv_sec * 1000000 + (double)t1.tv_nsec / 1000) - \ (t0.tv_sec * 1000000 + (double)t0.tv_nsec / 1000) #endif /* TIMER_H */
#ifndef TIMER_H #define TIMER_H struct timespec t0, t1; /* Start/end time for timer */ /* Timer macros */ #define TIMER_START() clock_gettime(CLOCK_MONOTONIC, &t0) #define TIMER_STOP() clock_gettime(CLOCK_MONOTONIC, &t1) #define TIMER_ELAPSED_NS() \ (t1.tv_sec * 1000000000 + t1.tv_nsec) - \ (t0.tv_sec * 1000000000 + t0.tv_nsec) #define TIMER_ELAPSED_US() \ (t1.tv_sec * 1000000 + (double)t1.tv_nsec / 1000) - \ (t0.tv_sec * 1000000 + (double)t0.tv_nsec / 1000) #endif /* TIMER_H */
Use CLOCK_MONOTONIC instead of CLOCK_MONOTONIC_RAW.
Use CLOCK_MONOTONIC instead of CLOCK_MONOTONIC_RAW. shell.it.kth.se doesn't have _RAW.
C
mit
estan/ID2200,estan/ID2200
b8bcd304039bba9c1bc8d826e5202e94f7122a7d
Animation.h
Animation.h
#ifndef ANIMATION_H #define ANIMATION_H #include <vector> #include "Blittable.h" #include "Logger.h" namespace hm { class Animation { public: Animation(); ~Animation(); void add(Blittable& b); void remove(Blittable& b); void removeAll(); int getUnits(); void setUnits(const int units); unsigned int getFrames(); void setFrames(const unsigned int frames); void setAnimationSpeed(const int units, const unsigned int frames = 1); virtual void animate() = 0; protected: int units; unsigned int frames; std::vector<Blittable*> targets; }; } #endif
#ifndef ANIMATION_H #define ANIMATION_H #include <vector> #include "Blittable.h" #include "Logger.h" namespace hm { class Animation { public: Animation(); ~Animation(); void add(Blittable& b); void remove(Blittable& b); void removeAll(); int getUnits(); void setUnits(const int units); unsigned int getFrames(); void setFrames(const unsigned int frames); void setAnimationSpeed(const int units, const unsigned int frames = 1); virtual void animate() = 0; virtual bool isComplete() = 0; protected: int units; unsigned int frames; std::vector<Blittable*> targets; }; } #endif
Add pure virtual isComplete() function.
Add pure virtual isComplete() function. This function can be used to determine whether an animation has finished it's task or not.
C
lgpl-2.1
mdclyburn/hume
2bfcd96325b8f0a677658a13440c7ac0066915e2
include/stm8_gpio.h
include/stm8_gpio.h
#include "stm8s003_reg.h" typedef enum { PORT_A = PA_ODR, PORT_B = PB_ODR, PORT_C = PB_, PORT_D, PORT_E, PORT_F } port_t; void toggle_port_a_pin(uint8_t pin); void set_high_port_a_pin(uint8_t pin); void set_low_port_a_pin(uint8_t pin); void set
#include "stm8s003_reg.h" #include <stdint.h> struct input_pin_config { bool pull_up_enable; bool interrupt_enable; }; struct output_pin_config { bool open_drain_enable; bool fast_mode_enable; }; inline void set_port_a(uint8_t value) { PA_ODR = value; } inline void toggle_port_a_pin(uint8_t pin) { set_port_a((*(uart16_t *) PA_ODR) ^ ~(1 << pin)); } inline void set_high_port_a_pin(uint8_t pin) { set_port_a((*(uint16_t *) PA_ODR) | (1 << pin)); } inline void set_low_port_a_pin(uint8_t pin) { set_port_a((*(uart16_t *) PA_ODR) & ~(1 << pin)); } inline void read_port_a(uint8_t * value) { &value = (uint16_t *) PA_IDR; } inline bool read_port_a_pin(uint8_t pin) { uint8_t value; read_port_a_pin(value); return value >> pin; } inline void configure_port_a_input_pin(struct input_pin_config * config); inline void configure_port_a_output_pin(struct output_pin_config * config);
Add some inline functions for configuring gpio.
Add some inline functions for configuring gpio.
C
mit
tderensis/stm8_lib,tderensis/stm8_lib
a2015a13fbaa23a2a2097b8573a36e617d1eb980
baseutils/ls/tests/functional_test.c
baseutils/ls/tests/functional_test.c
/* * $FreeBSD$ * * Smoke test for `ls` utility */ #include <getopt.h> #include <stdio.h> #include <stdlib.h> #include "functional_test.h" int main(int argc, char *argv[]) { while ((opt = getopt_long(argc, argv, short_options, long_options, &option_index)) != -1) { switch(opt) { case 0: /* valid long option */ /* generate the valid command for execution */ snprintf(command, sizeof(command), "/bin/ls --%s > /dev/null", long_options[option_index].name); ret = system(command); if (ret == -1) { fprintf(stderr, "Failed to create child process\n"); exit(EXIT_FAILURE); } if (!WIFEXITED(ret)) { fprintf(stderr, "Child process failed to terminate normally\n"); exit(EXIT_FAILURE); } if (WEXITSTATUS(ret)) fprintf(stderr, "\nValid option '--%s' failed to execute\n", long_options[option_index].name); else printf("Successful: '--%s'\n", long_options[option_index].name); break; case '?': /* invalid long option */ break; default: printf("getopt_long returned character code %o\n", opt); } } exit(EXIT_SUCCESS); }
/* * $FreeBSD$ * * Smoke test for `ls` utility */ #include <getopt.h> #include <stdio.h> #include <stdlib.h> #include <sys/wait.h> #include "functional_test.h" int main(int argc, char *argv[]) { while ((opt = getopt_long(argc, argv, short_options, long_options, &option_index)) != -1) { switch(opt) { case 0: /* valid long option */ /* generate the valid command for execution */ snprintf(command, sizeof(command), "/bin/ls --%s > /dev/null", long_options[option_index].name); ret = system(command); if (ret == -1) { fprintf(stderr, "Failed to create child process\n"); exit(EXIT_FAILURE); } if (!WIFEXITED(ret)) { fprintf(stderr, "Child process failed to terminate normally\n"); exit(EXIT_FAILURE); } if (WEXITSTATUS(ret)) fprintf(stderr, "\nValid option '--%s' failed to execute\n", long_options[option_index].name); else printf("Successful: '--%s'\n", long_options[option_index].name); break; case '?': /* invalid long option */ break; default: printf("getopt_long returned character code %o\n", opt); } } exit(EXIT_SUCCESS); }
Fix compilation error on FreeBSD
Fix compilation error on FreeBSD Error log - ``` undefined reference to `WIFEXITED' undefined reference to `WEXITSTATUS' ``` Apparently the header file <sys/wait.h> has to be included in FreeBSD unlike on Linux (Ubuntu 16.10) since it is included by <stdlib.h>.
C
bsd-2-clause
shivansh/smoketestsuite,shivrai/smoketestsuite,shivrai/smoketestsuite,shivrai/smoketestsuite,shivansh/smoketestsuite,shivansh/smoketestsuite
150ea1ffddd8ade2bd1b7f146277210c5f182321
arduino/OpenROV/Settings.h
arduino/OpenROV/Settings.h
#ifndef __SETTINGS_H_ #define __SETTINGS_H_ #include <Arduino.h> #include "Device.h" // This section is for devices and their configuration //Kit: #define HAS_STD_LIGHTS (1) #define LIGHTS_PIN 5 #define HAS_STD_CAPE (1) #define HAS_STD_2X1_THRUSTERS (1) #define HAS_STD_PILOT (1) #define HAS_STD_CAMERAMOUNT (1) #define CAMERAMOUNT_PIN 3 #define CAPE_VOLTAGE_PIN 0 #define CAPE_CURRENT_PIN 3 //After Market: #define HAS_STD_CALIBRATIONLASERS (0) #define CALIBRATIONLASERS_PIN 6 #define HAS_POLOLU_MINIMUV (1) #define HAS_MS5803_14BA (0) #define MS5803_14BA_I2C_ADDRESS 0x76 #define MIDPOINT 1500 #define LOGGING (1) class Settings : public Device { public: static int smoothingIncriment; //How aggressive the throttle changes static int deadZone_min; static int deadZone_max; static int capability_bitarray; Settings():Device(){}; void device_setup(); void device_loop(Command cmd); }; #endif
#ifndef __SETTINGS_H_ #define __SETTINGS_H_ #include <Arduino.h> #include "Device.h" // This section is for devices and their configuration //Kit: #define HAS_STD_LIGHTS (1) #define LIGHTS_PIN 5 #define HAS_STD_CAPE (1) #define HAS_STD_2X1_THRUSTERS (1) #define HAS_STD_PILOT (1) #define HAS_STD_CAMERAMOUNT (1) #define CAMERAMOUNT_PIN 3 #define CAPE_VOLTAGE_PIN 0 #define CAPE_CURRENT_PIN 3 //After Market: #define HAS_STD_CALIBRATIONLASERS (0) #define CALIBRATIONLASERS_PIN 6 #define HAS_POLOLU_MINIMUV (0) #define HAS_MS5803_14BA (0) #define MS5803_14BA_I2C_ADDRESS 0x76 #define MIDPOINT 1500 #define LOGGING (1) class Settings : public Device { public: static int smoothingIncriment; //How aggressive the throttle changes static int deadZone_min; static int deadZone_max; static int capability_bitarray; Settings():Device(){}; void device_setup(); void device_loop(Command cmd); }; #endif
Reset default settings to stock kit configuration
Reset default settings to stock kit configuration
C
mit
BrianAdams/openrov-cockpit,BenjaminTsai/openrov-cockpit,kavi87/openrov-cockpit,johan--/openrov-cockpit,spiderkeys/openrov-cockpit,OpenROV/openrov-cockpit,johan--/openrov-cockpit,kavi87/openrov-cockpit,johan--/openrov-cockpit,kavi87/openrov-cockpit,chaudhryjunaid/openrov-cockpit,spiderkeys/openrov-cockpit,BrianAdams/openrov-cockpit,kavi87/openrov-cockpit,BenjaminTsai/openrov-cockpit,spiderkeys/openrov-cockpit,BenjaminTsai/openrov-cockpit,chaudhryjunaid/openrov-cockpit,BrianAdams/openrov-cockpit,BenjaminTsai/openrov-cockpit,chaudhryjunaid/openrov-cockpit,kavi87/openrov-cockpit,OpenROV/openrov-cockpit,spiderkeys/openrov-cockpit,johan--/openrov-cockpit,chaudhryjunaid/openrov-cockpit,BrianAdams/openrov-cockpit,BenjaminTsai/openrov-cockpit,BrianAdams/openrov-cockpit,spiderkeys/openrov-cockpit,chaudhryjunaid/openrov-cockpit,johan--/openrov-cockpit,OpenROV/openrov-cockpit
177e9089a4bfdb04d73a12eba6dc3b426b33b8d6
src/GtkApplicationDelegate.h
src/GtkApplicationDelegate.h
/* GTK+ Integration with platform-specific application-wide features * such as the OS X menubar and application delegate concepts. * * Copyright (C) 2009 Paul Davis * Copyright © 2010 John Ralls * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; version 2.1 * of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #import <Cocoa/Cocoa.h> @interface GtkApplicationDelegate : NSObject <NSApplicationDelegate> {} @end
/* GTK+ Integration with platform-specific application-wide features * such as the OS X menubar and application delegate concepts. * * Copyright (C) 2009 Paul Davis * Copyright © 2010 John Ralls * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; version 2.1 * of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #import <Cocoa/Cocoa.h> #include <AvailabilityMacros.h> #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 @interface GtkApplicationDelegate : NSObject <NSApplicationDelegate> {} #else @interface GtkApplicationDelegate : NSObject {} #endif @end
Fix compile error on Leopard & Tiger.
Fix compile error on Leopard & Tiger.
C
lgpl-2.1
GNOME/gtk-mac-integration,GNOME/gtk-mac-integration,sharoonthomas/gtk-mac-integration,GNOME/gtk-mac-integration,sharoonthomas/gtk-mac-integration,sharoonthomas/gtk-mac-integration,sharoonthomas/gtk-mac-integration,jralls/gtk-mac-integration,sharoonthomas/gtk-mac-integration,jralls/gtk-mac-integration,jralls/gtk-mac-integration
12521bf43e5415935befb6fc02f3bf8564252ddf
native/traceptprovider_doubleload/program.c
native/traceptprovider_doubleload/program.c
#include <dlfcn.h> int main(int argc, char* argv[]) { dlopen("1//libcoreclr.so", RTLD_NOW | RTLD_GLOBAL); dlopen("2//libcoreclrtraceptprovider.so", RTLD_LAZY); dlopen("2//libcoreclr.so", RTLD_NOW | RTLD_GLOBAL); return 0; }
//#define _GNU_SOURCE #include <dlfcn.h> #include <stdio.h> #include <string.h> void *dlopen(const char *filename, int flag) { static void* (*dlopenImpl)(const char *filename, int flag) = 0; if(!dlopenImpl) { dlopenImpl = dlsym(RTLD_NEXT, "dlopen"); } if(strcmp(filename, "2//libcoreclrtraceptprovider.so") == 0) { printf("Skip loading 2//libcoreclrtraceptprovider.so.\n"); return 0; } printf("Calling dlopen(%s).\n", filename); return dlopenImpl(filename, flag); } int main(int argc, char* argv[]) { dlopen("1//libcoreclr.so", RTLD_NOW | RTLD_GLOBAL); dlopen("2//libcoreclr.so", RTLD_NOW | RTLD_GLOBAL); return 0; }
Update implementation to hook calls to dlopen.
Update implementation to hook calls to dlopen.
C
mit
brianrob/coretests,brianrob/coretests
1b19c178ffecf125b9cbda8aa1bae11f49fcecf5
include/dsnutil/singleton.h
include/dsnutil/singleton.h
/// \file /// \brief Singleton design pattern /// /// \author Peter 'png' Hille <peter@das-system-networks.de> #ifndef SINGLETON_HH #define SINGLETON_HH 1 #include <dsnutil/compiler_features.h> namespace dsn { /// \brief Template for singleton classes /// /// This template can be used to implement the "singleton" design pattern /// on any class. template <class Derived> class Singleton { public: /// \brief Access singleton instance /// /// \return Reference to the instance of this singleton. static dsnutil_cpp_DEPRECATED Derived& getInstance() { return instanceRef(); } /// \brief Access singleton instance (by reference) /// /// \return Reference to the initialized singleton instance static Derived& instanceRef() { static Derived instance; return instance; } /// \brief Access singleton instance (by pointer) /// /// \return Pointer to the initialized singleton instance static Derived* instancePtr() { return &instanceRef(); } protected: /// \brief Default constructor /// /// \note This ctor is protected so that derived classes can implement /// their own logics for object initialization while still maintaining /// the impossibility of direct ctor calls! Singleton() {} private: /// \brief Copy constructor /// /// \note This ctor is private to prevent multiple instances of the same /// singleton from being created through object assignments! Singleton(const Singleton&) {} }; } #endif // !SINGLETON_HH
/// \file /// \brief Singleton design pattern /// /// \author Peter 'png' Hille <peter@das-system-networks.de> #ifndef SINGLETON_HH #define SINGLETON_HH 1 namespace dsn { /// \brief Template for singleton classes /// /// This template can be used to implement the "singleton" design pattern /// on any class. template <class Derived> class Singleton { public: /// \brief Access singleton instance (by reference) /// /// \return Reference to the initialized singleton instance static Derived& instanceRef() { static Derived instance; return instance; } /// \brief Access singleton instance (by pointer) /// /// \return Pointer to the initialized singleton instance static Derived* instancePtr() { return &instanceRef(); } protected: /// \brief Default constructor /// /// \note This ctor is protected so that derived classes can implement /// their own logics for object initialization while still maintaining /// the impossibility of direct ctor calls! Singleton() {} private: /// \brief Copy constructor /// /// \note This ctor is private to prevent multiple instances of the same /// singleton from being created through object assignments! Singleton(const Singleton&) {} }; } #endif // !SINGLETON_HH
Remove deprecated instance() method from Singleton
Remove deprecated instance() method from Singleton
C
bsd-3-clause
png85/dsnutil_cpp
00dc4cb5f356873e8c0b704e2cf2467f0f0a9a71
libc/sysdeps/linux/common/bits/uClibc_errno.h
libc/sysdeps/linux/common/bits/uClibc_errno.h
/* * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #ifndef _BITS_UCLIBC_ERRNO_H #define _BITS_UCLIBC_ERRNO_H 1 #ifdef IS_IN_rtld # undef errno # define errno _dl_errno extern int _dl_errno; // attribute_hidden; #elif defined __UCLIBC_HAS_THREADS__ # include <tls.h> # if defined USE___THREAD && USE___THREAD # undef errno # ifndef NOT_IN_libc # define errno __libc_errno # else # define errno errno # endif extern __thread int errno __attribute_tls_model_ie; # endif /* USE___THREAD */ #endif /* IS_IN_rtld */ #define __set_errno(val) (errno = (val)) #ifndef __ASSEMBLER__ extern int *__errno_location (void) __THROW __attribute__ ((__const__)) # ifdef IS_IN_rtld attribute_hidden # endif ; # if defined __UCLIBC_HAS_THREADS__ # include <tls.h> # if defined USE___THREAD && USE___THREAD libc_hidden_proto(__errno_location) # endif # endif #endif /* !__ASSEMBLER__ */ #endif
/* * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #ifndef _BITS_UCLIBC_ERRNO_H #define _BITS_UCLIBC_ERRNO_H 1 #ifdef IS_IN_rtld # undef errno # define errno _dl_errno extern int _dl_errno; // attribute_hidden; #elif defined __UCLIBC_HAS_THREADS__ # include <tls.h> # if defined USE___THREAD && USE___THREAD # undef errno # ifndef NOT_IN_libc # define errno __libc_errno # else # define errno errno # endif extern __thread int errno attribute_tls_model_ie; # endif /* USE___THREAD */ #endif /* IS_IN_rtld */ #define __set_errno(val) (errno = (val)) #ifndef __ASSEMBLER__ extern int *__errno_location (void) __THROW __attribute__ ((__const__)) # ifdef IS_IN_rtld attribute_hidden # endif ; # if defined __UCLIBC_HAS_THREADS__ # include <tls.h> # if defined USE___THREAD && USE___THREAD libc_hidden_proto(__errno_location) # endif # endif #endif /* !__ASSEMBLER__ */ #endif
Fix typo in macro for tls access model
Fix typo in macro for tls access model
C
lgpl-2.1
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
111468dc4e6fb96938654a259deba0a92d564cd6
docs/examples/memoryviews/C_func_file.c
docs/examples/memoryviews/C_func_file.c
#include "C_func_file.h" void multiply_by_10_in_C(double arr[], unsigned int n) { for (int i = 0; i < n; i++) { arr[i] *= 10; } }
#include "C_func_file.h" void multiply_by_10_in_C(double arr[], unsigned int n) { unsigned int i; for (i = 0; i < n; i++) { arr[i] *= 10; } }
Fix warning about "comparison between signed and unsigned" in example and make it fully C89 compatible.
Fix warning about "comparison between signed and unsigned" in example and make it fully C89 compatible.
C
apache-2.0
scoder/cython,cython/cython,da-woods/cython,cython/cython,scoder/cython,cython/cython,da-woods/cython,da-woods/cython,cython/cython,scoder/cython,scoder/cython,da-woods/cython
39c7ec7b73483cc79999299df192383e58f6419c
ios/Firestack/FirestackDatabase.h
ios/Firestack/FirestackDatabase.h
// // FirestackDatabase.h // Firestack // // Created by Ari Lerner on 8/23/16. // Copyright © 2016 Facebook. All rights reserved. // #ifndef FirestackDatabase_h #define FirestackDatabase_h #import "Firebase.h" #import "RCTEventEmitter.h" #import "RCTBridgeModule.h" @interface FirestackDatabase : RCTEventEmitter <RCTBridgeModule> { } @property (nonatomic) NSDictionary *_DBHandles; @property (nonatomic, weak) FIRDatabaseReference *ref; @end #endif
// // FirestackDatabase.h // Firestack // // Created by Ari Lerner on 8/23/16. // Copyright © 2016 Facebook. All rights reserved. // #ifndef FirestackDatabase_h #define FirestackDatabase_h #import "Firebase.h" #import "RCTEventEmitter.h" #import "RCTBridgeModule.h" @interface FirestackDatabase : RCTEventEmitter <RCTBridgeModule> { } @property NSMutableDictionary *dbReferences; @property FIRDatabase *database; @end #endif
Update missing iOS header changes
Update missing iOS header changes
C
mit
sraka1/react-native-firestack,sraka1/react-native-firestack,sraka1/react-native-firestack,sraka1/react-native-firestack
438d7f05d34abfdf6a8a8954a957b97275162070
test/CodeGen/mrtd.c
test/CodeGen/mrtd.c
// RUN: %clang_cc1 -mrtd -triple i386-unknown-freebsd9.0 -emit-llvm -o - %s | FileCheck %s void baz(int arg); // CHECK: define x86_stdcallcc void @foo(i32 %arg) nounwind void foo(int arg) { // CHECK: call x86_stdcallcc i32 (...)* @bar(i32 %tmp) bar(arg); // CHECK: call x86_stdcallcc void @baz(i32 %tmp1) baz(arg); } // CHECK: declare x86_stdcallcc i32 @bar(...) // CHECK: declare x86_stdcallcc void @baz(i32)
// RUN: %clang_cc1 -mrtd -triple i386-unknown-freebsd9.0 -emit-llvm -o - %s | FileCheck %s void baz(int arg); // CHECK: define x86_stdcallcc void @foo(i32 %arg) nounwind void foo(int arg) { // CHECK: call x86_stdcallcc i32 (...)* @bar(i32 bar(arg); // CHECK: call x86_stdcallcc void @baz(i32 baz(arg); } // CHECK: declare x86_stdcallcc i32 @bar(...) // CHECK: declare x86_stdcallcc void @baz(i32)
Kill off more names to fix this test
Kill off more names to fix this test git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@126775 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
1a387a296e9988792baa730fd2b0972d98158a68
kernel/include/bs_config_parser.h
kernel/include/bs_config_parser.h
#ifndef BS_CONFIG_PARSER_H #define BS_CONFIG_PARSER_H #include "bs_common.h" #include <map> #include <string> #include <vector> namespace blue_sky { struct wcfg; class BS_API bs_cfg_p { public: friend struct wcfg; typedef std::vector<std::string> vstr_t; typedef std::map<std::string,vstr_t> map_t; void parse_strings (const std::string &str, bool append = false); void read_file (const char *filename); void clear_env_map (); const map_t &env() const; vstr_t getenv(const char *e); private: bs_cfg_p (); map_t env_mp; }; typedef singleton< bs_cfg_p > cfg; } #endif // BS_CONFIG_PARSER_H
#ifndef BS_CONFIG_PARSER_H #define BS_CONFIG_PARSER_H #include "bs_common.h" #include <map> #include <string> #include <vector> namespace blue_sky { struct wcfg; class BS_API bs_cfg_p { public: friend struct wcfg; typedef std::vector<std::string> vstr_t; typedef std::map<std::string,vstr_t> map_t; void parse_strings (const std::string &str, bool append = false); void read_file (const char *filename); void clear_env_map (); const map_t &env() const; vstr_t getenv(const char *e); vstr_t operator[] (const char *e) { return getenv (e); } private: bs_cfg_p (); map_t env_mp; }; typedef singleton< bs_cfg_p > cfg; struct bs_config { bs_cfg_p::vstr_t operator [] (const char *e) { return cfg::Instance ()[e]; } }; } #endif // BS_CONFIG_PARSER_H
Add bs_config for hide bs_cfg_p::Instance () usage
Add bs_config for hide bs_cfg_p::Instance () usage And add operator[] to getenv
C
mpl-2.0
uentity/bluesky,uentity/bluesky,uentity/bluesky,uentity/bluesky,uentity/bluesky
a83b208ff6ddb81657e9da1f93d4117de9ba3d1b
chrome/gpu/gpu_config.h
chrome/gpu/gpu_config.h
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_GPU_GPU_CONFIG_H_ #define CHROME_GPU_GPU_CONFIG_H_ // This file declares common preprocessor configuration for the GPU process. #include "build/build_config.h" #if defined(OS_LINUX) && !defined(ARCH_CPU_X86) // Only define GLX support for Intel CPUs for now until we can get the // proper dependencies and build setup for ARM. #define GPU_USE_GLX #endif #endif // CHROME_GPU_GPU_CONFIG_H_
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_GPU_GPU_CONFIG_H_ #define CHROME_GPU_GPU_CONFIG_H_ // This file declares common preprocessor configuration for the GPU process. #include "build/build_config.h" #if defined(OS_LINUX) && defined(ARCH_CPU_X86) // Only define GLX support for Intel CPUs for now until we can get the // proper dependencies and build setup for ARM. #define GPU_USE_GLX #endif #endif // CHROME_GPU_GPU_CONFIG_H_
Fix stupid error for Linux build.
Fix stupid error for Linux build. TEST=none BUG=none Review URL: http://codereview.chromium.org/555096 git-svn-id: http://src.chromium.org/svn/trunk/src@37093 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: 3c2fc5241d63758ffd4e4c072df9742c8dda3595
C
bsd-3-clause
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser
17d2ffa473430f9a09f717073f246f2b59e6e289
ir/be/test/fehler100.c
ir/be/test/fehler100.c
int incs[14]; int bla(int b); void simpleSort ( int lo, int hi, int d ) { int i, j, h, bigN, hp; int v; for (; hp >= 0; hp--) { h = incs[hp]; if (hp >= 5) bla(lo); i = lo + h; while (1) { if (i > hi) break; j = i; while (bla(d)) { j = j - h; } } } }
/* test for the spiller */ int incs[14]; int bla(int b); void simpleSort ( int lo, int hi, int d ) { int i, j, h, bigN, hp; int v; for (; hp >= 0; hp--) { h = incs[hp]; if (hp >= 5) bla(lo); i = lo + h; while (1) { if (i > hi) break; j = i; while (bla(d)) { j = j - h; } } } } int main(void) { return 0; }
Add a main to let it compile.
Add a main to let it compile. [r16318]
C
lgpl-2.1
MatzeB/libfirm,killbug2004/libfirm,killbug2004/libfirm,davidgiven/libfirm,killbug2004/libfirm,davidgiven/libfirm,jonashaag/libfirm,8l/libfirm,MatzeB/libfirm,8l/libfirm,davidgiven/libfirm,jonashaag/libfirm,killbug2004/libfirm,libfirm/libfirm,davidgiven/libfirm,libfirm/libfirm,MatzeB/libfirm,jonashaag/libfirm,jonashaag/libfirm,8l/libfirm,8l/libfirm,8l/libfirm,libfirm/libfirm,killbug2004/libfirm,libfirm/libfirm,killbug2004/libfirm,MatzeB/libfirm,libfirm/libfirm,MatzeB/libfirm,MatzeB/libfirm,8l/libfirm,jonashaag/libfirm,jonashaag/libfirm,davidgiven/libfirm,davidgiven/libfirm,jonashaag/libfirm,killbug2004/libfirm,MatzeB/libfirm,davidgiven/libfirm,8l/libfirm
6142283e4f51049c3ab867e5cdeaea9d6052eb6f
cpu/stm32l1/periph/cpuid.c
cpu/stm32l1/periph/cpuid.c
/* * Copyright (C) 2014 FU Berlin * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @addtogroup driver_periph * @{ * * @file * @brief Low-level CPUID driver implementation * * @author Thomas Eichinger <thomas.eichinger@fu-berlin.de> */ #include <string.h> #include "periph/cpuid.h" extern volatile uint32_t _cpuid_address; void cpuid_get(void *id) { memcpy(id, (void *)(_cpuid_address), CPUID_ID_LEN); } /** @} */
/* * Copyright (C) 2014 FU Berlin * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @addtogroup driver_periph * @{ * * @file * @brief Low-level CPUID driver implementation * * @author Thomas Eichinger <thomas.eichinger@fu-berlin.de> */ #include <string.h> #include "periph/cpuid.h" extern volatile uint32_t _cpuid_address; void cpuid_get(void *id) { memcpy(id, (void *)(&_cpuid_address), CPUID_ID_LEN); } /** @} */
Use the address of the variable instead of the value itself for the CPUID
Use the address of the variable instead of the value itself for the CPUID
C
lgpl-2.1
DipSwitch/RIOT,DipSwitch/RIOT,DipSwitch/RIOT,DipSwitch/RIOT,DipSwitch/RIOT,DipSwitch/RIOT
07313f73ce0b58a25a24ca632570f3cf80778e48
components/lua/src/proxy.c
components/lua/src/proxy.c
/* * proxy.c * lexer proxy for Lua parser -- implements __FILE__ and __LINE__ * Luiz Henrique de Figueiredo * This code is hereby placed in the public domain. * Add <<#include "proxy.c">> just before the definition of luaX_next in llex.c */ #include <string.h> static int nexttoken(LexState *ls, SemInfo *seminfo) { int t=llex(ls,seminfo); if (t==TK_NAME) { if (strcmp(getstr(seminfo->ts),"__FILE__")==0) { t=TK_STRING; seminfo->ts = ls->source; } else if (strcmp(getstr(seminfo->ts),"__LINE__")==0) { t=TK_NUMBER; seminfo->r = ls->linenumber; } } return t; } #define llex nexttoken
/* * proxy.c * lexer proxy for Lua parser -- implements __FILE__ and __LINE__ * Luiz Henrique de Figueiredo * This code is hereby placed in the public domain. * Add <<#include "proxy.c">> just before the definition of luaX_next in llex.c */ /* * Luiz's code changed, per his suggestion, to include some polishing * the name for __FILE__, taken from luaU_undump. * -- Jeffrey Kegler */ #include <string.h> static int nexttoken(LexState *ls, SemInfo *seminfo) { int t = llex (ls, seminfo); if (t == TK_NAME) { if (strcmp (getstr (seminfo->ts), "__FILE__") == 0) { const char *name = ls->source; t = TK_STRING; if (*name == '@' || *name == '=') name = name + 1; else if (*name == LUA_SIGNATURE[0]) name = "binary string"; seminfo->ts = name; } else if (strcmp (getstr (seminfo->ts), "__LINE__") == 0) { t = TK_NUMBER; seminfo->r = ls->linenumber; } } return t; } #define llex nexttoken
Add __FILE__, __LINE__ to Lua
Add __FILE__, __LINE__ to Lua
C
mit
pczarn/kollos,pczarn/kollos,jeffreykegler/kollos,jeffreykegler/kollos,pczarn/kollos,pczarn/kollos,jeffreykegler/kollos,jeffreykegler/kollos,jeffreykegler/kollos,pczarn/kollos
a99ce834bdb9a9a42d0d779d74cb70af6a837716
features/cryptocell/FEATURE_CRYPTOCELL310/mbedtls_device.h
features/cryptocell/FEATURE_CRYPTOCELL310/mbedtls_device.h
/* * mbedtls_device.h * * Copyright (C) 2018-2019, 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. * */ #ifndef __MBEDTLS_DEVICE__ #define __MBEDTLS_DEVICE__ #define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT #define MBEDTLS_AES_ALT #define MBEDTLS_CTR_DRBG_USE_128_BIT_KEY #define MBEDTLS_SHA1_ALT #define MBEDTLS_SHA256_ALT #define MBEDTLS_CCM_ALT #define MBEDTLS_ECDSA_VERIFY_ALT #define MBEDTLS_ECDSA_SIGN_ALT #define MBEDTLS_ECDSA_GENKEY_ALT #define MBEDTLS_ECDH_GEN_PUBLIC_ALT #define MBEDTLS_ECDH_COMPUTE_SHARED_ALT #endif //__MBEDTLS_DEVICE__
/* * mbedtls_device.h * * Copyright (C) 2018-2019, 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. * */ #ifndef __MBEDTLS_DEVICE__ #define __MBEDTLS_DEVICE__ #define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT //#define MBEDTLS_AES_ALT #define MBEDTLS_CTR_DRBG_USE_128_BIT_KEY #define MBEDTLS_SHA1_ALT #define MBEDTLS_SHA256_ALT #define MBEDTLS_CCM_ALT #define MBEDTLS_ECDSA_VERIFY_ALT #define MBEDTLS_ECDSA_SIGN_ALT #define MBEDTLS_ECDSA_GENKEY_ALT #define MBEDTLS_ECDH_GEN_PUBLIC_ALT #define MBEDTLS_ECDH_COMPUTE_SHARED_ALT #endif //__MBEDTLS_DEVICE__
Make the alternative aes optional
Make the alternative aes optional Have the alternative aes undefined by default, in order not to break backwards compatability. `MBEDTLS_CTR_DRBG_USE_128_BIT_KEY` remains defined for better usability.
C
apache-2.0
kjbracey-arm/mbed,andcor02/mbed-os,kjbracey-arm/mbed,andcor02/mbed-os,mbedmicro/mbed,andcor02/mbed-os,mbedmicro/mbed,mbedmicro/mbed,andcor02/mbed-os,kjbracey-arm/mbed,mbedmicro/mbed,andcor02/mbed-os,kjbracey-arm/mbed,mbedmicro/mbed,andcor02/mbed-os
eb434c1c76cdad0f5f841487dc9568c5079c6fb8
ReactCommon/react/test_utils/MockSurfaceHandler.h
ReactCommon/react/test_utils/MockSurfaceHandler.h
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <gmock/gmock.h> #include <react/renderer/scheduler/SurfaceHandler.h> namespace facebook { namespace react { class MockSurfaceHandler : public SurfaceHandler { public: MockSurfaceHandler() : SurfaceHandler("moduleName", 0){}; MOCK_METHOD(void, setDisplayMode, (DisplayMode), (const, noexcept)); MOCK_METHOD(SurfaceId, getSurfaceId, (), (const, noexcept)); }; } // namespace react } // namespace facebook
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <gmock/gmock.h> #include <react/renderer/scheduler/SurfaceHandler.h> namespace facebook { namespace react { class MockSurfaceHandler : public SurfaceHandler { public: MockSurfaceHandler() : SurfaceHandler("moduleName", 0){}; MOCK_QUALIFIED_METHOD1(setDisplayMode, const noexcept, void(DisplayMode)); MOCK_QUALIFIED_METHOD0(getSurfaceId, const noexcept, SurfaceId()); }; } // namespace react } // namespace facebook
Revert D34351084: Migrate from googletest 1.8 to googletest 1.10
Revert D34351084: Migrate from googletest 1.8 to googletest 1.10 Differential Revision: D34351084 (https://github.com/facebook/react-native/commit/94891ab5f883efa55146dc42e1cd9705506794f3) Original commit changeset: 939b3985ab63 Original Phabricator Diff: D34351084 (https://github.com/facebook/react-native/commit/94891ab5f883efa55146dc42e1cd9705506794f3) fbshipit-source-id: 2fd17e0ccd9d1f1d643f4a372d84cb95f5add1f8
C
mit
facebook/react-native,janicduplessis/react-native,janicduplessis/react-native,facebook/react-native,facebook/react-native,javache/react-native,facebook/react-native,facebook/react-native,javache/react-native,facebook/react-native,javache/react-native,janicduplessis/react-native,janicduplessis/react-native,javache/react-native,javache/react-native,javache/react-native,facebook/react-native,janicduplessis/react-native,javache/react-native,facebook/react-native,javache/react-native,facebook/react-native,janicduplessis/react-native,janicduplessis/react-native,javache/react-native,janicduplessis/react-native
0550c0c5192e009409d9a23f644419699c9eb500
libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-__syscall_rt_sigaction.c
libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-__syscall_rt_sigaction.c
/* * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com) * * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. */ #include <../../../../../../../libc/sysdeps/linux/arc/sigaction.c>
/* * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com) * * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. */ /* * ARC syscall ABI only has __NR_rt_sigaction, thus vanilla sigaction does * some SA_RESTORER tricks before calling __syscall_rt_sigaction. * However including that file here causes a redefinition of __libc_sigaction * in static links involving pthreads */ //#include <../../../../../../../libc/sysdeps/linux/arc/sigaction.c>
Fix __libc_sigaction redefinition with static links
ARC/NPTL: Fix __libc_sigaction redefinition with static links Signed-off-by: Vineet Gupta <af669d95a4c0de051445d4cafdbb2c5c4a2838be@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <ce1ac9e9ad16abccd7821f371ad381197b4768ac@gmail.com>
C
lgpl-2.1
majek/uclibc-vx32,brgl/uclibc-ng,kraj/uClibc,kraj/uclibc-ng,majek/uclibc-vx32,kraj/uclibc-ng,foss-for-synopsys-dwc-arc-processors/uClibc,kraj/uClibc,wbx-github/uclibc-ng,wbx-github/uclibc-ng,brgl/uclibc-ng,wbx-github/uclibc-ng,kraj/uclibc-ng,kraj/uClibc,kraj/uclibc-ng,majek/uclibc-vx32,foss-for-synopsys-dwc-arc-processors/uClibc,majek/uclibc-vx32,wbx-github/uclibc-ng,foss-for-synopsys-dwc-arc-processors/uClibc,kraj/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,brgl/uclibc-ng,brgl/uclibc-ng
4e874c8a3ec1d524e5ab0df04994fb25243e9c72
source/crate_demo/graphics_manager.h
source/crate_demo/graphics_manager.h
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #ifndef CRATE_DEMO_GRAPHICS_MANAGER_H #define CRATE_DEMO_GRAPHICS_MANAGER_H #include "common/graphics_manager_base.h" #include <d3d11.h> #include "DirectXMath.h" namespace CrateDemo { class GameStateManager; struct Vertex { DirectX::XMFLOAT3 pos; DirectX::XMFLOAT4 color; }; class GraphicsManager : public Common::GraphicsManagerBase { public: GraphicsManager(GameStateManager *gameStateManager); private: GameStateManager *m_gameStateManager; ID3D11RenderTargetView *m_renderTargetView; public: bool Initialize(int clientWidth, int clientHeight, HWND hwnd); void Shutdown(); void DrawFrame(); void OnResize(int newClientWidth, int newClientHeight); void GamePaused(); void GameUnpaused(); }; } // End of namespace CrateDemo #endif
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #ifndef CRATE_DEMO_GRAPHICS_MANAGER_H #define CRATE_DEMO_GRAPHICS_MANAGER_H #include "common/graphics_manager_base.h" #include <d3d11.h> #include "DirectXMath.h" namespace CrateDemo { class GameStateManager; struct Vertex { DirectX::XMFLOAT3 pos; DirectX::XMFLOAT4 color; }; struct MatrixBufferType { DirectX::XMMATRIX world; DirectX::XMMATRIX view; DirectX::XMMATRIX projection; }; class GraphicsManager : public Common::GraphicsManagerBase { public: GraphicsManager(GameStateManager *gameStateManager); private: GameStateManager *m_gameStateManager; ID3D11RenderTargetView *m_renderTargetView; public: bool Initialize(int clientWidth, int clientHeight, HWND hwnd); void Shutdown(); void DrawFrame(); void OnResize(int newClientWidth, int newClientHeight); void GamePaused(); void GameUnpaused(); }; } // End of namespace CrateDemo #endif
Create MatrixBufferType struct to hold current world, view, and projection matricies
CRATE_DEMO: Create MatrixBufferType struct to hold current world, view, and projection matricies
C
apache-2.0
RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject
c9c2c1696c1655ab178908e9f534d6c60da09539
SVPullToRefresh/SVPullToRefresh.h
SVPullToRefresh/SVPullToRefresh.h
// // SVPullToRefresh.h // SVPullToRefreshDemo // // Created by Sam Vermette on 23.04.12. // Copyright (c) 2012 samvermette.com. All rights reserved. // // https://github.com/samvermette/SVPullToRefresh // // this header file is provided for backwards compatibility and will be removed in the future // here's how you should import SVPullToRefresh now: #import "UIScrollView+SVPullToRefresh.h" #import "UIScrollView+SVInfiniteScrolling.h"
// // SVPullToRefresh.h // SVPullToRefreshDemo // // Created by Sam Vermette on 23.04.12. // Copyright (c) 2012 samvermette.com. All rights reserved. // // https://github.com/samvermette/SVPullToRefresh // // this header file is provided for backwards compatibility and will be removed in the future // here's how you should import SVPullToRefresh now: #import "UIScrollView+SVPullToRefresh.h" #import "UIScrollView+SVInfiniteScrolling.h" #import "SVPullToRefreshLoadingView.h" #import "SVInfiniteScrollingLoadingView.h"
Add loading view to SVPUllToRefresh header
Add loading view to SVPUllToRefresh header
C
mit
csutanyu/SVPullToRefresh
47f6c0599c0ba656c6e038c2259c09ae84d28483
drudge/canonpy.h
drudge/canonpy.h
/* vim: set filetype=cpp: */ /** Header file for canonpy. * * Currently it merely contains the definition of the object structure of the * classes defined in canonpy. They are put here in case a C API is intended * to be added for canonpy. */ #ifndef DRUDGE_CANONPY_H #define DRUDGE_CANONPY_H #include <Python.h> #include <libcanon/perm.h> using libcanon::Simple_perm; // // Permutation type // ---------------- // /** Object type for canonpy Perm objects. */ // clang-format off typedef struct { PyObject_HEAD Simple_perm perm; } Perm_object; // clang-format on #endif
/* vim: set filetype=cpp: */ /** Header file for canonpy. * * Currently it merely contains the definition of the object structure of the * classes defined in canonpy. They are put here in case a C API is intended * to be added for canonpy. */ #ifndef DRUDGE_CANONPY_H #define DRUDGE_CANONPY_H #include <Python.h> #include <memory> #include <libcanon/perm.h> #include <libcanon/sims.h> using libcanon::Simple_perm; using libcanon::Sims_transv; // // Permutation type // ---------------- // /** Object type for canonpy Perm objects. */ // clang-format off typedef struct { PyObject_HEAD Simple_perm perm; } Perm_object; // clang-format on // // Permutation group type // ---------------------- // // clang-format off typedef struct { PyObject_HEAD std::unique_ptr<Sims_transv<Simple_perm>> transv; } Group_object; // clang-format on #endif
Add object type for permutation groups
Add object type for permutation groups Inside a permutation group, the Sims transversal system is going to be stored.
C
mit
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
481aeecd9bf2e239c3fa911286bece5143246311
lottie-ios/Classes/PublicHeaders/Lottie.h
lottie-ios/Classes/PublicHeaders/Lottie.h
// // Lottie.h // Pods // // Created by brandon_withrow on 1/27/17. // // #if __has_feature(modules) @import Foundation; #else #import <Foundation/Foundation.h> #endif #ifndef Lottie_h #define Lottie_h //! Project version number for Lottie. FOUNDATION_EXPORT double LottieVersionNumber; //! Project version string for Lottie. FOUNDATION_EXPORT const unsigned char LottieVersionString[]; #import "LOTAnimationTransitionController.h" #import "LOTAnimationView.h" #endif /* Lottie_h */
// // Lottie.h // Pods // // Created by brandon_withrow on 1/27/17. // // #if __has_feature(modules) @import Foundation; #else #import <Foundation/Foundation.h> #endif #ifndef Lottie_h #define Lottie_h //! Project version number for Lottie. FOUNDATION_EXPORT double LottieVersionNumber; //! Project version string for Lottie. FOUNDATION_EXPORT const unsigned char LottieVersionString[]; #include <TargetConditionals.h> #if TARGET_OS_IPHONE #import "LOTAnimationTransitionController.h" #endif #import "LOTAnimationView.h" #endif /* Lottie_h */
Fix public header for macOS
Fix public header for macOS
C
apache-2.0
airbnb/lottie-ios,airbnb/lottie-ios,airbnb/lottie-ios
e845dd43efb19a6af37ab2dbf1cbd119022ff885
hard_way/ex13.c
hard_way/ex13.c
#include <stdio.h> int main(int argc, char *argv[]){ if(argc != 2){ printf("You must supply one argument!\n"); //this is how you abort a program. return 1; } return 0; }
#include <stdio.h> int main(int argc, char *argv[]){ if(argc != 2){ printf("You must supply one argument!\n"); //this is how you abort a program. return 1; } int i = 0; for(i = 0; argv[1][i] != '\0'; i++){ char letter = argv[1][i]; switch(letter){ case 'a': case 'A': printf("%d: 'A'\n",i); break; case 'e': case 'E': printf("%d: 'E'\n",i); break; case 'i': case 'I': printf("%d: 'I'\n",i); break; case 'o': case 'O': printf("%d: 'O'\n",i); break; case 'u': case 'U': printf("%d: 'U'\n",i); break; default: printf("%d:%c is not a vowel.\n",i,letter); } } return 0; }
Switch on vowels in argument
Switch on vowels in argument
C
mit
thewazir/learning_c
45f9522a638516520d39822f25c52d21c96b2923
ports/mimxrt10xx/boards/imxrt1060_evk/mpconfigboard.h
ports/mimxrt10xx/boards/imxrt1060_evk/mpconfigboard.h
#define MICROPY_HW_BOARD_NAME "iMX RT 1060 EVK" #define MICROPY_HW_MCU_NAME "IMXRT1062DVJ6A" // If you change this, then make sure to update the linker scripts as well to // make sure you don't overwrite code #define CIRCUITPY_INTERNAL_NVM_SIZE 0 #define BOARD_FLASH_SIZE (8 * 1024 * 1024) #define MICROPY_HW_LED_STATUS (&pin_GPIO_AD_B0_09) #define DEFAULT_I2C_BUS_SCL (&pin_GPIO_AD_B1_00) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO_AD_B1_01) #define DEFAULT_UART_BUS_RX (&pin_GPIO_AD_B1_07) #define DEFAULT_UART_BUS_TX (&pin_GPIO_AD_B1_06) #define CIRCUITPY_DEBUG_UART_TX (&pin_GPIO_AD_B0_12) #define CIRCUITPY_DEBUG_UART_RX (&pin_GPIO_AD_B0_13) // Put host on the first USB so that right angle OTG adapters can fit. This is // the right port when looking at the board. #define CIRCUITPY_USB_DEVICE_INSTANCE 1 #define CIRCUITPY_USB_HOST_INSTANCE 0
#define MICROPY_HW_BOARD_NAME "iMX RT 1060 EVK" #define MICROPY_HW_MCU_NAME "IMXRT1062DVJ6A" // If you change this, then make sure to update the linker scripts as well to // make sure you don't overwrite code #define CIRCUITPY_INTERNAL_NVM_SIZE 0 #define BOARD_FLASH_SIZE (8 * 1024 * 1024) #define MICROPY_HW_LED_STATUS (&pin_GPIO_AD_B0_09) #define MICROPY_HW_LED_STATUS_INVERTED (1) #define DEFAULT_I2C_BUS_SCL (&pin_GPIO_AD_B1_00) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO_AD_B1_01) #define DEFAULT_UART_BUS_RX (&pin_GPIO_AD_B1_07) #define DEFAULT_UART_BUS_TX (&pin_GPIO_AD_B1_06) #define CIRCUITPY_DEBUG_UART_TX (&pin_GPIO_AD_B0_12) #define CIRCUITPY_DEBUG_UART_RX (&pin_GPIO_AD_B0_13) // Put host on the first USB so that right angle OTG adapters can fit. This is // the right port when looking at the board. #define CIRCUITPY_USB_DEVICE_INSTANCE 1 #define CIRCUITPY_USB_HOST_INSTANCE 0
Fix EVK status led to be inverted
Fix EVK status led to be inverted
C
mit
adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython
4655534302e6a3601c77eae70cc65b202609ab66
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 78 #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 79 #endif
Update Skia milestone to 79
Update Skia milestone to 79 Change-Id: I248831c58b3c01d356942cd0de61447292720ccb Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239446 Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com> Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com> Auto-Submit: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
C
bsd-3-clause
HalCanary/skia-hc,google/skia,google/skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia
00f7b82571bef17086f65cd6c2f827c565eff40e
experiments.h
experiments.h
/* * Copyright (c) 2013 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. */ #ifndef WEBRTC_EXPERIMENTS_H_ #define WEBRTC_EXPERIMENTS_H_ #include "webrtc/typedefs.h" namespace webrtc { struct RemoteBitrateEstimatorMinRate { RemoteBitrateEstimatorMinRate() : min_rate(30000) {} RemoteBitrateEstimatorMinRate(uint32_t min_rate) : min_rate(min_rate) {} uint32_t min_rate; }; struct SkipEncodingUnusedStreams { SkipEncodingUnusedStreams() : enabled(false) {} explicit SkipEncodingUnusedStreams(bool set_enabled) : enabled(set_enabled) {} virtual ~SkipEncodingUnusedStreams() {} const bool enabled; }; struct AimdRemoteRateControl { AimdRemoteRateControl() : enabled(false) {} explicit AimdRemoteRateControl(bool set_enabled) : enabled(set_enabled) {} virtual ~AimdRemoteRateControl() {} const bool enabled; }; } // namespace webrtc #endif // WEBRTC_EXPERIMENTS_H_
/* * Copyright (c) 2013 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. */ #ifndef WEBRTC_EXPERIMENTS_H_ #define WEBRTC_EXPERIMENTS_H_ #include "webrtc/typedefs.h" namespace webrtc { struct RemoteBitrateEstimatorMinRate { RemoteBitrateEstimatorMinRate() : min_rate(30000) {} RemoteBitrateEstimatorMinRate(uint32_t min_rate) : min_rate(min_rate) {} uint32_t min_rate; }; struct AimdRemoteRateControl { AimdRemoteRateControl() : enabled(false) {} explicit AimdRemoteRateControl(bool set_enabled) : enabled(set_enabled) {} virtual ~AimdRemoteRateControl() {} const bool enabled; }; } // namespace webrtc #endif // WEBRTC_EXPERIMENTS_H_
Remove no longer used SkipEncodingUnusedStreams.
Remove no longer used SkipEncodingUnusedStreams. R=andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/18829004 git-svn-id: 03ae4fbe531b1eefc9d815f31e49022782c42458@6753 4adac7df-926f-26a2-2b94-8c16560cd09d
C
bsd-3-clause
Alkalyne/webrtctrunk,xin3liang/platform_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,bpsinc-native/src_third_party_webrtc,svn2github/webrtc-Revision-8758,jgcaaprom/android_external_chromium_org_third_party_webrtc,xin3liang/platform_external_chromium_org_third_party_webrtc,PersonifyInc/chromium_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,bpsinc-native/src_third_party_webrtc,jchavanton/webrtc,sippet/webrtc,aleonliao/webrtc-trunk,Alkalyne/webrtctrunk,android-ia/platform_external_chromium_org_third_party_webrtc,bpsinc-native/src_third_party_webrtc,jchavanton/webrtc,bpsinc-native/src_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,krieger-od/webrtc,bpsinc-native/src_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,krieger-od/nwjs_chromium_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,aleonliao/webrtc-trunk,sippet/webrtc,aleonliao/webrtc-trunk,krieger-od/nwjs_chromium_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,Alkalyne/webrtctrunk,PersonifyInc/chromium_webrtc,Alkalyne/webrtctrunk,MIPS/external-chromium_org-third_party-webrtc,MIPS/external-chromium_org-third_party-webrtc,Omegaphora/external_chromium_org_third_party_webrtc,bpsinc-native/src_third_party_webrtc,aleonliao/webrtc-trunk,sippet/webrtc,MIPS/external-chromium_org-third_party-webrtc,MIPS/external-chromium_org-third_party-webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,sippet/webrtc,Omegaphora/external_chromium_org_third_party_webrtc,jchavanton/webrtc,aleonliao/webrtc-trunk,android-ia/platform_external_chromium_org_third_party_webrtc,xin3liang/platform_external_chromium_org_third_party_webrtc,Alkalyne/webrtctrunk,android-ia/platform_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,xin3liang/platform_external_chromium_org_third_party_webrtc,krieger-od/nwjs_chromium_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,jchavanton/webrtc,krieger-od/webrtc,svn2github/webrtc-Revision-8758,bpsinc-native/src_third_party_webrtc,svn2github/webrtc-Revision-8758,xin3liang/platform_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,Alkalyne/webrtctrunk,krieger-od/webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,PersonifyInc/chromium_webrtc,xin3liang/platform_external_chromium_org_third_party_webrtc,krieger-od/nwjs_chromium_webrtc,MIPS/external-chromium_org-third_party-webrtc,svn2github/webrtc-Revision-8758,krieger-od/webrtc,krieger-od/webrtc,svn2github/webrtc-Revision-8758,Omegaphora/external_chromium_org_third_party_webrtc,Alkalyne/webrtctrunk,MIPS/external-chromium_org-third_party-webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,xin3liang/platform_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,Alkalyne/webrtctrunk,krieger-od/nwjs_chromium_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,jchavanton/webrtc,jchavanton/webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,PersonifyInc/chromium_webrtc,krieger-od/nwjs_chromium_webrtc,aleonliao/webrtc-trunk,sippet/webrtc,sippet/webrtc,PersonifyInc/chromium_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,svn2github/webrtc-Revision-8758,PersonifyInc/chromium_webrtc,krieger-od/webrtc,Omegaphora/external_chromium_org_third_party_webrtc,jchavanton/webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,bpsinc-native/src_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc
47102b35d644a8c5a1343f9ec05c29b5d1e0e1b0
plat/arm/common/aarch64/arm_pauth.c
plat/arm/common/aarch64/arm_pauth.c
/* * Copyright (c) 2019, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <cdefs.h> #include <stdint.h> /* * Instruction pointer authentication key A. The low 64-bit are at [0], and the * high bits at [1]. They are run-time constants so they are placed in the * rodata section. They are written before MMU is turned on and the permissions * are effective. */ uint64_t plat_apiakey[2] __section("rodata.apiakey"); /* * This is only a toy implementation to generate a seemingly random 128-bit key * from sp and x30 values. A production system must re-implement this function * to generate keys from a reliable randomness source. */ uint64_t *plat_init_apiakey(void) { uintptr_t return_addr = (uintptr_t)__builtin_return_address(0U); uintptr_t frame_addr = (uintptr_t)__builtin_frame_address(0U); plat_apiakey[0] = (return_addr << 13) ^ frame_addr; plat_apiakey[1] = (frame_addr << 15) ^ return_addr; return plat_apiakey; }
/* * Copyright (c) 2019, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <cdefs.h> #include <stdint.h> /* * Instruction pointer authentication key A. The low 64-bit are at [0], and the * high bits at [1]. */ uint64_t plat_apiakey[2]; /* * This is only a toy implementation to generate a seemingly random 128-bit key * from sp and x30 values. A production system must re-implement this function * to generate keys from a reliable randomness source. */ uint64_t *plat_init_apiakey(void) { uintptr_t return_addr = (uintptr_t)__builtin_return_address(0U); uintptr_t frame_addr = (uintptr_t)__builtin_frame_address(0U); plat_apiakey[0] = (return_addr << 13) ^ frame_addr; plat_apiakey[1] = (frame_addr << 15) ^ return_addr; return plat_apiakey; }
Put Pointer Authentication key value in BSS section
Put Pointer Authentication key value in BSS section The dummy implementation of the plat_init_apiakey() platform API uses an internal 128-bit buffer to store the initial key value used for Pointer Authentication support. The intent - as stated in the file comments - was for this buffer to be write-protected by the MMU. Initialization of the buffer would be performed before enabling the MMU, thus bypassing write protection checks. However, the key buffer ended up into its own read-write section by mistake due to a typo on the section name ('rodata.apiakey' instead of '.rodata.apiakey', note the leading dot). As a result, the linker script was not pulling it into the .rodata output section. One way to address this issue could have been to fix the section name. However, this approach does not work well for BL1. Being the first image in the boot flow, it typically is sitting in real ROM so we don't have the capacity to update the key buffer at any time. The dummy implementation of plat_init_apiakey() provided at the moment is just there to demonstrate the Pointer Authentication feature in action. Proper key management and key generation would have to be a lot more careful on a production system. Therefore, the approach chosen here to leave the key buffer in writable memory but move it to the BSS section. This does mean that the key buffer could be maliciously updated for intalling unintended keys on the warm boot path but at the feature is only at an experimental stage right now, this is deemed acceptable. Change-Id: I121ccf35fe7bc86c73275a4586b32d4bc14698d6 Signed-off-by: Sandrine Bailleux <4b69fcfca8da45b0c11ecda5434c5da526575d9d@arm.com>
C
bsd-3-clause
achingupta/arm-trusted-firmware,achingupta/arm-trusted-firmware
e989038c00cc0ef3885ed1cdcddbbbb0d87362a0
lib/haka/stat.c
lib/haka/stat.c
#include <stdio.h> #include <stdarg.h> #include <haka/stat.h> #include <haka/types.h> bool stat_printf(FILE *out, const char *format, ...) { va_list args; va_start(args, format); vfprintf(out, format, args); va_end(args); return true; } size_t format_bytes(size_t v, char *c) { if (v > (1 << 30)) { *c = 'g'; return (v / (1 << 30)); } else if (v > (1 << 20)) { *c = 'm'; return (v / (1 << 20)); } else if (v > (1 << 10)) { *c = 'k'; return (v / (1 << 10)); } else { *c = ' '; return v; } }
#include <stdio.h> #include <stdarg.h> #include <haka/stat.h> #include <haka/types.h> bool stat_printf(FILE *out, const char *format, ...) { va_list args; va_start(args, format); vfprintf(out, format, args); va_end(args); return true; } size_t format_bytes(size_t v, char *c) { if (v > (1 << 30)) { *c = 'G'; return (v / (1 << 30)); } else if (v > (1 << 20)) { *c = 'M'; return (v / (1 << 20)); } else if (v > (1 << 10)) { *c = 'k'; return (v / (1 << 10)); } else { *c = ' '; return v; } }
Use standard notations for mega (M) and giga (G)
Use standard notations for mega (M) and giga (G)
C
mpl-2.0
LubyRuffy/haka,nabilbendafi/haka,Wingless-Archangel/haka,haka-security/haka,nabilbendafi/haka,haka-security/haka,Wingless-Archangel/haka,lcheylus/haka,LubyRuffy/haka,haka-security/haka,lcheylus/haka,nabilbendafi/haka,lcheylus/haka
5ac905c512d06fdbd443374f5f9fafef10bef0e1
test/CodeGen/debug-info-abspath.c
test/CodeGen/debug-info-abspath.c
// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \ // RUN: %s -emit-llvm -o - | FileCheck %s // RUN: cp %s %t.c // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \ // RUN: %t.c -emit-llvm -o - | FileCheck %s --check-prefix=INTREE void foo() {} // Since %s is an absolute path, directory should be a nonempty // prefix, but the CodeGen part should be part of the filename. // CHECK: DIFile(filename: "{{.*}}CodeGen{{.*}}debug-info-abspath.c" // CHECK-SAME: directory: "{{.+}}") // INTREE: DIFile({{.*}}directory: "{{.+}}CodeGen{{.*}}")
// RUN: mkdir -p %t/UNIQUEISH_SENTINEL // RUN: cp %s %t/UNIQUEISH_SENTINEL/debug-info-abspath.c // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \ // RUN: %t/UNIQUEISH_SENTINEL/debug-info-abspath.c -emit-llvm -o - \ // RUN: | FileCheck %s // RUN: cp %s %t.c // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \ // RUN: %t.c -emit-llvm -o - | FileCheck %s --check-prefix=INTREE void foo() {} // Since %s is an absolute path, directory should be the common // prefix, but the directory part should be part of the filename. // CHECK: DIFile(filename: "{{.*}}UNIQUEISH_SENTINEL{{.*}}debug-info-abspath.c" // CHECK-NOT: directory: "{{.*}}UNIQUEISH_SENTINEL // INTREE: DIFile({{.*}}directory: "{{.+}}CodeGen{{.*}}")
Make testcase more robust for completely-out-of-tree builds.
Make testcase more robust for completely-out-of-tree builds. Thats to Dave Zarzycki for reprorting this! git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@348612 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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
71fff3ac1cd1349b8cba13114ac6025d8e6eca73
tests/libfixmath_unittests/main.c
tests/libfixmath_unittests/main.c
/* * Copyright (C) 2014 René Kijewski <rene.kijewski@fu-berlin.de> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * @ingroup tests * @{ * * @file * @brief execute libfixmath's unittests in RIOT * * @author René Kijewski <rene.kijewski@fu-berlin.de> * * @} */ int main(void) { #include "fix16_unittests.inc" return 0; }
/* * Copyright (C) 2014 René Kijewski <rene.kijewski@fu-berlin.de> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * @ingroup tests * @{ * * @file * @brief execute libfixmath's unittests in RIOT * * @author René Kijewski <rene.kijewski@fu-berlin.de> * * @} */ #include <stdio.h> int main(void) { #include "fix16_unittests.inc" puts("All tests executed."); return 0; }
Add message when tests are finished.
tests/libfixmath_unittests: Add message when tests are finished.
C
lgpl-2.1
gebart/RIOT,robixnai/RIOT,jbeyerstedt/RIOT-OTA-update,roberthartung/RIOT,asanka-code/RIOT,Lexandro92/RIOT-CoAP,rousselk/RIOT,arvindpdmn/RIOT,immesys/RiSyn,shady33/RIOT,attdona/RIOT,josephnoir/RIOT,wentaoshang/RIOT,immesys/RiSyn,msolters/RIOT,OTAkeys/RIOT,kb2ma/RIOT,authmillenon/RIOT,RBartz/RIOT,stevenj/RIOT,gbarnett/RIOT,bartfaizoltan/RIOT,TobiasFredersdorf/RIOT,wentaoshang/RIOT,robixnai/RIOT,asanka-code/RIOT,khhhh/RIOT,khhhh/RIOT,alex1818/RIOT,openkosmosorg/RIOT,alex1818/RIOT,rfuentess/RIOT,RubikonAlpha/RIOT,RBartz/RIOT,mtausig/RIOT,lazytech-org/RIOT,kbumsik/RIOT,gebart/RIOT,thomaseichinger/RIOT,avmelnikoff/RIOT,plushvoxel/RIOT,zhuoshuguo/RIOT,herrfz/RIOT,ThanhVic/RIOT,beurdouche/RIOT,OlegHahm/RIOT,lazytech-org/RIOT,ThanhVic/RIOT,ks156/RIOT,luciotorre/RIOT,ks156/RIOT,neumodisch/RIOT,MarkXYang/RIOT,FrancescoErmini/RIOT,dkm/RIOT,dhruvvyas90/RIOT,centurysys/RIOT,abkam07/RIOT,haoyangyu/RIOT,dailab/RIOT,toonst/RIOT,jasonatran/RIOT,altairpearl/RIOT,PSHIVANI/Riot-Code,haoyangyu/RIOT,rousselk/RIOT,beurdouche/RIOT,cladmi/RIOT,gbarnett/RIOT,kb2ma/RIOT,jasonatran/RIOT,openkosmosorg/RIOT,MarkXYang/RIOT,toonst/RIOT,malosek/RIOT,khhhh/RIOT,kerneltask/RIOT,rakendrathapa/RIOT,msolters/RIOT,OTAkeys/RIOT,x3ro/RIOT,jremmert-phytec-iot/RIOT,kaspar030/RIOT,Lexandro92/RIOT-CoAP,watr-li/RIOT,jbeyerstedt/RIOT-OTA-update,ntrtrung/RIOT,ntrtrung/RIOT,rakendrathapa/RIOT,backenklee/RIOT,msolters/RIOT,DipSwitch/RIOT,avmelnikoff/RIOT,alignan/RIOT,JensErdmann/RIOT,Hyungsin/RIOT-OS,mtausig/RIOT,dailab/RIOT,kerneltask/RIOT,avmelnikoff/RIOT,brettswann/RIOT,d00616/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,Lexandro92/RIOT-CoAP,OlegHahm/RIOT,lazytech-org/RIOT,dailab/RIOT,jfischer-phytec-iot/RIOT,zhuoshuguo/RIOT,MarkXYang/RIOT,immesys/RiSyn,jremmert-phytec-iot/RIOT,mtausig/RIOT,LudwigOrtmann/RIOT,latsku/RIOT,Osblouf/RIOT,jbeyerstedt/RIOT-OTA-update,attdona/RIOT,rakendrathapa/RIOT,ks156/RIOT,luciotorre/RIOT,backenklee/RIOT,basilfx/RIOT,ant9000/RIOT,alignan/RIOT,katezilla/RIOT,biboc/RIOT,hamilton-mote/RIOT-OS,LudwigOrtmann/RIOT,zhuoshuguo/RIOT,Yonezawa-T2/RIOT,RIOT-OS/RIOT,l3nko/RIOT,Hyungsin/RIOT-OS,Lexandro92/RIOT-CoAP,automote/RIOT,haoyangyu/RIOT,tfar/RIOT,abkam07/RIOT,shady33/RIOT,herrfz/RIOT,thiagohd/RIOT,alignan/RIOT,miri64/RIOT,wentaoshang/RIOT,kYc0o/RIOT,centurysys/RIOT,automote/RIOT,abkam07/RIOT,brettswann/RIOT,JensErdmann/RIOT,gautric/RIOT,openkosmosorg/RIOT,mfrey/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,wentaoshang/RIOT,toonst/RIOT,TobiasFredersdorf/RIOT,RubikonAlpha/RIOT,MonsterCode8000/RIOT,Ell-i/RIOT,jasonatran/RIOT,kaspar030/RIOT,bartfaizoltan/RIOT,RIOT-OS/RIOT,yogo1212/RIOT,altairpearl/RIOT,neiljay/RIOT,RBartz/RIOT,ant9000/RIOT,stevenj/RIOT,msolters/RIOT,malosek/RIOT,smlng/RIOT,Josar/RIOT,MohmadAyman/RIOT,herrfz/RIOT,katezilla/RIOT,msolters/RIOT,A-Paul/RIOT,dhruvvyas90/RIOT,centurysys/RIOT,robixnai/RIOT,tdautc19841202/RIOT,kYc0o/RIOT,arvindpdmn/RIOT,ntrtrung/RIOT,haoyangyu/RIOT,adrianghc/RIOT,daniel-k/RIOT,A-Paul/RIOT,binarylemon/RIOT,hamilton-mote/RIOT-OS,immesys/RiSyn,rajma996/RIOT,rakendrathapa/RIOT,jremmert-phytec-iot/RIOT,cladmi/RIOT,OlegHahm/RIOT,attdona/RIOT,DipSwitch/RIOT,OTAkeys/RIOT,openkosmosorg/RIOT,rfuentess/RIOT,basilfx/RIOT,basilfx/RIOT,MohmadAyman/RIOT,stevenj/RIOT,RIOT-OS/RIOT,hamilton-mote/RIOT-OS,roberthartung/RIOT,roberthartung/RIOT,brettswann/RIOT,tdautc19841202/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,neiljay/RIOT,Yonezawa-T2/RIOT,Yonezawa-T2/RIOT,jasonatran/RIOT,asanka-code/RIOT,thiagohd/RIOT,adjih/RIOT,OTAkeys/RIOT,Ell-i/RIOT,rajma996/RIOT,LudwigKnuepfer/RIOT,toonst/RIOT,rfuentess/RIOT,d00616/RIOT,rakendrathapa/RIOT,basilfx/RIOT,adrianghc/RIOT,Osblouf/RIOT,TobiasFredersdorf/RIOT,asanka-code/RIOT,BytesGalore/RIOT,kaleb-himes/RIOT,dhruvvyas90/RIOT,plushvoxel/RIOT,kaspar030/RIOT,dhruvvyas90/RIOT,kbumsik/RIOT,daniel-k/RIOT,PSHIVANI/Riot-Code,thiagohd/RIOT,attdona/RIOT,MohmadAyman/RIOT,EmuxEvans/RIOT,brettswann/RIOT,roberthartung/RIOT,FrancescoErmini/RIOT,robixnai/RIOT,MarkXYang/RIOT,neumodisch/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,brettswann/RIOT,MohmadAyman/RIOT,katezilla/RIOT,kaspar030/RIOT,zhuoshuguo/RIOT,katezilla/RIOT,rousselk/RIOT,EmuxEvans/RIOT,latsku/RIOT,adrianghc/RIOT,RIOT-OS/RIOT,herrfz/RIOT,authmillenon/RIOT,tdautc19841202/RIOT,Darredevil/RIOT,backenklee/RIOT,malosek/RIOT,thomaseichinger/RIOT,Osblouf/RIOT,Ell-i/RIOT,Hyungsin/RIOT-OS,gautric/RIOT,immesys/RiSyn,mziegert/RIOT,roberthartung/RIOT,yogo1212/RIOT,patkan/RIOT,authmillenon/RIOT,PSHIVANI/Riot-Code,mziegert/RIOT,syin2/RIOT,adjih/RIOT,robixnai/RIOT,herrfz/RIOT,patkan/RIOT,neumodisch/RIOT,LudwigOrtmann/RIOT,daniel-k/RIOT,LudwigKnuepfer/RIOT,plushvoxel/RIOT,jfischer-phytec-iot/RIOT,ks156/RIOT,PSHIVANI/Riot-Code,avmelnikoff/RIOT,aeneby/RIOT,patkan/RIOT,kb2ma/RIOT,JensErdmann/RIOT,mziegert/RIOT,neumodisch/RIOT,patkan/RIOT,LudwigOrtmann/RIOT,jremmert-phytec-iot/RIOT,thomaseichinger/RIOT,centurysys/RIOT,thiagohd/RIOT,lebrush/RIOT,alex1818/RIOT,jfischer-phytec-iot/RIOT,watr-li/RIOT,shady33/RIOT,malosek/RIOT,kaspar030/RIOT,jremmert-phytec-iot/RIOT,khhhh/RIOT,arvindpdmn/RIOT,openkosmosorg/RIOT,rousselk/RIOT,watr-li/RIOT,DipSwitch/RIOT,jfischer-phytec-iot/RIOT,cladmi/RIOT,marcosalm/RIOT,josephnoir/RIOT,gebart/RIOT,openkosmosorg/RIOT,PSHIVANI/Riot-Code,kYc0o/RIOT,luciotorre/RIOT,ThanhVic/RIOT,Yonezawa-T2/RIOT,MonsterCode8000/RIOT,patkan/RIOT,asanka-code/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,RBartz/RIOT,kaleb-himes/RIOT,kb2ma/RIOT,alignan/RIOT,adjih/RIOT,mfrey/RIOT,dhruvvyas90/RIOT,tdautc19841202/RIOT,BytesGalore/RIOT,altairpearl/RIOT,Josar/RIOT,RBartz/RIOT,A-Paul/RIOT,beurdouche/RIOT,syin2/RIOT,miri64/RIOT,haoyangyu/RIOT,shady33/RIOT,binarylemon/RIOT,msolters/RIOT,lazytech-org/RIOT,wentaoshang/RIOT,PSHIVANI/Riot-Code,BytesGalore/RIOT,OlegHahm/RIOT,luciotorre/RIOT,Lexandro92/RIOT-CoAP,marcosalm/RIOT,bartfaizoltan/RIOT,watr-li/RIOT,cladmi/RIOT,BytesGalore/RIOT,abp719/RIOT,Osblouf/RIOT,zhuoshuguo/RIOT,MohmadAyman/RIOT,LudwigOrtmann/RIOT,lebrush/RIOT,asanka-code/RIOT,smlng/RIOT,daniel-k/RIOT,yogo1212/RIOT,josephnoir/RIOT,josephnoir/RIOT,tfar/RIOT,jfischer-phytec-iot/RIOT,altairpearl/RIOT,ThanhVic/RIOT,biboc/RIOT,alignan/RIOT,neiljay/RIOT,thomaseichinger/RIOT,thomaseichinger/RIOT,Darredevil/RIOT,Darredevil/RIOT,smlng/RIOT,neumodisch/RIOT,TobiasFredersdorf/RIOT,watr-li/RIOT,luciotorre/RIOT,beurdouche/RIOT,yogo1212/RIOT,ntrtrung/RIOT,avmelnikoff/RIOT,FrancescoErmini/RIOT,miri64/RIOT,Josar/RIOT,BytesGalore/RIOT,gbarnett/RIOT,OTAkeys/RIOT,smlng/RIOT,gautric/RIOT,latsku/RIOT,lebrush/RIOT,jasonatran/RIOT,alex1818/RIOT,RubikonAlpha/RIOT,ThanhVic/RIOT,x3ro/RIOT,aeneby/RIOT,dkm/RIOT,daniel-k/RIOT,Hyungsin/RIOT-OS,JensErdmann/RIOT,l3nko/RIOT,robixnai/RIOT,centurysys/RIOT,daniel-k/RIOT,marcosalm/RIOT,authmillenon/RIOT,Osblouf/RIOT,adrianghc/RIOT,luciotorre/RIOT,dailab/RIOT,centurysys/RIOT,aeneby/RIOT,lebrush/RIOT,abkam07/RIOT,MohmadAyman/RIOT,d00616/RIOT,Darredevil/RIOT,bartfaizoltan/RIOT,jbeyerstedt/RIOT-OTA-update,yogo1212/RIOT,tfar/RIOT,syin2/RIOT,rajma996/RIOT,thiagohd/RIOT,OlegHahm/RIOT,A-Paul/RIOT,mtausig/RIOT,abp719/RIOT,gautric/RIOT,Josar/RIOT,Yonezawa-T2/RIOT,DipSwitch/RIOT,RIOT-OS/RIOT,JensErdmann/RIOT,tfar/RIOT,arvindpdmn/RIOT,Lexandro92/RIOT-CoAP,marcosalm/RIOT,adrianghc/RIOT,thiagohd/RIOT,RubikonAlpha/RIOT,FrancescoErmini/RIOT,bartfaizoltan/RIOT,patkan/RIOT,zhuoshuguo/RIOT,ant9000/RIOT,rajma996/RIOT,automote/RIOT,gbarnett/RIOT,kbumsik/RIOT,ntrtrung/RIOT,binarylemon/RIOT,automote/RIOT,backenklee/RIOT,alex1818/RIOT,gebart/RIOT,biboc/RIOT,attdona/RIOT,backenklee/RIOT,brettswann/RIOT,smlng/RIOT,immesys/RiSyn,rousselk/RIOT,d00616/RIOT,dkm/RIOT,abkam07/RIOT,jremmert-phytec-iot/RIOT,x3ro/RIOT,beurdouche/RIOT,mfrey/RIOT,neiljay/RIOT,gebart/RIOT,MarkXYang/RIOT,aeneby/RIOT,MonsterCode8000/RIOT,plushvoxel/RIOT,hamilton-mote/RIOT-OS,gbarnett/RIOT,mfrey/RIOT,latsku/RIOT,kerneltask/RIOT,x3ro/RIOT,LudwigKnuepfer/RIOT,MarkXYang/RIOT,lazytech-org/RIOT,adjih/RIOT,miri64/RIOT,dailab/RIOT,d00616/RIOT,kerneltask/RIOT,kbumsik/RIOT,ThanhVic/RIOT,A-Paul/RIOT,rajma996/RIOT,Hyungsin/RIOT-OS,stevenj/RIOT,altairpearl/RIOT,kYc0o/RIOT,yogo1212/RIOT,DipSwitch/RIOT,hamilton-mote/RIOT-OS,RBartz/RIOT,toonst/RIOT,authmillenon/RIOT,mtausig/RIOT,kaleb-himes/RIOT,gautric/RIOT,EmuxEvans/RIOT,wentaoshang/RIOT,marcosalm/RIOT,basilfx/RIOT,gbarnett/RIOT,shady33/RIOT,lebrush/RIOT,binarylemon/RIOT,Darredevil/RIOT,altairpearl/RIOT,syin2/RIOT,automote/RIOT,rajma996/RIOT,stevenj/RIOT,rfuentess/RIOT,dhruvvyas90/RIOT,alex1818/RIOT,LudwigKnuepfer/RIOT,EmuxEvans/RIOT,x3ro/RIOT,Ell-i/RIOT,tdautc19841202/RIOT,rakendrathapa/RIOT,jbeyerstedt/RIOT-OTA-update,miri64/RIOT,FrancescoErmini/RIOT,RubikonAlpha/RIOT,neumodisch/RIOT,abp719/RIOT,herrfz/RIOT,l3nko/RIOT,LudwigOrtmann/RIOT,haoyangyu/RIOT,ant9000/RIOT,authmillenon/RIOT,l3nko/RIOT,watr-li/RIOT,kerneltask/RIOT,JensErdmann/RIOT,kb2ma/RIOT,mfrey/RIOT,dkm/RIOT,mziegert/RIOT,ant9000/RIOT,mziegert/RIOT,FrancescoErmini/RIOT,rfuentess/RIOT,biboc/RIOT,latsku/RIOT,LudwigKnuepfer/RIOT,TobiasFredersdorf/RIOT,Osblouf/RIOT,Ell-i/RIOT,syin2/RIOT,kbumsik/RIOT,josephnoir/RIOT,abp719/RIOT,rousselk/RIOT,khhhh/RIOT,plushvoxel/RIOT,kaleb-himes/RIOT,abkam07/RIOT,neiljay/RIOT,latsku/RIOT,l3nko/RIOT,ks156/RIOT,abp719/RIOT,ntrtrung/RIOT,mziegert/RIOT,automote/RIOT,kYc0o/RIOT,biboc/RIOT,d00616/RIOT,binarylemon/RIOT,khhhh/RIOT,RubikonAlpha/RIOT,lebrush/RIOT,MonsterCode8000/RIOT,shady33/RIOT,EmuxEvans/RIOT,tdautc19841202/RIOT,tfar/RIOT,MonsterCode8000/RIOT,arvindpdmn/RIOT,Josar/RIOT,attdona/RIOT,bartfaizoltan/RIOT,marcosalm/RIOT,kaleb-himes/RIOT,abp719/RIOT,Yonezawa-T2/RIOT,adjih/RIOT,DipSwitch/RIOT,katezilla/RIOT,Darredevil/RIOT,aeneby/RIOT,dkm/RIOT,malosek/RIOT,binarylemon/RIOT,l3nko/RIOT,cladmi/RIOT,malosek/RIOT,arvindpdmn/RIOT,MonsterCode8000/RIOT,stevenj/RIOT,EmuxEvans/RIOT
e6dedf514f1b16cffd6f17c9615fc65745ed2a47
MdePkg/Include/Library/PeiServicesTablePointerLib.h
MdePkg/Include/Library/PeiServicesTablePointerLib.h
/** @file PEI Services Table Pointer Library services Copyright (c) 2006, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #ifndef __PEI_SERVICES_TABLE_POINTER_LIB_H__ #define __PEI_SERVICES_TABLE_POINTER_LIB_H__ /** The function returns the pointer to PEI services. The function returns the pointer to PEI services. It will ASSERT() if the pointer to PEI services is NULL. @retval The pointer to PeiServices. **/ EFI_PEI_SERVICES ** EFIAPI GetPeiServicesTablePointer ( VOID ); /** The function set the pointer of PEI services immediately preceding the IDT table according to PI specification. @param PeiServicesTablePointer The address of PeiServices pointer. **/ VOID EFIAPI SetPeiServicesTablePointer ( EFI_PEI_SERVICES ** PeiServicesTablePointer ); /** After memory initialization in PEI phase, the IDT table in temporary memory should be migrated to memory, and the address of PeiServicesPointer also need to be updated immediately preceding the new IDT table. @param PeiServices The address of PeiServices pointer. **/ VOID EFIAPI MigrateIdtTable ( IN EFI_PEI_SERVICES **PeiServices ); #endif
/** @file PEI Services Table Pointer Library services Copyright (c) 2006, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #ifndef __PEI_SERVICES_TABLE_POINTER_LIB_H__ #define __PEI_SERVICES_TABLE_POINTER_LIB_H__ /** The function returns the pointer to PEI services. The function returns the pointer to PEI services. It will ASSERT() if the pointer to PEI services is NULL. @retval The pointer to PeiServices. **/ EFI_PEI_SERVICES ** EFIAPI GetPeiServicesTablePointer ( VOID ); /** The function set the pointer of PEI services immediately preceding the IDT table according to PI specification. @param PeiServicesTablePointer The address of PeiServices pointer. **/ VOID EFIAPI SetPeiServicesTablePointer ( EFI_PEI_SERVICES ** PeiServicesTablePointer ); #endif
Remove MigrateIDT interface from PeiServiceTableLib library class.
Remove MigrateIDT interface from PeiServiceTableLib library class. git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@5791 6f19259b-4bc3-4df7-8a09-765794883524
C
bsd-2-clause
MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2
ae056d53cc1566fdf3edd09d7e2612ae551c2a27
source/tools/IAudioSinkCallback.h
source/tools/IAudioSinkCallback.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 ANDROID_AUDIOSINKCALLBACK_H #define ANDROID_AUDIOSINKCALLBACK_H #include <cstdint> /** * Interface for a callback object that renders audio into a buffer. * This can be passed to an AudioSinkBase or its subclasses. */ class IAudioSinkCallback { public: IAudioSinkCallback() { } virtual ~IAudioSinkCallback() = default; typedef enum { CALLBACK_ERROR = -1, CALLBACK_CONTINUE = 0, CALLBACK_FINISHED = 1, // stop calling the callback } audio_sink_callback_result_t; virtual audio_sink_callback_result_t renderAudio(float *buffer, int32_t numFrames) = 0; }; #endif //ANDROID_AUDIOSINKCALLBACK_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 ANDROID_IAUDIOSINKCALLBACK_H #define ANDROID_IAUDIOSINKCALLBACK_H #include <cstdint> /** * Interface for a callback object that renders audio into a buffer. * This can be passed to an AudioSinkBase or its subclasses. */ class IAudioSinkCallback { public: IAudioSinkCallback() { } virtual ~IAudioSinkCallback() = default; typedef enum { CALLBACK_ERROR = -1, CALLBACK_CONTINUE = 0, CALLBACK_FINISHED = 1, // stop calling the callback } audio_sink_callback_result_t; virtual audio_sink_callback_result_t renderAudio(float *buffer, int32_t numFrames) = 0; }; #endif //ANDROID_IAUDIOSINKCALLBACK_H
Change protector macro to match the filename
Change protector macro to match the filename Test: builds OK Change-Id: I9d2ac3ee871a3380b32aecda6380b1b2da1dbed0
C
apache-2.0
google/synthmark,google/synthmark,google/synthmark,google/synthmark,google/synthmark
91ee9e96426e8d3eb74869cfc965306f6f5603c9
src/rtcmix/command_line.c
src/rtcmix/command_line.c
/* command_line.c */ /* to return command line arguments */ #include "../H/ugens.h" #include "../Minc/defs.h" #include "../Minc/ext.h" extern int aargc; extern char *aargv[]; /* to pass commandline args to subroutines */ double f_arg(float *p, short n_args) { double atof(); return (((int)p[0]) < aargc - 1) ? (atof(aargv[(int)p[0]])) : 0.0; } double i_arg(float *p, short n_args) { int atoi(); return (((int)p[0]) < aargc - 1) ? (atoi(aargv[(int)p[0]])) : 0; } double s_arg(float *p,short n_args,double *pp) { char *name; int i1 = 0; if(((int)pp[0]) < aargc - 1) { name = aargv[(int)pp[0]]; i1 = (int) strsave(name); } return(i1); } double n_arg(float *p, short n_args) { return(aargc); }
/* command_line.c */ /* to return command line arguments */ #include <stdlib.h> #include <math.h> #include <ugens.h> #include "../Minc/ext.h" double f_arg(float *p, short n_args) { return (((int)p[0]) < aargc - 1) ? (atof(aargv[(int)p[0]])) : 0.0; } double i_arg(float *p, short n_args) { return (((int)p[0]) < aargc - 1) ? (atoi(aargv[(int)p[0]])) : 0; } double s_arg(float *p,short n_args,double *pp) { char *name; int i1 = 0; if(((int)pp[0]) < aargc - 1) { name = aargv[(int)pp[0]]; i1 = (int) strsave(name); } return(i1); } double n_arg(float *p, short n_args) { return(aargc); }
Delete some extern vars that were in ugens.h. Other minor cleanups.
Delete some extern vars that were in ugens.h. Other minor cleanups.
C
apache-2.0
RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix
a7ac1f5696d3f4e3e2136e86bf5f11a362d0f5e3
tree/ntuple/v7/test/CustomStructLinkDef.h
tree/ntuple/v7/test/CustomStructLinkDef.h
#ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class CustomStruct+; #pragma link C++ class DerivedA+; #pragma link C++ class DerivedA2+; #pragma link C++ class DerivedB+; #pragma link C++ class DerivedC+; #pragma link C++ class IAuxSetOption+; #pragma link C++ class PackedParameters+; #pragma link C++ class PackedContainer+; #endif
#ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class CustomStruct+; #pragma link C++ class DerivedA+; #pragma link C++ class DerivedA2+; #pragma link C++ class DerivedB+; #pragma link C++ class DerivedC+; #pragma link C++ class IAuxSetOption+; #pragma link C++ class PackedParameters+; #pragma link C++ class PackedContainer<int>+; #endif
Remove warning `Warning: Unused class rule: PackedContainer`
[ntuple] Remove warning `Warning: Unused class rule: PackedContainer`
C
lgpl-2.1
olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root
0a5490e174e79614f4b8e98a8091ad3b86d043a2
test/Misc/thinlto.c
test/Misc/thinlto.c
// RUN: %clang_cc1 -flto=thin -emit-llvm-bc < %s | llvm-bcanalyzer -dump | FileCheck %s // CHECK: <FUNCTION_SUMMARY_BLOCK // CHECK-NEXT: <PERMODULE_ENTRY // CHECK-NEXT: <PERMODULE_ENTRY // CHECK-NEXT: </FUNCTION_SUMMARY_BLOCK __attribute__((noinline)) void foo() {} int main() { foo(); }
// RUN: %clang_cc1 -flto=thin -emit-llvm-bc < %s | llvm-bcanalyzer -dump | FileCheck %s // CHECK: <GLOBALVAL_SUMMARY_BLOCK // CHECK-NEXT: <PERMODULE // CHECK-NEXT: <PERMODULE // CHECK-NEXT: </GLOBALVAL_SUMMARY_BLOCK __attribute__((noinline)) void foo() {} int main() { foo(); }
Update test case for llvm summary format changes in D17592.
Update test case for llvm summary format changes in D17592. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@263276 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
f3b2812917a934a84c2c4db1b402e6cb2ef22f43
thingc/execution/Symbol.h
thingc/execution/Symbol.h
#pragma once #include <memory> #include "Opcode.h" class Symbol { public: Symbol(Opcode opcode) : opcode(opcode) {}; Symbol(Opcode opcode, unsigned int target) : opcode(opcode), target(target) {}; void execute(); private: Opcode opcode; unsigned int target; };
#pragma once #include <memory> #include "Opcode.h" class Symbol { public: Symbol(Opcode opcode) : opcode(opcode) {}; Symbol(Opcode opcode, unsigned int target) : opcode(opcode), target(target) {}; Symbol(Opcode opcode, unsigned int target, unsigned int secondary) : opcode(opcode), target(target), secondary(secondary) {}; void execute(); private: Opcode opcode; unsigned int target = 0; unsigned int secondary = 0; };
Add optional secondary target argument
Add optional secondary target argument
C
mit
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
cd58e2e8514d2f8abd4abbeb2003722adc10c883
knode/resource.h
knode/resource.h
/* resource.h KNode, the KDE newsreader Copyright (c) 1999-2005 the KNode authors. See file AUTHORS for details This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US */ #ifndef RESSOURCE_H #define RESSOURCE_H #ifdef HAVE_CONFIG_H #include <config.h> #endif //========= KNode Version Information ============ #define KNODE_VERSION "0.9.50" //================= StatusBar ==================== #define SB_MAIN 4000005 #define SB_GROUP 4000010 #define SB_FILTER 4000030 //================== Folders ===================== #define FOLD_DRAFTS 200010 #define FOLD_SENT 200020 #define FOLD_OUTB 200030 #endif // RESOURCE_H
/* resource.h KNode, the KDE newsreader Copyright (c) 1999-2005 the KNode authors. See file AUTHORS for details This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US */ #ifndef RESSOURCE_H #define RESSOURCE_H #ifdef HAVE_CONFIG_H #include <config.h> #endif //========= KNode Version Information ============ #define KNODE_VERSION "0.9.90" //================= StatusBar ==================== #define SB_MAIN 4000005 #define SB_GROUP 4000010 #define SB_FILTER 4000030 //================== Folders ===================== #define FOLD_DRAFTS 200010 #define FOLD_SENT 200020 #define FOLD_OUTB 200030 #endif // RESOURCE_H
Increment version number for the upcoming alpha release.
Increment version number for the upcoming alpha release. svn path=/branches/KDE/3.5/kdepim/; revision=442706
C
lgpl-2.1
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
88f8bd2718d4941c67fbc0c7b7c8ab5750d9085d
obexd/src/plugin.h
obexd/src/plugin.h
/* * * OBEX Server * * Copyright (C) 2007-2009 Marcel Holtmann <marcel@holtmann.org> * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ struct obex_plugin_desc { const char *name; int (*init) (void); void (*exit) (void); }; #define OBEX_PLUGIN_DEFINE(name,init,exit) \ struct obex_plugin_desc obex_plugin_desc = { \ name, init, exit \ };
/* * * OBEX Server * * Copyright (C) 2007-2009 Marcel Holtmann <marcel@holtmann.org> * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ struct obex_plugin_desc { const char *name; int (*init) (void); void (*exit) (void); }; #define OBEX_PLUGIN_DEFINE(name,init,exit) \ extern struct obex_plugin_desc obex_plugin_desc \ __attribute__ ((visibility("default"))); \ struct obex_plugin_desc obex_plugin_desc = { \ name, init, exit \ };
Use GCC visibility for exporting symbols
obexd: Use GCC visibility for exporting symbols
C
lgpl-2.1
ComputeCycles/bluez,pkarasev3/bluez,ComputeCycles/bluez,ComputeCycles/bluez,pstglia/external-bluetooth-bluez,pkarasev3/bluez,silent-snowman/bluez,mapfau/bluez,pstglia/external-bluetooth-bluez,pstglia/external-bluetooth-bluez,pkarasev3/bluez,silent-snowman/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez,mapfau/bluez,mapfau/bluez,pkarasev3/bluez,mapfau/bluez,ComputeCycles/bluez,silent-snowman/bluez
a45e44a9c9095cfa266647cd805e7301a9b06aab
cbits/timefuncs.c
cbits/timefuncs.c
#define _XOPEN_SOURCE #include <time.h> #include <locale.h> void set_c_locale() { setlocale(LC_TIME, "C"); } time_t c_parse_http_time(char* s) { struct tm dest; strptime(s, "%a, %d %b %Y %H:%M:%S GMT", &dest); return mktime(&dest); } void c_format_http_time(time_t src, char* dest) { struct tm t; gmtime_r(&src, &t); strftime(dest, 40, "%a, %d %b %Y %H:%M:%S GMT", &t); }
#define _XOPEN_SOURCE #include <time.h> #include <locale.h> void set_c_locale() { setlocale(LC_TIME, "C"); } time_t c_parse_http_time(char* s) { struct tm dest; strptime(s, "%a, %d %b %Y %H:%M:%S GMT", &dest); return timegm(&dest); } void c_format_http_time(time_t src, char* dest) { struct tm t; gmtime_r(&src, &t); strftime(dest, 40, "%a, %d %b %Y %H:%M:%S GMT", &t); }
Fix timezone issue -- call the correct C function
Fix timezone issue -- call the correct C function
C
bsd-3-clause
23Skidoo/snap-core,sopvop/snap-core,snapframework/snap-core,23Skidoo/snap-core,snapframework/snap-core,f-me/snap-core,sopvop/snap-core,snapframework/snap-core,23Skidoo/snap-core,sopvop/snap-core,f-me/snap-core,f-me/snap-core
3abdc74015406d1582439810f3cb5c052dded0c6
src/tincan/bussignaldef.h
src/tincan/bussignaldef.h
#ifndef TIN_BUSSIGNALDEF_H #define TIN_BUSSIGNALDEF_H #include <cstdint> #include <string> namespace tin { enum class Byte_order : std::uint8_t { Intel, Moto }; enum class Value_sign : std::uint8_t { Signed, Unsigned }; struct Bus_signal_def { bool multiplex_switch; Byte_order order; Value_sign sign; std::int32_t multiplex_value; std::uint32_t pos; std::uint32_t len; double factor; double offset; double minimum; double maximum; std::string unit; std::string name; }; } // namespace tin #endif // TIN_BUSSIGNALDEF_H
#ifndef TIN_BUSSIGNALDEF_H #define TIN_BUSSIGNALDEF_H #include <cstdint> #include <string> #include <vector> namespace tin { enum class Byte_order : std::uint8_t { Intel, Moto }; enum class Value_sign : std::uint8_t { Signed, Unsigned }; struct Bus_signal_meta_data { std::int8_t factor_precision = 7; std::int8_t offset_precision = 7; std::int8_t minimum_precision = 7; std::int8_t maximum_precision = 7; }; struct Bus_signal_def { bool multiplex_switch; Byte_order order; Value_sign sign; std::int32_t multiplex_value; std::uint32_t pos; std::uint32_t len; double factor; double offset; double minimum; double maximum; std::string unit; std::string name; std::vector<std::string> receiver; Bus_signal_meta_data meta_data; }; } // namespace tin #endif // TIN_BUSSIGNALDEF_H
Add receiver and meta data
Add receiver and meta data
C
mit
jwkpeter/tincan
5b8106e848d99433f62310dbf3cb80ef9812e572
include/msvc_compat/C99/stdbool.h
include/msvc_compat/C99/stdbool.h
#ifndef stdbool_h #define stdbool_h #include <wtypes.h> /* MSVC doesn't define _Bool or bool in C, but does have BOOL */ /* Note this doesn't pass autoconf's test because (bool) 0.5 != true */ typedef BOOL _Bool; #define bool _Bool #define true 1 #define false 0 #define __bool_true_false_are_defined 1 #endif /* stdbool_h */
#ifndef stdbool_h #define stdbool_h #include <wtypes.h> /* MSVC doesn't define _Bool or bool in C, but does have BOOL */ /* Note this doesn't pass autoconf's test because (bool) 0.5 != true */ /* Clang-cl uses MSVC headers, so needs msvc_compat, but has _Bool as * a built-in type. */ #ifndef __clang__ typedef BOOL _Bool; #endif #define bool _Bool #define true 1 #define false 0 #define __bool_true_false_are_defined 1 #endif /* stdbool_h */
Allow to build with clang-cl
Allow to build with clang-cl
C
bsd-2-clause
geekboxzone/lollipop_external_jemalloc,TeamExodus/external_jemalloc,TeamExodus/external_jemalloc,geekboxzone/mmallow_external_jemalloc,xin3liang/platform_external_jemalloc,VRToxin/android_external_jemalloc,geekboxzone/lollipop_external_jemalloc,CMRemix/android_external_jemalloc,sudosurootdev/external_jemalloc,CMRemix/android_external_jemalloc,CyanogenMod/android_external_jemalloc,CyanogenMod/android_external_jemalloc,android-ia/platform_external_jemalloc,geekboxzone/mmallow_external_jemalloc,android-ia/platform_external_jemalloc,AndroidExternal/jemalloc,VRToxin/android_external_jemalloc,sudosurootdev/external_jemalloc,VRToxin/android_external_jemalloc,CMRemix/android_external_jemalloc,CyanogenMod/android_external_jemalloc,TeamExodus/external_jemalloc,geekboxzone/mmallow_external_jemalloc,AndroidExternal/jemalloc,AndroidExternal/jemalloc,android-ia/platform_external_jemalloc,CMRemix/android_external_jemalloc,geekboxzone/mmallow_external_jemalloc,VRToxin/android_external_jemalloc,AndroidExternal/jemalloc,xin3liang/platform_external_jemalloc,sudosurootdev/external_jemalloc,xin3liang/platform_external_jemalloc,geekboxzone/lollipop_external_jemalloc,geekboxzone/lollipop_external_jemalloc,sudosurootdev/external_jemalloc,xin3liang/platform_external_jemalloc,CyanogenMod/android_external_jemalloc,TeamExodus/external_jemalloc,android-ia/platform_external_jemalloc
030b5129d7f4693d8425740c0639a007c46902a7
code/Modules/Core/posix/precompiled.h
code/Modules/Core/posix/precompiled.h
#pragma once //------------------------------------------------------------------------------ /** @file core/posix/precompiled.h Standard includes for POSIX platforms. NOTE: keep as many headers out of here as possible, at least on compilers which don't have pre-compiled-headers turned on. */ #ifdef __STRICT_ANSI__ #undef __STRICT_ANSI__ #endif #include <cstddef>
#pragma once //------------------------------------------------------------------------------ /** @file core/posix/precompiled.h Standard includes for POSIX platforms. NOTE: keep as many headers out of here as possible, at least on compilers which don't have pre-compiled-headers turned on. */ // this is a workaround when using clang with the GNU std lib, // this fails without __STRICT_ANSI__ because clang doesn't // know the __float128 type #if __clang__ && ORYOL_LINUX && !defined __STRICT_ANSI__ #define __STRICT_ANSI__ #endif #include <cstddef>
Fix for compile error on Linux when using clang with GNU std c++ lib (__STRICT_ANSI__ is required)
Fix for compile error on Linux when using clang with GNU std c++ lib (__STRICT_ANSI__ is required)
C
mit
aonorin/oryol,floooh/oryol,aonorin/oryol,aonorin/oryol,aonorin/oryol,aonorin/oryol,aonorin/oryol,floooh/oryol,floooh/oryol,aonorin/oryol,floooh/oryol,floooh/oryol,floooh/oryol
8fc20aab3269a76b9791c98213a7eb3106da7a83
TJDropbox/TJDropboxAuthenticator.h
TJDropbox/TJDropboxAuthenticator.h
// // TJDropboxAuthenticator.h // Close-up // // Created by Tim Johnsen on 3/14/20. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN API_AVAILABLE(ios(10.0)) @interface TJDropboxAuthenticator : NSObject + (void)authenticateWithClientIdentifier:(NSString *const)clientIdentifier bypassingNativeAuth:(const BOOL)bypassNativeAuth completion:(void (^)(NSString *))completion; + (BOOL)tryHandleAuthenticationCallbackWithURL:(NSURL *const)url; @end NS_ASSUME_NONNULL_END
// // TJDropboxAuthenticator.h // Close-up // // Created by Tim Johnsen on 3/14/20. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN API_AVAILABLE(ios(10.0)) @interface TJDropboxAuthenticator : NSObject /** * Invoke this to initiate auth * @param clientIdentifier Your registered Dropbox client identifier. * @param bypassNativeAuth Pass @c YES to skip authentication via the Dropbox app and force auth to occur via the web. * @param completion Block invoked when auth is complete. @c accessToken will be @c nil if auth wasn't completed. */ + (void)authenticateWithClientIdentifier:(NSString *const)clientIdentifier bypassingNativeAuth:(const BOOL)bypassNativeAuth completion:(void (^)(NSString *_Nullable accessToken))completion; /// Invoke this from your app delegate's implementation of -application:openURL:options:, returns whether or not the URL was a completion callback to Dropbox auth. + (BOOL)tryHandleAuthenticationCallbackWithURL:(NSURL *const)url; @end NS_ASSUME_NONNULL_END
Add docs to authenticator header.
Add docs to authenticator header.
C
bsd-3-clause
timonus/TJDropbox
a74363011638771c83555614cf2fafd1ef854bfd
hab/proxr/cb-set-resource.c
hab/proxr/cb-set-resource.c
#include <string.h> #include <stdlib.h> #include "proxrcmds.h" #include "sim-hab.h" void cb_set_resource(bionet_resource_t *resource, bionet_value_t *value) { double data; double content; char number[3]; char *res_name = NULL; long int id; bionet_node_t *node; bionet_value_get_double(value, &data); if(data < 0 || data > 255) return; node = bionet_resource_get_node(resource); bionet_split_resource_name(bionet_resource_get_name(resource), NULL, NULL, NULL, &res_name); // extract pot number from resource name number[0] = res_name[4]; number[1] = res_name[5]; number[2] = '\0'; id = strtol(number, NULL, 10); // command proxr to adjust to new value set_potentiometer(id, (int)data); // set resources datapoint to new value and report content = data*POT_CONVERSION; bionet_resource_set_double(resource, content, NULL); hab_report_datapoints(node); }
#include <string.h> #include <stdlib.h> #include "proxrcmds.h" #include "sim-hab.h" void cb_set_resource(bionet_resource_t *resource, bionet_value_t *value) { double data; double content; char number[3]; char *res_name = NULL; long int id; bionet_node_t *node; bionet_value_get_double(value, &data); if(data < 0) data = 0; if(data > 5) data = 5; node = bionet_resource_get_node(resource); bionet_split_resource_name(bionet_resource_get_name(resource), NULL, NULL, NULL, &res_name); // extract pot number from resource name number[0] = res_name[4]; number[1] = res_name[5]; number[2] = '\0'; id = strtol(number, NULL, 10); // proxr hardware works with 8 bit resolution 0-255 steps data = data/POT_CONVERSION; // command proxr to adjust to new value set_potentiometer(id, (int)data); // set resources datapoint to new value and report content = data*POT_CONVERSION; bionet_resource_set_double(resource, content, NULL); hab_report_datapoints(node); }
Change how proxr resources are set. Previously it was given a value 0-255 which the proxr hardware uses to set the voltage. now just give it a voltage and do the conversion in the hab. also if a voltage supplied is out of range it snaps to nearest in range.
Change how proxr resources are set. Previously it was given a value 0-255 which the proxr hardware uses to set the voltage. now just give it a voltage and do the conversion in the hab. also if a voltage supplied is out of range it snaps to nearest in range.
C
lgpl-2.1
ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead
41df6d94b734a98f77b27794b9289be2391bc29b
src/compiler/util/result.h
src/compiler/util/result.h
#ifndef COMPILER_UTIL_RESULT_H_ #define COMPILER_UTIL_RESULT_H_ #include <string> namespace tree_sitter { namespace util { template <typename Value> struct Result { Value value; std::string error; inline Result() : error("Empty") {} inline Result(Value &&v) : value(v) {} inline Result(const std::string &message) : error(message) {} inline Result(const char *message) : error(message) {} inline bool ok() const { return error.empty(); } }; } // namespace util } // namespace tree_sitter #endif // COMPILER_UTIL_RESULT_H_
#ifndef COMPILER_UTIL_RESULT_H_ #define COMPILER_UTIL_RESULT_H_ #include <string> namespace tree_sitter { namespace util { template <typename Value> struct Result { Value value; std::string error; inline Result() : error("Empty") {} inline Result(const Value &v) : value(v) {} inline Result(Value &&v) : value(std::move(v)) {} inline Result(const std::string &message) : error(message) {} inline Result(const char *message) : error(message) {} inline bool ok() const { return error.empty(); } }; } // namespace util } // namespace tree_sitter #endif // COMPILER_UTIL_RESULT_H_
Allow Result to be constructed with an l-value
Allow Result to be constructed with an l-value This fixes compile errors on old C++ compilers
C
mit
tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter
3e69b820d360bd96ce3c8c6714835115847c49a4
source/m3_api_defs.h
source/m3_api_defs.h
// // m3_api_defs.h // // Created by Volodymyr Shymanskyy on 12/20/19. // Copyright © 2019 Volodymyr Shymanskyy. All rights reserved. // #ifndef m3_api_defs_h #define m3_api_defs_h #include "m3_core.h" #define m3ApiReturnType(TYPE) TYPE* raw_return = ((TYPE*) (_sp)); #define m3ApiGetArg(TYPE, NAME) TYPE NAME = * ((TYPE *) (_sp++)); #define m3ApiGetArgMem(TYPE, NAME) TYPE NAME = (TYPE) (_mem + * (u32 *) _sp++); #define m3ApiRawFunction(NAME) void NAME (IM3Runtime runtime, u64 * _sp, u8 * _mem) #define m3ApiReturn(VALUE) { *raw_return = (VALUE); return; } #endif /* m3_api_defs_h */
// // m3_api_defs.h // // Created by Volodymyr Shymanskyy on 12/20/19. // Copyright © 2019 Volodymyr Shymanskyy. All rights reserved. // #ifndef m3_api_defs_h #define m3_api_defs_h #include "m3_core.h" #define m3ApiReturnType(TYPE) TYPE* raw_return = ((TYPE*) (_sp)); #define m3ApiGetArg(TYPE, NAME) TYPE NAME = * ((TYPE *) (_sp++)); #define m3ApiGetArgMem(TYPE, NAME) TYPE NAME = (TYPE) (_mem + * (u32 *) _sp++); #define m3ApiRawFunction(NAME) m3ret_t NAME (IM3Runtime runtime, u64 * _sp, u8 * _mem) #define m3ApiReturn(VALUE) { *raw_return = (VALUE); return NULL; } #endif /* m3_api_defs_h */
Fix type missmatch (crucial for wasienv)
Fix type missmatch (crucial for wasienv)
C
mit
wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3
81ac9438c400140ea6d56ee30ded7ea74135a8b3
include/payload.h
include/payload.h
#ifndef CPR_PAYLOAD_H #define CPR_PAYLOAD_H #include <memory> #include <string> #include <initializer_list> namespace cpr { struct Pair { Pair(const std::string& key, const std::string& value) : key{key}, value{value} {} Pair(const std::string& key, const int& value) : key{key}, value{std::to_string(value)} {} std::string key; std::string value; }; class Payload { public: Payload(const std::initializer_list<Pair>& pairs); Payload(const std::string& content) : content{content} {} Payload(std::string&& content) : content{std::move(content)} {} std::string content; }; } // namespace cpr #endif
#ifndef CPR_PAYLOAD_H #define CPR_PAYLOAD_H #include <memory> #include <string> #include <initializer_list> namespace cpr { struct Pair { Pair(const std::string& key, const std::string& value) : key{key}, value{value} {} Pair(const std::string& key, const int& value) : key{key}, value{std::to_string(value)} {} std::string key; std::string value; }; class Payload { public: Payload(const std::initializer_list<Pair>& pairs); std::string content; }; } // namespace cpr #endif
Remove unused and untested Payload constructor
Remove unused and untested Payload constructor
C
mit
skystrife/cpr,SuperV1234/cpr,whoshuu/cpr,msuvajac/cpr,skystrife/cpr,msuvajac/cpr,SuperV1234/cpr,SuperV1234/cpr,whoshuu/cpr,skystrife/cpr,msuvajac/cpr,whoshuu/cpr
e9cd0de60b2312738bd0e91fe7855b64f60dde73
libfxcg/misc/random.c
libfxcg/misc/random.c
static unsigned long next = 1; /* RAND_MAX assumed to be 32767 */ int sys_rand(void) { next = next * 1103515245 + 12345; return((unsigned)(next/65536) % 32768); } void sys_srand(unsigned seed) { next = seed; }
static unsigned long next = 1; /* RAND_MAX assumed to be 32767 */ int sys_rand(void) { next = next * 1103515245 + 12345; return((unsigned)(next/65536) % 32768); } void sys_srand(unsigned seed) { next = seed; } __attribute__((weak)) int rand(void) { return sys_rand(); } __attribute__((weak)) void srand(unsigned seed) { srand(seed); }
Add alias to sys_rand and sys_srand
Add alias to sys_rand and sys_srand
C
bsd-3-clause
Jonimoose/libfxcg,Jonimoose/libfxcg,Jonimoose/libfxcg
fb8222b63dc2877b058db5483e6fa02ec6f53949
CwlSignal/CwlSignal.h
CwlSignal/CwlSignal.h
// // CwlSignal.h // CwlSignal // // Created by Matt Gallagher on 11/6/16. // Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. // #import <Cocoa/Cocoa.h> //! Project version number for CwlSignal. FOUNDATION_EXPORT double CwlSignalVersionNumber; //! Project version string for CwlSignal. FOUNDATION_EXPORT const unsigned char CwlSignalVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <CwlSignal/PublicHeader.h> #import "CwlFrameAddress.h"
// // CwlSignal.h // CwlSignal // // Created by Matt Gallagher on 11/6/16. // Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. // #import <Foundation/Foundation.h> //! Project version number for CwlSignal. FOUNDATION_EXPORT double CwlSignalVersionNumber; //! Project version string for CwlSignal. FOUNDATION_EXPORT const unsigned char CwlSignalVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <CwlSignal/PublicHeader.h> #import "CwlFrameAddress.h"
Remove needless include of Cocoa.
Remove needless include of Cocoa.
C
isc
mattgallagher/CwlSignal,monyschuk/CwlSignal,mattgallagher/CwlSignal
fb3b9d76611d1e7ac1d7896aff469a52d36b6078
src/include/utils/dynahash.h
src/include/utils/dynahash.h
/*------------------------------------------------------------------------- * * dynahash-- * POSTGRES dynahash.h file definitions * * * Copyright (c) 1994, Regents of the University of California * * $Id: dynahash.h,v 1.1 1996/11/09 05:48:28 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef DYNAHASH_H #define DYNAHASH_H extern int my_log2(long num); #endif DYNAHASH_H /* DYNAHASH_H */
/*------------------------------------------------------------------------- * * dynahash-- * POSTGRES dynahash.h file definitions * * * Copyright (c) 1994, Regents of the University of California * * $Id: dynahash.h,v 1.2 1996/11/14 20:06:39 scrappy Exp $ * *------------------------------------------------------------------------- */ #ifndef DYNAHASH_H #define DYNAHASH_H extern int my_log2(long num); #endif /* DYNAHASH_H */
Fix a comment that wasn't commente'd out
Fix a comment that wasn't commente'd out Pointed out by: Erik Bertelsen <erik@sockdev.uni-c.dk>
C
apache-2.0
adam8157/gpdb,Chibin/gpdb,adam8157/gpdb,rubikloud/gpdb,kaknikhil/gpdb,kaknikhil/gpdb,tpostgres-projects/tPostgres,yuanzhao/gpdb,zeroae/postgres-xl,adam8157/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,oberstet/postgres-xl,Quikling/gpdb,chrishajas/gpdb,chrishajas/gpdb,zaksoup/gpdb,ashwinstar/gpdb,0x0FFF/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,tangp3/gpdb,arcivanov/postgres-xl,royc1/gpdb,atris/gpdb,rubikloud/gpdb,lisakowen/gpdb,rvs/gpdb,xuegang/gpdb,xinzweb/gpdb,yuanzhao/gpdb,randomtask1155/gpdb,ashwinstar/gpdb,ovr/postgres-xl,50wu/gpdb,ahachete/gpdb,lisakowen/gpdb,rubikloud/gpdb,janebeckman/gpdb,techdragon/Postgres-XL,ahachete/gpdb,royc1/gpdb,foyzur/gpdb,tangp3/gpdb,randomtask1155/gpdb,lisakowen/gpdb,kaknikhil/gpdb,edespino/gpdb,rvs/gpdb,tangp3/gpdb,lintzc/gpdb,Quikling/gpdb,atris/gpdb,randomtask1155/gpdb,yazun/postgres-xl,oberstet/postgres-xl,xinzweb/gpdb,CraigHarris/gpdb,chrishajas/gpdb,tangp3/gpdb,postmind-net/postgres-xl,Postgres-XL/Postgres-XL,xinzweb/gpdb,yazun/postgres-xl,foyzur/gpdb,lintzc/gpdb,lpetrov-pivotal/gpdb,atris/gpdb,Postgres-XL/Postgres-XL,tangp3/gpdb,xuegang/gpdb,ashwinstar/gpdb,zeroae/postgres-xl,randomtask1155/gpdb,edespino/gpdb,zeroae/postgres-xl,ahachete/gpdb,edespino/gpdb,CraigHarris/gpdb,rubikloud/gpdb,lintzc/gpdb,janebeckman/gpdb,randomtask1155/gpdb,50wu/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,Quikling/gpdb,cjcjameson/gpdb,CraigHarris/gpdb,Quikling/gpdb,cjcjameson/gpdb,Postgres-XL/Postgres-XL,lintzc/gpdb,janebeckman/gpdb,rvs/gpdb,cjcjameson/gpdb,edespino/gpdb,xinzweb/gpdb,royc1/gpdb,royc1/gpdb,tpostgres-projects/tPostgres,lisakowen/gpdb,kaknikhil/gpdb,snaga/postgres-xl,kaknikhil/gpdb,chrishajas/gpdb,yuanzhao/gpdb,edespino/gpdb,atris/gpdb,lintzc/gpdb,kmjungersen/PostgresXL,adam8157/gpdb,ovr/postgres-xl,tangp3/gpdb,ashwinstar/gpdb,xinzweb/gpdb,jmcatamney/gpdb,yuanzhao/gpdb,xinzweb/gpdb,zaksoup/gpdb,cjcjameson/gpdb,ovr/postgres-xl,pavanvd/postgres-xl,0x0FFF/gpdb,0x0FFF/gpdb,rvs/gpdb,Quikling/gpdb,rubikloud/gpdb,greenplum-db/gpdb,chrishajas/gpdb,0x0FFF/gpdb,royc1/gpdb,janebeckman/gpdb,0x0FFF/gpdb,rvs/gpdb,zaksoup/gpdb,CraigHarris/gpdb,arcivanov/postgres-xl,xuegang/gpdb,tpostgres-projects/tPostgres,zeroae/postgres-xl,lpetrov-pivotal/gpdb,CraigHarris/gpdb,foyzur/gpdb,rvs/gpdb,edespino/gpdb,Quikling/gpdb,lintzc/gpdb,yazun/postgres-xl,Quikling/gpdb,yuanzhao/gpdb,lisakowen/gpdb,adam8157/gpdb,postmind-net/postgres-xl,royc1/gpdb,xinzweb/gpdb,foyzur/gpdb,kaknikhil/gpdb,oberstet/postgres-xl,jmcatamney/gpdb,greenplum-db/gpdb,cjcjameson/gpdb,Chibin/gpdb,lpetrov-pivotal/gpdb,jmcatamney/gpdb,Chibin/gpdb,kaknikhil/gpdb,techdragon/Postgres-XL,jmcatamney/gpdb,Chibin/gpdb,Chibin/gpdb,Chibin/gpdb,foyzur/gpdb,Chibin/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,lintzc/gpdb,yuanzhao/gpdb,50wu/gpdb,rvs/gpdb,rvs/gpdb,atris/gpdb,pavanvd/postgres-xl,CraigHarris/gpdb,ahachete/gpdb,ahachete/gpdb,xuegang/gpdb,lintzc/gpdb,snaga/postgres-xl,Quikling/gpdb,janebeckman/gpdb,snaga/postgres-xl,postmind-net/postgres-xl,zaksoup/gpdb,CraigHarris/gpdb,janebeckman/gpdb,janebeckman/gpdb,ahachete/gpdb,tangp3/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,randomtask1155/gpdb,yazun/postgres-xl,techdragon/Postgres-XL,Quikling/gpdb,cjcjameson/gpdb,arcivanov/postgres-xl,0x0FFF/gpdb,kaknikhil/gpdb,snaga/postgres-xl,zaksoup/gpdb,postmind-net/postgres-xl,Chibin/gpdb,cjcjameson/gpdb,janebeckman/gpdb,zaksoup/gpdb,ashwinstar/gpdb,arcivanov/postgres-xl,xuegang/gpdb,zaksoup/gpdb,edespino/gpdb,50wu/gpdb,rubikloud/gpdb,tangp3/gpdb,chrishajas/gpdb,lpetrov-pivotal/gpdb,ahachete/gpdb,CraigHarris/gpdb,xuegang/gpdb,atris/gpdb,ahachete/gpdb,xuegang/gpdb,Postgres-XL/Postgres-XL,lisakowen/gpdb,greenplum-db/gpdb,lpetrov-pivotal/gpdb,chrishajas/gpdb,Chibin/gpdb,rubikloud/gpdb,tpostgres-projects/tPostgres,randomtask1155/gpdb,ovr/postgres-xl,jmcatamney/gpdb,rvs/gpdb,kmjungersen/PostgresXL,50wu/gpdb,kaknikhil/gpdb,techdragon/Postgres-XL,ashwinstar/gpdb,Quikling/gpdb,randomtask1155/gpdb,yuanzhao/gpdb,postmind-net/postgres-xl,ovr/postgres-xl,royc1/gpdb,lintzc/gpdb,xuegang/gpdb,lisakowen/gpdb,yazun/postgres-xl,lpetrov-pivotal/gpdb,cjcjameson/gpdb,greenplum-db/gpdb,tpostgres-projects/tPostgres,xuegang/gpdb,adam8157/gpdb,edespino/gpdb,Postgres-XL/Postgres-XL,pavanvd/postgres-xl,zaksoup/gpdb,oberstet/postgres-xl,foyzur/gpdb,0x0FFF/gpdb,kmjungersen/PostgresXL,yuanzhao/gpdb,foyzur/gpdb,janebeckman/gpdb,arcivanov/postgres-xl,snaga/postgres-xl,0x0FFF/gpdb,kmjungersen/PostgresXL,kmjungersen/PostgresXL,50wu/gpdb,zeroae/postgres-xl,CraigHarris/gpdb,50wu/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,adam8157/gpdb,edespino/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,Chibin/gpdb,chrishajas/gpdb,arcivanov/postgres-xl,kaknikhil/gpdb,rubikloud/gpdb,atris/gpdb,pavanvd/postgres-xl,atris/gpdb,lisakowen/gpdb,foyzur/gpdb,janebeckman/gpdb,xinzweb/gpdb,edespino/gpdb,lpetrov-pivotal/gpdb,techdragon/Postgres-XL,adam8157/gpdb,rvs/gpdb,oberstet/postgres-xl,royc1/gpdb,pavanvd/postgres-xl,50wu/gpdb
fb096213f123f9f4b808e3d2ff57d0c984a27e63
libc/sysdeps/linux/arm/aeabi_memclr.c
libc/sysdeps/linux/arm/aeabi_memclr.c
/* Copyright (C) 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include <string.h> libc_hidden_proto(bzero) /* Clear memory. Can't alias to bzero because it's not defined in the same translation unit. */ void __aeabi_memclr (void *dest, size_t n) { bzero (dest, n); } /* Versions of the above which may assume memory alignment. */ strong_alias (__aeabi_memclr, __aeabi_memclr4) strong_alias (__aeabi_memclr, __aeabi_memclr8)
/* Copyright (C) 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include <string.h> libc_hidden_proto(memset) /* Clear memory. Can't alias to bzero because it's not defined in the same translation unit. */ void __aeabi_memclr (void *dest, size_t n) { memset (dest, 0, n); } /* Versions of the above which may assume memory alignment. */ strong_alias (__aeabi_memclr, __aeabi_memclr4) strong_alias (__aeabi_memclr, __aeabi_memclr8)
Use memset instead of bzero
Use memset instead of bzero
C
lgpl-2.1
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
055d3f2df632ffe49a10bd83956755bb71dc1a61
src/lib/ioloop-notify-none.c
src/lib/ioloop-notify-none.c
/* Copyright (C) 2003 Timo Sirainen */ #include "lib.h" #include "ioloop-internal.h" #ifdef IOLOOP_NOTIFY_NONE struct io *io_loop_notify_add(struct ioloop *ioloop __attr_unused__, const char *path __attr_unused__, io_callback_t *callback __attr_unused__, void *context __attr_unused__) { return NULL; } void io_loop_notify_remove(struct ioloop *ioloop __attr_unused__, struct io *io __attr_unused__) { } void io_loop_notify_handler_init(struct ioloop *ioloop __attr_unused__) { } void io_loop_notify_handler_deinit(struct ioloop *ioloop __attr_unused__) { } #endif
/* Copyright (C) 2003 Timo Sirainen */ #include "lib.h" #include "ioloop-internal.h" #ifdef IOLOOP_NOTIFY_NONE #undef io_add_notify struct io *io_add_notify(const char *path __attr_unused__, io_callback_t *callback __attr_unused__, void *context __attr_unused__) { return NULL; } void io_loop_notify_remove(struct ioloop *ioloop __attr_unused__, struct io *io __attr_unused__) { } void io_loop_notify_handler_deinit(struct ioloop *ioloop __attr_unused__) { } #endif
Fix for building without notify
Fix for building without notify
C
mit
Distrotech/dovecot,Distrotech/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,Distrotech/dovecot,damoxc/dovecot,Distrotech/dovecot,Distrotech/dovecot
50e9733e3c0f5324e09e6b411f97838f9f782a0f
src/fname.h
src/fname.h
#ifndef FHASH_H #define FHASH_H /* Box the filename pointer in a struct, for added typechecking. */ typedef struct fname { char *name; } fname; set *fname_new_set(int sz_factor); fname *fname_new(char *n, size_t len); fname *fname_add(set *wt, fname *f); void fname_free(void *w); #endif
#ifndef FNAME_H #define FNAME_H /* Box the filename pointer in a struct, for added typechecking. */ typedef struct fname { char *name; } fname; set *fname_new_set(int sz_factor); fname *fname_new(char *n, size_t len); fname *fname_add(set *wt, fname *f); void fname_free(void *w); #endif
Fix guards for renamed header files.
Fix guards for renamed header files.
C
isc
silentbicycle/glean,kaostao/glean,kaostao/glean,kaostao/glean,silentbicycle/glean
25706992c211500250adb796b4e39ab7710326e0
include/visionaray/detail/spd/blackbody.h
include/visionaray/detail/spd/blackbody.h
// This file is distributed under the MIT license. // See the LICENSE file for details. #pragma once #ifndef VSNRAY_DETAIL_SPD_BLACKBODY_H #define VSNRAY_DETAIL_SPD_BLACKBODY_H 1 #include <cmath> #include "../macros.h" namespace visionaray { //------------------------------------------------------------------------------------------------- // Spectral power distribution for blackbody radiator // See: http://www.spectralcalc.com/blackbody/units_of_wavelength.html // Color temperature in Kelvin, sample SPD with wavelength (nm) // struct blackbody { blackbody(float T = 1500.0) : T(T) {} VSNRAY_FUNC float operator()(float lambda /* nm */) const { double const k = 1.3806488E-23; double const h = 6.62606957E-34; double const c = 2.99792458E8; lambda *= 1E-3; // nm to microns return ( ( 2.0 * 1E24 * h * c * c ) / pow(lambda, 5.0) ) * ( 1.0 / (exp((1E6 * h * c) / (lambda * k * T)) - 1.0) ); } private: double T; }; } // visionaray #endif // VSNRAY_DETAIL_SPD_BLACKBODY_H
// This file is distributed under the MIT license. // See the LICENSE file for details. #pragma once #ifndef VSNRAY_DETAIL_SPD_BLACKBODY_H #define VSNRAY_DETAIL_SPD_BLACKBODY_H 1 #include <cmath> #include "../macros.h" namespace visionaray { //------------------------------------------------------------------------------------------------- // Spectral power distribution for blackbody radiator // See: http://www.spectralcalc.com/blackbody/units_of_wavelength.html // Color temperature in Kelvin, sample SPD with wavelength (nm) // class blackbody { public: blackbody(float T = 1500.0) : T(T) {} VSNRAY_FUNC float operator()(float lambda /* nm */) const { double const k = 1.3806488E-23; double const h = 6.62606957E-34; double const c = 2.99792458E8; lambda *= 1E-3; // nm to microns return ( ( 2.0 * 1E24 * h * c * c ) / pow(lambda, 5.0) ) * ( 1.0 / (exp((1E6 * h * c) / (lambda * k * T)) - 1.0) ); } private: double T; }; } // visionaray #endif // VSNRAY_DETAIL_SPD_BLACKBODY_H
Use class for non-trivial types
Use class for non-trivial types
C
mit
szellmann/visionaray,szellmann/visionaray
6def8cef8c661ed9b68974ccb4871645efdafa2b
src/DeviceInterfaces/Networking.Sntp/nf_networking_sntp.h
src/DeviceInterfaces/Networking.Sntp/nf_networking_sntp.h
// // Copyright (c) 2018 The nanoFramework project contributors // Portions Copyright (c) Microsoft Corporation. All rights reserved. // See LICENSE file in the project root for full license information. // #ifndef _NF_NETWORKING_SNTP_H_ #define _NF_NETWORKING_SNTP_H_ #include <nanoCLR_Interop.h> #include <nanoCLR_Runtime.h> #include <nanoCLR_Checks.h> #include <nanoHAL_time.h> extern "C" { #include <apps/sntp.h> } struct Library_nf_networking_sntp_nanoFramework_Networking_Sntp { NANOCLR_NATIVE_DECLARE(Start___STATIC__VOID); NANOCLR_NATIVE_DECLARE(Stop___STATIC__VOID); NANOCLR_NATIVE_DECLARE(UpdateNow___STATIC__VOID); NANOCLR_NATIVE_DECLARE(get_IsStarted___STATIC__BOOLEAN); NANOCLR_NATIVE_DECLARE(get_Server1___STATIC__STRING); NANOCLR_NATIVE_DECLARE(set_Server1___STATIC__VOID__STRING); NANOCLR_NATIVE_DECLARE(get_Server2___STATIC__STRING); NANOCLR_NATIVE_DECLARE(set_Server2___STATIC__VOID__STRING); //--// }; extern const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_nanoFramework_Networking_Sntp; #endif //_NF_NETWORKING_SNTP_H_
// // Copyright (c) 2018 The nanoFramework project contributors // Portions Copyright (c) Microsoft Corporation. All rights reserved. // See LICENSE file in the project root for full license information. // #ifndef _NF_NETWORKING_SNTP_H_ #define _NF_NETWORKING_SNTP_H_ #include <nanoCLR_Interop.h> #include <nanoCLR_Runtime.h> #include <nanoCLR_Checks.h> #include <nanoHAL_time.h> extern "C" { #ifndef PLATFORM_ESP32 #include <apps/sntp.h> #else #include <apps/sntp/sntp.h> #endif } struct Library_nf_networking_sntp_nanoFramework_Networking_Sntp { NANOCLR_NATIVE_DECLARE(Start___STATIC__VOID); NANOCLR_NATIVE_DECLARE(Stop___STATIC__VOID); NANOCLR_NATIVE_DECLARE(UpdateNow___STATIC__VOID); NANOCLR_NATIVE_DECLARE(get_IsStarted___STATIC__BOOLEAN); NANOCLR_NATIVE_DECLARE(get_Server1___STATIC__STRING); NANOCLR_NATIVE_DECLARE(set_Server1___STATIC__VOID__STRING); NANOCLR_NATIVE_DECLARE(get_Server2___STATIC__STRING); NANOCLR_NATIVE_DECLARE(set_Server2___STATIC__VOID__STRING); //--// }; extern const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_nanoFramework_Networking_Sntp; #endif //_NF_NETWORKING_SNTP_H_
Fix headers so SNTP builds on Esp32
Fix headers so SNTP builds on Esp32
C
mit
Eclo/nf-interpreter,Eclo/nf-interpreter,Eclo/nf-interpreter,Eclo/nf-interpreter,nanoframework/nf-interpreter,nanoframework/nf-interpreter,nanoframework/nf-interpreter,nanoframework/nf-interpreter
7ae9b93a7d8f52dd01682b7c2e6df89f91a0cd29
include/llvm/Transforms/Instrumentation/TraceValues.h
include/llvm/Transforms/Instrumentation/TraceValues.h
//===- llvm/Transforms/Instrumentation/TraceValues.h - Tracing ---*- C++ -*--=// // // Support for inserting LLVM code to print values at basic block and method // exits. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H #define LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H #include "llvm/Pass.h" class InsertTraceCode : public Pass { bool TraceBasicBlockExits, TraceMethodExits; public: InsertTraceCode(bool traceBasicBlockExits, bool traceMethodExits) : TraceBasicBlockExits(traceBasicBlockExits), TraceMethodExits(traceMethodExits) {} //-------------------------------------------------------------------------- // Function InsertCodeToTraceValues // // Inserts tracing code for all live values at basic block and/or method exits // as specified by `traceBasicBlockExits' and `traceMethodExits'. // static bool doInsertTraceCode(Method *M, bool traceBasicBlockExits, bool traceMethodExits); // doPerMethodWork - This method does the work. Always successful. // bool doPerMethodWork(Method *M) { return doInsertTraceCode(M, TraceBasicBlockExits, TraceMethodExits); } }; #endif /*LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H*/
//===- llvm/Transforms/Instrumentation/TraceValues.h - Tracing ---*- C++ -*--=// // // Support for inserting LLVM code to print values at basic block and method // exits. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H #define LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H #include "llvm/Pass.h" class Method; class InsertTraceCode : public Pass { bool TraceBasicBlockExits, TraceMethodExits; Method *PrintfMeth; public: InsertTraceCode(bool traceBasicBlockExits, bool traceMethodExits) : TraceBasicBlockExits(traceBasicBlockExits), TraceMethodExits(traceMethodExits) {} // Add a prototype for printf if it is not already in the program. // bool doPassInitialization(Module *M); //-------------------------------------------------------------------------- // Function InsertCodeToTraceValues // // Inserts tracing code for all live values at basic block and/or method exits // as specified by `traceBasicBlockExits' and `traceMethodExits'. // static bool doit(Method *M, bool traceBasicBlockExits, bool traceMethodExits, Method *Printf); // doPerMethodWork - This method does the work. Always successful. // bool doPerMethodWork(Method *M) { return doit(M, TraceBasicBlockExits, TraceMethodExits, PrintfMeth); } }; #endif
Refactor trace values to work as a proper pass. Before it used to add methods while the pass was running which was a no no. Now it adds the printf method at pass initialization
Refactor trace values to work as a proper pass. Before it used to add methods while the pass was running which was a no no. Now it adds the printf method at pass initialization git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@1456 91177308-0d34-0410-b5e6-96231b3b80d8
C
bsd-2-clause
chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm
a0a4aa34596d60f28287fc386f598608c15ae680
webkit/support/webkit_support_gfx.h
webkit/support/webkit_support_gfx.h
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #define WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #include <string> #include <vector> // TODO(darin): Remove once this #include has been upstreamed to ImageDiff.cpp. // ImageDiff.cpp expects that PATH_MAX has already been defined :-/ #include <limits.h> namespace webkit_support { // Decode a PNG into an RGBA pixel array. bool DecodePNG(const unsigned char* input, size_t input_size, std::vector<unsigned char>* output, int* width, int* height); // Encode an RGBA pixel array into a PNG. bool EncodeRGBAPNG(const unsigned char* input, int width, int height, int row_byte_width, std::vector<unsigned char>* output); // Encode an BGRA pixel array into a PNG. bool EncodeBGRAPNG(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, std::vector<unsigned char>* output); bool EncodeBGRAPNGWithChecksum(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, const std::string& checksum, std::vector<unsigned char>* output); } // namespace webkit_support #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #define WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #include <string> #include <vector> namespace webkit_support { // Decode a PNG into an RGBA pixel array. bool DecodePNG(const unsigned char* input, size_t input_size, std::vector<unsigned char>* output, int* width, int* height); // Encode an RGBA pixel array into a PNG. bool EncodeRGBAPNG(const unsigned char* input, int width, int height, int row_byte_width, std::vector<unsigned char>* output); // Encode an BGRA pixel array into a PNG. bool EncodeBGRAPNG(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, std::vector<unsigned char>* output); bool EncodeBGRAPNGWithChecksum(const unsigned char* input, int width, int height, int row_byte_width, bool discard_transparency, const std::string& checksum, std::vector<unsigned char>* output); } // namespace webkit_support #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_
Remove an include which has been upstreamed to ImageDiff.cpp.
Remove an include which has been upstreamed to ImageDiff.cpp. BUG=none TEST=none Review URL: http://codereview.chromium.org/8392031 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@107382 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
gavinp/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,ropik/chromium,adobe/chromium,ropik/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,adobe/chromium
e1467dbfd5d1068c2dd69511f16bc218475a9396
test/Sema/align-arm-apcs-gnu.c
test/Sema/align-arm-apcs-gnu.c
// RUN: %clang_cc1 -triple arm-unknown-unknown -target-abi apcs-gnu -fsyntax-only -verify %s struct s0 { double f0; int f1; }; char chk0[__alignof__(struct s0) == 4 ? 1 : -1]; double g1; short chk1[__alignof__(g1) == 4 ? 1 : -1]; short chk2[__alignof__(double) == 4 ? 1 : -1]; long long g2; short chk1[__alignof__(g2) == 4 ? 1 : -1]; short chk2[__alignof__(long long) == 4 ? 1 : -1]; _Complex double g3; short chk1[__alignof__(g3) == 4 ? 1 : -1]; short chk2[__alignof__(_Complex double) == 4 ? 1 : -1];
// RUN: %clang_cc1 -triple arm-unknown-unknown -target-abi apcs-gnu -fsyntax-only -verify %s struct s0 { double f0; int f1; }; char chk0[__alignof__(struct s0) == 4 ? 1 : -1];
Fix r135934. Rename was intended, but without additional tests for double.
Fix r135934. Rename was intended, but without additional tests for double. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@135935 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
254b2638962bd632aa52b3102caf418c43ac25b5
test/Driver/masm.c
test/Driver/masm.c
// REQUIRES: x86-registered-target // RUN: %clang -target i386-unknown-linux -masm=intel %s -S -o - | FileCheck --check-prefix=CHECK-INTEL %s // RUN: %clang -target i386-unknown-linux -masm=att %s -S -o - | FileCheck --check-prefix=CHECK-ATT %s // RUN: not %clang -target i386-unknown-linux -masm=somerequired %s -S -o - 2>&1 | FileCheck --check-prefix=CHECK-SOMEREQUIRED %s // REQUIRES: arm-registered-target // RUN: %clang -target arm-unknown-eabi -masm=intel %s -S -o - 2>&1 | FileCheck --check-prefix=CHECK-ARM %s int f() { // CHECK-ATT: movl $0, %eax // CHECK-INTEL: mov eax, 0 // CHECK-SOMEREQUIRED: error: unsupported argument 'somerequired' to option 'masm=' // CHECK-ARM: warning: argument unused during compilation: '-masm=intel' return 0; }
// RUN: %clang -target i386-unknown-linux -masm=intel -S %s -### 2>&1 | FileCheck --check-prefix=CHECK-INTEL %s // RUN: %clang -target i386-unknown-linux -masm=att -S %s -### 2>&1 | FileCheck --check-prefix=CHECK-ATT %s // RUN: %clang -target i386-unknown-linux -S -masm=somerequired %s -### 2>&1 | FileCheck --check-prefix=CHECK-SOMEREQUIRED %s // RUN: %clang -target arm-unknown-eabi -S -masm=intel %s -### 2>&1 | FileCheck --check-prefix=CHECK-ARM %s int f() { // CHECK-INTEL: -x86-asm-syntax=intel // CHECK-ATT: -x86-asm-syntax=att // CHECK-SOMEREQUIRED: error: unsupported argument 'somerequired' to option 'masm=' // CHECK-ARM: warning: argument unused during compilation: '-masm=intel' return 0; }
Make this test target independent.
Make this test target independent. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@208725 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/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,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
6474370f2e67ed392c4685c98f2eb88dce79cff6
src/python_threads.h
src/python_threads.h
#ifndef PYTHON_THREADS #define PYTHON_THREADS #ifdef __EMSCRIPTEN__ static inline void init_python_threads() { } #else #include "Python.h" static inline void init_python_threads() { PyEval_InitThreads(); } #endif #endif
#ifndef PYTHON_THREADS #define PYTHON_THREADS #ifdef __EMSCRIPTEN__ static inline void init_python_threads(void) { } #else #include "Python.h" static inline void init_python_threads(void) { PyEval_InitThreads(); } #endif #endif
Add prototype to prevent warning.
Add prototype to prevent warning.
C
lgpl-2.1
renpy/pygame_sdl2,renpy/pygame_sdl2,renpy/pygame_sdl2,renpy/pygame_sdl2
6cbea9ce7e6598d25648d09987309dafeb794179
shell/android/platform_view_android.h
shell/android/platform_view_android.h
// Copyright 2015 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 SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ #define SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ #include "sky/shell/platform_view.h" struct ANativeWindow; namespace sky { namespace shell { class PlatformViewAndroid : public PlatformView { public: static bool Register(JNIEnv* env); ~PlatformViewAndroid() override; // Called from Java void Detach(JNIEnv* env, jobject obj); void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface); void SurfaceDestroyed(JNIEnv* env, jobject obj); private: void ReleaseWindow(); ANativeWindow* window_; DISALLOW_COPY_AND_ASSIGN(PlatformViewAndroid); }; } // namespace shell } // namespace sky #endif // SKY_SHELL_PLATFORM_VIEW_ANDROID_H_
// Copyright 2015 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 SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ #define SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ #include "sky/shell/platform_view.h" struct ANativeWindow; namespace sky { namespace shell { class PlatformViewAndroid : public PlatformView { public: static bool Register(JNIEnv* env); ~PlatformViewAndroid() override; // Called from Java void Detach(JNIEnv* env, jobject obj); void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface); void SurfaceDestroyed(JNIEnv* env, jobject obj); private: void ReleaseWindow(); DISALLOW_COPY_AND_ASSIGN(PlatformViewAndroid); }; } // namespace shell } // namespace sky #endif // SKY_SHELL_PLATFORM_VIEW_ANDROID_H_
Stop SkyShell from crashing on startup
Stop SkyShell from crashing on startup R=chinmaygarde@google.com Review URL: https://codereview.chromium.org/1178773002.
C
bsd-3-clause
aam/engine,flutter/engine,chinmaygarde/flutter_engine,tvolkert/engine,takaaptech/sky_engine,mxia/engine,chinmaygarde/flutter_engine,jason-simmons/flutter_engine,jason-simmons/flutter_engine,iansf/sky_engine,takaaptech/sky_engine,qiankunshe/sky_engine,mikejurka/engine,chinmaygarde/flutter_engine,krisgiesing/sky_engine,devoncarew/sky_engine,jamesr/sky_engine,Hixie/sky_engine,mdakin/engine,krisgiesing/sky_engine,mpcomplete/engine,iansf/sky_engine,iansf/sky_engine,devoncarew/sky_engine,axinging/sky_engine,jason-simmons/sky_engine,takaaptech/sky_engine,lyceel/engine,flutter/engine,mdakin/engine,jamesr/flutter_engine,chinmaygarde/sky_engine,devoncarew/engine,jamesr/flutter_engine,zhangxq5012/sky_engine,Hixie/sky_engine,mpcomplete/engine,zhangxq5012/sky_engine,flutter/engine,rmacnak-google/engine,mpcomplete/engine,mxia/engine,TribeMedia/sky_engine,mxia/engine,mikejurka/engine,chinmaygarde/sky_engine,qiankunshe/sky_engine,lyceel/engine,jason-simmons/flutter_engine,chinmaygarde/flutter_engine,mpcomplete/engine,jamesr/flutter_engine,jason-simmons/sky_engine,mpcomplete/engine,krisgiesing/sky_engine,jamesr/sky_engine,devoncarew/sky_engine,axinging/sky_engine,mpcomplete/flutter_engine,jamesr/sky_engine,tvolkert/engine,qiankunshe/sky_engine,abarth/sky_engine,TribeMedia/sky_engine,xunmengfeng/engine,krisgiesing/sky_engine,abarth/sky_engine,cdotstout/sky_engine,rmacnak-google/engine,jimsimon/sky_engine,mikejurka/engine,chinmaygarde/flutter_engine,jimsimon/sky_engine,rmacnak-google/engine,flutter/engine,TribeMedia/sky_engine,afandria/sky_engine,xunmengfeng/engine,cdotstout/sky_engine,TribeMedia/sky_engine,devoncarew/sky_engine,cdotstout/sky_engine,mpcomplete/flutter_engine,TribeMedia/sky_engine,mxia/engine,TribeMedia/sky_engine,zhangxq5012/sky_engine,tvolkert/engine,TribeMedia/sky_engine,jamesr/flutter_engine,qiankunshe/sky_engine,qiankunshe/sky_engine,tvolkert/engine,qiankunshe/sky_engine,jimsimon/sky_engine,Hixie/sky_engine,abarth/sky_engine,cdotstout/sky_engine,mpcomplete/engine,chinmaygarde/sky_engine,mikejurka/engine,flutter/engine,jamesr/flutter_engine,cdotstout/sky_engine,devoncarew/engine,afandria/sky_engine,afandria/sky_engine,jamesr/sky_engine,lyceel/engine,mdakin/engine,chinmaygarde/flutter_engine,mxia/engine,devoncarew/engine,qiankunshe/sky_engine,chinmaygarde/sky_engine,Hixie/sky_engine,takaaptech/sky_engine,takaaptech/sky_engine,aam/engine,flutter/engine,devoncarew/sky_engine,mikejurka/engine,lyceel/engine,jason-simmons/flutter_engine,devoncarew/sky_engine,aam/engine,xunmengfeng/engine,afandria/sky_engine,xunmengfeng/engine,afandria/sky_engine,takaaptech/sky_engine,qiankunshe/sky_engine,jamesr/sky_engine,jamesr/flutter_engine,TribeMedia/sky_engine,mpcomplete/flutter_engine,jamesr/flutter_engine,axinging/sky_engine,jason-simmons/sky_engine,xunmengfeng/engine,mdakin/engine,rmacnak-google/engine,jimsimon/sky_engine,abarth/sky_engine,axinging/sky_engine,rmacnak-google/engine,iansf/sky_engine,mpcomplete/engine,afandria/sky_engine,iansf/sky_engine,xunmengfeng/engine,zhangxq5012/sky_engine,Hixie/sky_engine,mdakin/engine,tvolkert/engine,abarth/sky_engine,jamesr/flutter_engine,axinging/sky_engine,jason-simmons/flutter_engine,takaaptech/sky_engine,flutter/engine,Hixie/sky_engine,aam/engine,aam/engine,jason-simmons/flutter_engine,zhangxq5012/sky_engine,Hixie/sky_engine,devoncarew/engine,mxia/engine,aam/engine,devoncarew/sky_engine,axinging/sky_engine,devoncarew/engine,abarth/sky_engine,aam/engine,jason-simmons/sky_engine,axinging/sky_engine,zhangxq5012/sky_engine,zhangxq5012/sky_engine,tvolkert/engine,chinmaygarde/sky_engine,tvolkert/engine,chinmaygarde/sky_engine,mikejurka/engine,krisgiesing/sky_engine,krisgiesing/sky_engine,jimsimon/sky_engine,rmacnak-google/engine,mdakin/engine,devoncarew/engine,jimsimon/sky_engine,jason-simmons/flutter_engine,takaaptech/sky_engine,chinmaygarde/flutter_engine,axinging/sky_engine,jimsimon/sky_engine,devoncarew/engine,mikejurka/engine,iansf/sky_engine,iansf/sky_engine,mikejurka/engine,mpcomplete/flutter_engine,jimsimon/sky_engine,xunmengfeng/engine,zhangxq5012/sky_engine,lyceel/engine,mdakin/engine,mpcomplete/engine,axinging/sky_engine,jimsimon/sky_engine,takaaptech/sky_engine,flutter/engine,jamesr/flutter_engine,chinmaygarde/sky_engine,mpcomplete/flutter_engine,jason-simmons/flutter_engine,iansf/sky_engine,rmacnak-google/engine,mikejurka/engine,aam/engine,afandria/sky_engine,cdotstout/sky_engine,zhangxq5012/sky_engine,cdotstout/sky_engine,jamesr/sky_engine,jamesr/sky_engine,jason-simmons/sky_engine,mxia/engine,lyceel/engine,abarth/sky_engine,jason-simmons/sky_engine,mxia/engine,jason-simmons/sky_engine,lyceel/engine,mpcomplete/flutter_engine,mdakin/engine,krisgiesing/sky_engine,TribeMedia/sky_engine,afandria/sky_engine,Hixie/sky_engine
dfc745d620ad31430ce88ba92007c1289061c0fc
libopenspotify/browse.h
libopenspotify/browse.h
#ifndef LIBOPENSPOTIFY_BROWSE_H #define LIBOPENSPOTIFY_BROWSE_H #include "buf.h" #include "sp_opaque.h" #define BROWSE_RETRY_TIMEOUT 30 int browse_process(sp_session *session, struct request *req); #endif
#ifndef LIBOPENSPOTIFY_BROWSE_H #define LIBOPENSPOTIFY_BROWSE_H #include <spotify/api.h> #include "buf.h" #include "request.h" #define BROWSE_RETRY_TIMEOUT 30 int browse_process(sp_session *session, struct request *req); #endif
Include spotify/api.h and request.h instead of sp_opaque.h
Include spotify/api.h and request.h instead of sp_opaque.h
C
bsd-2-clause
noahwilliamsson/openspotify,noahwilliamsson/openspotify
490fabb3cf7bd259a4d2a26cfece0c0c70564e37
src/loader.h
src/loader.h
/* * Copyright (c) 2014, 2016 Scott Bennett <scottb@fastmail.com> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef LOADER_H #define LOADER_H #include "bool.h" bool load(const char * fileName); #endif /* LOADER_H */
/* * Written by Scott Bennett. * Public domain. */ #ifndef LOADER_H #define LOADER_H #include "bool.h" bool load(const char * fileName); #endif /* LOADER_H */
Move this file into public domain; it's too simple to copyright...
Move this file into public domain; it's too simple to copyright...
C
isc
sbennett1990/YESS,sbennett1990/YESS,sbennett1990/YESS
e2ef60a90646606999399bf1d7de7c189d6c62ca
test/ubsan/TestCases/Misc/unreachable_asan-compatibility.c
test/ubsan/TestCases/Misc/unreachable_asan-compatibility.c
// Ensure compatiblity of UBSan unreachable with ASan in the presence of // noreturn functions // RUN: %clang -O2 -fsanitize=address,unreachable %s -emit-llvm -S -o - | FileCheck %s // REQUIRES: ubsan-asan void bar(void) __attribute__((noreturn)); void foo() { bar(); } // CHECK-LABEL: define void @foo() // CHECK: call void @__asan_handle_no_return // CHECK-NEXT: call void @bar // CHECK-NEXT: call void @__asan_handle_no_return // CHECK-NEXT: call void @__ubsan_handle_builtin_unreachable // CHECK-NEXT: unreachable
// Ensure compatiblity of UBSan unreachable with ASan in the presence of // noreturn functions // RUN: %clang -O2 -fPIC -fsanitize=address,unreachable %s -emit-llvm -S -o - | FileCheck %s // REQUIRES: ubsan-asan void bar(void) __attribute__((noreturn)); void foo() { bar(); } // CHECK-LABEL: define void @foo() // CHECK: call void @__asan_handle_no_return // CHECK-NEXT: call void @bar // CHECK-NEXT: call void @__asan_handle_no_return // CHECK-NEXT: call void @__ubsan_handle_builtin_unreachable // CHECK-NEXT: unreachable
Fix test when isPICDefault() returns false after rCTE352003
[ubsan] Fix test when isPICDefault() returns false after rCTE352003 git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@352013 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
d31d8165f64cd4047a31ff5d5dd831829b1a4ad3
Sources/SPTPersistentCacheResponse+Private.h
Sources/SPTPersistentCacheResponse+Private.h
/* * Copyright (c) 2016 Spotify AB. * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 <SPTPersistentCache/SPTPersistentCacheResponse.h> NSString *NSStringFromSPTPersistentCacheResponseCode(SPTPersistentCacheResponseCode code); @interface SPTPersistentCacheResponse (Private) - (instancetype)initWithResult:(SPTPersistentCacheResponseCode)result error:(NSError *)error record:(SPTPersistentCacheRecord *)record; @end
/* * Copyright (c) 2016 Spotify AB. * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 <SPTPersistentCache/SPTPersistentCacheResponse.h> extern NSString *NSStringFromSPTPersistentCacheResponseCode(SPTPersistentCacheResponseCode code); @interface SPTPersistentCacheResponse (Private) - (instancetype)initWithResult:(SPTPersistentCacheResponseCode)result error:(NSError *)error record:(SPTPersistentCacheRecord *)record; @end
Add missing 'extern' when declaring NSStringFromSPTPersistentCacheResponseCode in header
Add missing 'extern' when declaring NSStringFromSPTPersistentCacheResponseCode in header
C
apache-2.0
chrisbtreats/SPTPersistentCache,FootballAddicts/SPTPersistentCache,iOSCowboy/SPTPersistentCache,iOSCowboy/SPTPersistentCache,FootballAddicts/SPTPersistentCache,chrisbtreats/SPTPersistentCache,spotify/SPTPersistentCache,spotify/SPTPersistentCache,chrisbtreats/SPTPersistentCache,FootballAddicts/SPTPersistentCache,spotify/SPTPersistentCache,FootballAddicts/SPTPersistentCache,iOSCowboy/SPTPersistentCache,chrisbtreats/SPTPersistentCache
4d0af5772e2a6865ce246e4a191279663b70d70b
simulator/simulator.h
simulator/simulator.h
/* * simulator.h - interface for simulator * Copyright 2018 MIPT-MIPS */ #ifndef SIMULATOR_H #define SIMULATOR_H #include <memory.h> #include <infra/types.h> #include <infra/log.h> class Simulator : public Log { public: Simulator( bool log = false) : Log( log) {} virtual void run(const std::string& tr, uint64 instrs_to_run) = 0; static std::unique_ptr<Simulator> create_simulator(const std::string& isa, bool functional_only, bool log); }; #endif // SIMULATOR_H
/* * simulator.h - interface for simulator * Copyright 2018 MIPT-MIPS */ #ifndef SIMULATOR_H #define SIMULATOR_H #include <memory.h> #include <infra/types.h> #include <infra/log.h> class Simulator : public Log { public: explicit Simulator( bool log = false) : Log( log) {} virtual void run(const std::string& tr, uint64 instrs_to_run) = 0; static std::unique_ptr<Simulator> create_simulator(const std::string& isa, bool functional_only, bool log); }; #endif // SIMULATOR_H
Add explicit specifier to Simulator ctor
Add explicit specifier to Simulator ctor
C
mit
MIPT-ILab/mipt-mips,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips,MIPT-ILab/mipt-mips-2015
ea3949ce981b558e47c28ca09a56095368ddf34a
src/memdumper.c
src/memdumper.c
#include <stdio.h> #include "memdumper.h" static const char HEX[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', }; void byteToHex(char byte, char* output) { output[0] = HEX[(byte >> 4) & 0x0F]; output[1] = HEX[byte & 0x0F]; } void dumpMemoryAsHex(char* data, char* dataEnd, int count) { static char hexbuff[2]; int i = 0; while(i < count) { if(&data[i] >= dataEnd) break; byteToHex(data[i++], hexbuff); printf("%s ", hexbuff); } /* Print padding */ for( ; i < count; i++) { printf(".. "); } } void dumpMemoryAsASCII(char* data, char* dataEnd, int count) { int i = 0; while(i < count) { char c; if(&data[i] >= dataEnd) break; c = data[i++]; printf("%c", (c < ' ' || c == (char)(127)) ? '.' : c); } /* Print padding */ for( ; i < count; i++) { printf("."); } }
#include <stdio.h> #include "memdumper.h" static const char HEX[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', }; void byteToHex(char byte, char* output) { output[0] = HEX[(byte >> 4) & 0x0F]; output[1] = HEX[byte & 0x0F]; } void dumpMemoryAsHex(char* data, char* dataEnd, int count) { static char hexbuff[3] = {0, 0, 0}; int i = 0; while(i < count) { if(&data[i] >= dataEnd) break; byteToHex(data[i++], hexbuff); printf("%s ", hexbuff); } /* Print padding */ for( ; i < count; i++) { printf(".. "); } } void dumpMemoryAsASCII(char* data, char* dataEnd, int count) { int i = 0; while(i < count) { char c; if(&data[i] >= dataEnd) break; c = data[i++]; printf("%c", (c < ' ' || c == (char)(127)) ? '.' : c); } /* Print padding */ for( ; i < count; i++) { printf("."); } }
Make hex string buffer guarantee a null terminator
Make hex string buffer guarantee a null terminator
C
mit
drdanick/apricos-fs-manager