after
stringlengths
72
2.11k
before
stringlengths
21
1.55k
diff
stringlengths
85
2.31k
instruction
stringlengths
20
1.71k
license
stringclasses
13 values
repos
stringlengths
7
82.6k
commit
stringlengths
40
40
#include <bert/buffer.h> #include <string.h> #include <stdio.h> #include "test.h" #define DATA_SIZE 4 int main() { unsigned char data[4]; bert_buffer_t buffer; bert_buffer_init(&buffer); memset(data,'A',DATA_SIZE); unsigned int i; for (i=0;i<((BERT_CHUNK_SIZE / DATA_SIZE) * 2);i++) { bert_buffer_write(...
#include <bert/buffer.h> #include <string.h> #include <stdio.h> #include "test.h" #define DATA_SIZE 4 int main() { unsigned char data[4]; bert_buffer_t buffer; bert_buffer_init(&buffer); memset(data,'A',DATA_SIZE); bert_buffer_write(&buffer,data,DATA_SIZE); bert_buffer_write(&buffer,data,DATA_SIZE); bert_...
--- +++ @@ -16,9 +16,12 @@ memset(data,'A',DATA_SIZE); - bert_buffer_write(&buffer,data,DATA_SIZE); - bert_buffer_write(&buffer,data,DATA_SIZE); - bert_buffer_write(&buffer,data,DATA_SIZE); + unsigned int i; + + for (i=0;i<((BERT_CHUNK_SIZE / DATA_SIZE) * 2);i++) + { + bert_buffer_write(&buffer,data,DATA_SIZE)...
Make sure the buffer small read populates the buffer with multiple chunks.
mit
postmodern/libBERT
2e7fdd6a1db4a649f7e3e469729946d3978f83a1
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include "config.h" #include <stddef.h> #include <sys/types.h> #include <sys/time.h> #include <sched.h> #include <unistd.h> #ifdef HAVE_SYS_SELECT_H #include ...
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include "config.h" #include <stddef.h> #include <sys/types.h> #include <sys/time.h> #include <sched.h> #include <unistd.h> #ifdef HAVE_SYS_SELECT_H #include ...
--- +++ @@ -14,6 +14,10 @@ #include <sys/select.h> #endif +#if defined (__i386__) || defined (__x86_64__) +#include <xmmintrin.h> +#endif + #include "runtime.h" /* Spin wait. */ @@ -26,7 +30,7 @@ for (i = 0; i < cnt; ++i) { #if defined (__i386__) || defined (__x86_64__) - __builtin_ia32_pause (...
runtime: Use _mm_pause rather than __builtin_ia32_pause. Based on a patch from Peter Collingbourne. R=iant CC=gofrontend-dev https://golang.org/cl/102920043
bsd-3-clause
anlhord/gofrontend,golang/gofrontend,golang/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,anlhord/gofrontend,golang/gofrontend,golang/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,qskycolor/...
936e55e8fad9394aeee8e4ca4e50c1247ca4d390
#pragma once #include <Windows.h> #include <functional> #include <string> class Control { public: Control(); Control(int id, HWND parent); ~Control(); virtual RECT Dimensions(); virtual void Enable(); virtual void Disable(); virtual bool Enabled(); virtual void Enabled(bool enabled);...
#pragma once #include <Windows.h> #include <functional> #include <string> class Control { public: Control(); Control(int id, HWND parent); ~Control(); RECT Dimensions(); void Enable(); void Disable(); bool Enabled(); void Enabled(bool enabled); std::wstring Text(); int TextA...
--- +++ @@ -10,17 +10,17 @@ Control(int id, HWND parent); ~Control(); - RECT Dimensions(); + virtual RECT Dimensions(); - void Enable(); - void Disable(); - bool Enabled(); - void Enabled(bool enabled); + virtual void Enable(); + virtual void Disable(); + virtual bool Enabled(...
Allow some control methods to be overridden
bsd-2-clause
malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,malensek/3RVX
735b05cf0afe8aff15925202b65834d9d81e6498
/* * Copyright 2011-2016 Blender Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
/* * Copyright 2011-2016 Blender Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
--- +++ @@ -22,7 +22,7 @@ CCL_NAMESPACE_BEGIN #define CYCLES_VERSION_MAJOR 1 -#define CYCLES_VERSION_MINOR 11 +#define CYCLES_VERSION_MINOR 12 #define CYCLES_VERSION_PATCH 0 #define CYCLES_MAKE_VERSION_STRING2(a, b, c) #a "." #b "." #c
Bump version to 1.12, matching blender 2.83 release cycle
apache-2.0
tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird
fd767a1b53b8f2ef3ca484c8bbbcb29ffcc8c3b9
#ifndef IPSS_BENCH_H #define IPSS_BENCH_H #ifdef __cplusplus extern "C" { #endif void start_ipss_measurement(); void stop_ipss_measurement(); #ifdef __cplusplus } #endif #endif
#ifndef IPSS_BENCH_H #define IPSS_BENCH_H extern void start_ipss_measurement(); extern void stop_ipss_measurement(); #endif
--- +++ @@ -1,7 +1,16 @@ #ifndef IPSS_BENCH_H #define IPSS_BENCH_H -extern void start_ipss_measurement(); -extern void stop_ipss_measurement(); +#ifdef __cplusplus +extern "C" +{ +#endif + +void start_ipss_measurement(); +void stop_ipss_measurement(); + +#ifdef __cplusplus +} +#endif #endif
CMSIS-DSP: Update header for use from C++
apache-2.0
JonatanAntoni/CMSIS_5,JonatanAntoni/CMSIS_5,ARM-software/CMSIS_5,JonatanAntoni/CMSIS_5,JonatanAntoni/CMSIS_5,JonatanAntoni/CMSIS_5,ARM-software/CMSIS_5,ARM-software/CMSIS_5,ARM-software/CMSIS_5,JonatanAntoni/CMSIS_5,ARM-software/CMSIS_5,ARM-software/CMSIS_5
236a881c46f7930f74ed656d85c18a93e2fb9e25
/* $Id: Output_def.h,v 1.17 2008-07-31 18:08:50 phruksar Exp $ */ #ifndef _OUTPUT_DEF_H #define _OUTPUT_DEF_H #define OUTFMT_HEAD 0 #define OUTFMT_UNITS 1 #define OUTFMT_COMP 2 #define OUTFMT_NUM 4 #define OUTFMT_ACT 8 #define OUTFMT_HEAT 16 #define OUTFMT_ALPHA 32 #define OUTFMT_BETA 64...
/* $Id: Output_def.h,v 1.16 2007-10-18 20:30:58 phruksar Exp $ */ #ifndef _OUTPUT_DEF_H #define _OUTPUT_DEF_H #define OUTFMT_HEAD 0 #define OUTFMT_UNITS 1 #define OUTFMT_COMP 2 #define OUTFMT_NUM 4 #define OUTFMT_ACT 8 #define OUTFMT_HEAT 16 #define OUTFMT_ALPHA 32 #define OUTFMT_BETA 64...
--- +++ @@ -1,4 +1,4 @@ -/* $Id: Output_def.h,v 1.16 2007-10-18 20:30:58 phruksar Exp $ */ +/* $Id: Output_def.h,v 1.17 2008-07-31 18:08:50 phruksar Exp $ */ #ifndef _OUTPUT_DEF_H #define _OUTPUT_DEF_H @@ -15,7 +15,8 @@ #define OUTFMT_CDOSE 512 #define OUTFMT_ADJ 1024 #define OUTFMT_EXP 2048 -#define OUTF...
Define new number for new exposure rate calc
bsd-3-clause
elliottbiondo/ALARA,elliottbiondo/ALARA,elliottbiondo/ALARA,elliottbiondo/ALARA,elliottbiondo/ALARA
1c719512a25876346c28ebaf0ecdad007fce0a99
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_AURA_AURA_SWITCHES_H_ #define UI_AURA_AURA_SWITCHES_H_ #pragma once #include "ui/aura/aura_export.h" namespace switches { AURA_EXPORT ex...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_AURA_AURA_SWITCHES_H_ #define UI_AURA_AURA_SWITCHES_H_ #pragma once namespace switches { extern const char kAuraHostWindowSize[]; extern ...
--- +++ @@ -6,10 +6,12 @@ #define UI_AURA_AURA_SWITCHES_H_ #pragma once +#include "ui/aura/aura_export.h" + namespace switches { -extern const char kAuraHostWindowSize[]; -extern const char kAuraWindows[]; +AURA_EXPORT extern const char kAuraHostWindowSize[]; +AURA_EXPORT extern const char kAuraWindows[]; }...
Fix shared library build for aura. TBR=ben@chromium.org,derat@chromium.org R=ben@chromium.org,derat@chromium.org BUG=none TEST=none Review URL: http://codereview.chromium.org/8438039 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@108299 0039d316-1c4b-4281-b951-d872f2087c98
bsd-3-clause
yitian134/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,yitian13...
962d09e8e4566fe6780f106e98d8b131542defb5
// // STTweetLabel.h // STTweetLabel // // Created by Sebastien Thiebaud on 09/29/13. // Copyright (c) 2013 Sebastien Thiebaud. All rights reserved. // typedef NS_ENUM(NSInteger, STTweetHotWord) { STTweetHandle = 0, STTweetHashtag, STTweetLink }; @interface STTweetLabel : UILabel @property (nonatomic...
// // STTweetLabel.h // STTweetLabel // // Created by Sebastien Thiebaud on 09/29/13. // Copyright (c) 2013 Sebastien Thiebaud. All rights reserved. // typedef enum { STTweetHandle = 0, STTweetHashtag, STTweetLink } STTweetHotWord; @interface STTweetLabel : UILabel @property (nonatomic, strong) NSArr...
--- +++ @@ -6,11 +6,11 @@ // Copyright (c) 2013 Sebastien Thiebaud. All rights reserved. // -typedef enum { +typedef NS_ENUM(NSInteger, STTweetHotWord) { STTweetHandle = 0, STTweetHashtag, STTweetLink -} STTweetHotWord; +}; @interface STTweetLabel : UILabel
Make enum available to swift
mit
bespider/STTweetLabel,pankkor/STTweetLabel,pabelnl/STTweetLabel,HackRoy/STTweetLabel,SebastienThiebaud/STTweetLabel,quanquan1986/STTweetLabel
2a655bcf9e5c30077197d314690ffbf86a042712
#ifndef MUDUO_BASE_ATOMIC_H #define MUDUO_BASE_ATOMIC_H #include <boost/noncopyable.hpp> namespace muduo { class AtomicInt64 : boost::noncopyable { public: AtomicInt64() : value_(0) { } int64_t get() { return value_; } int64_t addAndGet(int64_t x) { return __sync_add_and_fetch(&value_,...
#ifndef MUDUO_BASE_ATOMIC_H #define MUDUO_BASE_ATOMIC_H #include <boost/noncopyable.hpp> namespace muduo { class AtomicInt64 : boost::noncopyable { public: AtomicInt64() : value_(0) { } int64_t get() { return value_; } int64_t addAndGet(int64_t x) { value_ += x; return value_; } ...
--- +++ @@ -21,8 +21,7 @@ int64_t addAndGet(int64_t x) { - value_ += x; - return value_; + return __sync_add_and_fetch(&value_, x); } int64_t incrementAndGet() @@ -32,13 +31,11 @@ int64_t getAndSet(int64_t newValue) { - int64_t old = value_; - value_ = newValue; - return old;...
Implement atomic integer with gcc builtins.
bsd-3-clause
wangweihao/muduo,Cofyc/muduo,jxd134/muduo,shenhzou654321/muduo,floristt/muduo,floristt/muduo,SuperMXC/muduo,Cofyc/muduo,lvshiling/muduo,fc500110/muduo,danny200309/muduo,jerk1991/muduo,lizj3624/http-github.com-chenshuo-muduo-,jxd134/muduo,SourceInsight/muduo,zhuangshi23/muduo,SourceInsight/muduo,devsoulwolf/muduo,shenhz...
1d6e54c49babe1975a1b6285e8b7f039c04b3ab3
// RUN: rm -f %t // RUN: not %clang -Wall -fsyntax-only %s --serialize-diagnostics %t.dia > /dev/null 2>&1 // RUN: c-index-test -read-diagnostics %t.dia 2>&1 | FileCheck %s // RUN: c-index-test -read-diagnostics %S/Inputs/serialized-diags-stable.dia 2>&1 | FileCheck %s int foo() { // CHECK: serialized-diags-stable....
// RUN: rm -f %t // RUN: not %clang -Wall -fsyntax-only %s --serialize-diagnostics %t.dia > /dev/null 2>&1 // RUN: c-index-test -read-diagnostics %t.dia 2>&1 | FileCheck %s // RUN: c-index-test -read-diagnostics %S/Inputs/serialized-diags-stable.dia 2>&1 | FileCheck %s int foo() { // CHECK: serialized-diags-stable....
--- +++ @@ -11,7 +11,7 @@ // CHECK: serialized-diags-stable.c:[[@LINE+5]]:13: error: redefinition of 'bar' as different kind of symbol [] [Semantic Issue] // CHECK-NEXT: Number FIXITs = 0 -// CHECK-NEXT: +-/Volumes/Lore/llvm-public/clang/test/Misc/serialized-diags-stable.c:[[@LINE+2]]:6: note: previous definition...
Remove absolute path from r202733. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@202746 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl...
7124f160555bee9fb154b73893de6e853fe31441
#define _GNU_SOURCE #include <stdio.h> #include <sched.h> #include <errno.h> #include <stdint.h> #include <sys/resource.h> #include "cpu.h" #include "../util/taskstats.h" #include "../util/file_utils.h" int current_cpus(int pid) { cpu_set_t proc_cpus; size_t mask_size = sizeof proc_cpus; int ret = sche...
#define _GNU_SOURCE #include <stdio.h> #include <sched.h> #include <errno.h> #include <stdint.h> #include <sys/resource.h> #include "cpu.h" #include "../util/taskstats.h" #include "../util/file_utils.h" int current_cpus(int pid) { cpu_set_t proc_cpus; size_t mask_size = sizeof proc_cpus; int ret = sche...
--- +++ @@ -35,3 +35,11 @@ { return task_req(pid, 's'); } + +char *get_user_ps_ctxt_switches(char *pid) +{ + char path[MAXPATH]; + snprintf(path, MAXPATH, STATUS, pid); + + return parse_proc(path, SWITCHES); +}
Use parse_proc for context switches if lower perms
mit
tijko/dashboard
e2aa329f967e3ceb9e789dbc8cf636d5fb373a3b
#ifndef TAGREADER_H #define TAGREADER_H #include "taglib/fileref.h" #include "taglib/tag.h" #include "taglib/mpeg/mpegfile.h" #include "taglib/mpeg/id3v2/id3v2tag.h" #include "taglib/mpeg/id3v2/frames/attachedpictureframe.h" #include <QString> #include <QImage> class TagReader { public: TagReader(const QString &...
#ifndef TAGREADER_H #define TAGREADER_H #include <taglib/fileref.h> #include <taglib/tag.h> #include <taglib/mpegfile.h> #include <taglib/id3v2tag.h> #include <taglib/attachedpictureframe.h> #include <QString> #include <QImage> class TagReader { public: TagReader(const QString &file); ~TagReader(); bool...
--- +++ @@ -1,11 +1,11 @@ #ifndef TAGREADER_H #define TAGREADER_H -#include <taglib/fileref.h> -#include <taglib/tag.h> -#include <taglib/mpegfile.h> -#include <taglib/id3v2tag.h> -#include <taglib/attachedpictureframe.h> +#include "taglib/fileref.h" +#include "taglib/tag.h" +#include "taglib/mpeg/mpegfile.h" +#i...
Use our package taglib headers and not the hosts!
bsd-3-clause
qtmediahub/sasquatch,qtmediahub/sasquatch,qtmediahub/sasquatch
ad42bb9a0b167e38bd2fef333c1d725bc41f0dc0
#include "gradient_decent.h" void decend_cpu(int len, double rate, double momentum, double regulariser, const double* weights, const double* gradient, const double* last, double* outputWeights, double* outputMomentum) { for (int i = 0; i < len; i++) { outputMomentum[i] = momentum * last[i] - r...
#include "gradient_decent.h" void decend_cpu(int len, double rate, double momentum, double regulariser, const double* weights, const double* gradient, const double* last, double* outputWeights, double* outputMomentum) { for (int i = 0; i <= len; i++) { outputMomentum[i] = momentum * last[i] - ...
--- +++ @@ -6,7 +6,7 @@ const double* last, double* outputWeights, double* outputMomentum) { - for (int i = 0; i <= len; i++) { + for (int i = 0; i < len; i++) { outputMomentum[i] = momentum * last[i] - rate * gradient[i]; outputWeights[i] = weights[i] + outputMomentum[i] - (rate * regular...
Fix off-by-one error in C code
bsd-2-clause
HuwCampbell/grenade,HuwCampbell/grenade
2c68ddc27ccc965b15ebc50159cae4d76ed5af2b
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_DESKTOP_NOTIFICATION_HANDLER_H_ #define CHROME_BROWSER_DESKTOP_NOTIFICATION_HANDLER_H_ #pragma once #include "content/browser/...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_DESKTOP_NOTIFICATION_HANDLER_H_ #define CHROME_BROWSER_DESKTOP_NOTIFICATION_HANDLER_H_ #pragma once #include "content/browser/...
--- +++ @@ -20,7 +20,7 @@ private: // RenderViewHostObserver implementation. - virtual bool OnMessageReceived(const IPC::Message& message); + bool OnMessageReceived(const IPC::Message& message); // IPC handlers. void OnShow(const DesktopNotificationHostMsg_Show_Params& params);
Revert 80939 - Fix clang error TBR=jam@chromium.org git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@80954 0039d316-1c4b-4281-b951-d872f2087c98
bsd-3-clause
dushu1203/chromium.src,anirudhSK/chromium,ChromiumWebApps/chromium,hujiajie/pa-chromium,patrickm/chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,rogerwang/chromium,Just-D/chromium-1,dednal/chromium.src,zcbenz/cefode-chromium,robclark/chromium,anirudhSK/chromium,ondra-novak/ch...
73689e53255c6ac22a90b0cd01fe40180ec2bbba
#ifndef THERMALCONFIG_H #define THERMALCONFIG_H #ifndef M_PI const double M_PI = 3.141592653; #endif const double T0 = 273.15; // [C] const double R_TSV = 5e-6; // [m] /* Thermal conductance */ const double Ksi = 148.0; // Silicon const double Kcu = 401.0; // Copper const double Kin = 1.5; // insulator const...
#ifndef THERMALCONFIG_H #define THERMALCONFIG_H #ifndef M_PI const double M_PI = 3.141592653; #endif const double T0 = 273.15; // [C] const double R_TSV = 5e-6; // [m] /* Thermal conductance */ const double Ksi = 148.0; // Silicon const double Kcu = 401.0; // Copper const double Kin = 1.5; // insulator const...
--- +++ @@ -13,7 +13,7 @@ const double Ksi = 148.0; // Silicon const double Kcu = 401.0; // Copper const double Kin = 1.5; // insulator -const double Khs = 2.0; // Heat sink +const double Khs = 4.0; // Heat sink /* Thermal capacitance */ const double Csi = 1.66e6; // Silicon
Change default khs to 4
mit
umd-memsys/DRAMsim3,umd-memsys/DRAMsim3,umd-memsys/DRAMsim3
05a3ffb6b93cf390f5401511184303a419de3cbf
#pragma once #define WIN32_LEAN_AND_MEAN #include <Windows.h> #include <malloc.h> #include <memory.h> #include <prsht.h> #include <stdlib.h> #include <tchar.h> #include <vector> #include "../3RVX/3RVX.h" #include "resource.h" class About; class Display; class General; class Hotkeys; class OSD; class TabPage; class...
#pragma once #define WIN32_LEAN_AND_MEAN #include <Windows.h> #include <malloc.h> #include <memory.h> #include <prsht.h> #include <stdlib.h> #include <tchar.h> #include "../3RVX/3RVX.h" #include "resource.h" class SettingsUI : public Window { public: SettingsUI(HINSTANCE hInstance); INT_PTR LaunchProperty...
--- +++ @@ -8,10 +8,17 @@ #include <prsht.h> #include <stdlib.h> #include <tchar.h> +#include <vector> #include "../3RVX/3RVX.h" #include "resource.h" +class About; +class Display; +class General; +class Hotkeys; +class OSD; +class TabPage; class SettingsUI : public Window { public: @@ -22,17 +29,21 @@ ...
Add instance variables, remove callbacks
bsd-2-clause
malensek/3RVX,malensek/3RVX,malensek/3RVX
e581eb9f332bde7e69cf4fa10a379d860e5d133a
/*- * Copyright (c) 1998 Sendmail, Inc. All rights reserved. * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * By using this file, you agree to the terms and conditions set * forth in the LICENSE file which can be found at the top level of * the sendmail distrib...
/*- * Copyright (c) 1998 Sendmail, Inc. All rights reserved. * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * By using this file, you agree to the terms and conditions set * forth in the LICENSE file which can be found at the top level of * the sendmail distrib...
--- +++ @@ -9,7 +9,8 @@ * * * @(#)pathnames.h 8.5 (Berkeley) 5/19/1998 + * $FreeBSD$ */ #include <paths.h> -#define _PATH_LOCTMP "/tmp/local.XXXXXX" +#define _PATH_LOCTMP "/var/tmp/local.XXXXXX"
Change location of temporary file from /tmp to /var/tmp. This is a repeat of an earlier commit which apparently got lost with the last import. It helps solve the frequently reported problem pid 4032 (mail.local), uid 0 on /: file system full (though there appears to be a lot of space) caused by idiots sending 30...
bsd-3-clause
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
07d0cafdf2018e8789e4e0671eb0ccc8bbc5c186
/* * Copyright (c) 2017, Arm Limited and affiliates. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICEN...
/* * Copyright (c) 2017, Arm Limited and affiliates. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICEN...
--- +++ @@ -15,8 +15,8 @@ * limitations under the License. */ -#ifndef TELIT_HE910_CELLULAR_POWER_H_ -#define TELIT_HE910_CELLULAR_POWER_H_ +#ifndef QUECTEL_BC95_CELLULAR_POWER_H_ +#define QUECTEL_BC95_CELLULAR_POWER_H_ #include "AT_CellularPower.h" @@ -36,4 +36,4 @@ } // namespace mbed -#endif // TEL...
Fix wrong header define name
apache-2.0
andcor02/mbed-os,mbedmicro/mbed,andcor02/mbed-os,mbedmicro/mbed,betzw/mbed-os,betzw/mbed-os,andcor02/mbed-os,betzw/mbed-os,kjbracey-arm/mbed,c1728p9/mbed-os,mbedmicro/mbed,andcor02/mbed-os,betzw/mbed-os,c1728p9/mbed-os,c1728p9/mbed-os,mbedmicro/mbed,mbedmicro/mbed,kjbracey-arm/mbed,c1728p9/mbed-os,kjbracey-arm/mbed,c17...
9f6454a084ed56920de2c6bb0cfdb3fa258a0e54
// Copyright (c) 2013 GitHub, Inc. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ATOM_BROWSER_UI_ATOM_EVENT_PROCESSING_WINDOW_H_ #define ATOM_BROWSER_UI_ATOM_EVENT_PROCESSING_WINDOW_H_ #import <Cocoa/Cocoa.h> #import "ui/base/coco...
// Copyright (c) 2013 GitHub, Inc. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ATOM_BROWSER_UI_ATOM_EVENT_PROCESSING_WINDOW_H_ #define ATOM_BROWSER_UI_ATOM_EVENT_PROCESSING_WINDOW_H_ #import <Cocoa/Cocoa.h> // Override NSWindow ...
--- +++ @@ -7,10 +7,12 @@ #import <Cocoa/Cocoa.h> +#import "ui/base/cocoa/underlay_opengl_hosting_window.h" + // Override NSWindow to access unhandled keyboard events (for command // processing); subclassing NSWindow is the only method to do // this. -@interface AtomEventProcessingWindow : NSWindow { +@interf...
Fix the black devtools view. Without using UnderlayOpenGLHostingWindow the devtools view would just be black.
mit
baiwyc119/electron,IonicaBizauKitchen/electron,farmisen/electron,dahal/electron,bright-sparks/electron,darwin/electron,sky7sea/electron,greyhwndz/electron,sircharleswatson/electron,vipulroxx/electron,JesselJohn/electron,vaginessa/electron,hokein/atom-shell,thomsonreuters/electron,kenmozi/electron,brave/muon,Zagorakiss/...
1c0b391419b035f78b41ee3bce8934f42896eef2
/** * \usergroup{SceAVConfig} * \usage{psp2/avconfig.h,SceAVConfig_stub} */ #ifndef _PSP2_AVCONFIG_H_ #define _PSP2_AVCONFIG_H_ #include <psp2/types.h> #ifdef __cplusplus extern "C" { #endif /*** * Get the maximum brightness. * * @param[out] maxBrightness - Maximum brightness. * * @return 0 on success, < 0...
/** * \usergroup{SceAVConfig} * \usage{psp2/avconfig.h,SceAVConfig_stub} */ #ifndef _PSP2_AVCONFIG_H_ #define _PSP2_AVCONFIG_H_ #include <psp2/types.h> #ifdef __cplusplus extern "C" { #endif /*** * Get the maximum brightness. * * @param[out] maxBrightness - Maximum brightness. * * @return 0 on success, < 0...
--- +++ @@ -31,6 +31,41 @@ */ int sceAVConfigSetDisplayBrightness(int brightness); +/*** + * Get the shutter volume. + * + * @param[out] volume - shutter volume. + * + * @return 0 on success, < 0 on error. + */ +int sceAVConfigGetShutterVol(int *volume); + +/*** + * Get the system volume. + * + * @param[out] vol...
Add some sceAVConfig volume functions
mit
Rinnegatamante/vita-headers,Rinnegatamante/vita-headers,vitasdk/vita-headers,vitasdk/vita-headers,Rinnegatamante/vita-headers,vitasdk/vita-headers,vitasdk/vita-headers,Rinnegatamante/vita-headers
40489836d8c58602f60a2f2fa7b564754d41d7ae
// // Copyright (C) 2007 SIPez LLC. // Licensed to SIPfoundry under a Contributor Agreement. // // Copyright (C) 2007 SIPfoundry Inc. // Licensed by SIPfoundry under the LGPL license. // // $$ /////////////////////////////////////////////////////////////////////////////// // Author: Sergey Kostanbaev <Sergey DOT K...
// // Copyright (C) 2007 SIPez LLC. // Licensed to SIPfoundry under a Contributor Agreement. // // Copyright (C) 2007 SIPfoundry Inc. // Licensed by SIPfoundry under the LGPL license. // // $$ /////////////////////////////////////////////////////////////////////////////// // Author: Sergey Kostanbaev <Sergey DOT K...
--- +++ @@ -18,6 +18,13 @@ #include <spandsp/bitstream.h> #include <spandsp/g726.h> +#ifndef G726_PACKING_NONE +#define G726_PACKING_NONE 0 +#endif + +#ifndef G726_ENCODING_LINEAR +#define G726_ENCODING_LINEAR 0 +#endif int internal_decode_g726(void* handle, const void* pCodedData, u...
FIx build of G.726 codec wrapper with older versions of SpanDSP. git-svn-id: 5274dacc98e2a95d0b0452670772bfdffe61ca90@10190 a612230a-c5fa-0310-af8b-88eea846685b
lgpl-2.1
sipXtapi/sipXtapi-svn-mirror,sipXtapi/sipXtapi-svn-mirror,sipXtapi/sipXtapi-svn-mirror,sipXtapi/sipXtapi-svn-mirror,sipXtapi/sipXtapi-svn-mirror,sipXtapi/sipXtapi-svn-mirror,sipXtapi/sipXtapi-svn-mirror
939667b6efbc5eb92e80af985727eb2465d19810
/****************************************************************************** GameState.h Game State Management Copyright (c) 2013 Jeffrey Carpenter Portions Copyright (c) 2013 Fielding Johnston ******************************************************************************/ #ifndef GAMEAPP_GAMESTATE_HEA...
/****************************************************************************** GameState.h Game State Management Copyright (c) 2013 Jeffrey Carpenter Portions Copyright (c) 2013 Fielding Johnston ******************************************************************************/ #ifndef GAMEAPP_GAMESTATE_HEA...
--- +++ @@ -27,7 +27,7 @@ virtual void Pause() = 0; virtual void Resume() = 0; - virtual void Input ( void ) = 0; + virtual void HandleInput ( void ) = 0; virtual void Update ( void ) = 0; virtual void Draw ( void ) = 0;
Rename of Input to HandleInput
bsd-2-clause
i8degrees/nomlib,i8degrees/nomlib,i8degrees/nomlib,i8degrees/nomlib
af65de668c8b6ab55e46e07ca5235feee23e86dc
// 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...
// 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...
--- +++ @@ -11,7 +11,7 @@ /** * 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) { +inline uint64_t get_super_bucket_key(const document::BucketId& bucket_id) noexcept { assert(bucket_id.getU...
Make function inline and noexcept.
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
7a276551f8349db28f32c36a68ab96c46c90517c
//--------------------------------------------------------------------*- C++ -*- // CLING - the C++ LLVM-based InterpreterG :) // version: $Id$ // author: Timur Pocheptsov <Timur.Pocheptsov@cern.ch> //------------------------------------------------------------------------------ #ifndef CLING_DISPLAY_H #define CLING_...
//--------------------------------------------------------------------*- C++ -*- // CLING - the C++ LLVM-based InterpreterG :) // version: $Id$ // author: Timur Pocheptsov <Timur.Pocheptsov@cern.ch> //------------------------------------------------------------------------------ #ifndef CLING_DISPLAY_H #define CLING_...
--- +++ @@ -14,9 +14,10 @@ } namespace cling { +class Interpreter; void DisplayClasses(llvm::raw_ostream &stream, - const class Interpreter *interpreter, bool verbose); + const Interpreter *interpreter, bool verbose); void DisplayClass(llvm::raw_ostream &stream, ...
Fix fwd decl for windows. git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@47814 27541ba8-7e3a-0410-8455-c3a389f83636
lgpl-2.1
karies/cling,marsupial/cling,karies/cling,perovic/cling,marsupial/cling,marsupial/cling,perovic/cling,root-mirror/cling,marsupial/cling,perovic/cling,root-mirror/cling,marsupial/cling,perovic/cling,karies/cling,karies/cling,root-mirror/cling,karies/cling,root-mirror/cling,perovic/cling,marsupial/cling,root-mirror/cling...
3f150a8d8b571ca3f072d3ced1b3272aa82b9ea9
#ifndef TDCChannel_h #define TDCChannel_h #include <fstream> #include <TObject.h> #include <TClonesArray.h> #include <iostream> #define MAX_FULL_HITS 50 class TDCChannel : public TObject { protected: Int_t channel; double leadTime1; double trailTime1; double tot1; double referenceDiff1; double leadTimes[MA...
#ifndef TDCChannel_h #define TDCChannel_h #include <fstream> #include <TObject.h> #include <TClonesArray.h> #include <iostream> #define MAX_FULL_HITS 100 class TDCChannel : public TObject { protected: Int_t channel; double leadTime1; double trailTime1; double tot1; double referenceDiff1; double leadTimes[M...
--- +++ @@ -6,7 +6,7 @@ #include <TClonesArray.h> #include <iostream> -#define MAX_FULL_HITS 100 +#define MAX_FULL_HITS 50 class TDCChannel : public TObject {
Change TDCHits array size from 100 to 50 For consistency with the standalone version of the Unpacker.
apache-2.0
kmuzalewska/j-pet-framework,kmuzalewska/j-pet-framework,kmuzalewska/j-pet-framework,kmuzalewska/j-pet-framework,kmuzalewska/j-pet-framework
2766579a314f92c3fdf3f87e7bb20e5a4e52c01b
#import <Foundation/Foundation.h> //! Project version number for Quick. FOUNDATION_EXPORT double QuickVersionNumber; //! Project version string for Quick. FOUNDATION_EXPORT const unsigned char QuickVersionString[]; // In this header, you should import all the public headers of your framework using statements like #i...
#import <Foundation/Foundation.h> //! Project version number for Quick. FOUNDATION_EXPORT double QuickVersionNumber; //! Project version string for Quick. FOUNDATION_EXPORT const unsigned char QuickVersionString[]; #import <Quick/QuickSpec.h>
--- +++ @@ -6,4 +6,8 @@ //! Project version string for Quick. FOUNDATION_EXPORT const unsigned char QuickVersionString[]; +// In this header, you should import all the public headers of your framework using statements like #import <Quick/PublicHeader.h> + #import <Quick/QuickSpec.h> +#import <Quick/QCKDSL.h> +#i...
Revert "Remove public headers from umbrella header" This reverts commit 3c5ab51a235a400427b364a608e679d91390f96a.
apache-2.0
ikesyo/Quick,Quick/Quick,jeffh/Quick,Quick/Quick,jasonchaffee/Quick,jasonchaffee/Quick,paulyoung/Quick,marciok/Quick,jasonchaffee/Quick,phatblat/Quick,ikesyo/Quick,DanielAsher/Quick,ashfurrow/Quick,marciok/Quick,DanielAsher/Quick,paulyoung/Quick,ikesyo/Quick,ashfurrow/Quick,Quick/Quick,mokagio/Quick,paulyoung/Quick,pha...
ee99eef691ae08f3bea6012e0ff81850be1a4906
#ifndef DG_POINTS_TO_SET_H_ #define DG_POINTS_TO_SET_H_ #include "dg/PointerAnalysis/PointsToSets/OffsetsSetPointsToSet.h" #include "dg/PointerAnalysis/PointsToSets/SimplePointsToSet.h" #include "dg/PointerAnalysis/PointsToSets/SeparateOffsetsPointsToSet.h" #include "dg/PointerAnalysis/PointsToSets/PointerIdPointsToSe...
#ifndef DG_POINTS_TO_SET_H_ #define DG_POINTS_TO_SET_H_ #include "dg/PointerAnalysis/PointsToSets/OffsetsSetPointsToSet.h" #include "dg/PointerAnalysis/PointsToSets/SimplePointsToSet.h" #include "dg/PointerAnalysis/PointsToSets/SeparateOffsetsPointsToSet.h" #include "dg/PointerAnalysis/PointsToSets/PointerIdPointsToSe...
--- +++ @@ -12,8 +12,7 @@ namespace dg { namespace pta { -//using PointsToSetT = OffsetsSetPointsToSet; -using PointsToSetT = PointerIdPointsToSet; +using PointsToSetT = OffsetsSetPointsToSet; using PointsToMapT = std::map<Offset, PointsToSetT>; } // namespace pta
Revert "PTA: use bitvector-based points-to set representation" This reverts commit 74f5d133452018f5e933ab864446bdb720fa84b9.
mit
mchalupa/dg,mchalupa/dg,mchalupa/dg,mchalupa/dg
462e57739769909d72cda50355e2ccc055386816
#include <ruby.h> #ifndef RARRAY_PTR #define RARRAY_PTR(ary) RARRAY(ary)->ptr #endif #ifndef RARRAY_LEN #define RARRAY_LEN(ary) RARRAY(ary)->len #endif static ID id_cmp; static VALUE rb_array_binary_index(VALUE self, VALUE value) { int lower = 0; int upper = RARRAY_LEN(self) - 1; int i, comp; while(lower <=...
#include <ruby.h> static ID id_cmp; static VALUE rb_array_binary_index(VALUE self, VALUE value) { int lower = 0; int upper = RARRAY(self)->len - 1; int i, comp; while(lower <= upper) { i = lower + (upper - lower) / 2; comp = FIX2INT(rb_funcall(value, id_cmp, 1, RARRAY(self)->ptr[i])); if(comp ==...
--- +++ @@ -1,15 +1,22 @@ #include <ruby.h> + +#ifndef RARRAY_PTR +#define RARRAY_PTR(ary) RARRAY(ary)->ptr +#endif +#ifndef RARRAY_LEN +#define RARRAY_LEN(ary) RARRAY(ary)->len +#endif static ID id_cmp; static VALUE rb_array_binary_index(VALUE self, VALUE value) { int lower = 0; - int upper = RARRAY(self)...
Use RARRAY_LEN and RARRAY_PTR on ruby 1.9
mit
tyler/binary_search,tyler/binary_search
9b4a41296ef6979aa4622c509d301d8e5fd7f275
#include <kotaka/privilege.h> /* keeps track of bans */ mapping username_bans; private void save(); private void restore(); static void create() { username_bans = ([ ]); restore(); } void ban_username(string username) { ACCESS_CHECK(GAME()); if (username == "admin") { error("Cannot ban admin"); } if (use...
/* keeps track of bans */ mapping username_bans; mapping ip_bans; static void create() { username_bans = ([ ]); } void ban_username(string username) { ACCESS_CHECK(GAME()); if (username_bans[username]) { error("Username already banned"); } username_bans[username] = 1; } void unban_username(string username)...
--- +++ @@ -1,22 +1,32 @@ +#include <kotaka/privilege.h> + /* keeps track of bans */ mapping username_bans; -mapping ip_bans; + +private void save(); +private void restore(); static void create() { username_bans = ([ ]); + restore(); } void ban_username(string username) { ACCESS_CHECK(GAME()); + if...
Allow ban manager to save state
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
406f0cd7f1c4cd3796592305ae9e338d2ea6cdf8
//----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- template<class T> matrix<T>::matrix(): data_(), rows_(0), cols_(0) {} template<class T> matrix<T>::matrix( std::size_t rows, std::...
//----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- template<class T> matrix<T>::matrix():data_(),rows_(0),cols_(0){} template<class T> matrix<T>::matrix( std::size_t rows, std::size_t cols ): ...
--- +++ @@ -3,19 +3,20 @@ //----------------------------------------------------------------------------- template<class T> -matrix<T>::matrix():data_(),rows_(0),cols_(0){} +matrix<T>::matrix(): + data_(), + rows_(0), + cols_(0) {} template<class T> matrix<T>::matrix( std::size_t rows, std::size_t co...
Add check for empty matrix in constructor.
mit
actinium/cppMatrix,actinium/cppMatrix
20c2122027dab79bda516c91fe924f23bc938794
#ifndef __ASM_SH_SECTIONS_H #define __ASM_SH_SECTIONS_H #include <asm-generic/sections.h> extern long __nosave_begin, __nosave_end; extern long __machvec_start, __machvec_end; extern char __uncached_start, __uncached_end; extern char _ebss[]; extern char __start_eh_frame[], __stop_eh_frame[]; #endif /* __ASM_SH_SECT...
#ifndef __ASM_SH_SECTIONS_H #define __ASM_SH_SECTIONS_H #include <asm-generic/sections.h> extern void __nosave_begin, __nosave_end; extern long __machvec_start, __machvec_end; extern char __uncached_start, __uncached_end; extern char _ebss[]; extern char __start_eh_frame[], __stop_eh_frame[]; #endif /* __ASM_SH_SECT...
--- +++ @@ -3,7 +3,7 @@ #include <asm-generic/sections.h> -extern void __nosave_begin, __nosave_end; +extern long __nosave_begin, __nosave_end; extern long __machvec_start, __machvec_end; extern char __uncached_start, __uncached_end; extern char _ebss[];
sh: Change __nosave_XXX symbols to long This patch changes the: - __nosave_begin - __nosave_end symbols from 'void' to 'long' as required by the latest Gcc (4.5.2) which raises the compilation error: cc1: warnings being treated as errors arch/sh/kernel/swsusp.c: In function 'pfn_is_nosave': arch/sh/kernel/swsusp.c:...
mit
KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kana...
13c12a4e8ecdf3998cd2d89ade69f6f194819c95
#define _MASTERTYPES #include <inttypes.h> //Declarations for master types typedef enum { Register = 0, Coil = 1, DiscreteInput = 2 } MODBUSDataType; //MODBUS data types enum (coil, register, input, etc.) typedef struct { uint8_t Address; //Device address uint8_t Function; //Function called, in which exception...
#define _MASTERTYPES #include <inttypes.h> //Declarations for master types typedef enum { Register = 0, Coil = 1 } MODBUSDataType; //MODBUS data types enum (coil, register, input, etc.) typedef struct { uint8_t Address; //Device address uint8_t Function; //Function called, in which exception occured uint8_t Co...
--- +++ @@ -7,7 +7,8 @@ typedef enum { Register = 0, - Coil = 1 + Coil = 1, + DiscreteInput = 2 } MODBUSDataType; //MODBUS data types enum (coil, register, input, etc.) typedef struct
Add 'DiscreteImput' Modbus data type
mit
Jacajack/modlib
88a704e430bbbc5d6f179a87e84a498b0d0529e1
/* Copyright (C) 2015 George White <stonehippo@gmail.com>, All rights reserved. See https://raw.githubusercontent.com/stonehippo/sploder/master/LICENSE.txt for license details. */ // ******************* Timing helpers ******************* void startTimer(long &timer) { timer = millis(); } boolean isTimerExpired(...
/* Copyright (C) 2015 George White <stonehippo@gmail.com>, All rights reserved. See https://raw.githubusercontent.com/stonehippo/sploder/master/LICENSE.txt for license details. */ // ******************* Timing helpers ******************* void startTimer(long &timer) { timer = millis(); } boolean isTimerExpired(...
--- +++ @@ -9,7 +9,7 @@ timer = millis(); } -boolean isTimerExpired(long &timer, int expiration) { +boolean isTimerExpired(long &timer, long expiration) { long current = millis() - timer; return current > expiration; }
Fix bug in timing helper
mit
stonehippo/tankbot,stonehippo/tankbot
9c0c3451a66ad78dad1c9394d38a2a3be2dc89df
/* * LibCassandra * Copyright (C) 2010-2011 Padraig O'Sullivan, Ewen Cheslack-Postava * All rights reserved. * * Use and distribution licensed under the BSD license. See * the COPYING file in the parent directory for full text. */ #ifndef __LIBCASSANDRA_UTIL_PLATFORM_H #define __LIBCASSANDRA_UTIL_PLATFORM_H #i...
/* * LibCassandra * Copyright (C) 2010-2011 Padraig O'Sullivan, Ewen Cheslack-Postava * All rights reserved. * * Use and distribution licensed under the BSD license. See * the COPYING file in the parent directory for full text. */ #ifndef __LIBCASSANDRA_UTIL_PLATFORM_H #define __LIBCASSANDRA_UTIL_PLATFORM_H #i...
--- +++ @@ -10,6 +10,20 @@ #ifndef __LIBCASSANDRA_UTIL_PLATFORM_H #define __LIBCASSANDRA_UTIL_PLATFORM_H +#ifdef __GNUC__ + +// #include_next is broken: it does not search default include paths! +#define BOOST_TR1_DISABLE_INCLUDE_NEXT +// config_all.hpp reads this variable, then sets BOOST_HAS_INCLUDE_NEXT anyway...
Disable boost's include_next functionality, fixes compatibility with Sirikata.
bsd-3-clause
xiaozhou/libcassandra,xiaozhou/libcassandra,xiaozhou/libcassandra,xiaozhou/libcassandra
0b7aa15019283753a620c908deea7bab4da1f94d
/* $FreeBSD$ */ /* XXX: Depend on our system headers protecting against multiple includes. */ #include <paths.h> #undef _PATH_FTPUSERS #include <pwd.h> #define _DIAGASSERT(x) #include <sys/_types.h> #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED #endif long long strsuftollx(const char *,...
/* $FreeBSD$ */ /* XXX: Depend on our system headers protecting against multiple includes. */ #include <paths.h> #undef _PATH_FTPUSERS #include <pwd.h> #define _DIAGASSERT(x) #include <sys/_types.h> #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED #endif long long strsuftollx(const char *,...
--- +++ @@ -15,3 +15,10 @@ #endif long long strsuftollx(const char *, const char *, long long, long long, char *, size_t); + +/* + * IEEE Std 1003.1c-95, adopted in X/Open CAE Specification Issue 5 Version 2 + */ +#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500 +#define LOGIN_NAME_MAX MAXLOGNAME /* max l...
Deal with the LOGIN_NAME_MAX issue in the NetBSD->FreeBSD translation^H^H^Hhack layer.
bsd-3-clause
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
507c61e2567c01f86e8bea87a37b173318779fb4
// // SQLiteDatabaseHelper // Include/SQLiteDatabaseHelper.h // #ifndef __SQLITEDATABASEHELPER_H__ #define __SQLITEDATABASEHELPER_H__ #include <SQLiteDatabaseHelper/Operations/Read/DatabaseReader.h> #endif
// // SQLiteDatabaseHelper // Include/SQLiteDatabaseHelper.h // #ifndef __SQLITEDATABASEHELPER_H__ #define __SQLITEDATABASEHELPER_H__ #include <stdio.h> #include <sqlite3.h> #endif
--- +++ @@ -5,8 +5,6 @@ #ifndef __SQLITEDATABASEHELPER_H__ #define __SQLITEDATABASEHELPER_H__ -#include <stdio.h> - -#include <sqlite3.h> +#include <SQLiteDatabaseHelper/Operations/Read/DatabaseReader.h> #endif
Include database reader in main library header Signed-off-by: Gigabyte-Giant <a7441177296edab3db25b9cdf804d04c1ff0afbf@hotmail.com>
mit
Gigabyte-Giant/SQLiteDatabaseHelper
03a7507e13b84eb3ddd6fad31832e99825977895
#ifndef PWM_H #define PWM_H extern void PwmInit(uint8_t channel); extern void PwmSetPeriod(uint8_t channel, uint32_t frequency); extern void PwmSetDuty(uint8_t channel, uint8_t duty); typedef struct { uint32_t frequency; uint8_t duty; } PwmOutput; #endif //PWM_H
#ifndef PWM_H #define PWM_H void PwmInit(uint8_t channel); void PwmSetPeriod(uint8_t channel, uint32_t frequency); void PwmSetDuty(uint8_t channel, uint8_t duty); typedef struct { uint32_t frequency; uint8_t duty; } PwmOutput; #endif //PWM_H
--- +++ @@ -1,9 +1,9 @@ #ifndef PWM_H #define PWM_H -void PwmInit(uint8_t channel); -void PwmSetPeriod(uint8_t channel, uint32_t frequency); -void PwmSetDuty(uint8_t channel, uint8_t duty); +extern void PwmInit(uint8_t channel); +extern void PwmSetPeriod(uint8_t channel, uint32_t frequency); +extern void PwmSetDu...
Update prototypes to make them more compliant.
mit
jotux/LaunchLib,jotux/LaunchLib,jotux/LaunchLib
d655d71e6b85f7f07c738dbb1a22d6c29bb0bdbf
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
--- +++ @@ -15,8 +15,8 @@ #ifndef IREE_COMPILER_DIALECT_IREE_TRANSFORMS_PASSES_H_ #define IREE_COMPILER_DIALECT_IREE_TRANSFORMS_PASSES_H_ -#include "third_party/llvm/llvm-project/mlir//include/mlir/IR/Module.h" -#include "third_party/llvm/llvm-project/mlir//include/mlir/Pass/Pass.h" +#include "mlir/IR/Module.h" +...
Fix include path typo from merge conflicts PiperOrigin-RevId: 287685318
apache-2.0
google/iree,iree-org/iree,google/iree,iree-org/iree,iree-org/iree,google/iree,google/iree,iree-org/iree,google/iree,iree-org/iree,iree-org/iree,google/iree,google/iree,iree-org/iree
1843a02b1359aa796a71c45da5f3f07615ae0f9a
/** * @file debug_msg.c Debug Message function */ /* $Id$ */ #include "gangliaconf.h" int debug_level = 0; /** * @fn void debug_msg(const char *format, ...) * Prints the message to STDERR if DEBUG is #defined * @param format The format of the msg (see printf manpage) * @param ... Optional arguments */ void deb...
/** * @file debug_msg.c Debug Message function */ /* $Id$ */ #include "gangliaconf.h" int debug_level = 0; /** * @fn void debug_msg(const char *format, ...) * Prints the message to STDERR if DEBUG is #defined * @param format The format of the msg (see printf manpage) * @param ... Optional arguments */ void deb...
--- +++ @@ -15,7 +15,7 @@ void debug_msg(const char *format, ...) { - if (debug_level && format) + if (debug_level > 1 && format) { va_list ap; va_start(ap, format);
Debug level 1 now only shows error messages (and no backgrounding in gmetad).
bsd-3-clause
phreakocious/monitor-core,phreakocious/monitor-core,mjzhou/monitor-core,lawrencewu/monitor-core,dmourati/monitor-core,phreakocious/monitor-core,fastly/monitor-core,fastly/monitor-core,lawrencewu/monitor-core,ganglia/monitor-core,torkelsson/monitor-core,phreakocious/monitor-core,ganglia/monitor-core,fastly/monitor-core,...
613d7f23227b5b763e3ebe58442b5edaefe324ba
#ifndef _TESTUTILS_H #define _TESTUTILS_H /* * tslib/tests/testutils.h * * Copyright (C) 2004 Michael Opdenacker <michaelo@handhelds.org> * * This file is placed under the GPL. * * SPDX-License-Identifier: GPL-2.0+ * * * Misc utils for ts test programs */ #define RESET "\033[0m" #define RED "\033[31...
#ifndef _TESTUTILS_H #define _TESTUTILS_H /* * tslib/tests/testutils.h * * Copyright (C) 2004 Michael Opdenacker <michaelo@handhelds.org> * * This file is placed under the LGPL. * * * Misc utils for ts test programs */ #define RESET "\033[0m" #define RED "\033[31m" #define GREEN "\033[32m" #define B...
--- +++ @@ -5,7 +5,9 @@ * * Copyright (C) 2004 Michael Opdenacker <michaelo@handhelds.org> * - * This file is placed under the LGPL. + * This file is placed under the GPL. + * + * SPDX-License-Identifier: GPL-2.0+ * * * Misc utils for ts test programs
tests: Fix license statement in header comment and add SPDS identifier This file had been copied around a long time ago, and included a wrong license. All files in the tests directory (except for this small header) are GPL licensed. I actually doubt that the copyright notice is accurate here -.- Signed-off-by: Marti...
lgpl-2.1
kergoth/tslib,kergoth/tslib,kergoth/tslib,kergoth/tslib
b288888c9a5546844c146d8b7161d24ebbd7c7f7
/* @(#)root/eg:$Name: $:$Id: LinkDef.h,v 1.3 2000/09/08 16:42:12 brun Exp $ */ /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. * * ...
/* @(#)root/eg:$Name: $:$Id: LinkDef.h,v 1.2 2000/09/06 15:15:18 brun Exp $ */ /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. * * ...
--- +++ @@ -1,4 +1,4 @@ -/* @(#)root/eg:$Name: $:$Id: LinkDef.h,v 1.2 2000/09/06 15:15:18 brun Exp $ */ +/* @(#)root/eg:$Name: $:$Id: LinkDef.h,v 1.3 2000/09/08 16:42:12 brun Exp $ */ /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Radema...
Use option + for TAttParticle and TPrimary git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@932 27541ba8-7e3a-0410-8455-c3a389f83636
lgpl-2.1
nilqed/root,agarciamontoro/root,jrtomps/root,vukasinmilosevic/root,abhinavmoudgil95/root,zzxuanyuan/root,buuck/root,perovic/root,Dr15Jones/root,sawenzel/root,olifre/root,ffurano/root5,sawenzel/root,0x0all/ROOT,simonpf/root,agarciamontoro/root,sbinet/cxx-root,esakellari/root,omazapa/root,tc3t/qoot,mhuwiler/rootauto,ffur...
c62a4efe9492d867e281c2c680e0b8c185d9669b
#include "condor_fix_stdio.h" #include <stdlib.h> #include "condor_fix_unistd.h" #include <limits.h> #include <string.h> #include <ctype.h> #include "_condor_fix_types.h" #include <fcntl.h> #include <errno.h>
#include "condor_fix_stdio.h" #include <stdlib.h> #include "condor_fix_unistd.h" #include <limits.h> #include <string.h> #include <ctype.h> #include <fcntl.h> #include "_condor_fix_types.h" #include <errno.h>
--- +++ @@ -4,7 +4,7 @@ #include <limits.h> #include <string.h> #include <ctype.h> +#include "_condor_fix_types.h" #include <fcntl.h> -#include "_condor_fix_types.h" #include <errno.h>
Add <fcntl.h> to list of commonly included files.
apache-2.0
htcondor/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,clalancette/condor-dcloud,clalancette/condor-dcloud,clalancette/condor-dcloud,djw8605/condor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,htcondor/htcondor,djw8605/condor,neurodebian/htcondor,neurodebian/htcondor,djw8605/htcon...
74feaa2154590685a8702b9bab6aa2a4c2e58382
// // RTRNodeState.h // Router // // Created by Nick Tymchenko on 14/09/15. // Copyright (c) 2015 Pixty. All rights reserved. // #import <Foundation/Foundation.h> typedef NS_ENUM(NSInteger, RTRNodeState) { RTRNodeStateNotInitialized = 0, RTRNodeStateInactive = 1, RTRNodeStateDeactivating = 2, RTRN...
// // RTRNodeState.h // Router // // Created by Nick Tymchenko on 14/09/15. // Copyright (c) 2015 Pixty. All rights reserved. // #import <Foundation/Foundation.h> typedef NS_ENUM(NSInteger, RTRNodeState) { RTRNodeStateNotInitialized = 0, RTRNodeStateInactive = 1, RTRNodeStateDeactivating = 2, RTRN...
--- +++ @@ -15,3 +15,12 @@ RTRNodeStateActivating = 3, RTRNodeStateActive = 4 }; + + +static inline BOOL RTRNodeStateIsInitialized(RTRNodeState state) { + return state != RTRNodeStateNotInitialized; +} + +static inline BOOL RTRNodeStateIsTransitioning(RTRNodeState state) { + return state == RTRNodeSt...
Add helper functions for state
mit
joomcode/Lighthouse,pixty/Lighthouse,joomcode/Lighthouse,pixty/Router
bcf3710e675c279e04aa90ef12f97f3b686597c7
#include <stdio.h> #include <string.h> void abertura() { printf("*******************\n"); printf("* Jogo de Forca *\n"); printf("*******************\n\n"); } void chuta() { char chute; printf("Qual letra? "); scanf(" %c", &chute); chutes[tentativas] = chute; tentativas++; } int main() { char pal...
#include <stdio.h> #include <string.h> void abertura() { printf("*******************\n"); printf("* Jogo de Forca *\n"); printf("*******************\n\n"); } int main() { char palavrasecreta[20]; sprintf(palavrasecreta, "MELANCIA"); int acertou = 0; int enforcou = 0; char chutes[26]; int tentat...
--- +++ @@ -5,6 +5,15 @@ printf("*******************\n"); printf("* Jogo de Forca *\n"); printf("*******************\n\n"); +} + +void chuta() { + char chute; + printf("Qual letra? "); + scanf(" %c", &chute); + + chutes[tentativas] = chute; + tentativas++; } int main() { @@ -22,10 +31,12 @@ d...
Update files, Alura, Introdução a C - Parte 2, Aula 4.2
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
9e317ee873422d95bee44059585ea107f12d76ab
/* * You can use safely use mpi4py between multiple * Py_Initialize()/Py_Finalize() calls ... * but do not blame me for the memory leaks ;-) * */ #include <mpi.h> #include <Python.h> const char helloworld[] = \ "from mpi4py import MPI \n" "hwmess = 'Hello, World! I am process %d of %d on %s.' \n" ...
#include <stdio.h> #include <mpi.h> #include <Python.h> const char helloworld[] = \ "from mpi4py import MPI \n" "hwmess = 'Hello, World! I am process %d of %d on %s.' \n" "myrank = MPI.COMM_WORLD.Get_rank() \n" "nprocs = MPI.COMM_WORLD.Get_size() \n" "procnm = MPI.Get_processor_name() \n" "pri...
--- +++ @@ -1,4 +1,10 @@ -#include <stdio.h> +/* + * You can use safely use mpi4py between multiple + * Py_Initialize()/Py_Finalize() calls ... + * but do not blame me for the memory leaks ;-) + * + */ + #include <mpi.h> #include <Python.h> @@ -13,30 +19,17 @@ int main(int argc, char *argv[]) { - int ie...
Update and simplify embedding demo
bsd-2-clause
pressel/mpi4py,pressel/mpi4py,mpi4py/mpi4py,mpi4py/mpi4py,mpi4py/mpi4py,pressel/mpi4py,pressel/mpi4py
ad9cd9bfff8f0b7428c68ba02857a5789d8c3b77
start Go to Layout [ “budget” (budget) ] Set Window Title [ Current Window; New Title: "Budget Planner" ] Set Zoom Level [ 100% ] # #Report version number to Memory Switch Table. Set Field [ MemorySwitch::versionBudget; Reference::version ] # #Show regular menus if Admin logs in only. Show/Hide Text Ruler [ Hide ] If [...
start Go to Layout [ “budget” (budget) ] Set Window Title [ Current Window; New Title: "Budget Research" ] Set Zoom Level [ 100% ] # #Report version number to Memory Switch Table. Set Field [ MemorySwitch::versionBudget; Reference::version ] # #Show regular menus if Admin logs in only. Show/Hide Text Ruler [ Hide ] If ...
--- +++ @@ -1,6 +1,6 @@ start Go to Layout [ “budget” (budget) ] -Set Window Title [ Current Window; New Title: "Budget Research" ] +Set Window Title [ Current Window; New Title: "Budget Planner" ] Set Zoom Level [ 100% ] # @@ -19,4 +19,4 @@ [ Lock; Hide ] Install Menu Set [ “Custom Menu Set 1” ] End If -Janu...
Change solution name to Budget Planner
apache-2.0
HelpGiveThanks/Budget
1da49b17817fdfb4709976c462cc4a9ca943d989
// // lelib.h // lelib // // Created by Petr on 27.10.13. // Copyright (c) 2013 JLizard. All rights reserved. // #ifndef LE_DEBUG_LOGS #ifdef DEBUG #define LE_DEBUG_LOGS 1 #else #define LE_DEBUG_LOGS 0 #endif #endif #if LE_DEBUG_LOGS #define LE_DEBUG(...) NSLog(__VA_ARGS__) #el...
// // lelib.h // lelib // // Created by Petr on 27.10.13. // Copyright (c) 2013 JLizard. All rights reserved. // #define LE_DEBUG_LOGS 1 #if LE_DEBUG_LOGS #define LE_DEBUG(...) NSLog(__VA_ARGS__) #else #define LE_DEBUG(...) #endif #import "LELog.h" #import "lecore.h"
--- +++ @@ -6,7 +6,13 @@ // Copyright (c) 2013 JLizard. All rights reserved. // -#define LE_DEBUG_LOGS 1 +#ifndef LE_DEBUG_LOGS + #ifdef DEBUG + #define LE_DEBUG_LOGS 1 + #else + #define LE_DEBUG_LOGS 0 + #endif +#endif #if LE_DEBUG_LOGS #define LE_DEBUG(...) NSLog(__VA_ARGS_...
Allow logging to be configured at compilation time.
mit
smalltownheroes/le_ios,omgapuppy/le_ios,omgapuppy/le_ios,omgapuppy/le_ios,smalltownheroes/le_ios,logentries/le_ios,JohnLemberger/le_ios,KieranOB/le_ios,smalltownheroes/le_ios
033bfcb84aa88dde9779c789e4aefeb20bb899ed
/* * Copyright (c) 2007, 2008, 2009, ETH Zurich. * All rights reserved. * * This file is distributed under the terms in the attached LICENSE file. * If you do not find this file, copies can be found by writing to: * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. */ #ifndef DIRENT_H_ #...
/* * Copyright (c) 2007, 2008, 2009, ETH Zurich. * All rights reserved. * * This file is distributed under the terms in the attached LICENSE file. * If you do not find this file, copies can be found by writing to: * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. */ #ifndef DIRENT_H_ #...
--- +++ @@ -12,7 +12,11 @@ #include <sys/cdefs.h> +// Depending on header include order, this may collide with the definition in +// newlib's <dirent.h> See open issue: https://code.systems.ethz.ch/T58#1169 +#ifndef NAME_MAX #define NAME_MAX 512 +#endif struct dirent { // long d_ino;
Duplicate definition of NAME_MAX macro I broke the build in rBFIaee0075101b1; this is just a temporary band-aid and only masks the more general issue described in T58. If you have an idea for a better fix, please let me know. Signed-off-by: Zaheer Chothia <418c8e101762410c9c1204e516611673b0b87d3d@inf.ethz.ch>
mit
BarrelfishOS/barrelfish,BarrelfishOS/barrelfish,BarrelfishOS/barrelfish,8l/barrelfish,kishoredbn/barrelfish,BarrelfishOS/barrelfish,kishoredbn/barrelfish,kishoredbn/barrelfish,BarrelfishOS/barrelfish,kishoredbn/barrelfish,BarrelfishOS/barrelfish,8l/barrelfish,kishoredbn/barrelfish,8l/barrelfish,kishoredbn/barrelfish,Ba...
2ab77e34c2e175d90c79dde9b708e3c5beff64de
// 13 september 2016 #include "uipriv_unix.h" struct uiImage { uiUnixControl c; GtkWidget *widget; }; uiUnixControlAllDefaults(uiImage) void uiImageSetSize(uiImage *i, unsigned int width, unsigned int height) { GdkPixbuf *pixbuf; pixbuf = gtk_image_get_pixbuf(GTK_IMAGE(i->widget)); pixbuf = gdk_pixbuf_scale_si...
// 13 september 2016 #include "uipriv_unix.h" struct uiImage { uiUnixControl c; GtkWidget *widget; }; uiUnixControlAllDefaults(uiImage) uiImage *uiNewImage(const char *filename) { uiImage *img; uiUnixNewControl(uiImage, img); img->widget = gtk_image_new_from_file(filename); return img; }
--- +++ @@ -7,6 +7,28 @@ }; uiUnixControlAllDefaults(uiImage) + +void uiImageSetSize(uiImage *i, unsigned int width, unsigned int height) +{ + GdkPixbuf *pixbuf; + + pixbuf = gtk_image_get_pixbuf(GTK_IMAGE(i->widget)); + pixbuf = gdk_pixbuf_scale_simple(pixbuf, + width, + height, + GDK_INTERP_BILINEAR); + gtk_...
Implement getting and setting uiImage size in Gtk
mit
sclukey/libui,sclukey/libui
f3d275984b116f79fbb8568e72d1707ef12230c5
/* * kisskiss.h * * Tim "diff" Strazzere <strazz@gmail.com> */ #include <stdlib.h> #include <stdio.h> #include <sys/ptrace.h> #include <dirent.h> #include <fcntl.h> // open / O_RDONLY #include <unistd.h> // close #include <errno.h> // perror #include <string.h> // strlen static const char* odex_magic = "dey\n036"...
/* * kisskiss.h * * Tim "diff" Strazzere <strazz@gmail.com> */ #include <stdlib.h> #include <stdio.h> #include <sys/ptrace.h> #include <dirent.h> #include <fcntl.h> // open / O_RDONLY static const char* odex_magic = "dey\n036"; static const char* static_safe_location = "/data/local/tmp/"; static const char* suffi...
--- +++ @@ -9,14 +9,17 @@ #include <sys/ptrace.h> #include <dirent.h> #include <fcntl.h> // open / O_RDONLY +#include <unistd.h> // close +#include <errno.h> // perror +#include <string.h> // strlen static const char* odex_magic = "dey\n036"; static const char* static_safe_location = "/data/local/tmp/"; stati...
Reduce implicit calls, add fix for large memory sections
apache-2.0
strazzere/android-unpacker,strazzere/android-unpacker
8323670661ff47298967bca382b360f50f878041
#pragma once #if defined(_MSC_VER) #define DLL_API __declspec(dllexport) #ifndef STDCALL #define STDCALL __stdcall #endif #ifndef CDECL #define CDECL __cdecl #endif #else #define DLL_API __attribute__ ((visibility ("default"))) #ifndef STDCALL #define STDCALL __attribute__((stdcall)) #endif #ifndef CDECL #define C...
#pragma once #if defined(_MSC_VER) #define DLL_API __declspec(dllexport) #define STDCALL __stdcall #define CDECL __cdecl #else #define DLL_API __attribute__ ((visibility ("default"))) #define STDCALL __attribute__((stdcall)) #define CDECL __attribute__((cdecl)) #endif #define CS_OUT
--- +++ @@ -2,12 +2,24 @@ #if defined(_MSC_VER) #define DLL_API __declspec(dllexport) + +#ifndef STDCALL #define STDCALL __stdcall +#endif + +#ifndef CDECL #define CDECL __cdecl +#endif #else #define DLL_API __attribute__ ((visibility ("default"))) + +#ifndef STDCALL #define STDCALL __attribute__((stdcall)) ...
Check for defines before defining to get rid of some warnings.
mit
xistoso/CppSharp,mohtamohit/CppSharp,zillemarco/CppSharp,inordertotest/CppSharp,xistoso/CppSharp,imazen/CppSharp,mono/CppSharp,imazen/CppSharp,SonyaSa/CppSharp,Samana/CppSharp,xistoso/CppSharp,genuinelucifer/CppSharp,mohtamohit/CppSharp,mono/CppSharp,ktopouzi/CppSharp,inordertotest/CppSharp,Samana/CppSharp,imazen/CppSh...
8c75289033623c366a6949adfabe4cdcf550d4ac
// -*- c-basic-offset: 2 -*- /* * This file is part of the KDE libraries * Copyright (C) 2006 George Staikos <staikos@kde.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation...
// -*- c-basic-offset: 2 -*- /* * This file is part of the KDE libraries * Copyright (C) 2006 George Staikos <staikos@kde.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation...
--- +++ @@ -28,7 +28,7 @@ #if USE(QT4_UNICODE) #include "qt4/UnicodeQt4.h" #elif USE(ICU_UNICODE) -#include <wtf/icu/UnicodeIcu.h> +#include <wtf/unicode/icu/UnicodeIcu.h> #else #error "Unknown Unicode implementation" #endif
Fix mac bustage (more still). git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@18103 bbb929c8-8fbe-4397-9dbb-9b2b20218538
bsd-3-clause
primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs
106f354f1fe8dc196665df581ea7b4e986b70ca6
// Copyright 2014 Tanel Lebedev #ifndef SRC_EXPLICIT_SCOPED_LOCK_H_ #define SRC_EXPLICIT_SCOPED_LOCK_H_ #include <string> #include <sstream> #include "Poco/Logger.h" namespace kopsik { class ExplicitScopedLock : public Poco::Mutex::ScopedLock { public: ExplicitScopedLock( const std::string context, ...
// Copyright 2014 Tanel Lebedev #ifndef SRC_EXPLICIT_SCOPED_LOCK_H_ #define SRC_EXPLICIT_SCOPED_LOCK_H_ #include <string> #include <sstream> #include "Poco/Logger.h" namespace kopsik { class ExplicitScopedLock : public Poco::Mutex::ScopedLock { public: ExplicitScopedLock( const std::string context, ...
--- +++ @@ -19,13 +19,13 @@ context_(context) { std::stringstream text; text << context_ << " locking"; - logger().debug(text.str()); + logger().trace(text.str()); } ~ExplicitScopedLock() { std::stringstream text; text << context_ << " unlocking"; - logg...
Print out locking/unlocking with trace only
bsd-3-clause
codeman38/toggldesktop,codeman38/toggldesktop,codeman38/toggldesktop,codeman38/toggldesktop,codeman38/toggldesktop,codeman38/toggldesktop
ac19a88b463c7899f3aeffd283d0a42923449e0e
// Calculates the 45th Fibonacci number with a visual indicator. // Note: using yield() in fib() may allow the spinner to actually spin, but // fib() takes a lot longer to complete. E.g. Over 2 minutes with yield() // vs. 10 seconds without it. #include <stdio.h> #include <assert.h> #include <libdill.h> // Calculates ...
// Calculates the 45th Fibonacci number with a visual indicator. #include <stdio.h> #include <assert.h> #include <libdill.h> // Calculates Fibonacci of x. static int fib(int x) { // Need to yield or spinner will not have any time to spin. int rc = yield(); assert(rc == 0); if (x < 2) return x; return fib(x - 1) ...
--- +++ @@ -1,4 +1,7 @@ // Calculates the 45th Fibonacci number with a visual indicator. +// Note: using yield() in fib() may allow the spinner to actually spin, but +// fib() takes a lot longer to complete. E.g. Over 2 minutes with yield() +// vs. 10 seconds without it. #include <stdio.h> #include <assert.h> #in...
Add note about using yield().
mit
jppunnett/libdill-tutorial
0b4900a73fb6206ad82511b2054843baec172618
#ifndef CONTROL_LOOP_INL_H #define CONTROL_LOOP_INL_H #include "board.h" #include "bitband.h" namespace hardware { inline bool ControlLoop::hw_button_enabled() const { return MEM_ADDR(BITBAND(reinterpret_cast<uint32_t>(&(GPIOF->IDR)), GPIOF_HW_SWITCH_PIN)); } } #endif
#ifndef CONTROL_LOOP_INL_H #define CONTROL_LOOP_INL_H #include "board.h" #include "bitband.h" namespace hardware { inline bool ControlLoop::hw_button_enabled() { return MEM_ADDR(BITBAND(reinterpret_cast<uint32_t>(&(GPIOF->IDR)), GPIOF_HW_SWITCH_PIN)); } } #endif
--- +++ @@ -7,7 +7,7 @@ namespace hardware { inline -bool ControlLoop::hw_button_enabled() +bool ControlLoop::hw_button_enabled() const { return MEM_ADDR(BITBAND(reinterpret_cast<uint32_t>(&(GPIOF->IDR)), GPIOF_HW_SWITCH_PIN));
Add const to hw_button_enabled() definition.
bsd-2-clause
hazelnusse/robot.bicycle,hazelnusse/robot.bicycle,hazelnusse/robot.bicycle,hazelnusse/robot.bicycle,hazelnusse/robot.bicycle
032e91ad8a436a424a8364f70f5fea0ab5f6d23d
/* * Copyright (C) 2014, Galois, Inc. * This sotware is distributed under a standard, three-clause BSD license. * Please see the file LICENSE, distributed with this software, for specific * terms and conditions. */ #ifndef MINLIBC_MMAN_H #define MINLIBC_MMAN_H #include <sys/types.h> #define PROT_NONE ...
/* * Copyright (C) 2014, Galois, Inc. * This sotware is distributed under a standard, three-clause BSD license. * Please see the file LICENSE, distributed with this software, for specific * terms and conditions. */ #ifndef MINLIBC_MMAN_H #define MINLIBC_MMAN_H #include <sys/types.h> #define PROT_NONE ...
--- +++ @@ -16,10 +16,22 @@ #define PROT_NOCACHE 0x8 #define PROT_READWRITE (PROT_READ | PROT_WRITE) +#define MAP_SHARED 0x01 +#define MAP_PRIVATE 0x02 +#define MAP_FIXED 0x10 #define MAP_ANON 0x20 #define MAP_ANONYMOUS 0x20 -#d...
Add more flags for mmap() to ignore.
bsd-3-clause
GaloisInc/minlibc,GaloisInc/minlibc
f0b45d88d5e1c1737e75cdf4eceda4e5a01461b5
#include "safe-c/safe_memory.h" #include <stdio.h> #include <stdlib.h> #include <string.h> void* safe_malloc_function(size_t size, const char* calling_function) { if (size == 0) { fprintf(stderr, "Error allocating memory: The function %s called " "'safe_malloc' and requested zero memor...
#include "safe-c/safe_memory.h" #include <stdio.h> #include <stdlib.h> #include <string.h> void* safe_malloc_function(size_t size, const char* calling_function) { if (size == 0) { fprintf(stderr, "Error allocating memory: The function %s called " "'safe_malloc' and requested zero memor...
--- +++ @@ -19,12 +19,12 @@ if (!memory) { fprintf(stderr, "Error allocating memory: The function %s called " - "'safe_malloc' requesting %u bytes of memory, but an error " + "'safe_malloc' requesting %zu bytes of memory, but an error " "occurred alloc...
Fix: Add value parameter to fprintf in safe_malloc Changed the value type in the `fprintf` from `u` to `zu`, this is because `size` is of type `size_t` and not `unsigned int`. In addation, asign the return value of memset to `memory`.
mit
VanJanssen/safe-c,ErwinJanssen/elegan-c,VanJanssen/elegan-c
5be6eff496407146af24c8e85ae2c560b40eeab8
// Copyright (c) 2006-2008 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 BASE_SCOPED_HANDLE_H_ #define BASE_SCOPED_HANDLE_H_ #include <stdio.h> #include "base/basictypes.h" #if defined(OS_WIN) #include "base...
// Copyright (c) 2006-2008 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 BASE_SCOPED_HANDLE_H_ #define BASE_SCOPED_HANDLE_H_ #include "base/basictypes.h" #if defined(OS_WIN) #include "base/scoped_handle_win.h...
--- +++ @@ -4,6 +4,8 @@ #ifndef BASE_SCOPED_HANDLE_H_ #define BASE_SCOPED_HANDLE_H_ + +#include <stdio.h> #include "base/basictypes.h"
Add stdio to this file becasue we use FILE. It starts failing with FILE, identifier not found, when you remove the include for logging.h, which is included in scoped_handle_win.h Review URL: http://codereview.chromium.org/16461 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@7441 0039d316-1c4b-4281-b951-d872f20...
bsd-3-clause
adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,adobe/chromium,Crystal...
4d2173704ae6884eaab3e9f702fb910bfb84c30d
#ifndef _VJ_DEVICE_INTERFACE_H_ #define _VJ_DEVICE_INTERFACE_H_ //: Base class for simplified interfaces // // Interfaces provide an easier way to access proxy objects from // within user applications. <br> <br> // // Users can simply declare a local interface variable and use it // as a smart_ptr for the proxy // //!...
#ifndef _VJ_DEVICE_INTERFACE_H_ #define _VJ_DEVICE_INTERFACE_H_ //: Base class for simplified interfaces // // Interfaces provide an easier way to access proxy objects from // within user applications. <br> <br> // // Users can simply declare a local interface variable and use it // as a smart_ptr for the proxy // //!...
--- +++ @@ -12,7 +12,7 @@ //! NOTE: The init function should be called in the init function of the user //+ application -#include <mstring.h> +#include <vjConfig.h> class vjDeviceInterface {
Include vjConfig.h rather than mstring.h to get the basic_string implmentation. git-svn-id: 769d22dfa2d22aad706b9a451492fb87c0735f19@596 08b38cba-cd3b-11de-854e-f91c5b6e4272
lgpl-2.1
godbyk/vrjuggler-upstream-old,vancegroup-mirrors/vrjuggler,vancegroup-mirrors/vrjuggler,LiuKeHua/vrjuggler,godbyk/vrjuggler-upstream-old,vancegroup-mirrors/vrjuggler,vrjuggler/vrjuggler,MichaelMcDonnell/vrjuggler,godbyk/vrjuggler-upstream-old,godbyk/vrjuggler-upstream-old,vrjuggler/vrjuggler,MichaelMcDonnell/vrjuggler,...
ff49a712c4cc188cdd7d0207595d99c89fe985f0
/* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #ifndef __LIBSEL4MUSLCCAMKES_H__ #define __LIBSEL4MUSLCCAMKES_H__ #include <utils/p...
/* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #define STDOUT_FD 1 #define STDERR_FD 2 #define FIRST_USER_FD 3 #define FIL...
--- +++ @@ -7,6 +7,11 @@ * * @TAG(NICTA_BSD) */ + +#ifndef __LIBSEL4MUSLCCAMKES_H__ +#define __LIBSEL4MUSLCCAMKES_H__ + +#include <utils/page.h> #define STDOUT_FD 1 #define STDERR_FD 2 @@ -19,7 +24,6 @@ /* this implementation does not allow users to close STDOUT or STDERR, so they can't be freed */...
Add include guard and retrieve PAGE_SIZE_4K definition from libutils
bsd-2-clause
smaccm/camkes-tool,smaccm/camkes-tool,smaccm/camkes-tool,smaccm/camkes-tool
b0699787c413baf93974a2b39f89117acfe55780
#ifndef VAST_CONCEPT_PARSEABLE_VAST_KEY_H #define VAST_CONCEPT_PARSEABLE_VAST_KEY_H #include "vast/key.h" #include "vast/concept/parseable/core/choice.h" #include "vast/concept/parseable/core/list.h" #include "vast/concept/parseable/core/operators.h" #include "vast/concept/parseable/core/parser.h" #include "vast/conc...
#ifndef VAST_CONCEPT_PARSEABLE_VAST_KEY_H #define VAST_CONCEPT_PARSEABLE_VAST_KEY_H #include "vast/key.h" #include "vast/concept/parseable/core/choice.h" #include "vast/concept/parseable/core/list.h" #include "vast/concept/parseable/core/operators.h" #include "vast/concept/parseable/core/parser.h" #include "vast/conc...
--- +++ @@ -17,6 +17,11 @@ template <typename Iterator, typename Attribute> bool parse(Iterator& f, Iterator const& l, Attribute& a) const { + // FIXME: we currently cannot parse character sequences into containers, + // e.g., (alpha | '_') >> +(alnum ...). Until we have enhanced the + // framework, ...
Work around missing parsing functionality
bsd-3-clause
mavam/vast,pmos69/vast,vast-io/vast,vast-io/vast,vast-io/vast,vast-io/vast,pmos69/vast,pmos69/vast,mavam/vast,vast-io/vast,mavam/vast,mavam/vast,pmos69/vast
85da0a68e77dd32bd2f55d33e0d93d63b8805c8e
#include <stdlib.h> #include <stdio.h> #include <glib.h> enum markdown_extensions { EXT_SMART = 0x01, EXT_NOTES = 0x02, EXT_FILTER_HTML = 0x04, EXT_FILTER_STYLES = 0x08 }; enum markdown_formats { HTML_FORMAT, LATEX_FORMAT, GROFF_MM_FORMAT }; GString * markdow...
#include <stdlib.h> #include <stdio.h> #include <glib.h> enum markdown_extensions { EXT_SMART = 1, EXT_NOTES = 2, EXT_FILTER_HTML = 3, EXT_FILTER_STYLES = 4 }; enum markdown_formats { HTML_FORMAT, LATEX_FORMAT, GROFF_MM_FORMAT }; GString * markdown_to_g_strin...
--- +++ @@ -3,10 +3,10 @@ #include <glib.h> enum markdown_extensions { - EXT_SMART = 1, - EXT_NOTES = 2, - EXT_FILTER_HTML = 3, - EXT_FILTER_STYLES = 4 + EXT_SMART = 0x01, + EXT_NOTES = 0x02, + EXT_FILTER_HTML = 0x04, + EXT_FILTER_ST...
Fix extensions flags bit collision. Setting EXT_FILTER_HTML was the same as setting (EXT_SMART | EXT_NOTES); setting EXT_FILTER_STYLES would also set EXT_NOTES. The switch to hex notation is purely to hint that the values are meant to be used as bit flags directly.
mit
sftrabbit/MarkdownParse,sftrabbit/MarkdownParse,sftrabbit/MarkdownParse
2abc9a8a44d9920d20c30eb639596a8726580381
//#define _GNU_SOURCE #include <dlfcn.h> #include <stdio.h> #include <string.h> void *dlopen(const char *filename, int flag) { static void* (*dlopenImpl)(const char *filename, int flag) = 0; if(!dlopenImpl) { dlopenImpl = dlsym(RTLD_NEXT, "dlopen"); } if(strcmp(filename, "2//libcoreclrtrac...
#include <dlfcn.h> int main(int argc, char* argv[]) { dlopen("1//libcoreclr.so", RTLD_NOW | RTLD_GLOBAL); dlopen("2//libcoreclrtraceptprovider.so", RTLD_LAZY); dlopen("2//libcoreclr.so", RTLD_NOW | RTLD_GLOBAL); return 0; }
--- +++ @@ -1,9 +1,29 @@ +//#define _GNU_SOURCE #include <dlfcn.h> +#include <stdio.h> +#include <string.h> + +void *dlopen(const char *filename, int flag) +{ + static void* (*dlopenImpl)(const char *filename, int flag) = 0; + if(!dlopenImpl) + { + dlopenImpl = dlsym(RTLD_NEXT, "dlopen"); + } + + ...
Update implementation to hook calls to dlopen.
mit
brianrob/coretests,brianrob/coretests
12521bf43e5415935befb6fc02f3bf8564252ddf
/* * * Copyright 2018 Asylo 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 agree...
/* * * Copyright 2018 Asylo 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 agree...
--- +++ @@ -21,6 +21,8 @@ #ifndef ASYLO_PLATFORM_POSIX_INCLUDE_SYS_WAIT_H_ #define ASYLO_PLATFORM_POSIX_INCLUDE_SYS_WAIT_H_ +#include <sys/resource.h> + #ifdef __cplusplus extern "C" { #endif
Include sys/resource.h for struct rusage Used in wait3 signature. PiperOrigin-RevId: 269667008 Change-Id: Ie6e3a9b334861c78722bbae806352216d57ac437
apache-2.0
google/asylo,google/asylo,google/asylo,google/asylo,google/asylo,google/asylo
637ba7dd055c6185c4e428b9328299b3e96de833
// This uses a headermap with this entry: // someheader.h -> Product/someheader.h // RUN: %clang_cc1 -triple x86_64-apple-darwin13 -v -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H // RUN: %clang_cc1 -triple x86_64-apple...
// This uses a headermap with this entry: // someheader.h -> Product/someheader.h // RUN: %clang_cc1 -v -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H // RUN: %clang_cc1 -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/...
--- +++ @@ -1,8 +1,8 @@ // This uses a headermap with this entry: // someheader.h -> Product/someheader.h -// RUN: %clang_cc1 -v -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H -// RUN: %clang_cc1 -fsyntax-only %s -i...
[test] Add a triple to the test. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@205073 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/cl...
ac0afc8c605ab6039b1a5c25f2b7105f7e5456f5
#include "string.h" #include "stdio.h" #include "stdlib.h" #define DATA_FILE_NAME "nqmq.dat" #define DATA_LINE_MAX_LEN 80 char **cities; char *distances; int main(int argc, char *argv[]) { // Step 1: Read file into cities array and distances adjacency matrix char line[DATA_LINE_MAX_LEN]; FILE *data_file; int ...
#include "string.h" #include "stdio.h" #include "stdlib.h" #define DATA_FILE_NAME "nqmq.dat" #define DATA_LINE_MAX_LEN 80 char **cities; char *distances; int main(int argc, char *argv[]) { // Step 1: Read file into cities array and distances adjacency matrix char line[DATA_LINE_MAX_LEN]; FILE *data_file; dat...
--- +++ @@ -13,12 +13,12 @@ // Step 1: Read file into cities array and distances adjacency matrix char line[DATA_LINE_MAX_LEN]; FILE *data_file; + int num_cities = 0; data_file = fopen(DATA_FILE_NAME, "r"); // The first line will be the number of cities - fgets(line, DATA_LINE_MAX_LEN, data_file); - in...
Use fscanf to get the number of cities
mit
EvanPurkhiser/CS-NotQuiteMapquest
4055a7c2fceb6eb2b2e8014b96e70ac6bdc2310c
#pragma once #include <libevm/VMFace.h> #include <evmjit/libevmjit/ExecutionEngine.h> namespace dev { namespace eth { class JitVM: public VMFace { public: virtual bytesConstRef execImpl(u256& io_gas, ExtVMFace& _ext, OnOpFunc const& _onOp, uint64_t _steps) override final; private: jit::RuntimeData m_data; jit::E...
#pragma once #include <libevm/VMFace.h> #include <evmjit/libevmjit/ExecutionEngine.h> namespace dev { namespace eth { class JitVM: public VMFace { public: virtual bytesConstRef execImpl(u256& io_gas, ExtVMFace& _ext, OnOpFunc const& _onOp = {}, uint64_t _steps = (uint64_t)-1) override final; private: jit::Runtime...
--- +++ @@ -11,7 +11,7 @@ class JitVM: public VMFace { public: - virtual bytesConstRef execImpl(u256& io_gas, ExtVMFace& _ext, OnOpFunc const& _onOp = {}, uint64_t _steps = (uint64_t)-1) override final; + virtual bytesConstRef execImpl(u256& io_gas, ExtVMFace& _ext, OnOpFunc const& _onOp, uint64_t _steps) override...
Change the way execution results are collected. Changes handling ExecutionResult by Executive. From now execution results are collected on if a storage for results (ExecutionResult) is provided to an Executiove instance up front. This change allow better output management for calls - VM interface improved.
mit
ethereum/evmjit,ethereum/evmjit,ethereum/evmjit
f72844ae685bc5516a818402115b0df8b3efd016
/** * @file * * @brief Private declarations. * * @copyright BSD License (see doc/LICENSE.md or http://www.libelektra.org) */ #ifndef ELEKTRAPRIVATE_H #define ELEKTRAPRIVATE_H #include "kdb.h" struct _ElektraError { int errorNr; const char * msg; }; struct _Elektra { KDB * kdb; KeySet * config;...
/** * @file * * @brief Private declarations. * * @copyright BSD License (see doc/LICENSE.md or http://www.libelektra.org) */ #ifndef ELEKTRAPRIVATE_H #define ELEKTRAPRIVATE_H #include "kdb.h" struct _ElektraError { int errorNr; const char * msg; }; struct _Elektra { KDB * kdb; KeySet * config;...
--- +++ @@ -22,8 +22,6 @@ KDB * kdb; KeySet * config; Key * parentKey; - - struct _ElektraError * error; }; #endif //ELEKTRAPRIVATE_H
Remove error from Elektra struct
bsd-3-clause
mpranj/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,petermax2/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,mpranj/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,BernhardD...
140311ab999dda019075b9f86661ebd51e0a144f
#include <fcntl.h> #include <unistd.h> typedef void (*fnct_ptr)(void); typedef int (*open_t)(const char*,int,...); typedef int (*ftruncate_t)(int,off_t); // Goblint used to crash on this example because the number of supplied arguments for myopen is bigger than // than the expected number of arguments for the library...
#include <fcntl.h> #include <unistd.h> typedef void (*fnct_ptr)(void); typedef int (*open_t)(const char*,int,int); typedef int (*ftruncate_t)(int,off_t); // Goblint used to crash on this example because the number of supplied arguments for myopen is bigger than // than the expected number of arguments for the library...
--- +++ @@ -2,7 +2,7 @@ #include <unistd.h> typedef void (*fnct_ptr)(void); -typedef int (*open_t)(const char*,int,int); +typedef int (*open_t)(const char*,int,...); typedef int (*ftruncate_t)(int,off_t); // Goblint used to crash on this example because the number of supplied arguments for myopen is bigger th...
Add WARN annotations and explanations to test, expand it with one case.
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
778fbd48981675b0a10383efe169e397153e81d6
/* * Copyright (c) 2012 Israel Jacquez * See LICENSE for details. * * Israel Jacquez <mrkotfw@gmail.com> */ #ifndef _SLOB_H_ #define _SLOB_H_ #include <stddef.h> /*- * Restrictions * * 1. Heap size limit: Allocation requests bigger than * SLOB_PAGE_BREAK_2ND cannot be serviced. This is due to the * ...
/* * Copyright (c) 2012 Israel Jacquez * See LICENSE for details. * * Israel Jacquez <mrkotfw@gmail.com> */ #ifndef _SLOB_H_ #define _SLOB_H_ #include <stddef.h> /*- * Restrictions * * 1. Allocation requests bigger than SLOB_PAGE_BREAK_2ND cannot be * serviced. This is due to the memory block manager...
--- +++ @@ -13,10 +13,10 @@ /*- * Restrictions * - * 1. Allocation requests bigger than SLOB_PAGE_BREAK_2ND cannot be - * serviced. This is due to the memory block manager not able to - * guarantee that sequential allocations of SLOB pages will be - * contiguous. + * 1. Heap size limit: Alloca...
Change hard limit on heap
mit
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
4a882fe26dab76ae7b0c89459a5808cfef99055a
#ifndef __ctest__ #define __ctest__ extern void ct_init(const char * module_name); extern void ct_report(const char * test_name, int success); extern void ct_print_stats(void); extern void ct_terminate(void); extern void ct_print_stats_and_terminate(void); #endif
#ifndef __testing__ #define __testing__ extern void ct_init(const char * module_name); extern void ct_report(const char * test_name, int success); extern void ct_terminate(void); #endif
--- +++ @@ -1,10 +1,14 @@ -#ifndef __testing__ -#define __testing__ +#ifndef __ctest__ +#define __ctest__ extern void ct_init(const char * module_name); extern void ct_report(const char * test_name, int success); +extern void ct_print_stats(void); + extern void ct_terminate(void); +extern void ct_print_sta...
Split statistics printing from memory cleanup Created ct_print_stats that outputs stats without freeing memory, and ct_print_stats_and_terminate which does both, along with ct_terminate which only frees memory.
unlicense
Mikko-Finell/ctest
e2e0d27071f3314068b5adf990d54dd978ce966b
#include <caml/mlvalues.h> #include <caml/memory.h> #include <caml/custom.h> #include <caml/callback.h> #include <caml/alloc.h> #include <stdio.h> #ifdef WIN32 #define WIN32_LEAN_AND_MEAN #include <winsock2.h> #include <ws2tcpip.h> #else #include <sys/socket.h> #endif CAMLprim value stub_get_SOMAXCONN(value unit){ ...
#include <caml/mlvalues.h> #include <caml/memory.h> #include <caml/custom.h> #include <caml/callback.h> #include <caml/alloc.h> #include <stdio.h> #ifdef WIN32 #define WIN32_LEAN_AND_MEAN #include <winsock2.h> #include <ws2tcpip.h> #else #include <sys/socket.h> #endif CAMLprim value stub_get_SOMAXCONN(){ fprintf(s...
--- +++ @@ -14,7 +14,7 @@ #include <sys/socket.h> #endif -CAMLprim value stub_get_SOMAXCONN(){ +CAMLprim value stub_get_SOMAXCONN(value unit){ fprintf(stderr, "SOMAXCONN = %d\n", SOMAXCONN); return (Val_int (SOMAXCONN)); }
Add `value` parameter to SOMAXCONN binding Problem spotted by yallop in https://github.com/moby/vpnkit/commit/8d718125a66fbe746ba17ad3e85b7924ac0ed9a4#commitcomment-21930309 Signed-off-by: David Scott <63c9eb0ea83039690fefa11afe17873ba8278a56@docker.com>
apache-2.0
djs55/vpnkit,djs55/vpnkit,djs55/vpnkit
bef527848955070cab42bcc1f42799656e8da0a6
#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; QS...
#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; QS...
--- +++ @@ -27,7 +27,7 @@ QString extraParams; QMap<QString, QString> sensorMap; -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(Q_OS_NETBSD) QMap<QString, QString> sensorMapBSD; #endif QString sensorResult;
Fix knode superkaramba compilation on NetBSD. Patch by Mark Davies. BUG: 154730 svn path=/trunk/KDE/kdeutils/superkaramba/; revision=753733
lgpl-2.1
KDE/superkaramba,KDE/superkaramba,KDE/superkaramba
0b062eb9d2908410674c2751bbcee5b9df464732
/* * User address space access functions. * * For licencing details see kernel-base/COPYING */ #include <linux/highmem.h> #include <linux/module.h> #include <asm/word-at-a-time.h> #include <linux/sched.h> /* * best effort, GUP based copy_from_user() that is NMI-safe */ unsigned long copy_from_user_nmi(void *t...
/* * User address space access functions. * * For licencing details see kernel-base/COPYING */ #include <linux/highmem.h> #include <linux/module.h> #include <asm/word-at-a-time.h> #include <linux/sched.h> /* * best effort, GUP based copy_from_user() that is NMI-safe */ unsigned long copy_from_user_nmi(void *t...
--- +++ @@ -22,7 +22,7 @@ void *map; int ret; - if (__range_not_ok(from, n, TASK_SIZE) == 0) + if (__range_not_ok(from, n, TASK_SIZE)) return len; do {
perf/x86: Fix broken LBR fixup code I noticed that the LBR fixups were not working anymore on programs where they used to. I tracked this down to a recent change to copy_from_user_nmi(): db0dc75d640 ("perf/x86: Check user address explicitly in copy_from_user_nmi()") This commit added a call to __range_not_ok() to t...
apache-2.0
TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Program...
25f42985825dd93f0593efe454e54c2aa13f7830
#ifndef __GRAPHICS_TB_H__ #define __GRAPHICS_TB_H__ #include <termbox.h> #include "models.h" #include "graphics.h" typedef struct {} graphics_tb_t; // graphics_tb initializes the graphic module. graphics_tb_t *graphics_tb_init(); // graphics_tb_draw draws the given state on the screen. // // We do not use `graph...
#ifndef __GRAPHICS_TB_H__ #define __GRAPHICS_TB_H__ #include <termbox.h> #include "models.h" #include "graphics.h" typedef struct {} graphics_tb_t; // graphics_tb initialize the graphic module. graphics_tb_t *graphics_tb_init(); // graphics_tb_draw draws the given state on the screen. void graphics_tb_draw(void ...
--- +++ @@ -8,13 +8,17 @@ typedef struct {} graphics_tb_t; -// graphics_tb initialize the graphic module. +// graphics_tb initializes the graphic module. graphics_tb_t *graphics_tb_init(); // graphics_tb_draw draws the given state on the screen. +// +// We do not use `graphics_tb_t *tg` but `void *context`...
Add an explanation for graphics_*_draw prototype
mit
moverest/bagh-chal,moverest/bagh-chal,moverest/bagh-chal
79ecdd107f7531d36f69d6e7089b4a685a370312
// stdio for file I/O #include <stdio.h> #define HISTORY_SIZE 5 void print_values(float *values, int current_i) { // Print values to stdout, starting from one after newest (oldest) and // circle around to newest int i = current_i; for(i = current_i; i < current_i + HISTORY_SIZE; i++) { fprintf(stdout, "%....
// stdio for file I/O #include <stdio.h> int main(int argc, char *argv[]) { int status = 1; float value; while(status != EOF) { status = fscanf(stdin, "%f\n", &value); if(status == 1) fprintf(stdout, "%f\n", value); else fprintf(stdout, "Error reading data (%d)\n", status); } }
--- +++ @@ -1,15 +1,34 @@ // stdio for file I/O #include <stdio.h> +#define HISTORY_SIZE 5 + +void print_values(float *values, int current_i) { + // Print values to stdout, starting from one after newest (oldest) and + // circle around to newest + int i = current_i; + for(i = current_i; i < current_i + HISTOR...
Save value history as circular array, print function for debug
bsd-3-clause
seenaburns/stag
27cf500cbbf4672c98f4d31442bfba689cd0d508
#include "siphash.h" #include <stdio.h> int main(void) { uint8_t key[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; uint64_t k0 = *(uint64_t*)(key + 0); uint64_t k1 = *(uint64_t*)(key + 8); uint8_t msg[] = {0x00, 0x01, 0x02, ...
#include "siphash.h" #include <stdio.h> int main(void) { uint64_t k0 = 0x0706050403020100ull; uint64_t k1 = 0x0f0e0d0c0b0a0908ull; uint8_t msg[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e}; ...
--- +++ @@ -4,8 +4,11 @@ int main(void) { - uint64_t k0 = 0x0706050403020100ull; - uint64_t k1 = 0x0f0e0d0c0b0a0908ull; + uint8_t key[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; + + uint64_t k0 = *(uint64_t*)(key + 0); + ...
Fix test key initialization to be endian-neutral Signed-off-by: Gregory Petrosyan <60f6837da39a129899062fdb5e652b06dce7deb5@gmail.com>
mit
flyingmutant/siphash
651603c57e8818a492b59cbaa49f8fc5a27d1566
/** * assert.c * * Copyright (C) 2017 Nickolas Burr <nickolasburr@gmail.com> */ #include "assert.h" const Except_T Assert_Failed = { "Assertion failed" }; void (assert)(int e) { assert(e); }
static char rcsid[] = "$Id: H:/drh/idioms/book/RCS/except.doc,v 1.10 1997/02/21 19:43:55 drh Exp $"; #include "assert.h" const Except_T Assert_Failed = { "Assertion failed" }; void (assert)(int e) { assert(e); }
--- +++ @@ -1,6 +1,14 @@ -static char rcsid[] = "$Id: H:/drh/idioms/book/RCS/except.doc,v 1.10 1997/02/21 19:43:55 drh Exp $"; +/** + * assert.c + * + * Copyright (C) 2017 Nickolas Burr <nickolasburr@gmail.com> + */ #include "assert.h" -const Except_T Assert_Failed = { "Assertion failed" }; + +const Except_T Assert_...
Update formatting, remove CII vars
mit
nickolasburr/git-stashd,nickolasburr/git-stashd,nickolasburr/git-stashd
2d18ac2cf8aa2503545d0bd4d3ff883c407ccd99
/* * Copyright (c) 2016, Texas Instruments Incorporated * * 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 appl...
/* * Copyright (c) 2016, Texas Instruments Incorporated * * 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 appl...
--- +++ @@ -16,4 +16,20 @@ #ifndef __INC_BOARD_H #define __INC_BOARD_H +/* Push button switch 2 */ +#define SW2_GPIO_PIN 6 /* GPIO22/Pin15 */ +#define SW2_GPIO_NAME "GPIO_A2" + +/* Push button switch 3 */ +#define SW3_GPIO_PIN 5 /* GPIO13/Pin4 */ +#define SW3_GPIO_NAME "GPIO_A1" + +/* Push button switch 0: ...
cc3200: Add generic definitions for LEDs and switches Adds generic definitions for GPIO pins for onboard LEDs and switches to enable the basic blinky, button, and disco Zephyr examples for the TI CC3200 LaunchXL. Change-Id: Iac0ed2ad01285f9e84eea1fa7013771ddd8d3a78 Signed-off-by: Gil Pitney <477da50908f0a7963c2c490cc...
apache-2.0
zephyrproject-rtos/zephyr,GiulianoFranchetto/zephyr,fractalclone/zephyr-riscv,Vudentz/zephyr,explora26/zephyr,punitvara/zephyr,bboozzoo/zephyr,aceofall/zephyr-iotos,Vudentz/zephyr,runchip/zephyr-cc3200,Vudentz/zephyr,GiulianoFranchetto/zephyr,mbolivar/zephyr,explora26/zephyr,sharronliu/zephyr,sharronliu/zephyr,rsalveti...
22172bb584a97412e01d77f6cb3eb183aab06d56
extern void print_int(int x); extern void print_string(char c[]); int x; char c; void main(void){ /* check signed-ness of char -> int conversion */ x = -1; c = x; print_string("should get -1\ngot: "); print_int(c); print_string("\n\n"); x = -2147483647; print_string("should get -2147...
extern void print_int(int x); extern void print_string(char c[]); int x; char c; void main(void){ // check signed-ness of char -> int conversion x = -1; c = x; print_string("should get -1\ngot: "); print_int(c); print_string("\n\n"); x = -2147483647; print_string("should get -2147483...
--- +++ @@ -6,7 +6,7 @@ void main(void){ - // check signed-ness of char -> int conversion + /* check signed-ness of char -> int conversion */ x = -1; c = x; print_string("should get -1\ngot: "); @@ -18,7 +18,7 @@ print_int(x); print_string("\n\n"); - // check signed-ness of ch...
Edit comments so they align with our C-- spec
unlicense
mgaut72/cmm-examples,mgaut72/cmm-examples
ed02ba882c16165e6d7241e4b59cb9bacd653a4e
#include <stdio.h> #include <stdlib.h> #include "turing.h" #define MAX_PROGRAM_LENGTH 32 #define turing_try(statement) status = statement;\ if (TURING_ERROR == status) {\ return 1;\ } int main()...
#include <stdio.h> #include <stdlib.h> #include "turing.h" #define MAX_PROGRAM_LENGTH 32 int main() { int status; Turing *turing; status = 0; turing = init_turing(); status = execute_instruction(turing, "0 110\n1 110"); if (TURING_ERROR == status) { fprintf(stderr, "Exiting\n"); ...
--- +++ @@ -4,6 +4,12 @@ #include "turing.h" #define MAX_PROGRAM_LENGTH 32 + +#define turing_try(statement) status = statement;\ + if (TURING_ERROR == status) {\ + return 1;\ + } + int main() {...
Add turing_try function for handling errors
mit
mindriot101/turing-machine
28e721fd5907dd7807f35bccc48b177afdc2b2f9
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // Radar 8026855 int test (void *src) { register int w0 asm ("0"); // CHECK: call i32 asm "ldr $0, [$1]", "={ax},r,~{dirflag},~{fpsr},~{flags}"(i8* asm ("ldr %0, [%1]": "=r" (w0): "r" (src)); return w0; }
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // Radar 8026855 int test (void *src) { register int w0 asm ("0"); // CHECK: call i32 asm "ldr $0, [$1]", "={ax},r,~{dirflag},~{fpsr},~{flags}"(i8* %tmp) asm ("ldr %0, [%1]": "=r" (w0): "r" (src)); return w0; }
--- +++ @@ -3,7 +3,7 @@ int test (void *src) { register int w0 asm ("0"); - // CHECK: call i32 asm "ldr $0, [$1]", "={ax},r,~{dirflag},~{fpsr},~{flags}"(i8* %tmp) + // CHECK: call i32 asm "ldr $0, [$1]", "={ax},r,~{dirflag},~{fpsr},~{flags}"(i8* asm ("ldr %0, [%1]": "=r" (w0): "r" (src)); return w0; }
Rewrite match line to be friendlier to misc buildbots. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@136169 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl...
0c14190ae46a470fe929a764e1ac8ada2236b330
#include "pebble_os.h" #include "pebble_app.h" #include "pebble_fonts.h" #define MY_UUID { 0xE3, 0x7B, 0xFC, 0xE9, 0x30, 0xD7, 0x4B, 0xC3, 0x96, 0x93, 0x15, 0x0C, 0x35, 0xDC, 0xB8, 0x58 } PBL_APP_INFO(MY_UUID, "Puddle", "Jon Speicher", 0, 1, /* App version */ DEFAULT_MENU_ICON, ...
#include "pebble_os.h" #include "pebble_app.h" #include "pebble_fonts.h" #define MY_UUID { 0xE3, 0x7B, 0xFC, 0xE9, 0x30, 0xD7, 0x4B, 0xC3, 0x96, 0x93, 0x15, 0x0C, 0x35, 0xDC, 0xB8, 0x58 } PBL_APP_INFO(MY_UUID, "Template App", "Your Company", 1, 0, /* App version */ DEFAULT_MENU_...
--- +++ @@ -5,8 +5,8 @@ #define MY_UUID { 0xE3, 0x7B, 0xFC, 0xE9, 0x30, 0xD7, 0x4B, 0xC3, 0x96, 0x93, 0x15, 0x0C, 0x35, 0xDC, 0xB8, 0x58 } PBL_APP_INFO(MY_UUID, - "Template App", "Your Company", - 1, 0, /* App version */ + "Puddle", "Jon Speicher", + 0, 1, /* App ve...
Change framework app name, comopany, version, and window debug
mit
jonspeicher/Puddle,jonspeicher/Puddle,jonspeicher/Puddle
e8740f26827c1aed33005aac3862e6e7840ee72d
#include "power.h" void initializePower() { } void updatePower() { } void enterLowPowerMode() { }
#include "power.h" #define SLEEP_MODE_ENABLE_BIT 4 void initializePower() { } void updatePower() { } void enterLowPowerMode() { // When WAIT instruction is executed, go into SLEEP mode OSCCONSET = (1 << SLEEP_MODE_ENABLE_BIT); asm("wait"); // TODO if we wake up, do we resume with the PC right here? ...
--- +++ @@ -1,6 +1,4 @@ #include "power.h" - -#define SLEEP_MODE_ENABLE_BIT 4 void initializePower() { } @@ -9,11 +7,4 @@ } void enterLowPowerMode() { - // When WAIT instruction is executed, go into SLEEP mode - OSCCONSET = (1 << SLEEP_MODE_ENABLE_BIT); - asm("wait"); - // TODO if we wake up, do ...
Remove "in progress" sleep mode code for PIC32 for now.
bsd-3-clause
openxc/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware,mgiannikouris/vi-firmware,mgiannikouris/vi-firmware,mgiannikouris/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,openxc/vi-firmware,mgiannikouris/vi-firmware,ene-ilies/vi-firmware
6bcbbabb47dd982641859a3b98905f5bda671ded
/* resource.h KNode, the KDE newsreader Copyright (c) 1999-2005 the KNode authors. See file AUTHORS for details This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either ver...
/* resource.h KNode, the KDE newsreader Copyright (c) 1999-2005 the KNode authors. See file AUTHORS for details This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either ver...
--- +++ @@ -24,7 +24,7 @@ //========= KNode Version Information ============ -#define KNODE_VERSION "0.9.50" +#define KNODE_VERSION "0.9.90" //================= StatusBar ====================
Increment version number for the upcoming alpha release. svn path=/branches/KDE/3.5/kdepim/; revision=442706
lgpl-2.1
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
cd58e2e8514d2f8abd4abbeb2003722adc10c883
#include "syshead.h" #include "tcp_socket.h" #define MAX_TCP_SOCKETS 128 static int cur_fd = 3; static struct tcp_socket tcp_sockets[MAX_TCP_SOCKETS]; void init_tcp_sockets() { memset(tcp_sockets, 0, sizeof(struct tcp_socket) * MAX_TCP_SOCKETS); } struct tcp_socket *alloc_tcp_socket() { struct tcp_socket *so...
#include "syshead.h" #include "tcp_socket.h" #define MAX_TCP_SOCKETS 128 static int cur_fd = 3; static struct tcp_socket tcp_sockets[MAX_TCP_SOCKETS]; void init_tcp_sockets() { memset(tcp_sockets, 0, sizeof(struct tcp_socket) * MAX_TCP_SOCKETS); } struct tcp_socket *alloc_tcp_socket() { struct tcp_socket *so...
--- +++ @@ -33,11 +33,11 @@ struct tcp_socket *get_tcp_socket(int sockfd) { - struct tcp_socket sk; + struct tcp_socket *sk; for (int i = 0; i<MAX_TCP_SOCKETS; i++) { - sk = tcp_sockets[i]; + sk = &tcp_sockets[i]; - if (sk.fd == sockfd) return &sk; + if (sk->fd == sockfd) ...
Fix ugly pointer return bug
mit
saminiir/level-ip,saminiir/level-ip
35c85704a3e61eaf6e5c55dcf3cd66b09088d09b
#ifndef LOG2_H #define LOG2_H template <typename T> #ifdef __GNUC__ __attribute__((const)) #endif static inline bool IsPowerOfTwo(T x) { return (x & (x - 1)) == 0; } template<typename T> #ifdef __GNUC__ __attribute__((const)) #endif static inline unsigned ilog2(T n) { // returns the first power of two equal t...
#ifndef LOG2_H #define LOG2_H template <typename T> #ifdef __GNUC__ __attribute__((const)) #endif static bool IsPowerOfTwo(const T& x) { return (x & (x - 1)) == 0; } template<typename T> #ifdef __GNUC__ __attribute__((const)) #endif static inline unsigned ilog2(T n) { // returns the first power of two equal t...
--- +++ @@ -5,7 +5,7 @@ #ifdef __GNUC__ __attribute__((const)) #endif -static bool IsPowerOfTwo(const T& x) +static inline bool IsPowerOfTwo(T x) { return (x & (x - 1)) == 0; }
Work around an optimization bug in IsPowerOfTwo.
mit
Bitblade-org/mgsim,Bitblade-org/mgsim,Bitblade-org/mgsim,Bitblade-org/mgsim
05b970c5ed2b69076f340aa96724237883cff995
#ifndef __SIM_H_ #define __SIM_H_ 1 #define GEO_FLUID 0 #define GEO_WALL 1 #define GEO_INFLOW 2 #define LAT_H 180 #define LAT_W 420 #define BLOCK_SIZE 64 #ifdef USE_FLOATS #define double float #define __dadd_rn __fadd_rn #define __dmul_rn __fmul_rn #else #define float double #define __fadd_rn __dadd_rn #define __fmu...
#ifndef __SIM_H_ #define __SIM_H_ 1 #define GEO_FLUID 0 #define GEO_WALL 1 #define GEO_INFLOW 2 #define LAT_H 180 #define LAT_W 420 #define BLOCK_SIZE 64 struct Dist { float *fC, *fE, *fW, *fS, *fN, *fSE, *fSW, *fNE, *fNW; }; struct SimState { int *map, *dmap; // macroscopic quantities on the video card float ...
--- +++ @@ -8,6 +8,16 @@ #define LAT_H 180 #define LAT_W 420 #define BLOCK_SIZE 64 + +#ifdef USE_FLOATS +#define double float +#define __dadd_rn __fadd_rn +#define __dmul_rn __fmul_rn +#else +#define float double +#define __fadd_rn __dadd_rn +#define __fmul_rn __dmul_rn +#endif struct Dist { float *fC, *fE, *...
Use doubles instead of floats ny default
mit
Dwii/Master-Thesis,Dwii/Master-Thesis,Dwii/Master-Thesis,Dwii/Master-Thesis,Dwii/Master-Thesis,Dwii/Master-Thesis,Dwii/Master-Thesis
ac39ed3a80fd71af70de0222a9dd1545f4d59dea
/* Copyright (c) 2013 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. */ /* Persistence module for emulator */ #include <unistd.h> #include <stdio.h> #include <string.h> #define BUF_SIZE 1024 static void get_stora...
/* Copyright (c) 2013 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. */ /* Persistence module for emulator */ #include <unistd.h> #include <stdio.h> #include <string.h> #define BUF_SIZE 1024 static void get_stora...
--- +++ @@ -14,8 +14,10 @@ static void get_storage_path(char *out) { char buf[BUF_SIZE]; + int sz; - readlink("/proc/self/exe", buf, BUF_SIZE); + sz = readlink("/proc/self/exe", buf, BUF_SIZE); + buf[sz] = '\0'; if (snprintf(out, BUF_SIZE, "%s_persist", buf) >= BUF_SIZE) out[BUF_SIZE - 1] = '\0'; }
Fix a bug in emulator persistent storage The path string is not terminated properly, causing occasional crashes. BUG=chrome-os-partner:19235 TEST=Dump the path and check it's correct. BRANCH=None Change-Id: I9ccbd565ce68ffdad98f2dd90ecf19edf9805ec0 Signed-off-by: Vic Yang <5fd92abeee651458f98e2856f4f200ee971cee4d@ch...
bsd-3-clause
longsleep/ec,md5555/ec,longsleep/ec,mtk09422/chromiumos-platform-ec,coreboot/chrome-ec,coreboot/chrome-ec,akappy7/ChromeOS_EC_LED_Diagnostics,eatbyte/chromium-ec,alterapraxisptyltd/chromium-ec,fourier49/BZ_DEV_EC,coreboot/chrome-ec,fourier49/BZ_DEV_EC,fourier49/BZ_DEV_EC,coreboot/chrome-ec,alterapraxisptyltd/chromium-e...
a46d5e7f3700e126c6bc5c31f93a8f297e11074f
/* This file should provide inline versions of string functions. Surround GCC-specific parts with #ifdef __GNUC__, and use `__extern_inline'. This file should define __STRING_INLINES if functions are actually defined as inlines. */ #ifndef _BITS_STRING_H #define _BITS_STRING_H 1 #define _STRING_ARCH_unali...
/* This file should provide inline versions of string functions. Surround GCC-specific parts with #ifdef __GNUC__, and use `__extern_inline'. This file should define __STRING_INLINES if functions are actually defined as inlines. */ #ifndef _BITS_STRING_H #define _BITS_STRING_H 1 #define _STRING_ARCH_unali...
--- +++ @@ -12,7 +12,7 @@ #if defined(__GNUC__) && !defined(__cplusplus) -static inline unsigned long __libc_detect_null(unsigned long w) +static __inline__ unsigned long __libc_detect_null(unsigned long w) { unsigned long mask = 0x7f7f7f7f; if (sizeof(long) == 8)
Change a "inline" to "__inline__" So "inline" isn't complient C, which means strict packages won't build with it. This uses "__inline__" instead, which is ANSI C. This patch is required to get freetype to build.
lgpl-2.1
manuelafm/riscv-gnu-toolchain,manuelafm/riscv-gnu-toolchain,manuelafm/riscv-gnu-toolchain
28b425c367f9efa9ed03c339788c936f4f5dc399