commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
1
4.87k
subject
stringlengths
15
778
message
stringlengths
15
8.75k
lang
stringclasses
266 values
license
stringclasses
13 values
repos
stringlengths
5
127k
ae5143868081c97304191a55a4ecc3a390fc77e5
src/MarbleTest.h
src/MarbleTest.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 2004-2007 Torsten Rahn <tackat@kde.org>" // Copyright 2007 Inge Wallin <ingwa@kde.org>" // // // Description: Some Tests for Marble // #ifndef MARBLETEST_H #define MARBLETEST_H namespace Marble { class MarbleWidget; class MarbleTest { public: explicit MarbleTest( MarbleWidget* marbleWidget ); virtual ~MarbleTest(){ } void timeDemo(); /** * @brief load a gpx file and test the for average time, max time, * min time and total time */ void gpsDemo(); private: MarbleWidget *m_marbleWidget; }; } #endif // MARBLETEST_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 2004-2007 Torsten Rahn <tackat@kde.org>" // Copyright 2007 Inge Wallin <ingwa@kde.org>" // // // Description: Some Tests for Marble // #ifndef MARBLETEST_H #define MARBLETEST_H namespace Marble { class MarbleWidget; class MarbleTest { public: explicit MarbleTest( MarbleWidget* marbleWidget ); virtual ~MarbleTest(){ } void timeDemo(); /** * @brief load a gpx file and test average, max, min, and total time */ void gpsDemo(); private: MarbleWidget *m_marbleWidget; }; } #endif // MARBLETEST_H
Fix @brief description by making it on one line instead of two
Fix @brief description by making it on one line instead of two svn path=/trunk/KDE/kdeedu/marble/; revision=879319
C
lgpl-2.1
tucnak/marble,David-Gil/marble-dev,utkuaydin/marble,tzapzoor/marble,tucnak/marble,Earthwings/marble,David-Gil/marble-dev,probonopd/marble,quannt24/marble,AndreiDuma/marble,oberluz/marble,oberluz/marble,oberluz/marble,quannt24/marble,tzapzoor/marble,Earthwings/marble,tzapzoor/marble,AndreiDuma/marble,Earthwings/marble,oberluz/marble,David-Gil/marble-dev,tucnak/marble,rku/marble,adraghici/marble,adraghici/marble,probonopd/marble,probonopd/marble,David-Gil/marble-dev,rku/marble,rku/marble,utkuaydin/marble,rku/marble,utkuaydin/marble,quannt24/marble,adraghici/marble,rku/marble,AndreiDuma/marble,quannt24/marble,tucnak/marble,quannt24/marble,tzapzoor/marble,adraghici/marble,tucnak/marble,utkuaydin/marble,tzapzoor/marble,Earthwings/marble,Earthwings/marble,quannt24/marble,utkuaydin/marble,tzapzoor/marble,Earthwings/marble,AndreiDuma/marble,tucnak/marble,David-Gil/marble-dev,AndreiDuma/marble,oberluz/marble,adraghici/marble,utkuaydin/marble,tzapzoor/marble,David-Gil/marble-dev,rku/marble,probonopd/marble,adraghici/marble,oberluz/marble,probonopd/marble,probonopd/marble,tzapzoor/marble,AndreiDuma/marble,tucnak/marble,quannt24/marble,probonopd/marble
84562bd91c74c00ad7df15ddb0e2ee8e7d8f49ab
src/debugger_global.h
src/debugger_global.h
#ifndef DEBUGGER_PARSER_GLOBAL_H_ #define DEBUGGER_PARSER_GLOBAL_H_ #include "common.h" #include <stdio.h> struct debug_expr { enum expr_type { EXPR_NULL, EXPR_MEM, EXPR_REG } type; int32_t val; }; enum display_type { DISP_NULL, DISP_DEC, DISP_HEX, DISP_INST, DISP_max }; struct debugger_data { struct sim_state *s; ///< simulator state to which we belong void *scanner; void *breakpoints; struct { unsigned savecol; char saveline[LINE_LEN]; } lexstate; struct debug_display { struct debug_display *next; struct debug_expr expr; int fmt; } *displays; int displays_count; struct debug_cmd { enum { CMD_NULL, CMD_CONTINUE, CMD_DELETE_BREAKPOINT, CMD_DISPLAY, CMD_GET_INFO, CMD_PRINT, CMD_SET_BREAKPOINT, CMD_STEP_INSTRUCTION, CMD_QUIT, CMD_max } code; struct { struct debug_expr expr; int fmt; ///< print / display format character char str[LINE_LEN]; } arg; } cmd; }; int tdbg_parse(struct debugger_data *); int tdbg_prompt(struct debugger_data *dd, FILE *where); #endif
#ifndef DEBUGGER_PARSER_GLOBAL_H_ #define DEBUGGER_PARSER_GLOBAL_H_ #include "common.h" #include <stdint.h> #include <stdio.h> struct debug_expr { enum expr_type { EXPR_NULL, EXPR_MEM, EXPR_REG } type; int32_t val; }; enum display_type { DISP_NULL, DISP_DEC, DISP_HEX, DISP_INST, DISP_max }; struct debugger_data { struct sim_state *s; ///< simulator state to which we belong void *scanner; void *breakpoints; struct { unsigned savecol; char saveline[LINE_LEN]; } lexstate; struct debug_display { struct debug_display *next; struct debug_expr expr; int fmt; } *displays; int displays_count; struct debug_cmd { enum { CMD_NULL, CMD_CONTINUE, CMD_DELETE_BREAKPOINT, CMD_DISPLAY, CMD_GET_INFO, CMD_PRINT, CMD_SET_BREAKPOINT, CMD_STEP_INSTRUCTION, CMD_QUIT, CMD_max } code; struct { struct debug_expr expr; int fmt; ///< print / display format character char str[LINE_LEN]; } arg; } cmd; }; int tdbg_parse(struct debugger_data *); int tdbg_prompt(struct debugger_data *dd, FILE *where); #endif
Mend missing reference to stdint
Mend missing reference to stdint
C
mit
kulp/tenyr,kulp/tenyr,kulp/tenyr
970d2e0a24d25f61ba31eee9575f73f48dd1102d
src/debugger/utils.h
src/debugger/utils.h
/* * Copyright 2006-2008 The FLWOR Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef ZORBA_DEBUGGER_UTILS #define ZORBA_DEBUGGER_UTILS namespace zorba { template<class T> class ZorbaArrayAutoPointer { private: T* thePtr; public: ZorbaArrayAutoPointer(): thePtr(0){} ZorbaArrayAutoPointer(T *aPtr): thePtr(aPtr){} ~ZorbaArrayAutoPointer() { delete[] thePtr; } void reset(T *aPtr) { T* lPtr = thePtr; thePtr = aPtr; delete[] lPtr; } T* get() { return thePtr; } T* release() { T* lPtr = thePtr; thePtr = 0; return lPtr; } }; }//end of namespace #endif
/* * Copyright 2006-2008 The FLWOR Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef ZORBA_DEBUGGER_UTILS_H #define ZORBA_DEBUGGER_UTILS_H namespace zorba { template<class T> class ZorbaArrayAutoPointer { private: T* thePtr; public: ZorbaArrayAutoPointer(): thePtr(0){} explicit ZorbaArrayAutoPointer(T *aPtr): thePtr(aPtr){} ~ZorbaArrayAutoPointer() { if(thePtr != 0) { delete[] thePtr; } } void reset(T *aPtr) { T* lPtr = thePtr; thePtr = aPtr; if(thePtr != 0) { delete[] lPtr; } } T* get() const { return thePtr; } T* release() { T* lPtr = thePtr; thePtr = 0; return lPtr; } T operator[](unsigned int anIndex) const { return thePtr[anIndex]; } }; }//end of namespace #endif
Add [] operator. Fix potential memory errors.
Add [] operator. Fix potential memory errors.
C
apache-2.0
bgarrels/zorba,bgarrels/zorba,bgarrels/zorba,28msec/zorba,bgarrels/zorba,cezarfx/zorba,cezarfx/zorba,28msec/zorba,cezarfx/zorba,cezarfx/zorba,28msec/zorba,bgarrels/zorba,bgarrels/zorba,28msec/zorba,cezarfx/zorba,cezarfx/zorba,cezarfx/zorba,28msec/zorba,bgarrels/zorba,28msec/zorba,28msec/zorba,cezarfx/zorba,bgarrels/zorba,cezarfx/zorba,cezarfx/zorba,28msec/zorba,28msec/zorba
951007303bdf13ef0f50de7e1b84b766c682e5d3
alura/c/adivinhacao.c
alura/c/adivinhacao.c
#include <stdio.h> int main() { // imprime o cabecalho do nosso jogo printf("******************************************\n"); printf("* Bem vindo ao nosso jogo de adivinhação *\n"); printf("******************************************\n"); int numerosecreto = 42; printf("O número %d é o secreto. Não conta pra ninguém!\n", numerosecreto); }
#include <stdio.h> int main() { // imprime o cabecalho do nosso jogo printf("******************************************\n"); printf("* Bem vindo ao nosso jogo de adivinhação *\n"); printf("******************************************\n"); int numerosecreto = 42; int chute; printf("Qual é o seu chute? "); scanf("%d", &chute); printf("Seu chute foi %d", chute); }
Update file, Alura, Introdução a C, Aula 1.5
Update file, Alura, Introdução a C, Aula 1.5
C
mit
fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs
5ac661e80c92e90ae0ed8ba658570db8f76e8490
modules/acct_rtcp_hep/_acct_rtcp_hep_config.h
modules/acct_rtcp_hep/_acct_rtcp_hep_config.h
static struct hep_ctx ctx = { .initfails = 0, .hints = {{ 0 }}, .capt_host = "10.0.0.1", .capt_port = "9060", .capt_id = 101, .hep_version = 3, .usessl = 0, .pl_compress = 0, .sendPacketsCount = 0 };
static struct hep_ctx ctx = { .initfails = 0, .hints = {{ 0 }}, .capt_host = "10.0.0.1", .capt_port = "9060", .hints = {{ .ai_socktype = SOCK_DGRAM }}, .capt_id = 101, .hep_version = 3, .usessl = 0, .pl_compress = 0, .sendPacketsCount = 0 };
Add .hints initializer for clarity.
Add .hints initializer for clarity.
C
bsd-2-clause
dsanders11/rtpproxy,sippy/rtpproxy,sippy/rtpproxy,dsanders11/rtpproxy,dsanders11/rtpproxy,sippy/rtpproxy
a8e112272be9d82ba964e4b1694539b4606b2436
test/CodeGen/pointer-signext.c
test/CodeGen/pointer-signext.c
// RUN: %clang_cc1 -triple x86_64-pc-win32 -emit-llvm -O2 -o - %s | FileCheck %s // Under Windows 64, int and long are 32-bits. Make sure pointer math doesn't // cause any sign extensions. // CHECK: [[P:%.*]] = add i64 %param, -8 // CHECK-NEXT: [[Q:%.*]] = inttoptr i64 [[P]] to [[R:%.*\*]] // CHECK-NEXT: {{%.*}} = getelementptr inbounds [[R]] [[Q]], i64 0, i32 0 #define CR(Record, TYPE, Field) \ ((TYPE *) ((unsigned char *) (Record) - (unsigned char *) &(((TYPE *) 0)->Field))) typedef struct _LIST_ENTRY { struct _LIST_ENTRY *ForwardLink; struct _LIST_ENTRY *BackLink; } LIST_ENTRY; typedef struct { unsigned long long Signature; LIST_ENTRY Link; } MEMORY_MAP; int test(unsigned long long param) { LIST_ENTRY *Link; MEMORY_MAP *Entry; Link = (LIST_ENTRY *) param; Entry = CR (Link, MEMORY_MAP, Link); return (int) Entry->Signature; }
// RUN: %clang_cc1 -triple x86_64-pc-win32 -emit-llvm -O2 -o - %s | FileCheck %s // Under Windows 64, int and long are 32-bits. Make sure pointer math doesn't // cause any sign extensions. // CHECK: [[P:%.*]] = add i64 %param, -8 // CHECK-NEXT: [[Q:%.*]] = inttoptr i64 [[P]] to [[R:%.*]]* // CHECK-NEXT: {{%.*}} = getelementptr inbounds [[R]]* [[Q]], i64 0, i32 0 #define CR(Record, TYPE, Field) \ ((TYPE *) ((unsigned char *) (Record) - (unsigned char *) &(((TYPE *) 0)->Field))) typedef struct _LIST_ENTRY { struct _LIST_ENTRY *ForwardLink; struct _LIST_ENTRY *BackLink; } LIST_ENTRY; typedef struct { unsigned long long Signature; LIST_ENTRY Link; } MEMORY_MAP; int test(unsigned long long param) { LIST_ENTRY *Link; MEMORY_MAP *Entry; Link = (LIST_ENTRY *) param; Entry = CR (Link, MEMORY_MAP, Link); return (int) Entry->Signature; }
Adjust test case to be compatible with future changes to explicitly pass the type to getelementptr
Adjust test case to be compatible with future changes to explicitly pass the type to getelementptr git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@229196 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
8035340f994f48b8b5f7c0d382517c3243b58ac3
libpqxx/include/pqxx/util.h
libpqxx/include/pqxx/util.h
/*------------------------------------------------------------------------- * * FILE * pqxx/util.h * * DESCRIPTION * Various utility definitions for libpqxx * * Copyright (c) 2001-2004, Jeroen T. Vermeulen <jtv@xs4all.nl> * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_UTIL_H #define PQXX_UTIL_H #if defined(PQXX_HAVE_CPP_WARNING) #warning "Deprecated libpqxx header included. Use headers without '.h'" #elif defined(PQXX_HAVE_CPP_PRAGMA_MESSAGE) #pragma message("Deprecated libpqxx header included. Use headers without '.h'") #endif #define PQXX_DEPRECATED_HEADERS #include "pqxx/util" #endif
/*------------------------------------------------------------------------- * * FILE * pqxx/util.h * * DESCRIPTION * Various utility definitions for libpqxx * * Copyright (c) 2001-2004, Jeroen T. Vermeulen <jtv@xs4all.nl> * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_UTIL_H #define PQXX_UTIL_H #if !defined(PQXXYES_I_KNOW_DEPRECATED_HEADER) #define PQXXYES_I_KNOW_DEPRECATED_HEADER #if defined(PQXX_HAVE_CPP_WARNING) #warning "Deprecated libpqxx header included. Use headers without '.h'" #elif defined(PQXX_HAVE_CPP_PRAGMA_MESSAGE) #pragma message("Deprecated libpqxx header included. Use headers without '.h'") #endif #endif #define PQXX_DEPRECATED_HEADERS #include "pqxx/util" #endif
Allow suppression of "deprecated header" warning
Allow suppression of "deprecated header" warning
C
bsd-3-clause
jtv/libpqxx,jtv/libpqxx,jtv/libpqxx,jtv/libpqxx
f16b686efbe6bfe50c1fbb3c5b318c279fc16ec0
include/rime/common.h
include/rime/common.h
// // Copyleft RIME Developers // License: GPLv3 // // 2011-03-14 GONG Chen <chen.sst@gmail.com> // #ifndef RIME_COMMON_H_ #define RIME_COMMON_H_ #include <memory> #include <utility> #define BOOST_BIND_NO_PLACEHOLDERS #include <boost/signals2/connection.hpp> #include <boost/signals2/signal.hpp> #ifdef RIME_ENABLE_LOGGING #include <glog/logging.h> #else #include "no_logging.h" #endif // RIME_ENABLE_LOGGGING namespace rime { using boost::signals2::connection; using boost::signals2::signal; using std::unique_ptr; using std::shared_ptr; using std::weak_ptr; template <class A, class B> shared_ptr<A> As(const B& ptr) { return std::dynamic_pointer_cast<A>(ptr); } template <class A, class B> bool Is(const B& ptr) { return bool(As<A, B>(ptr)); } template <class T, class... Args> inline shared_ptr<T> New(Args&&... args) { return std::make_shared<T>(std::forward<Args>(args)...); } } // namespace rime #endif // RIME_COMMON_H_
// // Copyleft RIME Developers // License: GPLv3 // // 2011-03-14 GONG Chen <chen.sst@gmail.com> // #ifndef RIME_COMMON_H_ #define RIME_COMMON_H_ #include <memory> #include <utility> #define BOOST_BIND_NO_PLACEHOLDERS #include <boost/signals2/connection.hpp> #include <boost/signals2/signal.hpp> #ifdef RIME_ENABLE_LOGGING #include <glog/logging.h> #else #include "no_logging.h" #endif // RIME_ENABLE_LOGGING namespace rime { using boost::signals2::connection; using boost::signals2::signal; using std::unique_ptr; using std::shared_ptr; using std::weak_ptr; template <class A, class B> shared_ptr<A> As(const B& ptr) { return std::dynamic_pointer_cast<A>(ptr); } template <class A, class B> bool Is(const B& ptr) { return bool(As<A, B>(ptr)); } template <class T, class... Args> inline shared_ptr<T> New(Args&&... args) { return std::make_shared<T>(std::forward<Args>(args)...); } } // namespace rime #endif // RIME_COMMON_H_
Fix a typo in the comment.
Fix a typo in the comment.
C
bsd-3-clause
kionz/librime,j717273419/librime,kionz/librime,bygloam/librime,rime/librime,rime/librime,jakwings/librime,bygloam/librime,bygloam/librime,j717273419/librime,rwduzhao/librime,Prcuvu/librime,Prcuvu/librime,j717273419/librime,rwduzhao/librime,rwduzhao/librime,kionz/librime,jakwings/librime,Prcuvu/librime,jakwings/librime,Prcuvu/librime,rime/librime,rime/librime,Prcuvu/librime,kionz/librime
67053fa6cd61e995236f77bd525822a80a2b83aa
src/strategies/BasicRoundStrategy.h
src/strategies/BasicRoundStrategy.h
// This program is free software licenced under MIT Licence. You can // find a copy of this licence in LICENCE.txt in the top directory of // source code. // #ifndef BASIC_ROUND_STRATEGY_H_INCLUDED #define BASIC_ROUND_STRATEGY_H_INCLUDED // Project #include "globals.h" #include "RoundStrategy.h" namespace warlightAi { // Fwrd decls class World; class BasicRoundStrategy : public RoundStrategy { public: BasicRoundStrategy(const World &world, int availableArmies); VecOfPairs getDeployments() const; VecOfTuples getAttacks() const; private: VecOfPairs m_deployments; VecOfTuples m_attacks; }; // class BasicRoundStrategy } // namespace warlightAi #endif // BASIC_ROUND_STRATEGY_H_INCLUDED
// This program is free software licenced under MIT Licence. You can // find a copy of this licence in LICENCE.txt in the top directory of // source code. // #ifndef BASIC_ROUND_STRATEGY_H_INCLUDED #define BASIC_ROUND_STRATEGY_H_INCLUDED // Project #include "globals.h" #include "RoundStrategy.h" namespace warlightAi { // Fwrd decls class World; class BasicRoundStrategy : public RoundStrategy { public: BasicRoundStrategy(const World &world, int availableArmies); VecOfPairs getDeployments() const override; VecOfTuples getAttacks() const override; private: VecOfPairs m_deployments; VecOfTuples m_attacks; }; // class BasicRoundStrategy } // namespace warlightAi #endif // BASIC_ROUND_STRATEGY_H_INCLUDED
Add override after overriden methods
Add override after overriden methods
C
mit
calincru/Warlight-AI-Challenge-2-Bot,calincru/Warlight-AI-Challenge-2-Bot
35ae6c5ab2c6945d346a45dedc095dc54f8b8a03
lib/src/downloader/download-query-loader.h
lib/src/downloader/download-query-loader.h
#ifndef DOWNLOAD_QUERY_LOADER_H #define DOWNLOAD_QUERY_LOADER_H #include <QString> class Site; class DownloadQueryImage; class DownloadQueryGroup; class DownloadQueryLoader { public: static bool load(QString path, QList<DownloadQueryImage> &uniques, QList<DownloadQueryGroup> &batchs, QMap<QString, Site*> &sites); static bool save(QString path, QList<DownloadQueryImage> &uniques, QList<DownloadQueryGroup> &batchs); }; #endif // DOWNLOAD_QUERY_LOADER_H
#ifndef DOWNLOAD_QUERY_LOADER_H #define DOWNLOAD_QUERY_LOADER_H #include <QString> #include <QList> #include <QMap> class Site; class DownloadQueryImage; class DownloadQueryGroup; class DownloadQueryLoader { public: static bool load(QString path, QList<DownloadQueryImage> &uniques, QList<DownloadQueryGroup> &batchs, QMap<QString, Site*> &sites); static bool save(QString path, QList<DownloadQueryImage> &uniques, QList<DownloadQueryGroup> &batchs); }; #endif // DOWNLOAD_QUERY_LOADER_H
Include QList and QMap to header file to fix build
Include QList and QMap to header file to fix build
C
apache-2.0
Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber
03c66d522256b7cc8a266625e5f16f4b63b6c303
windows/dirent.h
windows/dirent.h
#ifndef _TOKU_DIRENT_H #define _TOKU_DIRENT_H #if defined(__cplusplus) extern "C" { #endif //The DIR functions do not exist in windows, but the Linux API ends up //just using a wrapper. We might convert these into an toku_os_* type api. enum { DT_UNKNOWN = 0, DT_DIR = 4, DT_REG = 8 }; struct dirent { char d_name[_MAX_PATH]; unsigned char d_type; }; struct __toku_windir; typedef struct __toku_windir DIR; DIR *opendir(const char *name); struct dirent *readdir(DIR *dir); int closedir(DIR *dir); #ifndef NAME_MAX #define NAME_MAX 255 #endif #if defined(__cplusplus) }; #endif #endif
#ifndef _TOKU_DIRENT_H #define _TOKU_DIRENT_H #include "toku_os_types.h" #if defined(__cplusplus) extern "C" { #endif //The DIR functions do not exist in windows, but the Linux API ends up //just using a wrapper. We might convert these into an toku_os_* type api. enum { DT_UNKNOWN = 0, DT_DIR = 4, DT_REG = 8 }; struct dirent { char d_name[_MAX_PATH]; unsigned char d_type; }; struct __toku_windir; typedef struct __toku_windir DIR; DIR *opendir(const char *name); struct dirent *readdir(DIR *dir); int closedir(DIR *dir); #ifndef NAME_MAX #define NAME_MAX 255 #endif #if defined(__cplusplus) }; #endif #endif
Fix broken windows build due to r19902 (merge of 2499d branch)
[t:2499] Fix broken windows build due to r19902 (merge of 2499d branch) git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@19935 c7de825b-a66e-492c-adef-691d508d4ae1
C
lgpl-2.1
ollie314/server,flynn1973/mariadb-aix,natsys/mariadb_10.2,natsys/mariadb_10.2,davidl-zend/zenddbi,natsys/mariadb_10.2,natsys/mariadb_10.2,ollie314/server,ollie314/server,davidl-zend/zenddbi,natsys/mariadb_10.2,natsys/mariadb_10.2,davidl-zend/zenddbi,flynn1973/mariadb-aix,davidl-zend/zenddbi,flynn1973/mariadb-aix,davidl-zend/zenddbi,flynn1973/mariadb-aix,flynn1973/mariadb-aix,slanterns/server,natsys/mariadb_10.2,natsys/mariadb_10.2,ollie314/server,flynn1973/mariadb-aix,flynn1973/mariadb-aix,davidl-zend/zenddbi,ollie314/server,natsys/mariadb_10.2,davidl-zend/zenddbi,ollie314/server,ollie314/server,flynn1973/mariadb-aix,ollie314/server,ollie314/server,davidl-zend/zenddbi,davidl-zend/zenddbi,flynn1973/mariadb-aix,davidl-zend/zenddbi,flynn1973/mariadb-aix,davidl-zend/zenddbi,natsys/mariadb_10.2,ollie314/server,ollie314/server,natsys/mariadb_10.2,flynn1973/mariadb-aix
8c890982a2aa318fcc632ee616e1c5398fa9eb91
Settings/Display.h
Settings/Display.h
#pragma once #include "Tab.h" class Display : public Tab { public: virtual void SaveSettings(); protected: virtual void Initialize(); virtual void LoadSettings(); private: bool OnAnimationChanged(); bool OnAnimationSpin(NMUPDOWN *ud); bool OnCustomCheckChanged(); bool OnPositionChanged(); private: /* Controls: */ Checkbox _onTop; Checkbox _hideFullscreen; ComboBox _position; Label _customX; EditBox _positionX; Label _customY; EditBox _positionY; Checkbox _customDistance; Spinner _edgeSpinner; Label _displayDevLabel; ComboBox _displayDevice; ComboBox _animation; Label _hideDelayLabel; Spinner _hideDelay; Label _hideSpeedLabel; Spinner _hideSpeed; private: /* Strings: */ std::wstring primaryMonitorStr = L"Primary Monitor"; std::wstring allMonitorStr = L"All Monitors"; std::wstring customPositionStr = L"Custom"; std::wstring noAnimStr = L"None"; private: /* Constants: */ const int MIN_EDGE = -65535; const int MAX_EDGE = 65535; const int MIN_MS = USER_TIMER_MINIMUM; const int MAX_MS = 60000; };
#pragma once #include "Tab.h" #include <CommCtrl.h> class Display : public Tab { public: virtual void SaveSettings(); protected: virtual void Initialize(); virtual void LoadSettings(); private: bool OnAnimationChanged(); bool OnAnimationSpin(NMUPDOWN *ud); bool OnCustomCheckChanged(); bool OnPositionChanged(); private: /* Controls: */ Checkbox _onTop; Checkbox _hideFullscreen; ComboBox _position; Label _customX; EditBox _positionX; Label _customY; EditBox _positionY; Checkbox _customDistance; Spinner _edgeSpinner; Label _displayDevLabel; ComboBox _displayDevice; ComboBox _animation; Label _hideDelayLabel; Spinner _hideDelay; Label _hideSpeedLabel; Spinner _hideSpeed; private: /* Strings: */ std::wstring primaryMonitorStr = L"Primary Monitor"; std::wstring allMonitorStr = L"All Monitors"; std::wstring customPositionStr = L"Custom"; std::wstring noAnimStr = L"None"; private: /* Constants: */ const int MIN_EDGE = -65535; const int MAX_EDGE = 65535; const int MIN_MS = USER_TIMER_MINIMUM; const int MAX_MS = 60000; const int ANIM_SPIN_INCREMENT = 100; };
Add constant for spin increment
Add constant for spin increment
C
bsd-2-clause
malensek/3RVX,malensek/3RVX,malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,Soulflare3/3RVX
1f1153dc7087845e1909bae381af106d39c13912
tests/pinocchio/lib.h
tests/pinocchio/lib.h
#include <QtCore/QProcess> #include <QtDBus/QtDBus> #include <QtTest/QtTest> #include <TelepathyQt4/Client/PendingOperation> #include <TelepathyQt4/Constants> #include "tests/lib/test.h" class PinocchioTest : public Test { Q_OBJECT public: PinocchioTest(QObject *parent = 0); virtual ~PinocchioTest(); static inline QLatin1String pinocchioBusName() { return QLatin1String( TELEPATHY_CONNECTION_MANAGER_BUS_NAME_BASE "pinocchio"); } static inline QLatin1String pinocchioObjectPath() { return QLatin1String( TELEPATHY_CONNECTION_MANAGER_OBJECT_PATH_BASE "pinocchio"); } bool waitForPinocchio(uint timeoutMs = 5000); protected: QString mPinocchioPath; QString mPinocchioCtlPath; QProcess mPinocchio; QEventLoop *mLoop; virtual void initTestCaseImpl(); virtual void cleanupTestCaseImpl(); protected Q_SLOTS: void gotNameOwner(QDBusPendingCallWatcher* watcher); void onNameOwnerChanged(const QString&, const QString&, const QString&); };
#include <QtCore/QProcess> #include <QtDBus/QtDBus> #include <QtTest/QtTest> #include <TelepathyQt4/Client/PendingOperation> #include <TelepathyQt4/Constants> #include "tests/lib/test.h" class PinocchioTest : public Test { Q_OBJECT public: PinocchioTest(QObject *parent = 0); virtual ~PinocchioTest(); static inline QLatin1String pinocchioBusName() { return QLatin1String( TELEPATHY_CONNECTION_MANAGER_BUS_NAME_BASE "pinocchio"); } static inline QLatin1String pinocchioObjectPath() { return QLatin1String( TELEPATHY_CONNECTION_MANAGER_OBJECT_PATH_BASE "pinocchio"); } bool waitForPinocchio(uint timeoutMs = 5000); protected: QString mPinocchioPath; QString mPinocchioCtlPath; QProcess mPinocchio; virtual void initTestCaseImpl(); virtual void cleanupTestCaseImpl(); protected Q_SLOTS: void gotNameOwner(QDBusPendingCallWatcher* watcher); void onNameOwnerChanged(const QString&, const QString&, const QString&); };
Remove spurious mLoop member from PinocchioTest
Remove spurious mLoop member from PinocchioTest Having moved mLoop into the parent class, the fact that there's another one here (uninitialized, and used for about half the functions) breaks the tests.
C
lgpl-2.1
TelepathyIM/telepathy-qt,special/telepathy-qt-upstream,tiagosh/telepathy-qt,TelepathyQt/telepathy-qt,anantkamath/telepathy-qt,anantkamath/telepathy-qt,freedesktop-unofficial-mirror/telepathy__telepathy-qt4,tiagosh/telepathy-qt,TelepathyIM/telepathy-qt,freedesktop-unofficial-mirror/telepathy__telepathy-qt,special/telepathy-qt-upstream,TelepathyIM/telepathy-qt,freedesktop-unofficial-mirror/telepathy__telepathy-qt4,special/telepathy-qt-upstream,freedesktop-unofficial-mirror/telepathy__telepathy-qt,TelepathyIM/telepathy-qt,TelepathyQt/telepathy-qt,TelepathyQt/telepathy-qt,detrout/telepathy-qt,TelepathyQt/telepathy-qt,freedesktop-unofficial-mirror/telepathy__telepathy-qt4,detrout/telepathy-qt,detrout/telepathy-qt,freedesktop-unofficial-mirror/telepathy__telepathy-qt,freedesktop-unofficial-mirror/telepathy__telepathy-qt4,tiagosh/telepathy-qt,freedesktop-unofficial-mirror/telepathy__telepathy-qt,anantkamath/telepathy-qt,TelepathyIM/telepathy-qt,tiagosh/telepathy-qt
99b0d43bdf67fc060df5e5b541d72e6e3723a391
chap1/charcount.c
chap1/charcount.c
#include <stdio.h> int main() { long nc = 0; while (getchar() != EOF) { ++nc; } printf("count: %d\n", nc); }
#include <stdio.h> int main() { double nc = 0; for (nc = 0; getchar() != EOF; ++nc) ; printf("count: %f\n", nc); }
Use dirty C tricks to make it smaller
Use dirty C tricks to make it smaller
C
mit
jabocg/theclang
9ff982c1ae369eeb29f416251c63721a9c8738bf
test/CodeGen/2009-06-01-addrofknr.c
test/CodeGen/2009-06-01-addrofknr.c
// RUN: clang-cc %s -o %t -emit-llvm -verify // PR4289 struct funcptr { int (*func)(); }; static int func(f) void *f; { return 0; } int main(int argc, char *argv[]) { struct funcptr fp; fp.func = &func; fp.func = func; return 0; }
// RUN: clang-cc %s -o %t -emit-llvm -verify // PR4289 struct funcptr { int (*func)(); }; static int func(f) void *f; { return 0; } int main(int argc, char *argv[]) { struct funcptr fp; fp.func = &func; fp.func = func; }
Revert this, was a bug in my new warning code, not the test case.
Revert this, was a bug in my new warning code, not the test case. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@76690 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
ebb0c49aa4b45a4778ec270c99b872873d4d37a6
starlight.h
starlight.h
#pragma once #include <string> #if 0 int Stricmp(const char* str1, const char* str2) { int d; while ((d = toupper(*str2) - toupper(*str1)) == 0 && *str1) { str1++; str2++; } return d; } int Strnicmp(const char* str1, const char* str2, int count) { int d = 0; while (count > 0 && (d = toupper(*str2) - toupper(*str1)) == 0 && *str1) { str1++; str2++; count--; } return d; } #endif #ifdef _MSC_VER #define SL_CALL __vectorcall #else #define SL_CALL #endif #define COUNT_OF(X) (sizeof(X) / sizeof((X)[0])) #define ZERO_MEM(X, Y) (memset(X, 0, Y));
#pragma once #include <string> #if 0 int Stricmp(const char* str1, const char* str2) { int d; while ((d = toupper(*str2) - toupper(*str1)) == 0 && *str1) { str1++; str2++; } return d; } int Strnicmp(const char* str1, const char* str2, int count) { int d = 0; while (count > 0 && (d = toupper(*str2) - toupper(*str1)) == 0 && *str1) { str1++; str2++; count--; } return d; } #endif #if defined(_MSC_VER) && (_MSC_VER >= 1800) #define SL_CALL __vectorcall #else #define SL_CALL #endif #define COUNT_OF(X) (sizeof(X) / sizeof((X)[0])) #define ZERO_MEM(X, Y) (memset(X, 0, Y));
Remove __vectorcall calling convention on older versions of MSVC++
Remove __vectorcall calling convention on older versions of MSVC++
C
mit
darkedge/starlight,darkedge/starlight,darkedge/starlight
77378e0ff43a3fc1074c3eac22dbf25d1686fece
src/imap/cmd-create.c
src/imap/cmd-create.c
/* Copyright (C) 2002 Timo Sirainen */ #include "common.h" #include "mail-namespace.h" #include "commands.h" bool cmd_create(struct client_command_context *cmd) { struct mail_namespace *ns; const char *mailbox, *full_mailbox; bool directory; size_t len; /* <mailbox> */ if (!client_read_string_args(cmd, 1, &mailbox)) return FALSE; full_mailbox = mailbox; ns = client_find_namespace(cmd, &mailbox); if (ns == NULL) return TRUE; len = strlen(full_mailbox); if (len == 0 || full_mailbox[len-1] != ns->sep) directory = FALSE; else { /* name ends with hierarchy separator - client is just informing us that it wants to create children under this mailbox. */ directory = TRUE; mailbox = t_strndup(mailbox, len-1); full_mailbox = t_strndup(full_mailbox, strlen(full_mailbox)-1); } if (!client_verify_mailbox_name(cmd, full_mailbox, FALSE, TRUE)) return TRUE; if (mail_storage_mailbox_create(ns->storage, mailbox, directory) < 0) client_send_storage_error(cmd, ns->storage); else client_send_tagline(cmd, "OK Create completed."); return TRUE; }
/* Copyright (C) 2002 Timo Sirainen */ #include "common.h" #include "mail-namespace.h" #include "commands.h" bool cmd_create(struct client_command_context *cmd) { struct mail_namespace *ns; const char *mailbox, *full_mailbox; bool directory; size_t len; /* <mailbox> */ if (!client_read_string_args(cmd, 1, &mailbox)) return FALSE; full_mailbox = mailbox; ns = client_find_namespace(cmd, &mailbox); if (ns == NULL) return TRUE; len = strlen(full_mailbox); if (len == 0 || full_mailbox[len-1] != ns->sep) directory = FALSE; else { /* name ends with hierarchy separator - client is just informing us that it wants to create children under this mailbox. */ directory = TRUE; mailbox = t_strndup(mailbox, strlen(mailbox)-1); full_mailbox = t_strndup(full_mailbox, len-1); } if (!client_verify_mailbox_name(cmd, full_mailbox, FALSE, TRUE)) return TRUE; if (mail_storage_mailbox_create(ns->storage, mailbox, directory) < 0) client_send_storage_error(cmd, ns->storage); else client_send_tagline(cmd, "OK Create completed."); return TRUE; }
CREATE ns_prefix/box/ didn't work right when namespace prefix existed.
CREATE ns_prefix/box/ didn't work right when namespace prefix existed. --HG-- branch : HEAD
C
mit
dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot
bf3b21090f3081c379cffb8f28cecfe6cb28591b
include/shmlog_tags.h
include/shmlog_tags.h
/* * $Id$ * * Define the tags in the shared memory in a reusable format. * Whoever includes this get to define what the SLTM macro does. * */ SLTM(CLI) SLTM(SessionOpen) SLTM(SessionClose) SLTM(ClientAddr) SLTM(Request) SLTM(URL) SLTM(Protocol) SLTM(HD_Unknown) SLTM(HD_Lost) #define HTTPH(a, b, c, d, e, f, g) SLTM(b) #include "http_headers.h" #undef HTTPH
/* * $Id$ * * Define the tags in the shared memory in a reusable format. * Whoever includes this get to define what the SLTM macro does. * */ SLTM(Debug) SLTM(CLI) SLTM(SessionOpen) SLTM(SessionClose) SLTM(ClientAddr) SLTM(Request) SLTM(URL) SLTM(Protocol) SLTM(HD_Unknown) SLTM(HD_Lost) #define HTTPH(a, b, c, d, e, f, g) SLTM(b) #include "http_headers.h" #undef HTTPH
Add a Debug shmemlog tag.
Add a Debug shmemlog tag. git-svn-id: 7d4b18ab7d176792635d6a7a77dd8cbbea8e8daa@104 d4fa192b-c00b-0410-8231-f00ffab90ce4
C
bsd-2-clause
ssm/pkg-varnish,CartoDB/Varnish-Cache,ssm/pkg-varnish,wikimedia/operations-debs-varnish,ssm/pkg-varnish,CartoDB/Varnish-Cache,wikimedia/operations-debs-varnish,CartoDB/Varnish-Cache,wikimedia/operations-debs-varnish,wikimedia/operations-debs-varnish,ssm/pkg-varnish,ssm/pkg-varnish,wikimedia/operations-debs-varnish
c0d6f035e91ad580fca2e764c7bbe6c70d4d5c74
src/condor_includes/condor_syscall_mode.h
src/condor_includes/condor_syscall_mode.h
#ifndef _CONDOR_SYSCALLS_H #define _CONDOR_SYSCALLS_H #if defined( AIX32) # include "syscall.aix32.h" #else # include <syscall.h> #endif typedef int BOOL; static const int SYS_LOCAL = 1; static const int SYS_REMOTE = 0; static const int SYS_RECORDED = 2; static const int SYS_MAPPED = 2; static const int SYS_UNRECORDED = 0; static const int SYS_UNMAPPED = 0; #if defined(__cplusplus) extern "C" { #endif int SetSyscalls( int mode ); int GetSyscallMode(); BOOL LocalSysCalls(); BOOL RemoteSysCalls(); BOOL MappingFileDescriptors(); int REMOTE_syscall( int syscall_num, ... ); #if defined(OSF1) || defined(HPUX9) int syscall( int, ... ); #endif #if defined(__cplusplus) } #endif #endif
#ifndef _CONDOR_SYSCALLS_H #define _CONDOR_SYSCALLS_H #if defined( AIX32) # include "syscall.aix.h" #else # include <syscall.h> #endif typedef int BOOL; static const int SYS_LOCAL = 1; static const int SYS_REMOTE = 0; static const int SYS_RECORDED = 2; static const int SYS_MAPPED = 2; static const int SYS_UNRECORDED = 0; static const int SYS_UNMAPPED = 0; #if defined(__cplusplus) extern "C" { #endif int SetSyscalls( int mode ); int GetSyscallMode(); BOOL LocalSysCalls(); BOOL RemoteSysCalls(); BOOL MappingFileDescriptors(); int REMOTE_syscall( int syscall_num, ... ); #if defined(OSF1) || defined(HPUX9) int syscall( int, ... ); #endif #if defined(__cplusplus) } #endif #endif
Make work for AIX machines.
Make work for AIX machines.
C
apache-2.0
zhangzhehust/htcondor,zhangzhehust/htcondor,htcondor/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco,clalancette/condor-dcloud,bbockelm/condor-network-accounting,htcondor/htcondor,djw8605/htcondor,clalancette/condor-dcloud,djw8605/htcondor,mambelli/osg-bosco-marco,clalancette/condor-dcloud,djw8605/condor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,htcondor/htcondor,zhangzhehust/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,djw8605/htcondor,neurodebian/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco,djw8605/condor,mambelli/osg-bosco-marco,htcondor/htcondor,zhangzhehust/htcondor,djw8605/htcondor,djw8605/htcondor,neurodebian/htcondor,neurodebian/htcondor,htcondor/htcondor,neurodebian/htcondor,neurodebian/htcondor,clalancette/condor-dcloud,htcondor/htcondor,djw8605/condor,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,djw8605/condor,neurodebian/htcondor,clalancette/condor-dcloud,djw8605/condor,djw8605/condor,htcondor/htcondor,bbockelm/condor-network-accounting,djw8605/condor,neurodebian/htcondor,bbockelm/condor-network-accounting,zhangzhehust/htcondor,mambelli/osg-bosco-marco,clalancette/condor-dcloud,zhangzhehust/htcondor,bbockelm/condor-network-accounting,neurodebian/htcondor,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,djw8605/htcondor,djw8605/htcondor,zhangzhehust/htcondor,djw8605/condor,htcondor/htcondor,zhangzhehust/htcondor,mambelli/osg-bosco-marco
f08a19b4cdf0740d852fc4cadf1c27f4cf63cfb9
libmorton/include/morton_common.h
libmorton/include/morton_common.h
#pragma once #include <stdint.h> #if _MSC_VER #include <intrin.h> #endif template<typename morton> inline bool findFirstSetBit(const morton x, unsigned long* firstbit_location) { #if _MSC_VER && !_WIN64 // 32 BIT on 32 BIT if (sizeof(morton) <= 4) { return _BitScanReverse(firstbit_location, x); } // 64 BIT on 32 BIT else { *firstbit_location = 0; if (_BitScanReverse(firstbit_location, (x >> 32))) { // check first part firstbit_location += 32; return true; } return _BitScanReverse(firstbit_location, (x & 0xFFFFFFFF)); } #elif _MSC_VER && _WIN64 // 32 or 64 BIT on 64 BIT return _BitScanReverse64(firstbit_location, x); #elif __GNUC__ if (x == 0) { return false; } else { *firstbit_location = static_cast<unsigned long>((sizeof(morton)*8) - __builtin_clzll(x)); return true; } #endif }
#pragma once // Libmorton - Common helper methods needed in Morton encoding/decoding #include <stdint.h> #if _MSC_VER #include <intrin.h> #endif template<typename morton> inline bool findFirstSetBit(const morton x, unsigned long* firstbit_location) { #if _MSC_VER && !_WIN64 // 32 BIT on 32 BIT if (sizeof(morton) <= 4) { return _BitScanReverse(firstbit_location, x); } // 64 BIT on 32 BIT else { *firstbit_location = 0; if (_BitScanReverse(firstbit_location, (x >> 32))) { // check first part firstbit_location += 32; return true; } return _BitScanReverse(firstbit_location, (x & 0xFFFFFFFF)); } #elif _MSC_VER && _WIN64 // 32 or 64 BIT on 64 BIT return _BitScanReverse64(firstbit_location, x) != 0; #elif __GNUC__ if (x == 0) { return false; } else { *firstbit_location = static_cast<unsigned long>((sizeof(morton)*8) - __builtin_clzll(x)); return true; } #endif }
Fix MSVC compiler warnings about return value not being a boolean
Fix MSVC compiler warnings about return value not being a boolean
C
mit
Forceflow/libmorton
b96e42cf7643421ab923ac1d4bb0119c2f3faa8e
include/tclap/Visitor.h
include/tclap/Visitor.h
/****************************************************************************** * * file: Visitor.h * * Copyright (c) 2003, Michael E. Smoot . * All rights reverved. * * See the file COPYING in the top directory of this distribution for * more information. * * 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. * *****************************************************************************/ #ifndef TCLAP_VISITOR_H #define TCLAP_VISITOR_H namespace TCLAP { /** * A base class that defines the interface for visitors. */ class Visitor { public: /** * Constructor. Does nothing. */ Visitor() { } /** * Destructor. Does nothing. */ virtual ~Visitor() { } /** * Does nothing. Should be overridden by child. */ virtual void visit() { } }; } #endif
/****************************************************************************** * * file: Visitor.h * * Copyright (c) 2003, Michael E. Smoot . * All rights reverved. * * See the file COPYING in the top directory of this distribution for * more information. * * 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. * *****************************************************************************/ #ifndef TCLAP_VISITOR_H #define TCLAP_VISITOR_H namespace TCLAP { /** * A base class that defines the interface for visitors. */ class Visitor { public: /** * Constructor. Does nothing. */ Visitor() { } /** * Destructor. Does nothing. */ virtual ~Visitor() { } /** * This method (to implemented by children) will be * called when the visitor is visited. */ virtual void visit() = 0; }; } #endif
Make "visit" method pure virtual (needs to be implemented by subclass to make sense).
Make "visit" method pure virtual (needs to be implemented by subclass to make sense).
C
mit
ufz/tclap,ufz/tclap,mjkoo/tclap,mirror/tclap,ufz/tclap,mirror/tclap,Qointum/tclap,mc-server/TCLAP,xguerin/tclap,mc-server/TCLAP,Qointum/tclap,mirror/tclap,mirror/tclap,mjkoo/tclap,xguerin/tclap,xguerin/tclap,mjkoo/tclap,xguerin/tclap,mc-server/TCLAP,Qointum/tclap
d8f45f076d3f27ac094acb998c2c457ec2ae105f
RectConfinementForce.h
RectConfinementForce.h
/*===- RectConfinementForce.h - libSimulation -================================= * * DEMON * * This file is distributed under the BSD Open Source License. See LICENSE.TXT * for details. * *===-----------------------------------------------------------------------===*/ #ifndef RECTCONFINEMENTFORCE_H #define RECTCONFINEMENTFORCE_H #include "Force.h" class RectConfinementForce : public Force { public: RectConfinementForce(Cloud * const C, double confineConstX, double confineConstY) : Force(C), confineX(-confineConstX), confineY(-confineConstY) {} // IMPORTANT: In the above constructor, confineConst_'s must be positive! ~RectConfinementForce() {} // public functions: void force1(const double currentTime); // rk substep 1 void force2(const double currentTime); // rk substep 2 void force3(const double currentTime); // rk substep 3 void force4(const double currentTime); // rk substep 4 void writeForce(fitsfile * const file, int * const error) const; void readForce(fitsfile * const file, int * const error); private: // private variables: double confineX; double confineY; // private functions: void force(const cloud_index currentParticle, const __m128d currentPositionX, const __m128d currentPositionY); }; #endif // RECTCONFINEMENTFORCE_H
/*===- RectConfinementForce.h - libSimulation -================================= * * DEMON * * This file is distributed under the BSD Open Source License. See LICENSE.TXT * for details. * *===-----------------------------------------------------------------------===*/ #ifndef RECTCONFINEMENTFORCE_H #define RECTCONFINEMENTFORCE_H #include "Force.h" class RectConfinementForce : public Force { public: RectConfinementForce(Cloud * const C, double confineConstX, double confineConstY) : Force(C), confineX(confineConstX), confineY(-confineConstY) {} // IMPORTANT: In the above constructor, confineConst_'s must be positive! ~RectConfinementForce() {} // public functions: void force1(const double currentTime); // rk substep 1 void force2(const double currentTime); // rk substep 2 void force3(const double currentTime); // rk substep 3 void force4(const double currentTime); // rk substep 4 void writeForce(fitsfile * const file, int * const error) const; void readForce(fitsfile * const file, int * const error); private: // private variables: double confineX; double confineY; // private functions: void force(const cloud_index currentParticle, const __m128d currentPositionX, const __m128d currentPositionY); }; #endif // RECTCONFINEMENTFORCE_H
Fix direction of rectangular confinement force.
Fix direction of rectangular confinement force.
C
bsd-3-clause
leios/demonsimulationcode,leios/demonsimulationcode
bf6888b5555a045a90642bf637f1a18f82559bcc
src/arch/microblaze/kernel/interrupt_handler.c
src/arch/microblaze/kernel/interrupt_handler.c
/** * @file * @details This file contains @link interrupt_handler() @endlink function. * It's proxy between asm code and kernel interrupt handler * @link irq_dispatch() @endlink function. * * @date 27.11.09 * @author Anton Bondarev */ #include <drivers/irqctrl.h> #include <asm/msr.h> /* we havn't interrupts acknowledgment in microblaze architecture * and must receive interrupt number our self and then clear pending bit in * pending register */ void interrupt_handler(void) { unsigned int pending; while (0 != (pending = mb_intc_get_pending())) { unsigned int irq_num; for (irq_num = 0; irq_num < IRQCTRL_IRQS_TOTAL; irq_num++) { if (pending & (1 << irq_num)) { //TODO we must clear whole pending register irqctrl_clear(irq_num); /*now we allow nested irq*/ msr_set_ie(); irq_dispatch(irq_num); } } } }
/** * @file * @details This file contains @link interrupt_handler() @endlink function. * It's proxy between asm code and kernel interrupt handler * @link irq_dispatch() @endlink function. * * @date 27.11.09 * @author Anton Bondarev */ #include <drivers/irqctrl.h> #include <asm/msr.h> #include <kernel/irq.h> /* we havn't interrupts acknowledgment in microblaze architecture * and must receive interrupt number our self and then clear pending bit in * pending register */ void interrupt_handler(void) { unsigned int pending; while (0 != (pending = mb_intc_get_pending())) { unsigned int irq_num; for (irq_num = 0; irq_num < IRQCTRL_IRQS_TOTAL; irq_num++) { if (pending & (1 << irq_num)) { //TODO we must clear whole pending register irqctrl_clear(irq_num); /*now we allow nested irq*/ msr_set_ie(); irq_dispatch(irq_num); } } } }
Fix microblaze build after merge 480c64b
Fix microblaze build after merge 480c64b
C
bsd-2-clause
gzoom13/embox,mike2390/embox,embox/embox,Kefir0192/embox,abusalimov/embox,mike2390/embox,mike2390/embox,gzoom13/embox,Kefir0192/embox,Kakadu/embox,abusalimov/embox,Kakadu/embox,gzoom13/embox,vrxfile/embox-trik,Kakadu/embox,vrxfile/embox-trik,gzoom13/embox,gzoom13/embox,mike2390/embox,gzoom13/embox,embox/embox,Kakadu/embox,embox/embox,vrxfile/embox-trik,Kefir0192/embox,Kefir0192/embox,Kakadu/embox,gzoom13/embox,mike2390/embox,vrxfile/embox-trik,abusalimov/embox,Kefir0192/embox,vrxfile/embox-trik,abusalimov/embox,vrxfile/embox-trik,Kefir0192/embox,abusalimov/embox,embox/embox,mike2390/embox,Kakadu/embox,Kefir0192/embox,abusalimov/embox,embox/embox,vrxfile/embox-trik,embox/embox,mike2390/embox,Kakadu/embox
267980e066f9e8c5df8902cdec2005018f632a4d
simulator/mips/mips.h
simulator/mips/mips.h
/** * mips.h - all the aliases to MIPS ISA * @author Aleksandr Misevich * Copyright 2018 MIPT-MIPS */ #ifndef MIPS_H_ #define MIPS_H_ #include "mips_instr.h" #include <infra/instrcache/instr_cache_memory.h> template<MIPSVersion VERSION> struct MIPS { using Register = MIPSRegister; using RegisterUInt = MIPSRegisterUInt<VERSION>; using FuncInstr = MIPSInstr<VERSION>; using Memory = InstrMemory<FuncInstr>; static const auto& get_instr( uint32 bytes, Addr PC) { return FuncInstr( VERSION, bytes, PC); } }; // 32 bit MIPS using MIPSI = MIPS<MIPSVersion::I>; using MIPSII = MIPS<MIPSVersion::II>; using MIPS32 = MIPS<MIPSVersion::v32>; // 64 bit MIPS using MIPSIII = MIPS<MIPSVersion::III>; using MIPSIV = MIPS<MIPSVersion::IV>; using MIPS64 = MIPS<MIPSVersion::v64>; static_assert( std::is_same_v<MIPS32Instr, MIPS32::FuncInstr>); static_assert( std::is_same_v<MIPS64Instr, MIPS64::FuncInstr>); #endif // MIPS_H_
/** * mips.h - all the aliases to MIPS ISA * @author Aleksandr Misevich * Copyright 2018 MIPT-MIPS */ #ifndef MIPS_H_ #define MIPS_H_ #include "mips_instr.h" #include <infra/instrcache/instr_cache_memory.h> template<MIPSVersion version> struct MIPS { using Register = MIPSRegister; using RegisterUInt = MIPSRegisterUInt<version>; using FuncInstr = MIPSInstr<version>; using Memory = InstrMemory<FuncInstr>; static const auto& get_instr( uint32 bytes, Addr PC) { return FuncInstr( version, bytes, PC); } }; // 32 bit MIPS using MIPSI = MIPS<MIPSVersion::I>; using MIPSII = MIPS<MIPSVersion::II>; using MIPS32 = MIPS<MIPSVersion::v32>; // 64 bit MIPS using MIPSIII = MIPS<MIPSVersion::III>; using MIPSIV = MIPS<MIPSVersion::IV>; using MIPS64 = MIPS<MIPSVersion::v64>; static_assert( std::is_same_v<MIPS32Instr, MIPS32::FuncInstr>); static_assert( std::is_same_v<MIPS64Instr, MIPS64::FuncInstr>); #endif // MIPS_H_
Rename VERSION to avoid overlapping with external macros
Rename VERSION to avoid overlapping with external macros
C
mit
MIPT-ILab/mipt-mips,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips-2015
f585f6437fb528405f2a9afb620b21be21bebfac
src/main.c
src/main.c
#include <stdio.h> int main(int argc, char *argv[]) { printf("gxtas - The GTA Text Assembler\n"); return 0; }
/* * Copyright (c) 2017 Wes Hampson <thehambone93@gmail.com> * * Licensed under the MIT License. See LICENSE at top level directory. */ #include <stdio.h> #include <string.h> #include "gxtas.h" void show_help_info(void) { printf("%s\n", GXTAS_HELP_MESSAGE); } void show_version_info(void) { printf("%s - %s\n", GXTAS_APP_NAME, GXTAS_APP_MOTTO); printf("Version %d.%d.%d%s\n", GXTAS_VERSION_MAJOR, GXTAS_VERSION_MINOR, GXTAS_VERSION_PATCH, GXTAS_VERSION_BUILD); printf("\n%s\n", GXTAS_COPYRIGHT_NOTICE); printf("\n%s\n", GXTAS_LICENSE_NOTICE); printf("\n%s\n", GXTAS_WARRANTY_NOTICE); } int main(int argc, char *argv[]) { if (argc < 2) { show_help_info(); } else if (strcmp(argv[1], "--version") == 0) { show_version_info(); } else { show_help_info(); } return 0; }
Add license header, add version and help info
Add license header, add version and help info
C
mit
thehambone93/gxtmaker,thehambone93/gxtmaker
0f262e2c5921e8febea95f259c41302714de5a6a
src/settings/types/Ratio.h
src/settings/types/Ratio.h
//Copyright (c) 2018 Ultimaker B.V. //CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef RATIO_H #define RATIO_H namespace cura { /* * \brief Represents a ratio between two numbers. * * This is a facade. It behaves like a double. */ struct Ratio { /* * \brief Default constructor setting the ratio to 1. */ constexpr Ratio() : value(1.0) {}; /* * \brief Casts a double to a Ratio instance. */ constexpr Ratio(double value) : value(value / 100) {}; /* * \brief Casts the Ratio instance to a double. */ operator double() const { return value; } /* * \brief The actual ratio, as a double. */ double value = 0; }; constexpr Ratio operator "" _r(const long double ratio) { return Ratio(ratio); } } #endif //RATIO_H
//Copyright (c) 2018 Ultimaker B.V. //CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef RATIO_H #define RATIO_H namespace cura { /* * \brief Represents a ratio between two numbers. * * This is a facade. It behaves like a double. */ struct Ratio { /* * \brief Default constructor setting the ratio to 1. */ constexpr Ratio() : value(1.0) {}; /* * \brief Casts a double to a Ratio instance. */ constexpr Ratio(double value) : value(value / 100) {}; /* * \brief Casts the Ratio instance to a double. */ operator double() const { return value; } /* * Some operators for arithmetic on ratios. */ Ratio operator *(const Ratio& other) const { return Ratio(value * other.value); } template<typename E> Ratio operator *(const E& other) const { return Ratio(value * other); } Ratio operator /(const Ratio& other) const { return Ratio(value / other.value); } template<typename E> Ratio operator /(const E& other) const { return Ratio(value / other); } Ratio& operator *=(const Ratio& other) { value *= other.value; return *this; } template<typename E> Ratio& operator *=(const E& other) { value *= other; return *this; } Ratio& operator /=(const Ratio& other) { value /= other.value; return *this; } template<typename E> Ratio& operator /=(const E& other) { value /= other; return *this; } /* * \brief The actual ratio, as a double. */ double value = 0; }; constexpr Ratio operator "" _r(const long double ratio) { return Ratio(ratio); } } #endif //RATIO_H
Add operators for arithmetic with ratios
Add operators for arithmetic with ratios Contributes to issue CURA-4410.
C
agpl-3.0
Ultimaker/CuraEngine,Ultimaker/CuraEngine
472c06e90366bc906d48caac6d9e6320e4823116
include/rocksdb/perf_level.h
include/rocksdb/perf_level.h
// Copyright (c) 2011-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. #ifndef INCLUDE_ROCKSDB_PERF_LEVEL_H_ #define INCLUDE_ROCKSDB_PERF_LEVEL_H_ #include <stdint.h> #include <string> namespace rocksdb { // How much perf stats to collect. Affects perf_context and iostats_context. enum PerfLevel { kDisable = 0, // disable perf stats kEnableCount = 1, // enable only count stats kEnableTimeExceptForMutex = 2, // Other than count stats, also enable time // stats except for mutexes kEnableTime = 3 // enable count and time stats }; // set the perf stats level for current thread void SetPerfLevel(PerfLevel level); // get current perf stats level for current thread PerfLevel GetPerfLevel(); } // namespace rocksdb #endif // INCLUDE_ROCKSDB_PERF_LEVEL_H_
// Copyright (c) 2011-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. #ifndef INCLUDE_ROCKSDB_PERF_LEVEL_H_ #define INCLUDE_ROCKSDB_PERF_LEVEL_H_ #include <stdint.h> #include <string> namespace rocksdb { // How much perf stats to collect. Affects perf_context and iostats_context. enum PerfLevel : char { kUninitialized = -1, // unknown setting kDisable = 0, // disable perf stats kEnableCount = 1, // enable only count stats kEnableTimeExceptForMutex = 2, // Other than count stats, also enable time // stats except for mutexes kEnableTime = 3, // enable count and time stats kOutOfBounds = 4 // N.B. Must always be the last value! }; // set the perf stats level for current thread void SetPerfLevel(PerfLevel level); // get current perf stats level for current thread PerfLevel GetPerfLevel(); } // namespace rocksdb #endif // INCLUDE_ROCKSDB_PERF_LEVEL_H_
Add low and upper bound values for rocksdb::PerfLevel enum
Add low and upper bound values for rocksdb::PerfLevel enum Summary: Add under and over limits for rocksdb::PerfLevel enum to allow us to do boundary checks before casting ints or unints to this enum. Test Plan: make all check -j32 Reviewers: sdong Reviewed By: sdong Subscribers: andrewkr, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D58521
C
bsd-3-clause
wenduo/rocksdb,facebook/rocksdb,hobinyoon/rocksdb,hobinyoon/rocksdb,hobinyoon/rocksdb,SunguckLee/RocksDB,norton/rocksdb,wat-ze-hex/rocksdb,norton/rocksdb,wat-ze-hex/rocksdb,norton/rocksdb,SunguckLee/RocksDB,vmx/rocksdb,wenduo/rocksdb,SunguckLee/RocksDB,wat-ze-hex/rocksdb,ryneli/rocksdb,hobinyoon/rocksdb,bbiao/rocksdb,Andymic/rocksdb,jalexanderqed/rocksdb,ryneli/rocksdb,tsheasha/rocksdb,vmx/rocksdb,ryneli/rocksdb,wat-ze-hex/rocksdb,tsheasha/rocksdb,facebook/rocksdb,jalexanderqed/rocksdb,facebook/rocksdb,ryneli/rocksdb,norton/rocksdb,Andymic/rocksdb,OverlordQ/rocksdb,OverlordQ/rocksdb,OverlordQ/rocksdb,wenduo/rocksdb,Andymic/rocksdb,Andymic/rocksdb,vmx/rocksdb,hobinyoon/rocksdb,ryneli/rocksdb,tsheasha/rocksdb,hobinyoon/rocksdb,ryneli/rocksdb,bbiao/rocksdb,jalexanderqed/rocksdb,SunguckLee/RocksDB,bbiao/rocksdb,OverlordQ/rocksdb,bbiao/rocksdb,Andymic/rocksdb,Andymic/rocksdb,OverlordQ/rocksdb,tsheasha/rocksdb,facebook/rocksdb,wat-ze-hex/rocksdb,norton/rocksdb,SunguckLee/RocksDB,hobinyoon/rocksdb,tsheasha/rocksdb,OverlordQ/rocksdb,bbiao/rocksdb,vmx/rocksdb,SunguckLee/RocksDB,jalexanderqed/rocksdb,vmx/rocksdb,vmx/rocksdb,tsheasha/rocksdb,bbiao/rocksdb,OverlordQ/rocksdb,Andymic/rocksdb,facebook/rocksdb,wenduo/rocksdb,tsheasha/rocksdb,wenduo/rocksdb,bbiao/rocksdb,facebook/rocksdb,wenduo/rocksdb,facebook/rocksdb,norton/rocksdb,vmx/rocksdb,ryneli/rocksdb,jalexanderqed/rocksdb,SunguckLee/RocksDB,norton/rocksdb,wenduo/rocksdb,wenduo/rocksdb,facebook/rocksdb,wat-ze-hex/rocksdb,vmx/rocksdb,SunguckLee/RocksDB,bbiao/rocksdb,wat-ze-hex/rocksdb,norton/rocksdb,hobinyoon/rocksdb,jalexanderqed/rocksdb,wat-ze-hex/rocksdb,Andymic/rocksdb,jalexanderqed/rocksdb,tsheasha/rocksdb
eb7a693e0f6de7f3baf55f4fc3a744d6b2863c26
include/encode/SkWebpEncoder.h
include/encode/SkWebpEncoder.h
/* * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkWebpEncoder_DEFINED #define SkWebpEncoder_DEFINED #include "SkEncoder.h" class SkWStream; namespace SK_API SkWebpEncoder { struct Options { /** * |fQuality| must be in [0.0f, 100.0f] where 0.0f corresponds to the lowest quality. */ float fQuality = 100.0f; /** * If the input is premultiplied, this controls the unpremultiplication behavior. * The encoder can convert to linear before unpremultiplying or ignore the transfer * function and unpremultiply the input as is. */ SkTransferFunctionBehavior fUnpremulBehavior = SkTransferFunctionBehavior::kRespect; }; /** * Encode the |src| pixels to the |dst| stream. * |options| may be used to control the encoding behavior. * * Returns true on success. Returns false on an invalid or unsupported |src|. */ bool Encode(SkWStream* dst, const SkPixmap& src, const Options& options); }; #endif
/* * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkWebpEncoder_DEFINED #define SkWebpEncoder_DEFINED #include "SkEncoder.h" class SkWStream; namespace SkWebpEncoder { struct SK_API Options { /** * |fQuality| must be in [0.0f, 100.0f] where 0.0f corresponds to the lowest quality. */ float fQuality = 100.0f; /** * If the input is premultiplied, this controls the unpremultiplication behavior. * The encoder can convert to linear before unpremultiplying or ignore the transfer * function and unpremultiply the input as is. */ SkTransferFunctionBehavior fUnpremulBehavior = SkTransferFunctionBehavior::kRespect; }; /** * Encode the |src| pixels to the |dst| stream. * |options| may be used to control the encoding behavior. * * Returns true on success. Returns false on an invalid or unsupported |src|. */ SK_API bool Encode(SkWStream* dst, const SkPixmap& src, const Options& options); }; #endif
Move SK_API from namespace to function
Move SK_API from namespace to function Bug: skia: Change-Id: Ib538b77c28e323bbcc40634b0f3cd87d88d898e8 Reviewed-on: https://skia-review.googlesource.com/16496 Reviewed-by: Mike Reed <f5cabf8735907151a446812c9875d6c0c712d847@google.com> Reviewed-by: Matt Sarett <bb43c9b8214fcf1292f134c9714ba8a0e7075913@google.com> Commit-Queue: Matt Sarett <bb43c9b8214fcf1292f134c9714ba8a0e7075913@google.com>
C
bsd-3-clause
google/skia,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,rubenvb/skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,google/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,google/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,rubenvb/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia
b020472a9ad91dd6a7d950aeeb49af36170cd334
src/tests/marquise_util_test.c
src/tests/marquise_util_test.c
#include <glib.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include "../marquise.h" extern uint8_t valid_namespace(char *namespace); extern char* build_spool_path(const char *spool_prefix, char *namespace); void test_valid_namespace() { int ret = valid_namespace("abcdefghijklmn12345"); g_assert_cmpint(ret, ==, 1); } void test_invalid_namespace() { int ret = valid_namespace("a_b"); g_assert_cmpint(ret, ==, 0); } int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); g_test_add_func("/valid_namespace/valid", test_valid_namespace); g_test_add_func("/valid_namespace/invalid", test_invalid_namespace); return g_test_run(); }
#include <glib.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include "../marquise.h" extern uint8_t valid_namespace(char *namespace); extern char* build_spool_path(const char *spool_prefix, char *namespace); void test_valid_namespace() { int ret = valid_namespace("abcdefghijklmn12345"); g_assert_cmpint(ret, ==, 1); } void test_invalid_namespace() { int ret = valid_namespace("a_b"); g_assert_cmpint(ret, ==, 0); } void test_build_spool_path() { char *spool_path = build_spool_path("/tmp", "marquisetest"); char *expected_path = "/tmp/marquisetest/"; size_t expected_len = strlen(expected_path); int i; for (i=0; i < expected_len; i++) { if (expected_path[i] != spool_path[i]) { printf("Got path %s, expected path with prefix %s\n", spool_path, expected_path); g_test_fail(); } } } int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); g_test_add_func("/valid_namespace/valid", test_valid_namespace); g_test_add_func("/valid_namespace/invalid", test_invalid_namespace); g_test_add_func("/build_spool_path/path", test_build_spool_path); return g_test_run(); }
Add test for spool path construction
Add test for spool path construction Signed-off-by: Sharif Olorin <f4e2cff0138e8cd5600e8ca295bf078683584659@tesser.org>
C
bsd-3-clause
anchor/libmarquise,anchor/libmarquise
41f5a8559f2909ca28cffaa73eb138d6811a598c
elixir/src/main.c
elixir/src/main.c
// Regular C libs #include <stdio.h> // Elixir libs -- clang doesn't know where the hell this is #include "erl_nif.h" static ERL_NIF_TERM hello(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) { }
// 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[]) { } static ErlNifFuncs funcs[] = { {"hello", 2, hello} }; ERL_NIF_INIT(Elixir.Hello, funcs, &hello)
Add basic setup for Elixir binding
Add basic setup for Elixir binding
C
unlicense
bentranter/binding,bentranter/binding,bentranter/binding
943c83c4943e375b18858c770378b2a74cadf74e
doc/doxy_examples.c
doc/doxy_examples.c
/** \defgroup mpg123_examples example programs using libmpg123 @{ */ /** \file mpg123_to_wav.c A simple MPEG audio to WAV converter using libmpg123 (read) and libsndfile (write). ...an excersize on two simple APIs. */ /** \file mpglib.c Example program mimicking the old mpglib test program. It takes an MPEG bitstream from standard input and writes raw audio to standard output. This is an use case of the mpg123_decode() in and out function in the feeder mode, quite close to classic mpglib usage and thus a template to convert from that to libmpg123. */ /** \file scan.c Example program that examines the exact length of an MPEG file. It opens a list of files and does mpg123_scan() on each and reporting the mpg123_length() before and after that. */ /** \file id3dump.c Parse ID3 info and print to standard output. */ /* @} */
/** \defgroup mpg123_examples example programs using libmpg123 @{ */ /** \file mpg123_to_wav.c A simple MPEG audio to WAV converter using libmpg123 (read) and libsndfile (write). ...an excersize on two simple APIs. */ /** \file mpglib.c Example program mimicking the old mpglib test program. It takes an MPEG bitstream from standard input and writes raw audio to standard output. This is an use case of the mpg123_decode() in and out function in the feeder mode, quite close to classic mpglib usage and thus a template to convert from that to libmpg123. */ /** \file scan.c Example program that examines the exact length of an MPEG file. It opens a list of files and does mpg123_scan() on each and reporting the mpg123_length() before and after that. */ /** \file id3dump.c Parse ID3 info and print to standard output. */ /** \file feedseek.c Fuzzy feeder seeking. */ /* @} */
Add feedseek example to API docs.
Add feedseek example to API docs. git-svn-id: 793bb72743a407948e3701719c462b6a765bc435@2963 35dc7657-300d-0410-a2e5-dc2837fedb53
C
lgpl-2.1
Distrotech/mpg123,Distrotech/mpg123,Distrotech/mpg123,Distrotech/mpg123,Distrotech/mpg123,Distrotech/mpg123,Distrotech/mpg123
f6db8b91f5cfb6203727754f5e1cf2a666a1cdba
BoxContentSDK/BoxContentSDK/QueueManagers/BOXAPIAccessTokenDelegate.h
BoxContentSDK/BoxContentSDK/QueueManagers/BOXAPIAccessTokenDelegate.h
// // BOXAPIAccessTokenDelegate.h // BoxContentSDK // // Created by Andrew Chun on 6/6/15. // Copyright (c) 2015 Box. All rights reserved. // /** * App Users are full-featured enterprise Box accounts that belong to your application not a Box user. Unlike typical Box accounts, * these accounts do not have an associated login and can only be accessed through the Content API by the controlling application * and associated Box User ID. This new user model allows your application to take advantage of groups, permissions, collaborations, * comments, tasks, and the many other features offered by the Box platform. * * For more information the documentation is linked below. * https://developers.box.com/developer-edition/#app_users * * BOXAPIAccessTokenDelegate allows developers to make network calls to their own servers to retrieve an access token * outside of the normal means of authentication (OAuth2). * * BOXAPIAccessTokenDelegate is a protocol that should only be conformed to if App Users is being used. */ @protocol BOXAPIAccessTokenDelegate <NSObject> /** * The method is meant to be used to make network requests to acquire access tokens and access token expiration dates. */ - (void)fetchAccessTokenWithCompletion:(void (^)(NSString *accessToken, NSDate *accessTokenExpiration, NSError *error))completion; @end
// // BOXAPIAccessTokenDelegate.h // BoxContentSDK // // Created by Andrew Chun on 6/6/15. // Copyright (c) 2015 Box. All rights reserved. // /** * App Users are full-featured enterprise Box accounts that belong to your application not a Box user. Unlike typical Box accounts, * these accounts do not have an associated login and can only be accessed through the Content API by the controlling application * and associated Box User ID. This new user model allows your application to take advantage of groups, permissions, collaborations, * comments, tasks, and the many other features offered by the Box platform. * * For more information the documentation is linked below. * https://developer.box.com/docs/app-users and https://developer.box.com/docs/service-account * * BOXAPIAccessTokenDelegate allows developers to make network calls to their own servers to retrieve an access token * outside of the normal means of authentication (OAuth2). * * BOXAPIAccessTokenDelegate is a protocol that should only be conformed to if App Users is being used. */ @protocol BOXAPIAccessTokenDelegate <NSObject> /** * The method is meant to be used to make network requests to acquire access tokens and access token expiration dates. */ - (void)fetchAccessTokenWithCompletion:(void (^)(NSString *accessToken, NSDate *accessTokenExpiration, NSError *error))completion; @end
Update the App Users documentation links
Update the App Users documentation links
C
apache-2.0
box/box-ios-sdk,box/box-ios-sdk,box/box-ios-sdk
41cdace7b9f4caf0e21119996ca2d8696c6abae0
mud/home/Http/lib/form/thing.c
mud/home/Http/lib/form/thing.c
inherit "/lib/string/sprint"; inherit "../support"; static string thing_form(object obj) { string buffer; buffer = "<h1>Object form</h1>\n"; buffer += "<form action=\"object.lpc?obj=" + object2string(obj) + "\" method=\"post\">\n"; buffer += "<p>Mass: <input type=\"text\" name=\"mass\" value=\"" + mixed_sprint(obj->query_mass()) + "\"/></p><br />\n"; buffer += "<input type=\"submit\" value=\"change mass\" />\n"; buffer += "</form>\n"; return buffer; }
inherit "/lib/string/sprint"; inherit "../support"; static string thing_form(object obj) { string buffer; buffer = "<h1>Object form</h1>\n"; buffer += "<form action=\"object.lpc?obj=" + object2string(obj) + "\" method=\"post\">\n"; buffer += "Mass: <input type=\"text\" name=\"mass\" value=\"" + mixed_sprint(obj->query_mass()) + "\"/>\n"; buffer += "<input type=\"submit\" value=\"change mass\" />\n"; buffer += "</form>\n"; buffer += "<form action=\"object.lpc?obj=" + object2string(obj) + "\" method=\"post\">\n"; buffer += "Local mass: <input type=\"text\" name=\"localmass\" value=\"" + mixed_sprint(obj->query_local_mass()) + "\"/>\n"; buffer += "<input type=\"submit\" value=\"change local mass\" />\n"; buffer += "</form>\n"; return buffer; }
Allow local mass and mass to be set separately by form
Allow local mass and mass to be set separately by form
C
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
77645b99f438be1a0906126be8052ad36761b1cd
src/include/port/bsdi.h
src/include/port/bsdi.h
#if defined(__i386__) #define NEED_I386_TAS_ASM #endif #if defined(__sparc__) #define NEED_SPARC_TAS_ASM #endif #define HAS_TEST_AND_SET typedef unsigned char slock_t;
#if defined(__i386__) #define NEED_I386_TAS_ASM #endif #if defined(__sparc__) #define NEED_SPARC_TAS_ASM #endif #define HAS_TEST_AND_SET typedef unsigned char slock_t; /* This is marked as obsoleted in BSD/OS 4.3. */ #ifndef EAI_ADDRFAMILY #define EAI_ADDRFAMILY 1 #endif
Add define for missing EAI_ADDRFAMILY in BSD/OS 4.3.
Add define for missing EAI_ADDRFAMILY in BSD/OS 4.3.
C
agpl-3.0
tpostgres-projects/tPostgres,yuanzhao/gpdb,chrishajas/gpdb,ahachete/gpdb,Postgres-XL/Postgres-XL,rubikloud/gpdb,lpetrov-pivotal/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,foyzur/gpdb,atris/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,postmind-net/postgres-xl,50wu/gpdb,rvs/gpdb,cjcjameson/gpdb,kaknikhil/gpdb,Chibin/gpdb,Quikling/gpdb,royc1/gpdb,janebeckman/gpdb,jmcatamney/gpdb,lisakowen/gpdb,ovr/postgres-xl,lisakowen/gpdb,lpetrov-pivotal/gpdb,jmcatamney/gpdb,ahachete/gpdb,tpostgres-projects/tPostgres,xinzweb/gpdb,jmcatamney/gpdb,zaksoup/gpdb,janebeckman/gpdb,lintzc/gpdb,0x0FFF/gpdb,oberstet/postgres-xl,edespino/gpdb,cjcjameson/gpdb,tangp3/gpdb,tpostgres-projects/tPostgres,tangp3/gpdb,xinzweb/gpdb,rvs/gpdb,atris/gpdb,chrishajas/gpdb,rvs/gpdb,atris/gpdb,ashwinstar/gpdb,kaknikhil/gpdb,lisakowen/gpdb,Postgres-XL/Postgres-XL,Chibin/gpdb,lisakowen/gpdb,edespino/gpdb,jmcatamney/gpdb,royc1/gpdb,xinzweb/gpdb,oberstet/postgres-xl,atris/gpdb,CraigHarris/gpdb,50wu/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,xinzweb/gpdb,lintzc/gpdb,50wu/gpdb,lisakowen/gpdb,tangp3/gpdb,Chibin/gpdb,adam8157/gpdb,arcivanov/postgres-xl,kaknikhil/gpdb,yuanzhao/gpdb,Quikling/gpdb,techdragon/Postgres-XL,adam8157/gpdb,Chibin/gpdb,royc1/gpdb,tangp3/gpdb,ahachete/gpdb,adam8157/gpdb,zaksoup/gpdb,kmjungersen/PostgresXL,foyzur/gpdb,greenplum-db/gpdb,tangp3/gpdb,cjcjameson/gpdb,randomtask1155/gpdb,arcivanov/postgres-xl,edespino/gpdb,kaknikhil/gpdb,CraigHarris/gpdb,randomtask1155/gpdb,ovr/postgres-xl,chrishajas/gpdb,randomtask1155/gpdb,Chibin/gpdb,foyzur/gpdb,adam8157/gpdb,edespino/gpdb,cjcjameson/gpdb,adam8157/gpdb,zaksoup/gpdb,rvs/gpdb,Quikling/gpdb,ashwinstar/gpdb,arcivanov/postgres-xl,ashwinstar/gpdb,CraigHarris/gpdb,lisakowen/gpdb,CraigHarris/gpdb,0x0FFF/gpdb,kmjungersen/PostgresXL,arcivanov/postgres-xl,ashwinstar/gpdb,lpetrov-pivotal/gpdb,lpetrov-pivotal/gpdb,Quikling/gpdb,xuegang/gpdb,zeroae/postgres-xl,pavanvd/postgres-xl,ahachete/gpdb,ovr/postgres-xl,edespino/gpdb,atris/gpdb,zaksoup/gpdb,rvs/gpdb,postmind-net/postgres-xl,oberstet/postgres-xl,postmind-net/postgres-xl,lpetrov-pivotal/gpdb,adam8157/gpdb,randomtask1155/gpdb,50wu/gpdb,zeroae/postgres-xl,cjcjameson/gpdb,pavanvd/postgres-xl,zeroae/postgres-xl,foyzur/gpdb,zaksoup/gpdb,janebeckman/gpdb,kmjungersen/PostgresXL,techdragon/Postgres-XL,CraigHarris/gpdb,xinzweb/gpdb,zeroae/postgres-xl,chrishajas/gpdb,0x0FFF/gpdb,Postgres-XL/Postgres-XL,jmcatamney/gpdb,royc1/gpdb,0x0FFF/gpdb,snaga/postgres-xl,xuegang/gpdb,edespino/gpdb,ahachete/gpdb,lintzc/gpdb,yuanzhao/gpdb,edespino/gpdb,ovr/postgres-xl,ahachete/gpdb,xuegang/gpdb,tpostgres-projects/tPostgres,jmcatamney/gpdb,Quikling/gpdb,0x0FFF/gpdb,kmjungersen/PostgresXL,50wu/gpdb,kaknikhil/gpdb,rubikloud/gpdb,lintzc/gpdb,lpetrov-pivotal/gpdb,tangp3/gpdb,techdragon/Postgres-XL,lintzc/gpdb,rubikloud/gpdb,royc1/gpdb,lisakowen/gpdb,foyzur/gpdb,snaga/postgres-xl,techdragon/Postgres-XL,xinzweb/gpdb,lpetrov-pivotal/gpdb,rubikloud/gpdb,rvs/gpdb,Quikling/gpdb,ashwinstar/gpdb,lintzc/gpdb,chrishajas/gpdb,rvs/gpdb,Chibin/gpdb,rvs/gpdb,zaksoup/gpdb,cjcjameson/gpdb,yazun/postgres-xl,cjcjameson/gpdb,lpetrov-pivotal/gpdb,atris/gpdb,kaknikhil/gpdb,kaknikhil/gpdb,zaksoup/gpdb,0x0FFF/gpdb,chrishajas/gpdb,randomtask1155/gpdb,xuegang/gpdb,jmcatamney/gpdb,xuegang/gpdb,greenplum-db/gpdb,yazun/postgres-xl,tangp3/gpdb,50wu/gpdb,0x0FFF/gpdb,kmjungersen/PostgresXL,jmcatamney/gpdb,Chibin/gpdb,cjcjameson/gpdb,foyzur/gpdb,ahachete/gpdb,royc1/gpdb,cjcjameson/gpdb,atris/gpdb,janebeckman/gpdb,adam8157/gpdb,randomtask1155/gpdb,yuanzhao/gpdb,rubikloud/gpdb,Quikling/gpdb,Chibin/gpdb,xinzweb/gpdb,tpostgres-projects/tPostgres,yazun/postgres-xl,chrishajas/gpdb,edespino/gpdb,cjcjameson/gpdb,kaknikhil/gpdb,greenplum-db/gpdb,janebeckman/gpdb,yuanzhao/gpdb,oberstet/postgres-xl,zeroae/postgres-xl,arcivanov/postgres-xl,yazun/postgres-xl,rvs/gpdb,postmind-net/postgres-xl,janebeckman/gpdb,lisakowen/gpdb,snaga/postgres-xl,Quikling/gpdb,royc1/gpdb,50wu/gpdb,oberstet/postgres-xl,rubikloud/gpdb,snaga/postgres-xl,ashwinstar/gpdb,janebeckman/gpdb,lintzc/gpdb,edespino/gpdb,tangp3/gpdb,0x0FFF/gpdb,greenplum-db/gpdb,chrishajas/gpdb,CraigHarris/gpdb,CraigHarris/gpdb,janebeckman/gpdb,Postgres-XL/Postgres-XL,rvs/gpdb,Quikling/gpdb,xuegang/gpdb,snaga/postgres-xl,zaksoup/gpdb,yuanzhao/gpdb,yazun/postgres-xl,rubikloud/gpdb,CraigHarris/gpdb,kaknikhil/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,atris/gpdb,lintzc/gpdb,foyzur/gpdb,xinzweb/gpdb,royc1/gpdb,janebeckman/gpdb,pavanvd/postgres-xl,randomtask1155/gpdb,ahachete/gpdb,ovr/postgres-xl,xuegang/gpdb,xuegang/gpdb,edespino/gpdb,greenplum-db/gpdb,pavanvd/postgres-xl,Quikling/gpdb,ashwinstar/gpdb,Postgres-XL/Postgres-XL,foyzur/gpdb,xuegang/gpdb,postmind-net/postgres-xl,techdragon/Postgres-XL,greenplum-db/gpdb,yuanzhao/gpdb,randomtask1155/gpdb,Chibin/gpdb,janebeckman/gpdb,CraigHarris/gpdb,Chibin/gpdb,lintzc/gpdb,50wu/gpdb,rubikloud/gpdb,adam8157/gpdb,arcivanov/postgres-xl
4b32efb0f13060b1769d65a16a952b9b02b873a7
src/lib/mkdir-parents.c
src/lib/mkdir-parents.c
/* Copyright (c) 2003 Timo Sirainen */ #include "lib.h" #include "mkdir-parents.h" #include <sys/stat.h> int mkdir_parents(const char *path, mode_t mode) { const char *p; if (mkdir(path, mode) < 0 && errno != EEXIST) { if (errno != ENOENT) return -1; p = strrchr(path, '/'); if (p == NULL || p == path) return -1; /* shouldn't happen */ t_push(); if (mkdir_parents(t_strdup_until(path, p), mode) < 0) { t_pop(); return -1; } t_pop(); /* should work now */ if (mkdir(path, mode) < 0 && errno != EEXIST) return -1; } return 0; }
/* Copyright (c) 2003 Timo Sirainen */ #include "lib.h" #include "mkdir-parents.h" #include <sys/stat.h> int mkdir_parents(const char *path, mode_t mode) { const char *p; /* EISDIR check is for BSD/OS which returns it if path contains '/' at the end and it exists. */ if (mkdir(path, mode) < 0 && errno != EEXIST && errno != EISDIR) { if (errno != ENOENT) return -1; p = strrchr(path, '/'); if (p == NULL || p == path) return -1; /* shouldn't happen */ t_push(); if (mkdir_parents(t_strdup_until(path, p), mode) < 0) { t_pop(); return -1; } t_pop(); /* should work now */ if (mkdir(path, mode) < 0 && errno != EEXIST) return -1; } return 0; }
Check for EISDIR error as well. Fixed problems with BSD/OS.
Check for EISDIR error as well. Fixed problems with BSD/OS. --HG-- branch : HEAD
C
mit
dscho/dovecot,jwm/dovecot-notmuch,dscho/dovecot,jkerihuel/dovecot,jkerihuel/dovecot,jkerihuel/dovecot,jkerihuel/dovecot,dscho/dovecot,jkerihuel/dovecot,dscho/dovecot,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jwm/dovecot-notmuch,dscho/dovecot,jwm/dovecot-notmuch
c504a5c47a93476f4e28208bd8307e79e7340db0
JPetReaderInterface/JPetReaderInterface.h
JPetReaderInterface/JPetReaderInterface.h
/** * @copyright Copyright 2016 The J-PET Framework Authors. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may find a copy of the License in the LICENCE file. * * 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. * * @file JPetReaderInterface.h */ #ifndef JPETREADERINTERFACE_H #define JPETREADERINTERFACE_H #include <TNamed.h> // for Event typedef class JPetReaderInterface { public: typedef TObject MyEvent; virtual ~JPetReaderInterface() {;} virtual MyEvent& getCurrentEvent()=0; virtual bool nextEvent()=0; virtual bool firstEvent()=0; virtual bool lastEvent()=0; virtual bool nthEvent(int n)=0; virtual long long getCurrentEventNumber() const =0; virtual long long getNbOfAllEvents() const =0; virtual TObject* getObjectFromFile(const char* name)=0; virtual bool openFileAndLoadData(const char* filename, const char* treename)=0; virtual void closeFile()=0; }; #endif /* !JPETREADERINTERFACE_H */
/** * @copyright Copyright 2016 The J-PET Framework Authors. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may find a copy of the License in the LICENCE file. * * 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. * * @file JPetReaderInterface.h */ #ifndef JPETREADERINTERFACE_H #define JPETREADERINTERFACE_H #include <TNamed.h> // for Event typedef class JPetReaderInterface { public: typedef TObject MyEvent; virtual ~JPetReaderInterface() {;} virtual MyEvent& getCurrentEvent()=0; virtual bool nextEvent()=0; virtual bool firstEvent()=0; virtual bool lastEvent()=0; virtual bool nthEvent(long long int n)=0; virtual long long getCurrentEventNumber() const =0; virtual long long getNbOfAllEvents() const =0; virtual TObject* getObjectFromFile(const char* name)=0; virtual bool openFileAndLoadData(const char* filename, const char* treename)=0; virtual void closeFile()=0; }; #endif /* !JPETREADERINTERFACE_H */
Change int to long long
Change int to long long
C
apache-2.0
alexkernphysiker/j-pet-framework,alexkernphysiker/j-pet-framework,alexkernphysiker/j-pet-framework,alexkernphysiker/j-pet-framework,JPETTomography/j-pet-framework,JPETTomography/j-pet-framework,alexkernphysiker/j-pet-framework,JPETTomography/j-pet-framework
e192c702e056dd62480ac3a31fe44a4038d5cb0e
modules/template/src/hello.c
modules/template/src/hello.c
/* * Sample MPI "hello world" application in C * * J. Hursey * */ #include <stdio.h> #include "mpi.h" int main(int argc, char* argv[]) { int rank, size, len; char processor[MPI_MAX_PROCESSOR_NAME]; /* * Initialize the MPI library */ MPI_Init(&argc, &argv); /* * Get my 'rank' (unique ID) */ MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* * Get the size of the world (How many other 'processes' are there) */ MPI_Comm_size(MPI_COMM_WORLD, &size); /* * Get the processor name (usually the hostname) */ MPI_Get_processor_name(processor, &len); /* * Print a message from this process */ printf("Hello, world! I am %2d of %d on %s!\n", rank, size, processor); /* * Shutdown the MPI library before exiting */ MPI_Finalize(); return 0; }
/* * Sample MPI "hello world" application in C * * J. Hursey * */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include "mpi.h" int main(int argc, char* argv[]) { int rank, size, len; char processor[MPI_MAX_PROCESSOR_NAME]; char *name = NULL; /* * Initialize the MPI library */ MPI_Init(&argc, &argv); /* * Check to see if we have a command line argument for the name */ if( argc > 1 ) { name = strdup(argv[1]); } else { name = strdup("World"); } /* * Get my 'rank' (unique ID) */ MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* * Get the size of the world (How many other 'processes' are there) */ MPI_Comm_size(MPI_COMM_WORLD, &size); /* * Get the processor name (usually the hostname) */ MPI_Get_processor_name(processor, &len); /* * Print a message from this process */ printf("Hello, %s! I am %2d of %d on %s!\n", name, rank, size, processor); /* * Shutdown the MPI library before exiting */ MPI_Finalize(); /* * Cleanup */ if( NULL != name ) { free(name); name = NULL; } return 0; }
Add an optional command line parameter to demostrate a custom form field
Add an optional command line parameter to demostrate a custom form field
C
bsd-3-clause
OnRampOrg/onramp,OnRampOrg/onramp,ssfoley/onramp,koepked/onramp,koepked/onramp,koepked/onramp,koepked/onramp,koepked/onramp,ssfoley/onramp,OnRampOrg/onramp,OnRampOrg/onramp,koepked/onramp,ssfoley/onramp,OnRampOrg/onramp,OnRampOrg/onramp,ssfoley/onramp,OnRampOrg/onramp
90fd5ea47ef2c91bc908165a9acd946977155e86
include/flatcc/portable/pstdalign.h
include/flatcc/portable/pstdalign.h
#ifndef PSTDALIGN_H #define PSTDALIGN_H #ifndef __alignas_is_defined #ifndef __cplusplus #if (defined(__STDC__) && __STDC__ && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) /* C11 or newer */ #include <stdalign.h> #else #if defined(__GNUC__) || defined (__IBMC__) || defined(__clang__) #define _Alignas(t) __attribute__((__aligned__(t))) #define _Alignof(t) __alignof__(t) #elif defined(_MSC_VER) #define _Alignas(t) __declspec (align(t)) #define _Alignof(t) __alignof(t) #else #error please update pstdalign.h with support for current compiler #endif #define alignas _Alignas #define alignof _Alignof #define __alignas_is_defined 1 #define __alignof_is_defined 1 #endif /* __STDC_VERSION__ */ #endif /* __cplusplus */ #endif /* __alignas__is_defined */ #endif /* PSTDALIGN_H */
#ifndef PSTDALIGN_H #define PSTDALIGN_H #ifndef __alignas_is_defined #ifndef __cplusplus #if ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 7)) || defined(__IBMC__) #undef PORTABLE_C11_STDALIGN_MISSING #define PORTABLE_C11_STDALIGN_MISSING #endif #if (defined(__STDC__) && __STDC__ && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && \ !defined(PORTABLE_C11_STDALIGN_MISSING) /* C11 or newer */ #include <stdalign.h> #else #if defined(__GNUC__) || defined (__IBMC__) || defined(__clang__) #define _Alignas(t) __attribute__((__aligned__(t))) #define _Alignof(t) __alignof__(t) #elif defined(_MSC_VER) #define _Alignas(t) __declspec (align(t)) #define _Alignof(t) __alignof(t) #define alignas _Alignas #define alignof _Alignof #define __alignas_is_defined 1 #define __alignof_is_defined 1 #else #error please update pstdalign.h with support for current compiler #endif #endif /* __STDC__ */ #endif /* __cplusplus */ #endif /* __alignas__is_defined */ #endif /* PSTDALIGN_H */
Handle C11 compilers witout stdalign
Handle C11 compilers witout stdalign
C
apache-2.0
dvidelabs/flatcc,skhoroshavin/flatcc,skhoroshavin/flatcc,dvidelabs/flatcc,skhoroshavin/flatcc,dvidelabs/flatcc
9ebd09954a3b53fa5d87e8e3f1b1bb49c15b62e5
PolyMapGenerator/LineEquation.h
PolyMapGenerator/LineEquation.h
#ifndef LINE_EQUATION_H #define LINE_EQUATION_H #include "Vector2.h" class LineEquation { public: LineEquation(); LineEquation(Vector2 a, Vector2 b); LineEquation(Vector2 p, double m); ~LineEquation(); LineEquation(const LineEquation& e); LineEquation(LineEquation&& e); LineEquation& operator=(const LineEquation& e); LineEquation& operator=(LineEquation&& e); double operator()(const double x); void Move(const Vector2 v); Vector2 Intersection(LineEquation& e) const; bool IsHorizontal(); bool IsVertical(); double m; double b; bool vertical; }; #endif
#ifndef LINE_EQUATION_H #define LINE_EQUATION_H #include "Vector2.h" class LineEquation { public: LineEquation(); LineEquation(Vector2 p1, Vector2 p2); LineEquation(Vector2 p, double m); ~LineEquation(); LineEquation(const LineEquation& e); LineEquation(LineEquation&& e); LineEquation& operator=(const LineEquation& e); LineEquation& operator=(LineEquation&& e); double operator()(const double x); void Move(const Vector2 v); Vector2 Intersection(LineEquation& e) const; bool IsHorizontal(); bool IsVertical(); double m; double b; bool vertical; }; #endif
Modify parameter's name (name conflict)
Modify parameter's name (name conflict)
C
mit
utilForever/PolyMapGenerator
87239eaa106a3d4ada4f538b885d9372afa93c6c
include/GLState.h
include/GLState.h
// // Created by Asger Nyman Christiansen on 08/01/2017. // Copyright © 2017 Asger Nyman Christiansen. All rights reserved. // #pragma once namespace gle { class GLState { public: static void cull_back_faces(bool enable) { static bool currently_enabled = true; if(currently_enabled != enable) { if(enable) { glEnable(GL_CULL_FACE); glCullFace(GL_BACK); } else { glDisable(GL_CULL_FACE); } currently_enabled = enable; } } static void depth_test(bool enable) { static bool currently_enabled = false; if(currently_enabled != enable) { if(enable) { glEnable(GL_DEPTH_TEST); } else { glDisable(GL_DEPTH_TEST); } currently_enabled = enable; } } static void depth_write(bool enable) { static bool currently_enabled = true; if(currently_enabled != enable) { if(enable) { glDepthMask(GL_TRUE); } else { glDepthMask(GL_FALSE); } currently_enabled = enable; } } }; }
// // Created by Asger Nyman Christiansen on 08/01/2017. // Copyright © 2017 Asger Nyman Christiansen. All rights reserved. // #pragma once namespace gle { class GLState { public: static void cull_back_faces(bool enable) { static bool currently_enabled = false; if(currently_enabled != enable) { if(enable) { glEnable(GL_CULL_FACE); glCullFace(GL_BACK); } else { glDisable(GL_CULL_FACE); } currently_enabled = enable; } } static void depth_test(bool enable) { static bool currently_enabled = false; if(currently_enabled != enable) { if(enable) { glEnable(GL_DEPTH_TEST); } else { glDisable(GL_DEPTH_TEST); } currently_enabled = enable; } } static void depth_write(bool enable) { static bool currently_enabled = true; if(currently_enabled != enable) { if(enable) { glDepthMask(GL_TRUE); } else { glDepthMask(GL_FALSE); } currently_enabled = enable; } } }; }
Correct initialisation of cull back faces.
Bugfix: Correct initialisation of cull back faces.
C
mit
asny/GLEngine
7f34eeef5436765c791931b8a75fce002bf9e13a
src/app_mt/temp_profile.c
src/app_mt/temp_profile.c
#include "temp_profile.h" #include "sntp.h" float temp_profile_get_current_setpoint(const temp_profile_t* profile) { int i; uint32_t duration_into_profile = sntp_get_time() - profile->start_time; uint32_t step_begin = 0; float last_temp = profile->start_value.value; for (i = 0; i < profile->num_steps; ++i) { const temp_profile_step_t* step = &profile->steps[i]; uint32_t step_end = step_begin + step[i].duration; if (duration_into_profile >= step_begin && duration_into_profile < step_end) { if (step->type == STEP_HOLD) return step->value.value; else { return last_temp + ((last_temp - step->value.value) * (now - profile->start_time - step_begin) / step->duration); } } step_begin += step->duration; } return profile->steps[profile->num_steps-1].value.value; }
#include "temp_profile.h" #include "sntp.h" float temp_profile_get_current_setpoint(const temp_profile_t* profile) { int i; uint32_t duration_into_profile = sntp_get_time() - profile->start_time; uint32_t step_begin = 0; float last_temp = profile->start_value.value; for (i = 0; i < profile->num_steps; ++i) { const temp_profile_step_t* step = &profile->steps[i]; uint32_t step_end = step_begin + step[i].duration; if (duration_into_profile >= step_begin && duration_into_profile < step_end) { if (step->type == STEP_HOLD) return step->value.value; else { uint32_t duration_into_step = duration_into_profile - step_begin; return last_temp + ((last_temp - step->value.value) * duration_into_step / step->duration); } } step_begin += step->duration; } return profile->steps[profile->num_steps-1].value.value; }
Fix temp profile setpoint interpolation.
Fix temp profile setpoint interpolation.
C
mit
brewbit/model-t,brewbit/model-t,brewbit/model-t
25b8cee970500b0b82324807ad058d55ce10be41
src/ios/ChromeBluetooth.h
src/ios/ChromeBluetooth.h
@interface ChromeBluetooth : CDVPlugin { } #pragma mark chrome.bluetoothLowEnergy interface // chrome.bluetooth and chrome.bluetoothLowEnergy uses same file because connect, and disconnect // a deivce requires the same instance of CBCentralManager that found the device. - (void)connect:(CDVInvokedUrlCommand*)command; - (void)disconnect:(CDVInvokedUrlCommand*)command; - (void)getService:(CDVInvokedUrlCommand*)command; - (void)getServices:(CDVInvokedUrlCommand*)command; - (void)getCharacteristic:(CDVInvokedUrlCommand*)command; - (void)getCharacteristics:(CDVInvokedUrlCommand*)command; - (void)getIncludedServices:(CDVInvokedUrlCommand*)command; - (void)getDescriptor:(CDVInvokedUrlCommand*)command; - (void)getDescriptors:(CDVInvokedUrlCommand*)command; - (void)readCharacteristicValue:(CDVInvokedUrlCommand*)command; - (void)writeCharacteristicValue:(CDVInvokedUrlCommand*)command; - (void)startCharacteristicNotifications:(CDVInvokedUrlCommand*)command; - (void)stopCharacteristicNotifications:(CDVInvokedUrlCommand*)command; - (void)readDescriptorValue:(CDVInvokedUrlCommand*)command; - (void)writeDescriptorValue:(CDVInvokedUrlCommand*)command; - (void)registerBluetoothLowEnergyEvents:(CDVInvokedUrlCommand*)command; @end
@interface ChromeBluetooth : CDVPlugin { } #pragma mark chrome.bluetoothLowEnergy interface // chrome.bluetooth and chrome.bluetoothLowEnergy uses same file because connect, and disconnect // a deivce requires the same instance of CBCentralManager that found the device. - (void)connect:(CDVInvokedUrlCommand*)command; - (void)disconnect:(CDVInvokedUrlCommand*)command; - (void)getService:(CDVInvokedUrlCommand*)command; - (void)getServices:(CDVInvokedUrlCommand*)command; - (void)getCharacteristic:(CDVInvokedUrlCommand*)command; - (void)getCharacteristics:(CDVInvokedUrlCommand*)command; - (void)getIncludedServices:(CDVInvokedUrlCommand*)command; - (void)getDescriptor:(CDVInvokedUrlCommand*)command; - (void)getDescriptors:(CDVInvokedUrlCommand*)command; - (void)readCharacteristicValue:(CDVInvokedUrlCommand*)command; - (void)writeCharacteristicValue:(CDVInvokedUrlCommand*)command; - (void)startCharacteristicNotifications:(CDVInvokedUrlCommand*)command; - (void)stopCharacteristicNotifications:(CDVInvokedUrlCommand*)command; - (void)readDescriptorValue:(CDVInvokedUrlCommand*)command; - (void)writeDescriptorValue:(CDVInvokedUrlCommand*)command; - (void)registerBluetoothLowEnergyEvents:(CDVInvokedUrlCommand*)command; @end
Fix up missing newlines at eof
Fix up missing newlines at eof
C
bsd-3-clause
pwnall/cordova-plugin-chrome-apps-bluetooth,MobileChromeApps/cordova-plugin-chrome-apps-bluetooth,pwnall/cordova-plugin-chrome-apps-bluetooth,MobileChromeApps/cordova-plugin-chrome-apps-bluetooth
bb50e22fd3ad82381dbf750a790b8380a1a1bba5
src/get_load.c
src/get_load.c
// vim:ts=8:expandtab #include "i3status.h" const char *get_load() { static char part[512]; /* Get load */ #ifdef LINUX slurp("/proc/loadavg", part, sizeof(part)); *skip_character(part, ' ', 3) = '\0'; #else /* TODO: correctly check for NetBSD, check if it works the same on *BSD */ struct loadavg load; size_t length = sizeof(struct loadavg); int mib[2] = { CTL_VM, VM_LOADAVG }; if (sysctl(mib, 2, &load, &length, NULL, 0) < 0) die("Could not sysctl({ CTL_VM, VM_LOADAVG })\n"); double scale = load.fscale; (void)snprintf(part, sizeof(part), "%.02f %.02f %.02f", (double)load.ldavg[0] / scale, (double)load.ldavg[1] / scale, (double)load.ldavg[2] / scale); #endif return part; }
// vim:ts=8:expandtab #include "i3status.h" #include <err.h> #include <stdlib.h> #include <stdio.h> #include <string.h> const char *get_load() { static char part[512]; /* Get load */ #if defined(__FreeBSD__) || defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(sun) double loadavg[3]; if (getloadavg(loadavg, 3) == -1) errx(-1, "getloadavg() failed\n"); (void)snprintf(part, sizeof(part), "%1.2f %1.2f %1.2f", loadavg[0], loadavg[1], loadavg[2]); #else part[0] = '\0'; #endif return part; }
Use getloadavg() instead of using /proc, patch by Baptiste Daroussin
Use getloadavg() instead of using /proc, patch by Baptiste Daroussin
C
bsd-3-clause
mkroman/i3status,dj95/i3status,lexszero/i3status,DSMan195276/i3status,afh/i3status,opntr/i3status,Watcom/i3status,lastorset/i3status,Yuhta/i3status,opntr/i3status,rpetrano/i3status,JSmith-BitFlipper/i3status,Gravemind/i3status,puiterwijk/i3status,rpetrano/i3status,i3/i3status,stettberger/i3status,lexszero/i3status,lahwaacz/i3status,dj95/i3status,Dettorer/i3status,Gravemind/i3status,rpetrano/i3status,ixjlyons/i3status,puiterwijk/i3status,KarboniteKream/i3status,Gravemind/i3status,jasperla/i3status,puiterwijk/i3status,Watcom/i3status,ixjlyons/i3status,lbonn/i3status,lahwaacz/i3status,Detegr/i3status,mkroman/i3status,puiterwijk/i3status,Dettorer/i3status,i3/i3status,afh/i3status,glittershark/i3status,bsdjhb/i3status,DSMan195276/i3status,Gravemind/i3status,afh/i3status,KarboniteKream/i3status,jasperla/i3status,dj95/i3status,lastorset/i3status,i3/i3status,Detegr/i3status,glittershark/i3status,jasperla/i3status,ghedamat/i3status,peder2tm/i3status-netdev,rpetrano/i3status,bsdjhb/i3status,ghedamat/i3status,Airblader/i3status,lahwaacz/i3status,JSmith-BitFlipper/i3status,Yuhta/i3status,lbonn/i3status,lahwaacz/i3status,flammi/i3status,stettberger/i3status,peder2tm/i3status-netdev,opntr/i3status,KarboniteKream/i3status,DSMan195276/i3status,ixjlyons/i3status,mkroman/i3status,dj95/i3status,lbonn/i3status,Dettorer/i3status,Airblader/i3status,mkroman/i3status,Detegr/i3status,JSmith-BitFlipper/i3status,i3/i3status,ghedamat/i3status,Yuhta/i3status,flammi/i3status,glittershark/i3status,lbonn/i3status,Airblader/i3status,Yuhta/i3status,bsdjhb/i3status,flammi/i3status,Watcom/i3status,KarboniteKream/i3status,jasperla/i3status,ghedamat/i3status,lexszero/i3status,DSMan195276/i3status,peder2tm/i3status-netdev,peder2tm/i3status-netdev,glittershark/i3status,ixjlyons/i3status,JSmith-BitFlipper/i3status,lexszero/i3status,Dettorer/i3status,afh/i3status,Detegr/i3status,bsdjhb/i3status,Airblader/i3status,opntr/i3status,Watcom/i3status,flammi/i3status
3893e7e397b3932a3e6e604d2e7a82b260a1133e
libc/stdio/gets.c
libc/stdio/gets.c
/* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org> * * GNU Library General Public License (LGPL) version 2 or later. * * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. */ #include "_stdio.h" link_warning(gets, "the 'gets' function is dangerous and should not be used.") /* UNSAFE FUNCTION -- do not bother optimizing */ libc_hidden_proto(getchar_unlocked) libc_hidden_proto(__fgetc_unlocked) libc_hidden_proto(__stdin) char *gets(char *s) { register char *p = s; int c; __STDIO_AUTO_THREADLOCK_VAR; __STDIO_AUTO_THREADLOCK(stdin); /* Note: don't worry about performance here... this shouldn't be used! * Therefore, force actual function call. */ while (((c = getchar_unlocked()) != EOF) && ((*p = c) != '\n')) { ++p; } if ((c == EOF) || (s == p)) { s = NULL; } else { *p = 0; } __STDIO_AUTO_THREADUNLOCK(stdin); return s; }
/* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org> * * GNU Library General Public License (LGPL) version 2 or later. * * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. */ #include "_stdio.h" link_warning(gets, "the 'gets' function is dangerous and should not be used.") /* UNSAFE FUNCTION -- do not bother optimizing */ libc_hidden_proto(getchar_unlocked) libc_hidden_proto(__fgetc_unlocked) #ifdef __STDIO_GETC_MACRO libc_hidden_proto(__stdin) #else #define __stdin stdin #endif char *gets(char *s) { register char *p = s; int c; __STDIO_AUTO_THREADLOCK_VAR; __STDIO_AUTO_THREADLOCK(stdin); /* Note: don't worry about performance here... this shouldn't be used! * Therefore, force actual function call. */ while (((c = getchar_unlocked()) != EOF) && ((*p = c) != '\n')) { ++p; } if ((c == EOF) || (s == p)) { s = NULL; } else { *p = 0; } __STDIO_AUTO_THREADUNLOCK(stdin); return s; }
Build if GETC_MACRO use is disabled
Build if GETC_MACRO use is disabled
C
lgpl-2.1
ndmsystems/uClibc,wbx-github/uclibc-ng,klee/klee-uclibc,mephi42/uClibc,waweber/uclibc-clang,groundwater/uClibc,ddcc/klee-uclibc-0.9.33.2,foss-xtensa/uClibc,ysat0/uClibc,hwoarang/uClibc,klee/klee-uclibc,kraj/uClibc,gittup/uClibc,czankel/xtensa-uclibc,groundwater/uClibc,foss-xtensa/uClibc,groundwater/uClibc,skristiansson/uClibc-or1k,brgl/uclibc-ng,majek/uclibc-vx32,gittup/uClibc,OpenInkpot-archive/iplinux-uclibc,groundwater/uClibc,groundwater/uClibc,mephi42/uClibc,waweber/uclibc-clang,klee/klee-uclibc,atgreen/uClibc-moxie,hwoarang/uClibc,atgreen/uClibc-moxie,ysat0/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,hwoarang/uClibc,OpenInkpot-archive/iplinux-uclibc,mephi42/uClibc,czankel/xtensa-uclibc,skristiansson/uClibc-or1k,hjl-tools/uClibc,brgl/uclibc-ng,ffainelli/uClibc,atgreen/uClibc-moxie,ffainelli/uClibc,hwoarang/uClibc,czankel/xtensa-uclibc,ddcc/klee-uclibc-0.9.33.2,ffainelli/uClibc,gittup/uClibc,majek/uclibc-vx32,mephi42/uClibc,skristiansson/uClibc-or1k,m-labs/uclibc-lm32,ysat0/uClibc,m-labs/uclibc-lm32,foss-xtensa/uClibc,hjl-tools/uClibc,m-labs/uclibc-lm32,kraj/uclibc-ng,kraj/uclibc-ng,ndmsystems/uClibc,brgl/uclibc-ng,hjl-tools/uClibc,ffainelli/uClibc,kraj/uclibc-ng,OpenInkpot-archive/iplinux-uclibc,waweber/uclibc-clang,ChickenRunjyd/klee-uclibc,hjl-tools/uClibc,majek/uclibc-vx32,gittup/uClibc,ChickenRunjyd/klee-uclibc,ffainelli/uClibc,ndmsystems/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,wbx-github/uclibc-ng,ddcc/klee-uclibc-0.9.33.2,foss-xtensa/uClibc,klee/klee-uclibc,m-labs/uclibc-lm32,czankel/xtensa-uclibc,ChickenRunjyd/klee-uclibc,brgl/uclibc-ng,ysat0/uClibc,kraj/uClibc,atgreen/uClibc-moxie,wbx-github/uclibc-ng,ddcc/klee-uclibc-0.9.33.2,foss-for-synopsys-dwc-arc-processors/uClibc,kraj/uClibc,wbx-github/uclibc-ng,kraj/uclibc-ng,waweber/uclibc-clang,ChickenRunjyd/klee-uclibc,majek/uclibc-vx32,OpenInkpot-archive/iplinux-uclibc,ndmsystems/uClibc,kraj/uClibc,skristiansson/uClibc-or1k,hjl-tools/uClibc
5781c503d06f05637262564eafbb324adb39b344
SVNetworking/SVNetworking/SVNetworking.h
SVNetworking/SVNetworking/SVNetworking.h
// // SVNetworking.h // SVNetworking // // Created by Nate Stedman on 3/14/14. // Copyright (c) 2014 Svpply. All rights reserved. // #import <SVNetworking/NSObject+SVBindings.h> #import <SVNetworking/NSObject+SVMultibindings.h> #import <SVNetworking/SVDataRequest.h> #import <SVNetworking/SVDiskCache.h> #import <SVNetworking/SVFunctional.h> #import <SVNetworking/SVJSONRequest.h> #import <SVNetworking/SVRemoteImage.h> #import <SVNetworking/SVRemoteDataResource.h> #import <SVNetworking/SVRemoteJSONResource.h> #import <SVNetworking/SVRemoteResource.h> #import <SVNetworking/SVRequest.h>
// // SVNetworking.h // SVNetworking // // Created by Nate Stedman on 3/14/14. // Copyright (c) 2014 Svpply. All rights reserved. // #import <SVNetworking/NSObject+SVBindings.h> #import <SVNetworking/NSObject+SVMultibindings.h> #import <SVNetworking/SVDataRequest.h> #import <SVNetworking/SVDiskCache.h> #import <SVNetworking/SVFunctional.h> #import <SVNetworking/SVJSONRequest.h> #import <SVNetworking/SVRemoteImage.h> #import <SVNetworking/SVRemoteDataRequestResource.h> #import <SVNetworking/SVRemoteDataResource.h> #import <SVNetworking/SVRemoteJSONRequestResource.h> #import <SVNetworking/SVRemoteJSONResource.h> #import <SVNetworking/SVRemoteResource.h> #import <SVNetworking/SVRequest.h>
Add new resource classes to the header.
Add new resource classes to the header.
C
bsd-3-clause
eBay/SVNetworking,eBay/SVNetworking
5031c46ec40984d57fd0e4a1e53dc3490603b2ae
test/PCH/asm.c
test/PCH/asm.c
// Test this without pch. // RUN: clang-cc -include %S/asm.h -fsyntax-only -verify %s && // Test with pch. // RUN: clang-cc -emit-pch -o %t %S/asm.h && // RUN: clang-cc -include-pch %t -fsyntax-only -verify %s void call_f(void) { f(); } void call_clobbers(void) { clobbers(); }
// Test this without pch. // RUN: clang-cc -triple i386-unknown-unknown -include %S/asm.h -fsyntax-only -verify %s && // Test with pch. // RUN: clang-cc -triple i386-unknown-unknown -emit-pch -o %t %S/asm.h && // RUN: clang-cc -triple i386-unknown-unknown -include-pch %t -fsyntax-only -verify %s void call_f(void) { f(); } void call_clobbers(void) { clobbers(); }
Make this test portable to non-x86 hosts, patch by Mark Cianciosa!
Make this test portable to non-x86 hosts, patch by Mark Cianciosa! git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@71146 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-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,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
3624f96f852e276f9fc7731b9c43a9de42dd8983
test/helpers-Server.c
test/helpers-Server.c
#include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include "Server.h" char char_of_uint8(uint8_t x) { return (char) x; } uint32_t bufstrcpy(char *dst, const char *src) { /* The F* precondition guarantees that src is zero-terminated */ return sprintf(dst, "%s", src); } uint32_t print_u32(char *dst, uint32_t i) { return sprintf(dst, "%"PRIu32, i); }
#include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include "Server.h" uint32_t bufstrcpy(char *dst, const char *src) { /* The F* precondition guarantees that src is zero-terminated */ return sprintf(dst, "%s", src); } uint32_t print_u32(char *dst, uint32_t i) { return sprintf(dst, "%"PRIu32, i); }
Remove function now implemented in kremlib
Remove function now implemented in kremlib
C
apache-2.0
FStarLang/kremlin,FStarLang/kremlin,FStarLang/kremlin,FStarLang/kremlin
82b3f8023289175cf756187ab35318066715f430
src/modules/conf_theme/e_int_config_theme.h
src/modules/conf_theme/e_int_config_theme.h
/* * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 */ #ifdef E_TYPEDEFS #else #ifndef E_INT_CONFIG_THEME_H #define E_INT_CONFIG_THEME_H EAPI E_Config_Dialog *e_int_config_theme(E_Container *con, const char *params __UNUSED__); EAPI void e_int_config_theme_import_done(E_Config_Dialog *dia); EAPI void e_int_config_theme_update(E_Config_Dialog *dia, char *file); #endif #endif
/* * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 */ #ifdef E_TYPEDEFS #else #ifndef E_INT_CONFIG_THEME_H #define E_INT_CONFIG_THEME_H EAPI E_Config_Dialog *e_int_config_theme(E_Container *con, const char *params __UNUSED__); EAPI void e_int_config_theme_import_done(E_Config_Dialog *dia); EAPI void e_int_config_theme_update(E_Config_Dialog *dia, char *file); EAPI void e_int_config_theme_web_done(E_Config_Dialog *dia); #endif #endif
Declare public function in header.
Declare public function in header. git-svn-id: 0f3f1c46c6da7ffd142db61e503a7ff63af3a195@35475 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
C
bsd-2-clause
jordemort/e17,jordemort/e17,jordemort/e17
f755ecfb8cec7b19dff84295309f2afb24a5afd1
arch/powerpc/platforms/pseries/of_helpers.c
arch/powerpc/platforms/pseries/of_helpers.c
#include <linux/string.h> #include <linux/err.h> #include <linux/slab.h> #include <linux/of.h> #include "of_helpers.h" /** * pseries_of_derive_parent - basically like dirname(1) * @path: the full_name of a node to be added to the tree * * Returns the node which should be the parent of the node * described by path. E.g., for path = "/foo/bar", returns * the node with full_name = "/foo". */ struct device_node *pseries_of_derive_parent(const char *path) { struct device_node *parent; char *parent_path = "/"; const char *tail = kbasename(path); /* reject if path is "/" */ if (!strcmp(path, "/")) return ERR_PTR(-EINVAL); if (tail > path + 1) { parent_path = kstrndup(path, tail - path, GFP_KERNEL); if (!parent_path) return ERR_PTR(-ENOMEM); } parent = of_find_node_by_path(parent_path); if (strcmp(parent_path, "/")) kfree(parent_path); return parent ? parent : ERR_PTR(-EINVAL); }
#include <linux/string.h> #include <linux/err.h> #include <linux/slab.h> #include <linux/of.h> #include "of_helpers.h" /** * pseries_of_derive_parent - basically like dirname(1) * @path: the full_name of a node to be added to the tree * * Returns the node which should be the parent of the node * described by path. E.g., for path = "/foo/bar", returns * the node with full_name = "/foo". */ struct device_node *pseries_of_derive_parent(const char *path) { struct device_node *parent; char *parent_path = "/"; const char *tail; /* We do not want the trailing '/' character */ tail = kbasename(path) - 1; /* reject if path is "/" */ if (!strcmp(path, "/")) return ERR_PTR(-EINVAL); if (tail > path) { parent_path = kstrndup(path, tail - path, GFP_KERNEL); if (!parent_path) return ERR_PTR(-ENOMEM); } parent = of_find_node_by_path(parent_path); if (strcmp(parent_path, "/")) kfree(parent_path); return parent ? parent : ERR_PTR(-EINVAL); }
Correct string length in pseries_of_derive_parent()
powerpc/pseries: Correct string length in pseries_of_derive_parent() Commit a030e1e4bbd085bbcfd0a23f8d355fcd41f39bed make a change to use kstrndup() instead of kmalloc() + strlcpy() in the pseries_of_derive_parent() routine that introduces a subtle change in the parent path name generated. The kstrndup() routine will copy n characters followed by a terminating null, whereas strlcpy() will copy n-1 characters and add a terminating null. This slight difference results in having a parent path that includes the tailing '/' character, "/cpus/" vs. "/cpus". This then causes the subsequent call to of_find_node_by_path() to fail, and in the case of DLPAR add operations the DLPAR request fails. This patch decrements the pointer returned from kbasename() to point to the '/' character before the base name instead of the base name. This then adjusts the string length calculations to not include the trailing '/' in the parent path name. Signed-off-by: Nathan Fontenot <4b7bfe500077bf77c5456931a34b0b70e36e0bc6@linux.vnet.ibm.com> Reviewed-by: Andy Shevchenko <74f0c009df510614346aa771cd21959b78cdb413@linux.intel.com> Signed-off-by: Michael Ellerman <864f124608374e06e4da1fa5d2e47ed839b95411@ellerman.id.au>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
3151c3c004a5edac53a35a9a017cd7b9229cc85b
runtime/runtime_vars.c
runtime/runtime_vars.c
#include "gc.h" #include "runtime_vars.h" #include "scheduler.h" GC_Env* __get_GC_Env() { #ifdef MULTITHREAD return get_currentthread()->gcEnv; #else return currentthread->gcEnv; #endif }
#include "gc.h" #include "runtime_vars.h" #include "scheduler.h" GC_Env* __get_GC_Env() { #ifdef MULTITHREAD return get_currentthread()->gcEnv; #else return currentthread->gcEnv; #endif } ThreadData* __mellow_get_cur_green_thread() { #ifdef MULTITHREAD return get_currentthread(); #else return currentthread; #endif }
Add function to get current green thread at-will
Add function to get current green thread at-will
C
mit
Mellow-Programming-Language/Mellow,Mellow-Programming-Language/Mellow,Mellow-Programming-Language/Mellow
54fcf270dee6ed9d27e23b94129788b758df1e6b
include/uapi/linux/cifs/cifs_mount.h
include/uapi/linux/cifs/cifs_mount.h
/* * include/uapi/linux/cifs/cifs_mount.h * * Author(s): Scott Lovenberg (scott.lovenberg@gmail.com) * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either 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. */ #ifndef _CIFS_MOUNT_H #define _CIFS_MOUNT_H /* Max string lengths for cifs mounting options. */ #define CIFS_MAX_DOMAINNAME_LEN 256 /* max fully qualified domain name */ #define CIFS_MAX_USERNAME_LEN 256 /* reasonable max for current servers */ #define CIFS_MAX_PASSWORD_LEN 512 /* Windows max seems to be 256 wide chars */ #define CIFS_MAX_SHARE_LEN 80 #endif /* _CIFS_MOUNT_H */
/* * include/uapi/linux/cifs/cifs_mount.h * * Author(s): Scott Lovenberg (scott.lovenberg@gmail.com) * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either 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. */ #ifndef _CIFS_MOUNT_H #define _CIFS_MOUNT_H /* Max string lengths for cifs mounting options. */ #define CIFS_MAX_DOMAINNAME_LEN 256 /* max fully qualified domain name */ #define CIFS_MAX_USERNAME_LEN 256 /* reasonable max for current servers */ #define CIFS_MAX_PASSWORD_LEN 512 /* Windows max seems to be 256 wide chars */ #define CIFS_MAX_SHARE_LEN 256 /* reasonable max share name length */ #endif /* _CIFS_MOUNT_H */
Expand max share name length to 256
cifs: Expand max share name length to 256 The old max share name length limit was 80 due to Windows NET SHARE command not allowing more than that. However, share names can be much longer. This is a more reasonable maximum share name length. Signed-off-by: Scott Lovenberg <15023d7c1da44acb5cafa0fa8ca989be856d31b9@gmail.com> Reviewed-by: Jeff Layton <4376fbf8623cd7b7c0232225289bb91cedc0a27f@redhat.com> Signed-off-by: Steve French <51565b4e5841e493fd669866e11ea3c7c0d781cc@gmail.com>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
13f68420e7b441d5364055f2cc50f14e7b547f76
vp8/common/opencl/idctllm_cl.h
vp8/common/opencl/idctllm_cl.h
/* * Copyright (c) 2010 The WebM 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 "vp8_opencl.h" #define CLAMP(x,min,max) if (x < min) x = min; else if ( x > max ) x = max; const char *idctCompileOptions = "-Ivp8/common/opencl"; const char *idctllm_cl_file_name = "vp8/common/opencl/idctllm_cl.cl";
/* * Copyright (c) 2010 The WebM 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 "vp8_opencl.h" #define CLAMP(x,min,max) if (x < min) x = min; else if ( x > max ) x = max; //External functions that are fallbacks if CL is unavailable void vp8_short_idct4x4llm_c(short *input, short *output, int pitch); void vp8_short_idct4x4llm_1_c(short *input, short *output, int pitch); void vp8_dc_only_idct_add_c(short input_dc, unsigned char *pred_ptr, unsigned char *dst_ptr, int pitch, int stride); void vp8_short_inv_walsh4x4_c(short *input, short *output); void vp8_short_inv_walsh4x4_1_c(short *input, short *output); const char *idctCompileOptions = "-Ivp8/common/opencl"; const char *idctllm_cl_file_name = "vp8/common/opencl/idctllm_cl.cl";
Declare C fallbacks in IDCT header.
Declare C fallbacks in IDCT header.
C
bsd-3-clause
awatry/libvpx.opencl,awatry/libvpx.opencl,awatry/libvpx.opencl,awatry/libvpx.opencl
1475e4c1f1ae295038b97cbb8cdcdd42e9e27cf1
common/network/packet_type.h
common/network/packet_type.h
#ifndef __PACKET_TYPE_H__ #define __PACKET_TYPE_H__ enum PacketType { INVALID, USER, SHARED_MEM_REQ, SHARED_MEM_EVICT, SHARED_MEM_RESPONSE, SHARED_MEM_UPDATE_UNEXPECTED, SHARED_MEM_ACK, SHARED_MEM_TERMINATE_THREADS, MCP_REQUEST_TYPE, MCP_RESPONSE_TYPE, MCP_UTILIZATION_UPDATE_TYPE, NUM_PACKET_TYPES }; // This defines the different static network types enum EStaticNetwork { STATIC_NETWORK_USER, STATIC_NETWORK_MEMORY, STATIC_NETWORK_SYSTEM, NUM_STATIC_NETWORKS }; // Packets are routed to a static network based on their type. This // gives the static network to use for a given packet type. static EStaticNetwork g_type_to_static_network_map[] __attribute__((unused)) = { STATIC_NETWORK_SYSTEM, // INVALID STATIC_NETWORK_USER, // USER STATIC_NETWORK_MEMORY, // SM_REQ STATIC_NETWORK_MEMORY, // SM_EVICT STATIC_NETWORK_MEMORY, // SM_RESPONSE STATIC_NETWORK_MEMORY, // SM_UPDATE_UNEXPECTED STATIC_NETWORK_MEMORY, // SM_ACK STATIC_NETWORK_MEMORY, // SM_TERMINATE_THREADS STATIC_NETWORK_SYSTEM, // MCP_REQ STATIC_NETWORK_SYSTEM, // MCP_RESP STATIC_NETWORK_SYSTEM, // MCP_UTIL }; #endif
#ifndef __PACKET_TYPE_H__ #define __PACKET_TYPE_H__ enum PacketType { INVALID, USER, SHARED_MEM_REQ, SHARED_MEM_EVICT, SHARED_MEM_RESPONSE, SHARED_MEM_UPDATE_UNEXPECTED, SHARED_MEM_ACK, SHARED_MEM_TERMINATE_THREADS, MCP_REQUEST_TYPE, MCP_RESPONSE_TYPE, MCP_UTILIZATION_UPDATE_TYPE, MCP_SYSTEM_TYPE, NUM_PACKET_TYPES }; // This defines the different static network types enum EStaticNetwork { STATIC_NETWORK_USER, STATIC_NETWORK_MEMORY, STATIC_NETWORK_SYSTEM, NUM_STATIC_NETWORKS }; // Packets are routed to a static network based on their type. This // gives the static network to use for a given packet type. static EStaticNetwork g_type_to_static_network_map[] __attribute__((unused)) = { STATIC_NETWORK_SYSTEM, // INVALID STATIC_NETWORK_USER, // USER STATIC_NETWORK_MEMORY, // SM_REQ STATIC_NETWORK_MEMORY, // SM_EVICT STATIC_NETWORK_MEMORY, // SM_RESPONSE STATIC_NETWORK_MEMORY, // SM_UPDATE_UNEXPECTED STATIC_NETWORK_MEMORY, // SM_ACK STATIC_NETWORK_MEMORY, // SM_TERMINATE_THREADS STATIC_NETWORK_USER, // MCP_REQ STATIC_NETWORK_USER, // MCP_RESP STATIC_NETWORK_SYSTEM, // MCP_UTIL STATIC_NETWORK_SYSTEM, // MCP_SYSTEM }; #endif
Expand MCP messages to have user (modeled) and system (magic) types.
[network] Expand MCP messages to have user (modeled) and system (magic) types.
C
mit
8l/Graphite,8l/Graphite,mit-carbon/Graphite-Cycle-Level,8l/Graphite,mit-carbon/Graphite,nkawahara/Graphite,mit-carbon/Graphite,fhijaz/Graphite,nkawahara/Graphite,mit-carbon/Graphite-Cycle-Level,mit-carbon/Graphite,mit-carbon/Graphite-Cycle-Level,nkawahara/Graphite,fhijaz/Graphite,nkawahara/Graphite,victorisildur/Graphite,fhijaz/Graphite,victorisildur/Graphite,victorisildur/Graphite,mit-carbon/Graphite-Cycle-Level,8l/Graphite,mit-carbon/Graphite,fhijaz/Graphite,victorisildur/Graphite
7edfed86771a8b04c8b20919311f5493e07f775f
core/cont/inc/TListOfTypes.h
core/cont/inc/TListOfTypes.h
// @(#)root/cont // Author: Philippe Canal Aug 2013 /************************************************************************* * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TListOfTypes #define ROOT_TListOfTypes ////////////////////////////////////////////////////////////////////////// // // // TListOfTypes // // // // A collection of TDataType designed to hold the typedef information // // and numerical type information. The collection is populated on // // demand. // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_THastTable #include "THashTable.h" #endif class TDataType; class TListOfTypes : public THashTable { public: TListOfTypes(); using THashTable::FindObject; virtual TObject *FindObject(const char *name) const; virtual TDataType *FindType(const char *name) const; ClassDef(TListOfTypes,3); // Specical container for the list of types. }; #endif
// @(#)root/cont // Author: Philippe Canal Aug 2013 /************************************************************************* * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TListOfTypes #define ROOT_TListOfTypes ////////////////////////////////////////////////////////////////////////// // // // TListOfTypes // // // // A collection of TDataType designed to hold the typedef information // // and numerical type information. The collection is populated on // // demand. // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_THastTable #include "THashTable.h" #endif class TDataType; class TListOfTypes : public THashTable { public: TListOfTypes(); using THashTable::FindObject; virtual TObject *FindObject(const char *name) const; TDataType *FindType(const char *name) const; ClassDef(TListOfTypes,2); // Specical container for the list of types. }; #endif
Remove unnecessary virtual keyword. Lower version number to minimun.
Remove unnecessary virtual keyword. Lower version number to minimun.
C
lgpl-2.1
CristinaCristescu/root,root-mirror/root,agarciamontoro/root,Duraznos/root,zzxuanyuan/root-compressor-dummy,thomaskeck/root,CristinaCristescu/root,perovic/root,cxx-hep/root-cern,Duraznos/root,esakellari/root,CristinaCristescu/root,abhinavmoudgil95/root,jrtomps/root,sbinet/cxx-root,zzxuanyuan/root-compressor-dummy,karies/root,Y--/root,beniz/root,veprbl/root,lgiommi/root,lgiommi/root,smarinac/root,root-mirror/root,zzxuanyuan/root,nilqed/root,omazapa/root-old,nilqed/root,vukasinmilosevic/root,arch1tect0r/root,esakellari/root,perovic/root,thomaskeck/root,satyarth934/root,buuck/root,gbitzes/root,simonpf/root,arch1tect0r/root,zzxuanyuan/root-compressor-dummy,mhuwiler/rootauto,mkret2/root,sawenzel/root,gganis/root,gganis/root,gbitzes/root,sirinath/root,alexschlueter/cern-root,gganis/root,vukasinmilosevic/root,lgiommi/root,zzxuanyuan/root-compressor-dummy,satyarth934/root,olifre/root,Y--/root,georgtroska/root,perovic/root,simonpf/root,gbitzes/root,CristinaCristescu/root,mkret2/root,nilqed/root,sbinet/cxx-root,veprbl/root,omazapa/root-old,sirinath/root,arch1tect0r/root,esakellari/root,dfunke/root,mkret2/root,arch1tect0r/root,gbitzes/root,pspe/root,evgeny-boger/root,krafczyk/root,dfunke/root,jrtomps/root,cxx-hep/root-cern,omazapa/root,esakellari/my_root_for_test,thomaskeck/root,lgiommi/root,thomaskeck/root,gganis/root,satyarth934/root,lgiommi/root,zzxuanyuan/root-compressor-dummy,abhinavmoudgil95/root,0x0all/ROOT,abhinavmoudgil95/root,olifre/root,buuck/root,evgeny-boger/root,zzxuanyuan/root,simonpf/root,thomaskeck/root,mkret2/root,Y--/root,alexschlueter/cern-root,davidlt/root,mattkretz/root,esakellari/my_root_for_test,dfunke/root,karies/root,thomaskeck/root,davidlt/root,simonpf/root,vukasinmilosevic/root,omazapa/root,cxx-hep/root-cern,pspe/root,sbinet/cxx-root,evgeny-boger/root,bbockelm/root,omazapa/root-old,zzxuanyuan/root,arch1tect0r/root,0x0all/ROOT,mattkretz/root,bbockelm/root,root-mirror/root,mhuwiler/rootauto,zzxuanyuan/root,nilqed/root,mattkretz/root,sirinath/root,BerserkerTroll/root,root-mirror/root,zzxuanyuan/root,jrtomps/root,buuck/root,esakellari/my_root_for_test,buuck/root,abhinavmoudgil95/root,dfunke/root,krafczyk/root,karies/root,dfunke/root,Duraznos/root,agarciamontoro/root,sawenzel/root,esakellari/my_root_for_test,mhuwiler/rootauto,mkret2/root,gganis/root,sawenzel/root,nilqed/root,lgiommi/root,alexschlueter/cern-root,smarinac/root,sbinet/cxx-root,pspe/root,esakellari/my_root_for_test,Duraznos/root,zzxuanyuan/root,mkret2/root,sawenzel/root,satyarth934/root,krafczyk/root,olifre/root,bbockelm/root,agarciamontoro/root,mhuwiler/rootauto,agarciamontoro/root,perovic/root,Duraznos/root,sawenzel/root,davidlt/root,krafczyk/root,evgeny-boger/root,CristinaCristescu/root,olifre/root,mhuwiler/rootauto,Y--/root,pspe/root,root-mirror/root,satyarth934/root,zzxuanyuan/root-compressor-dummy,simonpf/root,gbitzes/root,abhinavmoudgil95/root,mhuwiler/rootauto,smarinac/root,georgtroska/root,esakellari/my_root_for_test,lgiommi/root,mattkretz/root,thomaskeck/root,georgtroska/root,sirinath/root,vukasinmilosevic/root,zzxuanyuan/root-compressor-dummy,root-mirror/root,veprbl/root,bbockelm/root,0x0all/ROOT,davidlt/root,satyarth934/root,olifre/root,krafczyk/root,0x0all/ROOT,agarciamontoro/root,mkret2/root,evgeny-boger/root,gganis/root,abhinavmoudgil95/root,simonpf/root,mhuwiler/rootauto,abhinavmoudgil95/root,karies/root,esakellari/root,sawenzel/root,BerserkerTroll/root,mhuwiler/rootauto,BerserkerTroll/root,thomaskeck/root,zzxuanyuan/root-compressor-dummy,bbockelm/root,mattkretz/root,gganis/root,davidlt/root,beniz/root,jrtomps/root,georgtroska/root,beniz/root,gbitzes/root,esakellari/root,krafczyk/root,Y--/root,buuck/root,gganis/root,vukasinmilosevic/root,smarinac/root,perovic/root,bbockelm/root,satyarth934/root,perovic/root,davidlt/root,sirinath/root,lgiommi/root,sirinath/root,smarinac/root,georgtroska/root,georgtroska/root,BerserkerTroll/root,cxx-hep/root-cern,sbinet/cxx-root,georgtroska/root,bbockelm/root,agarciamontoro/root,alexschlueter/cern-root,davidlt/root,sirinath/root,mkret2/root,veprbl/root,BerserkerTroll/root,simonpf/root,sawenzel/root,agarciamontoro/root,sawenzel/root,krafczyk/root,mhuwiler/rootauto,simonpf/root,abhinavmoudgil95/root,omazapa/root,omazapa/root-old,karies/root,simonpf/root,buuck/root,thomaskeck/root,omazapa/root,BerserkerTroll/root,veprbl/root,nilqed/root,pspe/root,mattkretz/root,pspe/root,0x0all/ROOT,evgeny-boger/root,bbockelm/root,pspe/root,karies/root,esakellari/root,omazapa/root-old,BerserkerTroll/root,sbinet/cxx-root,krafczyk/root,olifre/root,evgeny-boger/root,nilqed/root,beniz/root,mattkretz/root,jrtomps/root,gbitzes/root,dfunke/root,simonpf/root,georgtroska/root,agarciamontoro/root,mkret2/root,root-mirror/root,nilqed/root,gganis/root,veprbl/root,0x0all/ROOT,beniz/root,dfunke/root,gbitzes/root,jrtomps/root,omazapa/root,sbinet/cxx-root,arch1tect0r/root,gbitzes/root,esakellari/my_root_for_test,arch1tect0r/root,pspe/root,zzxuanyuan/root-compressor-dummy,esakellari/root,BerserkerTroll/root,0x0all/ROOT,esakellari/my_root_for_test,arch1tect0r/root,root-mirror/root,vukasinmilosevic/root,root-mirror/root,buuck/root,omazapa/root,georgtroska/root,zzxuanyuan/root,pspe/root,cxx-hep/root-cern,dfunke/root,beniz/root,zzxuanyuan/root,beniz/root,CristinaCristescu/root,smarinac/root,CristinaCristescu/root,jrtomps/root,lgiommi/root,esakellari/root,CristinaCristescu/root,omazapa/root-old,lgiommi/root,zzxuanyuan/root,smarinac/root,mhuwiler/rootauto,Duraznos/root,thomaskeck/root,omazapa/root,nilqed/root,zzxuanyuan/root,omazapa/root,sawenzel/root,alexschlueter/cern-root,krafczyk/root,cxx-hep/root-cern,Duraznos/root,karies/root,bbockelm/root,dfunke/root,gganis/root,perovic/root,abhinavmoudgil95/root,evgeny-boger/root,Y--/root,perovic/root,jrtomps/root,davidlt/root,evgeny-boger/root,vukasinmilosevic/root,0x0all/ROOT,omazapa/root-old,karies/root,jrtomps/root,zzxuanyuan/root-compressor-dummy,nilqed/root,Y--/root,Y--/root,arch1tect0r/root,georgtroska/root,beniz/root,omazapa/root-old,arch1tect0r/root,gbitzes/root,Y--/root,pspe/root,Y--/root,satyarth934/root,0x0all/ROOT,omazapa/root,karies/root,jrtomps/root,veprbl/root,gganis/root,olifre/root,pspe/root,veprbl/root,davidlt/root,BerserkerTroll/root,veprbl/root,dfunke/root,sbinet/cxx-root,smarinac/root,veprbl/root,davidlt/root,bbockelm/root,CristinaCristescu/root,mattkretz/root,beniz/root,sawenzel/root,omazapa/root,omazapa/root-old,sirinath/root,vukasinmilosevic/root,perovic/root,root-mirror/root,bbockelm/root,agarciamontoro/root,smarinac/root,buuck/root,omazapa/root-old,satyarth934/root,esakellari/root,simonpf/root,omazapa/root-old,sawenzel/root,jrtomps/root,sbinet/cxx-root,Duraznos/root,sbinet/cxx-root,esakellari/root,buuck/root,satyarth934/root,alexschlueter/cern-root,abhinavmoudgil95/root,zzxuanyuan/root-compressor-dummy,root-mirror/root,cxx-hep/root-cern,nilqed/root,lgiommi/root,karies/root,mhuwiler/rootauto,abhinavmoudgil95/root,mattkretz/root,veprbl/root,dfunke/root,esakellari/my_root_for_test,perovic/root,buuck/root,agarciamontoro/root,sbinet/cxx-root,satyarth934/root,buuck/root,sirinath/root,Duraznos/root,BerserkerTroll/root,mattkretz/root,sirinath/root,olifre/root,CristinaCristescu/root,evgeny-boger/root,beniz/root,Duraznos/root,omazapa/root,vukasinmilosevic/root,mattkretz/root,krafczyk/root,olifre/root,esakellari/root,vukasinmilosevic/root,Duraznos/root,zzxuanyuan/root,agarciamontoro/root,gbitzes/root,alexschlueter/cern-root,arch1tect0r/root,evgeny-boger/root,karies/root,smarinac/root,mkret2/root,georgtroska/root,sirinath/root,Y--/root,esakellari/my_root_for_test,davidlt/root,krafczyk/root,perovic/root,beniz/root,CristinaCristescu/root,olifre/root,cxx-hep/root-cern,olifre/root,zzxuanyuan/root,mkret2/root,BerserkerTroll/root,vukasinmilosevic/root
e6f3a0156453cfd376e90f50ee93acfda2b03e9e
BotKit/BotKit.h
BotKit/BotKit.h
// // BotKit.h // BotKit // // Created by Mark Adams on 9/28/12. // Copyright (c) 2012 thoughtbot. All rights reserved. // #import "BKCoreDataManager.h" #import "BKManagedViewController.h" #import "BKManagedTableViewController.h" #import "NSObject+Coding.h" #import "NSArray+ObjectAccess.h" #import "NSDate+RelativeDates.h" #import "UIColor+AdjustColor.h" #import "UIColor+Serialization.h" #import "NSArray+Filtering.h" /* TODOS: BKImageLoader -imageWithContentsOfURL:completionHandler: -imageWithContentsOFURLPath:completionHandler: UIImage: +imageWithContentsOfURLPath: NSArray: -filteredArrayWhereKeys:matchValue:withMethod: -filteredArrayWhereKeys:containValue:caseInsensitive:diacritical: NSURLRequest: +requestWithString: +requestWithURL: NSDate: -dateStringWithFormat: -dateStringWithStyle: */
// // BotKit.h // BotKit // // Created by Mark Adams on 9/28/12. // Copyright (c) 2012 thoughtbot. All rights reserved. // #import "BKCoreDataManager.h" #import "BKManagedViewController.h" #import "BKManagedTableViewController.h" #import "NSObject+BKCoding.h" #import "NSArray+ObjectAccess.h" #import "NSDate+RelativeDates.h" #import "UIColor+AdjustColor.h" #import "UIColor+Serialization.h" #import "NSArray+Filtering.h" /* TODOS: BKImageLoader -imageWithContentsOfURL:completionHandler: -imageWithContentsOFURLPath:completionHandler: UIImage: +imageWithContentsOfURLPath: NSArray: -filteredArrayWhereKeys:matchValue:withMethod: -filteredArrayWhereKeys:containValue:caseInsensitive:diacritical: NSURLRequest: +requestWithString: +requestWithURL: NSDate: -dateStringWithFormat: -dateStringWithStyle: */
Fix reference to BKCoding category
Fix reference to BKCoding category
C
mit
thoughtbot/BotKit,thoughtbot/BotKit
df2aa1efbb940aa7bf5ef49235e1d7aff0d52128
test/Analysis/array-struct.c
test/Analysis/array-struct.c
// RUN: clang -checker-simple -verify %s // RUN: clang -checker-simple -analyzer-store-region -verify %s struct s { int data; int data_array[10]; }; typedef struct { int data; } STYPE; void f(void) { int a[10]; int (*p)[10]; p = &a; (*p)[3] = 1; struct s d; struct s *q; q = &d; q->data = 3; d.data_array[9] = 17; } void f2() { char *p = "/usr/local"; char (*q)[4]; q = &"abc"; } void f3() { STYPE s; }
// RUN: clang -checker-simple -verify %s // RUN: clang -checker-simple -analyzer-store-region -verify %s struct s { int data; int data_array[10]; }; typedef struct { int data; } STYPE; void f(void) { int a[10]; int (*p)[10]; p = &a; (*p)[3] = 1; struct s d; struct s *q; q = &d; q->data = 3; d.data_array[9] = 17; } void f2() { char *p = "/usr/local"; char (*q)[4]; q = &"abc"; } void f3() { STYPE s; } void f4() { int a[] = { 1, 2, 3}; int b[3] = { 1, 2 }; }
Add test code for array initialization.
Add test code for array initialization. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@58502 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
3d1e914af227fd8fd7a41420664b225bf63e8f81
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2013 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.04.00-k4"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2013 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.04.00-k5"
Update driver version to 5.04.00-k5
qla4xxx: Update driver version to 5.04.00-k5 Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com> Reviewed-by: Mike Christie <6fe105eefab41990d7ec714c6c25ade3095cdb48@cs.wisc.edu> Signed-off-by: Christoph Hellwig <923f7720577207a44b32e59bbfbea59d27f1ae8e@lst.de>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
458e459c372dca5579958aa760b4f3e2fc4c0e35
bandit/registration/registrar.h
bandit/registration/registrar.h
#ifndef BANDIT_REGISTRATION_REGISTRAR_H #define BANDIT_REGISTRATION_REGISTRAR_H #include <bandit/registration/spec_registry.h> namespace bandit { namespace detail { struct spec_registrar { spec_registrar(std::function<void()> func) { bandit::detail::specs().push_back(func); } }; } } #define BANDIT_CONCAT2(a, b) a##b #define BANDIT_CONCAT(a, b) BANDIT_CONCAT2(a, b) #define BANDIT_ADD_COUNTER(a) SNOWHOUSE_CONCAT(a, __COUNTER__) #define go_bandit \ static bandit::detail::spec_registrar BANDIT_ADD_COUNTER(bandit_registrar_) #define SPEC_BEGIN(name) \ go_bandit([]{ #define SPEC_END \ }); #endif
#ifndef BANDIT_REGISTRATION_REGISTRAR_H #define BANDIT_REGISTRATION_REGISTRAR_H #include <bandit/registration/spec_registry.h> namespace bandit { namespace detail { struct spec_registrar { spec_registrar(std::function<void()> func) { bandit::detail::specs().push_back(func); } }; } } #define BANDIT_CONCAT2(a, b) a##b #define BANDIT_CONCAT(a, b) BANDIT_CONCAT2(a, b) #define BANDIT_ADD_COUNTER(a) BANDIT_CONCAT(a, __COUNTER__) #define go_bandit \ static bandit::detail::spec_registrar BANDIT_ADD_COUNTER(bandit_registrar_) #define SPEC_BEGIN(name) \ go_bandit([]{ #define SPEC_END \ }); #endif
Use BANDIT_CONCAT instead of SNOWHOUSE_CONCAT macro
Use BANDIT_CONCAT instead of SNOWHOUSE_CONCAT macro Resolves #134
C
mit
joakimkarlsson/bandit,joakimkarlsson/bandit,joakimkarlsson/bandit
594d5743324d6748cb3fb1fa01c559ec4b225a34
src/SE_CInputManager.h
src/SE_CInputManager.h
/* * This file is part of SpeakEasy. * Copyright (C) 2012 Lambert Clara <lambert.clara@yahoo.fr> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /** * @file SE_CInputManager.h * @brief Input devices manager * * @author Lambert Clara <lambert.clara@yahoo.fr> * @date Created : 2012-04-23 */ #pragma once #include "SE_IBaseManager.h" class SE_CInputManager : public SE_IBaseManager { public: explicit SE_CInputManager(); ~SE_CInputManager(); void startUp() override; void shutDown() override; };
/* * This file is part of SpeakEasy. * Copyright (C) 2012 Lambert Clara <lambert.clara@yahoo.fr> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /** * @file SE_CInputManager.h * @brief Input devices manager * * @author Lambert Clara <lambert.clara@yahoo.fr> * @date Created : 2012-04-23 */ #pragma once #include "SE_IBaseManager.h" class SE_CInputManager : public SE_IBaseManager { public: SE_CInputManager(); ~SE_CInputManager(); void startUp() override; void shutDown() override; };
Remove useless explicit keyword on constructors without arguments.
Remove useless explicit keyword on constructors without arguments.
C
agpl-3.0
belkiss/SpeakEasy,belkiss/SpeakEasy
81cb088385ca4a1f63b7b308a8766117eaf90c09
drivers/scsi/qla2xxx/qla_version.h
drivers/scsi/qla2xxx/qla_version.h
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2013 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.06.00.08-k" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 6 #define QLA_DRIVER_PATCH_VER 0 #define QLA_DRIVER_BETA_VER 0
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2013 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.06.00.12-k" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 6 #define QLA_DRIVER_PATCH_VER 0 #define QLA_DRIVER_BETA_VER 0
Update the driver version to 8.06.00.12-k.
[SCSI] qla2xxx: Update the driver version to 8.06.00.12-k. Signed-off-by: Giridhar Malavali <799b6491fce2c7a80b5fedcf9a728560cc9eb954@qlogic.com> Signed-off-by: Saurav Kashyap <88d6fd94e71a9ac276fc44f696256f466171a3c0@qlogic.com> Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
302313fc0923fb3cc142e3a37c54e5f0f5ebdaa4
test/FrontendC/vla-2.c
test/FrontendC/vla-2.c
// RUN: %llvmgcc -std=gnu99 %s -S -o - | grep ".*alloca.*align 32" extern void bar(int[]); void foo(int a) { int var[a] __attribute__((__aligned__(32))); bar(var); return; }
// RUN: %llvmgcc -std=gnu99 %s -S -o - | grep ".*alloca.*align 16" extern void bar(int[]); void foo(int a) { int var[a] __attribute__((__aligned__(16))); bar(var); return; }
Update this to use a "valid" alignment.
Update this to use a "valid" alignment. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@108985 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm
dfc6e33a4089b9f76dfb9aaf22014daa925849a2
radiant-player-mac/LastFm/LastFmPopover.h
radiant-player-mac/LastFm/LastFmPopover.h
/* * LastFmPopover.h * * Created by Sajid Anwar. * * Subject to terms and conditions in LICENSE.md. * */ #import <Cocoa/Cocoa.h> #import <LastFM/LastFm.h> #import "LastFmService.h" #define LASTFM_SIGN_IN_TAG 1 @interface LastFmPopover : NSPopover<NSPopoverDelegate> @property (retain) IBOutlet LastFmService *service; - (void)refreshTracks; @end
/* * LastFmPopover.h * * Created by Sajid Anwar. * * Subject to terms and conditions in LICENSE.md. * */ #import <Cocoa/Cocoa.h> #import <LastFm/LastFm.h> #import "LastFmService.h" #define LASTFM_SIGN_IN_TAG 1 @interface LastFmPopover : NSPopover<NSPopoverDelegate> @property (retain) IBOutlet LastFmService *service; - (void)refreshTracks; @end
Fix case sensitive import statement
Fix case sensitive import statement Fixes #190
C
mit
kbhomes/radiant-player-mac,radiant-player/radiant-player-mac,kbhomes/radiant-player-mac,kbhomes/radiant-player-mac,radiant-player/radiant-player-mac,kbhomes/radiant-player-mac,radiant-player/radiant-player-mac,radiant-player/radiant-player-mac,kbhomes/radiant-player-mac,radiant-player/radiant-player-mac
b51aa35a0453a008bd583f4e8cfcf9a0eb22366b
Markup.h
Markup.h
//*************************************************************************** extern "C" { #import <Cocoa/Cocoa.h> #import "RWPluginFramework.h" } //*************************************************************************** #pragma mark Logging #if ENABLE_LOGGING # define Log NSLog # define LOG_ENTRY NSLog(@"Entered: %s (%@:%d)", __func__, [[NSString stringWithCString:__FILE__] lastPathComponent], __LINE__); #else # define Log(...) do { } while(0); # define LOG_ENTRY do { } while(0); #endif //*************************************************************************** @interface Markup : RWAbstractPlugin { @public BOOL usingSmartQuotes; } + (Markup*) sharedMarkupPlugin; + (NSBundle*) sharedBundle; + (NSArray*) markupStyles; + (NSNumber*) markupEnabledForFilterStyleInSelectedRange:(NSString*)markupStyleName; + (void) addMarkupMenuItem; @end //*************************************************************************** extern const NSString* const kMarkupStyleFilterCommand; extern const NSString* const kMarkupStyleName; extern const int kMarkupTextMenuItemTag; //***************************************************************************
//*************************************************************************** extern "C" { #import <Cocoa/Cocoa.h> #import "RWPluginFramework.h" } //*************************************************************************** #pragma mark Logging #if ENABLE_LOGGING # define Log NSLog # define LOG_ENTRY NSLog(@"Entered: %s (%@:%d)", __func__, [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__); #else # define Log(...) do { } while(0); # define LOG_ENTRY do { } while(0); #endif //*************************************************************************** @interface Markup : RWAbstractPlugin { @public BOOL usingSmartQuotes; } + (Markup*) sharedMarkupPlugin; + (NSBundle*) sharedBundle; + (NSArray*) markupStyles; + (NSNumber*) markupEnabledForFilterStyleInSelectedRange:(NSString*)markupStyleName; + (void) addMarkupMenuItem; @end //*************************************************************************** extern const NSString* const kMarkupStyleFilterCommand; extern const NSString* const kMarkupStyleName; extern const int kMarkupTextMenuItemTag; //***************************************************************************
Use stringWithUTF8String instead of deprecated stringWithCString
Use stringWithUTF8String instead of deprecated stringWithCString
C
mit
andrep/rw-markup,andrep/rw-markup,andrep/rw-markup
0c831cc87a2effc6791e946858afaf5156d0edfc
deal.II/base/include/base/std_cxx1x/shared_ptr.h
deal.II/base/include/base/std_cxx1x/shared_ptr.h
//--------------------------------------------------------------------------- // $Id$ // Version: $Name$ // // Copyright (C) 2009 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer // to the file deal.II/doc/license.html for the text and // further information on this license. // //--------------------------------------------------------------------------- #ifndef __deal2__std_cxx1x_shared_ptr_h #define __deal2__std_cxx1x_shared_ptr_h #include <base/config.h> #ifdef DEAL_II_CAN_USE_CXX1X # include <memory> #else #include <boost/shared_ptr.hpp> DEAL_II_NAMESPACE_OPEN namespace std_cxx1x { using boost::shared_ptr; using boost::enable_shared_from_this; } DEAL_II_NAMESPACE_CLOSE #endif #endif
//--------------------------------------------------------------------------- // $Id$ // Version: $Name$ // // Copyright (C) 2009 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer // to the file deal.II/doc/license.html for the text and // further information on this license. // //--------------------------------------------------------------------------- #ifndef __deal2__std_cxx1x_shared_ptr_h #define __deal2__std_cxx1x_shared_ptr_h #include <base/config.h> #ifdef DEAL_II_CAN_USE_CXX1X # include <memory> #else #include <boost/shared_ptr.hpp> #include <boost/scoped_ptr.hpp> DEAL_II_NAMESPACE_OPEN namespace std_cxx1x { using boost::shared_ptr; using boost::enable_shared_from_this; // boost doesn't have boost::unique_ptr, // but its scoped_ptr comes close so // re-implement unique_ptr using scoped_ptr template<class T> class unique_ptr : public boost::scoped_ptr<T> { public: explicit unique_ptr(T * p = 0) : boost::scoped_ptr<T> (p) {} }; } DEAL_II_NAMESPACE_CLOSE #endif #endif
Implement the equivalent of std::unique_ptr using boost::scoped_ptr.
Implement the equivalent of std::unique_ptr using boost::scoped_ptr. git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@19195 0785d39b-7218-0410-832d-ea1e28bc413d
C
lgpl-2.1
sriharisundar/dealii,YongYang86/dealii,sriharisundar/dealii,kalj/dealii,sriharisundar/dealii,YongYang86/dealii,sriharisundar/dealii,flow123d/dealii,flow123d/dealii,johntfoster/dealii,ibkim11/dealii,gpitton/dealii,pesser/dealii,ibkim11/dealii,spco/dealii,jperryhouts/dealii,shakirbsm/dealii,ibkim11/dealii,JaeryunYim/dealii,danshapero/dealii,lue/dealii,YongYang86/dealii,mac-a/dealii,andreamola/dealii,ESeNonFossiIo/dealii,danshapero/dealii,flow123d/dealii,EGP-CIG-REU/dealii,sairajat/dealii,mac-a/dealii,lue/dealii,lpolster/dealii,johntfoster/dealii,YongYang86/dealii,kalj/dealii,nicolacavallini/dealii,pesser/dealii,johntfoster/dealii,sairajat/dealii,kalj/dealii,johntfoster/dealii,maieneuro/dealii,flow123d/dealii,maieneuro/dealii,danshapero/dealii,JaeryunYim/dealii,shakirbsm/dealii,rrgrove6/dealii,nicolacavallini/dealii,shakirbsm/dealii,msteigemann/dealii,JaeryunYim/dealii,andreamola/dealii,mtezzele/dealii,andreamola/dealii,angelrca/dealii,adamkosik/dealii,YongYang86/dealii,lpolster/dealii,mac-a/dealii,angelrca/dealii,danshapero/dealii,msteigemann/dealii,flow123d/dealii,pesser/dealii,Arezou-gh/dealii,msteigemann/dealii,mac-a/dealii,lue/dealii,jperryhouts/dealii,ESeNonFossiIo/dealii,sairajat/dealii,shakirbsm/dealii,andreamola/dealii,msteigemann/dealii,lpolster/dealii,gpitton/dealii,andreamola/dealii,EGP-CIG-REU/dealii,danshapero/dealii,adamkosik/dealii,gpitton/dealii,msteigemann/dealii,EGP-CIG-REU/dealii,lue/dealii,Arezou-gh/dealii,rrgrove6/dealii,andreamola/dealii,natashasharma/dealii,mtezzele/dealii,YongYang86/dealii,rrgrove6/dealii,naliboff/dealii,spco/dealii,sairajat/dealii,johntfoster/dealii,naliboff/dealii,natashasharma/dealii,danshapero/dealii,gpitton/dealii,msteigemann/dealii,JaeryunYim/dealii,lpolster/dealii,flow123d/dealii,jperryhouts/dealii,ESeNonFossiIo/dealii,rrgrove6/dealii,JaeryunYim/dealii,sriharisundar/dealii,angelrca/dealii,maieneuro/dealii,kalj/dealii,danshapero/dealii,jperryhouts/dealii,angelrca/dealii,Arezou-gh/dealii,nicolacavallini/dealii,pesser/dealii,natashasharma/dealii,mac-a/dealii,Arezou-gh/dealii,natashasharma/dealii,adamkosik/dealii,ESeNonFossiIo/dealii,maieneuro/dealii,mtezzele/dealii,natashasharma/dealii,mtezzele/dealii,JaeryunYim/dealii,ESeNonFossiIo/dealii,naliboff/dealii,kalj/dealii,ibkim11/dealii,maieneuro/dealii,andreamola/dealii,rrgrove6/dealii,spco/dealii,kalj/dealii,sairajat/dealii,nicolacavallini/dealii,lpolster/dealii,mac-a/dealii,shakirbsm/dealii,pesser/dealii,naliboff/dealii,kalj/dealii,angelrca/dealii,Arezou-gh/dealii,mac-a/dealii,adamkosik/dealii,lue/dealii,natashasharma/dealii,rrgrove6/dealii,YongYang86/dealii,nicolacavallini/dealii,gpitton/dealii,msteigemann/dealii,shakirbsm/dealii,adamkosik/dealii,gpitton/dealii,maieneuro/dealii,jperryhouts/dealii,rrgrove6/dealii,flow123d/dealii,nicolacavallini/dealii,lpolster/dealii,mtezzele/dealii,johntfoster/dealii,spco/dealii,ibkim11/dealii,nicolacavallini/dealii,jperryhouts/dealii,EGP-CIG-REU/dealii,spco/dealii,EGP-CIG-REU/dealii,shakirbsm/dealii,EGP-CIG-REU/dealii,jperryhouts/dealii,lue/dealii,JaeryunYim/dealii,angelrca/dealii,naliboff/dealii,sairajat/dealii,mtezzele/dealii,ibkim11/dealii,pesser/dealii,spco/dealii,naliboff/dealii,johntfoster/dealii,adamkosik/dealii,adamkosik/dealii,maieneuro/dealii,sairajat/dealii,spco/dealii,Arezou-gh/dealii,ESeNonFossiIo/dealii,Arezou-gh/dealii,mtezzele/dealii,lpolster/dealii,lue/dealii,gpitton/dealii,pesser/dealii,naliboff/dealii,sriharisundar/dealii,natashasharma/dealii,sriharisundar/dealii,angelrca/dealii,ibkim11/dealii,ESeNonFossiIo/dealii,EGP-CIG-REU/dealii
799d09c40076c5187d25f489963f2a112cb7703b
sys/sys/devfsext.h
sys/sys/devfsext.h
/* usual BSD style copyright here */ /* Written by Julian Elischer (julian@dialix.oz.au)*/ /* * $Id: devfsext.h,v 1.6 1996/01/21 09:03:04 julian Exp $ */ #ifndef _SYS_DEVFSECT_H_ #define _SYS_DEVFSECT_H_ 1 void *devfs_add_devsw(char *path, char *name, void *devsw, int minor, int chrblk, uid_t uid, gid_t gid, int perms) ; void *devfs_add_devswf(void *devsw, int minor, int chrblk, uid_t uid, gid_t gid, int perms, char *fmt, ...) ; void *dev_link(char *path, char *name, void *original); /* the result of a previous dev_link or dev_add operation */ /* remove the device the cookie represents */ void devfs_remove_dev(void *devnmp); #define DV_CHR 0 #define DV_BLK 1 #define DV_DEV 2 #endif /*_SYS_DEVFSECT_H_*/
/* usual BSD style copyright here */ /* Written by Julian Elischer (julian@dialix.oz.au)*/ /* * $Id: devfsext.h,v 1.7 1996/01/25 07:17:05 phk Exp $ */ #ifndef _SYS_DEVFSECT_H_ #define _SYS_DEVFSECT_H_ 1 void *devfs_add_devsw(char *path, char *name, void *devsw, int minor, int chrblk, uid_t uid, gid_t gid, int perms) ; void *devfs_add_devswf(void *devsw, int minor, int chrblk, uid_t uid, gid_t gid, int perms, char *fmt, ...) ; void *dev_link(char *path, char *name, void *original); /* the result of a previous dev_link or dev_add operation */ /* remove the device the cookie represents */ void devfs_remove_dev(void *devnmp); #define DV_CHR 0 #define DV_BLK 1 #define DV_DEV 2 /* XXX */ #define UID_ROOT 0 #define UID_BIN 3 #define UID_UUCP 66 /* XXX */ #define GID_WHEEL 0 #define GID_KMEM 2 #define GID_OPERATOR 5 #define GID_BIN 7 #define GID_DIALER 68 #endif /*_SYS_DEVFSECT_H_*/
Define magic uids and gids for use in devfs_add_devsw[f]().
Define magic uids and gids for use in devfs_add_devsw[f](). The kernel shouldn't know these values, but there is currently no better way of setting them.
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
4577174153ee0fbabc142fee3bf4c178b56ec635
test/CodeGen/pr41027.c
test/CodeGen/pr41027.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -S -O2 -o - %s | FileCheck %s // CHECK-LABEL: f: // CHECK: movl $1, %eax // CHECK-NEXT: #APP // CHECK-NEXT: outl %eax, $1 // CHECK-NEXT: #NO_APP static inline void pr41027(unsigned a, unsigned b) { if (__builtin_constant_p(a)) { __asm__ volatile("outl %0,%w1" : : "a"(b), "n"(a)); } else { __asm__ volatile("outl %0,%w1" : : "a"(b), "d"(a)); } } void f(unsigned port) { pr41027(1, 1); }
// REQUIRES: x86-registered-target // RUN: %clang_cc1 -triple x86_64-unknown-unknown -S -O2 -o - %s | FileCheck %s // CHECK-LABEL: f: // CHECK: movl $1, %eax // CHECK-NEXT: #APP // CHECK-NEXT: outl %eax, $1 // CHECK-NEXT: #NO_APP static inline void pr41027(unsigned a, unsigned b) { if (__builtin_constant_p(a)) { __asm__ volatile("outl %0,%w1" : : "a"(b), "n"(a)); } else { __asm__ volatile("outl %0,%w1" : : "a"(b), "d"(a)); } } void f(unsigned port) { pr41027(1, 1); }
Add target requirements for those bots which don't handle x86.
Add target requirements for those bots which don't handle x86. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@368202 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
af58e8d5600753082455ec1ebedae00a6cf8ba32
test/FrontendC/2007-10-01-BuildArrayRef.c
test/FrontendC/2007-10-01-BuildArrayRef.c
// RUN: not %llvmgcc -S %s -o /dev/null |& grep "error: assignment of read-only location" // PR 1603 int func() { const int *arr; arr[0] = 1; }
// RUN: not %llvmgcc_only -c %s -o /dev/null |& FileCheck %s // PR 1603 void func() { const int *arr; arr[0] = 1; // CXHECK: error: assignment of read-only location } struct foo { int bar; }; struct foo sfoo = { 0 }; int func2() { const struct foo *fp; fp = &sfoo; fp[0].bar = 1; // CHECK: error: assignment of read-only member 'bar' return sfoo.bar; }
Test case for r113248. Raar 8361341.
Test case for r113248. Raar 8361341. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@113249 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm
2004a168dc481a9b3a2986741507e953efa7afab
bindings/uwp/uwp-binding/Microsoft.Azure.IoT.Gateway/GatewayUwp.h
bindings/uwp/uwp-binding/Microsoft.Azure.IoT.Gateway/GatewayUwp.h
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #pragma once #include "pch.h" #include "..\..\..\..\core\inc\gateway_ll.h" #include "IGatewayModule.h" namespace Microsoft { namespace Azure { namespace IoT { namespace Gateway { interface class IGatewayModule; ref class MessageBus; class InternalGatewayModule : public IInternalGatewayModule { public: InternalGatewayModule(IGatewayModule ^moduleImpl) { _moduleImpl = moduleImpl; } virtual ~InternalGatewayModule() { } void Module_Create(MESSAGE_BUS_HANDLE busHandle, const void* configuration); void Module_Destroy(); void Module_Receive(MODULE_HANDLE moduleHandle, MESSAGE_HANDLE messageHandle); private: IGatewayModule^ _moduleImpl; }; public ref class Gateway sealed { public: Gateway(Windows::Foundation::Collections::IVector<Microsoft::Azure::IoT::Gateway::IGatewayModule^>^ modules); virtual ~Gateway() { Gateway_LL_UwpDestroy(gateway_handle); gateway_handle = nullptr; VECTOR_destroy(modules_handle); } private: VECTOR_HANDLE modules_handle; GATEWAY_HANDLE gateway_handle; MESSAGE_BUS_HANDLE messagebus_handle; std::vector<std::unique_ptr<InternalGatewayModule>> gatewayModulesToDelete; }; }}}};
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #pragma once #include "pch.h" #include "gateway.h" #include "IGatewayModule.h" namespace Microsoft { namespace Azure { namespace IoT { namespace Gateway { interface class IGatewayModule; ref class MessageBus; class InternalGatewayModule : public IInternalGatewayModule { public: InternalGatewayModule(IGatewayModule ^moduleImpl) { _moduleImpl = moduleImpl; } virtual ~InternalGatewayModule() { } void Module_Create(MESSAGE_BUS_HANDLE busHandle, const void* configuration); void Module_Destroy(); void Module_Receive(MODULE_HANDLE moduleHandle, MESSAGE_HANDLE messageHandle); private: IGatewayModule^ _moduleImpl; }; public ref class Gateway sealed { public: Gateway(Windows::Foundation::Collections::IVector<Microsoft::Azure::IoT::Gateway::IGatewayModule^>^ modules); virtual ~Gateway() { Gateway_LL_UwpDestroy(gateway_handle); gateway_handle = nullptr; VECTOR_destroy(modules_handle); } private: VECTOR_HANDLE modules_handle; GATEWAY_HANDLE gateway_handle; MESSAGE_BUS_HANDLE messagebus_handle; std::vector<std::unique_ptr<InternalGatewayModule>> gatewayModulesToDelete; }; }}}};
Fix gateway header path in UWP
Fix gateway header path in UWP
C
mit
yaweiw/azure-iot-gateway-sdk,yaweiw/azure-iot-gateway-sdk,yaweiw/azure-iot-gateway-sdk,yaweiw/azure-iot-gateway-sdk,yaweiw/azure-iot-gateway-sdk
7304ae70f7c369b6dbb47edd3517c4c0c11a0def
webkit/glue/simple_webmimeregistry_impl.h
webkit/glue/simple_webmimeregistry_impl.h
// Copyright (c) 2009 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 WEBMIMEREGISTRY_IMPL_H_ #define WEBMIMEREGISTRY_IMPL_H_ #include "third_party/WebKit/WebKit/chromium/public/WebMimeRegistry.h" namespace webkit_glue { class SimpleWebMimeRegistryImpl : public WebKit::WebMimeRegistry { public: // WebMimeRegistry methods: virtual WebKit::WebMimeRegistry::SupportsType supportsMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsImageMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsJavaScriptMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsMediaMIMEType( const WebKit::WebString&, const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsNonImageMIMEType( const WebKit::WebString&); virtual WebKit::WebString mimeTypeForExtension(const WebKit::WebString&); virtual WebKit::WebString mimeTypeFromFile(const WebKit::WebString&); virtual WebKit::WebString preferredExtensionForMIMEType( const WebKit::WebString&); }; } // namespace webkit_glue #endif // WEBMIMEREGISTRY_IMPL_H_
// Copyright (c) 2009 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 WEBMIMEREGISTRY_IMPL_H_ #define WEBMIMEREGISTRY_IMPL_H_ #include "third_party/WebKit/WebKit/chromium/public/WebMimeRegistry.h" namespace webkit_glue { class SimpleWebMimeRegistryImpl : public WebKit::WebMimeRegistry { public: SimpleWebMimeRegistryImpl() {} virtual ~SimpleWebMimeRegistryImpl() {} // WebMimeRegistry methods: virtual WebKit::WebMimeRegistry::SupportsType supportsMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsImageMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsJavaScriptMIMEType( const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsMediaMIMEType( const WebKit::WebString&, const WebKit::WebString&); virtual WebKit::WebMimeRegistry::SupportsType supportsNonImageMIMEType( const WebKit::WebString&); virtual WebKit::WebString mimeTypeForExtension(const WebKit::WebString&); virtual WebKit::WebString mimeTypeFromFile(const WebKit::WebString&); virtual WebKit::WebString preferredExtensionForMIMEType( const WebKit::WebString&); }; } // namespace webkit_glue #endif // WEBMIMEREGISTRY_IMPL_H_
Add a virtual destructor to SimpleWebMimeRegistryImpl so that child class destructors get called correctly.
Add a virtual destructor to SimpleWebMimeRegistryImpl so that child class destructors get called correctly. BUG=62828 TEST=No memory leak in TestShellWebMimeRegistryImpl Review URL: http://codereview.chromium.org/4880002 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@65967 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
gavinp/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,adobe/chromium,adobe/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium
bb2994d4d628484f1bb1befa0b7098db71d74a4d
random.c
random.c
#include "random.h" #include <stdio.h> #include <stdlib.h> #include <time.h> #include <unistd.h> void seed_random(void) { /* Single iteration of Xorshift to get a good seed. */ unsigned int seed = time(NULL) ^ getpid(); seed ^= (seed << 19); seed ^= (seed >> 11); seed ^= (seed << 9); printf("seed = %u\n", seed); srandom(seed); } int random_range(int min, int max) { int range, bucket, remainder, r; range = max - min; bucket = RAND_MAX / range; remainder = RAND_MAX % range; while ((r = random()) > (RAND_MAX - remainder)) ; return min + (r / bucket); }
#include "random.h" #include <stdio.h> #include <stdlib.h> #include <time.h> #include <unistd.h> void seed_random(void) { /* Single iteration of Xorshift to get a good seed. */ unsigned int seed = time(NULL) ^ getpid(); seed ^= (seed << 19); seed ^= (seed >> 11); seed ^= (seed << 9); fprintf(stderr, "seed = %u\n", seed); srandom(seed); } int random_range(int min, int max) { int range, bucket, remainder, r; range = max - min; bucket = RAND_MAX / range; remainder = RAND_MAX % range; while ((r = random()) > (RAND_MAX - remainder)) ; return min + (r / bucket); }
Print seed to stderr, not stdout.
Print seed to stderr, not stdout.
C
mit
ingramj/dice
9cf8f370f0777a24808b3485f3b5abb8e736d3e8
include/asm-parisc/param.h
include/asm-parisc/param.h
#ifndef _ASMPARISC_PARAM_H #define _ASMPARISC_PARAM_H #ifdef __KERNEL__ # ifdef CONFIG_PA20 # define HZ 1000 /* Faster machines */ # else # define HZ 100 /* Internal kernel timer frequency */ # endif # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ #endif #ifndef HZ #define HZ 100 #endif #define EXEC_PAGESIZE 4096 #ifndef NOGROUP #define NOGROUP (-1) #endif #define MAXHOSTNAMELEN 64 /* max length of hostname */ #endif
#ifndef _ASMPARISC_PARAM_H #define _ASMPARISC_PARAM_H #ifdef __KERNEL__ #define HZ CONFIG_HZ #define USER_HZ 100 /* some user API use "ticks" */ #define CLOCKS_PER_SEC (USER_HZ) /* like times() */ #endif #ifndef HZ #define HZ 100 #endif #define EXEC_PAGESIZE 4096 #ifndef NOGROUP #define NOGROUP (-1) #endif #define MAXHOSTNAMELEN 64 /* max length of hostname */ #endif
Use CONFIG_HZ to determine interval timer rate (aka clock ticks)
[PARISC] Use CONFIG_HZ to determine interval timer rate (aka clock ticks) This isn't likely to be causing problems for other bits of kernel code. I can't find any other user of CONFIG_HZ outside of arch specific code. Signed-off-by: Grant Grundler <fd58b8293aeebb072b32124aef6e8da71dd5739c@parisc-linux.org> Signed-off-by: Kyle McMartin <3c25b01657254677d3e1a8fd1f0742c5d489bd39@parisc-linux.org>
C
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas
62f68976927c28ad86144c596576d6311a21f2bd
src/argon2_node.h
src/argon2_node.h
#ifndef ARGON2_NODE_H #define ARGON2_NODE_H #include <memory> #include <nan.h> namespace NodeArgon2 { class HashAsyncWorker final: public Nan::AsyncWorker { public: HashAsyncWorker(std::string&& plain, std::string&& salt, std::tuple<uint32_t, uint32_t, uint32_t, argon2_type>&& params); void Execute() override; void HandleOKCallback() override; void HandleErrorCallback() override; private: std::string plain; std::string salt; uint32_t time_cost; uint32_t memory_cost; uint32_t parallelism; argon2_type type; std::unique_ptr<char[]> output; }; class VerifyAsyncWorker final: public Nan::AsyncWorker { public: VerifyAsyncWorker(std::string&& hash, std::string&& plain, argon2_type type); void Execute() override; void HandleOKCallback() override; void HandleErrorCallback() override; private: std::string hash; std::string plain; argon2_type type; bool output; }; NAN_METHOD(Hash); NAN_METHOD(HashSync); NAN_METHOD(Verify); NAN_METHOD(VerifySync); } #endif /* ARGON2_NODE_H */
#ifndef ARGON2_NODE_H #define ARGON2_NODE_H #include <memory> #include <nan.h> namespace NodeArgon2 { class HashAsyncWorker final: public Nan::AsyncWorker { public: explicit HashAsyncWorker(std::string&& plain, std::string&& salt, std::tuple<uint32_t, uint32_t, uint32_t, argon2_type>&& params); void Execute() override; void HandleOKCallback() override; void HandleErrorCallback() override; private: std::string plain; std::string salt; uint32_t time_cost; uint32_t memory_cost; uint32_t parallelism; argon2_type type; std::unique_ptr<char[]> output; }; class VerifyAsyncWorker final: public Nan::AsyncWorker { public: explicit VerifyAsyncWorker(std::string&& hash, std::string&& plain, argon2_type type); void Execute() override; void HandleOKCallback() override; void HandleErrorCallback() override; private: std::string hash; std::string plain; argon2_type type; bool output; }; NAN_METHOD(Hash); NAN_METHOD(HashSync); NAN_METHOD(Verify); NAN_METHOD(VerifySync); } #endif /* ARGON2_NODE_H */
Use explicit constructors for correctness
Use explicit constructors for correctness
C
mit
markfejes/node-argon2,markfejes/node-argon2,markfejes/node-argon2,ranisalt/node-argon2,ranisalt/node-argon2,ranisalt/node-argon2
ff22d76862b24b1ca7152ca624cdd2e9772a23b6
src/math/p_atan.c
src/math/p_atan.c
#include <pal.h> /** * * Calculates inverse tangent (arc tangent) of the input value. The function * returns a value between -pi/2 to pi/2 but does not check for illegal input * values. * * @param a Pointer to input vector * * @param c Pointer to output vector * * @param n Size of 'a' and 'c' vector. * * @return None * */ #include <math.h> void p_atan_f32(const float *a, float *c, int n) { int i; for (i = 0; i < n; i++) { *(c + i) = atan(*(a + i)); } }
#include <pal.h> /* * -1 <= x <= 1 * atan x = a1 * x + a3 * x^3 + ... + a9 * x^9 + e(x) * |e(x)| <= 10^-5 */ static inline float _p_atan(const float x) { const float a1 = 0.9998660f; const float a3 = -0.3302995f; const float a5 = 0.1801410f; const float a7 = -0.0851330f; const float a9 = 0.0208351f; return a1 * x + a3 * x * x * x + a5 * x * x * x * x * x + a7 * x * x * x * x * x * x * x + a9 * x * x * x * x * x * x * x * x * x; } /** * * Calculates inverse tangent (arc tangent) of the input value. The function * returns a value between -pi/2 to pi/2 but does not check for illegal input * values. * * @param a Pointer to input vector * * @param c Pointer to output vector * * @param n Size of 'a' and 'c' vector. * * @return None * */ #include <math.h> void p_atan_f32(const float *a, float *c, int n) { int i; for (i = 0; i < n; i++) { c[i] = _p_atan(a[i]); } }
Implement the inverse tangent function.
math:atan: Implement the inverse tangent function. Signed-off-by: Mansour Moufid <ac5f6b12fab5e0d4efa7215e6c2dac9d55ab77dc@gmail.com>
C
apache-2.0
Adamszk/pal3,Adamszk/pal3,aolofsson/pal,eliteraspberries/pal,mateunho/pal,parallella/pal,8l/pal,aolofsson/pal,olajep/pal,mateunho/pal,8l/pal,debug-de-su-ka/pal,olajep/pal,mateunho/pal,Adamszk/pal3,mateunho/pal,parallella/pal,aolofsson/pal,aolofsson/pal,debug-de-su-ka/pal,Adamszk/pal3,parallella/pal,debug-de-su-ka/pal,olajep/pal,parallella/pal,8l/pal,8l/pal,debug-de-su-ka/pal,eliteraspberries/pal,mateunho/pal,eliteraspberries/pal,debug-de-su-ka/pal,eliteraspberries/pal,eliteraspberries/pal,olajep/pal,parallella/pal
033bfcb84aa88dde9779c789e4aefeb20bb899ed
lelib/lelib.h
lelib/lelib.h
// // lelib.h // lelib // // Created by Petr on 27.10.13. // Copyright (c) 2013 JLizard. All rights reserved. // #define LE_DEBUG_LOGS 1 #if LE_DEBUG_LOGS #define LE_DEBUG(...) NSLog(__VA_ARGS__) #else #define LE_DEBUG(...) #endif #import "LELog.h" #import "lecore.h"
// // lelib.h // lelib // // Created by Petr on 27.10.13. // Copyright (c) 2013 JLizard. All rights reserved. // #ifndef LE_DEBUG_LOGS #ifdef DEBUG #define LE_DEBUG_LOGS 1 #else #define LE_DEBUG_LOGS 0 #endif #endif #if LE_DEBUG_LOGS #define LE_DEBUG(...) NSLog(__VA_ARGS__) #else #define LE_DEBUG(...) #endif #import "LELog.h" #import "lecore.h"
Allow logging to be configured at compilation time.
Allow logging to be configured at compilation time.
C
mit
smalltownheroes/le_ios,omgapuppy/le_ios,omgapuppy/le_ios,omgapuppy/le_ios,smalltownheroes/le_ios,logentries/le_ios,JohnLemberger/le_ios,KieranOB/le_ios,smalltownheroes/le_ios
394d5c9d3ae0f8e3ff40ae98a3eeab43004c85e6
src/interrupts.h
src/interrupts.h
#ifndef INTERRUPTS_H #define INTERRUPTS_H #include "types.h" namespace interrupts { // Enable interrupts on the CPU. inline void enable() { asm volatile("sti"); } // Enable interrupts on the CPU. inline void disable() { asm volatile("cli"); } struct Registers { u32 gs, fs, es, ds; // Segment registers. u32 edi, esi, ebp, esp, ebx, edx, ecx, eax; // From 'pusha' instruction. u32 interruptNum; u32 eip, cs, eflags, useresp, ss; // Pushed by CPU on interrupt. }; using IrqHandlerFn = void (*)(Registers*); void setIrqHandler(u32 irqNum, IrqHandlerFn handlerFn); void init(); void initIsrs(); void initIrqs(); void remapPic(); extern "C" void interruptHandler(Registers* regs); } // namespace interrupts #endif
#ifndef INTERRUPTS_H #define INTERRUPTS_H #include "types.h" namespace interrupts { // Enable interrupts on the CPU. inline void enable() { asm volatile("sti"); } // Enable interrupts on the CPU. inline void disable() { asm volatile("cli"); } struct Registers { u32 gs, fs, es, ds; // Segment registers. u32 edi, esi, ebp, esp, ebx, edx, ecx, eax; // From 'pusha' instruction. u32 interruptNum; u32 eip, cs, eflags, useresp, ss; // Pushed by CPU on interrupt. }; using IrqHandlerFn = void (*)(Registers*); void setIrqHandler(u32 irqNum, IrqHandlerFn handlerFn); void init(); void remapPic(); extern "C" void interruptHandler(Registers* regs); } // namespace interrupts #endif
Remove prototypes for removed functions.
Remove prototypes for removed functions.
C
isc
tsion/spideros,tsion/spideros,tsion/spideros
ef0e80e41dafccc5d3b64b37d150b4cee858997e
src/alpha-memory.c
src/alpha-memory.c
#include "papi.h" int get_memory_info( PAPI_mem_info_t * mem_info ){ int retval = 0; return PAPI_OK; } long _papi_hwd_get_dmem_info(int option){ }
#include "papi.h" #include <sys/procfs.h> #include <stdio.h> #include <fcntl.h> int get_memory_info( PAPI_mem_info_t * mem_info ){ int retval = 0; return PAPI_OK; } long _papi_hwd_get_dmem_info(int option){ pid_t pid = getpid(); prpsinfo_t info; char pfile[256]; int fd; sprintf(pfile, "/proc/%05d", pid); if((fd=open(pfile,O_RDONLY)) <0 ) { DBG((stderr,"PAPI_get_dmem_info can't open /proc/%d\n",pid)); return(PAPI_ESYS); } if(ioctl(fd, PIOCPSINFO, &info)<0){ return(PAPI_ESYS); } close(fd); switch(option){ case PAPI_GET_RESSIZE: return(info.pr_rssize); case PAPI_GET_SIZE: return(info.pr_size); default: return(PAPI_EINVAL); } }
Support for dynamic memory information added for Alpha
Support for dynamic memory information added for Alpha
C
bsd-3-clause
pyrovski/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,arm-hpc/papi,arm-hpc/papi,arm-hpc/papi
613d7f23227b5b763e3ebe58442b5edaefe324ba
lib/debug_msg.c
lib/debug_msg.c
/** * @file debug_msg.c Debug Message function */ /* $Id$ */ #include "gangliaconf.h" int debug_level = 0; /** * @fn void debug_msg(const char *format, ...) * Prints the message to STDERR if DEBUG is #defined * @param format The format of the msg (see printf manpage) * @param ... Optional arguments */ void debug_msg(const char *format, ...) { if (debug_level && format) { va_list ap; va_start(ap, format); vfprintf(stderr, format, ap); fprintf(stderr,"\n"); va_end(ap); } return; }
/** * @file debug_msg.c Debug Message function */ /* $Id$ */ #include "gangliaconf.h" int debug_level = 0; /** * @fn void debug_msg(const char *format, ...) * Prints the message to STDERR if DEBUG is #defined * @param format The format of the msg (see printf manpage) * @param ... Optional arguments */ void debug_msg(const char *format, ...) { if (debug_level > 1 && format) { va_list ap; va_start(ap, format); vfprintf(stderr, format, ap); fprintf(stderr,"\n"); va_end(ap); } return; }
Debug level 1 now only shows error messages (and no backgrounding in gmetad).
Debug level 1 now only shows error messages (and no backgrounding in gmetad).
C
bsd-3-clause
phreakocious/monitor-core,phreakocious/monitor-core,mjzhou/monitor-core,lawrencewu/monitor-core,dmourati/monitor-core,phreakocious/monitor-core,fastly/monitor-core,fastly/monitor-core,lawrencewu/monitor-core,ganglia/monitor-core,torkelsson/monitor-core,phreakocious/monitor-core,ganglia/monitor-core,fastly/monitor-core,dmourati/monitor-core,fastly/monitor-core,hinesmr/monitor-core,dmourati/monitor-core,NoodlesNZ/monitor-core,hinesmr/monitor-core,sdgdsffdsfff/monitor-core,torkelsson/monitor-core,NoodlesNZ/monitor-core,torkelsson/monitor-core,mjzhou/monitor-core,lawrencewu/monitor-core,NoodlesNZ/monitor-core,torkelsson/monitor-core,NoodlesNZ/monitor-core,ganglia/monitor-core,phreakocious/monitor-core,hinesmr/monitor-core,torkelsson/monitor-core,NoodlesNZ/monitor-core,phreakocious/monitor-core,sdgdsffdsfff/monitor-core,lawrencewu/monitor-core,mjzhou/monitor-core,hinesmr/monitor-core,sdgdsffdsfff/monitor-core,mjzhou/monitor-core,fastly/monitor-core,mjzhou/monitor-core,torkelsson/monitor-core,ganglia/monitor-core,ganglia/monitor-core,sdgdsffdsfff/monitor-core,ganglia/monitor-core,NoodlesNZ/monitor-core,mjzhou/monitor-core,lawrencewu/monitor-core,ganglia/monitor-core,lawrencewu/monitor-core,sdgdsffdsfff/monitor-core,mjzhou/monitor-core,dmourati/monitor-core,torkelsson/monitor-core,ganglia/monitor-core,sdgdsffdsfff/monitor-core,dmourati/monitor-core,fastly/monitor-core,dmourati/monitor-core,hinesmr/monitor-core,lawrencewu/monitor-core,NoodlesNZ/monitor-core,sdgdsffdsfff/monitor-core,phreakocious/monitor-core,fastly/monitor-core
1c48a973b28eeb5747e5c0780a7bc0a1ad1b3b09
src/config.h
src/config.h
#include "can/canutil.h" namespace openxc { namespace config { typedef struct { int messageSetIndex; } Configuration; Configuration CONFIG; } // namespace config } // namespace openxc
#ifndef _CONFIG_H_ #define _CONFIG_H_ #include "can/canutil.h" namespace openxc { namespace config { typedef struct { int messageSetIndex; } Configuration; static Configuration CONFIG; } // namespace config } // namespace openxc #endif // _CONFIG_H_
Make sure CONFIG is static and only imported once.
Make sure CONFIG is static and only imported once.
C
bsd-3-clause
mgiannikouris/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware,ene-ilies/vi-firmware,mgiannikouris/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,mgiannikouris/vi-firmware,mgiannikouris/vi-firmware,openxc/vi-firmware
8a879a16cffbd6e379ea041f759d1f7fa1631496
test/C++Frontend/2003-05-22-LocalTypeTest.c
test/C++Frontend/2003-05-22-LocalTypeTest.c
struct sometimes { short offset; short bit; short live_length; short calls_crossed; } Y; int main() { struct sometimes { int X, Y; } S; S.X = 1; return Y.offset; }
#include <stdio.h> struct sometimes { short offset; short bit; short live_length; short calls_crossed; } Y; int main() { int X; { struct sometimes { int X, Y; } S; S.X = 1; X = S.X; } { struct sometimes { char X; } S; S.X = -1; X += S.X; } X += Y.offset; printf("Result is %d\n", X); return X; }
Make the testcase even more insane
Make the testcase even more insane git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@6280 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap
2e2d03c70274bba1fa762e123842994238f68f41
test/Sema/warn-missing-variable-declarations.c
test/Sema/warn-missing-variable-declarations.c
// RUN: %clang -Wmissing-variable-declarations -fsyntax-only -Xclang -verify %s int vbad1; // expected-warning{{no previous extern declaration for non-static variable 'vbad1'}} int vbad2; int vbad2 = 10; // expected-warning{{no previous extern declaration for non-static variable 'vbad2'}} struct { int mgood1; } vbad3; // expected-warning{{no previous extern declaration for non-static variable 'vbad3'}} int vbad4; int vbad4 = 10; // expected-warning{{no previous extern declaration for non-static variable 'vbad4'}} extern int vbad4; extern int vgood1; int vgood1; int vgood1 = 10; // RUN: %clang -Wmissing-variable-declarations -fsyntax-only -Xclang -verify %s int vbad1; // expected-warning{{no previous extern declaration for non-static variable 'vbad1'}} int vbad2; int vbad2 = 10; // expected-warning{{no previous extern declaration for non-static variable 'vbad2'}} struct { int mgood1; } vbad3; // expected-warning{{no previous extern declaration for non-static variable 'vbad3'}} int vbad4; int vbad4 = 10; // expected-warning{{no previous extern declaration for non-static variable 'vbad4'}} extern int vbad4; extern int vgood1; int vgood1; int vgood1 = 10;
// RUN: %clang -Wmissing-variable-declarations -fsyntax-only -Xclang -verify %s int vbad1; // expected-warning{{no previous extern declaration for non-static variable 'vbad1'}} int vbad2; int vbad2 = 10; // expected-warning{{no previous extern declaration for non-static variable 'vbad2'}} struct { int mgood1; } vbad3; // expected-warning{{no previous extern declaration for non-static variable 'vbad3'}} int vbad4; int vbad4 = 10; // expected-warning{{no previous extern declaration for non-static variable 'vbad4'}} extern int vbad4; extern int vgood1; int vgood1; int vgood1 = 10;
Delete junk that snuck into r166498.
Delete junk that snuck into r166498. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@166499 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
8aeecdc8e131ee74d891017b628181409330f509
bincookie.h
bincookie.h
#ifndef _BINCOOKIE_H #define _BINCOOKIE_H #if defined(_MSC_VER) #define uint32_t DWORD #else #include <stdint.h> #endif #define binarycookies_is_secure(cookie_ptr) (cookie_ptr->flags & secure) #define binarycookies_domain_access_full(cookie_ptr) (cookie_ptr->domain[0] == '.') typedef enum { secure = 1, http_only = 1 << 2, } binarycookies_flag; typedef struct { uint32_t size; unsigned char unk1[4]; binarycookies_flag flags; unsigned char unk2[4]; double creation_date; double expiration_date; char *domain; char *name; char *path; char *value; } binarycookies_cookie_t; typedef struct { unsigned char unk1[4]; // always 0x0 0x0 0x1 0x0 uint32_t number_of_cookies; binarycookies_cookie_t **cookies; } binarycookies_page_t; typedef struct { unsigned char magic[4]; // "cook" uint32_t num_pages; uint32_t *page_sizes; char **raw_pages; binarycookies_page_t **pages; } binarycookies_t; binarycookies_t *binarycookies_init(const char *file_path); void binarycookies_free(binarycookies_t *cfile); #endif // _BINCOOKIE_H
#ifndef _BINCOOKIE_H #define _BINCOOKIE_H #if defined(_MSC_VER) #define uint32_t DWORD #else #include <stdint.h> #endif #include <time.h> #define binarycookies_is_secure(cookie_ptr) (cookie_ptr->flags & secure) #define binarycookies_domain_access_full(cookie_ptr) (cookie_ptr->domain[0] == '.') typedef enum { secure = 1, http_only = 1 << 2, } binarycookies_flag; typedef struct { uint32_t size; unsigned char unk1[4]; binarycookies_flag flags; unsigned char unk2[4]; time_t creation_time; time_t expiration_time; char *domain; char *name; char *path; char *value; } binarycookies_cookie_t; typedef struct { unsigned char unk1[4]; // always 0x0 0x0 0x1 0x0 uint32_t number_of_cookies; binarycookies_cookie_t **cookies; } binarycookies_page_t; typedef struct { unsigned char magic[4]; // "cook" uint32_t num_pages; uint32_t *page_sizes; char **raw_pages; binarycookies_page_t **pages; } binarycookies_t; binarycookies_t *binarycookies_init(const char *file_path); void binarycookies_free(binarycookies_t *cfile); #endif // _BINCOOKIE_H
Change time type from double to time_t
Change time type from double to time_t
C
mit
Tatsh/libbinarycookies,Tatsh/libbinarycookies
8beb08cb2432f73348ea370c556f4daeccdcaf36
type-offset.c
type-offset.c
#include <sys/types.h> #include <stdio.h> #include <limits.h> int main (void) { const unsigned long long bits = sizeof (off_t) * CHAR_BIT; const unsigned long long shift_bits = bits - 2; const unsigned long long off_max = 1LL << shift_bits; (void) printf (" type Offset_t is range -%llu .. %llu;\n", off_max, off_max); (void) printf (" for Offset_t'Size use %llu;\n", bits); (void) printf (" pragma Convention (C, Offset_t);\n"); return 0; }
#include <sys/types.h> #include <stdio.h> #include <limits.h> int main (void) { const unsigned long long bits = sizeof (off_t) * CHAR_BIT; const unsigned long long shift_bits = bits - 1; const unsigned long long off_max = 1LL << shift_bits; (void) printf (" type Offset_t is range -%llu .. %llu;\n", off_max, off_max); (void) printf (" for Offset_t'Size use %llu;\n", bits); (void) printf (" pragma Convention (C, Offset_t);\n"); return 0; }
Fix to 64 bit offsets.
Fix to 64 bit offsets.
C
isc
io7m/coreland-posix-ada,io7m/coreland-posix-ada,io7m/coreland-posix-ada
16e0b0cb9c40169a646660f492617c037e8acafe
lelib/lelib.h
lelib/lelib.h
// // lelib.h // lelib // // Created by Petr on 27.10.13. // Copyright (c) 2013,2014 Logentries. All rights reserved. // #ifndef LE_DEBUG_LOGS #ifdef DEBUG #define LE_DEBUG_LOGS 1 #else #define LE_DEBUG_LOGS 0 #endif #endif #if LE_DEBUG_LOGS #define LE_DEBUG(...) NSLog(__VA_ARGS__) #else #define LE_DEBUG(...) #endif #import "LELog.h" #import "lecore.h"
// // lelib.h // lelib // // Created by Petr on 27.10.13. // Copyright (c) 2013,2014 Logentries. All rights reserved. // #ifndef LE_DEBUG_LOGS // #ifdef DEBUG // #define LE_DEBUG_LOGS 1 // #else #define LE_DEBUG_LOGS 0 // #endif #endif #if LE_DEBUG_LOGS #define LE_DEBUG(...) NSLog(__VA_ARGS__) #else #define LE_DEBUG(...) #endif #import "LELog.h" #import "lecore.h"
Disable LE's own debug log spam
Disable LE's own debug log spam
C
mit
JohnLemberger/le_ios
ef157b1acb6dbc241b4b9d2f834164e0858f21a9
src/lib/lib.h
src/lib/lib.h
#ifndef __LIB_H #define __LIB_H /* default lib includes */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* default system includes - keep these at minimum.. */ #include <string.h> /* strcmp() etc. */ #ifdef HAVE_STRINGS_H # include <strings.h> /* strcasecmp() etc. */ #endif #include <stdarg.h> /* va_list is used everywhere */ #include <limits.h> /* INT_MAX, etc. */ #include <errno.h> /* error checking is good */ #include <sys/types.h> /* many other includes want this */ #ifdef HAVE_STDINT_H # include <stdint.h> /* C99 int types, we mostly need uintmax_t */ #endif #include "compat.h" #include "macros.h" #include "failures.h" #include "data-stack.h" #include "mempool.h" #include "imem.h" typedef struct buffer buffer_t; typedef struct buffer string_t; struct istream; struct ostream; #include "array-decl.h" /* ARRAY_DEFINE()s may exist in any header */ #include "strfuncs.h" size_t nearest_power(size_t num); void lib_init(void); void lib_deinit(void); #endif
#ifndef __LIB_H #define __LIB_H /* default lib includes */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* default system includes - keep these at minimum.. */ #include <stddef.h> /* Solaris defines NULL wrong unless this is used */ #include <string.h> /* strcmp() etc. */ #ifdef HAVE_STRINGS_H # include <strings.h> /* strcasecmp() etc. */ #endif #include <stdarg.h> /* va_list is used everywhere */ #include <limits.h> /* INT_MAX, etc. */ #include <errno.h> /* error checking is good */ #include <sys/types.h> /* many other includes want this */ #ifdef HAVE_STDINT_H # include <stdint.h> /* C99 int types, we mostly need uintmax_t */ #endif #include "compat.h" #include "macros.h" #include "failures.h" #include "data-stack.h" #include "mempool.h" #include "imem.h" typedef struct buffer buffer_t; typedef struct buffer string_t; struct istream; struct ostream; #include "array-decl.h" /* ARRAY_DEFINE()s may exist in any header */ #include "strfuncs.h" size_t nearest_power(size_t num); void lib_init(void); void lib_deinit(void); #endif
Include stddef.h always to make NULL expand correctly in Solaris.
Include stddef.h always to make NULL expand correctly in Solaris.
C
mit
Distrotech/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,Distrotech/dovecot,damoxc/dovecot,Distrotech/dovecot,damoxc/dovecot,Distrotech/dovecot,Distrotech/dovecot
00c99f556862333b85c4e2b6df87f8af95272b22
src/map/map.h
src/map/map.h
/* * Copyright (C) 2015 Luke San Antonio * All rights reserved. */ #pragma once #include "../common/vec.h" #include "structure.h" #include "../gfx/immediate_renderer.h" namespace game { using pos_t = Vec<float>; struct Structure_Instance { Structure_Instance(Structure const&, pos_t pos) noexcept; ~Structure_Instance() noexcept = default; void set_structure_type(Structure const& s) noexcept; Structure const& structure() const noexcept; pos_t position; private: Structure const* s_type_; }; void render_structure(gfx::IDriver& d, Structure const& st, pos_t pos) noexcept; inline void render_structure_instance(gfx::IDriver& d, Structure_Instance const& st) noexcept { render_structure(d, st.structure(), st.position); } struct Map { Map(Vec<float> map_extents) noexcept : extents(map_extents) {} std::vector<Structure_Instance> structures; Vec<float> extents; }; bool try_structure_place(Map& map, Structure const& st, pos_t pos, gfx::Immediate_Renderer* = nullptr) noexcept; }
/* * Copyright (C) 2015 Luke San Antonio * All rights reserved. */ #pragma once #include "../common/vec.h" #include "structure.h" #include "../gfx/immediate_renderer.h" namespace game { using pos_t = Vec<float>; struct Structure_Instance { Structure_Instance(Structure const&, pos_t pos) noexcept; ~Structure_Instance() noexcept = default; void set_structure_type(Structure const& s) noexcept; Structure const& structure() const noexcept; pos_t position; private: Structure const* s_type_; }; void render_structure(gfx::IDriver& d, Structure const& st, pos_t pos) noexcept; inline void render_structure_instance(gfx::IDriver& d, Structure_Instance const& st) noexcept { render_structure(d, st.structure(), st.position); } struct Map { Map(Vec<float> map_extents) noexcept : extents(map_extents) {} boost::optional<Structure_Instance> pending_structure; std::vector<Structure_Instance> structures; Vec<float> extents; }; bool try_structure_place(Map& map, Structure const& st, pos_t pos, gfx::Immediate_Renderer* = nullptr) noexcept; }
Add a member to Map for the pending structure
Add a member to Map for the pending structure
C
bsd-3-clause
RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine
98e5b672422ca1e38ca38ff0357cee6cc936aee0
lang/cpp/src/gpgmepp_export.h
lang/cpp/src/gpgmepp_export.h
#ifndef GPGMEPP_EXPORT_H #define GPGMEPP_EXPORT_H #ifdef GPGMEPP_STATIC_DEFINE # define GPGMEPP_EXPORT # define GPGMEPP_NO_EXPORT #else # ifndef GPGMEPP_EXPORT # ifdef KF5Gpgmepp_EXPORTS /* We are building this library */ # define GPGMEPP_EXPORT __attribute__((visibility("default"))) # else /* We are using this library */ # define GPGMEPP_EXPORT __attribute__((visibility("default"))) # endif # endif # ifndef GPGMEPP_NO_EXPORT # define GPGMEPP_NO_EXPORT __attribute__((visibility("hidden"))) # endif #endif #ifndef GPGMEPP_DEPRECATED # define GPGMEPP_DEPRECATED __attribute__ ((__deprecated__)) #endif #ifndef GPGMEPP_DEPRECATED_EXPORT # define GPGMEPP_DEPRECATED_EXPORT GPGMEPP_EXPORT GPGMEPP_DEPRECATED #endif #ifndef GPGMEPP_DEPRECATED_NO_EXPORT # define GPGMEPP_DEPRECATED_NO_EXPORT GPGMEPP_NO_EXPORT GPGMEPP_DEPRECATED #endif #define DEFINE_NO_DEPRECATED 0 #if DEFINE_NO_DEPRECATED # define GPGMEPP_NO_DEPRECATED #endif #endif
#ifndef GPGMEPP_EXPORT_H #define GPGMEPP_EXPORT_H #ifdef GPGMEPP_STATIC_DEFINE # define GPGMEPP_EXPORT # define GPGMEPP_NO_EXPORT #else # ifndef GPGMEPP_EXPORT # ifdef BUILDING_GPGMEPP /* We are building this library */ # ifdef WIN32 # define GPGMEPP_EXPORT __declspec(dllexport) # else # define GPGMEPP_EXPORT __attribute__((visibility("default"))) # endif # else /* We are using this library */ # ifdef WIN32 # define GPGMEPP_EXPORT __declspec(dllimport) # else # define GPGMEPP_EXPORT __attribute__((visibility("default"))) # endif # endif # endif # ifndef GPGMEPP_NO_EXPORT # ifdef WIN32 # define GPGMEPP_NO_EXPORT # else # define GPGMEPP_NO_EXPORT __attribute__((visibility("hidden"))) # endif # endif #endif #ifndef GPGMEPP_DEPRECATED # define GPGMEPP_DEPRECATED __attribute__ ((__deprecated__)) #endif #ifndef GPGMEPP_DEPRECATED_EXPORT # define GPGMEPP_DEPRECATED_EXPORT GPGMEPP_EXPORT GPGMEPP_DEPRECATED #endif #ifndef GPGMEPP_DEPRECATED_NO_EXPORT # define GPGMEPP_DEPRECATED_NO_EXPORT GPGMEPP_NO_EXPORT GPGMEPP_DEPRECATED #endif #define DEFINE_NO_DEPRECATED 0 #if DEFINE_NO_DEPRECATED # define GPGMEPP_NO_DEPRECATED #endif #endif
Fix export header and windows export macros
Fix export header and windows export macros * lang/cpp/src/gpgme_export.h: Fix variable name. Add Windows ifdefs.
C
lgpl-2.1
gpg/gpgme,gpg/gpgme,gpg/gpgme,gpg/gpgme,gpg/gpgme,gpg/gpgme,gpg/gpgme
1ad4a72ba51234a45e3e3a294676e1ab3e758d0e
lab5-btree-in-c/bTree.h
lab5-btree-in-c/bTree.h
#ifndef __STACK__ #define __STACK__ struct btreeNode { int data; struct btreeNode * left; struct btreeNode * right; }; typedef struct btreeNode * btreeNode_t; typedef struct { btreeNode_t root; }btree; typedef btree * btree_t; btree_t newTree(void); int addNode(btree_t, int); void inOrder(btree_t); #endif
#ifndef __STACK__ #define __STACK__ struct btreeNode { int data; struct btreeNode * left; struct btreeNode * right; }; typedef struct btreeNode * btreeNode_t; typedef struct { btreeNode_t root; }btree; typedef btree * btree_t; btree_t newTree(void); int addNode(btree_t, int); void inOrder(btree_t); void inOrder_iter(btree_t); #endif
Add inOrder_iter() signature to header
Add inOrder_iter() signature to header
C
mit
NirmalL/AlgorithmsLabs,NirmalL/AlgorithmsLabs,NirmalL/AlgorithmsLabs
674a7580b153119527f92582465524a09627c1e9
Tools/Parser/UnicodeVersion.h
Tools/Parser/UnicodeVersion.h
/* * Copyright (C) 2015 Muhammad Tayyab Akram * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef SHEENBIDI_PARSER_UNICODE_VERSION_H #define SHEENBIDI_PARSER_UNICODE_VERSION_H #include <string> namespace SheenBidi { namespace Parser { class UnicodeVersion { public: UnicodeVersion(const std::string &versionLine); int major() const; int minor() const; int micro() const; const std::string &versionString() const; private: int m_major; int m_minor; int m_micro; std::string m_versionString; }; } } #endif
/* * Copyright (C) 2015 Muhammad Tayyab Akram * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef SHEENBIDI_PARSER_UNICODE_VERSION_H #define SHEENBIDI_PARSER_UNICODE_VERSION_H #include <string> #ifdef major #undef major #endif #ifdef minor #undef minor #endif namespace SheenBidi { namespace Parser { class UnicodeVersion { public: UnicodeVersion(const std::string &versionLine); int major() const; int minor() const; int micro() const; const std::string &versionString() const; private: int m_major; int m_minor; int m_micro; std::string m_versionString; }; } } #endif
Fix warnings about major and minor macros
Fix warnings about major and minor macros Tools/Parser/UnicodeVersion.h:29:13: warning: In the GNU C Library, "major" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "major", you should undefine it after including <sys/types.h>. int major() const; ^~~~~~~~~~ In file included from Tools/Parser/BidiMirroring.h:24:0, from Tools/Tester/MirrorTester.cpp:26: Tools/Parser/UnicodeVersion.h:30:13: warning: In the GNU C Library, "minor" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "minor", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "minor", you should undefine it after including <sys/types.h>. int minor() const; ^~~~~~~~~~
C
apache-2.0
mta452/SheenBidi,mta452/SheenBidi
194dfdea3af930f0e16d5f3f34876cb1d5cc63a9
include/effects/SkArithmeticImageFilter.h
include/effects/SkArithmeticImageFilter.h
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkArithmeticImageFilter_DEFINED #define SkArithmeticImageFilter_DEFINED #include "include/core/SkImageFilter.h" struct ArithmeticFPInputs { ArithmeticFPInputs(float k0, float k1, float k2, float k3, bool enforcePMColor) { memset(this, 0, sizeof(*this)); fK[0] = k0; fK[1] = k1; fK[2] = k2; fK[3] = k3; fEnforcePMColor = enforcePMColor; } float fK[4]; bool fEnforcePMColor; }; // DEPRECATED: Use include/effects/SkImageFilters::Arithmetic class SK_API SkArithmeticImageFilter { public: static sk_sp<SkImageFilter> Make(float k1, float k2, float k3, float k4, bool enforcePMColor, sk_sp<SkImageFilter> background, sk_sp<SkImageFilter> foreground, const SkImageFilter::CropRect* cropRect); static void RegisterFlattenables(); private: SkArithmeticImageFilter(); // can't instantiate }; #endif
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkArithmeticImageFilter_DEFINED #define SkArithmeticImageFilter_DEFINED #include "include/core/SkImageFilter.h" struct ArithmeticFPInputs { ArithmeticFPInputs(float k0, float k1, float k2, float k3, bool enforcePMColor) { // We copy instances of this struct as the input data blob for the SkSL FP. The FP // may try to access all of our bytes (for comparison purposes), so be sure to zero out // any padding after the dangling bool. memset(this, 0, sizeof(*this)); fK[0] = k0; fK[1] = k1; fK[2] = k2; fK[3] = k3; fEnforcePMColor = enforcePMColor; } float fK[4]; bool fEnforcePMColor; }; // DEPRECATED: Use include/effects/SkImageFilters::Arithmetic class SK_API SkArithmeticImageFilter { public: static sk_sp<SkImageFilter> Make(float k1, float k2, float k3, float k4, bool enforcePMColor, sk_sp<SkImageFilter> background, sk_sp<SkImageFilter> foreground, const SkImageFilter::CropRect* cropRect); static void RegisterFlattenables(); private: SkArithmeticImageFilter(); // can't instantiate }; #endif
Add comment explaining memset in ArithmeticFPInputs
Add comment explaining memset in ArithmeticFPInputs Change-Id: I1541e3f4629a117eee3f244c0209e442b705b67b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268844 Auto-Submit: Brian Osman <794c0b5534edf5601d88e1d41975d0262da12894@google.com> Reviewed-by: Brian Osman <794c0b5534edf5601d88e1d41975d0262da12894@google.com> Commit-Queue: Brian Osman <794c0b5534edf5601d88e1d41975d0262da12894@google.com>
C
bsd-3-clause
aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia
bedd7a18966bdfc10ec01d64e30aa359f217941a
android/hal-log.h
android/hal-log.h
/* * Copyright (C) 2013 Intel Corporation * * 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. * */ #define LOG_TAG "BlueZ" #ifdef __BIONIC__ #include <cutils/log.h> #else #include <stdio.h> #define LOG_INFO " I" #define LOG_WARN " W" #define LOG_ERROR " E" #define LOG_DEBUG " D" #define ALOG(pri, tag, fmt, arg...) printf(tag pri": " fmt"\n", ##arg) #endif #define info(fmt, arg...) ALOG(LOG_INFO, LOG_TAG, fmt, ##arg) #define warn(fmt, arg...) ALOG(LOG_WARN, LOG_TAG, fmt, ##arg) #define error(fmt, arg...) ALOG(LOG_ERROR, LOG_TAG, fmt, ##arg) #define DBG(fmt, arg...) ALOG(LOG_DEBUG, LOG_TAG, "%s:%s() "fmt, __FILE__, \ __func__, ##arg)
/* * Copyright (C) 2013 Intel Corporation * * 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. * */ #define LOG_TAG "BlueZ" #ifdef __BIONIC__ #include <cutils/log.h> #else #include <stdio.h> #define LOG_INFO " I" #define LOG_WARN " W" #define LOG_ERROR " E" #define LOG_DEBUG " D" #define ALOG(pri, tag, fmt, arg...) fprintf(stderr, tag pri": " fmt"\n", ##arg) #endif #define info(fmt, arg...) ALOG(LOG_INFO, LOG_TAG, fmt, ##arg) #define warn(fmt, arg...) ALOG(LOG_WARN, LOG_TAG, fmt, ##arg) #define error(fmt, arg...) ALOG(LOG_ERROR, LOG_TAG, fmt, ##arg) #define DBG(fmt, arg...) ALOG(LOG_DEBUG, LOG_TAG, "%s:%s() "fmt, __FILE__, \ __func__, ##arg)
Make HAL logging wrapper print to stderr instead of stdout
android/tester: Make HAL logging wrapper print to stderr instead of stdout This is used for testing and for user it makes no difference. This will allow to switch on/off verbose logging from automated android tester.
C
lgpl-2.1
pkarasev3/bluez,pkarasev3/bluez,silent-snowman/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez,pkarasev3/bluez,mapfau/bluez,mapfau/bluez,mapfau/bluez,pstglia/external-bluetooth-bluez,ComputeCycles/bluez,mapfau/bluez,silent-snowman/bluez,ComputeCycles/bluez,pkarasev3/bluez,ComputeCycles/bluez,pstglia/external-bluetooth-bluez,ComputeCycles/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez
7e8532edeb46a3b40c0260c4e2677e903f988fbd
include/llvm/Testing/Support/SupportHelpers.h
include/llvm/Testing/Support/SupportHelpers.h
//===- Testing/Support/SupportHelpers.h -----------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_TESTING_SUPPORT_SUPPORTHELPERS_H #define LLVM_TESTING_SUPPORT_SUPPORTHELPERS_H #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" namespace llvm { namespace detail { struct ErrorHolder { bool Success; std::string Message; }; template <typename T> struct ExpectedHolder : public ErrorHolder { Optional<T *> Value; }; inline void PrintTo(const ErrorHolder &Err, std::ostream *Out) { *Out << (Err.Success ? "succeeded" : "failed"); if (!Err.Success) { *Out << " (" << StringRef(Err.Message).trim().str() << ")"; } } template <typename T> void PrintTo(const ExpectedHolder<T> &Item, std::ostream *Out) { if (Item.Success) { *Out << "succeeded with value \"" << testing::PrintToString(**Item.Value) << "\""; } else { PrintTo(static_cast<const ErrorHolder &>(Item), Out); } } } // namespace detail } // namespace llvm #endif
//===- Testing/Support/SupportHelpers.h -----------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_TESTING_SUPPORT_SUPPORTHELPERS_H #define LLVM_TESTING_SUPPORT_SUPPORTHELPERS_H #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" #include "gtest/gtest-printers.h" namespace llvm { namespace detail { struct ErrorHolder { bool Success; std::string Message; }; template <typename T> struct ExpectedHolder : public ErrorHolder { Optional<T *> Value; }; inline void PrintTo(const ErrorHolder &Err, std::ostream *Out) { *Out << (Err.Success ? "succeeded" : "failed"); if (!Err.Success) { *Out << " (" << StringRef(Err.Message).trim().str() << ")"; } } template <typename T> void PrintTo(const ExpectedHolder<T> &Item, std::ostream *Out) { if (Item.Success) { *Out << "succeeded with value \"" << ::testing::PrintToString(**Item.Value) << "\""; } else { PrintTo(static_cast<const ErrorHolder &>(Item), Out); } } } // namespace detail } // namespace llvm #endif
Add an include of gtest-printers.h to appease the buildbots.
Add an include of gtest-printers.h to appease the buildbots. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@305396 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm
e174f652d9552b5ff5dd9d04ced0e28ba4d274cf
tests/fibonacci.c
tests/fibonacci.c
int fibonacci(int n) { if(n == 1) return 1; if(n == 2) return 1; int x = fibonacci(n - 1); int y = fibonacci(n - 2); return x + y; } void main() { return; }
int fibonacci(int n) { if(n == 1) return 1; if(n == 2) return 1; int x = fibonacci(n - 1); int y = fibonacci(n - 2); return x + y; } void main() { int n = readint(); writeint(fibonacci(n)); return; }
Add readint and writeint call.
Add readint and writeint call.
C
mit
RyanWangGit/scc
da10dd621c699fdccac5c4e618f31ea61a2ebb23
TimerDisplay.h
TimerDisplay.h
#ifndef TIMER_DISPLAY_H #define TIMER_DISPLAY_H #include <SevenSegmentExtended.h> class TimerDisplay : public SevenSegmentExtended { public: TimerDisplay(uint8_t pin_clk, uint8_t pin_dio); void on(); void off(); void start(); void stop(); void refresh(); private: unsigned long start_millis; bool is_running; static const unsigned long millis_per_second = 1000; static const unsigned long millis_per_minute = 60 * millis_per_second; static const unsigned long millis_per_hour = 60 * millis_per_minute; uint8_t millisToSeconds(unsigned long millis); uint8_t millisToMinutes(unsigned long millis); }; #endif
#ifndef TIMER_DISPLAY_H #define TIMER_DISPLAY_H #include <SevenSegmentExtended.h> class TimerDisplay : public SevenSegmentExtended { public: TimerDisplay(uint8_t pin_clk, uint8_t pin_dio); void on(); void off(); void start(); void stop(); void refresh(); private: unsigned long start_millis; bool is_running; static const unsigned long millis_per_second = 1000; static const unsigned long millis_per_minute = 60 * millis_per_second; static const unsigned long millis_per_hour = 60 * millis_per_minute; static uint8_t millisToSeconds(unsigned long millis); static uint8_t millisToMinutes(unsigned long millis); }; #endif
Make static some functions that should be static
Make static some functions that should be static
C
mit
mortenfyhn/coffee-scales
fddc41e81dda0627ccd9b6b998df57d62b8d2460
test/functional/c-shared-library/libtest.c
test/functional/c-shared-library/libtest.c
#ifdef __GNUC__ #define DLL_PUBLIC __attribute__ ((dllexport)) #else #define DLL_PUBLIC __declspec(dllexport) // Note: actually gcc seems to also supports this syntax. #endif DLL_PUBLIC int libtest_main() { return 0; }
#if defined(__GNUC__) || defined(__clang__) # define DLL_PUBLIC __attribute__ ((dllexport)) #else # define DLL_PUBLIC __declspec(dllexport) #endif DLL_PUBLIC int libtest_main() { return 0; }
Use gcc attribute for clang too.
test.functional.c-shared-library: Use gcc attribute for clang too.
C
bsd-3-clause
hotgloupi/configure,hotgloupi/configure,hotgloupi/configure,hotgloupi/configure,hotgloupi/configure
36e5254e4de0a03485b51f5b830db0ea65272e38
lib/Target/SparcV9/MappingInfo.h
lib/Target/SparcV9/MappingInfo.h
//===- lib/Target/SparcV9/MappingInfo.h -------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // Data structures to support the Reoptimizer's Instruction-to-MachineInstr // mapping information gatherer. // //===----------------------------------------------------------------------===// #ifndef MAPPINGINFO_H #define MAPPINGINFO_H #include <iosfwd> #include <vector> #include <string> namespace llvm { class Pass; Pass *getMappingInfoAsmPrinterPass(std::ostream &out); class MappingInfo { struct byteVector : public std::vector <unsigned char> { void dumpAssembly (std::ostream &Out); }; std::string comment; std::string symbolPrefix; unsigned functionNumber; byteVector bytes; public: void outByte (unsigned char b) { bytes.push_back (b); } MappingInfo (std::string Comment, std::string SymbolPrefix, unsigned FunctionNumber) : comment(Comment), symbolPrefix(SymbolPrefix), functionNumber(FunctionNumber) {} void dumpAssembly (std::ostream &Out); unsigned char *getBytes (unsigned &length) { length = bytes.size(); return &bytes[0]; } }; } // End llvm namespace #endif
//===- lib/Target/SparcV9/MappingInfo.h -------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // Data structures to support the Reoptimizer's Instruction-to-MachineInstr // mapping information gatherer. // //===----------------------------------------------------------------------===// #ifndef MAPPINGINFO_H #define MAPPINGINFO_H #include <iosfwd> #include <vector> #include <string> namespace llvm { class Pass; Pass *getMappingInfoAsmPrinterPass(std::ostream &out); Pass *createInternalGlobalMapperPass(); class MappingInfo { struct byteVector : public std::vector <unsigned char> { void dumpAssembly (std::ostream &Out); }; std::string comment; std::string symbolPrefix; unsigned functionNumber; byteVector bytes; public: void outByte (unsigned char b) { bytes.push_back (b); } MappingInfo (std::string Comment, std::string SymbolPrefix, unsigned FunctionNumber) : comment(Comment), symbolPrefix(SymbolPrefix), functionNumber(FunctionNumber) {} void dumpAssembly (std::ostream &Out); unsigned char *getBytes (unsigned &length) { length = bytes.size(); return &bytes[0]; } }; } // End llvm namespace #endif
Add decl. for new mapping info pass factory method.
Add decl. for new mapping info pass factory method. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@13979 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap
ec83646e392933afcd7c7686f6ad157ebe4d2769
os/include/tinyara/seclink_drv.h
os/include/tinyara/seclink_drv.h
#ifndef _SECLINK_DRV_H__ #define _SECLINK_DRV_H__ #include <stdint.h> struct sec_lowerhalf_s; struct sec_upperhalf_s { struct sec_lowerhalf_s *lower; char *path; int32_t refcnt; sem_t su_lock; }; struct sec_ops_s; struct sec_lowerhalf_s { struct sec_ops_s *ops; struct sec_upperhalf_s *parent; }; int se_register(const char *path, struct sec_lowerhalf_s *lower); int se_unregister(struct sec_lowerhalf_s *lower); #endif // _SECLINK_DRV_H__
#ifndef _SECLINK_DRV_H__ #define _SECLINK_DRV_H__ #include <stdint.h> #include <semaphore.h> struct sec_lowerhalf_s; struct sec_upperhalf_s { struct sec_lowerhalf_s *lower; char *path; int32_t refcnt; sem_t su_lock; }; struct sec_ops_s; struct sec_lowerhalf_s { struct sec_ops_s *ops; struct sec_upperhalf_s *parent; }; int se_register(const char *path, struct sec_lowerhalf_s *lower); int se_unregister(struct sec_lowerhalf_s *lower); #endif // _SECLINK_DRV_H__
Resolve build break for rtl8721csm/security_hal_test config.
include/tinyara: Resolve build break for rtl8721csm/security_hal_test config. This patch resolves build break for rtl8721csm/security_hal_test configuration. Signed-off-by: Vidisha <3d8bcdb46ae40344d12a5a0255e34cf386c7657a@samsung.com>
C
apache-2.0
pillip8282/TizenRT,junmin-kim/TizenRT,jsdosa/TizenRT,junmin-kim/TizenRT,jsdosa/TizenRT,junmin-kim/TizenRT,jeongarmy/TizenRT,an4967/TizenRT,Samsung/TizenRT,pillip8282/TizenRT,junmin-kim/TizenRT,an4967/TizenRT,Samsung/TizenRT,Samsung/TizenRT,an4967/TizenRT,jeongchanKim/TizenRT,pillip8282/TizenRT,sunghan-chang/TizenRT,jeongarmy/TizenRT,jeongchanKim/TizenRT,jsdosa/TizenRT,jeongchanKim/TizenRT,jeongarmy/TizenRT,jsdosa/TizenRT,jeongarmy/TizenRT,Samsung/TizenRT,sunghan-chang/TizenRT,Samsung/TizenRT,Samsung/TizenRT,jeongchanKim/TizenRT,jeongarmy/TizenRT,sunghan-chang/TizenRT,jsdosa/TizenRT,jeongchanKim/TizenRT,jsdosa/TizenRT,an4967/TizenRT,pillip8282/TizenRT,Samsung/TizenRT,an4967/TizenRT,jeongchanKim/TizenRT,pillip8282/TizenRT,jsdosa/TizenRT,pillip8282/TizenRT,sunghan-chang/TizenRT,junmin-kim/TizenRT,jeongchanKim/TizenRT,an4967/TizenRT,pillip8282/TizenRT,jeongarmy/TizenRT,an4967/TizenRT,jeongarmy/TizenRT,sunghan-chang/TizenRT,junmin-kim/TizenRT,sunghan-chang/TizenRT,sunghan-chang/TizenRT,junmin-kim/TizenRT
4e11ac31897512ee8da99bede058c9666f2ed3d8
include/mart-common/exceptions.h
include/mart-common/exceptions.h
#ifndef LIB_MART_COMMON_GUARD_EXPERIMENTAL_NW_EXCEPTIONS_H #define LIB_MART_COMMON_GUARD_EXPERIMENTAL_NW_EXCEPTIONS_H #include <exception> #include "ConstString.h" namespace mart { class RuntimeError : public std::exception { mart::ConstString _msg; public: RuntimeError( mart::ConstString message ) : _msg( std::move( message ).createZStr() ) { } const char* what() const noexcept override { return _msg.c_str(); } }; struct InvalidArgument : RuntimeError { using RuntimeError::RuntimeError; }; } // namespace mart #endif
#ifndef LIB_MART_COMMON_GUARD_EXPERIMENTAL_NW_EXCEPTIONS_H #define LIB_MART_COMMON_GUARD_EXPERIMENTAL_NW_EXCEPTIONS_H #include <exception> #include "ConstString.h" namespace mart { class RuntimeError : public std::exception { mba::im_zstr _msg; public: RuntimeError( mba::im_zstr message ) noexcept : _msg( std::move( message ) ) { } const char* what() const noexcept override { return _msg.c_str(); } }; struct InvalidArgument : RuntimeError { using RuntimeError::RuntimeError; }; struct BlockingOpCanceled : RuntimeError { BlockingOpCanceled() noexcept : RuntimeError( mba::im_zstr( "Blocking operation was canceled" ) ) { } using RuntimeError::RuntimeError; }; } // namespace mart #endif
Add BlockingOpCanceled and use im_zstr
[exception] Add BlockingOpCanceled and use im_zstr
C
mit
tum-ei-rcs/mart-common,tum-ei-rcs/mart-common
9c8944ca89e40772cd3b1f2fe933f428c688221c
gst/dtmf/gstdtmf.c
gst/dtmf/gstdtmf.c
#ifdef HAVE_CONFIG_H #include "config.h" #endif #include "gstdtmfdetect.h" #include "gstdtmfsrc.h" #include "gstrtpdtmfsrc.h" #include "gstrtpdtmfdepay.h" static gboolean plugin_init (GstPlugin * plugin) { if (!gst_dtmf_detect_plugin_init (plugin)) return FALSE; if (!gst_dtmf_src_plugin_init (plugin)) return FALSE; if (!gst_rtp_dtmf_src_plugin_init (plugin)) return FALSE; if (!gst_rtp_dtmf_depay_plugin_init (plugin)) return FALSE; return TRUE; } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, "dtmf", "DTMF plugins", plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
#ifdef HAVE_CONFIG_H #include "config.h" #endif #include "gstdtmfdetect.h" #include "gstdtmfsrc.h" #include "gstrtpdtmfsrc.h" #include "gstrtpdtmfdepay.h" static gboolean plugin_init (GstPlugin * plugin) { if (!gst_dtmf_detect_plugin_init (plugin)) return FALSE; if (!gst_dtmf_src_plugin_init (plugin)) return FALSE; if (!gst_rtp_dtmf_src_plugin_init (plugin)) return FALSE; if (!gst_rtp_dtmf_depay_plugin_init (plugin)) return FALSE; return TRUE; } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, dtmf, "DTMF plugins", plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
Update for GST_PLUGIN_DEFINE() API changes
gst: Update for GST_PLUGIN_DEFINE() API changes
C
lgpl-2.1
rawoul/gst-plugins-good,ndufresne/gst-plugins-good,sebras/gst-plugins-good,veo-labs/gst-plugins-good,GrokImageCompression/gst-plugins-good,ariscop/gst-plugins-good,BigBrother-International/gst-plugins-good,shelsonjava/gst-plugins-good,froggatt/gst-plugins-good-m,cablelabs/gst-plugins-good,GStreamer/gst-plugins-good,StreamUtils/gst-plugins-good,lovebug356/gst-plugins-good,sebras/gst-plugins-good,sh0/gst-plugins-good,Kurento/gst-plugins-good,ikonst/gst-plugins-good,StreamUtils/gst-plugins-good,veo-labs/gst-plugins-good,cfoch/gst-plugins-good,freedesktop-unofficial-mirror/gstreamer__gst-plugins-good,krieger-od/gst-plugins-good,ijsf/OpenWebRTC-gst-plugins-good,Lachann/gst-plugins-good,greg80303/gst-plugins-good,pexip/gst-plugins-good,ijsf/OpenWebRTC-gst-plugins-good,ndufresne/gst-plugins-good,jcaden/gst-plugins-good,surround-io/gst-plugins-good,pexip/gst-plugins-good,loshca/gst-plugins-good,cablelabs/gst-plugins-good,sh0/gst-plugins-good,BigBrother-International/gst-plugins-good,wkatsak/gst-plugins-good,davibe/gst-plugins-good-1.0,Lachann/gst-plugins-good,greg80303/gst-plugins-good,jcaden/gst-plugins-good,cfoch/gst-plugins-good,Lachann/gst-plugins-good,reynaldo-samsung/gst-plugins-good,ndufresne/gst-plugins-good,freedesktop-unofficial-mirror/gstreamer__gst-plugins-good,GStreamer/gst-plugins-good,jhodapp/gst-plugins-good,wkatsak/gst-plugins-good,ikonst/gst-plugins-good,greg80303/gst-plugins-good,ikonst/gst-plugins-good,froggatt/gst-plugins-good-m,StreamUtils/gst-plugins-good,shelsonjava/gst-plugins-good,veo-labs/gst-plugins-good,stfl/gst-plugins-good,hizukiayaka/gst-plugins-good,jpakkane/gstreamer-plugins-good,stfl/gst-plugins-good,wkatsak/gst-plugins-good,davibe/gst-plugins-good-1.0,davibe/gst-plugins-good-1.0,Kurento/gst-plugins-good,ikonst/gst-plugins-good,vatavuserban/gst-plugins-good,chamois94/gst-plugins-good,GrokImageCompression/gst-plugins-good,ted-n/gst-plugins-good,reynaldo-samsung/gst-plugins-good,GrokImageCompression/gst-plugins-good,rawoul/gst-plugins-good,collects/gst-plugins-good,pexip/gst-plugins-good,sebras/gst-plugins-good,krieger-od/gst-plugins-good,StreamUtils/gst-plugins-good,ariscop/gst-plugins-good,vatavuserban/gst-plugins-good,reynaldo-samsung/gst-plugins-good,cablelabs/gst-plugins-good,strukturag/gst-plugins-good,hizukiayaka/gst-plugins-good,kittee/gst-plugins-good,davibe/gst-plugins-good-1.0,surround-io/gst-plugins-good,strukturag/gst-plugins-good,collects/gst-plugins-good,ted-n/gst-plugins-good,froggatt/gst-plugins-good-m,loshca/gst-plugins-good,stfl/gst-plugins-good,loshca/gst-plugins-good,cablelabs/gst-plugins-good,Lachann/gst-plugins-good,chamois94/gst-plugins-good,Kurento/gst-plugins-good,surround-io/gst-plugins-good,jhodapp/gst-plugins-good,Kurento/gst-plugins-good,Kurento/gst-plugins-good,GrokImageCompression/gst-plugins-good,GStreamer/gst-plugins-good,ndufresne/gst-plugins-good,freedesktop-unofficial-mirror/gstreamer__gst-plugins-good,jhodapp/gst-plugins-good,lovebug356/gst-plugins-good,pexip/gst-plugins-good,jcaden/gst-plugins-good,veo-labs/gst-plugins-good,cfoch/gst-plugins-good,sh0/gst-plugins-good,froggatt/gst-plugins-good-m,kittee/gst-plugins-good,freedesktop-unofficial-mirror/gstreamer__gst-plugins-good,jcaden/gst-plugins-good,reynaldo-samsung/gst-plugins-good,greg80303/gst-plugins-good,collects/gst-plugins-good,jpakkane/gstreamer-plugins-good,strukturag/gst-plugins-good,jhodapp/gst-plugins-good,ijsf/OpenWebRTC-gst-plugins-good,surround-io/gst-plugins-good,jpakkane/gstreamer-plugins-good,jpakkane/gstreamer-plugins-good,ted-n/gst-plugins-good,chamois94/gst-plugins-good,ted-n/gst-plugins-good,kittee/gst-plugins-good,collects/gst-plugins-good,ijsf/OpenWebRTC-gst-plugins-good,chamois94/gst-plugins-good,rawoul/gst-plugins-good,kittee/gst-plugins-good,hizukiayaka/gst-plugins-good,cfoch/gst-plugins-good,ariscop/gst-plugins-good,ariscop/gst-plugins-good,krieger-od/gst-plugins-good,shelsonjava/gst-plugins-good,hizukiayaka/gst-plugins-good,BigBrother-International/gst-plugins-good,strukturag/gst-plugins-good,stfl/gst-plugins-good,BigBrother-International/gst-plugins-good,sh0/gst-plugins-good,lovebug356/gst-plugins-good,GStreamer/gst-plugins-good,lovebug356/gst-plugins-good,shelsonjava/gst-plugins-good,vatavuserban/gst-plugins-good,krieger-od/gst-plugins-good,loshca/gst-plugins-good,rawoul/gst-plugins-good,sebras/gst-plugins-good,vatavuserban/gst-plugins-good,pexip/gst-plugins-good,wkatsak/gst-plugins-good
5957e7a2fd2ab77b58a301c6c97071b98a5e2648
src/xmlhandler.h
src/xmlhandler.h
#ifndef GPXMLHANDLER_H #define GPXMLHANDlER_H #include <QtXml/QXmlDefaultHandler> #include <QtCore/QDebug> class PlaceContainer; class PlaceMark; class KAtlasXmlHandler : public QXmlDefaultHandler { public: KAtlasXmlHandler(); KAtlasXmlHandler( PlaceContainer* ); bool startDocument(); bool stopDocument(); bool startElement( const QString&, const QString&, const QString &name, const QXmlAttributes& attrs ); bool endElement( const QString&, const QString&, const QString &name ); bool characters( const QString& str ); protected: PlaceContainer* m_placecontainer; PlaceMark* m_placemark; bool m_inKml; bool m_inPlacemark; bool m_inPoint; bool m_coordsset; QString m_currentText; inline int popIdx( int population ); }; #endif // GPXMLHANDLER_H
#ifndef GPXMLHANDLER_H #define GPXMLHANDLER_H #include <QtXml/QXmlDefaultHandler> #include <QtCore/QDebug> class PlaceContainer; class PlaceMark; class KAtlasXmlHandler : public QXmlDefaultHandler { public: KAtlasXmlHandler(); KAtlasXmlHandler( PlaceContainer* ); bool startDocument(); bool stopDocument(); bool startElement( const QString&, const QString&, const QString &name, const QXmlAttributes& attrs ); bool endElement( const QString&, const QString&, const QString &name ); bool characters( const QString& str ); protected: PlaceContainer* m_placecontainer; PlaceMark* m_placemark; bool m_inKml; bool m_inPlacemark; bool m_inPoint; bool m_coordsset; QString m_currentText; inline int popIdx( int population ); }; #endif // GPXMLHANDLER_H
Fix build with enable final
Fix build with enable final svn path=/trunk/kdereview/marble/; revision=665299
C
lgpl-2.1
AndreiDuma/marble,utkuaydin/marble,Earthwings/marble,tzapzoor/marble,quannt24/marble,utkuaydin/marble,oberluz/marble,rku/marble,oberluz/marble,AndreiDuma/marble,utkuaydin/marble,David-Gil/marble-dev,probonopd/marble,quannt24/marble,Earthwings/marble,rku/marble,Earthwings/marble,rku/marble,utkuaydin/marble,David-Gil/marble-dev,tzapzoor/marble,oberluz/marble,adraghici/marble,Earthwings/marble,tucnak/marble,tucnak/marble,tzapzoor/marble,probonopd/marble,tucnak/marble,David-Gil/marble-dev,David-Gil/marble-dev,oberluz/marble,adraghici/marble,tucnak/marble,quannt24/marble,rku/marble,rku/marble,tzapzoor/marble,probonopd/marble,AndreiDuma/marble,quannt24/marble,tucnak/marble,Earthwings/marble,AndreiDuma/marble,quannt24/marble,AndreiDuma/marble,adraghici/marble,quannt24/marble,oberluz/marble,quannt24/marble,utkuaydin/marble,tzapzoor/marble,tucnak/marble,David-Gil/marble-dev,utkuaydin/marble,tzapzoor/marble,oberluz/marble,rku/marble,Earthwings/marble,adraghici/marble,tzapzoor/marble,AndreiDuma/marble,tzapzoor/marble,probonopd/marble,probonopd/marble,adraghici/marble,probonopd/marble,probonopd/marble,tucnak/marble,adraghici/marble,David-Gil/marble-dev
936e55e8fad9394aeee8e4ca4e50c1247ca4d390
libgo/runtime/yield.c
libgo/runtime/yield.c
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include "config.h" #include <stddef.h> #include <sys/types.h> #include <sys/time.h> #include <sched.h> #include <unistd.h> #ifdef HAVE_SYS_SELECT_H #include <sys/select.h> #endif #include "runtime.h" /* Spin wait. */ void runtime_procyield (uint32 cnt) { volatile uint32 i; for (i = 0; i < cnt; ++i) { #if defined (__i386__) || defined (__x86_64__) __builtin_ia32_pause (); #endif } } /* Ask the OS to reschedule this thread. */ void runtime_osyield (void) { sched_yield (); } /* Sleep for some number of microseconds. */ void runtime_usleep (uint32 us) { struct timeval tv; tv.tv_sec = us / 1000000; tv.tv_usec = us % 1000000; select (0, NULL, NULL, NULL, &tv); }
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include "config.h" #include <stddef.h> #include <sys/types.h> #include <sys/time.h> #include <sched.h> #include <unistd.h> #ifdef HAVE_SYS_SELECT_H #include <sys/select.h> #endif #if defined (__i386__) || defined (__x86_64__) #include <xmmintrin.h> #endif #include "runtime.h" /* Spin wait. */ void runtime_procyield (uint32 cnt) { volatile uint32 i; for (i = 0; i < cnt; ++i) { #if defined (__i386__) || defined (__x86_64__) _mm_pause (); #endif } } /* Ask the OS to reschedule this thread. */ void runtime_osyield (void) { sched_yield (); } /* Sleep for some number of microseconds. */ void runtime_usleep (uint32 us) { struct timeval tv; tv.tv_sec = us / 1000000; tv.tv_usec = us % 1000000; select (0, NULL, NULL, NULL, &tv); }
Use _mm_pause rather than __builtin_ia32_pause.
runtime: Use _mm_pause rather than __builtin_ia32_pause. Based on a patch from Peter Collingbourne. R=iant CC=gofrontend-dev https://golang.org/cl/102920043
C
bsd-3-clause
anlhord/gofrontend,golang/gofrontend,golang/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,anlhord/gofrontend,golang/gofrontend,golang/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend