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
// IBM_PROLOG_BEGIN_TAG // This is an automatically generated prolog. // // $Source: src/include/sys/interrupt.h $ // // IBM CONFIDENTIAL // // COPYRIGHT International Business Machines Corp. 2011 // // p1 // // Object Code Only (OCO) source materials // Licensed Internal Code Source Materials // IBM HostBoot ...
// IBM_PROLOG_BEGIN_TAG // This is an automatically generated prolog. // // $Source: src/include/sys/interrupt.h $ // // IBM CONFIDENTIAL // // COPYRIGHT International Business Machines Corp. 2011 // // p1 // // Object Code Only (OCO) source materials // Licensed Internal Code Source Materials // IBM HostBoot ...
--- +++ @@ -31,7 +31,7 @@ */ enum { - ICPBAR_SCOM_ADDR = 0x020109c9, //!< for P8, P7 = 0x02011C09 + ICPBAR_SCOM_ADDR = 0x020109ca, //!< for P8, P7 = 0x02011C09 // This BAR value agrees with simics (for now) ICPBAR_VAL = 0x03FBFF90, //!< ICPBAR value bits[0:29]>>34 };
Fix IPC BAR scom address Change-Id: Ib3e13d892e58faa12082d6a09a1f6b504af44ae5 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1058 Reviewed-by: Thi N. Tran <25a2bca7ae5a8ea03be09ca8d282480c08c13052@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: Mark W. Wenning <32e1305d9513301b64a3e92b63a7c80399d0fb59@us.ibm...
apache-2.0
Over-enthusiastic/hostboot,csmart/hostboot,Over-enthusiastic/hostboot,csmart/hostboot,alvintpwang/hostboot,Over-enthusiastic/hostboot,open-power/hostboot,alvintpwang/hostboot,open-power/hostboot,alvintpwang/hostboot,Over-enthusiastic/hostboot,Over-enthusiastic/hostboot,alvintpwang/hostboot,open-power/hostboot,open-powe...
70961ee3265e37813c4fb89dfd7a5660ae4b189a
#include "bst.h" static void BST_Transplant(BST* T, BSTNode* u, BSTNode* v); struct BSTNode { BSTNode* left; BSTNode* right; BSTNode* p; void* k; }; struct BST { BSTNode* root; }; BST* BST_Create(void) { BST* T = (BST* )malloc(sizeof(BST)); T->root = NULL; return T; } BSTNode* BSTNode_Create(void* k) { BS...
#include "bst.h" static void BST_Transplant(BST* T, BSTNode* u, BSTNode* v); struct BSTNode { BSTNode* left; BSTNode* right; BSTNode* p; void* k; }; struct BST { BSTNode* root; }; BST* BST_Create(void) { BST* T = (BST* )malloc(sizeof(BST)); T->root = NULL; return T; } BSTNode* BSTNode_Create(void* k) { BS...
--- +++ @@ -41,3 +41,13 @@ } } +void BST_Preorder_Tree_Walk(BSTNode* n, void (f)(void*)) +{ + if (n != NULL) + { + f(n->k); + BST_Preorder_Tree_Walk(n->left, f); + BST_Preorder_Tree_Walk(n->right, f); + } +} +
Add BST preorder traversal function implementation
mit
MaxLikelihood/CADT
36a0988c4468386c7d52d9c1ff4cc09b615f4bf9
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_ #define CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_ #pragma once #include "base/basictypes.h" #include ...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_ #define CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_ #pragma once #include "base/basictypes.h" #include ...
--- +++ @@ -10,7 +10,7 @@ #include "base/compiler_specific.h" #include "third_party/skia/include/core/SkColor.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageOverlay.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/WebKit/chromium/p...
Fix build break from the future. TBR=pfeldman Review URL: http://codereview.chromium.org/8801036 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@113098 0039d316-1c4b-4281-b951-d872f2087c98
bsd-3-clause
ropik/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,yitian134...
4bc83be34066a7a42c6297db983e1d9066e14d3e
#include <stdint.h> void outb(uint16_t port, uint8_t value) { asm volatile ("outb %1, %0" : : "dN" (port), "a" (value)); } unsigned char inb(uint16_t port) { unsigned char ret; asm volatile ("inb %1, %0" : "=a" (ret) : "dN" (port)); return ret; } void outl(uint16_t port, uint32_t value) { asm volatile ("ou...
#include <stdint.h> void outb(uint16_t port, uint8_t value) { asm volatile ("outb %1, %0" : : "dN" (port), "a" (value)); } unsigned char inb(uint16_t port) { unsigned char ret; asm volatile ("inb %1, %0" : "=a" (ret) : "dN" (port)); return ret; }
--- +++ @@ -9,3 +9,13 @@ asm volatile ("inb %1, %0" : "=a" (ret) : "dN" (port)); return ret; } + +void outl(uint16_t port, uint32_t value) { + asm volatile ("outl %1, %0" : : "dN" (port), "a" (value)); +} + +uint32_t inl(uint16_t port) { + uint32_t ret; + asm volatile ("inl %1, %0" : "=a" (ret) : "dN" (port...
Add inl and outl functions
mit
simon-andrews/norby,simon-andrews/norby,simon-andrews/norby
342b576de5cc3fd0aad536171d68b414ffc0fc3d
#pragma once //------------------------------------------------------------------------------ /** @class Oryol::Render::PrimitiveType @brief primitive type enum (triangle strips, lists, etc...) */ #include "Core/Types.h" namespace Oryol { namespace Render { class PrimitiveType { public: /...
#pragma once //------------------------------------------------------------------------------ /** @class Oryol::Render::PrimitiveType @brief primitive type enum (triangle strips, lists, etc...) */ #include "Core/Types.h" namespace Oryol { namespace Render { class PrimitiveType { public: /...
--- +++ @@ -11,9 +11,9 @@ class PrimitiveType { public: - /// primitive type enum + /// primitive type enum (don't change order, append to end!) enum Code { - Points, ///< point list + Points = 0, ///< point list LineStrip, ///< line s...
Make sure primitive type enum starts at 0
mit
tempbottle/oryol,ejkoy/oryol,tempbottle/oryol,ejkoy/oryol,mgerhardy/oryol,tempbottle/oryol,code-disaster/oryol,wangscript/oryol,mgerhardy/oryol,waywardmonkeys/oryol,xfxdev/oryol,mgerhardy/oryol,xfxdev/oryol,wangscript/oryol,bradparks/oryol,zhakui/oryol,waywardmonkeys/oryol,code-disaster/oryol,aonorin/oryol,mgerhardy/or...
dff6ed304ba6c58a273d234384ca12fd59f03b86
#ifndef DICT_H_ #define DICT_H_ #include <cassert> #include <cstring> #include <tr1/unordered_map> #include <string> #include <vector> #include <boost/functional/hash.hpp> #include "wordid.h" class Dict { typedef std::tr1::unordered_map<std::string, WordID, boost::hash<std::string> > Map; public: Dict() : b0_(...
#ifndef DICT_H_ #define DICT_H_ #include <cassert> #include <cstring> #include <tr1/unordered_map> #include <string> #include <vector> #include <boost/functional/hash.hpp> #include "wordid.h" class Dict { typedef std::tr1::unordered_map<std::string, WordID, boost::hash<std::string> > Map; public: Dict() : b0_("...
--- +++ @@ -13,9 +13,12 @@ class Dict { typedef std::tr1::unordered_map<std::string, WordID, boost::hash<std::string> > Map; + public: Dict() : b0_("<bad0>") { words_.reserve(1000); } + inline int max() const { return words_.size(); } + inline WordID Convert(const std::string& word, bool frozen = fals...
Update utility functions to work with pyp-topics. git-svn-id: 357248c53bdac2d7b36f7ee045286eb205fcf757@49 ec762483-ff6d-05da-a07a-a48fb63a330f
apache-2.0
pks/cdec-dtrain-legacy,kho/mr-cdec,kho/mr-cdec,agesmundo/FasterCubePruning,agesmundo/FasterCubePruning,kho/mr-cdec,agesmundo/FasterCubePruning,pks/cdec-dtrain-legacy,pks/cdec-dtrain-legacy,agesmundo/FasterCubePruning,pks/cdec-dtrain-legacy,agesmundo/FasterCubePruning,kho/mr-cdec,kho/mr-cdec,agesmundo/FasterCubePruning,...
9705782c98265c05bc87a10b1fb69bd35781c754
#include <stddef.h> #include <kernel/port/heap.h> #include <kernel/port/units.h> #include <kernel/port/stdio.h> #include <kernel/port/panic.h> #include <kernel/arch/lock.h> static mutex_t heap_lock; /* round_up returns `n` rounded to the next value that is zero * modulo `align`. */ static uintptr_t round_up(uintptr_...
#include <stddef.h> #include <kernel/port/heap.h> #include <kernel/port/units.h> #include <kernel/port/stdio.h> #include <kernel/port/panic.h> /* round_up returns `n` rounded to the next value that is zero * modulo `align`. */ static uintptr_t round_up(uintptr_t n, uintptr_t align) { if (n % align) { return n + (a...
--- +++ @@ -3,6 +3,9 @@ #include <kernel/port/units.h> #include <kernel/port/stdio.h> #include <kernel/port/panic.h> +#include <kernel/arch/lock.h> + +static mutex_t heap_lock; /* round_up returns `n` rounded to the next value that is zero * modulo `align`. */ @@ -21,12 +24,14 @@ } void *kalloc_align(uint...
Put a lock around kalloc*
isc
zenhack/zero,zenhack/zero,zenhack/zero
d45a05e3563085b8131f3a84c4f3b16c3fab7908
#pragma once #include <istream> #include <memory> #include <vector> #include "types.h" #include "mbc.h" class Cartridge { const static size_t max_rom_size = 0x400000; // 4 MB std::vector<u8> rom; std::vector<u8> ram; std::unique_ptr<MemoryBankController> mbc; public: Cartridge() : rom(max_rom_size), ram(0x...
#pragma once #include <istream> #include <memory> #include <vector> #include "types.h" #include "mbc.h" class Cartridge { const static size_t max_rom_size = 0x400000; // 4 MB std::vector<u8> rom; std::vector<u8> ram; std::unique_ptr<MemoryBankController> mbc; public: Cartridge() : rom(max_rom_size), ram(0x...
--- +++ @@ -14,7 +14,7 @@ std::unique_ptr<MemoryBankController> mbc; public: - Cartridge() : rom(max_rom_size), ram(0x2000), mbc(new MBC1(rom, ram)) {} + Cartridge() : rom(max_rom_size), ram(0x20000), mbc(new MBC1(rom, ram)) { } void load_rom(std::istream& src) {
Cartridge: Make RAM 128KB - big enough for any game
mit
alastair-robertson/gameboy,alastair-robertson/gameboy,alastair-robertson/gameboy
9c3ee047dd5168c456c6b2fd6674c99b82aa04fe
#ifndef LOG_H #define LOG_H #include "types.h" #include <fstream> class Statement; class Exp; class LocationSet; class RTL; class Log { public: Log() { } virtual Log &operator<<(const char *str) = 0; virtual Log &operator<<(Statement *s); virtual Log &operator<<(Exp *e); virtual Log &operator<<(RTL *r); virt...
#ifndef LOG_H #define LOG_H #include "types.h" #include <fstream> class Statement; class Exp; class LocationSet; class RTL; class Log { public: Log() { } virtual Log &operator<<(const char *str) = 0; virtual Log &operator<<(Statement *s); virtual Log &operator<<(Exp *e); virtual Log &operator<<(RTL *r); virt...
--- +++ @@ -41,4 +41,15 @@ virtual ~FileLogger() {}; }; +// For older MSVC compilers +#if defined(_MSC_VER) && (_MSC_VER <= 1200) +static std::ostream& operator<<(std::ostream& s, QWord val) +{ + char szTmp[42]; // overkill, but who counts + sprintf(szTmp, "%I64u", val); + s << szTmp; + return s; +} #endif + +#...
Fix for older MSVC compilers without operator<< for long longs (not tested on MSVC6)
bsd-3-clause
xujun10110/boomerang,xujun10110/boomerang,nemerle/boomerang,nemerle/boomerang,nemerle/boomerang,xujun10110/boomerang,TambourineReindeer/boomerang,TambourineReindeer/boomerang,nemerle/boomerang,nemerle/boomerang,nemerle/boomerang,nemerle/boomerang,xujun10110/boomerang,TambourineReindeer/boomerang,TambourineReindeer/boom...
020bf65a067d187bdb2dd54a118f7b3f461535a1
#include <time.h> #include "clock.h" #include "clock_type.h" extern int clock_init(struct SPDR_Clock **clockp, struct SPDR_Allocator *allocator) { struct timespec res; if (clock_getres(CLOCK_MONOTONIC, &res) != 0 || res.tv_nsec > 1000) { /* unknown clock or insufficient resolution */...
#include <time.h> #include "clock.h" #include "clock_type.h" extern int clock_init(struct Clock **clockp, struct Allocator *allocator) { struct timespec res; if (clock_getres(CLOCK_MONOTONIC, &res) != 0 || res.tv_nsec > 1000) { /* unknown clock or insufficient resolution */ ...
--- +++ @@ -4,7 +4,7 @@ #include "clock_type.h" -extern int clock_init(struct Clock **clockp, struct Allocator *allocator) +extern int clock_init(struct SPDR_Clock **clockp, struct SPDR_Allocator *allocator) { struct timespec res; @@ -16,7 +16,7 @@ return clock_init_base(clockp, allocator, 1...
Fix compilation on posix platforms
mit
uucidl/uu.spdr,uucidl/uu.spdr,uucidl/uu.spdr
f4ef4ff9d744adcc8424e6993674b20000c750bf
#ifndef SCHEME_BASIC_TYPES_H #define SCHEME_BASIC_TYPES_H #include "SchemeType.h" extern const SchemeType SchemeBool; extern const SchemeCons *const SchemeBoolTrue; extern const SchemeCons *const SchemeBoolFalse; extern const SchemeType SchemeTuple; extern const SchemeCons *const SchemeTupleTuple; extern const Scheme...
#ifndef SCHEME_BASIC_TYPES_H #define SCHEME_BASIC_TYPES_H #include "SchemeType.h" extern const SchemeType SchemeBool; extern const SchemeCons *const SchemeBoolTrue; extern const SchemeCons *const SchemeBoolFalse; extern const SchemeType SchemeTuple; extern const SchemeCons *const SchemeTupleTuple; extern const Scheme...
--- +++ @@ -16,4 +16,16 @@ extern const SchemeCons *const SchemeOptionSome; extern const SchemeType SchemeEither; +static void +SchemeMarshalBool(Scheme *context, bool value) +{ + SchemeObj *val = &context->value; + val->hdr.kind = SCHEME_KIND_VAL; + val->hdr.variant = value ? + SchemeBoolTrue->hdr.variant ...
Add function for marshaling C booleans into Scheme.
mit
bassettmb/scheme
5cef25695718f2bbb2505ff63f1d2557d9429fcf
// SKIP PARAM: --enable ana.int.interval --set solver td3 --set ana.base.arrays.domain partitioned --set ana.activated "['base','threadid','threadflag','expRelation','mallocWrapper','apron']" --set ana.base.privatization none --set ana.apron.privatization dummy --set sem.int.signed_overflow assume_none // This is part...
// SKIP PARAM: --enable ana.int.interval --set solver td3 --enable ana.base.partition-arrays.enabled --set ana.activated "['base','threadid','threadflag','expRelation','mallocWrapper','apron']" --set ana.base.privatization none --set ana.apron.privatization dummy --set sem.int.signed_overflow assume_none // This is pa...
--- +++ @@ -1,7 +1,7 @@ -// SKIP PARAM: --enable ana.int.interval --set solver td3 --enable ana.base.partition-arrays.enabled --set ana.activated "['base','threadid','threadflag','expRelation','mallocWrapper','apron']" --set ana.base.privatization none --set ana.apron.privatization dummy --set sem.int.signed_overflo...
Fix partitioned array option in additional test
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
2c058b10c0dc3b2df2fb6d0a203c2abca300c794
// // Created by Borin Ouch on 2016-03-22. // #ifndef SFML_TEST_GAME_STATE_H #define SFML_TEST_GAME_STATE_H #include "game.h" class GameState { public: Game* game; virtual void draw(const float dt) = 0; virtual void update(const float dt) = 0; virtual void handleInput() = 0; virtual ~GameSta...
// // Created by Borin Ouch on 2016-03-22. // #ifndef SFML_TEST_GAME_STATE_H #define SFML_TEST_GAME_STATE_H #include "game.h" class GameState { public: Game* game; virtual void draw(const float dt) = 0; virtual void update(const float dt) = 0; virtual void handleInput() = 0; }; #endif //SFML_TE...
--- +++ @@ -17,6 +17,8 @@ virtual void draw(const float dt) = 0; virtual void update(const float dt) = 0; virtual void handleInput() = 0; + + virtual ~GameState() {}; };
Add virtual destructor to game state
mit
aceiii/sfml-city-builder
4f7bf9e92189558747c5298830afd2f9a591b5e8
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2016 The Bitcoin Ocho developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_CONSENSUS_CONSE...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_CONSENSUS_CONSENSUS_H #define BITCOIN_CONSENSUS_CONSENSUS_H /** ...
--- +++ @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers +// Copyright (c) 2016 The Bitcoin Ocho developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. ...
Add more Ochoness to Bitcoin.
mit
goku1997/bitcoin,goku1997/bitcoin,goku1997/bitcoin,goku1997/bitcoin,goku1997/bitcoin,goku1997/bitcoin
9cea98e320bfc37a6df373245f916b15c68a7f01
#import <CareKit/CareKit.h> @interface CMHMutedEventUpdater : NSObject - (_Nonnull instancetype)initWithCarePlanStore:(OCKCarePlanStore *_Nonnull)store event:(OCKCarePlanEvent *_Nonnull)event result:(OCKCarePlanEventResult *_Nullable)res...
#import <CareKit/CareKit.h> @interface CMHMutedEventUpdater : NSObject - (instancetype)initWithCarePlanStore:(OCKCarePlanStore *)store event:(OCKCarePlanEvent *)event result:(OCKCarePlanEventResult *)result state:(OCKCarePl...
--- +++ @@ -2,10 +2,10 @@ @interface CMHMutedEventUpdater : NSObject -- (instancetype)initWithCarePlanStore:(OCKCarePlanStore *)store - event:(OCKCarePlanEvent *)event - result:(OCKCarePlanEventResult *)result - state:(OC...
Add Nullability annotations to the event updater class
mit
cloudmine/CMHealthSDK,cloudmine/CMHealthSDK-iOS,cloudmine/CMHealthSDK-iOS
fd1cb2861f5037415d2899b4dfff0c60fcdb040d
#pragma once #include <fstream> #include <string> #include <cerrno> #include <clocale> #include <vector> #include <iostream> #include <stdlib.h> #ifdef __APPLE__ #include <stdlib.h> #else #include <malloc.h> #endif #include <memory.h> #define _USE_MATH_DEFINES #include <math.h> #include <cairo.h> #include <gtkmm.h> #i...
#pragma once #include <fstream> #include <string> #include <cerrno> #include <clocale> #include <vector> #include <iostream> #include <stdlib.h> #include <malloc.h> #include <memory.h> #define _USE_MATH_DEFINES #include <math.h> #include <cairo.h> #include <gtkmm.h> #include <gtkmm/application.h> #include <gtkmm/windo...
--- +++ @@ -7,7 +7,11 @@ #include <vector> #include <iostream> #include <stdlib.h> +#ifdef __APPLE__ +#include <stdlib.h> +#else #include <malloc.h> +#endif #include <memory.h> #define _USE_MATH_DEFINES #include <math.h>
Make including malloc on MacOS compatible
bsd-3-clause
litehtml/litebrowser-linux
f43a8742653c7bbd4f05440152b05f19a9300d17
//--------------------------------------------------------------------------- // $Id$ // Version: $Name$ // // Copyright (C) 2009 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer // to the file deal.II/doc/l...
//--------------------------------------------------------------------------- // $Id$ // Version: $Name$ // // Copyright (C) 2009 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer // to the file deal.II/doc/l...
--- +++ @@ -23,12 +23,26 @@ #else #include <boost/shared_ptr.hpp> +#include <boost/scoped_ptr.hpp> DEAL_II_NAMESPACE_OPEN namespace std_cxx1x { using boost::shared_ptr; using boost::enable_shared_from_this; + + // boost doesn't have boost::unique_ptr, + // but its scoped_ptr comes close so ...
Implement the equivalent of std::unique_ptr using boost::scoped_ptr. git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@19195 0785d39b-7218-0410-832d-ea1e28bc413d
lgpl-2.1
sriharisundar/dealii,YongYang86/dealii,sriharisundar/dealii,kalj/dealii,sriharisundar/dealii,YongYang86/dealii,sriharisundar/dealii,flow123d/dealii,flow123d/dealii,johntfoster/dealii,ibkim11/dealii,gpitton/dealii,pesser/dealii,ibkim11/dealii,spco/dealii,jperryhouts/dealii,shakirbsm/dealii,ibkim11/dealii,JaeryunYim/deal...
0c831cc87a2effc6791e946858afaf5156d0edfc
/* * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #ifndef _BITS_UCLIBC_ERRNO_H #define _BITS_UCLIBC_ERRNO_H 1 #ifdef IS_IN_rtld # undef errno # define errno _dl_errno extern int _dl_errno; // attribute_hidden; #elif defin...
/* * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #ifndef _BITS_UCLIBC_ERRNO_H #define _BITS_UCLIBC_ERRNO_H 1 #ifdef IS_IN_rtld # undef errno # define errno _dl_errno extern int _dl_errno; // attribute_hidden; #elif defin...
--- +++ @@ -19,7 +19,7 @@ # else # define errno errno # endif -extern __thread int errno __attribute_tls_model_ie; +extern __thread int errno attribute_tls_model_ie; # endif /* USE___THREAD */ #endif /* IS_IN_rtld */
Fix typo in macro for tls access model
lgpl-2.1
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
00dc4cb5f356873e8c0b704e2cf2467f0f0a9a71
/* Copyright (c) 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
/* Copyright (c) 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
--- +++ @@ -29,7 +29,7 @@ // Queries included in this batch. Each query should have a unique requestID. @property (retain) NSArray *queries; -// Clients may set this to NO to disallow authorization. Defaults to YES. +// Clients may set this to YES to disallow authorization. Defaults to NO. @property (assign) BO...
Fix comment on shouldSkipAuthorization property
apache-2.0
justinhouse/google-api-objectivec-client,nanthi1990/google-api-objectivec-client,CarlosTrejo/google-api-objectivec-client,JonasGessner/google-api-objectivec-client,creationst/google-api-objectivec-client,daffodilistic/google-api-objectivec-client,clody/google-api-objectivec-client,JonasGessner/google-api-objectivec-cli...
72db37d52802027c30b38181de09413d7ceb8f17
#include <stdio.h> #include <string.h> #include "lib/proc.h" int main(int argc, char **argv) { char* gitbuff; int out = run_proc(&gitbuff, "git", "branch", "--list", 0); if (out != 0) { exit(1); } char *token; char *sep=" \r\n"; int next = 0; while((token = strsep(&gitbuff, sep)) != NULL) { ...
#include <stdio.h> #include "lib/proc.h" int main(int argc, char **argv) { char* gitbuff; int out = run_proc(&gitbuff, "git", "branch", "--list", 0); //int out = run_proc(&gitbuff, "ls", "-l", "-h", 0); if (out != 0) { fprintf(stderr, "Error running subprocess:%d\n", out); exit(1); } //printf("...
--- +++ @@ -1,35 +1,28 @@ #include <stdio.h> +#include <string.h> #include "lib/proc.h" int main(int argc, char **argv) { - char* gitbuff; int out = run_proc(&gitbuff, "git", "branch", "--list", 0); - //int out = run_proc(&gitbuff, "ls", "-l", "-h", 0); if (out != 0) { - fprintf(stderr, "Erro...
Use strsep to split output
bsd-3-clause
wnh/prompt_utils
37a155226210640f16018e1033d4769b2fb36909
#ifndef BF_WRAP_H #define BF_WRAP_H #include <type_traits> #include <vector> #include "object.h" namespace bf { template < typename T, typename = typename std::enable_if<std::is_arithmetic<T>::value>::type > object wrap(T const& x) { return {&x, sizeof(T)}; } template < typename T, size_t N, typename = ...
#ifndef BF_WRAP_H #define BF_WRAP_H #include <type_traits> #include "object.h" namespace bf { template < typename T, typename std::enable_if<std::is_integral<T>::value>::type > object wrap(T const& x) { return {&x, sizeof(T)}; } template <typename Sequence> object wrap(Sequence const& s) { return {s.data(),...
--- +++ @@ -2,23 +2,42 @@ #define BF_WRAP_H #include <type_traits> +#include <vector> #include "object.h" namespace bf { template < typename T, - typename std::enable_if<std::is_integral<T>::value>::type + typename = typename std::enable_if<std::is_arithmetic<T>::value>::type > object wrap(T const& ...
Fix SFINAE default arg and add array overload.
bsd-3-clause
mavam/libbf,nicolacdnll/libbf,nicolacdnll/libbf
acb99f7d6b709a7dc88344c36de7c4866e455035
/* * $Id$ * * Define the tags in the shared memory in a reusable format. * Whoever includes this get to define what the SLTM macro does. * */ SLTM(CLI) SLTM(SessionOpen) SLTM(SessionClose) SLTM(ClientAddr) SLTM(Request) SLTM(URL) SLTM(Protocol) SLTM(H_Unknown) #define HTTPH(a, b) SLTM(b) #include "http_headers.h...
/* * $Id$ * * Define the tags in the shared memory in a reusable format. * Whoever includes this get to define what the SLTM macro does. * */ SLTM(CLI) SLTM(SessionOpen) SLTM(SessionClose) SLTM(ClientAddr) SLTM(Request) SLTM(URL) SLTM(Protocol) SLTM(Headers)
--- +++ @@ -13,4 +13,7 @@ SLTM(Request) SLTM(URL) SLTM(Protocol) -SLTM(Headers) +SLTM(H_Unknown) +#define HTTPH(a, b) SLTM(b) +#include "http_headers.h" +#undef HTTPH
Use http_headers.h to define HTTP header tags for logging git-svn-id: 2c9807fa3ff65b17195bd55dc8a6c4261e10127b@90 d4fa192b-c00b-0410-8231-f00ffab90ce4
bsd-2-clause
varnish/Varnish-Cache,ajasty-cavium/Varnish-Cache,ssm/pkg-varnish,zhoualbeart/Varnish-Cache,franciscovg/Varnish-Cache,ajasty-cavium/Varnish-Cache,ambernetas/varnish-cache,zhoualbeart/Varnish-Cache,gauthier-delacroix/Varnish-Cache,drwilco/varnish-cache-drwilco,drwilco/varnish-cache-drwilco,ssm/pkg-varnish,feld/Varnish-C...
38d665c82ba3dedc51f597f519dac84546588638
#ifndef SOFAPYTHON_PYTHON_H #define SOFAPYTHON_PYTHON_H // This header simply includes Python.h, taking care of platform-specific stuff // It should be included before any standard headers: // "Since Python may define some pre-processor definitions which affect the // standard headers on some systems, you must inclu...
#ifndef SOFAPYTHON_PYTHON_H #define SOFAPYTHON_PYTHON_H // This header simply includes Python.h, taking care of platform-specific stuff // It should be included before any standard headers: // "Since Python may define some pre-processor definitions which affect the // standard headers on some systems, you must inclu...
--- +++ @@ -11,15 +11,13 @@ #if defined(_WIN32) # define MS_NO_COREDLL // deactivate pragma linking on Win32 done in Python.h +# define Py_ENABLE_SHARED 1 // this flag ensure to use dll's version (needed because of MS_NO_COREDLL define). #endif #if defined(_MSC_VER) && defined(_DEBUG) -// undefine _DEBUG sinc...
Fix python link in release build. Former-commit-id: f2b0e4ff65df702ae4f98bed2a39dcfdc0f7e9c4
lgpl-2.1
FabienPean/sofa,Anatoscope/sofa,FabienPean/sofa,hdeling/sofa,FabienPean/sofa,Anatoscope/sofa,hdeling/sofa,Anatoscope/sofa,hdeling/sofa,hdeling/sofa,Anatoscope/sofa,hdeling/sofa,FabienPean/sofa,FabienPean/sofa,Anatoscope/sofa,hdeling/sofa,hdeling/sofa,Anatoscope/sofa,hdeling/sofa,FabienPean/sofa,Anatoscope/sofa,FabienPe...
1a9f189af8076cf1f67b92567e47d7dd8e0514fa
#pragma once #include "ResourceDX11.h" namespace Mile { class MEAPI BufferDX11 : public ResourceDX11 { public: BufferDX11( RendererDX11* renderer ) : m_buffer( nullptr ), ResourceDX11( renderer ) { } ~BufferDX11( ) { SafeRelease( m_buffer ); ...
#pragma once #include "ResourceDX11.h" namespace Mile { class MEAPI BufferDX11 : public ResourceDX11 { public: BufferDX11( RendererDX11* renderer ) : m_buffer( nullptr ), ResourceDX11( renderer ) { } ~BufferDX11( ) { SafeRelease( m_buffer ); ...
--- +++ @@ -21,7 +21,7 @@ D3D11_BUFFER_DESC GetDesc( ) const { return m_desc; } virtual void* Map( ) { return nullptr; } - virtual void UnMap( ) { } + virtual bool UnMap( ) { return false; } protected: ID3D11Buffer* m_buffer;
Modify UnMap function return boolean value that succesfully unmaped.
mit
HoRangDev/MileEngine,HoRangDev/MileEngine
02b194c36659bfd85485aded4e52c3e587df48b0
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_ #define WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_ #include "webkit/fileapi/file_system_file_util.h" #include "webki...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_ #define WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_ #include "webkit/fileapi/file_system_file_util.h" #include "webki...
--- +++ @@ -18,7 +18,7 @@ static const int64 kNoLimit; - base::PlatformFileError CopyOrMoveFile( + virtual base::PlatformFileError CopyOrMoveFile( FileSystemOperationContext* fs_context, const FilePath& src_file_path, const FilePath& dest_file_path, @@ -26,7 +26,7 @@ // TODO(dmikurube): C...
Add virtual in QuitaFileUtil to fix the compilation error in r82441. TBR=dmikurube,kinuko BUG=none TEST=none Review URL: http://codereview.chromium.org/6882112 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@82445 0039d316-1c4b-4281-b951-d872f2087c98
bsd-3-clause
gavinp/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,ga...
a981815c88aca37a8dcb42f1ce673ed838114251
// // FABAsyncOperation.h // FABOperation // // Copyright © 2016 Twitter. All rights reserved. // #import <Foundation/Foundation.h> /** * Completion block that can be called in your subclass implementation. It is up to you when you want to call it. */ typedef void(^FABAsyncOperationCompletionBlock)(NSError *__n...
// // FABAsyncOperation.h // FABOperation // // Copyright © 2016 Twitter. All rights reserved. // #import <Foundation/Foundation.h> /** * Completion block that can be called in your subclass implementation. It is up to you when you want to call it. */ typedef void(^FABAsyncOperationCompletionBlock)(NSError *__n...
--- +++ @@ -14,13 +14,13 @@ /** * FABAsyncOperation is a subclass of NSOperation that allows for asynchronous work to be performed, for things like networking, IPC or UI-driven logic. Create your own subclasses to encapsulate custom logic. - * @warning When subclassing to create your own operations, be sure to...
Update comments to refer to finishWithError markDone was renamed to finishWithError
mit
google-fabric/FABOperation,twitter-fabric/FABOperation,google-fabric/FABOperation,twitter-fabric/FABOperation
f687a87560979bec5f7fc58f79e47baacb70cc25
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_ #define UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_ #include "base/basictypes.h" #include "base/compi...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_ #define UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_ #include "base/basictypes.h" #include "base/compi...
--- +++ @@ -8,11 +8,10 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "ui/aura/client/capture_client.h" -#include "ui/views/views_export.h" namespace views { -class VIEWS_EXPORT DesktopCaptureClient : public aura::client::CaptureClient { +class DesktopCaptureClient : public aura:...
Revert 155836 - Fix static build. TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/10918157 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@155841 0039d316-1c4b-4281-b951-d872f2087c98
bsd-3-clause
anirudhSK/chromium,Jonekee/chromium.src,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,ltilve/chromium,hujiajie/pa-chromium,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,nacl-webkit/chrome_deps,bright-sp...
8e4c186215c3d086a734dc0aec7f119b8a88c0a9
// vim: sw=4 ts=4 et : #include "config.h" #include "itmmorgue.h" // Parser for win_ section conf_t win_conf(char *key) { conf_t rc; // TODO implement real parser if (key == strstr(key, "area_y")) rc.ival = 3; if (key == strstr(key, "area_x")) rc.ival = 2; if (key == strstr(key, "area_max_y")) rc....
// vim: sw=4 ts=4 et : #include "config.h" // Parser for win_ section conf_t win_conf(char *key) { conf_t rc; rc.ival = 0; (void)key; return rc; } // Prefixes for config sections/subsections with parser pointers struct conf_prefix { char *prefix; conf_t (*parser)(char *); } pr_global[] = { ...
--- +++ @@ -1,13 +1,18 @@ // vim: sw=4 ts=4 et : #include "config.h" +#include "itmmorgue.h" // Parser for win_ section conf_t win_conf(char *key) { conf_t rc; - rc.ival = 0; + // TODO implement real parser + if (key == strstr(key, "area_y")) rc.ival = 3; + if (key == strstr(key, "area_x")) r...
Fix the first (sic!) Segmentation fault
mit
zhmylove/itmmorgue,zhmylove/itmmorgue,zhmylove/itmmorgue,zhmylove/itmmorgue
f470ac421f6695e415da643e03b903a679ea828e
#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
codewithpassion/openrov-software,codewithpassion/openrov-software,codewithpassion/openrov-software,codewithpassion/openrov-software
c1a36603d5e603828cdae9068987cc58e625fc3b
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
--- +++ @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RIEGELI_BASE_STR_ERROR_H_ -#define RIEGELI_BASE_STR_ERROR_H_ +#ifndef RIEGELI_BASE_ERRNO_MAPPING_H_ +#define RIEGELI_BASE_ERRNO_MAPPING_H_ #include "absl/strings/string_vi...
Fix include guard to match the current filename. PiperOrigin-RevId: 256006893
apache-2.0
google/riegeli,google/riegeli,google/riegeli,google/riegeli
4571ac8b500390e3b70370369386d9cec35ea536
/* * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * ...
/* * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * ...
--- +++ @@ -16,6 +16,8 @@ /* * @file cynara-creds-commons.h * @author Lukasz Wojciechowski <l.wojciechow@partner.samsung.com> + * @author Radoslaw Bartosiak <r.bartosiak@samsung.com> + * @author Aleksander Zdyb <a.zdyb@partner.samsung.com> * @version 1.0 * @brief This file con...
Add enums for credentials acquire methods Change-Id: I5719a7622a78ae6d1ca86a7dcce986c69abb3e23
apache-2.0
Samsung/cynara,Samsung/cynara,pohly/cynara,pohly/cynara,pohly/cynara,Samsung/cynara
7558b9540b6c51b9822c63bbbdf42da282b1a7c1
struct test { int a[3]; char b[2]; long c; }; int sum(struct test *t) { int sum = 0; sum += t->a[0] + t->a[1] + t->a[2]; sum += t->b[0] + t->b[1]; sum += t->c; return sum; } int main() { struct test t1 = { .a = { 1, 2, 3 }, .b = { 'a', 'c' }, .c = -1 }; struct test t2 = t1; t2.b[0] = 32; t2.a...
struct test { int a[3]; char b[2]; long c; }; int sum(struct test *t) { int sum = 0; sum += t->a[0] + t->a[1] + t->a[2]; sum += t->b[0] + t->b[1] + t->b[2]; sum += t->c; return sum; } int main() { struct test t1 = { .a = { 1, 2, 3 }, .b = { 'a', 'c' }, .c = -1 }; struct test t2 = t1; t2.b[0] = ...
--- +++ @@ -7,7 +7,7 @@ int sum(struct test *t) { int sum = 0; sum += t->a[0] + t->a[1] + t->a[2]; - sum += t->b[0] + t->b[1] + t->b[2]; + sum += t->b[0] + t->b[1]; sum += t->c; return sum; }
Fix overflow in test case
bsd-3-clause
lxp/sulong,crbb/sulong,PrinzKatharina/sulong,crbb/sulong,lxp/sulong,lxp/sulong,crbb/sulong,PrinzKatharina/sulong,lxp/sulong,PrinzKatharina/sulong,crbb/sulong,PrinzKatharina/sulong
555ea52bfbef491555015a27c5d4d6bdcca14d07
#ifndef AL_EVENT_H #define AL_EVENT_H #include "AL/al.h" #include "AL/alc.h" struct EffectState; enum { /* End event thread processing. */ EventType_KillThread = 0, /* User event types. */ EventType_SourceStateChange = 1<<0, EventType_BufferCompleted = 1<<1, EventType_Error = ...
#ifndef AL_EVENT_H #define AL_EVENT_H #include "AL/al.h" #include "AL/alc.h" struct EffectState; enum { /* End event thread processing. */ EventType_KillThread = 0, /* User event types. */ EventType_SourceStateChange = 1<<0, EventType_BufferCompleted = 1<<1, EventType_Error = ...
--- +++ @@ -39,7 +39,7 @@ ALenum type; ALuint id; ALuint param; - ALchar msg[1008]; + ALchar msg[232]; } user; EffectState *mEffectState; } u{};
Reduce the AsyncEvent struct size The "user" message length is significantly reduced to fit the struct in 256 bytes, rather than 1KB.
lgpl-2.1
aaronmjacobs/openal-soft,aaronmjacobs/openal-soft
4917024c9485d5ed3362ddcb1a0d0f8ee45dfedc
//--------------------------------------------------------------------*- C++ -*- // CLING - the C++ LLVM-based InterpreterG :) // version: $Id$ // author: Timur Pocheptsov <Timur.Pocheptsov@cern.ch> //------------------------------------------------------------------------------ #ifndef CLING_DISPLAY_H #define CLING_...
//--------------------------------------------------------------------*- C++ -*- // CLING - the C++ LLVM-based InterpreterG :) // version: $Id$ // author: Timur Pocheptsov <Timur.Pocheptsov@cern.ch> //------------------------------------------------------------------------------ #ifndef CLING_DISPLAY_H #define CLING_...
--- +++ @@ -14,9 +14,10 @@ } namespace cling { +class Interpreter; void DisplayClasses(llvm::raw_ostream &stream, - const class Interpreter *interpreter, bool verbose); + const Interpreter *interpreter, bool verbose); void DisplayClass(llvm::raw_ostream &stream, ...
Fix fwd decl for windows. git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@47814 27541ba8-7e3a-0410-8455-c3a389f83636
lgpl-2.1
bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT
8ae331ba0b6f64564519e9e5618ec035bb54038f
#import <Foundation/Foundation.h> #import "OCDSpec/Protocols/DescriptionRunner.h" #import "OCDSpec/OCDSpecDescription.h" #import "OCDSpec/OCDSpecSharedResults.h" #import "OCDSpec/Abstract/AbstractDescriptionRunner.h" @interface OCDSpecDescriptionRunner : NSObject { Class *classes; int classCount...
#import <Foundation/Foundation.h> #import "OCDSpec/Protocols/DescriptionRunner.h" #import "OCDSpec/OCDSpecDescription.h" #import "OCDSpec/OCDSpecSharedResults.h" #import "OCDSpec/AbstractDescriptionRunner.h" @interface OCDSpecDescriptionRunner : NSObject { Class *classes; int classCount; id ...
--- +++ @@ -2,7 +2,7 @@ #import "OCDSpec/Protocols/DescriptionRunner.h" #import "OCDSpec/OCDSpecDescription.h" #import "OCDSpec/OCDSpecSharedResults.h" -#import "OCDSpec/AbstractDescriptionRunner.h" +#import "OCDSpec/Abstract/AbstractDescriptionRunner.h" @interface OCDSpecDescriptionRunner : NSObject {
Correct the project for the move
mit
paytonrules/OCDSpec,paytonrules/OCDSpec
75338467e66fd3c862a0a48363c3f4681f30180a
#ifndef _GL_H_ #define _GL_H_ #if defined __APPLE__ #include <OpenGLES/ES2/gl.h> #include <OpenGLES/ES2/glext.h> #elif defined GL_ES #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include <EGL/egl.h> #include <EGL/eglext.h> #include <importgl.h> #else //#define GL_GLEXT_PROTOTYPES #ifdef WIN32 #include <GL/glew.h>...
#ifndef _GL_H_ #define _GL_H_ #if defined __APPLE__ #include <OpenGLES/ES3/gl.h> #include <OpenGLES/ES3/glext.h> #elif defined GL_ES #include <GLES3/gl3.h> #include <EGL/egl.h> #include <EGL/eglext.h> #else #define GL_GLEXT_PROTOTYPES #ifdef WIN32 #include <GL/glew.h> #include <windows.h> #endif #ifdef __ANDROID__ #...
--- +++ @@ -2,14 +2,16 @@ #define _GL_H_ #if defined __APPLE__ -#include <OpenGLES/ES3/gl.h> -#include <OpenGLES/ES3/glext.h> +#include <OpenGLES/ES2/gl.h> +#include <OpenGLES/ES2/glext.h> #elif defined GL_ES -#include <GLES3/gl3.h> +#include <GLES2/gl2.h> +#include <GLES2/gl2ext.h> #include <EGL/egl.h> #inclu...
Remove gl includes from __ANDROID__
mit
Sometrik/framework,Sometrik/framework,Sometrik/framework
954ca58264801b7a4cac4b3bc53d0bd01feaca92
#ifndef READLINE_FALLBACK_H #define READLINE_FALLBACK_H #include <stdio.h> #include <string.h> char* readline(const char * prompt) { char *result = malloc(1024); printf("%s", prompt); fgets(result, 1023, stdin); result[strlen(result)-1] = 0; return result; } #endif /* READLINE_FALLBACK_H */
#ifndef READLINE_FALLBACK_H #define READLINE_FALLBACK_H #include <stdio.h> #include <string.h> char* readline(const char * prompt) { char *result = malloc(1); size_t n = 0; printf("%s", prompt); getline(&result, &n, stdin); result[strlen(result)-1] = 0; return result; } #endif /* READLINE_FAL...
--- +++ @@ -5,10 +5,9 @@ #include <string.h> char* readline(const char * prompt) { - char *result = malloc(1); - size_t n = 0; + char *result = malloc(1024); printf("%s", prompt); - getline(&result, &n, stdin); + fgets(result, 1023, stdin); result[strlen(result)-1] = 0; return result...
Use fgets(3) instead of getline(3) because whilst getline(3) is POSIX, it is not in the C89 or later standards
isc
lucasad/base-conv
5d02ce6786c9b7bd1f434826c4929b4233b5ae58
/* $Id$ $Revision$ */ /* vim:set shiftwidth=4 ts=8: */ /********************************************************** * This software is part of the graphviz package * * http://www.graphviz.org/ * * * * Copyright (...
/* $Id$ $Revision$ */ /* vim:set shiftwidth=4 ts=8: */ /********************************************************** * This software is part of the graphviz package * * http://www.graphviz.org/ * * * * Copyright (...
--- +++ @@ -23,7 +23,7 @@ #include <agxbuf.h> - extern int initHTMLlexer(char *, agxbuf *); + extern int initHTMLlexer(char *, agxbuf *, int); extern int htmllex(void); extern int htmllineno(void); extern int clearHTMLlexer(void);
Add support for charset attribute and Latin1 encoding.
epl-1.0
kbrock/graphviz,pixelglow/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,kbrock/graphviz,tkelman/graphviz,MjAbuz/graphviz,jho1965us/graphviz,MjAbuz/graphviz,ellson/graphviz,tkelman/graphviz,tkelman/graphviz,ellson/graphviz,jho1965us/graphviz,MjAbuz/graphviz,pixelglow/graphviz,pixelglow/graphviz,BMJHayward/graphviz,tkelma...
ccac208ec5892857a5847a12b098d2358e023f7c
#import <WebKit/WebKit.h> typedef NS_ENUM (NSInteger, WMFWKScriptMessageType) { WMFWKScriptMessageUnknown, WMFWKScriptMessagePeek, WMFWKScriptMessageConsoleMessage, WMFWKScriptMessageClickLink, WMFWKScriptMessageClickImage, WMFWKScriptMessageClickReference, WMFWKScriptMessageClickEdit, ...
#import <WebKit/WebKit.h> typedef NS_ENUM (NSInteger, WMFWKScriptMessageType) { WMFWKScriptMessagePeek, WMFWKScriptMessageConsoleMessage, WMFWKScriptMessageClickLink, WMFWKScriptMessageClickImage, WMFWKScriptMessageClickReference, WMFWKScriptMessageClickEdit, WMFWKScriptMessageNonAnchorTouc...
--- +++ @@ -1,6 +1,7 @@ #import <WebKit/WebKit.h> typedef NS_ENUM (NSInteger, WMFWKScriptMessageType) { + WMFWKScriptMessageUnknown, WMFWKScriptMessagePeek, WMFWKScriptMessageConsoleMessage, WMFWKScriptMessageClickLink, @@ -9,8 +10,7 @@ WMFWKScriptMessageClickEdit, WMFWKScriptMessageNo...
Move unknown enum entry to top.
mit
montehurd/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,wikimedia/wikipedia-ios,wikimedia/apps-ios-wikipedia,josve05a/wikipedia-ios,anirudh24seven/wikipedia-ios,julienbodet/wikipedia-ios,anirudh24seven/wikipedia-ios,wikimedia/apps-ios-wikipedia,josve05a/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/wikipedia-ios,wi...
78604e09580cac8f6e3adcb79e250adad46b04f7
//===- lld/ReaderWriter/ELF/Mips/MipsRelocationHandler.h ------------------===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------...
//===- lld/ReaderWriter/ELF/Mips/MipsRelocationHandler.h ------------------===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------...
--- +++ @@ -25,7 +25,8 @@ template <class ELFT> std::unique_ptr<TargetRelocationHandler> -createMipsRelocationHandler(MipsLinkingContext &ctx, MipsTargetLayout<ELFT> &layout); +createMipsRelocationHandler(MipsLinkingContext &ctx, + MipsTargetLayout<ELFT> &layout); } // elf } // lld
[Mips] Reformat the code with clang-format git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@234153 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
llvm-mirror/lld,llvm-mirror/lld
da66946ecd7257482a58d6eee247012d9e5250e9
// (C) Copyright 2017, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing,...
// (C) Copyright 2017, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing,...
--- +++ @@ -9,9 +9,19 @@ // See the License for the specific language governing permissions and // limitations under the License. // Portability include to match the Google test environment. + #ifndef TESSERACT_UNITTEST_INCLUDE_GUNIT_H_ #define TESSERACT_UNITTEST_INCLUDE_GUNIT_H_ #include "gtest/gtest.h" +#in...
Add more portability hacks for Google test environment Signed-off-by: Stefan Weil <8d4c780fcfdc41841e5070f4c43da8958ba6aec0@weilnetz.de>
apache-2.0
UB-Mannheim/tesseract,stweil/tesseract,jbarlow83/tesseract,jbarlow83/tesseract,UB-Mannheim/tesseract,tesseract-ocr/tesseract,UB-Mannheim/tesseract,amitdo/tesseract,stweil/tesseract,UB-Mannheim/tesseract,tesseract-ocr/tesseract,amitdo/tesseract,amitdo/tesseract,jbarlow83/tesseract,tesseract-ocr/tesseract,UB-Mannheim/tes...
f0337c2d1afb2774e6e58b2084f769d3436e5b1e
//********************************************************************* //* C_Base64 - a simple base64 encoder and decoder. //* //* Copyright (c) 1999, Bob Withers - bwit@pobox.com //* //* This code may be freely used for any purpose, either personal //* or commercial, provided the authors copyright notice remains...
//********************************************************************* //* C_Base64 - a simple base64 encoder and decoder. //* //* Copyright (c) 1999, Bob Withers - bwit@pobox.com //* //* This code may be freely used for any purpose, either personal //* or commercial, provided the authors copyright notice remains...
--- +++ @@ -22,8 +22,8 @@ static string decode(const string & data); static string encodeFromArray(const char * data, size_t len); private: - static const string Base64::Base64Table; - static const string::size_type Base64::DecodeTable[]; + static const string Base64Table; + static const string::size_type ...
Make it build with gcc 4.1 svn path=/branches/kopete/0.12/kopete/; revision=518337
lgpl-2.1
josh-wambua/kopete,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,josh-wambua/kopete,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,Jtalk/kopete-fork-xep0136,Jtalk/kopete-fork-xep0136,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,josh-wambua/kopete
cb094452ae663fbc04e8f7c01f3864dee30bf98f
#include <stdlib.h> #include <stdio.h> #include <errno.h> #include <windows.h> #define URL "https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505\ (v=vs.85).aspx" #define VERSION "0.1.0" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, LPSTR lpCmdLine, int nCmdShow) { ...
#include <stdlib.h> #include <stdio.h> #include <errno.h> #include <windows.h> #define URL "https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505\ (v=vs.85).aspx" #define VERSION "0.1.0" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, LPSTR lpCmdLine, int nShowCmd) { ...
--- +++ @@ -8,7 +8,7 @@ #define VERSION "0.1.0" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, LPSTR lpCmdLine, - int nShowCmd) + int nCmdShow) { LPWSTR *szArgList; int argCount;
Rename WinMain argument nShowCmd "nCmdShow"
mit
dbohdan/messagebox,dbohdan/messagebox
6f5644a98919e0583f134876de768497a769f5fe
#include "e.h" EINTERN int e_log_dom = -1; static const char *_names[] = { "CRI", "ERR", "WRN", "INF", "DBG", }; static void _e_log_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc EINA_UNUSED, int line, const char *fmt, void *data EINA_UNUSED, va_list args) { co...
#include "e.h" EINTERN int e_log_dom = -1; EINTERN int e_log_init(void) { e_log_dom = eina_log_domain_register("e", EINA_COLOR_WHITE); return e_log_dom != -1; } EINTERN int e_log_shutdown(void) { eina_log_domain_unregister(e_log_dom); e_log_dom = -1; return 0; }
--- +++ @@ -1,11 +1,34 @@ #include "e.h" EINTERN int e_log_dom = -1; + +static const char *_names[] = { + "CRI", + "ERR", + "WRN", + "INF", + "DBG", +}; + +static void +_e_log_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc EINA_UNUSED, int line, const char *fmt, voi...
Revert "e logs - the custom e log func breaks eina backtraces, so don't use it" This reverts commit 2df04042269f3b5604c719844eac372fa5fcddd2. let's not do this in all cases
bsd-2-clause
tasn/enlightenment,rvandegrift/e,rvandegrift/e,rvandegrift/e,tasn/enlightenment,tasn/enlightenment
6a8cbb53dad28508f0fbb893ce37defbbec11a49
/* * AVR32 endian-conversion functions. */ #ifndef __ASM_AVR32_BYTEORDER_H #define __ASM_AVR32_BYTEORDER_H #include <asm/types.h> #include <linux/compiler.h> #ifdef __CHECKER__ extern unsigned long __builtin_bswap_32(unsigned long x); extern unsigned short __builtin_bswap_16(unsigned short x); #endif /* * avr32-l...
/* * AVR32 endian-conversion functions. */ #ifndef __ASM_AVR32_BYTEORDER_H #define __ASM_AVR32_BYTEORDER_H #include <asm/types.h> #include <linux/compiler.h> #ifdef __CHECKER__ extern unsigned long __builtin_bswap_32(unsigned long x); extern unsigned short __builtin_bswap_16(unsigned short x); #endif #define __arc...
--- +++ @@ -12,8 +12,14 @@ extern unsigned short __builtin_bswap_16(unsigned short x); #endif +/* + * avr32-linux-gcc versions earlier than 4.2 improperly sign-extends + * the result. + */ +#if !(__GNUC__ == 4 && __GNUC_MINOR__ < 2) #define __arch__swab32(x) __builtin_bswap_32(x) #define __arch__swab16(x) __bui...
avr32: Work around byteswap bug in gcc < 4.2 gcc versions earlier than 4.2 sign-extends the result of le16_to_cpu() and friends when we implement __arch__swabX() using __builtin_bswap_X(). Disable our arch-specific optimizations when those gcc versions are being used. Signed-off-by: Haavard Skinnemoen <de7418319212d7...
apache-2.0
TeamVee-Kanas/android_kernel_samsung_kanas,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,Krist...
bafe68034e3ef5e9f512bd0468001caf34981c41
// RUN: %clang_cc1 -O3 -ffp-contract=fast -triple=aarch64-apple-darwin -S -o - %s | FileCheck %s // REQUIRES: aarch64-registered-target float fma_test1(float a, float b, float c) { // CHECK: fmadd float x = a * b; float y = x + c; return y; }
// RUN: %clang_cc1 -O3 -ffp-contract=fast -triple=powerpc-apple-darwin10 -S -o - %s | FileCheck %s // REQUIRES: powerpc-registered-target float fma_test1(float a, float b, float c) { // CHECK: fmadds float x = a * b; float y = x + c; return y; }
--- +++ @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -O3 -ffp-contract=fast -triple=powerpc-apple-darwin10 -S -o - %s | FileCheck %s -// REQUIRES: powerpc-registered-target +// RUN: %clang_cc1 -O3 -ffp-contract=fast -triple=aarch64-apple-darwin -S -o - %s | FileCheck %s +// REQUIRES: aarch64-registered-target float fma_tes...
Change -ffp-contract=fast test to run on Aarch64 (I don't have powerpc enabled in my build and I am changing how -ffp-contract=fast works.) git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@298468 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl...
fa33394bb70481412493fcf40d53ebdb2e738058
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef PPAPI_C_PPB_FIND_H_ #define PPAPI_C_PPB_FIND_H_ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_stdint.h" #define PPB_FIND_INTERFACE "...
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef PPAPI_C_PPB_FIND_H_ #define PPAPI_C_PPB_FIND_H_ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_stdint.h" #define PPB_FIND_INTERFACE "...
--- +++ @@ -15,13 +15,13 @@ // there are no matches 0 should be passed in. Only when the plugin has // finished searching should it pass in the final count with finalResult set // to true. - void NumberOfFindResultsChanged(PP_Instance instance, - int32_t total, - ...
Structure member should be function pointer BUG=none TEST=compiles Review URL: http://codereview.chromium.org/2972004
bsd-3-clause
tiaolong/ppapi,lag945/ppapi,nanox/ppapi,CharlesHuimin/ppapi,c1soju96/ppapi,qwop/ppapi,nanox/ppapi,siweilvxing/ppapi,siweilvxing/ppapi,xinghaizhou/ppapi,xiaozihui/ppapi,whitewolfm/ppapi,dingdayong/ppapi,xinghaizhou/ppapi,ruder/ppapi,fubaydullaev/ppapi,xuesongzhu/ppapi,xinghaizhou/ppapi,rise-worlds/ppapi,cacpssl/ppapi,th...
c49e05ca04116a78b2a960f3a05dce6319582a8f
// Copyright (c) 2010 Timur Iskhodzhanov and others. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_COMMON_H_ #define BASE_COMMON_H_ #include <assert.h> // Use CHECK instead of assert. // TODO(timurrrr): print stack trace when ...
// Copyright (c) 2010 Timur Iskhodzhanov and others. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_COMMON_H_ #define BASE_COMMON_H_ #include <assert.h> // Use CHECK instead of assert. // TODO(timurrrr): print stack trace when ...
--- +++ @@ -12,9 +12,9 @@ #define CHECK(x) assert(x) #ifdef _DEBUG +#define DCHECK(x) CHECK(x) +#else #define DCHECK(x) do { } while (0 && (x)) -#else -#define DCHECK(x) CHECK(x) #endif // Use this macro to disable copy constructor and operator= for CLASS_NAME. See
Fix a stupid mistake in DCHECK definition
bsd-3-clause
denfromufa/mipt-course,denfromufa/mipt-course,denfromufa/mipt-course,denfromufa/mipt-course
3132fa5c86cfa9e9a35666829dd6117e84234b5c
#include "stdio.h" #include "stdbool.h" bool checkPythagoreanTriplet(int a, int b, int c); bool checkPythagoreanTriplet(int a, int b, int c) { if ((a * a) + (b * b) == (c * c)) { return true; } else { return false; } } int main(int argc, char const *argv[]) { int i; int j; int k...
#include "stdio.h" #include "stdbool.h" bool checkPythagoreanTriplet (int a, int b, int c); bool checkPythagoreanTriplet (int a, int b, int c) { if((a*a) + (b*b) == (c*c)) { return true; } else { return false; } } int main(int argc, char const *argv[]) { int i; int j; int k; ...
--- +++ @@ -1,31 +1,40 @@ #include "stdio.h" #include "stdbool.h" -bool checkPythagoreanTriplet (int a, int b, int c); +bool checkPythagoreanTriplet(int a, int b, int c); -bool checkPythagoreanTriplet (int a, int b, int c) { - if((a*a) + (b*b) == (c*c)) { - return true; - } else { - return f...
Update format for Problem 9
mit
goparakeets21/Project_Euler
6506bf4e205944a671ddcc148a88273ddce92409
#include <pthread.h> #include "racemacros.h" int g; int *g1; int *g2; pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { pthread_mutex_lock(&mutex); access(*g1); pthread_mutex_lock(&mutex); return NULL; } int main(void) { g1 = g2 = &g; create_threads(t); pthread_mutex_lock(&m...
#include <pthread.h> #include "racemacros.h" int g; int *g1; int *g2; pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { pthread_mutex_lock(&mutex); access(*g1); pthread_mutex_lock(&mutex); return NULL; } int main(void) { g1 = g2 = &g; create_threads(t); assert_racefree(*g2)...
--- +++ @@ -18,9 +18,9 @@ g1 = g2 = &g; create_threads(t); - - assert_racefree(*g2); // UNKNOWN - + pthread_mutex_lock(&mutex); + assert_racefree(*g2); + pthread_mutex_lock(&mutex); join_threads(t); return 0; }
Fix 28/36 to actually be race free It was the same as 28/37.
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
15585314e9802d0c9d341fb9a6b396fd6520e8d4
// Copyright 2016, Jeffrey E. Bedard #include "temperature.h" #include "config.h" #include "font.h" #include "util.h" #include <stdio.h> static uint16_t get_offset(const uint16_t fw, const uint16_t offset, const uint8_t len) { return fw * len + offset + XSTATUS_CONST_WIDE_PAD + XSTATUS_CONST_PAD; } // Returns x off...
// Copyright 2016, Jeffrey E. Bedard #include "temperature.h" #include "config.h" #include "font.h" #include "util.h" #include <stdio.h> #include <string.h> // Returns x offset for next item uint16_t draw_temp(xcb_connection_t * xc, const uint16_t offset) { const uint8_t v = xstatus_system_value(XSTATUS_SYSFILE_TEMP...
--- +++ @@ -4,7 +4,12 @@ #include "font.h" #include "util.h" #include <stdio.h> -#include <string.h> +static uint16_t get_offset(const uint16_t fw, const uint16_t offset, + const uint8_t len) +{ + return fw * len + offset + XSTATUS_CONST_WIDE_PAD + + XSTATUS_CONST_PAD; +} // Returns x offset for next item uint1...
Split out get_offset(). Eliminated unnecessary call to strlen().
mit
jefbed/xstatus,jefbed/xstatus,jefbed/xstatus,jefbed/xstatus
3a999bf6de5a6c4963f448c5498cd2c9c488d1a0
#include <glib.h> #if !GLIB_CHECK_VERSION (2, 40, 0) # define g_assert_true(expr) g_assert ((expr)) # define g_assert_false(expr) g_assert (!(expr)) # define g_assert_null(expr) g_assert ((expr) == NULL) # define g_assert_nonnull(expr) g_assert ((expr) != NULL) #endif #define g...
#include <glib.h> #if !GLIB_CHECK_VERSION (2, 40, 0) # define g_assert_true(expr) g_assert ((expr)) # define g_assert_false(expr) g_assert (!(expr)) # define g_assert_null(expr) g_assert ((expr) == NULL) # define g_assert_nonnull(expr) g_assert ((expr) != NULL) #endif
--- +++ @@ -6,3 +6,23 @@ # define g_assert_null(expr) g_assert ((expr) == NULL) # define g_assert_nonnull(expr) g_assert ((expr) != NULL) #endif + +#define graphene_assert_fuzzy_equals(n1,n2,epsilon) \ + G_STMT_START { \ + typeof ((n1)) __n1 = (n1); \ + typeof ((n2)) __n2 = (n2); \ + t...
tests: Add a fuzzy comparison macro We use something like this in the matrix test suite, but it's useful for other types.
mit
criptych/graphene,criptych/graphene,criptych/graphene,ebassi/graphene,ebassi/graphene,criptych/graphene
1efe7fa345f5ab9fb75ecf6f7109c2f1fd9ec4a0
/* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */ #include "common.h" #include "commands.h" #include "imap-expunge.h" bool cmd_close(struct client_command_context *cmd) { struct client *client = cmd->client; struct mailbox *mailbox = client->mailbox; struct mail_storage *storage; if (!...
/* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */ #include "common.h" #include "commands.h" #include "imap-expunge.h" bool cmd_close(struct client_command_context *cmd) { struct client *client = cmd->client; struct mailbox *mailbox = client->mailbox; struct mail_storage *storage; if (!...
--- +++ @@ -18,6 +18,8 @@ if (!imap_expunge(mailbox, NULL)) client_send_untagged_storage_error(client, storage); + else if (mailbox_sync(mailbox, 0, 0, NULL) < 0) + client_send_untagged_storage_error(client, storage); if (mailbox_close(&mailbox) < 0) client_send_untagged_storage_error(cli...
CLOSE: Synchronize the mailbox after expunging messages to actually get them expunged. --HG-- branch : HEAD
mit
jkerihuel/dovecot,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jkerihuel/dovecot,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jkerihuel/dovecot,jkerihuel/dovecot,jwm/dovecot-notmuch,jkerihuel/dovecot
486d2738965d5e62c08e42a29cc635e6e9be7477
#define WIKIGLYPH_X @"\ue95e" #define WIKIGLYPH_FLAG @"\ue963" #define WIKIGLYPH_USER_SMILE @"\ue964" #define WIKIGLYPH_USER_SLEEP @"\ue965" #define WIKIGLYPH_CC @"\ue969" #define WIKIGLYPH_PUBLIC_DOMAIN @"\ue96c"
#define WIKIGLYPH_FORWARD @"\ue954" #define WIKIGLYPH_BACKWARD @"\ue955" #define WIKIGLYPH_DOWN @"\ue956" #define WIKIGLYPH_X @"\ue95e" #define WIKIGLYPH_FLAG @"\ue963" #define WIKIGLYPH_USER_SMILE @"\ue964" #define WIKIGLYPH_USER_SLEEP @"\ue965" #define WIKIGLYPH_CC @"\ue969" #define WIKIGLYPH_CITE @"\ue96b" #define W...
--- +++ @@ -1,10 +1,6 @@ -#define WIKIGLYPH_FORWARD @"\ue954" -#define WIKIGLYPH_BACKWARD @"\ue955" -#define WIKIGLYPH_DOWN @"\ue956" #define WIKIGLYPH_X @"\ue95e" #define WIKIGLYPH_FLAG @"\ue963" #define WIKIGLYPH_USER_SMILE @"\ue964" #define WIKIGLYPH_USER_SLEEP @"\ue965" #define WIKIGLYPH_CC @"\ue969" -#defin...
Remove unused glyph font defines.
mit
wikimedia/wikipedia-ios,wikimedia/apps-ios-wikipedia,josve05a/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/wikipedia-ios,montehurd/apps-ios-wikipedia,wikimedia/wikipedia-ios,julienbodet/wikipedia-ios,julienbodet/wikipedia-ios,julienbodet/wikipedia-ios,montehurd/apps-ios-wikipedia,wikimedia/wikipedia-ios,montehurd/app...
cca85848f87ed67700301736f1bbd03e6298f65d
#pragma once #include <ionScene/CSimpleMesh.h> #include "SVolume.h" struct SMarchingCubesPoint { f32 Value = 0; vec3f Gradient; SMarchingCubesPoint() {} SMarchingCubesPoint(f32 const & value) : Value(value) {} }; typedef SVolume<SMarchingCubesPoint> SMarchingCubesVolume; void Calcu...
#pragma once #include <ionScene/CSimpleMesh.h> #include "SVolume.h" struct SMarchingCubesPoint { f32 Value; vec3f Gradient; SMarchingCubesPoint() {} SMarchingCubesPoint(f32 const & value) : Value(value) {} }; typedef SVolume<SMarchingCubesPoint> SMarchingCubesVolume; void Calculate...
--- +++ @@ -7,7 +7,7 @@ struct SMarchingCubesPoint { - f32 Value; + f32 Value = 0; vec3f Gradient; SMarchingCubesPoint()
[ionScience] Fix marching cubes unitialized variable
mit
iondune/ionEngine,iondune/ionEngine
217b2661c14b7940bb273f4b793b3c6d41f7425c
/* $OpenBSD: vmparam.h,v 1.4 2009/10/14 20:18:26 miod Exp $ */ /* public domain */ #ifndef _SGI_VMPARAM_H_ #define _SGI_VMPARAM_H_ #define VM_PHYSSEG_MAX 32 /* Max number of physical memory segments */ /* * On Origin and Octane families, DMA to 32-bit PCI devices is restricted. * * Systems with physical memory aft...
/* $OpenBSD: vmparam.h,v 1.3 2009/05/08 18:42:04 miod Exp $ */ #ifndef _SGI_VMPARAM_H_ #define _SGI_VMPARAM_H_ #define VM_PHYSSEG_MAX 32 /* Max number of physical memory segments */ #define VM_NFREELIST 2 #define VM_FREELIST_DMA32 1 /* memory under 2GB suitable for DMA */ #include <mips64/vmparam.h> #endif /* _SG...
--- +++ @@ -1,12 +1,23 @@ -/* $OpenBSD: vmparam.h,v 1.3 2009/05/08 18:42:04 miod Exp $ */ - +/* $OpenBSD: vmparam.h,v 1.4 2009/10/14 20:18:26 miod Exp $ */ +/* public domain */ #ifndef _SGI_VMPARAM_H_ #define _SGI_VMPARAM_H_ #define VM_PHYSSEG_MAX 32 /* Max number of physical memory segments */ +/* + * On Orig...
Add some comments to explain why the DMA32 physseg is really 2**31 bytes long. Prompted by deraadt@ long ago.
isc
orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars
1f561bba70d0746f0b474f39fad689ae7d678517
/* * main.c * * Created: 4/3/2014 8:36:43 AM * Author: razius */ #include <avr/io.h> #include <avr/interrupt.h> uint8_t SECONDS = 0x00; int main(void){ // Clear Timer on Compare Match (CTC) Mode with OCRnA as top. TCCR1A |= _BV(WGM12); // clk / (2 * prescaler * (1 + OCRnA)) OCR1AH = 0x7A; ...
/* * main.c * * Created: 4/3/2014 8:36:43 AM * Author: razius */ #include <avr/io.h> #include <avr/interrupt.h> int main(void){ // Clear Timer on Compare Match (CTC) Mode with OCRnA as top. TCCR4B |= _BV(WGM42); // Toggle OCnA on compare match TCCR4A |= _BV(COM4A0); // clk / (2 * prescaler...
--- +++ @@ -8,28 +8,43 @@ #include <avr/io.h> #include <avr/interrupt.h> +uint8_t SECONDS = 0x00; + int main(void){ // Clear Timer on Compare Match (CTC) Mode with OCRnA as top. - TCCR4B |= _BV(WGM42); - - // Toggle OCnA on compare match - TCCR4A |= _BV(COM4A0); + TCCR1A |= _BV(WGM12); //...
Increment seconds and show them using LED's.
mit
razius/nixie-clock,razius/nixie-clock
3423a5f810efdc0125b4a25e74ecb5c6a4b31e5f
/* $FreeBSD$ */ /* Derived from: Id: linux_genassym.c,v 1.8 1998/07/29 15:50:41 bde Exp */ #include <stddef.h> #include <sys/param.h> #include <sys/assym.h> #include <svr4/svr4_signal.h> #include <svr4/svr4_ucontext.h> /* XXX: This bit sucks rocks, but gets rid of compiler errors. Maybe I should * fix the includ...
/* $FreeBSD$ */ /* Derived from: Id: linux_genassym.c,v 1.8 1998/07/29 15:50:41 bde Exp */ #include <sys/assym.h> #include <sys/param.h> struct proc; #include <svr4/svr4.h> #include <svr4/svr4_signal.h> #include <svr4/svr4_ucontext.h> /* XXX: This bit sucks rocks, but gets rid of compiler errors. Maybe I should ...
--- +++ @@ -1,12 +1,11 @@ /* $FreeBSD$ */ /* Derived from: Id: linux_genassym.c,v 1.8 1998/07/29 15:50:41 bde Exp */ +#include <stddef.h> + +#include <sys/param.h> #include <sys/assym.h> -#include <sys/param.h> -struct proc; - -#include <svr4/svr4.h> #include <svr4/svr4_signal.h> #include <svr4/svr4_ucontex...
Include <stddef.h> here so that <sys/assym.h> can be unpolluted. Include <sys/param.h> before <sys/assym.h> in case any of the magic in the former is ever needed in the latter. Removed an unused forward declaration and an unused include.
bsd-3-clause
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
8e2cc0f4fff1a414b4ea5a0d27d1a6eb8ba303ef
/** * @file * @brief A convenience header * * A header which includes all headers needed for a front-end */ #ifdef __cplusplus extern "C" { #endif #include "boot-loader.h" #include "drives.h" #include "install.h" #include "lickdir.h" #include "llist.h" #include "menu.h" #include "system-info.h" #include "utils.h...
/** * @file * @brief A convenience header * * A header which includes all headers needed for a front-end */ #include "boot-loader.h" #include "drives.h" #include "install.h" #include "lickdir.h" #include "llist.h" #include "menu.h" #include "system-info.h" #include "utils.h"
--- +++ @@ -4,6 +4,10 @@ * * A header which includes all headers needed for a front-end */ + +#ifdef __cplusplus +extern "C" { +#endif #include "boot-loader.h" #include "drives.h" @@ -13,3 +17,7 @@ #include "menu.h" #include "system-info.h" #include "utils.h" + +#ifdef __cplusplus +} +#endif
Add `extern "C"' to convenience headers
mit
noryb009/lick,noryb009/lick,noryb009/lick
e5fc7d47e00c9d375a320b97e19790715c6e8104
// RUN: %clang_cc1 -triple x86_64-pc-win32 -emit-llvm -O2 -o - %s | FileCheck %s // Under Windows 64, int and long are 32-bits. Make sure pointer math doesn't // cause any sign extensions. // CHECK: [[P:%.*]] = add i64 %param, -8 // CHECK-NEXT: [[Q:%.*]] = inttoptr i64 [[P]] to [[R:%.*\*]] // CHECK-NEXT: {{%.*}...
// RUN: %clang_cc1 -triple x86_64-pc-win32 -emit-llvm -O2 -o - %s | FileCheck %s // Under Windows 64, int and long are 32-bits. Make sure pointer math doesn't // cause any sign extensions. // CHECK: [[P:%.*]] = add i64 %param, -8 // CHECK-NEXT: [[Q:%.*]] = inttoptr i64 [[P]] to [[R:%.*]] // CHECK-NEXT: {{%.*}} ...
--- +++ @@ -4,7 +4,7 @@ // cause any sign extensions. // CHECK: [[P:%.*]] = add i64 %param, -8 -// CHECK-NEXT: [[Q:%.*]] = inttoptr i64 [[P]] to [[R:%.*]] +// CHECK-NEXT: [[Q:%.*]] = inttoptr i64 [[P]] to [[R:%.*\*]] // CHECK-NEXT: {{%.*}} = getelementptr inbounds [[R]] [[Q]], i64 0, i32 0 #define CR(Rec...
Tweak regex not to accidentally match a trailing \r. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@113966 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-cl...
bf3a60b17fa0a12bc7a548e9c659f45684742258
#pragma once #include <iostream> // The same as assert, but expression is always evaluated and result returned #define CHECK(expr) (assert(expr), expr) #if !defined(NDEBUG) // Debug namespace dev { namespace evmjit { std::ostream& getLogStream(char const* _channel); } } #define DLOG(CHANNEL) ::dev::evmjit::getLo...
#pragma once #include <iostream> // The same as assert, but expression is always evaluated and result returned #define CHECK(expr) (assert(expr), expr) #if !defined(NDEBUG) // Debug namespace dev { namespace evmjit { std::ostream& getLogStream(char const* _channel); } } #define DLOG(CHANNEL) ::dev::evmjit::getLo...
--- +++ @@ -20,5 +20,21 @@ #define DLOG(CHANNEL) ::dev::evmjit::getLogStream(#CHANNEL) #else // Release - #define DLOG(CHANNEL) true ? std::cerr : std::cerr + +namespace dev +{ +namespace evmjit +{ + +struct Voider +{ + void operator=(std::ostream const&) {} +}; + +} +} + + +#define DLOG(CHANNEL) true ? (void)0 :...
Reimplement no-op version of DLOG to avoid C++ compiler warning
mit
ethcore/evmjit,debris/evmjit,debris/evmjit,ethcore/evmjit
8bbaaabf9f3db24f387ba1f7bf7374c6ea73f8d3
#ifndef SCC_SEMANTIC_HEADER #define SCC_SEMANTIC_HEADER #include <stdio.h> #include <stdbool.h> #include "syntax.h" #include "symboltable.h" bool semantic_analysis(Syntax * top_level); #endif
#ifndef SCC_SEMANTIC_HEADER #define SCC_SEMANTIC_HEADER #include <stdio.h> #include "syntax.h" #include "symboltable.h" int semantic_analysis(Syntax * top_level); #endif
--- +++ @@ -2,9 +2,10 @@ #define SCC_SEMANTIC_HEADER #include <stdio.h> +#include <stdbool.h> #include "syntax.h" #include "symboltable.h" -int semantic_analysis(Syntax * top_level); +bool semantic_analysis(Syntax * top_level); #endif
Change the return type to bool.
mit
RyanWangGit/scc
22a40259343115f241456b6914e86c32ab1e3e46
/* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #ifndef _PLATSUPPORT_PIT_H #define _PLATSUPPORT_PIT_H #include <autoconf.h> #include...
/* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #ifndef _PLATSUPPORT_PIT_H #define _PLATSUPPORT_PIT_H #include <platsupport/timer.h>...
--- +++ @@ -10,10 +10,15 @@ #ifndef _PLATSUPPORT_PIT_H #define _PLATSUPPORT_PIT_H +#include <autoconf.h> #include <platsupport/timer.h> #include <platsupport/io.h> +#ifdef CONFIG_IRQ_PIC #define PIT_INTERRUPT 0 +#else +#define PIT_INTERRUPT 2 +#endif /* * Get the pit interface. This may only...
libplatsupport: Define PIT interrupt more correctly if using the IOAPIC The definition is not really correct as you cannot really talk about interrupts by a single number. But this does provide the path of least resistance for legacy code using the PIT when the IOAPIC is enabled
bsd-2-clause
agacek/util_libs,agacek/util_libs,agacek/util_libs,agacek/util_libs
196992d9be7b1dcbb706a1c229ff3786d7c4935b
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "bmp.h" const int image_width = 512; const int image_height = 512; const int image_size = 512*512; const int color_depth = 255; int main(int argc, char** argv){ if(argc != 3){ printf("Useage: %s image n_threads\n", argv[0]); exit...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "bmp.h" const int image_width = 512; const int image_height = 512; const int image_size = 512*512; const int color_depth = 255; int main(int argc, char** argv){ if(argc != 3){ printf("Useage: %s image n_threads\n", argv[0]); exit...
--- +++ @@ -21,12 +21,14 @@ int* histogram = (int*)calloc(sizeof(int), color_depth); + #pragma omp parallel for for(int i = 0; i < image_size; i++){ histogram[image[i]]++; } float* transfer_function = (float*)calloc(sizeof(float), color_depth); + #pragma omp parallel for ...
Add paralellism with race conditions to omp
apache-2.0
Raane/Parallel-Computing,Raane/Parallel-Computing
a2af1d8bff1b3729048f95c8c266ef8f2fb4c861
// Copyright 2015 SimpleThings, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
// Copyright 2015 SimpleThings, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
--- +++ @@ -23,11 +23,6 @@ #include <stdlib.h> -void canopy_os_assert(int condition) { - assert(condition); -} - - void * canopy_os_alloc(size_t size) { return malloc(size); }
Remove canopy_os_assert implementation because linux implementation now just expands to assert macro in header file
apache-2.0
canopy-project/canopy_os_linux
eada73f748007102da090de2f6ac65691a9ea9a8
#ifndef CHC_NARROWPHASE_H #define CHC_NARROWPHASE_H #include "chrono_parallel/ChParallelDefines.h" #include "chrono_parallel/ChDataManager.h" namespace chrono { namespace collision { struct ConvexShape { shape_type type; //type of shape real3 A; //location real3 B; //dimensions real3 C; //extra qu...
#ifndef CHC_NARROWPHASE_H #define CHC_NARROWPHASE_H #include "chrono_parallel/ChParallelDefines.h" #include "chrono_parallel/ChDataManager.h" namespace chrono { namespace collision { struct ConvexShape { shape_type type; //type of shape real3 A; //location real3 B; //dimensions real3 C; //extra qu...
--- +++ @@ -14,6 +14,8 @@ real3 C; //extra quaternion R; //rotation real3* convex; // pointer to convex data; + real margin; + ConvexShape():margin(0.04){} }; } // end namespace collision
Add a collision margin to each shape Margins are one way to improve stability of contacts. Only the GJK solver will use these initially
bsd-3-clause
jcmadsen/chrono,PedroTrujilloV/chrono,jcmadsen/chrono,Milad-Rakhsha/chrono,hsu/chrono,dariomangoni/chrono,hsu/chrono,projectchrono/chrono,andrewseidl/chrono,projectchrono/chrono,hsu/chrono,projectchrono/chrono,tjolsen/chrono,dariomangoni/chrono,armanpazouki/chrono,rserban/chrono,dariomangoni/chrono,Milad-Rakhsha/chrono...
443637f6a485f7c9f5e1c4cf393b5fd22a718c69
#ifndef HELPER_H #define HELPER_H /*Helper function for calculating ABSOLUTE maximum of two floats Will return maximum absolute value (ignores sign) */ float helpFindMaxAbsFloat(float a, float b) { float aAbs = abs(a); float bAbs = abs(b); if (aAbs > bAbs) { return aAbs; } else { return bAbs; } } //Helper ...
#ifndef HELPER_H #define HELPER_H /*Helper function for calculating ABSOLUTE maximum of two floats Will return maximum absolute value (ignores sign) */ float helpFindMaxAbsFloat(float a, float b) { float aAbs = abs(a); float bAbs = abs(b); if (aAbs > bAbs) { return aAbs; } else { return bAbs; } } //Helper ...
--- +++ @@ -25,8 +25,8 @@ } } -//Returns sign of float -int helpFindSign(float x) { +//Returns sign of int +int helpFindSign(int x) { if (x > 0.0) { return 1; } else if (x < 0.0) {
Fix helpFindSign (floats don't have signs....)
mit
RMRobotics/FTC_5421_2014-2015,RMRobotics/FTC_5421_2014-2015
f49f7674b9ec11b777b0954ea9fa0fe73a7ad4be
inherit "/lib/string/sprint"; inherit "../support"; static string thing_form(object obj) { string buffer; buffer = "<p>Fun little boxes:</p>\n"; buffer += "<form action=\"object.lpc?obj=" + object2string(obj) + "\" method=\"post\">\n"; buffer += "Local mass: <input type=\"text\" name=\"localmass\" value=\"" + mi...
inherit "/lib/string/sprint"; inherit "../support"; static string thing_form(object obj) { string buffer; buffer = "<p>Fun little boxes:</p>\n"; buffer += "<form action=\"object.lpc?obj=" + object2string(obj) + "\" method=\"post\">\n"; buffer += "Mass: <input type=\"text\" name=\"mass\" value=\"" + mixed_sprint(...
--- +++ @@ -8,11 +8,6 @@ buffer = "<p>Fun little boxes:</p>\n"; buffer += "<form action=\"object.lpc?obj=" + object2string(obj) + "\" method=\"post\">\n"; - buffer += "Mass: <input type=\"text\" name=\"mass\" value=\"" + mixed_sprint(obj->query_mass()) + "\"/>\n"; - buffer += "<input type=\"submit\" value=\"cha...
Remove http form for mass, only manipulate local mass
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
b701d2ce0e96280713b84192aed48fb87d609d94
#include <pthread.h> #include <assert.h> int g = 0; pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t C = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { pthread_mutex_lock(&A); pthread_mutex_lock(&C); pthread_mutex_lock(&B); g = 5; pthread_mut...
#include <pthread.h> #include <assert.h> int g = 0; pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t C = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { pthread_mutex_lock(&A); pthread_mutex_lock(&C); pthread_mutex_lock(&B); g = 5; pthread_mut...
--- +++ @@ -24,9 +24,6 @@ pthread_t id; pthread_create(&id, NULL, t_fun, NULL); - pthread_mutex_lock(&B); - pthread_mutex_unlock(&B); - pthread_mutex_lock(&A); pthread_mutex_lock(&B); assert(g == 0);
Remove now somehow unnecessary empty mutex B section from 13/32
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
dfeaa08d905e605519683cb85d25976264941d61
// RUN: %ocheck 3 %s -g // test debug emission too g() { return 3; } main() { if(0){ int i; f(); // shouldn't hit a linker error here - dead code a: i = 2; return g(i); } goto a; }
// RUN: %ocheck 3 %s g() { return 3; } main() { if(0){ f(); // shouldn't hit a linker error here - dead code a: return g(); } goto a; }
--- +++ @@ -1,4 +1,5 @@ -// RUN: %ocheck 3 %s +// RUN: %ocheck 3 %s -g +// test debug emission too g() { @@ -8,9 +9,11 @@ main() { if(0){ + int i; f(); // shouldn't hit a linker error here - dead code a: - return g(); + i = 2; + return g(i); } goto a;
Test debug label emission with local variables
mit
8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler
60f560824bf9fb6ec9148f5b36eae83827b5de42
// RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-### " %clang -target x86_64-apple-darwin %s -O2 b -O3 2>&1 | FileCheck %s // RUN: env QA_OVERRIDE_GCC3_OPTIONS="x-Werror +-msse" %clang -target x86_64-apple-darwin -Werror %s -c -### 2>&1 | FileCheck %s -check-prefix=RM-WERROR ...
// RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-### " %clang -target x86_64-apple-darwin %s -O2 b -O3 2>&1 | FileCheck %s // RUN: env QA_OVERRIDE_GCC3_OPTIONS="x-Werror +-mfoo" %clang -target x86_64-apple-darwin -Werror %s -c -### 2>&1 | FileCheck %s -check-prefix=RM-WERROR ...
--- +++ @@ -1,13 +1,12 @@ // RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-### " %clang -target x86_64-apple-darwin %s -O2 b -O3 2>&1 | FileCheck %s -// RUN: env QA_OVERRIDE_GCC3_OPTIONS="x-Werror +-mfoo" %clang -target x86_64-apple-darwin -Werror %s -c -### 2>&1 | FileChe...
Use a valid option (-msse) for testing QA_OVERRIDE_GCC3_OPTIONS. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@191300 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl...
ba9175808084f22081a755314f966fa26026a8d7
// -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ // // This file is part of the LibreOffice project. // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozi...
// -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ // // This file is part of the LibreOffice project. // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozi...
--- +++ @@ -9,12 +9,18 @@ #import "MLOViewController.h" #import "MLOTestingTileSubviewControllerProtocol.h" +// The size of the actual pixel tile static const CGFloat CONTEXT_WIDTH_DEFAULT = 450; static const CGFloat CONTEXT_HEIGHT_DEFAULT = 450; -static const CGFloat TILE_POS_X_DEFAULT = 400; -static const CGF...
Adjust parameter defaults to give pleasant result Change-Id: Ifee900344547ef25b2041d25c13fcbc50428485e
mpl-2.0
JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core
e56b0c0f248ae779a0abd9e1d5aa7f7420a03f64
/*- * Copyright (c) 2008-2016 Varnish Software AS * All rights reserved. * * Author: Guillaume Quintard <guillaume.quintard@gmail.com> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of s...
#include "vqueue.h" #define ITER_DONE(iter) (iter->buf == iter->end ? hpk_done : hpk_more) struct dynhdr { struct hpk_hdr header; VTAILQ_ENTRY(dynhdr) list; }; VTAILQ_HEAD(dynamic_table,dynhdr); struct hpk_iter { struct hpk_ctx *ctx; char *orig; char *buf; char *end; }; const struct txt * tbl_get_key(co...
--- +++ @@ -1,3 +1,31 @@ +/*- + * Copyright (c) 2008-2016 Varnish Software AS + * All rights reserved. + * + * Author: Guillaume Quintard <guillaume.quintard@gmail.com> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + *...
Add a copyright to this file
bsd-2-clause
gquintard/Varnish-Cache,gquintard/Varnish-Cache,gquintard/Varnish-Cache,gquintard/Varnish-Cache
a98d2b55c79a9959efd814bd9a316415ebc8dac8
#ifndef UTIL_STRING_H #define UTIL_STRING_H #include "util/common.h" #ifndef strndup // This is sometimes a macro char* strndup(const char* start, size_t len); #endif char* strnrstr(const char* restrict s1, const char* restrict s2, size_t len); #endif
#ifndef UTIL_STRING_H #define UTIL_STRING_H #include "util/common.h" char* strndup(const char* start, size_t len); char* strnrstr(const char* restrict s1, const char* restrict s2, size_t len); #endif
--- +++ @@ -3,7 +3,11 @@ #include "util/common.h" +#ifndef strndup +// This is sometimes a macro char* strndup(const char* start, size_t len); +#endif + char* strnrstr(const char* restrict s1, const char* restrict s2, size_t len); #endif
Util: Fix build with strndup on some platforms
mpl-2.0
mgba-emu/mgba,mgba-emu/mgba,libretro/mgba,nattthebear/mgba,MerryMage/mgba,AdmiralCurtiss/mgba,Iniquitatis/mgba,fr500/mgba,libretro/mgba,Anty-Lemon/mgba,matthewbauer/mgba,iracigt/mgba,cassos/mgba,askotx/mgba,nattthebear/mgba,fr500/mgba,sergiobenrocha2/mgba,sergiobenrocha2/mgba,Anty-Lemon/mgba,jeremyherbert/mgba,MerryMag...
938c9e965d14e6867f165b3be3391b0c15484bf5
//===- llvm/Transforms/Utils/IntegerDivision.h ------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===- llvm/Transforms/Utils/IntegerDivision.h ------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
--- +++ @@ -23,6 +23,14 @@ namespace llvm { + /// Generate code to divide two integers, replacing Div with the generated + /// code. This currently generates code similarly to compiler-rt's + /// implementations, but future work includes generating more specialized code + /// when more information about the ...
Document the interface for integer expansion, using doxygen-style comments git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@164231 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-...
16514de50a7936950845a3851cae8ce571e0c2c2
// Copyright 2013 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law...
// Copyright 2013 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law...
--- +++ @@ -16,6 +16,8 @@ #ifndef WOFF2_PORT_H_ #define WOFF2_PORT_H_ + +#include <assert.h> namespace woff2 {
Include assert.h explicitly to fix windows build Fixes the error: C3861: 'assert': identifier not found
mit
nfroidure/ttf2woff2,nfroidure/ttf2woff2,nfroidure/ttf2woff2,nfroidure/ttf2woff2
42afa0c5d2e3cfac5535d218027c05eb742b1383
#pragma once #include <memory> #include <cstdio> // fopen, fclose #include <openssl/evp.h> #include <openssl/ec.h> namespace JWTXX { namespace Utils { struct EVPKeyDeleter { void operator()(EVP_PKEY* key) { EVP_PKEY_free(key); } }; typedef std::unique_ptr<EVP_PKEY, EVPKeyDeleter> EVPKeyPtr; struct EVPMDCTXDel...
#pragma once #include <memory> #include <cstdio> // fopen, fclose #include <openssl/evp.h> #include <openssl/ec.h> namespace JWTXX { namespace Utils { struct FileCloser { void operator()(FILE* fp) { fclose(fp); } }; typedef std::unique_ptr<FILE, FileCloser> FilePtr; struct EVPKeyDeleter { void operator()(...
--- +++ @@ -11,12 +11,6 @@ { namespace Utils { - -struct FileCloser -{ - void operator()(FILE* fp) { fclose(fp); } -}; -typedef std::unique_ptr<FILE, FileCloser> FilePtr; struct EVPKeyDeleter {
Move file closer out from public.
mit
madf/jwtxx,madf/jwtxx,RealImage/jwtxx,RealImage/jwtxx
8573926253391f103e73c7b4ec77a6e61b662186
/* Include this file in your project * if you don't want to build libmypaint as a separate library * Note that still need to do -I./path/to/libmypaint/sources * for the includes here to succeed. */ #include "helpers.c" #include "brushmodes.c" #include "fifo.c" #include "operationqueue.c" #include "rng-double.c" #in...
/* Include this file in your project * if you don't want to build libmypaint as a separate library * Note that still need to do -I./path/to/libmypaint/sources * for the includes here to succeed. */ #include "mapping.c" #include "helpers.c" #include "brushmodes.c" #include "fifo.c" #include "operationqueue.c" #inclu...
--- +++ @@ -3,7 +3,6 @@ * Note that still need to do -I./path/to/libmypaint/sources * for the includes here to succeed. */ -#include "mapping.c" #include "helpers.c" #include "brushmodes.c" #include "fifo.c" @@ -19,3 +18,4 @@ #include "mypaint-surface.c" #include "mypaint-tiled-surface.c" #include "mypain...
Remove a lingering ref to mapping.c
isc
achadwick/libmypaint,achadwick/libmypaint,achadwick/libmypaint,achadwick/libmypaint
81de6e841c6775e619b94c12be49969be9d68968
/* Copyright 2013 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ag...
/* Copyright 2013 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ag...
--- +++ @@ -22,10 +22,11 @@ #ifndef _MSC_VER #include <inttypes.h> -#ifdef __STRICT_ANSI__ +#if defined(__cplusplus) || !defined(__STRICT_ANSI__) \ + || __STDC_VERSION__ >= 199901L +#define BROTLI_INLINE inline +#else #define BROTLI_INLINE -#else /* __STRICT_ANSI__ */ -#define BROTLI_INLINE inline #endif #...
Allow use of inline keyword in c++/c99 mode.
apache-2.0
luzhongtong/brotli,koolhazz/brotli,yonchev/brotli,Bulat-Ziganshin/brotli,google/brotli,rgordeev/brotli,daltonmaag/brotli,BuildAPE/brotli,emil-io/brotli,yonchev/brotli,PritiKumr/brotli,andrebellafronte/brotli,iamjbn/brotli,anthrotype/brotli,ya7lelkom/brotli,silky/brotli,archiveds/brotli,google/brotli,chinanjjohn2012/bro...
dd6237b0e8aa8b3d80f05e9fa4a225fd80d2d84c
#include <gmp.h> #include "m-array.h" #include "m-algo.h" ARRAY_DEF(mpz, mpz_t, M_CLASSIC_OPLIST(mpz)) ALGO_DEF(array_mpz, ARRAY_OPLIST(mpz, M_CLASSIC_OPLIST(mpz))) static inline void my_mpz_inc(mpz_t *d, const mpz_t a){ mpz_add(*d, *d, a); } static inline void my_mpz_sqr(mpz_t *d, const mpz_t a){ mpz_mul(*d, a,...
#include <gmp.h> #include "m-array.h" #include "m-algo.h" ARRAY_DEF(mpz, mpz_t, M_CLASSIC_OPLIST(mpz)) ALGO_DEF(array_mpz, ARRAY_OPLIST(mpz, M_CLASSIC_OPLIST(mpz))) static inline void my_mpz_inc(mpz_t d, const mpz_t a){ mpz_add(d, d, a); } static inline void my_mpz_sqr(mpz_t d, const mpz_t a){ mpz_mul(d, a, a); ...
--- +++ @@ -6,11 +6,11 @@ ARRAY_DEF(mpz, mpz_t, M_CLASSIC_OPLIST(mpz)) ALGO_DEF(array_mpz, ARRAY_OPLIST(mpz, M_CLASSIC_OPLIST(mpz))) -static inline void my_mpz_inc(mpz_t d, const mpz_t a){ - mpz_add(d, d, a); +static inline void my_mpz_inc(mpz_t *d, const mpz_t a){ + mpz_add(*d, *d, a); } -static inline void m...
Update example with new constraints on map/reduce prototype.
bsd-2-clause
P-p-H-d/mlib,P-p-H-d/mlib
1abf575c1cf36df59d0673c0e5d8b326f4526a8b
#pragma once #include <vector> #include <boost/multiprecision/cpp_int.hpp> namespace dev { namespace eth { namespace jit { using byte = uint8_t; using bytes = std::vector<byte>; using u256 = boost::multiprecision::uint256_t; using bigint = boost::multiprecision::cpp_int; struct NoteChannel {}; // FIXME: Use some lo...
#pragma once #include <vector> #include <boost/multiprecision/cpp_int.hpp> namespace dev { namespace eth { namespace jit { using byte = uint8_t; using bytes = std::vector<byte>; using u256 = boost::multiprecision::uint256_t; using bigint = boost::multiprecision::cpp_int; struct NoteChannel {}; // FIXME: Use some lo...
--- +++ @@ -37,10 +37,10 @@ // TODO: Replace with h256 struct i256 { - uint64_t a; - uint64_t b; - uint64_t c; - uint64_t d; + uint64_t a = 0; + uint64_t b = 0; + uint64_t c = 0; + uint64_t d = 0; }; static_assert(sizeof(i256) == 32, "Wrong i265 size");
Fix some GCC initialization warnings
mit
expanse-project/cpp-expanse,vaporry/cpp-ethereum,yann300/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,d-das/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,xeddmc/cpp-ethereum,joeldo/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-god...
961166443c193be490106684f3c29e894d21dcfd
/** * This file is part of the librailcan library. * * Copyright (C) 2015 Reinder Feenstra <reinderfeenstra@gmail.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * v...
/** * This file is part of the librailcan library. * * Copyright (C) 2015 Reinder Feenstra <reinderfeenstra@gmail.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * v...
--- +++ @@ -22,7 +22,7 @@ #include "librailcan.h" #include <string.h> -int debug_level = LIBRAILCAN_DEBUGLEVEL_DEBUG;//LIBRAILCAN_DEBUGLEVEL_NONE; +int debug_level = LIBRAILCAN_DEBUGLEVEL_NONE; int librailcan_set_debug_level( int level ) {
Set default debug level to none.
lgpl-2.1
reinder/librailcan,reinder/librailcan,reinder/librailcan
bc9445a9173ec23196a3fdbfb3cfb5ea4bc1d084
// RUN: %check %s struct A { int i; }; void take(void *); int f(const void *p) { struct A *a = p; // CHECK: warning: implicit cast removes qualifiers (const) struct A *b = (struct A *)p; // CHECK: !/warning:.*cast removes qualifiers/ (void)a; (void)b; const char c = 5; take(&c); // CHECK: warning: implicit ...
// RUN: %check %s struct A { int i; }; int f(const void *p) { struct A *a = p; // CHECK: warning: implicit cast removes qualifiers (const) struct A *b = (struct A *)p; // CHECK: !/warning:.*cast removes qualifiers/ (void)a; (void)b; }
--- +++ @@ -4,6 +4,8 @@ { int i; }; + +void take(void *); int f(const void *p) { @@ -12,4 +14,7 @@ (void)a; (void)b; + + const char c = 5; + take(&c); // CHECK: warning: implicit cast removes qualifiers (const) }
Add another case to qualifier-removal test
mit
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
9d0b2a96595333aef5c4dd7ab0f15d9c663aee2a
#include "input.h" #include "command.h" TreeNode curNode; char curPlane, extra; void initializeInput() { initializeCommands(); curPlane = 0; } void handleInput(char ch, AtcsoData *data, WINDOW *msgWin) { if (!curPlane) { if (ch >= 'a' && ch <= 'z') { curPlane = ch; curNode...
#include "input.h" #include "command.h" TreeNode curNode; char curPlane, extra; void initializeInput() { initializeCommands(); curPlane = 0; } void handleInput(char ch, AtcsoData *data, WINDOW *msgWin) { if (!curPlane) { if (ch >= 'a' && ch <= 'z') { curPlane = ch; curNode...
--- +++ @@ -26,17 +26,14 @@ wrefresh(msgWin); } } else { - extra = '\0'; - if (ch >= '0' && ch <= '9') { - extra = ch; - ch = '#'; - } + extra = ch; + if (ch >= '0' && ch <= '9') ch = '#'; for (int i = 0; i < curNode.nChild...
Fix bizarre bug in "altitude [climb|descend]" Climb was descending, and descend was climbing. Turns out it's because they were trying to climb/descend... newline amount. O_o
mit
KeyboardFire/atcso
f8f561cce68c06ccf63d1ba9e3503c230daf0f8b
#ifndef __KMS_URI_END_POINT_STATE_H__ #define __KMS_URI_END_POINT_STATE_H__ G_BEGIN_DECLS typedef enum { KMS_URI_END_POINT_STATE_STOP, KMS_URI_END_POINT_STATE_START, KMS_URI_END_POINT_STATE_PAUSE } KmsUriEndPointState; G_END_DECLS #endif /* __KMS_URI_END_POINT_STATE__ */
#ifndef __KMS_URI_END_POINT_STATE_H__ #define __KMS_URI_END_POINT_STATE_H__ G_BEGIN_DECLS typedef enum { KMS_URI_END_POINT_STATE_STOP, KMS_URI_END_POINT_STATE_START, KMS_URI_END_POINT_STATE_PLAY } KmsUriEndPointState; G_END_DECLS #endif /* __KMS_URI_END_POINT_STATE__ */
--- +++ @@ -7,7 +7,7 @@ { KMS_URI_END_POINT_STATE_STOP, KMS_URI_END_POINT_STATE_START, - KMS_URI_END_POINT_STATE_PLAY + KMS_URI_END_POINT_STATE_PAUSE } KmsUriEndPointState; G_END_DECLS
Fix state definition for UriEndPointElement Change-Id: I72aff01136f3f13536e409040e42ad1a6dffcd4d
apache-2.0
Kurento/kms-elements,shelsonjava/kms-elements,TribeMedia/kms-elements,Kurento/kms-elements,shelsonjava/kms-elements,shelsonjava/kms-elements,TribeMedia/kms-elements,TribeMedia/kms-elements,Kurento/kms-elements
3f75051b71f0187e6045ecd2c4e84a6e4424dc04
/* * Copyright (c) 2011 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * be found in the LICENSE file. */ #include <stdlib.h> #include <stdio.h> #include "native_client/src/include/portability.h" #include "native_client/src/shared/platform/...
/* * Copyright 2011 The Native Client 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 <stdlib.h> #include <stdio.h> #include "native_client/src/include/portability.h" #include "native_client/src/shared/platform/nacl_ex...
--- +++ @@ -1,6 +1,6 @@ /* - * Copyright 2011 The Native Client Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can + * Copyright (c) 2011 The Native Client Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be * b...
Remove printfs in exit path Due to failures in Win7Atom I added printfs for debugging. This CL removes the printfs which should not be in the shipping code. TEST= all BUG= nacl1561 Review URL: http://codereview.chromium.org/6825057 git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@4846 fcba33aa-ac0c-11dd-b9e7-8d...
bsd-3-clause
nacl-webkit/native_client,sbc100/native_client,sbc100/native_client,nacl-webkit/native_client,sbc100/native_client,nacl-webkit/native_client,sbc100/native_client,nacl-webkit/native_client,sbc100/native_client,sbc100/native_client,nacl-webkit/native_client
8b013deb4e9cd4130ece436909878b7ec7d90a60
#define JOIN_(a, b) a ## b #define JOIN(a, b) JOIN_(a, b) #define SYMBL(x) JOIN(__USER_LABEL_PREFIX__, x) #if defined(__linux__) # define SECTION_NAME_TEXT .text # define SECTION_NAME_BSS .bss .section .note.GNU-stack,"",@progbits #elif defined(__DARWIN__) # define SECTION_NAME_TEXT __TEXT,__text # define SECTI...
#define JOIN_(a, b) a ## b #define JOIN(a, b) JOIN_(a, b) #define SYMBL(x) JOIN(__USER_LABEL_PREFIX__, x) #if defined(__linux__) # define SECTION_NAME_TEXT .text # define SECTION_NAME_BSS .bss #elif defined(__DARWIN__) # define SECTION_NAME_TEXT __TEXT,__text # define SECTION_NAME_BSS __BSS,__bss #else # error u...
--- +++ @@ -6,6 +6,9 @@ #if defined(__linux__) # define SECTION_NAME_TEXT .text # define SECTION_NAME_BSS .bss + +.section .note.GNU-stack,"",@progbits + #elif defined(__DARWIN__) # define SECTION_NAME_TEXT __TEXT,__text # define SECTION_NAME_BSS __BSS,__bss
Enable noexecstack for local-lib builds
mit
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
0286596dd6eee2b3573722716af45395314e4246
/* 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
ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot
b62006060ff1b9079f7d4a6771b6079a34399c83
// // BBAAPIErrors.h // BBAAPI // // Created by Owen Worley on 11/08/2014. // Copyright (c) 2014 Blinkbox Books. All rights reserved. // NS_ENUM(NSInteger, BBAAPIError) { /** * Used when needed parameter is not supplied to the method * or when object is supplied but it has wrong type or * fo...
// // BBAAPIErrors.h // BBAAPI // // Created by Owen Worley on 11/08/2014. // Copyright (c) 2014 Blinkbox Books. All rights reserved. // NS_ENUM(NSInteger, BBAAPIError) { /** * Used when needed parameter is not supplied to the method * or when object is supplied but it has wrong type or * fo...
--- +++ @@ -40,6 +40,10 @@ /** * Used when the server returns a 400 (Bad Request) */ - BBAAPIBadRequest = 707, + BBAAPIErrorBadRequest = 707, + /** + * Used when the server returns a 409 (Conflict) + */ + BBAAPIErrorConflict = 708, };
Add BBAAPIError code for 409 conflict
mit
blinkboxbooks/blinkbox-network.objc,blinkboxbooks/blinkbox-network.objc
ee1c651b874656b27267266797d6fb693764c621
/* * getarguments.c -- Get the argument vector ready to go. * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. */ #include <h/mh.h> #include <h/utils.h> char ** getarguments (char *invo_name, ...
/* * getarguments.c -- Get the argument vector ready to go. * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. */ #include <h/mh.h> #include <h/utils.h> char ** getarguments (char *invo_name, ...
--- +++ @@ -20,7 +20,7 @@ * Check if profile/context specifies any arguments */ if (check_context && (cp = context_find (invo_name))) { - cp = getcpy (cp); /* make copy */ + cp = mh_xstrdup(cp); /* make copy */ ap = brkstring (cp, " ", "\n"); /* split string */ /* Count number of argume...
Replace getcpy() with mh_xstrdup() where the string isn't NULL.
bsd-3-clause
mcr/nmh,mcr/nmh
92dd7b914b878f2172b4d436e9643c4a0d24683b
/* * BDSup2Sub++ (C) 2012 Adam T. * Based on code from BDSup2Sub by Copyright 2009 Volker Oth (0xdeadbeef) * and Copyright 2012 Miklos Juhasz (mjuhasz) * * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtai...
/* * BDSup2Sub++ (C) 2012 Adam T. * Based on code from BDSup2Sub by Copyright 2009 Volker Oth (0xdeadbeef) * and Copyright 2012 Miklos Juhasz (mjuhasz) * * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtai...
--- +++ @@ -33,8 +33,8 @@ void setPaletteSize(int paletteSize) { size = paletteSize; } private: - int offset = 0; - int size = 0; + int offset = -1; + int size = -1; }; #endif // PALETTEINFO_H
Change default values to -1.
apache-2.0
darealshinji/BDSup2SubPlusPlus,amichaelt/BDSup2SubPlusPlus,amichaelt/BDSup2SubPlusPlus,darealshinji/BDSup2SubPlusPlus
2788f282bbd2e945c1e77c94bc45b8ece5f9b4db
#include <math.h> #include <pal.h> static const float pi_2 = (float) M_PI / 2.f; /** * * Computes the inverse cosine (arc cosine) of the input vector 'a'. Input * values to acos must be in the range -1 to 1. The result values are in the * range 0 to pi. The function does not check for illegal input values. * * ...
#include <pal.h> /** * * Computes the inverse cosine (arc cosine) of the input vector 'a'. Input * values to acos must be in the range -1 to 1. The result values are in the * range 0 to pi. The function does not check for illegal input values. * * @param a Pointer to input vector * * @param c Pointer t...
--- +++ @@ -1,4 +1,7 @@ +#include <math.h> #include <pal.h> + +static const float pi_2 = (float) M_PI / 2.f; /** * @@ -15,12 +18,15 @@ * @return None * */ -#include <math.h> void p_acos_f32(const float *a, float *c, int n) { int i; + float tmp; + /* acos x = pi/2 - asin x */ + p_asi...
math:acos: Implement the inverse cosine function. Signed-off-by: Mansour Moufid <ac5f6b12fab5e0d4efa7215e6c2dac9d55ab77dc@gmail.com>
apache-2.0
debug-de-su-ka/pal,parallella/pal,eliteraspberries/pal,aolofsson/pal,aolofsson/pal,Adamszk/pal3,debug-de-su-ka/pal,eliteraspberries/pal,eliteraspberries/pal,parallella/pal,mateunho/pal,debug-de-su-ka/pal,mateunho/pal,mateunho/pal,debug-de-su-ka/pal,olajep/pal,8l/pal,Adamszk/pal3,8l/pal,parallella/pal,debug-de-su-ka/pal...
fa7c9bc2318b195aa8218e51e8f1c4b1f52ac43e
/* * copyright 2015 wink saville * * licensed under the apache license, version 2.0 (the "license"); * you may not use this file except in compliance with the license. * you may obtain a copy of the license at * * http://www.apache.org/licenses/license-2.0 * * unless required by applicable law or agreed to...
/* * copyright 2015 wink saville * * licensed under the apache license, version 2.0 (the "license"); * you may not use this file except in compliance with the license. * you may obtain a copy of the license at * * http://www.apache.org/licenses/license-2.0 * * unless required by applicable law or agreed to...
--- +++ @@ -18,8 +18,8 @@ #include "inttypes.h" void poweroff(void) { - uint32_t* pUnlockResetReg = (uint32_t*)0x10000020; - uint32_t* pResetReg = (uint32_t*)0x10000040; + volatile uint32_t* pUnlockResetReg = (uint32_t*)0x10000020; + volatile uint32_t* pResetReg = (uint32_t*)0x10000040; // If qemu is e...
Make the registers address point to volatile memory.
apache-2.0
winksaville/sadie,winksaville/sadie
619091d3ae52943e7dfd093073eb4027146e093f
#include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <string.h> #include <sys/param.h> #include "linenoise.h" #define HISTORY_FILE ".beaksh_history" char* findPrompt(); char* getHistoryPath(); void executeCommand(const char *text); int main() { int childPid; int child_status; char *line; char ...
#include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <string.h> #include "linenoise.h" char* findPrompt(); void executeCommand(const char *text); int main() { int childPid; int child_status; char *line; char *prompt; prompt = findPrompt(); while((line = linenoise(prompt)) != NULL) { i...
--- +++ @@ -2,9 +2,13 @@ #include <unistd.h> #include <stdio.h> #include <string.h> +#include <sys/param.h> #include "linenoise.h" +#define HISTORY_FILE ".beaksh_history" + char* findPrompt(); +char* getHistoryPath(); void executeCommand(const char *text); int main() { @@ -15,9 +19,13 @@ prompt = find...
Add persistent history to shell Closes #3.
mit
futureperfect/beaksh
f749ea43d24a3ee328ee77c6de3838f3fef11d30
// // LJSStop.h // LJSYourNextBus // // Created by Luke Stringer on 29/01/2014. // Copyright (c) 2014 Luke Stringer. All rights reserved. // #import <Foundation/Foundation.h> @interface LJSStop : NSObject <NSCopying> /** * An 8 digit stop number starting with e.g. 450 for West Yorkshire or 370 for South Yorksh...
// // LJSStop.h // LJSYourNextBus // // Created by Luke Stringer on 29/01/2014. // Copyright (c) 2014 Luke Stringer. All rights reserved. // #import <Foundation/Foundation.h> @interface LJSStop : NSObject <NSCopying> @property (nonatomic, copy, readonly) NSString *NaPTANCode; @property (nonatomic, copy, readonly...
--- +++ @@ -10,6 +10,9 @@ @interface LJSStop : NSObject <NSCopying> +/** + * An 8 digit stop number starting with e.g. 450 for West Yorkshire or 370 for South Yorkshire + */ @property (nonatomic, copy, readonly) NSString *NaPTANCode; @property (nonatomic, copy, readonly) NSString *title; @property (nonatomic...
Comment explaining what a valid NaPTAN code is.
mit
lukestringer90/LJSYourNextBus,lukestringer90/LJSYourNextBus
99e8bd7b02314af8fc801e1e1bb3eab4a3cb8ccd
/* * Raphael Kubo da Costa - RA 072201 * * MC514 - Lab2 */ #ifndef __THREAD_TREE_H #define __THREAD_TREE_H typedef struct { size_t *interested; pthread_t *list; size_t n_elem; size_t turn; } ThreadLevel; typedef struct { size_t height; ThreadLevel **tree; } ThreadTree; ThreadTree *thread_tree_new(si...
/* * Raphael Kubo da Costa - RA 072201 * * MC514 - Lab2 */ #ifndef __THREAD_TREE_H #define __THREAD_TREE_H typedef struct { size_t n_elem; pthread_t *list; } ThreadLevel; typedef struct { size_t height; ThreadLevel **tree; } ThreadTree; ThreadTree *thread_tree_new(size_t numthreads); void thread_tree_f...
--- +++ @@ -9,8 +9,10 @@ typedef struct { + size_t *interested; + pthread_t *list; size_t n_elem; - pthread_t *list; + size_t turn; } ThreadLevel; typedef struct
Add turn and interested fields per level
bsd-2-clause
rakuco/peterson_futex
288f2d1cfa42f8b380ef6a3e3f175a8b474f8303
/* chardata.h Interface to some helper routines used to accumulate and check text and attribute content. */ #ifndef XML_CHARDATA_H #define XML_CHARDATA_H 1 #ifndef XML_VERSION #include "expat.h" /* need XML_Char */ #endif typedef struct { int count; /* # of c...
/* chardata.h * * */ #ifndef XML_CHARDATA_H #define XML_CHARDATA_H 1 #ifndef XML_VERSION #include "expat.h" /* need XML_Char */ #endif typedef struct { int count; /* # of chars, < 0 if not set */ XML_Char data[1024]; } CharData; void CharData_Init(CharData...
--- +++ @@ -1,7 +1,8 @@ -/* chardata.h - * - * - */ +/* chardata.h + + Interface to some helper routines used to accumulate and check text + and attribute content. +*/ #ifndef XML_CHARDATA_H #define XML_CHARDATA_H 1
Add a small comment to tell what this is.
mit
PKRoma/expat,PKRoma/expat,PKRoma/expat,PKRoma/expat
fbfc30dffdc5f4a5e9d04f070dcbe8344f3a1c94
#ifndef SAUCE_SAUCE_EXCEPTIONS_H_ #define SAUCE_SAUCE_EXCEPTIONS_H_ #include <string> #include <stdexcept> namespace sauce { /** * Base class for all sauce exceptions. */ struct Exception: std::runtime_error { Exception(std::string message): std::runtime_error(message) {} }; /** * Raised when no binding ca...
#ifndef SAUCE_SAUCE_EXCEPTIONS_H_ #define SAUCE_SAUCE_EXCEPTIONS_H_ #include <stdexcept> namespace sauce { /** * Raised when no binding can be found for a given interface. * * TODO sure would be nice to know who.. */ struct UnboundException: public std::runtime_error { UnboundException(): std::runtime_er...
--- +++ @@ -1,19 +1,37 @@ #ifndef SAUCE_SAUCE_EXCEPTIONS_H_ #define SAUCE_SAUCE_EXCEPTIONS_H_ +#include <string> #include <stdexcept> namespace sauce { + +/** + * Base class for all sauce exceptions. + */ +struct Exception: std::runtime_error { + Exception(std::string message): + std::runtime_error(messag...
Add a circular dependency exception. Also break out an exception base type.
mit
phs/sauce,phs/sauce,phs/sauce,phs/sauce
7a61dc2985b7095d1bc413d014ca3c06e5bc4477
/** * The login information to access a server * * This class combines login, password and vhost * * @copyright 2014 Copernica BV */ /** * Set up namespace */ namespace AMQP { /** * Class definition */ class Login { private: /** * The username * @var string */ std::string _user...
/** * The login information to access a server * * This class combines login, password and vhost * * @copyright 2014 Copernica BV */ /** * Set up namespace */ namespace AMQP { /** * Class definition */ class Login { private: /** * The username * @var string */ std::string _user...
--- +++ @@ -41,6 +41,13 @@ _user(user), _password(password) {} /** + * Copy constructor + * @param login + */ + Login(const Login &login) : + _user(login._user), _password(login._password) {} + + /** * Constructor */ Login() :
Copy constructor added to Login class
apache-2.0
fantastory/AMQP-CPP,tangkingchun/AMQP-CPP,antoniomonty/AMQP-CPP,antoniomonty/AMQP-CPP,toolking/AMQP-CPP,fantastory/AMQP-CPP,tm604/AMQP-CPP,CopernicaMarketingSoftware/AMQP-CPP,CopernicaMarketingSoftware/AMQP-CPP,tangkingchun/AMQP-CPP,tm604/AMQP-CPP,toolking/AMQP-CPP,Kojoley/AMQP-CPP,Kojoley/AMQP-CPP
42f61a65bf3d78263b54e74a70d52badbab53638
#ifndef HALIDE_CPLUSPLUS_MANGLE_H #define HALIDE_CPLUSPLUS_MANGLE_H /** \file * * A simple function to get a C++ mangled function name for a function. */ #include <string> #include "IR.h" #include "Target.h" namespace Halide { namespace Internal { /** Return the mangled C++ name for a function. * The target par...
#ifndef HALIDE_CPLUSPLUS_MANGLE_H #define HALIDE_CPLUSPLUS_MANGLE_H /** \file * * A simple function to get a C++ mangled function name for a function. */ #include <string> #include "IR.h" #include "Target.h" namespace Halide { namespace Internal { /** Return the mangled C++ name for a function. * The target par...
--- +++ @@ -17,11 +17,11 @@ * The target parameter is used to decide on the C++ * ABI/mangling style to use. */ -std::string cplusplus_function_mangled_name(const std::string &name, const std::vector<std::string> &namespaces, - Type return_type, const std::vector<Exter...
Add some EXPORT qualifiers for msvc
mit
kgnk/Halide,psuriana/Halide,ronen/Halide,ronen/Halide,tdenniston/Halide,tdenniston/Halide,ronen/Halide,ronen/Halide,kgnk/Halide,jiawen/Halide,jiawen/Halide,jiawen/Halide,psuriana/Halide,jiawen/Halide,ronen/Halide,jiawen/Halide,psuriana/Halide,ronen/Halide,psuriana/Halide,psuriana/Halide,psuriana/Halide,ronen/Halide,jia...
d0593d880573052e6ae2790328a336a6a9865cc3