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
/* Copyright (c) 2017 Rolf Timmermans */ #pragma once #include <napi.h> #include <zmq.h> #if ZMQ_VERSION < ZMQ_MAKE_VERSION(4,1,0) # include <zmq_utils.h> #endif #include <node.h> #include <cassert> #include "inline/arguments.h" #include "inline/error.h" #include "inline/util.h" #ifdef __MSVC__ #define force_inl...
/* Copyright (c) 2017 Rolf Timmermans */ #pragma once #include <napi.h> #include <zmq.h> #include <node.h> #include <cassert> #include <iostream> #include "inline/arguments.h" #include "inline/error.h" #include "inline/util.h" #ifdef __MSVC__ #define force_inline inline __forceinline #else #define force_inline inlin...
--- +++ @@ -2,10 +2,14 @@ #pragma once #include <napi.h> + #include <zmq.h> +#if ZMQ_VERSION < ZMQ_MAKE_VERSION(4,1,0) +# include <zmq_utils.h> +#endif + #include <node.h> #include <cassert> -#include <iostream> #include "inline/arguments.h" #include "inline/error.h"
Include zmq utils if necessary.
mit
rolftimmermans/zeromq-ng,rolftimmermans/zeromq-ng
a9c85baedcdb73a4f72ec1dd7dc05a8a93ea56d9
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "dense_tensor.h" namespace vespalib::tensor { /** * Class for building a dense tensor by inserting cell values directly into underlying array of cells. */ class DirectDenseT...
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "dense_tensor.h" namespace vespalib::tensor { /** * Class for building a dense tensor by inserting cell values directly into underlying array of cells. */ class DirectDenseT...
--- +++ @@ -31,7 +31,10 @@ DirectDenseTensorBuilder(const eval::ValueType &type_in); ~DirectDenseTensorBuilder(); void insertCell(const Address &address, double cellValue) { - _cells[calculateCellAddress(address, _type)] = cellValue; + insertCell(calculateCellAddress(address, _type), cell...
Allow for building index on the outside.
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
fca387c79a274d3da8d5abb97ee9b1765188abaa
/* trace.h * Copyright: (When this is determined...it will go here) * CVS Info * $Id$ * Overview: * Tracing support for runops_cores.c. * Data Structure and Algorithms: * History: * Notes: * References: */ #ifndef PARROT_TRACE_H_GUARD #define PARROT_TRACE_H_GUARD #include "parrot/parrot.h" v...
/* trace.h * Copyright: (When this is determined...it will go here) * CVS Info * $Id$ * Overview: * Tracing support for runops_cores.c. * Data Structure and Algorithms: * History: * Notes: * References: */ #ifndef PARROT_TRACE_H_GUARD #define PARROT_TRACE_H_GUARD #include "parrot/parrot.h" v...
--- +++ @@ -25,7 +25,7 @@ opcode_t *pc); void trace_op_b1(struct Parrot_Interp *interpreter, opcode_t *code_start, - opcode_t *code_end, code_t *pc); + opcode_t *code_end, opcode_t *pc); #endif
Fix a typo in the argument type. Patch from <daniel.ritz@gmx.ch> git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@1106 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
artistic-2.0
gagern/parrot,FROGGS/parrot,parrot/parrot,youprofit/parrot,parrot/parrot,tkob/parrot,FROGGS/parrot,fernandobrito/parrot,FROGGS/parrot,tkob/parrot,parrot/parrot,tkob/parrot,gagern/parrot,gitster/parrot,FROGGS/parrot,gitster/parrot,tkob/parrot,tewk/parrot-select,fernandobrito/parrot,gagern/parrot,fernandobrito/parrot,gag...
ef1a586474d7df11fda2a7c3064418e173c38055
// This is a queue that can be accessed from multiple threads safely. // // It's not well optimized, and requires obtaining a lock every time you check for a new value. #pragma once #include <condition_variable> #include <mutex> #include <optional> #include <queue> template <class T> class SynchronizedQueue { st...
// This is a queue that can be accessed from multiple threads safely. // // It's not well optimized, and requires obtaining a lock every time you check for a new value. #pragma once #include <condition_variable> #include <mutex> #include <optional> #include <queue> template <class T> class SynchronizedQueue { st...
--- +++ @@ -14,23 +14,31 @@ std::condition_variable cv_; std::mutex lock_; std::queue<T> q_; + std::atomic_uint64_t input_count{0}, output_count{0}; public: void push(T && t) { std::unique_lock l(lock_); q_.push(std::move(t)); + input_count++; cv_.notify_one...
Increase the efficiency of multithreading. This should slightly slightly increase frame rate.
mit
leecbaker/datareftool,leecbaker/datareftool,leecbaker/datareftool
4740d588a16d45add192ed3ea58627f06cba9b3f
#pragma once #include <string> #include <ostream> #include <iomanip> #include <iostream> struct Hex { Hex(char *buffer, size_t size) : m_buffer(buffer) , m_size(size) { } friend std::ostream& operator <<(std::ostream &os, const Hex &obj) { unsigned char* aschar = (unsigne...
#pragma once #include <string> #include <ostream> #include <iomanip> #include <iostream> struct Hex { Hex(char *buffer, size_t size) : m_buffer(buffer) , m_size(size) { } friend std::ostream& operator <<(std::ostream &os, const Hex &obj) { unsigned char* aschar = (unsigne...
--- +++ @@ -21,7 +21,7 @@ if (isprint(aschar[i])) { os << aschar[i]; } else { - os << std::hex << std::setw(2) << std::setfill('0') << static_cast<unsigned int> (aschar[i]); + os << "\\x" << std::hex << std::setw(2) << std::setfill('0') << stat...
Add "\x" for hex part.
mit
azat/hadoop-io-sequence-reader
a2e999b2cae9f2ff7dab4362c052a88b3d7440d3
/************************************************* * SHA1PRNG RNG Header File * * (C) 2007 FlexSecure GmbH / Manuel Hartl * * (C) 2008 Jack Lloyd * *************************************************/ #ifndef BOTAN_SHA1PRNG_H__ #define BOTAN_SHA1PRNG_H__ #include ...
/************************************************* * SHA1PRNG RNG Header File * * (C) 2007 FlexSecure GmbH / Manuel Hartl * * (C) 2008 Jack Lloyd * *************************************************/ #ifndef BOTAN_SHA1PRNG_H__ #define BOTAN_SHA1PRNG_H__ #include ...
--- +++ @@ -15,7 +15,7 @@ /************************************************* * SHA1PRNG * *************************************************/ -class SHA1PRNG : public RandomNumberGenerator +class BOTAN_DLL SHA1PRNG : public RandomNumberGenerator { public: void ra...
Add missing BOTAN_DLL decl to SHA1PRNG class declaration
bsd-2-clause
webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurit...
82a1df8942be8551ab365db20e35ca6a2b7e0d85
#ifndef ALI_DECAYER__H #define ALI_DECAYER__H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ #include "RVersion.h" #include "TVirtualMCDecayer.h" typedef TVirtualMCDecayer AliDecayer; #if ROOT_VERSIO...
#ifndef ALI_DECAYER__H #define ALI_DECAYER__H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ #include "RVersion.h" #include "TVirtualMCDecayer.h" typedef TVirtualMCDecayer AliDecayer; #if ROOT_VERSIO...
--- +++ @@ -18,7 +18,7 @@ kBPsiPrimeDiMuon, kBPsiPrimeDiElectron, kPiToMu, kKaToMu, kNoDecay, kHadronicD, kOmega, kPhiKK, kAll, kNoDecayHeavy, kHardMuons, kBJpsi, - kWToMuon,kWToCharm, kWToCharmToMuon + kWToMuon,kWToCharm, kWToCharmToMuon, kNewTest } Decay_t; #endif
Test case for B0 -> mu
bsd-3-clause
jgrosseo/AliRoot,alisw/AliRoot,sebaleh/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,coppedis/AliRoot,mkrzewic/AliRoot,coppedis/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,mkrzewic/AliRoot,shahor0...
58f00f52de054b44bec79497e33805f57d8bc8e5
#ifndef VAST_ACCESS_H #define VAST_ACCESS_H namespace vast { /// Wrapper to encapsulate the implementation of concepts requiring access to /// private state. struct access { template <typename, typename = void> struct state; template <typename, typename = void> struct parser; template <typename, typename ...
#ifndef VAST_ACCESS_H #define VAST_ACCESS_H namespace vast { /// Wrapper to encapsulate the implementation of concepts requiring access to /// private state. struct access { template <typename, typename = void> struct state; template <typename, typename = void> struct parsable; template <typename, typenam...
--- +++ @@ -11,14 +11,66 @@ struct state; template <typename, typename = void> - struct parsable; + struct parser; template <typename, typename = void> - struct printable; + struct printer; template <typename, typename = void> - struct convertible; + struct converter; }; + +namespace detail {...
Add traits for befriendable concepts.
bsd-3-clause
pmos69/vast,mavam/vast,pmos69/vast,mavam/vast,vast-io/vast,vast-io/vast,vast-io/vast,pmos69/vast,vast-io/vast,vast-io/vast,mavam/vast,mavam/vast,pmos69/vast
3c7b73f39d31cddf1c2126e1d3e25fd8c9708235
/* rtems-task-variable-add.c -- adding a task specific variable in RTEMS OS. Copyright 2010 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 <assert.h> #include <rtems/error.h> #include <rtems/system.h> #inclu...
/* rtems-task-variable-add.c -- adding a task specific variable in RTEMS OS. Copyright 2010 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 <rtems/error.h> #include <rtems/system.h> #include <rtems/rtems/tasks...
--- +++ @@ -3,6 +3,8 @@ Copyright 2010 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 <assert.h> #include <rtems/error.h> #include <rtems/system.h> @@ -16,6 +18,7 @@ if (sc != RTEMS_SUCCESSFUL) ...
Add assert on rtems_task_variable_add error. assert is used so that if rtems_task_variable_add fails, the error is fatal. R=iant CC=gofrontend-dev, joel.sherrill https://golang.org/cl/1684053
bsd-3-clause
qskycolor/gofrontend,golang/gofrontend,golang/gofrontend,anlhord/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,golang/gofrontend,anlhord/gofrontend,golan...
c5c547e1faeeb300fb7a7d4976f561bb01496cad
// // OCHamcrest - HCReturnTypeHandler.h // Copyright 2014 hamcrest.org. See LICENSE.txt // // Created by: Jon Reid, http://qualitycoding.org/ // Docs: http://hamcrest.github.com/OCHamcrest/ // Source: https://github.com/hamcrest/OCHamcrest // #import <Foundation/Foundation.h> /** Chain-of-responsibility for h...
// // OCHamcrest - HCReturnTypeHandler.h // Copyright 2014 hamcrest.org. See LICENSE.txt // // Created by: Jon Reid, http://qualitycoding.org/ // Docs: http://hamcrest.github.com/OCHamcrest/ // Source: https://github.com/hamcrest/OCHamcrest // #import <Foundation/Foundation.h> @interface HCReturnTypeHandler : N...
--- +++ @@ -10,6 +10,9 @@ #import <Foundation/Foundation.h> +/** + Chain-of-responsibility for handling NSInvocation return types. + */ @interface HCReturnTypeHandler : NSObject @property (nonatomic, strong) HCReturnTypeHandler *successor;
Add comment to explicitly identify Chain of Responsibility
bsd-2-clause
hamcrest/OCHamcrest,hamcrest/OCHamcrest,klundberg/OCHamcrest,klundberg/OCHamcrest,hamcrest/OCHamcrest
53ed2c4576f6e25c3c409d61c1f59b7221631554
#pragma once #include <string> #include <vector> struct usdt_probe_entry { std::string path; std::string provider; std::string name; int num_locations; }; typedef std::vector<usdt_probe_entry> usdt_probe_list; // Note this class is fully static because bcc_usdt_foreach takes a function // pointer callback w...
#pragma once #include <string> #include <vector> struct usdt_probe_entry { std::string path; std::string provider; std::string name; int num_locations; }; typedef std::vector<usdt_probe_entry> usdt_probe_list; class USDTHelper { public: static usdt_probe_entry find(int pid, ...
--- +++ @@ -13,6 +13,8 @@ typedef std::vector<usdt_probe_entry> usdt_probe_list; +// Note this class is fully static because bcc_usdt_foreach takes a function +// pointer callback without a context variable. So we must keep global state. class USDTHelper { public:
NFC: Add comment for why USDTHelper is static
apache-2.0
iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace
a6b59d5f22fc3329d3514094e43aa2b27271b632
#pragma once #if !defined( NS_CONCAT_ ) #define NS_CONCAT_( A, B ) A##B #endif /* !defined( NS_CONCAT ) */ #if !defined( NS_CONCAT ) #define NS_CONCAT( A, B ) NS_CONCAT_( A, B ) #endif /* !defined( NS_CONCAT ) */ #if !defined( __NAMESPACE ) #define __NAMESPACE #endif /* !defined( __NAMESPACE ) */ #if !...
#pragma once #if !defined( NS_CONCAT_ ) #define NS_CONCAT_( A, B ) A##B #endif /* !defined( NS_CONCAT ) */ #if !defined( NS_CONCAT ) #define NS_CONCAT( A, B ) NS_CONCAT_( A, B ) #endif /* !defined( NS_CONCAT ) */ #if !defined( NAMESPACE ) #define NAMESPACE #endif /* !defined( NAMESPACE ) */ #if !define...
--- +++ @@ -8,12 +8,12 @@ #define NS_CONCAT( A, B ) NS_CONCAT_( A, B ) #endif /* !defined( NS_CONCAT ) */ -#if !defined( NAMESPACE ) - #define NAMESPACE -#endif /* !defined( NAMESPACE ) */ +#if !defined( __NAMESPACE ) + #define __NAMESPACE +#endif /* !defined( __NAMESPACE ) */ #if !defined( NS ) - ...
Fix not yet corrected NAMESPACE macro
lgpl-2.1
SixTrack/SixTrackLib,SixTrack/SixTrackLib,SixTrack/SixTrackLib,SixTrack/SixTrackLib
859f0d817daea24874bda1f07d350be481cc1012
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #ifndef MATH_H #define MATH_H #include "common/halfling_sys.h" namespace Common { template<typename T> inline T Min(const T& a, const T& b) { return a < b ...
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #ifndef MATH_H #define MATH_H namespace Common { template<typename T> inline T Min(const T& a, const T& b) { return a < b ? a : b; } template<typename T> i...
--- +++ @@ -6,6 +6,8 @@ #ifndef MATH_H #define MATH_H + +#include "common/halfling_sys.h" namespace Common { @@ -30,6 +32,16 @@ return x < low ? low : (x > high ? high : x); } +// Returns random float in [0, 1). +static float RandF() { + return (float)(rand()) / (float)RAND_MAX; +} + +// Returns random ...
COMMON: Create helper functions for creating random floats
apache-2.0
RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject
55e3f242fddf4256c96878167d432e176b9650c8
#define CONSOLE_CMD /* Console command */ #define DIGEST_CMD /* Image crypto digest commands */ #define DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */ #define IMAGE_COMBOOT /* COMBOOT */ #define IMAGE_TRUST_CMD /* Image trust management commands */ #define IMAGE_GZIP ...
#define CONSOLE_CMD /* Console command */ #define DIGEST_CMD /* Image crypto digest commands */ #define DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */ #define IMAGE_COMBOOT /* COMBOOT */ #define IMAGE_TRUST_CMD /* Image trust management commands */ #define NET_PROTO...
--- +++ @@ -1,8 +1,10 @@ -#define CONSOLE_CMD /* Console command */ +#define CONSOLE_CMD /* Console command */ #define DIGEST_CMD /* Image crypto digest commands */ -#define DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */ +#define DOWNLOAD_PROTO_HTTPS /* Secure Hyper...
Enable GZIP and ZLIB options in iPXE
apache-2.0
antonym/netboot.xyz,antonym/netboot.xyz,antonym/netboot.xyz
95411cf0b5dadfe821f4121721c0f50e806c4630
/* Return the copyright string. This is updated manually. */ #include "Python.h" static char cprt[] = "Copyright (c) 2000 BeOpen.com. All Rights Reserved.\n\ Copyright (c) 1995-2000 Corporation for National Research Initiatives.\n\ All Rights Reserved.\n\ Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Ams...
/* Return the copyright string. This is updated manually. */ #include "Python.h" static char cprt[] = "Copyright (c) 2000 BeOpen.com; All Rights Reserved.\n\ Copyright (c) 1995-2000 Corporation for National Research Initiatives;\n\ All Rights Reserved.\n\ Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amst...
--- +++ @@ -3,10 +3,10 @@ #include "Python.h" static char cprt[] = -"Copyright (c) 2000 BeOpen.com; All Rights Reserved.\n\ -Copyright (c) 1995-2000 Corporation for National Research Initiatives;\n\ +"Copyright (c) 2000 BeOpen.com. All Rights Reserved.\n\ +Copyright (c) 1995-2000 Corporation for National Resear...
Use periods, not semicolons between Copyright and All Rights Reserved.
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
e4ad8ed638d3147d95d41940a50d59f82597a18f
/** * Phase 01 - Get a Window that works and can be closed. * * This code won't be structured very well, just trying to get stuff working. */ #include <stdlib.h> int main(int argc, char *argv[]) { return EXIT_SUCCESS; }
#include <stdlib.h> int main(int argc, char *argv[]) { return EXIT_SUCCESS; }
--- +++ @@ -1,3 +1,8 @@ +/** + * Phase 01 - Get a Window that works and can be closed. + * + * This code won't be structured very well, just trying to get stuff working. + */ #include <stdlib.h> int main(int argc, char *argv[])
Add a little header explaining the purpose of phase-01
mit
Faison/xlib-learning
db57bd7faea002d5e73e0468a6e131416c1059df
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2013 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.06.00.12-k" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 6 #define QLA_DRIVER_PATCH_VER 0 #defi...
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2013 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.06.00.08-k" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 6 #define QLA_DRIVER_PATCH_VER 0 #defi...
--- +++ @@ -7,7 +7,7 @@ /* * Driver version */ -#define QLA2XXX_VERSION "8.06.00.08-k" +#define QLA2XXX_VERSION "8.06.00.12-k" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 6
[SCSI] qla2xxx: Update the driver version to 8.06.00.12-k. Signed-off-by: Giridhar Malavali <799b6491fce2c7a80b5fedcf9a728560cc9eb954@qlogic.com> Signed-off-by: Saurav Kashyap <88d6fd94e71a9ac276fc44f696256f466171a3c0@qlogic.com> Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
81cb088385ca4a1f63b7b308a8766117eaf90c09
#include "drmP.h" #include "drm.h" #include "nouveau_drv.h" #include "nouveau_drm.h" int nv04_mc_init(struct drm_device *dev) { /* Power up everything, resetting each individual unit will * be done later if needed. */ nv_wr32(dev, NV03_PMC_ENABLE, 0xFFFFFFFF); /* Disable PROM access. */ nv_wr32(dev, NV_PBUS_...
#include "drmP.h" #include "drm.h" #include "nouveau_drv.h" #include "nouveau_drm.h" int nv04_mc_init(struct drm_device *dev) { /* Power up everything, resetting each individual unit will * be done later if needed. */ nv_wr32(dev, NV03_PMC_ENABLE, 0xFFFFFFFF); return 0; } void nv04_mc_takedown(struct drm_devi...
--- +++ @@ -11,6 +11,10 @@ */ nv_wr32(dev, NV03_PMC_ENABLE, 0xFFFFFFFF); + + /* Disable PROM access. */ + nv_wr32(dev, NV_PBUS_PCI_NV_20, NV_PBUS_PCI_NV_20_ROM_SHADOW_ENABLED); + return 0; }
drm/nouveau: Disable PROM access on init. On older cards (<nv17) scanout gets blocked when the ROM is being accessed. PROM access usually comes out enabled from suspend, switch it off. Signed-off-by: Francisco Jerez <5906ff32bdd9fd8db196f6ba5ad3afd6f9257ea5@riseup.net> Signed-off-by: Ben Skeggs <d9f27fb07c1e9f131223a...
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kana...
112d20ad5ca06a9ec7237602ee33bef6fa881daa
// PARAM: --disable ana.int.def_exc --enable ana.int.interval --enable ana.int.congruence --enable ana.int.congruence_no_overflow --enable ana.int.refinement #include <assert.h> int main(){ int r = -103; for (int i = 0; i < 40; i++) { r = r + 5; } // At this point r in the congr. dom should be...
// PARAM: --disable ana.int.def_exc --enable ana.int.interval --enable ana.int.congruence #include <assert.h> int main(){ int r = -103; for (int i = 0; i < 40; i++) { r = r + 5; } // At this point r in the congr. dom should be 2 + 5Z int k = r; if (k >= 3) { // After refinement ...
--- +++ @@ -1,4 +1,4 @@ -// PARAM: --disable ana.int.def_exc --enable ana.int.interval --enable ana.int.congruence +// PARAM: --disable ana.int.def_exc --enable ana.int.interval --enable ana.int.congruence --enable ana.int.congruence_no_overflow --enable ana.int.refinement #include <assert.h> int main(){ @@ -6,6 ...
Add updated params to interval-congruence ref. reg test
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
586336cfe52c6e626583dbe20dbaf8cd50d3608b
@import UIKit; @protocol HYPScatterPlotDataSource; @class HYPScatterPoint; @class HYPScatterLabel; @interface HYPScatterPlot : UIView @property (nonatomic) UIColor *averageLineColor; @property (nonatomic) UIColor *xAxisColor; @property (nonatomic) UIColor *yAxisMidGradient; @property (nonatomic) UIColor *yAxisEndGr...
@import UIKit; @protocol HYPScatterPlotDataSource; @class HYPScatterPoint; @class HYPScatterLabel; @interface HYPScatterPlot : UIView @property (nonatomic) UIColor *averageLineColor; @property (nonatomic) UIColor *xAxisColor; @property (nonatomic) UIColor *yAxisMidGradient; @property (nonatomic) UIColor *yAxisEndGr...
--- +++ @@ -20,6 +20,10 @@ @required +/** + + @return should be a list of HYPScatterPoint objects + */ - (NSArray *)scatterPointsForScatterPlot:(HYPScatterPlot *)scatterPlot; - (HYPScatterPoint *)maximumXValue:(HYPScatterPlot *)scatterPlot; - (HYPScatterPoint *)minimumXValue:(HYPScatterPlot *)scatterPlot;
Add an important info. for scatter datasource
mit
hyperoslo/Scatter
040f741c3387244091f24f7232ee85485b77f1f3
// Douglas Hill, May 2015 // https://github.com/douglashill/DHScatterGraph extern double const DHScatterGraphVersionNumber; extern unsigned char const DHScatterGraphVersionString[]; #import <DHScatterGraph/DHScatterGraphLineAttributes.h> #import <DHScatterGraph/DHScatterGraphPointSet.h> #import <DHScatterGraph/DHSc...
// Douglas Hill, May 2015 // https://github.com/douglashill/DHScatterGraph #import <DHScatterGraph/DHScatterGraphLineAttributes.h> #import <DHScatterGraph/DHScatterGraphPointSet.h> #import <DHScatterGraph/DHScatterGraphView.h>
--- +++ @@ -1,5 +1,8 @@ // Douglas Hill, May 2015 // https://github.com/douglashill/DHScatterGraph + +extern double const DHScatterGraphVersionNumber; +extern unsigned char const DHScatterGraphVersionString[]; #import <DHScatterGraph/DHScatterGraphLineAttributes.h> #import <DHScatterGraph/DHScatterGraphPointS...
Add framework version info to umbrella header The values of these constants are provided by Xcode’s automatically generated DerivedSources/DHScatterGraph_vers.c.
mit
douglashill/DHScatterGraph
56e734d78f593b0da4fce749ead8c841e3453ba8
#include <stdint.h> #include "stm8s208s.h" void main(void) { MEMLOC(CLK_CKDIVR) = 0x00; /* Set the frequency to 16 MHz */ BITSET(CLK_PCKENR1, 7); /* Enable clk to TIM1 */ // Configure timer // 250 ticks per second MEMLOC(TIM1_PSCRH) = (64000>>8); MEMLOC(TIM1_PSCRL) = (uint8_t)(64000 & 0xff); ...
#include <stdint.h> #include "stm8s208s.h" void main(void) { MEMLOC(CLK_CKDIVR) = 0x00; // Set the frequency to 16 MHz BITSET(CLK_PCKENR1, 7); // Configure timer // 1000 ticks per second MEMLOC(TIM1_PSCRH) = (16000>>8); MEMLOC(TIM1_PSCRL) = (uint8_t)(16000 & 0xff); // Enable timer MEML...
--- +++ @@ -3,28 +3,22 @@ void main(void) { - MEMLOC(CLK_CKDIVR) = 0x00; // Set the frequency to 16 MHz - BITSET(CLK_PCKENR1, 7); + MEMLOC(CLK_CKDIVR) = 0x00; /* Set the frequency to 16 MHz */ + BITSET(CLK_PCKENR1, 7); /* Enable clk to TIM1 */ // Configure timer - // 1000 ticks per second - ...
Reduce ticks to 250 to use 8bit diff
bsd-3-clause
spoorcc/docker_embedded,spoorcc/docker_embedded
f35eea985e4b20020c8a91533fcd769c5745662b
#include "sphia-test.h" // See #51 static void test_clear_similar_keys() { sphia_set(sphia, "key-1", "hello world"); sphia_set(sphia, "key-10", "hello world"); sphia_set(sphia, "00000000", "hello world"); sphia_set(sphia, "000000000", "hello world"); assert(4 == sphia_count(sphia)); assert(0 == sphia_clea...
#include "sphia-test.h" // See #51 static void test_clear_similar_keys() { sphia_set(sphia, "key-1", "hello world"); sphia_set(sphia, "key-10", "hello world"); assert(2 == sphia_count(sphia)); assert(0 == sphia_clear(sphia)); assert(0 == sphia_count(sphia)); } TEST(test_clear_similar_keys);
--- +++ @@ -6,7 +6,9 @@ test_clear_similar_keys() { sphia_set(sphia, "key-1", "hello world"); sphia_set(sphia, "key-10", "hello world"); - assert(2 == sphia_count(sphia)); + sphia_set(sphia, "00000000", "hello world"); + sphia_set(sphia, "000000000", "hello world"); + assert(4 == sphia_count(sphia)); as...
Update clear test to use keys longer than 8 chars
mit
sphia/sphia,sphia/sphia,sphia/sphia
cc7b316872403c586627bd909bb596801e4a67cf
#ifndef UDBM_STUBS_H_ #define UDBM_STUBS_H_ #include <vector> typedef std::vector<int> carray_t; #define get_cvector(x) ((carray_t*)Data_custom_val(x)) #define get_dbm_ptr(x) static_cast<dbm_t*>(Data_custom_val(x)) bool dbm_closure_leq(const raw_t * const dr1, const raw_t * const dr2, cindex_t dim, ...
#ifndef UDBM_STUBS_H_ #define UDBM_STUBS_H_ #include <vector> typedef std::vector<int> carray_t; #define get_cvector(x) ((carray_t*)Data_custom_val(x)) #define get_dbm_ptr(x) static_cast<dbm_t*>(Data_custom_val(x)) #endif // UDBM_STUBS_H_
--- +++ @@ -8,4 +8,8 @@ #define get_dbm_ptr(x) static_cast<dbm_t*>(Data_custom_val(x)) +bool +dbm_closure_leq(const raw_t * const dr1, const raw_t * const dr2, cindex_t dim, + const std::vector<int> &lbounds, const std::vector<int> &ubounds); + #endif // UDBM_STUBS_H_
Make closure inclusion test visible (to be used from the priced zone part).
agpl-3.0
osankur/udbml,osankur/udbml,osankur/udbml
8422e5d1b414ee3a5ca6813e064fb55ea7a8c5bd
#include "blueprint.h" #include <assert.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> #include "parson.h" #include "bstrlib.h" void free_blueprint(struct blueprint *bp) { if (bp == NULL) return; bdestroy(bp->name); bdestroy(bp->blueprint_na...
#include "blueprint.h" #include <assert.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> #include "parson.h" #include "bstrlib.h" void free_blueprint(struct blueprint *bp) { if (bp == NULL) return; bdestroy(bp->name); bdestroy(bp->blueprint_na...
--- +++ @@ -24,6 +24,13 @@ for (int i = 0; i < bp->num_sc; i++) free_blueprint(&bp->SCs[i]); + for (int i = 0; i < bp->total_block_count; i++) + { + if (bp->blocks[i].string_data == NULL) + continue; + bdestroy(bp->blocks[i].string_data); + } + free(bp->blocks); ...
Remove yet another memory leak
mit
Dean4Devil/libblueprint,Dean4Devil/libblueprint
666d003deec427657491dcfef7c4871ed2c4eb66
#ifndef SSPAPPLICATION_ENTITIES_LEVERENTITY_H #define SSPAPPLICATION_ENTITIES_LEVERENTITY_H #include "Entity.h" struct LeverSyncState { int entityID; bool iActive; }; class LeverEntity : public Entity { private: //Variables bool m_isActive; float m_range; bool m_needSync; public: LeverEntity(); virtual ~Lev...
#ifndef SSPAPPLICATION_ENTITIES_LEVERENTITY_H #define SSPAPPLICATION_ENTITIES_LEVERENTITY_H #include "Entity.h" struct LeverSyncState { }; class LeverEntity : public Entity { private: //Variables bool m_isActive; float m_range; public: LeverEntity(); virtual ~LeverEntity(); int Initialize(int entityID, Physi...
--- +++ @@ -3,7 +3,8 @@ #include "Entity.h" struct LeverSyncState { - + int entityID; + bool iActive; }; class LeverEntity : @@ -13,6 +14,8 @@ //Variables bool m_isActive; float m_range; + + bool m_needSync; public: LeverEntity(); virtual ~LeverEntity();
UPDATE Lever entity sync state
apache-2.0
Chringo/SSP,Chringo/SSP
a532922ccf61505c9ac667ae40f617aea8376f95
// [WriteFile Name=SetInitialMapLocation, Category=Maps] // [Legal] // Copyright 2015 Esri. // 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 //...
// [WriteFile Name=SetInitialMapLocation, Category=Maps] // [Legal] // Copyright 2015 Esri. // 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 //...
--- +++ @@ -12,7 +12,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -s// [Legal] +// [Legal] #ifndef SET_INITIAL_MAP_LOCATION_H #define SET_INITIAL_MAP_LOCATION_H
Fix legal comment build error
apache-2.0
Esri/arcgis-runtime-samples-qt,Esri/arcgis-runtime-samples-qt,Esri/arcgis-runtime-samples-qt,Esri/arcgis-runtime-samples-qt
e143b52dbbee202551c0ccc7ce594cbe530a8391
// This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>. // // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of // Mathematics and Physics, Charles University in Prague, Czech Republic. // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If...
// This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>. // // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of // Mathematics and Physics, Charles University in Prague, Czech Republic. // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If...
--- +++ @@ -15,7 +15,7 @@ namespace ufal { namespace morphodita { -class tokenized_sentence { +struct tokenized_sentence { u32string sentence; vector<token_range> tokens; };
Make tokenized_sentence a structure (i.e., all fields public).
mpl-2.0
ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita
e5c5c31ef382af0620d4b9f8177e287e00a09fa0
#ifndef PERSISTENT_COOKIE_JAR_H #define PERSISTENT_COOKIE_JAR_H #include <QMutex> #include <QNetworkCookieJar> #include <QList> class QNetworkCookie; class QObject; class QUrl; /** * Network cookie jar which loads and stores cookies on a persistent file on disk. */ class PersistentCookieJar : public QNetworkCooki...
#ifndef PERSISTENT_COOKIE_JAR_H #define PERSISTENT_COOKIE_JAR_H #include <QMutex> #include <QNetworkCookieJar> #include <QList> class QNetworkCookie; class QObject; class QUrl; class PersistentCookieJar : public QNetworkCookieJar { Q_OBJECT public: explicit PersistentCookieJar(QString filename, QObject *parent...
--- +++ @@ -10,22 +10,50 @@ class QObject; class QUrl; +/** + * Network cookie jar which loads and stores cookies on a persistent file on disk. + */ class PersistentCookieJar : public QNetworkCookieJar { Q_OBJECT public: + /** + * Create a new persistent cookie jar. + * @param filename The full path ...
Add documentation comments for PersistentCookieJar
apache-2.0
Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber
7c0fe28d061b6316017683c31b2e027c2d2f017f
#include "link-includes.h" #include "utilities.h" // Already declared in link-includes.h // const char * linkgrammar_get_dict_locale(Dictionary dict); // const char * linkgrammar_get_version(void); // const char * linkgrammar_get_dict_version(Dictionary dict); void dictionary_setup_locale(Dictionary dict); void dict...
#include "link-includes.h" // Already declared in link-includes.h // const char * linkgrammar_get_dict_locale(Dictionary dict); // const char * linkgrammar_get_version(void); // const char * linkgrammar_get_dict_version(Dictionary dict); void dictionary_setup_locale(Dictionary dict); void dictionary_setup_defines(Di...
--- +++ @@ -1,5 +1,6 @@ #include "link-includes.h" +#include "utilities.h" // Already declared in link-includes.h // const char * linkgrammar_get_dict_locale(Dictionary dict); @@ -11,3 +12,8 @@ void afclass_init(Dictionary dict); bool afdict_init(Dictionary dict); void affix_list_add(Dictionary afdict, Afdi...
MinGW: Add a missing prototype (callGetLocaleInfoEx())
lgpl-2.1
ampli/link-grammar,ampli/link-grammar,ampli/link-grammar,ampli/link-grammar,linas/link-grammar,opencog/link-grammar,opencog/link-grammar,linas/link-grammar,linas/link-grammar,ampli/link-grammar,linas/link-grammar,opencog/link-grammar,ampli/link-grammar,opencog/link-grammar,opencog/link-grammar,linas/link-grammar,openco...
5439e60468398c955f2448df853a11a8e36d9dcd
/* * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische * Universitaet Berlin. See the accompanying file "COPYRIGHT" for * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ #include <string.h> #include <stdlib.h> #include <stdio.h> #include "gsm.h" #include "private.h" gsm gsm_create ...
/* * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische * Universitaet Berlin. See the accompanying file "COPYRIGHT" for * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. */ #include <string.h> #include <stdlib.h> #include <stdio.h> #include "gsm.h" #include "private.h" gsm gsm_create ...
--- +++ @@ -13,7 +13,7 @@ gsm gsm_create () { - gsm = (gsm)calloc(sizeof(struct gsm_state)); + gsm r = (gsm)calloc(1, sizeof(struct gsm_state)); if (r) r->nrp = 40;
Fix typos in last commit.
lgpl-2.1
davel/sox,cbagwell/sox,Distrotech/sox,CaptainHayashi/sox,CaptainHayashi/sox,davel/sox,MageSlayer/sox,jacksonh/sox,uklauer/sox,cbagwell/sox,Distrotech/sox,jacksonh/sox,pcqpcq/sox,mhartzel/sox_personal_fork,davel/sox,MageSlayer/sox,cbagwell/sox,MageSlayer/sox,Motiejus/sox,mhartzel/sox_personal_fork,davel/sox,Distrotech/s...
7a41ebe99da12b58622df6112624669a013e7659
/*------------------------------------------------------------------------- * * FILE * pqxx/util.h * * DESCRIPTION * Various utility definitions for libpqxx * * Copyright (c) 2001-2004, Jeroen T. Vermeulen <jtv@xs4all.nl> * * See COPYING for copyright license. If you did not receive a file called *...
/*------------------------------------------------------------------------- * * FILE * pqxx/util.h * * DESCRIPTION * Various utility definitions for libpqxx * * Copyright (c) 2001-2004, Jeroen T. Vermeulen <jtv@xs4all.nl> * * See COPYING for copyright license. If you did not receive a file called *...
--- +++ @@ -17,10 +17,13 @@ #ifndef PQXX_UTIL_H #define PQXX_UTIL_H +#if !defined(PQXXYES_I_KNOW_DEPRECATED_HEADER) +#define PQXXYES_I_KNOW_DEPRECATED_HEADER #if defined(PQXX_HAVE_CPP_WARNING) #warning "Deprecated libpqxx header included. Use headers without '.h'" #elif defined(PQXX_HAVE_CPP_PRAGMA_MESSAGE) ...
Allow suppression of "deprecated header" warning
bsd-3-clause
jtv/libpqxx,jtv/libpqxx,jtv/libpqxx,jtv/libpqxx
8035340f994f48b8b5f7c0d382517c3243b58ac3
/* * Copyright (C) 2014 FU Berlin * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @addtogroup driver_periph * @{ * * @file * @brief Low-level CPUID driver implementation ...
/* * Copyright (C) 2014 FU Berlin * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @addtogroup driver_periph * @{ * * @file * @brief Low-level CPUID driver implementation ...
--- +++ @@ -24,7 +24,7 @@ void cpuid_get(void *id) { - memcpy(id, (void *)(_cpuid_address), CPUID_ID_LEN); + memcpy(id, (void *)(&_cpuid_address), CPUID_ID_LEN); } /** @} */
Use the address of the variable instead of the value itself for the CPUID
lgpl-2.1
DipSwitch/RIOT,DipSwitch/RIOT,DipSwitch/RIOT,DipSwitch/RIOT,DipSwitch/RIOT,DipSwitch/RIOT
6142283e4f51049c3ab867e5cdeaea9d6052eb6f
/* Never include this file directly. Include <linux/compiler.h> instead. */ /* * Common definitions for all gcc versions go here. */ /* Optimization barrier */ /* The "volatile" is due to gcc bugs */ #define barrier() __asm__ __volatile__("": : :"memory") /* This macro obfuscates arithmetic on a variable addres...
/* Never include this file directly. Include <linux/compiler.h> instead. */ /* * Common definitions for all gcc versions go here. */ /* Optimization barrier */ /* The "volatile" is due to gcc bugs */ #define barrier() __asm__ __volatile__("": : :"memory") /* This macro obfuscates arithmetic on a variable addres...
--- +++ @@ -11,9 +11,15 @@ /* This macro obfuscates arithmetic on a variable address so that gcc shouldn't recognize the original var, and make assumptions about it */ +/* + * Versions of the ppc64 compiler before 4.1 had a bug where use of + * RELOC_HIDE could trash r30. The bug can be worked around by changi...
[PATCH] Work around ppc64 compiler bug In the process of optimising our per cpu data code, I found a ppc64 compiler bug that has been around forever. Basically the current RELOC_HIDE can end up trashing r30. Details of the bug can be found at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25572 This bug is present in...
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_k...
c8d52465f95c4187871f8e65666c07806ca06d41
/* This is a simple C program which is a stub for the FS monitor. It takes one argument which would be a directory to monitor. In this case, the filename is discarded after argument validation. Every minute the */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main (int argc, char **a...
/* This is a simple C program which is a stub for the FS monitor. It takes one argument which would be a directory to monitor. In this case, the filename is discarded after argument validation. Every minute the */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main (int argc, char **a...
--- +++ @@ -10,7 +10,7 @@ #include <unistd.h> int main (int argc, char **argv) { - if (argc != 2) { + if (argc < 2) { fprintf(stderr, "Not enough arguments"); exit(EXIT_FAILURE); }
Fix arguments count check in test inotify program
mit
iankronquist/senior-project-experiment,iankronquist/senior-project-experiment,iankronquist/senior-project-experiment,iankronquist/beeswax,iankronquist/beeswax,iankronquist/beeswax,iankronquist/senior-project-experiment,iankronquist/beeswax
6f132875296595c4f26f9eee940666b1a4ca8135
#include <stdio.h> #include <stdlib.h> #include "utility.h" /* * MAW 3.25.a Write the routines to implement queues using: Linked Lists * * We use a header node at the very beginning of the linked list. * * Front: | header node | -> | data node | -> | data node | :Rear */ #ifndef _QUEUE_H #define _QUEUE_H type...
#include <stdio.h> #include <stdlib.h> #include "utility.h" /* * MAW 3.25.a Write the routines to implement queues using: Linked Lists * * We use a header node at the very beginning of the linked list. * * Front: | header node | -> | data node | -> | data node | :Rear */ #ifndef _QUEUE_H #define _QUEUE_H type...
--- +++ @@ -17,6 +17,9 @@ struct QueueRecord; struct QueueCDT; typedef struct QueueRecord* PtrToNode; + +// CDT: concrete-type-of-a-queue +// ADT: abstract-type-of-a-queue typedef struct QueueCDT* QueueADT; // naming convention: https://www.cs.bu.edu/teaching/c/queue/linked-list/types.html int isEmpty(QueueADT...
Add comment remarks to CDT & ADT
mit
xxks-kkk/algo,xxks-kkk/algo
e5c078e0f278adfbe685df2d8e141a9f71ea7cc8
#ifndef __LV2_SYSUTIL_H__ #define __LV2_SYSUTIL_H__ #include <ppu-types.h> #define SYSUTIL_EVENT_SLOT0 0 #define SYSUTIL_EVENT_SLOT1 1 #define SYSUTIL_EVENT_SLOT2 2 #define SYSUTIL_EVENT_SLOT3 3 #define SYSUTIL_EXIT_GAME 0x0101 #define SYSUTIL_DRAW_BEGIN 0x0121 #define SYSUTIL_DRAW_END 0x0122 #define S...
#ifndef __LV2_SYSUTIL_H__ #define __LV2_SYSUTIL_H__ #include <ppu-types.h> #define SYSUTIL_EVENT_SLOT0 0 #define SYSUTIL_EVENT_SLOT1 1 #define SYSUTIL_EVENT_SLOT2 2 #define SYSUTIL_EVENT_SLOT3 3 #define SYSUTIL_EXIT_GAME 0x0101 #define SYSUTIL_DRAW_BEGIN 0x0121 #define SYSUTIL_DRAW_END 0x0122 #define S...
--- +++ @@ -13,6 +13,9 @@ #define SYSUTIL_DRAW_END 0x0122 #define SYSUTIL_MENU_OPEN 0x0131 #define SYSUTIL_MENU_CLOSE 0x0132 +#define SYSUTIL_OSK_LOADED 0x0502 +#define SYSUTIL_OSK_DONE 0x0503 +#define SYSUTIL_OSK_UNLOADED 0x0504 #ifdef __cplu...
Add defines for OSK event ids
mit
ps3dev/PSL1GHT,ps3dev/PSL1GHT,ps3dev/PSL1GHT,ps3dev/PSL1GHT
5c31ae8d7724618d27315791605449d7693bde78
#ifndef PYLOGGER_H #define PYLOGGER_H #include "Python.h" #include <string> #include "cantera/base/logger.h" namespace Cantera { /// Logger for Python. /// @ingroup textlogs class Py_Logger : public Logger { public: Py_Logger() { PyRun_SimpleString("import sys"); } virtual ~Py_Logger() {} vi...
#ifndef PYLOGGER_H #define PYLOGGER_H #include "Python.h" #include <string> #include "cantera/base/logger.h" namespace Cantera { /// Logger for Python. /// @ingroup textlogs class Py_Logger : public Logger { public: Py_Logger() { PyRun_SimpleString("import sys"); } virtual ~Py_Logger() {} vi...
--- +++ @@ -27,8 +27,8 @@ } virtual void error(const std::string& msg) { - std::string err = "raise \""+msg+"\""; - PyRun_SimpleString((char*)err.c_str()); + std::string err = "raise Exception(\"\"\""+msg+"\"\"\")"; + PyRun_SimpleString(err.c_str()); } }; }
Fix Py_Logger to raise instances of Exception instead of strings Raising string exceptions was removed in Python 2.6 git-svn-id: e76dbe14710aecee1ad27675521492cea2578c83@1932 02a645c2-efd0-11dd-984d-ab748d24aa7e
bsd-3-clause
Cantera/cantera-svn,Cantera/cantera-svn,Cantera/cantera-svn,Cantera/cantera-svn,Cantera/cantera-svn,Cantera/cantera-svn
40206332871e11ee28c6d163797cb374da2663e9
#include <pal.h> /* * sinh z = (exp z - exp(-z)) / 2 */ static inline float _p_sinh(const float z) { float exp_z; p_exp_f32(&z, &exp_z, 1); return 0.5f * (exp_z - 1.f / exp_z); } /** * * Calculates the hyperbolic sine of the vector 'a'. Angles are specified * in radians. * * @param a Pointer to...
#include <pal.h> /** * * Calculates the hyperbolic sine of the vector 'a'. Angles are specified * in radians. * * @param a Pointer to input vector * * @param c Pointer to output vector * * @param n Size of 'a' and 'c' vector. * * @return None * */ #include <math.h> void p_sinh_f32(const f...
--- +++ @@ -1,4 +1,14 @@ #include <pal.h> + +/* + * sinh z = (exp z - exp(-z)) / 2 + */ +static inline float _p_sinh(const float z) +{ + float exp_z; + p_exp_f32(&z, &exp_z, 1); + return 0.5f * (exp_z - 1.f / exp_z); +} /** * @@ -14,11 +24,10 @@ * @return None * */ -#include <math.h> void p...
math:sinh: Implement the hyperbolic sine function. Signed-off-by: Mansour Moufid <ac5f6b12fab5e0d4efa7215e6c2dac9d55ab77dc@gmail.com>
apache-2.0
mateunho/pal,eliteraspberries/pal,mateunho/pal,Adamszk/pal3,olajep/pal,eliteraspberries/pal,eliteraspberries/pal,aolofsson/pal,parallella/pal,mateunho/pal,8l/pal,parallella/pal,aolofsson/pal,8l/pal,Adamszk/pal3,debug-de-su-ka/pal,debug-de-su-ka/pal,eliteraspberries/pal,8l/pal,parallella/pal,debug-de-su-ka/pal,olajep/pa...
a93e50dba9a0528ba2bebe76601b933259b684d1
/* * UIOMux: a conflict manager for system resources, including UIO devices. * Copyright (C) 2009 Renesas Technology Corp. * * 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; either ...
/* * UIOMux: a conflict manager for system resources, including UIO devices. * Copyright (C) 2009 Renesas Technology Corp. * * 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; either ...
--- +++ @@ -17,7 +17,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA */ +#ifdef HAVE_CONFIG_H #include "config.h" +#endif #include <stdio.h> #include <stdlib.h>
Apply HAVE_CONFIG_H condition in src/tests/uiomux_test.h config.h should be included only if HAVE_CONFIG_H defined when autoconf used.
lgpl-2.1
kfish/libuiomux,kfish/libuiomux
5e33ef4b6724a72188da87ddc7e8af98c4658671
// // MPConstants.h // MoPub // // Created by Nafis Jamal on 2/9/11. // Copyright 2011 MoPub, Inc. All rights reserved. // #import <UIKit/UIKit.h> #if DEBUG #define MP_DEBUG_MODE 1 #else #define MP_DEBUG_MODE 0 #endif #define HOSTNAME @"ads.mopub.com" #define HOSTNA...
// // MPConstants.h // MoPub // // Created by Nafis Jamal on 2/9/11. // Copyright 2011 MoPub, Inc. All rights reserved. // #import <UIKit/UIKit.h> #define MP_DEBUG_MODE 1 #define HOSTNAME @"ads.mopub.com" #define HOSTNAME_FOR_TESTING @"testing.ads.mopub.com" #define DEFAUL...
--- +++ @@ -8,7 +8,11 @@ #import <UIKit/UIKit.h> +#if DEBUG #define MP_DEBUG_MODE 1 +#else +#define MP_DEBUG_MODE 0 +#endif #define HOSTNAME @"ads.mopub.com" #define HOSTNAME_FOR_TESTING @"testing.ads.mopub.com"
Disable MoPub logging for release builds.
bsd-3-clause
skillz/mopub-ios-sdk,skillz/mopub-ios-sdk,skillz/mopub-ios-sdk,skillz/mopub-ios-sdk
56de4f7f2434bfb7b22f83bdb87744a8e6ca28de
#ifndef __SETTINGS_H_ #define __SETTINGS_H_ #include <Arduino.h> #include "Device.h" // This section is for devices and their configuration //Kit: #define HAS_STD_LIGHTS (1) #define LIGHTS_PIN 5 #define HAS_STD_CAPE (1) #define HAS_STD_2X1_THRUSTERS (1) #define HAS_STD_PILOT (1) #define HAS_STD_CAMERAMOUNT (1) #defin...
#ifndef __SETTINGS_H_ #define __SETTINGS_H_ #include <Arduino.h> #include "Device.h" // This section is for devices and their configuration //Kit: #define HAS_STD_LIGHTS (1) #define LIGHTS_PIN 5 #define HAS_STD_CAPE (1) #define HAS_STD_2X1_THRUSTERS (1) #define HAS_STD_PILOT (1) #define HAS_STD_CAMERAMOUNT (1) #defin...
--- +++ @@ -19,7 +19,7 @@ //After Market: #define HAS_STD_CALIBRATIONLASERS (0) #define CALIBRATIONLASERS_PIN 6 -#define HAS_POLOLU_MINIMUV (1) +#define HAS_POLOLU_MINIMUV (0) #define HAS_MS5803_14BA (0) #define MS5803_14BA_I2C_ADDRESS 0x76
Reset default settings to stock kit configuration
mit
BrianAdams/openrov-cockpit,BenjaminTsai/openrov-cockpit,kavi87/openrov-cockpit,johan--/openrov-cockpit,spiderkeys/openrov-cockpit,OpenROV/openrov-cockpit,johan--/openrov-cockpit,kavi87/openrov-cockpit,johan--/openrov-cockpit,kavi87/openrov-cockpit,chaudhryjunaid/openrov-cockpit,spiderkeys/openrov-cockpit,BrianAdams/ope...
150ea1ffddd8ade2bd1b7f146277210c5f182321
#ifndef _PKG_UTIL_H #define _PKG_UTIL_H #include <sys/types.h> #include <sys/sbuf.h> #include <sys/param.h> #define STARTS_WITH(string, needle) (strncasecmp(string, needle, strlen(needle)) == 0) #define ERROR_SQLITE(db) \ EMIT_PKG_ERROR("sqlite: %s", sqlite3_errmsg(db)) int sbuf_set(struct sbuf **, const char *); ...
#ifndef _PKG_UTIL_H #define _PKG_UTIL_H #include <sys/types.h> #include <sys/sbuf.h> #include <sys/param.h> #define ARRAY_INIT {0, 0, NULL} struct array { size_t cap; size_t len; void **data; }; #define STARTS_WITH(string, needle) (strncasecmp(string, needle, strlen(needle)) == 0) #define ERROR_SQLITE(db) \ EM...
--- +++ @@ -4,14 +4,6 @@ #include <sys/types.h> #include <sys/sbuf.h> #include <sys/param.h> - -#define ARRAY_INIT {0, 0, NULL} - -struct array { - size_t cap; - size_t len; - void **data; -}; #define STARTS_WITH(string, needle) (strncasecmp(string, needle, strlen(needle)) == 0)
Remove last occurences of the dead struct array
bsd-2-clause
en90/pkg,khorben/pkg,en90/pkg,khorben/pkg,Open343/pkg,skoef/pkg,Open343/pkg,skoef/pkg,junovitch/pkg,junovitch/pkg,khorben/pkg
21882ab7a21eb17f0d23d2d2459fdb3c6e787322
#ifndef _SYSTEMEMORY_H_ #define _SYSTEMEMORY_H_ #include "windows.h" typedef unsigned long DWORD; class SystemMemory { private: MEMORYSTATUSEX memoryStat; private: int memoryCall(); public: int getLoadPercent(int &val); int getUsage(double &val); int getTotalByte(DWORD &val); int getFreeByte(DWORD &val);...
#ifndef _SYSTEMEMORY_H_ #define _SYSTEMEMORY_H_ #include "windows.h" class SystemMemory { private: MEMORYSTATUSEX memoryStat; private: int memoryCall(); public: int getLoadPercent(int &val); int getUsage(double &val); int getTotalByte(DWORD &val); int getFreeByte(DWORD &val); }; #endif
--- +++ @@ -2,6 +2,8 @@ #define _SYSTEMEMORY_H_ #include "windows.h" + +typedef unsigned long DWORD; class SystemMemory {
Define 'unsigned long' as 'DWORD' for cross-platform
mit
bg0820/SMS,bg0820/SMS
02e86ccfe9fc04afbd5275d4b2f27881d61e3ced
#include <bc_scheduler.h> #include <bc_module_core.h> #include <stm32l0xx.h> void application_init(void); void application_task(void *param); int main(void) { bc_module_core_init(); bc_scheduler_init(); bc_scheduler_register(application_task, NULL, 0); application_init(); bc_scheduler_run(); }...
#include <bc_scheduler.h> #include <bc_module_core.h> #include <stm32l0xx.h> void application_init(void); void application_task(void *param); int main(void) { bc_module_core_init(); bc_scheduler_init(); application_init(); bc_scheduler_register(application_task, NULL, 0); bc_scheduler_run(); }...
--- +++ @@ -11,9 +11,9 @@ bc_scheduler_init(); + bc_scheduler_register(application_task, NULL, 0); + application_init(); - - bc_scheduler_register(application_task, NULL, 0); bc_scheduler_run(); }
Move app_task() scheduler registration before app_init() so app_task() has task_id 0
mit
bigclownlabs/bc-core-module-sdk,bigclownlabs/bc-core-module-sdk,bigclownlabs/bc-core-module-sdk
ec2c60ee36437d0bf817a836aa78130087c36fc7
#ifndef CLIENTVERSION_H #define CLIENTVERSION_H // // client versioning and copyright year // // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 9 #define CLIENT_VERSION_REVISION 0 #define CLIENT_VERSION_BUILD ...
#ifndef CLIENTVERSION_H #define CLIENTVERSION_H // // client versioning and copyright year // // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 8 #define CLIENT_VERSION_REVISION 6 #define CLIENT_VERSION_BUILD ...
--- +++ @@ -7,16 +7,16 @@ // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 -#define CLIENT_VERSION_MINOR 8 -#define CLIENT_VERSION_REVISION 6 -#define CLIENT_VERSION_BUILD 2 +#define CLIENT_VERSION_MINOR 9 +#define CLIENT...
Update the version number to 0.9 for a beta build.
mit
TacoCoin/tacocoin,TacoCoin/tacocoin,TacoCoin/tacocoin,TacoCoin/tacocoin,TacoCoin/tacocoin
8b55ba7d6d1fbd3244ce9e1bc19e691099274172
/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> * */ #ifndef __ASM_MACH_GENERIC_DMA_COHERENCE_H #define __ASM_MACH_GENERIC_DMA_CO...
/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> * */ #ifndef __ASM_MACH_GENERIC_DMA_COHERENCE_H #define __ASM_MACH_GENERIC_DMA_CO...
--- +++ @@ -11,22 +11,24 @@ struct device; -static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) +static inline dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, + size_t size) { return virt_to_phys(addr); } -static dma_addr_t plat_map_dma_mem_page(struct device *dev, s...
[MIPS] DMA: Fix a bunch of warnings due to missing inline keywords. Signed-off-by: Ralf Baechle <92f48d309cda194c8eda36aa8f9ae28c488fa208@linux-mips.org>
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...
a9b6590ced1370537edad8dc60be32c044b2380e
/* * Let's make sure we always have a sane definition for ntohl()/htonl(). * Some libraries define those as a function call, just to perform byte * shifting, bringing significant overhead to what should be a simple * operation. */ /* * Default version that the compiler ought to optimize properly with * constant...
/* * Let's make sure we always have a sane definition for ntohl()/htonl(). * Some libraries define those as a function call, just to perform byte * shifting, bringing significant overhead to what should be a simple * operation. */ /* * Default version that the compiler ought to optimize properly with * constant...
--- +++ @@ -9,7 +9,7 @@ * Default version that the compiler ought to optimize properly with * constant values. */ -static inline unsigned int default_swab32(unsigned int val) +static inline uint32_t default_swab32(uint32_t val) { return (((val & 0xff000000) >> 24) | ((val & 0x00ff0000) >> 8) | @@ -20,7 +...
Fix some printf format warnings commit 51ea551 ("make sure byte swapping is optimal for git" 2009-08-18) introduced a "sane definition for ntohl()/htonl()" for use on some GNU C platforms. Unfortunately, for some of these platforms, this results in the introduction of a problem which is essentially the reverse of a pr...
mit
destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git
5322ef2006cc93ad76140ff742cd96e74c1ec09b
#pragma mark Class Interface @interface AFObjectModel : NSObject #pragma mark - Properties @property (nonatomic, strong, readonly) NSArray *key; @property (nonatomic, strong, readonly) NSDictionary *mappings; @property (nonatomic, strong, readonly) NSDictionary *transformers; #pragma mark - Constructors - (id)...
#pragma mark Class Interface @interface AFObjectModel : NSObject #pragma mark - Properties @property (nonatomic, strong, readonly) NSArray *key; @property (nonatomic, strong, readonly) NSDictionary *mappings; @property (nonatomic, strong, readonly) NSDictionary *transformers; #pragma mark - Constructors - (id)...
--- +++ @@ -45,7 +45,7 @@ @required -- (AFObjectModel *)objectModel; ++ (AFObjectModel *)objectModel; @optional
Make objectModel protocol method static.
mit
mlatham/AFToolkit
b8a8116b485bca23f277240d459f3ba0f560b42b
/* Copyright (C) 2002 Timo Sirainen */ #include "common.h" #include "mail-namespace.h" #include "commands.h" bool cmd_create(struct client_command_context *cmd) { struct mail_namespace *ns; const char *mailbox, *full_mailbox; bool directory; size_t len; /* <mailbox> */ if (!client_read_string_args(cmd, 1, &mai...
/* Copyright (C) 2002 Timo Sirainen */ #include "common.h" #include "mail-namespace.h" #include "commands.h" bool cmd_create(struct client_command_context *cmd) { struct mail_namespace *ns; const char *mailbox, *full_mailbox; bool directory; size_t len; /* <mailbox> */ if (!client_read_string_args(cmd, 1, &mai...
--- +++ @@ -28,8 +28,8 @@ informing us that it wants to create children under this mailbox. */ directory = TRUE; - mailbox = t_strndup(mailbox, len-1); - full_mailbox = t_strndup(full_mailbox, strlen(full_mailbox)-1); + mailbox = t_strndup(mailbox, strlen(mailbox)-1); + full_mailbox =...
CREATE ns_prefix/box/ didn't work right when namespace prefix existed. --HG-- branch : HEAD
mit
dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot
77378e0ff43a3fc1074c3eac22dbf25d1686fece
/* * Copyright (c) 2013-2016 Apple Inc. All rights reserved. * * @APPLE_APACHE_LICENSE_HEADER_START@ * * 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/lic...
/* * Copyright (c) 2013-2016 Apple Inc. All rights reserved. * * @APPLE_APACHE_LICENSE_HEADER_START@ * * 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/lic...
--- +++ @@ -22,7 +22,8 @@ #include "shims.h" #if !HAVE_STRLCPY -size_t strlcpy(char *dst, const char *src, size_t size) { +size_t strlcpy(char *dst, const char *src, size_t size) +{ size_t res = strlen(dst) + strlen(src) + 1; if (size > 0) { size_t n = size - 1;
Fix formatting to match libdispatch coding style. Signed-off-by: Daniel A. Steffen <bc823475b60dbcbd7be1bbdfe095b5f1939d5bd2@apple.com>
apache-2.0
apple/swift-corelibs-libdispatch,apple/swift-corelibs-libdispatch,apple/swift-corelibs-libdispatch,apple/swift-corelibs-libdispatch
d0436f27fd7bc254715e1b3b9cc6aae5ff9d4783
#ifndef TEST_GUEST_TUPLE_ITERATOR_H #define TEST_GUEST_TUPLE_ITERATOR_H #include <cxxtest/TestSuite.h> #include <unordered_set> #include <vector> #include "teams.h" #include "guest_tuple_iterator.h" class TestSeenTable : public CxxTest::TestSuite { public: void testFooBar(void) { } }; #endif
#ifndef TEST_GUEST_TUPLE_ITERATOR_H #define TEST_GUEST_TUPLE_ITERATOR_H #include <cxxtest/TestSuite.h> #include <unordered_set> #include <vector> #include "teams.h" #include "guest_tuple_iterator.h" class TestSeenTable : public CxxTest::TestSuite { private: std::vector<mue::Team> make_testteams(int num) { st...
--- +++ @@ -10,21 +10,9 @@ class TestSeenTable : public CxxTest::TestSuite { - private: - std::vector<mue::Team> make_testteams(int num) - { - std::vector<mue::Team> teams; - - for (mue::Team_id i = 0; i < num; ++i) - teams.push_back(mue::Team(i)); - return teams; - } - public: void testFooBar...
Clean skel for guest tuple iterator tests Signed-off-by: Jan Losinski <577c4104c61edf9f052c616c0c23e67bef4a9955@wh2.tu-dresden.de>
bsd-3-clause
janLo/meet-and-eat-distribution-tool,eXma/meet-and-eat-distribution-tool,janLo/meet-and-eat-distribution-tool,eXma/meet-and-eat-distribution-tool,eXma/meet-and-eat-distribution-tool,janLo/meet-and-eat-distribution-tool
89f7600802d05329facf46d92910ad8b1bdc642d
// RUN: %clang -### -target amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s // AS_LINK: /clang // AS_LINK-SAME: "-cc1as" // AS_LINK: /lld // AS_LINK-SAME: "-flavor" "gnu" "-target" "amdgcn--amdhsa"
// RUN: %clang -### -target amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s // AS_LINK-LABEL: clang // AS_LINK: "-cc1as" // AS_LINK-LABEL: lld // AS_LINK: "-flavor" "gnu" "-target" "amdgcn--amdhsa" // REQUIRES: clang-driver
--- +++ @@ -1,6 +1,5 @@ // RUN: %clang -### -target amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s -// AS_LINK-LABEL: clang -// AS_LINK: "-cc1as" -// AS_LINK-LABEL: lld -// AS_LINK: "-flavor" "gnu" "-target" "amdgcn--amdhsa" -// REQUIRES: clang-driver +// AS_LINK: /clang +// AS...
Fix test to pass when the directory name has lld in it. CHECK-LABEL assumes that there is only one occurrence of the match. The output looks like: clang version 3.8.0 (trunk 247999) .... /path/to/build/dir/bin/clang-3.8 .... If the path contains lld, the second CHECK-LABEL matches it and we fail since there is no -...
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl...
a52a248ec8d38168dd15989ec6daacad1d43bdbb
#include "user.h" #include <stdlib.h> #include <string.h> #include <stdio.h> user_t* NewUser(int fd,char *addr,unsigned short port,char *name){ user_t *user = malloc(sizeof(user_t)); if(user == NULL){ goto ret; } if(fd < 0 || addr == NULL || name == NULL){ free(user); user = NU...
#include "user.h" #include <stdlib.h> #include <string.h> #include <stdio.h> user_t* NewUser(int fd,char *addr,unsigned short port,char *name){ user_t *user = malloc(sizeof(user_t)); if(user == NULL){ goto ret; } if(fd < 0 || addr == NULL || name == NULL){ free(user); user = NU...
--- +++ @@ -27,6 +27,9 @@ void AddUserToList(user_t *root,user_t *newUser){ user_t *cur = root; + if(root == NULL){ + return; + } while(cur->next != NULL){ cur = cur->next; }
Fix AddUserToList bug when root is NULL
apache-2.0
Billy4195/Simple_Chatroom
1bc76e90771befd2be6accd71b32ae2547e98f6a
// // STPLocalizationUtils.h // Stripe // // Created by Brian Dorfman on 8/11/16. // Copyright © 2016 Stripe, Inc. All rights reserved. // #import <Foundation/Foundation.h> @interface STPLocalizationUtils : NSObject /** Acts like NSLocalizedString but tries to find the string in the Stripe bundle first if poss...
// // STPLocalizedStringUtils.h // Stripe // // Created by Brian Dorfman on 8/11/16. // Copyright © 2016 Stripe, Inc. All rights reserved. // #import <Foundation/Foundation.h> #define STPLocalizedString(key, comment) \ [STPLocalizationUtils localizedStripeStringForKey:(key)] @interface STPLocalizationUtils : NSO...
--- +++ @@ -1,5 +1,5 @@ // -// STPLocalizedStringUtils.h +// STPLocalizationUtils.h // Stripe // // Created by Brian Dorfman on 8/11/16. @@ -7,9 +7,6 @@ // #import <Foundation/Foundation.h> - -#define STPLocalizedString(key, comment) \ -[STPLocalizationUtils localizedStripeStringForKey:(key)] @interfac...
Change to use inline function instead of macro. This makes FauxPas's localization checks work properly.
mit
stripe/stripe-ios,NewAmsterdamLabs/stripe-ios,stripe/stripe-ios,fbernardo/stripe-ios,fbernardo/stripe-ios,stripe/stripe-ios,stripe/stripe-ios,stripe/stripe-ios,NewAmsterdamLabs/stripe-ios,fbernardo/stripe-ios,NewAmsterdamLabs/stripe-ios,stripe/stripe-ios,NewAmsterdamLabs/stripe-ios,fbernardo/stripe-ios
7b3e6a03279e775974dd43f7ff643f170fc08d1c
#include <stdio.h> int main() { char palavrasecreta[20]; sprintf(palavrasecreta, "MELANCIA"); int acertou = 0; int enforcou = 0; do { // comecar o nosso jogo!! } while(!acertou && !enforcou); }
#include <stdio.h> int main() { char palavrasecreta[20]; sprintf(palavrasecreta, "MELANCIA"); printf("%s\n", palavrasecreta); /* palavrasecreta[0] = 'M'; palavrasecreta[1] = 'E'; palavrasecreta[2] = 'L'; palavrasecreta[3] = 'A'; palavrasecreta[4] = 'N'; palavrasecreta[5] = 'C'; palavrasecreta[...
--- +++ @@ -5,19 +5,12 @@ sprintf(palavrasecreta, "MELANCIA"); - printf("%s\n", palavrasecreta); + int acertou = 0; + int enforcou = 0; - /* - palavrasecreta[0] = 'M'; - palavrasecreta[1] = 'E'; - palavrasecreta[2] = 'L'; - palavrasecreta[3] = 'A'; - palavrasecreta[4] = 'N'; - palavrasecreta[5] = '...
Update files, Alura, Introdução a C - Parte 2, Aula 2.3
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
e9b5d3e4c0d690b50cc9a04b2aaec37381e22854
// -*- C++ -*- #ifndef _writer_verilog_task_h_ #define _writer_verilog_task_h_ #include "writer/verilog/resource.h" namespace iroha { namespace writer { namespace verilog { class Task : public Resource { public: Task(const IResource &res, const Table &table); virtual void BuildResource(); virtual void BuildIns...
// -*- C++ -*- #ifndef _writer_verilog_task_h_ #define _writer_verilog_task_h_ #include "writer/verilog/resource.h" namespace iroha { namespace writer { namespace verilog { class Task : public Resource { public: Task(const IResource &res, const Table &table); virtual void BuildResource(); virtual void BuildIns...
--- +++ @@ -23,7 +23,7 @@ void BuildTaskCallResource(); void BuildCallWire(IResource *caller); void BuildTaskCallInsn(IInsn *insn, State *st); - void AddPort(const IModule *mod, IResource *caller); + void AddPort(const IModule *mod, IResource *caller, bool upward); void AddWire(const IModule *mod, IReso...
Fix a missed file in previous change.
bsd-3-clause
nlsynth/iroha,nlsynth/iroha
f7c992a59e005e2f555a75cc23c83948c856435a
#include "sys/select.h" #include "bits/mac_esp8266.h" #include <stdio.h> #include "usart.h" int select(SOCKET nfds, fd_set *__readfds, fd_set *__writefds, fd_set *__exceptfds, struct timeval *__timeout) { SOCKET i; /* Count the ready socket. */ int count; count = 0; /* Go through interested sockets. */ for(...
#include "sys/select.h" #include "bits/mac_esp8266.h" #include <stdio.h> #include "usart.h" int select(SOCKET nfds, fd_set *__readfds, fd_set *__writefds, fd_set *__exceptfds, struct timeval *__timeout) { SOCKET i; int c; c = 0; /* Go through interested sockets. */ for(i = SOCKET_BASE; i < nfds; i++) { if(...
--- +++ @@ -7,15 +7,16 @@ int select(SOCKET nfds, fd_set *__readfds, fd_set *__writefds, fd_set *__exceptfds, struct timeval *__timeout) { SOCKET i; - int c; + /* Count the ready socket. */ + int count; - c = 0; + count = 0; /* Go through interested sockets. */ for(i = SOCKET_BASE; i < nfds; i++) { if...
Change the variable name for more meaningful.
bsd-3-clause
starnight/MicroHttpServer,starnight/MicroHttpServer,starnight/MicroHttpServer,starnight/MicroHttpServer
34438e0e5eb32764691044269b8f3557f8c39668
#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include <mysql.h> #include <quad_tile.h> my_bool tile_for_point_init(UDF_INIT *initid, UDF_ARGS *args, char *message) { if ( args->arg_count != 2 || args->arg_type[0] != INT_RESULT || args->arg_type[1] != INT_RESULT ) { strcp...
#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include <mysql.h> #include <quad_tile.h> my_bool tile_for_point_init(UDF_INIT *initid, UDF_ARGS *args, char *message) { if ( args->arg_count != 2 || args->arg_type[0] != INT_RESULT || args->arg_type[1] != INT_RESULT ) { strcp...
--- +++ @@ -24,8 +24,8 @@ long long tile_for_point(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) { - long long lon = *(long long *)args->args[0]; - long long lat = *(long long *)args->args[1]; + long long lat = *(long long *)args->args[0]; + long long lon = *(long long *)args->args[1]; ...
Make the MySQL tile_for_point function take arguments in the same order as the ruby version.
agpl-3.0
tillmo/do-roam,tillmo/do-roam,tillmo/do-roam,tillmo/do-roam,tillmo/do-roam,tillmo/do-roam
b1a0e5ae8b3e3d1052cc7c3e3ec12750060cb173
#ifndef DIRECTORY_H #define DIRECTORY_H #if defined (ULTRIX42) || defined(ULTRIX43) /* _POSIX_SOURCE should have taken care of this, but for some reason the ULTRIX version of dirent.h is not POSIX conforming without it... */ # define __POSIX #endif #include <dirent.h> #if defined(SUNOS41) /* Note that functio...
#ifndef DIRECTORY_H #define DIRECTORY_H #if defined (ULTRIX42) || defined(ULTRIX43) /* _POSIX_SOURCE should have taken care of this, */ #define __POSIX /* but for some reason the ULTRIX version of dirent.h */ #endif /* is not POSIX conforming without it... */ #include <dirent.h> class Directory { public: Dire...
--- +++ @@ -1,11 +1,23 @@ #ifndef DIRECTORY_H #define DIRECTORY_H -#if defined (ULTRIX42) || defined(ULTRIX43) /* _POSIX_SOURCE should have taken care of this, */ -#define __POSIX /* but for some reason the ULTRIX version of dirent.h */ -#endif /* is not POSIX conforming without it... */ +#if defined (ULTRI...
Add prototype for seekdir() for Suns.
apache-2.0
htcondor/htcondor,clalancette/condor-dcloud,djw8605/htcondor,djw8605/htcondor,djw8605/condor,mambelli/osg-bosco-marco,neurodebian/htcondor,djw8605/htcondor,djw8605/htcondor,htcondor/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,htcondor/htcondor,zhangzhehust/htcondor,htcondor/htcondor,htcondor/htcondor,djw8605/ht...
cc74b1067d791ce7f765eba8b67e2d1000c2cfcb
// // GWCollapsibleTable.h // CollapsibleTable // // Created by Greg Wang on 13-1-3. // Copyright (c) 2013年 Greg Wang. All rights reserved. // #import "NSObject+GWCollapsibleTable.h" #import "UITableView+GWCollapsibleTable.h" @protocol GWCollapsibleTableDataSource <NSObject> - (BOOL)tableView:(UITableView *)tabl...
// // GWCollapsibleTable.h // CollapsibleTable // // Created by Greg Wang on 13-1-3. // Copyright (c) 2013年 Greg Wang. All rights reserved. // @protocol GWCollapsibleTableDataSource <NSObject> - (BOOL)tableView:(UITableView *)tableView canCollapseSection:(NSInteger)section; - (UITableViewCell *)tableView:(UITable...
--- +++ @@ -5,6 +5,9 @@ // Created by Greg Wang on 13-1-3. // Copyright (c) 2013年 Greg Wang. All rights reserved. // + +#import "NSObject+GWCollapsibleTable.h" +#import "UITableView+GWCollapsibleTable.h" @protocol GWCollapsibleTableDataSource <NSObject> @@ -20,6 +23,11 @@ @protocol GWCollapsibleTableDelega...
Add necessary interfaces Add optional delegate methods
mit
yocaminobien/GWCollapsibleTable,gregwym/GWCollapsibleTable
6dcac4a16d43bc76b5e4492233cd170699f30875
#include <time.h> #include <sstream> #include <iostream> clock_t calc_time0,calc_time1; double calc_time; void printTime(const std::string& msg, long long iterations, double iterPerSec) { std::stringstream ss; ss << msg; while (ss.tellp() < 30) { ss << ' '; } ss << " iterations=" << iterat...
#include <time.h> clock_t calc_time0,calc_time1; double calc_time; #define TIME_ON calc_time0=clock(); #define TIME_OFF(msg) calc_time1=clock(); \ calc_time=(double)(calc_time1-calc_time0)/CLOCKS_PER_SEC; \ std::cout<<msg<<": iterations="<<i \ <<" CPU Time="<<std...
--- +++ @@ -1,11 +1,31 @@ #include <time.h> +#include <sstream> +#include <iostream> clock_t calc_time0,calc_time1; double calc_time; + +void printTime(const std::string& msg, long long iterations, double iterPerSec) { + std::stringstream ss; + ss << msg; + while (ss.tellp() < 30) { + ss << ' '; ...
Print times in fixed columns. Makes it easier to compare.
lgpl-2.1
worldforge/atlas-cpp,worldforge/atlas-cpp,worldforge/atlas-cpp,worldforge/atlas-cpp,worldforge/atlas-cpp,worldforge/atlas-cpp
771cb01c0311688f00593cc2a309e32afdbd4b40
/* Copyright (c) 2016, Nokia * Copyright (c) 2016, ENEA Software AB * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #ifndef __OFP_EPOLL_H__ #define __OFP_EPOLL_H__ #include <stdint.h> #if __GNUC__ >= 4 #pragma GCC visibility push(default) #endif typedef union ofp_epoll_data { void *...
/* Copyright (c) 2016, Nokia * Copyright (c) 2016, ENEA Software AB * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #ifndef __OFP_EPOLL_H__ #define __OFP_EPOLL_H__ #include <stdint.h> typedef union ofp_epoll_data { void *ptr; int fd; uint32_t u32; uint64_t u64; } ofp_epoll_da...
--- +++ @@ -9,6 +9,10 @@ #define __OFP_EPOLL_H__ #include <stdint.h> + +#if __GNUC__ >= 4 +#pragma GCC visibility push(default) +#endif typedef union ofp_epoll_data { void *ptr; @@ -37,4 +41,8 @@ int ofp_epoll_wait(int epfd, struct ofp_epoll_event *events, int maxevents, int timeout); +#if __GNUC__ >...
Add visibility to epoll headers The odp_epoll_* symbols were not visible in the final library built with GCC. Signed-off-by: Oriol Arcas <a98c9d4e37de3d71db2e1a293b51c579a914c4ae@starflownetworks.com> Reviewed-by: Sorin Vultureanu <8013ba55f8675034bc2ab0d6c3a1c9650437ca36@enea.com>
bsd-3-clause
TolikH/ofp,TolikH/ofp,OpenFastPath/ofp,OpenFastPath/ofp,OpenFastPath/ofp,TolikH/ofp,OpenFastPath/ofp
35bc38ac4592800a2c3d13b001a0b66679c8f0b7
// // SMLTextViewPrivate.h // Fragaria // // Created by Daniele Cattaneo on 26/02/15. // // #import <Cocoa/Cocoa.h> #import "SMLTextView.h" #import "SMLAutoCompleteDelegate.h" @interface SMLTextView () /** The autocomplete delegate for this text view. This property is private * because it is set to an internal...
// // SMLTextViewPrivate.h // Fragaria // // Created by Daniele Cattaneo on 26/02/15. // // #import <Cocoa/Cocoa.h> #import "SMLTextView.h" #import "SMLAutoCompleteDelegate.h" @interface SMLTextView () /** The autocomplete delegate for this text view. This property is private * because it is set to an internal...
--- +++ @@ -17,7 +17,7 @@ /** The autocomplete delegate for this text view. This property is private * because it is set to an internal object when MGSFragaria's autocomplete * delegate is set to nil. */ -@property id<SMLAutoCompleteDelegate> autocompleteDelegate; +@property (weak) id<SMLAutoCompleteDelegate> au...
Use weak attribute for the autocompleteDelegate property of SMLTextView.
apache-2.0
shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,vakoc/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,bitstadium/Fragaria,shysaur/Fragaria,bitstadium/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,vakoc/Fragaria,shysaur/Frag...
d19c36737dd3d2111911c411b19f1a270415b079
// RUN: %clang -target armv7-apple-darwin10 \ // RUN: -mno-global-merge -### -fsyntax-only %s 2> %t // RUN: FileCheck --check-prefix=CHECK-NGM < %t %s // RUN: %clang -target arm64-apple-ios7 \ // RUN: -mno-global-merge -### -fsyntax-only %s 2> %t // RUN: FileCheck --check-prefix=CHECK-NGM < %t %s // CHECK-NGM: "-...
// RUN: %clang -target armv7-apple-darwin10 \ // RUN: -mno-global-merge -### -fsyntax-only %s 2> %t // RUN: FileCheck --check-prefix=CHECK-NGM < %t %s // RUN: %clang -target arm64-apple-ios7 \ // RUN: -mno-global-merge -### -fsyntax-only %s 2> %t // RUN: FileCheck --check-prefix=CHECK-NGM < %t %s // CHECK-NGM: "-...
--- +++ @@ -18,8 +18,3 @@ // CHECK-GM-NOT: "-mglobal-merge" -// RUN: %clang -target armv7-apple-darwin10 \ -// RUN: -mno-global-merge -c %s - -// RUN: %clang -target armv7-apple-darwin10 \ -// RUN: -mglobal-merge -c %s
Revert new test from 213993. It requires an arm backend and also writes output in the test directory. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@213998 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl...
4026b3ed5ed0c6af1312ac58a2ec578637d9175a
/* * $Id$ */ #include <errno.h> #include <time.h> /* from libvarnish/argv.c */ void FreeArgv(char **argv); char **ParseArgv(const char *s, int comment); /* from libvarnish/time.c */ void TIM_format(time_t t, char *p); time_t TIM_parse(const char *p); /* from libvarnish/version.c */ void varnish_version(const char...
/* * $Id$ */ #include <errno.h> #include <time.h> /* from libvarnish/argv.c */ void FreeArgv(char **argv); char **ParseArgv(const char *s, int comment); /* from libvarnish/time.c */ void TIM_format(time_t t, char *p); time_t TIM_parse(const char *p); /* from libvarnish/version.c */ void varnish_version(const char...
--- +++ @@ -22,7 +22,7 @@ #else /* WITH_ASSERTS */ #define assert(e) \ do { \ - if (e) \ + if (!(e)) \ lbv_assert(__func__, __FILE__, __LINE__, #e, errno); \ } while (0) #endif
Make assert do the right thing git-svn-id: 2c9807fa3ff65b17195bd55dc8a6c4261e10127b@745 d4fa192b-c00b-0410-8231-f00ffab90ce4
bsd-2-clause
alarky/varnish-cache-doc-ja,mrhmouse/Varnish-Cache,drwilco/varnish-cache-drwilco,ajasty-cavium/Varnish-Cache,franciscovg/Varnish-Cache,ambernetas/varnish-cache,drwilco/varnish-cache-drwilco,alarky/varnish-cache-doc-ja,ssm/pkg-varnish,ambernetas/varnish-cache,drwilco/varnish-cache-drwilco,gauthier-delacroix/Varnish-Cach...
e10ab25f34927dedde7ad7621d9767b8ab76b857
// // SVProgressHUDAppDelegate.h // SVProgressHUD // // Created by Sam Vermette on 27.03.11. // Copyright 2011 Sam Vermette. All rights reserved. // #import <UIKit/UIKit.h> @class ViewController; @interface AppDelegate : NSObject <UIApplicationDelegate> @property (strong, nonatomic) IBOutlet UIWindow *window; @...
// // SVProgressHUDAppDelegate.h // SVProgressHUD // // Created by Sam Vermette on 27.03.11. // Copyright 2011 Sam Vermette. All rights reserved. // #import <UIKit/UIKit.h> @class ViewController; @interface AppDelegate : NSObject <UIApplicationDelegate> { UIWindow *__weak window; ViewController *__weak v...
--- +++ @@ -10,13 +10,10 @@ @class ViewController; -@interface AppDelegate : NSObject <UIApplicationDelegate> { - UIWindow *__weak window; - ViewController *__weak viewController; -} +@interface AppDelegate : NSObject <UIApplicationDelegate> -@property (weak, nonatomic) IBOutlet UIWindow *window; -@prope...
Fix ARC warning in demo project.
mit
sdonly/SVProgressHUD,luxe-eng/valet-ios.SVProgressHUD,phildow/SVProgressHUD,ohyeslk/SVProgressHUD,Sunday4/SVProgressHUD,CoderJFCK/SVProgressHUD,cnzlh/SVProgressHUD,bertramdev/SVProgressHUD,lyndonChen/SVProgressHUD,wrcj12138aaa/SVProgressHUD,DramaFever/DFProgressHUD,CPF183/SVProgressHUD,PeeJWeeJ/SwiftyHUD,ddc391565320/S...
8bf24c66e6a41067fb4fb7b443fb6ea85dc96b8e
/* How to fuzz: clang main.c -O2 -g -fsanitize=address,fuzzer -o fuzz cp -r data temp ./fuzz temp/ -dict=gltf.dict -jobs=12 -workers=12 */ #define CGLTF_IMPLEMENTATION #include "../cgltf.h" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { cgltf_options options = {cgltf_file_type_invalid}; cgltf_data*...
/* How to fuzz: clang main.c -O2 -g -fsanitize=address,fuzzer -o fuzz cp -r data temp ./fuzz temp/ -dict=gltf.dict -jobs=12 -workers=12 */ #define CGLTF_IMPLEMENTATION #include "../cgltf.h" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { cgltf_options options = {0}; cgltf_data* data = NULL; cgltf_r...
--- +++ @@ -10,7 +10,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { - cgltf_options options = {0}; + cgltf_options options = {cgltf_file_type_invalid}; cgltf_data* data = NULL; cgltf_result res = cgltf_parse(&options, Data, Size, &data); if (res == cgltf_result_success)
fuzz: Fix fuzzer to compile in C++ mode
mit
jkuhlmann/cgltf,jkuhlmann/cgltf,jkuhlmann/cgltf
6bc2c3564661acd3ebbd00843a8c09d5944a1da0
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * * Copyright (C) 2010 Red Hat, Inc. * Copyright (C) 2010 Collabora Ltd. * * 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 F...
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * * Copyright (C) 2010 Red Hat, Inc. * Copyright (C) 2010 Collabora Ltd. * * 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 F...
--- +++ @@ -30,8 +30,6 @@ void g_io_module_load (GIOModule *module) { - textdomain (GETTEXT_PACKAGE); - cc_empathy_accounts_panel_register (module); }
accounts-module: Remove call to textdomain () This shouldn't be called in shared module. Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=617262
lgpl-2.1
GNOME/telepathy-account-widgets,Distrotech/telepathy-account-widgets,Distrotech/telepathy-account-widgets,GNOME/telepathy-account-widgets,GNOME/telepathy-account-widgets
849dcc2fd36ec01352a3544c501cbbe5afa78d95
#ifndef LMS7_MCU_PROGRAMS_H #define LMS7_MCU_PROGRAMS_H #include "LimeSuiteConfig.h" #include <stdint.h> #define MCU_PROGRAM_SIZE 16384 #define MCU_ID_DC_IQ_CALIBRATIONS 0x01 #define MCU_ID_CALIBRATIONS_SINGLE_IMAGE 0x05 #define MCU_FUNCTION_CALIBRATE_TX 1 #define MCU_FUNCTION_CALIBRATE_RX 2 #define MCU_FUNCTION_UP...
#ifndef LMS7_MCU_PROGRAMS_H #define LMS7_MCU_PROGRAMS_H #include "LimeSuiteConfig.h" #include <stdint.h> #define MCU_PROGRAM_SIZE 16384 #define MCU_ID_DC_IQ_CALIBRATIONS 0x01 #define MCU_ID_CALIBRATIONS_SINGLE_IMAGE 0x05 #define MCU_FUNCTION_CALIBRATE_TX 1 #define MCU_FUNCTION_CALIBRATE_RX 2 #define MCU_FUNCTION_UP...
--- +++ @@ -13,8 +13,8 @@ #define MCU_FUNCTION_CALIBRATE_RX 2 #define MCU_FUNCTION_UPDATE_BW 3 #define MCU_FUNCTION_UPDATE_REF_CLK 4 -#define MCU_FUNCTION_TUNE_TX_FILTER 5 -#define MCU_FUNCTION_TUNE_RX_FILTER 6 +#define MCU_FUNCTION_TUNE_RX_FILTER 5 +#define MCU_FUNCTION_TUNE_TX_FILTER 6 #define MCU_FUNCTION_UPDA...
Fix MCU procedure ID definitions.
apache-2.0
myriadrf/LimeSuite,myriadrf/LimeSuite,myriadrf/LimeSuite,myriadrf/LimeSuite,myriadrf/LimeSuite
aa6cb15c3969e2f711e98c3f3012efbe0679d87e
// Copyright 2012 Rui Ueyama <rui314@gmail.com> // This program is free software licensed under the MIT license. #include "test.h" #define stringify(x) #x void digraph(void) { expect_string("[", stringify(<:)); expect_string("]", stringify(:>)); expect_string("{", stringify(<%)); expect_string("}", s...
// Copyright 2012 Rui Ueyama <rui314@gmail.com> // This program is free software licensed under the MIT license. #include "test.h" #define stringify(x) #x void digraph(void) { expect_string("[", stringify(<:)); expect_string("]", stringify(:>)); expect_string("{", stringify(<%)); expect_string("}", s...
--- +++ @@ -32,9 +32,16 @@ )); } +void newline(void) { + + +# +} + void testmain(void) { print("lexer"); digraph(); escape(); whitespace(); + newline(); }
Add a test for line separator characters.
mit
jtramm/8cc,vastin/8cc,vastin/8cc,8l/8cc,vastin/8cc,nobody1986/8cc,rui314/8cc,cpjreynolds/8cc,abc00/8cc,nobody1986/8cc,gergo-/8cc,rui314/8cc,jtramm/8cc,andrewchambers/8cc,andrewchambers/8cc,nobody1986/8cc,cpjreynolds/8cc,8l/8cc,andrewchambers/8cc,abc00/8cc,andrewchambers/8cc,jtramm/8cc,cpjreynolds/8cc,jtramm/8cc,gergo-/...
b9b636884725b783c3a33cf762148cbf19e0458d
#ifndef ROLE_H_ #define ROLE_H_ #include "State.h" #include "Location.h" #include <vector> // this class is partial abstract class Role { public: // reference to the main state State& state; // neighbors std::vector<int> neighbors; private: // position of the ant int x, y; // ant's id...
#ifndef ROLE_H_ #define ROLE_H_ #include "State.h" class Role{ public: State& state; int x,y; Role(State _state, int _id = 0, int _x = 0, int _y = 0) : state(_state), id(_id), x(_x), y(_y) {} int getID(){ return id; } virtual void move() = 0; private: //changing id is i...
--- +++ @@ -1,20 +1,68 @@ + #ifndef ROLE_H_ #define ROLE_H_ #include "State.h" +#include "Location.h" -class Role{ - public: +#include <vector> + +// this class is partial abstract +class Role { + +public: + + // reference to the main state State& state; - int x,y; - Role(State _state, int _id = ...
Add more features ( made it more functional )
mit
KorlaMarch/Ant-bot,KorlaMarch/Ant-bot,KorlaMarch/Ant-bot,KorlaMarch/Ant-bot,KorlaMarch/Ant-bot,KorlaMarch/Ant-bot,KorlaMarch/Ant-bot
58d8ac057e53be1a71a519fe4db7d83e7cf8056a
#include "GRT/GRT.h" #include "istream.h" using namespace GRT; // Normalize by dividing each dimension by the total magnitude. // Also add the magnitude as an additional feature. vector<double> normalize(vector<double> input) { double magnitude = 0.0; for (int i = 0; i < input.size(); i++) magnitude += (inpu...
#include "GRT/GRT.h" #include "istream.h" using namespace GRT; // Normalize by dividing each dimension by the total magnitude. // Also add the magnitude as an additional feature. vector<double> normalize(vector<double> input) { double magnitude; for (int i = 0; i < input.size(); i++) magnitude += (input[...
--- +++ @@ -6,14 +6,14 @@ // Normalize by dividing each dimension by the total magnitude. // Also add the magnitude as an additional feature. vector<double> normalize(vector<double> input) { - double magnitude; - + double magnitude = 0.0; + for (int i = 0; i < input.size(); i++) magnitude += (input[...
Initialize double variable before use. Also removed trailing spaces.
bsd-3-clause
damellis/ESP,damellis/ESP
546aa3b916172c46fa6df8f7a002949c3976c060
#include "clar_libgit2.h" #include "git2/clone.h" static git_repository *g_repo; #if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT) static bool g_has_ssl = true; #else static bool g_has_ssl = false; #endif void test_online_badssl__expired(void) { if (!g_has_ssl) cl_skip(); cl_git...
#include "clar_libgit2.h" #include "git2/clone.h" static git_repository *g_repo; #if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT) void test_online_badssl__expired(void) { cl_git_fail_with(GIT_ECERTIFICATE, git_clone(&g_repo, "https://expired.badssl.com/fake.git", "./fake", NULL...
--- +++ @@ -5,23 +5,34 @@ static git_repository *g_repo; #if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT) +static bool g_has_ssl = true; +#else +static bool g_has_ssl = false; +#endif void test_online_badssl__expired(void) { + if (!g_has_ssl) + cl_skip(); + cl_git_fail_with...
Fix build for unit test If none of GIT_OPENSSL, GIT_WINHTTP or GIT_SECURE_TRANSPORT is defined we should also be able to build the unit test.
lgpl-2.1
stewid/libgit2,magnus98/TEST,leoyanggit/libgit2,Tousiph/Demo1,yongthecoder/libgit2,jeffhostetler/public_libgit2,KTXSoftware/libgit2,KTXSoftware/libgit2,saurabhsuniljain/libgit2,magnus98/TEST,yongthecoder/libgit2,KTXSoftware/libgit2,magnus98/TEST,yongthecoder/libgit2,Tousiph/Demo1,Tousiph/Demo1,Corillian/libgit2,saurabh...
505e4531b7e52daf6caa9eac9904d9a014e0d14f
/** * @file * * @brief * * @copyright BSD License (see LICENSE.md or https://www.libelektra.org) */ #ifndef ELEKTRA_PLUGIN_CCODE_H #define ELEKTRA_PLUGIN_CCODE_H #include <kdbplugin.h> typedef struct { unsigned char encode[256]; unsigned char decode[256]; char escape; char * buf; size_t bufalloc; } CCod...
/** * @file * * @brief * * @copyright BSD License (see LICENSE.md or https://www.libelektra.org) */ #ifndef ELEKTRA_PLUGIN_CCODE_H #define ELEKTRA_PLUGIN_CCODE_H #include <kdbplugin.h> typedef struct { char encode[256]; char decode[256]; char escape; char * buf; size_t bufalloc; } CCodeData; ssize_t ke...
--- +++ @@ -13,8 +13,8 @@ typedef struct { - char encode[256]; - char decode[256]; + unsigned char encode[256]; + unsigned char decode[256]; char escape;
CCode: Use `unsigned char` for mapping
bsd-3-clause
e1528532/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,mpranj/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,mpranj/libelektra,mpranj/libelektra,petermax2/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,mpranj/libelektra,petermax2/libelektra,mpra...
9fd8c99a43beea140d4656bc5871ed2b0ea3328c
#include "pg_query.h" #include "pg_query_internal.h" #include <mb/pg_wchar.h> const char* progname = "pg_query"; void pg_query_init(void) { MemoryContextInit(); SetDatabaseEncoding(PG_UTF8); }
#include "pg_query.h" #include "pg_query_internal.h" const char* progname = "pg_query"; void pg_query_init(void) { MemoryContextInit(); }
--- +++ @@ -1,9 +1,11 @@ #include "pg_query.h" #include "pg_query_internal.h" +#include <mb/pg_wchar.h> const char* progname = "pg_query"; void pg_query_init(void) { MemoryContextInit(); + SetDatabaseEncoding(PG_UTF8); }
Set database encoding to UTF8. Fixes error when parsing this statement: SELECT U&'\0441\043B\043E\043D' The error is: Unicode escape values cannot be used for code point values above 007F when the server encoding is not UTF8. Perhapes there could be an API to set the encoding used by the parser. But I think it mak...
bsd-3-clause
lfittl/libpg_query,ranxian/peloton-frontend,lfittl/libpg_query,lfittl/libpg_query,ranxian/peloton-frontend,ranxian/peloton-frontend,ranxian/peloton-frontend,ranxian/peloton-frontend
743a89c5c27c3c17b87af5df8c381d95b00f2f42
#ifndef PHP_PHPIREDIS_H #define PHP_PHPIREDIS_H 1 #define PHP_PHPIREDIS_VERSION "1.0.0" #define PHP_PHPIREDIS_EXTNAME "phpiredis" PHP_MINIT_FUNCTION(phpiredis); PHP_FUNCTION(phpiredis_connect); PHP_FUNCTION(phpiredis_pconnect); PHP_FUNCTION(phpiredis_disconnect); PHP_FUNCTION(phpiredis_command_bs); PHP_FUNCTION(phpir...
#ifndef PHP_PHPIREDIS_H #define PHP_PHPIREDIS_H 1 #define PHP_PHPIREDIS_VERSION "1.0" #define PHP_PHPIREDIS_EXTNAME "phpiredis" PHP_MINIT_FUNCTION(phpiredis); PHP_FUNCTION(phpiredis_connect); PHP_FUNCTION(phpiredis_pconnect); PHP_FUNCTION(phpiredis_disconnect); PHP_FUNCTION(phpiredis_command_bs); PHP_FUNCTION(phpired...
--- +++ @@ -1,7 +1,7 @@ #ifndef PHP_PHPIREDIS_H #define PHP_PHPIREDIS_H 1 -#define PHP_PHPIREDIS_VERSION "1.0" +#define PHP_PHPIREDIS_VERSION "1.0.0" #define PHP_PHPIREDIS_EXTNAME "phpiredis" PHP_MINIT_FUNCTION(phpiredis);
Add patch release in PHP_PHPIREDIS_VERSION.
bsd-2-clause
jymsy/phpiredis,nrk/phpiredis,RustJason/phpiredis,Danack/phpiredis,RustJason/phpiredis,Danack/phpiredis,jymsy/phpiredis,RustJason/phpiredis,nrk/phpiredis,Danack/phpiredis,nrk/phpiredis
9a909d3e6778fd655397f304bf42cdce163e43a0
#include "redislite.h" #include <string.h> static void test_add_key(redislite *db) { int rnd = rand(); char key[14]; sprintf(key, "%d", rnd); int size = strlen(key); redislite_insert_key(db, key, size, 0); } int main() { redislite *db = redislite_open_database("test.db"); int i; for (i=0; i < 100; i++) tes...
#include "redislite.h" #include <string.h> static void test_add_key(redislite *db) { int rnd = arc4random(); char key[14]; sprintf(key, "%d", rnd); int size = strlen(key); redislite_insert_key(db, key, size, 0); } int main() { redislite *db = redislite_open_database("test.db"); int i; for (i=0; i < 100; i++)...
--- +++ @@ -3,7 +3,7 @@ static void test_add_key(redislite *db) { - int rnd = arc4random(); + int rnd = rand(); char key[14]; sprintf(key, "%d", rnd); int size = strlen(key);
Use rand instead of arc4random (linux doesn't support it)
bsd-2-clause
seppo0010/redislite,seppo0010/redislite,pombredanne/redislite,pombredanne/redislite
49b8e80371bfa380dd34168a92d98b639ca1202a
/* * Copyright (c) 2013-2016 Apple Inc. All rights reserved. * * @APPLE_APACHE_LICENSE_HEADER_START@ * * 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/lic...
/* * Copyright (c) 2013-2016 Apple Inc. All rights reserved. * * @APPLE_APACHE_LICENSE_HEADER_START@ * * 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/lic...
--- +++ @@ -22,7 +22,8 @@ #include "shims.h" #if !HAVE_STRLCPY -size_t strlcpy(char *dst, const char *src, size_t size) { +size_t strlcpy(char *dst, const char *src, size_t size) +{ size_t res = strlen(dst) + strlen(src) + 1; if (size > 0) { size_t n = size - 1;
Fix formatting to match libdispatch coding style.
apache-2.0
apple/swift-corelibs-libdispatch,apple/swift-corelibs-libdispatch,apple/swift-corelibs-libdispatch,apple/swift-corelibs-libdispatch
4ee60d1890ae12729a9afda7e64dd2c12d48776a
#ifndef iRRAM_MPFR_EXTENSION_H #define iRRAM_MPFR_EXTENSION_H #ifndef GMP_RNDN #include <mpfr.h> #endif #ifdef __cplusplus extern "C" { #endif void mpfr_ext_exp (mpfr_ptr r, mpfr_srcptr u,int p); void mpfr_ext_log (mpfr_ptr r, mpfr_srcptr u,int p); void mpfr_ext_sin (mpfr_ptr r, mpfr_srcptr u,int p); void mpfr_ext...
#ifndef iRRAM_MPFR_EXTENSION_H #define iRRAM_MPFR_EXTENSION_H #ifndef GMP_RNDN #include <mpfr.h> #endif #ifdef __cplusplus extern "C" { #endif void mpfr_ext_exp (mpfr_ptr r, mpfr_srcptr u,int p); void mpfr_ext_log (mpfr_ptr r, mpfr_srcptr u,int p); void mpfr_ext_sin (mpfr_ptr r, mpfr_srcptr u,int p); void mpfr_ext...
--- +++ @@ -17,8 +17,6 @@ void mpfr_ext_tan (mpfr_ptr r, mpfr_srcptr u,int p); void mpfr_ext_test (mpfr_ptr r, mpfr_srcptr u,int p,mp_rnd_t rnd_mode); -void iRRAM_initialize(int argc,char **argv); - #ifdef __cplusplus } #endif
Delete duplicate (and incompatible) declaration of iRRAM_initialize().
lgpl-2.1
norbert-mueller/iRRAM,norbert-mueller/iRRAM,norbert-mueller/iRRAM
77c380c9d57553e114b253630dcb1283c7096730
/* * Copyright 2008 Markus Prinz * Released unter an MIT licence * */ #include <ruby.h> #include <CoreMIDI/CoreMIDI.h> VALUE callback_proc = Qnil; MIDIPortRef inPort = NULL; MIDIClientRef client = NULL; static void RbMIDIReadProc(const MIDIPacketList* packetList, void* readProcRefCon, void* srcConnRefCon) { ...
/* * Copyright 2008 Markus Prinz * Released unter an MIT licence * */ #include <ruby.h> #include <CoreMIDI/CoreMIDI.h> VALUE callback_proc = Qnil; MIDIPortRef inPort = NULL; MIDIClientRef client = NULL; static void RbMIDIReadProc(const MIDIPacketList* packetList, void* readProcRefCon, void* srcConnRefCon) { ...
--- +++ @@ -18,6 +18,28 @@ } +static VALUE t_sources(VALUE self) +{ + int number_of_sources = MIDIGetNumberOfSources(); + + VALUE source_ary = rb_ary_new2(number_of_sources); + + for(int idx = 0; idx < number_of_sources; ++idx) + { + MIDIEndpointRef src = MIDIGetSource(idx); + ...
Add best guess at a method that returns an array with the names of all sources
mit
cypher/rbcoremidi,cypher/rbcoremidi
e1f21893cedcb02fc76415e2bb95b3d0c06d1abf
#ifndef _ASM_X86_NUMA_32_H #define _ASM_X86_NUMA_32_H extern int numa_off; extern int pxm_to_nid(int pxm); #ifdef CONFIG_NUMA extern int __cpuinit numa_cpu_node(int cpu); #else /* CONFIG_NUMA */ static inline int numa_cpu_node(int cpu) { return NUMA_NO_NODE; } #endif /* CONFIG_NUMA */ #ifdef CONFIG_HIGHMEM extern ...
#ifndef _ASM_X86_NUMA_32_H #define _ASM_X86_NUMA_32_H extern int numa_off; extern int pxm_to_nid(int pxm); #ifdef CONFIG_NUMA extern int __cpuinit numa_cpu_node(int apicid); #else /* CONFIG_NUMA */ static inline int numa_cpu_node(int cpu) { return NUMA_NO_NODE; } #endif /* CONFIG_NUMA */ #ifdef CONFIG_HIGHMEM exte...
--- +++ @@ -6,7 +6,7 @@ extern int pxm_to_nid(int pxm); #ifdef CONFIG_NUMA -extern int __cpuinit numa_cpu_node(int apicid); +extern int __cpuinit numa_cpu_node(int cpu); #else /* CONFIG_NUMA */ static inline int numa_cpu_node(int cpu) { return NUMA_NO_NODE; } #endif /* CONFIG_NUMA */
x86: Rename incorrectly named parameter of numa_cpu_node() numa_cpu_node() prototype in numa_32.h has wrongly named parameter @apicid when it actually takes the CPU number. Change it to @cpu. Reported-by: Yinghai Lu <0674548f4d596393408a51d6287a76ebba2f42aa@kernel.org> Signed-off-by: Tejun Heo <546b05909706652891a87...
mit
KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Program...
eff9073790e1286aa12bf1c65814d3e0132b12e1
#pragma once #include "augs/math/declare_math.h" #include "augs/audio/distance_model.h" struct sound_effect_modifier { // GEN INTROSPECTOR struct sound_effect_modifier real32 gain = 1.f; real32 pitch = 1.f; real32 max_distance = -1.f; real32 reference_distance = -1.f; real32 doppler_factor = 1.f; char repetitio...
#pragma once #include "augs/math/declare_math.h" #include "augs/audio/distance_model.h" struct sound_effect_modifier { // GEN INTROSPECTOR struct sound_effect_modifier real32 gain = 1.f; real32 pitch = 1.f; real32 max_distance = -1.f; real32 reference_distance = -1.f; real32 doppler_factor = 1.f; augs::distance...
--- +++ @@ -9,11 +9,10 @@ real32 max_distance = -1.f; real32 reference_distance = -1.f; real32 doppler_factor = 1.f; - augs::distance_model distance_model = augs::distance_model::NONE; - int repetitions = 1; + char repetitions = 1; bool fade_on_exit = true; bool disable_velocity = false; bool always_direc...
FIx sound(..)modifier compaibility with old maps
agpl-3.0
TeamHypersomnia/Hypersomnia,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Hypersomnia
f9b6386e1f69a8f5b4d69b0f1af75d242bcd71e9
static int parent_main(pid_t child_pid) { pid_t pid; int status; pid = wait4(child_pid, &status, WNOHANG, NULL); if (pid != 0) return (1); return (0); } int main(int argc, const char *argv[]) { pid_t child_pid; int retval; child_pid = fork(); switch (child_pid) { case -1: return (18); case 0: for ...
static int parent_main(pid_t child_pid) { pid_t pid; int status; pid = wait4(child_pid, &status, WNOHANG, NULL); if (pid != 0) return (1); return (0); } static void signal_handler(int sig) { } int main(int argc, const char *argv[]) { struct sigaction act; struct timespec t; pid_t child_pid; int retval; ...
--- +++ @@ -12,34 +12,19 @@ return (0); } -static void -signal_handler(int sig) -{ -} - int main(int argc, const char *argv[]) { - struct sigaction act; - struct timespec t; pid_t child_pid; int retval; - - act.sa_handler = signal_handler; - act.sa_flags = 0; - if (sigfillset(&act.sa_mask) == -1) - retur...
Simplify the test for wait4(2) with WNOHANG.
mit
SumiTomohiko/fsyscall2,SumiTomohiko/fsyscall2,SumiTomohiko/fsyscall2,SumiTomohiko/fsyscall2,SumiTomohiko/fsyscall2
c03ed8c4aa935e2490178b52fbaa73675137f626
#include <stdio.h> #define NUMERO_DE_TENTATIVAS 5 int main() { // imprime o cabecalho do nosso jogo printf("******************************************\n"); printf("* Bem vindo ao nosso jogo de adivinhação *\n"); printf("******************************************\n"); int numerosecreto = 42; int chute; ...
#include <stdio.h> #define NUMERO_DE_TENTATIVAS 5 int main() { // imprime o cabecalho do nosso jogo printf("******************************************\n"); printf("* Bem vindo ao nosso jogo de adivinhação *\n"); printf("******************************************\n"); int numerosecreto = 42; int chute; ...
--- +++ @@ -21,6 +21,13 @@ scanf("%d", &chute); printf("Seu chute foi %d\n", chute); + if(chute < 0) { + printf("Você não pode chutar números negativos!\n"); + i--; + + continue; + } + int acertou = chute == numerosecreto; int maior = chute > numerosecreto; int menor = ...
Update files, Alura, Introdução a C, Aula 2.9
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
e8fad243e1003a0113dc229ed18bd16651c009b4
#include <err.h> #include <stdio.h> #include <stdlib.h> #include "libspell.h" #include "websters.c" int main(int argc, char **argv) { size_t i; char *soundex_code; FILE *out = fopen("dict/soundex.txt", "w"); if (out == NULL) err(EXIT_FAILURE, "Failed to open soundex"); for (i = 0; i < sizeof(dict) / sizeof(di...
#include <err.h> #include <stdio.h> #include <stdlib.h> #include "libspell.h" #include "websters.c" int main(int argc, char **argv) { size_t i; char *soundex_code; FILE *out = fopen("dict/soundex.txt", "w"); if (out == NULL) err(EXIT_FAILURE, "Failed to open soundex"); for (i = 0; i < sizeof(dict) / sizeof(di...
--- +++ @@ -20,7 +20,7 @@ warnx("No soundex code found for %s", dict[i++]); continue; } - fprintf(out, "%s\t%s\n", dict[i], soundex_code); + fprintf(out, "%s\t%s\n", soundex_code, dict[i]); free(soundex_code); }
Change the order of the strings First we should output the soundex code and then the string (makes the parsing of the file easier)
bsd-2-clause
abhinav-upadhyay/nbspell,abhinav-upadhyay/nbspell
a53a81ca5adc6febb775d912e8d326c9e69f584e
// RUN: %clang_analyze_cc1 -w -x c -analyzer-checker=core -analyzer-output=text -verify %s // Avoid the crash when finding the expression for tracking the origins // of the null pointer for path notes. void pr34373() { int *a = 0; // expected-note{{'a' initialized to a null pointer value}} (a + 0)[0]; // expected-...
// RUN: %clang_analyze_cc1 -w -x c -analyzer-checker=core -analyzer-output=text -verify %s // Avoid the crash when finding the expression for tracking the origins // of the null pointer for path notes. Apparently, not much actual tracking // needs to be done in this example. void pr34373() { int *a = 0; // expected-...
--- +++ @@ -1,8 +1,7 @@ // RUN: %clang_analyze_cc1 -w -x c -analyzer-checker=core -analyzer-output=text -verify %s // Avoid the crash when finding the expression for tracking the origins -// of the null pointer for path notes. Apparently, not much actual tracking -// needs to be done in this example. +// of the n...
[analyzer] Fix an outdated comment in a test. NFC. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@314298 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
9a1a3f47cc175cb4588451e2c6bf2147407e16f0
#ifndef __FILTERIMPORTEREXPORTER_H__ #define __FILTERIMPORTEREXPORTER_H__ #include <qvaluelist.h> class KMFilter; class KConfig; namespace KMail { /** @short Utility class that provides persisting of filters to/from KConfig. @author Till Adam <till@kdab.net> */ class FilterImporterExporter { public: ...
#ifndef __FILTERIMPORTEREXPORTER_H__ #define __FILTERIMPORTEREXPORTER_H__ #include <qvalueList.h> class KMFilter; class KConfig; namespace KMail { /** @short Utility class that provides persisting of filters to/from KConfig. @author Till Adam <till@kdab.net> */ class FilterImporterExporter { public: ...
--- +++ @@ -1,7 +1,7 @@ #ifndef __FILTERIMPORTEREXPORTER_H__ #define __FILTERIMPORTEREXPORTER_H__ -#include <qvalueList.h> +#include <qvaluelist.h> class KMFilter; class KConfig;
Fix compilation for case-sensitive file systems. svn path=/branches/kdepim/enterprise/kdepim/; revision=728559
lgpl-2.1
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
142b3a0aa1e6c5d0addb914a13c3dd8755f89010
/* * File: Curve.h * Author: cameron * * Created on October 22, 2013, 1:07 AM */ #ifndef CURVE_H #define CURVE_H #if (defined(__AVR__)) #include <avr\pgmspace.h> #else #include <pgmspace.h> #endif class Curve { static const uint8_t etable[] PROGMEM; public: static uint8_t exponential(uint8_t); static uint...
/* * File: Curve.h * Author: cameron * * Created on October 22, 2013, 1:07 AM */ #ifndef CURVE_H #define CURVE_H #include <avr/pgmspace.h> class Curve { static const uint8_t etable[] PROGMEM; public: static uint8_t exponential(uint8_t); static uint8_t linear(uint8_t); static uint8_t reverse(uint8_t); }; ...
--- +++ @@ -8,7 +8,11 @@ #ifndef CURVE_H #define CURVE_H -#include <avr/pgmspace.h> +#if (defined(__AVR__)) +#include <avr\pgmspace.h> +#else +#include <pgmspace.h> +#endif class Curve { static const uint8_t etable[] PROGMEM;
Fix for eps8266 and athers non avr mcu :) Fix for eps8266 and athers non avr mcu :)
mit
jgillick/arduino-LEDFader
0f9d995ab74075c306b7c8b24ac930c4a93e76d0
void __VERIFIER_error() { abort(); } // Some files define __VERIFIER_assume, some declare as extern. What happens when redefined? void __VERIFIER_assume(int expression) { if (!expression) { LOOP: goto LOOP; }; return; } // #define __VERIFIER_nondet(X) X __VERIFIER_nondet_##X() { X val; return val; } #define __VERIFIE...
void __VERIFIER_error() { abort(); } int __VERIFIER_nondet_int() { int val; return val; }
--- +++ @@ -1,3 +1,19 @@ void __VERIFIER_error() { abort(); } -int __VERIFIER_nondet_int() { int val; return val; } +// Some files define __VERIFIER_assume, some declare as extern. What happens when redefined? +void __VERIFIER_assume(int expression) { if (!expression) { LOOP: goto LOOP; }; return; } + +// #define ...
Add more common __VERIFIER functions
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
4a50f0e986c8e57fb734bd66a93f951e89fa370a
#include <polygon.h> int main(int argc, char* argv[]) { Polygon lol; lol=createPolygon(); lol=addPoint(lol, createPoint(12.6,-5.3)); lol=addPoint(lol, createPoint(-4.1,456.123)); printf("\n\ntaille : %d", lol.size); printf("\n\nx premier point : %f", lol.head->value.x); printf("\ny premier point : %f\n\n",...
#include <polygon.h> int main(int argc, char* argv[]) { Polygon lol; lol=createPolygon(); lol=addPoint(lol, createPoint(12.6,-5.3)); lol=addPoint(lol, createPoint(-4.1,456.123)); printf("\n\nx premier point : %f", lol->value.x); printf("\ny premier point : %f\n\n", lol->value.y); printf("\n\nx 2eme point :...
--- +++ @@ -9,14 +9,16 @@ lol=addPoint(lol, createPoint(12.6,-5.3)); lol=addPoint(lol, createPoint(-4.1,456.123)); - printf("\n\nx premier point : %f", lol->value.x); - printf("\ny premier point : %f\n\n", lol->value.y); + printf("\n\ntaille : %d", lol.size); - printf("\n\nx 2eme point : %f", lol->next->value...
Print the size of the polygon
mit
UTBroM/GeometricLib
facf0422c56fc82a3a6d9097c582228b54ff2846
/* * File: executeStage.h * Author: Alex Savarda */ #define INSTR_COUNT 16 // Possible size of the instruction set #ifndef EXECUTESTAGE_H #define EXECUTESTAGE_H typedef struct { unsigned int stat; unsigned int icode; unsigned int ifun; unsigned int valC; unsigned int valA; unsigned...
/* * File: executeStage.h * Author: Alex Savarda */ #define INSTR_COUNT 16 // Possible size of the instruction set #ifndef EXECUTESTAGE_H #define EXECUTESTAGE_H typedef struct { unsigned int stat; unsigned int icode; unsigned int ifun; unsigned int valC; unsigned int valA; unsigned...
--- +++ @@ -6,7 +6,7 @@ #define INSTR_COUNT 16 // Possible size of the instruction set #ifndef EXECUTESTAGE_H -#define EXECUTESTAGE_H +#define EXECUTESTAGE_H typedef struct { unsigned int stat;
Convert a tab into a space
isc
sbennett1990/YESS,sbennett1990/YESS,sbennett1990/YESS
d3464b2f5f46a6db68f66a62e9d130b744cc6594
#include <stdlib.h> #include <pwd.h> #include <string.h> #include <sys/stat.h> #include <gtk/gtk.h> #include "gh-main-window.h" char * data_dir_path () { uid_t uid = getuid (); struct passwd *pw = getpwuid (uid); char *home_dir = pw->pw_dir; char *data_dir = "/.ghighlighter-c"; int length = strlen (home_di...
#include <stdlib.h> #include <pwd.h> #include <string.h> #include <gtk/gtk.h> #include "gh-main-window.h" char * data_dir_path () { uid_t uid = getuid (); struct passwd *pw = getpwuid (uid); char *home_dir = pw->pw_dir; char *data_dir = "/.ghighlighter-c"; int length = strlen (home_dir); length = length ...
--- +++ @@ -1,6 +1,7 @@ #include <stdlib.h> #include <pwd.h> #include <string.h> +#include <sys/stat.h> #include <gtk/gtk.h> #include "gh-main-window.h" @@ -23,10 +24,17 @@ return result; } +void +setup_environment (char *data_dir) +{ + mkdir (data_dir, 0755); +} + int main (int argc, char *argv[]) {...
Create data directory on startup
mit
chdorner/ghighlighter-c
88cf4c93e1fb0a39a2226abe4c869371ef0c6393
/* OCaml promise library * http://www.ocsigen.org/lwt * Copyright (C) 2009-2010 Jérémie Dimino * 2009 Mauricio Fernandez * 2010 Pierre Chambart * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * ...
/* OCaml promise library * http://www.ocsigen.org/lwt * Copyright (C) 2009-2010 Jérémie Dimino * 2009 Mauricio Fernandez * 2010 Pierre Chambart * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * ...
--- +++ @@ -24,6 +24,14 @@ #pragma once #include "lwt_config.h" +/* + * Included in: + * - unix_mcast_modify_membership.c + * - unix_mcast_set_loop.c + * - unix_mcast_set_ttl.c + * - unix_mcast_utils.c + */ + #if !defined(LWT_ON_WINDOWS) #include <caml/mlvalues.h>
Add in comments the files that uses this header
mit
c-cube/lwt,ocsigen/lwt,rneswold/lwt,ocsigen/lwt,ocsigen/lwt,rneswold/lwt,c-cube/lwt,rneswold/lwt,c-cube/lwt
bd6796b0bde2d9ccdc55fdaf7747f1846ecd459d
// Copyright (c) 2015 The BitCoin Core developers // Copyright (c) 2016 The Silk Network developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. /** * Functionality for communicating with Tor. */ #ifndef SILK_TORCONTROL_H #...
// Copyright (c) 2015 The BitCoin Core developers // Copyright (c) 2016 The Silk Network developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. /** * Functionality for communicating with Tor. */ #ifndef SILK_TORCONTROL_H #...
--- +++ @@ -12,7 +12,7 @@ #include "scheduler.h" extern const std::string DEFAULT_TOR_CONTROL; -static const bool DEFAULT_LISTEN_ONION = true; +static const bool DEFAULT_LISTEN_ONION = false; void StartTorControl(boost::thread_group& threadGroup, CScheduler& scheduler); void InterruptTorControl();
Set Tor Default Monitoring to False
mit
SilkNetwork/Silk-Core,duality-solutions/Sequence,SilkNetwork/Silk-Core,SilkNetwork/Silk-Core,duality-solutions/Sequence,duality-solutions/Sequence,SilkNetwork/Silk-Core,duality-solutions/Sequence,SilkNetwork/Silk-Core,duality-solutions/Sequence,SilkNetwork/Silk-Core,duality-solutions/Sequence
8f40a8f6eafed187bc8d5ed38b1d080c9dc2af98
//===- FuzzerRandom.h - Internal header for the Fuzzer ----------*- C++ -* ===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
//===- FuzzerRandom.h - Internal header for the Fuzzer ----------*- C++ -* ===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
--- +++ @@ -14,10 +14,10 @@ #include <random> namespace fuzzer { -class Random : public std::minstd_rand { +class Random : public std::mt19937 { public: - Random(unsigned int seed) : std::minstd_rand(seed) {} - result_type operator()() { return this->std::minstd_rand::operator()(); } + Random(unsigned int se...
Revert r352732: [libFuzzer] replace slow std::mt19937 with a much faster std::minstd_rand This causes a failure on the following bot as well as our internal ones: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/23103 git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@352747 91177308-0d34-04...
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
02815ad97a1a9cac9e580452c9dd24580f277062
#include <stdio.h> #include <stdarg.h> #include <string.h> static FILE* g_logfile = NULL; static unsigned char g_lastchar = '\n'; #ifdef _WIN32 #include <windows.h> static unsigned long g_timestamp; #else #include <sys/time.h> static struct timeval g_timestamp; #endif int message (const char* fmt, ...) { va_li...
#include <stdio.h> #include <stdarg.h> static FILE* g_logfile = NULL; int message (const char* fmt, ...) { va_list ap; if (g_logfile) { va_start (ap, fmt); vfprintf (g_logfile, fmt, ap); va_end (ap); } va_start (ap, fmt); int rc = vfprintf (stdout, fmt, ap); va_end (ap); return rc; } void message_...
--- +++ @@ -1,22 +1,52 @@ #include <stdio.h> #include <stdarg.h> +#include <string.h> static FILE* g_logfile = NULL; + +static unsigned char g_lastchar = '\n'; + +#ifdef _WIN32 + #include <windows.h> + static unsigned long g_timestamp; +#else + #include <sys/time.h> + static struct timeval g_timestamp; +#endif ...
Write timestamps to the logfile.
lgpl-2.1
josh-wambua/libdivecomputer,andysan/libdivecomputer,glance-/libdivecomputer,venkateshshukla/libdivecomputer,henrik242/libdivecomputer,Poltsi/libdivecomputer-vms,glance-/libdivecomputer,venkateshshukla/libdivecomputer,andysan/libdivecomputer,henrik242/libdivecomputer,josh-wambua/libdivecomputer
c938a893593fa7ea2e596ec41e186cdfbaee4e58
#if HAVE_CONFIG_H #include "config.h" #endif #include "dl.h" #include "util/macro.h" #include "util/logging.h" #include <stdlib.h> #include <dlfcn.h> #include <string.h> void *dl_dlopen ( const char* path ) { DEBUG(DBG_BDPLUS, "searching for library '%s' ...\n", path); void *result = dlopen(path, RTLD_LAZ...
#if HAVE_CONFIG_H #include "config.h" #endif #include "dl.h" #include "util/macro.h" #include "util/logging.h" #include <stdlib.h> #include <dlfcn.h> #include <string.h> // Note the dlopen takes just the name part. "aacs", internally we // translate to "libaacs.so" "libaacs.dylib" or "aacs.dll". void *dl_dlopen (...
--- +++ @@ -10,31 +10,13 @@ #include <dlfcn.h> #include <string.h> -// Note the dlopen takes just the name part. "aacs", internally we -// translate to "libaacs.so" "libaacs.dylib" or "aacs.dll". -void *dl_dlopen ( const char* name ) +void *dl_dlopen ( const char* path ) { - char *path; - int len; - ...
Change dlopening of libs to call libraries with their major version on linux systems
lgpl-2.1
ShiftMediaProject/libaacs,zxlooong/libaacs,mwgoldsmith/aacs,ShiftMediaProject/libaacs,mwgoldsmith/aacs,zxlooong/libaacs,rraptorr/libaacs,rraptorr/libaacs
15b5dd569501f0e4a66d7970238a1a87b0d9c4a7
#include "interface.h" #include "ecg.h" #include "AFE4400.h" SPI_Interface afe4400_spi(spi_c2); ECG ecg = ECG(1,1,4,9,PB0,4096,RA8875_BLUE,RA8875_BLACK,1000,tim3,&tft); PulseOx spo2 = PulseOx(5,1,4,9,&afe4400_spi,PC8,PA9,PA8,PB7,&tft); void enableSignalAcquisition(void) { spo2.enable(); ecg.enable(); } void...
#include "interface.h" #include "ecg.h" #include "AFE4400.h" SPI_Interface afe4400_spi(spi_c2); ECG ecg = ECG(1,1,4,9,PB0,4096,RA8875_BLUE,RA8875_BLACK,1000,tim3,&tft); PulseOx spo2 = PulseOx(6,1,3,3,&afe4400_spi,PC8,PA9,PA8,PB7,&tft); void enableSignalAcquisition(void) { spo2.enable(); ecg.enable(); } void...
--- +++ @@ -5,7 +5,7 @@ SPI_Interface afe4400_spi(spi_c2); ECG ecg = ECG(1,1,4,9,PB0,4096,RA8875_BLUE,RA8875_BLACK,1000,tim3,&tft); -PulseOx spo2 = PulseOx(6,1,3,3,&afe4400_spi,PC8,PA9,PA8,PB7,&tft); +PulseOx spo2 = PulseOx(5,1,4,9,&afe4400_spi,PC8,PA9,PA8,PB7,&tft); void enableSignalAcquisition(void) { s...
Adjust display position for pulse ox
mit
ReeceStevens/freepulse,ReeceStevens/freepulse,ReeceStevens/freepulse
0c2596f9c2142d8ba52065132a2b59745cf41fb2
#ifndef JOINABLE_IMPL #define JOINABLE_IMPL #include "joinable_types.h" #include "types/MediaObjectImpl.h" using ::com::kurento::kms::api::Joinable; using ::com::kurento::kms::api::Direction; using ::com::kurento::kms::api::StreamType; using ::com::kurento::kms::api::MediaSession; namespace com { namespace kurento {...
#ifndef JOINABLE_IMPL #define JOINABLE_IMPL #include "joinable_types.h" #include "types/MediaObjectImpl.h" using ::com::kurento::kms::api::Joinable; using ::com::kurento::kms::api::Direction; using ::com::kurento::kms::api::StreamType; using ::com::kurento::kms::api::MediaSession; namespace com { namespace kurento {...
--- +++ @@ -16,7 +16,7 @@ JoinableImpl(MediaSession &session); ~JoinableImpl() throw() {}; - std::vector<StreamType::type> getStreams(const Joinable& joinable); + void getStreams(std::vector<StreamType::type> &_return); void join(const JoinableImpl& to, const Direction::type direction); void unjoin(const ...
Make jonable methods to return vectors via reference
lgpl-2.1
mparis/kurento-media-server,Kurento/kurento-media-server,todotobe1/kurento-media-server,TribeMedia/kurento-media-server,lulufei/kurento-media-server,Kurento/kurento-media-server,shelsonjava/kurento-media-server,todotobe1/kurento-media-server,mparis/kurento-media-server,lulufei/kurento-media-server,shelsonjava/kurento-m...
633f65f6eed79b6a13d8fe76cfdb0ac19116e118