commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
1
4.87k
subject
stringlengths
15
778
message
stringlengths
15
8.75k
lang
stringclasses
266 values
license
stringclasses
13 values
repos
stringlengths
5
127k
216591596dfbb35c79674c18d0c6f28e1e040857
src/mb.h
src/mb.h
/* * mb.h - publicly accessible entry points for the memory buffer */ #ifndef _MB_H_ #define _MB_H_ #include "tuple.h" #include "table.h" #include "timestamp.h" void mb_init(); int mb_insert(unsigned char *buf, long len, Table *table); tstamp_t mb_insert_tuple(int ncols, char *vals[], Table *table); tstamp_t heap_insert_tuple(int ncols, char *vals[], Table *table, Node *n); Node *heap_alloc_node(int ncols, char *vals[], Table *table); void heap_remove_node(Node *n, Table *tn); void mb_dump(); #endif /* _MB_H_ */
/* * Copyright (c) 2013, Court of the University of Glasgow * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of the University of Glasgow nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* * mb.h - publicly accessible entry points for the memory buffer */ #ifndef _MB_H_ #define _MB_H_ #include "tuple.h" #include "table.h" #include "timestamp.h" void mb_init(); int mb_insert(unsigned char *buf, long len, Table *table); tstamp_t mb_insert_tuple(int ncols, char *vals[], Table *table); tstamp_t heap_insert_tuple(int ncols, char *vals[], Table *table, Node *n); Node *heap_alloc_node(int ncols, char *vals[], Table *table); void heap_remove_node(Node *n, Table *tn); void mb_dump(); #endif /* _MB_H_ */
Add BSD 3-clause open source header
Add BSD 3-clause open source header
C
bsd-3-clause
jsventek/Cache,fergul/Cache,jsventek/Cache,jsventek/Cache,fergul/Cache,fergul/Cache
ea0ae0b3bb59a3687947d45816c3005f7f60eab6
include/version.h
include/version.h
/* * Super Entity Game Server * http://segs.sf.net/ * Copyright (c) 2006 Super Entity Game Server Team (see AUTHORS.md) * This software is licensed under the terms of the 3-clause BSD License. See LICENSE.md for details. * */ #define VersionString "segs v0.5.0 (The Unsilencer)"; #define CopyrightString "Super Entity Game Server\nhttp://github.com/Segs/\nCopyright (c) 2006-2018 Super Entity Game Server Team (see AUTHORS.md)\nThis software is licensed under the terms of the 3-clause BSD License. See LICENSE.md for details.\n"; //const char *AdminVersionString="Undefined"; //const char *AuthVersionString="Undefined"; //const char *GameVersionString="Undefined"; //const char *MapVersionString="Undefined"; // Contains version information for the various server modules class VersionInfo { public: static const char *getAdminVersion(void); static const char *getAuthVersion(void) { return VersionString; } static const char *getGameVersion(void); static const char *getMapVersion(void); static const char *getCopyright(void) { return CopyrightString; } }; #undef VersionString #undef CopyrightString
/* * Super Entity Game Server * http://segs.sf.net/ * Copyright (c) 2006 Super Entity Game Server Team (see AUTHORS.md) * This software is licensed under the terms of the 3-clause BSD License. See LICENSE.md for details. * */ #define ProjectName "SEGS" #define VersionNumber "0.5.0" #define VersionName "The Unsilencer" #define VersionString ProjectName " v" VersionNumber " (" VersionName ")" #define CopyrightString "Super Entity Game Server\nhttp://github.com/Segs/\nCopyright (c) 2006-2018 Super Entity Game Server Team (see AUTHORS.md)\nThis software is licensed under the terms of the 3-clause BSD License. See LICENSE.md for details.\n"; //const char *AdminVersionString="Undefined"; //const char *AuthVersionString="Undefined"; //const char *GameVersionString="Undefined"; //const char *MapVersionString="Undefined"; // Contains version information for the various server modules class VersionInfo { public: static const char *getAdminVersion(void); static const char *getAuthVersion(void) { return VersionString; } static const char *getAuthVersionNumber(void) { return VersionNumber; } static const char *getGameVersion(void); static const char *getMapVersion(void); static const char *getCopyright(void) { return CopyrightString; } }; #undef ProjectName #undef VersionName #undef VersionNumber #undef VersionString #undef CopyrightString
Split up VersionString, will be useful for WebUI
Split up VersionString, will be useful for WebUI
C
bsd-3-clause
nemerle/Segs,Segs/Segs,Segs/Segs,Segs/Segs,nemerle/Segs,broxen/Segs,nemerle/Segs,broxen/Segs,nemerle/Segs,Segs/Segs,broxen/Segs,broxen/Segs,broxen/Segs,nemerle/Segs,broxen/Segs,nemerle/Segs,nemerle/Segs,broxen/Segs,Segs/Segs,Segs/Segs,Segs/Segs
8c89257b9b7b58dbdeb977295e95863793877b70
cpp/exit_status.h
cpp/exit_status.h
#ifndef BIOTOOL_EXIT_STATUS_H #define BIOTOOL_EXIT_STATUS_H typedef enum {Success=0, Error_command_line=1, Error_open_file=2, Error_parse_file=3} exit_status; #endif
#ifndef BIOTOOL_EXIT_STATUS_H #define BIOTOOL_EXIT_STATUS_H typedef enum {Success=0, Error_open_file=1, Error_command_line=2, Error_parse_file=3} exit_status; #endif
Correct c++ exit status values
Correct c++ exit status values
C
mit
bjpop/biotool,bjpop/biotool,drpowell/biotool,bjpop/biotool,supernifty/biotool,bjpop/biotool,bjpop/biotool,drpowell/biotool,biotool-paper/biotool,lonsbio/biotool,lonsbio/biotool,biotool-paper/biotool,bjpop/biotool,supernifty/biotool,drpowell/biotool,biotool-paper/biotool,drpowell/biotool,lonsbio/biotool,biotool-paper/biotool,supernifty/biotool,biotool-paper/biotool,bjpop/biotool,supernifty/biotool,bjpop/biotool,drpowell/biotool,bjpop/biotool,drpowell/biotool,biotool-paper/biotool,supernifty/biotool,drpowell/biotool,bionitio-team/bionitio,biotool-paper/biotool,biotool-paper/biotool,biotool-paper/biotool,drpowell/biotool,supernifty/biotool,supernifty/biotool,supernifty/biotool,bjpop/biotool,supernifty/biotool,drpowell/biotool,biotool-paper/biotool,supernifty/biotool,lonsbio/biotool,drpowell/biotool
8a868d3f7c3c7fa91b7439607adc7a21207f88cd
test/CodeGen/debug-dead-local-var.c
test/CodeGen/debug-dead-local-var.c
// FIXME: Check IR rather than asm, then triple is not needed. // RUN: %clang_cc1 -mllvm -asm-verbose -triple %itanium_abi_triple -S -O2 -g %s -o - | FileCheck %s // Radar 8122864 // Code is not generated for function foo, but preserve type information of // local variable xyz. static void foo() { // CHECK: DW_TAG_structure_type struct X { int a; int b; } xyz; } int bar() { foo(); return 1; }
// FIXME: Check IR rather than asm, then triple is not needed. // RUN: %clang_cc1 -triple %itanium_abi_triple -O2 -g -emit-llvm %s -o - | FileCheck %s // Radar 8122864 // Code is not generated for function foo, but preserve type information of // local variable xyz. static void foo() { // CHECK: DW_TAG_structure_type struct X { int a; int b; } xyz; } int bar() { foo(); return 1; }
Make this test emit llvm IR rather than assembly.
Make this test emit llvm IR rather than assembly. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@209255 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
982731bf91beaa2c697ab32b1d388054c78aa05f
sky/compositor/compositor_options.h
sky/compositor/compositor_options.h
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SKY_COMPOSITOR_COMPOSITOR_OPTIONS_H_ #define SKY_COMPOSITOR_COMPOSITOR_OPTIONS_H_ #include "base/macros.h" #include <vector> namespace sky { namespace compositor { class CompositorOptions { public: using OptionType = unsigned int; enum class Option : OptionType { DisplayFrameStatistics, TerminationSentinel, }; CompositorOptions(); CompositorOptions(uint64_t mask); ~CompositorOptions(); bool isEnabled(Option option) const; void setEnabled(Option option, bool enabled); private: std::vector<bool> options_; DISALLOW_COPY_AND_ASSIGN(CompositorOptions); }; } // namespace compositor } // namespace sky #endif // SKY_COMPOSITOR_COMPOSITOR_OPTIONS_H_
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SKY_COMPOSITOR_COMPOSITOR_OPTIONS_H_ #define SKY_COMPOSITOR_COMPOSITOR_OPTIONS_H_ #include "base/macros.h" #include <vector> namespace sky { namespace compositor { class CompositorOptions { public: using OptionType = unsigned int; enum class Option : OptionType { DisplayFrameStatistics, TerminationSentinel, }; CompositorOptions(); explicit CompositorOptions(uint64_t mask); ~CompositorOptions(); bool isEnabled(Option option) const; void setEnabled(Option option, bool enabled); private: std::vector<bool> options_; DISALLOW_COPY_AND_ASSIGN(CompositorOptions); }; } // namespace compositor } // namespace sky #endif // SKY_COMPOSITOR_COMPOSITOR_OPTIONS_H_
Make the single argument constructor to CompositorOptions explicit
Make the single argument constructor to CompositorOptions explicit
C
bsd-3-clause
mdakin/engine,jamesr/sky_engine,lyceel/engine,jason-simmons/flutter_engine,aam/engine,flutter/engine,chinmaygarde/sky_engine,jamesr/flutter_engine,abarth/sky_engine,chinmaygarde/sky_engine,mikejurka/engine,mpcomplete/engine,devoncarew/sky_engine,jason-simmons/sky_engine,jason-simmons/sky_engine,jason-simmons/sky_engine,mpcomplete/engine,mpcomplete/engine,chinmaygarde/flutter_engine,mdakin/engine,cdotstout/sky_engine,cdotstout/sky_engine,jamesr/sky_engine,Hixie/sky_engine,tvolkert/engine,cdotstout/sky_engine,devoncarew/engine,rmacnak-google/engine,tvolkert/engine,flutter/engine,jason-simmons/flutter_engine,devoncarew/sky_engine,mikejurka/engine,flutter/engine,jamesr/flutter_engine,Hixie/sky_engine,mpcomplete/flutter_engine,devoncarew/engine,mxia/engine,aam/engine,mdakin/engine,chinmaygarde/sky_engine,jamesr/flutter_engine,chinmaygarde/flutter_engine,jamesr/sky_engine,aam/engine,Hixie/sky_engine,jamesr/sky_engine,mpcomplete/flutter_engine,rmacnak-google/engine,krisgiesing/sky_engine,jamesr/flutter_engine,jamesr/sky_engine,krisgiesing/sky_engine,aam/engine,jamesr/flutter_engine,chinmaygarde/sky_engine,mxia/engine,krisgiesing/sky_engine,chinmaygarde/sky_engine,cdotstout/sky_engine,Hixie/sky_engine,lyceel/engine,jason-simmons/sky_engine,devoncarew/sky_engine,jason-simmons/flutter_engine,rmacnak-google/engine,devoncarew/sky_engine,mpcomplete/flutter_engine,tvolkert/engine,abarth/sky_engine,aam/engine,devoncarew/engine,mikejurka/engine,jamesr/flutter_engine,jason-simmons/flutter_engine,mpcomplete/engine,tvolkert/engine,krisgiesing/sky_engine,aam/engine,mxia/engine,flutter/engine,mpcomplete/engine,jamesr/sky_engine,jamesr/flutter_engine,devoncarew/engine,flutter/engine,jamesr/flutter_engine,chinmaygarde/sky_engine,rmacnak-google/engine,Hixie/sky_engine,mpcomplete/engine,chinmaygarde/flutter_engine,mpcomplete/flutter_engine,Hixie/sky_engine,chinmaygarde/flutter_engine,mikejurka/engine,mikejurka/engine,mxia/engine,devoncarew/engine,lyceel/engine,mdakin/engine,jason-simmons/sky_engine,rmacnak-google/engine,mpcomplete/flutter_engine,devoncarew/sky_engine,abarth/sky_engine,mxia/engine,aam/engine,cdotstout/sky_engine,mxia/engine,jamesr/sky_engine,rmacnak-google/engine,mdakin/engine,chinmaygarde/flutter_engine,flutter/engine,flutter/engine,devoncarew/engine,rmacnak-google/engine,aam/engine,chinmaygarde/flutter_engine,mpcomplete/engine,mikejurka/engine,lyceel/engine,abarth/sky_engine,mikejurka/engine,mikejurka/engine,mxia/engine,jason-simmons/sky_engine,Hixie/sky_engine,mpcomplete/engine,abarth/sky_engine,jason-simmons/flutter_engine,krisgiesing/sky_engine,chinmaygarde/sky_engine,cdotstout/sky_engine,tvolkert/engine,mdakin/engine,cdotstout/sky_engine,jason-simmons/flutter_engine,jamesr/flutter_engine,mdakin/engine,mikejurka/engine,mpcomplete/flutter_engine,lyceel/engine,tvolkert/engine,lyceel/engine,devoncarew/sky_engine,flutter/engine,krisgiesing/sky_engine,mdakin/engine,Hixie/sky_engine,krisgiesing/sky_engine,abarth/sky_engine,abarth/sky_engine,jason-simmons/sky_engine,devoncarew/sky_engine,devoncarew/engine,jason-simmons/flutter_engine,jason-simmons/flutter_engine,lyceel/engine,chinmaygarde/flutter_engine,tvolkert/engine,mxia/engine
3190d0e00909383ef52ef56083a1c25396f597ae
OrbitQt/topdownwidget.h
OrbitQt/topdownwidget.h
// Copyright (c) 2020 The Orbit Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ORBIT_QT_TOP_DOWN_WIDGET_H_ #define ORBIT_QT_TOP_DOWN_WIDGET_H_ #include <QSortFilterProxyModel> #include <memory> #include "TopDownView.h" #include "ui_topdownwidget.h" class TopDownWidget : public QWidget { Q_OBJECT public: explicit TopDownWidget(QWidget* parent = nullptr) : QWidget{parent}, ui_{std::make_unique<Ui::TopDownWidget>()} { ui_->setupUi(this); connect(ui_->topDownTreeView, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(onCustomContextMenuRequested(const QPoint&))); } void SetTopDownView(std::unique_ptr<TopDownView> top_down_view); private slots: void onCustomContextMenuRequested(const QPoint& point); private: static const std::string kActionExpandAll; static const std::string kActionCollapseAll; std::unique_ptr<Ui::TopDownWidget> ui_; }; #endif // ORBIT_QT_TOP_DOWN_WIDGET_H_
// Copyright (c) 2020 The Orbit Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ORBIT_QT_TOP_DOWN_WIDGET_H_ #define ORBIT_QT_TOP_DOWN_WIDGET_H_ #include <QSortFilterProxyModel> #include <memory> #include "TopDownView.h" #include "ui_topdownwidget.h" class TopDownWidget : public QWidget { Q_OBJECT public: explicit TopDownWidget(QWidget* parent = nullptr) : QWidget{parent}, ui_{std::make_unique<Ui::TopDownWidget>()} { ui_->setupUi(this); connect(ui_->topDownTreeView, &QTreeView::customContextMenuRequested, this, &TopDownWidget::onCustomContextMenuRequested); } void SetTopDownView(std::unique_ptr<TopDownView> top_down_view); private slots: void onCustomContextMenuRequested(const QPoint& point); private: static const std::string kActionExpandAll; static const std::string kActionCollapseAll; std::unique_ptr<Ui::TopDownWidget> ui_; }; #endif // ORBIT_QT_TOP_DOWN_WIDGET_H_
Use Qt 5 signal-slot syntax in TopDownWidget
Use Qt 5 signal-slot syntax in TopDownWidget
C
bsd-2-clause
google/orbit,google/orbit,google/orbit,google/orbit
0bedca3d5d44c2bd13218defeedade16fb30ba9f
modules/bot_admin.h
modules/bot_admin.h
class AdminHook : public Module { public: virtual ~AdminHook(); virtual std::vector<std::vector<std::string> > adminCommands(); virtual void onAdminCommand(std::string server, std::string nick, std::string command, std::string message, bool dcc, bool master); }; class AdminMod : public Module { public: virtual ~AdminMod(); virtual void sendVerbose(int verboseLevel, std::string message); }; AdminHook::~AdminHook() {} std::vector<std::vector<std::string> > AdminHook::adminCommands() { return std::vector<std::vector<std::string> > (); } void AdminHook::onAdminCommand(std::string server, std::string nick, std::string command, std::string message, bool dcc, bool master) {} AdminMod::~AdminMod() {} void AdminMod::sendVerbose(int verboseLevel, std::string message) {}
class AdminHook : public Module { public: virtual ~AdminHook(); virtual std::vector<std::vector<std::string> > adminCommands(); virtual void onAdminCommand(std::string server, std::string nick, std::string command, std::string message, bool dcc, bool master); }; class AdminMod { public: virtual ~AdminMod(); virtual void sendVerbose(int verboseLevel, std::string message); }; AdminHook::~AdminHook() {} std::vector<std::vector<std::string> > AdminHook::adminCommands() { return std::vector<std::vector<std::string> > (); } void AdminHook::onAdminCommand(std::string server, std::string nick, std::string command, std::string message, bool dcc, bool master) {} AdminMod::~AdminMod() {} void AdminMod::sendVerbose(int verboseLevel, std::string message) {}
Change this so it works. This may be tricky to work through when a lot of modules depend on a lot of other modules.
Change this so it works. This may be tricky to work through when a lot of modules depend on a lot of other modules.
C
mit
ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo
9c6ae0d5642cf5979ea43112f134a7fb3c02f5b7
RIButtonItem.h
RIButtonItem.h
// // RIButtonItem.h // Shibui // // Created by Jiva DeVoe on 1/12/11. // Copyright 2011 Random Ideas, LLC. All rights reserved. // #import <Foundation/Foundation.h> typedef void (^RISimpleAction)(); @interface RIButtonItem : NSObject { NSString *label; RISimpleAction action; } @property (retain, nonatomic) NSString *label; @property (copy, nonatomic) RISimpleAction action; +(id)item; +(id)itemWithLabel:(NSString *)inLabel; @end
// // RIButtonItem.h // Shibui // // Created by Jiva DeVoe on 1/12/11. // Copyright 2011 Random Ideas, LLC. All rights reserved. // #import <Foundation/Foundation.h> @interface RIButtonItem : NSObject { NSString *label; void (^action)(); } @property (retain, nonatomic) NSString *label; @property (copy, nonatomic) void (^action)(); +(id)item; +(id)itemWithLabel:(NSString *)inLabel; @end
Replace typedef with literal type
Replace typedef with literal type Using the literal typedef makes Xcode's code sense give you a parameter stand-in that can be expanded with a shift-enter.
C
mit
Weever/UIAlertView-Blocks,200895045/UIAlertView-Blocks,jivadevoe/UIAlertView-Blocks,shanyimin/UIAlertView-Blocks,z8927623/UIAlertView-Blocks
097d6ccf7da44013c6d28fea7dce23708b77a044
tile.h
tile.h
#define VT_POINT 1 #define VT_LINE 2 #define VT_POLYGON 3 #define VT_END 0 #define VT_MOVETO 1 #define VT_LINETO 2 #define VT_CLOSEPATH 7 #define VT_STRING 1 #define VT_NUMBER 2 #define VT_BOOLEAN 7 struct pool; void deserialize_int(char **f, int *n); struct pool_val *deserialize_string(char **f, struct pool *p, int type); struct index { unsigned long long index; long long fpos; int maxzoom; }; long long write_tile(struct index *start, struct index *end, char *metabase, unsigned *file_bbox, int z, unsigned x, unsigned y, int detail, int basezoom, struct pool *file_keys, char *layername, sqlite3 *outdb, double droprate, int buffer);
#define VT_POINT 1 #define VT_LINE 2 #define VT_POLYGON 3 #define VT_END 0 #define VT_MOVETO 1 #define VT_LINETO 2 #define VT_CLOSEPATH 7 #define VT_STRING 1 #define VT_NUMBER 2 #define VT_BOOLEAN 7 struct pool; void deserialize_int(char **f, int *n); struct pool_val *deserialize_string(char **f, struct pool *p, int type); struct index { unsigned long long index; long long fpos : 56; int maxzoom : 8; }; long long write_tile(struct index *start, struct index *end, char *metabase, unsigned *file_bbox, int z, unsigned x, unsigned y, int detail, int basezoom, struct pool *file_keys, char *layername, sqlite3 *outdb, double droprate, int buffer);
Use a bitfield to make the index 2/3 the size, to save some disk churn
Use a bitfield to make the index 2/3 the size, to save some disk churn
C
bsd-2-clause
joykuotw/tippecanoe,mapbox/tippecanoe,mapbox/tippecanoe,joykuotw/tippecanoe,mapbox/tippecanoe,landsurveyorsunited/tippecanoe,mapbox/tippecanoe,landsurveyorsunited/tippecanoe
5232091bbc3b617f737db18bbd3bad97914f73fd
src/BrainTree.h
src/BrainTree.h
#pragma once #include "BehaviorTree.hpp" #include "Blackboard.hpp" #include "Composite.hpp" #include "Decorator.hpp" #include "Leaf.hpp" #include "Node.hpp" // CompositeS #include "Composites/MemSelector.hpp" #include "Composites/MemSequence.hpp" #include "Composites/ParallelSequence.hpp" #include "Composites/Selector.hpp" #include "Composites/Sequence.hpp" // Decorators #include "Decorators/Failer.hpp" #include "Decorators/Inverter.hpp" #include "Decorators/Repeater.hpp" #include "Decorators/Succeeder.hpp" #include "Decorators/UntilFail.hpp" #include "Decorators/UntilSuccess.hpp"
#pragma once #include "BehaviorTree.h" #include "Blackboard.h" #include "Composite.h" #include "Decorator.h" #include "Leaf.h" #include "Node.h" // Composites #include "composites/MemSelector.h" #include "composites/MemSequence.h" #include "composites/ParallelSequence.h" #include "composites/Selector.h" #include "composites/Sequence.h" // Decorators #include "decorators/Failer.h" #include "decorators/Inverter.h" #include "decorators/Repeater.h" #include "decorators/Succeeder.h" #include "decorators/UntilFail.h" #include "decorators/UntilSuccess.h" // Builders #include "builders/LeafBuilder.h"
Change headers from *.hpp to *.h, and add LeafBuilder.
Change headers from *.hpp to *.h, and add LeafBuilder.
C
mit
arvidsson/bt
865b2206d1a409e2651919baadb6cf674b014950
GNETextSearch/GNETextSearchPrivate.h
GNETextSearch/GNETextSearchPrivate.h
// // GNETextSearchPrivate.h // GNETextSearch // // Created by Anthony Drendel on 11/14/15. // Copyright © 2015 Gone East LLC. All rights reserved. // #ifndef GNETextSearchPrivate_h #define GNETextSearchPrivate_h #ifdef __cplusplus extern "C" { #endif #ifndef TSEARCH_INLINE #if defined(_MSC_VER) && !defined(__cplusplus) #define TSEARCH_INLINE __inline #else #define TSEARCH_INLINE inline #endif #endif TSEARCH_INLINE size_t _tsearch_next_buf_len(size_t *capacity, const size_t size) { if (capacity == NULL) { return 0; } size_t count = *capacity; size_t nextCount = (count * 3) / 2; size_t validCount = (nextCount > count && ((SIZE_MAX / size) > nextCount)) ? nextCount : count; *capacity = validCount; return validCount * size; } #ifdef __cplusplus } #endif #endif /* GNETextSearchPrivate_h */
// // GNETextSearchPrivate.h // GNETextSearch // // Created by Anthony Drendel on 11/14/15. // Copyright © 2015 Gone East LLC. All rights reserved. // #ifndef GNETextSearchPrivate_h #define GNETextSearchPrivate_h #ifdef __cplusplus extern "C" { #endif #ifndef TSEARCH_INLINE #if defined(_MSC_VER) && !defined(__cplusplus) #define TSEARCH_INLINE __inline #else #define TSEARCH_INLINE static inline #endif #endif TSEARCH_INLINE size_t _tsearch_next_buf_len(size_t *capacity, const size_t size) { if (capacity == NULL) { return 0; } size_t count = *capacity; size_t nextCount = (count * 3) / 2; size_t validCount = (nextCount > count && ((SIZE_MAX / size) > nextCount)) ? nextCount : count; *capacity = validCount; return validCount * size; } #ifdef __cplusplus } #endif #endif /* GNETextSearchPrivate_h */
Define TSEARCH_INLINE as static inline
Define TSEARCH_INLINE as static inline
C
bsd-2-clause
atdrendel/GNETextSearch,atdrendel/GNETextSearch
b5e45c4d0917a79ef02ba04b4c6c7bcba45193dc
examples/helloElektra.c
examples/helloElektra.c
/** * @file * * @brief * * @copyright BSD License (see LICENSE.md or https://www.libelektra.org) */ #include <kdb.h> #include <stdio.h> int main (void) { KeySet * config = ksNew (0, KS_END); Key * root = keyNew ("user/test", KEY_END); printf ("Open key database\n"); KDB * handle = kdbOpen (root); printf ("Retrieve key set\n"); kdbGet (handle, config, root); printf ("Number of key-value pairs: %zu\n", ksGetSize (config)); Key * key = keyNew ("user/test/hello", KEY_VALUE, "elektra", KEY_END); printf ("Add key %s\n", keyName (key)); ksAppendKey (config, key); printf ("Number of key-value pairs: %zu\n", ksGetSize (config)); printf ("\n%s, %s\n\n", keyBaseName (key), keyString (key)); // If you want to store the key database on disk, then please uncomment the following two lines // printf ("Write key set to disk\n"); // kdbSet (handle, config, root); printf ("Delete mappings inside memory\n"); ksDel (config); printf ("Close key database\n"); kdbClose (handle, 0); return 0; }
/** * @file * * @brief * * @copyright BSD License (see LICENSE.md or https://www.libelektra.org) */ #include <kdb.h> #include <stdio.h> int main (void) { KeySet * config = ksNew (0, KS_END); Key * root = keyNew ("user/test", KEY_END); printf ("Open key database\n"); KDB * handle = kdbOpen (root); printf ("Retrieve key set\n"); kdbGet (handle, config, root); printf ("Number of key-value pairs: %zu\n", ksGetSize (config)); Key * key = keyNew ("user/test/hello", KEY_VALUE, "elektra", KEY_END); printf ("Add key %s\n", keyName (key)); ksAppendKey (config, key); printf ("Number of key-value pairs: %zu\n", ksGetSize (config)); printf ("\n%s, %s\n\n", keyBaseName (key), keyString (key)); // If you want to store the key database on disk, then please uncomment the following two lines // printf ("Write key set to disk\n"); // kdbSet (handle, config, root); printf ("Delete key-value pairs inside memory\n"); ksDel (config); printf ("Close key database\n"); kdbClose (handle, 0); return 0; }
Use more common technical term
Examples: Use more common technical term
C
bsd-3-clause
e1528532/libelektra,mpranj/libelektra,mpranj/libelektra,petermax2/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,BernhardDenner/libelektra,e1528532/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,e1528532/libelektra,BernhardDenner/libelektra,petermax2/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,petermax2/libelektra,e1528532/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,mpranj/libelektra,petermax2/libelektra,mpranj/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,e1528532/libelektra,mpranj/libelektra,petermax2/libelektra,mpranj/libelektra,mpranj/libelektra,e1528532/libelektra,ElektraInitiative/libelektra
f332badaeb115c6db8d3f6b1cf97af6155df3cc7
include/vkalloc.h
include/vkalloc.h
#ifndef VKALLOC_VKALLOC_H #define VKALLOC_VKALLOC_H #include <stdlib.h> #include <stdint.h> #include <vulkan/vulkan.h> #ifndef VKA_ALLOC_SIZE #define VKA_ALLOC_SIZE 1024*1024*4 #endif struct VkAllocation { VkDeviceMemory deviceMemory; uint64_t offset; uint64_t size; }; void vkaInit(VkPhysicalDevice physicalDevice, VkDevice device); void vkaTerminate(); VkAllocation vkAlloc(VkMemoryRequirements requirements); void vkFree(VkAllocation allocation); VkAllocation vkHostAlloc(VkMemoryRequirements requirements); void vkHostFree(VkAllocation allocation); #endif //VKALLOC_VKALLOC_H
#ifndef VKALLOC_VKALLOC_H #define VKALLOC_VKALLOC_H #include <stdlib.h> #include <stdint.h> #include <vulkan/vulkan.h> #ifndef VKA_ALLOC_SIZE #define VKA_ALLOC_SIZE 1024*1024*4 #endif struct VkAllocation { VkDeviceMemory deviceMemory = VK_NULL_HANDLE; uint64_t offset = 0; uint64_t size = 0; }; void vkaInit(VkPhysicalDevice physicalDevice, VkDevice device); void vkaTerminate(); VkAllocation vkAlloc(VkMemoryRequirements requirements); void vkFree(VkAllocation allocation); VkAllocation vkHostAlloc(VkMemoryRequirements requirements); void vkHostFree(VkAllocation allocation); #endif //VKALLOC_VKALLOC_H
Add default values to VkAllocation
Add default values to VkAllocation
C
mit
rhynodegreat/VkAlloc,rhynodegreat/VkAlloc
fb75b2583eb82dc42cb8e5bd3c1eda1c661eb76d
test/Analysis/array-struct.c
test/Analysis/array-struct.c
// RUN: clang -checker-simple -verify %s && // RUN: clang -checker-simple -analyzer-store-region -verify %s struct s { int data; int data_array[10]; }; typedef struct { int data; } STYPE; void g1(struct s* p); void f(void) { int a[10]; int (*p)[10]; p = &a; (*p)[3] = 1; struct s d; struct s *q; q = &d; q->data = 3; d.data_array[9] = 17; } void f2() { char *p = "/usr/local"; char (*q)[4]; q = &"abc"; } void f3() { STYPE s; } void f4() { int a[] = { 1, 2, 3}; int b[3] = { 1, 2 }; } void f5() { struct s data; g1(&data); } void f6() { char *p; p = __builtin_alloca(10); p[1] = 'a'; }
// RUN: clang -checker-simple -verify %s && // RUN: clang -checker-simple -analyzer-store-region -verify %s struct s { int data; int data_array[10]; }; typedef struct { int data; } STYPE; void g1(struct s* p); void f(void) { int a[10]; int (*p)[10]; p = &a; (*p)[3] = 1; struct s d; struct s *q; q = &d; q->data = 3; d.data_array[9] = 17; } void f2() { char *p = "/usr/local"; char (*q)[4]; q = &"abc"; } void f3() { STYPE s; } void f4() { int a[] = { 1, 2, 3}; int b[3] = { 1, 2 }; } void f5() { struct s data; g1(&data); } void f6() { char *p; p = __builtin_alloca(10); p[1] = 'a'; } struct s2; void g2(struct s2 *p); void f7() { struct s2 *p = __builtin_alloca(10); g2(p); }
Add test for incomplete struct pointer.
Add test for incomplete struct pointer. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@59236 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/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
39332e3e060035ac6f4660a4e650ffb4b8da1c3c
test/CodeGen/dbg-const-int128.c
test/CodeGen/dbg-const-int128.c
// RUN: %clang_cc1 -S -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s // CHECK: !DIGlobalVariable({{.*}} // CHECK-NOT: expr: static const __uint128_t ro = 18446744073709551615; void bar(__uint128_t); void foo() { bar(ro); }
// RUN: %clang_cc1 -triple x86_64-unknown-linux -S -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s // CHECK: !DIGlobalVariable({{.*}} // CHECK-NOT: expr: static const __uint128_t ro = 18446744073709551615; void bar(__uint128_t); void foo() { bar(ro); }
Add explicit triple to test to fix arm bots.
Add explicit triple to test to fix arm bots. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@290008 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
527e5429989782aef5411a18bf01cc9b4170fde1
test/Parser/pointer_promotion.c
test/Parser/pointer_promotion.c
// RUN: clang-cc -fsyntax-only -verify %s int test() { void *vp; int *ip; char *cp; struct foo *fp; struct bar *bp; short sint = 7; if (ip < cp) {} // expected-warning {{comparison of distinct pointer types ('int *' and 'char *')}} if (cp < fp) {} // expected-warning {{comparison of distinct pointer types ('char *' and 'struct foo *')}} if (fp < bp) {} // expected-warning {{comparison of distinct pointer types ('struct foo *' and 'struct bar *')}} if (ip < 7) {} // expected-warning {{comparison between pointer and integer ('int *' and 'int')}} if (sint < ip) {} // expected-warning {{comparison between pointer and integer ('int' and 'int *')}} if (ip == cp) {} // expected-warning {{comparison of distinct pointer types ('int *' and 'char *')}} }
// RUN: clang-cc -fsyntax-only -verify %s void test() { void *vp; int *ip; char *cp; struct foo *fp; struct bar *bp; short sint = 7; if (ip < cp) {} // expected-warning {{comparison of distinct pointer types ('int *' and 'char *')}} if (cp < fp) {} // expected-warning {{comparison of distinct pointer types ('char *' and 'struct foo *')}} if (fp < bp) {} // expected-warning {{comparison of distinct pointer types ('struct foo *' and 'struct bar *')}} if (ip < 7) {} // expected-warning {{comparison between pointer and integer ('int *' and 'int')}} if (sint < ip) {} // expected-warning {{comparison between pointer and integer ('int' and 'int *')}} if (ip == cp) {} // expected-warning {{comparison of distinct pointer types ('int *' and 'char *')}} }
Fix test case, which has a control-reaches-end-of-non-void warning that was being masked by previous bug.
Fix test case, which has a control-reaches-end-of-non-void warning that was being masked by previous bug. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@76858 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
ecf7875cffe04ce141d81c58ca296f2a3f813a6b
src/gfx/gfxShader.h
src/gfx/gfxShader.h
/* vim: set ts=4 sw=4 tw=79 et :*/ /* 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://mozilla.org/MPL/2.0/. */ #ifndef gfxShader_h__ #define gfxShader_h__ #include "GL/glew.h" class OpenGLShader { public: /// The OpenGL Resource ID GLuint mGLResource; /// True if the shader compiled successfully bool mSuccessfullyCompiled; OpenGLShader(const char* aShaderSource, GLenum aShaderType) : mSuccessfullyCompiled(false), mShaderSource(aShaderSource), mShaderType(aShaderType) { } ~OpenGLShader() { if (mGLResource) { glDeleteShader(mGLResource); } } bool compile(); private: const char* mShaderSource; GLenum mShaderType; }; #endif
/* vim: set ts=4 sw=4 tw=79 et :*/ /* 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://mozilla.org/MPL/2.0/. */ #ifndef gfxShader_h__ #define gfxShader_h__ #include "GL/glew.h" class OpenGLShader { public: /// The OpenGL Resource ID GLuint mGLResource; /// True if the shader compiled successfully bool mSuccessfullyCompiled; OpenGLShader(const char* aShaderSource, GLenum aShaderType) : mSuccessfullyCompiled(false), mShaderSource(aShaderSource), mShaderType(aShaderType), mGLResource(0) { } ~OpenGLShader() { if (mGLResource) { glDeleteShader(mGLResource); } } bool compile(); private: const char* mShaderSource; GLenum mShaderType; }; #endif
Make sure the memory is zero when initialising. This caused failing tests on Windows where mGLResource would already be populated with random stuff.
Make sure the memory is zero when initialising. This caused failing tests on Windows where mGLResource would already be populated with random stuff.
C
mpl-2.0
samgiles/grapl,samgiles/grapl,samgiles/grapl
fcec57fd225fb2fa84e2dd351d7fdebe78945738
src/models/tag.h
src/models/tag.h
#ifndef TAG_H #define TAG_H #include <QString> #include <QStringList> #include "favorite.h" #include "profile.h" class Tag { public: Tag(); explicit Tag(QString text, QString type = "unknown", int count = 1, QStringList related = QStringList()); ~Tag(); static Tag FromCapture(QStringList caps, QStringList order = QStringList()); static QList<Tag> Tag::FromRegexp(QString rx, QStringList order, const QString &source); QString stylished(Profile *profile, QStringList ignored = QStringList(), QStringList blacklisted = QStringList(), bool count = false, bool nounderscores = false) const; void setText(QString); void setType(QString); void setCount(int); void setRelated(QStringList); QString text() const; QString type() const; int shortType() const; int count() const; QStringList related() const; QString typedText() const; private: QString m_text, m_type; int m_count; QStringList m_related; }; bool sortByFrequency(Tag, Tag); bool operator==(const Tag &t1, const Tag &t2); Q_DECLARE_METATYPE(Tag) #endif // TAG_H
#ifndef TAG_H #define TAG_H #include <QString> #include <QStringList> #include "favorite.h" #include "profile.h" class Tag { public: Tag(); explicit Tag(QString text, QString type = "unknown", int count = 1, QStringList related = QStringList()); ~Tag(); static Tag FromCapture(QStringList caps, QStringList order = QStringList()); static QList<Tag> FromRegexp(QString rx, QStringList order, const QString &source); QString stylished(Profile *profile, QStringList ignored = QStringList(), QStringList blacklisted = QStringList(), bool count = false, bool nounderscores = false) const; void setText(QString); void setType(QString); void setCount(int); void setRelated(QStringList); QString text() const; QString type() const; int shortType() const; int count() const; QStringList related() const; QString typedText() const; private: QString m_text, m_type; int m_count; QStringList m_related; }; bool sortByFrequency(Tag, Tag); bool operator==(const Tag &t1, const Tag &t2); Q_DECLARE_METATYPE(Tag) #endif // TAG_H
Fix extra qualifier on Tag.FromRegexp breaking build
Fix extra qualifier on Tag.FromRegexp breaking build
C
apache-2.0
Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,YoukaiCat/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,YoukaiCat/imgbrd-grabber
cb3194f6aec438049fffe055fae64cfa21c31732
test/CodeGen/2009-02-13-zerosize-union-field-ppc.c
test/CodeGen/2009-02-13-zerosize-union-field-ppc.c
// RUN: %clang_cc1 %s -m32 -emit-llvm -o - | grep {i32 32} | count 3 // XFAIL: * // XTARGET: powerpc // Every printf has 'i32 0' for the GEP of the string; no point counting those. typedef unsigned int Foo __attribute__((aligned(32))); typedef union{Foo:0;}a; typedef union{int x; Foo:0;}b; extern int printf(const char*, ...); main() { printf("%ld\n", sizeof(a)); printf("%ld\n", __alignof__(a)); printf("%ld\n", sizeof(b)); printf("%ld\n", __alignof__(b)); }
// RUN: %clang_cc1 %s -triple powerpc-pc-linux -emit-llvm -o - | grep {i32 32} | count 3 // XFAIL: * // Every printf has 'i32 0' for the GEP of the string; no point counting those. typedef unsigned int Foo __attribute__((aligned(32))); typedef union{Foo:0;}a; typedef union{int x; Foo:0;}b; extern int printf(const char*, ...); main() { printf("%ld\n", sizeof(a)); printf("%ld\n", __alignof__(a)); printf("%ld\n", sizeof(b)); printf("%ld\n", __alignof__(b)); }
Fix test so that it XFAILs consistently.
Fix test so that it XFAILs consistently. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@143771 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
c11244b155a6aa198b4d660286365e82698a6a2d
Math/include/Math/Utils.h
Math/include/Math/Utils.h
// // Copyright (c) 2012 Juan Palacios juan.palacios.puyana@gmail.com // This file is part of minimathlibs. // Subject to the BSD 2-Clause License // - see < http://opensource.org/licenses/BSD-2-Clause> // #ifndef MATH_UTILS_H__ #define MATH_UTILS_H__ namespace Math { template <typename T> struct CompareWithTolerance { CompareWithTolerance() : tol_() {} CompareWithTolerance(T tolerance) : tol_(tolerance) {} bool operator()(const T& lhs, const T& rhs) const { return std::abs(rhs-lhs) <= tol_; // <= to allow for 0 tolerance. } private: T tol_; }; } // namespace Math #endif // MATH_UTILS_H__
// // Copyright (c) 2012 Juan Palacios juan.palacios.puyana@gmail.com // This file is part of minimathlibs. // Subject to the BSD 2-Clause License // - see < http://opensource.org/licenses/BSD-2-Clause> // #ifndef MATH_UTILS_H_ #define MATH_UTILS_H_ #include <cstdlib> #include <cmath> namespace Math { template <typename T> bool compareWithTolerance(const T& rhs, const T& lhs, const T& tol) { using std::abs; return abs(rhs-lhs) <= tol; // <= to allow for 0 tolerance. } template <typename T> struct CompareWithTolerance { CompareWithTolerance() : tol_() {} CompareWithTolerance(T tolerance) : tol_(tolerance) {} bool operator()(const T& lhs, const T& rhs) const { return compareWithTolerance(rhs, lhs, tol_); } private: T tol_; }; } // namespace Math #endif // MATH_UTILS_H_
Add missing includes for std::abs.
Add missing includes for std::abs.
C
bsd-2-clause
juanchopanza/minimathlibs,juanchopanza/minimathlibs
7ab834a58bb46c6b55035221328e5a72f0631907
third_party/hwloc/static-components.h
third_party/hwloc/static-components.h
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef THIRD_PARTY_HWLOC_STATIC_COMPONENTS_H_ #define THIRD_PARTY_HWLOC_STATIC_COMPONENTS_H_ #include <private/internal-components.h> static const struct hwloc_component* hwloc_static_components[] = { &hwloc_noos_component, &hwloc_xml_component, &hwloc_synthetic_component, &hwloc_xml_nolibxml_component, &hwloc_linux_component, &hwloc_linuxio_component, #if defined(__x86_64__) || defined(__amd64__) || defined(_M_IX86) || \ defined(_M_X64) &hwloc_x86_component, #endif NULL}; #endif // THIRD_PARTY_HWLOC_STATIC_COMPONENTS_H_
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef THIRD_PARTY_HWLOC_STATIC_COMPONENTS_H_ #define THIRD_PARTY_HWLOC_STATIC_COMPONENTS_H_ #include <private/internal-components.h> static const struct hwloc_component* hwloc_static_components[] = { &hwloc_noos_component, &hwloc_xml_component, &hwloc_synthetic_component, &hwloc_xml_nolibxml_component, #ifdef __Linux__ &hwloc_linux_component, &hwloc_linuxio_component, #endif #ifdef __FreeBSD__ &hwloc_freebsd_component, #endif #if defined(__x86_64__) || defined(__amd64__) || defined(_M_IX86) || \ defined(_M_X64) &hwloc_x86_component, #endif NULL}; #endif // THIRD_PARTY_HWLOC_STATIC_COMPONENTS_H_
Include Linux or FreeBSD symbols depending on OS we are compiling on.
hwloc: Include Linux or FreeBSD symbols depending on OS we are compiling on.
C
apache-2.0
tensorflow/tensorflow,jhseu/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,annarev/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,arborh/tensorflow,tensorflow/tensorflow,DavidNorman/tensorflow,aam-at/tensorflow,annarev/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,xzturn/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_saved_model,sarvex/tensorflow,Intel-tensorflow/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,cxxgtxy/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow,freedomtan/tensorflow,aldian/tensorflow,annarev/tensorflow,cxxgtxy/tensorflow,petewarden/tensorflow,gunan/tensorflow,cxxgtxy/tensorflow,ppwwyyxx/tensorflow,renyi533/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ppwwyyxx/tensorflow,xzturn/tensorflow,petewarden/tensorflow,ppwwyyxx/tensorflow,paolodedios/tensorflow,chemelnucfin/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,xzturn/tensorflow,Intel-Corporation/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,yongtang/tensorflow,frreiss/tensorflow-fred,xzturn/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,ppwwyyxx/tensorflow,DavidNorman/tensorflow,gunan/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aam-at/tensorflow,gautam1858/tensorflow,jhseu/tensorflow,arborh/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,adit-chandra/tensorflow,petewarden/tensorflow,Intel-tensorflow/tensorflow,arborh/tensorflow,aam-at/tensorflow,chemelnucfin/tensorflow,yongtang/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,adit-chandra/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,adit-chandra/tensorflow,petewarden/tensorflow,gunan/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,jhseu/tensorflow,chemelnucfin/tensorflow,ppwwyyxx/tensorflow,gunan/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,davidzchen/tensorflow,xzturn/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,xzturn/tensorflow,annarev/tensorflow,ppwwyyxx/tensorflow,ppwwyyxx/tensorflow,gunan/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,adit-chandra/tensorflow,gunan/tensorflow,tensorflow/tensorflow,adit-chandra/tensorflow,yongtang/tensorflow,yongtang/tensorflow,annarev/tensorflow,davidzchen/tensorflow,Intel-Corporation/tensorflow,freedomtan/tensorflow,freedomtan/tensorflow,jhseu/tensorflow,cxxgtxy/tensorflow,renyi533/tensorflow,aldian/tensorflow,aldian/tensorflow,annarev/tensorflow,adit-chandra/tensorflow,annarev/tensorflow,DavidNorman/tensorflow,sarvex/tensorflow,annarev/tensorflow,arborh/tensorflow,paolodedios/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jhseu/tensorflow,yongtang/tensorflow,renyi533/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,jhseu/tensorflow,freedomtan/tensorflow,paolodedios/tensorflow,adit-chandra/tensorflow,Intel-tensorflow/tensorflow,arborh/tensorflow,annarev/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow,yongtang/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow,ppwwyyxx/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,karllessard/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_saved_model,chemelnucfin/tensorflow,sarvex/tensorflow,cxxgtxy/tensorflow,petewarden/tensorflow,renyi533/tensorflow,frreiss/tensorflow-fred,arborh/tensorflow,freedomtan/tensorflow,gautam1858/tensorflow,freedomtan/tensorflow,cxxgtxy/tensorflow,jhseu/tensorflow,freedomtan/tensorflow,gunan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,chemelnucfin/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,arborh/tensorflow,annarev/tensorflow,ppwwyyxx/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow-pywrap_saved_model,chemelnucfin/tensorflow,renyi533/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,adit-chandra/tensorflow,aam-at/tensorflow,adit-chandra/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,DavidNorman/tensorflow,Intel-tensorflow/tensorflow,freedomtan/tensorflow,renyi533/tensorflow,renyi533/tensorflow,ppwwyyxx/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,arborh/tensorflow,aam-at/tensorflow,aldian/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,Intel-tensorflow/tensorflow,adit-chandra/tensorflow,adit-chandra/tensorflow,freedomtan/tensorflow,petewarden/tensorflow,davidzchen/tensorflow,freedomtan/tensorflow,yongtang/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,DavidNorman/tensorflow,freedomtan/tensorflow,sarvex/tensorflow,gunan/tensorflow,gunan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-Corporation/tensorflow,gunan/tensorflow,paolodedios/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aldian/tensorflow,aam-at/tensorflow,DavidNorman/tensorflow,Intel-Corporation/tensorflow,aldian/tensorflow,aldian/tensorflow,davidzchen/tensorflow,gunan/tensorflow,Intel-Corporation/tensorflow,cxxgtxy/tensorflow,jhseu/tensorflow,Intel-tensorflow/tensorflow,Intel-Corporation/tensorflow,frreiss/tensorflow-fred,sarvex/tensorflow,xzturn/tensorflow,gautam1858/tensorflow,frreiss/tensorflow-fred,jhseu/tensorflow,petewarden/tensorflow,xzturn/tensorflow,cxxgtxy/tensorflow,chemelnucfin/tensorflow,sarvex/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,frreiss/tensorflow-fred,xzturn/tensorflow,DavidNorman/tensorflow,davidzchen/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,aam-at/tensorflow,karllessard/tensorflow,aam-at/tensorflow,DavidNorman/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,petewarden/tensorflow,paolodedios/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,arborh/tensorflow,renyi533/tensorflow,arborh/tensorflow,aam-at/tensorflow,yongtang/tensorflow,Intel-Corporation/tensorflow,xzturn/tensorflow,sarvex/tensorflow,gautam1858/tensorflow,xzturn/tensorflow,jhseu/tensorflow,Intel-tensorflow/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_saved_model,renyi533/tensorflow,yongtang/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,chemelnucfin/tensorflow,gautam1858/tensorflow,arborh/tensorflow,aldian/tensorflow,davidzchen/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,gautam1858/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,xzturn/tensorflow,gunan/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-pywrap_saved_model,arborh/tensorflow,chemelnucfin/tensorflow
1700bafb8a0793a158f610b21efd4dcb822ddfba
src/ports/SkFontConfigInterface_direct.h
src/ports/SkFontConfigInterface_direct.h
/* * Copyright 2009-2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */ #include "SkFontConfigInterface.h" #include <fontconfig/fontconfig.h> class SkFontConfigInterfaceDirect : public SkFontConfigInterface { public: SkFontConfigInterfaceDirect(); ~SkFontConfigInterfaceDirect() override; bool matchFamilyName(const char familyName[], SkFontStyle requested, FontIdentity* outFontIdentifier, SkString* outFamilyName, SkFontStyle* outStyle) override; SkStreamAsset* openStream(const FontIdentity&) override; protected: virtual bool isAccessible(const char* filename); private: bool isValidPattern(FcPattern* pattern); FcPattern* MatchFont(FcFontSet* font_set, const char* post_config_family, const SkString& family); typedef SkFontConfigInterface INHERITED; };
/* * Copyright 2009-2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */ #ifndef SKFONTCONFIGINTERFACE_DIRECT_H_ #define SKFONTCONFIGINTERFACE_DIRECT_H_ #include "SkFontConfigInterface.h" #include <fontconfig/fontconfig.h> class SkFontConfigInterfaceDirect : public SkFontConfigInterface { public: SkFontConfigInterfaceDirect(); ~SkFontConfigInterfaceDirect() override; bool matchFamilyName(const char familyName[], SkFontStyle requested, FontIdentity* outFontIdentifier, SkString* outFamilyName, SkFontStyle* outStyle) override; SkStreamAsset* openStream(const FontIdentity&) override; protected: virtual bool isAccessible(const char* filename); private: bool isValidPattern(FcPattern* pattern); FcPattern* MatchFont(FcFontSet* font_set, const char* post_config_family, const SkString& family); typedef SkFontConfigInterface INHERITED; }; #endif
Add include guard to SkFontConfigInterface.h
Add include guard to SkFontConfigInterface.h BUG=skia:7137 Change-Id: I29536a21211eae8b075d43984f3677f64ff9f481 Reviewed-on: https://skia-review.googlesource.com/57820 Reviewed-by: Ben Wagner <53965154ffeecc4a10886eab9259e95965f2979a@google.com> Commit-Queue: Ben Wagner <53965154ffeecc4a10886eab9259e95965f2979a@google.com>
C
bsd-3-clause
google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,rubenvb/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,google/skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,google/skia,rubenvb/skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,google/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,google/skia,google/skia,rubenvb/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia
d961e95a724729129cc2fd9b26b0da136c445322
libc/sysdeps/linux/common/bits/uClibc_errno.h
libc/sysdeps/linux/common/bits/uClibc_errno.h
/* * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #ifndef _BITS_UCLIBC_ERRNO_H #define _BITS_UCLIBC_ERRNO_H 1 #ifdef IS_IN_rtld # undef errno # define errno _dl_errno extern int _dl_errno; // attribute_hidden; #elif defined __UCLIBC_HAS_THREADS__ # include <tls.h> # if defined USE___THREAD && USE___THREAD # undef errno # ifndef NOT_IN_libc # define errno __libc_errno # else # define errno errno # endif extern __thread int errno __attribute_tls_model_ie; # endif /* USE___THREAD */ #endif /* IS_IN_rtld */ #define __set_errno(val) (errno = (val)) #ifndef __ASSEMBLER__ extern int *__errno_location (void) __THROW __attribute__ ((__const__)) # ifdef IS_IN_rtld attribute_hidden # endif ; # if defined __UCLIBC_HAS_THREADS__ # include <tls.h> # if defined USE___THREAD && USE___THREAD libc_hidden_proto(__errno_location) # endif # endif #endif /* !__ASSEMBLER__ */ #endif
/* * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #ifndef _BITS_UCLIBC_ERRNO_H #define _BITS_UCLIBC_ERRNO_H 1 #ifdef IS_IN_rtld # undef errno # define errno _dl_errno extern int _dl_errno; // attribute_hidden; #elif defined __UCLIBC_HAS_THREADS__ # include <tls.h> # if defined USE___THREAD && USE___THREAD # undef errno # ifndef NOT_IN_libc # define errno __libc_errno # else # define errno errno # endif extern __thread int errno attribute_tls_model_ie; # endif /* USE___THREAD */ #endif /* IS_IN_rtld */ #define __set_errno(val) (errno = (val)) #ifndef __ASSEMBLER__ extern int *__errno_location (void) __THROW __attribute__ ((__const__)) # ifdef IS_IN_rtld attribute_hidden # endif ; # if defined __UCLIBC_HAS_THREADS__ # include <tls.h> # if defined USE___THREAD && USE___THREAD libc_hidden_proto(__errno_location) # endif # endif #endif /* !__ASSEMBLER__ */ #endif
Fix typo in macro for tls access model
Fix typo in macro for tls access model
C
lgpl-2.1
brgl/uclibc-ng,czankel/xtensa-uclibc,hjl-tools/uClibc,kraj/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,ysat0/uClibc,gittup/uClibc,OpenInkpot-archive/iplinux-uclibc,majek/uclibc-vx32,ddcc/klee-uclibc-0.9.33.2,wbx-github/uclibc-ng,kraj/uclibc-ng,hjl-tools/uClibc,majek/uclibc-vx32,mephi42/uClibc,mephi42/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,groundwater/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,ffainelli/uClibc,czankel/xtensa-uclibc,skristiansson/uClibc-or1k,OpenInkpot-archive/iplinux-uclibc,skristiansson/uClibc-or1k,ffainelli/uClibc,ffainelli/uClibc,hwoarang/uClibc,foss-xtensa/uClibc,kraj/uclibc-ng,wbx-github/uclibc-ng,OpenInkpot-archive/iplinux-uclibc,atgreen/uClibc-moxie,m-labs/uclibc-lm32,hjl-tools/uClibc,ndmsystems/uClibc,OpenInkpot-archive/iplinux-uclibc,hjl-tools/uClibc,groundwater/uClibc,atgreen/uClibc-moxie,brgl/uclibc-ng,atgreen/uClibc-moxie,kraj/uClibc,wbx-github/uclibc-ng,groundwater/uClibc,foss-xtensa/uClibc,skristiansson/uClibc-or1k,ddcc/klee-uclibc-0.9.33.2,kraj/uclibc-ng,kraj/uClibc,brgl/uclibc-ng,m-labs/uclibc-lm32,gittup/uClibc,ysat0/uClibc,majek/uclibc-vx32,hjl-tools/uClibc,ffainelli/uClibc,ffainelli/uClibc,ddcc/klee-uclibc-0.9.33.2,groundwater/uClibc,foss-xtensa/uClibc,skristiansson/uClibc-or1k,mephi42/uClibc,ndmsystems/uClibc,waweber/uclibc-clang,kraj/uClibc,waweber/uclibc-clang,waweber/uclibc-clang,foss-xtensa/uClibc,ndmsystems/uClibc,mephi42/uClibc,ddcc/klee-uclibc-0.9.33.2,ysat0/uClibc,gittup/uClibc,m-labs/uclibc-lm32,brgl/uclibc-ng,foss-for-synopsys-dwc-arc-processors/uClibc,ndmsystems/uClibc,hwoarang/uClibc,ysat0/uClibc,waweber/uclibc-clang,majek/uclibc-vx32,groundwater/uClibc,hwoarang/uClibc,wbx-github/uclibc-ng,czankel/xtensa-uclibc,kraj/uclibc-ng,m-labs/uclibc-lm32,hwoarang/uClibc,czankel/xtensa-uclibc,atgreen/uClibc-moxie,gittup/uClibc
bdaf36df79bb3f80c23988ea8a4884cba12dd39e
src/amx.h
src/amx.h
#if defined __clang__ #pragma clang push #pragma clang diagnostic ignored "-Wignored-attributes" #elif defined __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wattributes" #endif #include <amx/amx.h> #include <amx/amxaux.h> #include <amx/amxdbg.h> #if defined __clang_ #pragma clang pop #elif defined __GNUC__ #pragma GCC pop #endif
#if defined __clang__ #pragma clang push #pragma clang diagnostic ignored "-Wignored-attributes" #elif defined __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wattributes" #endif #ifdef _WIN32 #include <malloc.h> #endif #include <amx/amx.h> #include <amx/amxaux.h> #include <amx/amxdbg.h> #if defined __clang_ #pragma clang pop #elif defined __GNUC__ #pragma GCC pop #endif
Fix alloca() redefinition warning on Windows
Fix alloca() redefinition warning on Windows
C
bsd-2-clause
Zeex/samp-plugin-crashdetect,Zeex/samp-plugin-crashdetect,Zeex/samp-plugin-crashdetect
9a5e3ffb2268504c98bcba77e44ec18071c52418
framework/Source/iOS/GPUImageView.h
framework/Source/iOS/GPUImageView.h
#import <UIKit/UIKit.h> #import "GPUImageContext.h" typedef enum { kGPUImageFillModeStretch, // Stretch to fill the full view, which may distort the image outside of its normal aspect ratio kGPUImageFillModePreserveAspectRatio, // Maintains the aspect ratio of the source image, adding bars of the specified background color kGPUImageFillModePreserveAspectRatioAndFill // Maintains the aspect ratio of the source image, zooming in on its center to fill the view } GPUImageFillModeType; /** UIView subclass to use as an endpoint for displaying GPUImage outputs */ @interface GPUImageView : UIView <GPUImageInput> { GPUImageRotationMode inputRotation; } /** The fill mode dictates how images are fit in the view, with the default being kGPUImageFillModePreserveAspectRatio */ @property(readwrite, nonatomic) GPUImageFillModeType fillMode; /** This calculates the current display size, in pixels, taking into account Retina scaling factors */ @property(readonly, nonatomic) CGSize sizeInPixels; @property(nonatomic) BOOL enabled; /** Handling fill mode @param redComponent Red component for background color @param greenComponent Green component for background color @param blueComponent Blue component for background color @param alphaComponent Alpha component for background color */ - (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent; - (void)setCurrentlyReceivingMonochromeInput:(BOOL)newValue; @end
#import <UIKit/UIKit.h> #import "GPUImageContext.h" typedef NS_ENUM(NSUInteger, GPUImageFillModeType) { kGPUImageFillModeStretch, // Stretch to fill the full view, which may distort the image outside of its normal aspect ratio kGPUImageFillModePreserveAspectRatio, // Maintains the aspect ratio of the source image, adding bars of the specified background color kGPUImageFillModePreserveAspectRatioAndFill // Maintains the aspect ratio of the source image, zooming in on its center to fill the view }; /** UIView subclass to use as an endpoint for displaying GPUImage outputs */ @interface GPUImageView : UIView <GPUImageInput> { GPUImageRotationMode inputRotation; } /** The fill mode dictates how images are fit in the view, with the default being kGPUImageFillModePreserveAspectRatio */ @property(readwrite, nonatomic) GPUImageFillModeType fillMode; /** This calculates the current display size, in pixels, taking into account Retina scaling factors */ @property(readonly, nonatomic) CGSize sizeInPixels; @property(nonatomic) BOOL enabled; /** Handling fill mode @param redComponent Red component for background color @param greenComponent Green component for background color @param blueComponent Blue component for background color @param alphaComponent Alpha component for background color */ - (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent; - (void)setCurrentlyReceivingMonochromeInput:(BOOL)newValue; @end
Update GPUImageFillModeType enum to use NS_ENUM
Update GPUImageFillModeType enum to use NS_ENUM
C
bsd-3-clause
duanhjlt/GPUImage,duanhjlt/GPUImage
5e943344594d9b670e09e44dadd780e91ddffd5b
ui/aura/event_filter.h
ui/aura/event_filter.h
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_AURA_EVENT_FILTER_H_ #define UI_AURA_EVENT_FILTER_H_ #pragma once #include "base/logging.h" #include "ui/gfx/point.h" namespace aura { class Window; class MouseEvent; // An object that filters events sent to an owner window, potentially performing // adjustments to the window's position, size and z-index. class EventFilter { public: explicit EventFilter(Window* owner); virtual ~EventFilter(); // Try to handle |event| (before the owner's delegate gets a chance to). // Returns true if the event was handled by the WindowManager and should not // be forwarded to the owner's delegate. virtual bool OnMouseEvent(Window* target, MouseEvent* event); protected: Window* owner() { return owner_; } private: Window* owner_; DISALLOW_COPY_AND_ASSIGN(EventFilter); }; } // namespace aura #endif // UI_AURA_EVENT_FILTER_H_
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_AURA_EVENT_FILTER_H_ #define UI_AURA_EVENT_FILTER_H_ #pragma once #include "base/basictypes.h" namespace aura { class Window; class MouseEvent; // An object that filters events sent to an owner window, potentially performing // adjustments to the window's position, size and z-index. class EventFilter { public: explicit EventFilter(Window* owner); virtual ~EventFilter(); // Try to handle |event| (before the owner's delegate gets a chance to). // Returns true if the event was handled by the WindowManager and should not // be forwarded to the owner's delegate. virtual bool OnMouseEvent(Window* target, MouseEvent* event); protected: Window* owner() { return owner_; } private: Window* owner_; DISALLOW_COPY_AND_ASSIGN(EventFilter); }; } // namespace aura #endif // UI_AURA_EVENT_FILTER_H_
Include basictypes.h for DISALLOW macro.
aura: Include basictypes.h for DISALLOW macro. R=ben@chromium.org Review URL: http://codereview.chromium.org/7976010 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@101986 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
dushu1203/chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,timopulkkinen/BubbleFish,rogerwang/chromium,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,anirudhSK/chromium,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,hujiajie/pa-chromium,ChromiumWebApps/chromium,Chilledheart/chromium,nacl-webkit/chrome_deps,rogerwang/chromium,junmin-zhu/chromium-rivertrail,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,rogerwang/chromium,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,Chilledheart/chromium,zcbenz/cefode-chromium,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,robclark/chromium,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,keishi/chromium,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,timopulkkinen/BubbleFish,Chilledheart/chromium,bright-sparks/chromium-spacewalk,littlstar/chromium.src,Just-D/chromium-1,timopulkkinen/BubbleFish,Just-D/chromium-1,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,patrickm/chromium.src,ChromiumWebApps/chromium,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,keishi/chromium,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,zcbenz/cefode-chromium,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,Just-D/chromium-1,ondra-novak/chromium.src,Chilledheart/chromium,jaruba/chromium.src,zcbenz/cefode-chromium,hujiajie/pa-chromium,jaruba/chromium.src,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,patrickm/chromium.src,dushu1203/chromium.src,Jonekee/chromium.src,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,patrickm/chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk,Chilledheart/chromium,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,M4sse/chromium.src,jaruba/chromium.src,M4sse/chromium.src,dednal/chromium.src,dednal/chromium.src,markYoungH/chromium.src,nacl-webkit/chrome_deps,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,markYoungH/chromium.src,Jonekee/chromium.src,hujiajie/pa-chromium,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,littlstar/chromium.src,M4sse/chromium.src,dushu1203/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,Jonekee/chromium.src,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,ltilve/chromium,Jonekee/chromium.src,nacl-webkit/chrome_deps,keishi/chromium,mogoweb/chromium-crosswalk,jaruba/chromium.src,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,PeterWangIntel/chromium-crosswalk,mogoweb/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Chilledheart/chromium,axinging/chromium-crosswalk,robclark/chromium,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,robclark/chromium,robclark/chromium,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,dushu1203/chromium.src,mogoweb/chromium-crosswalk,mogoweb/chromium-crosswalk,markYoungH/chromium.src,M4sse/chromium.src,timopulkkinen/BubbleFish,robclark/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,anirudhSK/chromium,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,jaruba/chromium.src,ChromiumWebApps/chromium,keishi/chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,nacl-webkit/chrome_deps,hujiajie/pa-chromium,robclark/chromium,ltilve/chromium,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,ondra-novak/chromium.src,dushu1203/chromium.src,Jonekee/chromium.src,mogoweb/chromium-crosswalk,jaruba/chromium.src,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,jaruba/chromium.src,ltilve/chromium,hujiajie/pa-chromium,timopulkkinen/BubbleFish,robclark/chromium,junmin-zhu/chromium-rivertrail,bright-sparks/chromium-spacewalk,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,patrickm/chromium.src,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,keishi/chromium,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,hujiajie/pa-chromium,patrickm/chromium.src,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,littlstar/chromium.src,Just-D/chromium-1,M4sse/chromium.src,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,keishi/chromium,littlstar/chromium.src,dednal/chromium.src,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,ltilve/chromium,junmin-zhu/chromium-rivertrail,markYoungH/chromium.src,hujiajie/pa-chromium,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,dushu1203/chromium.src,hgl888/chromium-crosswalk,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,rogerwang/chromium,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,zcbenz/cefode-chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,rogerwang/chromium,ltilve/chromium,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,robclark/chromium,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,keishi/chromium,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,dednal/chromium.src,anirudhSK/chromium,keishi/chromium,Jonekee/chromium.src,anirudhSK/chromium,ltilve/chromium,jaruba/chromium.src,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,Chilledheart/chromium,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,littlstar/chromium.src,mogoweb/chromium-crosswalk,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,ltilve/chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,rogerwang/chromium,hujiajie/pa-chromium,patrickm/chromium.src,M4sse/chromium.src,axinging/chromium-crosswalk,hujiajie/pa-chromium,rogerwang/chromium,littlstar/chromium.src,ltilve/chromium,hgl888/chromium-crosswalk,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,keishi/chromium,keishi/chromium,rogerwang/chromium,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,rogerwang/chromium,mogoweb/chromium-crosswalk,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,keishi/chromium,ChromiumWebApps/chromium,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,dednal/chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,robclark/chromium,bright-sparks/chromium-spacewalk,patrickm/chromium.src,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,dednal/chromium.src,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,rogerwang/chromium,axinging/chromium-crosswalk,ChromiumWebApps/chromium,robclark/chromium,Pluto-tv/chromium-crosswalk,dednal/chromium.src,M4sse/chromium.src
706d8d60091b30bc950be8877864f12aed1ab9c0
src/software/raw-adc-consumer/main.c
src/software/raw-adc-consumer/main.c
/*************************************************************************************** * MAIN.C * * Description: Converts raw ADC reads given via character device to time of flight * * (C) 2016 Visaoni * Licensed under the MIT License. **************************************************************************************/ int main(void) { return 0; }
/*************************************************************************************** * MAIN.C * * Description: Converts raw ADC reads given via character device to time of flight * * (C) 2016 Visaoni * Licensed under the MIT License. **************************************************************************************/ #include <stdint.h> #include <stdio.h> //#include <unistd.h> //#include <string.h> #include <fcntl.h> #include <sys/poll.h> // TODO: Get these value from a shared source along with the firmware #define TIME_BETWEEN_READS_NS 166.7 #define DELAY_TIME_NS 0 #define READS_PER_TX 2000 #define BYTES_PER_READ 2 #define CHARACTER_DEVICE_PATH "/dev/rpmsg_pru31" #define MAX_BUFFER_SIZE (BYTES_PER_READ * READS_PER_TX) double find_tof( uint16_t reads[] ) { size_t max = 0; size_t i; for( i = 0; i < READS_PER_TX; i++ ) { if( reads[i] > reads[max] ) { max = i; } } return DELAY_TIME_NS + max * TIME_BETWEEN_READS_NS; } int main(void) { uint8_t buffer[ MAX_BUFFER_SIZE ]; uint16_t* reads = (uint16_t*)buffer; // Assumes little-endian struct pollfd pollfds[1]; pollfds[0].fd = open( CHARACTER_DEVICE_PATH, O_RDWR ); if( pollfds[0].fd < 0 ) { printf( "Unable to open char device." ); return -1; } // Firmware needs an initial write to grab metadata // msg contents irrelevant // TODO: Should probably handle errors better while( write( pollfds[0].fd, "s", 1 ) < 0 ) { printf( "Problem with initial send. Retrying..." ); } while(1) { // Grab a whole run and then process // TODO: Figure out of this is sufficient or if incremental processing is required for performance size_t total_bytes = 0; while( total_bytes < MAX_BUFFER_SIZE ) { total_bytes += read( pollfds[0].fd, buffer + total_bytes, MAX_BUFFER_SIZE - total_bytes ); } // reads and buffer are aliased double tof = find_tof( reads ); printf( "Time of flight: %d ns", tof ); } return 0; }
Set up basic processing framework
Set up basic processing framework Constructs read values from character device and passes it through the most basic processing to find time of flight.
C
mit
thetransformerr/beagle-sonic,Visaoni/beagle-sonic-anemometer,thetransformerr/beagle-sonic,Visaoni/beagle-sonic-anemometer,thetransformerr/beagle-sonic,thetransformerr/beagle-sonic,Visaoni/beagle-sonic-anemometer
087d365eb12943b25fab0f798832b817620be1ee
include/matrix_assignment_impl.h
include/matrix_assignment_impl.h
//----------------------------------------------------------------------------- // Assignments //----------------------------------------------------------------------------- template<class T> matrix<T>& matrix<T>::operator=( std::initializer_list<std::initializer_list<T>> init_list){ data_ = make_vector(init_list); return this; }
//----------------------------------------------------------------------------- // Assignments //----------------------------------------------------------------------------- template<class T> matrix<T>& matrix<T>::operator=( std::initializer_list<std::initializer_list<T>> init_list){ data_ = make_vector(init_list); rows_ = init_list.size(); cols_ = (init_list.size() > 0) ? init_list.begin()->size() : 0; return this; }
Add rows and cols assignment.
Add rows and cols assignment.
C
mit
actinium/cppMatrix,actinium/cppMatrix
21144972d185d3dfd47cd9641901ba8d34921e84
src/lib/eina_main.c
src/lib/eina_main.c
/* EINA - EFL data type library * Copyright (C) 2008 Cedric Bail * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; * if not, see <http://www.gnu.org/licenses/>. */ #include "Eina.h" EAPI int eina_init(void) { int r; r = eina_error_init(); r += eina_hash_init(); r += eina_stringshare_init(); r += eina_list_init(); r += eina_array_init(); return r; } EAPI int eina_shutdown(void) { int r; eina_array_shutdown(); eina_list_shutdown(); r = eina_stringshare_shutdown(); r += eina_hash_shutdown(); r += eina_error_shutdown(); return r; }
/* EINA - EFL data type library * Copyright (C) 2008 Cedric Bail * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; * if not, see <http://www.gnu.org/licenses/>. */ #include "eina_error.h" #include "eina_hash.h" #include "eina_stringshare.h" #include "eina_list.h" #include "eina_array.h" EAPI int eina_init(void) { int r; r = eina_error_init(); r += eina_hash_init(); r += eina_stringshare_init(); r += eina_list_init(); r += eina_array_init(); return r; } EAPI int eina_shutdown(void) { int r; eina_array_shutdown(); eina_list_shutdown(); r = eina_stringshare_shutdown(); r += eina_hash_shutdown(); r += eina_error_shutdown(); return r; }
Remove warning and only include needed stuff.
Remove warning and only include needed stuff. git-svn-id: b99a075ee42e317ef7d0e499fd315684e5f6d838@35456 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
C
lgpl-2.1
OpenInkpot-archive/iplinux-eina,jordemort/eina,OpenInkpot-archive/iplinux-eina,jordemort/eina,OpenInkpot-archive/iplinux-eina,jordemort/eina
e32856d08454650f0aec60409125448a58ed6159
src/bin/e_error.h
src/bin/e_error.h
#ifdef E_TYPEDEFS #define e_error_message_show(args...) \ { \ char __tmpbuf[PATH_MAX]; \ \ snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \ e_error_message_show_internal(__tmpbuf); \ } #else #ifndef E_ERROR_H #define E_ERROR_H EAPI void e_error_message_show_internal(char *txt); #endif #endif
#ifdef E_TYPEDEFS #define e_error_message_show(args...) do \ { \ char __tmpbuf[PATH_MAX]; \ \ snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \ e_error_message_show_internal(__tmpbuf); \ } while (0) #else #ifndef E_ERROR_H #define E_ERROR_H EAPI void e_error_message_show_internal(char *txt); #endif #endif
Fix macro so it can be used as a statement
e: Fix macro so it can be used as a statement Should fix devilhorn's compile error. Signed-off-by: Mike McCormack <mj.mccormack@samsung.com> SVN revision: 61783
C
bsd-2-clause
rvandegrift/e,tasn/enlightenment,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment,tizenorg/platform.upstream.enlightenment,tasn/enlightenment,tizenorg/platform.upstream.enlightenment,FlorentRevest/Enlightenment,rvandegrift/e,rvandegrift/e,FlorentRevest/Enlightenment,tasn/enlightenment
c2f7955dca22540cfd1fa995967e0bc08fb92b2b
test/fixtures/external_scan.c
test/fixtures/external_scan.c
#include <tree_sitter/parser.h> enum { EXTERNAL_A, EXTERNAL_B }; void *tree_sitter_test_grammar_external_scanner_create() { return NULL; } void tree_sitter_test_grammar_external_scanner_destroy(void *payload) { } bool tree_sitter_test_grammar_external_scanner_scan(void *payload, TSLexer *lexer, const bool *valid_symbols) { while (lexer->lookahead == ' ') { lexer->advance(lexer, true); } if (lexer->lookahead == 'a') { lexer->advance(lexer, false); lexer->result_symbol = EXTERNAL_A; return true; } if (lexer->lookahead == 'b') { lexer->advance(lexer, false); lexer->result_symbol = EXTERNAL_B; return true; } return false; } void tree_sitter_test_grammar_external_scanner_reset(void *payload) { } bool tree_sitter_test_grammar_external_scanner_serialize(void *payload, TSExternalTokenState state) { return true; } void tree_sitter_test_grammar_external_scanner_deserialize(void *payload, TSExternalTokenState state) { }
#include <tree_sitter/parser.h> enum { EXTERNAL_A, EXTERNAL_B }; void *tree_sitter_test_grammar_external_scanner_create() { return NULL; } void tree_sitter_test_grammar_external_scanner_destroy(void *payload) { } bool tree_sitter_test_grammar_external_scanner_scan(void *payload, TSLexer *lexer, const bool *valid_symbols) { while (lexer->lookahead == ' ') { lexer->advance(lexer, true); } if (lexer->lookahead == 'a') { lexer->advance(lexer, false); lexer->result_symbol = EXTERNAL_A; return true; } if (lexer->lookahead == 'b') { lexer->advance(lexer, false); lexer->result_symbol = EXTERNAL_B; return true; } return false; } void tree_sitter_test_grammar_external_scanner_reset(void *payload) { } unsigned tree_sitter_test_grammar_external_scanner_serialize( void *payload, char *buffer ) { return 0; } void tree_sitter_test_grammar_external_scanner_deserialize( void *payload, const char *buffer, unsigned length) {}
Fix signature of fixture external scanner functions
Fix signature of fixture external scanner functions
C
mit
tree-sitter/tree-sitter-cli,tree-sitter/node-tree-sitter-compiler,tree-sitter/node-tree-sitter-compiler,tree-sitter/tree-sitter-cli,tree-sitter/tree-sitter-cli,tree-sitter/node-tree-sitter-compiler,maxbrunsfeld/node-tree-sitter-compiler,tree-sitter/tree-sitter-cli,maxbrunsfeld/node-tree-sitter-compiler,maxbrunsfeld/node-tree-sitter-compiler,tree-sitter/node-tree-sitter-compiler
10bdcdef15256a5cd9c181ae928c22b35ae77a58
source/glbinding/include/glbinding/nogl.h
source/glbinding/include/glbinding/nogl.h
#pragma once #ifdef __gl_h_ #error "glbinding is not compatible with gl.h" #else #define __gl_h_ #endif
#ifdef __gl_h_ #error "glbinding is not compatible with gl.h" #endif
Revert gl.h emulation using __gl_h_ include guard
Revert gl.h emulation using __gl_h_ include guard
C
mit
j-o/glbinding,mcleary/glbinding,hpicgs/glbinding,cginternals/glbinding,mcleary/glbinding,hpicgs/glbinding,j-o/glbinding,mcleary/glbinding,hpicgs/glbinding,j-o/glbinding,j-o/glbinding,mcleary/glbinding,cginternals/glbinding,hpicgs/glbinding
a93e50dba9a0528ba2bebe76601b933259b684d1
src/math/p_sinh.c
src/math/p_sinh.c
#include <pal.h> /** * * Calculates the hyperbolic sine of the vector 'a'. Angles are specified * in radians. * * @param a Pointer to input vector * * @param c Pointer to output vector * * @param n Size of 'a' and 'c' vector. * * @return None * */ #include <math.h> void p_sinh_f32(const float *a, float *c, int n) { int i; for (i = 0; i < n; i++) { *(c + i) = sinhf(*(a + i)); } }
#include <pal.h> /* * sinh z = (exp z - exp(-z)) / 2 */ static inline float _p_sinh(const float z) { float exp_z; p_exp_f32(&z, &exp_z, 1); return 0.5f * (exp_z - 1.f / exp_z); } /** * * Calculates the hyperbolic sine of the vector 'a'. Angles are specified * in radians. * * @param a Pointer to input vector * * @param c Pointer to output vector * * @param n Size of 'a' and 'c' vector. * * @return None * */ void p_sinh_f32(const float *a, float *c, int n) { int i; for (i = 0; i < n; i++) { c[i] = _p_sinh(a[i]); } }
Implement the hyperbolic sine function.
math:sinh: Implement the hyperbolic sine function. Signed-off-by: Mansour Moufid <ac5f6b12fab5e0d4efa7215e6c2dac9d55ab77dc@gmail.com>
C
apache-2.0
mateunho/pal,eliteraspberries/pal,mateunho/pal,Adamszk/pal3,olajep/pal,eliteraspberries/pal,eliteraspberries/pal,aolofsson/pal,parallella/pal,mateunho/pal,8l/pal,parallella/pal,aolofsson/pal,8l/pal,Adamszk/pal3,debug-de-su-ka/pal,debug-de-su-ka/pal,eliteraspberries/pal,8l/pal,parallella/pal,debug-de-su-ka/pal,olajep/pal,Adamszk/pal3,mateunho/pal,debug-de-su-ka/pal,olajep/pal,parallella/pal,Adamszk/pal3,mateunho/pal,aolofsson/pal,eliteraspberries/pal,8l/pal,olajep/pal,aolofsson/pal,debug-de-su-ka/pal,parallella/pal
cd7dd0d229447082a6152623d4757470aeba29ad
examples/c-library/c-library.h
examples/c-library/c-library.h
/** * Example of a typical library providing a C-interface */ #pragma once #include "ivi-main-loop-c.h" #ifdef __cplusplus extern "C" { #endif static IVIMainLoop_EventSource_ReportStatus callbackMyCLibrary(const void *data) { printf("callbackMyCLibrary\n"); return IVI_MAIN_LOOP_KEEP_ENABLED; } /** * Initialize the library using the given source manager object where the library is going to add its event sources */ inline void my_c_library_init_function(IVIMainLoop_EventSourceManager *sourceManager) { IVIMainLoop_TimeOut_CallBack callback = {.function = callbackMyCLibrary, .data = NULL}; IVIMainLoop_TimeOutEventSource *source = ivi_main_loop_timeout_source_new(sourceManager, callback, 300); ivi_main_loop_timeout_source_enable(source); } #ifdef __cplusplus } #endif
/** * Example of a typical library providing a C-interface */ #pragma once #include "ivi-main-loop-c.h" #ifdef __cplusplus extern "C" { #endif static IVIMainLoop_EventSource_ReportStatus callbackMyCLibrary(const void *data) { printf("callbackMyCLibrary\n"); return IVI_MAIN_LOOP_KEEP_ENABLED; } /** * Initialize the library using the given source manager object where the library is going to add its event sources */ static inline void my_c_library_init_function(IVIMainLoop_EventSourceManager *sourceManager) { IVIMainLoop_TimeOut_CallBack callback = {.function = callbackMyCLibrary, .data = NULL}; IVIMainLoop_TimeOutEventSource *source = ivi_main_loop_timeout_source_new(sourceManager, callback, 300); ivi_main_loop_timeout_source_enable(source); } #ifdef __cplusplus } #endif
Add missing static for inline functions (GCC 5)
Add missing static for inline functions (GCC 5)
C
mpl-2.0
Pelagicore/ivi-main-loop,Pelagicore/ivi-main-loop
34140265c404df02af11ed7684b7c087dfe5b8c8
chrome/browser/cocoa/objc_zombie.h
chrome/browser/cocoa/objc_zombie.h
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_ #define CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_ #pragma once #import <Foundation/Foundation.h> // You should think twice every single time you use anything from this // namespace. namespace ObjcEvilDoers { // Enable zombies. Returns NO if it fails to enable. // // When |zombieAllObjects| is YES, all objects inheriting from // NSObject become zombies on -dealloc. If NO, -shouldBecomeCrZombie // is queried to determine whether to make the object a zombie. // // |zombieCount| controls how many zombies to store before freeing the // oldest. Set to 0 to free objects immediately after making them // zombies. BOOL ZombieEnable(BOOL zombieAllObjects, size_t zombieCount); // Disable zombies. void ZombieDisable(); } // namespace ObjcEvilDoers @interface NSObject (CrZombie) - (BOOL)shouldBecomeCrZombie; @end #endif // CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_ #define CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_ #pragma once #import <Foundation/Foundation.h> // You should think twice every single time you use anything from this // namespace. namespace ObjcEvilDoers { // Enable zombie object debugging. This implements a variant of Apple's // NSZombieEnabled which can help expose use-after-free errors where messages // are sent to freed Objective-C objects in production builds. // // Returns NO if it fails to enable. // // When |zombieAllObjects| is YES, all objects inheriting from // NSObject become zombies on -dealloc. If NO, -shouldBecomeCrZombie // is queried to determine whether to make the object a zombie. // // |zombieCount| controls how many zombies to store before freeing the // oldest. Set to 0 to free objects immediately after making them // zombies. BOOL ZombieEnable(BOOL zombieAllObjects, size_t zombieCount); // Disable zombies. void ZombieDisable(); } // namespace ObjcEvilDoers @interface NSObject (CrZombie) - (BOOL)shouldBecomeCrZombie; @end #endif // CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
Add link to explanation of what we mean by zombie The person triaging / debugging a zombie crash may never have heard of this before.
Add link to explanation of what we mean by zombie The person triaging / debugging a zombie crash may never have heard of this before. BUG=None TEST=None Review URL: http://codereview.chromium.org/3763002 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@62723 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
dushu1203/chromium.src,timopulkkinen/BubbleFish,rogerwang/chromium,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,robclark/chromium,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,patrickm/chromium.src,axinging/chromium-crosswalk,robclark/chromium,chuan9/chromium-crosswalk,hujiajie/pa-chromium,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,dushu1203/chromium.src,anirudhSK/chromium,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,dushu1203/chromium.src,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,littlstar/chromium.src,hujiajie/pa-chromium,rogerwang/chromium,jaruba/chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,robclark/chromium,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,rogerwang/chromium,keishi/chromium,hgl888/chromium-crosswalk,keishi/chromium,ondra-novak/chromium.src,dednal/chromium.src,krieger-od/nwjs_chromium.src,jaruba/chromium.src,fujunwei/chromium-crosswalk,keishi/chromium,rogerwang/chromium,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,rogerwang/chromium,jaruba/chromium.src,timopulkkinen/BubbleFish,Chilledheart/chromium,krieger-od/nwjs_chromium.src,anirudhSK/chromium,littlstar/chromium.src,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,Just-D/chromium-1,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,keishi/chromium,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,hujiajie/pa-chromium,ltilve/chromium,ChromiumWebApps/chromium,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,jaruba/chromium.src,littlstar/chromium.src,M4sse/chromium.src,timopulkkinen/BubbleFish,ondra-novak/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,dednal/chromium.src,markYoungH/chromium.src,robclark/chromium,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,Chilledheart/chromium,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,markYoungH/chromium.src,littlstar/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,keishi/chromium,Jonekee/chromium.src,Chilledheart/chromium,nacl-webkit/chrome_deps,patrickm/chromium.src,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,Just-D/chromium-1,anirudhSK/chromium,mogoweb/chromium-crosswalk,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,rogerwang/chromium,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,keishi/chromium,Pluto-tv/chromium-crosswalk,dednal/chromium.src,Chilledheart/chromium,M4sse/chromium.src,nacl-webkit/chrome_deps,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,Chilledheart/chromium,robclark/chromium,bright-sparks/chromium-spacewalk,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,M4sse/chromium.src,ltilve/chromium,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,littlstar/chromium.src,patrickm/chromium.src,nacl-webkit/chrome_deps,robclark/chromium,M4sse/chromium.src,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,jaruba/chromium.src,mogoweb/chromium-crosswalk,jaruba/chromium.src,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,axinging/chromium-crosswalk,ChromiumWebApps/chromium,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,patrickm/chromium.src,zcbenz/cefode-chromium,ondra-novak/chromium.src,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,Just-D/chromium-1,littlstar/chromium.src,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,zcbenz/cefode-chromium,robclark/chromium,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,anirudhSK/chromium,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,patrickm/chromium.src,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,rogerwang/chromium,hujiajie/pa-chromium,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,keishi/chromium,Just-D/chromium-1,dushu1203/chromium.src,mogoweb/chromium-crosswalk,Just-D/chromium-1,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,zcbenz/cefode-chromium,keishi/chromium,Jonekee/chromium.src,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,ltilve/chromium,timopulkkinen/BubbleFish,Chilledheart/chromium,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,zcbenz/cefode-chromium,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,keishi/chromium,M4sse/chromium.src,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,rogerwang/chromium,crosswalk-project/chromium-crosswalk-efl,robclark/chromium,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,M4sse/chromium.src,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,littlstar/chromium.src,junmin-zhu/chromium-rivertrail,dednal/chromium.src,robclark/chromium,Jonekee/chromium.src,Jonekee/chromium.src,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,rogerwang/chromium,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,dushu1203/chromium.src,M4sse/chromium.src,Fireblend/chromium-crosswalk,littlstar/chromium.src,Jonekee/chromium.src,timopulkkinen/BubbleFish,anirudhSK/chromium,M4sse/chromium.src,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,ltilve/chromium,chuan9/chromium-crosswalk,hujiajie/pa-chromium,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,dushu1203/chromium.src,dushu1203/chromium.src,keishi/chromium,anirudhSK/chromium,jaruba/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,anirudhSK/chromium,M4sse/chromium.src,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,ltilve/chromium,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,markYoungH/chromium.src,axinging/chromium-crosswalk,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,Chilledheart/chromium,timopulkkinen/BubbleFish,bright-sparks/chromium-spacewalk,ltilve/chromium,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,Jonekee/chromium.src,nacl-webkit/chrome_deps,Jonekee/chromium.src,hujiajie/pa-chromium,dednal/chromium.src,rogerwang/chromium,Jonekee/chromium.src,robclark/chromium,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk
28745fcea6f0fe7e26f565ab756bdc2bbb174abc
Sub-Terra/include/Text.h
Sub-Terra/include/Text.h
#pragma once #include "Sprite.h" #include "FontAsset.h" class Text : public Sprite { private: std::shared_ptr<FontAsset> asset; std::string str; public: Text(std::shared_ptr<FontAsset> asset, const std::string str, const Point2 pos = Point2(0), const Origin origin = Origin::BottomLeft, const Point4 color = Point4(1), const Point2 scale = Point2(-1)) : asset(asset), str(str), Sprite(pos, origin, color, scale) {} void RenderMe() override final { SDL(surface = TTF_RenderUTF8_Blended(asset->font, str.data(), { 255, 255, 255, 255 })); } void SetText(const std::string str) { this->str = str; Render(); } };
#pragma once #include "Sprite.h" #include "FontAsset.h" class Text : public Sprite { private: std::shared_ptr<FontAsset> asset; std::string str; public: Text(std::shared_ptr<FontAsset> asset, const std::string str, const Point2 pos = Point2(0), const Origin origin = Origin::BottomLeft, const Point4 color = Point4(1), const Point2 scale = Point2(-1)) : asset(asset), str(str), Sprite(pos, origin, color, scale) {} void RenderMe() override final { // we render the outline first to make a drop-shadow effect SDL(TTF_SetFontOutline(asset->font, 2)); SDL(surface = TTF_RenderUTF8_Blended(asset->font, str.data(), { 0, 0, 0, 255 })); // then we render the foreground and blit it on top of the outline SDL(TTF_SetFontOutline(asset->font, 0)); SDL_Surface *fg; SDL(fg = TTF_RenderUTF8_Blended(asset->font, str.data(), { 255, 255, 255, 255 })); SDL(SDL_BlitSurface(fg, NULL, surface, NULL)); SDL(SDL_FreeSurface(fg)); } void SetText(const std::string str) { this->str = str; Render(); } };
Add black drop-shadow outline to text
Add black drop-shadow outline to text
C
mpl-2.0
shockkolate/polar4,shockkolate/polar4,polar-engine/polar,shockkolate/polar4,polar-engine/polar,shockkolate/polar4
afa6a8d6434f31dc87242e42e2875f2efd4f9000
firmware/main/Wifi.h
firmware/main/Wifi.h
/* * Wifi.h * * Copyright (C) 2018 [ A Legge Up ] * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ #ifndef MAIN_WIFI_H_ #define MAIN_WIFI_H_ #include "esp_err.h" #include "esp_wifi.h" class Wifi { public: Wifi(); virtual ~Wifi(); esp_err_t eventHandler(void *ctx, system_event_t *event); }; #endif /* MAIN_WIFI_H_ */
/* * Wifi.h * * Copyright (C) 2018 [ A Legge Up ] * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ #ifndef MAIN_WIFI_H_ #define MAIN_WIFI_H_ #include "esp_err.h" #include "esp_wifi.h" class Wifi { public: Wifi(); virtual ~Wifi(); static esp_err_t eventHandler(void *ctx, system_event_t *event); }; #endif /* MAIN_WIFI_H_ */
Change eventHandler to static member
Change eventHandler to static member
C
mit
ALeggeUp/confagrid,ALeggeUp/confagrid,ALeggeUp/confagrid,ALeggeUp/confagrid,ALeggeUp/confagrid
7e56885dbd46d1eb53d2082e906a6e2e2d7972af
src/lcthw/list_algos.h
src/lcthw/list_algos.h
#ifndef lcthw_List_algos_h #define lcthw_List_algos_h #include <lcthw/list.h> typedef int (*List_compare)(void *a, void *b); int List_bubble_sort(List *list, List_compare cmp); List *List_merge_sort(List *list, List_compare cmp); #endif
#ifndef lcthw_List_algos_h #define lcthw_List_algos_h #include <lcthw/list.h> typedef int (*List_compare)(const void *a, const void *b); int List_bubble_sort(List *list, List_compare cmp); List *List_merge_sort(List *list, List_compare cmp); #endif
Make the compare const void.
Make the compare const void.
C
bsd-3-clause
HappyYang/liblcthw,HappyYang/liblcthw,HappyYang/liblcthw
a86329164a7d3c82cf04d1f3443b00e1fc6347e5
rt/cgen/cowgol-cgen.h
rt/cgen/cowgol-cgen.h
#ifndef COWGOL_CGEN_H #define COWGOL_CGEN_H #include <stdlib.h> #include <stdio.h> #include <stdint.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> typedef uint8_t i1; typedef uint16_t i2; typedef uint32_t i4; typedef uint64_t i8; typedef int8_t s1; typedef int16_t s2; typedef int32_t s4; typedef int64_t s8; extern i8* __top; extern i8* __himem; extern i8* global_argv; typedef union data data; union data { i8 i8; i4 i4[2]; void* ptr; }; #endif
#ifndef COWGOL_CGEN_H #define COWGOL_CGEN_H #include <stdlib.h> #include <stdio.h> #include <stdint.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> #include <endian.h> #if BYTE_ORDER == BIG_ENDIAN #error "Sorry, cowgol cgen doesn't work on big endian machines yet." #endif typedef uint8_t i1; typedef uint16_t i2; typedef uint32_t i4; typedef uint64_t i8; typedef int8_t s1; typedef int16_t s2; typedef int32_t s4; typedef int64_t s8; extern i8* __top; extern i8* __himem; extern i8* global_argv; typedef union data data; union data { i8 i8; i4 i4[2]; void* ptr; }; #endif
Annotate that we don't work on big-endian systems yet..
Annotate that we don't work on big-endian systems yet..
C
bsd-2-clause
davidgiven/cowgol,davidgiven/cowgol
d9bcea381a69ebc6367aede7816b8e27d5fc9417
include/extensions.h
include/extensions.h
#ifndef _SWAY_EXTENSIONS_H #define _SWAY_EXTENSIONS_H #include <wayland-server.h> #include <wlc/wlc-wayland.h> #include "wayland-desktop-shell-server-protocol.h" #include "list.h" struct background_config { wlc_handle output; wlc_resource surface; // we need the wl_resource of the surface in the destructor struct wl_resource *wl_surface_res; // used to determine if client is a background struct wl_client *client; }; struct panel_config { // wayland resource used in callbacks, is used to track this panel struct wl_resource *wl_resource; wlc_handle output; wlc_resource surface; // we need the wl_resource of the surface in the destructor struct wl_resource *wl_surface_res; enum desktop_shell_panel_position panel_position; // used to determine if client is a panel struct wl_client *client; }; struct desktop_shell_state { list_t *backgrounds; list_t *panels; list_t *lock_surfaces; bool is_locked; }; struct swaylock_state { bool active; wlc_handle output; wlc_resource surface; }; extern struct desktop_shell_state desktop_shell; void register_extensions(void); #endif
#ifndef _SWAY_EXTENSIONS_H #define _SWAY_EXTENSIONS_H #include <wayland-server.h> #include <wlc/wlc-wayland.h> #include "wayland-desktop-shell-server-protocol.h" #include "list.h" struct background_config { wlc_handle output; wlc_resource surface; // we need the wl_resource of the surface in the destructor struct wl_resource *wl_surface_res; // used to determine if client is a background struct wl_client *client; }; struct panel_config { // wayland resource used in callbacks, is used to track this panel struct wl_resource *wl_resource; wlc_handle output; wlc_resource surface; // we need the wl_resource of the surface in the destructor struct wl_resource *wl_surface_res; enum desktop_shell_panel_position panel_position; // used to determine if client is a panel struct wl_client *client; }; struct desktop_shell_state { list_t *backgrounds; list_t *panels; list_t *lock_surfaces; bool is_locked; }; struct swaylock_state { bool active; wlc_handle output; wlc_resource surface; }; extern struct desktop_shell_state desktop_shell; void register_extensions(void); #endif
Fix formatting guide violations (spaces instead of tabs)
Fix formatting guide violations (spaces instead of tabs)
C
mit
1ace/sway,sleep-walker/sway,mikkeloscar/sway,taiyu-len/sway,1ace/sway,ascent12/sway,ascent12/sway,4e554c4c/sway,ascent12/sway,mikkeloscar/sway,sleep-walker/sway,johalun/sway,SirCmpwn/sway,4e554c4c/sway,ptMuta/sway,1ace/sway,taiyu-len/sway,taiyu-len/sway
5651bcff404d3c6352c22f1bdc9f959a8c5efdb7
include/sys/select.h
include/sys/select.h
/* * Copyright (C) 2014, Galois, Inc. * This sotware is distributed under a standard, three-clause BSD license. * Please see the file LICENSE, distributed with this software, for specific * terms and conditions. */ #ifndef MINLIBC_SYS_SELECT_H #define MINLIBC_SYS_SELECT_H #include <time.h> typedef struct {} fd_set; int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); #define FD_SET(x,y) /* */ #define FD_ZERO(x) /* */ #endif
/* * Copyright (C) 2014, Galois, Inc. * This sotware is distributed under a standard, three-clause BSD license. * Please see the file LICENSE, distributed with this software, for specific * terms and conditions. */ #ifndef MINLIBC_SYS_SELECT_H #define MINLIBC_SYS_SELECT_H #include <time.h> typedef struct {} fd_set; int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); #define FD_SET(x,y) /* */ #define FD_ZERO(x) /* */ #define FD_SETSIZE 1024 #endif
Add a definition for FD_SETSIZE.
Add a definition for FD_SETSIZE.
C
bsd-3-clause
GaloisInc/minlibc,GaloisInc/minlibc
7a9c7c2303dcd388acfc7467473f3cdc0facbd91
test/CodeGen/bool-convert.c
test/CodeGen/bool-convert.c
// RUN: %clang_cc1 -emit-llvm < %s | grep i1 | count 1 // All of these should uses the memory representation of _Bool struct teststruct1 {_Bool a, b;} test1; _Bool* test2; _Bool test3[10]; _Bool (*test4)[]; void f(int x) { _Bool test5; _Bool test6[x]; }
// RUN: %clang_cc1 -triple i686-pc-linux -emit-llvm < %s | FileCheck %s // All of these should uses the memory representation of _Bool // CHECK-LABEL: %struct.teststruct1 = type { i8, i8 } // CHECK-LABEL: @test1 = common global %struct.teststruct1 struct teststruct1 {_Bool a, b;} test1; // CHECK-LABEL: @test2 = common global i8* null _Bool* test2; // CHECK-LABEL: @test3 = common global [10 x i8] _Bool test3[10]; // CHECK-LABEL: @test4 = common global [0 x i8]* null _Bool (*test4)[]; // CHECK-LABEL: define void @f(i32 %x) void f(int x) { // CHECK: alloca i8, align 1 _Bool test5; // CHECK: alloca i8, i32 %{{.*}}, align 1 _Bool test6[x]; }
Convert test to FileCheck and make it more strict.
Convert test to FileCheck and make it more strict. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@197248 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
404a921b9e5499eea8bc1bd5e77ce4bf572935db
kernel/port/include/kernel/port/bitwhack.h
kernel/port/include/kernel/port/bitwhack.h
#ifndef KERNEL_PORT_BITWHACK_H #define KERNEL_PORT_BITWHACK_H /* Helpers for bitwhacking. */ /** * Macros for constructing bit masks. * * When bitwise-anded with another value: * * MASK_LO(n) masks out the lowest n bits. * MASK_HI(n) masks out all but the lowest n bits. * MASK_RANGE(lo, hi) masks out all of the bits on the interval [lo, hi] * (inclusive). * * The KEEP_* macros produce masks that are the inverse of their MASK_* * counterparts. */ #define MASK_LO(bits) ((-1)<<(bits)) #define KEEP_LO(bits) (~MASK_LO(bits)) #define MASK_HI(bits) KEEP_LO(bits) #define KEEP_HI(bits) MASK_LO(bits) #define KEEP_RANGE(lo, hi) (MASK_LO(lo) & MASK_HI(hi)) #define MASK_RANGE(lo, hi) (~KEEP_RANGE(lo, hi)) #endif
#ifndef KERNEL_PORT_BITWHACK_H #define KERNEL_PORT_BITWHACK_H /* Helpers for bitwhacking. */ /** * Macros for constructing bit masks. * * When bitwise-anded with another value: * * MASK_LO(n) masks out the lowest n bits. * MASK_HI(n) masks out all but the lowest n bits. * MASK_RANGE(lo, hi) masks out all of the bits on the interval [lo, hi] * (inclusive). * * The KEEP_* macros produce masks that are the inverse of their MASK_* * counterparts. */ #define MASK_LO(bits) ((~0u)<<(bits)) #define KEEP_LO(bits) (~MASK_LO(bits)) #define MASK_HI(bits) KEEP_LO(bits) #define KEEP_HI(bits) MASK_LO(bits) #define KEEP_RANGE(lo, hi) (MASK_LO(lo) & MASK_HI(hi)) #define MASK_RANGE(lo, hi) (~KEEP_RANGE(lo, hi)) #endif
Fix warning re: signed shift
Fix warning re: signed shift Clang complained that shifting a negative number is UB. So we make sure the constant is unsigned.
C
isc
zenhack/zero,zenhack/zero,zenhack/zero
852c5cd346c86778e7c37905f32887e179389a53
UIforETW/Version.h
UIforETW/Version.h
#pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. const float kCurrentVersion = 1.32f;
#pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. const float kCurrentVersion = 1.40f;
Increment version number from 1.32 to 1.40
Increment version number from 1.32 to 1.40 The code that checked for new versions was discarding the last digit of the version numbers that it read from the releases web page. This means that it wouldn't notice new versions until the 0.1 column changes. So I'm changing it. Apologies for the hack. The version checking code has been fixed so incrementing the 0.01 column will be sufficient next time.
C
apache-2.0
google/UIforETW,google/UIforETW,MikeMarcin/UIforETW,MikeMarcin/UIforETW,MikeMarcin/UIforETW,mwinterb/UIforETW,ariccio/UIforETW,google/UIforETW,mwinterb/UIforETW,ariccio/UIforETW,ariccio/UIforETW,google/UIforETW,ariccio/UIforETW,mwinterb/UIforETW
8696d1a75abab568a0d5089f39fdafb2e447bd17
tree/treeplayer/inc/DataFrameLinkDef.h
tree/treeplayer/inc/DataFrameLinkDef.h
/************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifdef __ROOTCLING__ // All these are there for the autoloading #pragma link C++ class ROOT::Experimental::TDataFrame-; #pragma link C++ class ROOT::Experimental::TDataFrameInterface<ROOT::Detail::TDataFrameFilterBase>-; #pragma link C++ class ROOT::Experimental::TDataFrameInterface<ROOT::Detail::TDataFrameBranchBase>-; #endif
/************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifdef __ROOTCLING__ // All these are there for the autoloading #pragma link C++ class ROOT::Experimental::TDataFrame-; #pragma link C++ class ROOT::Experimental::TDataFrameInterface<ROOT::Detail::TDataFrameFilterBase>-; #pragma link C++ class ROOT::Experimental::TDataFrameInterface<ROOT::Detail::TDataFrameBranchBase>-; #pragma link C++ class ROOT::Detail::TDataFrameImpl-; #endif
Add another autoload key for TDataFrameImpl'
[TDF] Add another autoload key for TDataFrameImpl'
C
lgpl-2.1
gganis/root,gganis/root,gganis/root,gganis/root,gganis/root,gganis/root,gganis/root,gganis/root,gganis/root,gganis/root,gganis/root
e2133c86896b2728ea97a9028b97a65cdb695973
test/Analysis/stats.c
test/Analysis/stats.c
// RUN: %clang_cc1 -analyze -analyzer-stats %s 2> FileCheck void foo() { ; } // CHECK: ... Statistics Collected ...
// RUN: %clang_cc1 -analyze -analyzer-stats %s 2>&1 | FileCheck %s // XFAIL: * void foo() { ; } // CHECK: ... Statistics Collected ...
Fix a test case that was added in r151570. The redirect of output was broken so no testing was actually done. Further, the commands produce no output. The redirection has been fixed and the test has been disabled.
Fix a test case that was added in r151570. The redirect of output was broken so no testing was actually done. Further, the commands produce no output. The redirection has been fixed and the test has been disabled. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@151591 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
f99cb2aca6b5d3999e4d6015ca9731e7041c0eba
libyaul/scu/bus/b/vdp2/vdp2_scrn_reduction_set.c
libyaul/scu/bus/b/vdp2/vdp2_scrn_reduction_set.c
/* * Copyright (c) 2012-2016 Israel Jacquez * See LICENSE for details. * * Israel Jacquez <mrkotfw@gmail.com> */ #include <vdp2/scrn.h> #include <assert.h> #include "vdp2-internal.h" void vdp2_scrn_reduction_set(uint8_t scrn, uint16_t horz_reduction) { #ifdef DEBUG /* Check if the background passed is valid */ assert((scrn == SCRN_NBG0) || (scrn == SCRN_NBG1)); assert((horz_reduction == SCRN_REDUCTION_NONE) || (horz_reduction == SCRN_REDUCTION_HALF) || (horz_reduction == SCRN_REDUCTION_QUARTER)); #endif /* DEBUG */ switch (scrn) { case SCRN_NBG0: vdp2_state.buffered_regs.zmctl &= 0xFFFC; vdp2_state.buffered_regs.zmctl |= horz_reduction; break; case SCRN_NBG1: vdp2_state.buffered_regs.zmctl &= 0xFCFF; vdp2_state.buffered_regs.zmctl |= horz_reduction << 8; break; default: return; } /* Write to memory */ MEMORY_WRITE(16, VDP2(MZCTL), vdp2_state.buffered_regs.zmctl); }
/* * Copyright (c) 2012-2016 Israel Jacquez * See LICENSE for details. * * Israel Jacquez <mrkotfw@gmail.com> */ #include <vdp2/scrn.h> #include <assert.h> #include "vdp2-internal.h" void vdp2_scrn_reduction_set(uint8_t scrn, uint16_t horz_reduction) { #ifdef DEBUG /* Check if the background passed is valid */ assert((scrn == SCRN_NBG0) || (scrn == SCRN_NBG1)); assert((horz_reduction == SCRN_REDUCTION_NONE) || (horz_reduction == SCRN_REDUCTION_HALF) || (horz_reduction == SCRN_REDUCTION_QUARTER)); #endif /* DEBUG */ switch (scrn) { case SCRN_NBG0: vdp2_state.buffered_regs.zmctl &= 0xFFFC; vdp2_state.buffered_regs.zmctl |= horz_reduction; break; case SCRN_NBG1: vdp2_state.buffered_regs.zmctl &= 0xFCFF; vdp2_state.buffered_regs.zmctl |= horz_reduction << 8; break; default: return; } /* Write to memory */ MEMORY_WRITE(16, VDP2(ZMCTL), vdp2_state.buffered_regs.zmctl); }
Fix writing to wrong register
Fix writing to wrong register
C
mit
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
11f88734c26a6b477c9715720aac5af8b455a605
SSPSolution/SSPSolution/LevelDirector.h
SSPSolution/SSPSolution/LevelDirector.h
#ifndef SSPAPPLICATION_AI_LEVELDIRECTOR_H #define SSPAPPLICATION_AI_LEVELDIRECTOR_H #include "Observer.h" #include <vector> class LevelDirector { private: // Variables /* TEMP STATE STRUCTURE */ static enum State { NONE = 0, START, DEFAULT, GOAL }; State m_currentState; State m_defaultState; //State m_goalState;// A state which is the current goal for the FSM // Change State to State* after temp structure is removed std::vector<State> m_states; public: LevelDirector(); ~LevelDirector(); int Shutdown(); int Initialize(); int Update(float deltaTime); int React(int entityID, EVENT event); private: // Helper functions void AddState(State newState); void SetDefaultState(State state); bool ChangeState(State state); }; #endif
#ifndef SSPAPPLICATION_AI_LEVELDIRECTOR_H #define SSPAPPLICATION_AI_LEVELDIRECTOR_H #include "Observer.h" #include <vector> //#define NUMSTATES 3 namespace FSMEnvironment { #pragma region temp enum Hint { NONE = 0, EXAMPLE }; struct State { int stateID = -1; int timeDelay = -1; Hint hint = Hint::NONE; int CheckTransitions(); void Enter(); void Exit(); void Update(float deltaTime); }; #pragma endregion class LevelDirector { private: // Variables State* m_currentState; State* m_defaultState; State* m_goalState; // A state which is the current goal for the FSM int m_goalID; std::vector<State> m_states; public: LevelDirector(); ~LevelDirector(); int Shutdown(); int Initialize(); int Update(float deltaTime); int React(int entityID, EVENT event); private: // Helper functions // TODO: // Depending on what kind of array/vector we end up with to hold our states // the argument list should be updated accordingly void AddState(State* newState); void SetDefaultState(State* state); bool ChangeState(int state); }; } #endif
FIX cleaned up header file to resemble FSM environment
FIX cleaned up header file to resemble FSM environment
C
apache-2.0
Chringo/SSP,Chringo/SSP
27326b71197a4f73e422f388d5aa3d1b3ea24bac
util/eprintf.c
util/eprintf.c
/* See LICENSE file for copyright and license details. */ #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "../util.h" static void venprintf(int, const char *, va_list); void eprintf(const char *fmt, ...) { va_list ap; va_start(ap, fmt); venprintf(EXIT_FAILURE, fmt, ap); va_end(ap); } void enprintf(int status, const char *fmt, ...) { va_list ap; va_start(ap, fmt); venprintf(status, fmt, ap); va_end(ap); } void venprintf(int status, const char *fmt, va_list ap) { vfprintf(stderr, fmt, ap); if(fmt[0] && fmt[strlen(fmt)-1] == ':') { fputc(' ', stderr); perror(NULL); } exit(status); } void weprintf(const char *fmt, ...) { va_list ap; va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); if (fmt[0] && fmt[strlen(fmt)-1] == ':') { fputc(' ', stderr); perror(NULL); } }
/* See LICENSE file for copyright and license details. */ #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "../util.h" static void venprintf(int, const char *, va_list); void eprintf(const char *fmt, ...) { va_list ap; va_start(ap, fmt); venprintf(EXIT_FAILURE, fmt, ap); va_end(ap); } void enprintf(int status, const char *fmt, ...) { va_list ap; va_start(ap, fmt); venprintf(status, fmt, ap); va_end(ap); } static void venprintf(int status, const char *fmt, va_list ap) { vfprintf(stderr, fmt, ap); if(fmt[0] && fmt[strlen(fmt)-1] == ':') { fputc(' ', stderr); perror(NULL); } exit(status); } void weprintf(const char *fmt, ...) { va_list ap; va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); if (fmt[0] && fmt[strlen(fmt)-1] == ':') { fputc(' ', stderr); perror(NULL); } }
Mark venprintf() as static explicitly, not just in the decl
Mark venprintf() as static explicitly, not just in the decl
C
mit
ScoreUnder/fjinit,gdm85/sinit,henrysher/sinit
48f856a79a74748d1b2432ebab0b24e46bf082a8
utility/utility_toolkit.h
utility/utility_toolkit.h
#ifdef OS_WINDOWS #endif #ifdef LINUX #define SWAP(valX,valY) \ { \ typeof (valX) valZ; \ valZ = valX; \ valX = valY; \ valY = valZ; \ } #endif /*Swap 2 integer number by xor method*/ void swap2int(int *,int *); char *decimal_to_binary(size_t); /*Inverse number like 1136 -> 6311*/ int inverse_number(int); char * base64_decoder(const char *); char * base64_encoder(const char *); char * url_decoder(const char *); char * url_encoder(const char *); /*ASCII values convert HEX values*/ char *ascii2hex(const char *,size_t); /*HEX values convert ASCII values*/ char *hex2ascii(const char *,size_t);
#ifdef OS_WINDOWS #endif #ifdef LINUX #define SWAP(valX,valY) \ { \ typeof (valX) valZ; \ valZ = valX; \ valX = valY; \ valY = valZ; \ } #endif /*Swap 2 integer number by xor method*/ void swap2int(int *,int *); char *decimal_to_binary(size_t); /*Inverse number like 1136 -> 6311*/ int inverse_number(int); char * base64_decoder(const char *); char * base64_encoder(const char *); char * url_decoder(const char *); char * url_encoder(const char *); /*ASCII values convert HEX values*/ char *ascii2hex(const char *,size_t); /*HEX values convert ASCII values*/ char *hex2ascii(const char *,size_t); const int is_little_endian_ival = 1; #define is_little_endian() ( ( *((char*) &is_little_endian_ival) ) == 1 )
Check system is big endian or little endian function added
Check system is big endian or little endian function added Check system is big endian or little endian?
C
apache-2.0
straceX/cprogrammingtoolkit
6a40a8ac4ceeef60737c6872877249477cdb5421
Pod/Classes/Constants.h
Pod/Classes/Constants.h
// // Constants.h // Pods // // Created by Danil Tulin on 1/30/16. // // @import Foundation; #ifndef Constants_h #define Constants_h const static NSString *defaultPrimaryColor = @"1A1A1C"; const static NSString *darkPrimaryColor = @"121315"; const static NSInteger bottomToolbarHeight = 50; const static CGFloat defaultAnimationDuration = .3f; const static NSInteger predscriptionViewCornerViewOffset = 25; #endif /* Constants_h */
// // Constants.h // Pods // // Created by Danil Tulin on 1/30/16. // // @import Foundation; #ifndef Constants_h #define Constants_h const static NSString *defaultPrimaryColor = @"1A1A1C"; const static NSString *darkPrimaryColor = @"121315"; const static NSInteger bottomToolbarHeight = 50; const static CGFloat defaultAnimationDuration = .3f; const static NSInteger predscriptionViewCornerViewOffset = 25; const static CGSize SERoundButtonsContainerOffset = {25, 20}; #endif /* Constants_h */
Add new constant for button
Add new constant for button
C
mit
tulindanil/SEUIKit
338133a98d34607b9b6ada6065b72c8c7d9f8790
CefSharp.Core/Internals/CefCallbackWrapper.h
CefSharp.Core/Internals/CefCallbackWrapper.h
// Copyright 2010-2015 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #pragma once #include "Stdafx.h" #include "include\cef_callback.h" namespace CefSharp { public ref class CefCallbackWrapper : public ICallback { private: MCefRefPtr<CefCallback> _callback; public: CefCallbackWrapper(CefRefPtr<CefCallback> &callback) : _callback(callback) { } !CefCallbackWrapper() { _callback = NULL; } ~CefCallbackWrapper() { this->!CefCallbackWrapper(); } virtual void Cancel() { if (_callback.get() == nullptr) { return; } _callback->Cancel(); delete this; } virtual void Continue() { if (_callback.get() == nullptr) { return; } _callback->Continue(); delete this; } }; }
// Copyright 2010-2015 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #pragma once #include "Stdafx.h" #include "include\cef_callback.h" namespace CefSharp { public ref class CefCallbackWrapper : public ICallback { private: MCefRefPtr<CefCallback> _callback; public: CefCallbackWrapper(CefRefPtr<CefCallback> &callback) : _callback(callback) { } !CefCallbackWrapper() { _callback = NULL; } ~CefCallbackWrapper() { this->!CefCallbackWrapper(); } virtual void Cancel() { if (_callback.get()) { _callback->Cancel(); delete this; } } virtual void Continue() { if (_callback.get()) { _callback->Continue(); delete this; } } }; }
Change 'if' style for null _callback check
Change 'if' style for null _callback check
C
bsd-3-clause
battewr/CefSharp,Haraguroicha/CefSharp,gregmartinhtc/CefSharp,rlmcneary2/CefSharp,battewr/CefSharp,joshvera/CefSharp,ruisebastiao/CefSharp,dga711/CefSharp,yoder/CefSharp,zhangjingpu/CefSharp,ITGlobal/CefSharp,Haraguroicha/CefSharp,illfang/CefSharp,gregmartinhtc/CefSharp,Livit/CefSharp,AJDev77/CefSharp,NumbersInternational/CefSharp,jamespearce2006/CefSharp,ITGlobal/CefSharp,haozhouxu/CefSharp,VioletLife/CefSharp,NumbersInternational/CefSharp,windygu/CefSharp,yoder/CefSharp,battewr/CefSharp,Livit/CefSharp,windygu/CefSharp,rlmcneary2/CefSharp,wangzheng888520/CefSharp,joshvera/CefSharp,rlmcneary2/CefSharp,NumbersInternational/CefSharp,illfang/CefSharp,dga711/CefSharp,ruisebastiao/CefSharp,NumbersInternational/CefSharp,joshvera/CefSharp,ITGlobal/CefSharp,wangzheng888520/CefSharp,illfang/CefSharp,AJDev77/CefSharp,ITGlobal/CefSharp,yoder/CefSharp,zhangjingpu/CefSharp,rlmcneary2/CefSharp,VioletLife/CefSharp,jamespearce2006/CefSharp,VioletLife/CefSharp,jamespearce2006/CefSharp,illfang/CefSharp,haozhouxu/CefSharp,jamespearce2006/CefSharp,Livit/CefSharp,jamespearce2006/CefSharp,zhangjingpu/CefSharp,haozhouxu/CefSharp,wangzheng888520/CefSharp,battewr/CefSharp,dga711/CefSharp,Haraguroicha/CefSharp,twxstar/CefSharp,twxstar/CefSharp,AJDev77/CefSharp,windygu/CefSharp,joshvera/CefSharp,haozhouxu/CefSharp,yoder/CefSharp,zhangjingpu/CefSharp,Livit/CefSharp,gregmartinhtc/CefSharp,Haraguroicha/CefSharp,Haraguroicha/CefSharp,dga711/CefSharp,twxstar/CefSharp,AJDev77/CefSharp,ruisebastiao/CefSharp,twxstar/CefSharp,windygu/CefSharp,wangzheng888520/CefSharp,gregmartinhtc/CefSharp,ruisebastiao/CefSharp,VioletLife/CefSharp
de4c5acd59de654cd1b16cf74ae94f1bd128652a
src/config.h
src/config.h
/* * Copyright 2013 Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef SRC_CONFIG_H #define SRC_CONFIG_H 1 #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <assert.h> #ifdef _WIN32 #include <windows.h> typedef unsigned __int8 cbsasl_uint8_t; typedef unsigned __int16 cbsasl_uint16_t; typedef unsigned __int32 cbsasl_uint32_t; #else #include <unistd.h> #include <stdint.h> typedef uint8_t cbsasl_uint8_t; typedef uint16_t cbsasl_uint16_t; typedef uint32_t cbsasl_uint32_t; #endif #endif /* SRC_CONFIG_H */
/* * Copyright 2013 Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef SRC_CONFIG_H #define SRC_CONFIG_H 1 #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <assert.h> #include <platform/platform.h> typedef uint8_t cbsasl_uint8_t; typedef uint16_t cbsasl_uint16_t; typedef uint32_t cbsasl_uint32_t; #endif /* SRC_CONFIG_H */
Include platform.h instead of ifdef'ing
Include platform.h instead of ifdef'ing Change-Id: I23b3202563623b46d94c10459837581be231f58e Reviewed-on: http://review.couchbase.org/30386 Reviewed-by: Michael Wiederhold <a17fed27eaa842282862ff7c1b9c8395a26ac320@couchbase.com> Tested-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
C
apache-2.0
couchbase/cbsasl
86358c5e3310867aa65027e3407d9e0b090181aa
arch/hppa/include/spinlock.h
arch/hppa/include/spinlock.h
/* $OpenBSD: spinlock.h,v 1.1 1999/01/08 08:25:34 d Exp $ */ #ifndef _MACHINE_SPINLOCK_H_ #define _MACHINE_SPINLOCK_H_ #define _SPINLOCK_UNLOCKED (1) #define _SPINLOCK_LOCKED (0) typedef int _spinlock_lock_t; #endif
/* $OpenBSD: spinlock.h,v 1.2 2005/12/19 21:30:10 marco Exp $ */ #ifndef _MACHINE_SPINLOCK_H_ #define _MACHINE_SPINLOCK_H_ #define _SPINLOCK_UNLOCKED (1) #define _SPINLOCK_LOCKED (0) typedef int _spinlock_lock_t __attribute__((__aligned__(16))); #endif
Fix hppa ldcw alignment issue.
Fix hppa ldcw alignment issue. Help deraadt, tedu, kettenis Ok tedu, kettenis
C
isc
orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars
af79d59c5288bd633834dd5bb1e67f9c7470b736
src/imap/cmd-close.c
src/imap/cmd-close.c
/* 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 (!client_verify_open_mailbox(cmd)) return TRUE; storage = mailbox_get_storage(mailbox); client->mailbox = NULL; if (!imap_expunge(mailbox, NULL)) client_send_untagged_storage_error(client, storage); if (mailbox_close(&mailbox) < 0) client_send_untagged_storage_error(client, storage); client_update_mailbox_flags(client, NULL); client_send_tagline(cmd, "OK Close completed."); return TRUE; }
/* 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 (!client_verify_open_mailbox(cmd)) return TRUE; storage = mailbox_get_storage(mailbox); client->mailbox = NULL; 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(client, storage); client_update_mailbox_flags(client, NULL); client_send_tagline(cmd, "OK Close completed."); return TRUE; }
Synchronize the mailbox after expunging messages to actually get them expunged.
CLOSE: Synchronize the mailbox after expunging messages to actually get them expunged.
C
mit
damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot
6f2ec515d9a2c56b0cea14172bf5691c068c0c65
test/CodeGen/2007-06-15-AnnotateAttribute.c
test/CodeGen/2007-06-15-AnnotateAttribute.c
// RUN: %clang_cc1 -emit-llvm %s -o - | grep llvm.global.annotations // RUN: %clang_cc1 -emit-llvm %s -o - | grep llvm.var.annotation | count 3 #include <stdio.h> /* Global variable with attribute */ int X __attribute__((annotate("GlobalValAnnotation"))); /* Function with attribute */ int foo(int y) __attribute__((annotate("GlobalValAnnotation"))) __attribute__((noinline)); int foo(int y __attribute__((annotate("LocalValAnnotation")))) { int x __attribute__((annotate("LocalValAnnotation"))); x = 34; return y + x; } int main() { static int a __attribute__((annotate("GlobalValAnnotation"))); a = foo(2); printf("hello world%d\n", a); return 0; }
// RUN: %clang_cc1 -emit-llvm %s -o - | grep llvm.global.annotations // RUN: %clang_cc1 -emit-llvm %s -o - | grep llvm.var.annotation | count 3 /* Global variable with attribute */ int X __attribute__((annotate("GlobalValAnnotation"))); /* Function with attribute */ int foo(int y) __attribute__((annotate("GlobalValAnnotation"))) __attribute__((noinline)); int foo(int y __attribute__((annotate("LocalValAnnotation")))) { int x __attribute__((annotate("LocalValAnnotation"))); x = 34; return y + x; } int main() { static int a __attribute__((annotate("GlobalValAnnotation"))); a = foo(2); return 0; }
Make this test portable on Win32.
Make this test portable on Win32. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@139464 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/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,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
554f657af8c33be01a0300518bc313fa13e46d34
src/rx5808-pro-diversity/pstr_helper.h
src/rx5808-pro-diversity/pstr_helper.h
#ifndef PSTR_HELPER_H #define PSTR_HELPER_H #include <avr/pgmspace.h> // Modified PSTR that pushes string into a char* buffer for easy use. // // There is only one buffer so this will cause problems if you need to pass two // strings to one function. #define PSTR2(x) PSTRtoBuffer_P(PSTR(x)) #define PSTR2_BUFFER_SIZE 32 // May need adjusted depending on your needs. char *PSTRtoBuffer_P(PGM_P str); #endif
#ifndef PSTR_HELPER_H #define PSTR_HELPER_H #include <avr/pgmspace.h> // Modified PSTR that pushes string into a char* buffer for easy use. // // There is only one buffer so this will cause problems if you need to pass two // strings to one function. #define PSTR2(x) PSTRtoBuffer_P(PSTR(x)) #define PSTR2_BUFFER_SIZE 48 // May need adjusted depending on your needs. char *PSTRtoBuffer_P(PGM_P str); #endif
Increase PSTR2 buffer (fix broken calibration)
Increase PSTR2 buffer (fix broken calibration) - No idea how this didn't cause problems before. Luck?
C
mit
sheaivey/rx5808-pro-diversity,sheaivey/rx5808-pro-diversity,RCDaddy/rx5808-pro-diversity,RCDaddy/rx5808-pro-diversity
d39a5652fcf904abc26ef2d7165df6d9ecfc68d8
chapter5/Game.h
chapter5/Game.h
#ifndef __GAME__ #define __GAME__ #include<vector> #include<SDL2/SDL.h> #include"GameObject.h" #include"GameStateMachine.h" class Game { public: static Game *getInstance() { if (!instance) { instance = new Game(); } return instance; } bool init(const char *title, int xPosition, int yPosition, int height, int width, bool fullScreen); void render(); void update(); void handleEvents(); void clean(); bool isRunning() { return running; } SDL_Renderer *getRenderer() const { return renderer; } private: static Game *instance; bool running; SDL_Window *window; SDL_Renderer *renderer; GameStateMachine *gameStateMachine; std::vector<GameObject*> gameObjects; Game() {} ~Game() {} }; typedef Game TheGame; #endif
#ifndef __GAME__ #define __GAME__ #include<vector> #include<SDL2/SDL.h> #include"GameObject.h" #include"GameStateMachine.h" class Game { public: static Game *getInstance() { if (!instance) { instance = new Game(); } return instance; } bool init(const char *title, int xPosition, int yPosition, int height, int width, bool fullScreen); void render(); void update(); void handleEvents(); void clean(); bool isRunning() { return running; } SDL_Renderer *getRenderer() const { return renderer; } GameStateMachine* getStateMachine() { return gameStateMachine; } private: static Game *instance; bool running; SDL_Window *window; SDL_Renderer *renderer; GameStateMachine *gameStateMachine; std::vector<GameObject*> gameObjects; Game() {} ~Game() {} }; typedef Game TheGame; #endif
Include method to return pointer to object gameStateMachine
Include method to return pointer to object gameStateMachine
C
bsd-2-clause
caiotava/SDLBook
9bf27e459fa470bccd07d64ee3e6aad9b49847f4
wangle/concurrent/NamedThreadFactory.h
wangle/concurrent/NamedThreadFactory.h
/* * Copyright (c) 2017, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #pragma once #include <atomic> #include <string> #include <thread> #include <wangle/concurrent/ThreadFactory.h> #include <folly/Conv.h> #include <folly/Range.h> #include <folly/ThreadName.h> namespace wangle { class NamedThreadFactory : public ThreadFactory { public: explicit NamedThreadFactory(folly::StringPiece prefix) : prefix_(prefix.str()), suffix_(0) {} std::thread newThread(folly::Func&& func) override { auto thread = std::thread([&](folly::Func&& funct) { folly::setThreadName(folly::to<std::string>(prefix_, suffix_++)); funct(); }, std::move(func)); return thread; } void setNamePrefix(folly::StringPiece prefix) { prefix_ = prefix.str(); } std::string getNamePrefix() { return prefix_; } private: std::string prefix_; std::atomic<uint64_t> suffix_; }; } // namespace wangle
/* * Copyright (c) 2017, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #pragma once #include <atomic> #include <string> #include <thread> #include <wangle/concurrent/ThreadFactory.h> #include <folly/Conv.h> #include <folly/Range.h> #include <folly/ThreadName.h> namespace wangle { class NamedThreadFactory : public ThreadFactory { public: explicit NamedThreadFactory(folly::StringPiece prefix) : prefix_(prefix.str()), suffix_(0) {} std::thread newThread(folly::Func&& func) override { auto thread = std::thread(std::move(func)); folly::setThreadName( thread.native_handle(), folly::to<std::string>(prefix_, suffix_++)); return thread; } void setNamePrefix(folly::StringPiece prefix) { prefix_ = prefix.str(); } std::string getNamePrefix() { return prefix_; } private: std::string prefix_; std::atomic<uint64_t> suffix_; }; } // namespace wangle
Revert D5012627: [FBCode] Switch various calls to folly::setThreadName to set the current thread's name
Revert D5012627: [FBCode] Switch various calls to folly::setThreadName to set the current thread's name Summary: This reverts commit a4e6e2c2cb5bd02b1ebea85c305eac59355a7d42 Differential Revision: D5012627 fbshipit-source-id: ff4b8ff94d5f5e76f0777b96d03975d3f7834a17
C
apache-2.0
facebook/wangle,facebook/wangle,facebook/wangle
57462517acbc6ee2cd669e7b8d3cb014c7cd9d3e
ImageLoader/ImageLoader.h
ImageLoader/ImageLoader.h
// // ImageLoader.h // ImageLoader // // Created by Hirohisa Kawasaki on 10/16/14. // Copyright (c) 2014 Hirohisa Kawasaki. All rights reserved. // #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> FOUNDATION_EXPORT double ImageLoaderVersionNumber; FOUNDATION_EXPORT const unsigned char ImageLoaderVersionString[];
// // ImageLoader.h // ImageLoader // // Created by Hirohisa Kawasaki on 10/16/14. // Copyright (c) 2014 Hirohisa Kawasaki. All rights reserved. // #import <Foundation/Foundation.h> FOUNDATION_EXPORT double ImageLoaderVersionNumber; FOUNDATION_EXPORT const unsigned char ImageLoaderVersionString[];
Remove import `UIKit` from header file
Remove import `UIKit` from header file
C
mit
glustful/ImageLoaderSwift,iAladdin/ImageLoaderSwift,oenius/ImageLoaderSwift,ton-katsu/ImageLoaderSwift,hirohisa/ImageLoaderSwift,etataurov/ImageLoaderSwift,valentinmaxime/ImageLoaderSwift,etataurov/ImageLoaderSwift,valentinmaxime/ImageLoaderSwift,oenius/ImageLoaderSwift,ton-katsu/ImageLoaderSwift,hirohisa/ImageLoaderSwift,iAladdin/ImageLoaderSwift,glustful/ImageLoaderSwift
d369548192882edab7331975fcad885c4e8e38e7
base/mutex.h
base/mutex.h
// Copyright (c) 2010 Timur Iskhodzhanov. 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_MUTEX_H_ #define BASE_MUTEX_H_ #include <pthread.h> #include "base/common.h" namespace threading { class Mutex { public: Mutex(); ~Mutex(); void Lock(); /*! Attempts to lock the mutex. If the lock was obtained, this function returns true. If another thread has locked the mutex, this function returns false immediately. If the lock was obtained, the mutex must be unlocked with Unlock() before another thread can successfully lock it. */ bool TryLock(); void Unlock(); private: pthread_mutex_t mutex_; DISALLOW_COPY_AND_ASSIGN(Mutex) }; // A helper class that acquires the given Mutex while the MutexLock is in scope class MutexLock { public: explicit MutexLock(Mutex *m): mutex_(m) { CHECK(mutex_ != NULL); mutex_->Lock(); } ~MutexLock() { mutex_->Unlock(); } private: Mutex * const mutex_; DISALLOW_COPY_AND_ASSIGN(MutexLock) }; } // namespace threading #endif // BASE_MUTEX_H_
// Copyright (c) 2010 Timur Iskhodzhanov. 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_MUTEX_H_ #define BASE_MUTEX_H_ #include <pthread.h> #include "base/common.h" namespace threading { // OS-independent wrapper for mutex/critical section synchronization primitive. // This Mutex is NOT re-entrant! // // TODO(DimanNe): add DCHECKs for // * locking a Mutex twice from the same thread, // * unlocking a Mutex which is not locked, // * destroying a locked Mutex. class Mutex { public: Mutex(); ~Mutex(); void Lock(); /*! Attempts to lock the mutex. If the lock was obtained, this function returns true. If another thread has locked the mutex, this function returns false immediately. If the lock was obtained, the mutex must be unlocked with Unlock() before another thread can successfully lock it. */ bool TryLock(); void Unlock(); private: pthread_mutex_t mutex_; DISALLOW_COPY_AND_ASSIGN(Mutex) }; // A helper class that acquires the given Mutex while the MutexLock is in scope class MutexLock { public: explicit MutexLock(Mutex *m): mutex_(m) { CHECK(mutex_ != NULL); mutex_->Lock(); } ~MutexLock() { mutex_->Unlock(); } private: Mutex * const mutex_; DISALLOW_COPY_AND_ASSIGN(MutexLock) }; } // namespace threading #endif // BASE_MUTEX_H_
Add a comment with a 'TODO: add DCHECKS' for class Mutex
Add a comment with a 'TODO: add DCHECKS' for class Mutex
C
bsd-3-clause
denfromufa/mipt-course,denfromufa/mipt-course,denfromufa/mipt-course,denfromufa/mipt-course
f684a2d783bf2c4728e65f83e0f89ec654f40e79
crypto/ec/curve448/arch_64/arch_intrinsics.h
crypto/ec/curve448/arch_64/arch_intrinsics.h
/* * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. * Copyright 2016 Cryptography Research, Inc. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html * * Originally written by Mike Hamburg */ #ifndef OSSL_CRYPTO_EC_CURVE448_ARCH_64_INTRINSICS_H # define OSSL_CRYPTO_EC_CURVE448_ARCH_64_INTRINSICS_H # define ARCH_WORD_BITS 64 static ossl_inline uint64_t word_is_zero(uint64_t a) { /* let's hope the compiler isn't clever enough to optimize this. */ return (((__uint128_t) a) - 1) >> 64; } static ossl_inline uint128_t widemul(uint64_t a, uint64_t b) { return ((uint128_t) a) * b; } #endif /* OSSL_CRYPTO_EC_CURVE448_ARCH_64_INTRINSICS_H */
/* * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. * Copyright 2016 Cryptography Research, Inc. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html * * Originally written by Mike Hamburg */ #ifndef OSSL_CRYPTO_EC_CURVE448_ARCH_64_INTRINSICS_H # define OSSL_CRYPTO_EC_CURVE448_ARCH_64_INTRINSICS_H # include "internal/constant_time.h" # define ARCH_WORD_BITS 64 # define word_is_zero(a) constant_time_is_zero_64(a) static ossl_inline uint128_t widemul(uint64_t a, uint64_t b) { return ((uint128_t) a) * b; } #endif /* OSSL_CRYPTO_EC_CURVE448_ARCH_64_INTRINSICS_H */
Use constant time zero check function
curve448: Use constant time zero check function Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Tomas Mraz <2bc6038c3dfca09b2da23c8b6da8ba884dc2dcc2@openssl.org> Reviewed-by: Matt Caswell <1fa2ef4755a9226cb9a0a4840bd89b158ac71391@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14784)
C
apache-2.0
openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl
791cf1f256c1c33d14a7270c83650b5c1ebc44e0
Modules/getpath.c
Modules/getpath.c
#include "Python.h" #include "osdefs.h" #ifndef PYTHONPATH #define PYTHONPATH ".:/usr/local/lib/python" #endif /* Return the initial python search path. This is called once from initsys() to initialize sys.path. The environment variable PYTHONPATH is fetched and the default path appended. The default path may be passed to the preprocessor; if not, a system-dependent default is used. */ char * getpythonpath() { char *path = getenv("PYTHONPATH"); char *defpath = PYTHONPATH; static char *buf = NULL; char *p; int n; if (path == NULL) path = ""; n = strlen(path) + strlen(defpath) + 2; if (buf != NULL) { free(buf); buf = NULL; } buf = malloc(n); if (buf == NULL) Py_FatalError("not enough memory to copy module search path"); strcpy(buf, path); p = buf + strlen(buf); if (p != buf) *p++ = DELIM; strcpy(p, defpath); return buf; }
#include "Python.h" #include "osdefs.h" #ifdef HAVE_STDLIB_H #include <stdlib.h> #else extern char *getenv Py_PROTO((const char *)); #endif #ifndef PYTHONPATH #define PYTHONPATH ".:/usr/local/lib/python" #endif /* Return the initial python search path. This is called once from initsys() to initialize sys.path. The environment variable PYTHONPATH is fetched and the default path appended. The default path may be passed to the preprocessor; if not, a system-dependent default is used. */ char * getpythonpath() { char *path = getenv("PYTHONPATH"); char *defpath = PYTHONPATH; static char *buf = NULL; char *p; int n; if (path == NULL) path = ""; n = strlen(path) + strlen(defpath) + 2; if (buf != NULL) { free(buf); buf = NULL; } buf = malloc(n); if (buf == NULL) Py_FatalError("not enough memory to copy module search path"); strcpy(buf, path); p = buf + strlen(buf); if (p != buf) *p++ = DELIM; strcpy(p, defpath); return buf; }
Include stdlib.h or declare getenv
Include stdlib.h or declare getenv
C
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
e9e47963f55932d40c3883bf2ecc612ea0803fcc
source/tools/finite/opt.h
source/tools/finite/opt.h
// // Created by david on 2019-03-18. // #pragma once #include <general/eigen_tensor_fwd_decl.h> class class_state_finite; class class_model_finite; class class_edges_finite; class class_tensors_finite; class class_algorithm_status; class class_tic_toc; enum class OptSpace; enum class OptType; enum class OptMode; enum class StateRitz; namespace tools::finite::opt { class opt_mps; using Scalar = std::complex<double>; extern opt_mps find_excited_state(const class_tensors_finite &tensors, const opt_mps &initial_mps, const class_algorithm_status &status, OptMode optMode, OptSpace optSpace, OptType optType); extern opt_mps find_excited_state(const class_tensors_finite &tensors, const class_algorithm_status &status, OptMode optMode, OptSpace optSpace, OptType optType); extern Eigen::Tensor<Scalar, 3> find_ground_state(const class_tensors_finite &tensors, StateRitz ritz); }
// // Created by david on 2019-03-18. // #pragma once #include <general/eigen_tensor_fwd_decl.h> class class_state_finite; class class_model_finite; class class_edges_finite; class class_tensors_finite; class class_algorithm_status; class class_tic_toc; namespace eig {class solver;} enum class OptSpace; enum class OptType; enum class OptMode; enum class StateRitz; namespace tools::finite::opt { class opt_mps; using Scalar = std::complex<double>; using real = double; using cplx = std::complex<double>; extern void extract_solutions(const opt_mps &initial_mps,const class_tensors_finite &tensors, eig::solver &solver, std::vector<tools::finite::opt::opt_mps> &eigvecs_mps, const std::string & tag = ""); extern opt_mps find_excited_state(const class_tensors_finite &tensors, const opt_mps &initial_mps, const class_algorithm_status &status, OptMode optMode, OptSpace optSpace, OptType optType); extern opt_mps find_excited_state(const class_tensors_finite &tensors, const class_algorithm_status &status, OptMode optMode, OptSpace optSpace, OptType optType); extern Eigen::Tensor<Scalar, 3> find_ground_state(const class_tensors_finite &tensors, StateRitz ritz); }
Use forward declarations to speed up compilation
Use forward declarations to speed up compilation Former-commit-id: 58cb24dbf6102d6be5cf36336ae6547d9b6b544e
C
mit
DavidAce/DMRG,DavidAce/DMRG,DavidAce/DMRG,DavidAce/DMRG
a9eb35469d1e69649a43426f0a832b7cca732409
src/modules/antifreeze.h
src/modules/antifreeze.h
/* * antifreeze.h * StatusSpec project * * Copyright (c) 2014-2015 Forward Command Post * BSD 2-Clause License * http://opensource.org/licenses/BSD-2-Clause * */ #pragma once #include "cdll_int.h" #include "vgui/VGUI.h" #include "../modules.h" class ConCommand; class ConVar; class IConVar; class KeyValues; namespace vgui { class EditablePanel; }; class AntiFreeze : public Module { public: AntiFreeze(std::string name); static bool CheckDependencies(std::string name); private: class DisplayPanel; class RefreshPanel; DisplayPanel *displayPanel; RefreshPanel *refreshPanel; ConVar *display; ConCommand *display_reload_settings; ConVar *display_threshold; ConVar *enabled; void ChangeDisplayThreshold(IConVar *var, const char *pOldValue, float flOldValue); void ReloadSettings(); void ToggleDisplay(IConVar *var, const char *pOldValue, float flOldValue); void ToggleEnabled(IConVar *var, const char *pOldValue, float flOldValue); };
/* * antifreeze.h * StatusSpec project * * Copyright (c) 2014-2015 Forward Command Post * BSD 2-Clause License * http://opensource.org/licenses/BSD-2-Clause * */ #pragma once #include "../modules.h" class ConCommand; class ConVar; class IConVar; class AntiFreeze : public Module { public: AntiFreeze(std::string name); static bool CheckDependencies(std::string name); private: class DisplayPanel; class RefreshPanel; DisplayPanel *displayPanel; RefreshPanel *refreshPanel; ConVar *display; ConCommand *display_reload_settings; ConVar *display_threshold; ConVar *enabled; void ChangeDisplayThreshold(IConVar *var, const char *pOldValue, float flOldValue); void ReloadSettings(); void ToggleDisplay(IConVar *var, const char *pOldValue, float flOldValue); void ToggleEnabled(IConVar *var, const char *pOldValue, float flOldValue); };
Remove unneeded declarations and headers.
Remove unneeded declarations and headers.
C
bsd-2-clause
fwdcp/StatusSpec,fwdcp/StatusSpec
160887b31b1794d15e14ce09bf11a1fa80b6f74c
copasi/copasiversion.h
copasi/copasiversion.h
/* Begin CVS Header $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/copasiversion.h,v $ $Revision: 1.3 $ $Name: $ $Author: shoops $ $Date: 2004/02/19 03:28:58 $ End CVS Header */ #ifndef COPASI_VERSION #define COPASI_VERSION #define COPASI_VERSION_MAJOR 4 #define COPASI_VERSION_MINOR 0 #define COPASI_VERSION_BUILD 2 #endif // COPASI_VERSION
/* Begin CVS Header $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/copasiversion.h,v $ $Revision: 1.4 $ $Name: $ $Author: shoops $ $Date: 2004/02/20 18:15:46 $ End CVS Header */ #ifndef COPASI_VERSION #define COPASI_VERSION #define COPASI_VERSION_MAJOR 4 #define COPASI_VERSION_MINOR 0 #define COPASI_VERSION_BUILD 3 #endif // COPASI_VERSION
Build number increased to 3.
Build number increased to 3.
C
artistic-2.0
copasi/COPASI,jonasfoe/COPASI,copasi/COPASI,copasi/COPASI,copasi/COPASI,jonasfoe/COPASI,jonasfoe/COPASI,copasi/COPASI,copasi/COPASI,jonasfoe/COPASI,jonasfoe/COPASI,jonasfoe/COPASI,jonasfoe/COPASI,jonasfoe/COPASI,jonasfoe/COPASI,copasi/COPASI,copasi/COPASI,copasi/COPASI
00e8765b3a2db414e655021fadf86f420c11d4a5
srcs/testpath.c
srcs/testpath.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* testpath.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: sle-guil <sle-guil@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2015/03/11 16:25:34 by sle-guil #+# #+# */ /* Updated: 2015/03/11 16:48:51 by sle-guil ### ########.fr */ /* */ /* ************************************************************************** */ #include "minishell.h" int testpath(char *path) { int ret; ft_putendl("boobs"); ret = (access(path, F_OK)) ? 1 : 0; ret += (access(path, R_OK)) ? 2 : 0; ret += (access(path, W_OK)) ? 4 : 0; ret += (access(path, X_OK)) ? 8 : 0; return (ret); }
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* testpath.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: sle-guil <sle-guil@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2015/03/11 16:25:34 by sle-guil #+# #+# */ /* Updated: 2015/03/12 16:00:13 by sle-guil ### ########.fr */ /* */ /* ************************************************************************** */ #include "minishell.h" int testpath(char const *path) { int ret; ret = (access(path, F_OK) != -1) ? 1 : 0; ret += (access(path, X_OK) != -1) ? 8 : 0; return (ret); }
Check dir have to be done
Check dir have to be done
C
mit
SuliacLEGUILLOU/minishell
74105155ca352765df67c735573f725ab89c269e
arch/octeon/include/param.h
arch/octeon/include/param.h
/* $OpenBSD: param.h,v 1.2 2010/10/11 15:51:06 syuu Exp $ */ /* public domain */ #ifndef _MACHINE_PARAM_H_ #define _MACHINE_PARAM_H_ #define MACHINE "octeon" #define _MACHINE octeon #define MACHINE_ARCH "mips64" #define _MACHINE_ARCH mips64 /* not the canonical endianness */ #define MACHINE_CPU "mips64" #define _MACHINE_CPU mips64 #define MID_MACHINE MID_MIPS64 /* * The Loongson level 1 cache expects software to prevent virtual * aliases. Unfortunately, since this cache is physically tagged, * this would require all virtual address to have the same bits 14 * and 13 as their physical addresses, which is not something the * kernel can guarantee unless the page size is at least 16KB. */ #define PAGE_SHIFT 14 #include <mips64/param.h> #endif /* _MACHINE_PARAM_H_ */
/* $OpenBSD: param.h,v 1.3 2011/06/25 19:38:47 miod Exp $ */ /* public domain */ #ifndef _MACHINE_PARAM_H_ #define _MACHINE_PARAM_H_ #define MACHINE "octeon" #define _MACHINE octeon #define MACHINE_ARCH "mips64" #define _MACHINE_ARCH mips64 #define MID_MACHINE MID_MIPS64 #define PAGE_SHIFT 14 #include <mips64/param.h> #endif /* _MACHINE_PARAM_H_ */
Remove irrelevant comments borrowed from loongson.
Remove irrelevant comments borrowed from loongson.
C
isc
orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars
9899ff8cb4bd63601fc3dfa115b00d65c3388fff
ConfinementForce.h
ConfinementForce.h
/*===- ConfinementForce.h - libSimulation -===================================== * * DEMON * * This file is distributed under the BSD Open Source License. See LICENSE.TXT * for details. * *===-----------------------------------------------------------------------===*/ #ifndef CONFINEMENTFORCE_H #define CONFINEMENTFORCE_H #include "Force.h" class ConfinementForce : public Force { public: ConfinementForce(Cloud * const C, double confineConst) : Force(C), confine(confineConst) {} // IMPORTANT: In the above constructor, confineConst must be positive! ~ConfinementForce() {} void force1(const double currentTime); // rk substep 1 void force2(const double currentTime); // rk substep 2 void force3(const double currentTime); // rk substep 3 void force4(const double currentTime); // rk substep 4 void writeForce(fitsfile * const file, int * const error) const; void readForce(fitsfile * const file, int * const error); private: double confine; // [V/m^2] void force(const cloud_index currentParticle, const __m128d currentPositionX, const __m128d currentPositionY); }; #endif // CONFINEMENTFORCE_H
/*===- ConfinementForce.h - libSimulation -===================================== * * DEMON * * This file is distributed under the BSD Open Source License. See LICENSE.TXT * for details. * *===-----------------------------------------------------------------------===*/ #ifndef CONFINEMENTFORCE_H #define CONFINEMENTFORCE_H #include "Force.h" class ConfinementForce : public Force { public: ConfinementForce(Cloud * const C, double confineConst) : Force(C), confine(confineConst) {} // IMPORTANT: In the above constructor, confineConst must be positive! ~ConfinementForce() {} virtual void force1(const double currentTime); // rk substep 1 virtual void force2(const double currentTime); // rk substep 2 virtual void force3(const double currentTime); // rk substep 3 virtual void force4(const double currentTime); // rk substep 4 virtual void writeForce(fitsfile * const file, int * const error) const; virtual void readForce(fitsfile * const file, int * const error); private: double confine; // [V/m^2] void force(const cloud_index currentParticle, const __m128d currentPositionX, const __m128d currentPositionY); }; #endif // CONFINEMENTFORCE_H
Add virtual to methods that get overridden.
Add virtual to methods that get overridden.
C
bsd-3-clause
leios/demonsimulationcode,leios/demonsimulationcode
d8a0e9ab3b1189d994142a5adb1e144f378534c9
assembler/d16-main/main.c
assembler/d16-main/main.c
// // main.c // d16-asm // // Created by Michael Nolan on 6/17/16. // Copyright © 2016 Michael Nolan. All rights reserved. // #include <stdio.h> #include <stdlib.h> #include "parser.h" #include "assembler.h" #include <string.h> #include "instruction.h" extern int yyparse (FILE* output_file); extern FILE* yyin; extern int yydebug; int main(int argc, const char * argv[]) { if(argc != 3){ fprintf(stderr, "Usage d16-asm [file] [output]\n"); exit(-1); } FILE* f = fopen(argv[1], "r"); FILE* o = fopen(argv[2], "wb"); if(f == NULL){ fprintf(stderr, "Error opening file %s\n",argv[1]); exit(-1); } if(o == NULL){ fprintf(stderr, "Error opening file %s for writing\n",argv[2]); exit(2); } yyin = f; init_hash_table(); do { yyparse(o); } while (!feof(yyin)); fclose(f); fclose(o); return 0; }
// // main.c // d16-asm // // Created by Michael Nolan on 6/17/16. // Copyright © 2016 Michael Nolan. All rights reserved. // #include <stdio.h> #include <stdlib.h> #include "parser.h" #include "assembler.h" #include <string.h> #include "instruction.h" #include <unistd.h> extern int yyparse (FILE* output_file); extern FILE* yyin; extern int yydebug; int main(int argc, char * const argv[]) { FILE *f,*o; opterr = 0; int c; while ((c=getopt(argc,argv,"o:")) != -1){ switch(c){ case 'o': o = fopen(optarg,"wb"); } } if(optind<argc) f = fopen(argv[optind],"r"); else{ fprintf(stderr,"d16: No input files specified\n"); exit(-1); } if(o==NULL){ o=fopen("a.out","wb"); } yyin = f; init_hash_table(); do { yyparse(o); } while (!feof(yyin)); fclose(f); fclose(o); return 0; }
Convert assembler to use getopt for arguments
Convert assembler to use getopt for arguments
C
mit
d16-processor/d16,d16-processor/d16,d16-processor/d16,d16-processor/d16,d16-processor/d16
ef1774c5b7f39291692a42b4aeced11abf8e7ace
util/util_optimization.h
util/util_optimization.h
/* * Copyright 2011-2013 Blender Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ #if defined(__x86_64__) || defined(_M_X64) /* no SSE2 kernel on x86-64, part of regular kernel */ #define WITH_CYCLES_OPTIMIZED_KERNEL_SSE3 #define WITH_CYCLES_OPTIMIZED_KERNEL_SSE41 #endif #if defined(i386) || defined(_M_IX86) #define WITH_CYCLES_OPTIMIZED_KERNEL_SSE2 #define WITH_CYCLES_OPTIMIZED_KERNEL_SSE3 #define WITH_CYCLES_OPTIMIZED_KERNEL_SSE41 #endif
/* * Copyright 2011-2013 Blender Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ #if defined(__x86_64__) || defined(_M_X64) /* no SSE2 kernel on x86-64, part of regular kernel */ #define WITH_CYCLES_OPTIMIZED_KERNEL_SSE3 #define WITH_CYCLES_OPTIMIZED_KERNEL_SSE41 /* VC2008 is not ready for sse41, probably broken blendv intrinsic... */ #if defined(_MSC_VER) && (_MSC_VER < 1700) #undef WITH_CYCLES_OPTIMIZED_KERNEL_SSE41 #endif #endif #if defined(i386) || defined(_M_IX86) #define WITH_CYCLES_OPTIMIZED_KERNEL_SSE2 #define WITH_CYCLES_OPTIMIZED_KERNEL_SSE3 #endif
Disable SSE41 kernel on 32bit, we don't use intrinsics here anyway. Also disable it for Visual Studio < 2012, broken blendv instruction.
Cycles: Disable SSE41 kernel on 32bit, we don't use intrinsics here anyway. Also disable it for Visual Studio < 2012, broken blendv instruction.
C
apache-2.0
pyrochlore/cycles,tangent-opensource/coreBlackbird,pyrochlore/cycles,tangent-opensource/coreBlackbird,pyrochlore/cycles,tangent-opensource/coreBlackbird
dff2094cb79c6a0bbb2e2af74af488a106c033cc
lib/packet_queue.c
lib/packet_queue.c
#include "packet_queue.h" #include "error.h" #include "radio.h" #include <stdint.h> #include <stdlib.h> #include <string.h> uint32_t packet_queue_init(packet_queue_t * queue) { queue->head = 0; queue->tail = 0; return SUCCESS; } bool packet_queue_is_empty(packet_queue_t * queue) { return queue->head == queue->tail; } bool packet_queue_is_full(packet_queue_t * queue) { return abs(queue->head - queue->tail) == PACKET_QUEUE_SIZE; } uint32_t packet_queue_add(packet_queue_t * queue, radio_packet_t * packet) { if (packet_queue_is_full(queue)) return NO_MEMORY; memcpy(&queue->packets[0], packet, sizeof(packet)); queue->tail++; return SUCCESS; } uint32_t packet_queue_get(packet_queue_t * queue, radio_packet_t ** packet) { if (packet_queue_is_empty(queue)) return NOT_FOUND; *packet = &queue->packets[queue->head]; queue->head++; return SUCCESS; }
#include "packet_queue.h" #include "error.h" #include "radio.h" #include <stdint.h> #include <stdlib.h> #include <string.h> uint32_t packet_queue_init(packet_queue_t * queue) { queue->head = 0; queue->tail = 0; return SUCCESS; } bool packet_queue_is_empty(packet_queue_t * queue) { return queue->head == queue->tail; } bool packet_queue_is_full(packet_queue_t * queue) { return abs(queue->head - queue->tail) == PACKET_QUEUE_SIZE; } uint32_t packet_queue_add(packet_queue_t * queue, radio_packet_t * packet) { if (packet_queue_is_full(queue)) return NO_MEMORY; memcpy(&queue->packets[0], packet, sizeof(*packet)); queue->tail++; return SUCCESS; } uint32_t packet_queue_get(packet_queue_t * queue, radio_packet_t ** packet) { if (packet_queue_is_empty(queue)) return NOT_FOUND; *packet = &queue->packets[queue->head]; queue->head++; return SUCCESS; }
Fix bug in add, copy size.
Fix bug in add, copy size.
C
bsd-3-clause
hlnd/nrf51-simple-radio,hlnd/nrf51-simple-radio
4a14e0945732e5c67aca01d6bd070d00d1697d9a
jsonpull.h
jsonpull.h
typedef enum json_type { JSON_HASH, JSON_ARRAY, JSON_NUMBER, JSON_STRING, JSON_TRUE, JSON_FALSE, JSON_NULL, JSON_COMMA, JSON_COLON, JSON_ITEM, JSON_KEY, JSON_VALUE, } json_type; typedef struct json_object { json_type type; struct json_object *parent; char *string; double number; struct json_object **array; struct json_object **keys; struct json_object **values; int length; int expect; } json_object; struct json_pull { json_object *root; char *error; int (*read)(struct json_pull *); int (*peek)(struct json_pull *); void *source; int line; json_object *container; }; typedef struct json_pull json_pull; typedef void (*json_separator_callback)(json_type type, json_pull *j, void *state); json_pull *json_begin_file(FILE *f); json_pull *json_begin_string(char *s); json_object *json_parse(json_pull *j); json_object *json_parse_with_separators(json_pull *j, json_separator_callback cb, void *state); void json_free(json_object *j); json_object *json_hash_get(json_object *o, char *s);
typedef enum json_type { // These types can be returned by json_parse() JSON_HASH, JSON_ARRAY, JSON_NUMBER, JSON_STRING, JSON_TRUE, JSON_FALSE, JSON_NULL, // These and JSON_HASH and JSON_ARRAY can be called back by json_parse_with_separators() JSON_COMMA, JSON_COLON, // These are only used internally as expectations of what comes next JSON_ITEM, JSON_KEY, JSON_VALUE, } json_type; typedef struct json_object { json_type type; struct json_object *parent; char *string; double number; struct json_object **array; struct json_object **keys; struct json_object **values; int length; int expect; } json_object; struct json_pull { json_object *root; char *error; int (*read)(struct json_pull *); int (*peek)(struct json_pull *); void *source; int line; json_object *container; }; typedef struct json_pull json_pull; typedef void (*json_separator_callback)(json_type type, json_pull *j, void *state); json_pull *json_begin_file(FILE *f); json_pull *json_begin_string(char *s); json_object *json_parse(json_pull *j); json_object *json_parse_with_separators(json_pull *j, json_separator_callback cb, void *state); void json_free(json_object *j); json_object *json_hash_get(json_object *o, char *s);
Clarify what types are used where
Clarify what types are used where
C
bsd-2-clause
mapbox/tippecanoe,joykuotw/tippecanoe,landsurveyorsunited/tippecanoe,mapbox/tippecanoe,ericfischer/json-pull,mapbox/tippecanoe,landsurveyorsunited/tippecanoe,mapbox/tippecanoe,joykuotw/tippecanoe
2bb49affe3bc123a13cc0e05d94dd8c32ac087e1
src/main.h
src/main.h
#ifndef __ADR_MAIN_H__ #define __ADR_MAIN_H__ // Libraries // #include "craftable.h" #include "resource.h" #include "villager.h" #include "location.h" // Forward Declarations // struct adr_state { enum LOCATION adr_loc; enum FIRE_STATE adr_fire; enum ROOM_TEMP adr_temp; unsigned int adr_rs [ALIEN_ALLOY + 1]; unsigned short adr_cs [RIFLE + 1]; unsigned short adr_vs [MUNITIONIST + 1]; }; #endif // __ADR_MAIN_H__ // vim: set ts=4 sw=4 et:
#ifndef __ADR_MAIN_H__ #define __ADR_MAIN_H__ // Libraries // #include "craftable.h" #include "resource.h" #include "villager.h" #include "location.h" // Forward Declarations // struct adr_state { enum LOCATION loc; enum FIRE_STATE fire; enum ROOM_TEMP temp; unsigned int rs [ALIEN_ALLOY + 1]; unsigned short cs [RIFLE + 1]; unsigned short vs [MUNITIONIST + 1]; }; #endif // __ADR_MAIN_H__ // vim: set ts=4 sw=4 et:
Remove unnecessary state variable adr_ prefixes
Remove unnecessary state variable adr_ prefixes
C
mpl-2.0
HalosGhost/adarcroom
7b2154cb6232a9d289a95ce79e70c590fee12d63
test/Frontend/optimization-remark-options.c
test/Frontend/optimization-remark-options.c
// RUN: %clang -O1 -fvectorize -Rpass-analysis=loop-vectorize -emit-llvm -S %s -o - 2>&1 | FileCheck %s // CHECK: {{.*}}:9:11: remark: loop not vectorized: vectorization requires changes in the order of operations, however IEEE 754 floating-point operations are not commutative; allow commutativity by specifying '#pragma clang loop vectorize(enable)' before the loop or by providing the compiler option '-ffast-math' double foo(int N) { double v = 0.0; for (int i = 0; i < N; i++) v = v + 1.0; return v; }
// RUN: %clang -O1 -fvectorize -target x86_64-unknown-unknown -Rpass-analysis=loop-vectorize -emit-llvm -S %s -o - 2>&1 | FileCheck %s // CHECK: {{.*}}:9:11: remark: loop not vectorized: vectorization requires changes in the order of operations, however IEEE 754 floating-point operations are not commutative; allow commutativity by specifying '#pragma clang loop vectorize(enable)' before the loop or by providing the compiler option '-ffast-math' double foo(int N) { double v = 0.0; for (int i = 0; i < N; i++) v = v + 1.0; return v; }
Make frontend floating-point commutivity test X86 specific to avoid cost-model related problems on arm-thumb and hexagon.
Make frontend floating-point commutivity test X86 specific to avoid cost-model related problems on arm-thumb and hexagon. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@244517 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
37f07d9a6bcd16b9f3f461eeb1a4acdfd8643cc5
src/util/strext.h
src/util/strext.h
// Copyright 2015 Ben Trask // MIT licensed (see LICENSE for details) #include <stdarg.h> char *vaasprintf(char const *const fmt, va_list ap); char *aasprintf(char const *const fmt, ...) __attribute__((format(printf, 1, 2))); int time_iso8601(char *const out, size_t const max); void valogf(char const *const fmt, va_list ap); void alogf(char const *const fmt, ...);
// Copyright 2015 Ben Trask // MIT licensed (see LICENSE for details) #include <stdarg.h> char *vaasprintf(char const *const fmt, va_list ap); char *aasprintf(char const *const fmt, ...) __attribute__((format(printf, 1, 2))); int time_iso8601(char *const out, size_t const max); void valogf(char const *const fmt, va_list ap); void alogf(char const *const fmt, ...) __attribute__((format(printf, 1, 2)));
Add printf __attribute__ to log function.
Add printf __attribute__ to log function.
C
mit
btrask/stronglink,Ryezhang/stronglink,btrask/stronglink,Ryezhang/stronglink,Ryezhang/stronglink,btrask/stronglink,btrask/stronglink
5e994b1e9ba0ddbd27773825cb8bfe30ee2e69d2
gobject/gobject-autocleanups.h
gobject/gobject-autocleanups.h
/* * Copyright © 2015 Canonical Limited * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the licence, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. * * Author: Ryan Lortie <desrt@desrt.ca> */ #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) #error "Only <glib-object.h> can be included directly." #endif G_DEFINE_AUTO_CLEANUP_FREE_FUNC(GStrv, g_strfreev, NULL) G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref) G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_unset)
/* * Copyright © 2015 Canonical Limited * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the licence, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. * * Author: Ryan Lortie <desrt@desrt.ca> */ #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) #error "Only <glib-object.h> can be included directly." #endif G_DEFINE_AUTO_CLEANUP_FREE_FUNC(GStrv, g_strfreev, NULL) G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitiallyUnowned, g_object_unref) G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_unset)
Add missing autocleanup for GInitiallyUnowned
gobject: Add missing autocleanup for GInitiallyUnowned We are missing the auto cleanup function for this type, which means G_DECLARE_* macros won't work with classes inheriting from GInitiallyUnowned.
C
lgpl-2.1
ieei/glib,cention-sany/glib,MathieuDuponchelle/glib,endlessm/glib,lukasz-skalski/glib,tchakabam/glib,mzabaluev/glib,johne53/MB3Glib,krichter722/glib,johne53/MB3Glib,mzabaluev/glib,MathieuDuponchelle/glib,ieei/glib,krichter722/glib,mzabaluev/glib,krichter722/glib,tchakabam/glib,endlessm/glib,tamaskenez/glib,MathieuDuponchelle/glib,tchakabam/glib,tamaskenez/glib,cention-sany/glib,mzabaluev/glib,lukasz-skalski/glib,gale320/glib,tchakabam/glib,ieei/glib,ieei/glib,Distrotech/glib,mzabaluev/glib,MathieuDuponchelle/glib,gale320/glib,ieei/glib,tchakabam/glib,endlessm/glib,tamaskenez/glib,johne53/MB3Glib,endlessm/glib,johne53/MB3Glib,Distrotech/glib,gale320/glib,lukasz-skalski/glib,cention-sany/glib,gale320/glib,tamaskenez/glib,johne53/MB3Glib,Distrotech/glib,gale320/glib,lukasz-skalski/glib,krichter722/glib,johne53/MB3Glib,Distrotech/glib,endlessm/glib,MathieuDuponchelle/glib,lukasz-skalski/glib,cention-sany/glib,cention-sany/glib,tamaskenez/glib,Distrotech/glib,krichter722/glib
c22a793cc1ea01e03a01dc86b1a82480e9d27f29
optional/capi/ext/mri.h
optional/capi/ext/mri.h
#ifndef RUBYSPEC_CAPI_MRI_H #define RUBYSPEC_CAPI_MRI_H /* #undef any HAVE_ defines that MRI does not have. */ #undef HAVE_RB_HASH_LOOKUP #undef HAVE_RB_HASH_SIZE #undef HAVE_RB_OBJ_FROZEN_P #undef HAVE_RB_STR_PTR #undef HAVE_RB_STR_PTR_READONLY #undef HAVE_THREAD_BLOCKING_REGION #ifdef RUBY_VERSION_IS_1_9 #undef HAVE_RARRAY #undef HAVE_RFLOAT #undef HAVE_RSTRING #undef HAVE_STR2CSTR #undef HAVE_RB_STR2CSTR #undef HAVE_RB_CVAR_SET #undef HAVE_RB_SET_KCODE #endif /* Macros that may not be defined in old versions */ #ifndef RARRAY_PTR #define RARRAY_PTR(s) (*(VALUE *const *)&RARRAY(s)->ptr) #endif #ifndef RARRAY_LEN #define RARRAY_LEN(s) (*(const long *)&RARRAY(s)->len) #endif #ifndef RFLOAT_VALUE #define RFLOAT_VALUE(v) (RFLOAT(v)->value) #endif #endif
#ifndef RUBYSPEC_CAPI_MRI_H #define RUBYSPEC_CAPI_MRI_H /* #undef any HAVE_ defines that MRI does not have. */ #undef HAVE_RB_HASH_LOOKUP #undef HAVE_RB_HASH_SIZE #undef HAVE_RB_OBJ_FROZEN_P #undef HAVE_RB_STR_PTR #undef HAVE_RB_STR_PTR_READONLY #undef HAVE_THREAD_BLOCKING_REGION #ifdef RUBY_VERSION_IS_1_9 #undef HAVE_RARRAY #undef HAVE_RFLOAT #undef HAVE_RSTRING #undef HAVE_STR2CSTR #undef HAVE_RB_STR2CSTR #undef HAVE_RB_CVAR_SET #undef HAVE_RB_SET_KCODE #endif /* RubySpec assumes following are public API */ #ifndef rb_proc_new VALUE rb_proc_new _((VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE)); #endif #ifndef rb_str_len int rb_str_len(VALUE); #endif #ifndef rb_set_errinfo void rb_set_errinfo(VALUE); #endif /* Macros that may not be defined in old versions */ #ifndef RARRAY_PTR #define RARRAY_PTR(s) (*(VALUE *const *)&RARRAY(s)->ptr) #endif #ifndef RARRAY_LEN #define RARRAY_LEN(s) (*(const long *)&RARRAY(s)->len) #endif #ifndef RFLOAT_VALUE #define RFLOAT_VALUE(v) (RFLOAT(v)->value) #endif #endif
Add prototype of non public API of MRI.
Add prototype of non public API of MRI. RubySpec may want to test some APIs even if they are not declared as public API by MRI team. This commit is not to confirm they are public.
C
mit
BanzaiMan/rubyspec,bl4ckdu5t/rubyspec,sgarciac/spec,DavidEGrayson/rubyspec,DavidEGrayson/rubyspec,rkh/rubyspec,enricosada/rubyspec,ericmeyer/rubyspec,alexch/rubyspec,alex/rubyspec,yous/rubyspec,josedonizetti/rubyspec,metadave/rubyspec,julik/rubyspec,lucaspinto/rubyspec,MagLev/rubyspec,enricosada/rubyspec,rdp/rubyspec,mrkn/rubyspec,sferik/rubyspec,roshats/rubyspec,shirosaki/rubyspec,tinco/rubyspec,BanzaiMan/rubyspec,sgarciac/spec,askl56/rubyspec,terceiro/rubyspec,godfat/rubyspec,agrimm/rubyspec,flavio/rubyspec,neomadara/rubyspec,nobu/rubyspec,alindeman/rubyspec,nobu/rubyspec,griff/rubyspec,bomatson/rubyspec,DawidJanczak/rubyspec,ruby/rubyspec,yaauie/rubyspec,lucaspinto/rubyspec,atambo/rubyspec,freerange/rubyspec,Aesthetikx/rubyspec,terceiro/rubyspec,eregon/rubyspec,askl56/rubyspec,yous/rubyspec,Zoxc/rubyspec,markburns/rubyspec,oggy/rubyspec,ericmeyer/rubyspec,julik/rubyspec,kidaa/rubyspec,teleological/rubyspec,sferik/rubyspec,mrkn/rubyspec,griff/rubyspec,shirosaki/rubyspec,chesterbr/rubyspec,qmx/rubyspec,kachick/rubyspec,jannishuebl/rubyspec,Aesthetikx/rubyspec,kidaa/rubyspec,amarshall/rubyspec,ruby/spec,JuanitoFatas/rubyspec,iainbeeston/rubyspec,jstepien/rubyspec,bjeanes/rubyspec,mbj/rubyspec,saturnflyer/rubyspec,godfat/rubyspec,iliabylich/rubyspec,rdp/rubyspec,benlovell/rubyspec,timfel/rubyspec,neomadara/rubyspec,jvshahid/rubyspec,mbj/rubyspec,roshats/rubyspec,yb66/rubyspec,wied03/rubyspec,teleological/rubyspec,metadave/rubyspec,benburkert/rubyspec,oggy/rubyspec,rkh/rubyspec,kachick/rubyspec,jannishuebl/rubyspec,no6v/rubyspec,kachick/rubyspec,ruby/spec,alindeman/rubyspec,atambo/rubyspec,freerange/rubyspec,amarshall/rubyspec,qmx/rubyspec,nevir/rubyspec,JuanitoFatas/rubyspec,DawidJanczak/rubyspec,ruby/rubyspec,bl4ckdu5t/rubyspec,iainbeeston/rubyspec,jvshahid/rubyspec,yb66/rubyspec,MagLev/rubyspec,scooter-dangle/rubyspec,bomatson/rubyspec,xaviershay/rubyspec,Zoxc/rubyspec,no6v/rubyspec,wied03/rubyspec,saturnflyer/rubyspec,markburns/rubyspec,xaviershay/rubyspec,tinco/rubyspec,scooter-dangle/rubyspec,jstepien/rubyspec,josedonizetti/rubyspec,timfel/rubyspec,benlovell/rubyspec,nobu/rubyspec,alexch/rubyspec,alex/rubyspec,eregon/rubyspec,ruby/spec,nevir/rubyspec,wied03/rubyspec,agrimm/rubyspec,sgarciac/spec,bjeanes/rubyspec,yaauie/rubyspec,eregon/rubyspec,flavio/rubyspec,iliabylich/rubyspec,chesterbr/rubyspec,benburkert/rubyspec
23e0a58c5a48802946cf0fbadef023179a443f05
include/llvm/Bytecode/Reader.h
include/llvm/Bytecode/Reader.h
//===-- llvm/Bytecode/Reader.h - Reader for VM bytecode files ----*- C++ -*--=// // // This functionality is implemented by the lib/Bytecode/Reader library. // This library is used to read VM bytecode files from an iostream. // // Note that performance of this library is _crucial_ for performance of the // JIT type applications, so we have designed the bytecode format to support // quick reading. // //===----------------------------------------------------------------------===// #ifndef LLVM_BYTECODE_READER_H #define LLVM_BYTECODE_READER_H #include <string> class Module; // Parse and return a class... // Module *ParseBytecodeFile(const std::string &Filename, std::string *ErrorStr = 0); Module *ParseBytecodeBuffer(const unsigned char *Buffer, unsigned BufferSize, std::string *ErrorStr = 0); #endif
//===-- llvm/Bytecode/Reader.h - Reader for VM bytecode files ----*- C++ -*--=// // // This functionality is implemented by the lib/Bytecode/Reader library. // This library is used to read VM bytecode files from an iostream. // // Note that performance of this library is _crucial_ for performance of the // JIT type applications, so we have designed the bytecode format to support // quick reading. // //===----------------------------------------------------------------------===// #ifndef LLVM_BYTECODE_READER_H #define LLVM_BYTECODE_READER_H #include <string> #include <vector> class Module; // Parse and return a class... // Module *ParseBytecodeFile(const std::string &Filename, std::string *ErrorStr = 0); Module *ParseBytecodeBuffer(const unsigned char *Buffer, unsigned BufferSize, std::string *ErrorStr = 0); // ReadArchiveFile - Read bytecode files from the specfied .a file, returning // true on error, or false on success. // bool ReadArchiveFile(const std::string &Filename, std::vector<Module*> &Objects, std::string *ErrorStr = 0); #endif
Add prototype to read .a files
Add prototype to read .a files git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@5821 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm
40400617eba718214ec442d495ec9869c471f839
SWXSLTransform.h
SWXSLTransform.h
// // SWXSLTransform.h // This file is part of the "SWXMLMapping" project, and is distributed under the MIT License. // // Created by Samuel Williams on 23/02/12. // Copyright (c) 2012 Samuel Williams. All rights reserved. // #import <Foundation/Foundation.h> @interface SWXSLTransform : NSObject { NSURL * _baseURL; void * _stylesheet; } /// The base URL that was used to load the stylesheet: @property(nonatomic,strong) NSURL * baseURL; /// Initialize the XSL stylesheet from the given URL: - (instancetype) initWithURL:(NSURL *)url NS_DESIGNATED_INITIALIZER; /// Use the XSL stylesheet to process a string containing XML with a set of arguments. /// Arguments are typically evaluated by the XSLT processor, so, for example, strings must be passed with an additional set of quotes. - (NSData *) processDocument:(NSString *)xmlBuffer arguments:(NSDictionary *)arguments; @end
// // SWXSLTransform.h // This file is part of the "SWXMLMapping" project, and is distributed under the MIT License. // // Created by Samuel Williams on 23/02/12. // Copyright (c) 2012 Samuel Williams. All rights reserved. // #import <Foundation/Foundation.h> @interface SWXSLTransform : NSObject { NSURL * _baseURL; void * _stylesheet; } /// The base URL that was used to load the stylesheet: @property(nonatomic,strong) NSURL * baseURL; - (instancetype) init NS_UNAVAILABLE; /// Initialize the XSL stylesheet from the given URL: - (instancetype) initWithURL:(NSURL *)url NS_DESIGNATED_INITIALIZER; /// Use the XSL stylesheet to process a string containing XML with a set of arguments. /// Arguments are typically evaluated by the XSLT processor, so, for example, strings must be passed with an additional set of quotes. - (NSData *) processDocument:(NSString *)xmlBuffer arguments:(NSDictionary *)arguments; @end
Mark init as being unavailable.
Mark init as being unavailable.
C
mit
oriontransfer/SWXMLMapping
425aa9921544bd60bd26f2429a41deb2e156bd34
Cpp/declare.h
Cpp/declare.h
/*! * @brief Template C++-header file * * This is a template C++-header file * @author <+AUTHOR+> * @date <+DATE+> * @file <+FILE+> * @version 0.1 */ #ifndef <+FILE_CAPITAL+>_H #define <+FILE_CAPITAL+>_H /*! * @brief Template class */ class <+FILEBASE+> { private: public: <+FILEBASE+>() { <+CURSOR+> } }; // class <+FILEBASE+> #endif // <+FILE_CAPITAL+>_H
/*! * @brief Template C++-header file * * This is a template C++-header file * @author <+AUTHOR+> * @date <+DATE+> * @file <+FILE+> * @version 0.1 */ #ifndef <+FILE_CAPITAL+>_H #define <+FILE_CAPITAL+>_H #include <iostream> /*! * @brief Template class */ class <+FILE_PASCAL+> { private: public: <+FILEBASE+>() { <+CURSOR+> } template<typename CharT, typename Traits> friend std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& os, const CoutTest& this_); template<typename CharT, typename Traits> friend std::basic_istream<CharT, Traits>& operator>>(std::basic_istream<CharT, Traits>& is, CoutTest& this_); }; // class <+FILE_PASCAL+> template<typename CharT, typename Traits> std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& os, const CoutTest& this_) { return os; } template<typename CharT, typename Traits> std::basic_istream<CharT, Traits>& operator>>(std::basic_istream<CharT, Traits>& is, CoutTest& this_) { return is; } #endif // <+FILE_CAPITAL+>_H
Enable to treat with std::cout and std::cin
Enable to treat with std::cout and std::cin
C
mit
koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate
28f263f2eef862952af22e7668e7c1d0e0937c1f
libyaul/common/stack.c
libyaul/common/stack.c
/* * Copyright (c) 2012-2016 Israel Jacquez * See LICENSE for details. * * Israel Jacquez <mrkotfw@gmail.com> */ #include <stdbool.h> #include <stdio.h> #include <stdint.h> #include "stack.h" char * stack_backtrace(void) { extern void *_text_start; extern void *_text_end; static char buf[1024]; uintptr_t fp; uintptr_t pr; int level; /* Obtain address of the caller and its frame pointer before it * is clobbered by any subsequent calls */ STACK_RET_ADDRESS(pr); STACK_FPTR(fp); level = 0; *buf = '\0'; do { (void)sprintf(buf, "%s #%i 0x%08X in ??? ()\n", buf, level, (uintptr_t)pr); pr = STACK_FPTR_RET_ADDRESS_GET(fp); fp = STACK_FPTR_NEXT_GET(fp); level++; } while (((pr >= (uint32_t)&_text_start)) && (pr < ((uint32_t)&_text_end))); return buf; }
/* * Copyright (c) 2012-2016 Israel Jacquez * See LICENSE for details. * * Israel Jacquez <mrkotfw@gmail.com> */ #include <stdbool.h> #include <stdio.h> #include <stdint.h> #include "stack.h" char * stack_backtrace(void) { extern void *_text_start; extern void *_text_end; static char buf[256]; uintptr_t fp; uintptr_t pr; int level; /* Obtain address of the caller and its frame pointer before it * is clobbered by any subsequent calls */ STACK_RET_ADDRESS(pr); STACK_FPTR(fp); level = 0; *buf = '\0'; do { (void)snprintf(buf, 256, "%s #%i 0x%08X in ??? ()\n", buf, level, (uintptr_t)pr); pr = STACK_FPTR_RET_ADDRESS_GET(fp); fp = STACK_FPTR_NEXT_GET(fp); level++; } while (((pr >= (uint32_t)&_text_start)) && (pr < ((uint32_t)&_text_end))); return buf; }
Use snprintf() instead of sprintf()
Use snprintf() instead of sprintf()
C
mit
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
a46b7fabdb79de949d0d795cf2ec0accc2a34a4b
Ndapi/Ndapi.h
Ndapi/Ndapi.h
#pragma once #include <ORATYPES.H> using namespace System; using namespace System::Runtime::InteropServices; namespace Ndapi { [Serializable] public ref class NdapiException : public Exception { private: long _status; public: property long Status { long get() { return _status; } }; public protected: NdapiException() : Exception() {} NdapiException(String^ message) : Exception(message) {} NdapiException(String^ message, Exception^ inner) : Exception(message, inner) {} NdapiException(String^ message, long status) : Exception(message) { _status = status; } }; template<class T> class NativeString { private: T* value; NativeString(const NativeString&); NativeString& operator = (const NativeString&); public: NativeString(String^ s); ~NativeString() { Marshal::FreeHGlobal(IntPtr(value)); } operator T* () { return value; } }; }
#pragma once #include <ORATYPES.H> using namespace System; using namespace System::Runtime::InteropServices; namespace Ndapi { [Serializable] public ref class NdapiException : public Exception { private: long _status; public: property long Status { long get() { return _status; } }; public protected: NdapiException() : Exception() {} NdapiException(String^ message) : Exception(message) {} NdapiException(String^ message, Exception^ inner) : Exception(message, inner) {} NdapiException(String^ message, long status) : Exception(message) { _status = status; } }; template<class T> class NativeString { private: T* value; public: NativeString(String^ s); NativeString(const NativeString&) = delete; NativeString& operator = (const NativeString&) = delete; ~NativeString() { Marshal::FreeHGlobal(IntPtr(value)); } operator T* () { return value; } }; }
Use =delete to disallow copy
Use =delete to disallow copy
C
mit
felipebz/ndapi
3e2851f3711355d1db7c286b3738513f4adc3dca
OpenROV/Motors.h
OpenROV/Motors.h
#ifndef __MOTORS_H_ #define __MOTORS_H_ #include <Servo.h> #define MIDPOINT 128 class Motors { private: Servo port, vertical, starbord; int port_pin, vertical_pin, starbord_pin; public: Motors(int p_pin, int v_pin, int s_pin); void reset(); void go(int p, int v, int s); void stop(); }; #endif
#ifndef __MOTORS_H_ #define __MOTORS_H_ #include <Servo.h> #define MIDPOINT 90 class Motors { private: Servo port, vertical, starbord; int port_pin, vertical_pin, starbord_pin; public: Motors(int p_pin, int v_pin, int s_pin); void reset(); void go(int p, int v, int s); void stop(); }; #endif
Set MIDPOINT to 90 instead of 128 (servo lib goes from 0 to 180)
Set MIDPOINT to 90 instead of 128 (servo lib goes from 0 to 180)
C
mit
binary42/openrov-software-arduino,OpenROV/openrov-software-arduino,johan--/openrov-software-arduino,dieface/openrov-software-arduino,spiderkeys/openrov-software-arduino,binary42/openrov-software-arduino,LeeCheongAh/openrov-software-arduino,johan--/openrov-software-arduino,OpenROV/openrov-software-arduino,BrianAdams/openrov-software-arduino,LeeCheongAh/openrov-software-arduino,dieface/openrov-software-arduino,spiderkeys/openrov-software-arduino,BrianAdams/openrov-software-arduino,OpenROV/openrov-software-arduino
a18de90de5ef80a1785dea6f2ca1be26e0fddc1d
rootx/src/rootcoreteam.h
rootx/src/rootcoreteam.h
#ifndef ROOT_ROOTCoreTeam #define ROOT_ROOTCoreTeam namespace ROOT { namespace ROOTX { //This string will be updated by external script, reading names from http://root.cern.ch/gitstats/authors.html. //The string has an internal linkage (it has a definition here, not in rootxx.cxx or rootx-cocoa.mm files. //So this header can be included in different places (as soon as you know what you're doing). //Please, do not modify this file. //[STRINGTOREPLACE const char * gROOTCoreTeam = "Andrei Gheata, Axel Naumann, Bertrand Bellenot, Cristina Cristescu," " Danilo Piparo, Fons Rademakers, Gerardo Ganis, Ilka Antcheva," " Lorenzo Moneta, Matevz Tadel, Olivier Couet, Paul Russo, Pere Mato," " Philippe Canal, Rene Brun, Timur Pocheptsov, Valeri Onuchin," " Vassil Vassilev, Wim Lavrijsen, Wouter Verkerke\n\n"; //STRINGTOREPLACE] } } #endif
#ifndef ROOT_ROOTCoreTeam #define ROOT_ROOTCoreTeam namespace ROOT { namespace ROOTX { //This string will be updated by external script, reading names from http://root.cern.ch/gitstats/authors.html. //The names are sorted in alphabetical order. //The string has an internal linkage (it has a definition here, not in rootxx.cxx or rootx-cocoa.mm files. //So this header can be included in different places (as soon as you know what you're doing). //Please, do not modify this file. const char * gROOTCoreTeam = //[STRINGTOREPLACE "Andrei Gheata, Axel Naumann, Bertrand Bellenot, Cristina Cristescu," " Danilo Piparo, Fons Rademakers, Gerardo Ganis, Ilka Antcheva," " Lorenzo Moneta, Matevz Tadel, Olivier Couet, Paul Russo, Pere Mato," " Philippe Canal, Rene Brun, Timur Pocheptsov, Valeri Onuchin," " Vassil Vassilev, Wim Lavrijsen, Wouter Verkerke.\n\n"; //STRINGTOREPLACE] } } #endif
Make it even simpler for a script to replace.
Make it even simpler for a script to replace.
C
lgpl-2.1
CristinaCristescu/root,esakellari/root,0x0all/ROOT,smarinac/root,pspe/root,lgiommi/root,davidlt/root,arch1tect0r/root,pspe/root,vukasinmilosevic/root,satyarth934/root,mhuwiler/rootauto,Y--/root,krafczyk/root,krafczyk/root,Y--/root,sawenzel/root,zzxuanyuan/root,satyarth934/root,zzxuanyuan/root-compressor-dummy,sbinet/cxx-root,davidlt/root,thomaskeck/root,buuck/root,sawenzel/root,omazapa/root-old,omazapa/root,arch1tect0r/root,mkret2/root,beniz/root,agarciamontoro/root,gbitzes/root,sbinet/cxx-root,sawenzel/root,gbitzes/root,perovic/root,zzxuanyuan/root,gbitzes/root,omazapa/root-old,pspe/root,agarciamontoro/root,esakellari/root,beniz/root,gganis/root,georgtroska/root,veprbl/root,Duraznos/root,olifre/root,esakellari/root,pspe/root,sirinath/root,veprbl/root,veprbl/root,evgeny-boger/root,olifre/root,lgiommi/root,BerserkerTroll/root,omazapa/root,Y--/root,evgeny-boger/root,karies/root,sirinath/root,perovic/root,omazapa/root-old,satyarth934/root,mkret2/root,gganis/root,olifre/root,mattkretz/root,simonpf/root,krafczyk/root,dfunke/root,zzxuanyuan/root,zzxuanyuan/root,mattkretz/root,nilqed/root,0x0all/ROOT,nilqed/root,sbinet/cxx-root,davidlt/root,mkret2/root,perovic/root,abhinavmoudgil95/root,omazapa/root,abhinavmoudgil95/root,esakellari/root,omazapa/root,vukasinmilosevic/root,simonpf/root,sawenzel/root,sirinath/root,gbitzes/root,gbitzes/root,nilqed/root,pspe/root,sirinath/root,Duraznos/root,CristinaCristescu/root,davidlt/root,0x0all/ROOT,root-mirror/root,beniz/root,evgeny-boger/root,esakellari/my_root_for_test,georgtroska/root,georgtroska/root,vukasinmilosevic/root,sirinath/root,mattkretz/root,jrtomps/root,thomaskeck/root,mattkretz/root,agarciamontoro/root,arch1tect0r/root,Duraznos/root,krafczyk/root,georgtroska/root,buuck/root,arch1tect0r/root,gbitzes/root,jrtomps/root,agarciamontoro/root,arch1tect0r/root,zzxuanyuan/root-compressor-dummy,jrtomps/root,karies/root,krafczyk/root,CristinaCristescu/root,omazapa/root,BerserkerTroll/root,root-mirror/root,veprbl/root,lgiommi/root,omazapa/root-old,gbitzes/root,mattkretz/root,lgiommi/root,vukasinmilosevic/root,lgiommi/root,evgeny-boger/root,veprbl/root,mkret2/root,beniz/root,krafczyk/root,BerserkerTroll/root,agarciamontoro/root,perovic/root,satyarth934/root,georgtroska/root,mattkretz/root,BerserkerTroll/root,gganis/root,davidlt/root,lgiommi/root,olifre/root,jrtomps/root,root-mirror/root,Duraznos/root,BerserkerTroll/root,buuck/root,arch1tect0r/root,vukasinmilosevic/root,buuck/root,zzxuanyuan/root,simonpf/root,sbinet/cxx-root,BerserkerTroll/root,dfunke/root,satyarth934/root,arch1tect0r/root,beniz/root,perovic/root,omazapa/root-old,simonpf/root,olifre/root,dfunke/root,davidlt/root,bbockelm/root,smarinac/root,perovic/root,0x0all/ROOT,olifre/root,sirinath/root,Duraznos/root,beniz/root,veprbl/root,evgeny-boger/root,zzxuanyuan/root-compressor-dummy,simonpf/root,CristinaCristescu/root,gbitzes/root,gganis/root,arch1tect0r/root,BerserkerTroll/root,pspe/root,nilqed/root,vukasinmilosevic/root,root-mirror/root,buuck/root,root-mirror/root,gganis/root,perovic/root,pspe/root,pspe/root,esakellari/my_root_for_test,abhinavmoudgil95/root,sbinet/cxx-root,nilqed/root,bbockelm/root,abhinavmoudgil95/root,Y--/root,mhuwiler/rootauto,omazapa/root-old,abhinavmoudgil95/root,bbockelm/root,thomaskeck/root,buuck/root,karies/root,dfunke/root,esakellari/my_root_for_test,jrtomps/root,abhinavmoudgil95/root,simonpf/root,omazapa/root-old,esakellari/my_root_for_test,root-mirror/root,davidlt/root,karies/root,perovic/root,Y--/root,esakellari/root,esakellari/root,sawenzel/root,agarciamontoro/root,mhuwiler/rootauto,mhuwiler/rootauto,zzxuanyuan/root-compressor-dummy,mattkretz/root,zzxuanyuan/root,Y--/root,olifre/root,gbitzes/root,lgiommi/root,agarciamontoro/root,vukasinmilosevic/root,simonpf/root,pspe/root,Y--/root,esakellari/my_root_for_test,beniz/root,root-mirror/root,vukasinmilosevic/root,sirinath/root,davidlt/root,jrtomps/root,satyarth934/root,lgiommi/root,sbinet/cxx-root,CristinaCristescu/root,satyarth934/root,0x0all/ROOT,sawenzel/root,mkret2/root,vukasinmilosevic/root,dfunke/root,sbinet/cxx-root,satyarth934/root,smarinac/root,nilqed/root,georgtroska/root,veprbl/root,arch1tect0r/root,bbockelm/root,0x0all/ROOT,karies/root,bbockelm/root,thomaskeck/root,CristinaCristescu/root,smarinac/root,thomaskeck/root,CristinaCristescu/root,mattkretz/root,simonpf/root,abhinavmoudgil95/root,dfunke/root,evgeny-boger/root,mhuwiler/rootauto,esakellari/my_root_for_test,esakellari/root,pspe/root,Duraznos/root,evgeny-boger/root,nilqed/root,zzxuanyuan/root,zzxuanyuan/root,zzxuanyuan/root-compressor-dummy,beniz/root,nilqed/root,lgiommi/root,sirinath/root,nilqed/root,gganis/root,jrtomps/root,veprbl/root,bbockelm/root,esakellari/root,olifre/root,perovic/root,buuck/root,mkret2/root,lgiommi/root,perovic/root,pspe/root,omazapa/root-old,0x0all/ROOT,beniz/root,mkret2/root,root-mirror/root,BerserkerTroll/root,sirinath/root,krafczyk/root,gbitzes/root,smarinac/root,root-mirror/root,omazapa/root,sawenzel/root,thomaskeck/root,esakellari/my_root_for_test,sawenzel/root,smarinac/root,satyarth934/root,zzxuanyuan/root,abhinavmoudgil95/root,bbockelm/root,sirinath/root,mkret2/root,veprbl/root,abhinavmoudgil95/root,thomaskeck/root,davidlt/root,karies/root,evgeny-boger/root,BerserkerTroll/root,omazapa/root-old,beniz/root,BerserkerTroll/root,jrtomps/root,karies/root,Y--/root,dfunke/root,mhuwiler/rootauto,simonpf/root,esakellari/my_root_for_test,zzxuanyuan/root-compressor-dummy,mhuwiler/rootauto,zzxuanyuan/root,gganis/root,gganis/root,Duraznos/root,veprbl/root,sawenzel/root,agarciamontoro/root,omazapa/root-old,BerserkerTroll/root,CristinaCristescu/root,gbitzes/root,krafczyk/root,thomaskeck/root,buuck/root,lgiommi/root,georgtroska/root,gganis/root,mhuwiler/rootauto,mattkretz/root,nilqed/root,mkret2/root,sbinet/cxx-root,beniz/root,perovic/root,davidlt/root,sirinath/root,jrtomps/root,karies/root,jrtomps/root,mkret2/root,Y--/root,smarinac/root,sbinet/cxx-root,evgeny-boger/root,bbockelm/root,zzxuanyuan/root,Duraznos/root,mhuwiler/rootauto,omazapa/root,nilqed/root,bbockelm/root,karies/root,agarciamontoro/root,georgtroska/root,gganis/root,mhuwiler/rootauto,sbinet/cxx-root,karies/root,0x0all/ROOT,arch1tect0r/root,sawenzel/root,smarinac/root,omazapa/root,gganis/root,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy,abhinavmoudgil95/root,buuck/root,dfunke/root,thomaskeck/root,krafczyk/root,Y--/root,davidlt/root,bbockelm/root,0x0all/ROOT,evgeny-boger/root,jrtomps/root,sawenzel/root,Duraznos/root,dfunke/root,esakellari/my_root_for_test,veprbl/root,mkret2/root,Duraznos/root,satyarth934/root,georgtroska/root,buuck/root,simonpf/root,mattkretz/root,dfunke/root,Y--/root,bbockelm/root,arch1tect0r/root,root-mirror/root,CristinaCristescu/root,omazapa/root-old,sbinet/cxx-root,Duraznos/root,vukasinmilosevic/root,abhinavmoudgil95/root,thomaskeck/root,agarciamontoro/root,olifre/root,esakellari/root,karies/root,dfunke/root,krafczyk/root,mattkretz/root,smarinac/root,georgtroska/root,evgeny-boger/root,simonpf/root,olifre/root,smarinac/root,esakellari/root,agarciamontoro/root,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root,olifre/root,vukasinmilosevic/root,esakellari/my_root_for_test,georgtroska/root,omazapa/root,omazapa/root,root-mirror/root,CristinaCristescu/root,satyarth934/root,zzxuanyuan/root-compressor-dummy,krafczyk/root,buuck/root,omazapa/root,zzxuanyuan/root-compressor-dummy,mhuwiler/rootauto,CristinaCristescu/root,esakellari/root
2259c582f031fefe09792543f89da286245f6a88
data/main.c
data/main.c
#include <stdio.h> int main() { printf("Hello, world!\n"); }
#include <stdio.h> int main() { printf("Hello, world!\n"); return 0; }
Add proper return code to test software.
Add proper return code to test software.
C
bsd-3-clause
jlisee/cbd,jlisee/cbd,jlisee/cbd
b8cfdf3f2e53241c12ef7adb49006e526ada3f37
MCSMKeychainItem.h
MCSMKeychainItem.h
// // MCSMKeychainItem.h // MCSMFoundation // // Created by Spencer MacDonald on 12/10/2011. // Copyright 2012 Square Bracket Software. All rights reserved. // #import <Foundation/Foundation.h> #if TARGET_OS_MAC && !TARGET_IPHONE_SIMULATOR #import <Carbon/Carbon.h> #endif #import <Security/Security.h> @interface MCSMKeychainItem : NSObject #if TARGET_OS_MAC && !TARGET_IPHONE_SIMULATOR + (void)lockKeychain; + (void)unlockKeychain; #endif @property (readonly, copy) NSString *username; @property (readonly, copy) NSString *password; - (BOOL)removeFromKeychain; @end @interface MCSMGenericKeychainItem : MCSMKeychainItem @property (readonly, copy) NSString *service; + (MCSMGenericKeychainItem *)genericKeychainItemForService:(NSString *)service username:(NSString *)username; + (MCSMGenericKeychainItem *)genericKeychainItemWithService:(NSString *)service username:(NSString *)username password:(NSString *)password; @end
// // MCSMKeychainItem.h // MCSMFoundation // // Created by Spencer MacDonald on 12/10/2011. // Copyright 2012 Square Bracket Software. All rights reserved. // #import <Foundation/Foundation.h> #import <Security/Security.h> @interface MCSMKeychainItem : NSObject #if TARGET_OS_MAC && !TARGET_IPHONE_SIMULATOR + (void)lockKeychain; + (void)unlockKeychain; #endif @property (readonly, copy) NSString *username; @property (readonly, copy) NSString *password; - (BOOL)removeFromKeychain; @end @interface MCSMGenericKeychainItem : MCSMKeychainItem @property (readonly, copy) NSString *service; + (MCSMGenericKeychainItem *)genericKeychainItemForService:(NSString *)service username:(NSString *)username; + (MCSMGenericKeychainItem *)genericKeychainItemWithService:(NSString *)service username:(NSString *)username password:(NSString *)password; @end
Remove the need for the Carbon Framework on OS X
Remove the need for the Carbon Framework on OS X The Carbon Framework was left in the header from previous versions.
C
bsd-3-clause
ObjColumnist/MCSMKeychainItem
f9f554b9710c0f5dfd758071d4a6272c2274add4
urbackupserver/server_ping.h
urbackupserver/server_ping.h
#include "../Interface/Thread.h" #include "../Interface/Mutex.h" class ClientMain; struct SProcess; class ServerPingThread : public IThread { public: ServerPingThread(ClientMain *client_main, const std::string& clientname, size_t status_id, bool with_eta, std::string server_token); void operator()(void); void setStop(bool b); bool isTimeout(void); private: void setPaused(SProcess* proc, bool b); ClientMain *client_main; volatile bool stop; volatile bool is_timeout; bool with_eta; const std::string& clientname; size_t status_id; std::string server_token; };
#include "../Interface/Thread.h" #include "../Interface/Mutex.h" class ClientMain; struct SProcess; class ServerPingThread : public IThread { public: ServerPingThread(ClientMain *client_main, const std::string& clientname, size_t status_id, bool with_eta, std::string server_token); void operator()(void); void setStop(bool b); bool isTimeout(void); private: void setPaused(SProcess* proc, bool b); ClientMain *client_main; volatile bool stop; volatile bool is_timeout; bool with_eta; std::string clientname; size_t status_id; std::string server_token; };
Copy clientname instead of reference
Copy clientname instead of reference
C
agpl-3.0
uroni/urbackup_backend,uroni/urbackup_backend,uroni/urbackup_backend,uroni/urbackup_backend,uroni/urbackup_backend,uroni/urbackup_backend,uroni/urbackup_backend
1213144d03d3bc69979ea50b32979ddd2b7f8dd2
scanner.def.h
scanner.def.h
#ifndef CALC_SCANNER_DEF_H_ #define CALC_SCANNER_DEF_H_ typedef union { int int_value; } YYSTYPE; typedef struct { int function; int result; YYSTYPE lhs; YYSTYPE rhs; } BinaryFunction; class ParserState { public: int result; int eval; ParserState() : result(0) { } }; #endif // CALC_SCANNER_DEF_H_
#ifndef CALC_SCANNER_DEF_H_ #define CALC_SCANNER_DEF_H_ typedef union { int int_value; } YYSTYPE; class ParserState { public: int result; int eval; ParserState() : result(0) { } }; #endif // CALC_SCANNER_DEF_H_
Remove silly struct that's silly
Remove silly struct that's silly
C
mit
nic0lette/lemony,nic0lette/lemony,nic0lette/lemony
a8a06367f849d7742c7dace0fa2d4a395b513a43
include/llvm/Transforms/Utils/FunctionUtils.h
include/llvm/Transforms/Utils/FunctionUtils.h
//===-- Transform/Utils/FunctionUtils.h - Function Utils --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This family of functions perform manipulations on functions. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_UTILS_FUNCTION_H #define LLVM_TRANSFORMS_UTILS_FUNCTION_H namespace llvm { class Function; class Loop; /// ExtractLoop - rip out a natural loop into a new function /// Function* ExtractLoop(Loop *L); } #endif
//===-- Transform/Utils/FunctionUtils.h - Function Utils --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This family of functions perform manipulations on functions. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_UTILS_FUNCTION_H #define LLVM_TRANSFORMS_UTILS_FUNCTION_H namespace llvm { class Function; class Loop; /// ExtractLoop - rip out a natural loop into a new function /// Function* ExtractLoop(Loop *L); /// ExtractBasicBlock - rip out a basic block into a new function /// Function* ExtractBasicBlock(BasicBlock *BB); } #endif
Add ability to extract a single basic block into a new function.
Add ability to extract a single basic block into a new function. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@12052 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm
dac4534697ccd7250a4af3f573fafd040a3ca263
src/iotsaFS.h
src/iotsaFS.h
#ifndef _IOTSAFS_H_ #define _IOTSAFS_H_ // // SPIFFS/LittleFS choice is complex, also for include file differences on ESP32/ESP8266. // So put if all in a separate include file. // #include <FS.h> #ifdef IOTSA_WITH_LEGACY_SPIFFS #ifdef ESP32 #include <SPIFFS.h> #endif #define IOTSA_FS SPIFFS #define IOTSA_FS_NAME "SPIFFS" #else #include <LittleFS.h> #define IOTSA_FS LittleFS #define IOTSA_FS_NAME "LittleFS" #endif #endif
#ifndef _IOTSAFS_H_ #define _IOTSAFS_H_ // // SPIFFS/LittleFS choice is complex, also for include file differences on ESP32/ESP8266. // So put if all in a separate include file. // #include <FS.h> #ifdef IOTSA_WITH_LEGACY_SPIFFS #ifdef ESP32 #include <SPIFFS.h> #endif #define IOTSA_FS SPIFFS #define IOTSA_FS_NAME "SPIFFS" #else #ifdef ESP32 #include <LITTLEFS.h> #define IOTSA_FS LITTLEFS #else #include <LittleFS.h> #define IOTSA_FS LittleFS #endif #define IOTSA_FS_NAME "LittleFS" #endif #endif
Undo change for LittleFS include name: Arduino uses the capitalized one.
Undo change for LittleFS include name: Arduino uses the capitalized one.
C
mit
cwi-dis/iotsa,cwi-dis/iotsa,cwi-dis/iotsa,cwi-dis/iotsa
ef201bebe5afc91a2b99b45dacc8c6dd88ca9e58
arch/sparc/include/asm/rwsem-const.h
arch/sparc/include/asm/rwsem-const.h
/* rwsem-const.h: RW semaphore counter constants. */ #ifndef _SPARC64_RWSEM_CONST_H #define _SPARC64_RWSEM_CONST_H #define RWSEM_UNLOCKED_VALUE 0x00000000 #define RWSEM_ACTIVE_BIAS 0x00000001 #define RWSEM_ACTIVE_MASK 0x0000ffff #define RWSEM_WAITING_BIAS 0xffff0000 #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) #endif /* _SPARC64_RWSEM_CONST_H */
/* rwsem-const.h: RW semaphore counter constants. */ #ifndef _SPARC64_RWSEM_CONST_H #define _SPARC64_RWSEM_CONST_H #define RWSEM_UNLOCKED_VALUE 0x00000000 #define RWSEM_ACTIVE_BIAS 0x00000001 #define RWSEM_ACTIVE_MASK 0x0000ffff #define RWSEM_WAITING_BIAS (-0x00010000) #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) #endif /* _SPARC64_RWSEM_CONST_H */
Fix rwsem constant bug leading to hangs.
sparc64: Fix rwsem constant bug leading to hangs. As noticed by Linus, it is critical that some of the rwsem constants be signed. Yet, hex constants are unsigned unless explicitly casted or negated. The most critical one is RWSEM_WAITING_BIAS. This bug was exacerbated by commit 424acaaeb3a3932d64a9b4bd59df6cf72c22d8f3 ("rwsem: wake queued readers when writer blocks on active read lock") Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>
C
mit
KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,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
e067c269e4c9ac2bbc2d8b7691305aa6f78ba5b1
webkit/glue/plugins/ppb_private.h
webkit/glue/plugins/ppb_private.h
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ #define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ #include "ppapi/c/pp_var.h" #define PPB_PRIVATE_INTERFACE "PPB_Private;1" typedef enum _ppb_ResourceString { PPB_RESOURCE_STRING_PDF_GET_PASSWORD = 0, } PP_ResourceString; typedef struct _ppb_Private { // Returns a localized string. PP_Var (*GetLocalizedString)(PP_ResourceString string_id); } PPB_Private; #endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ #define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ #include "third_party/ppapi/c/pp_var.h" #define PPB_PRIVATE_INTERFACE "PPB_Private;1" typedef enum _ppb_ResourceString { PPB_RESOURCE_STRING_PDF_GET_PASSWORD = 0, } PP_ResourceString; typedef struct _ppb_Private { // Returns a localized string. PP_Var (*GetLocalizedString)(PP_ResourceString string_id); } PPB_Private; #endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
Add third_party/ prefix to ppapi include for checkdeps.
Add third_party/ prefix to ppapi include for checkdeps. The only users of this ppb should be inside chrome so this should work fine. TBR=jam@chromium.org Review URL: http://codereview.chromium.org/3019006 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@52766 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
PeterWangIntel/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk,keishi/chromium,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,dednal/chromium.src,jaruba/chromium.src,patrickm/chromium.src,zcbenz/cefode-chromium,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,robclark/chromium,littlstar/chromium.src,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,Jonekee/chromium.src,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,jaruba/chromium.src,Chilledheart/chromium,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,keishi/chromium,junmin-zhu/chromium-rivertrail,Pluto-tv/chromium-crosswalk,robclark/chromium,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk-efl,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,Chilledheart/chromium,dushu1203/chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,anirudhSK/chromium,dushu1203/chromium.src,hujiajie/pa-chromium,hujiajie/pa-chromium,anirudhSK/chromium,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,ltilve/chromium,dednal/chromium.src,M4sse/chromium.src,robclark/chromium,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,patrickm/chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,rogerwang/chromium,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,keishi/chromium,hgl888/chromium-crosswalk-efl,rogerwang/chromium,M4sse/chromium.src,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,robclark/chromium,patrickm/chromium.src,Jonekee/chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,robclark/chromium,ltilve/chromium,ondra-novak/chromium.src,ltilve/chromium,ondra-novak/chromium.src,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,markYoungH/chromium.src,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,littlstar/chromium.src,axinging/chromium-crosswalk,hujiajie/pa-chromium,Chilledheart/chromium,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,robclark/chromium,TheTypoMaster/chromium-crosswalk,rogerwang/chromium,littlstar/chromium.src,hujiajie/pa-chromium,jaruba/chromium.src,ltilve/chromium,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,keishi/chromium,rogerwang/chromium,Jonekee/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,patrickm/chromium.src,mogoweb/chromium-crosswalk,keishi/chromium,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,ltilve/chromium,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,Jonekee/chromium.src,M4sse/chromium.src,mogoweb/chromium-crosswalk,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,keishi/chromium,crosswalk-project/chromium-crosswalk-efl,hujiajie/pa-chromium,timopulkkinen/BubbleFish,robclark/chromium,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,ltilve/chromium,anirudhSK/chromium,dednal/chromium.src,rogerwang/chromium,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,Just-D/chromium-1,Chilledheart/chromium,ChromiumWebApps/chromium,dednal/chromium.src,ondra-novak/chromium.src,dednal/chromium.src,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,jaruba/chromium.src,chuan9/chromium-crosswalk,dushu1203/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,anirudhSK/chromium,rogerwang/chromium,ondra-novak/chromium.src,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,ondra-novak/chromium.src,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,jaruba/chromium.src,markYoungH/chromium.src,nacl-webkit/chrome_deps,rogerwang/chromium,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,M4sse/chromium.src,ltilve/chromium,krieger-od/nwjs_chromium.src,rogerwang/chromium,littlstar/chromium.src,anirudhSK/chromium,robclark/chromium,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,littlstar/chromium.src,anirudhSK/chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,ChromiumWebApps/chromium,ltilve/chromium,markYoungH/chromium.src,jaruba/chromium.src,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,keishi/chromium,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,Chilledheart/chromium,Chilledheart/chromium,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,anirudhSK/chromium,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,jaruba/chromium.src,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,markYoungH/chromium.src,ondra-novak/chromium.src,ltilve/chromium,patrickm/chromium.src,Fireblend/chromium-crosswalk,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,jaruba/chromium.src,Just-D/chromium-1,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,hujiajie/pa-chromium,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,keishi/chromium,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,markYoungH/chromium.src,keishi/chromium,jaruba/chromium.src,M4sse/chromium.src,chuan9/chromium-crosswalk,Chilledheart/chromium,ondra-novak/chromium.src,markYoungH/chromium.src,Jonekee/chromium.src,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,junmin-zhu/chromium-rivertrail,littlstar/chromium.src,bright-sparks/chromium-spacewalk,dednal/chromium.src,krieger-od/nwjs_chromium.src,Just-D/chromium-1,markYoungH/chromium.src,dushu1203/chromium.src,dushu1203/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk,keishi/chromium,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,M4sse/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk,Jonekee/chromium.src,patrickm/chromium.src,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,dednal/chromium.src,robclark/chromium,zcbenz/cefode-chromium,dushu1203/chromium.src,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,Just-D/chromium-1,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,Chilledheart/chromium,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,PeterWangIntel/chromium-crosswalk,keishi/chromium,bright-sparks/chromium-spacewalk,robclark/chromium,rogerwang/chromium,dednal/chromium.src,Just-D/chromium-1,zcbenz/cefode-chromium
8af989c23f030663c8b5a297e988970b4910b461
sandbox/linux/services/android_arm_ucontext.h
sandbox/linux/services/android_arm_ucontext.h
// 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 SANDBOX_LINUX_SERVICES_ANDROID_ARM_UCONTEXT_H_ #define SANDBOX_LINUX_SERVICES_ANDROID_ARM_UCONTEXT_H_ typedef long int greg_t; typedef unsigned long sigset_t; typedef struct ucontext { unsigned long uc_flags; struct ucontext *uc_link; stack_t uc_stack; struct sigcontext uc_mcontext; sigset_t uc_sigmask; /* Allow for uc_sigmask growth. Glibc uses a 1024-bit sigset_t. */ int __not_used[32 - (sizeof (sigset_t) / sizeof (int))]; /* Last for extensibility. Eight byte aligned because some coprocessors require eight byte alignment. */ unsigned long uc_regspace[128] __attribute__((__aligned__(8))); } ucontext_t; #endif // SANDBOX_LINUX_SERVICES_ANDROID_ARM_UCONTEXT_H_
// 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 SANDBOX_LINUX_SERVICES_ANDROID_ARM_UCONTEXT_H_ #define SANDBOX_LINUX_SERVICES_ANDROID_ARM_UCONTEXT_H_ #include <asm/sigcontext.h> typedef long int greg_t; typedef unsigned long sigset_t; typedef struct ucontext { unsigned long uc_flags; struct ucontext *uc_link; stack_t uc_stack; struct sigcontext uc_mcontext; sigset_t uc_sigmask; /* Allow for uc_sigmask growth. Glibc uses a 1024-bit sigset_t. */ int __not_used[32 - (sizeof (sigset_t) / sizeof (int))]; /* Last for extensibility. Eight byte aligned because some coprocessors require eight byte alignment. */ unsigned long uc_regspace[128] __attribute__((__aligned__(8))); } ucontext_t; #endif // SANDBOX_LINUX_SERVICES_ANDROID_ARM_UCONTEXT_H_
Fix for downstream android webview
Fix for downstream android webview Previously erros is struct sigcontext is not defined. Including the header file now. TBR=jln,markus Android only include change. Android trybots pass compile. NOTRY=true BUG= Review URL: https://chromiumcodereview.appspot.com/11636039 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@174104 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,fujunwei/chromium-crosswalk,jaruba/chromium.src,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,markYoungH/chromium.src,dushu1203/chromium.src,jaruba/chromium.src,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,ltilve/chromium,zcbenz/cefode-chromium,Just-D/chromium-1,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,timopulkkinen/BubbleFish,ondra-novak/chromium.src,dushu1203/chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,dushu1203/chromium.src,zcbenz/cefode-chromium,anirudhSK/chromium,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,hujiajie/pa-chromium,ondra-novak/chromium.src,markYoungH/chromium.src,Jonekee/chromium.src,ondra-novak/chromium.src,timopulkkinen/BubbleFish,ltilve/chromium,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,jaruba/chromium.src,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,littlstar/chromium.src,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,dushu1203/chromium.src,ondra-novak/chromium.src,littlstar/chromium.src,hgl888/chromium-crosswalk,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,anirudhSK/chromium,anirudhSK/chromium,ondra-novak/chromium.src,patrickm/chromium.src,dednal/chromium.src,Jonekee/chromium.src,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,mogoweb/chromium-crosswalk,anirudhSK/chromium,M4sse/chromium.src,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,patrickm/chromium.src,krieger-od/nwjs_chromium.src,dednal/chromium.src,Fireblend/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,dednal/chromium.src,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,mogoweb/chromium-crosswalk,dushu1203/chromium.src,timopulkkinen/BubbleFish,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,hgl888/chromium-crosswalk,Just-D/chromium-1,timopulkkinen/BubbleFish,Chilledheart/chromium,dednal/chromium.src,zcbenz/cefode-chromium,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,dednal/chromium.src,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,M4sse/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk,patrickm/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,jaruba/chromium.src,Chilledheart/chromium,patrickm/chromium.src,markYoungH/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,ltilve/chromium,ChromiumWebApps/chromium,Jonekee/chromium.src,Jonekee/chromium.src,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,markYoungH/chromium.src,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,ltilve/chromium,dushu1203/chromium.src,Chilledheart/chromium,axinging/chromium-crosswalk,M4sse/chromium.src,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,dednal/chromium.src,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,ltilve/chromium,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,M4sse/chromium.src,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,anirudhSK/chromium,dushu1203/chromium.src,ChromiumWebApps/chromium,patrickm/chromium.src,chuan9/chromium-crosswalk,M4sse/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,nacl-webkit/chrome_deps,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,patrickm/chromium.src,zcbenz/cefode-chromium,hujiajie/pa-chromium,chuan9/chromium-crosswalk,ondra-novak/chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,PeterWangIntel/chromium-crosswalk,littlstar/chromium.src,ltilve/chromium,markYoungH/chromium.src,ondra-novak/chromium.src,hujiajie/pa-chromium,M4sse/chromium.src,ChromiumWebApps/chromium,jaruba/chromium.src,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,zcbenz/cefode-chromium,Pluto-tv/chromium-crosswalk,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,nacl-webkit/chrome_deps,anirudhSK/chromium,hgl888/chromium-crosswalk,Jonekee/chromium.src,timopulkkinen/BubbleFish,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,zcbenz/cefode-chromium,zcbenz/cefode-chromium,littlstar/chromium.src,anirudhSK/chromium,Chilledheart/chromium,nacl-webkit/chrome_deps,anirudhSK/chromium,hujiajie/pa-chromium,hujiajie/pa-chromium,Chilledheart/chromium,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,zcbenz/cefode-chromium,ltilve/chromium,jaruba/chromium.src,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,dednal/chromium.src,zcbenz/cefode-chromium,Just-D/chromium-1,markYoungH/chromium.src,mogoweb/chromium-crosswalk,M4sse/chromium.src,axinging/chromium-crosswalk,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,mogoweb/chromium-crosswalk,Chilledheart/chromium,littlstar/chromium.src,jaruba/chromium.src,hujiajie/pa-chromium,ChromiumWebApps/chromium,Just-D/chromium-1,Chilledheart/chromium,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk
9d10ecc7460e73847079bd92234656cdff6fd6fe
src/devices.h
src/devices.h
/* Narcissus * © 2015 David Given * This file is redistributable under the terms of the two-clause BSD license; * see COPYING in the distribution root for the full text. */ #ifndef DEVICES_H #define DEVICES_H #include <X11/Xlib.h> struct button { int keycode; uint32_t button; }; struct chord { uint32_t buttons; int keysym; }; struct device { const char* name; struct button* buttons; struct chord* chords; }; extern const struct device razer_nostromo; extern const struct device* find_connected_device(Display* display, int* deviceid); extern const struct device* find_device_by_name(const char* name); extern void load_device(const struct device* device); uint32_t keycode_to_button(int keysym); int decode_chord(uint32_t buttons); #define MODIFIER_MASK ((1<<24) - 1) #define CTRL (1<<24) #define ALT (1<<25) #define META (1<<26) #endif
/* Narcissus * © 2015 David Given * This file is redistributable under the terms of the two-clause BSD license; * see COPYING in the distribution root for the full text. */ #ifndef DEVICES_H #define DEVICES_H #include <X11/Xlib.h> struct button { int keycode; uint32_t button; }; struct chord { uint32_t buttons; int keysym; }; struct device { const char* name; struct button* buttons; struct chord* chords; }; extern const struct device razer_nostromo; extern const struct device* find_connected_device(Display* display, int* deviceid); extern const struct device* find_device_by_name(const char* name); extern void load_device(const struct device* device); uint32_t keycode_to_button(int keysym); int decode_chord(uint32_t buttons); #define MODIFIER_MASK ((1<<24) - 1) #define CTRL (1<<24) #define ALT (1<<25) /* Note: META doesn't work with libfakekey 0.1-8.1 */ #define META (1<<26) #endif
Document that meta doesn't work.
Document that meta doesn't work.
C
bsd-2-clause
davidgiven/narcissus
22172bb584a97412e01d77f6cb3eb183aab06d56
boards/arm/cc3200_launchxl/board.h
boards/arm/cc3200_launchxl/board.h
/* * Copyright (c) 2016, Texas Instruments Incorporated * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __INC_BOARD_H #define __INC_BOARD_H #endif /* __INC_BOARD_H */
/* * Copyright (c) 2016, Texas Instruments Incorporated * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __INC_BOARD_H #define __INC_BOARD_H /* Push button switch 2 */ #define SW2_GPIO_PIN 6 /* GPIO22/Pin15 */ #define SW2_GPIO_NAME "GPIO_A2" /* Push button switch 3 */ #define SW3_GPIO_PIN 5 /* GPIO13/Pin4 */ #define SW3_GPIO_NAME "GPIO_A1" /* Push button switch 0: Map to SW2 so zephyr button example works */ #define SW0_GPIO_PIN SW2_GPIO_PIN #define SW0_GPIO_NAME SW2_GPIO_NAME /* Onboard GREEN LED */ #define LED0_GPIO_PIN 3 /*GPIO11/Pin2 */ #define LED0_GPIO_PORT "GPIO_A1" #endif /* __INC_BOARD_H */
Add generic definitions for LEDs and switches
cc3200: Add generic definitions for LEDs and switches Adds generic definitions for GPIO pins for onboard LEDs and switches to enable the basic blinky, button, and disco Zephyr examples for the TI CC3200 LaunchXL. Change-Id: Iac0ed2ad01285f9e84eea1fa7013771ddd8d3a78 Signed-off-by: Gil Pitney <477da50908f0a7963c2c490cce0ff096d2cac162@linaro.org>
C
apache-2.0
zephyrproject-rtos/zephyr,GiulianoFranchetto/zephyr,fractalclone/zephyr-riscv,Vudentz/zephyr,explora26/zephyr,punitvara/zephyr,bboozzoo/zephyr,aceofall/zephyr-iotos,Vudentz/zephyr,runchip/zephyr-cc3200,Vudentz/zephyr,GiulianoFranchetto/zephyr,mbolivar/zephyr,explora26/zephyr,sharronliu/zephyr,sharronliu/zephyr,rsalveti/zephyr,mbolivar/zephyr,fbsder/zephyr,sharronliu/zephyr,bboozzoo/zephyr,pklazy/zephyr,ldts/zephyr,runchip/zephyr-cc3200,tidyjiang8/zephyr-doc,pklazy/zephyr,kraj/zephyr,punitvara/zephyr,erwango/zephyr,kraj/zephyr,tidyjiang8/zephyr-doc,fractalclone/zephyr-riscv,bigdinotech/zephyr,holtmann/zephyr,ldts/zephyr,fbsder/zephyr,ldts/zephyr,runchip/zephyr-cc3220,erwango/zephyr,aceofall/zephyr-iotos,zephyrproject-rtos/zephyr,GiulianoFranchetto/zephyr,pklazy/zephyr,sharronliu/zephyr,mbolivar/zephyr,rsalveti/zephyr,punitvara/zephyr,zephyriot/zephyr,finikorg/zephyr,bigdinotech/zephyr,zephyriot/zephyr,explora26/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,Vudentz/zephyr,rsalveti/zephyr,rsalveti/zephyr,holtmann/zephyr,bboozzoo/zephyr,finikorg/zephyr,runchip/zephyr-cc3220,punitvara/zephyr,finikorg/zephyr,runchip/zephyr-cc3220,bboozzoo/zephyr,galak/zephyr,ldts/zephyr,rsalveti/zephyr,pklazy/zephyr,aceofall/zephyr-iotos,holtmann/zephyr,nashif/zephyr,explora26/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,erwango/zephyr,finikorg/zephyr,kraj/zephyr,finikorg/zephyr,galak/zephyr,runchip/zephyr-cc3200,tidyjiang8/zephyr-doc,runchip/zephyr-cc3220,pklazy/zephyr,kraj/zephyr,GiulianoFranchetto/zephyr,bigdinotech/zephyr,fbsder/zephyr,galak/zephyr,GiulianoFranchetto/zephyr,zephyriot/zephyr,bigdinotech/zephyr,galak/zephyr,aceofall/zephyr-iotos,fractalclone/zephyr-riscv,zephyrproject-rtos/zephyr,erwango/zephyr,runchip/zephyr-cc3200,galak/zephyr,runchip/zephyr-cc3200,nashif/zephyr,runchip/zephyr-cc3220,mbolivar/zephyr,holtmann/zephyr,fbsder/zephyr,Vudentz/zephyr,Vudentz/zephyr,nashif/zephyr,mbolivar/zephyr,tidyjiang8/zephyr-doc,fractalclone/zephyr-riscv,fractalclone/zephyr-riscv,punitvara/zephyr,fbsder/zephyr,zephyriot/zephyr,kraj/zephyr,bboozzoo/zephyr,zephyriot/zephyr,ldts/zephyr,aceofall/zephyr-iotos,sharronliu/zephyr,holtmann/zephyr,erwango/zephyr,bigdinotech/zephyr,explora26/zephyr,tidyjiang8/zephyr-doc
7d51c07f00043f980050a06bd4e4a7b6983a78f6
JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.h
JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.h
#include <stdio.h> /* Interface to JPEG code */ #include "jpeglib.h" #include <setjmp.h> struct error_mgr2 { struct jpeg_error_mgr pub; /* "public" fields */ jmp_buf setjmp_buffer; /* for return to caller */ }; typedef struct error_mgr2* error_ptr2; void error_exit (j_common_ptr cinfo); GLOBAL(void) jpeg_mem_src (j_decompress_ptr cinfo, char * pSourceData, unsigned sourceDataSize); GLOBAL(int) jpeg_mem_src_newLocationOfData (j_decompress_ptr cinfo, char * pSourceData, unsigned sourceDataSize); GLOBAL(void) jpeg_mem_dest (j_compress_ptr cinfo, char * pDestination, unsigned *pDestinationSize); void primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgrWriteScanlines( unsigned int, unsigned int, int, unsigned int*, char*, char*, int, int, unsigned int, unsigned int, char*, unsigned int*); void primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgrReadScanlines( char*, char*, char*, unsigned int, int, unsigned int*, unsigned int, unsigned int, int); void primJPEGReadHeaderfromByteArraysizeerrorMgrReadHeader( char*, char*, unsigned int); char*);
#include <stdio.h> /* Interface to JPEG code */ #include "jpeglib.h" #include <setjmp.h> struct error_mgr2 { struct jpeg_error_mgr pub; /* "public" fields */ jmp_buf setjmp_buffer; /* for return to caller */ }; typedef struct error_mgr2* error_ptr2; void error_exit (j_common_ptr cinfo); GLOBAL(void) jpeg_mem_src (j_decompress_ptr cinfo, char * pSourceData, unsigned sourceDataSize); GLOBAL(int) jpeg_mem_src_newLocationOfData (j_decompress_ptr cinfo, char * pSourceData, unsigned sourceDataSize); GLOBAL(void) jpeg_mem_dest (j_compress_ptr cinfo, char * pDestination, unsigned *pDestinationSize); void primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgrWriteScanlines( unsigned int, unsigned int, int, unsigned int*, char*, char*, int, int, unsigned int, unsigned int, char*, unsigned int*); void primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgrReadScanlines( char*, char*, char*, unsigned int, int, unsigned int*, unsigned int, unsigned int, int); void primJPEGReadHeaderfromByteArraysizeerrorMgrReadHeader( char*, char*, unsigned int, char*);
Fix typo in method signature
Fix typo in method signature git-svn-id: http://squeakvm.org/svn/squeak/trunk@3745 fa1542d4-bde8-0310-ad64-8ed1123d492a Former-commit-id: 76afe8ba507e75296f2fbba2c2c20aaa29c41819
C
mit
bencoman/pharo-vm,bencoman/pharo-vm,OpenSmalltalk/vm,peteruhnak/pharo-vm,bencoman/pharo-vm,timfel/squeakvm,peteruhnak/pharo-vm,peteruhnak/pharo-vm,OpenSmalltalk/vm,timfel/squeakvm,OpenSmalltalk/vm,peteruhnak/pharo-vm,timfel/squeakvm,peteruhnak/pharo-vm,OpenSmalltalk/vm,timfel/squeakvm,bencoman/pharo-vm,timfel/squeakvm,bencoman/pharo-vm,timfel/squeakvm,bencoman/pharo-vm,OpenSmalltalk/vm,peteruhnak/pharo-vm,timfel/squeakvm,peteruhnak/pharo-vm,bencoman/pharo-vm,peteruhnak/pharo-vm,OpenSmalltalk/vm,bencoman/pharo-vm,timfel/squeakvm,bencoman/pharo-vm,OpenSmalltalk/vm,OpenSmalltalk/vm
d9d5db9efedbf1ca9ddd11e0f2eff2a4b04afe90
stutterfuzz.c
stutterfuzz.c
#include <stdio.h> #include <stdint.h> #include "rand.h" static uint64_t sqrt64(uint64_t n) { uint64_t g = UINT64_C(1) << 31; for (uint64_t c = g; c; g |= c) { if (g * g > n) { g ^= c; } c >>= 1; } return g; } static uint64_t get_split(uint64_t len) { uint64_t rnd; rand_fill(&rnd, sizeof(rnd)); rnd %= (len * len); return sqrt64(rnd) + 1; } int main(int __attribute__ ((unused)) argc, char __attribute__ ((unused)) *argv[]) { rand_init(); for (uint64_t len = 1397; len;) { uint64_t consume = get_split(len); fprintf(stderr, "consume %ju bytes\n", (uintmax_t) consume); len -= consume; } rand_cleanup(); }
#include <stdio.h> #include <stdint.h> #include "rand.h" static uint64_t get_split(uint64_t total_len, uint64_t remaining_len) { uint64_t rnd; rand_fill(&rnd, sizeof(rnd)); rnd %= total_len; return rnd > remaining_len ? remaining_len : rnd; } int main(int __attribute__ ((unused)) argc, char __attribute__ ((unused)) *argv[]) { rand_init(); uint64_t total_len = 1397; for (uint64_t remaining = total_len, consume = 0; remaining; remaining -= consume) { consume = get_split(total_len, remaining); fprintf(stderr, "consume %ju bytes\n", (uintmax_t) consume); } rand_cleanup(); }
Fix random algo to evenly distribute.
Fix random algo to evenly distribute.
C
apache-2.0
flamingcowtv/stutterfuzz
f007fbd9af3299d047f0b1dce1ffb2b625775133
src/include/impl/kernel/slab_static.h
src/include/impl/kernel/slab_static.h
/** * @file * @brief Internal implementation of static slab allocator * * @date 07.03.2011 * @author Kirill Tyushev */ #ifndef SLAB_STATIC_H_ # error "Do not include this file directly, use <kernel/mm/slab_static.h> instead!" #endif /* SLAB_STATIC_H_ */ #include <util/binalign.h> /** cache descriptor */ struct static_cache { /** pointer to pool */ char* cache_begin; /** object size */ size_t size; /** the number of objects stored on each slab */ unsigned int num; /** the list of free objects in pool */ struct list_head obj_ptr; /** for initialization */ int hasinit; }; /** create cache */ #define __STATIC_CACHE_CREATE(name, type, count) \ static char __name_pool[count * binalign_bound(sizeof(type), sizeof(struct list_head))]; \ static static_cache_t name = { \ .num = count, \ .size = binalign_bound(sizeof(type), sizeof(struct list_head)), \ .cache_begin = __name_pool, \ .obj_ptr = {NULL, NULL}, \ .hasinit = 0 }
/** * @file * @brief Internal implementation of static slab allocator * * @date 07.03.2011 * @author Kirill Tyushev */ #ifndef SLAB_STATIC_H_ # error "Do not include this file directly, use <kernel/mm/slab_static.h> instead!" #endif /* SLAB_STATIC_H_ */ #include <util/binalign.h> /** cache descriptor */ struct static_cache { /** pointer to pool */ char* cache_begin; /** object size */ size_t size; /** the number of objects stored on each slab */ unsigned int num; /** the list of free objects in pool */ struct list_head obj_ptr; /** for initialization */ int hasinit; }; /** create cache */ #define __STATIC_CACHE_CREATE(name, type, count) \ static char name ## _pool[count * binalign_bound(sizeof(type), sizeof(struct list_head))]; \ static static_cache_t name = { \ .num = count, \ .size = binalign_bound(sizeof(type), sizeof(struct list_head)), \ .cache_begin = name ## _pool, \ .obj_ptr = {NULL, NULL}, \ .hasinit = 0 }
Fix macro replacement: removal of conflict with __name_pool
Fix macro replacement: removal of conflict with __name_pool (using pasting)
C
bsd-2-clause
Kefir0192/embox,vrxfile/embox-trik,embox/embox,abusalimov/embox,gzoom13/embox,Kakadu/embox,Kefir0192/embox,abusalimov/embox,Kefir0192/embox,Kefir0192/embox,embox/embox,Kefir0192/embox,vrxfile/embox-trik,mike2390/embox,mike2390/embox,abusalimov/embox,mike2390/embox,vrxfile/embox-trik,Kakadu/embox,mike2390/embox,vrxfile/embox-trik,Kakadu/embox,Kakadu/embox,gzoom13/embox,abusalimov/embox,gzoom13/embox,Kefir0192/embox,Kakadu/embox,abusalimov/embox,Kefir0192/embox,abusalimov/embox,mike2390/embox,vrxfile/embox-trik,embox/embox,gzoom13/embox,embox/embox,gzoom13/embox,embox/embox,gzoom13/embox,mike2390/embox,mike2390/embox,vrxfile/embox-trik,vrxfile/embox-trik,Kakadu/embox,gzoom13/embox,embox/embox,Kakadu/embox
9b662d66ce40ee91314cf392a73cf6991a654172
src/lib/ecore/Ecore_Str.h
src/lib/ecore/Ecore_Str.h
#ifndef _ECORE_STR_H # define _ECORE_STR_H #ifdef EAPI #undef EAPI #endif #ifdef WIN32 # ifdef BUILDING_DLL # define EAPI __declspec(dllexport) # else # define EAPI __declspec(dllimport) # endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 # define EAPI __attribute__ ((visibility("default"))) # else # define EAPI # endif # else # define EAPI # endif #endif /** * @file Ecore_Data.h * @brief Contains threading, list, hash, debugging and tree functions. */ # ifdef __cplusplus extern "C" { # endif # ifdef __sgi # define __FUNCTION__ "unknown" # ifndef __cplusplus # define inline # endif # endif /* strlcpy implementation for libc's lacking it */ EAPI size_t ecore_strlcpy(char *dst, const char *src, size_t siz); #ifdef __cplusplus } #endif #endif /* _ECORE_STR_H */
#ifndef _ECORE_STR_H # define _ECORE_STR_H #ifdef EAPI #undef EAPI #endif #ifdef WIN32 # ifdef BUILDING_DLL # define EAPI __declspec(dllexport) # else # define EAPI __declspec(dllimport) # endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 # define EAPI __attribute__ ((visibility("default"))) # else # define EAPI # endif # else # define EAPI # endif #endif /** * @file Ecore_Str.h * @brief Contains useful C string functions. */ # ifdef __cplusplus extern "C" { # endif # ifdef __sgi # define __FUNCTION__ "unknown" # ifndef __cplusplus # define inline # endif # endif /* strlcpy implementation for libc's lacking it */ EAPI size_t ecore_strlcpy(char *dst, const char *src, size_t siz); #ifdef __cplusplus } #endif #endif /* _ECORE_STR_H */
Fix doxygen comments for new header.
Fix doxygen comments for new header. SVN revision: 27891
C
bsd-2-clause
gfriloux/ecore,gfriloux/ecore,gfriloux/ecore