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
5ae017de6d07cd1fae4e475d5b64423551828f87
include/clang/Basic/AllDiagnostics.h
include/clang/Basic/AllDiagnostics.h
//===--- AllDiagnostics.h - Aggregate Diagnostic headers --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// /// /// \file /// \brief Includes all the separate Diagnostic headers & some related helpers. /// //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_BASIC_ALLDIAGNOSTICS_H #define LLVM_CLANG_BASIC_ALLDIAGNOSTICS_H #include "clang/AST/ASTDiagnostic.h" #include "clang/AST/CommentDiagnostic.h" #include "clang/Analysis/AnalysisDiagnostic.h" #include "clang/Driver/DriverDiagnostic.h" #include "clang/Frontend/FrontendDiagnostic.h" #include "clang/Lex/LexDiagnostic.h" #include "clang/Parse/ParseDiagnostic.h" #include "clang/Sema/SemaDiagnostic.h" #include "clang/Serialization/SerializationDiagnostic.h" namespace clang { template <size_t SizeOfStr, typename FieldType> class StringSizerHelper { char FIELD_TOO_SMALL[SizeOfStr <= FieldType(~0U) ? 1 : -1]; public: enum { Size = SizeOfStr }; }; } // end namespace clang #define STR_SIZE(str, fieldTy) clang::StringSizerHelper<sizeof(str)-1, \ fieldTy>::Size #endif
//===--- AllDiagnostics.h - Aggregate Diagnostic headers --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// /// /// \file /// \brief Includes all the separate Diagnostic headers & some related helpers. /// //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_BASIC_ALLDIAGNOSTICS_H #define LLVM_CLANG_BASIC_ALLDIAGNOSTICS_H #include "clang/AST/ASTDiagnostic.h" #include "clang/AST/CommentDiagnostic.h" #include "clang/Analysis/AnalysisDiagnostic.h" #include "clang/Driver/DriverDiagnostic.h" #include "clang/Frontend/FrontendDiagnostic.h" #include "clang/Lex/LexDiagnostic.h" #include "clang/Parse/ParseDiagnostic.h" #include "clang/Sema/SemaDiagnostic.h" #include "clang/Serialization/SerializationDiagnostic.h" namespace clang { template <size_t SizeOfStr, typename FieldType> class StringSizerHelper { static_assert(SizeOfStr <= FieldType(~0U), "Field too small!"); public: enum { Size = SizeOfStr }; }; } // end namespace clang #define STR_SIZE(str, fieldTy) clang::StringSizerHelper<sizeof(str)-1, \ fieldTy>::Size #endif
Use a static_assert instead of using the old array of size -1 trick.
[Basic] Use a static_assert instead of using the old array of size -1 trick. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@305439 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,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
d463708dd79dc9c1689a8ec5aa6ae6fc4d84d8c8
planck-c/timers.c
planck-c/timers.c
#include <stddef.h> #include <time.h> #include <pthread.h> #include <stdlib.h> #include "timers.h" struct timer_data_t { long millis; timer_callback_t timer_callback; void* data; }; void *timer_thread(void *data) { struct timer_data_t *timer_data = data; struct timespec t; t.tv_sec = timer_data->millis / 1000; t.tv_nsec = 1000 * 1000 * (timer_data->millis % 1000); nanosleep(&t, NULL); timer_data->timer_callback(timer_data->data); free(data); return NULL; } void start_timer(long millis, timer_callback_t timer_callback, void *data) { struct timer_data_t *timer_data = malloc(sizeof(struct timer_data_t)); timer_data->millis = millis; timer_data->timer_callback = timer_callback; timer_data->data = data; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); pthread_t thread; pthread_create(&thread, &attr, timer_thread, timer_data); }
#include <stddef.h> #include <time.h> #include <pthread.h> #include <stdlib.h> #include "timers.h" struct timer_data_t { long millis; timer_callback_t timer_callback; void* data; }; void *timer_thread(void *data) { struct timer_data_t *timer_data = data; struct timespec t; t.tv_sec = timer_data->millis / 1000; t.tv_nsec = 1000 * 1000 * (timer_data->millis % 1000); if (t.tv_sec == 0 && t.tv_nsec == 0) { t.tv_nsec = 1; /* Evidently needed on Ubuntu 14.04 */ } nanosleep(&t, NULL); timer_data->timer_callback(timer_data->data); free(data); return NULL; } void start_timer(long millis, timer_callback_t timer_callback, void *data) { struct timer_data_t *timer_data = malloc(sizeof(struct timer_data_t)); timer_data->millis = millis; timer_data->timer_callback = timer_callback; timer_data->data = data; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); pthread_t thread; pthread_create(&thread, &attr, timer_thread, timer_data); }
Fix bug if timer executed with 0 ms
Fix bug if timer executed with 0 ms
C
epl-1.0
mfikes/planck,slipset/planck,mfikes/planck,mfikes/planck,slipset/planck,slipset/planck,slipset/planck,mfikes/planck,mfikes/planck,mfikes/planck,slipset/planck
2cfe7b5f59bd396e82660360575b71489c6c38e7
src/newspaper.h
src/newspaper.h
#ifndef _NEWSPAPER_H_ #define _NEWSPAPER_H_ #include <string> #include "advertenum.h" using namespace std; class Newspaper { string name; int textPrice, imagePrice, textImagePrice; public: Newspaper(const string& name): name(name) {} int getPriceFor(AdvertType type) const { switch(type) { case AdvertType::Image: return imagePrice; case AdvertType::Text: return textPrice; case AdvertType::TextImage: return textImagePrice; } } void setPriceFor(AdvertType type, int price) { switch(type) { case AdvertType::Image: imagePrice=price; case AdvertType::Text: textPrice=price; case AdvertType::TextImage: textImagePrice=price; } } const string& getName() const { return name; } virtual ~Newspaper() {} }; #endif
#ifndef NEWSPAPER_H #define NEWSPAPER_H #include <string> #include "advertenum.h" using namespace std; class Newspaper { string name; int textPrice, imagePrice, textImagePrice; public: Newspaper(): name("") {} Newspaper(const string& name): name(name) {} int getPriceFor(AdvertType type) const { switch(type) { case AdvertType::Image: return imagePrice; case AdvertType::Text: return textPrice; case AdvertType::TextImage: return textImagePrice; } return 0; } void setPriceFor(AdvertType type, int price) { switch(type) { case AdvertType::Image: imagePrice=price; case AdvertType::Text: textPrice=price; case AdvertType::TextImage: textImagePrice=price; } } const string& getName() const { return name; } virtual ~Newspaper() {} }; #endif
Fix header guard, add impossible return value, add default name
Fix header guard, add impossible return value, add default name
C
mit
nyz93/advertapp,nyz93/advertapp
468fc8cd0f24a1bd07a586017cc55c9a014b4e04
src/webwidget.h
src/webwidget.h
#ifndef WEBWIDGET_H #define WEBWIDGET_H #include "webpage.h" #include <QtWebKit> #include <QStringList> class WebWidget : public QWebView { Q_OBJECT public: WebWidget(QWidget * parent=0); virtual void wheelEvent(QWheelEvent *); public slots: void changeFor(WebPage::UserAgents agent); void refitPage(); private slots: void onNetworkReply(QNetworkReply * reply); void refitPage(bool b); signals: void noHostFound(QUrl); void connectionRefused(); void remotlyClosed(); void timeOut(); void operationCancelled(); void pageNotFound(QUrl); private: WebPage * mWebPage; }; #endif // WEBWIDGET_H
/* Mobile On Desktop - A Smartphone emulator on desktop * Copyright (c) 2012 Régis FLORET * * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Régis FLORET nor the names of its contributors * may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef WEBWIDGET_H #define WEBWIDGET_H #include "webpage.h" #include <QtWebKit> #include <QStringList> class WebWidget : public QWebView { Q_OBJECT public: WebWidget(QWidget * parent=0); virtual void wheelEvent(QWheelEvent *); public slots: void changeFor(WebPage::UserAgents agent); void refitPage(); private slots: void onNetworkReply(QNetworkReply * reply); void refitPage(bool b); signals: void noHostFound(QUrl); void connectionRefused(); void remotlyClosed(); void timeOut(); void operationCancelled(); void pageNotFound(QUrl); private: WebPage * mWebPage; }; #endif // WEBWIDGET_H
Add BSD header on top of all files (forgot some files)
Add BSD header on top of all files (forgot some files)
C
bsd-3-clause
regisf/mobile-on-desktop,regisf/mobile-on-desktop
2a3b7a9e9928124865cfce561f410a9018aaeb94
GTMAppAuth/Sources/Public/GTMAppAuth/GTMAppAuth.h
GTMAppAuth/Sources/Public/GTMAppAuth/GTMAppAuth.h
/*! @file GTMAppAuth.h @brief GTMAppAuth SDK @copyright Copyright 2016 Google Inc. @copydetails 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. */ #import "GTMAppAuthFetcherAuthorization.h" #import "GTMAppAuthFetcherAuthorization+Keychain.h" #import "GTMKeychain.h" #if TARGET_OS_TV #elif TARGET_OS_WATCH #elif TARGET_OS_IOS #import "GTMOAuth2KeychainCompatibility.h" #elif TARGET_OS_MAC #import "GTMOAuth2KeychainCompatibility.h" #else #warn "Platform Undefined" #endif
/*! @file GTMAppAuth.h @brief GTMAppAuth SDK @copyright Copyright 2016 Google Inc. @copydetails 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. */ #import "GTMAppAuthFetcherAuthorization.h" #import "GTMAppAuthFetcherAuthorization+Keychain.h" #if TARGET_OS_TV #elif TARGET_OS_WATCH #elif TARGET_OS_IOS || TARGET_OS_MAC #import "GTMKeychain.h" #import "GTMOAuth2KeychainCompatibility.h" #else #warn "Platform Undefined" #endif
Move to iOS and Mac targets only.
Move to iOS and Mac targets only.
C
apache-2.0
google/GTMAppAuth,google/GTMAppAuth
7cc9b51d1d2e091baf4f72a02e46ac1471936e7f
config.h
config.h
// batwarn - (C) 2015-2016 Jeffrey E. Bedard #ifndef CONFIG_H #define CONFIG_H #define GAMMA_NORMAL 1.0 #define GAMMA_WARNING 5.0 enum { CRIT_PERCENT=5 ,LOW_PERCENT=10 ,FULL_PERCENT=90 }; #ifndef DEBUG #define WAIT 60 #else//DEBUG #define WAIT 1 #endif//!DEBUG #define BATSYSFILE "/sys/class/power_supply/BAT0/capacity" #define ACSYSFILE "/sys/class/power_supply/AC/online" #define SUSPEND_CMD "systemctl suspend" #endif//CONFIG_H
// batwarn - (C) 2015-2016 Jeffrey E. Bedard #ifndef BW_CONFIG_H #define BW_CONFIG_H #define GAMMA_NORMAL 1.0 #define GAMMA_WARNING 5.0 enum PercentCat { CRIT_PERCENT=5, LOW_PERCENT=10, FULL_PERCENT=90 }; // Delay for checking system files: #ifndef DEBUG enum { WAIT = 60 }; #else//DEBUG enum { WAIT = 1 }; #endif//!DEBUG // System files to check: #define BATSYSFILE "/sys/class/power_supply/BAT0/capacity" #define ACSYSFILE "/sys/class/power_supply/AC/online" #define SUSPEND_CMD "systemctl suspend" #endif//!BW_CONFIG_H
Convert defines to enums. Named percentage category enum. Documented values.
Convert defines to enums. Named percentage category enum. Documented values.
C
mit
jefbed/batwarn,jefbed/batwarn
bccdf2ad17f4e1ee9c7900e7e1dc95f61f700ea3
memory.c
memory.c
/* Copyright (c) 2012 Francis Russell <[email protected]> * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ #include <stdlib.h> #include <stdio.h> #include "memory.h" void *lmalloc(const size_t size) { void* const data = malloc(size); if (data == NULL) { fprintf(stderr, "Failed to allocate region of %li bytes.\n", size); exit(EXIT_FAILURE); } return data; } void lfree(void *const data) { free(data); }
/* Copyright (c) 2012 Francis Russell <[email protected]> * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ #include <stdlib.h> #include <stdio.h> #include "memory.h" void *lmalloc(const size_t size) { void* const data = malloc(size); if (data == NULL) { fprintf(stderr, "Failed to allocate region of %zu bytes.\n", size); exit(EXIT_FAILURE); } return data; } void lfree(void *const data) { free(data); }
Fix warning on printing value of type size_t.
Fix warning on printing value of type size_t. Monotone-Parent: f3b43f63ea982bf3ea58c1b0757c412b6a05a42a Monotone-Revision: 159ac37e2f3b80788fff369effa2496f32bc5adf
C
mit
FrancisRussell/lfmerge
ad902e3138ff67a76e7c3d8d6bf7d7d4f76fc479
HTMLKit/CSSAttributeSelector.h
HTMLKit/CSSAttributeSelector.h
// // CSSAttributeSelector.h // HTMLKit // // Created by Iska on 14/05/15. // Copyright (c) 2015 BrainCookie. All rights reserved. // #import <Foundation/Foundation.h> #import "CSSSelector.h" #import "CSSSimpleSelector.h" typedef NS_ENUM(NSUInteger, CSSAttributeSelectorType) { CSSAttributeSelectorExists, CSSAttributeSelectorExactMatch, CSSAttributeSelectorIncludes, CSSAttributeSelectorBegins, CSSAttributeSelectorEnds, CSSAttributeSelectorContains, CSSAttributeSelectorHyphen }; @interface CSSAttributeSelector : CSSSelector <CSSSimpleSelector> @property (nonatomic, assign) CSSAttributeSelectorType type; @property (nonatomic, copy) NSString *name; @property (nonatomic, copy) NSString *value; + (instancetype)selectorForClass:(NSString *)className; + (instancetype)selectorForId:(NSString *)elementId; - (instancetype)initWithType:(CSSAttributeSelectorType)type attributeName:(NSString *)name attrbiuteValue:(NSString *)value; @end
// // CSSAttributeSelector.h // HTMLKit // // Created by Iska on 14/05/15. // Copyright (c) 2015 BrainCookie. All rights reserved. // #import <Foundation/Foundation.h> #import "CSSSelector.h" #import "CSSSimpleSelector.h" typedef NS_ENUM(NSUInteger, CSSAttributeSelectorType) { CSSAttributeSelectorExists, CSSAttributeSelectorExactMatch, CSSAttributeSelectorIncludes, CSSAttributeSelectorBegins, CSSAttributeSelectorEnds, CSSAttributeSelectorContains, CSSAttributeSelectorHyphen, CSSAttributeSelectorNot }; @interface CSSAttributeSelector : CSSSelector <CSSSimpleSelector> @property (nonatomic, assign) CSSAttributeSelectorType type; @property (nonatomic, copy) NSString * _Nonnull name; @property (nonatomic, copy) NSString * _Nonnull value; + (nullable instancetype)selectorForClass:(nonnull NSString *)className; + (nullable instancetype)selectorForId:(nonnull NSString *)elementId; - (nullable instancetype)initWithType:(CSSAttributeSelectorType)type attributeName:(nonnull NSString *)name attrbiuteValue:(nullable NSString *)value; @end
Add nullability specifiers to attribute selector
Add nullability specifiers to attribute selector
C
mit
iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit
ea2b85c388cb88e2d65a632f694bd76b285cb5ab
Modules/Core/SpatialObjects/include/itkMetaEvent.h
Modules/Core/SpatialObjects/include/itkMetaEvent.h
/*========================================================================= * * Copyright Insight Software Consortium * * 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.txt * * 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 itkMetaEvent_h #define itkMetaEvent_h #include "itkMacro.h" #include "metaEvent.h" namespace itk { /** \class MetaEvent * \brief Event abstract class * \ingroup ITKSpatialObjects */ class MetaEvent : public :: MetaEvent { public: MetaEvent(); virtual ~MetaEvent(); }; } // end namespace itk #endif
/*========================================================================= * * Copyright Insight Software Consortium * * 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.txt * * 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 itkMetaEvent_h #define itkMetaEvent_h #include "itkMacro.h" #include "metaEvent.h" namespace itk { /** \class MetaEvent * \brief Event abstract class * * The itk::MetaEvent inherits from the * global namespace ::MetaEvent that is provided * by the MetaIO/src/metaEvent.h class. * \ingroup ITKSpatialObjects */ class MetaEvent : public ::MetaEvent { public: MetaEvent(); virtual ~MetaEvent(); }; } // end namespace itk #endif
Clarify strange syntax for itk::MetaEvent
DOC: Clarify strange syntax for itk::MetaEvent The itk::MetaEvent inherits from the global namespace ::MetaEvent that is provided by the MetaIO/src/metaEvent.h class. Change-Id: I43aaeeee22298b69cfe4f1acb06186f9599586ac
C
apache-2.0
ajjl/ITK,biotrump/ITK,jmerkow/ITK,zachary-williamson/ITK,fbudin69500/ITK,msmolens/ITK,Kitware/ITK,Kitware/ITK,malaterre/ITK,richardbeare/ITK,spinicist/ITK,malaterre/ITK,hjmjohnson/ITK,msmolens/ITK,InsightSoftwareConsortium/ITK,LucasGandel/ITK,jcfr/ITK,fedral/ITK,spinicist/ITK,ajjl/ITK,InsightSoftwareConsortium/ITK,thewtex/ITK,jmerkow/ITK,LucasGandel/ITK,fedral/ITK,fbudin69500/ITK,stnava/ITK,stnava/ITK,hjmjohnson/ITK,blowekamp/ITK,InsightSoftwareConsortium/ITK,LucasGandel/ITK,jmerkow/ITK,thewtex/ITK,vfonov/ITK,thewtex/ITK,BRAINSia/ITK,Kitware/ITK,PlutoniumHeart/ITK,msmolens/ITK,jcfr/ITK,vfonov/ITK,BRAINSia/ITK,stnava/ITK,blowekamp/ITK,msmolens/ITK,LucHermitte/ITK,Kitware/ITK,LucasGandel/ITK,zachary-williamson/ITK,blowekamp/ITK,jcfr/ITK,thewtex/ITK,malaterre/ITK,stnava/ITK,LucasGandel/ITK,blowekamp/ITK,richardbeare/ITK,zachary-williamson/ITK,thewtex/ITK,msmolens/ITK,BRAINSia/ITK,jmerkow/ITK,blowekamp/ITK,zachary-williamson/ITK,zachary-williamson/ITK,stnava/ITK,jcfr/ITK,fedral/ITK,fbudin69500/ITK,spinicist/ITK,BlueBrain/ITK,BlueBrain/ITK,biotrump/ITK,BRAINSia/ITK,vfonov/ITK,BlueBrain/ITK,spinicist/ITK,fedral/ITK,zachary-williamson/ITK,stnava/ITK,PlutoniumHeart/ITK,malaterre/ITK,ajjl/ITK,LucHermitte/ITK,InsightSoftwareConsortium/ITK,Kitware/ITK,richardbeare/ITK,spinicist/ITK,fedral/ITK,jcfr/ITK,biotrump/ITK,vfonov/ITK,fedral/ITK,zachary-williamson/ITK,biotrump/ITK,jcfr/ITK,InsightSoftwareConsortium/ITK,biotrump/ITK,biotrump/ITK,jcfr/ITK,PlutoniumHeart/ITK,ajjl/ITK,BRAINSia/ITK,fedral/ITK,zachary-williamson/ITK,fbudin69500/ITK,jmerkow/ITK,malaterre/ITK,richardbeare/ITK,blowekamp/ITK,malaterre/ITK,fbudin69500/ITK,Kitware/ITK,Kitware/ITK,richardbeare/ITK,malaterre/ITK,richardbeare/ITK,spinicist/ITK,LucHermitte/ITK,spinicist/ITK,msmolens/ITK,stnava/ITK,jmerkow/ITK,vfonov/ITK,stnava/ITK,BRAINSia/ITK,msmolens/ITK,LucHermitte/ITK,biotrump/ITK,ajjl/ITK,hjmjohnson/ITK,BRAINSia/ITK,richardbeare/ITK,blowekamp/ITK,BlueBrain/ITK,LucHermitte/ITK,InsightSoftwareConsortium/ITK,LucasGandel/ITK,LucasGandel/ITK,jcfr/ITK,malaterre/ITK,hjmjohnson/ITK,biotrump/ITK,hjmjohnson/ITK,PlutoniumHeart/ITK,blowekamp/ITK,malaterre/ITK,fbudin69500/ITK,ajjl/ITK,LucasGandel/ITK,LucHermitte/ITK,stnava/ITK,hjmjohnson/ITK,hjmjohnson/ITK,PlutoniumHeart/ITK,msmolens/ITK,fedral/ITK,fbudin69500/ITK,vfonov/ITK,BlueBrain/ITK,PlutoniumHeart/ITK,PlutoniumHeart/ITK,thewtex/ITK,BlueBrain/ITK,ajjl/ITK,ajjl/ITK,LucHermitte/ITK,thewtex/ITK,fbudin69500/ITK,spinicist/ITK,BlueBrain/ITK,InsightSoftwareConsortium/ITK,LucHermitte/ITK,PlutoniumHeart/ITK,spinicist/ITK,vfonov/ITK,vfonov/ITK,vfonov/ITK,zachary-williamson/ITK,jmerkow/ITK,jmerkow/ITK,BlueBrain/ITK
a4d274a780125cab0aa21ffd2a4060a66e2512d4
wms/WMSQueryDataLayer.h
wms/WMSQueryDataLayer.h
// ====================================================================== /*! * \brief A Meb Maps Service Layer data structure for query data layer * * Characteristics: * * - * - */ // ====================================================================== #pragma once #include "WMSConfig.h" namespace SmartMet { namespace Plugin { namespace WMS { class WMSQueryDataLayer : public WMSLayer { private: const Engine::Querydata::Engine* itsQEngine; const std::string itsProducer; boost::posix_time::ptime itsModificationTime = boost::posix_time::from_time_t(0); protected: virtual void updateLayerMetaData(); public: WMSQueryDataLayer(const WMSConfig& config, const std::string& producer) : WMSLayer(config), itsQEngine(config.qEngine()), itsProducer(producer) { } const boost::posix_time::ptime& modificationTime() const override; }; } // namespace WMS } // namespace Plugin } // namespace SmartMet
// ====================================================================== /*! * \brief A Meb Maps Service Layer data structure for query data layer * * Characteristics: * * - * - */ // ====================================================================== #pragma once #include "WMSConfig.h" namespace SmartMet { namespace Plugin { namespace WMS { class WMSQueryDataLayer : public WMSLayer { private: const Engine::Querydata::Engine* itsQEngine; const std::string itsProducer; boost::posix_time::ptime itsModificationTime = boost::posix_time::from_time_t(0); protected: void updateLayerMetaData() override; public: WMSQueryDataLayer(const WMSConfig& config, const std::string& producer) : WMSLayer(config), itsQEngine(config.qEngine()), itsProducer(producer) { } const boost::posix_time::ptime& modificationTime() const override; }; } // namespace WMS } // namespace Plugin } // namespace SmartMet
Use override (pacify clang++ warning)
Use override (pacify clang++ warning)
C
mit
fmidev/smartmet-plugin-wms,fmidev/smartmet-plugin-wms,fmidev/smartmet-plugin-wms,fmidev/smartmet-plugin-wms
93fefee3d2cd7f0bf773595d8e41f80fd9909897
Settings/Controls/Spinner.h
Settings/Controls/Spinner.h
#pragma once #include "Control.h" #include <CommCtrl.h> class Spinner : public Control { public: Spinner() { } Spinner(int id, HWND parent) : Control(id, parent) { } virtual void Enable(); virtual void Disable(); void Buddy(int buddyId); /// <summary>Sets the range (min, max) for the spin control.</summary> /// <param name="lo">Lower bound for the spinner.</param> /// <param name="hi">Upper bound for the spinner.</param> void Range(int lo, int hi); std::wstring Text(); int TextAsInt(); bool Text(std::wstring text); bool Text(int value); virtual DLGPROC Notification(NMHDR *nHdr); public: /* Event Handlers */ std::function<bool(NMUPDOWN *)> OnSpin; private: int _buddyId; HWND _buddyWnd; };
#pragma once #include "Control.h" #include <CommCtrl.h> /// <summary> /// Manages a 'spin control': a numeric edit box with a up/down 'buddy' to /// increment or decrement the current value of the box. /// </summary> class Spinner : public Control { public: Spinner() { } Spinner(int id, HWND parent) : Control(id, parent) { } virtual void Enable(); virtual void Disable(); void Buddy(int buddyId); /// <summary>Sets the range (min, max) for the spin control.</summary> /// <param name="lo">Lower bound for the spinner.</param> /// <param name="hi">Upper bound for the spinner.</param> void Range(int lo, int hi); std::wstring Text(); int TextAsInt(); bool Text(std::wstring text); bool Text(int value); virtual DLGPROC Notification(NMHDR *nHdr); public: /* Event Handlers */ std::function<bool(NMUPDOWN *)> OnSpin; private: int _buddyId; HWND _buddyWnd; };
Add summary for spin control class
Add summary for spin control class
C
bsd-2-clause
malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,malensek/3RVX
9e1ca6b5bc40d15f5c45189f6ca0220912dcfed5
src/qt/clientmodel.h
src/qt/clientmodel.h
#ifndef CLIENTMODEL_H #define CLIENTMODEL_H #include <QObject> class OptionsModel; class AddressTableModel; class TransactionTableModel; class CWallet; QT_BEGIN_NAMESPACE class QDateTime; QT_END_NAMESPACE // Interface to Bitcoin network client class ClientModel : public QObject { Q_OBJECT public: // The only reason that this constructor takes a wallet is because // the global client settings are stored in the main wallet. explicit ClientModel(OptionsModel *optionsModel, QObject *parent = 0); OptionsModel *getOptionsModel(); int getNumConnections() const; int getNumBlocks() const; QDateTime getLastBlockDate() const; // Return true if client connected to testnet bool isTestNet() const; // Return true if core is doing initial block download bool inInitialBlockDownload() const; // Return conservative estimate of total number of blocks, or 0 if unknown int getTotalBlocksEstimate() const; QString formatFullVersion() const; private: OptionsModel *optionsModel; int cachedNumConnections; int cachedNumBlocks; signals: void numConnectionsChanged(int count); void numBlocksChanged(int count); // Asynchronous error notification void error(const QString &title, const QString &message); public slots: private slots: void update(); }; #endif // CLIENTMODEL_H
#ifndef CLIENTMODEL_H #define CLIENTMODEL_H #include <QObject> class OptionsModel; class AddressTableModel; class TransactionTableModel; class CWallet; QT_BEGIN_NAMESPACE class QDateTime; QT_END_NAMESPACE // Interface to Bitcoin network client class ClientModel : public QObject { Q_OBJECT public: explicit ClientModel(OptionsModel *optionsModel, QObject *parent = 0); OptionsModel *getOptionsModel(); int getNumConnections() const; int getNumBlocks() const; QDateTime getLastBlockDate() const; // Return true if client connected to testnet bool isTestNet() const; // Return true if core is doing initial block download bool inInitialBlockDownload() const; // Return conservative estimate of total number of blocks, or 0 if unknown int getTotalBlocksEstimate() const; QString formatFullVersion() const; private: OptionsModel *optionsModel; int cachedNumConnections; int cachedNumBlocks; signals: void numConnectionsChanged(int count); void numBlocksChanged(int count); // Asynchronous error notification void error(const QString &title, const QString &message); public slots: private slots: void update(); }; #endif // CLIENTMODEL_H
Remove no longer valid comment
Remove no longer valid comment
C
mit
reddink/reddcoin,Cannacoin-Project/Cannacoin,ahmedbodi/poscoin,reddcoin-project/reddcoin,joroob/reddcoin,coinkeeper/2015-06-22_19-10_cannacoin,ahmedbodi/poscoin,joroob/reddcoin,coinkeeper/2015-06-22_19-10_cannacoin,bmp02050/ReddcoinUpdates,reddcoin-project/reddcoin,Cannacoin-Project/Cannacoin,bmp02050/ReddcoinUpdates,reddcoin-project/reddcoin,joroob/reddcoin,bmp02050/ReddcoinUpdates,reddcoin-project/reddcoin,ahmedbodi/poscoin,coinkeeper/2015-06-22_19-10_cannacoin,coinkeeper/2015-06-22_18-46_reddcoin,Cannacoin-Project/Cannacoin,bmp02050/ReddcoinUpdates,joroob/reddcoin,Cannacoin-Project/Cannacoin,bmp02050/ReddcoinUpdates,reddink/reddcoin,Cannacoin-Project/Cannacoin,coinkeeper/2015-06-22_18-46_reddcoin,ahmedbodi/poscoin,reddcoin-project/reddcoin,reddink/reddcoin,coinkeeper/2015-06-22_19-10_cannacoin,coinkeeper/2015-06-22_18-46_reddcoin,joroob/reddcoin,coinkeeper/2015-06-22_19-10_cannacoin,ahmedbodi/poscoin,reddink/reddcoin,reddcoin-project/reddcoin,reddink/reddcoin,coinkeeper/2015-06-22_18-46_reddcoin,coinkeeper/2015-06-22_18-46_reddcoin
b07d89ca854f79eca700a95f5e1d23d5b5f6f1ba
SFBluetoothLowEnergyDevice/Classes/SFBLELogging.h
SFBluetoothLowEnergyDevice/Classes/SFBLELogging.h
// // SFBLELogging.h // SFBluetoothLowEnergyDevice // // Created by Thomas Billicsich on 2014-04-04. // Copyright (c) 2014 Thomas Billicsich. All rights reserved. #import <CocoaLumberjack/CocoaLumberjack.h> // To define a different local (per file) log level // put the following line _before_ the import of SFBLELogging.h // #define LOCAL_LOG_LEVEL LOG_LEVEL_DEBUG #define GLOBAL_LOG_LEVEL DDLogLevelVerbose #ifndef LOCAL_LOG_LEVEL #define LOCAL_LOG_LEVEL GLOBAL_LOG_LEVEL #endif static int ddLogLevel = LOCAL_LOG_LEVEL;
// // SFBLELogging.h // SFBluetoothLowEnergyDevice // // Created by Thomas Billicsich on 2014-04-04. // Copyright (c) 2014 Thomas Billicsich. All rights reserved. #import <CocoaLumberjack/CocoaLumberjack.h> // To define a different local (per file) log level // put the following line _before_ the import of SFBLELogging.h // #define LOCAL_LOG_LEVEL LOG_LEVEL_DEBUG #define GLOBAL_LOG_LEVEL DDLogLevelInfo #ifndef LOCAL_LOG_LEVEL #define LOCAL_LOG_LEVEL GLOBAL_LOG_LEVEL #endif static int ddLogLevel = LOCAL_LOG_LEVEL;
Set default log level to info
Set default log level to info [Delivers #87082830]
C
mit
martinjacala/SFBluetoothLowEnergyDevice,simpliflow/SFBluetoothLowEnergyDevice
6bfc82aaf18e42fcc7328b81ffb3ec3cf360d732
webrtc/common_audio/signal_processing/cross_correlation.c
webrtc/common_audio/signal_processing/cross_correlation.c
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" /* C version of WebRtcSpl_CrossCorrelation() for generic platforms. */ void WebRtcSpl_CrossCorrelationC(int32_t* cross_correlation, const int16_t* seq1, const int16_t* seq2, int16_t dim_seq, int16_t dim_cross_correlation, int right_shifts, int step_seq2) { int i = 0, j = 0; for (i = 0; i < dim_cross_correlation; i++) { int32_t corr = 0; /* Unrolling doesn't seem to improve performance. */ for (j = 0; j < dim_seq; j++) { // It's not clear why casting |right_shifts| here helps performance. corr += (seq1[j] * seq2[j]) >> (int16_t)right_shifts; } seq2 += step_seq2; *cross_correlation++ = corr; } }
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" /* C version of WebRtcSpl_CrossCorrelation() for generic platforms. */ void WebRtcSpl_CrossCorrelationC(int32_t* cross_correlation, const int16_t* seq1, const int16_t* seq2, int16_t dim_seq, int16_t dim_cross_correlation, int right_shifts, int step_seq2) { int i = 0, j = 0; for (i = 0; i < dim_cross_correlation; i++) { int32_t corr = 0; /* Unrolling doesn't seem to improve performance. */ for (j = 0; j < dim_seq; j++) corr += (seq1[j] * seq2[j]) >> right_shifts; seq2 += step_seq2; *cross_correlation++ = corr; } }
Test whether removing a cast still hurts performance.
Test whether removing a cast still hurts performance. BUG=499241 TEST=none TBR=andrew Review URL: https://codereview.webrtc.org/1206653002 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#9491}
C
bsd-3-clause
ShiftMediaProject/libilbc,TimothyGu/libilbc,TimothyGu/libilbc,TimothyGu/libilbc,ShiftMediaProject/libilbc,TimothyGu/libilbc,TimothyGu/libilbc,ShiftMediaProject/libilbc,ShiftMediaProject/libilbc,ShiftMediaProject/libilbc
70a3bea036ff5c4ddfc3d80b955535a646d334ae
src/lib/hex-dec.c
src/lib/hex-dec.c
/* Copyright (c) 2005-2011 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "hex-dec.h" void dec2hex(unsigned char *hexstr, uintmax_t dec, unsigned int hexstr_size) { unsigned int i; for (i = 0; i < hexstr_size; i++) { unsigned int value = dec & 0x0f; if (value < 10) hexstr[hexstr_size-i-1] = value + '0'; else hexstr[hexstr_size-i-1] = value - 10 + 'A'; dec >>= 4; } } uintmax_t hex2dec(const unsigned char *data, unsigned int len) { unsigned int i; uintmax_t value = 0; for (i = 0; i < len; i++) { value = value*0x10; if (data[i] >= '0' && data[i] <= '9') value += data[i]-'0'; else if (data[i] >= 'A' && data[i] <= 'F') value += data[i]-'A' + 10; else return 0; } return value; }
/* Copyright (c) 2005-2011 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "hex-dec.h" void dec2hex(unsigned char *hexstr, uintmax_t dec, unsigned int hexstr_size) { unsigned int i; for (i = 0; i < hexstr_size; i++) { unsigned int value = dec & 0x0f; if (value < 10) hexstr[hexstr_size-i-1] = value + '0'; else hexstr[hexstr_size-i-1] = value - 10 + 'A'; dec >>= 4; } } uintmax_t hex2dec(const unsigned char *data, unsigned int len) { unsigned int i; uintmax_t value = 0; for (i = 0; i < len; i++) { value = value*0x10; if (data[i] >= '0' && data[i] <= '9') value += data[i]-'0'; else if (data[i] >= 'A' && data[i] <= 'F') value += data[i]-'A' + 10; else if (data[i] >= 'a' && data[i] <= 'f') value += data[i]-'a' + 10; else return 0; } return value; }
Allow data to contain also lowercase hex characters.
hex2dec(): Allow data to contain also lowercase hex characters.
C
mit
damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot
adcb44aa1001abff7727db60cfda9c805b446582
tests/regression/00-sanity/22-cfg-connect.c
tests/regression/00-sanity/22-cfg-connect.c
int main() { // non-deterministically make all variants live int r; switch (r) { case 0: single(); break; case 1: sequential_last(); break; case 2: sequential_both(); break; case 3: branch_one(); break; case 4: branch_both(); break; case 5: nested_outer(); break; case 6: nested_inner(); break; case 7: nested_both(); break; } return 0; } void single() { while (1) assert(1); } void sequential_last() { int i = 0; while (i < 0) i++; while (1) assert(1); } void sequential_both() { // TODO: fix crash // while (1) // assert(1); // while (1) // assert(1); } void branch_one() { int r; if (r) { int i = 0; while (i < 0) i++; } else { while (1) assert(1); } } void branch_both() { int r; if (r) { while (1) assert(1); } else { while (1) assert(1); } } void nested_outer() { while (1) { int i = 0; while (i < 0) i++; } } void nested_inner() { int i = 0; while (i < 0) { while (1) assert(1); i++; } } void nested_both() { // TODO: fix crash // while (1) // { // while (1) // assert(1); // } }
Add regression test for infinite loop combinations CFG connectedness
Add regression test for infinite loop combinations CFG connectedness
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
2c058b10c0dc3b2df2fb6d0a203c2abca300c794
tests/regression/34-localwn_restart/04-hh.c
tests/regression/34-localwn_restart/04-hh.c
// SKIP PARAM: --enable ana.int.interval --set solver td3 --enable ana.base.partition-arrays.enabled --set ana.activated "['base','threadid','threadflag','expRelation','mallocWrapper','apron']" --set ana.base.privatization none --set ana.apron.privatization dummy --set sem.int.signed_overflow assume_none // This is part of 34-localization, but also symlinked to 36-apron. // ALSO: --enable ana.int.interval --set solver slr3 --enable ana.base.partition-arrays.enabled --set ana.activated "['base','threadid','threadflag','expRelation','mallocWrapper','apron']" --set ana.base.privatization none --set ana.apron.privatization dummy --set sem.int.signed_overflow assume_none // Example from Halbwachs-Henry, SAS 2012 // Localized widening or restart policy should be able to prove that i <= j+3 // if the abstract domain is powerful enough. void main() { int i = 0; while (i<4) { int j=0; while (j<4) { i=i+1; j=j+1; } i = i-j+1; assert(i <= j+3); } return ; }
// SKIP PARAM: --enable ana.int.interval --set solver td3 --set ana.base.arrays.domain partitioned --set ana.activated "['base','threadid','threadflag','expRelation','mallocWrapper','apron']" --set ana.base.privatization none --set ana.apron.privatization dummy --set sem.int.signed_overflow assume_none // This is part of 34-localization, but also symlinked to 36-apron. // ALSO: --enable ana.int.interval --set solver slr3 --set ana.base.arrays.domain partitioned --set ana.activated "['base','threadid','threadflag','expRelation','mallocWrapper','apron']" --set ana.base.privatization none --set ana.apron.privatization dummy --set sem.int.signed_overflow assume_none // Example from Halbwachs-Henry, SAS 2012 // Localized widening or restart policy should be able to prove that i <= j+3 // if the abstract domain is powerful enough. void main() { int i = 0; while (i<4) { int j=0; while (j<4) { i=i+1; j=j+1; } i = i-j+1; assert(i <= j+3); } return ; }
Fix partitioned array option in additional test
Fix partitioned array option in additional test
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
8b47bd6c54891baebf6a1083c7b1f6fa0402b8e4
cc1/tests/test029.c
cc1/tests/test029.c
/* name: TEST029 description: Test of nested expansion and refusing macro without arguments comments: f(2) will expand to 2*g, which will expand to 2*f, and in this moment f will not be expanded because the macro definition is a function alike macro, and in this case there is no arguments. output: test029.c:34: error: redefinition of 'f1' F2 G3 F2 f1 { \ A4 I f A4 #I2 *I } test029.c:35: error: 'f' undeclared */ #define f(a) a*g #define g f int f1(void) { int f; f(2); } int f1(void) { f(2); }
Add test for nested macro expansion
Add test for nested macro expansion This test also check what happens when a macro with arguments is found without them.
C
isc
k0gaMSX/scc,8l/scc,k0gaMSX/scc,k0gaMSX/scc,k0gaMSX/kcc,k0gaMSX/kcc,8l/scc,8l/scc
8b491b720bf845b0e5fa567609576e73fef1b7f6
tests/regression/46-apron2/07-escaping-recursion.c
tests/regression/46-apron2/07-escaping-recursion.c
// SKIP PARAM: --set solver td3 --set ana.activated "['base','threadid','threadflag','mallocWrapper','apron','escape']" --set ana.base.privatization none --set ana.apron.privatization dummy int rec(int i,int* ptr) { int top; int x = 17; if(i == 0) { rec(5,&x); // Recursive call may have modified x assert(x == 17); //UNKNOWN! // If we analyse this with int contexts, there is no other x that is reachable, so this // update is strong x = 17; assert(x == 17); } else { x = 31; // ptr points to the outer x, it is unaffected by this assignment // and should be 17 assert(*ptr == 31); //UNKNOWN! if(top) { ptr = &x; } // ptr may now point to both the inner and the outer x *ptr = 12; assert(*ptr == 12); //UNKNOWN! assert(x == 12); //UNKNOWN! if(*ptr == 12) { assert(x == 12); //UNKNOWN! } // ptr may still point to the outer instance assert(ptr == &x); //UNKNOWN! // Another copy of x is reachable, so we are conservative and do a weak update x = 31; assert(x == 31); // UNKNOWN } return 0; } int main() { int t; rec(0,&t); return 0; }
Add "escaping" via recursion example
Add "escaping" via recursion example
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
c5948e847f1da44bb6d076253ac1e73df0cd162c
tests/regression/01-cpa/55-dead-branch-multiple.c
tests/regression/01-cpa/55-dead-branch-multiple.c
#include <assert.h> int main() { int a = 1; int b = 0; if (a && b) { // TODO WARN assert(0); // NOWARN (unreachable) } return 0; }
Add regression test for multiple dead branches
Add regression test for multiple dead branches
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
951f746d0de74c85f26fbdc0e32f8f92699d76b5
src/simple_data_types_and_compounds/c/arrays/sample_array.c
src/simple_data_types_and_compounds/c/arrays/sample_array.c
/* * Author: Jhonatan Casale (jhc) * * Contact : [email protected] * : [email protected] * : https://github.com/jhonatancasale * : https://twitter.com/jhonatancasale * : http://jhonatancasale.github.io/ * * Create date Sat 10 Dec 16:28:22 BRST 2016 * */ #include <stdlib.h> #include <stdio.h> int main (int argc, char **argv) { int i; int array[ 100 ]; int sum = 0; for ( i = 0; i < 100; i++ ) array[ i ] = i + 1; for ( i = 0; i < 100; i++ ) sum += array[ i ]; printf ("Sum from 0 to 100: %d\n", sum); return (EXIT_SUCCESS); }
Add arrays example in C
Add arrays example in C
C
mit
jhonatancasale/c-python-r-diffs,jhonatancasale/c-python-r-diffs,jhonatancasale/c-python-r-diffs
fd7f66f8c2d75858a2fd7ede056418d7be109792
common/stats/ExportedTimeseries.h
common/stats/ExportedTimeseries.h
/* * Copyright (c) 2004-present, 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 <folly/Range.h> #include <chrono> namespace facebook { class SpinLock { }; class SpinLockHolder { public: explicit SpinLockHolder(SpinLock*) {} }; namespace stats { enum ExportType { SUM, COUNT, AVG, RATE, PERCENT, NUM_TYPES, }; struct ExportedStat { void addValue(std::chrono::seconds, int64_t) {} }; class ExportedStatMap { public: class LockAndStatItem { public: std::shared_ptr<SpinLock> first; std::shared_ptr<ExportedStat> second; }; LockAndStatItem getLockAndStatItem(folly::StringPiece, const ExportType* = nullptr) { static LockAndStatItem it = { std::make_shared<SpinLock>(), std::make_shared<ExportedStat>() }; return it; } }; }}
/* * Copyright (c) 2004-present, 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 <folly/Range.h> #include <chrono> namespace facebook { class SpinLock { }; class SpinLockHolder { public: explicit SpinLockHolder(SpinLock*) {} }; namespace stats { enum ExportType { SUM, COUNT, AVG, RATE, PERCENT, NUM_TYPES, }; struct ExportedStat { void addValue(std::chrono::seconds, int64_t) {} }; class ExportedStatMap { public: class LockAndStatItem { public: std::shared_ptr<SpinLock> first; std::shared_ptr<ExportedStat> second; }; LockAndStatItem getLockAndStatItem(folly::StringPiece, const ExportType* = nullptr) { static LockAndStatItem it = { std::make_shared<SpinLock>(), std::make_shared<ExportedStat>() }; return it; } std::shared_ptr<ExportedStat> getStatPtr(folly::StringPiece name) { return std::make_shared<ExportedStat>(); } }; }}
Fix some build issues in the open source code.
Fix some build issues in the open source code. Summary: Our code grew some implicit transitive dependencies on the headers that internal headers included, but our stubs did not. This fixes that, and updates our stubs to match what our code expects. Test Plan: Apply to open source repository and test. Reviewed By: [email protected] Subscribers: fbcode-common-diffs@, net-systems@, yfeldblum FB internal diff: D1982664 Signature: t1:1982664:1428695964:3fd76243d013ca4969c0dcd91f97e3292cf13c1f Signed-off-by: Ori Bernstein <[email protected]>
C
bsd-3-clause
sonoble/fboss,sonoble/fboss,neuhausler/fboss,raphaelamorim/fboss,peterlei/fboss,raphaelamorim/fboss,neuhausler/fboss,neuhausler/fboss,peterlei/fboss,peterlei/fboss,biddyweb/fboss,raphaelamorim/fboss,biddyweb/fboss,biddyweb/fboss,neuhausler/fboss,sonoble/fboss,peterlei/fboss
7be293bd7fbf85b88387835c99891e2ac3e2e4ff
dev/Source/dev/Public/Tank.h
dev/Source/dev/Public/Tank.h
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "GameFramework/Pawn.h" #include "Tank.generated.h" // Put new includes above class UTankBarrel; // Do a class forward declaration class UTurret; class UTankAimingComponent; class AProjectile; UCLASS() class DEV_API ATank : public APawn { GENERATED_BODY() public: void AimAt(FVector hitLocation); // Make the following method be callable from blueprint UFUNCTION(BlueprintCallable, Category = Setup) void SetBarrelReference(UTankBarrel* barrelToSet); UFUNCTION(BlueprintCallable, Category = Setup) void SetTurretReference(UTurret* turretToSet); UFUNCTION(BlueprintCallable, Category = Setup) void FireCannon(); protected: UTankAimingComponent* tankAimingComponent = nullptr; private: UPROPERTY(EditAnywhere, Category = Firing) float launchSpeed = 4000.0f; // 1000 metres per second. TODO: find a sensible default // Sets default values for this pawn's properties ATank(); // Called when the game starts or when spawned virtual void BeginPlay() override; UPROPERTY(EditAnywhere, Category = "Setup") TSubclassOf<AProjectile> projectileBlueprint; UTankBarrel* barrel = nullptr; float reloadTimeInSeconds = 3.0f; // sensible default double lastFireTime = 0; };
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "GameFramework/Pawn.h" #include "Tank.generated.h" // Put new includes above class UTankBarrel; // Do a class forward declaration class UTurret; class UTankAimingComponent; class AProjectile; UCLASS() class DEV_API ATank : public APawn { GENERATED_BODY() public: void AimAt(FVector hitLocation); // Make the following method be callable from blueprint UFUNCTION(BlueprintCallable, Category = "Setup") void SetBarrelReference(UTankBarrel* barrelToSet); UFUNCTION(BlueprintCallable, Category = "Setup") void SetTurretReference(UTurret* turretToSet); UFUNCTION(BlueprintCallable, Category = "Setup") void FireCannon(); protected: UTankAimingComponent* tankAimingComponent = nullptr; private: UPROPERTY(EditAnywhere, Category = Firing) float launchSpeed = 4000.0f; // 1000 metres per second. TODO: find a sensible default // Sets default values for this pawn's properties ATank(); // Called when the game starts or when spawned virtual void BeginPlay() override; UPROPERTY(EditDefaultsOnly, Category = "Setup") TSubclassOf<AProjectile> projectileBlueprint; UTankBarrel* barrel = nullptr; UPROPERTY(EditDefaultsOnly, Category = "Firing") float reloadTimeInSeconds = 3.0f; // sensible default double lastFireTime = 0; };
Use EditDefaultsOnly insted of EditAnywhere
Use EditDefaultsOnly insted of EditAnywhere
C
mit
tanerius/crazy_tanks,tanerius/crazy_tanks,tanerius/crazy_tanks
9789bc50472b6efdd56545e16e756175a052fba1
src/qnd.c
src/qnd.c
#include "qnd.h" /* Global context for server */ qnd_context ctx; int main(int argc, char **argv) { struct ev_signal signal_watcher; struct ev_io w_accept; struct ev_loop *loop = ev_default_loop(0); qnd_context_init(&ctx); if (qnd_context_listen(&ctx, DEFAULT_PORT) == -1) exit(1); ev_signal_init(&signal_watcher, sigint_cb, SIGINT); ev_signal_start(loop, &signal_watcher); ev_io_init(&w_accept, accept_cb, ctx.sd, EV_READ); ev_io_start(loop, &w_accept); ev_loop(loop, 0); qnd_context_cleanup(&ctx); return 0; }
#include "qnd.h" /* Global context for server */ qnd_context ctx; int main(int argc, char **argv) { struct ev_signal signal_watcher; struct ev_io w_accept; struct ev_loop *loop = ev_default_loop(0); qnd_context_init(&ctx); if (qnd_context_listen(&ctx, DEFAULT_PORT) == -1) exit(1); ev_signal_init(&signal_watcher, sigint_cb, SIGINT); ev_signal_start(loop, &signal_watcher); ev_io_init(&w_accept, accept_cb, ctx.sd, EV_READ); ev_io_start(loop, &w_accept); ev_loop(loop, 0); ev_signal_stop(loop, &signal_watcher); ev_io_stop(loop, &w_accept); qnd_context_cleanup(&ctx); return 0; }
Stop pending watchers during shutdown.
Stop pending watchers during shutdown.
C
mit
jbcrail/quidnuncd,jbcrail/quidnuncd
c8330a62fe3fba72c5a5094304f80808ee2de5a5
os/native_cursor.h
os/native_cursor.h
// LAF OS Library // Copyright (C) 2021 Igara Studio S.A. // Copyright (C) 2012-2014 David Capello // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. #ifndef OS_NATIVE_CURSOR_H_INCLUDED #define OS_NATIVE_CURSOR_H_INCLUDED #pragma once #include "gfx/fwd.h" namespace os { enum class NativeCursor { Hidden, Arrow, Crosshair, IBeam, Wait, Link, Help, Forbidden, Move, SizeNS, SizeWE, SizeN, SizeNE, SizeE, SizeSE, SizeS, SizeSW, SizeW, SizeNW, Cursors }; } // namespace os #endif
// LAF OS Library // Copyright (C) 2021-2022 Igara Studio S.A. // Copyright (C) 2012-2014 David Capello // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. #ifndef OS_NATIVE_CURSOR_H_INCLUDED #define OS_NATIVE_CURSOR_H_INCLUDED #pragma once #include "gfx/fwd.h" namespace os { enum class NativeCursor { Hidden, Arrow, Crosshair, IBeam, Wait, Link, Help, Forbidden, Move, SizeNS, SizeWE, SizeN, SizeNE, SizeE, SizeSE, SizeS, SizeSW, SizeW, SizeNW, Cursors [[maybe_unused]] }; } // namespace os #endif
Mark NativeCursor::Cursors as not needed in switch/cases
Mark NativeCursor::Cursors as not needed in switch/cases
C
mit
aseprite/laf,aseprite/laf
619362fe501e25d81812dd1564972d8f3851e821
content/browser/renderer_host/quota_dispatcher_host.h
content/browser/renderer_host/quota_dispatcher_host.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 CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_ #define CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_ #include "base/basictypes.h" #include "content/browser/browser_message_filter.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaType.h" class GURL; class QuotaDispatcherHost : public BrowserMessageFilter { public: ~QuotaDispatcherHost(); bool OnMessageReceived(const IPC::Message& message, bool* message_was_ok); private: void OnQueryStorageUsageAndQuota( int request_id, const GURL& origin_url, WebKit::WebStorageQuotaType type); void OnRequestStorageQuota( int request_id, const GURL& origin_url, WebKit::WebStorageQuotaType type, int64 requested_size); }; #endif // CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_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 CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_ #define CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_ #include "base/basictypes.h" #include "content/browser/browser_message_filter.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaType.h" class GURL; class QuotaDispatcherHost : public BrowserMessageFilter { public: ~QuotaDispatcherHost(); virtual bool OnMessageReceived(const IPC::Message& message, bool* message_was_ok); private: void OnQueryStorageUsageAndQuota( int request_id, const GURL& origin_url, WebKit::WebStorageQuotaType type); void OnRequestStorageQuota( int request_id, const GURL& origin_url, WebKit::WebStorageQuotaType type, int64 requested_size); }; #endif // CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_
Fix clang build that have been broken by 81364.
Fix clang build that have been broken by 81364. BUG=none TEST=green tree TBR=jam Review URL: http://codereview.chromium.org/6838008 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@81368 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,keishi/chromium,Fireblend/chromium-crosswalk,dushu1203/chromium.src,ChromiumWebApps/chromium,zcbenz/cefode-chromium,ondra-novak/chromium.src,keishi/chromium,Just-D/chromium-1,ChromiumWebApps/chromium,jaruba/chromium.src,bright-sparks/chromium-spacewalk,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,markYoungH/chromium.src,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,markYoungH/chromium.src,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,robclark/chromium,Fireblend/chromium-crosswalk,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,M4sse/chromium.src,littlstar/chromium.src,hujiajie/pa-chromium,littlstar/chromium.src,robclark/chromium,markYoungH/chromium.src,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,timopulkkinen/BubbleFish,dushu1203/chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,anirudhSK/chromium,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,patrickm/chromium.src,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,robclark/chromium,junmin-zhu/chromium-rivertrail,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,robclark/chromium,pozdnyakov/chromium-crosswalk,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,anirudhSK/chromium,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,rogerwang/chromium,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,robclark/chromium,jaruba/chromium.src,chuan9/chromium-crosswalk,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,krieger-od/nwjs_chromium.src,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,jaruba/chromium.src,rogerwang/chromium,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,chuan9/chromium-crosswalk,anirudhSK/chromium,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,TheTypoMaster/chromium-crosswalk,zcbenz/cefode-chromium,M4sse/chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,anirudhSK/chromium,ltilve/chromium,dednal/chromium.src,Chilledheart/chromium,ondra-novak/chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,Just-D/chromium-1,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,zcbenz/cefode-chromium,rogerwang/chromium,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,littlstar/chromium.src,dednal/chromium.src,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,axinging/chromium-crosswalk,rogerwang/chromium,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,ondra-novak/chromium.src,dushu1203/chromium.src,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,ltilve/chromium,timopulkkinen/BubbleFish,Jonekee/chromium.src,junmin-zhu/chromium-rivertrail,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,dednal/chromium.src,Just-D/chromium-1,M4sse/chromium.src,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,dednal/chromium.src,junmin-zhu/chromium-rivertrail,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,ltilve/chromium,keishi/chromium,M4sse/chromium.src,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,jaruba/chromium.src,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,Chilledheart/chromium,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,ChromiumWebApps/chromium,Chilledheart/chromium,rogerwang/chromium,dednal/chromium.src,zcbenz/cefode-chromium,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,robclark/chromium,nacl-webkit/chrome_deps,M4sse/chromium.src,jaruba/chromium.src,ltilve/chromium,jaruba/chromium.src,patrickm/chromium.src,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,keishi/chromium,rogerwang/chromium,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,patrickm/chromium.src,M4sse/chromium.src,anirudhSK/chromium,robclark/chromium,chuan9/chromium-crosswalk,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,robclark/chromium,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,robclark/chromium,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,ChromiumWebApps/chromium,anirudhSK/chromium,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,littlstar/chromium.src,patrickm/chromium.src,ondra-novak/chromium.src,axinging/chromium-crosswalk,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,Chilledheart/chromium,rogerwang/chromium,Just-D/chromium-1,axinging/chromium-crosswalk,keishi/chromium,Just-D/chromium-1,dednal/chromium.src,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,mogoweb/chromium-crosswalk,dushu1203/chromium.src,zcbenz/cefode-chromium,markYoungH/chromium.src,dushu1203/chromium.src,Jonekee/chromium.src,ondra-novak/chromium.src,anirudhSK/chromium,Jonekee/chromium.src,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,M4sse/chromium.src,mogoweb/chromium-crosswalk,Jonekee/chromium.src,Fireblend/chromium-crosswalk,rogerwang/chromium,markYoungH/chromium.src,keishi/chromium,zcbenz/cefode-chromium,anirudhSK/chromium,ltilve/chromium,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,dednal/chromium.src,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,markYoungH/chromium.src,littlstar/chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk,keishi/chromium,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,keishi/chromium,hujiajie/pa-chromium,jaruba/chromium.src,markYoungH/chromium.src,zcbenz/cefode-chromium,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,hujiajie/pa-chromium,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,bright-sparks/chromium-spacewalk,M4sse/chromium.src,axinging/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,Just-D/chromium-1,ltilve/chromium,ltilve/chromium,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,dednal/chromium.src,rogerwang/chromium,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,keishi/chromium,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,ltilve/chromium,rogerwang/chromium,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,robclark/chromium,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,keishi/chromium,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,keishi/chromium,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,hujiajie/pa-chromium,dednal/chromium.src,mogoweb/chromium-crosswalk,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Pluto-tv/chromium-crosswalk
ff7a33c4f1e341dbdd4775307e3f52c004c21444
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
66ddcb4a5c9aec761a50975b773a6d6c907c71bd
src/include/optimizer/stats/hll.h
src/include/optimizer/stats/hll.h
#pragma once #include <cmath> #include <vector> #include <murmur3/MurmurHash3.h> #include <libcount/hll.h> #include "type/value.h" #include "common/macros.h" #include "common/logger.h" namespace peloton { namespace optimizer { /* * A wrapper for libcount::HLL with murmurhash3 */ class HLL { public: HLL(const int kPrecision = 8) { hll_ = libcount::HLL::Create(kPrecision); } void Update(type::Value& value) { hll_->Update(Hash(value)); } uint64_t EstimateCardinality() { uint64_t cardinality = hll_->Estimate(); LOG_INFO("Estimated cardinality with HLL: [%lu]", cardinality); return cardinality; } ~HLL() { delete hll_; } private: libcount::HLL* hll_; uint64_t Hash(type::Value& value) { uint64_t hash[2]; const char* raw_value = value.ToString().c_str(); MurmurHash3_x64_128(raw_value, (uint64_t)strlen(raw_value), 0, hash); return hash[0]; } }; } /* namespace optimizer */ } /* namespace peloton */
#pragma once #include <cmath> #include <vector> #include <murmur3/MurmurHash3.h> #include <libcount/hll.h> #include "type/value.h" #include "common/macros.h" #include "common/logger.h" namespace peloton { namespace optimizer { /* * A wrapper for libcount::HLL with murmurhash3 */ class HLL { public: HLL(const int kPrecision = 8) { hll_ = libcount::HLL::Create(kPrecision); } void Update(type::Value& value) { hll_->Update(Hash(value)); } uint64_t EstimateCardinality() { uint64_t cardinality = hll_->Estimate(); LOG_INFO("Estimated cardinality with HLL: [%lu]", cardinality); return cardinality; } ~HLL() { delete hll_; } private: libcount::HLL* hll_; uint64_t Hash(type::Value& value) { uint64_t hash[2]; std::string value_str = value.ToString(); const char* raw_value = value_str.c_str(); MurmurHash3_x64_128(raw_value, (uint64_t)strlen(raw_value), 0, hash); return hash[0]; } }; } /* namespace optimizer */ } /* namespace peloton */
Fix valgrind 'invalid read of size 1' bug.
Fix valgrind 'invalid read of size 1' bug.
C
apache-2.0
cmu-db/peloton,PauloAmora/peloton,AllisonWang/peloton,AngLi-Leon/peloton,AllisonWang/peloton,cmu-db/peloton,malin1993ml/peloton,seojungmin/peloton,yingjunwu/peloton,PauloAmora/peloton,cmu-db/peloton,prashasthip/peloton,haojin2/peloton,vittvolt/peloton,AngLi-Leon/peloton,PauloAmora/peloton,seojungmin/peloton,yingjunwu/peloton,prashasthip/peloton,apavlo/peloton,apavlo/peloton,AngLi-Leon/peloton,seojungmin/peloton,haojin2/peloton,AllisonWang/peloton,PauloAmora/peloton,seojungmin/peloton,apavlo/peloton,AngLi-Leon/peloton,apavlo/peloton,PauloAmora/peloton,AllisonWang/peloton,vittvolt/peloton,prashasthip/peloton,cmu-db/peloton,seojungmin/peloton,seojungmin/peloton,malin1993ml/peloton,vittvolt/peloton,prashasthip/peloton,haojin2/peloton,haojin2/peloton,AngLi-Leon/peloton,AngLi-Leon/peloton,PauloAmora/peloton,apavlo/peloton,cmu-db/peloton,vittvolt/peloton,yingjunwu/peloton,malin1993ml/peloton,malin1993ml/peloton,cmu-db/peloton,malin1993ml/peloton,yingjunwu/peloton,haojin2/peloton,malin1993ml/peloton,vittvolt/peloton,prashasthip/peloton,yingjunwu/peloton,prashasthip/peloton,AllisonWang/peloton,yingjunwu/peloton,AllisonWang/peloton,vittvolt/peloton,apavlo/peloton,haojin2/peloton
79dd0bf258c0636ff902ebaa8aba8ca945be5d58
common_audio/signal_processing/cross_correlation.c
common_audio/signal_processing/cross_correlation.c
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" /* C version of WebRtcSpl_CrossCorrelation() for generic platforms. */ void WebRtcSpl_CrossCorrelationC(int32_t* cross_correlation, const int16_t* seq1, const int16_t* seq2, int16_t dim_seq, int16_t dim_cross_correlation, int right_shifts, int step_seq2) { int i = 0, j = 0; for (i = 0; i < dim_cross_correlation; i++) { int32_t corr = 0; /* Unrolling doesn't seem to improve performance. */ for (j = 0; j < dim_seq; j++) { // It's not clear why casting |right_shifts| here helps performance. corr += (seq1[j] * seq2[j]) >> (int16_t)right_shifts; } seq2 += step_seq2; *cross_correlation++ = corr; } }
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" /* C version of WebRtcSpl_CrossCorrelation() for generic platforms. */ void WebRtcSpl_CrossCorrelationC(int32_t* cross_correlation, const int16_t* seq1, const int16_t* seq2, int16_t dim_seq, int16_t dim_cross_correlation, int right_shifts, int step_seq2) { int i = 0, j = 0; for (i = 0; i < dim_cross_correlation; i++) { int32_t corr = 0; /* Unrolling doesn't seem to improve performance. */ for (j = 0; j < dim_seq; j++) corr += (seq1[j] * seq2[j]) >> right_shifts; seq2 += step_seq2; *cross_correlation++ = corr; } }
Test whether removing a cast still hurts performance.
Test whether removing a cast still hurts performance. BUG=499241 TEST=none TBR=andrew Review URL: https://codereview.webrtc.org/1206653002 Cr-Original-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#9491} Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc Cr-Mirrored-Commit: 6bfc82aaf18e42fcc7328b81ffb3ec3cf360d732
C
bsd-3-clause
sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc
a534fc0b344d474c8eb3937be1fca98ea1389878
IntelFrameworkModulePkg/Include/Protocol/Ps2Policy.h
IntelFrameworkModulePkg/Include/Protocol/Ps2Policy.h
/*++ Copyright (c) 2006, Intel Corporation. All rights reserved. This software and associated documentation (if any) is furnished under a license and may only be used or copied in accordance with the terms of the license. Except as permitted by such license, no part of this software or documentation may be reproduced, stored in a retrieval system, or transmitted in any form or by any means without the express written consent of Intel Corporation. Module Name: Ps2Policy.h Abstract: Protocol used for PS/2 Policy definition. --*/ #ifndef _PS2_POLICY_PROTOCOL_H_ #define _PS2_POLICY_PROTOCOL_H_ #define EFI_PS2_POLICY_PROTOCOL_GUID \ { \ 0x4df19259, 0xdc71, 0x4d46, {0xbe, 0xf1, 0x35, 0x7b, 0xb5, 0x78, 0xc4, 0x18 } \ } #define EFI_KEYBOARD_CAPSLOCK 0x0004 #define EFI_KEYBOARD_NUMLOCK 0x0002 #define EFI_KEYBOARD_SCROLLLOCK 0x0001 typedef EFI_STATUS (EFIAPI *EFI_PS2_INIT_HARDWARE) ( IN EFI_HANDLE Handle ); typedef struct { UINT8 KeyboardLight; EFI_PS2_INIT_HARDWARE Ps2InitHardware; } EFI_PS2_POLICY_PROTOCOL; extern EFI_GUID gEfiPs2PolicyProtocolGuid; #endif
Add in Ps2keyboard.inf and Ps2Mouse.inf to IntelFrameworkModuelPkg
Add in Ps2keyboard.inf and Ps2Mouse.inf to IntelFrameworkModuelPkg git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@3113 6f19259b-4bc3-4df7-8a09-765794883524
C
bsd-2-clause
MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2
03a7507e13b84eb3ddd6fad31832e99825977895
Include/SQLiteDatabaseHelper/SQLiteDatabaseHelper.h
Include/SQLiteDatabaseHelper/SQLiteDatabaseHelper.h
// // SQLiteDatabaseHelper // Include/SQLiteDatabaseHelper.h // #ifndef __SQLITEDATABASEHELPER_H__ #define __SQLITEDATABASEHELPER_H__ #include <stdio.h> #include <sqlite3.h> #endif
// // SQLiteDatabaseHelper // Include/SQLiteDatabaseHelper.h // #ifndef __SQLITEDATABASEHELPER_H__ #define __SQLITEDATABASEHELPER_H__ #include <SQLiteDatabaseHelper/Operations/Read/DatabaseReader.h> #endif
Include database reader in main library header
Include database reader in main library header Signed-off-by: Gigabyte-Giant <[email protected]>
C
mit
Gigabyte-Giant/SQLiteDatabaseHelper
5470369e38e497c1eade1b3171a288415be6d0fd
include/atoms/numeric/rolling_average.h
include/atoms/numeric/rolling_average.h
#pragma once // This file is part of 'Atoms' library - https://github.com/yaqwsx/atoms // Author: Jan 'yaqwsx' Mrzek #include <array> #include <initializer_list> #include <algorithm> namespace atoms { template <class T, size_t SIZE> class RollingAverage { public: RollingAverage() : sum(0), index(0) { std::fill(values.begin(), values.end(), T(0)); }; RollingAverage(const std::initializer_list<T>& l) : sum(0), index(0) { std::copy(l.begin(), l.end(), values.begin()); } void push(const T& t) { sum += t - values[index]; values[index] = t; index++; if (index == SIZE) index = 0; } T get_average() { return sum / T(SIZE); } T get_sum() { return sum; } private: std::array<T, SIZE> values; T sum; size_t index; }; }
#pragma once // This file is part of 'Atoms' library - https://github.com/yaqwsx/atoms // Author: Jan 'yaqwsx' Mrázek #include <array> #include <initializer_list> #include <algorithm> namespace atoms { template <class T, size_t SIZE> class RollingAverage { public: RollingAverage() : sum(0), index(0) { std::fill(values.begin(), values.end(), T(0)); }; void push(const T& t) { sum += t - values[index]; values[index] = t; index++; if (index == SIZE) index = 0; } T get_average() { return sum / T(SIZE); } T get_sum() { return sum; } void clear(T t = 0) { std::fill(values.begin(), values.end(), t); sum = t * SIZE; } private: std::array<T, SIZE> values; T sum; size_t index; }; }
Add clear() and delete constructor with initializer_list
RollingAverage: Add clear() and delete constructor with initializer_list
C
mit
yaqwsx/atoms
a14862fa4b0f730b9bfcc291b33c0dc6c1fac2ad
tests/regression/34-congruence/04-casting.c
tests/regression/34-congruence/04-casting.c
// PARAM: --disable ana.int.def_exc --enable ana.int.interval // Ensures that the cast_to function handles casting for congruences correctly. // TODO: Implement appropriate cast_to function, enable for congruences only and adjust test if necessary. #include <assert.h> #include <stdio.h> int main(){ int c = 128; for (int i = 0; i < 1; i++) { c = c - 150; } char k = (char) c; printf ("k: %d", k); assert (k == -22); //UNKNOWN k = k + 150; assert (k == 0); //UNKNOWN! }
Add (deactivated) casting test for congruence domain
Add (deactivated) casting test for congruence domain
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
94313f9165a71469ca5cfa0078f8060947fee781
src/cubeb-speex-resampler.h
src/cubeb-speex-resampler.h
#define OUTSIDE_SPEEX #define RANDOM_PREFIX cubeb #define FLOATING_POINT #include <speex/speex_resampler.h>
#include <speex/speex_resampler.h>
Revert "Force being outside speex."
Revert "Force being outside speex." This reverts commit 356ee9e85ca2f5999cfa18f356b103dffe09fbbd.
C
isc
padenot/cubeb,padenot/cubeb,ieei/cubeb,ieei/cubeb,kinetiknz/cubeb,kinetiknz/cubeb,padenot/cubeb,kinetiknz/cubeb
c581851a1839a63c4873ed632a62982d1c8bb6d0
src/helpers/number_helper.h
src/helpers/number_helper.h
/* * ***************************************************************************** * Copyright 2014 Spectra Logic Corporation. 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. A copy of the License * is located at * * http://www.apache.org/licenses/LICENSE-2.0 * * or in the "license" file accompanying this file. * This file 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 NUMBER_HELPER_H #define NUMBER_HELPER_H #include <QString> class NumberHelper { public: static const uint64_t B; static const uint64_t KB; static const uint64_t MB; static const uint64_t GB; static const uint64_t TB; static QString ToHumanSize(uint64_t bytes); }; #endif
/* * ***************************************************************************** * Copyright 2014 Spectra Logic Corporation. 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. A copy of the License * is located at * * http://www.apache.org/licenses/LICENSE-2.0 * * or in the "license" file accompanying this file. * This file 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 NUMBER_HELPER_H #define NUMBER_HELPER_H #include <stdint.h> #include <QString> class NumberHelper { public: static const uint64_t B; static const uint64_t KB; static const uint64_t MB; static const uint64_t GB; static const uint64_t TB; static QString ToHumanSize(uint64_t bytes); }; #endif
Fix windows build by requiring stdint.h
Fix windows build by requiring stdint.h
C
apache-2.0
Klopsch/ds3_browser,Klopsch/ds3_browser,SpectraLogic/ds3_browser,SpectraLogic/ds3_browser,SpectraLogic/ds3_browser,Klopsch/ds3_browser
f3929daf7f2223913e226686cd4078a73849057c
test/Analysis/uninit-vals.c
test/Analysis/uninit-vals.c
// RUN: clang-cc -analyze -warn-uninit-values -verify %s int f1() { int x; return x; // expected-warning {{use of uninitialized variable}} } int f2(int x) { int y; int z = x + y; // expected-warning {{use of uninitialized variable}} return z; } int f3(int x) { int y; return x ? 1 : y; // expected-warning {{use of uninitialized variable}} } int f4(int x) { int y; if (x) y = 1; return y; // expected-warning {{use of uninitialized variable}} } int f5() { int a; a = 30; // no-warning } void f6(int i) { int x; for (i = 0 ; i < 10; i++) printf("%d",x++); // expected-warning {{use of uninitialized variable}} \ // expected-warning{{implicitly declaring C library function 'printf' with type 'int (char const *, ...)'}} \ // expected-note{{please include the header <stdio.h> or explicitly provide a declaration for 'printf'}} } void f7(int i) { int x = i; int y; for (i = 0; i < 10; i++ ) { printf("%d",x++); // no-warning x += y; // expected-warning {{use of uninitialized variable}} } }
// RUN: clang-cc -analyze -warn-uninit-values -verify %s int f1() { int x; return x; // expected-warning {{use of uninitialized variable}} } int f2(int x) { int y; int z = x + y; // expected-warning {{use of uninitialized variable}} return z; } int f3(int x) { int y; return x ? 1 : y; // expected-warning {{use of uninitialized variable}} } int f4(int x) { int y; if (x) y = 1; return y; // expected-warning {{use of uninitialized variable}} } int f5() { int a; a = 30; // no-warning } void f6(int i) { int x; for (i = 0 ; i < 10; i++) printf("%d",x++); // expected-warning {{use of uninitialized variable}} \ // expected-warning{{implicitly declaring C library function 'printf' with type 'int (char const *, ...)'}} \ // expected-note{{please include the header <stdio.h> or explicitly provide a declaration for 'printf'}} } void f7(int i) { int x = i; int y; for (i = 0; i < 10; i++ ) { printf("%d",x++); // no-warning x += y; // expected-warning {{use of uninitialized variable}} } } int f8(int j) { int x = 1, y = x + 1; if (y) // no-warning return x; return y; }
Add another uninitialized values test case illustrating that the CFG correctly handles declarations with multiple variables.
Add another uninitialized values test case illustrating that the CFG correctly handles declarations with multiple variables. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@68046 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
2dcb0a61041a003f439bbd38005b6e454c368be0
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2010 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k5"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2010 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k6"
Update driver version to 5.02.00-k6
[SCSI] qla4xxx: Update driver version to 5.02.00-k6 Signed-off-by: Vikas Chaudhary <[email protected]> Signed-off-by: James Bottomley <[email protected]>
C
apache-2.0
TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs
efb6c717b764e77cadc20bc9d9ffdf16bc1eedf5
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2010 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k17"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2010 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k18"
Update driver version to 5.02.00-k18
[SCSI] qla4xxx: Update driver version to 5.02.00-k18 Signed-off-by: Vikas Chaudhary <[email protected]> Signed-off-by: James Bottomley <[email protected]>
C
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas
9630f9b1653188a4173dc633fd55840ae918ca4e
src/Tomighty/Core/UI/TYAppUI.h
src/Tomighty/Core/UI/TYAppUI.h
// // Tomighty - http://www.tomighty.org // // This software is licensed under the Apache License Version 2.0: // http://www.apache.org/licenses/LICENSE-2.0.txt // #import <Foundation/Foundation.h> @protocol TYAppUI <NSObject> - (void)switchToIdleState; - (void)switchToPomodoroState; - (void)switchToShortBreakState; - (void)switchToLongBreakState; - (void)updateRemainingTime:(int)remainingSeconds; - (void)updatePomodoroCount:(int)count; - (void)handlePrerencesChange:(NSString*)which; @end
// // Tomighty - http://www.tomighty.org // // This software is licensed under the Apache License Version 2.0: // http://www.apache.org/licenses/LICENSE-2.0.txt // #import <Foundation/Foundation.h> @protocol TYAppUI <NSObject> - (void)switchToIdleState; - (void)switchToPomodoroState; - (void)switchToShortBreakState; - (void)switchToLongBreakState; - (void)updateRemainingTime:(int)remainingSeconds; - (void)updatePomodoroCount:(int)count; @end
Remove preference change handler declaration.
Remove preference change handler declaration.
C
apache-2.0
ccidral/tomighty-osx,tomighty/tomighty-osx,ccidral/tomighty-osx,tomighty/tomighty-osx,ccidral/tomighty-osx
5a2a1f8179035de5e5a46b5731955598077c93cf
src/arch/arm/armmlib/context.c
src/arch/arm/armmlib/context.c
/** * @file * @brief * * @author Anton Kozlov * @date 25.10.2012 */ #include <stdint.h> #include <stdbool.h> #include <stddef.h> #include <assert.h> #include <hal/context.h> #include <asm/modes.h> #include <arm/fpu.h> /* In the RVCT v2.0 and above, all generated code and C library code * will maintain eight-byte stack alignment on external interfaces. */ #define ARM_SP_ALIGNMENT 8 void context_init(struct context *ctx, unsigned int flags, void (*routine_fn)(void), void *sp) { ctx->lr = (uint32_t) routine_fn; ctx->sp = (uint32_t) sp; assertf(((uint32_t) sp % ARM_SP_ALIGNMENT) == 0, "Stack pointer is not aligned to 8 bytes.\n" "Firstly please make sure the thread stack size is aligned to 8 bytes" ); ctx->control = 0; if (!(flags & CONTEXT_PRIVELEGED)) { ctx->control |= CONTROL_NPRIV; } arm_fpu_context_init(&ctx->fpu_data); }
/** * @file * @brief * * @author Anton Kozlov * @date 25.10.2012 */ #include <stdint.h> #include <stdbool.h> #include <stddef.h> #include <assert.h> #include <hal/context.h> #include <asm/modes.h> #include <arm/fpu.h> /* In the RVCT v2.0 and above, all generated code and C library code * will maintain eight-byte stack alignment on external interfaces. */ #define ARM_SP_ALIGNMENT 8 void context_init(struct context *ctx, unsigned int flags, void (*routine_fn)(void), void *sp) { ctx->lr = (uint32_t) routine_fn; ctx->sp = (uint32_t) sp; assertf(((uint32_t) sp % ARM_SP_ALIGNMENT) == 0, "Stack pointer is not aligned to 8 bytes.\n" "Firstly please make sure the thread stack size is aligned to 8 bytes" ); ctx->control = CONTROL_SPSEL_PSP; if (!(flags & CONTEXT_PRIVELEGED)) { ctx->control |= CONTROL_NPRIV; } arm_fpu_context_init(&ctx->fpu_data); }
Use PSP for all threads
cortex-m: Use PSP for all threads
C
bsd-2-clause
embox/embox,embox/embox,embox/embox,embox/embox,embox/embox,embox/embox
10b850b59e13bda075aee09822ca62d1431c57a0
src/soft/integer/floatuntidf.c
src/soft/integer/floatuntidf.c
/* This file is part of Metallic, a runtime library for WebAssembly. * * Copyright (C) 2018 Chen-Pang He <[email protected]> * * 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/ */ #include "floatuntidf.h" double __floatuntidf(unsigned __int128 a) { return __floatuntidf(a); }
/* This file is part of Metallic, a runtime library for WebAssembly. * * Copyright (C) 2018 Chen-Pang He <[email protected]> * * 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/ */ #include "floatuntidf.h" double __floatuntidf(unsigned __int128 a) { return _floatuntidf(a); }
Fix a typo which causes infinite recursion
Fix a typo which causes infinite recursion
C
mit
jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic
ea835b91ccfe55cab867f2aa1416385c0f769e21
sources/CWSCore.h
sources/CWSCore.h
// // CWSCore.h // yafacwesConsole // // Created by Matthias Lamoureux on 13/07/2015. // Copyright (c) 2015 pinguzaph. All rights reserved. // #import <Foundation/Foundation.h> @interface CWSCore : NSObject @property (nonatomic, strong) NSString * name; @end
// // CWSCore.h // yafacwesConsole // // Created by Matthias Lamoureux on 13/07/2015. // Copyright (c) 2015 pinguzaph. All rights reserved. // #import <Foundation/Foundation.h> @interface CWSCore : NSObject @property (nonatomic, copy) NSString * name; @end
Set the NSString property to copy mode
Set the NSString property to copy mode
C
mit
letatas/yafacwes,letatas/yafacwes
2bbbfd9a852b4de70411293745d4b88f1a7d4e7a
src/LibTemplateCMake/include/LibTemplateCMake/LibTemplateCMake.h
src/LibTemplateCMake/include/LibTemplateCMake/LibTemplateCMake.h
#ifndef LIB_TEMPLATE_CMAKE_H #define LIB_TEMPLATE_CMAKE_H namespace LibTemplateCMake { /** * \class LibTemplateCMake::aClass * \headerfile template-lib.h <TemplateLib/templatelib.h> * * \brief A class from LibTemplateCMake namespace. * * This class that does a summation. */ class summationClass { public: /** * Constructor */ summationClass(); /** * Destructory */ virtual ~summationClass(); /** * A method that does a summation */ virtual double doSomething(double op1, double op2); }; /** * \class LibTemplateCMake::anotherClass * \headerfile template-lib.h <TemplateLib/templatelib.h> * * \brief A derived class from LibTemplateCMake namespace. * * This class performs a difference. */ class differenceClass : public summationClass { public: /** * Constructor */ differenceClass(); /** * Destructory */ virtual ~differenceClass(); /** * A method that does something */ virtual double doSomething(double op1, double op2); }; } // namespace LibTemplateCMake #endif /* LIB_TEMPLATE_CMAKE_H */
#ifndef LIB_TEMPLATE_CMAKE_H #define LIB_TEMPLATE_CMAKE_H namespace LibTemplateCMake { /** * \class LibTemplateCMake::aClass * \headerfile template-lib.h <TemplateLib/templatelib.h> * * \brief A class from LibTemplateCMake namespace. * * This class that does a summation. */ class summationClass { public: /** * Constructor */ summationClass(); /** * Destructor */ virtual ~summationClass(); /** * A method that does a summation */ virtual double doSomething(double op1, double op2); }; /** * \class LibTemplateCMake::anotherClass * \headerfile template-lib.h <TemplateLib/templatelib.h> * * \brief A derived class from LibTemplateCMake namespace. * * This class performs a difference. */ class differenceClass : public summationClass { public: /** * Constructor */ differenceClass(); /** * Destructor */ virtual ~differenceClass(); /** * A method that does something */ virtual double doSomething(double op1, double op2); }; } // namespace LibTemplateCMake #endif /* LIB_TEMPLATE_CMAKE_H */
Clean up shared lib header code
Clean up shared lib header code
C
mit
robotology-playground/lib-template-cmake
83459aedbc24813969bd0ed8212bbd9f665e843d
tests/regression/02-base/71-pthread-once.c
tests/regression/02-base/71-pthread-once.c
//PARAM: --disable sem.unknown_function.spawn #include <pthread.h> #include <assert.h> int g; pthread_once_t once = PTHREAD_ONCE_INIT; void *t_fun(void *arg) { assert(1); // reachable! return NULL; } int main() { pthread_once(&once,t_fun); return 0; }
//PARAM: --disable sem.unknown_function.spawn #include <pthread.h> #include <assert.h> int g; pthread_once_t once = PTHREAD_ONCE_INIT; void t_fun() { assert(1); // reachable! return NULL; } int main() { pthread_once(&once,t_fun); return 0; }
Correct type of `pthread_once` argument
02/71: Correct type of `pthread_once` argument Co-authored-by: Simmo Saan <[email protected]>
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
563b66f9debadbe116b096fc8d5f48b17bb8d881
src/exercise119.c
src/exercise119.c
/* Exercise 1-19: Write a function "reverse(s)" that reverses the character * string "s". Use it to write a program that reverses its input a line at a * time. */ #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> uint32_t reverse(char *s); int main(int argc, char **argv) { char *buffer = NULL; uint32_t buffer_length = 0; char character = 0; bool finished_inputting = false; /* You would normally have the end-of-file test in the loop condition * expression, however this introduces a subtle bug where the last line * isn't processed if the input doesn't end with a newline. See * <http://users.powernet.co.uk/eton/kandr2/krx113.html> for details. */ while (finished_inputting == false) { character = getchar(); if (character == '\n' || (character == EOF && buffer_length > 0)) { buffer = realloc(buffer, ++buffer_length * sizeof(char)); buffer[buffer_length - 1] = '\0'; reverse(buffer); printf("%s\n", buffer); free(buffer); buffer = NULL; buffer_length = 0; } else { buffer = realloc(buffer, ++buffer_length * sizeof(char)); buffer[buffer_length - 1] = character; } finished_inputting = (character == EOF); } return EXIT_SUCCESS; } uint32_t reverse(char *s) { uint32_t string_length = 0; while (s[string_length] != '\0') { string_length++; } int32_t i = 0, j = string_length - 1; char temp = 0; for (i = 0; i < j; i++, j--) { temp = s[i]; s[i] = s[j]; s[j] = temp; } return string_length; }
Add solution to Exercise 1-19.
Add solution to Exercise 1-19.
C
unlicense
damiendart/knr-solutions,damiendart/knr-solutions,damiendart/knr-solutions
2b24c45e3d99ec7e44862960acee7b26d15ab84f
src/config.h
src/config.h
#ifndef _CONFIG_H #define _CONFIG_H #define ENABLE_COUNTERMOVE_HISTORY 0 #define ENABLE_HISTORY_PRUNE_DEPTH 0 #define ENABLE_NNUE 0 #define ENABLE_NNUE_SIMD 0 #endif
#ifndef _CONFIG_H #define _CONFIG_H #define ENABLE_COUNTERMOVE_HISTORY 0 #define ENABLE_HISTORY_PRUNE_DEPTH 4 #define ENABLE_NNUE 0 #define ENABLE_NNUE_SIMD 0 #endif
Enable history pruning at depth 4
Enable history pruning at depth 4
C
bsd-3-clause
jwatzman/nameless-chessbot,jwatzman/nameless-chessbot
fa09dc1302b1dc246adf171c6d891e0444c063d8
src/bin/e_signals.c
src/bin/e_signals.c
/* * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 */ #include "e.h" #include <execinfo.h> /* a tricky little devil, requires e and it's libs to be built * with the -rdynamic flag to GCC for any sort of decent output. */ void e_sigseg_act(int x, siginfo_t *info, void *data){ void *array[255]; size_t size; write(2, "**** SEGMENTATION FAULT ****\n", 29); write(2, "**** Printing Backtrace... *****\n\n", 34); size = backtrace(array, 255); backtrace_symbols_fd(array, size, 2); exit(-11); }
/* * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 * NOTE TO FreeBSD users. Install libexecinfo from * ports/devel/libexecinfo and add -lexecinfo to LDFLAGS * to add backtrace support. */ #include "e.h" #include <execinfo.h> /* a tricky little devil, requires e and it's libs to be built * with the -rdynamic flag to GCC for any sort of decent output. */ void e_sigseg_act(int x, siginfo_t *info, void *data){ void *array[255]; size_t size; write(2, "**** SEGMENTATION FAULT ****\n", 29); write(2, "**** Printing Backtrace... *****\n\n", 34); size = backtrace(array, 255); backtrace_symbols_fd(array, size, 2); exit(-11); }
Add note to help FreeBSD users.
Add note to help FreeBSD users. SVN revision: 13781
C
bsd-2-clause
rvandegrift/e,FlorentRevest/Enlightenment,tasn/enlightenment,tizenorg/platform.upstream.enlightenment,rvandegrift/e,tasn/enlightenment,FlorentRevest/Enlightenment,tasn/enlightenment,tizenorg/platform.upstream.enlightenment,FlorentRevest/Enlightenment,rvandegrift/e,tizenorg/platform.upstream.enlightenment
abf6c33fd57d1f8d9a14c76f0a8ddebb0e8e7041
src/lib/PluginManager.h
src/lib/PluginManager.h
// // This file is part of the Marble Desktop Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2006-2008 Torsten Rahn <[email protected]>" // #ifndef PLUGINMANAGER_H #define PLUGINMANAGER_H #include <QtCore/QObject> class MarbleLayerInterface; /** * @short The class that handles Marble's plugins. * */ class PluginManager : public QObject { Q_OBJECT public: explicit PluginManager(QObject *parent = 0); ~PluginManager(); QList<MarbleLayerInterface *> layerInterfaces() const; public Q_SLOTS: /** * @brief Browses the plugin directories and installs plugins. * * This method browses all plugin directories and installs all * plugins found in there. */ void loadPlugins(); private: Q_DISABLE_COPY( PluginManager ) QList<MarbleLayerInterface *> m_layerInterfaces; }; #endif // PLUGINMANAGER_H
// // This file is part of the Marble Desktop Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2006-2008 Torsten Rahn <[email protected]>" // #ifndef PLUGINMANAGER_H #define PLUGINMANAGER_H #include <QtCore/QObject> #include "marble_export.h" class MarbleLayerInterface; /** * @short The class that handles Marble's plugins. * */ class MARBLE_EXPORT PluginManager : public QObject { Q_OBJECT public: explicit PluginManager(QObject *parent = 0); ~PluginManager(); QList<MarbleLayerInterface *> layerInterfaces() const; public Q_SLOTS: /** * @brief Browses the plugin directories and installs plugins. * * This method browses all plugin directories and installs all * plugins found in there. */ void loadPlugins(); private: Q_DISABLE_COPY( PluginManager ) QList<MarbleLayerInterface *> m_layerInterfaces; }; #endif // PLUGINMANAGER_H
Fix export (needs for test program)
Fix export (needs for test program) svn path=/trunk/KDE/kdeedu/marble/; revision=818952
C
lgpl-2.1
probonopd/marble,AndreiDuma/marble,adraghici/marble,utkuaydin/marble,oberluz/marble,probonopd/marble,David-Gil/marble-dev,adraghici/marble,adraghici/marble,oberluz/marble,oberluz/marble,tzapzoor/marble,utkuaydin/marble,oberluz/marble,AndreiDuma/marble,tucnak/marble,tzapzoor/marble,tucnak/marble,AndreiDuma/marble,Earthwings/marble,utkuaydin/marble,AndreiDuma/marble,rku/marble,adraghici/marble,AndreiDuma/marble,tzapzoor/marble,quannt24/marble,David-Gil/marble-dev,Earthwings/marble,quannt24/marble,Earthwings/marble,rku/marble,tzapzoor/marble,David-Gil/marble-dev,utkuaydin/marble,rku/marble,tzapzoor/marble,oberluz/marble,tucnak/marble,rku/marble,quannt24/marble,tucnak/marble,tucnak/marble,AndreiDuma/marble,tzapzoor/marble,rku/marble,David-Gil/marble-dev,probonopd/marble,tzapzoor/marble,utkuaydin/marble,Earthwings/marble,quannt24/marble,Earthwings/marble,probonopd/marble,David-Gil/marble-dev,David-Gil/marble-dev,probonopd/marble,rku/marble,probonopd/marble,quannt24/marble,tzapzoor/marble,oberluz/marble,adraghici/marble,tucnak/marble,quannt24/marble,adraghici/marble,tucnak/marble,probonopd/marble,quannt24/marble,utkuaydin/marble,Earthwings/marble
87995a922d19228ee181937691acb2ba8f16ee0d
src/random.h
src/random.h
#ifndef DW_RANDOM_H #define DW_RANDOM_H int rand_rangei(int min, int max); float rand_rangei(float min, float max); #define rand_bool() rand_rangei(0, 2) #endif
#ifndef DW_RANDOM_H #define DW_RANDOM_H int rand_rangei(int min, int max); float rand_rangef(float min, float max); #define rand_bool() rand_rangei(0, 2) #endif
Fix naming of rand_rangef name
Fix naming of rand_rangef name
C
mit
jacquesrott/merriment,jacquesrott/merriment,jacquesrott/merriment
06d72c2c64ecad9b36a0bf26139320e569bd05e3
crypto/ec/curve448/arch_32/arch_intrinsics.h
crypto/ec/curve448/arch_32/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 __ARCH_ARCH_32_ARCH_INTRINSICS_H__ # define __ARCH_ARCH_32_ARCH_INTRINSICS_H__ # define ARCH_WORD_BITS 32 static ossl_inline uint32_t word_is_zero(uint32_t a) { /* let's hope the compiler isn't clever enough to optimize this. */ return (((uint64_t)a) - 1) >> 32; } static ossl_inline uint64_t widemul(uint32_t a, uint32_t b) { return ((uint64_t)a) * b; } #endif /* __ARCH_ARM_32_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 __ARCH_ARCH_32_ARCH_INTRINSICS_H__ # define __ARCH_ARCH_32_ARCH_INTRINSICS_H__ # define ARCH_WORD_BITS 32 static ossl_inline uint32_t word_is_zero(uint32_t a) { /* let's hope the compiler isn't clever enough to optimize this. */ return (((uint64_t)a) - 1) >> 32; } static ossl_inline uint64_t widemul(uint32_t a, uint32_t b) { return ((uint64_t)a) * b; } #endif /* __ARCH_ARCH_32_ARCH_INTRINSICS_H__ */
Fix a typo in a comment
Fix a typo in a comment Reviewed-by: Bernd Edlinger <[email protected]> (Merged from https://github.com/openssl/openssl/pull/5105)
C
apache-2.0
openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl
cd5f12e417ee99d37f44187b2c4b122afad24578
testDynload.c
testDynload.c
#ifdef _WIN32 #define DL_EXPORT __declspec( dllexport ) #else #define DL_EXPORT #endif DL_EXPORT int TestDynamicLoaderData; DL_EXPORT void TestDynamicLoaderFunction() { }
#ifdef _WIN32 #define DL_EXPORT __declspec( dllexport ) #else #define DL_EXPORT #endif DL_EXPORT int TestDynamicLoaderData = 0; DL_EXPORT void TestDynamicLoaderFunction() { }
Fix compilation on MacOSX (common symbols not allowed with MH_DYLIB output format)
COMP: Fix compilation on MacOSX (common symbols not allowed with MH_DYLIB output format)
C
bsd-3-clause
chuckatkins/KWSys,chuckatkins/KWSys,chuckatkins/KWSys,chuckatkins/KWSys
21aa13130130650738df8e748a01b8706fba5e79
sys/sys/_cpuset.h
sys/sys/_cpuset.h
/*- * Copyright (c) 2008, Jeffrey Roberson <[email protected]> * All rights reserved. * * Copyright (c) 2008 Nokia Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice unmodified, this list of conditions, and the following * disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _SYS__CPUSET_H_ #define _SYS__CPUSET_H_ #include <sys/param.h> #ifdef _KERNEL #define CPU_SETSIZE MAXCPU #endif #define CPU_MAXSIZE (4 * MAXCPU) #ifndef CPU_SETSIZE #define CPU_SETSIZE CPU_MAXSIZE #endif #define _NCPUBITS (sizeof(long) * NBBY) /* bits per mask */ #define _NCPUWORDS howmany(CPU_SETSIZE, _NCPUBITS) typedef struct _cpuset { long __bits[howmany(CPU_SETSIZE, _NCPUBITS)]; } cpuset_t; #endif /* !_SYS__CPUSET_H_ */
Remove the previously added comment. Probabilly me is the only one who didn't know userland and kerneland sizes were mismatching.
Remove the previously added comment. Probabilly me is the only one who didn't know userland and kerneland sizes were mismatching.
C
bsd-3-clause
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
553b2e10575dca72a1a273ca50a885a0e0191603
elixir/main.c
elixir/main.c
// Regular C libs #include <stdio.h> // Elixir libs -- clang doesn't know where the hell this is #include "erl_nif.h" // Needs to figure out what ERL_NIF_TERM means static ERL_NIF_TERM hello(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) { // We need some variables char *s; int i, num; // Grab the arguments from Elixir enif_get_string(env, argv[0], s, 1024, ERL_NIF_LATIN1); enif_get_int(env, argv[1], &num); for (i = 0; i < num; i++) { printf("Hello, %s!\n", s); } // Fancy version of return 0 return enif_make_int(env, 0); } static ErlNifFunc funcs[] = { {"hello", 2, hello} }; ERL_NIF_INIT(Elixir.Hello, funcs, NULL, NULL, NULL, NULL)
// Regular C libs #include <stdio.h> // Elixir libs #include "erl_nif.h" #define MAXLEN 1024 // Needs to figure out what ERL_NIF_TERM means static ERL_NIF_TERM hello(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) { // We need some variables char buf[MAXLEN]; int i, num; // Grab the arguments from Elixir enif_get_string(env, argv[0], buf, MAXLEN, ERL_NIF_LATIN1); enif_get_int(env, argv[1], &num); for (i = 0; i < num; i++) { printf("Hello, %s!\n", buf); } // Fancy version of return 0 return enif_make_int(env, 0); } // Map Elixir functions to C functions static ErlNifFunc funcs[] = { // Function name in Elixir, number of arguments, C function {"hello", 2, hello} }; ERL_NIF_INIT(Elixir.Hello, funcs, NULL, NULL, NULL, NULL)
Use buf as var name
Use buf as var name
C
unlicense
bentranter/binding,bentranter/binding,bentranter/binding
5343a3a7ec39a5eeb212a36287647c4a1e6749fd
tests/regression/34-congruence/03-branching.c
tests/regression/34-congruence/03-branching.c
// PARAM: --sets solver td3 --enable ana.int.congruence --disable ana.int.def_exc int main(){ // A refinement of a congruence class should only take place for the == and != operator. int i; if (i==0){ assert(i==0); } else { assert(i!=0); //UNKNOWN! } int j; if (j != 0){ assert (j != 0); //UNKNOWN! } else { assert (j == 0); } int k; if (k > 0) { assert (k == 0); //UNKNOWN! } else { assert (k != 0); //UNKNOWN! } return 0; }
Add branching test for congruence domain
Add branching test for congruence domain
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
ee5707df2fdb0c86d7d9aade08056b59cf4cba8e
verification/OpenAD/code_oad/OPENAD_OPTIONS.h
verification/OpenAD/code_oad/OPENAD_OPTIONS.h
C $Header$ C $Name$ CBOP C !ROUTINE: OPENAD_OPTIONS.h C !INTERFACE: C #include "OPENAD_OPTIONS.h" C !DESCRIPTION: C *==================================================================* C | CPP options file for OpenAD (openad) package: C | Control which optional features to compile in this package code. C *==================================================================* CEOP #ifndef OPENAD_OPTIONS_H #define OPENAD_OPTIONS_H #include "PACKAGES_CONFIG.h" #include "CPP_OPTIONS.h" #ifdef ALLOW_OPENAD #define ALLOW_OPENAD_ACTIVE_READ_XYZ #undef ALLOW_OPENAD_ACTIVE_READ_XY #undef ALLOW_OPENAD_ACTIVE_WRITE #endif /* ALLOW_OPENAD */ #endif /* OPENAD_OPTIONS_H */
Change to 3D active read
Change to 3D active read
C
mit
altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h
37a80793063bee42a088534eb87e2af7e4d5e2e7
tests/sv-comp/multicall_context_true-unreach-call.c
tests/sv-comp/multicall_context_true-unreach-call.c
extern void __VERIFIER_error() __attribute__ ((__noreturn__)); extern int __VERIFIER_nondet_int(); void __VERIFIER_assert(int cond) { if (!(cond)) { ERROR: __VERIFIER_error(); } return; } void foo(int x) { __VERIFIER_assert(x - 1 < x); } int main() { foo(1); foo(2); return 0; }
Add basic example with multiple contexts
Add basic example with multiple contexts
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
69406f7330d9fd0b36a2aefd479636cc8738127c
gtk/spice-util-priv.h
gtk/spice-util-priv.h
/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* Copyright (C) 2010 Red Hat, Inc. 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/>. */ #ifndef SPICE_UTIL_PRIV_H #define SPICE_UTIL_PRIV_H #include <glib.h> G_BEGIN_DECLS #define UUID_FMT "%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx" gboolean spice_strv_contains(const GStrv strv, const gchar *str); gchar* spice_uuid_to_string(const guint8 uuid[16]); G_END_DECLS #endif /* SPICE_UTIL_PRIV_H */
/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* Copyright (C) 2010 Red Hat, Inc. 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/>. */ #ifndef SPICE_UTIL_PRIV_H #define SPICE_UTIL_PRIV_H #include <glib.h> G_BEGIN_DECLS #define UUID_FMT "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x" gboolean spice_strv_contains(const GStrv strv, const gchar *str); gchar* spice_uuid_to_string(const guint8 uuid[16]); G_END_DECLS #endif /* SPICE_UTIL_PRIV_H */
Replace %02hhx with %02x in UUID format
Replace %02hhx with %02x in UUID format Use of 'hh' in the UUID format string is not required. Furthermore it causes errors on Mingw32, where the 'hh' modifier is not supported
C
lgpl-2.1
elmarco/spice-gtk,Fantu/spice-gtk,freedesktop-unofficial-mirror/spice__spice-gtk,freedesktop-unofficial-mirror/spice__spice-gtk,Fantu/spice-gtk,flexVDI/spice-gtk,SPICE/spice-gtk,freedesktop-unofficial-mirror/spice__spice-gtk,dezelin/spice-gtk,mathslinux/spice-gtk,guodong/spice-gtk,SPICE/spice-gtk,fgouget/spice-gtk,elmarco/spice-gtk,freedesktop-unofficial-mirror/spice__spice-gtk,guodong/spice-gtk,dezelin/spice-gtk,mathslinux/spice-gtk,fgouget/spice-gtk,guodong/spice-gtk,elmarco/spice-gtk,dezelin/spice-gtk,fgouget/spice-gtk,mathslinux/spice-gtk,Fantu/spice-gtk,SPICE/spice-gtk,SPICE/spice-gtk,elmarco/spice-gtk,dezelin/spice-gtk,Fantu/spice-gtk,flexVDI/spice-gtk,mathslinux/spice-gtk,guodong/spice-gtk
e3485b84607578953b545b5033620bf1390c9132
test2/__attribute__/cleanup/auto_out_param.c
test2/__attribute__/cleanup/auto_out_param.c
// RUN: %ocheck 0 %s struct store_out { int *local; int *ret; }; void store_out(const struct store_out *const so) { *so->ret = *so->local; } void f(int *p) { int i = *p; struct store_out so __attribute((cleanup(store_out))) = { .local = &i, .ret = p }; i = 5; } main() { int i = 3; f(&i); if(i != 5) abort(); return 0; }
Test cleanup-attribute with const struct parameter
Test cleanup-attribute with const struct parameter
C
mit
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
8fe1cb54b5382dedb5e1c86f483e6b3aea3bb958
src/std/c_lib.h
src/std/c_lib.h
/* * cynapses libc functions * * Copyright (c) 2008 by Andreas Schneider <[email protected]> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program 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 this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * vim: ts=2 sw=2 et cindent */ #include "c_macro.h" #include "c_alloc.h" #include "c_dir.h" #include "c_file.h" #include "c_path.h" #include "c_rbtree.h" #include "c_string.h" #include "c_time.h"
/* * cynapses libc functions * * Copyright (c) 2008 by Andreas Schneider <[email protected]> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program 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 this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * vim: ts=2 sw=2 et cindent */ #include "c_macro.h" #include "c_alloc.h" #include "c_dir.h" #include "c_file.h" #include "c_list.h" #include "c_path.h" #include "c_rbtree.h" #include "c_string.h" #include "c_time.h"
Add c_list to standard lib header file.
Add c_list to standard lib header file.
C
lgpl-2.1
meeh420/csync,gco/csync,meeh420/csync,gco/csync,gco/csync,meeh420/csync,gco/csync
7f93f8bab3f1e8e1b4360d63a812dfbb9ec80bc2
examples/post_sample/example_post_sample.c
examples/post_sample/example_post_sample.c
/* * Copyright 2014 SimpleThings, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed 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. */ #include <canopy.h> int main(void) { canopy_post_sample( CANOPY_CLOUD_SERVER, "dev02.canopy.link", CANOPY_DEVICE_UUID, "9dfe2a00-efe2-45f9-a84c-8afc69caf4e7", CANOPY_PROPERTY_NAME, "cpu", CANOPY_VALUE_FLOAT32, 0.22f ); return 0; }
/* * Copyright 2014 SimpleThings, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed 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. */ #include <canopy.h> int main(void) { // Your code here for determining sensor value... float temperature = 24.0f; // Send sample to the cloud: canopy_post_sample( CANOPY_CLOUD_SERVER, "dev02.canopy.link", CANOPY_DEVICE_UUID, "9dfe2a00-efe2-45f9-a84c-8afc69caf4e7", CANOPY_PROPERTY_NAME, "temperature", CANOPY_VALUE_FLOAT32, temperature ); return 0; }
Make sample app a little more clear
Make sample app a little more clear
C
apache-2.0
canopy-project/canopy-embedded,canopy-project/canopy-embedded,canopy-project/canopy-embedded
11acdd53ab086a9622074f79ef1535c1448cbb91
Shared/Encounter.h
Shared/Encounter.h
// // Encounter.h // ProeliaKit // // Created by Paul Schifferer on 3/5/15. // Copyright (c) 2015 Pilgrimage Software. All rights reserved. // @import Foundation; #import "EncounterConstants.h" #import "GameSystem.h" #import "AbstractEncounter.h" @class EncounterMap; @class EncounterParticipant; @class EncounterRegion; @class EncounterTimelineEntry; /** * An instance of this class represents an encounter created from a template that is being run. */ @interface Encounter : AbstractEncounter // -- Attributes -- /** * */ @property (nonatomic, assign) NSInteger currentRound; /** * */ @property (nonatomic, assign) NSTimeInterval endDate; /** * */ @property (nonatomic, assign) NSInteger numberOfRounds; /** * */ @property (nonatomic, assign) NSInteger numberOfTurns; /** * */ @property (nonatomic, copy) NSString *encounterTemplateName; /** * */ @property (nonatomic, assign) NSTimeInterval startDate; /** * */ @property (nonatomic, assign) EncounterState state; /** * */ @property (nonatomic, copy) NSData *turnQueue; // -- Relationships -- @end
// // Encounter.h // ProeliaKit // // Created by Paul Schifferer on 3/5/15. // Copyright (c) 2015 Pilgrimage Software. All rights reserved. // @import Foundation; #import "EncounterConstants.h" #import "GameSystem.h" #import "AbstractEncounter.h" @class EncounterMap; @class EncounterParticipant; @class EncounterRegion; @class EncounterTimelineEntry; /** * An instance of this class represents an encounter created from a template that is being run. */ @interface Encounter : AbstractEncounter // -- Attributes -- /** * */ @property (nonatomic, assign) NSInteger currentRound; /** * */ @property (nonatomic, assign) NSTimeInterval endDate; /** * */ @property (nonatomic, assign) NSInteger numberOfRounds; /** * */ @property (nonatomic, assign) NSInteger numberOfTurns; /** * */ @property (nonatomic, copy) NSString *encounterTemplateName; /** * */ @property (nonatomic, assign) NSTimeInterval startDate; /** * */ @property (nonatomic, assign) EncounterState state; /** * */ @property (nonatomic, copy) NSData *turnQueue; // -- Relationships -- /** */ @property (nonatomic, copy) NSString* templateId; @end
Store ID for source template.
Store ID for source template.
C
mit
pilgrimagesoftware/ProeliaKit,pilgrimagesoftware/ProeliaKit
1bf764c914d503e87c909439f0bd43bb72e93580
LinkedList/insert_node_at_tail.c
LinkedList/insert_node_at_tail.c
/* Input Format You have to complete the Node* Insert(Node* head, int data) method which takes two arguments - the head of the linked list and the integer to insert. You should NOT read any input from stdin/console. Output Format Insert the new node at the tail and just return the head of the updated linked list. Do NOT print anything to stdout/console. Sample Input NULL, data = 2 2 --> NULL, data = 3 Sample Output 2 -->NULL 2 --> 3 --> NULL Explanation 1. We have an empty list and we insert 2. 2. We have 2 in the tail, when 3 is inserted 3 becomes the tail. */ /* Insert Node at the end of a linked list head pointer input could be NULL as well for empty list Node is defined as struct Node { int data; struct Node *next; } */ Node* Insert(Node *head,int data) { Node* temp; temp =(Node*) malloc(sizeof(Node)); temp->data = data; temp->next = NULL; Node* head_temp=head; if(head ==NULL){ head = temp; } else { while(head_temp->next!=NULL){ head_temp = head_temp->next; } head_temp->next = temp; } return head; }
Add insert node at tail fn
Add insert node at tail fn
C
mit
anaghajoshi/HackerRank
f9dd70c4988603f97de3b3b9a3ee7cb578bff699
test/ubsan_minimal/TestCases/test-darwin-interface.c
test/ubsan_minimal/TestCases/test-darwin-interface.c
// Check that the ubsan and ubsan-minimal runtimes have the same symbols, // making exceptions as necessary. // // REQUIRES: x86_64-darwin // RUN: nm -jgU `%clangxx -fsanitize-minimal-runtime -fsanitize=undefined %s -o %t '-###' 2>&1 | grep "libclang_rt.ubsan_minimal_osx_dynamic.dylib" | sed -e 's/.*"\(.*libclang_rt.ubsan_minimal_osx_dynamic.dylib\)".*/\1/'` | grep "^___ubsan_handle" \ // RUN: | sed 's/_minimal//g' \ // RUN: > %t.minimal.symlist // // RUN: nm -jgU `%clangxx -fno-sanitize-minimal-runtime -fsanitize=undefined %s -o %t '-###' 2>&1 | grep "libclang_rt.ubsan_osx_dynamic.dylib" | sed -e 's/.*"\(.*libclang_rt.ubsan_osx_dynamic.dylib\)".*/\1/'` | grep "^___ubsan_handle" \ // RUN: | grep -vE "^___ubsan_handle_dynamic_type_cache_miss" \ // RUN: | grep -vE "^___ubsan_handle_cfi_bad_type" \ // RUN: | sed 's/_v1//g' \ // RUN: > %t.full.symlist // // RUN: diff %t.minimal.symlist %t.full.symlist
Test exported symbol set against RTUBsan
[ubsan-minimal] Test exported symbol set against RTUBsan Check that the symbol sets exported by the minimal runtime and the full runtime match (making exceptions for special cases as needed). This test uses some possibly non-standard nm options, and needs to inspect the symbols in runtime dylibs. I haven't found a portable way to do this, so it's limited to x86-64/Darwin for now. git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@313615 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
aaaf165b247a1a8ea5cd2936d9fd1eefe5e580f9
arch/arm/mach-kirkwood/board-iomega_ix2_200.c
arch/arm/mach-kirkwood/board-iomega_ix2_200.c
/* * arch/arm/mach-kirkwood/board-iomega_ix2_200.c * * Iomega StorCenter ix2-200 * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ #include <linux/kernel.h> #include <linux/init.h> #include <linux/mv643xx_eth.h> #include <linux/ethtool.h> #include "common.h" static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = { .phy_addr = MV643XX_ETH_PHY_NONE, .speed = SPEED_1000, .duplex = DUPLEX_FULL, }; void __init iomega_ix2_200_init(void) { /* * Basic setup. Needs to be called early. */ kirkwood_ge01_init(&iomega_ix2_200_ge00_data); }
/* * arch/arm/mach-kirkwood/board-iomega_ix2_200.c * * Iomega StorCenter ix2-200 * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ #include <linux/kernel.h> #include <linux/init.h> #include <linux/mv643xx_eth.h> #include <linux/ethtool.h> #include "common.h" static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = { .phy_addr = MV643XX_ETH_PHY_NONE, .speed = SPEED_1000, .duplex = DUPLEX_FULL, }; static struct mv643xx_eth_platform_data iomega_ix2_200_ge01_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(11), }; void __init iomega_ix2_200_init(void) { /* * Basic setup. Needs to be called early. */ kirkwood_ge00_init(&iomega_ix2_200_ge00_data); kirkwood_ge01_init(&iomega_ix2_200_ge01_data); }
Fix GE0/GE1 init on ix2-200 as GE0 has no PHY
Fix GE0/GE1 init on ix2-200 as GE0 has no PHY Signed-off-by: Jason Cooper <[email protected]>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
4cff24f6e6f727ddaa072825a508b801b116c8a8
deal.II/doc/doxygen/headers/constraints.h
deal.II/doc/doxygen/headers/constraints.h
//------------------------------------------------------------------------- // $Id$ // Version: $Name$ // // Copyright (C) 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer // to the file deal.II/doc/license.html for the text and // further information on this license. // //------------------------------------------------------------------------- /** * @defgroup constraints Constraints on degrees of freedom * @ingroup dofs * * This module deals with constraints on degrees of * freedom. Constraints typically come from several sources, for * example: * - If you have Dirichlet-type boundary conditions, one usually enforces * them by requiring that that degrees of freedom on the boundary have * particular values, for example $x_12=42$ if the boundary condition * requires that the finite element solution at the location of degree * of freedom 12 has the value 42. * * This class implements dealing with linear (possibly inhomogeneous) * constraints on degrees of freedom. In particular, it handles constraints of * the form $x_{i_1} = \sum_{j=2}^M a_{i_j} x_{i_j} + b_i$. In the context of * adaptive finite elements, such constraints appear most frequently as * "hanging nodes" and for implementing Dirichlet boundary conditions in * strong form. The class is meant to deal with a limited number of * constraints relative to the total number of degrees of freedom, for example * a few per cent up to maybe 30 per cent; and with a linear combination of * $M$ other degrees of freedom where $M$ is also relatively small (no larger * than at most around the average number of entries per row of a linear * system). It is <em>not</em> meant to describe full rank linear systems. */
Add provisional version, to be finished at home later today.
Add provisional version, to be finished at home later today. git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@22003 0785d39b-7218-0410-832d-ea1e28bc413d
C
lgpl-2.1
YongYang86/dealii,gpitton/dealii,Arezou-gh/dealii,sriharisundar/dealii,ESeNonFossiIo/dealii,mac-a/dealii,natashasharma/dealii,JaeryunYim/dealii,sriharisundar/dealii,lpolster/dealii,andreamola/dealii,kalj/dealii,shakirbsm/dealii,mtezzele/dealii,naliboff/dealii,angelrca/dealii,flow123d/dealii,maieneuro/dealii,gpitton/dealii,maieneuro/dealii,lue/dealii,ESeNonFossiIo/dealii,johntfoster/dealii,kalj/dealii,lpolster/dealii,danshapero/dealii,rrgrove6/dealii,angelrca/dealii,mac-a/dealii,JaeryunYim/dealii,kalj/dealii,johntfoster/dealii,shakirbsm/dealii,pesser/dealii,lue/dealii,YongYang86/dealii,kalj/dealii,nicolacavallini/dealii,nicolacavallini/dealii,jperryhouts/dealii,JaeryunYim/dealii,Arezou-gh/dealii,naliboff/dealii,sairajat/dealii,angelrca/dealii,lue/dealii,andreamola/dealii,naliboff/dealii,flow123d/dealii,mac-a/dealii,naliboff/dealii,ibkim11/dealii,YongYang86/dealii,kalj/dealii,lue/dealii,flow123d/dealii,ibkim11/dealii,natashasharma/dealii,ibkim11/dealii,sriharisundar/dealii,naliboff/dealii,lpolster/dealii,lue/dealii,lpolster/dealii,sairajat/dealii,danshapero/dealii,danshapero/dealii,sairajat/dealii,mtezzele/dealii,msteigemann/dealii,natashasharma/dealii,nicolacavallini/dealii,jperryhouts/dealii,angelrca/dealii,naliboff/dealii,sriharisundar/dealii,mac-a/dealii,adamkosik/dealii,sairajat/dealii,msteigemann/dealii,lpolster/dealii,nicolacavallini/dealii,sairajat/dealii,andreamola/dealii,angelrca/dealii,pesser/dealii,JaeryunYim/dealii,spco/dealii,danshapero/dealii,johntfoster/dealii,lpolster/dealii,msteigemann/dealii,pesser/dealii,gpitton/dealii,mtezzele/dealii,maieneuro/dealii,jperryhouts/dealii,EGP-CIG-REU/dealii,adamkosik/dealii,johntfoster/dealii,msteigemann/dealii,rrgrove6/dealii,EGP-CIG-REU/dealii,ESeNonFossiIo/dealii,Arezou-gh/dealii,msteigemann/dealii,spco/dealii,andreamola/dealii,kalj/dealii,gpitton/dealii,adamkosik/dealii,maieneuro/dealii,EGP-CIG-REU/dealii,YongYang86/dealii,sairajat/dealii,flow123d/dealii,johntfoster/dealii,JaeryunYim/dealii,angelrca/dealii,ibkim11/dealii,gpitton/dealii,gpitton/dealii,andreamola/dealii,JaeryunYim/dealii,angelrca/dealii,maieneuro/dealii,Arezou-gh/dealii,sriharisundar/dealii,ibkim11/dealii,natashasharma/dealii,EGP-CIG-REU/dealii,danshapero/dealii,danshapero/dealii,maieneuro/dealii,spco/dealii,flow123d/dealii,adamkosik/dealii,nicolacavallini/dealii,rrgrove6/dealii,YongYang86/dealii,sriharisundar/dealii,nicolacavallini/dealii,sairajat/dealii,JaeryunYim/dealii,shakirbsm/dealii,andreamola/dealii,mac-a/dealii,lpolster/dealii,rrgrove6/dealii,jperryhouts/dealii,shakirbsm/dealii,spco/dealii,jperryhouts/dealii,spco/dealii,Arezou-gh/dealii,lue/dealii,shakirbsm/dealii,kalj/dealii,flow123d/dealii,natashasharma/dealii,jperryhouts/dealii,ESeNonFossiIo/dealii,mtezzele/dealii,adamkosik/dealii,natashasharma/dealii,rrgrove6/dealii,pesser/dealii,johntfoster/dealii,flow123d/dealii,pesser/dealii,mtezzele/dealii,jperryhouts/dealii,pesser/dealii,johntfoster/dealii,nicolacavallini/dealii,rrgrove6/dealii,YongYang86/dealii,ESeNonFossiIo/dealii,natashasharma/dealii,sriharisundar/dealii,ibkim11/dealii,Arezou-gh/dealii,mtezzele/dealii,adamkosik/dealii,EGP-CIG-REU/dealii,maieneuro/dealii,danshapero/dealii,gpitton/dealii,adamkosik/dealii,EGP-CIG-REU/dealii,msteigemann/dealii,pesser/dealii,ESeNonFossiIo/dealii,naliboff/dealii,spco/dealii,andreamola/dealii,ESeNonFossiIo/dealii,mac-a/dealii,EGP-CIG-REU/dealii,rrgrove6/dealii,mtezzele/dealii,Arezou-gh/dealii,spco/dealii,lue/dealii,shakirbsm/dealii,msteigemann/dealii,mac-a/dealii,ibkim11/dealii,YongYang86/dealii,shakirbsm/dealii
8ae331ba0b6f64564519e9e5618ec035bb54038f
interpreter/cling/lib/MetaProcessor/Display.h
interpreter/cling/lib/MetaProcessor/Display.h
//--------------------------------------------------------------------*- C++ -*- // CLING - the C++ LLVM-based InterpreterG :) // version: $Id$ // author: Timur Pocheptsov <[email protected]> //------------------------------------------------------------------------------ #ifndef CLING_DISPLAY_H #define CLING_DISPLAY_H #include <string> namespace llvm { class raw_ostream; } namespace cling { void DisplayClasses(llvm::raw_ostream &stream, const class Interpreter *interpreter, bool verbose); void DisplayClass(llvm::raw_ostream &stream, const Interpreter *interpreter, const char *className, bool verbose); void DisplayGlobals(llvm::raw_ostream &stream, const Interpreter *interpreter); void DisplayGlobal(llvm::raw_ostream &stream, const Interpreter *interpreter, const std::string &name); } #endif
//--------------------------------------------------------------------*- C++ -*- // CLING - the C++ LLVM-based InterpreterG :) // version: $Id$ // author: Timur Pocheptsov <[email protected]> //------------------------------------------------------------------------------ #ifndef CLING_DISPLAY_H #define CLING_DISPLAY_H #include <string> namespace llvm { class raw_ostream; } namespace cling { class Interpreter; void DisplayClasses(llvm::raw_ostream &stream, const Interpreter *interpreter, bool verbose); void DisplayClass(llvm::raw_ostream &stream, const Interpreter *interpreter, const char *className, bool verbose); void DisplayGlobals(llvm::raw_ostream &stream, const Interpreter *interpreter); void DisplayGlobal(llvm::raw_ostream &stream, const Interpreter *interpreter, const std::string &name); } #endif
Fix fwd decl for windows.
Fix fwd decl for windows. git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@47814 27541ba8-7e3a-0410-8455-c3a389f83636
C
lgpl-2.1
bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT
2dbf07d095e6ffbeef50942a9c9f3241f71d5fb8
lib/StaticAnalyzer/Checkers/ClangSACheckers.h
lib/StaticAnalyzer/Checkers/ClangSACheckers.h
//===--- ClangSACheckers.h - Registration functions for Checkers *- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // Declares the registation functions for the checkers defined in // libclangStaticAnalyzerCheckers. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_SA_LIB_CHECKERS_CLANGSACHECKERS_H #define LLVM_CLANG_SA_LIB_CHECKERS_CLANGSACHECKERS_H namespace clang { namespace ento { class ExprEngine; #define GET_CHECKERS #define CHECKER(FULLNAME,CLASS,CXXFILE,HELPTEXT,HIDDEN) \ void register##CLASS(ExprEngine &Eng); #include "Checkers.inc" #undef CHECKER #undef GET_CHECKERS } // end ento namespace } // end clang namespace #endif
//===--- ClangSACheckers.h - Registration functions for Checkers *- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // Declares the registation functions for the checkers defined in // libclangStaticAnalyzerCheckers. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_SA_LIB_CHECKERS_CLANGSACHECKERS_H #define LLVM_CLANG_SA_LIB_CHECKERS_CLANGSACHECKERS_H namespace clang { namespace ento { class ExprEngine; #define GET_CHECKERS #define CHECKER(FULLNAME,CLASS,CXXFILE,HELPTEXT,HIDDEN) \ void register##CLASS(ExprEngine &Eng); #include "../Checkers/Checkers.inc" #undef CHECKER #undef GET_CHECKERS } // end ento namespace } // end clang namespace #endif
Revert r125642. This broke the build? It should be a no-op.
Revert r125642. This broke the build? It should be a no-op. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@125645 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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
ee1ba3e0b094ce80965eb2f1dd599fca6ff6736c
src/Blocks/BlockTNT.h
src/Blocks/BlockTNT.h
#pragma once #include "BlockHandler.h" class cBlockTNTHandler : public cBlockHandler { public: cBlockTNTHandler(BLOCKTYPE a_BlockType) : cBlockHandler(a_BlockType) { } virtual const char * GetStepSound(void) override { return "step.wood"; } virtual void OnCancelRightClick(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) override { a_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, a_Player); } };
#pragma once #include "BlockHandler.h" class cBlockTNTHandler : public cBlockHandler { public: cBlockTNTHandler(BLOCKTYPE a_BlockType) : cBlockHandler(a_BlockType) { } virtual const char * GetStepSound(void) override { return "step.grass"; } virtual void OnCancelRightClick(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) override { a_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, a_Player); } };
Set tnt step sound to step.grass
Set tnt step sound to step.grass
C
apache-2.0
ionux/MCServer,Fighter19/cuberite,birkett/MCServer,birkett/MCServer,Frownigami1/cuberite,guijun/MCServer,Howaner/MCServer,mmdk95/cuberite,MuhammadWang/MCServer,nichwall/cuberite,MuhammadWang/MCServer,jammet/MCServer,Frownigami1/cuberite,mmdk95/cuberite,zackp30/cuberite,jammet/MCServer,tonibm19/cuberite,marvinkopf/cuberite,nevercast/cuberite,mc-server/MCServer,tonibm19/cuberite,Fighter19/cuberite,QUSpilPrgm/cuberite,Howaner/MCServer,mjssw/cuberite,kevinr/cuberite,Altenius/cuberite,linnemannr/MCServer,thetaeo/cuberite,birkett/MCServer,zackp30/cuberite,mc-server/MCServer,MuhammadWang/MCServer,marvinkopf/cuberite,Haxi52/cuberite,johnsoch/cuberite,MuhammadWang/MCServer,Schwertspize/cuberite,Tri125/MCServer,SamOatesPlugins/cuberite,birkett/cuberite,thetaeo/cuberite,nounoursheureux/MCServer,birkett/cuberite,Tri125/MCServer,Fighter19/cuberite,mjssw/cuberite,Schwertspize/cuberite,guijun/MCServer,HelenaKitty/EbooMC,QUSpilPrgm/cuberite,linnemannr/MCServer,electromatter/cuberite,jammet/MCServer,SamOatesPlugins/cuberite,HelenaKitty/EbooMC,nicodinh/cuberite,nounoursheureux/MCServer,electromatter/cuberite,nicodinh/cuberite,marvinkopf/cuberite,birkett/cuberite,nicodinh/cuberite,mjssw/cuberite,thetaeo/cuberite,nounoursheureux/MCServer,nichwall/cuberite,guijun/MCServer,bendl/cuberite,electromatter/cuberite,johnsoch/cuberite,mjssw/cuberite,zackp30/cuberite,Howaner/MCServer,Haxi52/cuberite,bendl/cuberite,Frownigami1/cuberite,nevercast/cuberite,Schwertspize/cuberite,mmdk95/cuberite,Altenius/cuberite,Tri125/MCServer,nichwall/cuberite,Schwertspize/cuberite,zackp30/cuberite,linnemannr/MCServer,Frownigami1/cuberite,birkett/MCServer,birkett/MCServer,Tri125/MCServer,electromatter/cuberite,Haxi52/cuberite,kevinr/cuberite,Altenius/cuberite,zackp30/cuberite,mc-server/MCServer,linnemannr/MCServer,bendl/cuberite,birkett/MCServer,HelenaKitty/EbooMC,nevercast/cuberite,johnsoch/cuberite,marvinkopf/cuberite,ionux/MCServer,QUSpilPrgm/cuberite,mmdk95/cuberite,Fighter19/cuberite,nounoursheureux/MCServer,Tri125/MCServer,Fighter19/cuberite,MuhammadWang/MCServer,ionux/MCServer,kevinr/cuberite,guijun/MCServer,Howaner/MCServer,mc-server/MCServer,linnemannr/MCServer,tonibm19/cuberite,Haxi52/cuberite,nevercast/cuberite,Haxi52/cuberite,zackp30/cuberite,SamOatesPlugins/cuberite,nichwall/cuberite,nevercast/cuberite,guijun/MCServer,Schwertspize/cuberite,johnsoch/cuberite,QUSpilPrgm/cuberite,QUSpilPrgm/cuberite,SamOatesPlugins/cuberite,nounoursheureux/MCServer,Altenius/cuberite,kevinr/cuberite,bendl/cuberite,nichwall/cuberite,tonibm19/cuberite,mjssw/cuberite,Tri125/MCServer,nicodinh/cuberite,Haxi52/cuberite,ionux/MCServer,Altenius/cuberite,kevinr/cuberite,ionux/MCServer,HelenaKitty/EbooMC,thetaeo/cuberite,birkett/cuberite,tonibm19/cuberite,mc-server/MCServer,kevinr/cuberite,jammet/MCServer,johnsoch/cuberite,birkett/cuberite,mjssw/cuberite,nicodinh/cuberite,electromatter/cuberite,marvinkopf/cuberite,Fighter19/cuberite,SamOatesPlugins/cuberite,thetaeo/cuberite,HelenaKitty/EbooMC,mmdk95/cuberite,Frownigami1/cuberite,linnemannr/MCServer,nicodinh/cuberite,nevercast/cuberite,Howaner/MCServer,marvinkopf/cuberite,mc-server/MCServer,tonibm19/cuberite,ionux/MCServer,jammet/MCServer,birkett/cuberite,mmdk95/cuberite,bendl/cuberite,nounoursheureux/MCServer,guijun/MCServer,Howaner/MCServer,nichwall/cuberite,electromatter/cuberite,QUSpilPrgm/cuberite,thetaeo/cuberite,jammet/MCServer
4ee56830312ce07823a18cb8d0da396f94121c23
Modules/ThirdParty/OssimPlugins/src/ossim/ossimOperatorUtilities.h
Modules/ThirdParty/OssimPlugins/src/ossim/ossimOperatorUtilities.h
//---------------------------------------------------------------------------- // // "Copyright Centre National d'Etudes Spatiales" // // License: LGPL-2 // // See LICENSE.txt file in the top level directory for more details. // //---------------------------------------------------------------------------- // $Id$ #ifndef ossimOperatorUtilities_h #define ossimOperatorUtilities_h namespace ossimplugins { // Uses Barton-Nackman trick to help implement operator on classes // Strongly inspired by boost.operators interface // See ossimTimeUtilities.h and ossimTimeUtilitiesTest.cpp for example of // use #define DEFINE_OPERATORS(name, compound, op) \ template <typename T> struct name ## 1 \ { \ friend T operator op(T lhs, T const& rhs) { \ lhs compound rhs; \ return lhs; \ } \ }; \ template <typename T, typename U> struct name ## 2 \ { \ friend T operator op(T lhs, U const& rhs) { \ lhs compound rhs; \ return lhs; \ } \ friend T operator op(U const& lhs, T rhs) { \ rhs compound lhs; \ return rhs; \ } \ }; \ template <typename T, typename U=void> struct name : name ## 2<T,U> {}; \ template <typename T> struct name<T,void> : name ## 1<T> {}; template <typename U, typename V> struct substractable_asym { friend U operator-(V const& lhs, V const& rhs) { return V::template diff<U,V>(lhs, rhs); } }; DEFINE_OPERATORS(addable, +=, +); DEFINE_OPERATORS(substractable, -=, -); DEFINE_OPERATORS(multipliable, *=, *); #undef DEFINE_OPERATORS template <typename T, typename R> struct dividable { typedef R scalar_type; friend T operator/(T lhs, scalar_type const& rhs) { lhs /= rhs; return lhs; } friend scalar_type operator/(T const& lhs, T const& rhs) { return ratio(lhs, rhs); } }; template <typename T> struct streamable { friend std::ostream & operator<<(std::ostream & os, const T & v) { return v.display(os); } }; template <typename T> struct less_than_comparable { friend bool operator>(T const& lhs, T const& rhs) { return rhs < lhs; } friend bool operator>=(T const& lhs, T const& rhs) { return !(lhs < rhs); } friend bool operator<=(T const& lhs, T const& rhs) { return !(rhs < lhs); } }; template <typename T> struct equality_comparable { friend bool operator!=(T const& lhs, T const& rhs) { return !(rhs == lhs); } }; }// namespace ossimplugins #endif // ossimOperatorUtilities_h
Add facilities to define classes with arithmetic semantics
ENH: Add facilities to define classes with arithmetic semantics Strongly inspired by boost.operators interface
C
apache-2.0
orfeotoolbox/OTB,orfeotoolbox/OTB,orfeotoolbox/OTB,orfeotoolbox/OTB,orfeotoolbox/OTB,orfeotoolbox/OTB
9552621829998a40edde36dcb35aa11c4fe56800
tests/regression/02-base/55-printf-n.c
tests/regression/02-base/55-printf-n.c
// SKIP #include <stdio.h> #include <assert.h> int main() { int written = 0; printf("foo%n\n", &written); // invalidates written by setting written = 3 assert(written != 0); // TODO (fail means written == 0, which is unsound) printf("%d\n", written); return 0; }
Add skipped test where printf with %n is unsound
Add skipped test where printf with %n is unsound
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
7b9b5f5f241f7a95110cc6b425c02368b5327270
include/nekit/transport/listener_interface.h
include/nekit/transport/listener_interface.h
// MIT License // Copyright (c) 2017 Zhuhao Wang // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #pragma once #include <functional> #include <memory> #include <system_error> #include "connection_interface.h" namespace nekit { namespace transport { class ListenerInterface { public: virtual ~ListenerInterface() = default; using EventHandler = std::function<void( std::unique_ptr<ConnectionInterface>&&, std::error_code)>; virtual void Accept(EventHandler&&); }; } // namespace transport } // namespace nekit
// MIT License // Copyright (c) 2017 Zhuhao Wang // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #pragma once #include <functional> #include <memory> #include <system_error> #include "connection_interface.h" namespace nekit { namespace transport { class ListenerInterface { public: virtual ~ListenerInterface() = default; // Due to the limitation of boost handler, the handler type must be copy // constructible. using EventHandler = std::function<void( std::unique_ptr<ConnectionInterface>&&, std::error_code)>; virtual void Accept(EventHandler&&); }; } // namespace transport } // namespace nekit
Add comment for handler type requirement
DOC: Add comment for handler type requirement
C
mit
zhuhaow/libnekit,zhuhaow/libnekit,zhuhaow/libnekit,zhuhaow/libnekit
a85984ba3bc5831f701ba4706bc8298234d17e21
include/wb_game_version.h
include/wb_game_version.h
/** * WarfaceBot, a blind XMPP client for Warface (FPS) * Copyright (C) 2015 Levak Borok <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef WB_GAME_VERSION_H # define WB_GAME_VERSION_H # define GAME_VERSION "1.1.1.3570" #endif /* !WB_GAME_VERSION_H */
/** * WarfaceBot, a blind XMPP client for Warface (FPS) * Copyright (C) 2015 Levak Borok <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef WB_GAME_VERSION_H # define WB_GAME_VERSION_H # ifndef GAME_VERSION # define GAME_VERSION "1.1.1.3570" # endif /* !GAME_VERSION */ #endif /* !WB_GAME_VERSION_H */
Add guards for GAME_VERSION for command line customization
Add guards for GAME_VERSION for command line customization
C
agpl-3.0
DevilDaga/warfacebot,Levak/warfacebot,Levak/warfacebot,DevilDaga/warfacebot,Levak/warfacebot
3773489a59adb0313d98e7d5a5749bdda8145e17
interpreter/cling/lib/MetaProcessor/Display.h
interpreter/cling/lib/MetaProcessor/Display.h
//--------------------------------------------------------------------*- C++ -*- // CLING - the C++ LLVM-based InterpreterG :) // version: $Id$ // author: Timur Pocheptsov <[email protected]> //------------------------------------------------------------------------------ #ifndef CLING_DISPLAY_H #define CLING_DISPLAY_H #include <string> namespace llvm { class raw_ostream; } namespace cling { void DisplayClasses(llvm::raw_ostream &stream, const class Interpreter *interpreter, bool verbose); void DisplayClass(llvm::raw_ostream &stream, const Interpreter *interpreter, const char *className, bool verbose); void DisplayGlobals(llvm::raw_ostream &stream, const Interpreter *interpreter); void DisplayGlobal(llvm::raw_ostream &stream, const Interpreter *interpreter, const std::string &name); } #endif
//--------------------------------------------------------------------*- C++ -*- // CLING - the C++ LLVM-based InterpreterG :) // version: $Id$ // author: Timur Pocheptsov <[email protected]> //------------------------------------------------------------------------------ #ifndef CLING_DISPLAY_H #define CLING_DISPLAY_H #include <string> namespace llvm { class raw_ostream; } namespace cling { class Interpreter; void DisplayClasses(llvm::raw_ostream &stream, const Interpreter *interpreter, bool verbose); void DisplayClass(llvm::raw_ostream &stream, const Interpreter *interpreter, const char *className, bool verbose); void DisplayGlobals(llvm::raw_ostream &stream, const Interpreter *interpreter); void DisplayGlobal(llvm::raw_ostream &stream, const Interpreter *interpreter, const std::string &name); } #endif
Fix fwd decl for windows.
Fix fwd decl for windows. git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@47814 27541ba8-7e3a-0410-8455-c3a389f83636
C
lgpl-2.1
esakellari/root,Y--/root,agarciamontoro/root,cxx-hep/root-cern,omazapa/root,bbockelm/root,mkret2/root,karies/root,karies/root,karies/root,olifre/root,0x0all/ROOT,abhinavmoudgil95/root,Y--/root,smarinac/root,evgeny-boger/root,thomaskeck/root,mkret2/root,omazapa/root,veprbl/root,perovic/root,arch1tect0r/root,vukasinmilosevic/root,jrtomps/root,buuck/root,arch1tect0r/root,thomaskeck/root,sirinath/root,vukasinmilosevic/root,cxx-hep/root-cern,evgeny-boger/root,agarciamontoro/root,krafczyk/root,vukasinmilosevic/root,root-mirror/root,root-mirror/root,lgiommi/root,arch1tect0r/root,veprbl/root,lgiommi/root,cxx-hep/root-cern,root-mirror/root,perovic/root,zzxuanyuan/root,dfunke/root,satyarth934/root,perovic/root,mkret2/root,abhinavmoudgil95/root,bbockelm/root,veprbl/root,sirinath/root,smarinac/root,gbitzes/root,mhuwiler/rootauto,beniz/root,0x0all/ROOT,omazapa/root-old,zzxuanyuan/root,dfunke/root,olifre/root,0x0all/ROOT,esakellari/root,alexschlueter/cern-root,karies/root,olifre/root,davidlt/root,veprbl/root,lgiommi/root,perovic/root,bbockelm/root,satyarth934/root,omazapa/root-old,gbitzes/root,perovic/root,veprbl/root,satyarth934/root,CristinaCristescu/root,nilqed/root,vukasinmilosevic/root,omazapa/root-old,sawenzel/root,Y--/root,0x0all/ROOT,mkret2/root,buuck/root,satyarth934/root,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root,olifre/root,0x0all/ROOT,mattkretz/root,smarinac/root,omazapa/root-old,gganis/root,arch1tect0r/root,sawenzel/root,mattkretz/root,nilqed/root,jrtomps/root,lgiommi/root,sawenzel/root,sbinet/cxx-root,karies/root,esakellari/my_root_for_test,sawenzel/root,beniz/root,buuck/root,davidlt/root,nilqed/root,krafczyk/root,omazapa/root-old,sirinath/root,thomaskeck/root,abhinavmoudgil95/root,karies/root,veprbl/root,vukasinmilosevic/root,gbitzes/root,gganis/root,arch1tect0r/root,cxx-hep/root-cern,CristinaCristescu/root,thomaskeck/root,zzxuanyuan/root,olifre/root,mhuwiler/rootauto,lgiommi/root,gbitzes/root,thomaskeck/root,esakellari/root,esakellari/my_root_for_test,sawenzel/root,agarciamontoro/root,simonpf/root,thomaskeck/root,satyarth934/root,olifre/root,esakellari/my_root_for_test,CristinaCristescu/root,satyarth934/root,zzxuanyuan/root-compressor-dummy,sbinet/cxx-root,esakellari/my_root_for_test,BerserkerTroll/root,nilqed/root,davidlt/root,sawenzel/root,sirinath/root,sawenzel/root,karies/root,zzxuanyuan/root,jrtomps/root,mattkretz/root,agarciamontoro/root,pspe/root,georgtroska/root,perovic/root,krafczyk/root,vukasinmilosevic/root,smarinac/root,zzxuanyuan/root,krafczyk/root,evgeny-boger/root,thomaskeck/root,buuck/root,krafczyk/root,pspe/root,lgiommi/root,esakellari/root,arch1tect0r/root,BerserkerTroll/root,sirinath/root,jrtomps/root,agarciamontoro/root,zzxuanyuan/root,esakellari/root,bbockelm/root,sirinath/root,beniz/root,mhuwiler/rootauto,smarinac/root,lgiommi/root,sbinet/cxx-root,mhuwiler/rootauto,esakellari/my_root_for_test,root-mirror/root,Duraznos/root,karies/root,CristinaCristescu/root,davidlt/root,alexschlueter/cern-root,dfunke/root,evgeny-boger/root,satyarth934/root,agarciamontoro/root,krafczyk/root,sbinet/cxx-root,mattkretz/root,arch1tect0r/root,vukasinmilosevic/root,georgtroska/root,mkret2/root,agarciamontoro/root,0x0all/ROOT,mattkretz/root,buuck/root,simonpf/root,Y--/root,buuck/root,mkret2/root,buuck/root,Duraznos/root,lgiommi/root,mattkretz/root,beniz/root,omazapa/root,jrtomps/root,arch1tect0r/root,georgtroska/root,perovic/root,Y--/root,pspe/root,pspe/root,Duraznos/root,sawenzel/root,BerserkerTroll/root,root-mirror/root,agarciamontoro/root,sbinet/cxx-root,sirinath/root,veprbl/root,gbitzes/root,veprbl/root,Duraznos/root,bbockelm/root,simonpf/root,davidlt/root,georgtroska/root,krafczyk/root,Duraznos/root,gganis/root,smarinac/root,gganis/root,omazapa/root-old,nilqed/root,olifre/root,sbinet/cxx-root,mhuwiler/rootauto,perovic/root,simonpf/root,esakellari/root,sirinath/root,simonpf/root,simonpf/root,esakellari/root,zzxuanyuan/root,simonpf/root,davidlt/root,omazapa/root-old,esakellari/root,davidlt/root,gbitzes/root,root-mirror/root,root-mirror/root,krafczyk/root,georgtroska/root,nilqed/root,Y--/root,davidlt/root,dfunke/root,zzxuanyuan/root-compressor-dummy,gganis/root,beniz/root,omazapa/root,esakellari/my_root_for_test,buuck/root,veprbl/root,georgtroska/root,satyarth934/root,esakellari/root,zzxuanyuan/root,zzxuanyuan/root-compressor-dummy,bbockelm/root,BerserkerTroll/root,alexschlueter/cern-root,Duraznos/root,sbinet/cxx-root,abhinavmoudgil95/root,BerserkerTroll/root,mhuwiler/rootauto,simonpf/root,smarinac/root,mattkretz/root,agarciamontoro/root,davidlt/root,omazapa/root,0x0all/ROOT,jrtomps/root,beniz/root,gbitzes/root,satyarth934/root,Y--/root,zzxuanyuan/root-compressor-dummy,olifre/root,smarinac/root,gbitzes/root,nilqed/root,esakellari/my_root_for_test,cxx-hep/root-cern,omazapa/root-old,gganis/root,olifre/root,Y--/root,vukasinmilosevic/root,dfunke/root,evgeny-boger/root,jrtomps/root,georgtroska/root,dfunke/root,bbockelm/root,arch1tect0r/root,sbinet/cxx-root,sawenzel/root,sawenzel/root,sbinet/cxx-root,thomaskeck/root,simonpf/root,buuck/root,mhuwiler/rootauto,krafczyk/root,zzxuanyuan/root,omazapa/root-old,georgtroska/root,mhuwiler/rootauto,krafczyk/root,veprbl/root,beniz/root,cxx-hep/root-cern,gganis/root,mkret2/root,olifre/root,esakellari/my_root_for_test,Duraznos/root,abhinavmoudgil95/root,jrtomps/root,sawenzel/root,gbitzes/root,CristinaCristescu/root,mkret2/root,jrtomps/root,BerserkerTroll/root,sirinath/root,bbockelm/root,abhinavmoudgil95/root,Y--/root,root-mirror/root,simonpf/root,alexschlueter/cern-root,evgeny-boger/root,alexschlueter/cern-root,alexschlueter/cern-root,root-mirror/root,nilqed/root,karies/root,abhinavmoudgil95/root,BerserkerTroll/root,buuck/root,0x0all/ROOT,CristinaCristescu/root,bbockelm/root,pspe/root,esakellari/root,buuck/root,0x0all/ROOT,mattkretz/root,cxx-hep/root-cern,thomaskeck/root,krafczyk/root,satyarth934/root,nilqed/root,georgtroska/root,BerserkerTroll/root,CristinaCristescu/root,abhinavmoudgil95/root,esakellari/my_root_for_test,omazapa/root,sbinet/cxx-root,perovic/root,dfunke/root,omazapa/root,root-mirror/root,cxx-hep/root-cern,gganis/root,zzxuanyuan/root-compressor-dummy,evgeny-boger/root,jrtomps/root,abhinavmoudgil95/root,omazapa/root,mkret2/root,pspe/root,veprbl/root,CristinaCristescu/root,smarinac/root,gbitzes/root,vukasinmilosevic/root,omazapa/root-old,mhuwiler/rootauto,beniz/root,georgtroska/root,sirinath/root,beniz/root,CristinaCristescu/root,evgeny-boger/root,arch1tect0r/root,Duraznos/root,CristinaCristescu/root,evgeny-boger/root,mattkretz/root,bbockelm/root,simonpf/root,zzxuanyuan/root-compressor-dummy,vukasinmilosevic/root,jrtomps/root,karies/root,sbinet/cxx-root,gganis/root,omazapa/root-old,mattkretz/root,zzxuanyuan/root,dfunke/root,mattkretz/root,nilqed/root,lgiommi/root,esakellari/root,davidlt/root,nilqed/root,dfunke/root,esakellari/my_root_for_test,georgtroska/root,olifre/root,zzxuanyuan/root-compressor-dummy,lgiommi/root,Y--/root,pspe/root,evgeny-boger/root,agarciamontoro/root,Duraznos/root,dfunke/root,perovic/root,pspe/root,Y--/root,Duraznos/root,bbockelm/root,zzxuanyuan/root-compressor-dummy,abhinavmoudgil95/root,mhuwiler/rootauto,sirinath/root,thomaskeck/root,pspe/root,vukasinmilosevic/root,omazapa/root,agarciamontoro/root,davidlt/root,mkret2/root,evgeny-boger/root,gganis/root,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,CristinaCristescu/root,gganis/root,BerserkerTroll/root,gbitzes/root,mkret2/root,omazapa/root,smarinac/root,beniz/root,lgiommi/root,dfunke/root,mhuwiler/rootauto,Duraznos/root,zzxuanyuan/root-compressor-dummy,abhinavmoudgil95/root,zzxuanyuan/root,BerserkerTroll/root,arch1tect0r/root,omazapa/root,beniz/root,alexschlueter/cern-root,perovic/root,pspe/root,pspe/root,satyarth934/root,root-mirror/root,karies/root
fade08bf28c1850d2ad2fc5b47e2379b9cf3995d
kremlib/gcc_compat.h
kremlib/gcc_compat.h
#ifndef __GCC_COMPAT_H #define __GCC_COMPAT_H #ifdef __GNUC__ // gcc does not support the __cdecl, __stdcall or __fastcall notation // except on Windows #ifndef _WIN32 #define __cdecl __attribute__((cdecl)) #define __stdcall __attribute__((stdcall)) #define __fastcall __attribute__((fastcall)) #endif // ! _WIN32 #endif // __GNUC__ #endif // __GCC_COMPAT_H
#ifndef __GCC_COMPAT_H #define __GCC_COMPAT_H #ifdef __GNUC__ // gcc does not support the __cdecl, __stdcall or __fastcall notation // except on Windows #ifdef _WIN32 #define __cdecl __attribute__((cdecl)) #define __stdcall __attribute__((stdcall)) #define __fastcall __attribute__((fastcall)) #else #define __cdecl #define __stdcall #define __fastcall #endif // _WIN32 #endif // __GNUC__ #endif // __GCC_COMPAT_H
Fix the Vale build onx 64 Linux by definining empty calling convention keywords
Fix the Vale build onx 64 Linux by definining empty calling convention keywords
C
apache-2.0
FStarLang/kremlin,FStarLang/kremlin,FStarLang/kremlin,FStarLang/kremlin
bbf79aa264b638fd4717cfb1b8fd5a7997861fe7
ArmPkg/Include/IndustryStandard/ArmMmSvc.h
ArmPkg/Include/IndustryStandard/ArmMmSvc.h
/** @file * * Copyright (c) 2012-2017, ARM Limited. All rights reserved. * * This program and the accompanying materials * are licensed and made available under the terms and conditions of the BSD License * which accompanies this distribution. The full text of the license may be found at * http://opensource.org/licenses/bsd-license.php * * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. * **/ #ifndef __ARM_MM_SVC_H__ #define __ARM_MM_SVC_H__ /* * SVC IDs to allow the MM secure partition to initialise itself, handle * delegated events and request the Secure partition manager to perform * privileged operations on its behalf. */ #define ARM_SVC_ID_SPM_VERSION_AARCH64 0xC4000060 #define ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64 0xC4000061 #define ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64 0xC4000064 #define ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64 0xC4000065 #define SET_MEM_ATTR_DATA_PERM_MASK 0x3 #define SET_MEM_ATTR_DATA_PERM_SHIFT 0 #define SET_MEM_ATTR_DATA_PERM_NO_ACCESS 0 #define SET_MEM_ATTR_DATA_PERM_RW 1 #define SET_MEM_ATTR_DATA_PERM_RO 3 #define SET_MEM_ATTR_CODE_PERM_MASK 0x1 #define SET_MEM_ATTR_CODE_PERM_SHIFT 2 #define SET_MEM_ATTR_CODE_PERM_X 0 #define SET_MEM_ATTR_CODE_PERM_XN 1 #define SET_MEM_ATTR_MAKE_PERM_REQUEST(d_perm, c_perm) \ ((((c_perm) & SET_MEM_ATTR_CODE_PERM_MASK) << SET_MEM_ATTR_CODE_PERM_SHIFT) | \ (( (d_perm) & SET_MEM_ATTR_DATA_PERM_MASK) << SET_MEM_ATTR_DATA_PERM_SHIFT)) #endif
Add SVC function IDs for Management Mode.
ArmPkg/Include: Add SVC function IDs for Management Mode. SVCs are in the range 0xC4000060 - 0xC400007f. The functions available to the secure MM partition: 1. Signal completion of MM event handling. 2. Set/Get memory attributes for a memory region at runtime. 3. Get version number of secure partition manager. Also, it defines memory attributes required for set/get operations. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Supreeth Venkatesh <[email protected]> Reviewed-by: Ard Biesheuvel <[email protected]>
C
bsd-2-clause
MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2
6257608a8aa9caa06ef787ed48caba5a786ae1f5
spdy/platform/api/spdy_bug_tracker.h
spdy/platform/api/spdy_bug_tracker.h
// Copyright (c) 2019 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 QUICHE_SPDY_PLATFORM_API_SPDY_BUG_TRACKER_H_ #define QUICHE_SPDY_PLATFORM_API_SPDY_BUG_TRACKER_H_ #include "net/spdy/platform/impl/spdy_bug_tracker_impl.h" #define SPDY_BUG SPDY_BUG_IMPL #define SPDY_BUG_IF(condition) SPDY_BUG_IF_IMPL(condition) // V2 macros are the same as all the SPDY_BUG flavor above, but they take a // bug_id parameter. #define SPDY_BUG_V2 SPDY_BUG_V2_IMPL #define SPDY_BUG_IF_V2 SPDY_BUG_IF_V2_IMPL #define FLAGS_spdy_always_log_bugs_for_tests \ FLAGS_spdy_always_log_bugs_for_tests_impl #endif // QUICHE_SPDY_PLATFORM_API_SPDY_BUG_TRACKER_H_
// Copyright (c) 2019 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 QUICHE_SPDY_PLATFORM_API_SPDY_BUG_TRACKER_H_ #define QUICHE_SPDY_PLATFORM_API_SPDY_BUG_TRACKER_H_ #include "net/spdy/platform/impl/spdy_bug_tracker_impl.h" #define SPDY_BUG SPDY_BUG_IMPL #define SPDY_BUG_IF(bug_id, condition) SPDY_BUG_IF_IMPL(bug_id, condition) // V2 macros are the same as all the SPDY_BUG flavor above, but they take a // bug_id parameter. #define SPDY_BUG_V2 SPDY_BUG_V2_IMPL #define SPDY_BUG_IF_V2 SPDY_BUG_IF_V2_IMPL #define FLAGS_spdy_always_log_bugs_for_tests \ FLAGS_spdy_always_log_bugs_for_tests_impl #endif // QUICHE_SPDY_PLATFORM_API_SPDY_BUG_TRACKER_H_
Modify old-style derived GFE_BUG macros to have IDs.
Modify old-style derived GFE_BUG macros to have IDs. Usage of the macros was replaced by V2 set of macros. Context: go/gfe-bug-improvements. Now that everything was migrated to V2, we are updating V1 macros and will updated everything back to drop the V2 suffix. GFE_BUG macros were changed in cl/362922435 SPDY_BUG macros were changed in cl/363160900, but one was missed. This CL corrects it. PiperOrigin-RevId: 363240499 Change-Id: I77b4932e8e47bfef2f34000c0f5984e0a3b6ce45
C
bsd-3-clause
google/quiche,google/quiche,google/quiche,google/quiche
264e4c4d0199d1955ea0852c86b10a58bb234cce
src/uri_judge/begginer/1012_area.c
src/uri_judge/begginer/1012_area.c
/* https://www.urionlinejudge.com.br/judge/en/problems/view/1012 */ #include <stdio.h> int main(){ const double PI = 3.14159; double a, b, c; scanf("%lf %lf %lf", &a, &b, &c); /* the area of the rectangled triangle that has base A and height C A = (base * height) / 2 */ printf("TRIANGULO = %.3lf\n", (a*c)/2); /* the area of the radius's circle C. (pi = 3.14159) A = PI * radius */ printf("CIRCULO = %.3lf\n", PI*c*c); /* the area of the trapezium which has A and B by base, and C by height A = ((larger base + minor base) * height) / 2 */ printf("TRAPEZIO = %.3lf\n", ((a+b)*c)/2); /* the area of ​​the square that has side B A = side^2 */ printf("QUADRADO = %.3lf\n", b*b); /* the area of the rectangle that has sides A and B A = base * height */ printf("RETANGULO = %.3lf\n", a*b); return 0; }
/* https://www.urionlinejudge.com.br/judge/en/problems/view/1012 */ #include <stdio.h> int main(){ const double PI = 3.14159; double a, b, c; scanf("%lf %lf %lf", &a, &b, &c); /* the area of the rectangled triangle that has base A and height C A = (base * height) / 2 */ printf("TRIANGULO: %.3lf\n", (a*c)/2); /* the area of the radius's circle C. (pi = 3.14159) A = PI * radius */ printf("CIRCULO: %.3lf\n", PI*c*c); /* the area of the trapezium which has A and B by base, and C by height A = ((larger base + minor base) * height) / 2 */ printf("TRAPEZIO: %.3lf\n", ((a+b)*c)/2); /* the area of ​​the square that has side B A = side^2 */ printf("QUADRADO: %.3lf\n", b*b); /* the area of the rectangle that has sides A and B A = base * height */ printf("RETANGULO: %.3lf\n", a*b); return 0; }
Update 1012 (Fix a typo)
Update 1012 (Fix a typo) : instead of =
C
unknown
Mazuh/Algs,Mazuh/Algs,Mazuh/MISC-Algs,Mazuh/Algs,Mazuh/MISC-Algs,Mazuh/Algs,Mazuh/MISC-Algs,Mazuh/MISC-Algs,Mazuh/Algs
43c7a45566e6df0bcde37dca4d5d11f68330e833
ObjectiveRocks/RocksDBPlainTableOptions.h
ObjectiveRocks/RocksDBPlainTableOptions.h
// // RocksDBPlainTableOptions.h // ObjectiveRocks // // Created by Iska on 04/01/15. // Copyright (c) 2015 BrainCookie. All rights reserved. // #import <Foundation/Foundation.h> typedef NS_ENUM(char, PlainTableEncodingType) { PlainTableEncodingPlain, PlainTableEncodingPrefix }; @interface RocksDBPlainTableOptions : NSObject @property (nonatomic, assign) uint32_t userKeyLen; @property (nonatomic, assign) int bloomBitsPerKey; @property (nonatomic, assign) double hashTableRatio; @property (nonatomic, assign) size_t indexSparseness; @property (nonatomic, assign) size_t hugePageTlbSize; @property (nonatomic, assign) PlainTableEncodingType encodingType; @property (nonatomic, assign) BOOL fullScanMode; @property (nonatomic, assign) BOOL storeIndexInFile; @end
// // RocksDBPlainTableOptions.h // ObjectiveRocks // // Created by Iska on 04/01/15. // Copyright (c) 2015 BrainCookie. All rights reserved. // #import <Foundation/Foundation.h> typedef NS_ENUM(char, PlainTableEncodingType) { PlainTableEncodingPlain, PlainTableEncodingPrefix }; @interface RocksDBPlainTableOptions : NSObject /** @brief Plain table has optimization for fix-sized keys, which can be specified via userKeyLen. */ @property (nonatomic, assign) uint32_t userKeyLen; /** @brief The number of bits used for bloom filer per prefix. To disable it pass a zero. */ @property (nonatomic, assign) int bloomBitsPerKey; /** @brief The desired utilization of the hash table used for prefix hashing. `hashTableRatio` = number of prefixes / #buckets in the hash table. */ @property (nonatomic, assign) double hashTableRatio; /** @brief Used to build one index record inside each prefix for the number of keys for the binary search inside each hash bucket. */ @property (nonatomic, assign) size_t indexSparseness; /** @brief Huge page TLB size. The user needs to reserve huge pages for it to be allocated, like: `sysctl -w vm.nr_hugepages=20` */ @property (nonatomic, assign) size_t hugePageTlbSize; /** @brief Encoding type for the keys. The value will determine how to encode keys when writing to a new SST file. */ @property (nonatomic, assign) PlainTableEncodingType encodingType; /** @brief Mode for reading the whole file one record by one without using the index. */ @property (nonatomic, assign) BOOL fullScanMode; /** @brief Compute plain table index and bloom filter during file building and store it in file. When reading file, index will be mmaped instead of recomputation. */ @property (nonatomic, assign) BOOL storeIndexInFile; @end
Add source code documentation for the RocksDB Plain Table Options class
Add source code documentation for the RocksDB Plain Table Options class
C
mit
iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks
79f3caa5fe3a30902951ce6f72a5caca278a46c7
test/Driver/elfiamcu-header-search.c
test/Driver/elfiamcu-header-search.c
// REQUIRES: x86-registered-target // RUN: %clang -target i386-pc-elfiamcu -c -v %s 2>&1 | FileCheck %s // CHECK-NOT: /usr/include // CHECK-NOT: /usr/local/include
// REQUIRES: x86-registered-target // RUN: %clang -target i386-pc-elfiamcu -c -v -fsyntax-only %s 2>&1 | FileCheck %s // CHECK-NOT: /usr/include // CHECK-NOT: /usr/local/include
Add -fsyntax-only to fix failure in read-only directories.
Add -fsyntax-only to fix failure in read-only directories. Internally, this test is executed in a read-only directory, which causes it to fail because the driver tries to generate a file unnecessarily. Adding -fsyntax-only fixes the issue (thanks to Artem Belevich for figuring out the root cause). git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@255809 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,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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
21198b75ca5bb408bd77a54232418b8aef8ce8dc
src/x11-simple.c
src/x11-simple.c
// mruby libraries #include "mruby.h" #include "mruby/array.h" #include "mruby/data.h" #include "mruby/string.h" #include <X11/Xlib.h> mrb_value x11_simple_test(mrb_state* mrb, mrb_value self) { Display *dpy = XOpenDisplay(NULL); Window win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0, 256, 256, 0, 0, 0); XMapWindow(dpy, win); XFlush(dpy); while(1); return mrb_nil_value(); } // initializer void mrb_mruby_x11_simple_gem_init(mrb_state* mrb) { struct RClass* rclass = mrb_define_module(mrb, "X11"); mrb_define_class_method(mrb, rclass, "test", x11_simple_test, ARGS_NONE()); return; } // finalizer void mrb_mruby_x11_simple_gem_final(mrb_state* mrb) { return; }
// mruby libraries #include "mruby.h" #include "mruby/array.h" #include "mruby/data.h" #include "mruby/string.h" #include <X11/Xlib.h> mrb_value x11_simple_test(mrb_state* mrb, mrb_value self) { Display* dpy = XOpenDisplay(NULL); Window* win = mrb_malloc(mrb, sizeof(Window)); *win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0, 256, 256, 0, 0, 0); XMapWindow(dpy, *win); XFlush(dpy); return mrb_fixnum_value((int)win); } // initializer void mrb_mruby_x11_simple_gem_init(mrb_state* mrb) { struct RClass* rclass = mrb_define_module(mrb, "X11"); mrb_define_class_method(mrb, rclass, "test", x11_simple_test, ARGS_NONE()); return; } // finalizer void mrb_mruby_x11_simple_gem_final(mrb_state* mrb) { return; }
Return an adress of Window object.
Return an adress of Window object.
C
mit
dyama/mruby-x11-simple,dyama/mruby-x11-simple
18b04d4b62673f6da70d845a8904096e422acb20
src/plugins/qmldesigner/designercore/filemanager/qmlwarningdialog.h
src/plugins/qmldesigner/designercore/filemanager/qmlwarningdialog.h
#ifndef QMLWARNINGDIALOG_H #define QMLWARNINGDIALOG_H #include <QDialog> namespace Ui { class QmlWarningDialog; } namespace QmlDesigner { namespace Internal { class QmlWarningDialog : public QDialog { Q_OBJECT public: explicit QmlWarningDialog(QWidget *parent, const QStringList &warnings); ~QmlWarningDialog(); bool warningsEnabled() const; public slots: void ignoreButtonPressed(); void okButtonPressed(); void checkBoxToggled(bool); void linkClicked(const QString &link); private: Ui::QmlWarningDialog *ui; const QStringList m_warnings; }; } //Internal } //QmlDesigner #endif // QMLWARNINGDIALOG_H
#ifndef QMLWARNINGDIALOG_H #define QMLWARNINGDIALOG_H #include <QDialog> QT_BEGIN_NAMESPACE namespace Ui { class QmlWarningDialog; } QT_END_NAMESPACE namespace QmlDesigner { namespace Internal { class QmlWarningDialog : public QDialog { Q_OBJECT public: explicit QmlWarningDialog(QWidget *parent, const QStringList &warnings); ~QmlWarningDialog(); bool warningsEnabled() const; public slots: void ignoreButtonPressed(); void okButtonPressed(); void checkBoxToggled(bool); void linkClicked(const QString &link); private: Ui::QmlWarningDialog *ui; const QStringList m_warnings; }; } //Internal } //QmlDesigner #endif // QMLWARNINGDIALOG_H
Fix compilation with namespaced Qt.
QmlDesigner: Fix compilation with namespaced Qt. Change-Id: I4de7ae4391f57f4c7eac4e5e8b057b8365ca42c9 Reviewed-by: Thomas Hartmann <[email protected]>
C
lgpl-2.1
amyvmiwei/qt-creator,kuba1/qtcreator,omniacreator/qtcreator,Distrotech/qtcreator,martyone/sailfish-qtcreator,xianian/qt-creator,colede/qtcreator,maui-packages/qt-creator,amyvmiwei/qt-creator,maui-packages/qt-creator,colede/qtcreator,omniacreator/qtcreator,martyone/sailfish-qtcreator,farseerri/git_code,omniacreator/qtcreator,AltarBeastiful/qt-creator,xianian/qt-creator,farseerri/git_code,amyvmiwei/qt-creator,omniacreator/qtcreator,duythanhphan/qt-creator,martyone/sailfish-qtcreator,farseerri/git_code,danimo/qt-creator,xianian/qt-creator,xianian/qt-creator,richardmg/qtcreator,farseerri/git_code,kuba1/qtcreator,Distrotech/qtcreator,AltarBeastiful/qt-creator,AltarBeastiful/qt-creator,darksylinc/qt-creator,malikcjm/qtcreator,kuba1/qtcreator,kuba1/qtcreator,danimo/qt-creator,AltarBeastiful/qt-creator,colede/qtcreator,duythanhphan/qt-creator,AltarBeastiful/qt-creator,malikcjm/qtcreator,duythanhphan/qt-creator,martyone/sailfish-qtcreator,AltarBeastiful/qt-creator,omniacreator/qtcreator,Distrotech/qtcreator,darksylinc/qt-creator,duythanhphan/qt-creator,maui-packages/qt-creator,kuba1/qtcreator,kuba1/qtcreator,duythanhphan/qt-creator,kuba1/qtcreator,martyone/sailfish-qtcreator,maui-packages/qt-creator,farseerri/git_code,amyvmiwei/qt-creator,xianian/qt-creator,darksylinc/qt-creator,darksylinc/qt-creator,martyone/sailfish-qtcreator,darksylinc/qt-creator,xianian/qt-creator,AltarBeastiful/qt-creator,Distrotech/qtcreator,danimo/qt-creator,danimo/qt-creator,danimo/qt-creator,maui-packages/qt-creator,malikcjm/qtcreator,richardmg/qtcreator,omniacreator/qtcreator,darksylinc/qt-creator,Distrotech/qtcreator,farseerri/git_code,martyone/sailfish-qtcreator,maui-packages/qt-creator,colede/qtcreator,duythanhphan/qt-creator,richardmg/qtcreator,amyvmiwei/qt-creator,darksylinc/qt-creator,AltarBeastiful/qt-creator,xianian/qt-creator,kuba1/qtcreator,richardmg/qtcreator,amyvmiwei/qt-creator,malikcjm/qtcreator,colede/qtcreator,xianian/qt-creator,amyvmiwei/qt-creator,farseerri/git_code,colede/qtcreator,danimo/qt-creator,malikcjm/qtcreator,colede/qtcreator,Distrotech/qtcreator,darksylinc/qt-creator,amyvmiwei/qt-creator,danimo/qt-creator,duythanhphan/qt-creator,richardmg/qtcreator,maui-packages/qt-creator,richardmg/qtcreator,malikcjm/qtcreator,danimo/qt-creator,martyone/sailfish-qtcreator,richardmg/qtcreator,danimo/qt-creator,omniacreator/qtcreator,malikcjm/qtcreator,farseerri/git_code,kuba1/qtcreator,xianian/qt-creator,martyone/sailfish-qtcreator,Distrotech/qtcreator
559165da4052bd5df6e4635182ee9429b5221fd0
core/privatepointer.h
core/privatepointer.h
/* * This file is part of the Gluon Development Platform * Copyright (c) 2014 Arjen Hiemstra <[email protected]> * * 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifndef GLUONCORE_PRIVATEPOINTER_H #define GLUONCORE_PRIVATEPOINTER_H #include <memory> namespace GluonCore { template < typename T > class PrivatePointer { public: PrivatePointer() : p{ new T{} } { } template < typename... Args > explicit PrivatePointer( Args&& ... args ) : p{ std::forward< Args >( args ) ... } { } PrivatePointer( const PrivatePointer< T >&& other ) { p = other.p; } PrivatePointer< T >& operator=( const PrivatePointer< T >&& other ) { p = other.p; return *this; } inline const T* operator->() const { return p.get(); } inline T* operator->() { return p.get(); } private: std::unique_ptr< T > p; }; } #define GLUON_PRIVATE_POINTER \ private:\ class Private;\ GluonCore::PrivatePointer< Private > d; #endif //GLUONCORE_PRIVATEPOINTER_H
Add a convenience template for private pointers.
core: Add a convenience template for private pointers.
C
lgpl-2.1
KDE/gluon,KDE/gluon,KDE/gluon,KDE/gluon
db648cdab35a2a72efa23bc4c417225f09e9d511
stm32f1-nrf24l01-transmitter/firmware/protocol_hk310.c
stm32f1-nrf24l01-transmitter/firmware/protocol_hk310.c
#include <systick.h> #include <protocol_hk310.h> #define FRAME_TIME 5 // 1 frame every 5 ms // **************************************************************************** static void protocol_frame_callback(void) { systick_set_callback(protocol_frame_callback, FRAME_TIME); } // **************************************************************************** void init_protocol_hk310(void) { systick_set_callback(protocol_frame_callback, FRAME_TIME); }
#include <systick.h> #include <protocol_hk310.h> #define FRAME_TIME 5 // One frame every 5 ms typedef enum { SEND_STICK1 = 0, SEND_STICK2, SEND_BIND_INFO, SEND_PROGRAMBOX } frame_state_t; static frame_state_t frame_state; // **************************************************************************** static void send_stick_data(void) { } // **************************************************************************** static void send_binding_data(void) { } // **************************************************************************** static void send_programming_box_data(void) { } // **************************************************************************** static void nrf_transmit_done_callback(void) { switch (frame_state) { case SEND_STICK1: send_stick_data(); frame_state = SEND_BIND_INFO; break; case SEND_STICK2: send_stick_data(); frame_state = SEND_BIND_INFO; break; case SEND_BIND_INFO: send_binding_data(); frame_state = SEND_PROGRAMBOX; break; case SEND_PROGRAMBOX: send_programming_box_data(); frame_state = SEND_STICK1; break; default: break; } } // **************************************************************************** static void protocol_frame_callback(void) { systick_set_callback(protocol_frame_callback, FRAME_TIME); frame_state = SEND_STICK1; nrf_transmit_done_callback(); } // **************************************************************************** void init_protocol_hk310(void) { systick_set_callback(protocol_frame_callback, FRAME_TIME); }
Build skeleton for nRF frames
Build skeleton for nRF frames
C
unlicense
laneboysrc/nrf24l01-rc,laneboysrc/nrf24l01-rc,laneboysrc/nrf24l01-rc
09b3de7c00db1e4ec464e50a6459352be4b610d1
src/WalkerException.h
src/WalkerException.h
#ifndef _WALKEREXCEPTION_H #define _WALKEREXCEPTION_H #include <string> //! (base) class for exceptions in uvok/WikiWalker class WalkerException : public std::exception { public: /*! Create a Walker exception with a message. * * Message might be shown on exception occurring, depending on * the compiler. * * \param exmessage The exception message. */ WalkerException(std::string exmessage) : message(exmessage) {} virtual ~WalkerException() throw() {} //! get exception message const char* what() const throw() { return message.c_str(); } private: std::string message; }; #endif // _WALKEREXCEPTION_H
#ifndef _WALKEREXCEPTION_H #define _WALKEREXCEPTION_H #include <string> //! (base) class for exceptions in uvok/WikiWalker class WalkerException : public std::exception { public: /*! Create a Walker exception with a message. * * Message might be shown on exception occurring, depending on * the compiler. * * \param exmessage The exception message. */ WalkerException(std::string exmessage) : message(exmessage) {} virtual ~WalkerException() throw() {} //! get exception message const char* what() const noexcept { return message.c_str(); } private: std::string message; }; #endif // _WALKEREXCEPTION_H
Use noexcept insead of throw() for what()
Use noexcept insead of throw() for what()
C
mit
dueringa/WikiWalker
4472010345dc2a46051887669ad2c7c7a6eccc3b
chrome/browser/printing/print_dialog_cloud.h
chrome/browser/printing/print_dialog_cloud.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_PRINTING_PRINT_DIALOG_CLOUD_H_ #define CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_ #include "base/basictypes.h" #include "testing/gtest/include/gtest/gtest_prod.h" class Browser; class FilePath; namespace IPC { class Message; } class PrintDialogCloud { public: // Called on the IO thread. static void CreatePrintDialogForPdf(const FilePath& path_to_pdf); private: FRIEND_TEST(PrintDialogCloudTest, HandlersRegistered); explicit PrintDialogCloud(const FilePath& path_to_pdf); ~PrintDialogCloud(); // Called as a task from the UI thread, creates an object instance // to run the HTML/JS based print dialog for printing through the cloud. static void CreateDialogImpl(const FilePath& path_to_pdf); Browser* browser_; DISALLOW_COPY_AND_ASSIGN(PrintDialogCloud); }; #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_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_PRINTING_PRINT_DIALOG_CLOUD_H_ #define CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_ #include "base/basictypes.h" #include "testing/gtest/include/gtest/gtest_prod.h" class Browser; class FilePath; namespace IPC { class Message; } class PrintDialogCloud { public: // Called on the IO thread. static void CreatePrintDialogForPdf(const FilePath& path_to_pdf); private: FRIEND_TEST(PrintDialogCloudTest, HandlersRegistered); FRIEND_TEST(PrintDialogCloudTest, DISABLED_HandlersRegistered); explicit PrintDialogCloud(const FilePath& path_to_pdf); ~PrintDialogCloud(); // Called as a task from the UI thread, creates an object instance // to run the HTML/JS based print dialog for printing through the cloud. static void CreateDialogImpl(const FilePath& path_to_pdf); Browser* browser_; DISALLOW_COPY_AND_ASSIGN(PrintDialogCloud); }; #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_
Fix the build by updating FRIEND_TEST line.
Fix the build by updating FRIEND_TEST line. TBR=maruel BUG=44547 Review URL: http://codereview.chromium.org/2083013 git-svn-id: http://src.chromium.org/svn/trunk/src@47646 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: b756479cc600c3c5ca9c0ab66c4d59e98afcb34d
C
bsd-3-clause
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser
f846021291546acc3f6899d00c6ca60003baa371
solutions/uri/1019/1019.c
solutions/uri/1019/1019.c
#include <stdio.h> int main() { int t, h = 0, m = 0; while (scanf("%d", &t) != EOF) { if (t >= 60 * 60) { h = t / (60 * 60); t %= (60 * 60); } if (t >= 60) { m = t / 60; t %= 60; } printf("%d:%d:%d\n", h, m, t); h = 0, m = 0; } return 0; }
Solve Time Conversion in c
Solve Time Conversion in c
C
mit
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground
d143e1c7afb2c24af593c36272c6542eb9a3bbc7
raster/buffer_view.h
raster/buffer_view.h
// Raster Library // Copyright (C) 2015 David Capello #ifndef RASTER_BUFFER_VIEW_INCLUDED_H #define RASTER_BUFFER_VIEW_INCLUDED_H #pragma once #include <cassert> #include <cstdint> #include <vector> #include "raster/image_spec.h" namespace raster { // Wrapper for an array of bytes. It doesn't own the data. class buffer_view { public: typedef uint8_t value_type; typedef value_type* pointer; typedef value_type& reference; buffer_view(size_t size, pointer data) : m_size(size) , m_data(data) { } template<typename T> buffer_view(std::vector<T>& vector) : m_size(vector.size()) , m_data(&vector[0]) { } size_t size() const { return m_size; } pointer begin() { return m_data; } pointer end() { return m_data+m_size; } const pointer begin() const { return m_data; } const pointer end() const { return m_data+m_size; } reference operator[](int i) const { assert(i >= 0 && i < int(m_size)); return m_data[i]; } private: size_t m_size; pointer m_data; }; } // namespace raster #endif
// Raster Library // Copyright (C) 2015-2016 David Capello #ifndef RASTER_BUFFER_VIEW_INCLUDED_H #define RASTER_BUFFER_VIEW_INCLUDED_H #pragma once #include <cassert> #include <cstddef> #include <cstdint> #include <vector> #include "raster/image_spec.h" namespace raster { // Wrapper for an array of bytes. It doesn't own the data. class buffer_view { public: typedef std::uint8_t value_type; typedef value_type* pointer; typedef value_type& reference; buffer_view(std::size_t size, pointer data) : m_size(size) , m_data(data) { } template<typename T> buffer_view(std::vector<T>& vector) : m_size(vector.size()) , m_data(&vector[0]) { } std::size_t size() const { return m_size; } pointer begin() { return m_data; } pointer end() { return m_data+m_size; } const pointer begin() const { return m_data; } const pointer end() const { return m_data+m_size; } reference operator[](int i) const { assert(i >= 0 && i < int(m_size)); return m_data[i]; } private: size_t m_size; pointer m_data; }; } // namespace raster #endif
Add std:: namespace to int types
Add std:: namespace to int types
C
mit
aseprite/raster,dacap/raster,dacap/raster,aseprite/raster
9efcb0413e4a7e59b83862d9a58c267ad8bb5d23
Behaviors/GoBackward.h
Behaviors/GoBackward.h
/* * GoBackward.h * * Created on: Mar 25, 2014 * Author: user */ #ifndef GOBACKWARD_H_ #define GOBACKWARD_H_ #include "Behavior.h" #include "../Robot.h" class GoBackward: public Behavior { public: GoBackward(Robot* robot); bool startCondition(); bool stopCondition(); void action(); virtual ~GoBackward(); }; #endif /* GOBACKWARD_H_ */
/* * GoBackward.h * * Created on: Mar 25, 2014 * Author: user */ #ifndef GOBACKWARD_H_ #define GOBACKWARD_H_ #include "Behavior.h" #include "../Robot.h" class GoBackward: public Behavior { public: GoBackward(Robot* robot); bool startCondition(); bool stopCondition(); void action(); virtual ~GoBackward(); private: int _steps_count; }; #endif /* GOBACKWARD_H_ */
Add logic to this behavior
Add logic to this behavior
C
apache-2.0
Jossef/robotics,Jossef/robotics
ec09e905db4bf5698c7c8bde2a41013c428f4308
phraser/cc/analysis/analysis_options.h
phraser/cc/analysis/analysis_options.h
#ifndef CC_ANALYSIS_ANALYSIS_OPTIONS_H_ #define CC_ANALYSIS_ANALYSIS_OPTIONS_H_ #include <cstddef> struct AnalysisOptions { AnalysisOptions() : track_index_translation(true), destutter_max_consecutive(3), track_chr2drop(true), replace_html_entities(true) {} // General flags: // * Map tokens to spans in the original text. bool track_index_translations; // Preprocessing flags: // * Maximum number of consecutive code points before we start dropping them. // * Whether to keep track of code point drop counts from destuttering. size_t destutter_max_consecutive; bool track_chr2drop; // Tokenization flags: // * Whether to replace HTML entities in the text with their Unicode // equivalents. bool replace_html_entities; }; #endif // CC_ANALYSIS_ANALYSIS_OPTIONS_H_
#ifndef CC_ANALYSIS_ANALYSIS_OPTIONS_H_ #define CC_ANALYSIS_ANALYSIS_OPTIONS_H_ #include <cstddef> struct AnalysisOptions { AnalysisOptions() : destutter_max_consecutive(3), replace_html_entities(true) {} // Preprocessing flags: // * Maximum number of consecutive code points before we start dropping them. size_t destutter_max_consecutive; // Tokenization flags: // * Whether to replace HTML entities in the text with their Unicode // equivalents. bool replace_html_entities; }; #endif // CC_ANALYSIS_ANALYSIS_OPTIONS_H_
Remove them. Deal with them later if perf is actually an issue here.
Remove them. Deal with them later if perf is actually an issue here.
C
mit
escherba/phraser,knighton/phraser,escherba/phraser,escherba/phraser,knighton/phraser,knighton/phraser,knighton/phraser,escherba/phraser
14d3966cf69de96f4a25b0f4ffb462d51b3b2112
tests/error/0018-voidparam.c
tests/error/0018-voidparam.c
int foo(void, int x) { return 0; } int main() { return foo(); }
int a(void, int i) { return 0; } int b(int i, void) { return 0; } int c(void, void) { return 0; } int d(void, ...) { return 0; } int main() { return 0; }
Improve error test for void parameter
[tests] Improve error test for void parameter
C
isc
k0gaMSX/scc,k0gaMSX/scc,k0gaMSX/scc
05a3ffb6b93cf390f5401511184303a419de3cbf
src/thermal_config.h
src/thermal_config.h
#ifndef THERMALCONFIG_H #define THERMALCONFIG_H #ifndef M_PI const double M_PI = 3.141592653; #endif const double T0 = 273.15; // [C] const double R_TSV = 5e-6; // [m] /* Thermal conductance */ const double Ksi = 148.0; // Silicon const double Kcu = 401.0; // Copper const double Kin = 1.5; // insulator const double Khs = 2.0; // Heat sink /* Thermal capacitance */ const double Csi = 1.66e6; // Silicon const double Ccu = 3.2e6; // Copper const double Cin = 1.65e6; // insulator const double Chs = 2.42e6; // Heat sink /* Layer Hight */ const double Hsi = 400e-6; // Silicon const double Hcu = 5e-6; // Copper const double Hin = 20e-6; // Insulator const double Hhs = 1000e-6; // Heat sink #endif
#ifndef THERMALCONFIG_H #define THERMALCONFIG_H #ifndef M_PI const double M_PI = 3.141592653; #endif const double T0 = 273.15; // [C] const double R_TSV = 5e-6; // [m] /* Thermal conductance */ const double Ksi = 148.0; // Silicon const double Kcu = 401.0; // Copper const double Kin = 1.5; // insulator const double Khs = 4.0; // Heat sink /* Thermal capacitance */ const double Csi = 1.66e6; // Silicon const double Ccu = 3.2e6; // Copper const double Cin = 1.65e6; // insulator const double Chs = 2.42e6; // Heat sink /* Layer Hight */ const double Hsi = 400e-6; // Silicon const double Hcu = 5e-6; // Copper const double Hin = 20e-6; // Insulator const double Hhs = 1000e-6; // Heat sink #endif
Change default khs to 4
Change default khs to 4
C
mit
umd-memsys/DRAMsim3,umd-memsys/DRAMsim3,umd-memsys/DRAMsim3
8def6e83038b43b798a935edab9d77476ec47372
test/Sema/attr-weak.c
test/Sema/attr-weak.c
// RUN: %clang_cc1 -verify -fsyntax-only %s extern int g0 __attribute__((weak)); extern int g1 __attribute__((weak_import)); int g2 __attribute__((weak)); int g3 __attribute__((weak_import)); // expected-warning {{'weak_import' attribute cannot be specified on a definition}} int __attribute__((weak_import)) g4(void); void __attribute__((weak_import)) g5(void) { } struct __attribute__((weak)) s0 {}; // expected-warning {{'weak' attribute only applies to variables, functions, and classes}} struct __attribute__((weak_import)) s1 {}; // expected-warning {{'weak_import' attribute only applies to variables and functions}} static int x __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage}} // rdar://9538608 int C; // expected-note {{previous definition is here}} extern int C __attribute__((weak_import)); // expected-warning {{an already-declared variable is made a weak_import declaration}} static int pr14946_x; extern int pr14946_x __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage}} static void pr14946_f(); void pr14946_f() __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage}}
// RUN: %clang_cc1 -verify -fsyntax-only %s extern int f0() __attribute__((weak)); extern int g0 __attribute__((weak)); extern int g1 __attribute__((weak_import)); int f2() __attribute__((weak)); int g2 __attribute__((weak)); int g3 __attribute__((weak_import)); // expected-warning {{'weak_import' attribute cannot be specified on a definition}} int __attribute__((weak_import)) g4(void); void __attribute__((weak_import)) g5(void) { } struct __attribute__((weak)) s0 {}; // expected-warning {{'weak' attribute only applies to variables, functions, and classes}} struct __attribute__((weak_import)) s1 {}; // expected-warning {{'weak_import' attribute only applies to variables and functions}} static int f() __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage}} static int x __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage}} // rdar://9538608 int C; // expected-note {{previous definition is here}} extern int C __attribute__((weak_import)); // expected-warning {{an already-declared variable is made a weak_import declaration}} static int pr14946_x; extern int pr14946_x __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage}} static void pr14946_f(); void pr14946_f() __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage}}
Add tests for weak functions
[Sema] Add tests for weak functions I found these checks to be missing, just add some simple cases. Differential Revision: https://reviews.llvm.org/D47200 git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@333283 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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
e2c7691081b857651a031bf66e42dc1735d6b0a4
src/tests/express_tests.h
src/tests/express_tests.h
/** * \file express_tests.h * \date Jul 4, 2009 * \author anton * \details */ #ifndef EXPRESS_TESTS_H_ #define EXPRESS_TESTS_H_ typedef struct _EXPRESS_TEST_DESCRIPTOR { const char *name; int (*exec)(); } EXPRESS_TEST_DESCRIPTOR; #define REGISTER_EXPRESS_TEST(descr) static void _register_express_test(){ \ __asm__( \ ".section .express_tests\n\t" \ ".word %0\n\t" \ ".text\n" \ : :"i"(&descr)); \ } #define DECLARE_EXPRESS_TEST(name, exec) \ static int exec(); \ static const EXPRESS_TEST_DESCRIPTOR _descriptor = { name, exec }; \ REGISTER_EXPRESS_TEST(_descriptor); int express_tests_execute(); #endif /* EXPRESS_TESTS_H_ */
/** * \file express_tests.h * \date Jul 4, 2009 * \author anton * \details */ #ifndef EXPRESS_TESTS_H_ #define EXPRESS_TESTS_H_ typedef struct _EXPRESS_TEST_DESCRIPTOR { const char *name; int (*exec)(); } EXPRESS_TEST_DESCRIPTOR; /* #define REGISTER_EXPRESS_TEST(descr) static void _register_express_test(){ \ __asm__( \ ".section .express_tests\n\t" \ ".word %0\n\t" \ ".text\n" \ : :"i"(&descr)); \ } #define DECLARE_EXPRESS_TEST(name, exec) \ static int exec(); \ static const EXPRESS_TEST_DESCRIPTOR _descriptor = { name, exec }; \ REGISTER_EXPRESS_TEST(_descriptor); */ #define DECLARE_EXPRESS_TEST(name, exec) \ static int exec(); \ static const EXPRESS_TEST_DESCRIPTOR _descriptor = { name, exec }; \ static const EXPRESS_TEST_DESCRIPTOR *_pdescriptor __attribute__ ((section(".express_tests"))) = &_descriptor; int express_tests_execute(); #endif /* EXPRESS_TESTS_H_ */
Change declaration express test macros
Change declaration express test macros
C
bsd-2-clause
vrxfile/embox-trik,vrxfile/embox-trik,vrxfile/embox-trik,Kefir0192/embox,Kefir0192/embox,embox/embox,Kakadu/embox,vrxfile/embox-trik,abusalimov/embox,Kefir0192/embox,mike2390/embox,mike2390/embox,gzoom13/embox,Kakadu/embox,gzoom13/embox,Kakadu/embox,Kakadu/embox,Kakadu/embox,abusalimov/embox,mike2390/embox,abusalimov/embox,vrxfile/embox-trik,embox/embox,mike2390/embox,Kakadu/embox,abusalimov/embox,abusalimov/embox,embox/embox,gzoom13/embox,mike2390/embox,gzoom13/embox,Kefir0192/embox,Kefir0192/embox,abusalimov/embox,Kefir0192/embox,gzoom13/embox,vrxfile/embox-trik,mike2390/embox,gzoom13/embox,embox/embox,vrxfile/embox-trik,embox/embox,Kakadu/embox,gzoom13/embox,embox/embox,mike2390/embox,Kefir0192/embox
1d038914e5659449cdf265169860766292a8bc93
test/CodeGen/statements.c
test/CodeGen/statements.c
// RUN: rm -f %S/statements.ll // RUN: %clang_cc1 -Wreturn-type %s -emit-llvm-only void test1(int x) { switch (x) { case 111111111111111111111111111111111111111: bar(); } } // Mismatched type between return and function result. int test2() { return; } void test3() { return 4; } void test4() { bar: baz: blong: bing: ; // PR5131 static long x = &&bar - &&baz; static long y = &&baz; &&bing; &&blong; if (y) goto *y; goto *x; } // PR3869 int test5(long long b) { static void *lbls[] = { &&lbl }; goto *b; lbl: return 0; }
// RUN: %clang_cc1 -Wreturn-type %s -emit-llvm-only void test1(int x) { switch (x) { case 111111111111111111111111111111111111111: bar(); } } // Mismatched type between return and function result. int test2() { return; } void test3() { return 4; } void test4() { bar: baz: blong: bing: ; // PR5131 static long x = &&bar - &&baz; static long y = &&baz; &&bing; &&blong; if (y) goto *y; goto *x; } // PR3869 int test5(long long b) { static void *lbls[] = { &&lbl }; goto *b; lbl: return 0; }
Revert "Clean up in buildbot directories."
Revert "Clean up in buildbot directories." This reverts commit 113814. This patch was never intended to stay in the repository. If you are reading this from the future, we apologize for the noise. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@113990 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
eb90e028623c3e73faed4f1998af265e5ad8c90b
tests/ut_mimrotationanimation/ut_mimrotationanimation.h
tests/ut_mimrotationanimation/ut_mimrotationanimation.h
/* * This file is part of meego-im-framework * * * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * Contact: Nokia Corporation ([email protected]) * * If you have questions regarding the use of this file, please contact * Nokia at [email protected]. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef UT_MIMROTATIONANIMATION_H #define UT_MIMROTATIONANIMATION_H #include <QtTest/QtTest> #include <QObject> class MIMApplication; class Ut_MImRotationAnimation : public QObject { Q_OBJECT private Q_SLOTS: void initTestCase(); void cleanupTestCase(); void testPassthruHiddenDuringRotation(); private: MIMApplication *app; }; #endif // UT_MIMROTATIONANIMATION_H
Add missing header from previous commit
Changes: Add missing header from previous commit
C
lgpl-2.1
jpetersen/framework,sil2100/maliit-framework,sil2100/maliit-framework,RHawkeyed/framework,RHawkeyed/framework,sil2100/maliit-framework,jpetersen/framework,sil2100/maliit-framework,Elleo/framework,binlaten/framework,Elleo/framework
855e7cd9d230f0c2dc1699bdaafc4f5ccf4e968f
src/condor_includes/condor_fix_unistd.h
src/condor_includes/condor_fix_unistd.h
#ifndef FIX_UNISTD_H #define FIX_UNISTD_H #include <unistd.h> /* For some reason the g++ include files on Ultrix 4.3 fail to provide these prototypes, even though the Ultrix 4.2 versions did... Once again, OSF1 also chokes, unless _AES_SOURCE(?) is defined JCP */ #if defined(ULTRIX43) || defined(OSF1) #if defined(__cplusplus) extern "C" { #endif #if defined(__STDC__) || defined(__cplusplus) int symlink( const char *, const char * ); char *sbrk( int ); int gethostname( char *, int ); #else int symlink(); char *sbrk(); int gethostname(); #endif #if defined(__cplusplus) } #endif #endif /* ULTRIX43 */ #endif
#ifndef FIX_UNISTD_H #define FIX_UNISTD_H #include <unistd.h> /* For some reason the g++ include files on Ultrix 4.3 fail to provide these prototypes, even though the Ultrix 4.2 versions did... Once again, OSF1 also chokes, unless _AES_SOURCE(?) is defined JCP */ #if defined(ULTRIX43) || defined(OSF1) #if defined(__cplusplus) extern "C" { #endif #if defined(__STDC__) || defined(__cplusplus) int symlink( const char *, const char * ); void *sbrk( ssize_t ); int gethostname( char *, int ); #else int symlink(); char *sbrk(); int gethostname(); #endif #if defined(__cplusplus) } #endif #endif /* ULTRIX43 */ #endif
Change sbrk() prototype to sensible version with void * and ssize_t.
Change sbrk() prototype to sensible version with void * and ssize_t.
C
apache-2.0
djw8605/condor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,bbockelm/condor-network-accounting,neurodebian/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,zhangzhehust/htcondor,djw8605/condor,clalancette/condor-dcloud,djw8605/condor,djw8605/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,clalancette/condor-dcloud,neurodebian/htcondor,mambelli/osg-bosco-marco,djw8605/htcondor,djw8605/condor,mambelli/osg-bosco-marco,clalancette/condor-dcloud,neurodebian/htcondor,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,clalancette/condor-dcloud,zhangzhehust/htcondor,neurodebian/htcondor,djw8605/htcondor,clalancette/condor-dcloud,djw8605/htcondor,clalancette/condor-dcloud,djw8605/htcondor,djw8605/condor,mambelli/osg-bosco-marco,htcondor/htcondor,neurodebian/htcondor,djw8605/condor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,neurodebian/htcondor,htcondor/htcondor,zhangzhehust/htcondor,htcondor/htcondor,neurodebian/htcondor,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,djw8605/condor,djw8605/condor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,htcondor/htcondor,djw8605/htcondor,djw8605/htcondor,htcondor/htcondor,djw8605/htcondor,djw8605/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,zhangzhehust/htcondor
428473bf2164a5e1c6932ce0fc809b603a70fe41
test/FrontendC/2009-08-11-AsmBlocksComplexJumpTarget.c
test/FrontendC/2009-08-11-AsmBlocksComplexJumpTarget.c
// RUN: %llvmgcc %s -fasm-blocks -S -o - | grep {\\\*1192} // Complicated expression as jump target // XFAIL: * // XTARGET: darwin asm void Method3() { mov eax,[esp+4] jmp [eax+(299-1)*4] }
Test for llvm-gcc patch 78762.
Test for llvm-gcc patch 78762. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@78763 91177308-0d34-0410-b5e6-96231b3b80d8
C
bsd-2-clause
chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap
25b92604e2fcdbcabe747d9e8a51c04608785254
C/check_stack_crowth.c
C/check_stack_crowth.c
// from vim(os_unix.c) /* * Find out if the stack grows upwards or downwards. * "p" points to a variable on the stack of the caller. */ static void check_stack_growth(p) char *p; { int i; stack_grows_downwards = (p > (char *)&i); }
Copy code from vim to check stack grow direction.
[C] Copy code from vim to check stack grow direction.
C
bsd-2-clause
sgkim126/snippets,sgkim126/snippets,sgkim126/snippets,sgkim126/snippets,sgkim126/snippets,sgkim126/snippets,sgkim126/snippets,sgkim126/snippets,sgkim126/snippets,sgkim126/snippets,sgkim126/snippets,sgkim126/snippets
f554e0d35c5063abcb2074af2d1e2b960bee1e00
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
LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot
7f779ba2a37c3c78968c991bc07a90bf7e4d1b53
src/server/helpers.h
src/server/helpers.h
#ifndef HELPERS_H #define HELPERS_H #include <stdlib.h> #include <netdb.h> #include <arpa/inet.h> #include <errno.h> #include <string> #define RCV_SIZE 2 char * get_ip_str(const struct sockaddr *sa, char *s, size_t maxlen); char * addrinfo_to_ip(const addrinfo info, char * ip); void *get_in_addr(const sockaddr *sa); std::string recieveFrom(const int sock, char * buffer); std::string split_message(std::string * key, std::string message); #endif // HELPERS_H
#ifndef HELPERS_H #define HELPERS_H #include <stdlib.h> #include <netdb.h> #include <arpa/inet.h> #include <errno.h> #include <cstring> #include <string> #define RCV_SIZE 2 char * get_ip_str(const struct sockaddr *sa, char *s, size_t maxlen); char * addrinfo_to_ip(const addrinfo info, char * ip); void *get_in_addr(const sockaddr *sa); std::string recieveFrom(const int sock, char * buffer); std::string split_message(std::string * key, std::string message); #endif // HELPERS_H
Fix ‘strncpy’ was not declared in this scope
[code/server] Fix ‘strncpy’ was not declared in this scope
C
mit
C4ptainCrunch/info-f-209,C4ptainCrunch/info-f-209,C4ptainCrunch/info-f-209