commit
stringlengths
40
40
old_file
stringlengths
4
112
new_file
stringlengths
4
112
old_contents
stringlengths
0
2.05k
new_contents
stringlengths
28
3.9k
subject
stringlengths
17
736
message
stringlengths
18
4.78k
lang
stringclasses
1 value
license
stringclasses
13 values
repos
stringlengths
7
111k
fa1d808ecb2f1ec49f77f8eeecdda83c3d8eae76
test/main.c
test/main.c
#include <arpa/inet.h> #include <netinet/in.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <unistd.h> int main() { struct sockaddr_in serv_addr; memset(&serv_addr, 0, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); serv_addr.sin_port = htons(7899); int fd = socket(AF_INET, SOCK_STREAM, 0); if (connect(fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) { fprintf(stderr, "Failed to connect with server\n"); return EXIT_FAILURE; } char buffer[1000]; char *write_ptr = buffer; const char *msg = "Hello World!"; uint32_t len = strlen(msg); len = htobe32(len); memcpy(write_ptr, &len, sizeof(len)); write_ptr += sizeof(len); memcpy(write_ptr, msg, strlen(msg)); write_ptr += strlen(msg); memcpy(write_ptr, &len, sizeof(len)); write_ptr += sizeof(len); memcpy(write_ptr, msg, strlen(msg)); write_ptr += strlen(msg); write(fd, buffer, write_ptr - buffer); close(fd); return EXIT_SUCCESS; }
Add some basic test for message handling.
Add some basic test for message handling.
C
mit
gatzka/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,mloy/cjet,mloy/cjet,gatzka/cjet
43d84dfbfe362574f4c289da1103232769b77a89
MWEditorAddOns/MTextAddOn.h
MWEditorAddOns/MTextAddOn.h
//================================================================== // MTextAddOn.h // Copyright 1996 Metrowerks Corporation, All Rights Reserved. //================================================================== // This is a proxy class used by Editor add_ons. It does not inherit from BView // but provides an abstract interface to a text engine. #ifndef _MTEXTADDON_H #define _MTEXTADDON_H #include <SupportKit.h> class MIDETextView; class BWindow; struct entry_ref; class MTextAddOn { public: MTextAddOn( MIDETextView& inTextView); virtual ~MTextAddOn(); virtual const char* Text(); virtual int32 TextLength() const; virtual void GetSelection( int32 *start, int32 *end) const; virtual void Select( int32 newStart, int32 newEnd); virtual void Delete(); virtual void Insert( const char* inText); virtual void Insert( const char* text, int32 length); virtual BWindow* Window(); virtual status_t GetRef( entry_ref& outRef); virtual bool IsEditable(); private: MIDETextView& fText; }; #endif
Add BeIDE header required for building
Add BeIDE header required for building Copyright 1996 Metrowerks Corporation, All Rights Reserved.
C
mit
mmuman/dontworry,mmuman/dontworry
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
f17a48d1f85e2f23638ba42ab1915c2757acd39b
fw/libs/AdapterBoard/usb_commands.h
fw/libs/AdapterBoard/usb_commands.h
#ifndef USB_COMMANDS_H #define USB_COMMANDS_H #define CMD_ACK 0xAF #define CMD_RESP 0xBF #define CMD_BL_ON 0x10 #define CMD_BL_OFF 0x11 #define CMD_BL_LEVEL 0x12 #define CMD_BL_UP 0x13 #define CMD_BL_DOWN 0x14 #define CMD_BL_GET_STATE 0x1F #define CMD_RGB_SET 0x20 #define CMD_RGB_GET 0x2F #endif
Declare all supported USB commands
Declare all supported USB commands
C
bsd-3-clause
OSCARAdapter/OSCAR,OSCARAdapter/OSCAR
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
db9d3ddf48a03745e0a2b77f5cd3e2925539d1a6
drivers/include/nvram-spi.h
drivers/include/nvram-spi.h
/* * Copyright (C) 2015 Eistec AB * * This file is subject to the terms and conditions of the GNU Lesser General * Public License v2.1. See the file LICENSE in the top level directory for more * details. */ /** * @ingroup nvram * @{ * * @file * * @brief Device interface for various SPI connected NVRAM. * * Tested on: * - Cypress/Ramtron FM25L04B. * * @author Joakim Gebart <[email protected]> */ #ifndef DRIVERS_NVRAM_SPI_H_ #define DRIVERS_NVRAM_SPI_H_ #include <stdint.h> #include "nvram.h" #include "periph/spi.h" #include "periph/gpio.h" #ifdef __cplusplus extern "C" { #endif /** * @brief Bus parameters for SPI NVRAM. */ typedef struct nvram_spi_params { /** @brief RIOT SPI device */ spi_t spi; /** @brief Chip select pin */ gpio_t cs; /** @brief Number of address bytes following each read/write command. */ uint8_t address_count; } nvram_spi_params_t; /** * @brief Initialize an nvram_t structure with SPI settings. * * This will also initialize the CS pin as a GPIO output, without pull resistors. * * @param[out] dev Pointer to NVRAM device descriptor * @param[out] spi_params Pointer to SPI settings * @param[in] size Device capacity * * @return 0 on success * @return <0 on errors */ int nvram_spi_init(nvram_t *dev, nvram_spi_params_t *spi_params, size_t size); #ifdef __cplusplus } #endif #endif /* DRIVERS_NVRAM_SPI_H_ */ /** @} */
Add generic SPI connected NVRAM interface.
nvram: Add generic SPI connected NVRAM interface.
C
lgpl-2.1
malosek/RIOT,alex1818/RIOT,gautric/RIOT,EmuxEvans/RIOT,gbarnett/RIOT,phiros/RIOT,abp719/RIOT,tfar/RIOT,rajma996/RIOT,sgso/RIOT,ant9000/RIOT,shady33/RIOT,malosek/RIOT,plushvoxel/RIOT,neumodisch/RIOT,binarylemon/RIOT,kaspar030/RIOT,herrfz/RIOT,basilfx/RIOT,BytesGalore/RIOT,rakendrathapa/RIOT,bartfaizoltan/RIOT,Yonezawa-T2/RIOT,aeneby/RIOT,thomaseichinger/RIOT,automote/RIOT,mtausig/RIOT,brettswann/RIOT,miri64/RIOT,jremmert-phytec-iot/RIOT,altairpearl/RIOT,fnack/RIOT,MarkXYang/RIOT,toonst/RIOT,asanka-code/RIOT,abp719/RIOT,toonst/RIOT,Ell-i/RIOT,msolters/RIOT,beurdouche/RIOT,kaspar030/RIOT,sumanpanchal/RIOT,basilfx/RIOT,adjih/RIOT,jremmert-phytec-iot/RIOT,stevenj/RIOT,josephnoir/RIOT,msolters/RIOT,sumanpanchal/RIOT,thomaseichinger/RIOT,jferreir/RIOT,yogo1212/RIOT,dailab/RIOT,OlegHahm/RIOT,mfrey/RIOT,phiros/RIOT,immesys/RiSyn,lazytech-org/RIOT,Darredevil/RIOT,wentaoshang/RIOT,adjih/RIOT,msolters/RIOT,basilfx/RIOT,jremmert-phytec-iot/RIOT,syin2/RIOT,Osblouf/RIOT,msolters/RIOT,brettswann/RIOT,ks156/RIOT,watr-li/RIOT,PSHIVANI/Riot-Code,Ell-i/RIOT,wentaoshang/RIOT,kb2ma/RIOT,rfswarm/RIOT,jremmert-phytec-iot/RIOT,RubikonAlpha/RIOT,DipSwitch/RIOT,adrianghc/RIOT,LudwigKnuepfer/RIOT,abkam07/RIOT,ThanhVic/RIOT,neiljay/RIOT,yogo1212/RIOT,avmelnikoff/RIOT,daniel-k/RIOT,attdona/RIOT,gbarnett/RIOT,alignan/RIOT,rajma996/RIOT,centurysys/RIOT,DipSwitch/RIOT,robixnai/RIOT,RIOT-OS/RIOT,arvindpdmn/RIOT,miri64/RIOT,haoyangyu/RIOT,LudwigOrtmann/RIOT,lebrush/RIOT,malosek/RIOT,gebart/RIOT,RIOT-OS/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,rfuentess/RIOT,adjih/RIOT,changbiao/RIOT,MonsterCode8000/RIOT,herrfz/RIOT,chris-wood/RIOT,jferreir/RIOT,jasonatran/RIOT,zhuoshuguo/RIOT,cladmi/RIOT,abkam07/RIOT,wentaoshang/RIOT,MarkXYang/RIOT,abp719/RIOT,tfar/RIOT,toonst/RIOT,patkan/RIOT,RIOT-OS/RIOT,kerneltask/RIOT,l3nko/RIOT,PSHIVANI/Riot-Code,jbeyerstedt/RIOT-OTA-update,Osblouf/RIOT,changbiao/RIOT,openkosmosorg/RIOT,MonsterCode8000/RIOT,stevenj/RIOT,syin2/RIOT,robixnai/RIOT,tdautc19841202/RIOT,kushalsingh007/RIOT,wentaoshang/RIOT,lazytech-org/RIOT,rfuentess/RIOT,binarylemon/RIOT,daniel-k/RIOT,ThanhVic/RIOT,biboc/RIOT,smlng/RIOT,ntrtrung/RIOT,Darredevil/RIOT,zhuoshuguo/RIOT,centurysys/RIOT,ntrtrung/RIOT,arvindpdmn/RIOT,asanka-code/RIOT,ximus/RIOT,hamilton-mote/RIOT-OS,chris-wood/RIOT,kYc0o/RIOT,brettswann/RIOT,dkm/RIOT,automote/RIOT,latsku/RIOT,gbarnett/RIOT,robixnai/RIOT,kerneltask/RIOT,jfischer-phytec-iot/RIOT,d00616/RIOT,Yonezawa-T2/RIOT,ntrtrung/RIOT,PSHIVANI/Riot-Code,rajma996/RIOT,cladmi/RIOT,rajma996/RIOT,gebart/RIOT,tfar/RIOT,jasonatran/RIOT,PSHIVANI/Riot-Code,attdona/RIOT,RBartz/RIOT,hamilton-mote/RIOT-OS,lebrush/RIOT,rfswarm/RIOT,RubikonAlpha/RIOT,openkosmosorg/RIOT,EmuxEvans/RIOT,avmelnikoff/RIOT,BytesGalore/RIOT,kYc0o/RIOT,roberthartung/RIOT,asanka-code/RIOT,RBartz/RIOT,centurysys/RIOT,MohmadAyman/RIOT,LudwigOrtmann/RIOT,tfar/RIOT,EmuxEvans/RIOT,chris-wood/RIOT,MohmadAyman/RIOT,dailab/RIOT,x3ro/RIOT,kaleb-himes/RIOT,thiagohd/RIOT,centurysys/RIOT,fnack/RIOT,Ell-i/RIOT,Lexandro92/RIOT-CoAP,patkan/RIOT,kaleb-himes/RIOT,openkosmosorg/RIOT,bartfaizoltan/RIOT,bartfaizoltan/RIOT,DipSwitch/RIOT,haoyangyu/RIOT,RubikonAlpha/RIOT,daniel-k/RIOT,katezilla/RIOT,tfar/RIOT,smlng/RIOT,MarkXYang/RIOT,mziegert/RIOT,khhhh/RIOT,luciotorre/RIOT,MonsterCode8000/RIOT,abp719/RIOT,RBartz/RIOT,x3ro/RIOT,neumodisch/RIOT,dailab/RIOT,gautric/RIOT,kushalsingh007/RIOT,adrianghc/RIOT,MarkXYang/RIOT,RBartz/RIOT,Josar/RIOT,plushvoxel/RIOT,cladmi/RIOT,ks156/RIOT,dhruvvyas90/RIOT,dhruvvyas90/RIOT,A-Paul/RIOT,rfuentess/RIOT,MohmadAyman/RIOT,arvindpdmn/RIOT,mtausig/RIOT,zhuoshuguo/RIOT,bartfaizoltan/RIOT,brettswann/RIOT,arvindpdmn/RIOT,syin2/RIOT,syin2/RIOT,marcosalm/RIOT,gebart/RIOT,aeneby/RIOT,adrianghc/RIOT,RBartz/RIOT,gbarnett/RIOT,stevenj/RIOT,beurdouche/RIOT,Josar/RIOT,koenning/RIOT,rfswarm/RIOT,watr-li/RIOT,kaleb-himes/RIOT,aeneby/RIOT,l3nko/RIOT,MohmadAyman/RIOT,RIOT-OS/RIOT,Yonezawa-T2/RIOT,ks156/RIOT,neumodisch/RIOT,jremmert-phytec-iot/RIOT,Darredevil/RIOT,OTAkeys/RIOT,luciotorre/RIOT,benoit-canet/RIOT,LudwigKnuepfer/RIOT,LudwigOrtmann/RIOT,sumanpanchal/RIOT,haoyangyu/RIOT,authmillenon/RIOT,lazytech-org/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,automote/RIOT,patkan/RIOT,msolters/RIOT,alignan/RIOT,neiljay/RIOT,TobiasFredersdorf/RIOT,miri64/RIOT,jremmert-phytec-iot/RIOT,asanka-code/RIOT,JensErdmann/RIOT,thiagohd/RIOT,tdautc19841202/RIOT,Darredevil/RIOT,watr-li/RIOT,bartfaizoltan/RIOT,dkm/RIOT,MohmadAyman/RIOT,FrancescoErmini/RIOT,beurdouche/RIOT,dailab/RIOT,LudwigOrtmann/RIOT,sgso/RIOT,authmillenon/RIOT,beurdouche/RIOT,ximus/RIOT,authmillenon/RIOT,gautric/RIOT,Hyungsin/RIOT-OS,rakendrathapa/RIOT,tdautc19841202/RIOT,MohmadAyman/RIOT,koenning/RIOT,khhhh/RIOT,gebart/RIOT,marcosalm/RIOT,brettswann/RIOT,jasonatran/RIOT,x3ro/RIOT,watr-li/RIOT,marcosalm/RIOT,alex1818/RIOT,smlng/RIOT,RIOT-OS/RIOT,ant9000/RIOT,OTAkeys/RIOT,kbumsik/RIOT,DipSwitch/RIOT,beurdouche/RIOT,shady33/RIOT,FrancescoErmini/RIOT,mziegert/RIOT,d00616/RIOT,backenklee/RIOT,Josar/RIOT,marcosalm/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,rfuentess/RIOT,kerneltask/RIOT,openkosmosorg/RIOT,changbiao/RIOT,ThanhVic/RIOT,rakendrathapa/RIOT,mfrey/RIOT,RBartz/RIOT,LudwigOrtmann/RIOT,Lexandro92/RIOT-CoAP,wentaoshang/RIOT,kushalsingh007/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,RubikonAlpha/RIOT,zhuoshuguo/RIOT,asanka-code/RIOT,l3nko/RIOT,kushalsingh007/RIOT,JensErdmann/RIOT,koenning/RIOT,adjih/RIOT,fnack/RIOT,kaspar030/RIOT,hamilton-mote/RIOT-OS,jasonatran/RIOT,A-Paul/RIOT,daniel-k/RIOT,benoit-canet/RIOT,EmuxEvans/RIOT,kushalsingh007/RIOT,l3nko/RIOT,ant9000/RIOT,aeneby/RIOT,ximus/RIOT,JensErdmann/RIOT,benoit-canet/RIOT,haoyangyu/RIOT,changbiao/RIOT,FrancescoErmini/RIOT,kerneltask/RIOT,d00616/RIOT,biboc/RIOT,kb2ma/RIOT,kbumsik/RIOT,jfischer-phytec-iot/RIOT,dailab/RIOT,EmuxEvans/RIOT,kYc0o/RIOT,binarylemon/RIOT,haoyangyu/RIOT,Josar/RIOT,roberthartung/RIOT,daniel-k/RIOT,alignan/RIOT,dhruvvyas90/RIOT,neumodisch/RIOT,kaleb-himes/RIOT,luciotorre/RIOT,rakendrathapa/RIOT,rajma996/RIOT,immesys/RiSyn,basilfx/RIOT,TobiasFredersdorf/RIOT,mziegert/RIOT,Ell-i/RIOT,arvindpdmn/RIOT,mfrey/RIOT,sumanpanchal/RIOT,binarylemon/RIOT,lebrush/RIOT,josephnoir/RIOT,Osblouf/RIOT,cladmi/RIOT,TobiasFredersdorf/RIOT,Hyungsin/RIOT-OS,jfischer-phytec-iot/RIOT,binarylemon/RIOT,sgso/RIOT,RubikonAlpha/RIOT,gautric/RIOT,patkan/RIOT,centurysys/RIOT,MarkXYang/RIOT,patkan/RIOT,ntrtrung/RIOT,brettswann/RIOT,yogo1212/RIOT,jferreir/RIOT,LudwigOrtmann/RIOT,jfischer-phytec-iot/RIOT,miri64/RIOT,DipSwitch/RIOT,herrfz/RIOT,binarylemon/RIOT,marcosalm/RIOT,lebrush/RIOT,kbumsik/RIOT,shady33/RIOT,stevenj/RIOT,Hyungsin/RIOT-OS,shady33/RIOT,asanka-code/RIOT,syin2/RIOT,ntrtrung/RIOT,Yonezawa-T2/RIOT,gbarnett/RIOT,mtausig/RIOT,JensErdmann/RIOT,malosek/RIOT,shady33/RIOT,watr-li/RIOT,benoit-canet/RIOT,rakendrathapa/RIOT,koenning/RIOT,josephnoir/RIOT,mziegert/RIOT,backenklee/RIOT,sgso/RIOT,tdautc19841202/RIOT,ant9000/RIOT,stevenj/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,immesys/RiSyn,FrancescoErmini/RIOT,ximus/RIOT,ThanhVic/RIOT,ks156/RIOT,PSHIVANI/Riot-Code,herrfz/RIOT,backenklee/RIOT,openkosmosorg/RIOT,sgso/RIOT,neiljay/RIOT,chris-wood/RIOT,latsku/RIOT,plushvoxel/RIOT,OlegHahm/RIOT,MonsterCode8000/RIOT,jferreir/RIOT,Darredevil/RIOT,l3nko/RIOT,koenning/RIOT,Lexandro92/RIOT-CoAP,roberthartung/RIOT,authmillenon/RIOT,dhruvvyas90/RIOT,abkam07/RIOT,MarkXYang/RIOT,Darredevil/RIOT,RubikonAlpha/RIOT,x3ro/RIOT,yogo1212/RIOT,ant9000/RIOT,smlng/RIOT,sgso/RIOT,phiros/RIOT,Yonezawa-T2/RIOT,kb2ma/RIOT,fnack/RIOT,cladmi/RIOT,rousselk/RIOT,khhhh/RIOT,neiljay/RIOT,BytesGalore/RIOT,daniel-k/RIOT,authmillenon/RIOT,bartfaizoltan/RIOT,patkan/RIOT,automote/RIOT,Lexandro92/RIOT-CoAP,jbeyerstedt/RIOT-OTA-update,ThanhVic/RIOT,mtausig/RIOT,mtausig/RIOT,adjih/RIOT,OlegHahm/RIOT,ks156/RIOT,herrfz/RIOT,smlng/RIOT,altairpearl/RIOT,abkam07/RIOT,alex1818/RIOT,jferreir/RIOT,jbeyerstedt/RIOT-OTA-update,neiljay/RIOT,attdona/RIOT,neumodisch/RIOT,benoit-canet/RIOT,kaspar030/RIOT,yogo1212/RIOT,arvindpdmn/RIOT,sumanpanchal/RIOT,Yonezawa-T2/RIOT,toonst/RIOT,watr-li/RIOT,gbarnett/RIOT,immesys/RiSyn,alex1818/RIOT,Ell-i/RIOT,OlegHahm/RIOT,ntrtrung/RIOT,ximus/RIOT,dhruvvyas90/RIOT,thiagohd/RIOT,roberthartung/RIOT,Lexandro92/RIOT-CoAP,dhruvvyas90/RIOT,rousselk/RIOT,tdautc19841202/RIOT,EmuxEvans/RIOT,plushvoxel/RIOT,stevenj/RIOT,phiros/RIOT,OTAkeys/RIOT,kaspar030/RIOT,latsku/RIOT,MonsterCode8000/RIOT,attdona/RIOT,malosek/RIOT,dkm/RIOT,LudwigKnuepfer/RIOT,katezilla/RIOT,authmillenon/RIOT,rousselk/RIOT,rousselk/RIOT,haoyangyu/RIOT,jferreir/RIOT,zhuoshuguo/RIOT,biboc/RIOT,kushalsingh007/RIOT,FrancescoErmini/RIOT,kbumsik/RIOT,katezilla/RIOT,robixnai/RIOT,koenning/RIOT,plushvoxel/RIOT,robixnai/RIOT,mziegert/RIOT,jbeyerstedt/RIOT-OTA-update,mfrey/RIOT,jasonatran/RIOT,katezilla/RIOT,changbiao/RIOT,luciotorre/RIOT,roberthartung/RIOT,sumanpanchal/RIOT,alignan/RIOT,miri64/RIOT,luciotorre/RIOT,hamilton-mote/RIOT-OS,backenklee/RIOT,thomaseichinger/RIOT,kerneltask/RIOT,adrianghc/RIOT,centurysys/RIOT,khhhh/RIOT,jfischer-phytec-iot/RIOT,DipSwitch/RIOT,alex1818/RIOT,A-Paul/RIOT,khhhh/RIOT,thiagohd/RIOT,benoit-canet/RIOT,khhhh/RIOT,rfswarm/RIOT,Hyungsin/RIOT-OS,thomaseichinger/RIOT,marcosalm/RIOT,attdona/RIOT,lazytech-org/RIOT,altairpearl/RIOT,immesys/RiSyn,l3nko/RIOT,alignan/RIOT,d00616/RIOT,kbumsik/RIOT,d00616/RIOT,OlegHahm/RIOT,zhuoshuguo/RIOT,gebart/RIOT,dkm/RIOT,ThanhVic/RIOT,lebrush/RIOT,fnack/RIOT,dkm/RIOT,malosek/RIOT,altairpearl/RIOT,rfswarm/RIOT,Hyungsin/RIOT-OS,TobiasFredersdorf/RIOT,josephnoir/RIOT,abp719/RIOT,kaleb-himes/RIOT,aeneby/RIOT,openkosmosorg/RIOT,ximus/RIOT,Lexandro92/RIOT-CoAP,yogo1212/RIOT,jbeyerstedt/RIOT-OTA-update,neumodisch/RIOT,rajma996/RIOT,automote/RIOT,backenklee/RIOT,immesys/RiSyn,TobiasFredersdorf/RIOT,OTAkeys/RIOT,hamilton-mote/RIOT-OS,alex1818/RIOT,BytesGalore/RIOT,Osblouf/RIOT,Osblouf/RIOT,mfrey/RIOT,phiros/RIOT,PSHIVANI/Riot-Code,latsku/RIOT,avmelnikoff/RIOT,toonst/RIOT,automote/RIOT,LudwigKnuepfer/RIOT,rfswarm/RIOT,A-Paul/RIOT,biboc/RIOT,JensErdmann/RIOT,thomaseichinger/RIOT,rfuentess/RIOT,biboc/RIOT,rakendrathapa/RIOT,luciotorre/RIOT,herrfz/RIOT,latsku/RIOT,avmelnikoff/RIOT,LudwigKnuepfer/RIOT,thiagohd/RIOT,josephnoir/RIOT,FrancescoErmini/RIOT,phiros/RIOT,rousselk/RIOT,katezilla/RIOT,abp719/RIOT,Josar/RIOT,kYc0o/RIOT,tdautc19841202/RIOT,chris-wood/RIOT,robixnai/RIOT,Osblouf/RIOT,changbiao/RIOT,shady33/RIOT,BytesGalore/RIOT,kb2ma/RIOT,avmelnikoff/RIOT,attdona/RIOT,MonsterCode8000/RIOT,lebrush/RIOT,thiagohd/RIOT,abkam07/RIOT,kYc0o/RIOT,msolters/RIOT,abkam07/RIOT,wentaoshang/RIOT,mziegert/RIOT,lazytech-org/RIOT,basilfx/RIOT,fnack/RIOT,A-Paul/RIOT,kb2ma/RIOT,chris-wood/RIOT,adrianghc/RIOT,latsku/RIOT,x3ro/RIOT,d00616/RIOT,JensErdmann/RIOT,altairpearl/RIOT,gautric/RIOT,OTAkeys/RIOT,rousselk/RIOT,altairpearl/RIOT
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 [email protected] // 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 [email protected] // 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
e790a801615295d6d46848e7bedeacc003b18951
include/util/Either.h
include/util/Either.h
#ifndef UTIL_EITHER_H #define UTIL_EITHER_H #include <utility> namespace util { template <typename L, typename R> class Either { public: bool left(L& x) { if (isLeft) x = l; return isLeft; } bool right(R& x) { if (!isLeft) x = r; return !isLeft; } private: template <typename L_, typename R_> friend Either<L_, R_> Left(L_ x); template <typename L_, typename R_> friend Either<L_, R_> Right(R_ x); bool isLeft; union { L l; R r; }; }; template <typename L, typename R> Either<L, R> Left(L x) { Either<L, R> e; e.isLeft = true; e.l = std::move(x); return e; } template <typename L, typename R> Either <L, R> Right(R x) { Either<L, R> e; e.isLeft = false; e.r = std::move(x); return e; } } #endif
Add either class for trivially constructable types
Add either class for trivially constructable types
C
mit
DeonPoncini/zephyr
d44fad2b753c1947a400ab32a89cfb905e1c7f20
bgc/DIC_ATMOS.h
bgc/DIC_ATMOS.h
C $Header: /u/gcmpack/MITgcm/pkg/dic/DIC_ATMOS.h,v 1.4 2010/04/11 20:59:27 jmc Exp $ C $Name: $ COMMON /INTERACT_ATMOS_NEEDS/ & co2atmos, & total_atmos_carbon, total_ocean_carbon, & total_atmos_carbon_year, & total_ocean_carbon_year, & total_atmos_carbon_start, & total_ocean_carbon_start, & atpco2 _RL co2atmos(1002) _RL total_atmos_carbon _RL total_ocean_carbon _RL total_atmos_carbon_year _RL total_atmos_carbon_start _RL total_ocean_carbon_year _RL total_ocean_carbon_start _RL atpco2
Update for checkpoint66j and internal consistency
Update for checkpoint66j and internal consistency
C
mit
seamanticscience/mitgcm_mods,seamanticscience/mitgcm_mods
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 <[email protected]> Commit-Queue: Ben Wagner <[email protected]>
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
a825a634be45b58bd681f4bbca09a3d80a41a06e
test/FrontendC/2010-08-12-asm-aggr-arg.c
test/FrontendC/2010-08-12-asm-aggr-arg.c
// RUN: %llvmgcc %s -S -O0 -o - | FileCheck %s // Radar 8288710: A small aggregate can be passed as an integer. Make sure // we don't get an error with "input constraint with a matching output // constraint of incompatible type!" struct wrapper { int i; }; // CHECK: xyz int test(int i) { struct wrapper w; w.i = i; __asm__("xyz" : "=r" (w) : "0" (w)); return w.i; }
Add a test for llvm-gcc svn 110632.
Add a test for llvm-gcc svn 110632. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@110935 91177308-0d34-0410-b5e6-96231b3b80d8
C
bsd-2-clause
dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm
d961e95a724729129cc2fd9b26b0da136c445322
libc/sysdeps/linux/common/bits/uClibc_errno.h
libc/sysdeps/linux/common/bits/uClibc_errno.h
/* * Copyright (C) 2000-2006 Erik Andersen <[email protected]> * * 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 <[email protected]> * * 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
b6b91555b9eb2120cc05175aa4ea154135e35bea
src/exercise205.c
src/exercise205.c
/* * A solution to Exercise 2-5 in The C Programming Language (Second Edition). * * This file was written by Damien Dart, <[email protected]>. This is free * and unencumbered software released into the public domain. For more * information, please refer to the accompanying "UNLICENCE" file. */ #include <stdint.h> #include <stdio.h> #include <stdlib.h> int32_t any(char *, char *); int main(void) { char *test_string_one = "Gooseberries."; char *test_string_two = "Kiwis."; printf("%d", any(test_string_one, test_string_two)); return EXIT_SUCCESS; } int32_t any(char *string_one, char *string_two) { for (uint32_t i = 0; string_one[i] != '\0'; i++) { for (uint32_t j = 0; string_two[j] != '\0'; j++) { if (string_one[i] == string_two[j]) { return i; } } } return -1; }
Add solution to Exercise 2-5.
Add solution to Exercise 2-5.
C
unlicense
damiendart/knr-solutions,damiendart/knr-solutions,damiendart/knr-solutions
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. [email protected] 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
35b3855a93daf745ccc00c3e2925990b93d28808
testmud/mud/home/Game/sys/bin/wiz/hreboot.c
testmud/mud/home/Game/sys/bin/wiz/hreboot.c
#include <kotaka/paths.h> #include <game/paths.h> inherit LIB_BIN; void main(string args) { object user; user = query_user(); if (user->query_class() < 3) { send_out("You do not have sufficient access rights to reboot the help system.\n"); return; } "~Help/initd"->full_reset(); }
Add command to reboot help system
Add command to reboot help system
C
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
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 <[email protected]> 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
952b304e49a1153c11acf9230021516f96b805c8
Stack/link_list_stack.c
Stack/link_list_stack.c
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> /* This is Stack Implementation using a Linked list */ #define MAXSIZE 101 #define BOOL_PRINT(bool_expr) "%s\n", (bool_expr) ? "true" : "false" typedef struct node{ int data; struct node* link; } node; node* head; //global variable node* create_newnode(int x){ node* temp; temp = (node*) malloc (sizeof(node)); temp->data =x; temp->link=NULL; return temp; } void push(int data){ //this is equivalent to add a node at begining of the linked list node* temp; temp =create_newnode(data); temp->link = head; head = temp; } int pop(){ //this is equivalent to delete a node at begining of the linked list if(head != NULL ){ node* temp = head; head = temp->link; return temp->data; } else{ printf("Error: Stack is empty \n"); return -1; } } int isEmpty(){ //this is equivalent to checking if the linked list is empty if(head != NULL) return false; else return true; } void stack_print(){ //this is equivalent to printing a linked list while traversing printf("Stack is : "); node* temp = head; while(temp != NULL){ printf("%d ", temp->data); temp = temp->link; } printf("\n"); } int main(){ int i; printf("is stack empty? \n"); printf(BOOL_PRINT(isEmpty())); push(10); push(11); push(12); push(15); i = pop(); printf("Popped data is %d\n",i ); stack_print(); return 0; }
Add Linked List implementation of stack
Add Linked List implementation of stack
C
mit
anaghajoshi/C_DataStructures_Algorithms
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 <[email protected]>
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
d8a298e1fcb31c55bd99230835ab7305cf7c5e03
library/md_internal.h
library/md_internal.h
/** * Internal MD/hash functions - no crypto, just data. * This is used to avoid depending on MD_C just to query a length. * * Copyright The Mbed TLS Contributors * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/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 MBEDTLS_MD_INTERNAL_H #define MBEDTLS_MD_INTERNAL_H #include "common.h" #include "mbedtls/md.h" /** Get the output length of the given hash type * * \param md_type The hash type. * * \return The output length in bytes, or 0 if not known */ static inline unsigned char mbedtls_md_internal_get_size( mbedtls_md_type_t md_type ) { switch( md_type ) { #if defined(MBEDTLS_MD5_C) || defined(PSA_WANT_ALG_MD5) case MBEDTLS_MD_MD5: return( 16 ); #endif #if defined(MBEDTLS_RIPEMD160_C) || defined(PSA_WANT_ALG_RIPEMD160) || \ defined(MBEDTLS_SHA1_C) || defined(PSA_WANT_ALG_SHA_1) case MBEDTLS_MD_RIPEMD160: case MBEDTLS_MD_SHA1: return( 20 ); #endif #if defined(MBEDTLS_SHA224_C) || defined(PSA_WANT_ALG_SHA_224) case MBEDTLS_MD_SHA224: return( 28 ); #endif #if defined(MBEDTLS_SHA256_C) || defined(PSA_WANT_ALG_SHA_256) case MBEDTLS_MD_SHA256: return( 32 ); #endif #if defined(MBEDTLS_SHA384_C) || defined(PSA_WANT_ALG_SHA_384) case MBEDTLS_MD_SHA384: return( 48 ); #endif #if defined(MBEDTLS_SHA512_C) || defined(PSA_WANT_ALG_SHA_512) case MBEDTLS_MD_SHA512: return( 64 ); #endif default: return( 0 ); } } #endif /* MBEDTLS_MD_INTERNAL_H */
Add internal MD size getter
Add internal MD size getter Modules / tests that only need to get the size of a hash from its type, without actually computing a hash, need not depend on MD_C. Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
C
apache-2.0
ARMmbed/mbedtls,ARMmbed/mbedtls,Mbed-TLS/mbedtls,Mbed-TLS/mbedtls,Mbed-TLS/mbedtls,ARMmbed/mbedtls,Mbed-TLS/mbedtls,ARMmbed/mbedtls
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
6b710c2c11befa8258d4bacbc49e032cfd15a441
src/server/wse-server-test.c
src/server/wse-server-test.c
#include <pthread.h> #include <time.h> #include "ws-eventing.h" #include "wsman-debug.h" static char g_event_source_url[] = "http://www.otc_event.com/event_source"; static EventingH g_event_handler; static void *publish_events(void *soap_handler); void start_event_source(SoapH soap) { pthread_t publiser_thread; g_event_handler = wse_initialize_server(soap, g_event_source_url); pthread_create(&publiser_thread, NULL, publish_events, soap); printf("Eventing source started...\n"); } void *publish_events(void *soap_handler) { char *action_list[] = {"random_event"}; WsePublisherH publisher_handler; WsXmlDocH event_doc; struct timespec time_val = {10, 0}; publisher_handler = wse_publisher_initialize((EventingH)g_event_handler, 1, action_list, NULL, NULL); while(1) { nanosleep(&time_val, NULL); event_doc = ws_xml_create_doc((SoapH)soap_handler, "rootNsUri", "rootName"); //TBD wse_send_notification(publisher_handler, event_doc, "http://otc.eventing.org/"); } }
Test code for ws-eventing server side
Test code for ws-eventing server side
C
bsd-3-clause
kolbma/openwsman,Openwsman/openwsman,Openwsman/openwsman,Openwsman/openwsman,Openwsman/openwsman,vcrhonek/openwsman,kkaempf/openwsman,kolbma/openwsman,vcrhonek/openwsman,photron/openwsman,vcrhonek/openwsman,photron/openwsman,kkaempf/openwsman,photron/openwsman,kolbma/openwsman,photron/openwsman,vcrhonek/openwsman,Openwsman/openwsman,kkaempf/openwsman,kkaempf/openwsman,kkaempf/openwsman,vcrhonek/openwsman,vcrhonek/openwsman,Openwsman/openwsman,kolbma/openwsman,kkaempf/openwsman,kolbma/openwsman,photron/openwsman,kolbma/openwsman,photron/openwsman,photron/openwsman,kolbma/openwsman,kkaempf/openwsman,vcrhonek/openwsman,Openwsman/openwsman
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
09f9e77d09c72943aec8763311e7609c7678002a
roms/include/gmzpu_io.h
roms/include/gmzpu_io.h
/* 18 bits => 0x00000 - 0x3FFFF => 256kb */ #define ADDR_W 18 #define ZWC_CS_W 4 #define ZWC_WB_ADR_W ADDR_W - ZMC_CS_W - 3 #define ZWC_CS_SIZE ( (1<<ZWC_WB_ADR_W)-1 ) /* * 0x00000 - 0x1FFFF: RAM * 0x20000 - 0x2FFFF: phiIO * 0x30000 - 0x3FFFF: zwishbone * * */ #define IO_MASK (1<<(ADDR_W-1)) #define ZWC_MASK (1<<(ADDR_W-2)) /* * 0x30000 : ZWC_CONFIG * 0x30004 : ZWC_STATUS * 0x38000 - 0x37ff : ZWC_0_BASE * 0x38800 - 0x38ff : ZWC_1_BASE * 0x38900 - 0x39ff : ZWC_2_BASE * 0x38a00 - 0x3aff : ZWC_3_BASE #define ZWC_CONFIG (IO_MASK | ZWC_MASK) #define ZWC_STATUS (IO_MASK | ZWC_MASK | 4) #define ZWC_0_BASE (IO_MASK | ZWC_MASK | ZWC_BUS_MASK) #define ZWC_1_BASE (ZWC_0_BASE + ZWC_CS_SIZE) #define ZWC_2_BASE (ZWC_1_BASE + ZWC_CS_SIZE) #define ZWC_3_BASE (ZWC_2_BASE + ZWC_CS_SIZE) /* etc... */
Add basic memory and io map.
Add basic memory and io map.
C
bsd-3-clause
sonologic/gmzpu,sonologic/gmzpu,sonologic/gmzpu
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
a7adc6e1d178b9827ad3d3d689af8a41bf6f96bd
subversion/libsvn_ra/util.c
subversion/libsvn_ra/util.c
/* * util.c: Repository access utility routines. * * ==================================================================== * Copyright (c) 2007 CollabNet. All rights reserved. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at http://subversion.tigris.org/license-1.html. * If newer versions of this license are posted there, you may use a * newer version instead, at your option. * * This software consists of voluntary contributions made by many * individuals. For exact contribution history, see the revision * history and logs, available at http://subversion.tigris.org/. * ==================================================================== */ /* ==================================================================== */ /*** Includes. ***/ #include <apr_pools.h> #include "svn_types.h" #include "svn_error.h" #include "svn_error_codes.h" #include "svn_ra.h" #include "svn_private_config.h" /* Return an error with code SVN_ERR_UNSUPPORTED_FEATURE, and an error message referencing PATH_OR_URL, if the "server" pointed to be RA_SESSION doesn't support Merge Tracking (e.g. is pre-1.5). Perform temporary allocations in POOL. */ svn_error_t * svn_ra__assert_mergeinfo_capable_server(svn_ra_session_t *ra_session, const char *path_or_url, apr_pool_t *pool) { svn_boolean_t mergeinfo_capable; SVN_ERR(svn_ra_has_capability(ra_session, &mergeinfo_capable, SVN_RA_CAPABILITY_MERGEINFO, pool)); if (! mergeinfo_capable) { if (path_or_url == NULL) { svn_error_t *err = svn_ra_get_session_url(ra_session, &path_or_url, pool); if (err) { /* The SVN_ERR_UNSUPPORTED_FEATURE error is more important, so dummy up the session's URL and chuck this error. */ svn_error_clear(err); path_or_url = "<repository>"; } } return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL, _("Retrieval of mergeinfo unsupported by '%s'"), svn_path_local_style(path_or_url, pool)); } return SVN_NO_ERROR; }
Make 'svn mergeinfo' and its underlying APIs error out when talking to a pre-1.5 repository.
Make 'svn mergeinfo' and its underlying APIs error out when talking to a pre-1.5 repository. This change includes tests capable of being run against either a 1.4 or 1.5 server (and was run against both). [ Note: All but subversion/libsvn_ra/util.c was committed in r28172. ] * TODO-1.5-branch Remove TODO item completed by this commit. * subversion/include/svn_client.h (svn_client_mergeinfo_get_merged, svn_client_mergeinfo_get_available): Document that an error with the code SVN_ERR_UNSUPPORTED_FEATURE is returned when the server doesn't support Merge Tracking. * subversion/include/svn_ra.h (svn_ra_get_mergeinfo): Ditto, with note about inapplicability to ra_local. * subversion/include/private/svn_ra_private.h Add new Subversion-private header file, which currently declares only the svn_ra__assert_mergeinfo_capable_server() API. * subversion/libsvn_client/mergeinfo.h (svn_client__get_repos_mergeinfo): Add SQUELCH_INCAPABLE parameter, used to ignore a SVN_ERR_UNSUPPORTED_FEATURE returned by a server that doesn't support Merge Tracking. * subversion/libsvn_client/mergeinfo.c Include private/svn_ra_private.h. (svn_client__get_repos_mergeinfo): Add SQUELCH_INCAPABLE parameter, used to ignore a SVN_ERR_UNSUPPORTED_FEATURE returned by a server that doesn't support Merge Tracking. (svn_client__get_wc_or_repos_mergeinfo): Adjust for svn_client__get_repos_mergeinfo() API change. (get_mergeinfo): Return an error if the server doesn't support Merge Tracking. Improve APR pool usage. (svn_client_mergeinfo_get_available): Call get_mergeinfo() first to leverage its new server Merge Tracking capabilities check. * subversion/libsvn_client/copy.c (calculate_target_mergeinfo): Adjust for svn_client__get_repos_mergeinfo() API change * subversion/libsvn_client/merge.c (filter_reflected_revisions): Ditto. * subversion/libsvn_ra/ra_loader.c Include private/svn_ra_private.h. (svn_ra_get_mergeinfo): Return an error if the server doesn't support Merge Tracking. * subversion/libsvn_ra/util.c Add new Subversion-private header file, which currently defines only the svn_ra__assert_mergeinfo_capable_server() API. * subversion/libsvn_ra_svn/client.c (ra_svn_get_mergeinfo): Remove SVN_RA_SVN_CAP_MERGEINFO capabilities check, which is now handled by ra_loader.c. * subversion/libsvn_ra_neon/mergeinfo.c (svn_ra_neon__get_mergeinfo)))): Don't squelch a 501 HTTP status code (which is otherwise subsequently converted into an svn_error_t) encountered while making a mergeinfo REPORT request. * subversion/libsvn_ra_serf/mergeinfo.c (svn_ra_serf__get_mergeinfo): Don't squelch an SVN_ERR_UNSUPPORTED_FEATURE error encountered while making a mergeinfo REPORT request. * subversion/tests/cmdline/mergeinfo_tests.py Import the server_has_mergeinfo() function. (adjust_error_for_server_version): Add a new function that returns the expected error regexp appropriate for the server version used by the test suite. (no_mergeinfo): Leverage adjust_error_for_server_version(), and adjust for run_and_verify_mergeinfo() API changes. (mergeinfo): Provide a very basic implementation of the test. * subversion/tests/cmdline/svntest/actions.py (run_and_verify_mergeinfo): Replace EXPECTED_PATHS, EXPECTED_SOURCE_PATHS, and EXPECTED_ELIGIBLE_REVS parameters with EXPECTED_OUTPUT, which is a dict of the format: { path : { source path : (merged ranges, eligible ranges) } } Correct/add parser expectations, adjust for parser API changes, and re-implement function accordingly. Be sure to bail out early if a 1.4 server is detected. * subversion/tests/cmdline/svntest/parsers.py (MergeinfoReportParser): Add a comment showing some sample output. (MergeinfoReportParser.STATE_MERGED_RANGES, MergeinfoReportParser.STATE_ELIGIBLE_RANGES): Add new constants, the latter a replacement for STATE_ELIGIBLE_REVS. (MergeinfoReportParser.STATE_TRANSITIONS): Correct/add possible state transitions. (MergeinfoReportParser.STATE_TOKENS): Correct/add tokens present in the output. (MergeinfoReportParser.__init__): Replace "paths", "source_paths", and "eligible_revs" instance members with "report" dict. Add "cur_target_path" and "cur_source_path" members to maintain some necessary parser state. Replace "state_to_storage" dict with "parser_callbacks" dict of callback functions. (parsed_target_path, parsed_source_path, parsed_merged_ranges, parsed_eligible_ranges): Add parser callback functions invoked from the "parser_callbacks" dict. (parse): Replace use of "state_to_storage" with "parser_callbacks". git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@868248 13f79535-47bb-0310-9956-ffa450edef68
C
apache-2.0
wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,wbond/subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion
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
42a8766842fa05d1eebdf88b484e32ea22ce9c11
fmpz_vec/test/t-scalar_divexact_fmpz.c
fmpz_vec/test/t-scalar_divexact_fmpz.c
/*============================================================================= This file is part of FLINT. FLINT is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. FLINT 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 General Public License for more details. You should have received a copy of the GNU General Public License along with FLINT; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =============================================================================*/ /****************************************************************************** Copyright (C) 2009, 2010 William Hart Copyright (C) 2010 Sebastian Pancratz ******************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <mpir.h> #include "flint.h" #include "fmpz.h" #include "fmpz_vec.h" #include "ulong_extras.h" int main(void) { int result; printf("scalar_divexact_fmpz...."); fflush(stdout); _fmpz_vec_randinit(); // Check aliasing of a and b for (ulong i = 0; i < 10000UL; i++) { fmpz *a, *b, *c; fmpz_t n; ulong length = n_randint(100); fmpz_init(n); fmpz_randtest(n, 100); if (n_randint(2)) fmpz_neg(n, n); a = _fmpz_vec_init(length); b = _fmpz_vec_init(length); _fmpz_vec_randtest(a, length, n_randint(200)); _fmpz_vec_scalar_mul_fmpz(b, a, length, n); _fmpz_vec_scalar_mul_fmpz(a, a, length, n); result = (_fmpz_vec_equal(a, b, length)); if (!result) { printf("FAIL:\n"); _fmpz_vec_print(a, length), printf("\n\n"); _fmpz_vec_print(b, length), printf("\n\n"); abort(); } _fmpz_vec_clear(a, length); _fmpz_vec_clear(b, length); fmpz_clear(n); } _fmpz_vec_randclear(); _fmpz_cleanup(); printf("PASS\n"); return 0; }
Add a test for fmpz_vec_scalar_divexact_fmpz
Add a test for fmpz_vec_scalar_divexact_fmpz
C
lgpl-2.1
dsroche/flint2,wbhart/flint2,dsroche/flint2,dsroche/flint2,jpflori/flint2,fredrik-johansson/flint2,wbhart/flint2,jpflori/flint2,fredrik-johansson/flint2,jpflori/flint2,wbhart/flint2,jpflori/flint2,dsroche/flint2,fredrik-johansson/flint2
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 <[email protected]> */ #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 <[email protected]> */ #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
895e9fc38a456272a1618d0ba1820e9b2f0c80dc
proxygen/lib/utils/NullTraceEventObserver.h
proxygen/lib/utils/NullTraceEventObserver.h
/* * Copyright (c) 2015, 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 <proxygen/lib/utils/TraceEventObserver.h> namespace proxygen { /* * A no-op trace event observer */ struct NullTraceEventObserver : public TraceEventObserver { void traceEventAvailable(TraceEvent) noexcept override {} }; }
Move sample policy logic to be pre-sending request
Move sample policy logic to be pre-sending request Summary: This is a further java memory allocation to reduce unnecessary TraceEvent instance numbers. From the memory profiling result I ran the other day, the most significant memory allocation in java is for trace events, most of which are actually wasted because of the sample policy. This diff move the sample logic to be before sending request. So we can prevent the trace event instance from being generated at all if it is not sampled. Test Plan: Still passed Reviewed By: [email protected] Subscribers: bmatheny, seanc, ranjeeth, kmdent, shikong, pgriess FB internal diff: D1946217 Tasks: 6540655 Signature: t1:1946217:1428422016:198c850e6d5a3919202d347e591a4b21813c214d
C
bsd-3-clause
zhiweicai/proxygen,jgli/proxygen,KublaikhanGeek/proxygen,hnutank163/proxygen,supriyantomaftuh/proxygen,fqihangf/proxygen,Orvid/proxygen,hongliangzhao/proxygen,zhiweicai/proxygen,jgli/proxygen,raphaelamorim/proxygen,luxuan/proxygen,hongliangzhao/proxygen,chjp2046/proxygen,zhenglaizhang/proxygen,hnutank163/proxygen,wrmsr/proxygen,LilMeyer/proxygen,chjp2046/proxygen,songfj/proxygen,KublaikhanGeek/proxygen,pueril/proxygen,luxuan/proxygen,pueril/proxygen,supriyantomaftuh/proxygen,LilMeyer/proxygen,fqihangf/proxygen,Werror/proxygen,wrmsr/proxygen,zhiweicai/proxygen,raphaelamorim/proxygen,hongliangzhao/proxygen,LilMeyer/proxygen,fqihangf/proxygen,zhenglaizhang/proxygen,Werror/proxygen,hiproz/proxygen,jgli/proxygen,sssemil/proxygen,hnutank163/proxygen,chjp2046/proxygen,chenmoshushi/proxygen,hiproz/proxygen,raphaelamorim/proxygen,chenmoshushi/proxygen,hiproz/proxygen,sssemil/proxygen,wrmsr/proxygen,chjp2046/proxygen,fqihangf/proxygen,chenmoshushi/proxygen,zhiweicai/proxygen,raphaelamorim/proxygen,KublaikhanGeek/proxygen,hiproz/proxygen,wrmsr/proxygen,sssemil/proxygen,pueril/proxygen,songfj/proxygen,hongliangzhao/proxygen,chenmoshushi/proxygen,pueril/proxygen,Orvid/proxygen,zhenglaizhang/proxygen,LilMeyer/proxygen,Werror/proxygen,Werror/proxygen,supriyantomaftuh/proxygen,sssemil/proxygen,jgli/proxygen,supriyantomaftuh/proxygen,songfj/proxygen,Orvid/proxygen,zhenglaizhang/proxygen,songfj/proxygen,Orvid/proxygen,luxuan/proxygen,KublaikhanGeek/proxygen,hnutank163/proxygen
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 <[email protected]> Tested-by: Trond Norbye <[email protected]>
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
9e9bb5bcd436e276e75429720b0d67f94fcd892b
bibdesk/BDSKOAIGroupServer.h
bibdesk/BDSKOAIGroupServer.h
// // BDSKOAIGroupServer.h // Bibdesk // // Created by Christiaan Hofman on 1/1/07. // Copyright 2007 __MyCompanyName__. All rights reserved. // #import <Cocoa/Cocoa.h> #import "BDSKSearchGroup.h" @class BDSKServerInfo; @interface BDSKOAIGroupServer : NSObject <BDSKSearchGroupServer> { BDSKSearchGroup *group; BDSKServerInfo *serverInfo; NSString *searchTerm; NSString *resumptionToken; NSArray *sets; NSString *filePath; NSURLDownload *URLDownload; BOOL failedDownload; BOOL isRetrieving; BOOL needsReset; int availableResults; int fetchedResults; } - (void)setServerInfo:(BDSKServerInfo *)info; - (BDSKServerInfo *)serverInfo; - (void)setSearchTerm:(NSString *)string; - (NSString *)searchTerm; - (void)setSets:(NSArray *)newSets; - (NSArray *)sets; - (void)setResumptionToken:(NSString *)newResumptionToken; - (NSString *)resumptionToken; - (void)resetSearch; - (void)fetchSets; - (void)fetch; - (void)startDownloadFromURL:(NSURL *)theURL; @end
Add new header file. (or: xcode is stupid)
Add new header file. (or: xcode is stupid)
C
bsd-3-clause
ycaihua/skim-app,WoLpH/skim,ycaihua/skim-app,WoLpH/skim,ycaihua/skim-app,WoLpH/skim,WoLpH/skim,ycaihua/skim-app,WoLpH/skim,ycaihua/skim-app
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
59f9f6a1aca88f97732e7428f7578a7e24955214
include/tdep-ia64/rse.h
include/tdep-ia64/rse.h
/* * Copyright (C) 1998, 1999, 2002, 2003, 2005 Hewlett-Packard Co * David Mosberger-Tang <[email protected]> * * Register stack engine related helper functions. This file may be * used in applications, so be careful about the name-space and give * some consideration to non-GNU C compilers (though __inline__ is * fine). */ #ifndef RSE_H #define RSE_H #include <libunwind.h> static inline uint64_t rse_slot_num (uint64_t addr) { return (addr >> 3) & 0x3f; } /* * Return TRUE if ADDR is the address of an RNAT slot. */ static inline uint64_t rse_is_rnat_slot (uint64_t addr) { return rse_slot_num (addr) == 0x3f; } /* * Returns the address of the RNAT slot that covers the slot at * address SLOT_ADDR. */ static inline uint64_t rse_rnat_addr (uint64_t slot_addr) { return slot_addr | (0x3f << 3); } /* * Calculate the number of registers in the dirty partition starting at * BSPSTORE and ending at BSP. This isn't simply (BSP-BSPSTORE)/8 * because every 64th slot stores ar.rnat. */ static inline uint64_t rse_num_regs (uint64_t bspstore, uint64_t bsp) { uint64_t slots = (bsp - bspstore) >> 3; return slots - (rse_slot_num(bspstore) + slots)/0x40; } /* * The inverse of the above: given bspstore and the number of * registers, calculate ar.bsp. */ static inline uint64_t rse_skip_regs (uint64_t addr, long num_regs) { long delta = rse_slot_num(addr) + num_regs; if (num_regs < 0) delta -= 0x3e; return addr + ((num_regs + delta/0x3f) << 3); } #endif /* RSE_H */
Include "libunwind_i.h" instead of "internal.h".
Include "libunwind_i.h" instead of "internal.h". 2005/05/19 08:11:38-07:00 hp.com!davidm Rename: include/ia64/rse.h -> include/tdep-ia64/rse.h (Logical change 1.294)
C
mit
zliu2014/libunwind-tilegx,adsharma/libunwind,zliu2014/libunwind-tilegx,geekboxzone/mmallow_external_libunwind,android-ia/platform_external_libunwind,unkadoug/libunwind,cloudius-systems/libunwind,dreal-deps/libunwind,dagar/libunwind,libunwind/libunwind,martyone/libunwind,djwatson/libunwind,Keno/libunwind,frida/libunwind,tronical/libunwind,vegard/libunwind,rntz/libunwind,dropbox/libunwind,atanasyan/libunwind,djwatson/libunwind,tkelman/libunwind,CyanogenMod/android_external_libunwind,joyent/libunwind,rogwfu/libunwind,jrmuizel/libunwind,0xlab/0xdroid-external_libunwind,fdoray/libunwind,SyndicateRogue/libunwind,dagar/libunwind,pathscale/libunwind,tony/libunwind,dropbox/libunwind,android-ia/platform_external_libunwind,cms-externals/libunwind,frida/libunwind,yuyichao/libunwind,rantala/libunwind,unkadoug/libunwind,maltek/platform_external_libunwind,vtjnash/libunwind,geekboxzone/lollipop_external_libunwind,wdv4758h/libunwind,djwatson/libunwind,rogwfu/libunwind,androidarmv6/android_external_libunwind,cms-externals/libunwind,martyone/libunwind,fdoray/libunwind,bo-on-software/libunwind,unkadoug/libunwind,joyent/libunwind,atanasyan/libunwind,igprof/libunwind,tony/libunwind,fillexen/libunwind,fillexen/libunwind,CyanogenMod/android_external_libunwind,tkelman/libunwind,igprof/libunwind,zeldin/platform_external_libunwind,fdoray/libunwind,krytarowski/libunwind,adsharma/libunwind,project-zerus/libunwind,tronical/libunwind,bo-on-software/libunwind,Chilledheart/libunwind,mpercy/libunwind,dreal-deps/libunwind,zeldin/platform_external_libunwind,frida/libunwind,rantala/libunwind,ehsan/libunwind,olibc/libunwind,ehsan/libunwind,tkelman/libunwind,androidarmv6/android_external_libunwind,joyent/libunwind,tronical/libunwind,olibc/libunwind,krytarowski/libunwind,libunwind/libunwind,android-ia/platform_external_libunwind,vtjnash/libunwind,rntz/libunwind,DroidSim/platform_external_libunwind,rantala/libunwind,wdv4758h/libunwind,cms-externals/libunwind,yuyichao/libunwind,SyndicateRogue/libunwind,vegard/libunwind,dreal-deps/libunwind,geekboxzone/mmallow_external_libunwind,Keno/libunwind,atanasyan/libunwind-android,evaautomation/libunwind,igprof/libunwind,project-zerus/libunwind,maltek/platform_external_libunwind,lat/libunwind,maltek/platform_external_libunwind,androidarmv6/android_external_libunwind,cloudius-systems/libunwind,rntz/libunwind,jrmuizel/libunwind,DroidSim/platform_external_libunwind,Chilledheart/libunwind,atanasyan/libunwind,atanasyan/libunwind-android,fillexen/libunwind,yuyichao/libunwind,krytarowski/libunwind,ehsan/libunwind,vegard/libunwind,mpercy/libunwind,dagar/libunwind,rogwfu/libunwind,pathscale/libunwind,martyone/libunwind,Chilledheart/libunwind,Keno/libunwind,evaautomation/libunwind,lat/libunwind,project-zerus/libunwind,mpercy/libunwind,bo-on-software/libunwind,adsharma/libunwind,pathscale/libunwind,SyndicateRogue/libunwind,cloudius-systems/libunwind,zeldin/platform_external_libunwind,olibc/libunwind,jrmuizel/libunwind,geekboxzone/lollipop_external_libunwind,0xlab/0xdroid-external_libunwind,zliu2014/libunwind-tilegx,lat/libunwind,vtjnash/libunwind,tony/libunwind,geekboxzone/lollipop_external_libunwind,geekboxzone/mmallow_external_libunwind,libunwind/libunwind,wdv4758h/libunwind,DroidSim/platform_external_libunwind,dropbox/libunwind,CyanogenMod/android_external_libunwind,evaautomation/libunwind,atanasyan/libunwind-android,0xlab/0xdroid-external_libunwind
bcb8b40f7bc4d9e1045deb325d626fafd584c943
common/thread/thread_posix.h
common/thread/thread_posix.h
#ifndef THREAD_POSIX_H #define THREAD_POSIX_H struct ThreadState { pthread_t td_; static void start(pthread_key_t key, Thread *td) { pthread_t self = pthread_self(); td->state_->td_ = self; int rv = pthread_setspecific(key, td); if (rv == -1) { ERROR("/thread/state/start") << "Could not set thread-local Thread pointer."; return; } #if defined(__FreeBSD__) pthread_set_name_np(self, td->name_.c_str()); #elif defined(__APPLE__) pthread_setname_np(td->name_.c_str()); #endif } }; #endif /* !THREAD_POSIX_H */
Add missed file in previous revision.
Add missed file in previous revision.
C
bsd-2-clause
wanproxy/wanproxy,wanproxy/wanproxy,wanproxy/wanproxy
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 <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (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 <[email protected]> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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 <[email protected]> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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
7017b65feabeaf9fb8d2c2b7f6a97a3b3e39b8a1
exercise108.c
exercise108.c
/* Write a program to count blanks, tabs, and newlines. */ #include <stdint.h> #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { uint32_t blank_count, tab_count, newline_count; int16_t character; blank_count = tab_count = newline_count = 0; while ((character = getchar()) != EOF) { switch (character) { case ' ': blank_count++; break; case '\t': tab_count++; break; case '\n': newline_count++; break; } } printf("Number of blanks: %d\n", blank_count); printf("Number of tabs: %d\n", tab_count); printf("Number of newlines: %d\n", newline_count); return EXIT_SUCCESS; }
Add solution to Exercise 1-8.
Add solution to Exercise 1-8.
C
unlicense
damiendart/knr-solutions,damiendart/knr-solutions,damiendart/knr-solutions
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
b35338e24ee34bd3de4bae1bd10785c060aa4c39
tests/regression/13-privatized/23-traces-paper2.c
tests/regression/13-privatized/23-traces-paper2.c
// PARAM: --enable ana.int.interval --sets exp.solver.td3.side_widen cycle_self #include <pthread.h> #include <assert.h> int g = 6; pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { int x = 1; pthread_mutex_lock(&A); assert(g == 6); assert(x == 1); g = 5; assert(g == 5); assert(x == 1); pthread_mutex_lock(&B); assert(g == 5); assert(x == 1); pthread_mutex_unlock(&B); assert(g == 5); assert(x == 1); x = g; assert(x == 5); g = x + 1; assert(g == 6); x = g; // added assert(g == 6); // added assert(x == 6); // added pthread_mutex_unlock(&A); assert(x == 6); // modified return NULL; } int main(void) { pthread_t id; assert(g == 6); pthread_create(&id, NULL, t_fun, NULL); assert(5 <= g); assert(g <= 6); pthread_join(id, NULL); return 0; }
Add ignored example from traces paper
Add ignored example from traces paper
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
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 <[email protected]> */ #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 <[email protected]> */ #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