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
02d72c81af73bdd765beb3af9b7915209e18a747
atom/common/common_message_generator.h
atom/common/common_message_generator.h
// Copyright (c) 2014 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. // Multiply-included file, no traditional include guard. #include "atom/common/api/api_messages.h" #include "chrome/common/print_messages.h" #include "chrome/common/tts_messages.h" #include "chrome/common/widevine_cdm_messages.h"
// Copyright (c) 2014 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. // Multiply-included file, no traditional include guard. #include "atom/common/api/api_messages.h" #include "chrome/common/print_messages.h" #include "chrome/common/tts_messages.h" #include "chrome/common/widevine_cdm_messages.h" #include "chrome/common/chrome_utility_messages.h"
Fix linking problem with IPC::MessageT
Fix linking problem with IPC::MessageT IPC::MessageT<ChromeUtilityHostMsg_ProcessStarted_Meta, std::__1::tuple<>, void>::MessageT(IPC::Routing)
C
mit
seanchas116/electron,shiftkey/electron,shiftkey/electron,Floato/electron,brenca/electron,thompsonemerson/electron,thomsonreuters/electron,jhen0409/electron,tinydew4/electron,twolfson/electron,tonyganch/electron,tonyganch/electron,aichingm/electron,kcrt/electron,stevekinney/electron,kokdemo/electron,the-ress/electron,stevekinney/electron,noikiy/electron,gabriel/electron,rajatsingla28/electron,miniak/electron,electron/electron,brave/electron,dongjoon-hyun/electron,rajatsingla28/electron,gerhardberger/electron,thompsonemerson/electron,bpasero/electron,gabriel/electron,tinydew4/electron,twolfson/electron,gerhardberger/electron,kokdemo/electron,shiftkey/electron,rajatsingla28/electron,brave/muon,rajatsingla28/electron,tinydew4/electron,wan-qy/electron,leethomas/electron,preco21/electron,seanchas116/electron,kokdemo/electron,miniak/electron,leethomas/electron,the-ress/electron,posix4e/electron,wan-qy/electron,shiftkey/electron,thomsonreuters/electron,brave/electron,rreimann/electron,miniak/electron,gerhardberger/electron,MaxWhere/electron,renaesop/electron,MaxWhere/electron,bpasero/electron,gabriel/electron,jhen0409/electron,kcrt/electron,deed02392/electron,voidbridge/electron,brave/muon,aliib/electron,aichingm/electron,shiftkey/electron,aliib/electron,renaesop/electron,noikiy/electron,brave/muon,bpasero/electron,leethomas/electron,aliib/electron,gerhardberger/electron,biblerule/UMCTelnetHub,preco21/electron,stevekinney/electron,aichingm/electron,biblerule/UMCTelnetHub,electron/electron,thompsonemerson/electron,MaxWhere/electron,joaomoreno/atom-shell,gabriel/electron,dongjoon-hyun/electron,thomsonreuters/electron,Floato/electron,noikiy/electron,leethomas/electron,the-ress/electron,thompsonemerson/electron,leethomas/electron,rajatsingla28/electron,bpasero/electron,tinydew4/electron,MaxWhere/electron,minggo/electron,tinydew4/electron,deed02392/electron,joaomoreno/atom-shell,rreimann/electron,voidbridge/electron,preco21/electron,thomsonreuters/electron,wan-qy/electron,rajatsingla28/electron,bbondy/electron,preco21/electron,minggo/electron,gabriel/electron,wan-qy/electron,seanchas116/electron,kcrt/electron,bpasero/electron,tonyganch/electron,renaesop/electron,Floato/electron,dongjoon-hyun/electron,stevekinney/electron,preco21/electron,brave/muon,Gerhut/electron,rreimann/electron,Floato/electron,gerhardberger/electron,tonyganch/electron,noikiy/electron,biblerule/UMCTelnetHub,twolfson/electron,kokdemo/electron,deed02392/electron,Gerhut/electron,preco21/electron,stevekinney/electron,miniak/electron,joaomoreno/atom-shell,aliib/electron,gerhardberger/electron,dongjoon-hyun/electron,voidbridge/electron,thomsonreuters/electron,Floato/electron,jhen0409/electron,aichingm/electron,deed02392/electron,voidbridge/electron,seanchas116/electron,brenca/electron,posix4e/electron,minggo/electron,bbondy/electron,brenca/electron,thompsonemerson/electron,kokdemo/electron,aliib/electron,bbondy/electron,gerhardberger/electron,kcrt/electron,Gerhut/electron,the-ress/electron,the-ress/electron,stevekinney/electron,bpasero/electron,brenca/electron,aliib/electron,Gerhut/electron,bbondy/electron,rreimann/electron,electron/electron,renaesop/electron,twolfson/electron,Floato/electron,noikiy/electron,kcrt/electron,thomsonreuters/electron,biblerule/UMCTelnetHub,brave/electron,wan-qy/electron,kcrt/electron,leethomas/electron,shiftkey/electron,joaomoreno/atom-shell,brenca/electron,minggo/electron,bbondy/electron,brenca/electron,biblerule/UMCTelnetHub,joaomoreno/atom-shell,seanchas116/electron,tonyganch/electron,bbondy/electron,posix4e/electron,dongjoon-hyun/electron,brave/electron,jhen0409/electron,dongjoon-hyun/electron,brave/electron,tonyganch/electron,brave/electron,voidbridge/electron,brave/muon,posix4e/electron,biblerule/UMCTelnetHub,deed02392/electron,posix4e/electron,Gerhut/electron,electron/electron,electron/electron,minggo/electron,twolfson/electron,MaxWhere/electron,Gerhut/electron,jhen0409/electron,noikiy/electron,electron/electron,the-ress/electron,renaesop/electron,aichingm/electron,rreimann/electron,voidbridge/electron,bpasero/electron,renaesop/electron,thompsonemerson/electron,jhen0409/electron,MaxWhere/electron,tinydew4/electron,electron/electron,deed02392/electron,kokdemo/electron,twolfson/electron,brave/muon,posix4e/electron,miniak/electron,rreimann/electron,wan-qy/electron,seanchas116/electron,joaomoreno/atom-shell,aichingm/electron,minggo/electron,miniak/electron,gabriel/electron,the-ress/electron
851b80ea96383be2e95f36b238f390e9c2f9880e
Include/boolobject.h
Include/boolobject.h
/* Boolean object interface */ typedef PyIntObject PyBoolObject; extern DL_IMPORT(PyTypeObject) PyBool_Type; #define PyBool_Check(x) ((x)->ob_type == &PyBool_Type) /* Py_False and Py_True are the only two bools in existence. Don't forget to apply Py_INCREF() when returning either!!! */ /* Don't use these directly */ extern DL_IMPORT(PyIntObject) _Py_ZeroStruct, _Py_TrueStruct; /* Use these macros */ #define Py_False ((PyObject *) &_Py_ZeroStruct) #define Py_True ((PyObject *) &_Py_TrueStruct) /* Function to return a bool from a C long */ PyObject *PyBool_FromLong(long);
/* Boolean object interface */ #ifndef Py_BOOLOBJECT_H #define Py_BOOLOBJECT_H #ifdef __cplusplus extern "C" { #endif typedef PyIntObject PyBoolObject; extern DL_IMPORT(PyTypeObject) PyBool_Type; #define PyBool_Check(x) ((x)->ob_type == &PyBool_Type) /* Py_False and Py_True are the only two bools in existence. Don't forget to apply Py_INCREF() when returning either!!! */ /* Don't use these directly */ extern DL_IMPORT(PyIntObject) _Py_ZeroStruct, _Py_TrueStruct; /* Use these macros */ #define Py_False ((PyObject *) &_Py_ZeroStruct) #define Py_True ((PyObject *) &_Py_TrueStruct) /* Function to return a bool from a C long */ PyObject *PyBool_FromLong(long); #ifdef __cplusplus } #endif #endif /* !Py_BOOLOBJECT_H */
Add standard header preamble and footer, a-la intobject.h. Main purpose is extern "C" for C++ programs.
Add standard header preamble and footer, a-la intobject.h. Main purpose is extern "C" for C++ programs.
C
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
aad15687e0b91cba541cb939df092a15dbf43ae5
src/core/kms-utils.c
src/core/kms-utils.c
#include <gst/gst.h> #include "kms-core.h" static GstElement *pipe = NULL; static G_LOCK_DEFINE(mutex); static gboolean init = FALSE; static gboolean bus_watch(GstBus *bus, GstMessage *message, gpointer data) { KMS_LOG_DEBUG("TODO: implement bus watcher\n"); return TRUE; } void kms_init(gint *argc, gchar **argv[]) { G_LOCK(mutex); if (!init) { GstBus *bus; g_type_init(); gst_init(argc, argv); pipe = gst_pipeline_new(NULL); gst_element_set_state(pipe, GST_STATE_PLAYING); bus = gst_element_get_bus(pipe); gst_bus_add_watch(bus, bus_watch, NULL); init = TRUE; } G_UNLOCK(mutex); } GstElement* kms_get_pipeline() { return pipe; }
#include <gst/gst.h> #include "kms-core.h" static GstElement *pipe = NULL; static G_LOCK_DEFINE(mutex); static gboolean init = FALSE; static gpointer gstreamer_thread(gpointer data) { GMainLoop *loop; loop = g_main_loop_new(NULL, TRUE); g_main_loop_run(loop); return NULL; } void kms_init(gint *argc, gchar **argv[]) { G_LOCK(mutex); if (!init) { GstBus *bus; g_type_init(); gst_init(argc, argv); pipe = gst_pipeline_new(NULL); gst_element_set_state(pipe, GST_STATE_PLAYING); bus = gst_element_get_bus(pipe); gst_bus_add_watch(bus, gst_bus_async_signal_func, NULL); g_thread_create(gstreamer_thread, NULL, TRUE, NULL); init = TRUE; } G_UNLOCK(mutex); } GstElement* kms_get_pipeline() { return pipe; }
Make all bus events to be signals
Make all bus events to be signals
C
lgpl-2.1
shelsonjava/kurento-media-server,mparis/kurento-media-server,todotobe1/kurento-media-server,todotobe1/kurento-media-server,lulufei/kurento-media-server,TribeMedia/kurento-media-server,shelsonjava/kurento-media-server,Kurento/kurento-media-server,lulufei/kurento-media-server,mparis/kurento-media-server,Kurento/kurento-media-server,TribeMedia/kurento-media-server
b817c6cc5a0231a0ad9bb1e71a69a15df05e4d80
cmacros/effectless.h
cmacros/effectless.h
#ifndef _EFFECTLESS #define EFFECTLESS /* Macros without multiple execution of side-effects. */ /* Generic min and max without double execution of side-effects: http://stackoverflow.com/questions/3437404/min-and-max-in-c */ #define _CHOOSE(boolop, a, b, uid) \ ({ \ decltype(a) _a_ ## uid = (a); \ decltype(b) _b_ ## uid = (b); \ (a) boolop (b) ? (a) : (b); \ }) #undef MIN #undef MAX #define MIN(a, b) _CHOOSE(<, a, b, __COUNTER__) #define MAX(a, b) _CHOOSE(>, a, b, __COUNTER__) #endif
#ifndef _EFFECTLESS #define EFFECTLESS /* Macros without multiple execution of side-effects. */ /* Generic min and max without double execution of side-effects: http://stackoverflow.com/questions/3437404/min-and-max-in-c */ #define _CHOOSE(boolop, a, b, uid) \ ({ \ decltype(a) _a_ ## uid = (a); \ decltype(b) _b_ ## uid = (b); \ (_a_ ## uid) boolop (_b_ ## uid) ? (_a_ ## uid) : (_b_ ## uid); \ }) #undef MIN #undef MAX #define MIN(a, b) _CHOOSE(<, a, b, __COUNTER__) #define MAX(a, b) _CHOOSE(>, a, b, __COUNTER__) #endif
Fix `_CHOOSE` to use the copies instead of double execution of side-effects (issue reported by tromp at bitcointalk.org)
Fix `_CHOOSE` to use the copies instead of double execution of side-effects (issue reported by tromp at bitcointalk.org)
C
unlicense
shelby3/cmacros,shelby3/cmacros
ab2bf7a582302431dec4de7ec7f1434fdac6ebac
mudlib/mud/home/Help/initd.c
mudlib/mud/home/Help/initd.c
/* * This file is part of Kotaka, a mud library for DGD * http://github.com/shentino/kotaka * * Copyright (C) 2009, 2012, 2013, 2014 Raymond Jennings * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <kotaka/paths/bigstruct.h> #include <kotaka/paths/system.h> #include <kotaka/privilege.h> inherit LIB_INITD; inherit UTILITY_COMPILE; static void create() { KERNELD->set_global_access("Help", 1); load_dir("obj", 1); load_dir("sys", 1); }
/* * This file is part of Kotaka, a mud library for DGD * http://github.com/shentino/kotaka * * Copyright (C) 2009, 2012, 2013, 2014 Raymond Jennings * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <kotaka/paths/bigstruct.h> #include <kotaka/paths/system.h> #include <kotaka/privilege.h> inherit LIB_INITD; inherit UTILITY_COMPILE; static void create() { KERNELD->set_global_access("Help", 1); load_dir("obj", 1); load_dir("sys", 1); } void do_upgrade() { INITD->shutdown_subsystem("Help"); }
Make gutted help subsystem shut itself down on next upgrade
Make gutted help subsystem shut itself down on next upgrade
C
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
76de586faadc195b372248b8f52e66568c31ec1a
src/port/getrusage.c
src/port/getrusage.c
#include "../sccs.h" #ifdef WIN32 #include <psapi.h> u64 maxrss(void) { PROCESS_MEMORY_COUNTERS cnt; if (GetProcessMemoryInfo(GetCurrentProcess(), &cnt, sizeof(cnt))) { return (cnt.PeakWorkingSetSize); } return (0); } #else #include <sys/resource.h> u64 maxrss(void) { struct rusage ru; if (!getrusage(RUSAGE_SELF, &ru)) return (1024 * ru.ru_maxrss); return (0); } #endif
#include "../sccs.h" #ifdef WIN32 #include <psapi.h> u64 maxrss(void) { PROCESS_MEMORY_COUNTERS cnt; if (GetProcessMemoryInfo(GetCurrentProcess(), &cnt, sizeof(cnt))) { return (cnt.PeakWorkingSetSize); } return (0); } #else #include <sys/resource.h> u64 maxrss(void) { struct rusage ru; #if defined(sun) int factor = getpagesize(); #elif defined(__APPLE__) int factor = 1; #else int factor = 1024; #endif if (getrusage(RUSAGE_SELF, &ru)) return (0); return (ru.ru_maxrss * factor); } #endif
Adjust for the fact that MacOS X and Solaris report maxrss in different units.
Adjust for the fact that MacOS X and Solaris report maxrss in different units. bk: 5489ebbfQIN1Wbpf9Qa4aY-VK6F8xw
C
apache-2.0
bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper
54d4ca4f7db1a12316b03a839710437765f5273a
src/ZeroField.h
src/ZeroField.h
#ifndef __ZERO_FIELD_H__ #define __ZERO_FIELD_H__ #include "Field.h" namespace cigma { class ZeroField; } class cigma::ZeroField : public cigma::Field { public: ZeroField(); ~ZeroField(); void set_shape(int dim, int rank); public: int n_dim() { return dim; } int n_rank() { return rank; } FieldType getType() { return USER_FIELD; } public: bool eval(double *point, double *value); public: int dim; int rank; }; #endif
#ifndef __ZERO_FIELD_H__ #define __ZERO_FIELD_H__ #include "UserField.h" namespace cigma { class ZeroField; } class cigma::ZeroField : public cigma::UserField { public: ZeroField(); ~ZeroField(); void set_shape(int dim, int rank); public: int n_dim() { return dim; } int n_rank() { return rank; } public: bool eval(double *point, double *value); public: int dim; int rank; }; #endif
Make zero a user field
Make zero a user field
C
lgpl-2.1
geodynamics/cigma,geodynamics/cigma,geodynamics/cigma,geodynamics/cigma,geodynamics/cigma
2f329161a12024e003427fc98e2ce6b7cfcfce48
MORK/MORK.h
MORK/MORK.h
// // MORK.h // MORK // // Created by Nolan Carroll on 4/23/15. // Copyright (c) 2015 Medidata Solutions. All rights reserved. // #import <UIKit/UIKit.h> #import "ORKTaskResult+MORK.h" #import "ORKQuestionResult+MORK.h" //! Project version number for MORK. FOUNDATION_EXPORT double MORKVersionNumber; //! Project version string for MORK. FOUNDATION_EXPORT const unsigned char MORKVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <MORK/PublicHeader.h>
// // MORK.h // MORK // // Created by Nolan Carroll on 4/23/15. // Copyright (c) 2015 Medidata Solutions. All rights reserved. // #import <UIKit/UIKit.h> #import "ORKCollectionResult+MORK.h" #import "ORKQuestionResult+MORK.h" //! Project version number for MORK. FOUNDATION_EXPORT double MORKVersionNumber; //! Project version string for MORK. FOUNDATION_EXPORT const unsigned char MORKVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <MORK/PublicHeader.h>
Update import in main header file
Update import in main header file
C
mit
mdsol/MORK,mdsol/MORK
cae22b0d5dbd38fff95f3730914ae03e12e7b5bd
core/metacling/inc/LinkDef.h
core/metacling/inc/LinkDef.h
/* @(#)root/meta:$Id: 4660ec009138a70261265c65fc5a10398706fbd1 $ */ /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifdef __CINT__ #pragma link C++ class TCling; #endif
/* @(#)root/meta:$Id$ */ /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifdef __CINT__ #pragma link C++ class TCling; #endif
Clean up versioning commit hash.
Clean up versioning commit hash.
C
lgpl-2.1
karies/root,root-mirror/root,agarciamontoro/root,bbockelm/root,zzxuanyuan/root,root-mirror/root,bbockelm/root,karies/root,gbitzes/root,zzxuanyuan/root,mhuwiler/rootauto,gbitzes/root,gganis/root,karies/root,zzxuanyuan/root,agarciamontoro/root,olifre/root,BerserkerTroll/root,buuck/root,karies/root,bbockelm/root,mhuwiler/rootauto,root-mirror/root,BerserkerTroll/root,zzxuanyuan/root,simonpf/root,satyarth934/root,abhinavmoudgil95/root,mhuwiler/rootauto,olifre/root,karies/root,buuck/root,gganis/root,olifre/root,abhinavmoudgil95/root,BerserkerTroll/root,agarciamontoro/root,mhuwiler/rootauto,root-mirror/root,abhinavmoudgil95/root,zzxuanyuan/root,beniz/root,olifre/root,agarciamontoro/root,zzxuanyuan/root,zzxuanyuan/root-compressor-dummy,davidlt/root,satyarth934/root,davidlt/root,agarciamontoro/root,mhuwiler/rootauto,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,root-mirror/root,simonpf/root,satyarth934/root,bbockelm/root,karies/root,beniz/root,karies/root,zzxuanyuan/root-compressor-dummy,gganis/root,zzxuanyuan/root-compressor-dummy,beniz/root,satyarth934/root,simonpf/root,davidlt/root,mhuwiler/rootauto,buuck/root,agarciamontoro/root,satyarth934/root,agarciamontoro/root,buuck/root,BerserkerTroll/root,BerserkerTroll/root,abhinavmoudgil95/root,abhinavmoudgil95/root,bbockelm/root,davidlt/root,gganis/root,abhinavmoudgil95/root,gbitzes/root,buuck/root,zzxuanyuan/root,beniz/root,olifre/root,agarciamontoro/root,agarciamontoro/root,davidlt/root,zzxuanyuan/root,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root,gbitzes/root,satyarth934/root,root-mirror/root,zzxuanyuan/root-compressor-dummy,root-mirror/root,zzxuanyuan/root-compressor-dummy,gganis/root,abhinavmoudgil95/root,olifre/root,satyarth934/root,zzxuanyuan/root,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,beniz/root,satyarth934/root,davidlt/root,bbockelm/root,satyarth934/root,BerserkerTroll/root,bbockelm/root,simonpf/root,gbitzes/root,gbitzes/root,gganis/root,abhinavmoudgil95/root,agarciamontoro/root,mhuwiler/rootauto,davidlt/root,zzxuanyuan/root-compressor-dummy,mhuwiler/rootauto,olifre/root,mhuwiler/rootauto,BerserkerTroll/root,karies/root,mhuwiler/rootauto,satyarth934/root,beniz/root,buuck/root,gbitzes/root,simonpf/root,gbitzes/root,davidlt/root,gganis/root,buuck/root,zzxuanyuan/root,gganis/root,olifre/root,beniz/root,bbockelm/root,root-mirror/root,simonpf/root,beniz/root,bbockelm/root,buuck/root,agarciamontoro/root,zzxuanyuan/root,olifre/root,olifre/root,mhuwiler/rootauto,abhinavmoudgil95/root,zzxuanyuan/root-compressor-dummy,abhinavmoudgil95/root,gganis/root,beniz/root,simonpf/root,root-mirror/root,davidlt/root,olifre/root,buuck/root,gbitzes/root,buuck/root,davidlt/root,karies/root,beniz/root,simonpf/root,root-mirror/root,gbitzes/root,abhinavmoudgil95/root,simonpf/root,gganis/root,bbockelm/root,gbitzes/root,bbockelm/root,gganis/root,karies/root,satyarth934/root,simonpf/root,karies/root,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,BerserkerTroll/root,buuck/root,davidlt/root,simonpf/root,root-mirror/root,beniz/root
ec47d75d7c8610c81b402d20885ecf2f5e80c784
test/CodeGen/forwarding-blocks-if.c
test/CodeGen/forwarding-blocks-if.c
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // Check that no empty blocks are generated for nested ifs. extern void func(); int f0(int val) { if (val == 0) { func(); } else if (val == 1) { func(); } return 0; } // CHECK-LABEL: define i32 @f0 // CHECK: call void {{.*}} @func // CHECK: call void {{.*}} @func // CHECK: br label %[[RETBLOCK1:[^ ]*]] // CHECK: [[RETBLOCK1]]: // CHECK-NOT: br label // CHECK: ret i32 int f1(int val, int g) { if (val == 0) if (g == 1) { func(); } return 0; } // CHECK-LABEL: define i32 @f1 // CHECK: call void {{.*}} @func // CHECK: br label %[[RETBLOCK2:[^ ]*]] // CHECK: [[RETBLOCK2]]: // CHECK-NOT: br label // CHECK: ret i32
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // Check that no empty blocks are generated for nested ifs. extern void func(); int f0(int val) { if (val == 0) { func(); } else if (val == 1) { func(); } return 0; } // CHECK-LABEL: define {{.*}} i32 @f0 // CHECK: call void {{.*}} @func // CHECK: call void {{.*}} @func // CHECK: br label %[[RETBLOCK1:[^ ]*]] // CHECK: [[RETBLOCK1]]: // CHECK-NOT: br label // CHECK: ret i32 int f1(int val, int g) { if (val == 0) if (g == 1) { func(); } return 0; } // CHECK-LABEL: define {{.*}} i32 @f1 // CHECK: call void {{.*}} @func // CHECK: br label %[[RETBLOCK2:[^ ]*]] // CHECK: [[RETBLOCK2]]: // CHECK-NOT: br label // CHECK: ret i32
Fix test submitted with r275115 (failed on ppc64 buildbots).
Fix test submitted with r275115 (failed on ppc64 buildbots). git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@275127 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
e4dfaad868cf5f29058a081422cdb4420d853311
7segments.c
7segments.c
#define L for(char*c=a[1],y;*c;)printf("%c%c%c%c",(y="w$]m.k{%\177o"[*c++-48])&u/4?124:32,y&u?95:32,y&u/2?124:32,*c?32:10);u*=8; main(int u,char**a){u=1;L;L;L}
#define L for(char*c=a[1],y;*c;)printf("%c%c%c%c",(y="w$]m.k{%\177o"[*c++-48])&u/4?33:32,y&u?95:32,y&u/2?33:32,*c?32:10);u*=8; main(int u,char**a){u=1;L;L;L}
Use ! instead of |, looks nicer also saves two bytes
Use ! instead of |, looks nicer also saves two bytes
C
mit
McZonk/7segements,McZonk/7segements
faf1826dc91d379da0258dc23adc115a5a42890d
texor.c
texor.c
#include <unistd.h> int main() { char c; while (read(STDIN_FILENO, &c, 1) == 1 && c!= 'q'); return 0; }
#include <termios.h> #include <unistd.h> void enableRawMode() { struct termios raw; tcgetattr(STDIN_FILENO, &raw); raw.c_lflag &= ~(ECHO); tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw); } int main() { enableRawMode(); char c; while (read(STDIN_FILENO, &c, 1) == 1 && c!= 'q'); return 0; }
Enable raw mode in terminal
Enable raw mode in terminal
C
bsd-2-clause
kyletolle/texor
e9d185a4d126adf5ea6c27fc4d6dc1a55cb104e4
Python/strtod.c
Python/strtod.c
/* This is not a proper strtod() implementation, but sufficient for Python. Python won't detect floating point constant overflow, though. */ extern int strlen(); extern double atof(); double strtod(p, pp) char *p; char **pp; { if (pp) *pp = p + strlen(p); return atof(p); }
/* This is not a proper strtod() implementation, but sufficient for Python. Python won't detect floating point constant overflow, though. */ extern int errno; extern int strlen(); extern double atof(); double strtod(p, pp) char *p; char **pp; { double res; if (pp) *pp = p + strlen(p); res = atof(p); errno = 0; return res; }
Clear errno, just to be sure.
Clear errno, just to be sure.
C
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
ad5f95a1151e450413b45f81eb1f8b9b70974e68
Sources/NimbleObjectiveC/NMBStringify.h
Sources/NimbleObjectiveC/NMBStringify.h
@class NSString; /** * Returns a string appropriate for displaying in test output * from the provided value. * * @param value A value that will show up in a test's output. * * @return The string that is returned can be * customized per type by conforming a type to the `TestOutputStringConvertible` * protocol. When stringifying a non-`TestOutputStringConvertible` type, this * function will return the value's debug description and then its * normal description if available and in that order. Otherwise it * will return the result of constructing a string from the value. * * @see `TestOutputStringConvertible` */ extern NSString *_Nonnull NMBStringify(id _Nullable anyObject) __attribute__((warn_unused_result));
@class NSString; /** * Returns a string appropriate for displaying in test output * from the provided value. * * @param anyObject A value that will show up in a test's output. * * @return The string that is returned can be * customized per type by conforming a type to the `TestOutputStringConvertible` * protocol. When stringifying a non-`TestOutputStringConvertible` type, this * function will return the value's debug description and then its * normal description if available and in that order. Otherwise it * will return the result of constructing a string from the value. * * @see `TestOutputStringConvertible` */ extern NSString *_Nonnull NMBStringify(id _Nullable anyObject) __attribute__((warn_unused_result));
Fix documentation parameter name warnings
Fix documentation parameter name warnings value is not matching `anyObject`
C
apache-2.0
abbeycode/Nimble,Quick/Nimble,twobitlabs/Nimble,twobitlabs/Nimble,AnthonyMDev/Nimble,phatblat/Nimble,abbeycode/Nimble,phatblat/Nimble,Quick/Nimble,phatblat/Nimble,DanielAsher/Nimble,DanielAsher/Nimble,AnthonyMDev/Nimble,Quick/Nimble,abbeycode/Nimble,twobitlabs/Nimble,DanielAsher/Nimble,abbeycode/Nimble,AnthonyMDev/Nimble
82f655c48263612edfc4e145bc5da18ca25cf8ec
3RVX/DiskInfo.h
3RVX/DiskInfo.h
#pragma once #include <Windows.h> #include <string> class DiskInfo { public: DiskInfo(wchar_t driveLetter); static std::wstring DriveFileName(wchar_t &driveLetter); static std::wstring DriveFileName(std::wstring &driveLetter); private: HANDLE _devHandle; };
#pragma once #include <Windows.h> #include <string> class DiskInfo { public: DiskInfo(wchar_t driveLetter); static std::wstring DriveFileName(wchar_t &driveLetter); static std::wstring DriveFileName(std::wstring &driveLetter); private: HANDLE _devHandle; std::wstring _productId; std::wstring _vendorId; };
Add member variables for storing disk info
Add member variables for storing disk info
C
bsd-2-clause
malensek/3RVX,malensek/3RVX,malensek/3RVX
9f59142ee7ca004fb39be638463ad0ef0ba3a713
alura/c/forca.c
alura/c/forca.c
#include <stdio.h> int main() { char palavrasecreta[20]; sprintf(palavrasecreta, "MELANCIA"); printf("%s\n", palavrasecreta); /* palavrasecreta[0] = 'M'; palavrasecreta[1] = 'E'; palavrasecreta[2] = 'L'; palavrasecreta[3] = 'A'; palavrasecreta[4] = 'N'; palavrasecreta[5] = 'C'; palavrasecreta[6] = 'I'; palavrasecreta[7] = 'A'; printf("%c%c%c%c%c%c%c%c\n", palavrasecreta[0], palavrasecreta[1], palavrasecreta[2], palavrasecreta[3], palavrasecreta[4], palavrasecreta[5], palavrasecreta[6], palavrasecreta[7]); */ }
#include <stdio.h> int main() { char palavrasecreta[20]; sprintf(palavrasecreta, "MELANCIA"); printf("%s\n", palavrasecreta); /* palavrasecreta[0] = 'M'; palavrasecreta[1] = 'E'; palavrasecreta[2] = 'L'; palavrasecreta[3] = 'A'; palavrasecreta[4] = 'N'; palavrasecreta[5] = 'C'; palavrasecreta[6] = 'I'; palavrasecreta[7] = 'A'; palavrasecreta[8] = '\0'; printf("%c%c%c%c%c%c%c%c\n", palavrasecreta[0], palavrasecreta[1], palavrasecreta[2], palavrasecreta[3], palavrasecreta[4], palavrasecreta[5], palavrasecreta[6], palavrasecreta[7]); */ }
Update files, Alura, Introdução a C - Parte 2, Aula 2.2
Update files, Alura, Introdução a C - Parte 2, Aula 2.2
C
mit
fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs
b57aae70855946e5e6a223f10b29af082937e20c
BBBAPI/BBBAPI/Classes/BBAAPIErrors.h
BBBAPI/BBBAPI/Classes/BBAAPIErrors.h
// // BBAAPIErrors.h // BBAAPI // // Created by Owen Worley on 11/08/2014. // Copyright (c) 2014 Blinkbox Books. All rights reserved. // NS_ENUM(NSInteger, BBAAPIError) { /** * Used when needed parameter is not supplied to the method * or when object is supplied but it has wrong type or * for example one of it's needed properties is not set */ BBAAPIWrongUsage = 700, /** * Error returned when for any reason API call cannot connect to the server */ BBAAPIErrorCouldNotConnect = 701, /** * Returned when call cannot be authenticated, or when server returns 401 */ BBAAPIErrorUnauthorised = 702, /** * Used when server cannot find a resource and returns 404 */ BBAAPIErrorNotFound = 703, /** * Used when server returns 500 */ BBAAPIServerError = 704, /** * Used when server returns 403 */ BBAAPIErrorForbidden = 705, /** * Used when we cannot decode or read data returned from the server */ BBAAPIUnreadableData = 706, };
// // BBAAPIErrors.h // BBAAPI // // Created by Owen Worley on 11/08/2014. // Copyright (c) 2014 Blinkbox Books. All rights reserved. // NS_ENUM(NSInteger, BBAAPIError) { /** * Used when needed parameter is not supplied to the method * or when object is supplied but it has wrong type or * for example one of it's needed properties is not set */ BBAAPIWrongUsage = 700, /** * Error returned when for any reason API call cannot connect to the server */ BBAAPIErrorCouldNotConnect = 701, /** * Returned when call cannot be authenticated, or when server returns 401 */ BBAAPIErrorUnauthorised = 702, /** * Used when server cannot find a resource and returns 404 */ BBAAPIErrorNotFound = 703, /** * Used when server returns 500 */ BBAAPIServerError = 704, /** * Used when server returns 403 */ BBAAPIErrorForbidden = 705, /** * Used when we cannot decode or read data returned from the server */ BBAAPIUnreadableData = 706, /** * Used when the server returns a 400 (Bad Request) */ BBAAPIBadRequest = 707, };
Add Bad Request error code
Add Bad Request error code
C
mit
blinkboxbooks/blinkbox-network.objc,blinkboxbooks/blinkbox-network.objc
2d67979dc01cb98b74941246685e9853439dd4a8
blocklist.h
blocklist.h
#ifndef SQREDIR_BLOCKLIST_H #define SQREDIR_BLOCKLIST_H #include <cstdio> #include <string> using namespace std; // reads the given configuration file // returns: true/false for success/failure bool read_config(string filename); // tries to match the Squid request & writes the response to the output stream // input: a request line as passed by Squid // output: response output stream (usually stdout) void match_and_reply(const char* input, FILE* output); #endif
#ifndef SQREDIR_BLOCKLIST_H #define SQREDIR_BLOCKLIST_H #include <cstdio> #include <string> // reads the given configuration file // returns: true/false for success/failure bool read_config(std::string filename); // tries to match the Squid request & writes the response to the output stream // input: a request line as passed by Squid // output: response output stream (usually stdout) void match_and_reply(const char* input, FILE* output); #endif
Remove 'using' directive from header, explicitly qualify std namespace.
Remove 'using' directive from header, explicitly qualify std namespace.
C
apache-2.0
hhoffstaette/sqredir
b60ffe69ae77c59e05f2f3985955b0034ba93b7a
MC/JPetMCDecayTree/JPetMCDecayTree.h
MC/JPetMCDecayTree/JPetMCDecayTree.h
/** * @copyright Copyright 2018 The J-PET Framework Authors. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may find a copy of the License in the LICENCE file. * * 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. * * @file JPetMCDecayTree.h */ #ifndef _JPETMCHIT_H_ #define _JPETMCHIT_H_ #include "./JPetHit/JPetHit.h" /** * @brief Data class representing a hit of a photon in the scintillator strip based on Monte Carlo simulation. * */ class JPetMCDecayTree : public TObject { public: JPetMCDecayTree(); private: UInt_t fMCMCDecayTreeIndex = 0u; UInt_t fMCVtxIndex = 0u; UInt_t fnVertices = 0u; UInt_t fnTracks = 0u; // add also track and vertices structures ClassDef(JPetMCDecayTree, 1); }; #endif
/** * @copyright Copyright 2018 The J-PET Framework Authors. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may find a copy of the License in the LICENCE file. * * 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. * * @file JPetMCDecayTree.h */ #ifndef _JPETMCDECAYTREE_H_ #define _JPETMCDECAYTREE_H_ #include "./JPetHit/JPetHit.h" /** * @brief Data class representing a hit of a photon in the scintillator strip based on Monte Carlo simulation. * */ class JPetMCDecayTree : public TObject { public: JPetMCDecayTree(); private: UInt_t fMCMCDecayTreeIndex = 0u; UInt_t fMCVtxIndex = 0u; UInt_t fnVertices = 0u; UInt_t fnTracks = 0u; // add also track and vertices structures ClassDef(JPetMCDecayTree, 1); }; #endif
Change header guard name to do not colide with JPetMCHit
Change header guard name to do not colide with JPetMCHit
C
apache-2.0
JPETTomography/j-pet-framework,JPETTomography/j-pet-framework,JPETTomography/j-pet-framework
0aad78ead3cc061a0cb6135ba8833ba5edc491d3
Sources/Mile/Components/ActorComponent.h
Sources/Mile/Components/ActorComponent.h
#pragma once #include "MileObject.h" namespace Mile { /** * ActorComponent Actor ߰ ִ ϴ Component ⺻ ŬԴϴ. */ class Actor; class MILE_API ActorComponent : public MileObject { friend Actor; public: ActorComponent( const MString& NewName ) : bIsTick( false ), OwnerPrivate( nullptr ), TickPriority( 0 ), MileObject( NewName ) { } ActorComponent( ActorComponent&& MovedObject ) : OwnerPrivate( MovedObject.OwnerPrivate ), bIsTick( MovedObject.bIsTick ), TickPriority( MovedObject.TickPriority ), MileObject( std::move( MovedObject ) ) { this->SetOwner( MovedObject.GetOwner( ) ); MovedObject.SetOwner( nullptr ); MovedObject.bIsTick = false; MovedObject.TickPriority = UINT64_MAX; } ActorComponent& operator=( ActorComponent&& MovedObject ) = delete; void SetOwner( Actor* Owner, bool bIsDetachBeforeSetNewOwner = true ); virtual void SetOwnerRecursively( Actor* NewOwner, bool bIsDetachBeforeSetNewOwner = true ); FORCEINLINE Actor* GetOwner( ) const { return OwnerPrivate; } virtual void TickComponent( float DeltaTime ) {} private: Actor* OwnerPrivate; public: bool bIsTick; uint64 TickPriority; }; }
#pragma once #include "MileObject.h" namespace Mile { /** * ActorComponent Actor ߰ ִ ϴ Component ⺻ ŬԴϴ. */ class Actor; class MILE_API ActorComponent : public MileObject { friend Actor; public: ActorComponent( const MString& NewName ) : bIsTick( false ), OwnerPrivate( nullptr ), TickPriority( 0 ), MileObject( NewName ) { } ActorComponent( ActorComponent&& MovedObject ) : OwnerPrivate( MovedObject.OwnerPrivate ), bIsTick( MovedObject.bIsTick ), TickPriority( MovedObject.TickPriority ), MileObject( std::move( MovedObject ) ) { this->SetOwner( MovedObject.GetOwner( ) ); MovedObject.SetOwner( nullptr ); MovedObject.bIsTick = false; MovedObject.TickPriority = UINT64_MAX; } ActorComponent& operator=( ActorComponent&& MovedObject ) = delete; void SetOwner( Actor* Owner, bool bIsDetachBeforeSetNewOwner = true ); virtual void SetOwnerRecursively( Actor* NewOwner, bool bIsDetachBeforeSetNewOwner = true ); FORCEINLINE Actor* GetOwner( ) const { return OwnerPrivate; } virtual void Tick( float DeltaTime ) { UNUSED_PARAM( DeltaTime ); } private: Actor* OwnerPrivate; bool bIsTick; uint64 TickPriority; }; }
Delete TickComponent ( because of tick manager )
Delete TickComponent ( because of tick manager )
C
mit
HoRangDev/MileEngine,HoRangDev/MileEngine
25955e1264eec2fec804d7786e2f640bf9e0d189
src/platforms/esp/32/led_sysdefs_esp32.h
src/platforms/esp/32/led_sysdefs_esp32.h
#pragma once #include "esp32-hal.h" #ifndef ESP32 #define ESP32 #endif #define FASTLED_ESP32 #if CONFIG_IDF_TARGET_ARCH_RISCV #define FASTLED_RISCV #endif #if CONFIG_IDF_TARGET_ARCH_XTENSA || CONFIG_XTENSA_IMPL #define FASTLED_XTENSA #endif // Use system millis timer #define FASTLED_HAS_MILLIS typedef volatile uint32_t RoReg; typedef volatile uint32_t RwReg; typedef unsigned long prog_uint32_t; // Default to NOT using PROGMEM here #ifndef FASTLED_USE_PROGMEM # define FASTLED_USE_PROGMEM 0 #endif #ifndef FASTLED_ALLOW_INTERRUPTS # define FASTLED_ALLOW_INTERRUPTS 1 # define INTERRUPT_THRESHOLD 0 #endif #define NEED_CXX_BITS // These can be overridden # define FASTLED_ESP32_RAW_PIN_ORDER
#pragma once #include "esp32-hal.h" #ifndef ESP32 #define ESP32 #endif #define FASTLED_ESP32 #if CONFIG_IDF_TARGET_ARCH_RISCV #define FASTLED_RISCV #else #define FASTLED_XTENSA #endif // Handling for older versions of ESP32 Arduino core #if !defined(ESP_IDF_VERSION) // Older versions of ESP_IDF only supported ESP32 #define CONFIG_IDF_TARGET_ESP32 1 // Define missing version macros. Hard code older version 3.0 since actual version is unknown #define ESP_IDF_VERSION_VAL(major, minor, patch) ((major << 16) | (minor << 8) | (patch)) #define ESP_IDF_VERSION ESP_IDF_VERSION_VAL(3, 0, 0) #endif // Use system millis timer #define FASTLED_HAS_MILLIS typedef volatile uint32_t RoReg; typedef volatile uint32_t RwReg; typedef unsigned long prog_uint32_t; // Default to NOT using PROGMEM here #ifndef FASTLED_USE_PROGMEM # define FASTLED_USE_PROGMEM 0 #endif #ifndef FASTLED_ALLOW_INTERRUPTS # define FASTLED_ALLOW_INTERRUPTS 1 # define INTERRUPT_THRESHOLD 0 #endif #define NEED_CXX_BITS // These can be overridden # define FASTLED_ESP32_RAW_PIN_ORDER
Improve compatibility with older ESP32 Arduino core versions
Improve compatibility with older ESP32 Arduino core versions
C
mit
FastLED/FastLED,FastLED/FastLED,FastLED/FastLED,FastLED/FastLED
72f1d4f87a8a107ceaddb455fca34c59737e1d33
mudlib/mud/home/Bigstruct/lib/base/node.c
mudlib/mud/home/Bigstruct/lib/base/node.c
/* * This file is part of Kotaka, a mud library for DGD * http://github.com/shentino/kotaka * * Copyright (C) 2012 Raymond Jennings * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <kotaka/assert.h> #include <kotaka/paths.h> #include <kotaka/privilege.h> #include <kotaka/log.h> private object root; static void create() { root = previous_object(); } static void destruct() { } static void check_caller() { ACCESS_CHECK(previous_object() == root); } nomask object query_root() { return root; }
/* * This file is part of Kotaka, a mud library for DGD * http://github.com/shentino/kotaka * * Copyright (C) 2012 Raymond Jennings * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <kotaka/assert.h> #include <kotaka/paths.h> #include <kotaka/privilege.h> #include <kotaka/log.h> private object root; static void create() { root = previous_object(); } static void destruct() { } static void check_caller() { ASSERT(root); ACCESS_CHECK(previous_object() == root); } nomask object query_root() { return root; }
Add another debug check to bigstructs
Add another debug check to bigstructs
C
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
dbc4a86f3cf652826ad0b0ad2528535273f581c3
core/core.h
core/core.h
#if defined(WIN32) || defined(_WIN32) || \ defined(__WIN32) && !defined(__CYGWIN__) #include <BaseTsd.h> #include <windows.h> typedef SSIZE_T ssize_t; #endif #ifndef _WIN32 #include <unistd.h> #endif #include <inttypes.h> typedef char *String; typedef char *Pattern; typedef int64_t Long; #if defined NDEBUG #define CHK_INDEX(i, n) #else #define CHK_INDEX_FORMAT_STRING ":%u: bad index: %zd < %zd\n" #define CHK_INDEX(i, n) \ do { \ size_t __si = (size_t)i; \ size_t __ni = (size_t)n; \ if (!(__si < __ni)) { \ printf(__FILE__ CHK_INDEX_FORMAT_STRING, __LINE__, (ssize_t)i, \ (ssize_t)n); \ abort(); \ } \ } while (0) #endif // Array typedef struct { size_t len; size_t capacity; void *data; } Array; // Lambdas typedef struct { void *callback; void *env; void *delete; void *copy; } Lambda; typedef void *LambdaEnv;
#if defined(WIN32) || defined(_WIN32) || \ defined(__WIN32) && !defined(__CYGWIN__) #include <BaseTsd.h> #include <windows.h> typedef SSIZE_T ssize_t; #define SIZE_T_FORMAT_SPECIFIER "%ld" #endif #ifndef _WIN32 #include <unistd.h> #define SIZE_T_FORMAT_SPECIFIER "%zd" #endif #include <inttypes.h> typedef char *String; typedef char *Pattern; typedef int64_t Long; #if defined NDEBUG #define CHK_INDEX(i, n) #else #define CHK_INDEX_FORMAT_STRING ":%u: bad index: " SIZE_T_FORMAT_SPECIFIER " < " SIZE_T_FORMAT_SPECIFIER "\n" #define CHK_INDEX(i, n) \ do { \ size_t __si = (size_t)i; \ size_t __ni = (size_t)n; \ if (!(__si < __ni)) { \ printf(__FILE__ CHK_INDEX_FORMAT_STRING, __LINE__, (ssize_t)i, \ (ssize_t)n); \ abort(); \ } \ } while (0) #endif // Array typedef struct { size_t len; size_t capacity; void *data; } Array; // Lambdas typedef struct { void *callback; void *env; void *delete; void *copy; } Lambda; typedef void *LambdaEnv;
Use other format specifers on Windows.
Use other format specifers on Windows.
C
apache-2.0
carp-lang/Carp,eriksvedang/Carp,eriksvedang/Carp,carp-lang/Carp,carp-lang/Carp
1afc2d2704568e5d587eb2ceb18802a4d9bdf7af
core/cortex-m0/config_core.h
core/cortex-m0/config_core.h
/* Copyright 2014 The Chromium OS 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 __CROS_EC_CONFIG_CORE_H #define __CROS_EC_CONFIG_CORE_H /* Linker binary architecture and format */ #define BFD_ARCH arm #define BFD_FORMAT "elf32-littlearm" /* Emulate the CLZ/CTZ instructions since the CPU core is lacking support */ #define CONFIG_SOFTWARE_CLZ #define CONFIG_SOFTWARE_CTZ #define CONFIG_SOFTWARE_PANIC #define CONFIG_ASSEMBLY_MULA32 #endif /* __CROS_EC_CONFIG_CORE_H */
/* Copyright 2014 The Chromium OS 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 __CROS_EC_CONFIG_CORE_H #define __CROS_EC_CONFIG_CORE_H /* Linker binary architecture and format */ #define BFD_ARCH arm #define BFD_FORMAT "elf32-littlearm" /* * Emulate the CLZ/CTZ instructions since the CPU core is lacking support. * When building with clang, we rely on compiler_rt to provide this support. */ #ifndef __clang__ #define CONFIG_SOFTWARE_CLZ #define CONFIG_SOFTWARE_CTZ #endif /* __clang__ */ #define CONFIG_SOFTWARE_PANIC #define CONFIG_ASSEMBLY_MULA32 #endif /* __CROS_EC_CONFIG_CORE_H */
Use compiler_rt version of clz and ctz
core/cortex-m0: Use compiler_rt version of clz and ctz Use __clzsi2 and __ctzsi2 from compiler_rt instead of our own version. Using the compiler_rt versions result in a slightly smaller image. servo_micro before this change: RO: 18744 bytes in flash remaining RW: 23192 bytes in flash remaining servo_micro after this change: RO: 18808 bytes in flash remaining RW: 23256 bytes in flash remaining BRANCH=none BUG=b:172020503 TEST=CC=clang make BOARD=servo_micro TEST=make buildall Signed-off-by: Tom Hughes <fc5c12f30a5ed2baa0581f44ee14ad1eb7b20d83@chromium.org> Change-Id: Ibc19a3670127dde211fb20d247c1284d0aec5f61 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3199739 Reviewed-by: Jack Rosenthal <d3f605bef1867f59845d4ce6e4f83b8dc9e4e0ae@chromium.org>
C
bsd-3-clause
coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec
173dee2eb85f7d8ea0ca491f3683382ae8754ca7
include/effects/SkStippleMaskFilter.h
include/effects/SkStippleMaskFilter.h
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkStippleMaskFilter_DEFINED #define SkStippleMaskFilter_DEFINED #include "SkMaskFilter.h" /** * Simple MaskFilter that creates a screen door stipple pattern */ class SkStippleMaskFilter : public SkMaskFilter { public: SkStippleMaskFilter() : INHERITED() { } virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix& matrix, SkIPoint* margin) SK_OVERRIDE; // getFormat is from SkMaskFilter virtual SkMask::Format getFormat() SK_OVERRIDE { return SkMask::kA8_Format; } SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkStippleMaskFilter); protected: SkStippleMaskFilter::SkStippleMaskFilter(SkFlattenableReadBuffer& buffer) : SkMaskFilter(buffer) { } private: typedef SkMaskFilter INHERITED; }; #endif // SkStippleMaskFilter_DEFINED
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkStippleMaskFilter_DEFINED #define SkStippleMaskFilter_DEFINED #include "SkMaskFilter.h" /** * Simple MaskFilter that creates a screen door stipple pattern */ class SkStippleMaskFilter : public SkMaskFilter { public: SkStippleMaskFilter() : INHERITED() { } virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix& matrix, SkIPoint* margin) SK_OVERRIDE; // getFormat is from SkMaskFilter virtual SkMask::Format getFormat() SK_OVERRIDE { return SkMask::kA8_Format; } SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkStippleMaskFilter); protected: SkStippleMaskFilter(SkFlattenableReadBuffer& buffer) : SkMaskFilter(buffer) { } private: typedef SkMaskFilter INHERITED; }; #endif // SkStippleMaskFilter_DEFINED
Fix for compiler error in r4154
Fix for compiler error in r4154 git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@4155 2bbb7eff-a529-9590-31e7-b0007b416f81
C
bsd-3-clause
mrobinson/skia,mrobinson/skia,metajack/skia,metajack/skia,mrobinson/skia,mrobinson/skia,Cue/skia,Cue/skia,metajack/skia,mrobinson/skia,Cue/skia,metajack/skia,Cue/skia
f0fb14cade4f14185481851a739313bf81d4f8c6
include/samplers/stratified_sampler.h
include/samplers/stratified_sampler.h
#ifndef STRATIFIED_SAMPLER_H #define STRATIFIED_SAMPLER_H #include <random> #include <memory> #include <array> #include <vector> #include "sampler.h" /* * A stratified sampler, generates multipled jittered * samples per pixel in its sample region */ class StratifiedSampler : public Sampler { const int spp; std::mt19937 rng; std::uniform_real_distribution<float> distrib; public: StratifiedSampler(int x_start, int x_end, int y_start, int y_end, int spp); /* * Get some {x, y} positions to sample in the space being sampled * If the sampler has finished sampling samples will be empty */ void get_samples(std::vector<Sample> &samples) override; /* * Get subsamplers that divide the space to be sampled * into count disjoint subsections where each samples a w x h * section of the original sampler */ std::vector<std::unique_ptr<Sampler>> get_subsamplers(int w, int h) const override; private: /* * Generate a 2d pattern of stratified samples and return them * sample positions will be normalized between [0, 1) */ void sample2d(std::vector<Sample> &samples); }; #endif
#ifndef STRATIFIED_SAMPLER_H #define STRATIFIED_SAMPLER_H #include <random> #include <memory> #include <array> #include <vector> #include "sampler.h" /* * A stratified sampler, generates multipled jittered * samples per pixel in its sample region */ class StratifiedSampler : public Sampler { const int spp; std::minstd_rand rng; std::uniform_real_distribution<float> distrib; public: StratifiedSampler(int x_start, int x_end, int y_start, int y_end, int spp); /* * Get some {x, y} positions to sample in the space being sampled * If the sampler has finished sampling samples will be empty */ void get_samples(std::vector<Sample> &samples) override; /* * Get subsamplers that divide the space to be sampled * into count disjoint subsections where each samples a w x h * section of the original sampler */ std::vector<std::unique_ptr<Sampler>> get_subsamplers(int w, int h) const override; private: /* * Generate a 2d pattern of stratified samples and return them * sample positions will be normalized between [0, 1) */ void sample2d(std::vector<Sample> &samples); }; #endif
Fix stratified sampler to use minstd_rand
Fix stratified sampler to use minstd_rand still unsure why mt19937 suddenly started segfaulting
C
mit
Twinklebear/tray,Twinklebear/tray
d536ccd55ebdcded7dddc53f93022b0366d6739c
OrbitGl/ThreadStateTrack.h
OrbitGl/ThreadStateTrack.h
// Copyright (c) 2020 The Orbit 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 ORBIT_GL_THREAD_STATE_TRACK_H_ #define ORBIT_GL_THREAD_STATE_TRACK_H_ #include "Track.h" // This is a track dedicated to displaying thread states in different colors // and with the corresponding tooltips. // It is a thin sub-track of ThreadTrack, added above the callstack track (EventTrack). // The colors are determined only by the states, not by the color assigned to the thread. class ThreadStateTrack final : public Track { public: ThreadStateTrack(TimeGraph* time_graph, int32_t thread_id); Type GetType() const override { return kThreadStateTrack; } void Draw(GlCanvas* canvas, PickingMode picking_mode, float z_offset) override; void UpdatePrimitives(uint64_t min_tick, uint64_t max_tick, PickingMode picking_mode, float z_offset) override; void OnPick(int x, int y) override; void OnRelease() override { picked_ = false; }; float GetHeight() const override { return size_[1]; } bool IsEmpty() const; private: std::string GetThreadStateSliceTooltip(PickingId id) const; }; #endif // ORBIT_GL_THREAD_STATE_TRACK_H_
// Copyright (c) 2020 The Orbit 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 ORBIT_GL_THREAD_STATE_TRACK_H_ #define ORBIT_GL_THREAD_STATE_TRACK_H_ #include "Track.h" // This is a track dedicated to displaying thread states in different colors // and with the corresponding tooltips. // It is a thin sub-track of ThreadTrack, added above the callstack track (EventTrack). // The colors are determined only by the states, not by the color assigned to the thread. class ThreadStateTrack final : public Track { public: ThreadStateTrack(TimeGraph* time_graph, int32_t thread_id); Type GetType() const override { return kThreadStateTrack; } void Draw(GlCanvas* canvas, PickingMode picking_mode, float z_offset) override; void UpdatePrimitives(uint64_t min_tick, uint64_t max_tick, PickingMode picking_mode, float z_offset) override; void OnPick(int x, int y) override; void OnDrag(int, int) override {} void OnRelease() override { picked_ = false; }; float GetHeight() const override { return size_[1]; } bool IsEmpty() const; private: std::string GetThreadStateSliceTooltip(PickingId id) const; }; #endif // ORBIT_GL_THREAD_STATE_TRACK_H_
Fix crash when dragging a thread state track
Fix crash when dragging a thread state track Only when you have enabled track_ordering_feature, this class inherit OnDrag from Track and crashed. Related to b/173093860.
C
bsd-2-clause
google/orbit,google/orbit,google/orbit,google/orbit
27ce98404fc179d292bfc53f1c6b937b5b988461
oak/server/logging_channel.h
oak/server/logging_channel.h
/* * Copyright 2019 The Project Oak Authors * * 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 OAK_SERVER_LOGGING_CHANNEL_H #define OAK_SERVER_LOGGING_CHANNEL_H #include "oak/server/channel.h" namespace oak { // A channel implementation that only has a send half, which logs to stderr the data written to it. class LoggingChannelHalf final : public ChannelHalf { public: uint32_t Write(absl::Span<const char> data) override { std::string log_message(data.cbegin(), data.cend()); LOG(INFO) << "LOG: " << log_message; }; }; } // namespace oak #endif // OAK_SERVER_LOGGING_CHANNEL_H
/* * Copyright 2019 The Project Oak Authors * * 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 OAK_SERVER_LOGGING_CHANNEL_H #define OAK_SERVER_LOGGING_CHANNEL_H #include "oak/server/channel.h" namespace oak { // A channel implementation that only has a send half, which logs to stderr the data written to it. class LoggingChannelHalf final : public ChannelHalf { public: uint32_t Write(absl::Span<const char> data) override { std::string log_message(data.cbegin(), data.cend()); LOG(INFO) << "LOG: " << log_message; return data.size(); } }; } // namespace oak #endif // OAK_SERVER_LOGGING_CHANNEL_H
Fix return value for logging channel write
Fix return value for logging channel write
C
apache-2.0
project-oak/oak,project-oak/oak,project-oak/oak,project-oak/oak,project-oak/oak,project-oak/oak,project-oak/oak
7883bff6a155c116fd60000f10a2d4dd4c06b411
src/Pythia/stdafx.h
src/Pythia/stdafx.h
#pragma once #ifdef _WIN32 #include <SDKDDKVer.h> //#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers // Windows Header Files: #include <windows.h> #define tstring std::wstring #define WidenHelper(x) L##x #define LITERAL(x) WidenHelper(x) #else // ifdef _WIN32 #define tstring std::string #define LITERAL(x) (x) #endif /* Don't let Python.h #define (v)snprintf as macro because they are implemented properly in Visual Studio since 2015. */ #if defined(_MSC_VER) && _MSC_VER >= 1900 # define HAVE_SNPRINTF 1 #endif #include <queue> #include <random> #include <string> #include <vector> #include <unordered_set> #include <unordered_map> #include "third_party/spdlog/spdlog.h"
#pragma once #ifdef _WIN32 #include <SDKDDKVer.h> //#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers // Windows Header Files: #include <windows.h> #define tstring std::wstring #define WidenHelper(x) L##x #define LITERAL(x) WidenHelper(x) #else // ifdef _WIN32 #define tstring std::string #define LITERAL(x) (x) // Prevents this error: Failed getting file size from fd: Value too large for defined data type #define _FILE_OFFSET_BITS 64 #endif /* Don't let Python.h #define (v)snprintf as macro because they are implemented properly in Visual Studio since 2015. */ #if defined(_MSC_VER) && _MSC_VER >= 1900 # define HAVE_SNPRINTF 1 #endif #include <queue> #include <random> #include <string> #include <vector> #include <unordered_set> #include <unordered_map> #include "third_party/spdlog/spdlog.h"
Fix the spdlog issue on 32bit systems: Failed getting file size from fd
Fix the spdlog issue on 32bit systems: Failed getting file size from fd
C
mit
overfl0/Pythia,overfl0/Pythia,overfl0/Pythia,overfl0/Pythia
b010d64f92a5b1c17aff474a6a7fcc872cb747d5
test/CFrontend/2005-12-04-AttributeUsed.c
test/CFrontend/2005-12-04-AttributeUsed.c
// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llvm-dis | grep llvm.used | grep foo | grep X int X __attribute__((used)); int Y; void foo() __attribute__((used)); void foo() {}
// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llvm-dis | grep llvm.used | grep foo | grep X int X __attribute__((used)); int Y; __attribute__((used)) void foo() {}
Adjust this to the wonky syntax that GCC expects.
Adjust this to the wonky syntax that GCC expects. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@30670 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm
839be02ee16872973c68acfe3fad9e51c57c8c5e
src/backend/nodes/nodes.c
src/backend/nodes/nodes.c
/*------------------------------------------------------------------------- * * nodes.c * support code for nodes (now that we get rid of the home-brew * inheritance system, our support code for nodes get much simpler) * * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION * $PostgreSQL: pgsql/src/backend/nodes/nodes.c,v 1.22 2003/11/29 19:51:49 pgsql Exp $ * * HISTORY * Andrew Yu Oct 20, 1994 file creation * *------------------------------------------------------------------------- */ #include "postgres.h" #include "nodes/nodes.h" /* * Support for newNode() macro */ Node *newNodeMacroHolder;
/*------------------------------------------------------------------------- * * nodes.c * support code for nodes (now that we have removed the home-brew * inheritance system, our support code for nodes is much simpler) * * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION * $PostgreSQL: pgsql/src/backend/nodes/nodes.c,v 1.23 2004/05/06 06:11:01 neilc Exp $ * * HISTORY * Andrew Yu Oct 20, 1994 file creation * *------------------------------------------------------------------------- */ #include "postgres.h" #include "nodes/nodes.h" /* * Support for newNode() macro */ Node *newNodeMacroHolder;
Fix grammatical error in comment.
Fix grammatical error in comment.
C
apache-2.0
lintzc/gpdb,Quikling/gpdb,ovr/postgres-xl,greenplum-db/gpdb,Postgres-XL/Postgres-XL,edespino/gpdb,arcivanov/postgres-xl,snaga/postgres-xl,cjcjameson/gpdb,Chibin/gpdb,atris/gpdb,tpostgres-projects/tPostgres,postmind-net/postgres-xl,janebeckman/gpdb,techdragon/Postgres-XL,xinzweb/gpdb,randomtask1155/gpdb,Chibin/gpdb,xuegang/gpdb,adam8157/gpdb,xinzweb/gpdb,0x0FFF/gpdb,50wu/gpdb,techdragon/Postgres-XL,rubikloud/gpdb,ahachete/gpdb,xuegang/gpdb,ahachete/gpdb,lintzc/gpdb,Quikling/gpdb,tpostgres-projects/tPostgres,zaksoup/gpdb,foyzur/gpdb,lisakowen/gpdb,lpetrov-pivotal/gpdb,zeroae/postgres-xl,adam8157/gpdb,xuegang/gpdb,ahachete/gpdb,lisakowen/gpdb,zeroae/postgres-xl,lisakowen/gpdb,yuanzhao/gpdb,snaga/postgres-xl,rvs/gpdb,kaknikhil/gpdb,xinzweb/gpdb,ashwinstar/gpdb,zaksoup/gpdb,xuegang/gpdb,arcivanov/postgres-xl,cjcjameson/gpdb,CraigHarris/gpdb,rvs/gpdb,lintzc/gpdb,lpetrov-pivotal/gpdb,kaknikhil/gpdb,jmcatamney/gpdb,zaksoup/gpdb,cjcjameson/gpdb,jmcatamney/gpdb,atris/gpdb,adam8157/gpdb,CraigHarris/gpdb,greenplum-db/gpdb,CraigHarris/gpdb,cjcjameson/gpdb,yazun/postgres-xl,xuegang/gpdb,chrishajas/gpdb,yuanzhao/gpdb,ahachete/gpdb,adam8157/gpdb,50wu/gpdb,kmjungersen/PostgresXL,Postgres-XL/Postgres-XL,yuanzhao/gpdb,lpetrov-pivotal/gpdb,chrishajas/gpdb,edespino/gpdb,tangp3/gpdb,0x0FFF/gpdb,xuegang/gpdb,pavanvd/postgres-xl,adam8157/gpdb,rubikloud/gpdb,jmcatamney/gpdb,rvs/gpdb,ovr/postgres-xl,foyzur/gpdb,cjcjameson/gpdb,edespino/gpdb,Chibin/gpdb,tangp3/gpdb,rvs/gpdb,royc1/gpdb,Quikling/gpdb,tangp3/gpdb,0x0FFF/gpdb,foyzur/gpdb,cjcjameson/gpdb,kmjungersen/PostgresXL,ahachete/gpdb,tangp3/gpdb,tangp3/gpdb,royc1/gpdb,randomtask1155/gpdb,50wu/gpdb,royc1/gpdb,yazun/postgres-xl,jmcatamney/gpdb,lisakowen/gpdb,0x0FFF/gpdb,0x0FFF/gpdb,zaksoup/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,Quikling/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,50wu/gpdb,arcivanov/postgres-xl,greenplum-db/gpdb,zeroae/postgres-xl,randomtask1155/gpdb,rubikloud/gpdb,edespino/gpdb,chrishajas/gpdb,tangp3/gpdb,xuegang/gpdb,0x0FFF/gpdb,Quikling/gpdb,zaksoup/gpdb,oberstet/postgres-xl,Chibin/gpdb,Chibin/gpdb,kaknikhil/gpdb,postmind-net/postgres-xl,royc1/gpdb,cjcjameson/gpdb,Chibin/gpdb,arcivanov/postgres-xl,kaknikhil/gpdb,cjcjameson/gpdb,yazun/postgres-xl,50wu/gpdb,CraigHarris/gpdb,Quikling/gpdb,rubikloud/gpdb,pavanvd/postgres-xl,greenplum-db/gpdb,ahachete/gpdb,CraigHarris/gpdb,kaknikhil/gpdb,arcivanov/postgres-xl,atris/gpdb,ovr/postgres-xl,Quikling/gpdb,CraigHarris/gpdb,randomtask1155/gpdb,randomtask1155/gpdb,yuanzhao/gpdb,oberstet/postgres-xl,janebeckman/gpdb,chrishajas/gpdb,Quikling/gpdb,xuegang/gpdb,rubikloud/gpdb,rvs/gpdb,edespino/gpdb,Quikling/gpdb,royc1/gpdb,50wu/gpdb,chrishajas/gpdb,janebeckman/gpdb,randomtask1155/gpdb,foyzur/gpdb,ashwinstar/gpdb,adam8157/gpdb,kaknikhil/gpdb,zeroae/postgres-xl,Chibin/gpdb,lintzc/gpdb,Postgres-XL/Postgres-XL,snaga/postgres-xl,snaga/postgres-xl,lisakowen/gpdb,edespino/gpdb,Chibin/gpdb,tpostgres-projects/tPostgres,randomtask1155/gpdb,50wu/gpdb,jmcatamney/gpdb,yazun/postgres-xl,lpetrov-pivotal/gpdb,atris/gpdb,xuegang/gpdb,lpetrov-pivotal/gpdb,postmind-net/postgres-xl,ashwinstar/gpdb,janebeckman/gpdb,ashwinstar/gpdb,Postgres-XL/Postgres-XL,greenplum-db/gpdb,ovr/postgres-xl,pavanvd/postgres-xl,Chibin/gpdb,janebeckman/gpdb,rvs/gpdb,chrishajas/gpdb,Chibin/gpdb,greenplum-db/gpdb,ahachete/gpdb,ashwinstar/gpdb,rvs/gpdb,kaknikhil/gpdb,lpetrov-pivotal/gpdb,atris/gpdb,lintzc/gpdb,edespino/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,pavanvd/postgres-xl,ahachete/gpdb,rubikloud/gpdb,rvs/gpdb,lintzc/gpdb,lisakowen/gpdb,Quikling/gpdb,jmcatamney/gpdb,rvs/gpdb,adam8157/gpdb,zaksoup/gpdb,foyzur/gpdb,zeroae/postgres-xl,janebeckman/gpdb,tangp3/gpdb,lintzc/gpdb,CraigHarris/gpdb,oberstet/postgres-xl,kaknikhil/gpdb,foyzur/gpdb,ashwinstar/gpdb,janebeckman/gpdb,janebeckman/gpdb,royc1/gpdb,rubikloud/gpdb,edespino/gpdb,Postgres-XL/Postgres-XL,royc1/gpdb,janebeckman/gpdb,kmjungersen/PostgresXL,zaksoup/gpdb,xinzweb/gpdb,rvs/gpdb,lintzc/gpdb,lisakowen/gpdb,techdragon/Postgres-XL,kaknikhil/gpdb,atris/gpdb,postmind-net/postgres-xl,kmjungersen/PostgresXL,edespino/gpdb,CraigHarris/gpdb,kmjungersen/PostgresXL,xinzweb/gpdb,yuanzhao/gpdb,techdragon/Postgres-XL,zaksoup/gpdb,randomtask1155/gpdb,royc1/gpdb,CraigHarris/gpdb,tpostgres-projects/tPostgres,adam8157/gpdb,chrishajas/gpdb,chrishajas/gpdb,tangp3/gpdb,lisakowen/gpdb,greenplum-db/gpdb,50wu/gpdb,yazun/postgres-xl,arcivanov/postgres-xl,ashwinstar/gpdb,yuanzhao/gpdb,foyzur/gpdb,ashwinstar/gpdb,lintzc/gpdb,yuanzhao/gpdb,edespino/gpdb,oberstet/postgres-xl,rubikloud/gpdb,atris/gpdb,ovr/postgres-xl,postmind-net/postgres-xl,atris/gpdb,foyzur/gpdb,xinzweb/gpdb,lpetrov-pivotal/gpdb,xinzweb/gpdb,xinzweb/gpdb,oberstet/postgres-xl,techdragon/Postgres-XL,lpetrov-pivotal/gpdb,yuanzhao/gpdb,0x0FFF/gpdb,0x0FFF/gpdb,janebeckman/gpdb,tpostgres-projects/tPostgres,pavanvd/postgres-xl,snaga/postgres-xl
76665d06735e1b15af877bcaceae645d77488b55
Source/Library/Object/HCThrowsException.h
Source/Library/Object/HCThrowsException.h
// OCHamcrest by Jon Reid, http://qualitycoding.org/about/ // Copyright 2015 hamcrest.org. See LICENSE.txt #import <OCHamcrest/HCDiagnosingMatcher.h> /*! * @abstract Does executing a block throw an exception which satisfies a nested matcher? */ @interface HCThrowsException : HCDiagnosingMatcher - (id)initWithExceptionMatcher:(id)exceptionMatcher; @end FOUNDATION_EXPORT id HC_throwsException(id exceptionMatcher); #ifndef HC_DISABLE_SHORT_SYNTAX /*! * @abstract Creates a matcher that matches when the examined object is a block which, when * executed, throws an exception satisfying the specified matcher. * @param exceptionMatcher The matcher to satisfy when passed the exception. * @discussion * <b>Example</b><br /> * <pre>assertThat(^{ [obj somethingBad]; }, throwsException(anything())</pre> * * <b>Name Clash</b><br /> * In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym * HC_throwsException instead. */ static inline id throwsException(id exceptionMatcher) { return HC_throwsException(exceptionMatcher); } #endif
// OCHamcrest by Jon Reid, http://qualitycoding.org/about/ // Copyright 2015 hamcrest.org. See LICENSE.txt #import <OCHamcrest/HCDiagnosingMatcher.h> /*! * @abstract Does executing a block throw an exception which satisfies a nested matcher? */ @interface HCThrowsException : HCDiagnosingMatcher - (id)initWithExceptionMatcher:(id)exceptionMatcher; @end FOUNDATION_EXPORT id HC_throwsException(id exceptionMatcher); #ifndef HC_DISABLE_SHORT_SYNTAX /*! * @abstract Creates a matcher that matches when the examined object is a block which, when * executed, throws an exception satisfying the specified matcher. * @param exceptionMatcher The matcher to satisfy when passed the exception. * @discussion * <b>Example</b><br /> * <pre>assertThat(^{ [obj somethingBad]; }, throwsException(hasProperty(@"reason", @"EXPECTED REASON")))</pre> * * <b>Name Clash</b><br /> * In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym * HC_throwsException instead. */ static inline id throwsException(id exceptionMatcher) { return HC_throwsException(exceptionMatcher); } #endif
Improve throwsException example to use hasProperty
Improve throwsException example to use hasProperty
C
bsd-2-clause
hamcrest/OCHamcrest,hamcrest/OCHamcrest,hamcrest/OCHamcrest
2658baee614225bb6cc32a89843cbf455c1a5799
libyaul/common/internal_exception_show.c
libyaul/common/internal_exception_show.c
/* * Copyright (c) 2012-2016 Israel Jacquez * See LICENSE for details. * * Israel Jacquez <mrkotfw@gmail.com> */ #include <stdlib.h> #include <vdp1.h> #include <vdp2.h> #include <vdp2/tvmd.h> #include <vdp2/vram.h> #include <cons.h> void __noreturn internal_exception_show(const char *buffer) { /* Reset the VDP1 */ vdp1_init(); /* Reset the VDP2 */ vdp2_init(); vdp2_tvmd_display_res_set(TVMD_INTERLACE_NONE, TVMD_HORZ_NORMAL_A, TVMD_VERT_224); vdp2_scrn_back_screen_color_set(VRAM_ADDR_4MBIT(0, 0x01FFFE), COLOR_RGB555(0, 7, 0)); vdp2_tvmd_display_set(); cons_init(CONS_DRIVER_VDP2, 40, 28); cons_buffer(buffer); vdp2_tvmd_vblank_out_wait(); vdp2_tvmd_vblank_in_wait(); vdp2_commit(); cons_flush(); abort(); }
/* * Copyright (c) 2012-2016 Israel Jacquez * See LICENSE for details. * * Israel Jacquez <mrkotfw@gmail.com> */ #include <stdlib.h> #include <vdp1.h> #include <vdp2.h> #include <vdp2/tvmd.h> #include <vdp2/vram.h> #include <cons.h> void __noreturn internal_exception_show(const char *buffer) { /* Reset the VDP1 */ vdp1_init(); /* Reset the VDP2 */ vdp2_init(); vdp2_tvmd_display_res_set(TVMD_INTERLACE_NONE, TVMD_HORZ_NORMAL_A, TVMD_VERT_224); vdp2_scrn_back_screen_color_set(VRAM_ADDR_4MBIT(0, 0x01FFFE), COLOR_RGB555(0, 7, 0)); /* Set sprite to type 0 and set its priority to 0 (invisible) */ vdp2_sprite_type_set(0); vdp2_sprite_priority_set(0, 0); vdp2_tvmd_display_set(); cons_init(CONS_DRIVER_VDP2, 40, 28); cons_buffer(buffer); vdp2_tvmd_vblank_out_wait(); vdp2_tvmd_vblank_in_wait(); vdp2_commit(); cons_flush(); abort(); }
Hide VDP1 even if FB hasn't been erased and changed
Hide VDP1 even if FB hasn't been erased and changed
C
mit
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
ccf5eaf49f000109d2d479156913154fd68c37b2
polygon.h
polygon.h
/** Author : Paul TREHIOU & Victor SENE * Date : November 2014 **/ /** * Declaration Point structure * x - real wich is the abscisse of the point * y - real wich is the ordinate of the point */ typedef struct { float x; float y; }Point; /** * Function wich create a point with a specified abscisse and ordinate * abscisse - real * ordinate - real * return a new point */ createPoint(float abscisse, float ordinate); typedef struct pointelem{ Point value; pointelem* next; pointelem* before; }PointElement; typedef PointElement* Polygon;
/** Author : Paul TREHIOU & Victor SENE * Date : November 2014 **/ /** * Declaration Point structure * x - real wich is the abscisse of the point * y - real wich is the ordinate of the point */ typedef struct { float x; float y; }Point; /** * Function wich create a point with a specified abscisse and ordinate * abscisse - real * ordinate - real * return a new point */ createPoint(float abscisse, float ordinate); typedef struct pointelem{ Point value; pointelem* next; pointelem* before; }PointElement; typedef PointElement* Polygon;
Add some spaces and enters
Add some spaces and enters
C
mit
UTBroM/GeometricLib
cdcea87381a6ff1711d039dec46ec01a919acb8e
test/CodeGen/union-init2.c
test/CodeGen/union-init2.c
// RUN: clang-cc -emit-llvm %s -o - | not grep ptrtoint // Make sure we generate something sane instead of a ptrtoint union x {long long b;union x* a;} r = {.a = &r};
// RUN: clang-cc -emit-llvm %s -o - -triple i686-pc-linux-gnu | grep "bitcast (%0\* @r to %union.x\*), \[4 x i8\] zeroinitializer" // Make sure we generate something sane instead of a ptrtoint union x {long long b;union x* a;} r = {.a = &r};
Make test a bit more precise.
Make test a bit more precise. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@79073 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
9d58853f5797b062e68509c2afcfe5375309d145
Classes/GTDiffFile.h
Classes/GTDiffFile.h
// // GTDiffFile.h // ObjectiveGitFramework // // Created by Danny Greg on 30/11/2012. // Copyright (c) 2012 GitHub, Inc. All rights reserved. // #import "git2.h" // Flags which may be set on the file. // // See diff.h for individual documentation. typedef enum : git_diff_file_flag_t { GTDiffFileFlagValidOID = GIT_DIFF_FILE_VALID_OID, GTDiffFileFlagFreePath = GIT_DIFF_FILE_FREE_PATH, GTDiffFileFlagBinary = GIT_DIFF_FILE_BINARY, GTDiffFileFlagNotBinary = GIT_DIFF_FILE_NOT_BINARY, GTDiffFileFlagFreeData = GIT_DIFF_FILE_FREE_DATA, GTDiffFileFlagUnmapData = GIT_DIFF_FILE_UNMAP_DATA, GTDiffFileFlagNoData = GIT_DIFF_FILE_NO_DATA, } GTDiffFileFlag; // A class representing a file on one side of a diff. @interface GTDiffFile : NSObject // The location within the working directory of the file. @property (nonatomic, readonly, copy) NSString *path; // The size (in bytes) of the file. @property (nonatomic, readonly) NSUInteger size; // Any flags set on the file (see `GTDiffFileFlag` for more info). @property (nonatomic, readonly) GTDiffFileFlag flags; // The mode of the file. @property (nonatomic, readonly) mode_t mode; // Designated initialiser. - (instancetype)initWithGitDiffFile:(git_diff_file)file; @end
// // GTDiffFile.h // ObjectiveGitFramework // // Created by Danny Greg on 30/11/2012. // Copyright (c) 2012 GitHub, Inc. All rights reserved. // #import "git2.h" // Flags which may be set on the file. // // See diff.h for individual documentation. typedef enum : git_diff_flag_t { GTDiffFileFlagValidOID = GIT_DIFF_FLAG_VALID_OID, GTDiffFileFlagBinary = GIT_DIFF_FLAG_BINARY, GTDiffFileFlagNotBinary = GIT_DIFF_FLAG_NOT_BINARY, } GTDiffFileFlag; // A class representing a file on one side of a diff. @interface GTDiffFile : NSObject // The location within the working directory of the file. @property (nonatomic, readonly, copy) NSString *path; // The size (in bytes) of the file. @property (nonatomic, readonly) NSUInteger size; // Any flags set on the file (see `GTDiffFileFlag` for more info). @property (nonatomic, readonly) GTDiffFileFlag flags; // The mode of the file. @property (nonatomic, readonly) mode_t mode; // Designated initialiser. - (instancetype)initWithGitDiffFile:(git_diff_file)file; @end
Remove some diff file flags
Remove some diff file flags
C
mit
libgit2/objective-git,TOMalley104/objective-git,alehed/objective-git,pietbrauer/objective-git,nerdishbynature/objective-git,c9s/objective-git,misterfifths/objective-git,dleehr/objective-git,Acidburn0zzz/objective-git,phatblat/objective-git,dleehr/objective-git,blackpixel/objective-git,slavikus/objective-git,slavikus/objective-git,nerdishbynature/objective-git,dleehr/objective-git,pietbrauer/objective-git,libgit2/objective-git,misterfifths/objective-git,0x4a616e/objective-git,blackpixel/objective-git,c9s/objective-git,javiertoledo/objective-git,pietbrauer/objective-git,libgit2/objective-git,tiennou/objective-git,libgit2/objective-git,phatblat/objective-git,alehed/objective-git,tiennou/objective-git,TOMalley104/objective-git,phatblat/objective-git,0x4a616e/objective-git,blackpixel/objective-git,javiertoledo/objective-git,blackpixel/objective-git,alehed/objective-git,misterfifths/objective-git,misterfifths/objective-git,javiertoledo/objective-git,nerdishbynature/objective-git,c9s/objective-git,javiertoledo/objective-git,TOMalley104/objective-git,TOMalley104/objective-git,pietbrauer/objective-git,0x4a616e/objective-git,Acidburn0zzz/objective-git,c9s/objective-git,Acidburn0zzz/objective-git,tiennou/objective-git,slavikus/objective-git,dleehr/objective-git,Acidburn0zzz/objective-git
07630a37beefe8e4401c602f04e3e5bcbba50b31
include/asm-powerpc/code-patching.h
include/asm-powerpc/code-patching.h
#ifndef _ASM_POWERPC_CODE_PATCHING_H #define _ASM_POWERPC_CODE_PATCHING_H /* * Copyright 2008, Michael Ellerman, IBM Corporation. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ /* Flags for create_branch: * "b" == create_branch(addr, target, 0); * "ba" == create_branch(addr, target, BRANCH_ABSOLUTE); * "bl" == create_branch(addr, target, BRANCH_SET_LINK); * "bla" == create_branch(addr, target, BRANCH_ABSOLUTE | BRANCH_SET_LINK); */ #define BRANCH_SET_LINK 0x1 #define BRANCH_ABSOLUTE 0x2 unsigned int create_branch(const unsigned int *addr, unsigned long target, int flags); void patch_branch(unsigned int *addr, unsigned long target, int flags); void patch_instruction(unsigned int *addr, unsigned int instr); #endif /* _ASM_POWERPC_CODE_PATCHING_H */
#ifndef _ASM_POWERPC_CODE_PATCHING_H #define _ASM_POWERPC_CODE_PATCHING_H /* * Copyright 2008, Michael Ellerman, IBM Corporation. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #include <asm/types.h> /* Flags for create_branch: * "b" == create_branch(addr, target, 0); * "ba" == create_branch(addr, target, BRANCH_ABSOLUTE); * "bl" == create_branch(addr, target, BRANCH_SET_LINK); * "bla" == create_branch(addr, target, BRANCH_ABSOLUTE | BRANCH_SET_LINK); */ #define BRANCH_SET_LINK 0x1 #define BRANCH_ABSOLUTE 0x2 unsigned int create_branch(const unsigned int *addr, unsigned long target, int flags); void patch_branch(unsigned int *addr, unsigned long target, int flags); void patch_instruction(unsigned int *addr, unsigned int instr); static inline unsigned long ppc_function_entry(void *func) { #ifdef CONFIG_PPC64 /* * On PPC64 the function pointer actually points to the function's * descriptor. The first entry in the descriptor is the address * of the function text. */ return ((func_descr_t *)func)->entry; #else return (unsigned long)func; #endif } #endif /* _ASM_POWERPC_CODE_PATCHING_H */
Add ppc_function_entry() which gets the entry point for a function
powerpc: Add ppc_function_entry() which gets the entry point for a function Because function pointers point to different things on 32-bit vs 64-bit, add a macro that deals with dereferencing the OPD on 64-bit. The soon to be merged ftrace wants this, as well as other code I am working on. Signed-off-by: Michael Ellerman <17b9e1c64588c7fa6419b4d29dc1f4426279ba01@ellerman.id.au> Acked-by: Kumar Gala <383ef5577c6e1178b93f59ec8d0936f76d2a98c4@kernel.crashing.org> Signed-off-by: Paul Mackerras <19a0ba370c443ba08d20b5061586430ab449ee8c@samba.org>
C
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs
b2a3bd280e31b194b9cff3e44915f6344e959bef
moses/TranslationModel/UG/generic/threading/ug_ref_counter.h
moses/TranslationModel/UG/generic/threading/ug_ref_counter.h
#include "ug_thread_safe_counter.h" #pragma once // obsolete once intrusive_ref_counter is available everywhere namespace Moses { class reference_counter { public: friend void intrusive_ptr_add_ref(reference_counter* p) { if (p) ++p->m_refcount; } friend void intrusive_ptr_release(reference_counter* p) { if (p && --p->m_refcount == 0) delete p; } protected: reference_counter() {} virtual ~reference_counter() {}; private: mutable ThreadSafeCounter m_refcount; }; }
#include "ug_thread_safe_counter.h" #pragma once // obsolete once intrusive_ref_counter is available everywhere namespace Moses { class reference_counter { public: friend void intrusive_ptr_add_ref(reference_counter const* p) { if (p) ++p->m_refcount; } friend void intrusive_ptr_release(reference_counter const* p) { if (p && --p->m_refcount == 0) delete p; } protected: reference_counter() {} virtual ~reference_counter() {}; private: mutable ThreadSafeCounter m_refcount; }; }
Allow intrusive pointers to const objects.
Allow intrusive pointers to const objects.
C
lgpl-2.1
pjwilliams/mosesdecoder,KonceptGeek/mosesdecoder,tofula/mosesdecoder,pjwilliams/mosesdecoder,pjwilliams/mosesdecoder,KonceptGeek/mosesdecoder,tofula/mosesdecoder,moses-smt/mosesdecoder,alvations/mosesdecoder,KonceptGeek/mosesdecoder,moses-smt/mosesdecoder,pjwilliams/mosesdecoder,alvations/mosesdecoder,hychyc07/mosesdecoder,emjotde/mosesdecoder_nmt,emjotde/mosesdecoder_nmt,tofula/mosesdecoder,hychyc07/mosesdecoder,emjotde/mosesdecoder_nmt,tofula/mosesdecoder,tofula/mosesdecoder,moses-smt/mosesdecoder,tofula/mosesdecoder,KonceptGeek/mosesdecoder,hychyc07/mosesdecoder,tofula/mosesdecoder,moses-smt/mosesdecoder,alvations/mosesdecoder,emjotde/mosesdecoder_nmt,emjotde/mosesdecoder_nmt,hychyc07/mosesdecoder,alvations/mosesdecoder,tofula/mosesdecoder,moses-smt/mosesdecoder,KonceptGeek/mosesdecoder,tofula/mosesdecoder,emjotde/mosesdecoder_nmt,moses-smt/mosesdecoder,alvations/mosesdecoder,alvations/mosesdecoder,tofula/mosesdecoder,alvations/mosesdecoder,pjwilliams/mosesdecoder,alvations/mosesdecoder,hychyc07/mosesdecoder,moses-smt/mosesdecoder,KonceptGeek/mosesdecoder,moses-smt/mosesdecoder,KonceptGeek/mosesdecoder,moses-smt/mosesdecoder,emjotde/mosesdecoder_nmt,moses-smt/mosesdecoder,pjwilliams/mosesdecoder,emjotde/mosesdecoder_nmt,emjotde/mosesdecoder_nmt,KonceptGeek/mosesdecoder,emjotde/mosesdecoder_nmt,alvations/mosesdecoder,hychyc07/mosesdecoder,pjwilliams/mosesdecoder,pjwilliams/mosesdecoder,pjwilliams/mosesdecoder,hychyc07/mosesdecoder,moses-smt/mosesdecoder,alvations/mosesdecoder,hychyc07/mosesdecoder,tofula/mosesdecoder,pjwilliams/mosesdecoder,alvations/mosesdecoder,KonceptGeek/mosesdecoder,hychyc07/mosesdecoder,hychyc07/mosesdecoder,KonceptGeek/mosesdecoder
dbb8a82f627267067dee720b38bdc77a7c83bcc1
src/tests/log_mock.c
src/tests/log_mock.c
#include "log.h" #include <stdio.h> #include <stdarg.h> void debug(const char* format, ...) { #ifdef __DEBUG__ va_list args; va_start(args, format); vprintf(format, args); va_end(args); #endif // __DEBUG__ } void initializeLogging() { }
#include "log.h" #include <stdio.h> #include <stdarg.h> void debugNoNewline(const char* format, ...) { #ifdef __DEBUG__ va_list args; va_start(args, format); vprintf(format, args); va_end(args); #endif // __DEBUG__ } void initializeLogging() { }
Rename test suite version of debug to match the header.
Rename test suite version of debug to match the header.
C
bsd-3-clause
mgiannikouris/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware,ene-ilies/vi-firmware,mgiannikouris/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,openxc/vi-firmware,mgiannikouris/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,mgiannikouris/vi-firmware
7a02c1174d819be374c24fd8b406ff3d66c9bbab
src/util.h
src/util.h
#ifndef UTIL_H #define UTIL_H /*** Utility functions ***/ #define ALLOC(type) ALLOC_N(type, 1) #define ALLOC_N(type, n) ((type*) xmalloc(sizeof(type) * (n))) void *xmalloc(size_t); char *hextoa(const char *, int); #define STARTS_WITH(x, y) (strncmp((x), (y), strlen(y)) == 0) #endif /* UTIL_H */
#ifndef UTIL_H #define UTIL_H /*** Utility functions ***/ #define ALLOC(type) ALLOC_N(type, 1) #define ALLOC_N(type, n) ((type*) xmalloc(sizeof(type) * (n))) #define MEMCPY(dst, src, type) MEMCPY_N(dst, src, type, 1) #define MEMCPY_N(dst, src, type, n) (memcpy((dst), (src), sizeof(type) * (n))) void *xmalloc(size_t); char *hextoa(const char *, int); #define STARTS_WITH(x, y) (strncmp((x), (y), strlen(y)) == 0) #endif /* UTIL_H */
Add MEMCPY and MEMCPY_N macros
Add MEMCPY and MEMCPY_N macros
C
apache-2.0
mopidy/libmockspotify,mopidy/libmockspotify,mopidy/libmockspotify
cb694769f0d0c1f6fb8c9dc806c0a68da1056055
arch/powerpc/include/asm/sparsemem.h
arch/powerpc/include/asm/sparsemem.h
#ifndef _ASM_POWERPC_SPARSEMEM_H #define _ASM_POWERPC_SPARSEMEM_H 1 #ifdef __KERNEL__ #ifdef CONFIG_SPARSEMEM /* * SECTION_SIZE_BITS 2^N: how big each section will be * MAX_PHYSADDR_BITS 2^N: how much physical address space we have * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space */ #define SECTION_SIZE_BITS 28 #define MAX_PHYSADDR_BITS 44 #define MAX_PHYSMEM_BITS 44 #endif /* CONFIG_SPARSEMEM */ #ifdef CONFIG_MEMORY_HOTPLUG extern void create_section_mapping(unsigned long start, unsigned long end); extern int remove_section_mapping(unsigned long start, unsigned long end); #ifdef CONFIG_NUMA extern int hot_add_scn_to_nid(unsigned long scn_addr); #else static inline int hot_add_scn_to_nid(unsigned long scn_addr) { return 0; } #endif /* CONFIG_NUMA */ #endif /* CONFIG_MEMORY_HOTPLUG */ #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_SPARSEMEM_H */
#ifndef _ASM_POWERPC_SPARSEMEM_H #define _ASM_POWERPC_SPARSEMEM_H 1 #ifdef __KERNEL__ #ifdef CONFIG_SPARSEMEM /* * SECTION_SIZE_BITS 2^N: how big each section will be * MAX_PHYSADDR_BITS 2^N: how much physical address space we have * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space */ #define SECTION_SIZE_BITS 24 #define MAX_PHYSADDR_BITS 44 #define MAX_PHYSMEM_BITS 44 #endif /* CONFIG_SPARSEMEM */ #ifdef CONFIG_MEMORY_HOTPLUG extern void create_section_mapping(unsigned long start, unsigned long end); extern int remove_section_mapping(unsigned long start, unsigned long end); #ifdef CONFIG_NUMA extern int hot_add_scn_to_nid(unsigned long scn_addr); #else static inline int hot_add_scn_to_nid(unsigned long scn_addr) { return 0; } #endif /* CONFIG_NUMA */ #endif /* CONFIG_MEMORY_HOTPLUG */ #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_SPARSEMEM_H */
Revert "powerpc/mm: Bump SECTION_SIZE_BITS from 16MB to 256MB"
Revert "powerpc/mm: Bump SECTION_SIZE_BITS from 16MB to 256MB" This reverts commit 7545ba6f82924d4523f8f8a2baf2e517a750265d. It breaks eHEA among other issues
C
apache-2.0
TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas
933211fa8d30fba9c689b28f30e0aa353341c345
include/Information/GameModeWidget.h
include/Information/GameModeWidget.h
#ifndef GAMEMODEWIDGET_H #define GAMEMODEWIDGET_H #include <QtWidgets> #include "PlayerActivatedWidget.h" #include "PlayerControlModeWidget.h" #include "Game\Player.h" #include "Game\State.h" class GameModeWidget : public QWidget { public: GameModeWidget(QWidget * parent = 0); ~GameModeWidget(); Player currentPlayer()const; State currentMode()const; protected: private: PlayerActivatedWidget * m_player1Indicator, *m_player2Indicator; PlayerControlModeWidget * m_playerControlAngle, * m_playerControlPower, * m_playerControlFire; public slots: void setCurrentMode(State gameMode); void setCurrentPlayer(Player player); }; #endif
#ifndef GAMEMODEWIDGET_H #define GAMEMODEWIDGET_H #include <QtWidgets> #include "PlayerActivatedWidget.h" #include "PlayerControlModeWidget.h" #include "Game/Player.h" #include "Game/State.h" class GameModeWidget : public QWidget { public: GameModeWidget(QWidget * parent = 0); ~GameModeWidget(); Player currentPlayer()const; State currentMode()const; protected: private: PlayerActivatedWidget * m_player1Indicator, *m_player2Indicator; PlayerControlModeWidget * m_playerControlAngle, * m_playerControlPower, * m_playerControlFire; public slots: void setCurrentMode(State gameMode); void setCurrentPlayer(Player player); }; #endif
Update relative path of includes
Update relative path of includes
C
mit
Sytten/Scorch,Sytten/Scorch
c203f03fc14b048592445ee37620fa5c366b2251
views/view_constants.h
views/view_constants.h
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef VIEWS_VIEW_CONSTANTS_H_ #define VIEWS_VIEW_CONSTANTS_H_ #pragma once #include "views/views_export.h" namespace views { // Size (width or height) within which the user can hold the mouse and the // view should scroll. extern const int kAutoscrollSize; // Time in milliseconds to autoscroll by a row. This is used during drag and // drop. extern const int kAutoscrollRowTimerMS; // Used to determine whether a drop is on an item or before/after it. If a drop // occurs kDropBetweenPixels from the top/bottom it is considered before/after // the item, otherwise it is on the item. VIEWS_EXPORT extern const int kDropBetweenPixels; } // namespace views #endif // VIEWS_VIEW_CONSTANTS_H_
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef VIEWS_VIEW_CONSTANTS_H_ #define VIEWS_VIEW_CONSTANTS_H_ #pragma once #include "views/views_export.h" namespace views { // Size (width or height) within which the user can hold the mouse and the // view should scroll. VIEWS_EXPORT extern const int kAutoscrollSize; // Time in milliseconds to autoscroll by a row. This is used during drag and // drop. VIEWS_EXPORT extern const int kAutoscrollRowTimerMS; // Used to determine whether a drop is on an item or before/after it. If a drop // occurs kDropBetweenPixels from the top/bottom it is considered before/after // the item, otherwise it is on the item. VIEWS_EXPORT extern const int kDropBetweenPixels; } // namespace views #endif // VIEWS_VIEW_CONSTANTS_H_
Add VIEWS_EXPORT to autoscroll constants.
Add VIEWS_EXPORT to autoscroll constants. Referenced by browser/bookmarks/bookmark_drop_info.cc, fixes link when in component and incremental linking on Windows. BUG= TEST=Links in Component build mode Review URL: http://codereview.chromium.org/7741017 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@98281 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk,robclark/chromium,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,keishi/chromium,ChromiumWebApps/chromium,dushu1203/chromium.src,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,littlstar/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,zcbenz/cefode-chromium,Just-D/chromium-1,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,junmin-zhu/chromium-rivertrail,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,patrickm/chromium.src,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,dednal/chromium.src,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,timopulkkinen/BubbleFish,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,patrickm/chromium.src,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,dednal/chromium.src,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,patrickm/chromium.src,dednal/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,nacl-webkit/chrome_deps,anirudhSK/chromium,robclark/chromium,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,hujiajie/pa-chromium,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,anirudhSK/chromium,jaruba/chromium.src,patrickm/chromium.src,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,keishi/chromium,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,patrickm/chromium.src,hujiajie/pa-chromium,jaruba/chromium.src,ltilve/chromium,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,robclark/chromium,robclark/chromium,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,rogerwang/chromium,ltilve/chromium,nacl-webkit/chrome_deps,Chilledheart/chromium,rogerwang/chromium,anirudhSK/chromium,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,ltilve/chromium,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,keishi/chromium,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,keishi/chromium,axinging/chromium-crosswalk,junmin-zhu/chromium-rivertrail,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,zcbenz/cefode-chromium,M4sse/chromium.src,jaruba/chromium.src,keishi/chromium,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,keishi/chromium,chuan9/chromium-crosswalk,ltilve/chromium,anirudhSK/chromium,Just-D/chromium-1,markYoungH/chromium.src,Jonekee/chromium.src,keishi/chromium,Jonekee/chromium.src,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,littlstar/chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,rogerwang/chromium,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,Jonekee/chromium.src,chuan9/chromium-crosswalk,nacl-webkit/chrome_deps,dednal/chromium.src,chuan9/chromium-crosswalk,keishi/chromium,hgl888/chromium-crosswalk,ondra-novak/chromium.src,robclark/chromium,ondra-novak/chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk,Just-D/chromium-1,robclark/chromium,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,keishi/chromium,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,M4sse/chromium.src,Chilledheart/chromium,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,dednal/chromium.src,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,hujiajie/pa-chromium,robclark/chromium,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,Chilledheart/chromium,bright-sparks/chromium-spacewalk,jaruba/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,Pluto-tv/chromium-crosswalk,keishi/chromium,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,rogerwang/chromium,rogerwang/chromium,ChromiumWebApps/chromium,littlstar/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,dednal/chromium.src,nacl-webkit/chrome_deps,jaruba/chromium.src,bright-sparks/chromium-spacewalk,anirudhSK/chromium,jaruba/chromium.src,rogerwang/chromium,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,markYoungH/chromium.src,zcbenz/cefode-chromium,M4sse/chromium.src,zcbenz/cefode-chromium,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,patrickm/chromium.src,robclark/chromium,Jonekee/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,Jonekee/chromium.src,Jonekee/chromium.src,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,anirudhSK/chromium,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,bright-sparks/chromium-spacewalk,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,markYoungH/chromium.src,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,jaruba/chromium.src,mogoweb/chromium-crosswalk,rogerwang/chromium,dednal/chromium.src,ChromiumWebApps/chromium,Jonekee/chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,markYoungH/chromium.src,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,Chilledheart/chromium,littlstar/chromium.src,Jonekee/chromium.src,axinging/chromium-crosswalk,M4sse/chromium.src,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,M4sse/chromium.src,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,jaruba/chromium.src,rogerwang/chromium,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,littlstar/chromium.src,axinging/chromium-crosswalk,hujiajie/pa-chromium,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,markYoungH/chromium.src,patrickm/chromium.src,ltilve/chromium,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,robclark/chromium,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,dednal/chromium.src,anirudhSK/chromium,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,hujiajie/pa-chromium,keishi/chromium,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,ChromiumWebApps/chromium,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,zcbenz/cefode-chromium,M4sse/chromium.src,nacl-webkit/chrome_deps,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,littlstar/chromium.src,chuan9/chromium-crosswalk,littlstar/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,robclark/chromium,dushu1203/chromium.src,dushu1203/chromium.src,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,ltilve/chromium,rogerwang/chromium,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,zcbenz/cefode-chromium,dednal/chromium.src,dednal/chromium.src,Just-D/chromium-1,ChromiumWebApps/chromium,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,ChromiumWebApps/chromium,M4sse/chromium.src,dushu1203/chromium.src,ltilve/chromium,zcbenz/cefode-chromium,zcbenz/cefode-chromium
f819adcbf7fac24094690db9f46c44727b4c1f81
program/driver/us100.c
program/driver/us100.c
/*==============================================================================================*/ /*==============================================================================================*/ #include "QuadCopterConfig.h" Ultrasonic_t Ultrasonic = { .lenHigh = 0, .lenLow = 0, .d = 0 }; /*==============================================================================================*/ /*==============================================================================================* **函數 : us100_distant **功能 : get 1 calculated distant data from the data received by USART **輸入 : Ultrasonic.lenHigh, Ultrasonic.lenLow **輸出 : Ultrasonic.d (mm) **使用 : us100_distant(); **==============================================================================================*/ /*==============================================================================================*/ void us100_distant(){ //reading data serial.putc('U'); serial2.putc('1'); //vTaskDelay(500); //calculating the distance //if(serial2.getc()){ Ultrasonic.lenHigh = serial.getc(); serial2.putc('2'); Ultrasonic.lenLow = serial.getc(); serial2.putc('3'); Ultrasonic.d = Ultrasonic.lenHigh*256 + Ultrasonic.lenLow; //} }
/*==============================================================================================*/ /*==============================================================================================*/ #include "QuadCopterConfig.h" /* Connection methods of Ultrasonic */ #define ULT_USE_UART2 1 #define ULT_USE_PWM 0 Ultrasonic_t Ultrasonic = { .lenHigh = 0, .lenLow = 0, .d = 0 }; /*==============================================================================================*/ /*==============================================================================================* **函數 : us100_distant **功能 : get 1 calculated distant data from the data received by USART **輸入 : Ultrasonic.lenHigh, Ultrasonic.lenLow **輸出 : Ultrasonic.d (mm) **使用 : print_us100_distant(); **==============================================================================================*/ /*==============================================================================================*/ void print_us100_distant(){ #if ULT_USE_UART2 serial2.putc('U'); vTaskDelay(500); Ultrasonic.lenHigh = serial2.getc(); Ultrasonic.lenLow = serial2.getc(); Ultrasonic.d = (Ultrasonic.lenHigh*256 + Ultrasonic.lenLow)*0.1; serial.printf("Distance: "); serial.printf("%d",Ultrasonic.d); serial.printf(" cm\n\r"); vTaskDelay(30); #endif }
Make US100 sensor get distance successfully.
Make US100 sensor get distance successfully.
C
mit
zxc2694/STM32F429_Quadrotor,zxc2694/STM32F429_Quadrotor,zxc2694/STM32F429_Quadrotor
b5514486424d446e30afd645827c79101e28d096
src/lib/convenienceMap/mapPutIndividualContextEntityAttribute.h
src/lib/convenienceMap/mapPutIndividualContextEntityAttribute.h
#ifndef MAP_PUT_INDIVIDUAL_CONTEXT_ENTITY_ATTRIBUTE_H #define MAP_PUT_INDIVIDUAL_CONTEXT_ENTITY_ATTRIBUTE_H /* * * Copyright 2013 Telefonica Investigacion y Desarrollo, S.A.U * * This file is part of Orion Context Broker. * * Orion Context Broker is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * Orion Context Broker is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero * General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Orion Context Broker. If not, see http://www.gnu.org/licenses/. * * For those usages not covered by this license please contact with * fermin at tid dot es * * Author: TID Developer */ #include "convenience/UpdateContextAttributeRequest.h" #include "mongoBackend/MongoGlobal.h" /* **************************************************************************** * * mapPutIndividualContextEntityAttributes - */ extern HttpStatusCode mapPutIndividualContextEntityAttribute(std::string entityId, std::string attributeName, UpdateContextAttributeRequest* request, StatusCode* response); #endif
#ifndef MAP_PUT_INDIVIDUAL_CONTEXT_ENTITY_ATTRIBUTE_H #define MAP_PUT_INDIVIDUAL_CONTEXT_ENTITY_ATTRIBUTE_H /* * * Copyright 2014 Telefonica Investigacion y Desarrollo, S.A.U * * This file is part of Orion Context Broker. * * Orion Context Broker is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * Orion Context Broker is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero * General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Orion Context Broker. If not, see http://www.gnu.org/licenses/. * * For those usages not covered by this license please contact with * fermin at tid dot es * * Author: TID Developer */ #include "convenience/UpdateContextAttributeRequest.h" #include "mongoBackend/MongoGlobal.h" /* **************************************************************************** * * mapPutIndividualContextEntityAttributes - */ extern HttpStatusCode mapPutIndividualContextEntityAttribute(std::string entityId, std::string attributeName, UpdateContextAttributeRequest* request, StatusCode* response); #endif
Change date of copyright notice
Change date of copyright notice
C
agpl-3.0
jmcanterafonseca/fiware-orion,Fiware/data.Orion,gavioto/fiware-orion,guerrerocarlos/fiware-orion,Fiware/data.Orion,Fiware/context.Orion,Fiware/data.Orion,fiwareulpgcmirror/fiware-orion,pacificIT/fiware-orion,gavioto/fiware-orion,telefonicaid/fiware-orion,McMutton/fiware-orion,Fiware/context.Orion,yalp/fiware-orion,McMutton/fiware-orion,gavioto/fiware-orion,jmcanterafonseca/fiware-orion,pacificIT/fiware-orion,yalp/fiware-orion,j1fig/fiware-orion,Fiware/context.Orion,telefonicaid/fiware-orion,gavioto/fiware-orion,j1fig/fiware-orion,McMutton/fiware-orion,telefonicaid/fiware-orion,jmcanterafonseca/fiware-orion,telefonicaid/fiware-orion,pacificIT/fiware-orion,Fiware/data.Orion,guerrerocarlos/fiware-orion,fiwareulpgcmirror/fiware-orion,fiwareulpgcmirror/fiware-orion,jmcanterafonseca/fiware-orion,yalp/fiware-orion,McMutton/fiware-orion,McMutton/fiware-orion,pacificIT/fiware-orion,pacificIT/fiware-orion,fiwareulpgcmirror/fiware-orion,guerrerocarlos/fiware-orion,guerrerocarlos/fiware-orion,j1fig/fiware-orion,McMutton/fiware-orion,yalp/fiware-orion,Fiware/context.Orion,fortizc/fiware-orion,jmcanterafonseca/fiware-orion,fiwareulpgcmirror/fiware-orion,fortizc/fiware-orion,telefonicaid/fiware-orion,Fiware/data.Orion,telefonicaid/fiware-orion,guerrerocarlos/fiware-orion,fiwareulpgcmirror/fiware-orion,fortizc/fiware-orion,fortizc/fiware-orion,j1fig/fiware-orion,j1fig/fiware-orion,yalp/fiware-orion,McMutton/fiware-orion,Fiware/context.Orion,jmcanterafonseca/fiware-orion,gavioto/fiware-orion,fortizc/fiware-orion,Fiware/data.Orion,fortizc/fiware-orion,Fiware/context.Orion
232073b0d97756ee4b3961c99050f4e20aa29a44
src/gallium/auxiliary/target-helpers/inline_debug_helper.h
src/gallium/auxiliary/target-helpers/inline_debug_helper.h
#ifndef INLINE_DEBUG_HELPER_H #define INLINE_DEBUG_HELPER_H #include "pipe/p_compiler.h" #include "util/u_debug.h" /* Helper function to wrap a screen with * one or more debug driver: rbug, trace. */ #ifdef GALLIUM_TRACE #include "trace/tr_public.h" #endif #ifdef GALLIUM_RBUG #include "rbug/rbug_public.h" #endif #ifdef GALLIUM_GALAHAD #include "galahad/glhd_public.h" #endif #ifdef GALLIUM_NOOP #include "noop/noop_public.h" #endif static INLINE struct pipe_screen * debug_screen_wrap(struct pipe_screen *screen) { #if defined(GALLIUM_RBUG) screen = rbug_screen_create(screen); #endif #if defined(GALLIUM_TRACE) screen = trace_screen_create(screen); #endif #if defined(GALLIUM_GALAHAD) screen = galahad_screen_create(screen); #endif #if defined(GALLIUM_NOOP) screen = noop_screen_create(screen); #endif return screen; } #endif
#ifndef INLINE_DEBUG_HELPER_H #define INLINE_DEBUG_HELPER_H #include "pipe/p_compiler.h" #include "util/u_debug.h" /* Helper function to wrap a screen with * one or more debug driver: rbug, trace. */ #ifdef DEBUG #ifdef GALLIUM_TRACE #include "trace/tr_public.h" #endif #ifdef GALLIUM_RBUG #include "rbug/rbug_public.h" #endif #ifdef GALLIUM_GALAHAD #include "galahad/glhd_public.h" #endif #ifdef GALLIUM_NOOP #include "noop/noop_public.h" #endif #endif /* DEBUG */ static INLINE struct pipe_screen * debug_screen_wrap(struct pipe_screen *screen) { #ifdef DEBUG #if defined(GALLIUM_RBUG) screen = rbug_screen_create(screen); #endif #if defined(GALLIUM_TRACE) screen = trace_screen_create(screen); #endif #if defined(GALLIUM_GALAHAD) screen = galahad_screen_create(screen); #endif #if defined(GALLIUM_NOOP) screen = noop_screen_create(screen); #endif #endif /* DEBUG */ return screen; } #endif
Enable debug helpers only on debug builds.
target-helpers: Enable debug helpers only on debug builds. Some of these helpers use debug_get_option, which works also on releases.
C
mit
mcanthony/glsl-optimizer,zz85/glsl-optimizer,metora/MesaGLSLCompiler,dellis1972/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,dellis1972/glsl-optimizer,jbarczak/glsl-optimizer,djreep81/glsl-optimizer,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,benaadams/glsl-optimizer,mcanthony/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,zeux/glsl-optimizer,tokyovigilante/glsl-optimizer,metora/MesaGLSLCompiler,bkaradzic/glsl-optimizer,tokyovigilante/glsl-optimizer,wolf96/glsl-optimizer,djreep81/glsl-optimizer,metora/MesaGLSLCompiler,djreep81/glsl-optimizer,dellis1972/glsl-optimizer,djreep81/glsl-optimizer,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,zeux/glsl-optimizer,wolf96/glsl-optimizer,wolf96/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,mapbox/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,bkaradzic/glsl-optimizer,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,mcanthony/glsl-optimizer,zz85/glsl-optimizer,wolf96/glsl-optimizer,tokyovigilante/glsl-optimizer,benaadams/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,zz85/glsl-optimizer,mapbox/glsl-optimizer,tokyovigilante/glsl-optimizer,djreep81/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,zz85/glsl-optimizer,mapbox/glsl-optimizer,mapbox/glsl-optimizer,wolf96/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,mapbox/glsl-optimizer
305cbdf45f2e9414d283abb7c7f4adcf1de546fc
samplecode/GMSampleView.h
samplecode/GMSampleView.h
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef GMSampleView_DEFINED #define GMSampleView_DEFINED #include "SampleCode.h" #include "gm.h" class GMSampleView : public SampleView { private: typedef skiagm::GM GM; public: GMSampleView(GM* gm) : fGM(gm) {} virtual ~GMSampleView() { delete fGM; } protected: virtual bool onQuery(SkEvent* evt) { if (SampleCode::TitleQ(*evt)) { SkString name("GM "); name.append(fGM->shortName()); SampleCode::TitleR(evt, name.c_str()); return true; } return this->INHERITED::onQuery(evt); } virtual void onDrawContent(SkCanvas* canvas) { fGM->drawContent(canvas); } virtual void onDrawBackground(SkCanvas* canvas) { fGM->drawBackground(canvas); } private: GM* fGM; typedef SampleView INHERITED; }; #endif
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef GMSampleView_DEFINED #define GMSampleView_DEFINED #include "SampleCode.h" #include "gm.h" class GMSampleView : public SampleView { private: typedef skiagm::GM GM; public: GMSampleView(GM* gm) : fGM(gm) {} virtual ~GMSampleView() { delete fGM; } protected: virtual bool onQuery(SkEvent* evt) { if (SampleCode::TitleQ(*evt)) { SkString name("GM:"); name.append(fGM->shortName()); SampleCode::TitleR(evt, name.c_str()); return true; } return this->INHERITED::onQuery(evt); } virtual void onDrawContent(SkCanvas* canvas) { fGM->drawContent(canvas); } virtual void onDrawBackground(SkCanvas* canvas) { fGM->drawBackground(canvas); } private: GM* fGM; typedef SampleView INHERITED; }; #endif
Use : as separator between "GM" and slide name in SampleApp. This makes it easier to jump to a GM slide using command line args on windows.
Use : as separator between "GM" and slide name in SampleApp. This makes it easier to jump to a GM slide using command line args on windows.
C
bsd-3-clause
csulmone/skia,csulmone/skia,csulmone/skia,csulmone/skia
6647f18c6da873cfda4320efff02bf1aa28c2888
projects/PathosEngine/src/pathos/mesh/static_mesh_component.h
projects/PathosEngine/src/pathos/mesh/static_mesh_component.h
#pragma once #include "pathos/actor/scene_component.h" #include "badger/types/matrix_types.h" namespace pathos { class Mesh; class MeshGeometry; class Material; // #todo-renderer: Further decompose struct StaticMeshProxy : public SceneComponentProxy { uint32 doubleSided : 1; uint32 renderInternal : 1; matrix4 modelMatrix; MeshGeometry* geometry; Material* material; }; struct ShadowMeshProxy : public SceneComponentProxy { matrix4 modelMatrix; MeshGeometry* geometry; }; class StaticMeshComponent : public SceneComponent { friend class GodRay; // due to createRenderProxy_internal() public: virtual void createRenderProxy(Scene* scene); inline Mesh* getStaticMesh() const { return mesh; } void setStaticMesh(Mesh* inMesh) { mesh = inMesh; } private: void createRenderProxy_internal(Scene* scene, std::vector<StaticMeshProxy*>& outProxyList); public: bool castsShadow = true; private: Mesh* mesh; }; }
#pragma once #include "pathos/actor/scene_component.h" #include "badger/types/matrix_types.h" namespace pathos { class Mesh; class MeshGeometry; class Material; // #todo-renderer: Further decompose struct StaticMeshProxy : public SceneComponentProxy { uint32 doubleSided : 1; uint32 renderInternal : 1; matrix4 modelMatrix; MeshGeometry* geometry; Material* material; }; struct ShadowMeshProxy : public SceneComponentProxy { matrix4 modelMatrix; MeshGeometry* geometry; }; class StaticMeshComponent : public SceneComponent { friend class GodRay; // due to createRenderProxy_internal() public: virtual void createRenderProxy(Scene* scene); inline Mesh* getStaticMesh() const { return mesh; } void setStaticMesh(Mesh* inMesh) { mesh = inMesh; } private: void createRenderProxy_internal(Scene* scene, std::vector<StaticMeshProxy*>& outProxyList); public: bool castsShadow = true; private: Mesh* mesh = nullptr; }; }
Set default value of StaticMeshComponent::mesh to nullptr
Set default value of StaticMeshComponent::mesh to nullptr
C
mit
codeonwort/pathosengine,codeonwort/pathosengine,codeonwort/pathosengine
2f92cee416aef4684471c539e370772824ae7854
tests/tgen-mstring.c
tests/tgen-mstring.c
/* * Copyright (c) 2017-2022, Patrick Pelissier * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * + Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * + Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "m-string.h" size_t fsize(const char str[]) { return m_str1ng_utf8_length(str); } void convert(string_t s, unsigned n) { m_string_set_ui(s, n); }
/* * Copyright (c) 2017-2022, Patrick Pelissier * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * + Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * + Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "m-string.h" size_t fsize(const char str[]) { return m_str1ng_utf8_length(str); } void convert(string_t s, unsigned n) { m_string_set_ui(s, n); } void construct(char s[], unsigned n) { strcpy(s, M_CSTR("Hello %u worlds")); }
Update code for generated asm analysis
Update code for generated asm analysis
C
bsd-2-clause
P-p-H-d/mlib,P-p-H-d/mlib
d0d9cd60fdfb44d71e61dca4737fc6a2c70a266e
WebSocketTransport/WebSocketTransport.h
WebSocketTransport/WebSocketTransport.h
// // WebSocketTransport.h // WebSocketTransport // // Created by Paul Young on 27/08/2014. // Copyright (c) 2014 CocoaFlow. All rights reserved. // #import <Foundation/Foundation.h> //! Project version number for WebSocketTransport. FOUNDATION_EXPORT double WebSocketTransportVersionNumber; //! Project version string for WebSocketTransport. FOUNDATION_EXPORT const unsigned char WebSocketTransportVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <WebSocketTransport/PublicHeader.h>
// // WebSocketTransport.h // WebSocketTransport // // Created by Paul Young on 27/08/2014. // Copyright (c) 2014 CocoaFlow. All rights reserved. // #import <Foundation/Foundation.h> //! Project version number for WebSocketTransport. FOUNDATION_EXPORT double WebSocketTransportVersionNumber; //! Project version string for WebSocketTransport. FOUNDATION_EXPORT const unsigned char WebSocketTransportVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <WebSocketTransport/PublicHeader.h> #import "BLWebSocketsServer.h"
Make BLWebSocketsServer available in Swift.
Make BLWebSocketsServer available in Swift.
C
apache-2.0
CocoaFlow/WebSocketTransport
f48d179fc86c5fc1883738a9559bfb2f3c9995ac
ZDetailKit/ZDetailKit.h
ZDetailKit/ZDetailKit.h
// // ZDetailKit.h // // Created by Lukas Zeller on 15.02.13. // Copyright (c) 2013 plan44.ch. All rights reserved. // // common #import "ZDetailEditing.h" #import "ZDBGMacros.h" // ZUtils #import "ZCustomI8n.h" // controllers #import "ZDetailTableViewController.h" // cells #import "ZButtonCell.h" #import "ZSwitchCell.h" #import "ZSegmentChoicesCell.h" #import "ZSliderCell.h" #import "ZTextFieldCell.h" #import "ZTextViewCell.h" #import "ZDateTimeCell.h" #import "ZColorChooserCell.h" #import "ZChoiceListCell.h" // Note: ZLocationCell requires MapKit and CoreLocation frameworks to be included in the app #import "ZLocationCell.h" // EOF
// // ZDetailKit.h // // Created by Lukas Zeller on 15.02.13. // Copyright (c) 2013 plan44.ch. All rights reserved. // // common #import "ZDetailEditing.h" #import "ZDBGMacros.h" // ZUtils #import "ZCustomI8n.h" // controllers #import "ZDetailTableViewController.h" // cells #import "ZButtonCell.h" #import "ZSwitchCell.h" #import "ZSegmentChoicesCell.h" #import "ZSliderCell.h" #import "ZTextFieldCell.h" #import "ZTextViewCell.h" #import "ZDateTimeCell.h" #import "ZColorChooserCell.h" #import "ZChoiceListCell.h" // Note: ZLocationCell requires MapKit and CoreLocation frameworks to be included in the app, // which in turn requires that the app declares usage of location in NSLocationAlwaysUsageDescription, // NSLocationWhenInUseUsageDescription, and NSLocationAlwaysAndWhenInUseUsageDescription in info.plist #import "ZLocationCell.h" // EOF
Comment improvement: explain consequences of using ZLocationCell
Comment improvement: explain consequences of using ZLocationCell
C
mit
plan44/zdetailkit
1aafca50ae3f5050c05567b76d028e30711b2ba7
project_config/lmic_project_config.h
project_config/lmic_project_config.h
// project-specific definitions for otaa sensor //#define CFG_eu868 1 #define CFG_us915 1 //#define CFG_au921 1 //#define CFG_as923 1 //#define CFG_in866 1 #define CFG_sx1276_radio 1 //#define LMIC_USE_INTERRUPTS
// project-specific definitions //#define CFG_eu868 1 #define CFG_us915 1 //#define CFG_au921 1 //#define CFG_as923 1 // #define LMIC_COUNTRY_CODE LMIC_COUNTRY_CODE_JP /* for as923-JP */ //#define CFG_in866 1 #define CFG_sx1276_radio 1 //#define LMIC_USE_INTERRUPTS
Add example of how to select Japan country
Add example of how to select Japan country
C
mit
mcci-catena/arduino-lmic,mcci-catena/arduino-lmic,mcci-catena/arduino-lmic
892c39d588e9a16609b67177e912ac1564317838
libk/UVSE/screenTest.c
libk/UVSE/screenTest.c
#include "../libk.h" void screenTest(void) { int rows, cols; rows = glob.rows; cols = glob.cols; printf("%s", CursorToTopLeft ClearScreen );fflush(stdout); printf("Top of Screen: rows = %d cols = %d\n\r", rows,cols);fflush(stdout); int count; for (count = 2; count < rows; count ++) {printf("%s", TildeReturnNewline); fflush(stdout);} printf("%s","Bottom of Screen "); fflush(stdout); // Force Cursor Position with <ESC>[{ROW};{COLUMN}f printf ("\x1b[%d;%df%s", 5,5,"Hello World"); fflush(stdout); // printf("\x1b[%d;%df",2,1); fflush(stdout); return; }
#include "../libk.h" // function screenTest void screenTest(void) { // retrieve Screen rows and columns from struct glob int rows, cols; rows = glob.rows; cols = glob.cols; // Move Screen Cursor to Top Left, Then Clear Screen printf("%s", CursorToTopLeft ClearScreen );fflush(stdout); // Print the Screen Header printf("Top of Screen: rows = %d cols = %d\n\r", rows,cols);fflush(stdout); int count; // Print Left Column Tildes to Screen, leaving screen last line clear for (count = 2; count < rows; count ++) {printf("%s", TildeReturnNewline); fflush(stdout);} // Prnt Screen Last Line printf("%s","Bottom of Screen "); fflush(stdout); // Place Cursor Position with <ESC>[{ROW};{COLUMN}f printf ("\x1b[%d;%df%s", 5,5,"Hello World"); fflush(stdout); // Move Screen Cursor to Second Line, First Column printf("\x1b[%d;%df",2,1); fflush(stdout); return; }
Add comments suit for formatting with idiom
Add comments suit for formatting with idiom
C
bsd-2-clause
eingaeph/pip.imbue.hood,eingaeph/pip.imbue.hood
0b062eb9d2908410674c2751bbcee5b9df464732
src/sensors/lmsensor.h
src/sensors/lmsensor.h
#ifndef LMSENSOR_H #define LMSENSOR_H #include <K3Process> #include <K3ProcIO> #include "sensor.h" /** * * Hans Karlsson **/ class SensorSensor : public Sensor { Q_OBJECT public: SensorSensor(int interval, char tempUnit); ~SensorSensor(); void update(); private: K3ShellProcess ksp; QString extraParams; QMap<QString, QString> sensorMap; #ifdef __FreeBSD__ QMap<QString, QString> sensorMapBSD; #endif QString sensorResult; private slots: void receivedStdout(K3Process *, char *buffer, int); void processExited(K3Process *); }; #endif // LMSENSOR_H
#ifndef LMSENSOR_H #define LMSENSOR_H #include <K3Process> #include <K3ProcIO> #include "sensor.h" /** * * Hans Karlsson **/ class SensorSensor : public Sensor { Q_OBJECT public: SensorSensor(int interval, char tempUnit); ~SensorSensor(); void update(); private: K3ShellProcess ksp; QString extraParams; QMap<QString, QString> sensorMap; #if defined(__FreeBSD__) || defined(Q_OS_NETBSD) QMap<QString, QString> sensorMapBSD; #endif QString sensorResult; private slots: void receivedStdout(K3Process *, char *buffer, int); void processExited(K3Process *); }; #endif // LMSENSOR_H
Fix knode superkaramba compilation on NetBSD. Patch by Mark Davies. BUG: 154730
Fix knode superkaramba compilation on NetBSD. Patch by Mark Davies. BUG: 154730 svn path=/trunk/KDE/kdeutils/superkaramba/; revision=753733
C
lgpl-2.1
KDE/superkaramba,KDE/superkaramba,KDE/superkaramba
bdb2ac5ba922fe59c0aa5326b2a667ee9be2a8f0
ir/be/test/fehler111.c
ir/be/test/fehler111.c
int x = 0; int main(int argc, char *argv[]) { int y; char *p = &x; *p = 23; y = x; x = 35; return y; }
int x = 0; int main(int argc, char *argv[]) { int y; char *p = &x; *p = 23; y = x; x = 35; return y != 23; }
Fix return value of main().
Fix return value of main(). [r19359]
C
lgpl-2.1
killbug2004/libfirm,davidgiven/libfirm,8l/libfirm,8l/libfirm,davidgiven/libfirm,libfirm/libfirm,MatzeB/libfirm,killbug2004/libfirm,davidgiven/libfirm,jonashaag/libfirm,libfirm/libfirm,jonashaag/libfirm,jonashaag/libfirm,jonashaag/libfirm,killbug2004/libfirm,8l/libfirm,8l/libfirm,MatzeB/libfirm,MatzeB/libfirm,jonashaag/libfirm,MatzeB/libfirm,libfirm/libfirm,davidgiven/libfirm,davidgiven/libfirm,8l/libfirm,davidgiven/libfirm,libfirm/libfirm,libfirm/libfirm,killbug2004/libfirm,MatzeB/libfirm,jonashaag/libfirm,MatzeB/libfirm,killbug2004/libfirm,8l/libfirm,davidgiven/libfirm,MatzeB/libfirm,killbug2004/libfirm,8l/libfirm,jonashaag/libfirm,killbug2004/libfirm
9aadb4378eb007d7116ffea50848f18f0b06a6da
test/TestPrologue.h
test/TestPrologue.h
#pragma once #include <TestFramework/TestFramework.h> #include <cal3d/streamops.h> #include <cal3d/vector4.h> #include <boost/shared_ptr.hpp> #include <boost/scoped_ptr.hpp> #include <boost/lexical_cast.hpp> #include <boost/scoped_array.hpp> using boost::scoped_ptr; using boost::shared_ptr; using boost::lexical_cast; using boost::scoped_array; inline bool AreClose( const CalPoint4& p1, const CalPoint4& p2, float tolerance ) { return (p1.asCalVector4() - p2.asCalVector4()).length() < tolerance; }
#pragma once // The old version of clang currently used on the Mac builder requires some // operator<<() declarations to precede their use in the UnitTest++ // templates/macros. -- jlee - 2014-11-21 #include <cal3d/streamops.h> #include <TestFramework/TestFramework.h> #include <cal3d/vector4.h> #include <boost/shared_ptr.hpp> #include <boost/scoped_ptr.hpp> #include <boost/lexical_cast.hpp> #include <boost/scoped_array.hpp> using boost::scoped_ptr; using boost::shared_ptr; using boost::lexical_cast; using boost::scoped_array; inline bool AreClose( const CalPoint4& p1, const CalPoint4& p2, float tolerance ) { return (p1.asCalVector4() - p2.asCalVector4()).length() < tolerance; }
Rearrange output operator declarations in tests to make old OSX clang happy
cal3d: Rearrange output operator declarations in tests to make old OSX clang happy Maybe fixing Mac buildbot. git-svn-id: febc42a3fd39fb08e5ae2b2182bc5ab0a583559c@207440 07c76cb3-cb09-0410-85de-c24d39f1912e
C
lgpl-2.1
imvu/cal3d,imvu/cal3d,imvu/cal3d,imvu/cal3d
b837d1dfefc4ec78d94ae211cc2c29efb67e18e6
Kirin/core/ios/KirinKit/KirinKit/Services/NetworkingBackend.h
Kirin/core/ios/KirinKit/KirinKit/Services/NetworkingBackend.h
/* Copyright 2011 Future Platforms Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #import <KirinKit/KirinKit.h> #import "Networking.h" @interface NetworkingBackend : KirinServiceStub <Networking> { } @end
/* Copyright 2011 Future Platforms Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #import <KirinKit/KirinKit.h> #import "Networking.h" @interface NetworkingBackend : KirinServiceStub <Networking, KirinServiceOnMainThread> { } @end
Make Networking run on the main thread.
Make Networking run on the main thread.
C
apache-2.0
futureplatforms/Kirin,KirinJS/Kirin,futureplatforms/Kirin,KirinJS/Kirin,futureplatforms/Kirin,futureplatforms/Kirin,KirinJS/Kirin,futureplatforms/Kirin
a1e0a43a37dd80462bbfe054629e88958506e8cb
EYMaskedTextField/EYMaskedTextField.h
EYMaskedTextField/EYMaskedTextField.h
// // EYMaskedTextField.h // // // Created by Evgeniy Yurtaev on 10/09/15. // Copyright (c) 2015 Evgeniy Yurtaev. All rights reserved. // #import <UIKit/UIKit.h> @protocol EYMaskedTextFieldDelegate <UITextFieldDelegate> @optional - (BOOL)textField:(UITextField *)textField shouldChangeUnformattedText:(NSString *)unformattedText inRange:(NSRange)range replacementString:(NSString *)string; @end @interface EYMaskedTextField : UITextField @property (copy, nonatomic) IBInspectable NSString *mask; @property (copy, nonatomic) IBInspectable NSString *unformattedText; @property (assign, nonatomic) id<EYMaskedTextFieldDelegate> delegate; @end
// // EYMaskedTextField.h // // // Created by Evgeniy Yurtaev on 10/09/15. // Copyright (c) 2015 Evgeniy Yurtaev. All rights reserved. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @protocol EYMaskedTextFieldDelegate <UITextFieldDelegate> @optional - (BOOL)textField:(nonnull UITextField *)textField shouldChangeUnformattedText:(nullable NSString *)unformattedText inRange:(NSRange)range replacementString:(nullable NSString *)string; @end @interface EYMaskedTextField : UITextField @property (copy, nonatomic, nullable) IBInspectable NSString *mask; @property (copy, nonatomic, nullable) IBInspectable NSString *unformattedText; @property (assign, nonatomic, nullable) id<EYMaskedTextFieldDelegate> delegate; @end NS_ASSUME_NONNULL_END
Add `nonnull` and `nullable` attributes
Add `nonnull` and `nullable` attributes
C
mit
seaburg/EYMaskedTextField
ce2aa429b587714faaec43f13b345a8be80765d5
dev/multiple_renderer_separate_schema/renderman/RendermanTypes.h
dev/multiple_renderer_separate_schema/renderman/RendermanTypes.h
#pragma once #include <ri.h> #include <vector> #include "Types.h" typedef std::vector<RtInt> RtIntContainer; typedef std::vector<RtFloat> RtFloatContainer; /*! * \remark Alembic does not support "holes" but to be safe, we are targeting * RiPointsGeneralPolygons to future proof our code * * RtVoid RiPointsGeneralPolygons(RtInt npolys, RtInt nloops[], * RtInt nvertices[], * RtInt vertices[], ...); * */ struct RendermanMeshData { V3fSamplingArray2D _P_data_array; // Assumes topological stability RtInt _npolys; RtIntContainer _nloops_data; RtIntContainer _nvertices_data; RtIntContainer _vertices_data; }; struct RendermanPointsData { V3fSamplingArray2D _P_data_array; // Assumes topological stability RtFloat _constantwidth; RtIntContainer _ids_data; RtFloatContainer _width_data; }; // == Emacs ================ // ------------------------- // Local variables: // tab-width: 4 // indent-tabs-mode: t // c-basic-offset: 4 // end: // // == vi =================== // ------------------------- // Format block // ex:ts=4:sw=4:expandtab // -------------------------
#pragma once #include <ri.h> #include <vector> #include "Types.h" typedef std::vector<RtInt> RtIntContainer; typedef std::vector<RtFloat> RtFloatContainer; /*! * \remark Alembic does not support "holes" but to be safe, we are targeting * RiPointsGeneralPolygons to future proof our code * * RtVoid RiPointsGeneralPolygons(RtInt npolys, RtInt nloops[], * RtInt nvertices[], * RtInt vertices[], ...); * */ struct RendermanMeshData { V3fSamplingArray2D _P_data_array; // Assumes topological stability RtInt _npolys; RtIntContainer _nloops_data; RtIntContainer _nvertices_data; RtIntContainer _vertices_data; }; struct RendermanPointsData { V3fSamplingArray2D _P_data_array; // Assumes topological stability RtIntContainer _ids_data; RtFloatContainer _width_data; }; // == Emacs ================ // ------------------------- // Local variables: // tab-width: 4 // indent-tabs-mode: t // c-basic-offset: 4 // end: // // == vi =================== // ------------------------- // Format block // ex:ts=4:sw=4:expandtab // -------------------------
Remove _constantwidth as there are other was to determine that via the length of the _width_data vector
Remove _constantwidth as there are other was to determine that via the length of the _width_data vector
C
apache-2.0
nyue/SegmentedInterpolativeMotionBlurAlembic,nyue/SegmentedInterpolativeMotionBlurAlembic
fc75c4c360b754efbe202c8f73327a2ddf7676f5
src/plugins/crypto/compile_gcrypt.c
src/plugins/crypto/compile_gcrypt.c
/** * @file * * @brief tests if compilation works (include and build paths set correct, etc...) * * @copyright BSD License (see LICENSE.md or https://www.libelektra.org) * */ #include <gcrypt.h> int main (void) { gcry_cipher_hd_t elektraCryptoHandle; return 0; }
/** * @file * * @brief tests if compilation works (include and build paths set correct, etc...) * * @copyright BSD License (see LICENSE.md or https://www.libelektra.org) * */ #include <gcrypt.h> gcry_cipher_hd_t nothing () { gcry_cipher_hd_t elektraCryptoHandle = NULL; return elektraCryptoHandle; } int main (void) { nothing (); return 0; }
Fix detection of lib if we use `-Werror`
Gcrypt: Fix detection of lib if we use `-Werror` Before this update detecting Libgcrypt would fail, if we treated warnings as errors (`-Werror`). The cause of this problem was that compiling `compile_gcrypt.cpp` produced a warning about an unused variable.
C
bsd-3-clause
mpranj/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,mpranj/libelektra,e1528532/libelektra,mpranj/libelektra,e1528532/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,e1528532/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,mpranj/libelektra,petermax2/libelektra,petermax2/libelektra,BernhardDenner/libelektra,mpranj/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,mpranj/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,BernhardDenner/libelektra,e1528532/libelektra,e1528532/libelektra,petermax2/libelektra,petermax2/libelektra,mpranj/libelektra,petermax2/libelektra,mpranj/libelektra,petermax2/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra
2f2e68df8c5655a47efad28f180070e8e87760b7
jre_emul/Classes/java_lang_Thread.h
jre_emul/Classes/java_lang_Thread.h
/* * 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 java_lang_Thread_H #define java_lang_Thread_H #import <pthread.h> @class JavaLangThread; CF_EXTERN_C_BEGIN pthread_key_t java_thread_key; pthread_once_t java_thread_key_init_once; void initJavaThreadKeyOnce(); JavaLangThread *getCurrentJavaThreadOrNull(); CF_EXTERN_C_END #endif // java_lang_Thread_H
/* * 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 java_lang_Thread_H #define java_lang_Thread_H #import <pthread.h> @class JavaLangThread; CF_EXTERN_C_BEGIN extern pthread_key_t java_thread_key; extern pthread_once_t java_thread_key_init_once; void initJavaThreadKeyOnce(); JavaLangThread *getCurrentJavaThreadOrNull(); CF_EXTERN_C_END #endif // java_lang_Thread_H
Fix unintentional tentative definitions that result in duplicate symbol definitions when building with -fno-common
Fix unintentional tentative definitions that result in duplicate symbol definitions when building with -fno-common This primarily consists of adding missing `extern`s in front of declarations of global variables, and `typedef` in front of some `NS_ENUM`s. -fno-common is being turned on by default with Clang 11. This fix is a preemptive measure to ensure code will compile when Clang 11 is shipped in a future Xcode update. In C, global variables that are defined without an initializer are known as tentative definitions. These are distinct from declarations of global variables, which are preceeded by the `extern` keyword. For performance and correctness reasons, Clang is changing their handling of tentative definitions. Almost all tentative definitions are unintentional omissions of `extern`, rather than an intentional decision by the code author, which can result in subtle bugs that are hard to pin down. Historically, Clang has placed tentative definitions in the __DATA,__common section. The linker then allows non-tentative definitions to override any tentative definitions, and coalesces all tentative definitions of a single symbol into a single tentative definition. This meant that having multiple tentative definitions would not produce a linker error about duplicate symbol definitions, nor would having both a normal and tentative definition. With the -fno-common flag, Clang will instead place both tentative and normal definitions in the __DATA,__bss section, which will result in duplicate symbol definition errors from the linker if multiple tentative definitions and/or normal definitions are present in different object files. PiperOrigin-RevId: 305885508
C
apache-2.0
lukhnos/j2objc,google/j2objc,lukhnos/j2objc,mirego/j2objc,groschovskiy/j2objc,lukhnos/j2objc,lukhnos/j2objc,mirego/j2objc,groschovskiy/j2objc,google/j2objc,groschovskiy/j2objc,mirego/j2objc,mirego/j2objc,groschovskiy/j2objc,lukhnos/j2objc,mirego/j2objc,google/j2objc,mirego/j2objc,lukhnos/j2objc,groschovskiy/j2objc,groschovskiy/j2objc,google/j2objc,google/j2objc,google/j2objc
7217135f6a8777fbdeb0ffe08abf5ccbd5b13efc
WebApiClient/Code/WebApiClient-Core.h
WebApiClient/Code/WebApiClient-Core.h
// // WebApiClient-Core.h // WebApiClient // // Created by Matt on 21/07/15. // Copyright (c) 2015 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0. // #import <WebApiClient/FileWebApiResource.h> #import <WebApiClient/NSDictionary+WebApiClient.h> #import <WebApiClient/WebApiAuthorizationProvider.h> #import <WebApiClient/WebApiClient.h> #import <WebApiClient/WebApiClientEnvironment.h> #import <WebApiClient/WebApiClientSupport.h> #import <WebApiClient/WebApiDataMapper.h> #import <WebApiClient/WebApiResource.h> #import <WebApiClient/WebApiResponse.h> #import <WebApiClient/WebApiRoute.h>
// // WebApiClient-Core.h // WebApiClient // // Created by Matt on 21/07/15. // Copyright (c) 2015 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0. // #import <WebApiClient/FileWebApiResource.h> #import <WebApiClient/NSDictionary+WebApiClient.h> #import <WebApiClient/WebApiAuthorizationProvider.h> #import <WebApiClient/WebApiClient.h> #import <WebApiClient/WebApiClientDigestUtils.h> #import <WebApiClient/WebApiClientEnvironment.h> #import <WebApiClient/WebApiClientSupport.h> #import <WebApiClient/WebApiDataMapper.h> #import <WebApiClient/WebApiResource.h> #import <WebApiClient/WebApiResponse.h> #import <WebApiClient/WebApiRoute.h>
Add new file to umbrella import.
Add new file to umbrella import.
C
apache-2.0
Blue-Rocket/WebApiClient,Blue-Rocket/WebApiClient
59764c6d3621423c9d4e136e99a69078a79ca6f5
numpy/distutils/checks/cpu_popcnt.c
numpy/distutils/checks/cpu_popcnt.c
#ifdef _MSC_VER #include <nmmintrin.h> #else #include <popcntintrin.h> #endif int main(void) { long long a = 0; int b; #ifdef _MSC_VER #ifdef _M_X64 a = _mm_popcnt_u64(1); #endif b = _mm_popcnt_u32(1); #else #ifdef __x86_64__ a = __builtin_popcountll(1); #endif b = __builtin_popcount(1); #endif return (int)a + b; }
#ifdef _MSC_VER #include <nmmintrin.h> #else #include <popcntintrin.h> #endif #include <stdlib.h> int main(void) { long long a = 0; int b; a = random(); b = random(); #ifdef _MSC_VER #ifdef _M_X64 a = _mm_popcnt_u64(a); #endif b = _mm_popcnt_u32(b); #else #ifdef __x86_64__ a = __builtin_popcountll(a); #endif b = __builtin_popcount(b); #endif return (int)a + b; }
Fix compile-time test of POPCNT
Fix compile-time test of POPCNT The compile-time test of POPCNT, cpu_popcnt.c produced code that would execute without error even if the machine didn't support the popcnt instruction. This patch attempts to use popcnt on random numbers so the compiler can't substitute the answer at compile time.
C
bsd-3-clause
seberg/numpy,anntzer/numpy,simongibbons/numpy,charris/numpy,mattip/numpy,mattip/numpy,mhvk/numpy,jakirkham/numpy,anntzer/numpy,numpy/numpy,rgommers/numpy,mhvk/numpy,seberg/numpy,pdebuyl/numpy,pdebuyl/numpy,endolith/numpy,mhvk/numpy,rgommers/numpy,mhvk/numpy,endolith/numpy,charris/numpy,anntzer/numpy,jakirkham/numpy,rgommers/numpy,rgommers/numpy,jakirkham/numpy,charris/numpy,anntzer/numpy,endolith/numpy,mattip/numpy,numpy/numpy,charris/numpy,jakirkham/numpy,mhvk/numpy,mattip/numpy,simongibbons/numpy,pdebuyl/numpy,simongibbons/numpy,seberg/numpy,pdebuyl/numpy,simongibbons/numpy,numpy/numpy,simongibbons/numpy,seberg/numpy,numpy/numpy,endolith/numpy,jakirkham/numpy
da5a68aff87e0152a5058c070b634eecaddf1a27
3RVX/3RVX.h
3RVX/3RVX.h
#pragma once #define CLASS_3RVX L"3RVXv3" static const UINT WM_3RVX_CONTROL = RegisterWindowMessage(L"WM_3RVX_CONTROL"); static const UINT WM_3RVX_SETTINGSCTRL = RegisterWindowMessage(L"WM_3RVX_SETTINGSCTRL"); #define MSG_LOAD WM_APP + 100 #define MSG_SETTINGS WM_APP + 101 #define MSG_EXIT WM_APP + 102 #define MSG_HIDEOSD WM_APP + 103
#pragma once #define CLASS_3RVX L"3RVXv3" #define CLASS_3RVX_SETTINGS L"3RVX-Settings" static const UINT WM_3RVX_CONTROL = RegisterWindowMessage(L"WM_3RVX_CONTROL"); static const UINT WM_3RVX_SETTINGSCTRL = RegisterWindowMessage(L"WM_3RVX_SETTINGSCTRL"); #define MSG_LOAD WM_APP + 100 #define MSG_SETTINGS WM_APP + 101 #define MSG_EXIT WM_APP + 102 #define MSG_HIDEOSD WM_APP + 103 #define MSG_ACTIVATE WM_APP + 104
Add a class for the settings dialog
Add a class for the settings dialog
C
bsd-2-clause
Soulflare3/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,malensek/3RVX,malensek/3RVX
18a924e2f2c783dd18c1f8a47d8be7a4dbc7eae4
modules/audio_coding/codecs/ilbc/nearest_neighbor.c
modules/audio_coding/codecs/ilbc/nearest_neighbor.c
/* * Copyright (c) 2011 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. */ /****************************************************************** iLBC Speech Coder ANSI-C Source Code WebRtcIlbcfix_NearestNeighbor.c ******************************************************************/ #include "defines.h" void WebRtcIlbcfix_NearestNeighbor(size_t* index, const size_t* array, size_t value, size_t arlength) { size_t min_diff = (size_t)-1; for (size_t i = 0; i < arlength; i++) { const size_t diff = (array[i] < value) ? (value - array[i]) : (array[i] - value); if (diff < min_diff) { *index = i; min_diff = diff; } } }
/* * Copyright (c) 2011 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. */ /****************************************************************** iLBC Speech Coder ANSI-C Source Code WebRtcIlbcfix_NearestNeighbor.c ******************************************************************/ #include "defines.h" void WebRtcIlbcfix_NearestNeighbor(size_t* index, const size_t* array, size_t value, size_t arlength) { size_t i; size_t min_diff = (size_t)-1; for (i = 0; i < arlength; i++) { const size_t diff = (array[i] < value) ? (value - array[i]) : (array[i] - value); if (diff < min_diff) { *index = i; min_diff = diff; } } }
Fix ChromeOS build (C99 break)
Fix ChromeOS build (C99 break) BUG=5016 TBR=henrik.lundin@webrtc.org Review URL: https://codereview.webrtc.org/1354163002 Cr-Original-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#9992} Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc Cr-Mirrored-Commit: 2803a40fe335a29f9584911d1a52856bdb302df7
C
bsd-3-clause
jchavanton/webrtc,Alkalyne/webrtctrunk,Alkalyne/webrtctrunk,aleonliao/webrtc-trunk,jchavanton/webrtc,Alkalyne/webrtctrunk,Alkalyne/webrtctrunk,aleonliao/webrtc-trunk,jchavanton/webrtc,jchavanton/webrtc,aleonliao/webrtc-trunk,Alkalyne/webrtctrunk,jchavanton/webrtc,sippet/webrtc,sippet/webrtc,aleonliao/webrtc-trunk,sippet/webrtc,jchavanton/webrtc,aleonliao/webrtc-trunk,aleonliao/webrtc-trunk,sippet/webrtc,Alkalyne/webrtctrunk,sippet/webrtc,jchavanton/webrtc,sippet/webrtc,Alkalyne/webrtctrunk,Alkalyne/webrtctrunk
1a05b79f5f21097de4d3d587cca3aed790c0e434
Include/KAI/Platform/GameController.h
Include/KAI/Platform/GameController.h
#ifndef KAI_PLATFORM_GAME_CONTROLLER_H #define KAI_PLATFORM_GAME_CONTROLLER_H #include KAI_PLATFORM_INCLUDE(GameController.h) #endif // SHATTER_PLATFORM_GAME_CONTROLLER_H //EOF
#ifndef KAI_PLATFORM_GAME_CONTROLLER_H #define KAI_PLATFORM_GAME_CONTROLLER_H #include KAI_PLATFORM_INCLUDE(GameController.h) #endif //EOF
Add some color for console output
Add some color for console output
C
mit
cschladetsch/KAI,cschladetsch/KAI,cschladetsch/KAI
7a276551f8349db28f32c36a68ab96c46c90517c
storage/src/vespa/storage/common/bucket_utils.h
storage/src/vespa/storage/common/bucket_utils.h
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/document/bucket/bucketid.h> #include <vespa/persistence/spi/bucket_limits.h> #include <cassert> namespace storage { /** * Returns the super bucket key of the given bucket id key based on the minimum used bits allowed. */ uint64_t get_super_bucket_key(const document::BucketId& bucket_id) { assert(bucket_id.getUsedBits() >= spi::BucketLimits::MinUsedBits); // Since bucket keys have count-bits at the LSB positions, we want to look at the MSBs instead. return (bucket_id.toKey() >> (64 - spi::BucketLimits::MinUsedBits)); } }
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/document/bucket/bucketid.h> #include <vespa/persistence/spi/bucket_limits.h> #include <cassert> namespace storage { /** * Returns the super bucket key of the given bucket id key based on the minimum used bits allowed. */ inline uint64_t get_super_bucket_key(const document::BucketId& bucket_id) noexcept { assert(bucket_id.getUsedBits() >= spi::BucketLimits::MinUsedBits); // Since bucket keys have count-bits at the LSB positions, we want to look at the MSBs instead. return (bucket_id.toKey() >> (64 - spi::BucketLimits::MinUsedBits)); } }
Make function inline and noexcept.
Make function inline and noexcept.
C
apache-2.0
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
ea0ceed76722247d83ec5ec1e6ae4b65a83a96b1
tests/chardata.h
tests/chardata.h
/* chardata.h * * */ #ifndef XML_CHARDATA_H #define XML_CHARDATA_H 1 #ifndef XML_VERSION #include "expat.h" /* need XML_Char */ #endif typedef struct { int count; /* # of chars, < 0 if not set */ XML_Char data[1024]; } CharData; void CharData_Init(CharData *storage); void CharData_AppendString(CharData *storage, const char *s); void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len); int CharData_CheckString(CharData *storage, const char *s); int CharData_CheckXMLChars(CharData *storage, const XML_Char *s); #endif /* XML_CHARDATA_H */
/* chardata.h Interface to some helper routines used to accumulate and check text and attribute content. */ #ifndef XML_CHARDATA_H #define XML_CHARDATA_H 1 #ifndef XML_VERSION #include "expat.h" /* need XML_Char */ #endif typedef struct { int count; /* # of chars, < 0 if not set */ XML_Char data[1024]; } CharData; void CharData_Init(CharData *storage); void CharData_AppendString(CharData *storage, const char *s); void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len); int CharData_CheckString(CharData *storage, const char *s); int CharData_CheckXMLChars(CharData *storage, const XML_Char *s); #endif /* XML_CHARDATA_H */
Add a small comment to tell what this is.
Add a small comment to tell what this is.
C
mit
cgwalters/expat-git-mirror,cgwalters/expat-git-mirror,cgwalters/expat-git-mirror
3f987b530fb7c6ef773d382bfa25e02064405f19
direct/src/plugin/p3dReferenceCount.h
direct/src/plugin/p3dReferenceCount.h
// Filename: p3dReferenceCount.h // Created by: drose (09Jul09) // //////////////////////////////////////////////////////////////////// // // PANDA 3D SOFTWARE // Copyright (c) Carnegie Mellon University. All rights reserved. // // All use of this software is subject to the terms of the revised BSD // license. You should have received a copy of this license along // with this source code in a file named "LICENSE." // //////////////////////////////////////////////////////////////////// #ifndef P3DREFERENCECOUNT_H #define P3DREFERENCECOUNT_H #include "p3d_plugin_common.h" //////////////////////////////////////////////////////////////////// // Class : P3DReferenceCount // Description : A base class for reference-counted objects in this // module. We follow the Panda convention, rather than // the Pythong convention: the reference count of a new // object is initially 0. //////////////////////////////////////////////////////////////////// class P3DReferenceCount { public: inline P3DReferenceCount(); inline ~P3DReferenceCount(); inline void ref() const; inline bool unref() const; private: int _ref_count; }; template<class RefCountType> inline void unref_delete(RefCountType *ptr); #include "p3dReferenceCount.I" #endif
// Filename: p3dReferenceCount.h // Created by: drose (09Jul09) // //////////////////////////////////////////////////////////////////// // // PANDA 3D SOFTWARE // Copyright (c) Carnegie Mellon University. All rights reserved. // // All use of this software is subject to the terms of the revised BSD // license. You should have received a copy of this license along // with this source code in a file named "LICENSE." // //////////////////////////////////////////////////////////////////// #ifndef P3DREFERENCECOUNT_H #define P3DREFERENCECOUNT_H #include "p3d_plugin_common.h" //////////////////////////////////////////////////////////////////// // Class : P3DReferenceCount // Description : A base class for reference-counted objects in this // module. We follow the Panda convention, rather than // the Python convention: the reference count of a new // object is initially 0. //////////////////////////////////////////////////////////////////// class P3DReferenceCount { public: inline P3DReferenceCount(); inline ~P3DReferenceCount(); inline void ref() const; inline bool unref() const; private: int _ref_count; }; template<class RefCountType> inline void unref_delete(RefCountType *ptr); #include "p3dReferenceCount.I" #endif
Fix typo: "Pythong" -> "Python" ;-)
Fix typo: "Pythong" -> "Python" ;-)
C
bsd-3-clause
brakhane/panda3d,hj3938/panda3d,ee08b397/panda3d,tobspr/panda3d,tobspr/panda3d,jjkoletar/panda3d,jjkoletar/panda3d,tobspr/panda3d,Wilee999/panda3d,hj3938/panda3d,Wilee999/panda3d,cc272309126/panda3d,brakhane/panda3d,cc272309126/panda3d,hj3938/panda3d,matthiascy/panda3d,cc272309126/panda3d,jjkoletar/panda3d,hj3938/panda3d,ee08b397/panda3d,Wilee999/panda3d,mgracer48/panda3d,grimfang/panda3d,mgracer48/panda3d,ee08b397/panda3d,brakhane/panda3d,cc272309126/panda3d,chandler14362/panda3d,Wilee999/panda3d,ee08b397/panda3d,chandler14362/panda3d,hj3938/panda3d,grimfang/panda3d,jjkoletar/panda3d,chandler14362/panda3d,tobspr/panda3d,grimfang/panda3d,tobspr/panda3d,grimfang/panda3d,tobspr/panda3d,grimfang/panda3d,ee08b397/panda3d,grimfang/panda3d,mgracer48/panda3d,ee08b397/panda3d,mgracer48/panda3d,mgracer48/panda3d,matthiascy/panda3d,mgracer48/panda3d,tobspr/panda3d,jjkoletar/panda3d,matthiascy/panda3d,mgracer48/panda3d,cc272309126/panda3d,brakhane/panda3d,brakhane/panda3d,matthiascy/panda3d,chandler14362/panda3d,cc272309126/panda3d,grimfang/panda3d,jjkoletar/panda3d,tobspr/panda3d,grimfang/panda3d,Wilee999/panda3d,tobspr/panda3d,matthiascy/panda3d,tobspr/panda3d,mgracer48/panda3d,grimfang/panda3d,cc272309126/panda3d,chandler14362/panda3d,matthiascy/panda3d,matthiascy/panda3d,hj3938/panda3d,Wilee999/panda3d,ee08b397/panda3d,brakhane/panda3d,mgracer48/panda3d,chandler14362/panda3d,grimfang/panda3d,hj3938/panda3d,chandler14362/panda3d,jjkoletar/panda3d,Wilee999/panda3d,matthiascy/panda3d,brakhane/panda3d,Wilee999/panda3d,cc272309126/panda3d,jjkoletar/panda3d,chandler14362/panda3d,hj3938/panda3d,jjkoletar/panda3d,ee08b397/panda3d,ee08b397/panda3d,cc272309126/panda3d,Wilee999/panda3d,matthiascy/panda3d,chandler14362/panda3d,brakhane/panda3d,hj3938/panda3d,chandler14362/panda3d,brakhane/panda3d
253ce6fd38f982fae6b0cf7f7bc4bf6fa36b8e9f
src/ast/node_counter.h
src/ast/node_counter.h
#pragma once #include "bpftrace.h" #include "log.h" #include "pass_manager.h" #include "visitors.h" namespace bpftrace { namespace ast { class NodeCounter : public Visitor { public: void Visit(Node &node) { count_++; Visitor::Visit(node); } size_t get_count() { return count_; }; private: size_t count_ = 0; }; Pass CreateCounterPass() { auto fn = [](Node &n, PassContext &ctx) { NodeCounter c; c.Visit(n); auto node_count = c.get_count(); auto max = ctx.b.ast_max_nodes_; if (bt_verbose) { LOG(INFO) << "node count: " << max; } if (node_count >= max) { LOG(ERROR) << "node count (" << node_count << ") exceeds the limit (" << max << ")"; return PassResult::Error("node count exceeded"); } return PassResult::Success(); }; return Pass("NodeCounter", fn); } } // namespace ast } // namespace bpftrace
#pragma once #include "bpftrace.h" #include "log.h" #include "pass_manager.h" #include "visitors.h" namespace bpftrace { namespace ast { class NodeCounter : public Visitor { public: void Visit(Node &node) { count_++; Visitor::Visit(node); } size_t get_count() { return count_; }; private: size_t count_ = 0; }; Pass CreateCounterPass() { auto fn = [](Node &n, PassContext &ctx) { NodeCounter c; c.Visit(n); auto node_count = c.get_count(); auto max = ctx.b.ast_max_nodes_; if (bt_verbose) { LOG(INFO) << "node count: " << node_count; } if (node_count >= max) { LOG(ERROR) << "node count (" << node_count << ") exceeds the limit (" << max << ")"; return PassResult::Error("node count exceeded"); } return PassResult::Success(); }; return Pass("NodeCounter", fn); } } // namespace ast } // namespace bpftrace
Fix printing bug in node-counter pass
Fix printing bug in node-counter pass
C
apache-2.0
iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace
b4f4ec34d4632864e9b5738d2b47c272d22dd6e7
You-Controller-Tests/exclusions.h
You-Controller-Tests/exclusions.h
#pragma once #ifndef YOU_CONTROLLER_TESTS_EXCLUSIONS_H_ #define YOU_CONTROLLER_TESTS_EXCLUSIONS_H_ // A local define since there is no way to test whether a header file exists. // If you have VS Premium, then add it to the project definition (user // properties) file #ifdef MS_CPP_CODECOVERAGE /// \file Exclusions from code coverage analysis. /// See http://msdn.microsoft.com/en-sg/library/dd537628.aspx #include <CodeCoverage/CodeCoverage.h> #pragma managed(push, off) ExcludeFromCodeCoverage(boost, L"boost::*"); ExcludeFromCodeCoverage(boost_meta, L"??@*@"); ExcludeFromCodeCoverage(You_NLP, L"You::NLP::*"); ExcludeFromCodeCoverage(You_QueryEngine, L"You::QueryEngine::*"); ExcludeFromCodeCoverage(You_Utils, L"You::Utils::*"); #pragma managed(pop) #endif // MS_CPP_CODECOVERAGE #endif // YOU_CONTROLLER_TESTS_EXCLUSIONS_H_
#pragma once #ifndef YOU_CONTROLLER_TESTS_EXCLUSIONS_H_ #define YOU_CONTROLLER_TESTS_EXCLUSIONS_H_ // A local define since there is no way to test whether a header file exists. // If you have VS Premium, then add it to the project definition (user // properties) file #ifdef MS_CPP_CODECOVERAGE /// \file Exclusions from code coverage analysis. /// See http://msdn.microsoft.com/en-sg/library/dd537628.aspx #include <CodeCoverage/CodeCoverage.h> #pragma managed(push, off) ExcludeFromCodeCoverage(boost, L"boost::*"); ExcludeFromCodeCoverage(boost_meta, L"??@*@"); ExcludeFromCodeCoverage(You_NLP, L"You::NLP::*"); ExcludeFromCodeCoverage(You_QueryEngine, L"You::QueryEngine::*"); ExcludeFromCodeCoverage(You_DataStore, L"You::DataStore::*"); ExcludeFromCodeCoverage(You_Utils, L"You::Utils::*"); #pragma managed(pop) #endif // MS_CPP_CODECOVERAGE #endif // YOU_CONTROLLER_TESTS_EXCLUSIONS_H_
Exclude data store from controller code coverage.
Exclude data store from controller code coverage.
C
mit
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
ff862f1dea771feb087f9eade8534efa67f106f9
SDLWrapper/__Plugin.h
SDLWrapper/__Plugin.h
#pragma once #include "begin_code.h" namespace _internal { /// This is just an empty class. /// Most wrapper class regard this class as a friend class. /// You can get/set raw pointers through this class. class Plugin { public: template<typename T> decltype(auto) get(const T& obj) { return obj._get(); } template<typename T,typename U> void set(T& obj,U&& value) { obj._set(value); } template<typename T> void clear(T& obj) { obj._clear(); } template<typename T,typename U> void set_no_delete(T& obj,U&& value) { obj._set_no_delete(value); } }; } #include "end_code.h"
#pragma once #include "begin_code.h" namespace _internal { /// This is just an empty class. /// Most wrapper class regard this class as a friend class. /// You can get/set raw pointers through this class. class Plugin { public: template<typename T> static decltype(auto) get(const T& obj) { return obj._get(); } template<typename T,typename U> static void set(T& obj,U&& value) { obj._set(value); } template<typename T> static void clear(T& obj) { obj._clear(); } template<typename T,typename U> static void set_no_delete(T& obj,U&& value) { obj._set_no_delete(value); } }; } #include "end_code.h"
Change Plugin methods to static
Change Plugin methods to static
C
mit
Kiritow/MiniEngine,Kiritow/MiniEngine
7c9ca7333acca5dab1e01fa282758038cf62b843
tools/cgfx2json/stdafx.h
tools/cgfx2json/stdafx.h
// Copyright (c) 2009-2011 Turbulenz Limited // stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #ifdef _MSC_VER #pragma once #endif #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. #endif #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #ifndef _USE_MATH_DEFINES #define _USE_MATH_DEFINES #endif #ifndef BOOST_DISABLE_THREADS #define BOOST_DISABLE_THREADS #endif #include <boost/xpressive/xpressive.hpp> #include <stdio.h> #include <math.h> #include <float.h> #include <limits.h> #include <string.h> #include <stdlib.h> #include <string> #include <list> #include <map> #include <set> #include <Cg/cg.h> #include <Cg/cgGL.h>
// Copyright (c) 2009-2011 Turbulenz Limited // stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #ifdef _MSC_VER #pragma once #endif #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. #endif #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #ifndef _USE_MATH_DEFINES #define _USE_MATH_DEFINES #endif #ifndef BOOST_DISABLE_THREADS #define BOOST_DISABLE_THREADS #endif #ifdef _MSC_VER # pragma warning(push) # pragma warning(disable:4458) # pragma warning(disable:4459) # pragma warning(disable:4456) #endif #include <boost/xpressive/xpressive.hpp> #ifdef _MSC_VER # pragma warning(pop) #endif #include <stdio.h> #include <math.h> #include <float.h> #include <limits.h> #include <string.h> #include <stdlib.h> #include <string> #include <list> #include <map> #include <set> #include <Cg/cg.h> #include <Cg/cgGL.h>
Disable some compiler warnings on the boost library.
Disable some compiler warnings on the boost library.
C
mit
sanyaade-teachings/turbulenz_engine,turbulenz/turbulenz_engine,changemypath/turbulenz_engine,turbulenz/turbulenz_engine,supriyantomaftuh/turbulenz_engine,tianyutingxy/turbulenz_engine,supriyantomaftuh/turbulenz_engine,turbulenz/turbulenz_engine,tianyutingxy/turbulenz_engine,sanyaade-teachings/turbulenz_engine,supriyantomaftuh/turbulenz_engine,turbulenz/turbulenz_engine,turbulenz/turbulenz_engine,changemypath/turbulenz_engine,tianyutingxy/turbulenz_engine,changemypath/turbulenz_engine,tianyutingxy/turbulenz_engine,supriyantomaftuh/turbulenz_engine,sanyaade-teachings/turbulenz_engine,changemypath/turbulenz_engine,sanyaade-teachings/turbulenz_engine,tianyutingxy/turbulenz_engine,changemypath/turbulenz_engine,sanyaade-teachings/turbulenz_engine,supriyantomaftuh/turbulenz_engine
c55c188e68975e57534a26cc75a823951169db08
drivers/sensor/vl53l0x/vl53l0x_types.h
drivers/sensor/vl53l0x/vl53l0x_types.h
/* vl53l0x_types.h - Zephyr customization of ST vl53l0x library, * basic type definition. */ /* * Copyright (c) 2017 STMicroelectronics * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_SENSOR_VL53L0X_VL53L0X_TYPES_H_ #define ZEPHYR_DRIVERS_SENSOR_VL53L0X_VL53L0X_TYPES_H_ /* Zephyr provides stdint.h and stddef.h, so this is enough to include it. * If it was not the case, we would defined here all signed and unsigned * basic types... */ #include <stdint.h> #include <stddef.h> #ifndef NULL #error "Error NULL definition should be done. Please add required include " #endif #if !defined(STDINT_H) && !defined(_GCC_STDINT_H) && !defined(__STDINT_DECLS) \ && !defined(_GCC_WRAP_STDINT_H) && !defined(_STDINT_H) \ && !defined(__INC_stdint_h__) #pragma message("Review type definition of STDINT define for your platform") #endif /* _STDINT_H */ /** use where fractional values are expected * * Given a floating point value f it's .16 bit point is (int)(f*(1<<16)) */ typedef uint32_t FixPoint1616_t; #endif /* ZEPHYR_DRIVERS_SENSOR_VL53L0X_VL53L0X_TYPES_H_ */
/* vl53l0x_types.h - Zephyr customization of ST vl53l0x library, * basic type definition. */ /* * Copyright (c) 2017 STMicroelectronics * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_DRIVERS_SENSOR_VL53L0X_VL53L0X_TYPES_H_ #define ZEPHYR_DRIVERS_SENSOR_VL53L0X_VL53L0X_TYPES_H_ /* Zephyr provides stdint.h and stddef.h, so this is enough to include it. * If it was not the case, we would defined here all signed and unsigned * basic types... */ #include <stdint.h> #include <stddef.h> #ifndef NULL #error "Error NULL definition should be done. Please add required include " #endif /** use where fractional values are expected * * Given a floating point value f it's .16 bit point is (int)(f*(1<<16)) */ typedef uint32_t FixPoint1616_t; #endif /* ZEPHYR_DRIVERS_SENSOR_VL53L0X_VL53L0X_TYPES_H_ */
Remove unnecessary lib include check
drivers/sensor/vl53l0x: Remove unnecessary lib include check vl53l0x driver is using an external library to build, located under: ext/hal/st/lib/sensor/vl53l0x. This library is expecting stdint.h lib to be available and to secure this for driver library inclusion work, a stdint.h file header check was done. This check was based on assumptions on possible header names for stdint.h. Due to recent renaming of the zephyr header files, this check was returning a false positive, generating warning at compilation. Rather than updated with new header names, remove this check, since driver porting is completed and stdint.h inclusion is actually done. Fixes #10134 Signed-off-by: Erwan Gouriou <de4d967452b83bb0e37525652734e7d9163b6a4c@linaro.org>
C
apache-2.0
galak/zephyr,ldts/zephyr,nashif/zephyr,Vudentz/zephyr,finikorg/zephyr,GiulianoFranchetto/zephyr,GiulianoFranchetto/zephyr,finikorg/zephyr,Vudentz/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,nashif/zephyr,finikorg/zephyr,GiulianoFranchetto/zephyr,ldts/zephyr,Vudentz/zephyr,Vudentz/zephyr,GiulianoFranchetto/zephyr,Vudentz/zephyr,galak/zephyr,galak/zephyr,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,ldts/zephyr,ldts/zephyr,ldts/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,Vudentz/zephyr
0a5ffd4b837b57412f4943b9d62ce2d109315db3
You-QueryEngine/api.h
You-QueryEngine/api.h
/// \file api.h /// Defines the API for Query Engine. /// \author A0112054Y #pragma once #ifndef YOU_QUERYENGINE_API_H_ #define YOU_QUERYENGINE_API_H_ #include <memory> #include <boost/variant.hpp> #include "task_model.h" namespace You { namespace QueryEngine { /// A synthesized type for holding query responses typedef boost::variant < std::vector<Task>, Task, Task::ID, Task::Time, Task::Dependencies, Task::Description > Response; /// Base class for all queries. class Query { friend Response executeQuery(std::unique_ptr<Query> query); private: /// Execute the query. virtual Response execute() = 0; }; /// \name Query Constructors /// @{ /// Construct a query for adding a task /// \note Please use Task::DEFAULT_xxx to replace incomplete fields. std::unique_ptr<Query> AddTask(Task::Description description, Task::Time deadline, Task::Priority priority, Task::Dependencies dependencies); /// @} /// Execute a query and return a response /// \return The result of the query as a response object. Response executeQuery(std::unique_ptr<Query> query); } // namespace QueryEngine } // namespace You #endif // YOU_QUERYENGINE_API_H_
/// \file api.h /// Defines the API for Query Engine. /// \author A0112054Y #pragma once #ifndef YOU_QUERYENGINE_API_H_ #define YOU_QUERYENGINE_API_H_ #include <memory> #include <boost/variant.hpp> #include "task_model.h" namespace You { namespace QueryEngine { /// A synthesized type for holding query responses typedef boost::variant < std::vector<Task>, Task, Task::ID, Task::Time, Task::Dependencies, Task::Description > Response; /// Base class for all queries. class Query { friend Response executeQuery(std::unique_ptr<Query> query); private: /// Execute the query. virtual Response execute() = 0; }; /// \name Query Constructors /// @{ /// Construct a query for adding a task /// \note Please use Task::DEFAULT_xxx to replace incomplete fields. std::unique_ptr<Query> AddTask(Task::Description description, Task::Time deadline, Task::Priority priority, Task::Dependencies dependencies); std::unique_ptr<Query> FilterTask(const std::function<bool(Task)>& filter); /// @} /// Execute a query and return a response /// \return The result of the query as a response object. Response executeQuery(std::unique_ptr<Query> query); } // namespace QueryEngine } // namespace You #endif // YOU_QUERYENGINE_API_H_
Add filter stub in header
Add filter stub in header
C
mit
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
e6083cb7179c23930dc8aad4d05e05d410ed2dcd
alice4/software/libgl/event_service.h
alice4/software/libgl/event_service.h
#ifndef __EVENT_SERVICE_H__ #define __EVENT_SERVICE_H__ #include "basic_types.h" int32_t events_winopen(char *title); int32_t events_get_valuator(int32_t device); void events_qdevice(int32_t device); int32_t events_qread_start(int blocking); int32_t events_qread_continue(int16_t *value); void events_tie(int32_t button, int32_t val1, int32_t val2); #endif /* __EVENT_SERVICE_H__ */:w
#ifndef __EVENT_SERVICE_H__ #define __EVENT_SERVICE_H__ #include "basic_types.h" int32_t events_winopen(char *title); int32_t events_get_valuator(int32_t device); void events_qdevice(int32_t device); int32_t events_qread_start(int blocking); int32_t events_qread_continue(int16_t *value); void events_tie(int32_t button, int32_t val1, int32_t val2); #endif /* __EVENT_SERVICE_H__ */
Remove vi schmutz at EOF
Remove vi schmutz at EOF
C
apache-2.0
lkesteloot/alice,lkesteloot/alice,lkesteloot/alice,lkesteloot/alice,lkesteloot/alice,lkesteloot/alice
dcdb76edb97d03a550f014c653c0cc1155fe9154
src/runtime/encore/encore.c
src/runtime/encore/encore.c
#include <pony/pony.h> #include "encore.h" encore_actor_t *encore_create(encore_create_t *type) { return pony_create(type); } /// Allocate s bytes of memory, zeroed out void *encore_alloc(size_t *s) { void *mem = pony_alloc(s); memset(mem, 0, s); return mem; } /// The starting point of all Encore programs int encore_start(int argc, char** argv, encore_actor_t *type) { argc = pony_init(argc, argv); pony_actor_t* actor = encore_create(type); pony_sendargs(actor, _ENC__MSG_MAIN, argc, argv); return pony_start(PONY_DONT_WAIT); }
#include <pony/pony.h> #include "encore.h" encore_actor_t *encore_create(encore_actor_t *type) { return pony_create(type); } /// Allocate s bytes of memory, zeroed out void *encore_alloc(size_t *s) { void *mem = pony_alloc(s); memset(mem, 0, s); return mem; } /// The starting point of all Encore programs int encore_start(int argc, char** argv, encore_actor_t *type) { argc = pony_init(argc, argv); pony_actor_t* actor = encore_create(type); pony_sendargs(actor, _ENC__MSG_MAIN, argc, argv); return pony_start(PONY_DONT_WAIT); }
Fix also applied to corresponding C file
Fix also applied to corresponding C file
C
bsd-3-clause
parapluu/encore,parapluu/encore,parapluu/encore
d782e8b30435413a9f0eeffc6eb38980e4c03bda
src/rx5808-pro-diversity/receiver.h
src/rx5808-pro-diversity/receiver.h
#ifndef RECEIVER_H #define RECEIVER_H #include <stdint.h> #include "settings.h" #define RECEIVER_A 0 #ifdef USE_DIVERSITY #define RECEIVER_B 1 #define RECEIVER_AUTO 2 #define DIVERSITY_AUTO 0 #define DIVERSITY_FORCE_A 1 #define DIVERSITY_FORCE_B 2 #endif #define RECEIVER_LAST_DELAY 100 #define RECEIVER_LAST_DATA_SIZE 16 namespace Receiver { extern uint8_t activeReceiver; extern uint8_t activeChannel; extern uint8_t rssiA; extern uint16_t rssiARaw; extern uint8_t rssiALast[RECEIVER_LAST_DATA_SIZE]; #ifdef USE_DIVERSITY extern uint8_t rssiB; extern uint16_t rssiBRaw; extern uint8_t rssiBLast[RECEIVER_LAST_DATA_SIZE]; #endif void setChannel(uint8_t channel); void waitForStableRssi(); uint16_t updateRssi(); void setActiveReceiver(uint8_t receiver = RECEIVER_A); #ifdef USE_DIVERSITY void setDiversityMode(uint8_t mode); void switchDiversity(); #endif void setup(); void update(); } #endif
#ifndef RECEIVER_H #define RECEIVER_H #include <stdint.h> #include "settings.h" #define RECEIVER_A 0 #ifdef USE_DIVERSITY #define RECEIVER_B 1 #define RECEIVER_AUTO 2 #define DIVERSITY_AUTO 0 #define DIVERSITY_FORCE_A 1 #define DIVERSITY_FORCE_B 2 #endif #define RECEIVER_LAST_DELAY 50 #define RECEIVER_LAST_DATA_SIZE 24 namespace Receiver { extern uint8_t activeReceiver; extern uint8_t activeChannel; extern uint8_t rssiA; extern uint16_t rssiARaw; extern uint8_t rssiALast[RECEIVER_LAST_DATA_SIZE]; #ifdef USE_DIVERSITY extern uint8_t rssiB; extern uint16_t rssiBRaw; extern uint8_t rssiBLast[RECEIVER_LAST_DATA_SIZE]; #endif void setChannel(uint8_t channel); void waitForStableRssi(); uint16_t updateRssi(); void setActiveReceiver(uint8_t receiver = RECEIVER_A); #ifdef USE_DIVERSITY void setDiversityMode(uint8_t mode); void switchDiversity(); #endif void setup(); void update(); } #endif
Tweak RSSI tracking speed/count for better graphs
Tweak RSSI tracking speed/count for better graphs
C
mit
RCDaddy/rx5808-pro-diversity,sheaivey/rx5808-pro-diversity,RCDaddy/rx5808-pro-diversity,sheaivey/rx5808-pro-diversity
3494e5de3a03d021845666f55340d35af44e3bfc
tests/asm-c-connect-1.c
tests/asm-c-connect-1.c
#include <stdio.h> #if defined _WIN32 && !defined __TINYC__ # define U "_" #else # define U #endif const char str[] = "x1\n"; #ifdef __x86_64__ asm(U"x1: push %rbp; mov $"U"str, %rdi; call "U"printf; pop %rbp; ret"); #elif defined (__i386__) asm(U"x1: push $"U"str; call "U"printf; pop %eax; ret"); #endif int main(int argc, char *argv[]) { asm("call "U"x1"); asm("call "U"x2"); asm("call "U"x3"); return 0; } static int x2(void) { printf("x2\n"); return 2; } extern int x3(void);
#include <stdio.h> #if defined _WIN32 && !defined __TINYC__ # define _ "_" #else # define _ #endif static int x1_c(void) { printf("x1\n"); return 1; } asm(".text;"_"x1: call "_"x1_c; ret"); int main(int argc, char *argv[]) { asm("call "_"x1"); asm("call "_"x2"); asm("call "_"x3"); return 0; } static int x2(void) { printf("x2\n"); return 2; } extern int x3(void);
Adjust asm-c-connect testcase for Windows
Adjust asm-c-connect testcase for Windows Calling conventions are different, let's use functions without any arguments.
C
lgpl-2.1
mirror/tinycc,mirror/tinycc,avih/tinycc,mirror/tinycc,mingodad/tinycc,mingodad/tinycc,mingodad/tinycc,mirror/tinycc,avih/tinycc,avih/tinycc,avih/tinycc,mingodad/tinycc
96430402b3226b71bcec689eb917ac1ec4bf49da
test/include/auxkernels/RadialAverageAux.h
test/include/auxkernels/RadialAverageAux.h
#pragma once #include "AuxKernel.h" #include "RadialAverage.h" /** * Auxkernel to output the averaged material value from RadialAverage */ class RadialAverageAux : public AuxKernel { public: static InputParameters validParams(); RadialAverageAux(const InputParameters & parameters); protected: virtual Real computeValue() override; const RadialAverage::Result & _average; RadialAverage::Result::const_iterator _elem_avg; };
#pragma once #include "AuxKernel.h" #include "RadialAverage.h" /** * Auxkernel to output the averaged material value from RadialAverage */ class RadialAverageAux : public AuxKernel { public: static InputParameters validParams(); RadialAverageAux(const InputParameters & parameters); protected: virtual Real computeValue() override; const RadialAverage::Result & _average; RadialAverage::Result::const_iterator _elem_avg; };
Update to add newline EOF
Update to add newline EOF
C
lgpl-2.1
milljm/moose,milljm/moose,andrsd/moose,idaholab/moose,sapitts/moose,laagesen/moose,sapitts/moose,laagesen/moose,harterj/moose,idaholab/moose,milljm/moose,idaholab/moose,harterj/moose,sapitts/moose,andrsd/moose,sapitts/moose,dschwen/moose,laagesen/moose,milljm/moose,milljm/moose,dschwen/moose,harterj/moose,laagesen/moose,andrsd/moose,idaholab/moose,harterj/moose,harterj/moose,dschwen/moose,andrsd/moose,idaholab/moose,andrsd/moose,dschwen/moose,laagesen/moose,dschwen/moose,sapitts/moose
41ba36ca7801c77f55da0f0180d3a844e4286d80
Source/UnrealEnginePython/Public/UnrealEnginePython.h
Source/UnrealEnginePython/Public/UnrealEnginePython.h
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #pragma once #include "ModuleManager.h" DECLARE_LOG_CATEGORY_EXTERN(LogPython, Log, All); class UNREALENGINEPYTHON_API FUnrealEnginePythonModule : public IModuleInterface { public: bool PythonGILAcquire(); void PythonGILRelease(); virtual void StartupModule() override; virtual void ShutdownModule() override; void RunString(char *); void RunFile(char *); void RunFileSandboxed(char *); private: void *ue_python_gil; // used by console void *main_dict; void *local_dict; void *main_module; }; struct FScopePythonGIL { FScopePythonGIL() { #if defined(UEPY_THREADING) UnrealEnginePythonModule = FModuleManager::LoadModuleChecked<FUnrealEnginePythonModule>("UnrealEnginePython"); safeForRelease = UnrealEnginePythonModule.PythonGILAcquire(); #endif } ~FScopePythonGIL() { #if defined(UEPY_THREADING) if (safeForRelease) { UnrealEnginePythonModule.PythonGILRelease(); } #endif } FUnrealEnginePythonModule UnrealEnginePythonModule; bool safeForRelease; };
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #pragma once #include "ModuleManager.h" DECLARE_LOG_CATEGORY_EXTERN(LogPython, Log, All); class UNREALENGINEPYTHON_API FUnrealEnginePythonModule : public IModuleInterface { public: bool PythonGILAcquire(); void PythonGILRelease(); virtual void StartupModule() override; virtual void ShutdownModule() override; void RunString(char *); void RunFile(char *); void RunFileSandboxed(char *); private: void *ue_python_gil; // used by console void *main_dict; void *local_dict; }; struct FScopePythonGIL { FScopePythonGIL() { #if defined(UEPY_THREADING) UnrealEnginePythonModule = FModuleManager::LoadModuleChecked<FUnrealEnginePythonModule>("UnrealEnginePython"); safeForRelease = UnrealEnginePythonModule.PythonGILAcquire(); #endif } ~FScopePythonGIL() { #if defined(UEPY_THREADING) if (safeForRelease) { UnrealEnginePythonModule.PythonGILRelease(); } #endif } FUnrealEnginePythonModule UnrealEnginePythonModule; bool safeForRelease; };
Revert "Add support for the Python Stdout Log"
Revert "Add support for the Python Stdout Log" This reverts commit 6dd58324c052cc893f6ce8f009903805185a71d1.
C
mit
Orav/UnrealEnginePython,20tab/UnrealEnginePython,20tab/UnrealEnginePython,getnamo/UnrealEnginePython,Orav/UnrealEnginePython,kitelightning/UnrealEnginePython,kitelightning/UnrealEnginePython,Orav/UnrealEnginePython,20tab/UnrealEnginePython,getnamo/UnrealEnginePython,getnamo/UnrealEnginePython,20tab/UnrealEnginePython,Orav/UnrealEnginePython,kitelightning/UnrealEnginePython,kitelightning/UnrealEnginePython,getnamo/UnrealEnginePython,kitelightning/UnrealEnginePython,20tab/UnrealEnginePython,getnamo/UnrealEnginePython
778092838a341f1b508b4f1013c9418902200725
unittest/include_gunit.h
unittest/include_gunit.h
// (C) Copyright 2017, Google Inc. // 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. // Portability include to match the Google test environment. #ifndef TESSERACT_UNITTEST_INCLUDE_GUNIT_H_ #define TESSERACT_UNITTEST_INCLUDE_GUNIT_H_ #include "gtest/gtest.h" #include "errcode.h" // for ASSERT_HOST #include "fileio.h" // for tesseract::File const char* FLAGS_test_tmpdir = "."; class file: public tesseract::File { }; #define CHECK(test) ASSERT_HOST(test) #endif // TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
// (C) Copyright 2017, Google Inc. // 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. // Portability include to match the Google test environment. #ifndef TESSERACT_UNITTEST_INCLUDE_GUNIT_H_ #define TESSERACT_UNITTEST_INCLUDE_GUNIT_H_ #include "gtest/gtest.h" #include "errcode.h" // for ASSERT_HOST #include "fileio.h" // for tesseract::File const char* FLAGS_test_tmpdir = "."; class file: public tesseract::File { }; #define ARRAYSIZE(arr) (sizeof(arr) / sizeof(arr[0])) #define CHECK(test) ASSERT_HOST(test) #endif // TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
Add ARRAYSIZE macro for Google test environment
Add ARRAYSIZE macro for Google test environment Signed-off-by: Stefan Weil <8d4c780fcfdc41841e5070f4c43da8958ba6aec0@weilnetz.de>
C
apache-2.0
tesseract-ocr/tesseract,stweil/tesseract,amitdo/tesseract,UB-Mannheim/tesseract,jbarlow83/tesseract,jbarlow83/tesseract,tesseract-ocr/tesseract,stweil/tesseract,amitdo/tesseract,jbarlow83/tesseract,tesseract-ocr/tesseract,amitdo/tesseract,UB-Mannheim/tesseract,jbarlow83/tesseract,stweil/tesseract,UB-Mannheim/tesseract,stweil/tesseract,tesseract-ocr/tesseract,tesseract-ocr/tesseract,stweil/tesseract,amitdo/tesseract,UB-Mannheim/tesseract,jbarlow83/tesseract,amitdo/tesseract,UB-Mannheim/tesseract
e22b221f8f12b2ec8348745d91836c236b206738
lib/Target/PowerPC/PPCTargetStreamer.h
lib/Target/PowerPC/PPCTargetStreamer.h
//===-- PPCTargetStreamer.h - PPC Target Streamer --s-----------*- C++ -*--===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_LIB_TARGET_POWERPC_PPCTARGETSTREAMER_H #define LLVM_LIB_TARGET_POWERPC_PPCTARGETSTREAMER_H #include "llvm/MC/MCStreamer.h" namespace llvm { class PPCTargetStreamer : public MCTargetStreamer { public: PPCTargetStreamer(MCStreamer &S); ~PPCTargetStreamer() override; virtual void emitTCEntry(const MCSymbol &S) = 0; virtual void emitMachine(StringRef CPU) = 0; virtual void emitAbiVersion(int AbiVersion) = 0; virtual void emitLocalEntry(MCSymbolELF *S, const MCExpr *LocalOffset) = 0; }; } #endif
//===- PPCTargetStreamer.h - PPC Target Streamer ----------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_LIB_TARGET_POWERPC_PPCTARGETSTREAMER_H #define LLVM_LIB_TARGET_POWERPC_PPCTARGETSTREAMER_H #include "llvm/ADT/StringRef.h" #include "llvm/MC/MCStreamer.h" namespace llvm { class MCExpr; class MCSymbol; class MCSymbolELF; class PPCTargetStreamer : public MCTargetStreamer { public: PPCTargetStreamer(MCStreamer &S); ~PPCTargetStreamer() override; virtual void emitTCEntry(const MCSymbol &S) = 0; virtual void emitMachine(StringRef CPU) = 0; virtual void emitAbiVersion(int AbiVersion) = 0; virtual void emitLocalEntry(MCSymbolELF *S, const MCExpr *LocalOffset) = 0; }; } // end namespace llvm #endif // LLVM_LIB_TARGET_POWERPC_PPCTARGETSTREAMER_H
Fix some Include What You Use warnings; other minor fixes (NFC).
[PowerPC] Fix some Include What You Use warnings; other minor fixes (NFC). This is preparation to reduce MC headers dependencies. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@294368 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm
39dbabe79a9f56fb068ce6e17f5b068eab4226ce
Source/YOChartImageKit/YOChartImageKit.h
Source/YOChartImageKit/YOChartImageKit.h
#import <UIKit/UIKit.h> //! Project version number for YOChartImageKit. FOUNDATION_EXPORT double YOChartImageKitVersionNumber; //! Project version string for YOChartImageKit. FOUNDATION_EXPORT const unsigned char YOChartImageKitVersionString[]; #import <YOChartImageKit/YODonutChartImage.h> #import <YOChartImageKit/YOBarChartImage.h> #import <YOChartImageKit/YOLineChartImage.h>
#import <UIKit/UIKit.h> //! Project version number for YOChartImageKit. FOUNDATION_EXPORT double YOChartImageKitVersionNumber; //! Project version string for YOChartImageKit. FOUNDATION_EXPORT const unsigned char YOChartImageKitVersionString[]; #import "YODonutChartImage.h" #import "YOBarChartImage.h" #import "YOLineChartImage.h"
Fix including framework headers' path
Fix including framework headers' path
C
mit
yasuoza/YOChartImageKit,yasuoza/YOChartImageKit
2a6f1ae84ba32a6ee78eb386412254de98f85d04
chapter1/1-10/external-longest.c
chapter1/1-10/external-longest.c
// // Created by matti on 16.9.2015. // #include <stdio.h> #define MAXLINE 1000 int max; char line[MAXLINE]; char longest[MAXLINE]; int getline(void); void copy(void); int main() { int len; extern int max; extern char longest[]; max = 0; while((len = getline()) > 0) { if (len > max) { max = len; copy(); } if (max > 0) { printf("%s", longest); } return 0; } } int getline(void) { int c, i; extern char line[]; for(i = 0; i < MAXLINE - 1 && (c=getchar()) != EOF && c != '\n'; ++i) { line[i] = c; if (c == '\n') { line[i] = c; ++i; } line[i] = '\0'; return i; } }
// // Created by matti on 16.9.2015. // #include <stdio.h> #define MAXLINE 1000 int max; char line[MAXLINE]; char longest[MAXLINE]; int getnewline(void); void copy(void); int main() { int len; extern int max; extern char longest[]; max = 0; while((len = getnewline()) > 0) { if (len > max) { max = len; copy(); } if (max > 0) { printf("%s", longest); } return 0; } } int getnewline(void) { int c, i; extern char line[]; for(i = 0; i < MAXLINE - 1 && (c=getchar()) != EOF && c != '\n'; ++i) { line[i] = c; } if (c == '\n') { line[i] = c; ++i; } line[i] = '\0'; return i; } void copy(void) { int i; extern char line[], longest[]; i = 0; while((longest[i] = line[i]) != '\0') { ++i; } }
Add 1-10 external variable example
Add 1-10 external variable example
C
mit
melonmanchan/k-and-r
d1e8b49ce3fcca4707a5971c5f6c693e7cf6dea2
glib/mypaint-brush.h
glib/mypaint-brush.h
#ifndef MYPAINTBRUSHGLIB_H #define MYPAINTBRUSHGLIB_H #include <glib-object.h> #include <mypaint-config.h> #if MYPAINT_CONFIG_USE_GLIB #define MYPAINT_TYPE_BRUSH (mypaint_brush_get_type ()) #define MYPAINT_VALUE_HOLDS_BRUSH(value) (G_TYPE_CHECK_VALUE_TYPE ((value), MYPAINT_TYPE_BRUSH)) GType mypaint_brush_get_type(void); #endif #endif // MYPAINTBRUSHGLIB_H
#ifndef MYPAINTBRUSHGLIB_H #define MYPAINTBRUSHGLIB_H #include <mypaint-config.h> #if MYPAINT_CONFIG_USE_GLIB #include <glib-object.h> #define MYPAINT_TYPE_BRUSH (mypaint_brush_get_type ()) #define MYPAINT_VALUE_HOLDS_BRUSH(value) (G_TYPE_CHECK_VALUE_TYPE ((value), MYPAINT_TYPE_BRUSH)) GType mypaint_brush_get_type(void); #endif #endif // MYPAINTBRUSHGLIB_H
Move glib-object.h include inside USE_GLIB conditional
brushlib: Move glib-object.h include inside USE_GLIB conditional
C
isc
achadwick/libmypaint,achadwick/libmypaint,achadwick/libmypaint,achadwick/libmypaint,b3sigma/libmypaint,b3sigma/libmypaint,b3sigma/libmypaint
8ca7c103b616c4f773d9cf83ceb3c9a8098907b3
src/math/float/cexpf.c
src/math/float/cexpf.c
#include "cisf.h" #include "expf.h" float _Complex cexpf(float _Complex z) { float x = z; float y = cimagf(z); if (y == 0) return CMPLXF(expf_(x), y); if (y - y) { if (x == INFINITY) return CMPLXF(x, y - y); if (x == -INFINITY) return 0; } return expf_(x) * cisf_(y); }
#include "cisf.h" #include "expf.h" float _Complex cexpf(float _Complex z) { float x = z; float y = cimagf(z); double r = expf_(x); if (y == 0) return CMPLXF(r, y); if (y - y) { if (x == INFINITY) return CMPLXF(x, y - y); if (x == -INFINITY) return 0; } return r * cisf_(y); }
Reduce compiled code size by storing a result of a likely-used common expression
Reduce compiled code size by storing a result of a likely-used common expression
C
mit
jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic
edce59e1c03fdebc18649bbbc1ffcda3b62f101c
lb_vector.h
lb_vector.h
#ifndef LB_VECTOR_INCLUDED #include "lb_scalar.h" // Assume Vector to be n rows by 1 column typedef struct { Scalar* data; unsigned int length; } Vector; Vector lb_create_vector(Scalar* data, unsigned int length); Vector lb_allocate_vector(unsigned int length); void lbdp(Vector a, Vector b, Scalar* result); void lbstv(Scalar s, Vector v, Vector result); #define LB_VECTOR_INCLUDED #endif
#ifndef LB_VECTOR_INCLUDED #include "lb_scalar.h" // Assume Vector to be n rows by 1 column typedef struct { Scalar* data; unsigned int length; } Vector; Vector lb_create_vector(Scalar* data, unsigned int length); Vector lb_allocate_vector(unsigned int length); void lbdp(Vector a, Vector b, Scalar* result); void lbstv(Scalar s, Vector v, Vector result); #define lbv_iterate(vec, iter, expr) do{\ unsigned int iter;\ for(iter=0; iter < vec.length; iter++) {\ expr;\ }\ } while(0); #define LB_VECTOR_INCLUDED #endif
Make it easy to iterate a vector
Make it easy to iterate a vector
C
apache-2.0
frenchrd/laid-back-lapack,frenchrd/laid-back-lapack
126ae8fc465f5077deb802e655c54cd2f253b623
core/alsp_src/macos/mw_alspro_prefix.h
core/alsp_src/macos/mw_alspro_prefix.h
#include <MacHeaders.h> #include <ansi_prefix.mac.h> #pragma once off #define HAVE_CONFIG_H #define PORT 1 #define MACOS 1 #define CONFIGLESS 1 #include "prefix.h"
#include <MacHeaders.h> //#include <ansi_prefix.mac.h> #pragma once off #define HAVE_CONFIG_H #define PORT 1 #define MACOS 1 #define CONFIGLESS 1 #include "prefix.h"
Update prefix for CW Pro1
Update prefix for CW Pro1
C
mit
AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog
8fa7d5b367c2a24717d022242facced25ac381df
src/lib/c++/cxx_constructors_global.c
src/lib/c++/cxx_constructors_global.c
/* * cxx_constructors_global.c * * Created on: 30 janv. 2013 * Author: fsulima */ #include <embox/unit.h> EMBOX_UNIT_INIT(cxx_init); EMBOX_UNIT_FINI(cxx_fini); #include "cxx_invoke_constructors.h" #include "cxx_invoke_destructors.h" #include "cxx_app_startup_terminatioin.h" static int cxx_init(void) { cxx_invoke_constructors(); return 0; } static int cxx_fini(void) { cxx_invoke_destructors(); return 0; } void cxx_app_startup(void) { } void cxx_app_termination(void) { }
/* * cxx_constructors_global.c * * Created on: 30 janv. 2013 * Author: fsulima */ #include <embox/unit.h> #include "cxx_invoke_constructors.h" #include "cxx_invoke_destructors.h" #include "cxx_app_startup_termination.h" EMBOX_UNIT(cxx_init, cxx_fini); static int cxx_init(void) { cxx_invoke_constructors(); return 0; } static int cxx_fini(void) { cxx_invoke_destructors(); return 0; } void cxx_app_startup(void) { } void cxx_app_termination(void) { }
Fix compilation of constructor_global module
qt-pro: Fix compilation of constructor_global module
C
bsd-2-clause
Kakadu/embox,vrxfile/embox-trik,embox/embox,gzoom13/embox,Kefir0192/embox,Kefir0192/embox,abusalimov/embox,gzoom13/embox,Kakadu/embox,embox/embox,gzoom13/embox,abusalimov/embox,mike2390/embox,abusalimov/embox,Kakadu/embox,mike2390/embox,vrxfile/embox-trik,vrxfile/embox-trik,Kakadu/embox,Kefir0192/embox,Kefir0192/embox,vrxfile/embox-trik,mike2390/embox,embox/embox,embox/embox,Kefir0192/embox,Kakadu/embox,embox/embox,vrxfile/embox-trik,abusalimov/embox,mike2390/embox,Kefir0192/embox,gzoom13/embox,mike2390/embox,gzoom13/embox,abusalimov/embox,gzoom13/embox,gzoom13/embox,embox/embox,Kakadu/embox,Kefir0192/embox,vrxfile/embox-trik,abusalimov/embox,vrxfile/embox-trik,mike2390/embox,mike2390/embox,Kakadu/embox
41b1fefc4ecf7317d4e8ca4529edde1d5fad6ac0
Menu/Code/UI.h
Menu/Code/UI.h
// // Mapping.h // Menu // // Created by Matt on 21/07/15. // Copyright (c) 2015 Blue Rocket. All rights reserved. // #import <BRMenu/UI/BRMenuPlusMinusButton.h> #import <BRMenu/UI/BRMenuStepper.h> #import <BRMenu/UI/BRMenuUIStyle.h>
// // Mapping.h // Menu // // Created by Matt on 21/07/15. // Copyright (c) 2015 Blue Rocket. All rights reserved. // #import <BRMenu/UI/BRMenuBackBarButtonItemView.h> #import <BRMenu/UI/BRMenuBarButtonItemView.h> #import <BRMenu/UI/BRMenuPlusMinusButton.h> #import <BRMenu/UI/BRMenuStepper.h> #import <BRMenu/UI/BRMenuUIStyle.h>
Include latest class additions in umbrella include.
Include latest class additions in umbrella include.
C
apache-2.0
Blue-Rocket/BRMenu,Blue-Rocket/BRMenu,Blue-Rocket/BRMenu,Blue-Rocket/BRMenu,Blue-Rocket/BRMenu
8de044c57cd709945db364a4ac403a6a8e017a8b
exercises/leap/src/example.h
exercises/leap/src/example.h
#ifndef _LEAP_H #define _LEAP_H #include <stdbool.h> bool leap_year(int year); #endif
#ifndef _LEAP_H #define _LEAP_H #include <stdbool.h> bool is_leap_year(int year); #endif
Fix compiler warning in Leap
Fix compiler warning in Leap
C
mit
RealBarrettBrown/xc,RealBarrettBrown/xc,RealBarrettBrown/xc
df574f0ac2acf774a874752f6421f1f6f85cb2cc
test/Preprocessor/warn-macro-unused.c
test/Preprocessor/warn-macro-unused.c
// RUN: %clang_cc1 %s -Wunused-macros -Dfoo -Dfoo -verify #include "warn-macro-unused.h" #define unused // expected-warning {{macro is not used}} #define unused unused // rdar://9745065 #undef unused_from_header // no warning
// RUN: %clang_cc1 %s -Wunused-macros -Dfoo -Dfoo -verify // XFAIL: * #include "warn-macro-unused.h" #define unused // expected-warning {{macro is not used}} #define unused unused // rdar://9745065 #undef unused_from_header // no warning
Test is broken; XFAIL it until Argyrios gets a chance to look at it.
Test is broken; XFAIL it until Argyrios gets a chance to look at it. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@134925 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
ac62d9b1e647fa02437ea49336460e32988138b0
HATransparentView/HATransparentView.h
HATransparentView/HATransparentView.h
// // HATransparentView.h // HATransparentView // // Created by Heberti Almeida on 13/09/13. // Copyright (c) 2013 Heberti Almeida. All rights reserved. // #import <UIKit/UIKit.h> @interface HATransparentView : UIView @property (strong, nonatomic) UIColor *color; @property (nonatomic) CGFloat *alpha; - (void)open; - (void)close; @end
// // HATransparentView.h // HATransparentView // // Created by Heberti Almeida on 13/09/13. // Copyright (c) 2013 Heberti Almeida. All rights reserved. // #import <UIKit/UIKit.h> @interface HATransparentView : UIView - (void)open; - (void)close; @end
Fix disabled interaction on device
Fix disabled interaction on device
C
mit
ernestopino/HATransparentView,hebertialmeida/HATransparentView,amannayak0007/HATransparentView
f2a5890d0133c8c7a9a5d7a21ffc9c038e838698
ios/RNInstabug/InstabugReactBridge.h
ios/RNInstabug/InstabugReactBridge.h
// // InstabugReactBridge.h // instabugDemo // // Created by Yousef Hamza on 9/29/16. // Copyright © 2016 Facebook. All rights reserved. // #import <Foundation/Foundation.h> #import "RCTBridgeModule.h" #import "RCTEventEmitter.h" @interface InstabugReactBridge : RCTEventEmitter <RCTBridgeModule> @end
// // InstabugReactBridge.h // instabugDemo // // Created by Yousef Hamza on 9/29/16. // Copyright © 2016 Facebook. All rights reserved. // #import <Foundation/Foundation.h> #import <React/RCTBridgeModule.h> #import "RCTEventEmitter.h" @interface InstabugReactBridge : RCTEventEmitter <RCTBridgeModule> @end
Fix the import in the bridge header file to account for changes in RN 0.48
:pencil: Fix the import in the bridge header file to account for changes in RN 0.48
C
mit
Instabug/instabug-reactnative,Instabug/instabug-reactnative,Instabug/instabug-reactnative,Instabug/instabug-reactnative,Instabug/instabug-reactnative
8b32603f1492f8847ffecd683c1d666a528abbf2
include/Athena-Physics/Prerequisites.h
include/Athena-Physics/Prerequisites.h
/** @file Prerequisites.h @author Philip Abbet Declaration of the types of the Athena-Physics module */ #ifndef _ATHENA_PHYSICS_PREREQUISITES_H_ #define _ATHENA_PHYSICS_PREREQUISITES_H_ #include <Athena-Core/Prerequisites.h> #include <Athena-Physics/Config.h> #include <Bullet/btConfig.h> #include <btBulletDynamicsCommon.h> //---------------------------------------------------------------------------------------- /// @brief Main namespace. All the components of the Athena engine belongs to this /// namespace //---------------------------------------------------------------------------------------- namespace Athena { //------------------------------------------------------------------------------------ /// @brief Contains all the physics-related classes //------------------------------------------------------------------------------------ namespace Physics { class Body; class CollisionShape; class PhysicalComponent; class World; class BoxShape; class CapsuleShape; class ConeShape; class CylinderShape; class SphereShape; class StaticTriMeshShape; } //------------------------------------------------------------------------------------ /// @brief Initialize the Physics module //------------------------------------------------------------------------------------ extern void initialize(); } #endif
/** @file Prerequisites.h @author Philip Abbet Declaration of the types of the Athena-Physics module */ #ifndef _ATHENA_PHYSICS_PREREQUISITES_H_ #define _ATHENA_PHYSICS_PREREQUISITES_H_ #include <Athena-Core/Prerequisites.h> #include <Athena-Physics/Config.h> #include <Bullet/btConfig.h> #include <btBulletDynamicsCommon.h> //---------------------------------------------------------------------------------------- /// @brief Main namespace. All the components of the Athena engine belongs to this /// namespace //---------------------------------------------------------------------------------------- namespace Athena { //------------------------------------------------------------------------------------ /// @brief Contains all the physics-related classes //------------------------------------------------------------------------------------ namespace Physics { class Body; class CollisionShape; class PhysicalComponent; class World; class BoxShape; class CapsuleShape; class ConeShape; class CylinderShape; class SphereShape; class StaticTriMeshShape; //------------------------------------------------------------------------------------ /// @brief Initialize the Physics module //------------------------------------------------------------------------------------ extern void initialize(); } } #endif
Fix the previous commit: the 'initialize()' function wasn't declared in the 'Athena::Physics' namespace
Fix the previous commit: the 'initialize()' function wasn't declared in the 'Athena::Physics' namespace
C
mit
Kanma/Athena-Physics,Kanma/Athena-Physics
d00dc21fdb784defab7376b8aa0c45db94be5c97
src/gpu/vk/GrVkVulkan.h
src/gpu/vk/GrVkVulkan.h
/* * Copyright 2018 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef GrVkVulkan_DEFINED #define GrVkVulkan_DEFINED #include "SkTypes.h" #ifdef VULKAN_CORE_H_ #error "Skia's private vulkan header must be included before any other vulkan header." #endif #include "../../third_party/vulkan/vulkan/vulkan_core.h" #ifdef SK_BUILD_FOR_ANDROID #ifdef VULKAN_ANDROID_H_ #error "Skia's private vulkan android header must be included before any other vulkan header." #endif // This is needed to get android extensions for external memory #include "../../third_party/vulkan/vulkan/vulkan_android.h" #endif #endif
/* * Copyright 2018 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef GrVkVulkan_DEFINED #define GrVkVulkan_DEFINED #include "SkTypes.h" #ifdef VULKAN_CORE_H_ #error "Skia's private vulkan header must be included before any other vulkan header." #endif #include "../../../include/third_party/vulkan/vulkan/vulkan_core.h" #ifdef SK_BUILD_FOR_ANDROID #ifdef VULKAN_ANDROID_H_ #error "Skia's private vulkan android header must be included before any other vulkan header." #endif // This is needed to get android extensions for external memory #include "../../../include/third_party/vulkan/vulkan/vulkan_android.h" #endif #endif
Fix path to vulkan header.
Fix path to vulkan header. Bug: skia: Change-Id: I47cb8f67b378a51cefcb82864eda467ff6b48a7e Reviewed-on: https://skia-review.googlesource.com/c/176969 Commit-Queue: Greg Daniel <39df0a804564ccb6cf75f18db79653821f37c1c5@google.com> Commit-Queue: Mike Klein <14574f09dfa9b4e14759b88c3426a495a0e627b0@google.com> Auto-Submit: Greg Daniel <39df0a804564ccb6cf75f18db79653821f37c1c5@google.com> Reviewed-by: Mike Klein <14574f09dfa9b4e14759b88c3426a495a0e627b0@google.com>
C
bsd-3-clause
HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,google/skia,Hikari-no-Tenshi/android_external_skia,google/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,HalCanary/skia-hc,HalCanary/skia-hc,rubenvb/skia,HalCanary/skia-hc,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,rubenvb/skia,google/skia,rubenvb/skia,google/skia,aosp-mirror/platform_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,rubenvb/skia,google/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia
a97f2adb2fbfed37e1bf7706f57d22983936ba4d
src/kdf/pbkdf1/pbkdf1.h
src/kdf/pbkdf1/pbkdf1.h
/************************************************* * PBKDF1 Header File * * (C) 1999-2007 Jack Lloyd * *************************************************/ #ifndef BOTAN_PBKDF1_H__ #define BOTAN_PBKDF1_H__ #include <botan/s2k.h> #include <botan/base.h> namespace Botan { /************************************************* * PKCS #5 PBKDF1 * *************************************************/ class BOTAN_DLL PKCS5_PBKDF1 : public S2K { public: std::string name() const; S2K* clone() const; PKCS5_PBKDF1(HashFunction* hash_in) : hash(hash_in) {} PKCS5_PBKDF1(const PKCS5_PBKDF1& other) : hash(other.hash->clone()) {} ~PKCS5_PBKDF1() { delete hash; } private: OctetString derive(u32bit, const std::string&, const byte[], u32bit, u32bit) const; HashFunction* hash; }; } #endif
/************************************************* * PBKDF1 Header File * * (C) 1999-2007 Jack Lloyd * *************************************************/ #ifndef BOTAN_PBKDF1_H__ #define BOTAN_PBKDF1_H__ #include <botan/s2k.h> #include <botan/base.h> namespace Botan { /************************************************* * PKCS #5 PBKDF1 * *************************************************/ class BOTAN_DLL PKCS5_PBKDF1 : public S2K { public: std::string name() const; S2K* clone() const; PKCS5_PBKDF1(HashFunction* hash_in) : hash(hash_in) {} PKCS5_PBKDF1(const PKCS5_PBKDF1& other) : S2K(), hash(other.hash->clone()) {} ~PKCS5_PBKDF1() { delete hash; } private: OctetString derive(u32bit, const std::string&, const byte[], u32bit, u32bit) const; HashFunction* hash; }; } #endif
Fix warning in PBKDF1 copy constructor
Fix warning in PBKDF1 copy constructor
C
bsd-2-clause
Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,randombit/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,webmaster128/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan
2f2b637ef0a89c0483ff1f26f42452dbc210d7d2
AppIconOverlay/config.h
AppIconOverlay/config.h
#ifndef AppIconOverlay_config_h #define AppIconOverlay_config_h #define DEBUG 1 #define DEFAULT_MIN_FONT_SIZE 6.0 #define DEFAULT_MAX_FONT_SIZE 18.0 #define DEFAULT_FONT_TO_USE "Arial-BoldMT" #endif
#ifndef AppIconOverlay_config_h #define AppIconOverlay_config_h #define DEBUG 1 #define DEFAULT_MIN_FONT_SIZE 6.0 #define DEFAULT_MAX_FONT_SIZE 18.0 #define DEFAULT_FONT_TO_USE @"Arial-BoldMT" #endif
Convert default font name into an NSString
Convert default font name into an NSString
C
mit
carsonmcdonald/AppIconOverlay
d84b1b8c58237023cf007e92202d96716254b1f0
vp8/decoder/opencl/opencl_systemdependent.c
vp8/decoder/opencl/opencl_systemdependent.c
/* * Copyright (c) 2010 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "vpx_ports/config.h" #include "vp8/decoder/onyxd_int.h" #include "vp8/common/opencl/vp8_opencl.h" #include "vp8_decode_cl.h" extern void vp8_dequantize_b_cl(BLOCKD*); extern void vp8_dequant_dc_idct_add_cl(short*, short*, unsigned char*, unsigned char*, int, int, int Dc); void vp8_arch_opencl_decode_init(VP8D_COMP *pbi) { if (cl_initialized == CL_SUCCESS){ cl_decode_init(); } }
/* * Copyright (c) 2010 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "vpx_ports/config.h" #include "vp8/decoder/onyxd_int.h" #include "vp8/common/opencl/vp8_opencl.h" #include "vp8_decode_cl.h" void vp8_arch_opencl_decode_init(VP8D_COMP *pbi) { if (cl_initialized == CL_SUCCESS){ cl_decode_init(); } }
Remove unused external function definitions.
Remove unused external function definitions.
C
bsd-3-clause
awatry/libvpx.opencl,awatry/libvpx.opencl,awatry/libvpx.opencl,awatry/libvpx.opencl