commit
stringlengths
40
40
old_file
stringlengths
4
112
new_file
stringlengths
4
112
old_contents
stringlengths
0
2.05k
new_contents
stringlengths
28
3.9k
subject
stringlengths
17
736
message
stringlengths
18
4.78k
lang
stringclasses
1 value
license
stringclasses
13 values
repos
stringlengths
7
111k
48a69a892114ebe5665563938dd9344f0362d1d5
src/plugin/synchronized_queue.h
src/plugin/synchronized_queue.h
// This is a queue that can be accessed from multiple threads safely. // // It's not well optimized, and requires obtaining a lock every time you check for a new value. #pragma once #include <mutex> #include <optional> #include <queue> template <class T> class SynchronizedQueue { std::condition_variable cv_; std::mutex lock_; std::queue<T> q_; public: void push(T && t) { std::unique_lock l(lock_); q_.push(std::move(t)); cv_.notify_one(); } std::optional<T> get() { std::unique_lock l(lock_); if(q_.empty()) { return std::nullopt; } T t = std::move(q_.front()); q_.pop(); return t; } T get_blocking() { std::unique_lock l(lock_); while(q_.empty()) { cv_.wait(l); } T t = std::move(q_.front()); q_.pop(); return std::move(t); } };
// This is a queue that can be accessed from multiple threads safely. // // It's not well optimized, and requires obtaining a lock every time you check for a new value. #pragma once #include <condition_variable> #include <mutex> #include <optional> #include <queue> template <class T> class SynchronizedQueue { std::condition_variable cv_; std::mutex lock_; std::queue<T> q_; public: void push(T && t) { std::unique_lock l(lock_); q_.push(std::move(t)); cv_.notify_one(); } std::optional<T> get() { std::unique_lock l(lock_); if(q_.empty()) { return std::nullopt; } T t = std::move(q_.front()); q_.pop(); return t; } T get_blocking() { std::unique_lock l(lock_); while(q_.empty()) { cv_.wait(l); } T t = std::move(q_.front()); q_.pop(); return std::move(t); } };
Fix compilation on Linux / Windows
Fix compilation on Linux / Windows
C
mit
leecbaker/datareftool,leecbaker/datareftool,leecbaker/datareftool
500aedded80bd387484abfe9a6d7b8b4b591015d
c/c_gcc_test.c
c/c_gcc_test.c
#include <stdio.h> int c; __thread int d; register int R1 __asm__ ("%" "i5"); int main(void) { c = 3; R1 = 5; d = 4; printf("C: %d\n", c); printf("D: %d\n", d); printf("R1: %d\n", R1); R1 *= 2; printf("R1: %d\n", R1); return 0; }
#include <stdio.h> int c; __thread int d; register int R1 __asm__ ("%" "r15"); int main(void) { c = 3; R1 = 5; d = 4; printf("C: %d\n", c); printf("D: %d\n", d); printf("R1: %d\n", R1); R1 *= 2; printf("R1: %d\n", R1); return 0; }
Fix gcc global reg extension test to work.
Fix gcc global reg extension test to work. Had wrong register before.
C
bsd-3-clause
dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps
fca6774a3398cde170512b263b0d673df28bd641
client/display.h
client/display.h
/* * * BlueZ - Bluetooth protocol stack for Linux * * Copyright (C) 2012 Intel Corporation. All rights reserved. * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ #define COLOR_OFF "\x1B[0m" #define COLOR_BLUE "\x1B[0;34m" static inline void begin_message(void) { rl_message(""); printf("\r%*c\r", rl_end, ' '); } static inline void end_message(void) { rl_clear_message(); } void rl_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
/* * * BlueZ - Bluetooth protocol stack for Linux * * Copyright (C) 2012 Intel Corporation. All rights reserved. * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ #define COLOR_OFF "\x1B[0m" #define COLOR_BLUE "\x1B[0;34m" void rl_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
Remove broken helper for message blocks
client: Remove broken helper for message blocks
C
lgpl-2.1
mapfau/bluez,pstglia/external-bluetooth-bluez,ComputeCycles/bluez,pkarasev3/bluez,pstglia/external-bluetooth-bluez,pkarasev3/bluez,pkarasev3/bluez,pkarasev3/bluez,pstglia/external-bluetooth-bluez,mapfau/bluez,ComputeCycles/bluez,silent-snowman/bluez,mapfau/bluez,mapfau/bluez,pstglia/external-bluetooth-bluez,silent-snowman/bluez,silent-snowman/bluez,silent-snowman/bluez,ComputeCycles/bluez,ComputeCycles/bluez
3c3fe25d9ae586a2ef64361801bd6af08c6a0584
Modules/CEST/autoload/IO/mitkCESTDICOMReaderService.h
Modules/CEST/autoload/IO/mitkCESTDICOMReaderService.h
/*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKCESTDICOMReaderService_H #define MITKCESTDICOMReaderService_H #include <mitkBaseDICOMReaderService.h> namespace mitk { /** Service wrapper that auto selects (using the mitk::DICOMFileReaderSelector) the best DICOMFileReader from the DICOMReader module and loads additional meta data for CEST data. */ class CESTDICOMReaderService : public BaseDICOMReaderService { public: CESTDICOMReaderService(); CESTDICOMReaderService(const std::string& description); /** Uses the BaseDICOMReaderService Read function and add extra steps for CEST meta data */ virtual std::vector<itk::SmartPointer<BaseData> > Read() override; protected: /** Returns the reader instance that should be used. The decision may be based * one the passed relevant file list.*/ virtual mitk::DICOMFileReader::Pointer GetReader(const mitk::StringList& relevantFiles) const override; private: virtual CESTDICOMReaderService* Clone() const override; }; } #endif // MITKDICOMSERIESREADERSERVICE_H
/*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKCESTDICOMReaderService_H #define MITKCESTDICOMReaderService_H #include <mitkBaseDICOMReaderService.h> namespace mitk { /** Service wrapper that auto selects (using the mitk::DICOMFileReaderSelector) the best DICOMFileReader from the DICOMReader module and loads additional meta data for CEST data. */ class CESTDICOMReaderService : public BaseDICOMReaderService { public: CESTDICOMReaderService(); CESTDICOMReaderService(const std::string& description); /** Uses the BaseDICOMReaderService Read function and add extra steps for CEST meta data */ using AbstractFileReader::Read; virtual std::vector<itk::SmartPointer<BaseData> > Read() override; protected: /** Returns the reader instance that should be used. The decision may be based * one the passed relevant file list.*/ virtual mitk::DICOMFileReader::Pointer GetReader(const mitk::StringList& relevantFiles) const override; private: virtual CESTDICOMReaderService* Clone() const override; }; } #endif // MITKDICOMSERIESREADERSERVICE_H
Fix warnings in CEST module
Fix warnings in CEST module
C
bsd-3-clause
MITK/MITK,fmilano/mitk,fmilano/mitk,fmilano/mitk,fmilano/mitk,fmilano/mitk,fmilano/mitk,MITK/MITK,MITK/MITK,MITK/MITK,fmilano/mitk,MITK/MITK,MITK/MITK
ed6127234f1e0404be90431a49fdb3cdad350851
Headers/BSPropertySet.h
Headers/BSPropertySet.h
#import <Foundation/Foundation.h> #import <Foundation/NSEnumerator.h> #import "BSNullabilityCompat.h" NS_ASSUME_NONNULL_BEGIN /** * A BSPropertySet represents the set of a Class' properties that will be injected into class instances after * the instances are created. * * If a */ @interface BSPropertySet : NSObject<NSFastEnumeration> /** * Returns a BSPropertySet for the given class, representing the properties named in the argument list. This * method is for use by classes within their implementation of bsProperties. * * For example, suppose there is a class that has a property called "eventLogger" of type EventLogger *. * * Suppose we want to inject two of the properties - address and color. We could implement bsProperties * like this: * * \code * * + (BSPropertySet *)bsProperties { * BSPropertySet *propertySet = [BSPropertySet propertySetWithClass:self propertyNames:@"address" @"color", nil]; * [propertySet bind:@"address" toKey:@"my home address" * * } * * \endcode */ + (BSPropertySet *)propertySetWithClass:(Class)owningClass propertyNames:(NSString *)property1, ... NS_REQUIRES_NIL_TERMINATION; - (void)bindProperty:(NSString *)propertyName toKey:(id)key; @end NS_ASSUME_NONNULL_END
#import <Foundation/Foundation.h> #import <Foundation/NSEnumerator.h> #import "BSNullabilityCompat.h" NS_ASSUME_NONNULL_BEGIN /** * A BSPropertySet represents the set of a Class' properties that will be injected into class instances after * the instances are created. * * If a */ @interface BSPropertySet : NSObject<NSFastEnumeration> /** * Returns a BSPropertySet for the given class, representing the properties named in the argument list. This * method is for use by classes within their implementation of bsProperties. * * For example, suppose there is a class that has a property called "eventLogger" of type EventLogger *. * * Suppose we want to inject two of the properties - address and color. We could implement bsProperties * like this: * * \code * * + (BSPropertySet *)bsProperties { * BSPropertySet *propertySet = [BSPropertySet propertySetWithClass:self propertyNames:@"address" @"color", nil]; * [propertySet bind:@"address" toKey:@"my home address"]; * return propertySet; * } * * \endcode */ + (BSPropertySet *)propertySetWithClass:(Class)owningClass propertyNames:(NSString *)property1, ... NS_REQUIRES_NIL_TERMINATION; - (void)bindProperty:(NSString *)propertyName toKey:(id)key; @end NS_ASSUME_NONNULL_END
Fix code in header documentation
Fix code in header documentation
C
mit
lumoslabs/blindside,jbsf/blindside,lumoslabs/blindside,jbsf/blindside,jbsf/blindside,lumoslabs/blindside
e7c74f1f1dc05f5befbd66709a3908490d320a66
include/kompositum/printer.h
include/kompositum/printer.h
// Copyright(c) 2016 artopantone. // Distributed under the MIT License (http://opensource.org/licenses/MIT) #pragma once #include <kompositum/visitor.h> namespace Kompositum { class Printer : public Visitor { public: void visit(Leaf* leaf) override { doIndentation(); printf("- Leaf (%lu)\n", leaf->getID()); } void visit(Composite* composite) override { doIndentation(); indent++; if (!composite->hasChildren()) { printf("- Composite (%lu): empty\n", composite->getID()); } else { printf("+ Composite (%lu):\n", composite->getID()); composite->visitChildren(*this); } indent--; } private: void doIndentation() const { for (auto i = 0u; i < indent; ++i) printf("+--"); } unsigned int indent = 0; }; } // namespace Kompositum
// Copyright(c) 2016 artopantone. // Distributed under the MIT License (http://opensource.org/licenses/MIT) #pragma once #include <kompositum/visitor.h> #include <cstdio> namespace Kompositum { class Printer : public Visitor { public: void visit(Leaf* leaf) override { doIndentation(); printf("- Leaf (%lu)\n", leaf->getID()); } void visit(Composite* composite) override { doIndentation(); indent++; if (!composite->hasChildren()) { printf("- Composite (%lu): empty\n", composite->getID()); } else { printf("+ Composite (%lu):\n", composite->getID()); composite->visitChildren(*this); } indent--; } private: void doIndentation() const { for (auto i = 0u; i < indent; ++i) printf("+--"); } unsigned int indent = 0; }; } // namespace Kompositum
Add missing header for printf
Add missing header for printf
C
mit
Geraet/Kompositum
e8a1e8a524d4860fcd9d176ee1fef250139b7e57
src/pomodoro_config.h
src/pomodoro_config.h
// ---------------------------------------------------------------------------- // pomodoro_config - Defines the parameters for various pomodoro technique bits // Copyright (c) 2013 Jonathan Speicher ([email protected]) // Licensed under the MIT license: http://opensource.org/licenses/MIT // ---------------------------------------------------------------------------- #pragma once // Defines the duration of a pomodoro. #define POMODORO_MINUTES 0 #define POMODORO_SECONDS 10 // Defines the duration of a break. #define BREAK_MINUTES 0 #define BREAK_SECONDS 5
// ---------------------------------------------------------------------------- // pomodoro_config - Defines the parameters for various pomodoro technique bits // Copyright (c) 2013 Jonathan Speicher ([email protected]) // Licensed under the MIT license: http://opensource.org/licenses/MIT // ---------------------------------------------------------------------------- #pragma once // Defines the duration of a pomodoro. #define POMODORO_MINUTES 25 #define POMODORO_SECONDS 0 // Defines the duration of a break. #define BREAK_MINUTES 5 #define BREAK_SECONDS 0
Change back to real-length pomodoros and breaks
Change back to real-length pomodoros and breaks
C
mit
jonspeicher/Pomade,elliots/simple-demo-pebble,jonspeicher/Pomade
1af86fac6692ea2b5f9a92446ba6099f83b8dedb
src/platform/win32/num_cpus.c
src/platform/win32/num_cpus.c
/* * Copyright (C) 2012, Parrot Foundation. */ /* =head1 NAME src/platform/win32/num_cpus.c =head1 DESCRIPTION Returns the number of CPUs for win32 systems =head2 Functions =cut */ #include "parrot/parrot.h" #ifdef _WIN32 # define WIN32_LEAN_AND_MEAN # include <windows.h> #endif /* HEADERIZER HFILE: none */ /* =over 4 =item C<INTVAL Parrot_get_num_cpus(Parrot_Interp)> Returns the number of CPUs =back =cut */ INTVAL Parrot_get_num_cpus(Parrot_Interp interp) { INTVAL nprocs = -1; SYSTEM_INFO info; GetSystemInfo(&info); nprocs = (INTVAL)info.dwNumberOfProcessors; return nprocs; } /* * Local variables: * c-file-style: "parrot" * End: * vim: expandtab shiftwidth=4 cinoptions='\:2=2' : */
/* * Copyright (C) 2012, Parrot Foundation. */ /* =head1 NAME src/platform/win32/num_cpus.c =head1 DESCRIPTION Returns the number of CPUs for win32 systems =head2 Functions =cut */ #include "parrot/parrot.h" #ifdef _WIN32 # define WIN32_LEAN_AND_MEAN # include <windows.h> #endif /* HEADERIZER HFILE: none */ /* =over 4 =item C<INTVAL Parrot_get_num_cpus(Parrot_Interp interp)> Returns the number of CPUs =back =cut */ INTVAL Parrot_get_num_cpus(Parrot_Interp interp) { INTVAL nprocs = -1; SYSTEM_INFO info; GetSystemInfo(&info); nprocs = (INTVAL)info.dwNumberOfProcessors; return nprocs; } /* * Local variables: * c-file-style: "parrot" * End: * vim: expandtab shiftwidth=4 cinoptions='\:2=2' : */
Correct documentation of C function.
[codingstd] Correct documentation of C function.
C
artistic-2.0
youprofit/parrot,youprofit/parrot,tkob/parrot,parrot/parrot,parrot/parrot,tkob/parrot,parrot/parrot,tkob/parrot,FROGGS/parrot,tkob/parrot,tkob/parrot,youprofit/parrot,youprofit/parrot,FROGGS/parrot,youprofit/parrot,tkob/parrot,youprofit/parrot,FROGGS/parrot,parrot/parrot,parrot/parrot,FROGGS/parrot,tkob/parrot,tkob/parrot,youprofit/parrot,FROGGS/parrot,youprofit/parrot,FROGGS/parrot,FROGGS/parrot,FROGGS/parrot
7e02a89c92248e1107d7adf1e5d2f65feedcc433
roofit/roofitcore/inc/RooFitCore_LinkDef.h
roofit/roofitcore/inc/RooFitCore_LinkDef.h
#ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ function Roo* ; #pragma link C++ class RooLinkedList- ; #pragma link C++ class RooRealVar- ; #pragma link C++ class RooAbsBinning- ; #pragma link off class RooErrorHandler ; #pragma link C++ class RooRandomizeParamMCSModule::UniParam ; #pragma link C++ class RooRandomizeParamMCSModule::GausParam ; #endif
#ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ function Roo* ; #pragma link C++ class RooLinkedList- ; #pragma link C++ class RooRealVar- ; #pragma link C++ class RooAbsBinning- ; #pragma link off class RooErrorHandler ; #endif
Disable attempt to generate dictionary for private classes
Disable attempt to generate dictionary for private classes The following warning was generated by rootcling: Warning: Class or struct RooRandomizeParamMCSModule::UniParam was selected but its dictionary cannot be generated: this is a private or protected class and this is not supported. No direct I/O operation of RooRandomizeParamMCSModule::UniParam instances will be possible. Reference: http://cdash.cern.ch/viewBuildError.php?type=1&buildid=393839
C
lgpl-2.1
zzxuanyuan/root,olifre/root,root-mirror/root,zzxuanyuan/root,olifre/root,root-mirror/root,root-mirror/root,karies/root,root-mirror/root,karies/root,root-mirror/root,olifre/root,karies/root,karies/root,zzxuanyuan/root,zzxuanyuan/root,root-mirror/root,root-mirror/root,zzxuanyuan/root,karies/root,karies/root,zzxuanyuan/root,root-mirror/root,olifre/root,karies/root,olifre/root,karies/root,olifre/root,olifre/root,zzxuanyuan/root,zzxuanyuan/root,karies/root,root-mirror/root,zzxuanyuan/root,karies/root,root-mirror/root,zzxuanyuan/root,olifre/root,karies/root,zzxuanyuan/root,olifre/root,olifre/root,root-mirror/root,olifre/root,zzxuanyuan/root
8cf1942611f7d3e517412e2062da2a69f514cd9f
ui/textdialog.h
ui/textdialog.h
#pragma once #include <QtWidgets/QDialog> #include "binaryninjaapi.h" #include "uitypes.h" class BINARYNINJAUIAPI TextDialog: public QDialog { Q_OBJECT QWidget* m_parent; QString m_title; QString m_msg; QStringList m_options; Qt::WindowFlags m_flags; QString m_qSettingsListName; int m_historySize; QString m_historyEntry; QString m_initialText; public: TextDialog(QWidget* parent, const QString& title, const QString& msg, const QString& qSettingsListName, const std::string& initialText = ""); TextDialog(QWidget* parent, const QString& title, const QString& msg, const QString& qSettingsListName, const QString& initialText); QString getItem(bool& ok); void setInitialText(const std::string& initialText) { m_initialText = QString::fromStdString(initialText); } void commitHistory(); };
#pragma once #include <QtWidgets/QDialog> #include <QtWidgets/QComboBox> #include <QtWidgets/QLabel> #include "binaryninjaapi.h" #include "uitypes.h" #include "binaryninjaapi.h" class BINARYNINJAUIAPI TextDialog: public QDialog { Q_OBJECT QString m_qSettingsListName; int m_historySize; QString m_historyEntry; QString m_initialText; QStringList m_historyEntries; QLabel* m_messageText; QComboBox* m_combo; public: TextDialog(QWidget* parent, const QString& title, const QString& msg, const QString& qSettingsListName, const std::string& initialText = ""); TextDialog(QWidget* parent, const QString& title, const QString& msg, const QString& qSettingsListName, const QString& initialText); QString getItem(); void setInitialText(const std::string& initialText) { m_initialText = QString::fromStdString(initialText); } void commitHistory(); };
Fix case sensitivity issue with the rename dialog
Fix case sensitivity issue with the rename dialog
C
mit
joshwatson/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api
b5220189bc6a5ec22efa7c6b8ae39bc166303c62
src/h/startup.h
src/h/startup.h
typedef struct { int cluster; /* Condor Cluster # */ int proc; /* Condor Proc # */ int job_class; /* STANDARD, VANILLA, PVM, PIPE, ... */ uid_t uid; /* Execute job under this UID */ gid_t gid; /* Execute job under this pid */ pid_t virt_pid; /* PVM virt pid of this process */ int soft_kill_sig; /* Use this signal for a soft kill */ char *a_out_name; /* Where to get executable file */ char *cmd; /* Command name given by the user */ char *args; /* Command arguments given by the user */ char *env; /* Environment variables */ char *iwd; /* Initial working directory */ BOOLEAN ckpt_wanted; /* Whether user wants checkpointing */ BOOLEAN is_restart; /* Whether this run is a restart */ BOOLEAN coredump_limit_exists; /* Whether user wants to limit core size */ int coredump_limit; /* Limit in bytes */ } STARTUP_INFO; /* Should eliminate starter knowing the a.out name. Should go to shadow for instructions on how to fetch the executable - e.g. local file with name <name> or get it from TCP port <x> on machine <y>. */
typedef struct { int version_num; /* version of this structure */ int cluster; /* Condor Cluster # */ int proc; /* Condor Proc # */ int job_class; /* STANDARD, VANILLA, PVM, PIPE, ... */ uid_t uid; /* Execute job under this UID */ gid_t gid; /* Execute job under this gid */ pid_t virt_pid; /* PVM virt pid of this process */ int soft_kill_sig; /* Use this signal for a soft kill */ char *cmd; /* Command name given by the user */ char *args; /* Command arguments given by the user */ char *env; /* Environment variables */ char *iwd; /* Initial working directory */ BOOLEAN ckpt_wanted; /* Whether user wants checkpointing */ BOOLEAN is_restart; /* Whether this run is a restart */ BOOLEAN coredump_limit_exists; /* Whether user wants to limit core size */ int coredump_limit; /* Limit in bytes */ } STARTUP_INFO; #define STARTUP_VERSION 1 /* Should eliminate starter knowing the a.out name. Should go to shadow for instructions on how to fetch the executable - e.g. local file with name <name> or get it from TCP port <x> on machine <y>. */
Add version number and get rid if a.out name.
Add version number and get rid if a.out name.
C
apache-2.0
djw8605/htcondor,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,zhangzhehust/htcondor,djw8605/htcondor,clalancette/condor-dcloud,djw8605/condor,neurodebian/htcondor,htcondor/htcondor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,htcondor/htcondor,djw8605/condor,clalancette/condor-dcloud,zhangzhehust/htcondor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,zhangzhehust/htcondor,htcondor/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,djw8605/htcondor,djw8605/condor,djw8605/condor,zhangzhehust/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco,djw8605/condor,neurodebian/htcondor,neurodebian/htcondor,djw8605/condor,neurodebian/htcondor,htcondor/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco,htcondor/htcondor,bbockelm/condor-network-accounting,zhangzhehust/htcondor,bbockelm/condor-network-accounting,neurodebian/htcondor,htcondor/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,djw8605/condor,djw8605/htcondor,bbockelm/condor-network-accounting,neurodebian/htcondor,djw8605/htcondor,djw8605/condor,bbockelm/condor-network-accounting,clalancette/condor-dcloud,htcondor/htcondor,djw8605/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,clalancette/condor-dcloud,htcondor/htcondor,neurodebian/htcondor,bbockelm/condor-network-accounting,zhangzhehust/htcondor,zhangzhehust/htcondor,clalancette/condor-dcloud
0e503bac91f852f423472b89f4f4356a71143ccc
nttimer.h
nttimer.h
#pragma once #include <minwindef.h> //#include <ntstatus.h> // Can't include ntdef.h because it clashes with winnt.h //#include <ntdef.h> typedef _Return_type_success_(return >= 0) LONG NTSTATUS; typedef void* POBJECT_ATTRIBUTES; typedef enum _TIMER_TYPE { NotificationTimer, SynchronizationTimer } TIMER_TYPE; #pragma comment(lib, "ntdll.lib") extern "C" { NTSYSAPI NTSTATUS NTAPI NtCancelTimer( IN HANDLE TimerHandle, OUT PBOOLEAN CurrentState OPTIONAL); NTSYSAPI NTSTATUS NTAPI NtCreateTimer( OUT PHANDLE TimerHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN TIMER_TYPE TimerType); typedef void(CALLBACK * PTIMER_APC_ROUTINE)( IN PVOID TimerContext, IN ULONG TimerLowValue, IN LONG TimerHighValue ); NTSYSAPI NTSTATUS NTAPI NtSetTimer( IN HANDLE TimerHandle, IN PLARGE_INTEGER DueTime, IN PTIMER_APC_ROUTINE TimerApcRoutine OPTIONAL, IN PVOID TimerContext OPTIONAL, IN BOOLEAN ResumeTimer, IN LONG Period OPTIONAL, OUT PBOOLEAN PreviousState OPTIONAL); NTSYSAPI NTSTATUS NTAPI NtSetTimerResolution( IN ULONG RequestedResolution, IN BOOLEAN Set, OUT PULONG ActualResolution ); NTSYSAPI NTSTATUS NTAPI NtQueryTimerResolution( OUT PULONG MinimumResolution, OUT PULONG MaximumResolution, OUT PULONG ActualResolution ); }
Add header file with declarations for NT timers
Add header file with declarations for NT timers
C
mit
jgfoster/Dolphin,objectarts/DolphinVM,shoshanatech/Dolphin,dolphinsmalltalk/Dolphin,blairmcg/Dolphin,dolphinsmalltalk/Dolphin,shoshanatech/Dolphin,dolphinsmalltalk/DolphinVM,blairmcg/Dolphin,jgfoster/Dolphin,objectarts/Dolphin,objectarts/DolphinVM,dolphinsmalltalk/DolphinVM,jgfoster/Dolphin,blairmcg/Dolphin,dolphinsmalltalk/Dolphin,jgfoster/Dolphin,shoshanatech/Dolphin,dolphinsmalltalk/Dolphin,shoshanatech/Dolphin,objectarts/Dolphin,blairmcg/Dolphin
851b00b16235d9026d80ddfd783a5af9d0a2d5b6
msvcdbg.h
msvcdbg.h
#if defined(_MSC_VER) && !defined(NDEBUG) && defined(_CRTDBG_MAP_ALLOC) && !defined(MSVCDBG_H) #define MSVCDBG_H /*! * @file msvcdbg.h * @brief Memory debugger for msvc * @author koturn */ #include <crtdbg.h> static void __msvc_init_memory_check__(void); #pragma section(".CRT$XCU", read) __declspec(allocate(".CRT$XCU")) void (* __msvc_init_memory_check___)(void) = __msvc_init_memory_check__; /*! * @brief Enable heap management */ static void __msvc_init_memory_check__(void) { _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF | _CRTDBG_DELAY_FREE_MEM_DF); _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDOUT); } #endif
#if defined(_MSC_VER) && !defined(NDEBUG) && defined(_CRTDBG_MAP_ALLOC) && !defined(MSVCDBG_H) #define MSVCDBG_H /*! * @file msvcdbg.h * @brief Memory debugger for msvc * @author koturn */ #include <crtdbg.h> #define MSVCDBG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__) #ifdef MSVCDBG_REPLACE_NEW # define new MSVCDBG_NEW #endif static void __msvc_init_memory_check__(void); #pragma section(".CRT$XCU", read) __declspec(allocate(".CRT$XCU")) void (* __msvc_init_memory_check___)(void) = __msvc_init_memory_check__; /*! * @brief Enable heap management */ static void __msvc_init_memory_check__(void) { _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF | _CRTDBG_DELAY_FREE_MEM_DF); _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDOUT); } #endif
Enable to replace "new" operator
Enable to replace "new" operator
C
mit
koturn/msvcdbg
a536e7ccae49fb5141e9a959cff10500599993d4
ui/clickablelabel.h
ui/clickablelabel.h
#pragma once #include <QtWidgets/QLabel> class BINARYNINJAUIAPI ClickableLabel: public QLabel { Q_OBJECT public: ClickableLabel(QWidget* parent = nullptr, const QString& name = ""): QLabel(parent) { setText(name); } signals: void clicked(); protected: void mouseReleaseEvent(QMouseEvent* event) override { if (event->button() == Qt::LeftButton) emit clicked(); } };
#pragma once #include <QtWidgets/QLabel> class BINARYNINJAUIAPI ClickableLabel: public QLabel { Q_OBJECT public: ClickableLabel(QWidget* parent = nullptr, const QString& name = ""): QLabel(parent) { setText(name); } Q_SIGNALS: void clicked(); protected: void mouseReleaseEvent(QMouseEvent* event) override { if (event->button() == Qt::LeftButton) Q_EMIT clicked(); } };
Use Q_SIGNALS / Q_EMIT macros instead of signals / emit
Use Q_SIGNALS / Q_EMIT macros instead of signals / emit
C
mit
joshwatson/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,joshwatson/binaryninja-api,joshwatson/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api
af485fc505247b10dc247ebdf96ba2aa70448ea5
tests/embedded/do_test.c
tests/embedded/do_test.c
#include <hwloc.h> #include <stdio.h> /* The body of the test is in a separate .c file and a separate library, just to ensure that hwloc didn't force compilation with visibility flags enabled. */ int do_test(void) { mytest_hwloc_topology_t topology; unsigned depth; hwloc_cpuset_t cpu_set; /* Just call a bunch of functions to see if we can link and run */ printf("*** Test 1: cpuset alloc\n"); cpu_set = mytest_hwloc_cpuset_alloc(); if (NULL == cpu_set) return 1; printf("*** Test 2: topology init\n"); if (0 != mytest_hwloc_topology_init(&topology)) return 1; printf("*** Test 3: topology load\n"); if (0 != mytest_hwloc_topology_load(topology)) return 1; printf("*** Test 4: topology get depth\n"); depth = mytest_hwloc_topology_get_depth(topology); if (depth < 0) return 1; printf(" Max depth: %u\n", depth); printf("*** Test 5: topology destroy\n"); mytest_hwloc_topology_destroy(topology); printf("*** Test 6: cpuset free\n"); mytest_hwloc_cpuset_free(cpu_set); return 0; }
#include <hwloc.h> #include <stdio.h> /* The body of the test is in a separate .c file and a separate library, just to ensure that hwloc didn't force compilation with visibility flags enabled. */ int do_test(void) { mytest_hwloc_topology_t topology; unsigned depth; hwloc_bitmap_t cpu_set; /* Just call a bunch of functions to see if we can link and run */ printf("*** Test 1: bitmap alloc\n"); cpu_set = mytest_hwloc_bitmap_alloc(); if (NULL == cpu_set) return 1; printf("*** Test 2: topology init\n"); if (0 != mytest_hwloc_topology_init(&topology)) return 1; printf("*** Test 3: topology load\n"); if (0 != mytest_hwloc_topology_load(topology)) return 1; printf("*** Test 4: topology get depth\n"); depth = mytest_hwloc_topology_get_depth(topology); if (depth < 0) return 1; printf(" Max depth: %u\n", depth); printf("*** Test 5: topology destroy\n"); mytest_hwloc_topology_destroy(topology); printf("*** Test 6: bitmap free\n"); mytest_hwloc_bitmap_free(cpu_set); return 0; }
Convert the embedded test to the bitmap API
Convert the embedded test to the bitmap API This commit was SVN r2512.
C
bsd-3-clause
shekkbuilder/hwloc,ggouaillardet/hwloc,shekkbuilder/hwloc,ggouaillardet/hwloc,shekkbuilder/hwloc,ggouaillardet/hwloc,ggouaillardet/hwloc,shekkbuilder/hwloc
a7c27a794bf5e25046a75767f709f6619b61bcb1
grantlee_core_library/parser.h
grantlee_core_library/parser.h
/* Copyright (c) 2009 Stephen Kelly <[email protected]> */ #ifndef PARSER_H #define PARSER_H #include <QStringList> #include "token.h" #include "node.h" namespace Grantlee { class AbstractNodeFactory; class TagLibraryInterface; class Filter; } class ParserPrivate; namespace Grantlee { class GRANTLEE_EXPORT Parser : public QObject { Q_OBJECT public: Parser( QList<Token> tokenList, QStringList pluginDirs, QObject *parent ); ~Parser(); NodeList parse(QStringList stopAt, QObject *parent); NodeList parse(QObject *parent); Filter *getFilter(const QString &name); void skipPast(const QString &tag); Token nextToken(); bool hasNextToken(); void loadLib(const QString &name); void emitError(int errorNumber, const QString &message); protected: void addTag(QObject *); void getBuiltInLibrary(); void getDefaultLibrary(); void prependToken(Token token); signals: void error(int type, const QString &message); private: Q_DECLARE_PRIVATE(Parser); ParserPrivate *d_ptr; }; } #endif
/* Copyright (c) 2009 Stephen Kelly <[email protected]> */ #ifndef PARSER_H #define PARSER_H #include <QStringList> #include "token.h" #include "node.h" namespace Grantlee { class Filter; } class ParserPrivate; namespace Grantlee { class GRANTLEE_EXPORT Parser : public QObject { Q_OBJECT public: Parser( QList<Token> tokenList, QStringList pluginDirs, QObject *parent ); ~Parser(); NodeList parse(QStringList stopAt, QObject *parent); NodeList parse(QObject *parent); Filter *getFilter(const QString &name); void skipPast(const QString &tag); Token nextToken(); bool hasNextToken(); void loadLib(const QString &name); void emitError(int errorNumber, const QString &message); protected: void prependToken(Token token); signals: void error(int type, const QString &message); private: Q_DECLARE_PRIVATE(Parser); ParserPrivate *d_ptr; }; } #endif
Remove some unused classes and methods.
Remove some unused classes and methods.
C
lgpl-2.1
cutelyst/grantlee,simonwagner/grantlee,simonwagner/grantlee,cutelyst/grantlee,cutelyst/grantlee,simonwagner/grantlee,simonwagner/grantlee,simonwagner/grantlee,cutelyst/grantlee,simonwagner/grantlee,cutelyst/grantlee
87ab5a95231f699ff3a7f7893ec717db8e2dd7f6
libc/sysdeps/linux/arm/__syscall_error.c
libc/sysdeps/linux/arm/__syscall_error.c
/* Wrapper around clone system call. Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include <errno.h> /* This routine is jumped to by all the syscall handlers, to stash * an error number into errno. */ int attribute_hidden __syscall_error (int err_no) { __set_errno (err_no); return -1; }
Add missing file needed for arm to compile
Add missing file needed for arm to compile
C
lgpl-2.1
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
ffc7c9c71d092251c05e4193958ee357ee64ef3f
formats/format.h
formats/format.h
#ifndef FORMAT_H #define FORMAT_H #include <cstddef> #include <cstring> // memmove class Format { public: Format(void *p, size_t s = 0) : fp((char *)p), size(s) {}; virtual size_t Leanify(size_t size_leanified = 0) { if (size_leanified) { memmove(fp - size_leanified, fp, size); fp -= size_leanified; } return size; } protected: // pointer to the file content char *fp; // size of the file size_t size; }; #endif
#ifndef FORMAT_H #define FORMAT_H #include <cstddef> #include <cstring> // memmove class Format { public: Format(void *p, size_t s = 0) : fp((char *)p), size(s) {}; virtual ~Format() {}; virtual size_t Leanify(size_t size_leanified = 0) { if (size_leanified) { memmove(fp - size_leanified, fp, size); fp -= size_leanified; } return size; } protected: // pointer to the file content char *fp; // size of the file size_t size; }; #endif
Fix warning of non-virtual destructor
Fix warning of non-virtual destructor
C
mit
JayXon/Leanify,yyjdelete/Leanify,JayXon/Leanify,yyjdelete/Leanify
176354ff491286ce45f32cd41efc641fed506b4f
lib/toplevel.h
lib/toplevel.h
/******************************************************************** * * * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: last mod: $Id: toplevel.h,v 1.1 2003/06/04 01:31:46 mauricio Exp $ ********************************************************************/ /*from dbm huffman pack patch*/ extern void write_Qtables(oggpack_buffer* opb); extern void write_HuffmanSet(oggpack_buffer* opb, HUFF_ENTRY **hroot); extern void read_Qtables(oggpack_buffer* opb); extern void read_HuffmanSet(oggpack_buffer* opb); extern void InitHuffmanSetPlay( PB_INSTANCE *pbi );
/******************************************************************** * * * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: last mod: $Id: toplevel.h,v 1.2 2003/06/07 23:34:56 giles Exp $ ********************************************************************/ /*from dbm huffman pack patch*/ extern void write_Qtables(oggpack_buffer* opb); extern void write_HuffmanSet(oggpack_buffer* opb, HUFF_ENTRY **hroot); extern void read_Qtables(oggpack_buffer* opb); extern void read_HuffmanSet(oggpack_buffer* opb); extern void InitHuffmanSetPlay( PB_INSTANCE *pbi );
Add newline at the end of the file.
Add newline at the end of the file. git-svn-id: 8dbf393e6e9ab8d4979d29f9a341a98016792aa6@4891 0101bb08-14d6-0310-b084-bc0e0c8e3800
C
bsd-3-clause
Distrotech/libtheora,KTXSoftware/theora,KTXSoftware/theora,Distrotech/libtheora,KTXSoftware/theora,Distrotech/libtheora,Distrotech/libtheora,Distrotech/libtheora,KTXSoftware/theora,KTXSoftware/theora
09a58883475fd838d56775181592d1abf3e9e453
3RVX/MeterWnd/Animation.h
3RVX/MeterWnd/Animation.h
#pragma once #include "MeterWnd.h" class Animation { public: Animation(MeterWnd &meterWnd) : _meterWnd(meterWnd) { } virtual bool Animate() = 0; virtual void Reset() = 0; protected: MeterWnd &_meterWnd; };
Add new abstract animation class
Add new abstract animation class
C
bsd-2-clause
Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,malensek/3RVX
a21685eab417189d887db6d5a83bfff83661c1eb
gui/mainwindow.h
gui/mainwindow.h
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); private: Ui::MainWindow *ui; }; #endif // MAINWINDOW_H
#pragma once #include <QMainWindow> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); private: Ui::MainWindow *ui; };
Use pragma once instead of ifdef
Use pragma once instead of ifdef
C
bsd-2-clause
csete/softrig,csete/softrig,csete/softrig
28756936d56729331733a17a2f750969a8713ece
ports/broadcom/boards/raspberrypi_zero2w/mpconfigboard.h
ports/broadcom/boards/raspberrypi_zero2w/mpconfigboard.h
#define MICROPY_HW_BOARD_NAME "Raspberry Pi Zero 2W" #define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO14) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO15)
#define MICROPY_HW_BOARD_NAME "Raspberry Pi Zero 2W" #define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) #define MICROPY_HW_LED_STATUS (&pin_GPIO29) #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO14) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO15)
Add HW_LED_STATUS pin to Zero 2W board
Add HW_LED_STATUS pin to Zero 2W board
C
mit
adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython
73069b2287eb0d7c14508e158683463e496f19a6
kernel/kabort.c
kernel/kabort.c
#include "kputs.c" void abort(void) { // TODO: Add proper kernel panic. kputs("Kernel Panic! abort()\n"); while ( 1 ) { } }
#ifndef KABORT_C #define KABORT_C #include "kputs.c" void kabort(void) { // TODO: Add proper kernel panic. kputs("Kernel Panic! abort()\n"); while ( 1 ) { } } #endif
Add header guards. Properly name function.
Add header guards. Properly name function.
C
mit
Herbstein/kernel-of-truth,awensaunders/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,Herbstein/kernel-of-truth,Herbstein/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,awensaunders/kernel-of-truth,awensaunders/kernel-of-truth
62f40124d763af49bf9ef8f03ba23db2818b771f
src/voglcore/vogl_warnings.h
src/voglcore/vogl_warnings.h
/************************************************************************** * * Copyright 2013-2014 RAD Game Tools and Valve Software * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * **************************************************************************/ #if defined(__GNUC__) #define GCC_DIAGNOSTIC_STR(s) #s #define GCC_DIAGNOSTIC_JOINSTR(x,y) GCC_DIAGNOSTIC_STR(x ## y) #define GCC_DIAGNOSTIC_DO_PRAGMA(x) _Pragma (#x) #define GCC_DIAGNOSTIC_PRAGMA(x) GCC_DIAGNOSTIC_DO_PRAGMA(GCC diagnostic x) #define GCC_DIAGNOSTIC_PUSH() GCC_DIAGNOSTIC_PRAGMA(push) #define GCC_DIAGNOSTIC_IGNORED(x) GCC_DIAGNOSTIC_PRAGMA(ignored GCC_DIAGNOSTIC_JOINSTR(-W,x)) #define GCC_DIAGNOSTIC_POP() GCC_DIAGNOSTIC_PRAGMA(pop) #else #define GCC_DIAGNOSTIC_PUSH() #define GCC_DIAGNOSTIC_IGNORED(x) #define GCC_DIAGNOSTIC_POP() #endif
Add GCC diagnostic warning macros
Add GCC diagnostic warning macros
C
mit
ValveSoftware/vogl,bclemetsonblizzard/vogl,kingtaurus/vogl,kingtaurus/vogl,bclemetsonblizzard/vogl,kingtaurus/vogl,ValveSoftware/vogl,ValveSoftware/vogl,bclemetsonblizzard/vogl,kingtaurus/vogl,bclemetsonblizzard/vogl,ValveSoftware/vogl,bclemetsonblizzard/vogl
f1540aa94ffea5a5a241e69cfb317c6361421f03
src/replace_format_ptr.c
src/replace_format_ptr.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* replace_format_ptr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: jlagneau <[email protected]> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/04/19 10:28:27 by jlagneau #+# #+# */ /* Updated: 2017/04/19 10:32:52 by jlagneau ### ########.fr */ /* */ /* ************************************************************************** */ #include <libft.h> #include <ft_printf.h> int replace_format_ptr(char *format, char *pos, va_list ap) { int ret; char *tmp; char *data; tmp = NULL; if (!(tmp = ft_itoa_base(va_arg(ap, unsigned int), BASE_HEX_LOWER))) return (-1); if (ft_strcmp(tmp, "0") == 0) data = ft_strdup("(nil)"); else data = ft_strjoin("0x", tmp); ret = replace_format(format, data, pos, 2); ft_strdel(&data); ft_strdel(&tmp); return (ret); }
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* replace_format_ptr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: jlagneau <[email protected]> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/04/19 10:28:27 by jlagneau #+# #+# */ /* Updated: 2017/04/19 12:10:38 by jlagneau ### ########.fr */ /* */ /* ************************************************************************** */ #include <libft.h> #include <ft_printf.h> int replace_format_ptr(char *format, char *pos, va_list ap) { int ret; char *tmp; char *data; tmp = NULL; if (!(tmp = ft_ltoa_base(va_arg(ap, unsigned long), BASE_HEX_LOWER))) return (-1); if (ft_strcmp(tmp, "0") == 0) data = ft_strdup("(nil)"); else data = ft_strjoin("0x", tmp); ret = replace_format(format, data, pos, 2); ft_strdel(&data); ft_strdel(&tmp); return (ret); }
Fix format ptr from unsigned int to unsigned long
Fix format ptr from unsigned int to unsigned long
C
mit
jlagneau/libftprintf,jlagneau/libftprintf
9a779b1446afdf1f4b6d1b8ba598ffb329edccb3
Labs/Lab3/lab3_skeleton.c
Labs/Lab3/lab3_skeleton.c
/* Based on msp430g2xx3_wdt_02.c from the TI Examples */ #include <msp430.h> int main(void) { WDTCTL = WDT_ADLY_250; // WDT 250ms, ACLK, interval timer IE1 |= WDTIE; // Enable WDT interrupt P1DIR |= BIT0; // Set P1.0 to output direction __bis_SR_register(GIE); // Enable interrupts while (1) { __bis_SR_register(LPM3_bits); // Enter LPM3 w/interrupt P1OUT ^= BIT0; } } // Watchdog Timer interrupt service routine #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__) #pragma vector=WDT_VECTOR __interrupt void watchdog_timer(void) #elif defined(__GNUC__) void __attribute__ ((interrupt(WDT_VECTOR))) watchdog_timer (void) #else #error Compiler not supported! #endif { __bic_SR_register_on_exit(LPM3_bits); }
/* Based on msp430g2xx3_wdt_02.c from the TI Examples */ #include <msp430.h> int main(void) { BCSCTL3 |= LFXT1S_2; // ACLK = VLO WDTCTL = WDT_ADLY_250; // WDT 250ms, ACLK, interval timer IE1 |= WDTIE; // Enable WDT interrupt P1DIR |= BIT0; // Set P1.0 to output direction __bis_SR_register(GIE); // Enable interrupts while (1) { __bis_SR_register(LPM3_bits); // Enter LPM3 w/interrupt P1OUT ^= BIT0; } } // Watchdog Timer interrupt service routine #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__) #pragma vector=WDT_VECTOR __interrupt void watchdog_timer(void) #elif defined(__GNUC__) void __attribute__ ((interrupt(WDT_VECTOR))) watchdog_timer (void) #else #error Compiler not supported! #endif { __bic_SR_register_on_exit(LPM3_bits); }
Update lab3 skeleton code to properly source ACLK from VLO
Update lab3 skeleton code to properly source ACLK from VLO
C
mit
ckemere/ELEC327,ckemere/ELEC327,ckemere/ELEC327,ckemere/ELEC327,ckemere/ELEC327
9204bf4660feeb3acbc0de2500698adcfdfbd521
include/arch/x64/isr.h
include/arch/x64/isr.h
#pragma once extern void _service_interrupt(void); extern void isr0(void); extern void isr1(void); extern void isr2(void); extern void isr3(void); extern void isr4(void); extern void isr5(void); extern void isr6(void); extern void isr7(void); extern void isr8(void); extern void isr9(void); extern void isr10(void); extern void isr11(void); extern void isr12(void); extern void isr13(void); extern void isr14(void); extern void isr15(void); extern void isr16(void); extern void isr17(void); extern void isr18(void); extern void isr19(void); extern void isr20(void); extern void isr21(void); extern void isr22(void); extern void isr23(void); extern void isr24(void); extern void isr25(void); extern void isr26(void); extern void isr27(void); extern void isr28(void); extern void isr29(void); extern void isr30(void); extern void isr31(void); extern void isr32(void); extern void isr33(void); extern void isr34(void);
#pragma once extern void _service_interrupt(void); typedef void (*isr_f)(void); extern void isr0(void); extern void isr1(void); extern void isr2(void); extern void isr3(void); extern void isr4(void); extern void isr5(void); extern void isr6(void); extern void isr7(void); extern void isr8(void); extern void isr9(void); extern void isr10(void); extern void isr11(void); extern void isr12(void); extern void isr13(void); extern void isr14(void); extern void isr15(void); extern void isr16(void); extern void isr17(void); extern void isr18(void); extern void isr19(void); extern void isr20(void); extern void isr21(void); extern void isr22(void); extern void isr23(void); extern void isr24(void); extern void isr25(void); extern void isr26(void); extern void isr27(void); extern void isr28(void); extern void isr29(void); extern void isr30(void); extern void isr31(void); extern void isr32(void); extern void isr33(void); extern void isr34(void);
Define convenient ISR function pointer type
Define convenient ISR function pointer type
C
mit
iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth
d4e57c88ba4f7d17d09b0f6287456c213a05c566
tensorflow/core/grappler/optimizers/tfg_passes_builder.h
tensorflow/core/grappler/optimizers/tfg_passes_builder.h
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_CORE_GRAPPLER_OPTIMIZERS_TFG_PASSES_BUILDER_H_ #define TENSORFLOW_CORE_GRAPPLER_OPTIMIZERS_TFG_PASSES_BUILDER_H_ #include "mlir/Pass/PassManager.h" // from @llvm-project namespace mlir { namespace tfg { // Constructs the default graph/function-level TFG pass pipeline. void DefaultGrapplerPipeline(PassManager& mgr); // Constructs the default module-level TFG pass pipeline. void DefaultModuleGrapplerPipeline(PassManager& mgr); // Add a remapper pass to the given pass manager. void RemapperPassBuilder(PassManager& mgr); } // namespace tfg } // namespace mlir #endif // TENSORFLOW_CORE_GRAPPLER_OPTIMIZERS_TFG_PASSES_BUILDER_H_
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_CORE_GRAPPLER_OPTIMIZERS_TFG_PASSES_BUILDER_H_ #define TENSORFLOW_CORE_GRAPPLER_OPTIMIZERS_TFG_PASSES_BUILDER_H_ #include "mlir/Pass/PassManager.h" // from @llvm-project namespace mlir { namespace tfg { // Constructs the default graph/function-level TFG pass pipeline. void DefaultGrapplerPipeline(PassManager& manager); // Constructs the default module-level TFG pass pipeline. void DefaultModuleGrapplerPipeline(PassManager& manager); // Add a remapper pass to the given pass manager. void RemapperPassBuilder(PassManager& manager); } // namespace tfg } // namespace mlir #endif // TENSORFLOW_CORE_GRAPPLER_OPTIMIZERS_TFG_PASSES_BUILDER_H_
Make function parameter names consistent between header and impl.
[tfg] Make function parameter names consistent between header and impl. PiperOrigin-RevId: 446807976
C
apache-2.0
karllessard/tensorflow,yongtang/tensorflow,yongtang/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,tensorflow/tensorflow,gautam1858/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,tensorflow/tensorflow,yongtang/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,yongtang/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow
0235bd2ec4410a7d4e3fd7ef4fc6d2ac98730f30
src/adts/adts_display.h
src/adts/adts_display.h
#pragma once #include <sched.h> /* sched_getcpu() */ #include <stdio.h> /* printf() */ /** ************************************************************************** * \brief * preprocessor conditional printf formatter output * * \details * Input arguments are equivalent to printf. referrence printf man pages * for api details * ************************************************************************** */ #if defined(__ADTS_DISPLAY) #define CDISPLAY(_format, ...) \ do { \ char _buffer[256] = {0}; \ \ sprintf(_buffer, _format, ## __VA_ARGS__); \ printf("%3d %4d %-25.25s %-30.30s %s\n", \ sched_getcpu(), __LINE__, __FILE__, __FUNCTION__, _buffer); \ \ /* Serialize console output on exit/error */ \ fflush(stdout); \ } while(0); #else #define CDISPLAY(_format, ...) /* compile disabled */ #endif /** ************************************************************************** * \details * Count digits in decimal number * ************************************************************************** */ inline size_t adts_digits_decimal( int32_t val ) { size_t digits = 0; while (val) { val /= 10; digits++; } return digits; } /* adts_digits_decimal() */
#pragma once #include <sched.h> /* sched_getcpu() */ #include <stdio.h> /* printf() */ /** ************************************************************************** * \brief * preprocessor conditional printf formatter output * * \details * Input arguments are equivalent to printf. referrence printf man pages * for api details * ************************************************************************** */ #if defined(__ADTS_DISPLAY) #define CDISPLAY(_format, ...) \ do { \ char _buffer[256] = {0}; \ size_t _limit = sizeof(_buffer) - 1; \ \ snprintf(_buffer, _limit, _format, ## __VA_ARGS__); \ printf("%3d %4d %-25.25s %-30.30s %s\n", \ sched_getcpu(), __LINE__, __FILE__, __FUNCTION__, _buffer); \ \ /* Serialize console output on exit/error */ \ fflush(stdout); \ } while(0); #else #define CDISPLAY(_format, ...) /* compile disabled */ #endif /** ************************************************************************** * \details * Count digits in decimal number * ************************************************************************** */ inline size_t adts_digits_decimal( int32_t val ) { size_t digits = 0; while (val) { val /= 10; digits++; } return digits; } /* adts_digits_decimal() */
Add buffer overflow safety to CDISPLAY
Add buffer overflow safety to CDISPLAY
C
mit
78613/sample,78613/sample
f9fab9d5c1d8a5711cc6d4a32e06a720958c24aa
cineio-broadcast-ios/cineio-broadcast-ios/CineConstants.h
cineio-broadcast-ios/cineio-broadcast-ios/CineConstants.h
#import <Foundation/Foundation.h> #define API_VERSION "1" #define BASE_URL "https://www.cine.io/api/" #define SDK_VERSION "0.6.1" #define USER_AGENT "cineio-ios" extern NSString* const BaseUrl; extern NSString* const UserAgent;
#import <Foundation/Foundation.h> #define API_VERSION "1" #define BASE_URL "https://www.cine.io/api/" #define SDK_VERSION "0.6.1" #define USER_AGENT "cineio-ios" extern NSString* const BaseUrl; extern NSString* const UserAgent;
Add line break after import
Add line break after import
C
mit
DisruptiveMind/cineio-broadcast-ios,cine-io/cineio-broadcast-ios,sanchosrancho/cineio-broadcast-ios,jrstv/jrstv-broadcast-ios,gouravd/cineio-broadcast-ios
0ba1212867ef18e71a4f05ed19b6d0c89208e954
cc1/arch/i386/arch.h
cc1/arch/i386/arch.h
#define TINT long long #define TUINT unsigned long long #define TFLOAT double #define L_SCHAR L_INT8 #define L_UCHAR L_UINT8 #define L_CHAR L_INT8 #define L_SHORT L_INT16 #define L_USHORT L_UINT16 #define L_INT L_INT32 #define L_UINT L_UINT32 #define L_LONG L_INT32 #define L_ULONG L_UINT32 #define L_LLONG L_INT64 #define L_ULLONG L_UINT64 #define L_BOOL 'B' #define L_FLOAT 'J' #define L_DOUBLE 'D' #define L_LDOUBLE 'H' #define L_ENUM L_INT
Add support for i386 in cc1
Add support for i386 in cc1 We only need to configure the types, and the rest of the code will work without problems.
C
mit
k0gaMSX/kcc,k0gaMSX/scc,8l/scc,8l/scc,k0gaMSX/kcc,k0gaMSX/scc,k0gaMSX/scc,8l/scc
a67eb4aed742365cd175540372e5f94ff82f998c
doc/tutorial_src/set_contents.c
doc/tutorial_src/set_contents.c
#include <cgreen/cgreen.h> #include <cgreen/mocks.h> void convert_to_uppercase(char *converted_string, const char *original_string) { mock(converted_string, original_string); } Ensure(setting_content_of_out_parameter) { expect(convert_to_uppercase, when(original_string, is_equal_to_string("upper case")), will_set_content_of_parameter(&converted_string, "UPPER CASE", 11)); }
#include <cgreen/cgreen.h> #include <cgreen/mocks.h> void convert_to_uppercase(char *converted_string, const char *original_string) { mock(converted_string, original_string); } Ensure(setting_content_of_out_parameter) { expect(convert_to_uppercase, when(original_string, is_equal_to_string("upper case")), will_set_content_of_parameter(converted_string, "UPPER CASE", 11)); }
Fix error in example code
[doc][set_parameter] Fix error in example code
C
isc
cgreen-devs/cgreen,cgreen-devs/cgreen,cgreen-devs/cgreen,cgreen-devs/cgreen,cgreen-devs/cgreen
a0241bdf2645c1190a385faa685326f364bfc3c9
elang/hir/instruction_visitor.h
elang/hir/instruction_visitor.h
// Copyright 2014-2015 Project Vogue. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ELANG_HIR_INSTRUCTION_VISITOR_H_ #define ELANG_HIR_INSTRUCTION_VISITOR_H_ #include "base/macros.h" #include "elang/hir/instructions_forward.h" namespace elang { namespace hir { ////////////////////////////////////////////////////////////////////// // // InstructionVisitor // class InstructionVisitor { public: #define V(Name, ...) virtual void Visit##Name(Name##Instruction* instruction); FOR_EACH_HIR_INSTRUCTION(V) #undef V protected: InstructionVisitor(); virtual ~InstructionVisitor(); virtual void DoDefaultVisit(Instruction* instruction); private: DISALLOW_COPY_AND_ASSIGN(InstructionVisitor); }; } // namespace hir } // namespace elang #endif // ELANG_HIR_INSTRUCTION_VISITOR_H_
// Copyright 2014-2015 Project Vogue. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ELANG_HIR_INSTRUCTION_VISITOR_H_ #define ELANG_HIR_INSTRUCTION_VISITOR_H_ #include "base/macros.h" #include "elang/hir/hir_export.h" #include "elang/hir/instructions_forward.h" namespace elang { namespace hir { ////////////////////////////////////////////////////////////////////// // // InstructionVisitor // class ELANG_HIR_EXPORT InstructionVisitor { public: virtual ~InstructionVisitor(); #define V(Name, ...) virtual void Visit##Name(Name##Instruction* instruction); FOR_EACH_HIR_INSTRUCTION(V) #undef V protected: InstructionVisitor(); virtual void DoDefaultVisit(Instruction* instruction); private: DISALLOW_COPY_AND_ASSIGN(InstructionVisitor); }; } // namespace hir } // namespace elang #endif // ELANG_HIR_INSTRUCTION_VISITOR_H_
Add DLL export attribute to |hir::InstructionVisitor| to use it in compiler.
elang/hir: Add DLL export attribute to |hir::InstructionVisitor| to use it in compiler.
C
apache-2.0
eval1749/elang,eval1749/elang,eval1749/elang,eval1749/elang,eval1749/elang
f354befe514c37daad8932e9c2c46e1efce38c58
Classes/ObjectiveSugar.h
Classes/ObjectiveSugar.h
// C SUGAR #define unless(condition) if(!(condition)) // OBJC SUGAR #import "NSNumber+ObjectiveSugar.h" #import "NSArray+ObjectiveSugar.h" #import "NSMutableArray+ObjectiveSugar.h" #import "NSDictionary+ObjectiveSugar.h" #import "NSSet+ObjectiveSugar.h" #import "NSString+ObjectiveSugar.h"
// C SUGAR #define unless(condition) if(!(condition)) // OBJC SUGAR #import "NSNumber+ObjectiveSugar.h" #import "NSArray+ObjectiveSugar.h" #import "NSMutableArray+ObjectiveSugar.h" #import "NSDictionary+ObjectiveSugar.h" #import "NSSet+ObjectiveSugar.h" #import "NSString+ObjectiveSugar.h"
Fix GCC_WARN_ABOUT_MISSING_NEWLINE in header file
Fix GCC_WARN_ABOUT_MISSING_NEWLINE in header file
C
mit
Anish-kumar-dev/ObjectiveSugar,rizvve/ObjectiveSugar,orta/ObjectiveSugar,supermarin/ObjectiveSugar,gank0326/ObjectiveSugar,oarrabi/ObjectiveSugar,target/ObjectiveSugar,ManagerOrganization/ObjectiveSugar
c87e619ae400b67537cee83894d25cbf25e777ba
tests/regression/30-fast_global_inits/03-performance.c
tests/regression/30-fast_global_inits/03-performance.c
// PARAM: --sets solver td3 --enable ana.int.interval --enable exp.partition-arrays.enabled --enable exp.fast_global_inits --set ana.activated "['base','expRelation','mallocWrapper']" // Without fast_global_inits this takes >150s, when it is enabled < 0.1s int global_array[50][500][20]; int main(void) { for(int i =0; i < 50; i++) { assert(global_array[i][42][7] == 0); } }
// PARAM: --sets solver td3 --enable ana.int.interval --enable exp.partition-arrays.enabled --enable exp.fast_global_inits --set ana.activated "['base','threadid','threadflag','expRelation','mallocWrapper']" // Without fast_global_inits this takes >150s, when it is enabled < 0.1s int global_array[50][500][20]; int main(void) { for(int i =0; i < 50; i++) { assert(global_array[i][42][7] == 0); } }
Fix 30/03 by adding threadid and threadflag analyses
Fix 30/03 by adding threadid and threadflag analyses
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
bf523de92bd31ded4cc8b3a071779fa38a166298
test/Frontend/rewrite-includes-missing.c
test/Frontend/rewrite-includes-missing.c
// RUN: %clang_cc1 -verify -E -frewrite-includes %s -o - | FileCheck -strict-whitespace %s #include "foobar.h" // expected-error {{'foobar.h' file not found}} // CHECK: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}} // CHECK-NEXT: {{^}}#include "foobar.h" // CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}} // CHECK-NEXT: {{^}}# 4 "/usr/local/google/home/blaikie/Development/llvm/src/tools/clang/test/Frontend/rewrite-includes-missing.c" 2{{$}}
// RUN: %clang_cc1 -verify -E -frewrite-includes %s -o - | FileCheck -strict-whitespace %s #include "foobar.h" // expected-error {{'foobar.h' file not found}} // CHECK: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}} // CHECK-NEXT: {{^}}#include "foobar.h" // CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}} // CHECK-NEXT: {{^}}# 4 "{{.*}}rewrite-includes-missing.c" 2{{$}}
Remove absolute path form include test.
Remove absolute path form include test. Review feedback/bot failure from r158459 by Simon Atanasyan and Benjamin Kramer (on IRC). git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@158464 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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
61ffbc5697130918aa600a031ab48ea76791acb9
server/session_context.h
server/session_context.h
#ifndef __MESSAGES__MESSAGE_CONTEXT_H__ #define __MESSAGES__MESSAGE_CONTEXT_H__ #include "request_message.h" #include "reply_message.h" #include "backend.h" namespace traffic { class SessionContext : public RequestVisitor { private: std::unique_ptr<ReplyMessage> _message; DataProvider::ptr_t _data_provider; protected: void visit(StatisticRequest const &request); void visit(SummaryRequest const &request); void visit(ErrorRequest const &request); public: bool process_data(void const *data, size_t const size); void encode_result(std::string &out); SessionContext(DataProvider::ptr_t provider); virtual ~SessionContext() { } }; } #endif
#ifndef __MESSAGES__MESSAGE_CONTEXT_H__ #define __MESSAGES__MESSAGE_CONTEXT_H__ #include "request_message.h" #include "reply_message.h" #include "backend.h" namespace traffic { /** * \brief This is the context for a request/reply session. * * This context is allocated for each request to process the data. It represents * the glue between the server, the messages and the backend. It uses the * RequestMessage interface to parse data to a request, implements the * RequestVisitor interface to select the correct backend method to query and * provide a interface to serialize the result to the wire format. */ class SessionContext : public RequestVisitor { private: std::unique_ptr<ReplyMessage> _message; DataProvider::ptr_t _data_provider; protected: void visit(StatisticRequest const &request); void visit(SummaryRequest const &request); void visit(ErrorRequest const &request); public: /** * \brief Process raw request data in wire format. * * This is the entry point for the context to process its request. It * gets the wire data of the request, transforms it to a request * instance and give it to the backend. The result from the backend will * be stored internally. * * \param data The pointer to the raw request data. * \param size The size of the request data. * \return false in case of error. */ bool process_data(void const *data, size_t const size); /** * \brief Encode the current reply data to the wire format. * * This serialize the current state (result from the backend or error * message) to the reply wire format and put the result into the given * string reference. * * \param out The string to write the result to. */ void encode_result(std::string &out); /** * \brief Creat a session context. * * This is done for every incomming data packet. * * \param provider The DataProvider to use for this request. */ SessionContext(DataProvider::ptr_t provider); virtual ~SessionContext() { } }; } #endif
Add documentation to the SessionContext
Add documentation to the SessionContext Signed-off-by: Jan Losinski <[email protected]>
C
bsd-3-clause
agdsn/traffic-service-server,agdsn/traffic-service-server
416d6a4d4c78a068172d95c63d770616f25bc40d
src/term_printf.c
src/term_printf.c
// Print formatted output to the VGA terminal #include "vga.h" #include <stdarg.h> void term_print_dec(int x) { int divisor = 1; for (; divisor < x; divisor *= 10) ; for (; divisor > 0; divisor /= 10) term_putchar(((x / divisor) % 10) + '0'); } void term_printf(const char *fmt, ...) { va_list args; va_start(args, fmt); for (int i = 0; fmt[i] != '\0'; i++) { if (fmt[i] != '%') { term_putchar(fmt[i]); } else { char fmt_type = fmt[++i]; switch (fmt_type) { case '%': term_putchar('%'); break; case 'd': term_print_dec(va_arg(args, int)); break; case 's': term_putsn(va_arg(args, char*)); break; case 'c': term_putchar(va_arg(args, int)); break; default: break; } } } va_end(args); }
// Print formatted output to the VGA terminal #include "vga.h" #include <stdarg.h> static void term_print_dec(int x) { int divisor = 1; for (; divisor <= x; divisor *= 10) ; divisor /= 10; for (; divisor > 0; divisor /= 10) term_putchar(((x / divisor) % 10) + '0'); } void term_printf(const char *fmt, ...) { va_list args; va_start(args, fmt); for (int i = 0; fmt[i] != '\0'; i++) { if (fmt[i] != '%') { term_putchar(fmt[i]); } else { char fmt_type = fmt[++i]; switch (fmt_type) { case '%': term_putchar('%'); break; case 'd': term_print_dec(va_arg(args, int)); break; case 's': term_putsn(va_arg(args, char*)); break; case 'c': term_putchar(va_arg(args, int)); break; default: break; } } } va_end(args); }
Fix term_print_dec Would print a leading 0 if number wasn't a power of 10
Fix term_print_dec Would print a leading 0 if number wasn't a power of 10
C
mit
orodley/studix,orodley/studix
f48419666e645208c0156aecab1ee6157303da3c
arch/ppc/syslib/ibm_ocp.c
arch/ppc/syslib/ibm_ocp.c
#include <linux/module.h> #include <asm/ocp.h> struct ocp_sys_info_data ocp_sys_info = { .opb_bus_freq = 50000000, /* OPB Bus Frequency (Hz) */ .ebc_bus_freq = 33333333, /* EBC Bus Frequency (Hz) */ }; EXPORT_SYMBOL(ocp_sys_info);
#include <linux/module.h> #include <asm/ibm4xx.h> #include <asm/ocp.h> struct ocp_sys_info_data ocp_sys_info = { .opb_bus_freq = 50000000, /* OPB Bus Frequency (Hz) */ .ebc_bus_freq = 33333333, /* EBC Bus Frequency (Hz) */ }; EXPORT_SYMBOL(ocp_sys_info);
Fix compile breakage for IBM/AMCC 4xx arch/ppc platforms
[POWERPC] Fix compile breakage for IBM/AMCC 4xx arch/ppc platforms The IBM/AMCC 405 platforms don't compile anymore in the current kernel version. This fixes the compile breakage. Signed-off-by: Stefan Roese <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
C
apache-2.0
TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas
ce5148894cbf4a465e2bc1158e8a4f8a729f6632
test/PCH/va_arg.c
test/PCH/va_arg.c
// Test this without pch. // RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -include %S/va_arg.h %s -emit-llvm -o - && // Test with pch. // RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -o %t %S/va_arg.h && // RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -include-pch %t %s -emit-llvm -o - char *g0(char** argv, int argc) { return argv[argc]; } char *g(char **argv) { f(g0, argv, 1, 2, 3); }
// Test this without pch. // RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -include %S/va_arg.h %s -emit-llvm -o - && // Test with pch. // RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -emit-pch -o %t %S/va_arg.h && // RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -include-pch %t %s -emit-llvm -o - char *g0(char** argv, int argc) { return argv[argc]; } char *g(char **argv) { f(g0, argv, 1, 2, 3); }
Fix a problem with the RUN line of one of the PCH tests
Fix a problem with the RUN line of one of the PCH tests git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@70227 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
e4bf49a203afcee266a24cd5b7b4c49944a74f3b
Modules/unicodedatabase.c
Modules/unicodedatabase.c
/* ------------------------------------------------------------------------ unicodedatabase -- The Unicode 3.0 data base. Data was extracted from the Unicode 3.0 UnicodeData.txt file. Written by Marc-Andre Lemburg ([email protected]). Rewritten for Python 2.0 by Fredrik Lundh ([email protected]) Copyright (c) Corporation for National Research Initiatives. ------------------------------------------------------------------------ */ #include <stdlib.h> #include "unicodedatabase.h" /* read the actual data from a separate file! */ #include "unicodedata_db.h" const _PyUnicode_DatabaseRecord * _PyUnicode_Database_GetRecord(int code) { int index; if (code < 0 || code >= 65536) index = 0; else { index = index1[(code>>SHIFT)]; index = index2[(index<<SHIFT)+(code&((1<<SHIFT)-1))]; } return &_PyUnicode_Database_Records[index]; } const char * _PyUnicode_Database_GetDecomposition(int code) { int index; if (code < 0 || code >= 65536) index = 0; else { index = decomp_index1[(code>>DECOMP_SHIFT)]; index = decomp_index2[(index<<DECOMP_SHIFT)+ (code&((1<<DECOMP_SHIFT)-1))]; } return decomp_data[index]; }
/* ------------------------------------------------------------------------ unicodedatabase -- The Unicode 3.0 data base. Data was extracted from the Unicode 3.0 UnicodeData.txt file. Written by Marc-Andre Lemburg ([email protected]). Rewritten for Python 2.0 by Fredrik Lundh ([email protected]) Copyright (c) Corporation for National Research Initiatives. ------------------------------------------------------------------------ */ #include "Python.h" #include "unicodedatabase.h" /* read the actual data from a separate file! */ #include "unicodedata_db.h" const _PyUnicode_DatabaseRecord * _PyUnicode_Database_GetRecord(int code) { int index; if (code < 0 || code >= 65536) index = 0; else { index = index1[(code>>SHIFT)]; index = index2[(index<<SHIFT)+(code&((1<<SHIFT)-1))]; } return &_PyUnicode_Database_Records[index]; } const char * _PyUnicode_Database_GetDecomposition(int code) { int index; if (code < 0 || code >= 65536) index = 0; else { index = decomp_index1[(code>>DECOMP_SHIFT)]; index = decomp_index2[(index<<DECOMP_SHIFT)+ (code&((1<<DECOMP_SHIFT)-1))]; } return decomp_data[index]; }
Fix header file usage so that NULL is defined. NULL is needed by unicodedata_db.h.
Fix header file usage so that NULL is defined. NULL is needed by unicodedata_db.h.
C
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
05a117847b43d44f336bbf272a1063661431a5e5
arch/sh/kernel/topology.c
arch/sh/kernel/topology.c
#include <linux/cpu.h> #include <linux/cpumask.h> #include <linux/init.h> #include <linux/percpu.h> #include <linux/node.h> #include <linux/nodemask.h> static DEFINE_PER_CPU(struct cpu, cpu_devices); static int __init topology_init(void) { int i, ret; #ifdef CONFIG_NEED_MULTIPLE_NODES for_each_online_node(i) register_one_node(i); #endif for_each_present_cpu(i) { ret = register_cpu(&per_cpu(cpu_devices, i), i); if (unlikely(ret)) printk(KERN_WARNING "%s: register_cpu %d failed (%d)\n", __FUNCTION__, i, ret); } return 0; } subsys_initcall(topology_init);
/* * arch/sh/kernel/topology.c * * Copyright (C) 2007 Paul Mundt * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. */ #include <linux/cpu.h> #include <linux/cpumask.h> #include <linux/init.h> #include <linux/percpu.h> #include <linux/node.h> #include <linux/nodemask.h> static DEFINE_PER_CPU(struct cpu, cpu_devices); static int __init topology_init(void) { int i, ret; #ifdef CONFIG_NEED_MULTIPLE_NODES for_each_online_node(i) register_one_node(i); #endif for_each_present_cpu(i) { ret = register_cpu(&per_cpu(cpu_devices, i), i); if (unlikely(ret)) printk(KERN_WARNING "%s: register_cpu %d failed (%d)\n", __FUNCTION__, i, ret); } #if defined(CONFIG_NUMA) && !defined(CONFIG_SMP) /* * In the UP case, make sure the CPU association is still * registered under each node. Without this, sysfs fails * to make the connection between nodes other than node0 * and cpu0. */ for_each_online_node(i) if (i != numa_node_id()) register_cpu_under_node(raw_smp_processor_id(), i); #endif return 0; } subsys_initcall(topology_init);
Fix up cpu to node mapping in sysfs.
sh: Fix up cpu to node mapping in sysfs. Currently cpu_to_node() is always 0 in the UP case, though we do want to have the CPU association linked in under sysfs even in the cases where we're only on a single CPU. Fix this up, so we have the cpu0 link on all of the available nodes that don't already have a CPU link of their own. Signed-off-by: Paul Mundt <[email protected]>
C
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
96355a918a22e53d0c2ae369aae77b2c7b4b276e
third_party/widevine/cdm/android/widevine_cdm_version.h
third_party/widevine/cdm/android/widevine_cdm_version.h
// Copyright (c) 2013 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 WIDEVINE_CDM_VERSION_H_ #define WIDEVINE_CDM_VERSION_H_ #include "third_party/widevine/cdm/widevine_cdm_common.h" // Indicates that the Widevine CDM is available. #define WIDEVINE_CDM_AVAILABLE // Indicates that AVC1 decoding is available for ISO BMFF CENC. #define WIDEVINE_CDM_AVC1_SUPPORT_AVAILABLE // Indicates that AAC decoding is available for ISO BMFF CENC. #define WIDEVINE_CDM_AAC_SUPPORT_AVAILABLE #endif // WIDEVINE_CDM_VERSION_H_
// Copyright (c) 2013 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 WIDEVINE_CDM_VERSION_H_ #define WIDEVINE_CDM_VERSION_H_ #include "third_party/widevine/cdm/widevine_cdm_common.h" // Indicates that the Widevine CDM is available. #define WIDEVINE_CDM_AVAILABLE #endif // WIDEVINE_CDM_VERSION_H_
Remove obsolete defines from Android CDM file.
Remove obsolete defines from Android CDM file. BUG=349185 Review URL: https://codereview.chromium.org/1000863003 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#321407}
C
bsd-3-clause
ltilve/chromium,Chilledheart/chromium,Chilledheart/chromium,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,Chilledheart/chromium,fujunwei/chromium-crosswalk,ltilve/chromium,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,Fireblend/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,Chilledheart/chromium,Just-D/chromium-1,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,Chilledheart/chromium,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,Chilledheart/chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ltilve/chromium,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,ltilve/chromium,ltilve/chromium,Just-D/chromium-1,ltilve/chromium,Chilledheart/chromium,Fireblend/chromium-crosswalk
7653c016ce7556070ee9ffdb9466b5356500f7ed
include/sampleflow/consumers/count_samples.h
include/sampleflow/consumers/count_samples.h
// --------------------------------------------------------------------- // // Copyright (C) 2019 by the SampleFlow authors. // // This file is part of the SampleFlow library. // // The deal.II library is free software; you can use it, 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. // The full text of the license can be found in the file LICENSE.md at // the top level directory of deal.II. // // --------------------------------------------------------------------- #ifndef SAMPLEFLOW_CONSUMERS_COUNT_SAMPLES_H #define SAMPLEFLOW_CONSUMERS_COUNT_SAMPLES_H #include <sampleflow/consumer.h> #include <mutex> namespace SampleFlow { namespace Consumers { /** * A Consumer class that simply counts how many samples it has received. * * * ### Threading model ### * * The implementation of this class is thread-safe, i.e., its * consume() member function can be called concurrently and from multiple * threads. * * * @tparam InputType The C++ type used for the samples $x_k$. */ template <typename InputType> class CountSamples : public Consumer<InputType> { public: /** * The type of the information generated by this class, i.e., the type * of the object returned by get(). This is just the type used to store * the index of samples. */ using value_type = types::sample_index; /** * Constructor. */ CountSamples (); /** * Process one sample by just incrementing the sample counter. * * @param[in] sample The sample to process. Since this class does * not care about the actual value of the sample, it simply * ignores its value. * @param[in] aux_data Auxiliary data about this sample. The current * class does not know what to do with any such data and consequently * simply ignores it. */ virtual void consume (InputType sample, AuxiliaryData aux_data) override; /** * A function that returns the number of samples received so far. * * @return The computed mean value. */ value_type get () const; private: /** * A mutex used to lock access to all member variables when running * on multiple threads. */ mutable std::mutex mutex; /** * The number of samples received so far. */ types::sample_index n_samples; }; template <typename InputType> CountSamples<InputType>:: CountSamples () : n_samples (0) {} template <typename InputType> void CountSamples<InputType>:: consume (InputType /*sample*/, AuxiliaryData /*aux_data*/) { std::lock_guard<std::mutex> lock(mutex); ++n_samples; } template <typename InputType> typename CountSamples<InputType>::value_type CountSamples<InputType>:: get () const { std::lock_guard<std::mutex> lock(mutex); return n_samples; } } } #endif
Add a consumer that just counts samples.
Add a consumer that just counts samples.
C
lgpl-2.1
bangerth/mcmc
130935d333492d5cca8d508f4d28023dc0e2ed61
MoleQueue/job.h
MoleQueue/job.h
/****************************************************************************** This source file is part of the MoleQueue project. Copyright 2011 Kitware, Inc. This source code is released under the New BSD License, (the "License"). 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 JOB_H #define JOB_H #include <QObject> namespace MoleQueue { class Queue; class Program; class Job : public QObject { Q_OBJECT public: explicit Job(const Program *program); ~Job(); void setName(const QString &name); QString name() const; void setTitle(const QString &title); QString title() const; const Program* program() const; const Queue* queue() const; private: QString m_name; QString m_title; const Program* m_program; }; } // end MoleQueue namespace #endif // JOB_H
/****************************************************************************** This source file is part of the MoleQueue project. Copyright 2011 Kitware, Inc. This source code is released under the New BSD License, (the "License"). 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 JOB_H #define JOB_H #include <QObject> namespace MoleQueue { class Queue; class Program; /** * Class to represent an execution of a Program. */ class Job : public QObject { Q_OBJECT public: /** Creates a new job. */ explicit Job(const Program *program); /* Destroys the job object. */ ~Job(); /** Set the name of the job to \p name. */ void setName(const QString &name); /** Returns the name of the job. */ QString name() const; /** Sets the title of the job to \p title. */ void setTitle(const QString &title); /** Returns the title for the job. */ QString title() const; /** Returns the program that the job is a type of. */ const Program* program() const; /** Returns the queue that the job is a member of. */ const Queue* queue() const; private: /** The name of the job. */ QString m_name; /** The title of the job. */ QString m_title; /** The program that the job is a type of. */ const Program* m_program; }; } // end MoleQueue namespace #endif // JOB_H
Add documentation for the Job class
Add documentation for the Job class
C
bsd-3-clause
OpenChemistry/molequeue,OpenChemistry/molequeue,OpenChemistry/molequeue
b6170a2ec91bd2e15e17710c651f227adf1518c8
SQGlobalMarco.h
SQGlobalMarco.h
// // SQGlobalMarco.h // // Created by Shi Eric on 3/18/12. // Copyright (c) 2012 Safe&Quick[http://www.saick.net]. All rights reserved. // #ifndef _SQGlobalMarco_h #define _SQGlobalMarco_h #define kMinOSVersion 4.0f #define saferelease(foo) {if(foo != nil) {[foo release]; foo = nil;}} #define isLandscape (UIInterfaceOrientationIsLandscape\ ([[UIApplication sharedApplication] statusBarOrientation])) #define isPad ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)]\ && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) #define isPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO) #define kOSVersion (float)([[[UIDevice currentDevice] systemVersion] length] > 0 ? [[[UIDevice currentDevice] systemVersion] doubleValue] : kMinOSVersion) #endif
// // SQGlobalMarco.h // // Created by Shi Eric on 3/18/12. // Copyright (c) 2012 Safe&Quick[http://www.saick.net]. All rights reserved. // #ifndef _SQGlobalMarco_h #define _SQGlobalMarco_h #define kMinOSVersion 4.0f #define saferelease(foo) {if(foo != nil) {[foo release]; foo = nil;}} #define isLandscape (UIInterfaceOrientationIsLandscape\ ([[UIApplication sharedApplication] statusBarOrientation])) #define isPad ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)]\ && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) #define isPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO) #define kOSVersion (float)([[[UIDevice currentDevice] systemVersion] length] > 0 ? [[[UIDevice currentDevice] systemVersion] doubleValue] : kMinOSVersion) #define kScreenSize [[UIScreen mainScreen] bounds].size // Radians to degrees #define RADIANS_TO_DEGREES(radians) ((radians) * (180.0 / M_PI)) // Degrees to radians #define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI) #endif
Add kScreenSize and Radians to or from degrees
Add kScreenSize and Radians to or from degrees
C
mit
shjborage/SQCommonUtils
5ce8b438da24b7a2f2de771d9276a6a6789236a2
include/core/SkSpinlock.h
include/core/SkSpinlock.h
/* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ // This file is not part of the public Skia API. #ifndef SkSpinlock_DEFINED #define SkSpinlock_DEFINED #include "SkAtomics.h" #define SK_DECLARE_STATIC_SPINLOCK(name) namespace {} static SkPODSpinlock name // This class has no constructor and must be zero-initialized (the macro above does this). class SkPODSpinlock { public: void acquire() { // To act as a mutex, we need an acquire barrier if we take the lock. if (sk_atomic_exchange(&fLocked, true, sk_memory_order_acquire)) { // Lock was contended. Fall back to an out-of-line spin loop. this->contendedAcquire(); } } void release() { // To act as a mutex, we need a release barrier. sk_atomic_store(&fLocked, false, sk_memory_order_release); } private: void contendedAcquire(); bool fLocked; }; // For non-global-static use cases, this is normally what you want. class SkSpinlock : public SkPODSpinlock { public: SkSpinlock() { this->release(); } }; #endif//SkSpinlock_DEFINED
/* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ // This file is not part of the public Skia API. #ifndef SkSpinlock_DEFINED #define SkSpinlock_DEFINED #include "SkAtomics.h" #define SK_DECLARE_STATIC_SPINLOCK(name) namespace {} static SkPODSpinlock name // This class has no constructor and must be zero-initialized (the macro above does this). class SK_API SkPODSpinlock { public: void acquire() { // To act as a mutex, we need an acquire barrier if we take the lock. if (sk_atomic_exchange(&fLocked, true, sk_memory_order_acquire)) { // Lock was contended. Fall back to an out-of-line spin loop. this->contendedAcquire(); } } void release() { // To act as a mutex, we need a release barrier. sk_atomic_store(&fLocked, false, sk_memory_order_release); } private: void contendedAcquire(); bool fLocked; }; // For non-global-static use cases, this is normally what you want. class SkSpinlock : public SkPODSpinlock { public: SkSpinlock() { this->release(); } }; #endif//SkSpinlock_DEFINED
Fix componene debug build failure in chromium
Fix componene debug build failure in chromium The error log is as follows: ../../third_party/skia/include/core/SkSpinlock.h:24: error: undefined reference to 'SkPODSpinlock::contendedAcquire()' collect2: error: ld returned 1 exit status [mtklein added below here] Despite the presence in include/ and the added SK_API, this file is not part of Skia's public API... it's just used by files which are. [email protected] Review URL: https://codereview.chromium.org/1229003004
C
apache-2.0
noselhq/skia,pcwalton/skia,qrealka/skia-hc,noselhq/skia,ominux/skia,tmpvar/skia.cc,todotodoo/skia,shahrzadmn/skia,noselhq/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,google/skia,Hikari-no-Tenshi/android_external_skia,pcwalton/skia,Jichao/skia,rubenvb/skia,ominux/skia,aosp-mirror/platform_external_skia,tmpvar/skia.cc,pcwalton/skia,Hikari-no-Tenshi/android_external_skia,noselhq/skia,Jichao/skia,pcwalton/skia,nvoron23/skia,todotodoo/skia,google/skia,Jichao/skia,nvoron23/skia,ominux/skia,nvoron23/skia,rubenvb/skia,vanish87/skia,shahrzadmn/skia,noselhq/skia,nvoron23/skia,vanish87/skia,nvoron23/skia,aosp-mirror/platform_external_skia,noselhq/skia,vanish87/skia,aosp-mirror/platform_external_skia,shahrzadmn/skia,tmpvar/skia.cc,Jichao/skia,Jichao/skia,todotodoo/skia,qrealka/skia-hc,ominux/skia,Jichao/skia,tmpvar/skia.cc,pcwalton/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,todotodoo/skia,nvoron23/skia,vanish87/skia,tmpvar/skia.cc,nvoron23/skia,aosp-mirror/platform_external_skia,vanish87/skia,google/skia,nvoron23/skia,rubenvb/skia,tmpvar/skia.cc,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,shahrzadmn/skia,rubenvb/skia,google/skia,HalCanary/skia-hc,todotodoo/skia,vanish87/skia,todotodoo/skia,aosp-mirror/platform_external_skia,noselhq/skia,shahrzadmn/skia,ominux/skia,HalCanary/skia-hc,nvoron23/skia,shahrzadmn/skia,pcwalton/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,qrealka/skia-hc,shahrzadmn/skia,qrealka/skia-hc,tmpvar/skia.cc,tmpvar/skia.cc,HalCanary/skia-hc,rubenvb/skia,google/skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,ominux/skia,todotodoo/skia,shahrzadmn/skia,qrealka/skia-hc,ominux/skia,HalCanary/skia-hc,Jichao/skia,google/skia,todotodoo/skia,qrealka/skia-hc,tmpvar/skia.cc,vanish87/skia,vanish87/skia,pcwalton/skia,ominux/skia,rubenvb/skia,qrealka/skia-hc,google/skia,Hikari-no-Tenshi/android_external_skia,Jichao/skia,shahrzadmn/skia,todotodoo/skia,google/skia,noselhq/skia,vanish87/skia,aosp-mirror/platform_external_skia,ominux/skia,rubenvb/skia,HalCanary/skia-hc,pcwalton/skia,pcwalton/skia,HalCanary/skia-hc,Jichao/skia,rubenvb/skia,noselhq/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,qrealka/skia-hc,HalCanary/skia-hc,google/skia
f98030b029edad449a75309546d7bf4803dfa750
webrtc/common_video/interface/texture_video_frame.h
webrtc/common_video/interface/texture_video_frame.h
/* * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef COMMON_VIDEO_INTERFACE_TEXTURE_VIDEO_FRAME_H #define COMMON_VIDEO_INTERFACE_TEXTURE_VIDEO_FRAME_H #include "webrtc/common_video/interface/i420_video_frame.h" // TODO(magjed): Remove this when all external dependencies are updated. namespace webrtc { typedef I420VideoFrame TextureVideoFrame; } // namespace webrtc #endif // COMMON_VIDEO_INTERFACE_TEXTURE_VIDEO_FRAME_H
Add intermediate TextureVideoFrame typedef for Chromium
Add intermediate TextureVideoFrame typedef for Chromium BUG=1128 [email protected] TBR=stefan Review URL: https://webrtc-codereview.appspot.com/42239004 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#8630} git-svn-id: 917f5d3ca488f358c4d40eaec14422cf392ccec9@8630 4adac7df-926f-26a2-2b94-8c16560cd09d
C
bsd-3-clause
ShiftMediaProject/libilbc,TimothyGu/libilbc,TimothyGu/libilbc,TimothyGu/libilbc,ShiftMediaProject/libilbc,ShiftMediaProject/libilbc,TimothyGu/libilbc,ShiftMediaProject/libilbc,ShiftMediaProject/libilbc,TimothyGu/libilbc
bcc6e1e952df31d96efb7b0e0e1198e103d16b2b
PolyMapGenerator/Structure.h
PolyMapGenerator/Structure.h
#ifndef STRUCTURE_H #define STRUCTURE_H #include <vector> #include "Math/Vector2.h" enum class BiomeType { Snow, Tundra, Mountain, Taiga, Shrubland, TemprateDesert, TemprateRainForest, TemprateDeciduousForest, Grassland, TropicalRainForest, TropicalSeasonalForest, SubtropicalDesert, Ocean, Lake, Beach, Size, None }; // Forward Declaration struct Edge; struct Corner; #endif
#ifndef STRUCTURE_H #define STRUCTURE_H #include <vector> #include "Math/Vector2.h" enum class BiomeType { Snow, Tundra, Mountain, Taiga, Shrubland, TemprateDesert, TemprateRainForest, TemprateDeciduousForest, Grassland, TropicalRainForest, TropicalSeasonalForest, SubtropicalDesert, Ocean, Lake, Beach, Size, None }; // Forward Declaration struct Edge; struct Corner; struct Center { unsigned int m_index; Vector2 m_positon; bool m_water; bool m_ocean; bool m_coast; bool m_border; BiomeType m_biome; double m_elevation; double m_moisture; std::vector<Edge*> m_edges; std::vector<Corner*> m_corners; std::vector<Center*> m_centers; using CenterIterator = std::vector<Center*>::iterator; }; #endif
Declare struct Center's member variables
Declare struct Center's member variables
C
mit
utilForever/PolyMapGenerator
f30001b81814882577a9ab1e34f64b4d240ca99a
lithos_c/inc/Lth_assert.h
lithos_c/inc/Lth_assert.h
//----------------------------------------------------------------------------- // // Copyright © 2016 Project Golan // // See "LICENSE" for more information. // //----------------------------------------------------------------------------- // // Assertions. // //----------------------------------------------------------------------------- #ifndef lithos3__Lth_assert_h #define lithos3__Lth_assert_h #include <stdio.h> #ifdef NDEBUG #define Lth_assert(expression) ((void)0) #else #define Lth_assert(expression) \ if(!(expression)) \ printf("[lithos3] Assertion failed in %s (%s:%i): %s\n", \ __func__, __FILE__, __LINE__, #expression); \ else \ ((void)0) #endif #endif//lithos3__Lth_assert_h
//----------------------------------------------------------------------------- // // Copyright © 2016 Project Golan // // See "LICENSE" for more information. // //----------------------------------------------------------------------------- // // Assertions. // //----------------------------------------------------------------------------- #ifndef lithos3__Lth_assert_h #define lithos3__Lth_assert_h #include <stdio.h> #ifdef NDEBUG #define Lth_assert(expression) ((void)0) #else #define Lth_assert(expression) \ if(!(expression)) \ fprintf(stderr, "[lithos3] Assertion failed in %s (%s:%i): %s\n", \ __func__, __FILE__, __LINE__, #expression); \ else \ ((void)0) #endif #endif//lithos3__Lth_assert_h
Fix Lth_Assert not using stderr
assert: Fix Lth_Assert not using stderr
C
mit
Project-Golan/LithOS3
3b9c212a5cbb1e13ced92639ce83f7a48b8b2331
drivers/scsi/qla2xxx/qla_version.h
drivers/scsi/qla2xxx/qla_version.h
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2008 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.03.01-k8" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 3 #define QLA_DRIVER_PATCH_VER 1 #define QLA_DRIVER_BETA_VER 0
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2008 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.03.01-k9" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 3 #define QLA_DRIVER_PATCH_VER 1 #define QLA_DRIVER_BETA_VER 0
Update version number to 8.03.01-k9.
[SCSI] qla2xxx: Update version number to 8.03.01-k9. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
C
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
abe85e1caed9feb7bacd69e85eaa479e3f1020ab
freestanding/stdarg.h
freestanding/stdarg.h
#ifndef _STDARG_H #define _STDARG_H // As defined in the System V x86-64 ABI spec, in section 3.5.7 typedef struct { unsigned int next_int_reg_offset; unsigned int next_vector_reg_offset; void *next_stack_arg; void *register_save_area; } va_list[1]; #define va_start(list, last_arg) __builtin_va_start(list) #define va_arg(list, type) __builtin_va_arg(list, type) #define va_end(args) __builtin_va_end(list) static unsigned long __builtin_va_arg_uint64(va_list list) { unsigned long result; if (list->next_int_reg_offset >= 48) { result = *(unsigned long *)list->next_stack_arg; list->next_stack_arg = (char *)list->next_stack_arg + 8; } else { result = *(unsigned long *) ((char *)list->register_save_area + list->next_int_reg_offset); list->next_int_reg_offset += 8; } return result; } #endif
#ifndef _STDARG_H #define _STDARG_H // As defined in the System V x86-64 ABI spec, in section 3.5.7 typedef struct { unsigned int next_int_reg_offset; unsigned int next_vector_reg_offset; void *next_stack_arg; void *register_save_area; } va_list[1]; #define va_start(list, last_arg) __builtin_va_start(list) #define va_arg(list, type) __builtin_va_arg(list, type) #define va_end(list) __builtin_va_end(list) static unsigned long __builtin_va_arg_uint64(va_list list) { unsigned long result; if (list->next_int_reg_offset >= 48) { result = *(unsigned long *)list->next_stack_arg; list->next_stack_arg = (char *)list->next_stack_arg + 8; } else { result = *(unsigned long *) ((char *)list->register_save_area + list->next_int_reg_offset); list->next_int_reg_offset += 8; } return result; } #endif
Fix dumb bug in va_end.
Fix dumb bug in va_end. This was never noticed because we don't actually use the argument to va_end.
C
mit
orodley/naive,orodley/naive,orodley/naive,orodley/naive
8b432d0e483c84b22255cc3518423dcbca6c3270
include/TextMetrics.h
include/TextMetrics.h
#ifndef _TEXTMETRICS_H_ #define _TEXTMETRICS_H_ namespace canvas { class TextMetrics { public: TextMetrics() : width(0) { } TextMetrics(float _width) : width(_width) { } float width; #if 0 float ideographicBaseline; float alphabeticBaseline; float hangingBaseline; float emHeightDescent; float emHeightAscent; float actualBoundingBoxDescent; float actualBoundingBoxAscent; float fontBoundingBoxDescent; float fontBoundingBoxAscent; float actualBoundingBoxRight; float actualBoundingBoxLeft; #endif }; }; #endif
#ifndef _TEXTMETRICS_H_ #define _TEXTMETRICS_H_ namespace canvas { class TextMetrics { public: TextMetrics() : width(0) { } TextMetrics(float _width) : width(_width) { } TextMetrics(float _width, float fontBoundingBoxDescent, float _fontBoundingBoxAscent) : width(_width) fontBoundingBoxDescent(_fontBoundingBoxDescent) fontBoundingBoxAscent(_fontBoundingBoxAscent) { } float width; float fontBoundingBoxDescent; float fontBoundingBoxAscent; #if 0 float ideographicBaseline; float alphabeticBaseline; float hangingBaseline; float emHeightDescent; float emHeightAscent; float actualBoundingBoxDescent; float actualBoundingBoxAscent; float actualBoundingBoxRight; float actualBoundingBoxLeft; #endif }; }; #endif
Add fontBoundingDescent and Ascent and add constructor with them
Add fontBoundingDescent and Ascent and add constructor with them
C
mit
rekola/canvas,Sometrik/canvas,Sometrik/canvas,rekola/canvas
44a05e70ec7310f90d053818a4f650b82e1512ee
include/ipc_ns.h
include/ipc_ns.h
#ifndef IPC_NS_H_ #define IPC_NS_H_ #include "crtools.h" extern void show_ipc_ns(int fd); extern int dump_ipc_ns(int ns_pid, struct cr_fdset *fdset); extern int prepare_ipc_ns(int pid); #endif /* IPC_NS_H_ */
#ifndef CR_IPC_NS_H_ #define CR_IPC_NS_H_ #include "crtools.h" extern void show_ipc_ns(int fd); extern int dump_ipc_ns(int ns_pid, struct cr_fdset *fdset); extern int prepare_ipc_ns(int pid); #endif /* CR_IPC_NS_H_ */
Add CR_ prefix to header defines
ips_ns.h: Add CR_ prefix to header defines Reported-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: Cyrill Gorcunov <[email protected]>
C
lgpl-2.1
KKoukiou/criu-remote,tych0/criu,ldu4/criu,svloyso/criu,fbocharov/criu,AuthenticEshkinKot/criu,svloyso/criu,efiop/criu,efiop/criu,gonkulator/criu,AuthenticEshkinKot/criu,biddyweb/criu,KKoukiou/criu-remote,AuthenticEshkinKot/criu,rentzsch/criu,wtf42/criu,marcosnils/criu,AuthenticEshkinKot/criu,gonkulator/criu,gonkulator/criu,LK4D4/criu,rentzsch/criu,sdgdsffdsfff/criu,efiop/criu,eabatalov/criu,eabatalov/criu,fbocharov/criu,ldu4/criu,tych0/criu,sdgdsffdsfff/criu,svloyso/criu,fbocharov/criu,LK4D4/criu,KKoukiou/criu-remote,rentzsch/criu,kawamuray/criu,svloyso/criu,wtf42/criu,sdgdsffdsfff/criu,biddyweb/criu,marcosnils/criu,gonkulator/criu,gablg1/criu,biddyweb/criu,fbocharov/criu,efiop/criu,rentzsch/criu,sdgdsffdsfff/criu,efiop/criu,tych0/criu,LK4D4/criu,gablg1/criu,kawamuray/criu,eabatalov/criu,wtf42/criu,sdgdsffdsfff/criu,ldu4/criu,marcosnils/criu,biddyweb/criu,KKoukiou/criu-remote,tych0/criu,wtf42/criu,gonkulator/criu,fbocharov/criu,svloyso/criu,gablg1/criu,tych0/criu,eabatalov/criu,wtf42/criu,sdgdsffdsfff/criu,gonkulator/criu,kawamuray/criu,kawamuray/criu,ldu4/criu,rentzsch/criu,ldu4/criu,wtf42/criu,kawamuray/criu,LK4D4/criu,rentzsch/criu,gablg1/criu,svloyso/criu,marcosnils/criu,marcosnils/criu,ldu4/criu,AuthenticEshkinKot/criu,kawamuray/criu,eabatalov/criu,marcosnils/criu,AuthenticEshkinKot/criu,gablg1/criu,biddyweb/criu,efiop/criu,tych0/criu,fbocharov/criu,LK4D4/criu,eabatalov/criu,biddyweb/criu,LK4D4/criu,gablg1/criu,KKoukiou/criu-remote,KKoukiou/criu-remote
764632646a762e3ce9269676bf982b033d5d7785
includes/Utils.h
includes/Utils.h
#ifndef UTILS_H #define UTILS_H class Utils { public: static const std::size_t CalculatePadding(const std::size_t offset, const std::size_t alignment) { const std::size_t multiplier = (offset / alignment) + 1; const std::size_t padding = (multiplier * alignment) - offset; return padding; } }; #endif /* UTILS_H */
#ifndef UTILS_H #define UTILS_H class Utils { public: static const std::size_t CalculatePadding(const std::size_t baseAddress, const std::size_t alignment) { const std::size_t multiplier = (baseAddress / alignment) + 1; const std::size_t alignedAddress = multiplier * alignment; const std::size_t padding = alignedAddress - baseAddress; return padding; } }; #endif /* UTILS_H */
Rename first parameter to baseAddres to avoid confusion
Rename first parameter to baseAddres to avoid confusion
C
mit
mtrebi/memory-allocators
c971b045e63517ceab1c26ca49a6e1ec436d92a8
tails_files/securedrop_init.c
tails_files/securedrop_init.c
#include <unistd.h> int main(int argc, char* argv) { setuid(0); // Use absolute path to the Python binary and execl to avoid $PATH or symlink trickery execl("/usr/bin/python2.7", "python2.7", "/home/vagrant/tails_files/test.py", (char*)NULL); return 0; }
#include <unistd.h> int main(int argc, char* argv) { setuid(0); // Use absolute path to the Python binary and execl to avoid $PATH or symlink trickery execl("/usr/bin/python2.7", "python2.7", "/home/amnesia/Persistent/.securedrop/securedrop_init.py", (char*)NULL); return 0; }
Fix path in tails_files C wrapper
Fix path in tails_files C wrapper
C
agpl-3.0
jaseg/securedrop,jeann2013/securedrop,kelcecil/securedrop,jrosco/securedrop,ageis/securedrop,jrosco/securedrop,chadmiller/securedrop,GabeIsman/securedrop,jaseg/securedrop,pwplus/securedrop,GabeIsman/securedrop,harlo/securedrop,chadmiller/securedrop,heartsucker/securedrop,heartsucker/securedrop,jeann2013/securedrop,pwplus/securedrop,heartsucker/securedrop,jrosco/securedrop,harlo/securedrop,pwplus/securedrop,conorsch/securedrop,micahflee/securedrop,ehartsuyker/securedrop,chadmiller/securedrop,jrosco/securedrop,ehartsuyker/securedrop,chadmiller/securedrop,pwplus/securedrop,chadmiller/securedrop,kelcecil/securedrop,micahflee/securedrop,GabeIsman/securedrop,harlo/securedrop,ehartsuyker/securedrop,heartsucker/securedrop,ehartsuyker/securedrop,ageis/securedrop,ehartsuyker/securedrop,GabeIsman/securedrop,ageis/securedrop,harlo/securedrop,kelcecil/securedrop,jeann2013/securedrop,ageis/securedrop,conorsch/securedrop,jeann2013/securedrop,jeann2013/securedrop,conorsch/securedrop,kelcecil/securedrop,GabeIsman/securedrop,harlo/securedrop,micahflee/securedrop,jrosco/securedrop,garrettr/securedrop,jaseg/securedrop,garrettr/securedrop,jaseg/securedrop,heartsucker/securedrop,harlo/securedrop,conorsch/securedrop,GabeIsman/securedrop,kelcecil/securedrop,garrettr/securedrop,jaseg/securedrop,ehartsuyker/securedrop,jaseg/securedrop,micahflee/securedrop,kelcecil/securedrop,pwplus/securedrop,conorsch/securedrop,pwplus/securedrop,jeann2013/securedrop,chadmiller/securedrop,jrosco/securedrop,garrettr/securedrop
8f74beb56f217b8a6e5307e6ca4d770e0b493d1f
modlib.c
modlib.c
#include "modlib.h" uint16_t MODBUSSwapEndian( uint16_t Data ) { //Change big-endian to little-endian and vice versa uint8_t Swap; //Create 2 bytes long union union Conversion { uint16_t Data; uint8_t Bytes[2]; } Conversion; //Swap bytes Conversion.Data = Data; Swap = Conversion.Bytes[0]; Conversion.Bytes[0] = Conversion.Bytes[1]; Conversion.Bytes[1] = Swap; return Conversion.Data; } uint16_t MODBUSCRC16( uint16_t *Data, uint16_t Length ) { //Calculate CRC16 checksum using given data and length uint16_t CRC = 0xFFFF; uint16_t i; uint8_t j; for ( i = 0; i < Length; i++ ) { CRC ^= Data[i]; //XOR current data byte with CRC value for ( j = 8; j != 0; j-- ) { //For each bit //Is least-significant-bit is set? if ( ( CRC & 0x0001 ) != 0 ) { CRC >>= 1; //Shift to right and xor CRC ^= 0xA001; } else CRC >>= 1; } } return CRC; }
#include "modlib.h" uint16_t MODBUSSwapEndian( uint16_t Data ) { //Change big-endian to little-endian and vice versa uint8_t Swap; //Create 2 bytes long union union Conversion { uint16_t Data; uint8_t Bytes[2]; } Conversion; //Swap bytes Conversion.Data = Data; Swap = Conversion.Bytes[0]; Conversion.Bytes[0] = Conversion.Bytes[1]; Conversion.Bytes[1] = Swap; return Conversion.Data; } uint16_t MODBUSCRC16( uint8_t *Data, uint16_t Length ) { //Calculate CRC16 checksum using given data and length uint16_t CRC = 0xFFFF; uint16_t i; uint8_t j; for ( i = 0; i < Length; i++ ) { CRC ^= Data[i]; //XOR current data byte with CRC value for ( j = 8; j != 0; j-- ) { //For each bit //Is least-significant-bit is set? if ( ( CRC & 0x0001 ) != 0 ) { CRC >>= 1; //Shift to right and xor CRC ^= 0xA001; } else CRC >>= 1; } } return CRC; }
Fix types in CRC16 function
Fix types in CRC16 function
C
mit
Jacajack/modlib
dd9f4d4919164ce842502ece64583f13df8cc737
src/vast/actor.h
src/vast/actor.h
#ifndef VAST_ACTOR_H #define VAST_ACTOR_H #include <cppa/event_based_actor.hpp> #include "vast/logger.h" namespace vast { namespace exit { constexpr uint32_t done = cppa::exit_reason::user_defined; constexpr uint32_t stop = cppa::exit_reason::user_defined + 1; constexpr uint32_t error = cppa::exit_reason::user_defined + 2; } // namespace exit /// An actor enhanced in template <typename Derived> class actor : public cppa::event_based_actor { public: /// Implements `cppa::event_based_actor::init`. virtual void init() override { VAST_LOG_ACTOR_VERBOSE(derived()->description(), "spawned"); derived()->act(); if (! has_behavior()) { VAST_LOG_ACTOR_ERROR(derived()->description(), "act() did not set a behavior, terminating"); quit(); } } /// Overrides `event_based_actor::on_exit`. virtual void on_exit() override { VAST_LOG_ACTOR_VERBOSE(derived()->description(), "terminated"); } private: Derived const* derived() const { return static_cast<Derived const*>(this); } Derived* derived() { return static_cast<Derived*>(this); } }; } // namespace vast #endif
#ifndef VAST_ACTOR_H #define VAST_ACTOR_H #include <cppa/event_based_actor.hpp> #include "vast/logger.h" namespace vast { namespace exit { constexpr uint32_t done = cppa::exit_reason::user_defined; constexpr uint32_t stop = cppa::exit_reason::user_defined + 1; constexpr uint32_t error = cppa::exit_reason::user_defined + 2; } // namespace exit /// An actor enhanced in template <typename Derived> class actor : public cppa::event_based_actor { public: /// Implements `cppa::event_based_actor::init`. virtual void init() override { VAST_LOG_ACTOR_VERBOSE(derived()->description(), "spawned"); derived()->act(); if (! has_behavior()) { VAST_LOG_ACTOR_ERROR(derived()->description(), "act() did not set a behavior, terminating"); quit(exit::error); } } /// Overrides `event_based_actor::on_exit`. virtual void on_exit() override { VAST_LOG_ACTOR_VERBOSE(derived()->description(), "terminated"); } private: Derived const* derived() const { return static_cast<Derived const*>(this); } Derived* derived() { return static_cast<Derived*>(this); } }; } // namespace vast #endif
Exit with error on missing behavior.
Exit with error on missing behavior.
C
bsd-3-clause
pmos69/vast,mavam/vast,mavam/vast,vast-io/vast,pmos69/vast,vast-io/vast,pmos69/vast,vast-io/vast,pmos69/vast,mavam/vast,mavam/vast,vast-io/vast,vast-io/vast
46583bb05fa9d59060b3254f4a7621ed5464761a
stats.c
stats.c
#ifdef ENABLE_STATS #include <stdio.h> #include <sys/resource.h> static size_t stats_peek_rss() { struct rusage rusage; getrusage( RUSAGE_SELF, &rusage ); return (size_t) (rusage.ru_maxrss * 1024L); } __attribute__((destructor)) void _print_stats(void) { size_t rss = stats_peek_rss(); printf("Maximum RSS: %ld KB\n", rss / 1024L); } #endif
Add function to read peek rss usage.
Add function to read peek rss usage.
C
mit
chaoran/fibril,chaoran/fibril,chaoran/fibril
45e5572b7dbf3c53cbb85e48c30c5019653aa6a1
src/BlynkSimpleWiFiNINA.h
src/BlynkSimpleWiFiNINA.h
/** * @file BlynkSimpleWiFiNINA.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2018 Volodymyr Shymanskyy * @date Sep 2018 * @brief * */ #ifndef BlynkSimpleWiFiNINA_h #define BlynkSimpleWiFiNINA_h #ifndef BLYNK_INFO_CONNECTION #define BLYNK_INFO_CONNECTION "WiFiNINA" #endif #define BLYNK_SEND_ATOMIC //#define BLYNK_USE_SSL #include <WiFiNINA.h> #include <Adapters/BlynkWiFiCommon.h> //static WiFiSSLClient _blynkWifiClient; static WiFiClient _blynkWifiClient; static BlynkArduinoClient _blynkTransport(_blynkWifiClient); BlynkWifiCommon Blynk(_blynkTransport); #include <BlynkWidgets.h> #endif
Add WiFiNINA, Arduino MKR WiFi 1010 support
Add WiFiNINA, Arduino MKR WiFi 1010 support
C
mit
blynkkk/blynk-library,blynkkk/blynk-library,blynkkk/blynk-library,blynkkk/blynk-library,blynkkk/blynk-library
b5583121378597058f8f083243d2299fd262e509
webkit/glue/plugins/ppb_private.h
webkit/glue/plugins/ppb_private.h
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ #define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ #include "ppapi/c/pp_var.h" #define PPB_PRIVATE_INTERFACE "PPB_Private;1" typedef enum _ppb_ResourceString { PPB_RESOURCE_STRING_PDF_GET_PASSWORD = 0, } PP_ResourceString; typedef struct _ppb_Private { // Returns a localized string. PP_Var (*GetLocalizedString)(PP_ResourceString string_id); } PPB_Private; #endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ #define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ #include "third_party/ppapi/c/pp_var.h" #define PPB_PRIVATE_INTERFACE "PPB_Private;1" typedef enum _ppb_ResourceString { PPB_RESOURCE_STRING_PDF_GET_PASSWORD = 0, } PP_ResourceString; typedef struct _ppb_Private { // Returns a localized string. PP_Var (*GetLocalizedString)(PP_ResourceString string_id); } PPB_Private; #endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
Add third_party/ prefix to ppapi include for checkdeps.
Add third_party/ prefix to ppapi include for checkdeps. The only users of this ppb should be inside chrome so this should work fine. [email protected] Review URL: http://codereview.chromium.org/3019006 git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@52766 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
C
bsd-3-clause
wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser
bb824d72ab4db6bef2562f6129e6742f6fcbfc7d
src/gui/qxtfilterdialog_p.h
src/gui/qxtfilterdialog_p.h
#ifndef QXTFILTERDIALOG_P_H_INCLUDED #define QXTFILTERDIALOG_P_H_INCLUDED #include <QObject> #include <QModelIndex> #include <QRegExp> #include <QPointer> #include "qxtpimpl.h" class QxtFilterDialog; class QAbstractItemModel; class QTreeView; class QSortFilterProxyModel; class QLineEdit; class QCheckBox; class QComboBox; class QxtFilterDialogPrivate : public QObject, public QxtPrivate<QxtFilterDialog> { Q_OBJECT public: QxtFilterDialogPrivate(); QXT_DECLARE_PUBLIC(QxtFilterDialog); /*widgets*/ QCheckBox * matchCaseOption; QCheckBox * filterModeOption; QComboBox * filterMode; QTreeView * listingTreeView; QLineEdit * lineEditFilter; /*models*/ QPointer<QAbstractItemModel> model; QSortFilterProxyModel* proxyModel; /*properties*/ int lookupColumn; int lookupRole; QRegExp::PatternSyntax syntax; Qt::CaseSensitivity caseSensitivity; /*result*/ QModelIndex selectedIndex; /*member functions*/ void updateFilterPattern(); public slots: void createRegExpPattern(const QString &rawText); void filterModeOptionStateChanged(const int state); void matchCaseOptionStateChanged(const int state); void filterModeChoosen(int index); }; #endif
#ifndef QXTFILTERDIALOG_P_H_INCLUDED #define QXTFILTERDIALOG_P_H_INCLUDED #include <QObject> #include <QModelIndex> #include <QRegExp> #include <QPointer> #include "qxtpimpl.h" class QxtFilterDialog; class QAbstractItemModel; class QTreeView; class QSortFilterProxyModel; class QLineEdit; class QCheckBox; class QComboBox; class QxtFilterDialogPrivate : public QObject, public QxtPrivate<QxtFilterDialog> { Q_OBJECT public: QxtFilterDialogPrivate(); QXT_DECLARE_PUBLIC(QxtFilterDialog); /*widgets*/ QCheckBox * matchCaseOption; QCheckBox * filterModeOption; QComboBox * filterMode; QTreeView * listingTreeView; QLineEdit * lineEditFilter; /*models*/ QPointer<QAbstractItemModel> model; QSortFilterProxyModel* proxyModel; /*properties*/ int lookupColumn; int lookupRole; QRegExp::PatternSyntax syntax; Qt::CaseSensitivity caseSensitivity; /*result*/ QModelIndex selectedIndex; /*member functions*/ void updateFilterPattern(); public slots: void createRegExpPattern(const QString &rawText); void filterModeOptionStateChanged(const int state); void matchCaseOptionStateChanged(const int state); void filterModeChoosen(int index); }; #endif
Fix bad fileformat (was DOS without a final line terminator)
Fix bad fileformat (was DOS without a final line terminator)
C
bsd-3-clause
hrobeers/qxtweb-qt5,hrobeers/qxtweb-qt5,hrobeers/qxtweb-qt5,mmitkevich/libqxt,mmitkevich/libqxt,mmitkevich/libqxt,hrobeers/qxtweb-qt5,mmitkevich/libqxt,hrobeers/qxtweb-qt5
4dfe89bbf3a6f56e3eb3c5991036a6027d627543
indexer/config.h
indexer/config.h
//#define DEBUG_INDEXER #define MAX_CORPUS_FILE_SZ (1024 * 8)
//#define DEBUG_INDEXER #define MAX_CORPUS_FILE_SZ (1024 * 1024 * 16)
Increase corpus buffer to 16MB
Increase corpus buffer to 16MB
C
mit
yzhan018/the-day-after-tomorrow,t-k-/the-day-after-tomorrow,approach0/search-engine,approach0/search-engine,yzhan018/the-day-after-tomorrow,yzhan018/the-day-after-tomorrow,t-k-/the-day-after-tomorrow,approach0/search-engine,approach0/search-engine,yzhan018/the-day-after-tomorrow,t-k-/the-day-after-tomorrow,t-k-/the-day-after-tomorrow,yzhan018/the-day-after-tomorrow,t-k-/the-day-after-tomorrow,yzhan018/the-day-after-tomorrow,yzhan018/the-day-after-tomorrow,t-k-/the-day-after-tomorrow,t-k-/the-day-after-tomorrow
28b213cfe02713b8a0a986cb5f6efb3058dacb5f
TMEVSIM/TMevSimConverter.h
TMEVSIM/TMevSimConverter.h
#ifndef ROOT_TMevSimConverter #define ROOT_TMevSimConverter /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ #include "TObject.h" class TMevSimConverter : public TObject { enum {kMaxParticles = 35}; Int_t fNPDGCodes; // Number of PDG codes known by G3 Int_t fPDGCode [kMaxParticles]; // Translation table of PDG codes void DefineParticles(); public: TMevSimConverter() {DefineParticles();} virtual ~TMevSimConverter() {} Int_t PDGFromId(Int_t gpid); Int_t IdFromPDG(Int_t pdg); ClassDef(TMevSimConverter,1) }; #endif
#ifndef ROOT_TMevSimConverter #define ROOT_TMevSimConverter /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ #include "TObject.h" class TMevSimConverter : public TObject { enum {kMaxParticles = 35}; Int_t fNPDGCodes; // Number of PDG codes known by G3 Int_t fPDGCode [kMaxParticles]; // Translation table of PDG codes void DefineParticles(); public: TMevSimConverter() : fNPDGCodes(0) {DefineParticles();} virtual ~TMevSimConverter() {} Int_t PDGFromId(Int_t gpid); Int_t IdFromPDG(Int_t pdg); ClassDef(TMevSimConverter,1) }; #endif
Initialize fNPDGcodes to 0 to prevent sigsegv (Christian)
Initialize fNPDGcodes to 0 to prevent sigsegv (Christian)
C
bsd-3-clause
coppedis/AliRoot,ALICEHLT/AliRoot,alisw/AliRoot,coppedis/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,ALICEHLT/AliRoot,ALICEHLT/AliRoot,shahor02/AliRoot,shahor02/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,shahor02/AliRoot,ecalvovi/AliRoot,coppedis/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,ecalvovi/AliRoot,miranov25/AliRoot,shahor02/AliRoot,sebaleh/AliRoot,jgrosseo/AliRoot,miranov25/AliRoot,coppedis/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,coppedis/AliRoot,alisw/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,sebaleh/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,jgrosseo/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,miranov25/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,ALICEHLT/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,mkrzewic/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,alisw/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,ecalvovi/AliRoot,shahor02/AliRoot,alisw/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,coppedis/AliRoot
f86f4873e8aef4d54ea45abc70b5f45af204186a
fitz/stm_filter.c
fitz/stm_filter.c
#include "fitz_base.h" #include "fitz_stream.h" fz_error fz_process(fz_filter *f, fz_buffer *in, fz_buffer *out) { fz_error reason; unsigned char *oldrp; unsigned char *oldwp; assert(!out->eof); oldrp = in->rp; oldwp = out->wp; if (f->done) return fz_iodone; reason = f->process(f, in, out); assert(in->rp <= in->wp); assert(out->wp <= out->ep); f->consumed = in->rp > oldrp; f->produced = out->wp > oldwp; f->count += out->wp - oldwp; /* iodone or error */ if (reason != fz_ioneedin && reason != fz_ioneedout) { if (reason != fz_iodone) reason = fz_rethrow(reason, "cannot process filter"); out->eof = 1; f->done = 1; } return reason; } fz_filter * fz_keepfilter(fz_filter *f) { f->refs ++; return f; } void fz_dropfilter(fz_filter *f) { if (--f->refs == 0) { if (f->drop) f->drop(f); fz_free(f); } }
#include "fitz_base.h" #include "fitz_stream.h" fz_error fz_process(fz_filter *f, fz_buffer *in, fz_buffer *out) { fz_error reason; unsigned char *oldrp; unsigned char *oldwp; oldrp = in->rp; oldwp = out->wp; if (f->done) return fz_iodone; assert(!out->eof); reason = f->process(f, in, out); assert(in->rp <= in->wp); assert(out->wp <= out->ep); f->consumed = in->rp > oldrp; f->produced = out->wp > oldwp; f->count += out->wp - oldwp; /* iodone or error */ if (reason != fz_ioneedin && reason != fz_ioneedout) { if (reason != fz_iodone) reason = fz_rethrow(reason, "cannot process filter"); out->eof = 1; f->done = 1; } return reason; } fz_filter * fz_keepfilter(fz_filter *f) { f->refs ++; return f; } void fz_dropfilter(fz_filter *f) { if (--f->refs == 0) { if (f->drop) f->drop(f); fz_free(f); } }
Move assert test of EOF to after testing if a filter is done.
Move assert test of EOF to after testing if a filter is done.
C
agpl-3.0
tophyr/mupdf,PuzzleFlow/mupdf,derek-watson/mupdf,cgogolin/penandpdf,ArtifexSoftware/mupdf,asbloomf/mupdf,lamemate/mupdf,lolo32/mupdf-mirror,lolo32/mupdf-mirror,loungeup/mupdf,knielsen/mupdf,kobolabs/mupdf,asbloomf/mupdf,TamirEvan/mupdf,hjiayz/forkmupdf,hackqiang/mupdf,seagullua/MuPDF,MokiMobility/muPDF,nqv/mupdf,sebras/mupdf,poor-grad-student/mupdf,benoit-pierre/mupdf,Kalp695/mupdf,ArtifexSoftware/mupdf,lolo32/mupdf-mirror,robamler/mupdf-nacl,ArtifexSoftware/mupdf,Kalp695/mupdf,derek-watson/mupdf,TamirEvan/mupdf,isavin/humblepdf,knielsen/mupdf,tribals/mupdf,lolo32/mupdf-mirror,lamemate/mupdf,michaelcadilhac/pdfannot,seagullua/MuPDF,geetakaur/NewApps,cgogolin/penandpdf,MokiMobility/muPDF,benoit-pierre/mupdf,michaelcadilhac/pdfannot,ArtifexSoftware/mupdf,PuzzleFlow/mupdf,FabriceSalvaire/mupdf-cmake,robamler/mupdf-nacl,lustersir/MuPDF,xiangxw/mupdf,wild0/opened_mupdf,FabriceSalvaire/mupdf-v1.3,poor-grad-student/mupdf,cgogolin/penandpdf,clchiou/mupdf,derek-watson/mupdf,sebras/mupdf,isavin/humblepdf,hxx0215/MuPDFMirror,FabriceSalvaire/mupdf-cmake,wzhsunn/mupdf,clchiou/mupdf,lamemate/mupdf,tophyr/mupdf,FabriceSalvaire/mupdf-v1.3,geetakaur/NewApps,wild0/opened_mupdf,FabriceSalvaire/mupdf-cmake,issuestand/mupdf,FabriceSalvaire/mupdf-v1.3,github201407/MuPDF,seagullua/MuPDF,TamirEvan/mupdf,github201407/MuPDF,cgogolin/penandpdf,zeniko/mupdf,fluks/mupdf-x11-bookmarks,ccxvii/mupdf,TamirEvan/mupdf,asbloomf/mupdf,wzhsunn/mupdf,ArtifexSoftware/mupdf,flipstudio/MuPDF,hjiayz/forkmupdf,xiangxw/mupdf,lolo32/mupdf-mirror,ziel/mupdf,benoit-pierre/mupdf,sebras/mupdf,fluks/mupdf-x11-bookmarks,wzhsunn/mupdf,flipstudio/MuPDF,kobolabs/mupdf,fluks/mupdf-x11-bookmarks,flipstudio/MuPDF,github201407/MuPDF,hxx0215/MuPDFMirror,crow-misia/mupdf,ArtifexSoftware/mupdf,hxx0215/MuPDFMirror,xiangxw/mupdf,Kalp695/mupdf,hackqiang/mupdf,lolo32/mupdf-mirror,zeniko/mupdf,seagullua/MuPDF,muennich/mupdf,sebras/mupdf,MokiMobility/muPDF,issuestand/mupdf,ylixir/mupdf,ccxvii/mupdf,ziel/mupdf,asbloomf/mupdf,samturneruk/mupdf_secure_android,clchiou/mupdf,flipstudio/MuPDF,samturneruk/mupdf_secure_android,nqv/mupdf,hackqiang/mupdf,crow-misia/mupdf,nqv/mupdf,isavin/humblepdf,seagullua/MuPDF,geetakaur/NewApps,TamirEvan/mupdf,ylixir/mupdf,robamler/mupdf-nacl,ccxvii/mupdf,hackqiang/mupdf,seagullua/MuPDF,Kalp695/mupdf,FabriceSalvaire/mupdf-v1.3,crow-misia/mupdf,benoit-pierre/mupdf,ArtifexSoftware/mupdf,tophyr/mupdf,derek-watson/mupdf,samturneruk/mupdf_secure_android,isavin/humblepdf,poor-grad-student/mupdf,loungeup/mupdf,ziel/mupdf,lustersir/MuPDF,ziel/mupdf,ylixir/mupdf,TamirEvan/mupdf,knielsen/mupdf,wzhsunn/mupdf,lustersir/MuPDF,TamirEvan/mupdf,loungeup/mupdf,andyhan/mupdf,knielsen/mupdf,lustersir/MuPDF,tribals/mupdf,derek-watson/mupdf,wzhsunn/mupdf,xiangxw/mupdf,FabriceSalvaire/mupdf-v1.3,PuzzleFlow/mupdf,zeniko/mupdf,zeniko/mupdf,hjiayz/forkmupdf,FabriceSalvaire/mupdf-cmake,asbloomf/mupdf,wzhsunn/mupdf,muennich/mupdf,knielsen/mupdf,andyhan/mupdf,wild0/opened_mupdf,andyhan/mupdf,crow-misia/mupdf,ccxvii/mupdf,kobolabs/mupdf,MokiMobility/muPDF,ylixir/mupdf,loungeup/mupdf,samturneruk/mupdf_secure_android,sebras/mupdf,samturneruk/mupdf_secure_android,flipstudio/MuPDF,xiangxw/mupdf,wild0/opened_mupdf,kobolabs/mupdf,wild0/opened_mupdf,lamemate/mupdf,samturneruk/mupdf_secure_android,github201407/MuPDF,crow-misia/mupdf,hackqiang/mupdf,wild0/opened_mupdf,issuestand/mupdf,andyhan/mupdf,benoit-pierre/mupdf,fluks/mupdf-x11-bookmarks,muennich/mupdf,lolo32/mupdf-mirror,benoit-pierre/mupdf,hjiayz/forkmupdf,PuzzleFlow/mupdf,michaelcadilhac/pdfannot,andyhan/mupdf,Kalp695/mupdf,hxx0215/MuPDFMirror,FabriceSalvaire/mupdf-v1.3,zeniko/mupdf,derek-watson/mupdf,FabriceSalvaire/mupdf-cmake,lamemate/mupdf,cgogolin/penandpdf,MokiMobility/muPDF,robamler/mupdf-nacl,cgogolin/penandpdf,lustersir/MuPDF,clchiou/mupdf,tribals/mupdf,tophyr/mupdf,ArtifexSoftware/mupdf,fluks/mupdf-x11-bookmarks,tophyr/mupdf,zeniko/mupdf,loungeup/mupdf,FabriceSalvaire/mupdf-cmake,sebras/mupdf,kobolabs/mupdf,geetakaur/NewApps,ylixir/mupdf,issuestand/mupdf,github201407/MuPDF,tribals/mupdf,ccxvii/mupdf,poor-grad-student/mupdf,poor-grad-student/mupdf,tophyr/mupdf,poor-grad-student/mupdf,ziel/mupdf,hxx0215/MuPDFMirror,Kalp695/mupdf,muennich/mupdf,kobolabs/mupdf,hxx0215/MuPDFMirror,issuestand/mupdf,hjiayz/forkmupdf,hjiayz/forkmupdf,isavin/humblepdf,knielsen/mupdf,nqv/mupdf,kobolabs/mupdf,xiangxw/mupdf,PuzzleFlow/mupdf,github201407/MuPDF,muennich/mupdf,nqv/mupdf,isavin/humblepdf,geetakaur/NewApps,wild0/opened_mupdf,muennich/mupdf,fluks/mupdf-x11-bookmarks,geetakaur/NewApps,fluks/mupdf-x11-bookmarks,michaelcadilhac/pdfannot,issuestand/mupdf,michaelcadilhac/pdfannot,robamler/mupdf-nacl,xiangxw/mupdf,isavin/humblepdf,asbloomf/mupdf,clchiou/mupdf,tribals/mupdf,clchiou/mupdf,muennich/mupdf,ccxvii/mupdf,ziel/mupdf,ylixir/mupdf,michaelcadilhac/pdfannot,nqv/mupdf,robamler/mupdf-nacl,MokiMobility/muPDF,andyhan/mupdf,TamirEvan/mupdf,tribals/mupdf,PuzzleFlow/mupdf,crow-misia/mupdf,Kalp695/mupdf,lamemate/mupdf,hackqiang/mupdf,loungeup/mupdf,flipstudio/MuPDF,lustersir/MuPDF,PuzzleFlow/mupdf
6c3a9502f0f9d5523102545bf344b5bc2e2bfeb9
include/mpi-compat.h
include/mpi-compat.h
/* Author: Lisandro Dalcin */ /* Contact: [email protected] */ #ifndef MPI_COMPAT_H #define MPI_COMPAT_H #include <mpi.h> #if (MPI_VERSION < 3) && !defined(PyMPI_HAVE_MPI_Message) typedef void *PyMPI_MPI_Message; #define MPI_Message PyMPI_MPI_Message #endif #endif/*MPI_COMPAT_H*/
/* Author: Lisandro Dalcin */ /* Contact: [email protected] */ #ifndef MPI_COMPAT_H #define MPI_COMPAT_H #include <mpi.h> #if (MPI_VERSION < 3) && !defined(PyMPI_HAVE_MPI_Message) typedef void *PyMPI_MPI_Message; #define MPI_Message PyMPI_MPI_Message #endif #if (MPI_VERSION < 4) && !defined(PyMPI_HAVE_MPI_Session) typedef void *PyMPI_MPI_Session; #define MPI_Session PyMPI_MPI_Session #endif #endif/*MPI_COMPAT_H*/
Define MPI_Session for compatibility with current mpi4py main branch
Define MPI_Session for compatibility with current mpi4py main branch
C
mit
Unidata/netcdf4-python,Unidata/netcdf4-python,Unidata/netcdf4-python
66be7388475932a5a2425e3bfd7ffc57f70dcd1c
tests/regression/13-privatized/66-mine-W-init.c
tests/regression/13-privatized/66-mine-W-init.c
#include <pthread.h> #include <assert.h> int g; void *t_fun(void *arg) { return NULL; } void main() { pthread_t id; pthread_create(&id, NULL, t_fun, NULL); g = 1; assert(g); // Mine's analysis would succeed, our mine-W doesn't }
#include <pthread.h> #include <assert.h> int g; void *t_fun(void *arg) { return NULL; } void main() { pthread_t id; pthread_create(&id, NULL, t_fun, NULL); g = 1; assert(g); // TODO (Mine's analysis would succeed, our mine-W doesn't) }
Mark Mine init privatization test TODO to make others pass
Mark Mine init privatization test TODO to make others pass
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
799188a34509000f87f139423a6ba52d93ee1f1d
test2/bitfields/init/pad_end.c
test2/bitfields/init/pad_end.c
// RUN: %layout_check %s struct A { int : 0; int a; int : 0; int b; int : 0; }; struct A a = { 1, 2 };
// RUN: %layout_check %s struct A { int : 0; int a; int : 0; int : 0; int : 0; int : 0; int b; int : 0; }; struct A a = { 1, 2 };
Add more zero-width fields to bitfield padding test
Add more zero-width fields to bitfield padding test
C
mit
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
b79d3efea5f31ee74a5960522b0552fc9b43dc43
test/Parser/nullability.c
test/Parser/nullability.c
// RUN: %clang_cc1 -fsyntax-only -std=c99 -Wno-nullability-declspec -pedantic %s -verify _Nonnull int *ptr; // expected-warning{{type nullability specifier '_Nonnull' is a Clang extension}} #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wnullability-extension" _Nonnull int *ptr2; // no-warning #pragma clang diagnostic pop #if __has_feature(nullability) # error Nullability should not be supported in C under -pedantic -std=c99 #endif #if !__has_extension(nullability) # error Nullability should always be supported as an extension #endif
// RUN: %clang_cc1 -fsyntax-only -std=c99 -Wno-nullability-declspec -pedantic %s -verify _Nonnull int *ptr; // expected-warning{{type nullability specifier '_Nonnull' is a Clang extension}} #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wnullability-extension" _Nonnull int *ptr2; // no-warning #pragma clang diagnostic pop #if !__has_feature(nullability) # error Nullability should always be supported #endif #if !__has_extension(nullability) # error Nullability should always be supported as an extension #endif
Fix a test case broken by my previous commit.
Fix a test case broken by my previous commit. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@240977 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,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
ca005fb4d05df5ba680b20566baf4fac515f4fe3
Classes/Utility/Runtime/Objc/FLEXRuntimeSafety.h
Classes/Utility/Runtime/Objc/FLEXRuntimeSafety.h
// // FLEXRuntimeSafety.h // FLEX // // Created by Tanner on 3/25/17. // #import <Foundation/Foundation.h> #import <objc/runtime.h> #pragma mark - Classes extern NSUInteger const kFLEXKnownUnsafeClassCount; extern const Class * FLEXKnownUnsafeClassList(void); extern NSSet * FLEXKnownUnsafeClassNames(void); extern CFSetRef FLEXKnownUnsafeClasses; static inline BOOL FLEXClassIsSafe(Class cls) { if (!cls) return NO; return !CFSetContainsValue(FLEXKnownUnsafeClasses, (__bridge void *)cls); } static inline BOOL FLEXClassNameIsSafe(NSString *cls) { if (!cls) return NO; NSSet *ignored = FLEXKnownUnsafeClassNames(); return ![ignored containsObject:cls]; } #pragma mark - Ivars extern CFSetRef FLEXKnownUnsafeIvars; static inline BOOL FLEXIvarIsSafe(Ivar ivar) { if (!ivar) return NO; return !CFSetContainsValue(FLEXKnownUnsafeIvars, ivar); }
// // FLEXRuntimeSafety.h // FLEX // // Created by Tanner on 3/25/17. // #import <Foundation/Foundation.h> #import <objc/runtime.h> #pragma mark - Classes extern NSUInteger const kFLEXKnownUnsafeClassCount; extern const Class * FLEXKnownUnsafeClassList(void); extern NSSet * FLEXKnownUnsafeClassNames(void); extern CFSetRef FLEXKnownUnsafeClasses; static Class cNSObject = nil, cNSProxy = nil; __attribute__((constructor)) static void FLEXInitKnownRootClasses() { cNSObject = [NSObject class]; cNSProxy = [NSProxy class]; } static inline BOOL FLEXClassIsSafe(Class cls) { // Is it nil or known to be unsafe? if (!cls || CFSetContainsValue(FLEXKnownUnsafeClasses, (__bridge void *)cls)) { return NO; } // Is it a known root class? if (!class_getSuperclass(cls)) { return cls == cNSObject || cls == cNSProxy; } // Probably safe return YES; } static inline BOOL FLEXClassNameIsSafe(NSString *cls) { if (!cls) return NO; NSSet *ignored = FLEXKnownUnsafeClassNames(); return ![ignored containsObject:cls]; } #pragma mark - Ivars extern CFSetRef FLEXKnownUnsafeIvars; static inline BOOL FLEXIvarIsSafe(Ivar ivar) { if (!ivar) return NO; return !CFSetContainsValue(FLEXKnownUnsafeIvars, ivar); }
Make FLEXClassIsSafe return NO for unknown root classes
Make FLEXClassIsSafe return NO for unknown root classes
C
bsd-3-clause
NSExceptional/FLEX,NSExceptional/FLEX,Flipboard/FLEX,Flipboard/FLEX
bf11d5ba74b8250248839cb48aad0840e9cfd357
hswebkit.h
hswebkit.h
/* * Copyright (C) 2009 Cjacker Huang <[email protected]>. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef HS_WEBKIT_H #define HS_WEBKIT_H /* to avoid stdbool.h error in JavaScriptCore/JSBase.h*/ #define _Bool int #define WINAPI #define CALLBACK /* include webkit headers*/ #include <webkit/webkit.h> #include <webkit/webkitdom.h> #endif #include "events.h"
/* * Copyright (C) 2009 Cjacker Huang <[email protected]>. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifdef __BLOCKS__ #undef __BLOCKS__ #endif #ifndef HS_WEBKIT_H #define HS_WEBKIT_H /* to avoid stdbool.h error in JavaScriptCore/JSBase.h*/ #define _Bool int #define WINAPI #define CALLBACK /* include webkit headers*/ #include <webkit/webkit.h> #include <webkit/webkitdom.h> #endif #include "events.h"
Fix CPP issue on OS X
Fix CPP issue on OS X
C
lgpl-2.1
gtk2hs/webkit,gtk2hs/webkit,gtk2hs/webkit
437e9c5483751d62f8bbbbfb7a9f83b5888eada8
src/plugins/airplay/net_utils.h
src/plugins/airplay/net_utils.h
#ifndef _NET_UTILS_H #define _NET_UTILS_H #include <string.h> #include <unistd.h> #include <errno.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <fcntl.h> char *get_local_addr(int fd); int set_sock_nonblock(int sockfd); int tcp_open(); int tcp_connect(int sock_fd, const char *host, unsigned int port); int tcp_write(int fd, const char *buf, int n); int tcp_read(int fd, char *buf, int n); #endif /* _NET_UTILS_H */
#ifndef _NET_UTILS_H #define _NET_UTILS_H #include <string.h> #include <unistd.h> #include <errno.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <fcntl.h> char *get_local_addr(int fd); int set_sock_nonblock(int sockfd); int tcp_open(void); int tcp_connect(int sock_fd, const char *host, unsigned int port); int tcp_write(int fd, const char *buf, int n); int tcp_read(int fd, char *buf, int n); #endif /* _NET_UTILS_H */
Fix function prototype in airplay plugin.
OTHER: Fix function prototype in airplay plugin.
C
lgpl-2.1
mantaraya36/xmms2-mantaraya36,chrippa/xmms2,mantaraya36/xmms2-mantaraya36,xmms2/xmms2-stable,oneman/xmms2-oneman,theefer/xmms2,theeternalsw0rd/xmms2,mantaraya36/xmms2-mantaraya36,oneman/xmms2-oneman,dreamerc/xmms2,theeternalsw0rd/xmms2,oneman/xmms2-oneman,krad-radio/xmms2-krad,oneman/xmms2-oneman,theeternalsw0rd/xmms2,six600110/xmms2,oneman/xmms2-oneman,theefer/xmms2,oneman/xmms2-oneman,mantaraya36/xmms2-mantaraya36,dreamerc/xmms2,six600110/xmms2,chrippa/xmms2,oneman/xmms2-oneman-old,oneman/xmms2-oneman-old,theeternalsw0rd/xmms2,theefer/xmms2,oneman/xmms2-oneman-old,six600110/xmms2,oneman/xmms2-oneman-old,theeternalsw0rd/xmms2,theefer/xmms2,dreamerc/xmms2,theefer/xmms2,mantaraya36/xmms2-mantaraya36,oneman/xmms2-oneman,krad-radio/xmms2-krad,chrippa/xmms2,krad-radio/xmms2-krad,krad-radio/xmms2-krad,chrippa/xmms2,theefer/xmms2,xmms2/xmms2-stable,xmms2/xmms2-stable,chrippa/xmms2,six600110/xmms2,dreamerc/xmms2,krad-radio/xmms2-krad,six600110/xmms2,theefer/xmms2,krad-radio/xmms2-krad,mantaraya36/xmms2-mantaraya36,xmms2/xmms2-stable,mantaraya36/xmms2-mantaraya36,xmms2/xmms2-stable,dreamerc/xmms2,theeternalsw0rd/xmms2,six600110/xmms2,chrippa/xmms2,oneman/xmms2-oneman-old,xmms2/xmms2-stable
7d08034b9e6805682c6bad0abe53b84312030196
src/main.c
src/main.c
#include <stdlib.h> #include <event2/event.h> #include <event2/http.h> static void time_request_cb(struct evhttp_request *req, void *arg) { (void) arg; printf("Received request for %s\n", evhttp_request_get_uri(req)); evhttp_send_reply(req, 200, "OK", NULL); } int main(int argc, char **argv) { struct event_base *base; struct evhttp *http; struct evhttp_bound_socket *handle; base = event_base_new(); if (base == NULL) { fprintf(stderr, "couldn't create event base\n"); return EXIT_FAILURE; } http = evhttp_new(base); if (http == NULL) { fprintf(stderr, "couldn't create evhttp\n"); return EXIT_FAILURE; } evhttp_set_gencb(http, time_request_cb, NULL); handle = evhttp_bind_socket_with_handle(http, "0.0.0.0", 8080); if (handle == NULL) { fprintf(stderr, "couldn't bind to port 8080\n"); return EXIT_FAILURE; } event_base_dispatch(base); return EXIT_SUCCESS; }
#include <stdlib.h> #include <time.h> #include <event2/buffer.h> #include <event2/event.h> #include <event2/http.h> static void time_request_cb(struct evhttp_request *req, void *arg) { (void) arg; struct evbuffer *evb = evbuffer_new(); printf("Received request for %s\n", evhttp_request_get_uri(req)); time_t ts = time(NULL); evbuffer_add_printf(evb, "%s", ctime(&ts)); evhttp_send_reply(req, 200, "OK", evb); evbuffer_free(evb); } int main(int argc, char **argv) { struct event_base *base; struct evhttp *http; struct evhttp_bound_socket *handle; base = event_base_new(); if (base == NULL) { fprintf(stderr, "couldn't create event base\n"); return EXIT_FAILURE; } http = evhttp_new(base); if (http == NULL) { fprintf(stderr, "couldn't create evhttp\n"); return EXIT_FAILURE; } evhttp_set_gencb(http, time_request_cb, NULL); handle = evhttp_bind_socket_with_handle(http, "0.0.0.0", 8080); if (handle == NULL) { fprintf(stderr, "couldn't bind to port 8080\n"); return EXIT_FAILURE; } event_base_dispatch(base); return EXIT_SUCCESS; }
Return local server time on request
Return local server time on request
C
mit
sfod/HTTP-server
63ed1676250ad8f8549716d60c8354ae800a12a3
sys/i386/svr4/svr4_genassym.c
sys/i386/svr4/svr4_genassym.c
/* $FreeBSD$ */ /* Derived from: Id: linux_genassym.c,v 1.8 1998/07/29 15:50:41 bde Exp */ #include <sys/param.h> #include <sys/assym.h> #include <compat/svr4/svr4_signal.h> #include <compat/svr4/svr4_ucontext.h> /* XXX: This bit sucks rocks, but gets rid of compiler errors. Maybe I should * fix the include files instead... */ #define SVR4_MACHDEP_JUST_REGS #include <i386/svr4/svr4_machdep.h> ASSYM(SVR4_SIGF_HANDLER, offsetof(struct svr4_sigframe, sf_handler)); ASSYM(SVR4_SIGF_UC, offsetof(struct svr4_sigframe, sf_uc)); ASSYM(SVR4_UC_FS, offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_FS])); ASSYM(SVR4_UC_GS, offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_GS])); ASSYM(SVR4_UC_EFLAGS, offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_EFL]));
/* $FreeBSD$ */ /* Derived from: Id: linux_genassym.c,v 1.8 1998/07/29 15:50:41 bde Exp */ #include <sys/param.h> #include <sys/assym.h> #include <sys/systm.h> #include <compat/svr4/svr4_signal.h> #include <compat/svr4/svr4_ucontext.h> /* XXX: This bit sucks rocks, but gets rid of compiler errors. Maybe I should * fix the include files instead... */ #define SVR4_MACHDEP_JUST_REGS #include <i386/svr4/svr4_machdep.h> ASSYM(SVR4_SIGF_HANDLER, offsetof(struct svr4_sigframe, sf_handler)); ASSYM(SVR4_SIGF_UC, offsetof(struct svr4_sigframe, sf_uc)); ASSYM(SVR4_UC_FS, offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_FS])); ASSYM(SVR4_UC_GS, offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_GS])); ASSYM(SVR4_UC_EFLAGS, offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_EFL]));
Include <sys/systm.h> for the definition of offsetof() instead of depending on the definition being misplaced in <sys/types.h>. The definition probably belongs in <sys/stddef.h>.
Include <sys/systm.h> for the definition of offsetof() instead of depending on the definition being misplaced in <sys/types.h>. The definition probably belongs in <sys/stddef.h>.
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
dd78e0e41887642975af2fa9952aed4993c4565b
opencv_detector/src/lib/filter/background_extractor.h
opencv_detector/src/lib/filter/background_extractor.h
#pragma once #include "types/process_filter.h" namespace TooManyPeeps { class BackgroundExtractor : public ProcessFilter { private: static const bool TRACK_SHADOWS = false; private: cv::Ptr<cv::BackgroundSubtractor> backgroundExtractor; public: BackgroundExtractor(const cv::Mat& original, cv::Mat& result, int historySize, double threshold); ~BackgroundExtractor(void); public: virtual void execute(void); }; };
#pragma once #include "types/process_filter.h" namespace TooManyPeeps { class BackgroundExtractor : public ProcessFilter { private: static const bool TRACK_SHADOWS = true; private: cv::Ptr<cv::BackgroundSubtractor> backgroundExtractor; public: BackgroundExtractor(const cv::Mat& original, cv::Mat& result, int historySize, double threshold); ~BackgroundExtractor(void); public: virtual void execute(void); }; };
Allow mog to track shadows
Allow mog to track shadows
C
mit
99-bugs/toomanypeeps,99-bugs/toomanypeeps,99-bugs/toomanypeeps
9f0e132783fed48c41f762e8ec33388f6feb8784
kjchess/kjchess.h
kjchess/kjchess.h
// // kjchess.h // kjchess // // Created by Kristopher Johnson on 3/11/17. // Copyright © 2017 Kristopher Johnson. All rights reserved. // #import <Cocoa/Cocoa.h> //! Project version number for kjchess. FOUNDATION_EXPORT double kjchessVersionNumber; //! Project version string for kjchess. FOUNDATION_EXPORT const unsigned char kjchessVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <kjchess/PublicHeader.h>
// // kjchess.h // kjchess // // Copyright © 2017 Kristopher Johnson. All rights reserved. // #import <Cocoa/Cocoa.h> //! Project version number for kjchess. FOUNDATION_EXPORT double kjchessVersionNumber; //! Project version string for kjchess. FOUNDATION_EXPORT const unsigned char kjchessVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <kjchess/PublicHeader.h>
Remove a "Created by" comment line
Remove a "Created by" comment line
C
mit
kristopherjohnson/kjchess,kristopherjohnson/kjchess
3efef59ae6fc987c6b05d677b91e0f30a694ccfa
lib/osx_cf_util.h
lib/osx_cf_util.h
void osx_cf_run_loop_run();
void osx_cf_run_loop_run(); CFRunLoopRunResult osx_cf_run_loop_run_in_mode (CFStringRef mode, CFTimeInterval seconds, Boolean returnAfterSourceHandled);
Add run_in_mode prototype to util header
Add run_in_mode prototype to util header
C
isc
dsheets/ocaml-osx-cf
ac08fb9eb09123e22d33f513a7ed11e59f6df96d
internal.h
internal.h
/***************************************************************************** * internal.h: ***************************************************************************** * Copyright (C) 2010-2012 L-SMASH project * * Authors: Takashi Hirata <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *****************************************************************************/ /* This file is available under an ISC license. */ #ifndef INTERNAL_H #define INTERNAL_H #include "common/osdep.h" /* must be placed before stdio.h */ #include <stdio.h> #include <assert.h> #ifndef lsmash_fseek #define lsmash_fseek fseek #define lsmash_ftell ftell #endif #include "lsmash.h" #endif
/***************************************************************************** * internal.h: ***************************************************************************** * Copyright (C) 2010-2012 L-SMASH project * * Authors: Takashi Hirata <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *****************************************************************************/ /* This file is available under an ISC license. */ #ifndef INTERNAL_H #define INTERNAL_H #include "common/osdep.h" /* must be placed before stdio.h */ #include <stdio.h> #include <assert.h> #ifndef lsmash_fseek #define lsmash_fseek fseeko #define lsmash_ftell ftello #endif #include "lsmash.h" #endif
Use ftello/fseeko instead of ftell/fseek
Use ftello/fseeko instead of ftell/fseek On 32-bit systems, fseek returns a long, which is 32-bits, and fseek takes its offset argument as a long, as well. In order to return and use 64-bit offsets, use ftello and fseeko, along which defining _FILE_OFFSET_BITS 64, which is already in osdep.h.
C
isc
maki-rxrz/L-SMASH,silverfilain/L-SMASH,dwbuiten/l-smash,mstorsjo/l-smash,canbal/l-smash,canbal/l-smash,l-smash/l-smash,maki-rxrz/L-SMASH,silverfilain/L-SMASH,mstorsjo/l-smash,silverfilain/L-SMASH,l-smash/l-smash,l-smash/l-smash,dwbuiten/l-smash
957004881ae4afbd1234f648b8419b5a2cde6434
src/main.c
src/main.c
#include <stdio.h> #include "main.h" int main(int argc, char *argv[]) { usage(argv[0]); } void usage(char *utilname) { printf("Usage: %s <input_file> <output_file> [options]\n", utilname); printf("WARNING: UTILITY IS NOT FULLY FUNCTIONAL YET\n"); printf("Options:\n"); //TODO: add optional arguments for each filter option printf(" -b --blur Apply box blur\n"); printf(" -g --gaussian Apply Gaussian blur\n"); printf(" -s --sharpen Sharpen image\n"); printf(" -u --unsharpen Unsharpen image\n"); printf(" -o --outline Outline image\n"); printf(" -e --emboss Emboss image\n"); printf(" --topsobel Apply top Sobel filter\n"); printf(" --bottomsobel Apply bottom Sobel filter\n"); printf(" --rightsobel Apply right Sobel filter\n"); printf(" --leftsobel Apply left Sobel filter\n"); printf(" -c FILE --custom=FILE Apply custom filter\n"); }
#include <stdio.h> #include "main.h" int main(int argc, char *argv[]) { usage(argv[0]); } void usage(char *utilname) { printf("Usage: %s <input_file> <output_file> [options]\n", utilname); printf("WARNING: UTILITY IS NOT FULLY FUNCTIONAL YET\n"); printf("Options:\n"); /* TODO: add optional arguments for each filter option */ printf(" -b --blur Apply box blur\n"); printf(" -g --gaussian Apply Gaussian blur\n"); printf(" -s --sharpen Sharpen image\n"); printf(" -u --unsharpen Unsharpen image\n"); printf(" -o --outline Outline image\n"); printf(" -e --emboss Emboss image\n"); printf(" --topsobel Apply top Sobel filter\n"); printf(" --bottomsobel Apply bottom Sobel filter\n"); printf(" --rightsobel Apply right Sobel filter\n"); printf(" --leftsobel Apply left Sobel filter\n"); printf(" -c FILE --custom=FILE Apply custom filter\n"); }
Convert to Linux kernel style
Convert to Linux kernel style
C
mit
TheUnderscores/qfilt
3735e6ade1f791994f7ee203feab3dbe233c3dad
src/main.h
src/main.h
#ifndef MAIN_H #define MAIN_H #include <cstdlib> #include <iostream> #include <tr1/unordered_map> #include <vector> #include <list> #include <set> #include <pthread.h> #endif
#ifndef MAIN_H #define MAIN_H #include <unistd.h> #include <cstdlib> #include <iostream> #include <tr1/unordered_map> #include <vector> #include <list> #include <set> #include <pthread.h> #endif
Fix compile on some systems
Fix compile on some systems
C
mit
ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo
be070dc174759c8e71d6dac44a073af7a58e92b1
lib/msun/src/s_nexttowardf.c
lib/msun/src/s_nexttowardf.c
/* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== */ #ifndef lint static char rcsid[] = "$FreeBSD$"; #endif #include <float.h> #include "fpmath.h" #include "math.h" #include "math_private.h" #define LDBL_INFNAN_EXP (LDBL_MAX_EXP * 2 - 1) float nexttowardf(float x, long double y) { union IEEEl2bits uy; volatile float t; int32_t hx,ix; GET_FLOAT_WORD(hx,x); ix = hx&0x7fffffff; /* |x| */ uy.e = y; if((ix>0x7f800000) || (uy.bits.exp == LDBL_INFNAN_EXP && ((uy.bits.manh&~LDBL_NBIT)|uy.bits.manl) != 0)) return x+y; /* x or y is nan */ if(x==y) return (float)y; /* x=y, return y */ if(ix==0) { /* x == 0 */ SET_FLOAT_WORD(x,(uy.bits.sign<<31)|1);/* return +-minsubnormal */ t = x*x; if(t==x) return t; else return x; /* raise underflow flag */ } if(hx>=0 ^ x < y) /* x -= ulp */ hx -= 1; else /* x += ulp */ hx += 1; ix = hx&0x7f800000; if(ix>=0x7f800000) return x+x; /* overflow */ if(ix<0x00800000) { /* underflow */ t = x*x; if(t!=x) { /* raise underflow flag */ SET_FLOAT_WORD(y,hx); return y; } } SET_FLOAT_WORD(x,hx); return x; }
Implement nexttowardf. This is used on both platforms with 11-bit exponents and platforms with 15-bit exponents for long doubles.
Implement nexttowardf. This is used on both platforms with 11-bit exponents and platforms with 15-bit exponents for long doubles.
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
bed0662b1539b52075e0249894239ad4d17b9706
src/drafterpy.c
src/drafterpy.c
#include <Python.h> #include <drafter/drafter.h> static PyObject *drafterpy_parse_blueprint_to(PyObject *self, PyObject *args){ char *blueprint; char *format; char *result = NULL; drafter_options options; options.sourcemap = true; if(!PyArg_ParseTuple(args, "ss", &blueprint, &format)) return NULL; if(strcmp("json", format) == 0) options.format = DRAFTER_SERIALIZE_JSON; else if (strcmp("yaml", format) == 0) options.format = DRAFTER_SERIALIZE_YAML; else { fprintf(stderr, "Fatal error: Invalid output format\n"); return NULL; } drafter_parse_blueprint_to(blueprint, &result, options); return Py_BuildValue("s", result); } static PyObject *drafterpy_check_blueprint(PyObject *self, PyObject *args){ char *blueprint; char *format; if(!PyArg_ParseTuple(args, "s", &blueprint)) return NULL; drafter_result* result = drafter_check_blueprint(blueprint); if (result == NULL) return Py_BuildValue("O", Py_True); drafter_free_result(result); return Py_BuildValue("O", Py_False); } static PyMethodDef drafterpy_methods[] = { {"parse_blueprint_to", (PyCFunction)drafterpy_parse_blueprint_to, METH_VARARGS, "Parses a blueprint into JSON or YAML."}, {"check_blueprint", (PyCFunction)drafterpy_check_blueprint, METH_VARARGS, "Verify given blueprint correctness."}, {NULL, NULL, 0, NULL} /* Sentinel */ }; static char drafterpy_docstring[] = "Python bindings for libdrafter.\nDrafter is a Snowcrash parser harness."; static struct PyModuleDef drafterpymodule = { PyModuleDef_HEAD_INIT, "drafterpy", drafterpy_docstring, -1, drafterpy_methods }; PyMODINIT_FUNC PyInit_drafterpy(void){ return PyModule_Create(&drafterpymodule); } int main(int argc, char *argv[]){ wchar_t *program = Py_DecodeLocale(argv[0], NULL); if (program == NULL) { fprintf(stderr, "Fatal error: cannot decode argv[0]\n"); } /* Add a built-in module, before Py_Initialize */ PyImport_AppendInittab("drafterpy", PyInit_drafterpy); /* Pass argv[0] to the Python interpreter. REQUIRED */ Py_SetProgramName(program); /* Initialize the Python Interpreter. REQUIRED */ Py_Initialize(); PyImport_ImportModule("drafterpy"); PyMem_RawFree(program); return 0; }
Add C-API bindings with initial methods. It can verify a blueprint and parse it into json or yaml.
Add C-API bindings with initial methods. It can verify a blueprint and parse it into json or yaml.
C
mit
menecio/drafterpy,menecio/drafterpy
a9b6590ced1370537edad8dc60be32c044b2380e
include/asm-mips/mach-generic/dma-coherence.h
include/asm-mips/mach-generic/dma-coherence.h
/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2006 Ralf Baechle <[email protected]> * */ #ifndef __ASM_MACH_GENERIC_DMA_COHERENCE_H #define __ASM_MACH_GENERIC_DMA_COHERENCE_H struct device; static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) { return virt_to_phys(addr); } static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) { return page_to_phys(page); } static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) { return dma_addr; } static void plat_unmap_dma_mem(dma_addr_t dma_addr) { } static inline int plat_device_is_coherent(struct device *dev) { #ifdef CONFIG_DMA_COHERENT return 1; #endif #ifdef CONFIG_DMA_NONCOHERENT return 0; #endif } #endif /* __ASM_MACH_GENERIC_DMA_COHERENCE_H */
/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2006 Ralf Baechle <[email protected]> * */ #ifndef __ASM_MACH_GENERIC_DMA_COHERENCE_H #define __ASM_MACH_GENERIC_DMA_COHERENCE_H struct device; static inline dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) { return virt_to_phys(addr); } static inline dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) { return page_to_phys(page); } static inline unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) { return dma_addr; } static inline void plat_unmap_dma_mem(dma_addr_t dma_addr) { } static inline int plat_device_is_coherent(struct device *dev) { #ifdef CONFIG_DMA_COHERENT return 1; #endif #ifdef CONFIG_DMA_NONCOHERENT return 0; #endif } #endif /* __ASM_MACH_GENERIC_DMA_COHERENCE_H */
Fix a bunch of warnings due to missing inline keywords.
[MIPS] DMA: Fix a bunch of warnings due to missing inline keywords. Signed-off-by: Ralf Baechle <[email protected]>
C
mit
KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas
ad299b8f040b9dfb07c466d2b7a770273d4d583d
lib/bits.h
lib/bits.h
// Copyright 2019 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://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 BITS_H_ #define BITS_H_ #ifdef __BMI2__ #include <immintrin.h> #include <cstdint> namespace qsim { namespace bits { inline uint32_t ExpandBits(uint32_t bits, unsigned n, uint32_t mask) { return _pdep_u32(bits, mask); } inline uint64_t ExpandBits(uint64_t bits, unsigned n, uint64_t mask) { return _pdep_u64(bits, mask); } inline uint32_t CompressBits(uint32_t bits, unsigned n, uint32_t mask) { return _pext_u32(bits, mask); } inline uint64_t CompressBits(uint64_t bits, unsigned n, uint64_t mask) { return _pext_u64(bits, mask); } } // namespace bits } // namespace qsim #else // __BMI2__ namespace qsim { namespace bits { template <typename I> inline I ExpandBits(I bits, unsigned n, I mask) { I ebits = 0; unsigned k = 0; for (unsigned i = 0; i < n; ++i) { if ((mask >> i) & 1) { ebits |= ((bits >> k) & 1) << i; ++k; } } return ebits; } template <typename I> inline I CompressBits(I bits, unsigned n, I mask) { I sbits = 0; unsigned k = 0; for (unsigned i = 0; i < n; ++i) { if ((mask >> i) & 1) { sbits |= ((bits >> i) & 1) << k; ++k; } } return sbits; } } // namespace bits } // namespace qsim #endif // __BMI2__ namespace qsim { namespace bits { template <typename I> inline I PermuteBits(I bits, unsigned n, const std::vector<unsigned>& perm) { I pbits = 0; for (unsigned i = 0; i < n; ++i) { pbits |= ((bits >> i) & 1) << perm[i]; } return pbits; } } // namespace bits } // namespace qsim #endif // BITS_H_
Add matrix routines for multi-qubit gates. Add required file.
Add matrix routines for multi-qubit gates. Add required file.
C
apache-2.0
quantumlib/qsim,quantumlib/qsim,quantumlib/qsim,quantumlib/qsim
d9e17f30737a71df4ccc6b784f237a15484803f4
libspell.h
libspell.h
#ifndef LIBSPELL_H #define LIBSPELL_H char *spell(sqlite3*, char *); char *get_suggestions(char *); #endif
#ifndef LIBSPELL_H #define LIBSPELL_H char *spell(char *); char *get_suggestions(char *); #endif
Remove sqlite3 * parameter from the spell function's declaration.
Remove sqlite3 * parameter from the spell function's declaration.
C
bsd-2-clause
abhinav-upadhyay/spell,abhinav-upadhyay/spell
003e6f400e495cbbae7ecf4aa908c37c78c7e15a
test/Driver/offloading-interoperability.c
test/Driver/offloading-interoperability.c
// REQUIRES: clang-driver // REQUIRES: powerpc-registered-target // REQUIRES: nvptx-registered-target // // Verify that CUDA device commands do not get OpenMP flags. // // RUN: %clang -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \ // RUN: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE // // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary" "--cuda" "-64" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le--linux-gnu" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ld" {{.*}}"-m" "elf64lppc"
// REQUIRES: clang-driver // REQUIRES: powerpc-registered-target // REQUIRES: nvptx-registered-target // // Verify that CUDA device commands do not get OpenMP flags. // // RUN: %clang -no-canonical-prefixes -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \ // RUN: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE // // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary" "--cuda" "-64" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le--linux-gnu" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ld" {{.*}}"-m" "elf64lppc"
Add missing '-no-canonical-prefixes' in test.
Add missing '-no-canonical-prefixes' in test. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@277141 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
f9b710224dadb8157a1cf76df91509db29946e0c
src/lib/array.h
src/lib/array.h
#pragma once #include <cassert> namespace Utilities { namespace Array { template <class T, class Size = unsigned int> class Array { public: Array(T* data, Size capacity) : data_(data), capacity_(capacity) { assert(data_); assert(capacity_ > 0); } T& operator[](Size index) { assert(index < capacity_); return data_[index]; } const T& operator[](Size index) const { assert(index < capacity_); return data_[index]; } T& operator*() { return *data_; } const T& operator*() const { return *data_; } T* data() { return data_; } const T* data() const { return data_; } /** * If T is primitive but not floating point, or if value is zero, the * caller should probably use memset on the raw pointer instead */ void assign(Size numElements, const T& value) { #pragma vector always assert for (Size i = 0; i < numElements; ++i) { data_[i] = value; } } void clear() { capacity_ = 0; } Size capacity() const { return capacity_; } Size size() const { return capacity_; } Size length() const { return capacity_; } private: T* data_; Size capacity_; }; } }
#pragma once #include <cassert> #include <functional> namespace Utilities { namespace Array { template <class T, class Size = unsigned int> class Array { public: Array(T*&& data, Size capacity, std::function<void(T**)>&& deleteData) : data_(std::move(data)), capacity_(capacity), deleteData_(std::move(deleteData)) { assert(data_); assert(capacity_ > 0); } Array(T* data, Size capacity) : data_(data), capacity_(capacity), deleteData_([](T**) {}) { assert(data_); assert(capacity_ > 0); } virtual ~Array() { deleteData_(&data_); } T& operator[](Size index) { assert(index < capacity_); return data_[index]; } const T& operator[](Size index) const { assert(index < capacity_); return data_[index]; } T& operator*() { return *data_; } const T& operator*() const { return *data_; } T* data() { return data_; } const T* data() const { return data_; } /** * If T is primitive but not floating point, or if value is zero, the * caller should probably use memset on the raw pointer instead */ void assign(Size numElements, const T& value) { #pragma vector always assert for (Size i = 0; i < numElements; ++i) { data_[i] = value; } } void clear() { capacity_ = 0; } Size capacity() const { return capacity_; } Size size() const { return capacity_; } Size length() const { return capacity_; } protected: T* data_; Size capacity_; std::function<void(T**)> deleteData_; }; } }
Add ability for Array to take ownership of its data
Add ability for Array to take ownership of its data
C
mit
dmorrill10/cpp_utilities
9f5f289c8cfc25ee4faac85cb4d13ac0668723e7
scene/Element.h
scene/Element.h
/* * Represents an element which can be rendered as part of a scene. * Author: Dino Wernli */ #ifndef ELEMENT_H_ #define ELEMENT_H_ #include <cstddef> class IntersectionData; class Ray; class Element { public: virtual ~Element(); bool Intersect(const Ray& ray, IntersectionData* data = NULL) = 0; }; #endif /* ELEMENT_H_ */
/* * Represents an element which can be rendered as part of a scene. * Author: Dino Wernli */ #ifndef ELEMENT_H_ #define ELEMENT_H_ #include <cstddef> class IntersectionData; class Ray; class Element { public: virtual ~Element(); virtual bool Intersect(const Ray& ray, IntersectionData* data = NULL) = 0; }; #endif /* ELEMENT_H_ */
Fix build failure by adding virtual keyword.
Fix build failure by adding virtual keyword.
C
mit
dinowernli/raytracer,dinowernli/raytracer,dinowernli/raytracer,dinowernli/raytracer
f25dddb1b73261e7829554b764178077f1e2ccd2
AFNetworking/AFJSONUtilities.h
AFNetworking/AFJSONUtilities.h
// AFJSONUtilities.h // // Copyright (c) 2011 Gowalla (http://gowalla.com/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. #import <Foundation/Foundation.h> NSData * AFJSONEncode(id object, NSError **error); id AFJSONDecode(NSData *data, NSError **error);
// AFJSONUtilities.h // // Copyright (c) 2011 Gowalla (http://gowalla.com/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. #import <Foundation/Foundation.h> extern NSData * AFJSONEncode(id object, NSError **error); extern id AFJSONDecode(NSData *data, NSError **error);
Mark the AFJSON* functions as 'extern'.
Mark the AFJSON* functions as 'extern'.
C
mit
skillz/AFNetworking
5d31b2abeec8bb6247048e8371067b753ab3e8bf
test/Frontend/stdin-input.c
test/Frontend/stdin-input.c
// RUN: cat %s | %clang -emit-llvm -g -S \ // RUN: -Xclang -main-file-name -Xclang test/foo.c -x c - -o - | FileCheck %s // CHECK: ; ModuleID = 'test/foo.c' // CHECK: source_filename = "test/foo.c" // CHECK: !1 = !DIFile(filename: "test/foo.c" int main() {}
// RUN: cat %s | %clang -emit-llvm -g -S \ // RUN: -Xclang -main-file-name -Xclang test/foo.c -x c - -o - | FileCheck %s // CHECK: ; ModuleID = 'test/foo.c' // CHECK: source_filename = "test/foo.c" // CHECK: !DIFile(filename: "test/foo.c" int main() {}
Fix buildbot failure from r373217 (don't match metadata id exactly)
Fix buildbot failure from r373217 (don't match metadata id exactly) Fix this failure by ignoring the id of the metadata being checked: http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/3046/consoleFull#-21332887158254eaf0-7326-4999-85b0-388101f2d404 git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@373237 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
e34bafc84fd5a61c8bb9aeba69d7b1ebf671f99b
ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_core.h
ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_core.h
// Copyright 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can // be found in the LICENSE file. #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_CORE_H_ #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_CORE_H_ #include "native_client/src/include/nacl_macros.h" class PPB_Core; namespace ppapi_proxy { // Implements the untrusted side of the PPB_Core interface. // We will also need an rpc service to implement the trusted side, which is a // very thin wrapper around the PPB_Core interface returned from the browser. class PluginCore { public: // Return an interface pointer usable by PPAPI plugins. static const PPB_Core* GetInterface(); // Mark the calling thread as the main thread for IsMainThread. static void MarkMainThread(); private: NACL_DISALLOW_COPY_AND_ASSIGN(PluginCore); }; } // namespace ppapi_proxy #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_CORE_H_
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_CORE_H_ #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_CORE_H_ #include "native_client/src/include/nacl_macros.h" struct PPB_Core; namespace ppapi_proxy { // Implements the untrusted side of the PPB_Core interface. // We will also need an rpc service to implement the trusted side, which is a // very thin wrapper around the PPB_Core interface returned from the browser. class PluginCore { public: // Return an interface pointer usable by PPAPI plugins. static const PPB_Core* GetInterface(); // Mark the calling thread as the main thread for IsMainThread. static void MarkMainThread(); private: NACL_DISALLOW_COPY_AND_ASSIGN(PluginCore); }; } // namespace ppapi_proxy #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_CORE_H_
Declare PPB_Core as a struct, not a class. (Prevents Clang warning)
Declare PPB_Core as a struct, not a class. (Prevents Clang warning) Review URL: http://codereview.chromium.org/8002017 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@102565 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
adobe/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,ropik/chromium
9ece315eb7a01d212072acf474b6407956c7172e
src/main/entity/components/ComponentManager.h
src/main/entity/components/ComponentManager.h
#ifndef COMPONENTMANAGER_H_ #define COMPONENTMANAGER_H_ #include "entity/Entity.h" /** * Enumeration for each of our types of components */ enum component_t { Position, Render }; /** * Base class for all Component Managers. */ class ComponentManager { public: /** * Check if the given Entity has this manager's Component. * * @param e The Entity to test for. * * @return True if the Entity has this Component. */ virtual bool entityHasComponent(Entity e) = 0; /** * Add the Component (with default values) to the Entity. * * @param e The Entity to add the Component to. */ virtual void addComponent(Entity e) = 0; /** * Remove the Component from the Entity. * * @param e The Entity to remove it from. */ virtual void removeComponent(Entity e) = 0; /** * Gets the type of component that this ComponentManager subclass * manages. * * @return One of the component_t enumerations. */ virtual component_t getComponentType() = 0; protected: /** * This class must be inherited, it cannot be instantiated directly. * * NB: We actually gain this from having pure virtual methods already, * but it can't hurt to have an extra layer e.g. in case for any reason * we start to implement default versions of the above. */ ComponentManager() {}; }; #endif
#ifndef COMPONENTMANAGER_H_ #define COMPONENTMANAGER_H_ #include "entity/Entity.h" /** * Enumeration for each of our types of components */ enum component_t { Position, Sprite }; /** * Base class for all Component Managers. */ class ComponentManager { public: /** * Check if the given Entity has this manager's Component. * * @param e The Entity to test for. * * @return True if the Entity has this Component. */ virtual bool entityHasComponent(Entity e) = 0; /** * Add the Component (with default values) to the Entity. * * @param e The Entity to add the Component to. */ virtual void addComponent(Entity e) = 0; /** * Remove the Component from the Entity. * * @param e The Entity to remove it from. */ virtual void removeComponent(Entity e) = 0; /** * Gets the type of component that this ComponentManager subclass * manages. * * @return One of the component_t enumerations. */ virtual component_t getComponentType() = 0; protected: /** * This class must be inherited, it cannot be instantiated directly. * * NB: We actually gain this from having pure virtual methods already, * but it can't hurt to have an extra layer e.g. in case for any reason * we start to implement default versions of the above. */ ComponentManager() {}; }; #endif
Rename Render component to Sprite
Rename Render component to Sprite The old name made no sense; the new isn't *entirely* accurate, though, although neither is it entirely inaccurate.
C
mit
Kromey/roglick
406f4f8e9f92f92803f1efba52537866c1eed873
pod_node.h
pod_node.h
#ifndef INCLUDE_POD_NODE_H #define INCLUDE_POD_NODE_H #include <stddef.h> // A node is a place on a list. It simplifies doubly linked lists because the // header is just another node. Everything in Pod is a node, potentially a // part of a list or map. Header nodes should be initialized to point to // themselves. Otherwise, initialize them to NULL. // // For example: // pod_node header; // // header.previous = &header; // header.next = &header; struct pod_node; typedef struct pod_node pod_node; struct pod_node { pod_node *previous; pod_node *next; }; extern pod_node *pod_node_remove(pod_node *node); inline pod_node *pod_node_remove(pod_node *node) { pod_node *next; next = node->next; node->previous->next = node->next; node->next->previous = node->previous; node->previous = node->next = NULL; return next; } #endif /*INCLUDE_POD_NODE_H */
#ifndef INCLUDE_POD_NODE_H #define INCLUDE_POD_NODE_H #include <stddef.h> // A node is a place on a list. It simplifies doubly linked lists because the // header is just another node. Everything in Pod is a node, potentially a // part of a list or map. Header nodes should be initialized to point to // themselves. Otherwise, initialize them to NULL. // // For example: // pod_node header; // // header.previous = &header; // header.next = &header; struct pod_node; typedef struct pod_node pod_node; struct pod_node { pod_node *previous; pod_node *next; }; // Other pod_node related functions // extern pod_node *pod_node_remove(pod_node *node); extern inline pod_node *pod_node_remove(pod_node *node) { pod_node *next; next = node->next; node->previous->next = node->next; node->next->previous = node->previous; node->previous = node->next = NULL; return next; } #endif /*INCLUDE_POD_NODE_H */
Use "extern inline" in declarations (I think).
Use "extern inline" in declarations (I think).
C
bsd-2-clause
jamesabanks/Pod
b1038b1310b88206828d59030e19c1806755028e
include/joy/internal/seqrange.h
include/joy/internal/seqrange.h
/*! * This file defines a Python-like range function for sequences. * * @author Louis Dionne */ #ifndef JOY_INTERNAL_SEQRANGE_H #define JOY_INTERNAL_SEQRANGE_H #include <chaos/preprocessor/recursion/expr.h> #include <chaos/preprocessor/repetition/repeat_from_to.h> #define JOY_SEQRANGE(from, to) \ JOY_SEQRANGE_S(CHAOS_PP_STATE(), from, to) #define JOY_SEQRANGE_S(state, from, to) \ CHAOS_PP_EXPR_S(state)( \ CHAOS_PP_REPEAT_FROM_TO_S(state, from, to, JOY_I_SEQRANGE, ~) \ ) \ /**/ #define JOY_I_SEQRANGE(state, n, useless) (n) #endif /* !JOY_INTERNAL_SEQRANGE_H */
Add a Python-like range macro for sequences.
Add a Python-like range macro for sequences.
C
mit
ldionne/joy,ldionne/joy
53a441240ae0097d620e9717ee10d2205c1648e0
src/util/Timeout.h
src/util/Timeout.h
#pragma once #include <functional> #include <boost/asio.hpp> // This class abstracts the boost::asio timer in order to provide a generic // facility for timeouts. Once constructed, this class will wait a certain // amount of time and then call the function. The timeout must be canceled // with cancel() before you invalidate your callback. // // You must start the timeout with start(). // // NOTE: The thread that calls the function is undefined. Ensure that your // callback is thread-safe. class Timeout : public std::enable_shared_from_this<Timeout> { public: Timeout(unsigned long ms, std::function<void()> f); ~Timeout(); inline void start() { reset(); } void reset(); // cancel() attempts to invalidate the callback and ensure that it will not // run. On success, returns true, guaranteeing that the callback has/will // not be triggered. On failure, returns false, indicating either that the // callback was already canceled, the callback has already finished // running, or the callback is (about to be) called. bool cancel(); private: boost::asio::deadline_timer m_timer; std::function<void()> m_callback; long m_timeout_interval; std::atomic<bool> m_callback_disabled; void timer_callback(const boost::system::error_code &ec); };
#pragma once #include <functional> #include <atomic> #include <memory> #include <boost/asio.hpp> // This class abstracts the boost::asio timer in order to provide a generic // facility for timeouts. Once constructed, this class will wait a certain // amount of time and then call the function. The timeout must be canceled // with cancel() before you invalidate your callback. // // You must start the timeout with start(). // // NOTE: The thread that calls the function is undefined. Ensure that your // callback is thread-safe. class Timeout : public std::enable_shared_from_this<Timeout> { public: Timeout(unsigned long ms, std::function<void()> f); ~Timeout(); inline void start() { reset(); } void reset(); // cancel() attempts to invalidate the callback and ensure that it will not // run. On success, returns true, guaranteeing that the callback has/will // not be triggered. On failure, returns false, indicating either that the // callback was already canceled, the callback has already finished // running, or the callback is (about to be) called. bool cancel(); private: boost::asio::deadline_timer m_timer; std::function<void()> m_callback; long m_timeout_interval; std::atomic<bool> m_callback_disabled; void timer_callback(const boost::system::error_code &ec); };
Add missing includes to fix Clang build.
util: Add missing includes to fix Clang build.
C
bsd-3-clause
blindsighttf2/Astron,blindsighttf2/Astron,blindsighttf2/Astron,blindsighttf2/Astron
78256b80780fb1a55effc03622e278df09bdb2b9
src/policy/rbf.h
src/policy/rbf.h
// Copyright (c) 2016-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef SYSCOIN_POLICY_RBF_H #define SYSCOIN_POLICY_RBF_H #include <txmempool.h> enum class RBFTransactionState { UNKNOWN, REPLACEABLE_BIP125, FINAL }; // Determine whether an in-mempool transaction is signaling opt-in to RBF // according to BIP 125 // This involves checking sequence numbers of the transaction, as well // as the sequence numbers of all in-mempool ancestors. RBFTransactionState IsRBFOptIn(const CTransaction& tx, const CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(pool.cs); // SYSCOIN RBFTransactionState IsRBFOptIn(const CTransaction& tx, const CTxMemPool& pool, CTxMemPool::setEntries &setAncestors) EXCLUSIVE_LOCKS_REQUIRED(pool.cs); RBFTransactionState IsRBFOptInEmptyMempool(const CTransaction& tx); #endif // SYSCOIN_POLICY_RBF_H
// Copyright (c) 2016-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef SYSCOIN_POLICY_RBF_H #define SYSCOIN_POLICY_RBF_H #include <txmempool.h> /** The rbf state of unconfirmed transactions */ enum class RBFTransactionState { /** Unconfirmed tx that does not signal rbf and is not in the mempool */ UNKNOWN, /** Either this tx or a mempool ancestor signals rbf */ REPLACEABLE_BIP125, /** Neither this tx nor a mempool ancestor signals rbf */ FINAL, }; /** * Determine whether an unconfirmed transaction is signaling opt-in to RBF * according to BIP 125 * This involves checking sequence numbers of the transaction, as well * as the sequence numbers of all in-mempool ancestors. * * @param tx The unconfirmed transaction * @param pool The mempool, which may contain the tx * * @return The rbf state */ RBFTransactionState IsRBFOptIn(const CTransaction& tx, const CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(pool.cs); // SYSCOIN RBFTransactionState IsRBFOptIn(const CTransaction& tx, const CTxMemPool& pool, CTxMemPool::setEntries &setAncestors) EXCLUSIVE_LOCKS_REQUIRED(pool.cs); RBFTransactionState IsRBFOptInEmptyMempool(const CTransaction& tx); #endif // SYSCOIN_POLICY_RBF_H
Add doxygen comment to IsRBFOptIn
doc: Add doxygen comment to IsRBFOptIn Former-commit-id: 9d51bef94ec279947bd1d28bbbc917d476da2f6e
C
mit
syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin
f4bccc820b62e91af8f9bee26516c28e10476810
Source/Blu/Public/BluManager.h
Source/Blu/Public/BluManager.h
#pragma once #if PLATFORM_WINDOWS #include "AllowWindowsPlatformTypes.h" #endif #include "include/cef_client.h" #include "include/cef_app.h" #if PLATFORM_WINDOWS #include "HideWindowsPlatformTypes.h" #endif class BLU_API BluManager : public CefApp { public: BluManager(); static void doBluMessageLoop(); static CefSettings settings; static CefMainArgs main_args; virtual void OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr< CefCommandLine > command_line) override; IMPLEMENT_REFCOUNTING(BluManager) };
#pragma once #if PLATFORM_WINDOWS #include "AllowWindowsPlatformTypes.h" #endif #include "include/cef_client.h" #include "include/cef_app.h" #if PLATFORM_WINDOWS #include "HideWindowsPlatformTypes.h" #endif class BLU_API BluManager : public CefApp { public: BluManager(); static void doBluMessageLoop(); static CefSettings settings; static CefMainArgs main_args; static bool CPURenderSettings; virtual void OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr< CefCommandLine > command_line) override; IMPLEMENT_REFCOUNTING(BluManager) };
Allow user to pick render settings
Allow user to pick render settings
C
mit
AaronShea/BLUI,AaronShea/BLUI,AaronShea/BLUI,bemon/BLUI,jgagner92/BLUI,brandonwamboldt/BLUI,jgagner92/BLUI,csfinch/BLUI,marcthenarc/BLUI,marcthenarc/BLUI,csfinch/BLUI,csfinch/BLUI,brandonwamboldt/BLUI,bemon/BLUI,brandonwamboldt/BLUI,jgagner92/BLUI,marcthenarc/BLUI,bemon/BLUI
3b45e689708533c3f3ac61b831b8d8a238161ca2
include/core/SkMilestone.h
include/core/SkMilestone.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 SK_MILESTONE #define SK_MILESTONE 74 #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 SK_MILESTONE #define SK_MILESTONE 75 #endif
Update Skia milestone to 75
Update Skia milestone to 75 Bug: skia: Change-Id: I5f682b3685eb68f36e36bf3581d068069af67ba4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198604 Reviewed-by: Heather Miller <[email protected]> Commit-Queue: Heather Miller <[email protected]> Auto-Submit: Heather Miller <[email protected]>
C
bsd-3-clause
rubenvb/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,google/skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,rubenvb/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,google/skia,rubenvb/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,google/skia,rubenvb/skia,google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,rubenvb/skia,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia
16c5392030f8f27d6b41395ccb45194cfbca79ed
tests/regression/13-privatized/32-traces-mine-vs-oplus-vs-meet.c
tests/regression/13-privatized/32-traces-mine-vs-oplus-vs-meet.c
#include <pthread.h> #include <assert.h> int g = 0; pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t C = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { pthread_mutex_lock(&A); pthread_mutex_lock(&C); pthread_mutex_lock(&B); g = 5; pthread_mutex_unlock(&B); pthread_mutex_lock(&B); g = 0; pthread_mutex_unlock(&B); pthread_mutex_unlock(&C); pthread_mutex_unlock(&A); return NULL; } int main(void) { pthread_t id; pthread_create(&id, NULL, t_fun, NULL); pthread_mutex_lock(&A); pthread_mutex_lock(&B); assert(g == 0); pthread_mutex_unlock(&B); pthread_mutex_unlock(&A); pthread_mutex_lock(&B); pthread_mutex_lock(&C); assert(g == 0); pthread_mutex_unlock(&C); pthread_mutex_unlock(&B); pthread_join(id, NULL); return 0; }
#include <pthread.h> #include <assert.h> int g = 0; pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t C = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { pthread_mutex_lock(&A); pthread_mutex_lock(&C); pthread_mutex_lock(&B); g = 5; pthread_mutex_unlock(&B); pthread_mutex_lock(&B); g = 0; pthread_mutex_unlock(&B); pthread_mutex_unlock(&C); pthread_mutex_unlock(&A); return NULL; } int main(void) { pthread_t id; pthread_create(&id, NULL, t_fun, NULL); // This must be before the other to get Mine to fail for the other even with thread ID partitioning. pthread_mutex_lock(&B); pthread_mutex_lock(&C); assert(g == 0); pthread_mutex_unlock(&C); pthread_mutex_unlock(&B); pthread_mutex_lock(&A); pthread_mutex_lock(&B); assert(g == 0); pthread_mutex_unlock(&B); pthread_mutex_unlock(&A); pthread_join(id, NULL); return 0; }
Fix 13/32 to fail Mine even with thread ID partitioning
Fix 13/32 to fail Mine even with thread ID partitioning
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
b1fc4c2cd37d6ea015a016aa80514de1355b4664
win32/PlatWin.h
win32/PlatWin.h
// Scintilla source code edit control /** @file PlatWin.h ** Implementation of platform facilities on Windows. **/ // Copyright 1998-2011 by Neil Hodgson <[email protected]> // The License.txt file describes the conditions under which this software may be distributed. extern bool IsNT(); extern void Platform_Initialise(void *hInstance); extern void Platform_Finalise(); #if defined(_MSC_VER) extern bool LoadD2D(); extern ID2D1Factory *pD2DFactory; extern IDWriteFactory *pIDWriteFactory; #endif
// Scintilla source code edit control /** @file PlatWin.h ** Implementation of platform facilities on Windows. **/ // Copyright 1998-2011 by Neil Hodgson <[email protected]> // The License.txt file describes the conditions under which this software may be distributed. extern bool IsNT(); extern void Platform_Initialise(void *hInstance); extern void Platform_Finalise(); #if defined(USE_D2D) extern bool LoadD2D(); extern ID2D1Factory *pD2DFactory; extern IDWriteFactory *pIDWriteFactory; #endif
Allow choice of D2D on compiler command line.
Allow choice of D2D on compiler command line.
C
isc
R1dO/scintilla_clone,R1dO/scintilla_clone,R1dO/scintilla_clone,R1dO/scintilla_clone,R1dO/scintilla_clone,R1dO/scintilla_clone,R1dO/scintilla_clone,R1dO/scintilla_clone