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
|
---|---|---|---|---|---|---|---|---|---|
bb08463f2b8d1f7b8e325d0c9c35eeaacfb5cde6 | sys/sparc64/include/floatingpoint.h | sys/sparc64/include/floatingpoint.h | /*
* Copyright (c) 2002 David O'Brien <[email protected]>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of any co-contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY DAVID O'BRIEN AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef _FLOATINGPOINT_H_
#define _FLOATINGPOINT_H_
#include <machine/ieeefp.h>
#endif /* !_FLOATINGPOINT_H_ */
| Add this FreeBSD standard header. | Add this FreeBSD standard header.
| 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 |
|
8d3d13e234e4236e9ace7fa753c5946307504cdb | test/Analysis/rdar-6541136-region.c | test/Analysis/rdar-6541136-region.c | // RUN: clang-cc -verify -analyze -checker-cfref -analyzer-store=region %s
// XFAIL
struct tea_cheese { unsigned magic; };
typedef struct tea_cheese kernel_tea_cheese_t;
extern kernel_tea_cheese_t _wonky_gesticulate_cheese;
// This test case exercises the ElementRegion::getRValueType() logic.
void foo( void )
{
kernel_tea_cheese_t *wonky = &_wonky_gesticulate_cheese;
struct load_wine *cmd = (void*) &wonky[1];
cmd = cmd;
char *p = (void*) &wonky[1];
*p = 1;
kernel_tea_cheese_t *q = &wonky[1];
kernel_tea_cheese_t r = *q; // expected-warning{{out-of-bound memory position}}
}
| // RUN: clang-cc -verify -analyze -checker-cfref -analyzer-store=region %s
struct tea_cheese { unsigned magic; };
typedef struct tea_cheese kernel_tea_cheese_t;
extern kernel_tea_cheese_t _wonky_gesticulate_cheese;
// This test case exercises the ElementRegion::getRValueType() logic.
void foo( void )
{
kernel_tea_cheese_t *wonky = &_wonky_gesticulate_cheese;
struct load_wine *cmd = (void*) &wonky[1];
cmd = cmd;
char *p = (void*) &wonky[1];
*p = 1;
kernel_tea_cheese_t *q = &wonky[1];
kernel_tea_cheese_t r = *q; // expected-warning{{out-of-bound memory position}}
}
| Test now passes. I'll hold off merging it with the BasicStore test until we know this is a stable change. | Test now passes. I'll hold off merging it with the BasicStore test until we know this is a stable change.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@70837 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang |
ec44f6427bce56ef92dff2ef208f41686c69be0e | nrf5/boards/microbit/nrf51_hal_conf.h | nrf5/boards/microbit/nrf51_hal_conf.h | #ifndef NRF51_HAL_CONF_H__
#define NRF51_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
#define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
#define HAL_RTC_MODULE_ENABLED
#define HAL_TIMER_MODULE_ENABLED
#endif // NRF51_HAL_CONF_H__
| #ifndef NRF51_HAL_CONF_H__
#define NRF51_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
// #define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
// #define HAL_RTC_MODULE_ENABLED
// #define HAL_TIMER_MODULE_ENABLED
#endif // NRF51_HAL_CONF_H__
| Disable SPI/Timer/RTC hal from microbit board. | nrf5/boards: Disable SPI/Timer/RTC hal from microbit board.
| C | mit | tralamazza/micropython,tralamazza/micropython,tralamazza/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,tralamazza/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython |
98d89f39e8c930e280c1d68a0749ce79c0a67c65 | src/acc.c | src/acc.c | /* +
*/
#include "dpl/acc.h"
#include "dpl/defs.h"
#include "dpl/utils.h"
int dpl_acc_durance (DplIter *iter, time_t *dur)
{
DplEntry *task;
*dur = 0;
time_t begin, end;
while (dpl_iter_next (iter, &task) == DPL_OK) {
dpl_entry_begin_get (task, &begin);
DPL_FORWARD_ERROR (dpl_entry_work_end_get (task, &end));
*dur += (end - begin);
}
return DPL_OK;
}
| /* +
*/
#include "dpl/acc.h"
#include "dpl/defs.h"
#include "dpl/utils.h"
int dpl_acc_durance (DplIter *iter, time_t *dur)
{
const DplEntry *task;
*dur = 0;
time_t begin, end;
while (dpl_iter_next (iter, &task) == DPL_OK) {
dpl_entry_begin_get (task, &begin);
DPL_FORWARD_ERROR (dpl_entry_work_end_get (task, &end));
*dur += (end - begin);
}
return DPL_OK;
}
| Fix constness to avoid a compiler warning. | Fix constness to avoid a compiler warning.
Fixes #39.
| C | bsd-2-clause | pyohannes/dayplan,pyohannes/dayplan |
2d3fb89f05d62306694fb4d2a9e45de86e737b0d | numpy/core/src/multiarray/convert_datatype.h | numpy/core/src/multiarray/convert_datatype.h | #ifndef _NPY_ARRAY_CONVERT_DATATYPE_H_
#define _NPY_ARRAY_CONVERT_DATATYPE_H_
NPY_NO_EXPORT PyObject *
PyArray_CastToType(PyArrayObject *mp, PyArray_Descr *at, int fortran);
#endif
| #ifndef _NPY_ARRAY_CONVERT_DATATYPE_H_
#define _NPY_ARRAY_CONVERT_DATATYPE_H_
NPY_NO_EXPORT PyObject *
PyArray_CastToType(PyArrayObject *mp, PyArray_Descr *at, int fortran);
NPY_NO_EXPORT int
PyArray_CastTo(PyArrayObject *out, PyArrayObject *mp);
NPY_NO_EXPORT PyArray_VectorUnaryFunc *
PyArray_GetCastFunc(PyArray_Descr *descr, int type_num);
NPY_NO_EXPORT int
PyArray_CanCastSafely(int fromtype, int totype);
NPY_NO_EXPORT Bool
PyArray_CanCastTo(PyArray_Descr *from, PyArray_Descr *to);
NPY_NO_EXPORT int
PyArray_ObjectType(PyObject *op, int minimum_type);
NPY_NO_EXPORT PyArrayObject **
PyArray_ConvertToCommonType(PyObject *op, int *retn);
NPY_NO_EXPORT int
PyArray_ValidType(int type);
#endif
| Add API for datatype conversion. | Add API for datatype conversion.
git-svn-id: 77a43f9646713b91fea7788fad5dfbf67e151ece@6920 94b884b6-d6fd-0310-90d3-974f1d3f35e1
| C | bsd-3-clause | Ademan/NumPy-GSoC,chadnetzer/numpy-gaurdro,teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint,illume/numpy3k,Ademan/NumPy-GSoC,teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint,teoliphant/numpy-refactor,Ademan/NumPy-GSoC,illume/numpy3k,efiring/numpy-work,efiring/numpy-work,jasonmccampbell/numpy-refactor-sprint,Ademan/NumPy-GSoC,efiring/numpy-work,chadnetzer/numpy-gaurdro,efiring/numpy-work,illume/numpy3k,teoliphant/numpy-refactor,chadnetzer/numpy-gaurdro,chadnetzer/numpy-gaurdro,illume/numpy3k,teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint |
484f8ae37bf516a63ba67ec004ac5acf33f98a9f | src/UpdateDialogWin32.h | src/UpdateDialogWin32.h | #pragma once
#include "Platform.h"
#include "UpdateMessage.h"
#include "UpdateObserver.h"
#include "wincore.h"
#include "controls.h"
#include "stdcontrols.h"
class UpdateDialogWin32 : public UpdateDialog
{
public:
UpdateDialogWin32();
~UpdateDialogWin32();
// implements UpdateDialog
virtual void init(int argc, char** argv);
virtual void exec();
virtual void quit();
// implements UpdateObserver
virtual void updateError(const std::string& errorMessage);
virtual void updateProgress(int percentage);
virtual void updateFinished();
LRESULT WINAPI windowProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam);
private:
void installWindowProc(CWnd* window);
CWinApp m_app;
CWnd m_window;
CStatic m_progressLabel;
CProgressBar m_progressBar;
CButton m_finishButton;
bool m_hadError;
};
| #pragma once
#include "Platform.h"
#include "UpdateDialog.h"
#include "UpdateMessage.h"
#include "wincore.h"
#include "controls.h"
#include "stdcontrols.h"
class UpdateDialogWin32 : public UpdateDialog
{
public:
UpdateDialogWin32();
~UpdateDialogWin32();
// implements UpdateDialog
virtual void init(int argc, char** argv);
virtual void exec();
virtual void quit();
// implements UpdateObserver
virtual void updateError(const std::string& errorMessage);
virtual void updateProgress(int percentage);
virtual void updateFinished();
LRESULT WINAPI windowProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam);
private:
void installWindowProc(CWnd* window);
CWinApp m_app;
CWnd m_window;
CStatic m_progressLabel;
CProgressBar m_progressBar;
CButton m_finishButton;
bool m_hadError;
};
| Fix Win32 build - add missing include | Fix Win32 build - add missing include
| C | bsd-2-clause | zhengw1985/Update-Installer,zhengw1985/Update-Installer,zhengw1985/Update-Installer |
34738e9bc5e98c15f60e9e9cf2612cb116fd2202 | snake.c | snake.c | #include <stdlib.h>
/**
* @author: Hendrik Werner
*/
typedef struct Position {
int row;
int col;
} Position;
int main() {
return EXIT_SUCCESS;
}
| #include <stdlib.h>
/**
* @author: Hendrik Werner
*/
#define BOARD_HEIGHT 50
#define BOARD_WIDTH 50
typedef struct Position {
int row;
int col;
} Position;
int main() {
return EXIT_SUCCESS;
}
| Define the board height and width. | Define the board height and width.
| C | mit | Hendrikto/Snake |
72467b21e9d8dced87245dda0aaef49c8965345a | cpp/include/phevaluator/hand.h | cpp/include/phevaluator/hand.h | #ifndef PHEVALUATOR_HAND_H
#define PHEVALUATOR_HAND_H
#ifdef __cplusplus
#include <vector>
#include <array>
#include <string>
#include "card.h"
namespace phevaluator {
class Hand {
public:
Hand() {}
Hand(const std::vector<Card>& cards);
Hand(const Card& card);
Hand& operator+=(const Card& card);
Hand operator+(const Card& card);
const unsigned char& getSize() const { return size_; }
const int& getSuitHash() const { return suitHash_; }
const std::array<int, 4>& getSuitBinary() const { return suitBinary_; }
const std::array<unsigned char, 13> getQuinary() const { return quinary_; }
private:
unsigned char size_ = 0;
int suitHash_ = 0;
std::array<int, 4> suitBinary_{0};
std::array<unsigned char, 13> quinary_{0};
};
} // namespace phevaluator
#endif // __cplusplus
#endif // PHEVALUATOR_HAND_H
| #ifndef PHEVALUATOR_HAND_H
#define PHEVALUATOR_HAND_H
#ifdef __cplusplus
#include <vector>
#include <array>
#include <string>
#include "card.h"
namespace phevaluator {
class Hand {
public:
Hand() {}
Hand(const std::vector<Card>& cards);
Hand(const Card& card);
Hand& operator+=(const Card& card);
Hand operator+(const Card& card);
const unsigned char& getSize() const { return size_; }
const int& getSuitHash() const { return suitHash_; }
const std::array<int, 4>& getSuitBinary() const { return suitBinary_; }
const std::array<unsigned char, 13> getQuinary() const { return quinary_; }
private:
unsigned char size_ = 0;
int suitHash_ = 0;
std::array<int, 4> suitBinary_{{0}};
std::array<unsigned char, 13> quinary_{{0}};
};
} // namespace phevaluator
#endif // __cplusplus
#endif // PHEVALUATOR_HAND_H
| Fix a Hand type compiling errors in GNU compiler | Fix a Hand type compiling errors in GNU compiler
| C | apache-2.0 | HenryRLee/PokerHandEvaluator,HenryRLee/PokerHandEvaluator,HenryRLee/PokerHandEvaluator |
4e991f46323ca1b6e0097e661812f1ff61852ce5 | src/Mobs/AggressiveMonster.h | src/Mobs/AggressiveMonster.h |
#pragma once
#include "Monster.h"
class cAggressiveMonster :
public cMonster
{
typedef cMonster super;
public:
cAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height);
virtual void Tick (std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
virtual void InStateChasing(std::chrono::milliseconds a_Dt) override;
virtual void EventSeePlayer(cEntity *) override;
virtual bool Attack(std::chrono::milliseconds a_Dt);
} ;
|
#pragma once
#include "Monster.h"
class cAggressiveMonster :
public cMonster
{
typedef cMonster super;
public:
cAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height);
virtual void Tick (std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
virtual void InStateChasing(std::chrono::milliseconds a_Dt) override;
virtual void EventSeePlayer(cEntity *) override;
/** Try to perform attack
returns true if attack was deemed successful (hit player, fired projectile, creeper exploded, etc.) even if it didn't actually do damage
return false if e.g. the mob is still in cooldown from a previous attack */
virtual bool Attack(std::chrono::milliseconds a_Dt);
} ;
| Add comment to Attack() return values | Add comment to Attack() return values | C | apache-2.0 | QUSpilPrgm/cuberite,birkett/MCServer,SamOatesPlugins/cuberite,ionux/MCServer,bendl/cuberite,Fighter19/cuberite,marvinkopf/cuberite,SamOatesPlugins/cuberite,Altenius/cuberite,Schwertspize/cuberite,birkett/cuberite,SamOatesPlugins/cuberite,marvinkopf/cuberite,SamOatesPlugins/cuberite,QUSpilPrgm/cuberite,Schwertspize/cuberite,HelenaKitty/EbooMC,kevinr/cuberite,tonibm19/cuberite,QUSpilPrgm/cuberite,ionux/MCServer,Frownigami1/cuberite,birkett/cuberite,bendl/cuberite,kevinr/cuberite,bendl/cuberite,Altenius/cuberite,SamOatesPlugins/cuberite,nounoursheureux/MCServer,Haxi52/cuberite,nounoursheureux/MCServer,Haxi52/cuberite,tonibm19/cuberite,Frownigami1/cuberite,marvinkopf/cuberite,mc-server/MCServer,QUSpilPrgm/cuberite,ionux/MCServer,birkett/cuberite,mc-server/MCServer,Schwertspize/cuberite,birkett/MCServer,birkett/cuberite,Fighter19/cuberite,marvinkopf/cuberite,Haxi52/cuberite,mc-server/MCServer,birkett/MCServer,ionux/MCServer,Frownigami1/cuberite,HelenaKitty/EbooMC,tonibm19/cuberite,nounoursheureux/MCServer,birkett/cuberite,johnsoch/cuberite,Haxi52/cuberite,Fighter19/cuberite,Fighter19/cuberite,HelenaKitty/EbooMC,nounoursheureux/MCServer,tonibm19/cuberite,kevinr/cuberite,bendl/cuberite,johnsoch/cuberite,bendl/cuberite,marvinkopf/cuberite,Altenius/cuberite,birkett/MCServer,ionux/MCServer,mc-server/MCServer,Altenius/cuberite,Frownigami1/cuberite,Schwertspize/cuberite,Frownigami1/cuberite,birkett/cuberite,mc-server/MCServer,QUSpilPrgm/cuberite,birkett/MCServer,Fighter19/cuberite,Fighter19/cuberite,birkett/MCServer,nounoursheureux/MCServer,Schwertspize/cuberite,kevinr/cuberite,HelenaKitty/EbooMC,Haxi52/cuberite,johnsoch/cuberite,QUSpilPrgm/cuberite,johnsoch/cuberite,kevinr/cuberite,nounoursheureux/MCServer,Altenius/cuberite,tonibm19/cuberite,kevinr/cuberite,tonibm19/cuberite,marvinkopf/cuberite,HelenaKitty/EbooMC,mc-server/MCServer,Haxi52/cuberite,ionux/MCServer,johnsoch/cuberite |
26b937b2a349e9e6b294703232af264af7e277c4 | drivers/scsi/qla4xxx/ql4_version.h | drivers/scsi/qla4xxx/ql4_version.h | /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2010 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k12"
| /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2010 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k13"
| Update driver version to 5.02.00-k13 | [SCSI] qla4xxx: Update driver version to 5.02.00-k13
Signed-off-by: Vikas Chaudhary <[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,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas |
9617d0d65b4c9bcc6513d1aa6cca537713f178c6 | SSPSolution/SSPSolution/DoorEntity.h | SSPSolution/SSPSolution/DoorEntity.h | #ifndef SSPAPPLICATION_ENTITIES_DOORENTITY_H
#define SSPAPPLICATION_ENTITIES_DOORENTITY_H
#include "Entity.h"
#include <vector>
struct DoorSyncState {
int entityID;
bool isOpened;
};
struct ElementState {
int entityID;
EVENT desiredState;
bool desiredStateReached;
};
class DoorEntity :
public Entity
{
private:
std::vector<ElementState> m_subjectStates;
bool m_isOpened;
float m_minRotation;
float m_maxRotation;
float m_rotateTime;
float m_rotatePerSec;
bool m_needSync;
public:
DoorEntity();
virtual ~DoorEntity();
int Initialize(int entityID, PhysicsComponent* pComp, GraphicsComponent* gComp, std::vector<ElementState> subjectStates, float rotateTime = 1.0f, float minRotation = 0.0f, float maxRotation = DirectX::XM_PI / 2.0f);
int Update(float dT, InputHandler* inputHandler);
int React(int entityID, EVENT reactEvent);
bool SetIsOpened(bool isOpened);
bool GetIsOpened();
};
#endif | #ifndef SSPAPPLICATION_ENTITIES_DOORENTITY_H
#define SSPAPPLICATION_ENTITIES_DOORENTITY_H
#include "Entity.h"
#include <vector>
struct ElementState {
int entityID;
EVENT desiredState;
bool desiredStateReached;
};
class DoorEntity :
public Entity
{
private:
std::vector<ElementState> m_subjectStates;
bool m_isOpened;
float m_minRotation;
float m_maxRotation;
float m_rotateTime;
float m_rotatePerSec;
bool m_needSync;
public:
DoorEntity();
virtual ~DoorEntity();
int Initialize(int entityID, PhysicsComponent* pComp, GraphicsComponent* gComp, std::vector<ElementState> subjectStates, float rotateTime = 1.0f, float minRotation = 0.0f, float maxRotation = DirectX::XM_PI / 2.0f);
int Update(float dT, InputHandler* inputHandler);
int React(int entityID, EVENT reactEvent);
bool SetIsOpened(bool isOpened);
bool GetIsOpened();
};
#endif | REMOVE syns state from Door | REMOVE syns state from Door
We will only sync actuators such as levers, buttons and wheels
| C | apache-2.0 | Chringo/SSP,Chringo/SSP |
915aab643788b8b8f0a366fefe9487e4d0e80928 | arduino/OpenROV/Motors.h | arduino/OpenROV/Motors.h | #ifndef __MOTORS_H_
#define __MOTORS_H_
#include <Servo.h>
#define MIDPOINT 128
class Motors {
private:
Servo port, vertical, starbord;
int port_pin, vertical_pin, starbord_pin;
public:
Motors(int p_pin, int v_pin, int s_pin);
void reset();
void go(int p, int v, int s);
void stop();
};
#endif
| #ifndef __MOTORS_H_
#define __MOTORS_H_
#include <Servo.h>
#define MIDPOINT 90
class Motors {
private:
Servo port, vertical, starbord;
int port_pin, vertical_pin, starbord_pin;
public:
Motors(int p_pin, int v_pin, int s_pin);
void reset();
void go(int p, int v, int s);
void stop();
};
#endif
| Set MIDPOINT to 90 instead of 128 (servo lib goes from 0 to 180) | Set MIDPOINT to 90 instead of 128 (servo lib goes from 0 to 180)
| C | mit | codewithpassion/openrov-software,BrianAdams/openrov-software,LeeCheongAh/openrov-software,bmvakili/openrov-software,ChangerR/burrito-cockpid,MysteriousChanger/burrito-cockpid,codewithpassion/openrov-software,bmvakili/openrov-software,bmvakili/openrov-software,BrianAdams/openrov-software,codewithpassion/openrov-software,MysteriousChanger/burrito-cockpid,BrianAdams/openrov-software,bmvakili/openrov-software,bmvakili/openrov-software,ZonaElka/testOpenROV,ChangerR/burrito-cockpid,ZonaElka/testOpenROV,MysteriousChanger/burrito-cockpid,BrianAdams/openrov-software,LeeCheongAh/openrov-software,codewithpassion/openrov-software,ZonaElka/testOpenROV,ChangerR/burrito-cockpid |
bd0266ffdcb0b9debbe3dea7e3f07f54500af8c3 | opencog/atoms/base/types.h | opencog/atoms/base/types.h | /*
* opencog/atoms/base/types.h
*
* Copyright (C) 2002-2007 Novamente LLC
* All Rights Reserved
*
* Written by Thiago Maia <[email protected]>
* Andre Senna <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License v3 as
* published by the Free Software Foundation and including the exceptions
* at http://opencog.org/wiki/Licenses
*
* 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 Affero General Public License
* along with this program; if not, write to:
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/**
* basic type definitions.
*/
#ifndef _OPENCOG_TYPES_H
#define _OPENCOG_TYPES_H
namespace opencog
{
/** \addtogroup grp_atomspace
* @{
*/
//! type of Atoms, represented as short integer (16 bits)
typedef unsigned short Type;
/** @}*/
} // namespace opencog
#endif // _OPENCOG_TYPES_H
| /*
* opencog/atoms/base/types.h
*
* Copyright (C) 2002-2007 Novamente LLC
* All Rights Reserved
*
* Written by Thiago Maia <[email protected]>
* Andre Senna <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License v3 as
* published by the Free Software Foundation and including the exceptions
* at http://opencog.org/wiki/Licenses
*
* 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 Affero General Public License
* along with this program; if not, write to:
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/**
* basic type definitions.
*/
#ifndef _OPENCOG_TYPES_H
#define _OPENCOG_TYPES_H
#include <set>
namespace opencog
{
/** \addtogroup grp_atomspace
* @{
*/
//! type of Atoms, represented as short integer (16 bits)
typedef unsigned short Type;
//! Set of atom types
typedef std::set<Type> TypeSet;
/** @}*/
} // namespace opencog
#endif // _OPENCOG_TYPES_H
| Add TypeSet type as set of Types | Add TypeSet type as set of Types
| C | agpl-3.0 | AmeBel/atomspace,rTreutlein/atomspace,misgeatgit/atomspace,rTreutlein/atomspace,AmeBel/atomspace,AmeBel/atomspace,misgeatgit/atomspace,misgeatgit/atomspace,AmeBel/atomspace,misgeatgit/atomspace,rTreutlein/atomspace,rTreutlein/atomspace,misgeatgit/atomspace,rTreutlein/atomspace,AmeBel/atomspace |
392d0f8f721d86dfd0032695b6903d1299814221 | targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_EP_ATLAS/atlas_init.c | targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_EP_ATLAS/atlas_init.c | /* mbed Microcontroller Library
* Copyright (c) 2021 ARM Limited
* Copyright (c) 2021 Embedded Planet, Inc.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdint.h>
#include "subtarget_init.h"
#include "nrf.h"
/**
* Override the subtarget sdk init startup hook (specific to nRF2)
* This will configure the internal regulator to operate at 3.3V
*/
void subtarget_sdk_init(void) {
if (NRF_UICR->REGOUT0 != UICR_REGOUT0_VOUT_3V3)
{
NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos;
while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
NRF_UICR->REGOUT0 = UICR_REGOUT0_VOUT_3V3;
NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos;
while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
// Trigger a soft reset so that the settings take effect
NVIC_SystemReset();
}
}
| Configure internal regulators at startup | Configure internal regulators at startup
This commit introduces an implementation of the `subtarget_sdk_init` startup hook (called during `mbed_sdk_init`) that configures the internal regulators of the nRF52840.
The configuration sets up the internal regulator to output 3.3V. If this is not done, the default system voltage may be too low for the on-board indicator LEDs to conduct (ie: system voltage is lower than LED forward voltage).
| C | apache-2.0 | mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed |
|
7a895c7cd2784c10e6922b16925797b18839d6b3 | tensorflow/lite/micro/micro_error_reporter.h | tensorflow/lite/micro/micro_error_reporter.h | /* Copyright 2018 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_LITE_MICRO_MICRO_ERROR_REPORTER_H_
#define TENSORFLOW_LITE_MICRO_MICRO_ERROR_REPORTER_H_
#include "tensorflow/lite/core/api/error_reporter.h"
#include "tensorflow/lite/micro/compatibility.h"
#include "tensorflow/lite/micro/debug_log.h"
namespace tflite {
class MicroErrorReporter : public ErrorReporter {
public:
~MicroErrorReporter() {}
int Report(const char* format, va_list args) override;
private:
TF_LITE_REMOVE_VIRTUAL_DELETE
};
} // namespace tflite
#endif // TENSORFLOW_LITE_MICRO_MICRO_ERROR_REPORTER_H_
| /* Copyright 2018 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_LITE_MICRO_MICRO_ERROR_REPORTER_H_
#define TENSORFLOW_LITE_MICRO_MICRO_ERROR_REPORTER_H_
#include "tensorflow/lite/core/api/error_reporter.h"
#include "tensorflow/lite/micro/compatibility.h"
#include "tensorflow/lite/micro/debug_log.h"
namespace tflite {
class MicroErrorReporter : public ErrorReporter {
public:
~MicroErrorReporter() override {}
int Report(const char* format, va_list args) override;
private:
TF_LITE_REMOVE_VIRTUAL_DELETE
};
} // namespace tflite
#endif // TENSORFLOW_LITE_MICRO_MICRO_ERROR_REPORTER_H_
| Add override specifier to the destructor. | Add override specifier to the destructor.
PiperOrigin-RevId: 306301066
Change-Id: Ied92a889ee7af2d0e9a420d55aa503c31b4eba92
| C | apache-2.0 | petewarden/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,annarev/tensorflow,annarev/tensorflow,yongtang/tensorflow,gunan/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,cxxgtxy/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,freedomtan/tensorflow,paolodedios/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gunan/tensorflow,davidzchen/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,gunan/tensorflow,davidzchen/tensorflow,yongtang/tensorflow,sarvex/tensorflow,gunan/tensorflow,annarev/tensorflow,yongtang/tensorflow,Intel-Corporation/tensorflow,freedomtan/tensorflow,Intel-Corporation/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,gautam1858/tensorflow,aldian/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,petewarden/tensorflow,gautam1858/tensorflow,petewarden/tensorflow,karllessard/tensorflow,davidzchen/tensorflow,Intel-tensorflow/tensorflow,davidzchen/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aldian/tensorflow,cxxgtxy/tensorflow,gautam1858/tensorflow,Intel-Corporation/tensorflow,cxxgtxy/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,gunan/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,petewarden/tensorflow,karllessard/tensorflow,frreiss/tensorflow-fred,freedomtan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,sarvex/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow,aldian/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,sarvex/tensorflow,gunan/tensorflow,petewarden/tensorflow,freedomtan/tensorflow,karllessard/tensorflow,aldian/tensorflow,aam-at/tensorflow,yongtang/tensorflow,aam-at/tensorflow,aldian/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,karllessard/tensorflow,yongtang/tensorflow,frreiss/tensorflow-fred,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,sarvex/tensorflow,karllessard/tensorflow,Intel-tensorflow/tensorflow,gunan/tensorflow,karllessard/tensorflow,Intel-Corporation/tensorflow,gunan/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,Intel-Corporation/tensorflow,davidzchen/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,cxxgtxy/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,frreiss/tensorflow-fred,aldian/tensorflow,paolodedios/tensorflow,aam-at/tensorflow,freedomtan/tensorflow,annarev/tensorflow,petewarden/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aam-at/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,Intel-tensorflow/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,aldian/tensorflow,sarvex/tensorflow,cxxgtxy/tensorflow,aam-at/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,aldian/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,davidzchen/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,gunan/tensorflow,annarev/tensorflow,annarev/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,annarev/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,frreiss/tensorflow-fred,gunan/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow,gautam1858/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,freedomtan/tensorflow,petewarden/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,aam-at/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,sarvex/tensorflow,tensorflow/tensorflow,aam-at/tensorflow,aam-at/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,freedomtan/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,cxxgtxy/tensorflow,freedomtan/tensorflow,frreiss/tensorflow-fred,cxxgtxy/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,annarev/tensorflow,paolodedios/tensorflow,gunan/tensorflow,frreiss/tensorflow-fred,freedomtan/tensorflow,gunan/tensorflow |
f1a8fe7f74bd7617d66471f221643466d57d115a | testmud/mud/home/Game/sys/bin/wiz/tool/flash.c | testmud/mud/home/Game/sys/bin/wiz/tool/flash.c | #include <kotaka/paths.h>
#include <game/paths.h>
#include <kotaka/log.h>
inherit LIB_WIZBIN;
atomic void main(string args)
{
proxy_call("destruct_object", args);
proxy_call("compile_object", args);
}
| Allow hard reset of an object by destructing and recreating | Allow hard reset of an object by destructing and recreating
| C | agpl-3.0 | shentino/kotaka,shentino/kotaka,shentino/kotaka |
|
d9ec8b1cf5e350939dc3642e1e4df2813e63716b | Tick.h | Tick.h | #pragma once
#include <chrono>
#include <functional>
#include <thread>
#include <atomic>
class Tick
{
public:
Tick(std::chrono::microseconds timeBetweenTicks,
std::function<void()>&& onTick)
: timeBetweenTicks_(timeBetweenTicks)
, onTick_(std::move(onTick))
, active_(true)
, timerThread_([this] { Loop(); }) // note initialization order is very important here;
// thread should start last
{}
void Deactivate() { active_ = false; timerThread_.join(); }
private:
void Loop() const
{
while (active_)
{
for (auto start = std::chrono::steady_clock::now(), now = start;
now < start + timeBetweenTicks_;
now = std::chrono::high_resolution_clock::now()) { /* Until next tick */
}
onTick_(); // may take significant time!
}
}
const std::function<void()> onTick_;
const std::chrono::microseconds timeBetweenTicks_;
std::atomic<bool> active_;
std::thread timerThread_;
};
| #pragma once
#include <chrono>
#include <functional>
#include <thread>
#include <atomic>
using Clock = std::chrono::steady_clock;
class Tick
{
public:
Tick(std::chrono::microseconds timeBetweenTicks,
std::function<void()>&& onTick)
: timeBetweenTicks_(timeBetweenTicks)
, onTick_(std::move(onTick))
, active_(true)
, timerThread_([this] { Loop(); }) // note initialization order is very important here;
// thread should start last
{}
void Deactivate() { active_ = false; timerThread_.join(); }
private:
void Loop() const
{
while (active_)
{
for (auto start = Clock::now(), now = start;
now < start + timeBetweenTicks_;
now = Clock::now()) { /* Until next tick */
}
onTick_(); // may take significant time!
}
}
const std::function<void()> onTick_;
const std::chrono::microseconds timeBetweenTicks_;
std::atomic<bool> active_;
std::thread timerThread_;
};
| Fix incorrect usage of 2 different clocks to a single uniform clock | Fix incorrect usage of 2 different clocks to a single uniform clock
| C | mit | 4sily/rate-limiter-cpp,4sily/rate-limiter-cpp |
ea58504e5d3e1f394f46798805cfb5950b8a4a9d | Cube.h | Cube.h | #ifndef CUBE_H
#define CUBE_H
#include "stdafx.h"
using namespace std;
class Cube
{
public:
typedef float * Array;
//static
int locAmbient, locDiffuse, locSpecular, locEyeLight, locLight, locTexture;
//static
int locMVP, locMV, locNM;
int numFrame;
GLuint shader, textureID;
static bool readTexture;//, readShader;
Array final_vert, final_text, norm_final;
GLuint vertbuffID[1], normbuffID[1], texbuffID[1];
int total, vsize, nsize, tsize;
Cube(void);
static GLuint loadShaderPair(char *, char *);
void init(float[]);
void bind(GLenum, GLenum);
void draw(GLGeometryTransform);
};
#endif | #ifndef CUBE_H
#define CUBE_H
#include "stdafx.h"
using namespace std;
class Cube
{
public:
typedef float * Array;
static int locAmbient, locDiffuse, locSpecular, locEyeLight, locLight, locTexture;
static int locMVP, locMV, locNM;
int numFrame;
static GLuint shader, textureID;
static bool readTexture, readShader;
Array final_vert, final_text, norm_final;
GLuint vertbuffID[1], normbuffID[1], texbuffID[1];
int total, vsize, nsize, tsize;
Cube(void);
static GLuint loadShaderPair(char *, char *);
void init(float[]);
void bind(GLenum, GLenum);
void draw(GLGeometryTransform);
};
#endif | Reduce Even More Memory Usage | Reduce Even More Memory Usage
| C | mit | diwgan32/Maze,diwgan32/Maze |
31a4b718bc20f7155397ecb29f1d5e10cd592b23 | tests/test_utils.h | tests/test_utils.h | #ifndef TEST_UTILS_H
#define TEST_UTILS_H
#include <fplll.h>
using namespace std;
using namespace fplll;
/**
@brief Read matrix from `input_filename`.
@param A matrix
@param input_filename
@return zero if the file is correctly read, 1 otherwise.
*/
template <class ZT> int read_matrix(ZZ_mat<ZT> &A, const char *input_filename)
{
int status = 0;
ifstream is(input_filename);
if (!is)
{
status = 1;
cerr << "Could not open file " << input_filename << "." << endl;
} // throw std::runtime_error("could not open input file");
is >> A;
return status;
}
/**
@brief Read vector from `input_filename` into `b`.
@param b vector
@param input_filename filename
@return zero if the file is correctly read, 1 otherwise.
*/
template <class ZT> int read_vector(vector<Z_NR<ZT>> &b, const char *input_filename)
{
int status = 0;
ifstream is;
is.exceptions(std::ifstream::failbit | std::ifstream::badbit);
try {
is.open(input_filename);
is >> b;
is.close();
}
catch (ifstream::failure e) {
status = 1;
cerr << "Error by reading " << input_filename << "." << endl;
}
return status;
}
#endif /* TEST_UTILS_H */
| #ifndef TEST_UTILS_H
#define TEST_UTILS_H
#include <fplll.h>
using namespace std;
using namespace fplll;
#define read_file(X, input_filename) {\
ifstream is;\
is.exceptions(std::ifstream::failbit | std::ifstream::badbit);\
try {\
is.open(input_filename);\
is >> X;\
is.close();\
}\
catch (const ifstream::failure&) {\
status = 1;\
cerr << "Error by reading " << input_filename << "." << endl;\
}\
}
/**
@brief Read matrix from `input_filename`.
@param A matrix
@param input_filename
@return zero if the file is correctly read, 1 otherwise.
*/
template <class ZT> int read_matrix(ZZ_mat<ZT> &A, const char *input_filename)
{
int status = 0;
read_file(A, input_filename);
return status;
}
/**
@brief Read vector from `input_filename` into `b`.
@param b vector
@param input_filename filename
@return zero if the file is correctly read, 1 otherwise.
*/
template <class ZT> int read_vector(vector<Z_NR<ZT>> &b, const char *input_filename)
{
int status = 0;
read_file(b, input_filename);
return status;
}
#endif /* TEST_UTILS_H */
| Remove Wcatch-value and unify way to check if files are read. | Remove Wcatch-value and unify way to check if files are read.
| C | lgpl-2.1 | fplll/fplll,dstehle/fplll,fplll/fplll,dstehle/fplll,cr-marcstevens/fplll,fplll/fplll,fplll/fplll,fplll/fplll,cr-marcstevens/fplll,dstehle/fplll,cr-marcstevens/fplll,cr-marcstevens/fplll |
e06efffe9b422274ba4e256a010a483efb59038c | include/psp2kern/gpu_es4.h | include/psp2kern/gpu_es4.h | /**
* \kernelgroup{SceGpuEs4}
* \usage{psp2kern/gpu_es4.h,SceGpuEs4ForDriver}
*/
#ifndef _PSP2_KERNEL_GPU_ES4_
#define _PSP2_KERNEL_GPU_ES4_
#include <psp2kern/types.h>
#ifdef __cplusplus
extern "C" {
#endif
int PVRSRVGetMiscInfoKM(void *info);
int ksceGpuGetRegisterDump(void *dst, SceSize size);
#ifdef __cplusplus
}
#endif
#endif /* _PSP2_KERNEL_GPU_ES4_ */
| /**
* \kernelgroup{SceGpuEs4}
* \usage{psp2kern/gpu_es4.h,SceGpuEs4ForDriver}
*/
#ifndef _PSP2_KERNEL_GPU_ES4_
#define _PSP2_KERNEL_GPU_ES4_
#include <psp2kern/types.h>
#ifdef __cplusplus
extern "C" {
#endif
int PVRSRVGetMiscInfoKM(void *info);
int ksceGpuGetRegisterDump(void *dst, SceSize size);
int ksceGpuMmuMapMemory(void *mmuContext, uint32_t vaddr, void *base, uint32_t size, uint32_t flags);
int ksceGpuMmuUnmapMemory(void *mmuContext, uint32_t vaddr, uint32_t size);
#ifdef __cplusplus
}
#endif
#endif /* _PSP2_KERNEL_GPU_ES4_ */
| Add prototypes for SceGpu MMU functions | Add prototypes for SceGpu MMU functions
| C | mit | vitasdk/vita-headers,Rinnegatamante/vita-headers,Rinnegatamante/vita-headers,vitasdk/vita-headers,Rinnegatamante/vita-headers,vitasdk/vita-headers,Rinnegatamante/vita-headers,vitasdk/vita-headers |
4055a7c2fceb6eb2b2e8014b96e70ac6bdc2310c | nqmq.c | nqmq.c | #include "string.h"
#include "stdio.h"
#include "stdlib.h"
#define DATA_FILE_NAME "nqmq.dat"
#define DATA_LINE_MAX_LEN 80
char **cities;
char *distances;
int main(int argc, char *argv[])
{
// Step 1: Read file into cities array and distances adjacency matrix
char line[DATA_LINE_MAX_LEN];
FILE *data_file;
data_file = fopen(DATA_FILE_NAME, "r");
// The first line will be the number of cities
fgets(line, DATA_LINE_MAX_LEN, data_file);
int num_cities = atoi(line);
// Allocate space for the city names
cities = malloc(sizeof(char*) * num_cities);
// Read in all cities
for (int i = 0; i < num_cities; ++i)
{
fgets(line, DATA_LINE_MAX_LEN, data_file);
cities[i] = malloc(strlen(line) * sizeof(char));
strcpy(cities[i], line);
}
// Clean things up
for (int i = 0; i < num_cities; ++i)
free(cities[i]);
free(cities);
return 0;
}
| #include "string.h"
#include "stdio.h"
#include "stdlib.h"
#define DATA_FILE_NAME "nqmq.dat"
#define DATA_LINE_MAX_LEN 80
char **cities;
char *distances;
int main(int argc, char *argv[])
{
// Step 1: Read file into cities array and distances adjacency matrix
char line[DATA_LINE_MAX_LEN];
FILE *data_file;
int num_cities = 0;
data_file = fopen(DATA_FILE_NAME, "r");
// The first line will be the number of cities
fscanf(data_file, "%d", &num_cities);
// Allocate space for the city names
cities = malloc(sizeof(char*) * num_cities);
// Read in all cities
for (int i = 0; i < num_cities; ++i)
{
fgets(line, DATA_LINE_MAX_LEN, data_file);
cities[i] = malloc(strlen(line) * sizeof(char));
strcpy(cities[i], line);
}
// Clean things up
for (int i = 0; i < num_cities; ++i)
free(cities[i]);
free(cities);
return 0;
}
| Use fscanf to get the number of cities | Use fscanf to get the number of cities
| C | mit | EvanPurkhiser/CS-NotQuiteMapquest |
af9e54158cdfe9d779da709f423bbc2e331bf1da | numpy/core/include/numpy/cpuarch.h | numpy/core/include/numpy/cpuarch.h | /*
* This set (target) cpu specific macros:
* - NPY_TARGET_CPU: target CPU type
*/
#ifndef _NPY_CPUARCH_H_
#define _NPY_CPUARCH_H_
#if defined ( _i386_ ) || defined( __i386__ )
/* __i386__ is defined by gcc and Intel compiler on Linux, _i386_ by
VS compiler */
#define NPY_TARGET_CPU NPY_X86
#elif defined(__x86_64__) || defined(__amd64__)
/* both __x86_64__ and __amd64__ are defined by gcc */
#define NPY_TARGET_CPU NPY_AMD64
#elif defined(__ppc__) || defined(__powerpc__)
/* __ppc__ is defined by gcc, I remember having seen __powerpc__ once,
* but can't find it ATM */
#define NPY_TARGET_CPU NPY_PPC
#elif defined(__sparc__) || defined(__sparc)
/* __sparc__ is defined by gcc and Forte (e.g. Sun) compilers */
#define NPY_TARGET_CPU NPY_SPARC
#elif defined(__s390__)
#define NPY_TARGET_CPU NPY_S390
#elif defined(__parisc__)
/* XXX: Not sure about this one... */
#define NPY_TARGET_CPU NPY_PA_RISC
#else
#error Unknown CPU, please report this to numpy maintainers with \
information about your platform
#endif
#endif
| Add a (public) header to detect common CPU archs. | Add a (public) header to detect common CPU archs.
| C | bsd-3-clause | anntzer/numpy,MaPePeR/numpy,simongibbons/numpy,pizzathief/numpy,Eric89GXL/numpy,SiccarPoint/numpy,anntzer/numpy,abalkin/numpy,rhythmsosad/numpy,njase/numpy,cowlicks/numpy,MichaelAquilina/numpy,rmcgibbo/numpy,madphysicist/numpy,pelson/numpy,WarrenWeckesser/numpy,ahaldane/numpy,numpy/numpy-refactor,cjermain/numpy,mindw/numpy,ewmoore/numpy,joferkington/numpy,argriffing/numpy,numpy/numpy-refactor,ESSS/numpy,dwf/numpy,simongibbons/numpy,dato-code/numpy,brandon-rhodes/numpy,dato-code/numpy,ContinuumIO/numpy,MaPePeR/numpy,trankmichael/numpy,numpy/numpy,nbeaver/numpy,astrofrog/numpy,skwbc/numpy,endolith/numpy,ekalosak/numpy,ChristopherHogan/numpy,madphysicist/numpy,sigma-random/numpy,ContinuumIO/numpy,KaelChen/numpy,andsor/numpy,ogrisel/numpy,empeeu/numpy,GrimDerp/numpy,stefanv/numpy,MSeifert04/numpy,nguyentu1602/numpy,Srisai85/numpy,musically-ut/numpy,grlee77/numpy,stuarteberg/numpy,ahaldane/numpy,nguyentu1602/numpy,mattip/numpy,mindw/numpy,MSeifert04/numpy,jankoslavic/numpy,rgommers/numpy,Anwesh43/numpy,sinhrks/numpy,skymanaditya1/numpy,brandon-rhodes/numpy,pdebuyl/numpy,endolith/numpy,ddasilva/numpy,jorisvandenbossche/numpy,Yusa95/numpy,NextThought/pypy-numpy,pelson/numpy,mindw/numpy,leifdenby/numpy,anntzer/numpy,Srisai85/numpy,numpy/numpy-refactor,Yusa95/numpy,gmcastil/numpy,madphysicist/numpy,githubmlai/numpy,shoyer/numpy,moreati/numpy,dwf/numpy,SiccarPoint/numpy,ajdawson/numpy,jonathanunderwood/numpy,argriffing/numpy,rherault-insa/numpy,jankoslavic/numpy,tynn/numpy,astrofrog/numpy,embray/numpy,WarrenWeckesser/numpy,ekalosak/numpy,naritta/numpy,mwiebe/numpy,pyparallel/numpy,KaelChen/numpy,pelson/numpy,jorisvandenbossche/numpy,rajathkumarmp/numpy,KaelChen/numpy,sonnyhu/numpy,solarjoe/numpy,felipebetancur/numpy,groutr/numpy,njase/numpy,kirillzhuravlev/numpy,moreati/numpy,joferkington/numpy,felipebetancur/numpy,drasmuss/numpy,numpy/numpy,ViralLeadership/numpy,skymanaditya1/numpy,kiwifb/numpy,mingwpy/numpy,stuarteberg/numpy,ChanderG/numpy,mathdd/numpy,ajdawson/numpy,mingwpy/numpy,rajathkumarmp/numpy,chiffa/numpy,Eric89GXL/numpy,SiccarPoint/numpy,skwbc/numpy,BMJHayward/numpy,mathdd/numpy,ahaldane/numpy,pbrod/numpy,ekalosak/numpy,WarrenWeckesser/numpy,MichaelAquilina/numpy,nbeaver/numpy,rudimeier/numpy,dch312/numpy,mortada/numpy,endolith/numpy,simongibbons/numpy,Dapid/numpy,jakirkham/numpy,astrofrog/numpy,groutr/numpy,larsmans/numpy,skymanaditya1/numpy,GrimDerp/numpy,GaZ3ll3/numpy,bringingheavendown/numpy,matthew-brett/numpy,jakirkham/numpy,utke1/numpy,bringingheavendown/numpy,hainm/numpy,mortada/numpy,ewmoore/numpy,charris/numpy,BabeNovelty/numpy,Anwesh43/numpy,ewmoore/numpy,mathdd/numpy,rherault-insa/numpy,rhythmsosad/numpy,jschueller/numpy,ekalosak/numpy,Yusa95/numpy,grlee77/numpy,mortada/numpy,seberg/numpy,utke1/numpy,pizzathief/numpy,dch312/numpy,pbrod/numpy,bmorris3/numpy,jorisvandenbossche/numpy,GrimDerp/numpy,ogrisel/numpy,ssanderson/numpy,charris/numpy,jschueller/numpy,andsor/numpy,gmcastil/numpy,bmorris3/numpy,stuarteberg/numpy,hainm/numpy,grlee77/numpy,SunghanKim/numpy,seberg/numpy,stefanv/numpy,charris/numpy,behzadnouri/numpy,groutr/numpy,brandon-rhodes/numpy,empeeu/numpy,bmorris3/numpy,ESSS/numpy,nbeaver/numpy,trankmichael/numpy,leifdenby/numpy,skymanaditya1/numpy,cjermain/numpy,naritta/numpy,Eric89GXL/numpy,mwiebe/numpy,githubmlai/numpy,cowlicks/numpy,felipebetancur/numpy,trankmichael/numpy,grlee77/numpy,jonathanunderwood/numpy,pelson/numpy,rudimeier/numpy,dwf/numpy,gmcastil/numpy,GaZ3ll3/numpy,dch312/numpy,andsor/numpy,MSeifert04/numpy,endolith/numpy,charris/numpy,pizzathief/numpy,pyparallel/numpy,dwillmer/numpy,madphysicist/numpy,skwbc/numpy,ssanderson/numpy,kirillzhuravlev/numpy,bertrand-l/numpy,mathdd/numpy,WillieMaddox/numpy,ChristopherHogan/numpy,jorisvandenbossche/numpy,pbrod/numpy,grlee77/numpy,pbrod/numpy,has2k1/numpy,chatcannon/numpy,b-carter/numpy,dato-code/numpy,astrofrog/numpy,Linkid/numpy,ChristopherHogan/numpy,simongibbons/numpy,ajdawson/numpy,maniteja123/numpy,ContinuumIO/numpy,chatcannon/numpy,cowlicks/numpy,numpy/numpy,rajathkumarmp/numpy,GrimDerp/numpy,mhvk/numpy,pyparallel/numpy,maniteja123/numpy,NextThought/pypy-numpy,dwillmer/numpy,kiwifb/numpy,rhythmsosad/numpy,jakirkham/numpy,MichaelAquilina/numpy,dimasad/numpy,ChristopherHogan/numpy,ahaldane/numpy,MSeifert04/numpy,nguyentu1602/numpy,rherault-insa/numpy,rmcgibbo/numpy,chatcannon/numpy,sonnyhu/numpy,moreati/numpy,mingwpy/numpy,pdebuyl/numpy,pbrod/numpy,seberg/numpy,dwillmer/numpy,naritta/numpy,musically-ut/numpy,rgommers/numpy,MaPePeR/numpy,ewmoore/numpy,larsmans/numpy,embray/numpy,WillieMaddox/numpy,b-carter/numpy,Anwesh43/numpy,rgommers/numpy,Linkid/numpy,mattip/numpy,BMJHayward/numpy,behzadnouri/numpy,ESSS/numpy,dimasad/numpy,ddasilva/numpy,stefanv/numpy,KaelChen/numpy,mhvk/numpy,dwf/numpy,WarrenWeckesser/numpy,larsmans/numpy,matthew-brett/numpy,has2k1/numpy,jonathanunderwood/numpy,mhvk/numpy,sinhrks/numpy,rmcgibbo/numpy,argriffing/numpy,yiakwy/numpy,WillieMaddox/numpy,Anwesh43/numpy,tdsmith/numpy,abalkin/numpy,rhythmsosad/numpy,joferkington/numpy,kirillzhuravlev/numpy,kiwifb/numpy,shoyer/numpy,embray/numpy,andsor/numpy,GaZ3ll3/numpy,SunghanKim/numpy,seberg/numpy,chiffa/numpy,solarjoe/numpy,jankoslavic/numpy,tdsmith/numpy,behzadnouri/numpy,mattip/numpy,rudimeier/numpy,jakirkham/numpy,matthew-brett/numpy,yiakwy/numpy,pdebuyl/numpy,CMartelLML/numpy,jschueller/numpy,Dapid/numpy,rajathkumarmp/numpy,tdsmith/numpy,hainm/numpy,bertrand-l/numpy,pizzathief/numpy,empeeu/numpy,MSeifert04/numpy,sinhrks/numpy,drasmuss/numpy,BabeNovelty/numpy,BMJHayward/numpy,AustereCuriosity/numpy,matthew-brett/numpy,embray/numpy,njase/numpy,sonnyhu/numpy,mattip/numpy,CMartelLML/numpy,githubmlai/numpy,NextThought/pypy-numpy,kirillzhuravlev/numpy,immerrr/numpy,has2k1/numpy,dch312/numpy,AustereCuriosity/numpy,gfyoung/numpy,mwiebe/numpy,astrofrog/numpy,stefanv/numpy,SunghanKim/numpy,tynn/numpy,sigma-random/numpy,cowlicks/numpy,pizzathief/numpy,Dapid/numpy,numpy/numpy,SiccarPoint/numpy,jorisvandenbossche/numpy,chiffa/numpy,Yusa95/numpy,MichaelAquilina/numpy,MaPePeR/numpy,naritta/numpy,jankoslavic/numpy,ahaldane/numpy,musically-ut/numpy,tacaswell/numpy,ewmoore/numpy,brandon-rhodes/numpy,sigma-random/numpy,musically-ut/numpy,tacaswell/numpy,sinhrks/numpy,AustereCuriosity/numpy,felipebetancur/numpy,tacaswell/numpy,leifdenby/numpy,mindw/numpy,BabeNovelty/numpy,has2k1/numpy,jschueller/numpy,Srisai85/numpy,stuarteberg/numpy,ogrisel/numpy,immerrr/numpy,maniteja123/numpy,tynn/numpy,ViralLeadership/numpy,cjermain/numpy,yiakwy/numpy,shoyer/numpy,b-carter/numpy,Linkid/numpy,anntzer/numpy,BabeNovelty/numpy,dato-code/numpy,Eric89GXL/numpy,dimasad/numpy,Linkid/numpy,shoyer/numpy,githubmlai/numpy,matthew-brett/numpy,ChanderG/numpy,pelson/numpy,sigma-random/numpy,pdebuyl/numpy,rgommers/numpy,gfyoung/numpy,ChanderG/numpy,trankmichael/numpy,ogrisel/numpy,ddasilva/numpy,ChanderG/numpy,tdsmith/numpy,GaZ3ll3/numpy,rmcgibbo/numpy,jakirkham/numpy,CMartelLML/numpy,gfyoung/numpy,shoyer/numpy,sonnyhu/numpy,bertrand-l/numpy,empeeu/numpy,dimasad/numpy,mhvk/numpy,mortada/numpy,Srisai85/numpy,mhvk/numpy,WarrenWeckesser/numpy,CMartelLML/numpy,utke1/numpy,simongibbons/numpy,mingwpy/numpy,cjermain/numpy,drasmuss/numpy,yiakwy/numpy,hainm/numpy,stefanv/numpy,larsmans/numpy,bmorris3/numpy,SunghanKim/numpy,abalkin/numpy,solarjoe/numpy,BMJHayward/numpy,ssanderson/numpy,immerrr/numpy,immerrr/numpy,numpy/numpy-refactor,ajdawson/numpy,rudimeier/numpy,dwillmer/numpy,ogrisel/numpy,numpy/numpy-refactor,nguyentu1602/numpy,NextThought/pypy-numpy,embray/numpy,ViralLeadership/numpy,bringingheavendown/numpy,madphysicist/numpy,dwf/numpy,joferkington/numpy |
|
3e7673472eedd975f9b5fcc1ced44ddbd8db476d | core/base/inc/RVersion.h | core/base/inc/RVersion.h | #ifndef ROOT_RVersion
#define ROOT_RVersion
/* Version information automatically generated by installer. */
/*
* These macros can be used in the following way:
*
* #if ROOT_VERSION_CODE >= ROOT_VERSION(2,23,4)
* #include <newheader.h>
* #else
* #include <oldheader.h>
* #endif
*
*/
#define ROOT_RELEASE "5.34/23"
#define ROOT_RELEASE_DATE "Nov 7 2014"
#define ROOT_RELEASE_TIME "15:06:58"
#define ROOT_SVN_REVISION 49361
#define ROOT_GIT_COMMIT "v5-34-22-106-g4a0dea3"
#define ROOT_GIT_BRANCH "heads/v5-34-00-patches"
#define ROOT_VERSION_CODE 336407
#define ROOT_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif
| #ifndef ROOT_RVersion
#define ROOT_RVersion
/* Version information automatically generated by installer. */
/*
* These macros can be used in the following way:
*
* #if ROOT_VERSION_CODE >= ROOT_VERSION(2,23,4)
* #include <newheader.h>
* #else
* #include <oldheader.h>
* #endif
*
*/
#define ROOT_RELEASE "5.34/24"
#define ROOT_RELEASE_DATE "Dec 2 2014"
#define ROOT_RELEASE_TIME "18:12:03"
#define ROOT_SVN_REVISION 49361
#define ROOT_GIT_COMMIT "v5-34-23-79-gbc6a48d"
#define ROOT_GIT_BRANCH "heads/v5-34-00-patches"
#define ROOT_VERSION_CODE 336408
#define ROOT_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif
| Update ROOT version files to v5.34/24. | Update ROOT version files to v5.34/24.
| C | lgpl-2.1 | tc3t/qoot,tc3t/qoot,tc3t/qoot,tc3t/qoot,tc3t/qoot,tc3t/qoot,tc3t/qoot,tc3t/qoot,tc3t/qoot,tc3t/qoot |
23ad60bf74b1a87fe85d3e4fab56d19da773323f | version.h | version.h | #include <stdio.h>
#define major 1
#define minor 0
#define patch 0
#define ver(arg) #arg
#define ver2(arg) ver(arg)
#define maj ver2(major)
#define min ver2(minor)
#define pat ver2(patch)
#define dot "."
#define VERSION (maj dot min dot pat)
| /*
@file version.h
@brief Defines macros to create version number string
@license MIT LICENSE
@authors
Prakhar Nigam, https://github.com/prakharnigam
electrogeek, https://github.com/Nishant-Mishra
*/
#ifndef __VERSION_H__
#define __VERSION_H__
#ifdef __cplusplus
extern "C" {
#endif
#define major 1
#define minor 0
#define patch 0
#define ver(arg) #arg
#define ver2(arg) ver(arg)
#define maj ver2(major)
#define min ver2(minor)
#define pat ver2(patch)
#define dot "."
#define VERSION (maj dot min dot pat)
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* __VERSION_H__ */
| Add guards to avoid multiple includes. | Add guards to avoid multiple includes. | C | mit | Nishant-Mishra/C_Code_Versioning |
526b988a3dc06e92509e6c67910dbded36ba5aec | src/definitions.h | src/definitions.h | #pragma once
#include <cstdint>
#include <cstdlib>
using uint = unsigned int;
using u8 = uint8_t;
using u16 = uint16_t;
using s8 = int8_t;
const int GAMEBOY_WIDTH = 160;
const int GAMEBOY_HEIGHT = 144;
const int CLOCK_RATE = 4194304;
template <typename... T> void unused(T&&...) {}
#define fatal_error() log_error("Fatal error: %s:%d", __FILE__, __LINE__); exit(1);
enum class GBColor {
Color0, /* White */
Color1, /* Light gray */
Color2, /* Dark gray */
Color3, /* Black */
};
enum class Color {
White,
LightGray,
DarkGray,
Black,
};
struct BGPalette {
Color color0 = Color::White;
Color color1 = Color::LightGray;
Color color2 = Color::DarkGray;
Color color3 = Color::Black;
};
struct Noncopyable {
Noncopyable& operator=(const Noncopyable&) = delete;
Noncopyable(const Noncopyable&) = delete;
Noncopyable() = default;
};
| #pragma once
#include <cstdint>
#include <cstdlib>
using uint = unsigned int;
using u8 = uint8_t;
using u16 = uint16_t;
using s8 = int8_t;
using s16 = uint16_t;
const int GAMEBOY_WIDTH = 160;
const int GAMEBOY_HEIGHT = 144;
const int CLOCK_RATE = 4194304;
template <typename... T> void unused(T&&...) {}
#define fatal_error() log_error("Fatal error: %s:%d", __FILE__, __LINE__); exit(1);
enum class GBColor {
Color0, /* White */
Color1, /* Light gray */
Color2, /* Dark gray */
Color3, /* Black */
};
enum class Color {
White,
LightGray,
DarkGray,
Black,
};
struct BGPalette {
Color color0 = Color::White;
Color color1 = Color::LightGray;
Color color2 = Color::DarkGray;
Color color3 = Color::Black;
};
struct Noncopyable {
Noncopyable& operator=(const Noncopyable&) = delete;
Noncopyable(const Noncopyable&) = delete;
Noncopyable() = default;
};
| Add a s16 (signed 16-bit int) for symmetry with u8/u16 | Add a s16 (signed 16-bit int) for symmetry with u8/u16
| C | bsd-3-clause | jgilchrist/emulator,jgilchrist/emulator,jgilchrist/emulator |
171be473509342faa811e8eca74b3a98e2cba772 | src/lib/helpers.h | src/lib/helpers.h | #pragma once
#include <iomanip>
#include "H5Cpp.h"
#include "logger.h"
// N-wide hex output with 0x
template <unsigned int N> std::ostream &hexn(std::ostream &out) {
return out << "0x" << std::hex << std::setw(N) << std::setfill('0');
}
inline int mymod(int a, int b) {
int c = a % b;
if (c < 0)
c += b;
return c;
}
| #pragma once
#include <iomanip>
#include "logger.h"
// N-wide hex output with 0x
template <unsigned int N> std::ostream &hexn(std::ostream &out) {
return out << "0x" << std::hex << std::setw(N) << std::setfill('0');
}
inline int mymod(int a, int b) {
int c = a % b;
if (c < 0)
c += b;
return c;
}
| Remove reference to h5 header | Remove reference to h5 header
| C | apache-2.0 | BBN-Q/libaps2,BBN-Q/libaps2,BBN-Q/libaps2,BBN-Q/libaps2,BBN-Q/libaps2 |
2241d5454301ced6af4962327b632237ec4b8ac2 | src/include/embox/kernel.h | src/include/embox/kernel.h | /**
* @file
* @brief contains some often-used function prototypes etc
*
* @date 25.03.2010
*/
#ifndef EMBOX_KERNEL_H_
#define EMBOX_KERNEL_H_
#ifdef __EMBOX__
#include <err.h>
#else
#include <linux/types.h>
#endif
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
/* deprecated */
#define array_len(array) ARRAY_SIZE(array)
#endif /* EMBOX_KERNEL_H_ */
| /**
* @file
* @brief contains some often-used function prototypes etc
*
* @date 25.03.2010
*/
#ifndef EMBOX_KERNEL_H_
#define EMBOX_KERNEL_H_
#ifdef __EMBOX__
#include <err.h>
#else
#include <linux/types.h>
#endif
#include <util/array.h>
/* TODO deprecated. -- Eldar, Nikolay */
#define array_len(array) ARRAY_SIZE(array)
#endif /* EMBOX_KERNEL_H_ */
| Fix redefinition of ARRAY_SIZE macro warning | Fix redefinition of ARRAY_SIZE macro warning | C | bsd-2-clause | embox/embox,mike2390/embox,vrxfile/embox-trik,Kefir0192/embox,Kefir0192/embox,gzoom13/embox,mike2390/embox,mike2390/embox,Kefir0192/embox,vrxfile/embox-trik,Kefir0192/embox,gzoom13/embox,embox/embox,Kakadu/embox,Kakadu/embox,embox/embox,Kefir0192/embox,vrxfile/embox-trik,Kefir0192/embox,gzoom13/embox,embox/embox,Kakadu/embox,Kakadu/embox,gzoom13/embox,embox/embox,vrxfile/embox-trik,abusalimov/embox,abusalimov/embox,gzoom13/embox,abusalimov/embox,mike2390/embox,Kefir0192/embox,mike2390/embox,Kakadu/embox,mike2390/embox,gzoom13/embox,Kakadu/embox,mike2390/embox,vrxfile/embox-trik,embox/embox,vrxfile/embox-trik,Kakadu/embox,vrxfile/embox-trik,gzoom13/embox,abusalimov/embox,abusalimov/embox,abusalimov/embox |
32d872a4f0f06dbb2ec8864269061bbb1423b03e | euler.c | euler.c | #include <stdio.h>
#include <stdlib.h>
#include "euler.h"
int
check(int problem, int answer, int result)
{
char *text = "INCORRECT";
char *color = KRED;
int ret = 1;
if(answer == result) {
text = "CORRECT";
color = KGRN;
ret = 0;
}
printf("%sProblm %i %s - Expected: %i; Got %i\n",
color, problem, text, answer, result);
return ret;
}
void
error(const char *str)
{
fprintf(stderr, "%s%s\n", KRED, str);
exit(1);
}
| #include <stdio.h>
#include <stdlib.h>
#include "euler.h"
int
check(int problem, int answer, int result)
{
char *text = "INCORRECT";
char *color = KRED;
int ret = 1;
if(answer == result) {
text = "CORRECT";
color = KGRN;
ret = 0;
}
printf("%sProblem %i %s - Expected: %i; Got %i\n",
color, problem, text, answer, result);
return ret;
}
void
error(const char *str)
{
fprintf(stderr, "%s%s\n", KRED, str);
exit(1);
}
| Fix typo: problm -> problem | Fix typo: problm -> problem
| C | bsd-2-clause | skreuzer/euler |
315c5f71fa3e796c2f948810b9995f4af7406838 | examples/stl_get_infos.c | examples/stl_get_infos.c | /* -----------------------------------------------------------------------------
*
* Example: read a STL file
*
* Just give a filepath and an initialized gmio_stl_mesh_creator object to
* gmio_stl_read_file().
* The gmio_stl_mesh_creator object holds pointers to the callbacks invoked
* during the read operation.
* These callbacks creates the final mesh object.
*
* Note if you want to have control over the stream to be used, call
* gmio_stl_read() instead.
*
* -------------------------------------------------------------------------- */
#include <gmio_core/error.h>
#include <gmio_stl/stl_infos.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
static const char* gmio_stl_format_to_str(enum gmio_stl_format format)
{
switch (format) {
case GMIO_STL_FORMAT_UNKNOWN: return "UNKNOWN";
case GMIO_STL_FORMAT_ASCII: return "STL ASCII";
case GMIO_STL_FORMAT_BINARY_LE: return "STL BINARY LITTLE-ENDIAN";
case GMIO_STL_FORMAT_BINARY_BE: return "STL BINARY BIG-ENDIAN";
}
}
static void print_stl_infos(const struct gmio_stl_infos* infos)
{
printf("File: %s\n"
"Format: %s\n"
"Size: %uKo\n"
"Facets: %u\n",
filepath,
gmio_stl_format_to_str(infos->format),
infos->size / 1024,
infos->facet_count);
if (infos->format == GMIO_STL_FORMAT_ASCII) {
printf("Solid name: %s\n", infos->stla_solidname);
}
else if (infos->format == GMIO_STL_FORMAT_BINARY_LE
|| infos->format == GMIO_STL_FORMAT_BINARY_BE)
{
printf("Header: %80.80s\n", infos->stlb_header.data);
}
}
int main(int argc, char** argv)
{
int error = 0;
if (argc > 1) {
/* Path to the STL file */
const char* filepath = argv[1];
/* Read-only standard stream on the STL file */
FILE* file = fopen(filepath, "rb");
if (file != NULL) {
/* gmio stream interface object */
struct gmio_stream stream = gmio_stream_stdio(file);
/* Will holds informations about the STL file */
struct gmio_stl_infos infos = {0};
/* Retrieve STL informations */
error = gmio_stl_infos_get(
&infos, &stream, GMIO_STL_INFO_FLAG_ALL, NULL);
if (error == GMIO_ERROR_OK)
print_stl_infos(&infos);
else
fprintf(stderr, "gmio error: 0x%X\n", error);
fclose(file);
}
}
return error;
}
| Add new example for gmio_stl_infos_get() | Add new example for gmio_stl_infos_get()
| C | bsd-2-clause | fougue/gmio,fougue/gmio,fougue/gmio,fougue/gmio |
|
e8ff69fcb5021ba8909e44ef7f89e227fa903b3b | test/FrontendC/2010-11-16-asmblock.c | test/FrontendC/2010-11-16-asmblock.c | // RUN: %llvmgcc -S %s -fasm-blocks -o - | FileCheck %s
// XFAIL: *
// XTARGET: x86,i386,i686
// 84282548
void foo()
{
// CHECK: %0 = call i32 asm sideeffect "", "={ecx}"() nounwind
// CHECK: %asmtmp = call i32 asm sideeffect alignstack "sall $$3, $0", "={ecx},{ecx},~{dirflag},~{fpsr},~{flags},~{memory}"(i32 %0) nounwind
// CHECK: store i32 %asmtmp, i32* %"%ecx"
__asm {
sal ecx, 3;
add esi, ecx;
add edi, ecx;
}
}
| Test for llvm-gcc patch 119392. | Test for llvm-gcc patch 119392.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@119393 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm |
|
25bda12511d371bc9c02bf2454cce53241ee2abe | views/controls/menu/native_menu_host_delegate.h | views/controls/menu/native_menu_host_delegate.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 VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_H_
#define VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_H_
namespace views {
namespace internal {
class NativeMenuHostDelegate {
public:
virtual ~NativeMenuHostDelegate() {}
};
} // namespace internal
} // namespace views
#endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_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 VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_H_
#define VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_H_
namespace views {
namespace internal {
class NativeMenuHostDelegate {
public:
virtual ~NativeMenuHostDelegate() {}
};
} // namespace internal
} // namespace views
#endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_H_
| Add newline to end of file. | Add newline to end of file.
git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@80087 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 |
e6c4b6d82a21c29737e637dc33b89528bf77d5da | TeamSnapSDK/SDK/DataTypes/TSDKPartnerPreferences.h | TeamSnapSDK/SDK/DataTypes/TSDKPartnerPreferences.h | // Copyright (c) 2015 TeamSnap. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "TSDKCollectionObject.h"
#import "TSDKObjectsRequest.h"
@interface TSDKPartnerPreferences : TSDKCollectionObject
@property (nonatomic, assign) NSInteger canDisplayPartner; //Example: 0
@property (nonatomic, strong, nullable) NSString * partnerName; //Example: **NULL**
@property (nonatomic, strong, nullable) NSString * userId; //Example: <null>
@property (nonatomic, assign) NSInteger userIsPartner; //Example: 0
@property (nonatomic, strong, nullable) NSString * partnerId; //Example: <null>
@end
| // Copyright (c) 2015 TeamSnap. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "TSDKCollectionObject.h"
#import "TSDKObjectsRequest.h"
@interface TSDKPartnerPreferences : TSDKCollectionObject
@property (nonatomic, assign) BOOL canDisplayPartner; //Example: 0
@property (nonatomic, strong, nullable) NSString * partnerName; //Example: **NULL**
@property (nonatomic, strong, nullable) NSString * userId; //Example: <null>
@property (nonatomic, assign) BOOL userIsPartner; //Example: 0
@property (nonatomic, strong, nullable) NSString * partnerId; //Example: <null>
@end
| Change partner preference Int to Bool values | Change partner preference Int to Bool values
| C | mit | teamsnap/teamsnap-SDK-iOS,teamsnap/teamsnap-SDK-iOS,teamsnap/teamsnap-SDK-iOS |
41f7697d2ee738d6e252acde2bc40a00cff97d48 | projects/OG-Language/Util/stdafx.h | projects/OG-Language/Util/stdafx.h | /**
* Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
#ifndef STDAFX_H
#define STDAFX_H
// Common include file for all source code in Util
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <Psapi.h>
#ifdef __cplusplus
#pragma warning(disable:4995) /* suppress #pragma deprecated warnings from standard C++ headers */
#endif /* ifdef __cplusplus */
#else
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <arpa/inet.h>
#include <netinet/tcp.h>
#include <signal.h>
#include <unistd.h>
#include <dirent.h>
#include <spawn.h>
#endif
#include <assert.h>
// Include these so that cpptask fails if libraries not present
#include <fudge/fudge.h>
#include <log4cxx/log4cxx.h>
#endif /* ifndef STDAFX_H */
| /**
* Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
#ifndef STDAFX_H
#define STDAFX_H
// Common include file for all source code in Util
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <Psapi.h>
#ifdef __cplusplus
#pragma warning(disable:4995) /* suppress #pragma deprecated warnings from standard C++ headers */
#endif /* ifdef __cplusplus */
#else
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <arpa/inet.h>
#include <netinet/tcp.h>
#include <signal.h>
#include <unistd.h>
#include <dirent.h>
#include <spawn.h>
#include <sys/stat.h>
#endif
#include <assert.h>
// Include these so that cpptask fails if libraries not present
#include <fudge/fudge.h>
#include <log4cxx/log4cxx.h>
#endif /* ifndef STDAFX_H */
| Add sys/stat.h to headers for mkfifo declaration. | Add sys/stat.h to headers for mkfifo declaration.
| C | apache-2.0 | nssales/OG-Platform,McLeodMoores/starling,jerome79/OG-Platform,ChinaQuants/OG-Platform,jeorme/OG-Platform,codeaudit/OG-Platform,nssales/OG-Platform,jerome79/OG-Platform,nssales/OG-Platform,jeorme/OG-Platform,jerome79/OG-Platform,DevStreet/FinanceAnalytics,McLeodMoores/starling,codeaudit/OG-Platform,jerome79/OG-Platform,ChinaQuants/OG-Platform,jeorme/OG-Platform,DevStreet/FinanceAnalytics,ChinaQuants/OG-Platform,codeaudit/OG-Platform,DevStreet/FinanceAnalytics,jeorme/OG-Platform,codeaudit/OG-Platform,McLeodMoores/starling,McLeodMoores/starling,nssales/OG-Platform,DevStreet/FinanceAnalytics,ChinaQuants/OG-Platform |
052f525884c6664c3047b03b607ca5f7d19e9524 | Source/JSObjectFactory.h | Source/JSObjectFactory.h | #import <Foundation/Foundation.h>
@class JSObjectionInjector;
@interface JSObjectFactory : NSObject
@property (nonatomic, readonly, strong) JSObjectionInjector *injector;
- (id)initWithInjector:(JSObjectionInjector *)injector;
- (id)getObject:(id)classOrProtocol;
- (id)objectForKeyedSubscript: (id)key;
- (id)getObjectWithArgs:(id)classOrProtocol, ... NS_REQUIRES_NIL_TERMINATION;
@end
| #import <Foundation/Foundation.h>
@class JSObjectionInjector;
@interface JSObjectFactory : NSObject
@property (nonatomic, readonly, weak) JSObjectionInjector *injector;
- (id)initWithInjector:(JSObjectionInjector *)injector;
- (id)getObject:(id)classOrProtocol;
- (id)objectForKeyedSubscript: (id)key;
- (id)getObjectWithArgs:(id)classOrProtocol, ... NS_REQUIRES_NIL_TERMINATION;
@end
| Use weak reference in object factory to avoid cyclical references | Use weak reference in object factory to avoid cyclical references | C | mit | ApplauseAQI/objection,alexfeng/objection,ApplauseAQI/objection,zjh171/objection,atomicobject/objection,technology-ebay-de/objection,paulz/objection,technology-ebay-de/objection,hzm0318hzm/objection,ApplauseAQI/objection,alexfeng/objection,hzm0318hzm/objection,zjh171/objection,paulz/objection,atomicobject/objection,ReutersTV/objection,ApplauseAQI/objection,ReutersTV/objection |
d7713594c2db37aeed1ff5da8aefbbbd26e73f34 | bikepath/ResultsMapViewController.h | bikepath/ResultsMapViewController.h | //
// ResultsMapViewController.h
// bikepath
//
// Created by Farheen Malik on 8/14/14.
// Copyright (c) 2014 Bike Path. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <GoogleMaps/GoogleMaps.h>
@interface ResultsMapViewController : UIViewController <GMSMapViewDelegate>
@property (strong, nonatomic) IBOutlet GMSMapView *mapView;
- (IBAction)unwindToSearchPage:(UIStoryboardSegue *)segue;
@end
| //
// ResultsMapViewController.h
// bikepath
//
// Created by Farheen Malik on 8/14/14.
// Copyright (c) 2014 Bike Path. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <GoogleMaps/GoogleMaps.h>
#import "SearchItem.h"
@interface ResultsMapViewController : UIViewController <GMSMapViewDelegate>
@property (strong, nonatomic) IBOutlet GMSMapView *mapView;
- (IBAction)unwindToSearchPage:(UIStoryboardSegue *)segue;
@property (nonatomic, strong) SearchItem *item;
@end
| Add passing of information to prepareforsegue method | Add passing of information to prepareforsegue method
| C | apache-2.0 | red-spotted-newts-2014/bike-path,red-spotted-newts-2014/bike-path,hushifei/bike-path |
801c6885d61cee2dea82682c47e3e0dfd42a07ba | test/test.h | test/test.h | #include <unittest++/UnitTest++.h>
/*
* This file provides a transitive include for the UnitTest++ library
* so that you don't need to remember how to include it yourself. This
* file also provides you with a reference for using UnitTest++.
*
* == BASIC REFERENCE ==
* - TEST(NAME_OF_TEST) { body_of_test }
* - TEST_FIXTURE(NAME_OF_FIXTURE,NAME_OF_TEST){ body_of_test }
*
* == CHECK MACRO REFERENCE ==
* - CHECK(EXPR);
* - CHECK_EQUAL(EXPECTED,ACTUAL);
* - CHECK_CLOSE(EXPECTED,ACTUAL,EPSILON);
* - CHECK_ARRAY_EQUAL(EXPECTED,ACTUAL,LENGTH);
* - CHECK_ARRAY_CLOSE(EXPECTED,ACTUAL,LENGTH,EPSILON);
* - CHECK_ARRAY2D_EQUAL(EXPECTED,ACTUAL,ROWCOUNT,COLCOUNT);
* - CHECK_ARRAY2D_CLOSE(EXPECTED,ACTUAL,ROWCOUNT,COLCOUNT,EPSILON);
* - CHECK_THROW(EXPR,EXCEPTION_TYPE_EXPECTED);
*
* == TIME CONSTRAINTS ==
*
* - UNITTEST_TIME_CONSTRAINT(TIME_IN_MILLISECONDS);
* - UNITTEST_TIME_CONSTRAINT_EXEMPT();
*
* == MORE INFO ==
* See: http://unittest-cpp.sourceforge.net/UnitTest++.html
*/
| #include "unittest++/UnitTest++.h"
/*
* This file provides a transitive include for the UnitTest++ library
* so that you don't need to remember how to include it yourself. This
* file also provides you with a reference for using UnitTest++.
*
* == BASIC REFERENCE ==
* - TEST(NAME_OF_TEST) { body_of_test }
* - TEST_FIXTURE(NAME_OF_FIXTURE,NAME_OF_TEST){ body_of_test }
*
* == CHECK MACRO REFERENCE ==
* - CHECK(EXPR);
* - CHECK_EQUAL(EXPECTED,ACTUAL);
* - CHECK_CLOSE(EXPECTED,ACTUAL,EPSILON);
* - CHECK_ARRAY_EQUAL(EXPECTED,ACTUAL,LENGTH);
* - CHECK_ARRAY_CLOSE(EXPECTED,ACTUAL,LENGTH,EPSILON);
* - CHECK_ARRAY2D_EQUAL(EXPECTED,ACTUAL,ROWCOUNT,COLCOUNT);
* - CHECK_ARRAY2D_CLOSE(EXPECTED,ACTUAL,ROWCOUNT,COLCOUNT,EPSILON);
* - CHECK_THROW(EXPR,EXCEPTION_TYPE_EXPECTED);
*
* == TIME CONSTRAINTS ==
*
* - UNITTEST_TIME_CONSTRAINT(TIME_IN_MILLISECONDS);
* - UNITTEST_TIME_CONSTRAINT_EXEMPT();
*
* == MORE INFO ==
* See: http://unittest-cpp.sourceforge.net/UnitTest++.html
*/
| Use quotes for include so that UnitTest header is found locally. | Use quotes for include so that UnitTest header is found locally.
| C | bsd-3-clause | Atamai/tactics,Atamai/tactics |
122ce2d8c7e7d28a76c43d665c206f03876e2541 | tests/regression/13-privatized/18-first-reads.c | tests/regression/13-privatized/18-first-reads.c | // PARAM: --set ana.int.interval true --set solver "'td3'"
#include<pthread.h>
#include<assert.h>
int glob1 = 0;
pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
int t;
pthread_mutex_lock(&mutex1);
if(t == 42) {
glob1 = 1;
}
t = glob1;
assert(t == 0); //UNKNOWN
assert(t == 1); //UNKNOWN
glob1 = 0;
pthread_mutex_unlock(&mutex1);
return NULL;
}
int main(void) {
pthread_t id;
assert(glob1 == 0);
pthread_create(&id, NULL, t_fun, NULL);
pthread_mutex_lock(&mutex1);
assert(glob1 == 0);
pthread_mutex_unlock(&mutex1);
pthread_join (id, NULL);
return 0;
}
| // PARAM: --set ana.int.interval true --set solver "'td3'"
#include<pthread.h>
#include<assert.h>
int glob1 = 0;
pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
int t;
pthread_mutex_lock(&mutex1);
if(t == 42) {
glob1 = 1;
}
t = glob1;
assert(t == 0); //UNKNOWN!
assert(t == 1); //UNKNOWN!
glob1 = 0;
pthread_mutex_unlock(&mutex1);
return NULL;
}
int main(void) {
pthread_t id;
assert(glob1 == 0);
pthread_create(&id, NULL, t_fun, NULL);
pthread_mutex_lock(&mutex1);
assert(glob1 == 0);
pthread_mutex_unlock(&mutex1);
pthread_join (id, NULL);
return 0;
}
| Add exclamation mark to unknown to indicate it should always be unknown | Add exclamation mark to unknown to indicate it should always be unknown
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
bbab158f09e5fd125ec2558bfa319f78e96e13ac | a_filter.h | a_filter.h | #ifndef A_FILTER_HDR
#define A_FILTER_HDR
#include "u_vector.h"
namespace a {
struct source;
struct filterInstance {
virtual void filter(float *buffer, size_t samples, bool strero, float sampleRate) = 0;
virtual ~filterInstance();
};
struct filter {
virtual void init(source *);
virtual filterInstance *create() = 0;
virtual ~filter();
};
struct echoFilter;
struct echoFilterInstance : filterInstance {
virtual void filter(float *buffer, size_t samples, bool stereo, float sampleRate);
virtual ~echoFilterInstance();
echoFilterInstance(echoFilter *parent);
private:
u::vector<float> m_buffer;
echoFilter *m_parent;
size_t m_offset;
};
struct echoFilter : filter {
virtual void init(source *sourcer_);
virtual filterInstance *create();
echoFilter();
void setParams(float delay, float decay);
private:
friend struct echoFilterInstance;
float m_delay;
float m_decay;
};
}
#endif
| #ifndef A_FILTER_HDR
#define A_FILTER_HDR
#include "u_vector.h"
namespace a {
struct source;
struct filterInstance {
virtual void filter(float *buffer, size_t samples, bool strero, float sampleRate) = 0;
virtual ~filterInstance();
};
struct filter {
virtual void init(source *audioSource);
virtual filterInstance *create() = 0;
virtual ~filter();
};
struct echoFilter;
struct echoFilterInstance : filterInstance {
virtual void filter(float *buffer, size_t samples, bool stereo, float sampleRate);
virtual ~echoFilterInstance();
echoFilterInstance(echoFilter *parent);
private:
u::vector<float> m_buffer;
echoFilter *m_parent;
size_t m_offset;
};
struct echoFilter : filter {
virtual void init(source *sourcer_);
virtual filterInstance *create();
echoFilter();
void setParams(float delay, float decay);
private:
friend struct echoFilterInstance;
float m_delay;
float m_decay;
};
}
#endif
| Revert "Testing GPG key on github" | Revert "Testing GPG key on github"
This reverts commit 22b0c196d0aa47ffbd016da66e98207b80bcdc82.
| C | mit | graphitemaster/neothyne,graphitemaster/neothyne |
38a54eca96dcfcef1bf1d921b5ac8d52feeb5431 | tests/regression/01-cpa/45-float.c | tests/regression/01-cpa/45-float.c | // PARAM: --enable ana.int.interval --enable ana.int.def_exc --enable ana.sv-comp.functions --set ana.activated[+] var_eq --set ana.activated[+] region
#include <goblint.h>
int isNan(float arg) {
float x;
return arg != arg;
}
int main(){
struct blub { float f; } s;
float fs[3];
float top;
// float may be NaN here, therefore the comaprison should be unknown
__goblint_check(top == top); //UNKNOWN!
__goblint_check(s.f == s.f); //UNKNOWN!
__goblint_check(fs[1] == fs[1]); //UNKNOWN!
int r = isNan(top);
if(r) {
__goblint_check(1);
} else {
__goblint_check(1);
}
}
| // PARAM: --enable ana.int.interval --enable ana.int.def_exc --enable ana.sv-comp.functions --set ana.activated[+] var_eq --set ana.activated[+] region
#include <goblint.h>
int isNan(float arg) {
float x;
return arg != arg;
}
int main(){
struct blub { float f; } s;
float fs[3];
float top;
// float may be NaN here, therefore the comaprison should be unknown
__goblint_check(top == top); //UNKNOWN!
__goblint_check(s.f == s.f); //UNKNOWN!
__goblint_check(fs[1] == fs[1]); //UNKNOWN!
int r = isNan(top);
if(r) {
__goblint_check(1);
} else {
__goblint_check(1);
}
float *p = ⊤
float *q = &fs;
__goblint_check(*p == *p); //UNKNOWN!
__goblint_check(q[1] == q[1]); //UNKNOWN!
return 0;
}
| Add test for var_eq unsoundness with dereferenced floats | Add test for var_eq unsoundness with dereferenced floats
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
d76589114d1723bb0cb666dcb70058b74052e63b | src/backend/port/dynloader/win32.c | src/backend/port/dynloader/win32.c | /* $PostgreSQL: pgsql/src/backend/port/dynloader/win32.c,v 1.4 2004/11/17 08:30:08 neilc Exp $ */
#include <windows.h>
char *dlerror(void);
int dlclose(void *handle);
void *dlsym(void *handle, const char *symbol);
void *dlopen(const char *path, int mode);
char *
dlerror(void)
{
return "error";
}
int
dlclose(void *handle)
{
return FreeLibrary((HMODULE) handle) ? 0 : 1;
}
void *
dlsym(void *handle, const char *symbol)
{
return (void *) GetProcAddress((HMODULE) handle, symbol);
}
void *
dlopen(const char *path, int mode)
{
return (void *) LoadLibrary(path);
}
| /* $PostgreSQL: pgsql/src/backend/port/dynloader/win32.c,v 1.5 2004/12/02 19:38:50 momjian Exp $ */
#include <windows.h>
char *dlerror(void);
int dlclose(void *handle);
void *dlsym(void *handle, const char *symbol);
void *dlopen(const char *path, int mode);
char *
dlerror(void)
{
return "dynamic load error";
}
int
dlclose(void *handle)
{
return FreeLibrary((HMODULE) handle) ? 0 : 1;
}
void *
dlsym(void *handle, const char *symbol)
{
return (void *) GetProcAddress((HMODULE) handle, symbol);
}
void *
dlopen(const char *path, int mode)
{
return (void *) LoadLibrary(path);
}
| Change Win32 dlerror message to: | Change Win32 dlerror message to:
return "dynamic loading error";
| C | mpl-2.0 | yazun/postgres-xl,randomtask1155/gpdb,janebeckman/gpdb,snaga/postgres-xl,tpostgres-projects/tPostgres,jmcatamney/gpdb,rvs/gpdb,techdragon/Postgres-XL,adam8157/gpdb,xuegang/gpdb,ashwinstar/gpdb,foyzur/gpdb,snaga/postgres-xl,zeroae/postgres-xl,lintzc/gpdb,edespino/gpdb,50wu/gpdb,arcivanov/postgres-xl,Chibin/gpdb,yuanzhao/gpdb,postmind-net/postgres-xl,0x0FFF/gpdb,foyzur/gpdb,snaga/postgres-xl,greenplum-db/gpdb,0x0FFF/gpdb,jmcatamney/gpdb,ovr/postgres-xl,janebeckman/gpdb,kaknikhil/gpdb,ahachete/gpdb,ashwinstar/gpdb,rubikloud/gpdb,royc1/gpdb,lintzc/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,lintzc/gpdb,edespino/gpdb,adam8157/gpdb,lisakowen/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,zaksoup/gpdb,janebeckman/gpdb,ahachete/gpdb,Quikling/gpdb,CraigHarris/gpdb,Chibin/gpdb,royc1/gpdb,Quikling/gpdb,jmcatamney/gpdb,xinzweb/gpdb,yuanzhao/gpdb,tangp3/gpdb,kaknikhil/gpdb,postmind-net/postgres-xl,Quikling/gpdb,kmjungersen/PostgresXL,janebeckman/gpdb,Chibin/gpdb,zaksoup/gpdb,rvs/gpdb,Quikling/gpdb,CraigHarris/gpdb,Chibin/gpdb,cjcjameson/gpdb,chrishajas/gpdb,foyzur/gpdb,yazun/postgres-xl,edespino/gpdb,yuanzhao/gpdb,lpetrov-pivotal/gpdb,lisakowen/gpdb,yuanzhao/gpdb,xuegang/gpdb,janebeckman/gpdb,chrishajas/gpdb,xinzweb/gpdb,tangp3/gpdb,yazun/postgres-xl,lisakowen/gpdb,kaknikhil/gpdb,rvs/gpdb,xuegang/gpdb,kmjungersen/PostgresXL,xinzweb/gpdb,jmcatamney/gpdb,yuanzhao/gpdb,kmjungersen/PostgresXL,janebeckman/gpdb,zeroae/postgres-xl,atris/gpdb,adam8157/gpdb,50wu/gpdb,Chibin/gpdb,tpostgres-projects/tPostgres,0x0FFF/gpdb,xinzweb/gpdb,greenplum-db/gpdb,foyzur/gpdb,oberstet/postgres-xl,foyzur/gpdb,cjcjameson/gpdb,Postgres-XL/Postgres-XL,ahachete/gpdb,ashwinstar/gpdb,zeroae/postgres-xl,janebeckman/gpdb,lisakowen/gpdb,royc1/gpdb,lintzc/gpdb,Quikling/gpdb,tangp3/gpdb,jmcatamney/gpdb,Quikling/gpdb,kaknikhil/gpdb,xuegang/gpdb,ovr/postgres-xl,janebeckman/gpdb,xuegang/gpdb,pavanvd/postgres-xl,Postgres-XL/Postgres-XL,xinzweb/gpdb,lpetrov-pivotal/gpdb,yazun/postgres-xl,oberstet/postgres-xl,yuanzhao/gpdb,Chibin/gpdb,rvs/gpdb,arcivanov/postgres-xl,xinzweb/gpdb,ovr/postgres-xl,yuanzhao/gpdb,ahachete/gpdb,techdragon/Postgres-XL,royc1/gpdb,tangp3/gpdb,royc1/gpdb,postmind-net/postgres-xl,cjcjameson/gpdb,oberstet/postgres-xl,postmind-net/postgres-xl,Postgres-XL/Postgres-XL,tpostgres-projects/tPostgres,ashwinstar/gpdb,50wu/gpdb,cjcjameson/gpdb,rubikloud/gpdb,rubikloud/gpdb,edespino/gpdb,greenplum-db/gpdb,snaga/postgres-xl,randomtask1155/gpdb,50wu/gpdb,oberstet/postgres-xl,rubikloud/gpdb,ahachete/gpdb,cjcjameson/gpdb,Chibin/gpdb,zeroae/postgres-xl,Chibin/gpdb,lpetrov-pivotal/gpdb,edespino/gpdb,greenplum-db/gpdb,kaknikhil/gpdb,techdragon/Postgres-XL,ashwinstar/gpdb,chrishajas/gpdb,ovr/postgres-xl,cjcjameson/gpdb,atris/gpdb,CraigHarris/gpdb,50wu/gpdb,lpetrov-pivotal/gpdb,randomtask1155/gpdb,tpostgres-projects/tPostgres,adam8157/gpdb,arcivanov/postgres-xl,chrishajas/gpdb,lisakowen/gpdb,chrishajas/gpdb,greenplum-db/gpdb,zaksoup/gpdb,rvs/gpdb,kaknikhil/gpdb,ovr/postgres-xl,jmcatamney/gpdb,rvs/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,CraigHarris/gpdb,atris/gpdb,pavanvd/postgres-xl,50wu/gpdb,CraigHarris/gpdb,xuegang/gpdb,Quikling/gpdb,cjcjameson/gpdb,kaknikhil/gpdb,zeroae/postgres-xl,royc1/gpdb,ahachete/gpdb,chrishajas/gpdb,randomtask1155/gpdb,lisakowen/gpdb,lisakowen/gpdb,rvs/gpdb,rubikloud/gpdb,janebeckman/gpdb,0x0FFF/gpdb,xuegang/gpdb,zaksoup/gpdb,atris/gpdb,zaksoup/gpdb,foyzur/gpdb,techdragon/Postgres-XL,lpetrov-pivotal/gpdb,randomtask1155/gpdb,ahachete/gpdb,edespino/gpdb,CraigHarris/gpdb,tangp3/gpdb,lpetrov-pivotal/gpdb,lisakowen/gpdb,Quikling/gpdb,rubikloud/gpdb,rubikloud/gpdb,xuegang/gpdb,pavanvd/postgres-xl,atris/gpdb,xinzweb/gpdb,greenplum-db/gpdb,royc1/gpdb,kmjungersen/PostgresXL,Chibin/gpdb,chrishajas/gpdb,randomtask1155/gpdb,ahachete/gpdb,tangp3/gpdb,zaksoup/gpdb,tangp3/gpdb,0x0FFF/gpdb,kaknikhil/gpdb,Chibin/gpdb,edespino/gpdb,yazun/postgres-xl,janebeckman/gpdb,oberstet/postgres-xl,jmcatamney/gpdb,rvs/gpdb,Postgres-XL/Postgres-XL,rvs/gpdb,ashwinstar/gpdb,CraigHarris/gpdb,xuegang/gpdb,Quikling/gpdb,ashwinstar/gpdb,edespino/gpdb,0x0FFF/gpdb,lpetrov-pivotal/gpdb,adam8157/gpdb,randomtask1155/gpdb,foyzur/gpdb,arcivanov/postgres-xl,50wu/gpdb,lintzc/gpdb,rvs/gpdb,tangp3/gpdb,CraigHarris/gpdb,snaga/postgres-xl,kaknikhil/gpdb,lintzc/gpdb,edespino/gpdb,foyzur/gpdb,atris/gpdb,tpostgres-projects/tPostgres,cjcjameson/gpdb,lintzc/gpdb,xinzweb/gpdb,Quikling/gpdb,rubikloud/gpdb,edespino/gpdb,lintzc/gpdb,kaknikhil/gpdb,50wu/gpdb,0x0FFF/gpdb,0x0FFF/gpdb,yuanzhao/gpdb,lintzc/gpdb,arcivanov/postgres-xl,yuanzhao/gpdb,zaksoup/gpdb,adam8157/gpdb,atris/gpdb,greenplum-db/gpdb,royc1/gpdb,postmind-net/postgres-xl,kmjungersen/PostgresXL,arcivanov/postgres-xl,adam8157/gpdb,randomtask1155/gpdb,zaksoup/gpdb,yuanzhao/gpdb,adam8157/gpdb,CraigHarris/gpdb,cjcjameson/gpdb,atris/gpdb,Postgres-XL/Postgres-XL,techdragon/Postgres-XL,pavanvd/postgres-xl,chrishajas/gpdb |
b153f8ccec59da5debbb88c74a74a66f3e3b1fb5 | samples/Scrumptious/scrumptious/SCMealViewController.h | samples/Scrumptious/scrumptious/SCMealViewController.h | /*
* Copyright 2012 Facebook
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <UIKit/UIKit.h>
#import "SCViewController.h"
@interface SCMealViewController : UIViewController
@property (strong, nonatomic) SelectItemCallback selectItemCallback;
@end
| /*
* Copyright 2012 Facebook
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <UIKit/UIKit.h>
#import "SCViewController.h"
@interface SCMealViewController : UIViewController
@property (copy, nonatomic) SelectItemCallback selectItemCallback;
@end
| Fix crash in Scrumptious app. | [ios-sdk] Fix crash in Scrumptious app.
Summary:
Fixed inconsistent crash in Scrumptious. Blocks need to be copied, not retained.
Thanks to jacl for finding this.
Test Plan: - jacl was able to repro on his simulator. Had him try this change, did not repro.
Reviewers: jacl, mmarucheck, gregschechte
Reviewed By: mmarucheck
Differential Revision: https://phabricator.fb.com/D478984
Task ID: 1074314
| C | apache-2.0 | hibu/facebook-ios-sdk,wooga/facebook-ios-sdk,TimeIncOSS/facebook-ios-sdk,ArtLapitski/facebook-ios-sdk,ArtLapitski/facebook-ios-sdk,wooga/facebook-ios-sdk,flovilmart/facebook-ios-sdk,1234-/facebook-ios-sdk,hibu/facebook-ios-sdk,Citrrus/facebook-ios-sdk,ShareKit/facebook-ios-sdk,hibu/facebook-ios-sdk,hibu/facebook-ios-sdk,anthonylai/facebook-ios-sdk,anthonylai/facebook-ios-sdk,1234-/facebook-ios-sdk,anthonylai/facebook-ios-sdk,flovilmart/facebook-ios-sdk,TimeIncOSS/facebook-ios-sdk,beamly/facebook-ios-sdk,tipbit/facebook-ios-sdk,Subsplash/facebook-ios-sdk,ArtLapitski/facebook-ios-sdk,flovilmart/facebook-ios-sdk,ArtLapitski/facebook-ios-sdk,Subsplash/facebook-ios-sdk,wooga/facebook-ios-sdk,Citrrus/facebook-ios-sdk,FiftyThree/facebook-ios-sdk,shepting/facebook-ios-sdk,Amnysia/facebook-ios-sdk,beamly/facebook-ios-sdk,1234-/facebook-ios-sdk,shepting/facebook-ios-sdk,1234-/facebook-ios-sdk,1234-/facebook-ios-sdk,tipbit/facebook-ios-sdk,ShareKit/facebook-ios-sdk,FiftyThree/facebook-ios-sdk,FiftyThree/facebook-ios-sdk,shepting/facebook-ios-sdk,tipbit/facebook-ios-sdk,TimeIncOSS/facebook-ios-sdk,shepting/facebook-ios-sdk,taptaptap/facebook-ios-sdk,shepting/facebook-ios-sdk,ShareKit/facebook-ios-sdk,taptaptap/facebook-ios-sdk,beamly/facebook-ios-sdk,flovilmart/facebook-ios-sdk,Subsplash/facebook-ios-sdk,Citrrus/facebook-ios-sdk,Amnysia/facebook-ios-sdk,taptaptap/facebook-ios-sdk,hibu/facebook-ios-sdk,Amnysia/facebook-ios-sdk,flovilmart/facebook-ios-sdk |
227330943676f1dc888d74fddcade8964d82faba | server/src/apache/analyzer/detail/session_length.h | server/src/apache/analyzer/detail/session_length.h | /*
* Copyright 2016 Adam Chyła, [email protected]
* All rights reserved. Distributed under the terms of the MIT License.
*/
#pragma once
namespace apache
{
namespace analyzer
{
namespace detail
{
constexpr int SESSION_LENGTH = 60;
}
}
}
| /*
* Copyright 2016 Adam Chyła, [email protected]
* All rights reserved. Distributed under the terms of the MIT License.
*/
#pragma once
namespace apache
{
namespace analyzer
{
namespace detail
{
constexpr int SESSION_LENGTH = 3600;
}
}
}
| Change session length to 1h | Change session length to 1h
| C | mit | chyla/slas,chyla/slas,chyla/slas,chyla/pat-lms,chyla/slas,chyla/slas,chyla/slas,chyla/pat-lms,chyla/pat-lms,chyla/pat-lms,chyla/slas,chyla/pat-lms,chyla/pat-lms,chyla/pat-lms |
be6f28f28b57e912df6c276060bc38e7912a2262 | C/mwt.c | C/mwt.c | #include<stdio.h>
#include<stdlib.h>
int main (int argc, char *argv[]){
if(argc != 3){
printf("Number of parameters should be 2 (filename, cardinality).");
exit(1);
}
//open file and get file length
FILE *file;
file = fopen(argv[1],"r");
if(file == NULL){
printf("File couldn't be opened.");
exit(1);
}
fseek(file, 0, SEEK_END);
int fileLength = ftell(file);
fseek(file, 0, SEEK_SET);
//save data from file to array
char inputStream[fileLength];
//printf("length: %d \n", fileLength);
int i = 0;
int character;
while((character = fgetc(file)) != EOF){
inputStream[i] = character;
i++;
}
/*int j;
for(j=0; j < fileLength; j++){
char a = inputStream[j];
printf("Znak: %c \n", a);
}*/
fclose(file);
}
| #include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main (int argc, char *argv[]){
if(argc != 3){
printf("Number of parameters should be 2 (filename, arity).");
exit(1);
}
int alphabet[128] = {0};
int arity = atoi(argv[2]);
int treeLayers = ceil(7/log2(arity));
printf("Number of layers: %d \n", treeLayers);
//open file and get file length
FILE *file;
file = fopen(argv[1],"r");
if(file == NULL){
printf("File couldn't be opened.");
exit(1);
}
fseek(file, 0, SEEK_END);
int fileLength = ftell(file);
fseek(file, 0, SEEK_SET);
//save data from file to array
char inputStream[fileLength];
printf("length: %d \n", fileLength);
int i = 0;
int character;
int numOfChar = 0;
while((character = fgetc(file)) != EOF){
inputStream[i] = character;
if(alphabet[character]==0){
alphabet[character]=1;
numOfChar++;
}
i++;
}
char charOfAlphabet[numOfChar];
int j;
int k = 0;
for (j = 0; j < 128; j++){
if(alphabet[j]==1){
charOfAlphabet[k] = j;
k++;
}
}
//for(j=0; j < fileLength; j++){
// int a = inputStream[j];
//printf("Znak: %d \n", a);
//}
fclose(file);
}
| Define alphabet and number of tree layers | Define alphabet and number of tree layers
| C | mit | marijanaSpajic/multiary_wavelet_tree,marijanaSpajic/multiary_wavelet_tree,marijanaSpajic/multiary_wavelet_tree,marijanaSpajic/multiary_wavelet_tree,marijanaSpajic/multiary_wavelet_tree,marijanaSpajic/multiary_wavelet_tree |
e10ab25f34927dedde7ad7621d9767b8ab76b857 | include/libvarnish.h | include/libvarnish.h | /*
* $Id$
*/
#include <errno.h>
#include <time.h>
/* from libvarnish/argv.c */
void FreeArgv(char **argv);
char **ParseArgv(const char *s, int comment);
/* from libvarnish/time.c */
void TIM_format(time_t t, char *p);
time_t TIM_parse(const char *p);
/* from libvarnish/version.c */
void varnish_version(const char *);
/* from libvarnish/assert.c */
#ifdef WITHOUT_ASSERTS
#define assert(e) ((void)0)
#else /* WITH_ASSERTS */
#define assert(e) \
do { \
if (e) \
lbv_assert(__func__, __FILE__, __LINE__, #e, errno); \
} while (0)
#endif
void lbv_assert(const char *, const char *, int, const char *, int);
/* Assert zero return value */
#define AZ(foo) do { assert((foo) == 0); } while (0)
| /*
* $Id$
*/
#include <errno.h>
#include <time.h>
/* from libvarnish/argv.c */
void FreeArgv(char **argv);
char **ParseArgv(const char *s, int comment);
/* from libvarnish/time.c */
void TIM_format(time_t t, char *p);
time_t TIM_parse(const char *p);
/* from libvarnish/version.c */
void varnish_version(const char *);
/* from libvarnish/assert.c */
#ifdef WITHOUT_ASSERTS
#define assert(e) ((void)0)
#else /* WITH_ASSERTS */
#define assert(e) \
do { \
if (!(e)) \
lbv_assert(__func__, __FILE__, __LINE__, #e, errno); \
} while (0)
#endif
void lbv_assert(const char *, const char *, int, const char *, int);
/* Assert zero return value */
#define AZ(foo) do { assert((foo) == 0); } while (0)
| Make assert do the right thing | Make assert do the right thing
git-svn-id: 2c9807fa3ff65b17195bd55dc8a6c4261e10127b@745 d4fa192b-c00b-0410-8231-f00ffab90ce4
| C | bsd-2-clause | alarky/varnish-cache-doc-ja,mrhmouse/Varnish-Cache,drwilco/varnish-cache-drwilco,ajasty-cavium/Varnish-Cache,franciscovg/Varnish-Cache,ambernetas/varnish-cache,drwilco/varnish-cache-drwilco,alarky/varnish-cache-doc-ja,ssm/pkg-varnish,ambernetas/varnish-cache,drwilco/varnish-cache-drwilco,gauthier-delacroix/Varnish-Cache,zhoualbeart/Varnish-Cache,ssm/pkg-varnish,varnish/Varnish-Cache,feld/Varnish-Cache,ssm/pkg-varnish,zhoualbeart/Varnish-Cache,wikimedia/operations-debs-varnish,varnish/Varnish-Cache,feld/Varnish-Cache,gquintard/Varnish-Cache,1HLtd/Varnish-Cache,gauthier-delacroix/Varnish-Cache,franciscovg/Varnish-Cache,gquintard/Varnish-Cache,alarky/varnish-cache-doc-ja,1HLtd/Varnish-Cache,drwilco/varnish-cache-old,alarky/varnish-cache-doc-ja,ajasty-cavium/Varnish-Cache,mrhmouse/Varnish-Cache,gauthier-delacroix/Varnish-Cache,wikimedia/operations-debs-varnish,zhoualbeart/Varnish-Cache,chrismoulton/Varnish-Cache,wikimedia/operations-debs-varnish,feld/Varnish-Cache,ajasty-cavium/Varnish-Cache,drwilco/varnish-cache-old,varnish/Varnish-Cache,drwilco/varnish-cache-old,ajasty-cavium/Varnish-Cache,wikimedia/operations-debs-varnish,wikimedia/operations-debs-varnish,1HLtd/Varnish-Cache,zhoualbeart/Varnish-Cache,chrismoulton/Varnish-Cache,ambernetas/varnish-cache,franciscovg/Varnish-Cache,feld/Varnish-Cache,gquintard/Varnish-Cache,mrhmouse/Varnish-Cache,1HLtd/Varnish-Cache,varnish/Varnish-Cache,franciscovg/Varnish-Cache,varnish/Varnish-Cache,chrismoulton/Varnish-Cache,ssm/pkg-varnish,ajasty-cavium/Varnish-Cache,mrhmouse/Varnish-Cache,gquintard/Varnish-Cache,chrismoulton/Varnish-Cache,gauthier-delacroix/Varnish-Cache,mrhmouse/Varnish-Cache,chrismoulton/Varnish-Cache,alarky/varnish-cache-doc-ja,ssm/pkg-varnish,feld/Varnish-Cache,gauthier-delacroix/Varnish-Cache,franciscovg/Varnish-Cache,zhoualbeart/Varnish-Cache |
ada69b77fe10201624c94742c0a46b52136e253b | iphone/Classes/TiUIClipboardProxy.h | iphone/Classes/TiUIClipboardProxy.h | /**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#import "TiProxy.h"
@interface TiUIClipboardProxy : TiProxy {
@private
}
#pragma mark internal
-(BOOL)hasData_:(NSString *)mimeType;
-(id)getData_:(NSString *)mimeType;
-(void)clearData:(id)args;
-(void)clearText:(id)args;
-(id)getData:(id)args;
-(NSString *)getText:(id)args;
-(BOOL)hasData:(id)args;
-(BOOL)hasText:(id)args;
-(void)setData:(id)args;
-(void)setText:(id)args;
@end
| /**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#import "TiProxy.h"
@interface TiUIClipboardProxy : TiProxy {
@private
}
#pragma mark internal
-(id)getData_:(NSString *)mimeType;
-(void)clearData:(id)args;
-(void)clearText:(id)args;
-(id)getData:(id)args;
-(NSString *)getText:(id)args;
-(BOOL)hasData:(id)args;
-(BOOL)hasText:(id)args;
-(void)setData:(id)args;
-(void)setText:(id)args;
@end
| Remove Compile warning from clipboard proxy | Remove Compile warning from clipboard proxy
| C | apache-2.0 | ashcoding/titanium_mobile,sriks/titanium_mobile,prop/titanium_mobile,taoger/titanium_mobile,shopmium/titanium_mobile,jhaynie/titanium_mobile,kopiro/titanium_mobile,KangaCoders/titanium_mobile,benbahrenburg/titanium_mobile,KoketsoMabuela92/titanium_mobile,bright-sparks/titanium_mobile,emilyvon/titanium_mobile,falkolab/titanium_mobile,rblalock/titanium_mobile,shopmium/titanium_mobile,AngelkPetkov/titanium_mobile,kopiro/titanium_mobile,KangaCoders/titanium_mobile,mvitr/titanium_mobile,falkolab/titanium_mobile,pinnamur/titanium_mobile,shopmium/titanium_mobile,bright-sparks/titanium_mobile,hieupham007/Titanium_Mobile,KangaCoders/titanium_mobile,perdona/titanium_mobile,peymanmortazavi/titanium_mobile,openbaoz/titanium_mobile,collinprice/titanium_mobile,jhaynie/titanium_mobile,pec1985/titanium_mobile,smit1625/titanium_mobile,mano-mykingdom/titanium_mobile,jhaynie/titanium_mobile,jvkops/titanium_mobile,pinnamur/titanium_mobile,jvkops/titanium_mobile,prop/titanium_mobile,indera/titanium_mobile,kopiro/titanium_mobile,emilyvon/titanium_mobile,emilyvon/titanium_mobile,KoketsoMabuela92/titanium_mobile,shopmium/titanium_mobile,sriks/titanium_mobile,KangaCoders/titanium_mobile,collinprice/titanium_mobile,indera/titanium_mobile,bhatfield/titanium_mobile,AngelkPetkov/titanium_mobile,peymanmortazavi/titanium_mobile,FokkeZB/titanium_mobile,taoger/titanium_mobile,emilyvon/titanium_mobile,prop/titanium_mobile,kopiro/titanium_mobile,openbaoz/titanium_mobile,linearhub/titanium_mobile,openbaoz/titanium_mobile,FokkeZB/titanium_mobile,openbaoz/titanium_mobile,cheekiatng/titanium_mobile,collinprice/titanium_mobile,perdona/titanium_mobile,rblalock/titanium_mobile,bhatfield/titanium_mobile,kopiro/titanium_mobile,prop/titanium_mobile,mano-mykingdom/titanium_mobile,rblalock/titanium_mobile,pec1985/titanium_mobile,bhatfield/titanium_mobile,cheekiatng/titanium_mobile,mano-mykingdom/titanium_mobile,taoger/titanium_mobile,falkolab/titanium_mobile,linearhub/titanium_mobile,ashcoding/titanium_mobile,benbahrenburg/titanium_mobile,prop/titanium_mobile,shopmium/titanium_mobile,bhatfield/titanium_mobile,openbaoz/titanium_mobile,pec1985/titanium_mobile,indera/titanium_mobile,smit1625/titanium_mobile,mvitr/titanium_mobile,csg-coder/titanium_mobile,jhaynie/titanium_mobile,smit1625/titanium_mobile,smit1625/titanium_mobile,perdona/titanium_mobile,bright-sparks/titanium_mobile,cheekiatng/titanium_mobile,pec1985/titanium_mobile,AngelkPetkov/titanium_mobile,ashcoding/titanium_mobile,prop/titanium_mobile,shopmium/titanium_mobile,bhatfield/titanium_mobile,falkolab/titanium_mobile,emilyvon/titanium_mobile,pinnamur/titanium_mobile,collinprice/titanium_mobile,ashcoding/titanium_mobile,KoketsoMabuela92/titanium_mobile,hieupham007/Titanium_Mobile,ashcoding/titanium_mobile,jhaynie/titanium_mobile,sriks/titanium_mobile,bright-sparks/titanium_mobile,linearhub/titanium_mobile,sriks/titanium_mobile,hieupham007/Titanium_Mobile,mvitr/titanium_mobile,linearhub/titanium_mobile,FokkeZB/titanium_mobile,FokkeZB/titanium_mobile,bright-sparks/titanium_mobile,KangaCoders/titanium_mobile,formalin14/titanium_mobile,linearhub/titanium_mobile,openbaoz/titanium_mobile,pinnamur/titanium_mobile,indera/titanium_mobile,bhatfield/titanium_mobile,rblalock/titanium_mobile,cheekiatng/titanium_mobile,hieupham007/Titanium_Mobile,jvkops/titanium_mobile,taoger/titanium_mobile,emilyvon/titanium_mobile,hieupham007/Titanium_Mobile,perdona/titanium_mobile,benbahrenburg/titanium_mobile,openbaoz/titanium_mobile,taoger/titanium_mobile,mano-mykingdom/titanium_mobile,pinnamur/titanium_mobile,falkolab/titanium_mobile,sriks/titanium_mobile,pec1985/titanium_mobile,csg-coder/titanium_mobile,KoketsoMabuela92/titanium_mobile,cheekiatng/titanium_mobile,shopmium/titanium_mobile,sriks/titanium_mobile,KoketsoMabuela92/titanium_mobile,perdona/titanium_mobile,peymanmortazavi/titanium_mobile,indera/titanium_mobile,FokkeZB/titanium_mobile,indera/titanium_mobile,rblalock/titanium_mobile,formalin14/titanium_mobile,jvkops/titanium_mobile,taoger/titanium_mobile,mano-mykingdom/titanium_mobile,mvitr/titanium_mobile,pinnamur/titanium_mobile,csg-coder/titanium_mobile,AngelkPetkov/titanium_mobile,collinprice/titanium_mobile,smit1625/titanium_mobile,benbahrenburg/titanium_mobile,jvkops/titanium_mobile,sriks/titanium_mobile,sriks/titanium_mobile,rblalock/titanium_mobile,formalin14/titanium_mobile,rblalock/titanium_mobile,jvkops/titanium_mobile,mvitr/titanium_mobile,prop/titanium_mobile,KoketsoMabuela92/titanium_mobile,bright-sparks/titanium_mobile,hieupham007/Titanium_Mobile,prop/titanium_mobile,formalin14/titanium_mobile,formalin14/titanium_mobile,taoger/titanium_mobile,formalin14/titanium_mobile,KangaCoders/titanium_mobile,smit1625/titanium_mobile,collinprice/titanium_mobile,mvitr/titanium_mobile,smit1625/titanium_mobile,kopiro/titanium_mobile,emilyvon/titanium_mobile,pec1985/titanium_mobile,emilyvon/titanium_mobile,mano-mykingdom/titanium_mobile,AngelkPetkov/titanium_mobile,falkolab/titanium_mobile,cheekiatng/titanium_mobile,FokkeZB/titanium_mobile,KangaCoders/titanium_mobile,benbahrenburg/titanium_mobile,ashcoding/titanium_mobile,mano-mykingdom/titanium_mobile,hieupham007/Titanium_Mobile,perdona/titanium_mobile,kopiro/titanium_mobile,csg-coder/titanium_mobile,csg-coder/titanium_mobile,falkolab/titanium_mobile,AngelkPetkov/titanium_mobile,KoketsoMabuela92/titanium_mobile,taoger/titanium_mobile,jvkops/titanium_mobile,FokkeZB/titanium_mobile,falkolab/titanium_mobile,indera/titanium_mobile,bhatfield/titanium_mobile,jhaynie/titanium_mobile,jhaynie/titanium_mobile,benbahrenburg/titanium_mobile,AngelkPetkov/titanium_mobile,ashcoding/titanium_mobile,benbahrenburg/titanium_mobile,mano-mykingdom/titanium_mobile,bright-sparks/titanium_mobile,cheekiatng/titanium_mobile,rblalock/titanium_mobile,cheekiatng/titanium_mobile,pec1985/titanium_mobile,bhatfield/titanium_mobile,ashcoding/titanium_mobile,mvitr/titanium_mobile,collinprice/titanium_mobile,jvkops/titanium_mobile,openbaoz/titanium_mobile,KangaCoders/titanium_mobile,peymanmortazavi/titanium_mobile,formalin14/titanium_mobile,peymanmortazavi/titanium_mobile,smit1625/titanium_mobile,indera/titanium_mobile,csg-coder/titanium_mobile,peymanmortazavi/titanium_mobile,pec1985/titanium_mobile,pec1985/titanium_mobile,jhaynie/titanium_mobile,pinnamur/titanium_mobile,peymanmortazavi/titanium_mobile,linearhub/titanium_mobile,linearhub/titanium_mobile,bright-sparks/titanium_mobile,csg-coder/titanium_mobile,perdona/titanium_mobile,linearhub/titanium_mobile,benbahrenburg/titanium_mobile,KoketsoMabuela92/titanium_mobile,csg-coder/titanium_mobile,perdona/titanium_mobile,kopiro/titanium_mobile,shopmium/titanium_mobile,pinnamur/titanium_mobile,hieupham007/Titanium_Mobile,mvitr/titanium_mobile,collinprice/titanium_mobile,formalin14/titanium_mobile,FokkeZB/titanium_mobile,peymanmortazavi/titanium_mobile,AngelkPetkov/titanium_mobile,pinnamur/titanium_mobile |
8980a36ed47ebab217481f64851f586508a53618 | MBContactPicker/UICollectionViewContactFlowLayout.h | MBContactPicker/UICollectionViewContactFlowLayout.h | //
// UICollectionViewContactFlowLayout.h
// MBContactPicker
//
// Created by Matt Bowman on 12/1/13.
// Copyright (c) 2013 Citrrus, LLC. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol UICollectionViewDelegateContactFlowLayout <UICollectionViewDelegateFlowLayout>
- (void)collectionView:(UICollectionView*)collectionView willChangeContentSizeFrom:(CGSize)currentSize to:(CGSize)newSize;
@end
@interface UICollectionViewContactFlowLayout : UICollectionViewFlowLayout
@end
| //
// UICollectionViewContactFlowLayout.h
// MBContactPicker
//
// Created by Matt Bowman on 12/1/13.
// Copyright (c) 2013 Citrrus, LLC. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol UICollectionViewContactFlowLayoutDelegate
- (void)collectionView:(UICollectionView*)collectionView willChangeContentSizeFrom:(CGSize)currentSize to:(CGSize)newSize;
@end
@interface UICollectionViewContactFlowLayout : UICollectionViewFlowLayout
@end
| Rename ContactFlowLayout’s protocol to match the class name | Rename ContactFlowLayout’s protocol to match the class name
| C | mit | octanner/MBContactPicker,xuzhiming/MBContactPicker,Citrrus/MBContactPicker |
ae1b938494ad128dedf7bcf86201130011a5bc0c | cmd/tools/convert.h | cmd/tools/convert.h | /* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef CONVERT_H
#define CONVERT_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef USE_CGRAPH
#include <cgraph.h>
#include <cghdr.h>
#else
#include <agraph.h>
#endif
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <string.h>
extern void gv_to_gxl(Agraph_t *, FILE *);
#ifdef HAVE_LIBEXPAT
extern Agraph_t *gxl_to_gv(FILE *);
#endif
#endif
#ifdef __cplusplus
}
#endif
| /* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef CONVERT_H
#define CONVERT_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef USE_CGRAPH
#include <cgraph.h>
#include <cghdr.h>
#else
#include <agraph.h>
#endif
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <string.h>
extern void gv_to_gxl(Agraph_t *, FILE *);
#ifdef HAVE_EXPAT
extern Agraph_t *gxl_to_gv(FILE *);
#endif
#endif
#ifdef __cplusplus
}
#endif
| Add --without-expat support to ./configure | Add --without-expat support to ./configure
| C | epl-1.0 | tkelman/graphviz,kbrock/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,jho1965us/graphviz,jho1965us/graphviz,ellson/graphviz,BMJHayward/graphviz,pixelglow/graphviz,BMJHayward/graphviz,jho1965us/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,pixelglow/graphviz,tkelman/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,jho1965us/graphviz,kbrock/graphviz,MjAbuz/graphviz,pixelglow/graphviz,MjAbuz/graphviz,jho1965us/graphviz,kbrock/graphviz,tkelman/graphviz,ellson/graphviz,MjAbuz/graphviz,tkelman/graphviz,tkelman/graphviz,pixelglow/graphviz,jho1965us/graphviz,pixelglow/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,pixelglow/graphviz,tkelman/graphviz,kbrock/graphviz,kbrock/graphviz,ellson/graphviz,pixelglow/graphviz,pixelglow/graphviz,MjAbuz/graphviz,ellson/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,ellson/graphviz,ellson/graphviz,ellson/graphviz,MjAbuz/graphviz,kbrock/graphviz,MjAbuz/graphviz,jho1965us/graphviz,ellson/graphviz,pixelglow/graphviz,jho1965us/graphviz,tkelman/graphviz,kbrock/graphviz,kbrock/graphviz,BMJHayward/graphviz,ellson/graphviz,tkelman/graphviz,jho1965us/graphviz,kbrock/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,kbrock/graphviz,ellson/graphviz,tkelman/graphviz,tkelman/graphviz,pixelglow/graphviz,pixelglow/graphviz,jho1965us/graphviz,ellson/graphviz,kbrock/graphviz,jho1965us/graphviz,tkelman/graphviz |
eb6524ce84deaee1d83f165afc4b9698375d524e | ch1/replaceSpace.c | ch1/replaceSpace.c | #include <stdio.h>
int main(int argc, char** argv) {
if (argc < 2) {
printf("Too few arguments\n");
return 1;
}
char* word = argv[1];
// Length AFTER replacing ' ' with "%20", counting '\0'
int rlen = 1;
// Determine length of new word
for (int i = 0; word[i]; ++i) {
rlen += (word[i] == ' ') ? 3 : 1;
}
char rstr[rlen];
int ridx = 0;
for (int i = 0; word[i]; ++i) {
if (word[i] == ' ') {
rstr[ridx] = '%';
rstr[ridx + 1] = '2';
rstr[ridx + 2] = '0';
ridx += 3;
}
else {
rstr[ridx] = word[i];
ridx += 1;
}
}
// Always null terminate :)
rstr[rlen - 1] = '\0';
printf("Replaced string is %s.\n", rstr);
return 0;
}
| Replace spaces with "%20" in a string | Replace spaces with "%20" in a string
| C | mit | WalrusCow/ctci |
|
e788cb041968881a53bab4c64974549373a7b1d7 | src/allocators/page_heap.h | src/allocators/page_heap.h | // Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved.
// Please see the AUTHORS file for details. Use of this source code is governed
// by a BSD license that can be found in the LICENSE file.
#ifndef SCALLOC_ALLOCATORS_PAGE_HEAP_H_
#define SCALLOC_ALLOCATORS_PAGE_HEAP_H_
#include "common.h"
#include "distributed_queue.h"
namespace scalloc {
class PageHeap {
public:
static void InitModule();
static PageHeap* GetHeap();
void* Get();
void Put(void* p);
void AsyncRefill();
private:
static const size_t kPageHeapBackends = 4;
static const size_t kPageRefill = 4;
static PageHeap page_heap_ cache_aligned;
DistributedQueue page_pool_ cache_aligned;
};
always_inline PageHeap* PageHeap::GetHeap() {
return &page_heap_;
}
always_inline void PageHeap::Put(void* p) {
page_pool_.Enqueue(p);
}
always_inline void* PageHeap::Get() {
REDO:
void* result = page_pool_.Dequeue();
if (UNLIKELY(result == NULL)) {
AsyncRefill();
goto REDO;
}
return result;
}
} // namespace scalloc
#endif // SCALLOC_ALLOCATORS_PAGE_HEAP_H_
| // Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved.
// Please see the AUTHORS file for details. Use of this source code is governed
// by a BSD license that can be found in the LICENSE file.
#ifndef SCALLOC_ALLOCATORS_PAGE_HEAP_H_
#define SCALLOC_ALLOCATORS_PAGE_HEAP_H_
#include "common.h"
#include "distributed_queue.h"
namespace scalloc {
class PageHeap {
public:
static void InitModule();
static PageHeap* GetHeap();
void* Get();
void Put(void* p);
void AsyncRefill();
private:
static const size_t kPageHeapBackends = 4;
static const size_t kPageRefill = 24;
static PageHeap page_heap_ cache_aligned;
DistributedQueue page_pool_ cache_aligned;
};
always_inline PageHeap* PageHeap::GetHeap() {
return &page_heap_;
}
always_inline void PageHeap::Put(void* p) {
LOG(kTrace, "[PageHeap]: put: %p", p);
page_pool_.Enqueue(p);
}
always_inline void* PageHeap::Get() {
REDO:
void* result = page_pool_.Dequeue();
if (UNLIKELY(result == NULL)) {
AsyncRefill();
goto REDO;
}
LOG(kTrace, "[PageHeap]: get: %p", result);
return result;
}
} // namespace scalloc
#endif // SCALLOC_ALLOCATORS_PAGE_HEAP_H_
| Increase refill and add logging. | PageHeap: Increase refill and add logging.
Signed-off-by: Michael Lippautz <[email protected]>
| C | bsd-2-clause | cksystemsgroup/scalloc,cksystemsgroup/scalloc,cksystemsgroup/scalloc |
28d0a9c9dd68320482f506e9a36848f70d3807a0 | src/egl/main/egltypedefs.h | src/egl/main/egltypedefs.h | #ifndef EGLTYPEDEFS_INCLUDED
#define EGLTYPEDEFS_INCLUDED
#include <GL/egl.h>
typedef struct _egl_config _EGLConfig;
typedef struct _egl_context _EGLContext;
typedef struct _egl_display _EGLDisplay;
typedef struct _egl_driver _EGLDriver;
typedef struct _egl_mode _EGLMode;
typedef struct _egl_screen _EGLScreen;
typedef struct _egl_surface _EGLSurface;
typedef void (*_EGLProc)();
typedef _EGLDriver *(*_EGLMain_t)(_EGLDisplay *dpy);
#endif /* EGLTYPEDEFS_INCLUDED */
| #ifndef EGLTYPEDEFS_INCLUDED
#define EGLTYPEDEFS_INCLUDED
#include <GLES/egl.h>
typedef struct _egl_config _EGLConfig;
typedef struct _egl_context _EGLContext;
typedef struct _egl_display _EGLDisplay;
typedef struct _egl_driver _EGLDriver;
typedef struct _egl_mode _EGLMode;
typedef struct _egl_screen _EGLScreen;
typedef struct _egl_surface _EGLSurface;
typedef void (*_EGLProc)();
typedef _EGLDriver *(*_EGLMain_t)(_EGLDisplay *dpy);
#endif /* EGLTYPEDEFS_INCLUDED */
| Fix include path to make build work | Fix include path to make build work
| C | mit | jbarczak/glsl-optimizer,tokyovigilante/glsl-optimizer,tokyovigilante/glsl-optimizer,jbarczak/glsl-optimizer,djreep81/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,djreep81/glsl-optimizer,zz85/glsl-optimizer,zz85/glsl-optimizer,djreep81/glsl-optimizer,jbarczak/glsl-optimizer,tokyovigilante/glsl-optimizer,benaadams/glsl-optimizer,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,adobe/glsl2agal,metora/MesaGLSLCompiler,adobe/glsl2agal,zz85/glsl-optimizer,zz85/glsl-optimizer,KTXSoftware/glsl2agal,dellis1972/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,KTXSoftware/glsl2agal,wolf96/glsl-optimizer,mapbox/glsl-optimizer,wolf96/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,dellis1972/glsl-optimizer,KTXSoftware/glsl2agal,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,dellis1972/glsl-optimizer,mcanthony/glsl-optimizer,mapbox/glsl-optimizer,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,wolf96/glsl-optimizer,metora/MesaGLSLCompiler,djreep81/glsl-optimizer,adobe/glsl2agal,zeux/glsl-optimizer,benaadams/glsl-optimizer,wolf96/glsl-optimizer,mcanthony/glsl-optimizer,bkaradzic/glsl-optimizer,bkaradzic/glsl-optimizer,mcanthony/glsl-optimizer,mapbox/glsl-optimizer,tokyovigilante/glsl-optimizer,adobe/glsl2agal,KTXSoftware/glsl2agal,adobe/glsl2agal,zeux/glsl-optimizer,benaadams/glsl-optimizer,wolf96/glsl-optimizer,bkaradzic/glsl-optimizer,mapbox/glsl-optimizer,benaadams/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,tokyovigilante/glsl-optimizer,mapbox/glsl-optimizer,metora/MesaGLSLCompiler,zeux/glsl-optimizer,KTXSoftware/glsl2agal,djreep81/glsl-optimizer |
9d73dedb1c7e99cbb4a618dc711980ccf153e946 | source/main.c | source/main.c | #include <stdio.h>
#include "y.tab.h"
int main(int argc, char ** argv)
{
if(argc > 1)
{
yyin = fopen(argv[1], "r");
if(yyin == NULL)
{
printf("File doesn't exits.\n");
return 1;
}
strcpy(file_name, argv[1]);
if(argc > 2)
{
if(strcmp(argv[2], "-print-tree") == 0)
is_to_print = true;
}
}
read_file();
yyparse();
if(!has_error)
printf("\033[1;32mCompile Success!\033[0m\n");
return 0;
}
| #include <stdio.h>
#include "list.h"
#include "syntax.h"
#include "scc_yacc.hpp"
extern FILE * yyin;
extern char *file_content[1024];
extern char file_name[1024];
extern int yyparse();
void read_file()
{
for(int i = 0; !feof(yyin); i++)
{
file_content[i] = (char * )malloc(1024 * sizeof(char));
fgets(file_content[i], 1024, yyin);
file_content[i][strlen(file_content[i]) - 1] = '\0';
}
fseek(yyin, 0, 0);
}
int main(int argc, char ** argv)
{
// read from file
if(argc > 1)
{
strcpy(file_name, argv[1]);
yyin = fopen(argv[1], "r");
if(yyin == NULL)
{
printf("File doesn't exits.\n");
return 1;
}
}
// TODO: macro expansion
// grammer analysis
read_file();
if(yyparse() != 0)
return 0;
// semantic analysis
printf("\033[1;32mCompile Success!\033[0m\n");
return 0;
}
| Clean yacc file, move other functions out of it. | Clean yacc file, move other functions out of it.
| C | mit | RyanWangGit/scc |
31994ec56073fc6eb530d2162109613f411398b2 | src/vast/util/broccoli.h | src/vast/util/broccoli.h | #ifndef VAST_UTIL_BROCCOLI_H
#define VAST_UTIL_BROCCOLI_H
#include <ze/fwd.h>
#include "vast/util/server.h"
// Forward declaration.
struct bro_conn;
namespace vast {
namespace util {
namespace broccoli {
struct connection;
typedef util::server<connection> server;
typedef std::function<void(ze::event)> event_handler;
/// Initializes Broccoli. This function must be called before any other call
/// into the Broccoli library.
/// @param messages If `true`, show message contents and protocol details.
/// @param calltrace If `true`, enable call tracing.
void init(bool messages = false, bool calltrace = false);
/// A Broccoli connection actor.
struct connection : cppa::sb_actor<connection>
{
/// Spawns a new Broccoli connection.
/// @param The input stream to read data from.
/// @param The output stream to read data from.
connection(
cppa::network::input_stream_ptr in,
cppa::network::output_stream_ptr out);
struct bro_conn* bc_;
cppa::network::input_stream_ptr in_;
cppa::network::output_stream_ptr out_;
event_handler event_handler_;
//std::vector<ze::event> events_;
cppa::behavior init_state;
};
} // namespace broccoli
} // namespace vast
} // namespace util
#endif
| #ifndef VAST_UTIL_BROCCOLI_H
#define VAST_UTIL_BROCCOLI_H
#include <ze/fwd.h>
#include "vast/util/server.h"
namespace vast {
namespace util {
namespace broccoli {
// Forward declarations.
struct bro_conn;
struct connection;
typedef util::server<connection> server;
typedef std::function<void(ze::event)> event_handler;
/// Initializes Broccoli. This function must be called before any other call
/// into the Broccoli library.
/// @param messages If `true`, show message contents and protocol details.
/// @param calltrace If `true`, enable call tracing.
void init(bool messages = false, bool calltrace = false);
/// A Broccoli connection actor.
struct connection : cppa::sb_actor<connection>
{
/// Spawns a new Broccoli connection.
/// @param The input stream to read data from.
/// @param The output stream to read data from.
connection(
cppa::network::input_stream_ptr in,
cppa::network::output_stream_ptr out);
struct bro_conn* bc_;
cppa::network::input_stream_ptr in_;
cppa::network::output_stream_ptr out_;
event_handler event_handler_;
//std::vector<ze::event> events_;
cppa::behavior init_state;
};
} // namespace broccoli
} // namespace vast
} // namespace util
#endif
| Move forward decls in right namespace. | Move forward decls in right namespace.
| C | bsd-3-clause | pmos69/vast,vast-io/vast,mavam/vast,mavam/vast,vast-io/vast,pmos69/vast,mavam/vast,vast-io/vast,pmos69/vast,mavam/vast,pmos69/vast,vast-io/vast,vast-io/vast |
59a02d9d0232ed21cddd04d2c60131e9e3e6e69f | src/os/Win32/open.c | src/os/Win32/open.c | #include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
FILE *os_fopen(const char *path, const char *mode)
{
return fopen(path, mode);
}
int os_set_non_blocking(FILE *stream)
{
(void)stream;
/* TODO support non-blocking (overlapped ?) file handles */
return 1; // return failure for now
}
| Add no-op Win32 impl for non-blocking fd | Add no-op Win32 impl for non-blocking fd
| C | mit | kulp/tenyr,kulp/tenyr,kulp/tenyr |
|
a95b411928a332a324b9b48d2e1823b68fd8a4cb | copasi/output/CUDFunction.h | copasi/output/CUDFunction.h | /*****************************************************************************
* PROGRAM NAME: CUDFunction.h
* PROGRAMMER: Wei Sun [email protected]
* PURPOSE: Define the user defined function object
*****************************************************************************/
#ifndef COPASI_CUDFunction
#define COPASI_CUDFunction
#include <string>
#include "copasi.h"
#include "utilities/utilities.h"
#include "function/CBaseFunction.h"
#include "CNodeO.h"
class CUDFunction: public CBaseFunction
{
private:
/**
* The vector of nodes of the binary tree of the function
*/
CCopasiVectorS < CNodeO > mNodes;
/**
* Internal variable
*/
unsigned C_INT32 mNidx;
public:
/**
* Default constructor
*/
CUDFunction();
/**
* This creates a user defined function with a name an description
* @param "const string" &name
* @param "const string" &description
*/
CUDFunction(const string & name,
const string & description);
/**
* Destructor
*/
~CUDFunction();
/**
* Delete
*/
void cleanup();
/**
* Copy
*/
void copy(const CUDFunction & in);
/**
* Loads an object with data coming from a CReadConfig object.
* (CReadConfig object reads an input stream)
* @param pconfigbuffer reference to a CReadConfig object.
* @return Fail
*/
C_INT32 load(CReadConfig & configbuffer,
CReadConfig::Mode mode = CReadConfig::LOOP);
/**
* Saves the contents of the object to a CWriteConfig object.
* (Which usually has a file attached but may also have socket)
* @param pconfigbuffer reference to a CWriteConfig object.
* @return Fail
*/
C_INT32 save(CWriteConfig & configbuffer);
/**
* This retrieves the node tree of the function
* @return "CCopasiVectorS < CNodeO > &"
*/
CCopasiVectorS < CNodeO > & nodes();
private:
/**
* This clears all nodes of the function tree
*/
void clearNodes();
/**
* This connects the nodes to build the binary function tree
*/
C_INT32 connectNodes();
CNodeO * parseExpression(C_INT16 priority);
CNodeO * parsePrimary();
};
#endif
| Define the user defined functions | Define the user defined functions
| C | artistic-2.0 | copasi/COPASI,jonasfoe/COPASI,jonasfoe/COPASI,copasi/COPASI,jonasfoe/COPASI,copasi/COPASI,copasi/COPASI,jonasfoe/COPASI,copasi/COPASI,copasi/COPASI,jonasfoe/COPASI,jonasfoe/COPASI,copasi/COPASI,jonasfoe/COPASI,jonasfoe/COPASI,copasi/COPASI,jonasfoe/COPASI,copasi/COPASI |
|
6dbc01bdc114c92c2b76b8999572aaaf97f0b988 | SplitEveryNodeOddEvenData.c | SplitEveryNodeOddEvenData.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct node {
int data;
struct node *next;
};
struct node *createNode (int value) {
struct node *newNode = (struct node *) malloc (sizeof (struct node));
newNode -> data = value;
newNode -> next = NULL;
return newNode;
}
void insertNode (struct node **head_ref, struct node **tail_ref, int value) {
struct node *newNode = createNode (value);
if (*head_ref == NULL) {
*head_ref = newNode;
*tail_ref = newNode;
}
else {
(*tail_ref) -> next = newNode;
*tail_ref = newNode;
}
}
void printList (struct node *head) {
while (head != NULL) {
printf ("%d -> ", head->data);
head = head->next;
}
printf ("NULL\n");
}
void destroyList (struct node *head) {
struct node *nextNode = head;
while (head != NULL) {
nextNode = head -> next;
free (head);
head = nextNode;
}
printf("Destroyed it\n" );
}
void splitEveryNodeOnOddEvenData (struct node **head_ref) {
struct node *currentNode = NULL;
struct node *nextNode = NULL;
struct node *newNode = NULL;
int element;
currentNode = (*head_ref);
if (currentNode == NULL) {
return;
}
while (currentNode != NULL) {
nextNode = currentNode->next;
element = currentNode->data;
if (element % 2 == 0) {
newNode = createNode (element/2);
currentNode->data /= 2;
}
else {
newNode = createNode (element - element/2);
currentNode->data /= 2;
}
currentNode->next = newNode;
newNode->next = nextNode;
currentNode = nextNode;
}
}
int main (int argc, char *argv[]) {
int value;
struct node *head = NULL;
struct node *tail = NULL;
char buffer[2048];
char *p = NULL;
fgets (buffer, 2048, stdin);
p = strtok (buffer, "NULL > | \n");
while (p != NULL) {
sscanf (p, "%d", &value);
insertNode (&head, &tail, value);
p = strtok (NULL, "NULL null | > \n");
}
printList (head);
splitEveryNodeOnOddEvenData (&head);
printList (head);
destroyList (head);
head = NULL;
tail = NULL;
return 0;
}
| Split every node into two based on node data | Split every node into two based on node data
Split every node into two nodes based on data of the node. If the data is odd, the second node gets the greater half. | C | mit | devrezo/iaap |
|
b948816730acd4d25151d8dceaa1a0f9df30c04a | sassc.c | sassc.c | #include <stdio.h>
#include "libsass/sass_interface.h"
int main(int argc, char** argv)
{
if (argc < 2) {
printf("Usage: sassc [INPUT FILE]\n");
return 0;
}
struct sass_file_context* ctx = sass_new_file_context();
ctx->options.include_paths = "";
ctx->options.image_path = "images";
ctx->options.output_style = SASS_STYLE_NESTED;
ctx->input_path = argv[1];
sass_compile_file(ctx);
if (ctx->error_status) {
if (ctx->error_message)
printf("%s", ctx->error_message);
else
printf("An error occured; no error message available.\n");
}
else if (ctx->output_string) {
printf("%s", ctx->output_string);
}
else {
printf("Unknown internal error.\n");
}
sass_free_file_context(ctx);
return 0;
}
| #include <stdio.h>
#include "libsass/sass_interface.h"
int main(int argc, char** argv)
{
int ret;
if (argc < 2) {
printf("Usage: sassc [INPUT FILE]\n");
return 0;
}
struct sass_file_context* ctx = sass_new_file_context();
ctx->options.include_paths = "";
ctx->options.image_path = "images";
ctx->options.output_style = SASS_STYLE_NESTED;
ctx->input_path = argv[1];
sass_compile_file(ctx);
if (ctx->error_status) {
if (ctx->error_message)
printf("%s", ctx->error_message);
else
printf("An error occured; no error message available.\n");
ret = 1;
}
else if (ctx->output_string) {
printf("%s", ctx->output_string);
ret = 0;
}
else {
printf("Unknown internal error.\n");
ret = 2;
}
sass_free_file_context(ctx);
return ret;
}
| Exit with an error code when an error occurs. | Exit with an error code when an error occurs.
| C | mit | saper/sassc,am11/sassc,am11/sassc,djam90/sassc,djam90/sassc,am11/sassc,saper/sassc,saper/sassc,rightisleft/sassc,rightisleft/sassc,rightisleft/sassc,djam90/sassc |
3a2a226a40c5605ff77d126f262869d88205b42d | tests/regression/56-witness/51-witness-lifter-ps1.c | tests/regression/56-witness/51-witness-lifter-ps1.c | // PARAM: --enable ana.sv-comp.enabled --enable ana.sv-comp.functions --set ana.specification 'CHECK( init(main()), LTL(G ! call(reach_error())) )' --enable ana.int.interval
// previously both branches dead
// simplified from 28-race_reach/06-cond_racing1
#include <pthread.h>
#include <assert.h>
int __VERIFIER_nondet_int();
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
int main() {
int i = __VERIFIER_nondet_int();
if (i) pthread_mutex_lock(&mutex);
if (i)
assert(1); // reachable
else
assert(1); // reachable
assert(1); // reachable
return 0;
} | Add witness lifter path sensitive unsound branch test | Add witness lifter path sensitive unsound branch test
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
a4814f155a44cd35b91f8913669eff81aa54f617 | ObjectiveRocks/RocksDBPrefixExtractor.h | ObjectiveRocks/RocksDBPrefixExtractor.h | //
// RocksDBPrefixExtractor.h
// ObjectiveRocks
//
// Created by Iska on 26/12/14.
// Copyright (c) 2014 BrainCookie. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSUInteger, RocksDBPrefixType)
{
RocksDBPrefixFixedLength
};
@interface RocksDBPrefixExtractor : NSObject
+ (instancetype)prefixExtractorWithType:(RocksDBPrefixType)type length:(size_t)length;
- (instancetype)initWithName:(NSString *)name
transformBlock:(id (^)(id key))transformBlock
prefixCandidateBlock:(BOOL (^)(id key))prefixCandidateBlock
validPrefixBlock:(BOOL (^)(id prefix))validPrefixBlock;
@end
| //
// RocksDBPrefixExtractor.h
// ObjectiveRocks
//
// Created by Iska on 26/12/14.
// Copyright (c) 2014 BrainCookie. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
Constants for the built-in prefix extractors.
*/
typedef NS_ENUM(NSUInteger, RocksDBPrefixType)
{
/** @brief Extract a fixed-length prefix for each key. */
RocksDBPrefixFixedLength
};
/**
`RocksDBIterator` supports iterating inside a key-prefix by providing a `RocksDBPrefixExtractor`.
The `RocksDBPrefixExtractor` defines a Slice-Transform function that is applied to each key when
itarating the DB in order to extract the prefix for the prefix-seek API.
*/
@interface RocksDBPrefixExtractor : NSObject
/**
Intializes a new instance of the prefix extarctor with the given type and length.
@param type The type of the prefix extractor.
@param length The length of the desired prefix.
@return A newly-initialized instance of a prefix extractor.
*/
+ (instancetype)prefixExtractorWithType:(RocksDBPrefixType)type length:(size_t)length;
/**
Intializes a new instance of the prefix extarctor with the given transformation functions.
@param transformBlock A block to apply to each key to extract the prefix.
@param prefixCandidateBlock A block that is applied to each key before the transformation
in order to filter out keys that are not viable candidates for the custom prefix format,
e.g. key length is smaller than the target prefix length.
@param validPrefixBlock A block that is applied to each key after the transformation in
order to perform extra checks to verify that the extracted prefix is valid.
@return A newly-initialized instance of a prefix extractor.
*/
- (instancetype)initWithName:(NSString *)name
transformBlock:(id (^)(id key))transformBlock
prefixCandidateBlock:(BOOL (^)(id key))prefixCandidateBlock
validPrefixBlock:(BOOL (^)(id prefix))validPrefixBlock;
@end
| Add source code documentation for the Prefix Extractor class | Add source code documentation for the Prefix Extractor class
| C | mit | iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks |
2913ca73b85c670fa06bb15cc15ee6bc79b99214 | mp-imb-test.c | mp-imb-test.c | // Test if message passing works
// Should on x86, not on arm
// Basically always just doesn't see the write at all.
// Probably need to loop.
// On ARM:
// mp - observed
// mp+ctrl - observed
// mp+addr - not observed :( was hoping to
// mp+sync+addr - not observed; good!
#include "atomic.h"
#include <stdio.h>
#include <assert.h>
volatile long data PADDED = 1;
volatile long ready PADDED = 0;
volatile long *pdata;
volatile int foo;
int thread0()
{
// Trying a bunch of things to see if I can get that ready write
// to happen before the data one, but I haven't managed.
// extern int go; /* durrrr */
// data = go * go + 1;
*pdata = 1;
// smp_mb();
ready = 1;
return 0;
}
int thread1()
{
int rready;
while (!(rready = ready));
ctrl_isync(rready);
int rdata = data;
return ((!!rdata)<<1) | rready;
}
void reset()
{
pdata = &data;
assert(data != 0);
ready = 0;
data = 0;
}
// Formatting results
int result_counts[4];
void process_results(int *r)
{
int idx = r[1];
result_counts[idx]++;
}
void summarize_results()
{
for (int r0 = 0; r0 <= 1; r0++) {
for (int r1 = 0; r1 <= 1; r1++) {
int idx = (r1<<1) | r0;
printf("ready=%d data=%d: %d\n", r0, r1, result_counts[idx]);
}
}
printf("&data = %p, &ready=%p\n", &data, &ready);
}
typedef int (test_fn)();
test_fn *test_fns[] = {thread0, thread1};
int thread_count = 2;
| Add an MP test that uses imb instead of deps | Add an MP test that uses imb instead of deps
| C | mit | msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler |
|
591ae5483d1838718b59cd26b5e2ad108c9446a4 | ImWindowDX11/ImwWindowManagerDX11.h | ImWindowDX11/ImwWindowManagerDX11.h |
#ifndef __IM_WINDOW_MANAGER_DX11_H__
#define __IM_WINDOW_MANAGER_DX11_H__
#include "ImwConfig.h"
#include "ImwWindowManager.h"
namespace ImWindow
{
class ImwWindowManagerDX11 : public ImwWindowManager
{
public:
ImwWindowManagerDX11();
virtual ~ImwWindowManagerDX11();
protected:
virtual ImwPlatformWindow* CreatePlatformWindow(bool bMain, ImwPlatformWindow* pParent, bool bDragWindow);
virtual void LogFormatted(const char* pStr);
virtual void InternalRun();
virtual ImVec2 GetCursorPos();
virtual bool IsLeftClickDown();
};
}
#endif //__IM_WINDOW_MANAGER_DX11_H__ |
#ifndef __IM_WINDOW_MANAGER_DX11_H__
#define __IM_WINDOW_MANAGER_DX11_H__
#include "ImwConfig.h"
#include "ImwWindowManager.h"
namespace ImWindow
{
class ImwWindowManagerDX11 : public ImwWindowManager
{
public:
ImwWindowManagerDX11();
virtual ~ImwWindowManagerDX11();
protected:
virtual bool CanCreateMultipleWindow() { return true; }
virtual ImwPlatformWindow* CreatePlatformWindow(bool bMain, ImwPlatformWindow* pParent, bool bDragWindow);
virtual void LogFormatted(const char* pStr);
virtual void InternalRun();
virtual ImVec2 GetCursorPos();
virtual bool IsLeftClickDown();
};
}
#endif //__IM_WINDOW_MANAGER_DX11_H__ | Add forgotten function in DX11 implementation | Add forgotten function in DX11 implementation
| C | mit | thennequin/ImWindow,thennequin/ImWindow,thennequin/ImWindow |
0360c3310a40c7d46877d0842f21233e8c6b7e60 | lib/sanitizer_common/sancov_flags.h | lib/sanitizer_common/sancov_flags.h | //===-- sancov_flags.h ------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// Sanitizer Coverage runtime flags.
//
//===----------------------------------------------------------------------===//
#ifndef SANCOV_FLAGS_H
#define SANCOV_FLAGS_H
#include "sanitizer_flag_parser.h"
#include "sanitizer_internal_defs.h"
namespace __sancov {
struct SancovFlags {
#define SANCOV_FLAG(Type, Name, DefaultValue, Description) Type Name;
#include "sancov_flags.inc"
#undef SANCOV_FLAG
void SetDefaults();
};
extern SancovFlags sancov_flags_dont_use_directly;
inline SancovFlags* sancov_flags() { return &sancov_flags_dont_use_directly; }
void InitializeSancovFlags();
extern "C" SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE const char*
__sancov_default_options();
} // namespace __sancov
#endif
| //===-- sancov_flags.h ------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// Sanitizer Coverage runtime flags.
//
//===----------------------------------------------------------------------===//
#ifndef SANCOV_FLAGS_H
#define SANCOV_FLAGS_H
#include "sanitizer_flag_parser.h"
#include "sanitizer_internal_defs.h"
namespace __sancov {
struct SancovFlags {
#define SANCOV_FLAG(Type, Name, DefaultValue, Description) Type Name;
#include "sancov_flags.inc"
#undef SANCOV_FLAG
void SetDefaults();
};
extern SancovFlags sancov_flags_dont_use_directly;
inline SancovFlags* sancov_flags() { return &sancov_flags_dont_use_directly; }
void InitializeSancovFlags();
} // namespace __sancov
extern "C" SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE const char*
__sancov_default_options();
#endif
| Move __sancov_default_options declaration outside the namespace __sancov | [sancov] Move __sancov_default_options declaration outside the namespace __sancov
After this commint, we can include sancov_flags.h and refer to
__sancov_default_options without requiring the namespace prefix.
Differential Revision: https://reviews.llvm.org/D29167
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@293731 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
5d10713e968041bbb85b19b5dc673d33b7d1ef7d | cc1/tests/test022.c | cc1/tests/test022.c |
/*
name: TEST022
description: Basic test for int constants
comments: This test is done for z80 data types
output:
F1
G1 F1 main
{
-
A2 I i
A3 N u
A2 #I1 :I
A2 #IFFFF :I
A2 #IFFFF :I
A2 #IFFFF :I
A2 #IFFFF :I
A2 #I3 :I
A2 #I1 :I
A2 #I0 :I
A3 #N1 :N
A3 #NFFFF :N
A3 #NFFFF :N
A3 #NFFFF :N
A3 #NFFFF :N
A3 #N0 :N
A3 #N3 :N
A3 #N0 :N
y #I0
}
*/
int
main(void)
{
int i;
unsigned u;
i = 1;
i = -1;
i = -1l;
i = -1u;
i = -1ll;
i = 32766 + 1 & 3;
i = (int) 32768 < 0;
i = -1u < 0;
u = 1;
u = -1;
u = -1l;
u = -1u;
u = -1ll;
u = (unsigned) 32768 < 0;
u = 32766 + 1 & 3;
u = -1u < 0;
return 0;
}
| Add basic test for integer constans | Add basic test for integer constans
This test fails at this moment because overflow in constant castings
are not correctly handled.
| C | isc | 8l/scc,k0gaMSX/scc,k0gaMSX/kcc,k0gaMSX/scc,8l/scc,k0gaMSX/kcc,k0gaMSX/scc,8l/scc |
|
68c6b7bf28749e8d71d5cb7d28dceb0cd1592caf | src/FTDebouncer-Lambda.h | src/FTDebouncer-Lambda.h | #include "FTDebouncer.h"
//Dummy function implementations to satisfy linker when using lambdas
void onPinActivated(int pinNumber){}
void onPinDeactivated(int pinNumber){} | #ifndef FTDEBOUNCER_LAMBDA_H
#define FTDEBOUNCER_LAMBDA_H
#include "FTDebouncer.h"
//Dummy function implementations to satisfy linker when using lambdas
void onPinActivated(int pinNumber){}
void onPinDeactivated(int pinNumber){}
#endif | Add include guard for lambda header | Add include guard for lambda header
| C | mit | ubidefeo/FTDebouncer |
fb26025575421f179020b812c4e9e958812a3dee | include/clang/Basic/MacroBuilder.h | include/clang/Basic/MacroBuilder.h | //===--- MacroBuilder.h - CPP Macro building utilitiy -----------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines the MacroBuilder utility class.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_BASIC_MACROBUILDER_H
#define LLVM_CLANG_BASIC_MACROBUILDER_H
#include "llvm/ADT/Twine.h"
#include "llvm/Support/raw_ostream.h"
namespace clang {
class MacroBuilder {
llvm::raw_ostream &Out;
public:
MacroBuilder(llvm::raw_ostream &Output) : Out(Output) {}
/// Append a #define line for macro of the form "#define Name Value\n".
void defineMacro(const llvm::Twine &Name, const llvm::Twine &Value = "1") {
Out << "#define " << Name << ' ' << Value << '\n';
}
/// Append a #undef line for Name. Name should be of the form XXX
/// and we emit "#undef XXX".
void undefineMacro(const llvm::Twine &Name) {
Out << "#undef " << Name << '\n';
}
/// Directly append Str and a newline to the underlying buffer.
void append(const llvm::Twine &Str) {
Out << Str << '\n';
}
};
} // end namespace clang
#endif
| //===--- MacroBuilder.h - CPP Macro building utility ------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines the MacroBuilder utility class.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_BASIC_MACROBUILDER_H
#define LLVM_CLANG_BASIC_MACROBUILDER_H
#include "llvm/ADT/Twine.h"
#include "llvm/Support/raw_ostream.h"
namespace clang {
class MacroBuilder {
llvm::raw_ostream &Out;
public:
MacroBuilder(llvm::raw_ostream &Output) : Out(Output) {}
/// Append a #define line for macro of the form "#define Name Value\n".
void defineMacro(const llvm::Twine &Name, const llvm::Twine &Value = "1") {
Out << "#define " << Name << ' ' << Value << '\n';
}
/// Append a #undef line for Name. Name should be of the form XXX
/// and we emit "#undef XXX".
void undefineMacro(const llvm::Twine &Name) {
Out << "#undef " << Name << '\n';
}
/// Directly append Str and a newline to the underlying buffer.
void append(const llvm::Twine &Str) {
Out << Str << '\n';
}
};
} // end namespace clang
#endif
| Fix a typo pointed about by gabor. | Fix a typo pointed about by gabor.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@93997 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang |
f4b4aae1828855db761bf998ce37d3062b1d6446 | arch/x86/include/uapi/asm/bitsperlong.h | arch/x86/include/uapi/asm/bitsperlong.h | #ifndef __ASM_X86_BITSPERLONG_H
#define __ASM_X86_BITSPERLONG_H
#ifdef __x86_64__
# define __BITS_PER_LONG 64
#else
# define __BITS_PER_LONG 32
#endif
#include <asm-generic/bitsperlong.h>
#endif /* __ASM_X86_BITSPERLONG_H */
| #ifndef __ASM_X86_BITSPERLONG_H
#define __ASM_X86_BITSPERLONG_H
#if defined(__x86_64__) && !defined(__ILP32__)
# define __BITS_PER_LONG 64
#else
# define __BITS_PER_LONG 32
#endif
#include <asm-generic/bitsperlong.h>
#endif /* __ASM_X86_BITSPERLONG_H */
| Fix __BITS_PER_LONG value for x32 builds | x86/headers/uapi: Fix __BITS_PER_LONG value for x32 builds
On x32, gcc predefines __x86_64__ but long is only 32-bit. Use
__ILP32__ to distinguish x32.
Fixes this compiler error in perf:
tools/include/asm-generic/bitops/__ffs.h: In function '__ffs':
tools/include/asm-generic/bitops/__ffs.h:19:8: error: right shift count >= width of type [-Werror=shift-count-overflow]
word >>= 32;
^
This isn't sufficient to build perf for x32, though.
Signed-off-by: Ben Hutchings <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: [email protected]
Signed-off-by: Ingo Molnar <[email protected]>
| C | mit | KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs |
cfb81918edab8bed2c8bbab5602342b60c1a60a7 | runtime/GCCLibraries/libgcc/eprintf.c | runtime/GCCLibraries/libgcc/eprintf.c | #include <stdio.h>
void abort(void);
/* This is used by the `assert' macro. */
void
__eprintf (const char *string, const char *expression,
unsigned int line, const char *filename)
{
fprintf (stderr, string, expression, line, filename);
fflush (stderr);
abort ();
}
| Implement the printf function, used by assert | Implement the printf function, used by assert
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@2666 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm |
|
acd4d69243c48f9bbff625d269b337eed0c47f24 | SSPSolution/SSPSolution/MenuState.h | SSPSolution/SSPSolution/MenuState.h | #ifndef SSPAPPLICATION_GAMESTATES_MENUSTATE_H
#define SSPAPPLICATION_GAMESTATES_MENUSTATE_H
#include "GameState.h"
class MenuState :
public GameState
{
private:
public:
MenuState();
~MenuState();
int ShutDown();
int Initialize(GameStateHandler* gsh, ComponentHandler* cHandler);
int Update(float dt, InputHandler * inputHandler);
private:
};
#endif | #ifndef SSPAPPLICATION_GAMESTATES_MENUSTATE_H
#define SSPAPPLICATION_GAMESTATES_MENUSTATE_H
#include "GameState.h"
#include "../GraphicsDLL/GraphicsComponent.h"
class MenuState :
public GameState
{
private:
const static int m_NR_OF_MENU_ITEMS = 2;
UIComponent* m_uiComps[NR_OF_MENU_ITEMS];
TextComponent* m_textComps[NR_OF_MENU_ITEMS];
public:
MenuState();
~MenuState();
int ShutDown();
int Initialize(GameStateHandler* gsh, ComponentHandler* cHandler);
int Update(float dt, InputHandler * inputHandler);
private:
};
#endif | ADD ui and text comps to menustate | ADD ui and text comps to menustate
| C | apache-2.0 | Chringo/SSP,Chringo/SSP |
9f6454a084ed56920de2c6bb0cfdb3fa258a0e54 | features/cellular/framework/targets/QUECTEL/BC95/QUECTEL_BC95_CellularPower.h | features/cellular/framework/targets/QUECTEL/BC95/QUECTEL_BC95_CellularPower.h | /*
* Copyright (c) 2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef TELIT_HE910_CELLULAR_POWER_H_
#define TELIT_HE910_CELLULAR_POWER_H_
#include "AT_CellularPower.h"
namespace mbed {
class QUECTEL_BC95_CellularPower : public AT_CellularPower
{
public:
QUECTEL_BC95_CellularPower(ATHandler &atHandler);
virtual ~QUECTEL_BC95_CellularPower();
public: //from CellularPower
virtual nsapi_error_t set_at_mode();
virtual nsapi_error_t reset();
};
} // namespace mbed
#endif // TELIT_HE910_CELLULAR_POWER_H_
| /*
* Copyright (c) 2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef QUECTEL_BC95_CELLULAR_POWER_H_
#define QUECTEL_BC95_CELLULAR_POWER_H_
#include "AT_CellularPower.h"
namespace mbed {
class QUECTEL_BC95_CellularPower : public AT_CellularPower
{
public:
QUECTEL_BC95_CellularPower(ATHandler &atHandler);
virtual ~QUECTEL_BC95_CellularPower();
public: //from CellularPower
virtual nsapi_error_t set_at_mode();
virtual nsapi_error_t reset();
};
} // namespace mbed
#endif // QUECTEL_BC95_CELLULAR_POWER_H_
| Fix wrong header define name | Fix wrong header define name
| C | apache-2.0 | andcor02/mbed-os,mbedmicro/mbed,andcor02/mbed-os,mbedmicro/mbed,betzw/mbed-os,betzw/mbed-os,andcor02/mbed-os,betzw/mbed-os,kjbracey-arm/mbed,c1728p9/mbed-os,mbedmicro/mbed,andcor02/mbed-os,betzw/mbed-os,c1728p9/mbed-os,c1728p9/mbed-os,mbedmicro/mbed,mbedmicro/mbed,kjbracey-arm/mbed,c1728p9/mbed-os,kjbracey-arm/mbed,c1728p9/mbed-os,betzw/mbed-os,kjbracey-arm/mbed,andcor02/mbed-os,andcor02/mbed-os,c1728p9/mbed-os,betzw/mbed-os |
0ef745fb407376a381b9e09e73e188a2034d3ad9 | src/dsmcc-compress.h | src/dsmcc-compress.h | #ifndef DSMCC_COMPRESS_H
#define DSMCC_COMPRESS_H
#include <stdbool.h>
#include "dsmcc-config.h"
#include "dsmcc-debug.h"
#ifdef HAVE_ZLIB
bool dsmcc_inflate_file(const char *filename);
#else
static inline bool dsmcc_inflate_file(const char *filename)
{
DSMCC_ERROR("Compression support is disabled in this build");
return false;
}
#endif
#endif /* DSMCC_COMPRESS_H */
| #ifndef DSMCC_COMPRESS_H
#define DSMCC_COMPRESS_H
#include <stdbool.h>
#include "dsmcc-config.h"
#include "dsmcc-debug.h"
#ifdef HAVE_ZLIB
bool dsmcc_inflate_file(const char *filename);
#else
static inline bool dsmcc_inflate_file(const char *filename)
{
(void) filename;
DSMCC_ERROR("Compression support is disabled in this build");
return false;
}
#endif
#endif /* DSMCC_COMPRESS_H */
| Fix compilation error when disabling zlib support | Fix compilation error when disabling zlib support
| C | lgpl-2.1 | frogbywyplay/media_libdsmcc,frogbywyplay/media_libdsmcc |
26c8a7af33471e55c174880e7373342820b163fb | test2/inline/cant.c | test2/inline/cant.c | // RUN: %check -e %s
#define always_inline __attribute((always_inline))
always_inline hidden(int);
void always_inline __attribute((noinline)) noinline(void)
{
}
always_inline void print(const char *fmt, ...)
{
}
always_inline void old(a, b)
int a, b;
{
}
always_inline void addr(int x)
{
int *p = &x;
*p = 3;
}
always_inline void write(int x)
{
x++;
}
always_inline void rec(int depth)
{
if(depth < 5)
rec(depth + 1); // CHECK: can't always_inline function: can't see function
}
always_inline int should_inline()
{
return 3;
}
main()
{
should_inline(); // CHECK: !/warn|error/
rec(0); // CHECK: !/warn|error/
hidden(3); // CHECK: error: can't always_inline function: can't see function
noinline(); // CHECK: error: can't always_inline noinline function
print("hi", 3); // CHECK: error: can't always_inline function: variadic function
print("hi"); // CHECK: error: can't always_inline function: variadic function
old(3, 1); // CHECK: error: can't always_inline function: unspecified argument count function
addr(5); // CHECK: error: can't always_inline function: argument written or addressed
write(2); // CHECK: error: can't always_inline function: argument written or addressed
}
| Test inability to inline certain functions | Test inability to inline certain functions
| C | mit | bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler |
|
51a20300b5d16fc2ded0b67c0dc250dd934339c7 | p7r/p7r_api.c | p7r/p7r_api.c | #include "./p7r_api.h"
#include "./p7r_root_alloc.h"
static
struct p7r_poolized_meta {
int startup_channel[2];
} meta_singleton;
static
void p7r_poolized_main_entrance(void *argument) {
struct p7r_poolized_meta *meta = argument;
struct p7r_delegation channel_hint;
for (;;) {
channel_hint = p7r_delegate(P7R_DELEGATION_READ, meta->startup_channel[0]);
// XXX currently do nothing - 'tis wrong for fd under LT mode, so we write nothing to startup channel for now
}
}
int p7r_poolize(struct p7r_config config) {
if (pipe(meta_singleton.startup_channel) == -1)
return -1;
int ret = p7r_init(config);
if (ret < 0)
return close(meta_singleton.startup_channel[0]), close(meta_singleton.startup_channel[1]), ret;
return p7r_poolized_main_entrance(&meta_singleton), 0;
}
| #include "./p7r_api.h"
#include "./p7r_root_alloc.h"
static
struct p7r_poolized_meta {
int startup_channel[2];
} meta_singleton;
static
void p7r_poolized_main_entrance(void *argument) {
struct p7r_poolized_meta *meta = argument;
struct p7r_delegation channel_hint;
for (;;) {
channel_hint = p7r_delegate(P7R_DELEGATION_READ, meta->startup_channel[0]);
// XXX currently do nothing - 'tis wrong for fd under LT mode, so we write nothing to startup channel for now
}
}
static
int p7r_poolize(struct p7r_config config) {
if (pipe(meta_singleton.startup_channel) == -1)
return -1;
int ret = p7r_init(config);
if (ret < 0)
return close(meta_singleton.startup_channel[0]), close(meta_singleton.startup_channel[1]), ret;
return p7r_poolized_main_entrance(&meta_singleton), 0;
}
| Load balance & foreign message queue refactored. | Load balance & foreign message queue refactored.
| C | bsd-3-clause | Akvelog/servcraft,Akvelog/servcraft,Akvelog/servcraft |
26283cd9e6e778a00d1e2acba716771f4416c188 | src/libs6rc/s6rc_livedir_prefixsize.c | src/libs6rc/s6rc_livedir_prefixsize.c | /* ISC license. */
#include <limits.h>
#include <string.h>
#include <sys/stat.h>
#include <errno.h>
#include <s6-rc/s6rc-utils.h>
int s6rc_livedir_prefixsize (char const *live, size_t *n)
{
struct stat st ;
size_t llen = strlen(live) ;
char sfn[llen + 8] ;
memcpy(sfn, live, llen) ;
memcpy(sfn + llen, "/prefix", 8) ;
if (stat(sfn, &st) < 0)
{
if (errno != ENOENT) return 0 ;
*n = 0 ;
return 1 ;
}
if (!S_ISREG(st.st_mode)) return (errno = EINVAL, 0) ;
if (st.st_size > NAME_MAX) return (errno = ENAMETOOLONG, 0) ;
*n = st.st_size ;
return 1 ;
}
| /* ISC license. */
#include <limits.h>
#include <string.h>
#include <sys/stat.h>
#include <errno.h>
#include <s6-rc/s6rc-utils.h>
int s6rc_livedir_prefixsize (char const *live, size_t *n)
{
struct stat st ;
size_t llen = strlen(live) ;
char sfn[llen + 8] ;
memcpy(sfn, live, llen) ;
memcpy(sfn + llen, "/prefix", 8) ;
if (stat(sfn, &st) < 0)
{
if (errno != ENOENT) return 0 ;
*n = 0 ;
return 1 ;
}
if (!S_ISREG(st.st_mode)) return (errno = EINVAL, 0) ;
if (st.st_size > PATH_MAX) return (errno = ENAMETOOLONG, 0) ;
*n = st.st_size ;
return 1 ;
}
| Change safety guard to PATH_MAX because Solaris doesn't know NAME_MAX | Change safety guard to PATH_MAX because Solaris doesn't know NAME_MAX
| C | isc | skarnet/s6-rc,skarnet/s6-rc |
555ea52bfbef491555015a27c5d4d6bdcca14d07 | projects/com.oracle.truffle.llvm.test/tests/c/truffle-c/structTest/structCopy2.c | projects/com.oracle.truffle.llvm.test/tests/c/truffle-c/structTest/structCopy2.c | struct test {
int a[3];
char b[2];
long c;
};
int sum(struct test *t) {
int sum = 0;
sum += t->a[0] + t->a[1] + t->a[2];
sum += t->b[0] + t->b[1] + t->b[2];
sum += t->c;
return sum;
}
int main() {
struct test t1 = { .a = { 1, 2, 3 }, .b = { 'a', 'c' }, .c = -1 };
struct test t2 = t1;
t2.b[0] = 32;
t2.a[0] = 12;
t2.a[2] = 1;
return (sum(&t1) + sum(&t2)) % 256;
}
| struct test {
int a[3];
char b[2];
long c;
};
int sum(struct test *t) {
int sum = 0;
sum += t->a[0] + t->a[1] + t->a[2];
sum += t->b[0] + t->b[1];
sum += t->c;
return sum;
}
int main() {
struct test t1 = { .a = { 1, 2, 3 }, .b = { 'a', 'c' }, .c = -1 };
struct test t2 = t1;
t2.b[0] = 32;
t2.a[0] = 12;
t2.a[2] = 1;
return (sum(&t1) + sum(&t2)) % 256;
}
| Fix overflow in test case | Fix overflow in test case
| C | bsd-3-clause | lxp/sulong,crbb/sulong,PrinzKatharina/sulong,crbb/sulong,lxp/sulong,lxp/sulong,crbb/sulong,PrinzKatharina/sulong,lxp/sulong,PrinzKatharina/sulong,crbb/sulong,PrinzKatharina/sulong |
8a1bfeac01a2a0b93544d46f229c6716457b4af5 | ros/src/sensing/filters/packages/points_downsampler/include/points_downsampler.h | ros/src/sensing/filters/packages/points_downsampler/include/points_downsampler.h | #ifndef POINTS_DOWNSAMPLER_H
#define POINTS_DOWNSAMPLER_H
static pcl::PointCloud<pcl::PointXYZI> removePointsByRange(pcl::PointCloud<pcl::PointXYZI> scan, double min_range, double max_range)
{
pcl::PointCloud<pcl::PointXYZI> narrowed_scan;
narrowed_scan.header = scan.header;
double square_min_range = min_range * min_range;
double square_max_range = max_range * max_range;
for(pcl::PointCloud<pcl::PointXYZI>::const_iterator iter = scan.begin(); iter != scan.end(); ++iter)
{
const pcl::PointXYZI &p = *iter;
// p.x = iter->x;
// p.y = iter->y;
// p.z = iter->z;
// p.intensity = iter->intensity;
double square_distance = p.x * p.x + p.y * p.y;
if(square_min_range <= square_distance && square_distance <= square_max_range){
narrowed_scan.points.push_back(p);
}
}
#if 1
return narrowed_scan;
#else
return scan; // This is a only tempolary patch for Localization problem.
#endif
}
#endif // POINTS_DOWNSAMPLER_H
| #ifndef POINTS_DOWNSAMPLER_H
#define POINTS_DOWNSAMPLER_H
static pcl::PointCloud<pcl::PointXYZI> removePointsByRange(pcl::PointCloud<pcl::PointXYZI> scan, double min_range, double max_range)
{
pcl::PointCloud<pcl::PointXYZI> narrowed_scan;
narrowed_scan.header = scan.header;
#if 1 // This error handling should be detemind.
if( min_range>=max_range ) {
ROS_ERROR_ONCE("min_range>=max_range @(%lf, %lf)", min_range, max_range );
return scan;
}
#endif
double square_min_range = min_range * min_range;
double square_max_range = max_range * max_range;
for(pcl::PointCloud<pcl::PointXYZI>::const_iterator iter = scan.begin(); iter != scan.end(); ++iter)
{
const pcl::PointXYZI &p = *iter;
// p.x = iter->x;
// p.y = iter->y;
// p.z = iter->z;
// p.intensity = iter->intensity;
double square_distance = p.x * p.x + p.y * p.y;
if(square_min_range <= square_distance && square_distance <= square_max_range){
narrowed_scan.points.push_back(p);
}
}
return narrowed_scan;
}
#endif // POINTS_DOWNSAMPLER_H
| Add Error handring to removePointsByRange() | Add Error handring to removePointsByRange()
| C | apache-2.0 | CPFL/Autoware,suzlab/Autoware,CPFL/Autoware,suzlab/Autoware,suzlab/Autoware,suzlab/Autoware,CPFL/Autoware,CPFL/Autoware,suzlab/Autoware,CPFL/Autoware,CPFL/Autoware,suzlab/Autoware,CPFL/Autoware,suzlab/Autoware,suzlab/Autoware |
ae9b9fff1f55d6de43e96be799164b0ef6d99526 | hack/utils/compiler_id_impl.c | hack/utils/compiler_id_impl.c | /**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the "hack" directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#define CAML_NAME_SPACE
#include <caml/memory.h>
#include <caml/alloc.h>
#include <string.h>
#include "hphp/util/embedded-data.h"
#define BUF_SIZE 64
static const char section_name[] = "build_id";
static const char default_id[] = "hackc-unknown-version";
value hh_get_compiler_id(void) {
CAMLparam0();
char buf[BUF_SIZE];
ssize_t len = hphp_read_embedded_data(section_name, buf, BUF_SIZE);
value result;
if (len < 0) {
result = caml_alloc_string(strlen(default_id));
memcpy(String_val(result), default_id, strlen(default_id));
CAMLreturn(result);
} else {
result = caml_alloc_string(len);
memcpy(String_val(result), buf, len);
CAMLreturn(result);
}
}
| /**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the "hack" directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#define CAML_NAME_SPACE
#include <caml/memory.h>
#include <caml/alloc.h>
#include <string.h>
#include "hphp/util/embedded-data.h"
#define BUF_SIZE 64
static const char section_name[] = "build_id";
static const char default_id[] = "hackc-unknown-version";
#define STRINGIFY_HELPER(x) #x
#define STRINGIFY_VALUE(x) STRINGIFY_HELPER(x)
value hh_get_compiler_id(void) {
CAMLparam0();
#ifdef HACKC_COMPILER_ID
const char buf[] = STRINGIFY_VALUE(HACKC_COMPILER_ID);
const ssize_t len = sizeof(buf) - 1;
#else
char buf[BUF_SIZE];
const ssize_t len = hphp_read_embedded_data(section_name, buf, BUF_SIZE);
#endif
value result;
if (len < 0) {
result = caml_alloc_string(strlen(default_id));
memcpy(String_val(result), default_id, strlen(default_id));
CAMLreturn(result);
} else {
result = caml_alloc_string(len);
memcpy(String_val(result), buf, len);
CAMLreturn(result);
}
}
| Allow specifyign hackc compiler id with C define | [hack] Allow specifyign hackc compiler id with C define
Summary:
OSS friendliness:
- on mac, we *can't* add an ELF section after the fact, we must have it when building
- script is fb-specific for now (though doens't need to be)
Depends on D6237249
Reviewed By: paulbiss
Differential Revision: D6238694
fbshipit-source-id: 9b07cadb68c7d34e05bdb7094ee23bcf35ae6f4b
| C | mit | gabelevi/flow,TiddoLangerak/flow,gabelevi/flow,facebook/flow,JonathanUsername/flow,JonathanUsername/flow,mroch/flow,claudiopro/flow,samwgoldman/flow,AgentME/flow,mroch/flow,facebook/flow,claudiopro/flow,TiddoLangerak/flow,nmote/flow,facebook/flow,mroch/flow,gabelevi/flow,samwgoldman/flow,gabelevi/flow,gabelevi/flow,gabelevi/flow,jamesgpearce/flow,ylu1317/flow,popham/flow,AgentME/flow,JonathanUsername/flow,JonathanUsername/flow,nmote/flow,JonathanUsername/flow,samwgoldman/flow,ylu1317/flow,jamesgpearce/flow,popham/flow,facebook/flow,JonathanUsername/flow,jamesgpearce/flow,TiddoLangerak/flow,popham/flow,popham/flow,mroch/flow,nmote/flow,nmote/flow,ylu1317/flow,popham/flow,jamesgpearce/flow,popham/flow,popham/flow,nmote/flow,jamesgpearce/flow,facebook/flow,claudiopro/flow,samwgoldman/flow,samwgoldman/flow,samwgoldman/flow,mroch/flow,samwgoldman/flow,ylu1317/flow,claudiopro/flow,ylu1317/flow,TiddoLangerak/flow,mroch/flow,gabelevi/flow,JonathanUsername/flow,facebook/flow,jamesgpearce/flow,facebook/flow,jamesgpearce/flow,TiddoLangerak/flow,mroch/flow,nmote/flow,AgentME/flow,nmote/flow,AgentME/flow,AgentME/flow,claudiopro/flow |
96e941ff7e908835b6df2fbb24069d30ec172544 | polygon.h | polygon.h | /** Author : Paul TREHIOU & Victor SENE
* Date : November 2014
**/
/**
* Declaration Point structure
* x - real wich is the abscisse of the point
* y - real wich is the ordinate of the point
*/
typedef struct
{
float x;
float y;
}Point;
/**
* Function wich create a point with a specified abscisse and ordinate
* abscisse - real
* ordinate - real
* return a new point
*/
Point createPoint(float abscisse, float ordinate);
/**
* Declaration of the Element structure
* value - value of the point of the current element of the polygon
* next - pointer on the next element
* previous - pointer on the previous element
*/
typedef struct pointelem{
Point value;
pointelem* next;
pointelem* previous;
}PointElement;
/**
* Declaration of the Polygon
*/
typedef PointElement* Polygon;
| /** Author : Paul TREHIOU & Victor SENE
* Date : November 2014
**/
/**
* Declaration Point structure
* x - real wich is the abscisse of the point
* y - real wich is the ordinate of the point
*/
typedef struct
{
float x;
float y;
}Point;
/**
* Declaration of the Element structure
* value - value of the point of the current element of the polygon
* next - pointer on the next element
* previous - pointer on the previous element
*/
typedef struct pointelem{
Point value;
pointelem* next;
pointelem* previous;
}PointElement;
/**
* Declaration of the Polygon
*/
typedef PointElement* Polygon;
/**
* Function wich create a point with a specified abscisse and ordinate
* abscisse - real
* ordinate - real
* return a new point
*/
Point createPoint(float abscisse, float ordinate);
| Move the structure definition on a better place | Move the structure definition on a better place
| C | mit | UTBroM/GeometricLib |
6fee339bd8ccc195012921cdc9284de41c992571 | JASP-Common/options/optionfieldpairs.h | JASP-Common/options/optionfieldpairs.h | #ifndef OPTIONFIELDPAIRS_H
#define OPTIONFIELDPAIRS_H
#include "optioni.h"
typedef std::pair<std::string, std::string> FieldPair;
typedef std::vector<FieldPair> FieldPairs;
class OptionFieldPairs : public OptionI<std::vector<std::pair<std::string, std::string> > >
{
public:
OptionFieldPairs(std::string name);
virtual Json::Value asJSON() const override;
virtual void set(Json::Value &value) override;
};
#endif // OPTIONFIELDPAIRS_H
| #ifndef OPTIONFIELDPAIRS_H
#define OPTIONFIELDPAIRS_H
#include "optioni.h"
#include "common.h"
typedef std::pair<std::string, std::string> FieldPair;
typedef std::vector<FieldPair> FieldPairs;
class OptionFieldPairs : public OptionI<std::vector<std::pair<std::string, std::string> > >
{
public:
OptionFieldPairs(std::string name);
virtual Json::Value asJSON() const OVERRIDE;
virtual void set(Json::Value &value) OVERRIDE;
};
#endif // OPTIONFIELDPAIRS_H
| Fix for GCC 4.6 compatibility | Fix for GCC 4.6 compatibility
| C | agpl-3.0 | TimKDJ/jasp-desktop,raviselker/jasp-desktop,AlexanderLyNL/jasp-desktop,dostodabsi/jasp-desktop,AlexanderLyNL/jasp-desktop,aknight1-uva/jasp-desktop,dostodabsi/jasp-desktop,AlexanderLyNL/jasp-desktop,dostodabsi/jasp-desktop,FransMeerhoff/jasp-desktop,Tahiraj/jasp-desktop,cgvarela/jasp-desktop,boutinb/jasp-desktop,vankesteren/jasp-desktop,vankesteren/jasp-desktop,raviselker/jasp-desktop,aknight1-uva/jasp-desktop,dostodabsi/jasp-desktop,fdabl/jasp-desktop,jasp-stats/jasp-desktop,jasp-stats/jasp-desktop,Tahiraj/jasp-desktop,jasp-stats/jasp-desktop,FransMeerhoff/jasp-desktop,tlevine/jasp-desktop,raviselker/jasp-desktop,TimKDJ/jasp-desktop,tlevine/jasp-desktop,cgvarela/jasp-desktop,jasp-stats/jasp-desktop,vankesteren/jasp-desktop,dropmann/jasp-desktop,vankesteren/jasp-desktop,dropmann/jasp-desktop,AlexanderLyNL/jasp-desktop,dostodabsi/jasp-desktop,boutinb/jasp-desktop,dropmann/jasp-desktop,TimKDJ/jasp-desktop,AlexanderLyNL/jasp-desktop,AlexanderLyNL/jasp-desktop,FransMeerhoff/jasp-desktop,FransMeerhoff/jasp-desktop,TimKDJ/jasp-desktop,fdabl/jasp-desktop,aknight1-uva/jasp-desktop,boutinb/jasp-desktop,TimKDJ/jasp-desktop,raviselker/jasp-desktop,vankesteren/jasp-desktop,dropmann/jasp-desktop,AlexanderLyNL/jasp-desktop,jasp-stats/jasp-desktop,boutinb/jasp-desktop,aknight1-uva/jasp-desktop,TimKDJ/jasp-desktop,boutinb/jasp-desktop,tlevine/jasp-desktop,jasp-stats/jasp-desktop,FransMeerhoff/jasp-desktop,cgvarela/jasp-desktop,dropmann/jasp-desktop,raviselker/jasp-desktop,TimKDJ/jasp-desktop,fdabl/jasp-desktop,vankesteren/jasp-desktop,aknight1-uva/jasp-desktop,Tahiraj/jasp-desktop,dropmann/jasp-desktop,Tahiraj/jasp-desktop,FransMeerhoff/jasp-desktop,raviselker/jasp-desktop,TimKDJ/jasp-desktop,aknight1-uva/jasp-desktop,cgvarela/jasp-desktop,raviselker/jasp-desktop,FransMeerhoff/jasp-desktop,jasp-stats/jasp-desktop,vankesteren/jasp-desktop,boutinb/jasp-desktop,jasp-stats/jasp-desktop,dropmann/jasp-desktop,fdabl/jasp-desktop,cgvarela/jasp-desktop,tlevine/jasp-desktop,tlevine/jasp-desktop,fdabl/jasp-desktop,aknight1-uva/jasp-desktop,Tahiraj/jasp-desktop,FransMeerhoff/jasp-desktop,AlexanderLyNL/jasp-desktop,boutinb/jasp-desktop,fdabl/jasp-desktop,boutinb/jasp-desktop,dostodabsi/jasp-desktop,dostodabsi/jasp-desktop,vankesteren/jasp-desktop,fdabl/jasp-desktop |
dced3e0720486c4fc0910a9e8efe51e24991a994 | src/opt.c | src/opt.c | #include "opt.h"
CorkOpt *
corkopt_init(int argc, char *argv[])
{
CorkOpt *co;
if ((co = malloc(sizeof(CorkOpt))) == NULL)
return NULL;
co->argc = argc;
co->argv = argv;
return co;
}
static void
corkopt_fini(CorkOpt *co)
{ }
void
corkopt_add(CorkOpt *co,
int shortopt,
const char *longopt,
const char *helptext,
const int flags)
{
CorkOptElement *coe;
if ((coe = malloc(sizeof(CorkOptElement))) == NULL)
return;
coe->short_opt = shortopt;
coe->long_opt = longopt;
coe->help_text = helptext;
coe->flags = flags;
corklist_append(co->opts, coe);
return;
}
| #include "opt.h"
CorkOpt *
corkopt_init(void)
{
CorkOpt *co;
if ((co = malloc(sizeof(CorkOpt))) == NULL)
return NULL;
co->args = corklist_create();
return co;
}
void
corkopt_fini(CorkOpt *co)
{ }
void
corkopt_add(CorkOpt *co,
int shortopt,
const char *longopt,
const char *helptext,
const int flags)
{
CorkOptElement *coe;
if ((coe = malloc(sizeof(CorkOptElement))) == NULL)
return;
coe->short_opt = shortopt;
coe->long_opt = longopt;
coe->help_text = helptext;
coe->flags = flags;
corklist_append(co->opts, coe);
return;
}
| Change some function prototypes around | Change some function prototypes around
| C | mit | corks/corc.opt |
d62dee2351cdbc34d89459a9c4c2aaa98317b811 | test/benchLinkDef.h | test/benchLinkDef.h | #ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class THit!+;
#pragma link C++ class TObjHit+;
#pragma link C++ class TSTLhit;
#pragma link C++ class TSTLhitList;
#pragma link C++ class TSTLhitDeque;
#pragma link C++ class TSTLhitSet;
#pragma link C++ class TSTLhitMultiset;
#pragma link C++ class TSTLhitMap;
#pragma link C++ class TSTLhitMultiMap;
//#pragma link C++ class TSTLhitHashSet;
//#pragma link C++ class TSTLhitHashMultiset;
#pragma link C++ class pair<int,THit>;
#pragma link C++ class TSTLhitStar;
#pragma link C++ class TSTLhitStarList;
#pragma link C++ class TSTLhitStarDeque;
#pragma link C++ class TSTLhitStarSet;
#pragma link C++ class TSTLhitStarMultiSet;
#pragma link C++ class TSTLhitStarMap;
#pragma link C++ class TSTLhitStarMultiMap;
#pragma link C++ class pair<int,THit*>;
#pragma link C++ class TCloneshit+;
#endif
| #ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class THit!+;
#pragma link C++ class TObjHit+;
#pragma link C++ class TSTLhit+;
#pragma link C++ class TSTLhitList+;
#pragma link C++ class TSTLhitDeque+;
#pragma link C++ class TSTLhitSet+;
#pragma link C++ class TSTLhitMultiset+;
#pragma link C++ class TSTLhitMap+;
#pragma link C++ class TSTLhitMultiMap+;
//#pragma link C++ class TSTLhitHashSet;
//#pragma link C++ class TSTLhitHashMultiset;
#pragma link C++ class pair<int,THit>+;
#pragma link C++ class TSTLhitStar+;
#pragma link C++ class TSTLhitStarList+;
#pragma link C++ class TSTLhitStarDeque+;
#pragma link C++ class TSTLhitStarSet+;
#pragma link C++ class TSTLhitStarMultiSet+;
#pragma link C++ class TSTLhitStarMap+;
#pragma link C++ class TSTLhitStarMultiMap+;
#pragma link C++ class pair<int,THit*>+;
#pragma link C++ class TCloneshit+;
#endif
| Use the option "+" to force the new style Streamer for all classes in bench. | Use the option "+" to force the new style Streamer for all classes in bench.
git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@10478 27541ba8-7e3a-0410-8455-c3a389f83636
| C | lgpl-2.1 | veprbl/root,pspe/root,perovic/root,simonpf/root,gganis/root,sbinet/cxx-root,root-mirror/root,0x0all/ROOT,omazapa/root,tc3t/qoot,gbitzes/root,krafczyk/root,beniz/root,pspe/root,gganis/root,esakellari/root,veprbl/root,Y--/root,vukasinmilosevic/root,root-mirror/root,arch1tect0r/root,gganis/root,vukasinmilosevic/root,gbitzes/root,esakellari/root,gbitzes/root,omazapa/root-old,CristinaCristescu/root,sirinath/root,evgeny-boger/root,smarinac/root,Duraznos/root,evgeny-boger/root,root-mirror/root,satyarth934/root,omazapa/root,sirinath/root,agarciamontoro/root,agarciamontoro/root,krafczyk/root,sirinath/root,smarinac/root,smarinac/root,sawenzel/root,omazapa/root,ffurano/root5,nilqed/root,zzxuanyuan/root,satyarth934/root,thomaskeck/root,georgtroska/root,lgiommi/root,satyarth934/root,esakellari/root,lgiommi/root,perovic/root,lgiommi/root,lgiommi/root,bbockelm/root,dfunke/root,sawenzel/root,kirbyherm/root-r-tools,arch1tect0r/root,zzxuanyuan/root-compressor-dummy,omazapa/root-old,esakellari/my_root_for_test,mattkretz/root,gbitzes/root,olifre/root,buuck/root,ffurano/root5,mattkretz/root,bbockelm/root,davidlt/root,strykejern/TTreeReader,davidlt/root,nilqed/root,cxx-hep/root-cern,sbinet/cxx-root,olifre/root,smarinac/root,nilqed/root,gbitzes/root,mattkretz/root,mattkretz/root,CristinaCristescu/root,alexschlueter/cern-root,perovic/root,strykejern/TTreeReader,satyarth934/root,georgtroska/root,strykejern/TTreeReader,sbinet/cxx-root,Duraznos/root,pspe/root,alexschlueter/cern-root,karies/root,cxx-hep/root-cern,vukasinmilosevic/root,Y--/root,omazapa/root-old,strykejern/TTreeReader,root-mirror/root,mhuwiler/rootauto,tc3t/qoot,olifre/root,zzxuanyuan/root,agarciamontoro/root,Y--/root,sbinet/cxx-root,tc3t/qoot,Y--/root,karies/root,gganis/root,sbinet/cxx-root,pspe/root,vukasinmilosevic/root,BerserkerTroll/root,esakellari/my_root_for_test,agarciamontoro/root,abhinavmoudgil95/root,veprbl/root,zzxuanyuan/root-compressor-dummy,karies/root,arch1tect0r/root,mhuwiler/rootauto,Duraznos/root,lgiommi/root,karies/root,nilqed/root,zzxuanyuan/root-compressor-dummy,mattkretz/root,pspe/root,kirbyherm/root-r-tools,mhuwiler/rootauto,veprbl/root,0x0all/ROOT,omazapa/root,bbockelm/root,ffurano/root5,ffurano/root5,zzxuanyuan/root-compressor-dummy,mhuwiler/rootauto,karies/root,georgtroska/root,kirbyherm/root-r-tools,zzxuanyuan/root-compressor-dummy,esakellari/my_root_for_test,zzxuanyuan/root,omazapa/root-old,arch1tect0r/root,CristinaCristescu/root,arch1tect0r/root,abhinavmoudgil95/root,nilqed/root,strykejern/TTreeReader,sirinath/root,gganis/root,agarciamontoro/root,Duraznos/root,smarinac/root,Y--/root,esakellari/my_root_for_test,georgtroska/root,buuck/root,krafczyk/root,BerserkerTroll/root,olifre/root,omazapa/root,evgeny-boger/root,mhuwiler/rootauto,evgeny-boger/root,veprbl/root,georgtroska/root,sawenzel/root,gbitzes/root,jrtomps/root,buuck/root,veprbl/root,sirinath/root,evgeny-boger/root,krafczyk/root,root-mirror/root,beniz/root,dfunke/root,jrtomps/root,satyarth934/root,BerserkerTroll/root,thomaskeck/root,abhinavmoudgil95/root,georgtroska/root,Y--/root,abhinavmoudgil95/root,agarciamontoro/root,sawenzel/root,davidlt/root,zzxuanyuan/root,mkret2/root,mkret2/root,satyarth934/root,agarciamontoro/root,arch1tect0r/root,bbockelm/root,olifre/root,ffurano/root5,mhuwiler/rootauto,omazapa/root,root-mirror/root,esakellari/my_root_for_test,cxx-hep/root-cern,pspe/root,BerserkerTroll/root,omazapa/root-old,smarinac/root,evgeny-boger/root,sawenzel/root,evgeny-boger/root,esakellari/root,esakellari/my_root_for_test,cxx-hep/root-cern,tc3t/qoot,0x0all/ROOT,thomaskeck/root,omazapa/root-old,BerserkerTroll/root,simonpf/root,davidlt/root,esakellari/my_root_for_test,tc3t/qoot,buuck/root,lgiommi/root,tc3t/qoot,pspe/root,lgiommi/root,beniz/root,0x0all/ROOT,nilqed/root,ffurano/root5,agarciamontoro/root,Dr15Jones/root,lgiommi/root,simonpf/root,vukasinmilosevic/root,smarinac/root,bbockelm/root,mhuwiler/rootauto,mkret2/root,beniz/root,perovic/root,0x0all/ROOT,georgtroska/root,CristinaCristescu/root,davidlt/root,CristinaCristescu/root,kirbyherm/root-r-tools,karies/root,krafczyk/root,abhinavmoudgil95/root,sawenzel/root,georgtroska/root,Duraznos/root,gganis/root,buuck/root,mhuwiler/rootauto,omazapa/root,sbinet/cxx-root,zzxuanyuan/root,gbitzes/root,sbinet/cxx-root,buuck/root,veprbl/root,beniz/root,gganis/root,olifre/root,ffurano/root5,mkret2/root,gbitzes/root,tc3t/qoot,root-mirror/root,Duraznos/root,zzxuanyuan/root,kirbyherm/root-r-tools,satyarth934/root,vukasinmilosevic/root,buuck/root,sbinet/cxx-root,root-mirror/root,0x0all/ROOT,esakellari/root,olifre/root,gganis/root,satyarth934/root,Dr15Jones/root,simonpf/root,CristinaCristescu/root,krafczyk/root,agarciamontoro/root,BerserkerTroll/root,thomaskeck/root,dfunke/root,evgeny-boger/root,sirinath/root,0x0all/ROOT,mkret2/root,gganis/root,jrtomps/root,0x0all/ROOT,sbinet/cxx-root,BerserkerTroll/root,agarciamontoro/root,simonpf/root,sawenzel/root,sbinet/cxx-root,dfunke/root,omazapa/root-old,bbockelm/root,mkret2/root,strykejern/TTreeReader,davidlt/root,abhinavmoudgil95/root,Y--/root,0x0all/ROOT,perovic/root,nilqed/root,mattkretz/root,arch1tect0r/root,evgeny-boger/root,davidlt/root,sawenzel/root,karies/root,mkret2/root,bbockelm/root,karies/root,Duraznos/root,perovic/root,sbinet/cxx-root,krafczyk/root,simonpf/root,krafczyk/root,zzxuanyuan/root,thomaskeck/root,olifre/root,arch1tect0r/root,root-mirror/root,root-mirror/root,jrtomps/root,alexschlueter/cern-root,mhuwiler/rootauto,dfunke/root,esakellari/my_root_for_test,sirinath/root,davidlt/root,Y--/root,krafczyk/root,veprbl/root,thomaskeck/root,gbitzes/root,dfunke/root,jrtomps/root,simonpf/root,esakellari/root,zzxuanyuan/root,beniz/root,dfunke/root,olifre/root,Dr15Jones/root,agarciamontoro/root,alexschlueter/cern-root,pspe/root,omazapa/root,zzxuanyuan/root,zzxuanyuan/root-compressor-dummy,esakellari/root,alexschlueter/cern-root,lgiommi/root,gganis/root,zzxuanyuan/root,simonpf/root,davidlt/root,mhuwiler/rootauto,Y--/root,smarinac/root,dfunke/root,Duraznos/root,pspe/root,bbockelm/root,mkret2/root,arch1tect0r/root,cxx-hep/root-cern,esakellari/root,buuck/root,olifre/root,esakellari/my_root_for_test,tc3t/qoot,beniz/root,strykejern/TTreeReader,omazapa/root-old,beniz/root,nilqed/root,mattkretz/root,pspe/root,omazapa/root,nilqed/root,perovic/root,omazapa/root,zzxuanyuan/root-compressor-dummy,veprbl/root,root-mirror/root,CristinaCristescu/root,gganis/root,vukasinmilosevic/root,beniz/root,georgtroska/root,dfunke/root,simonpf/root,vukasinmilosevic/root,zzxuanyuan/root,jrtomps/root,Y--/root,karies/root,satyarth934/root,alexschlueter/cern-root,nilqed/root,gbitzes/root,thomaskeck/root,beniz/root,buuck/root,jrtomps/root,sirinath/root,CristinaCristescu/root,olifre/root,mkret2/root,omazapa/root,vukasinmilosevic/root,lgiommi/root,gbitzes/root,bbockelm/root,jrtomps/root,abhinavmoudgil95/root,georgtroska/root,Dr15Jones/root,zzxuanyuan/root-compressor-dummy,jrtomps/root,krafczyk/root,arch1tect0r/root,beniz/root,nilqed/root,kirbyherm/root-r-tools,mattkretz/root,Duraznos/root,mattkretz/root,omazapa/root-old,zzxuanyuan/root-compressor-dummy,cxx-hep/root-cern,BerserkerTroll/root,kirbyherm/root-r-tools,vukasinmilosevic/root,sawenzel/root,satyarth934/root,tc3t/qoot,lgiommi/root,simonpf/root,buuck/root,Dr15Jones/root,georgtroska/root,CristinaCristescu/root,esakellari/my_root_for_test,jrtomps/root,CristinaCristescu/root,omazapa/root-old,sirinath/root,sirinath/root,satyarth934/root,perovic/root,buuck/root,tc3t/qoot,arch1tect0r/root,Dr15Jones/root,abhinavmoudgil95/root,thomaskeck/root,alexschlueter/cern-root,perovic/root,abhinavmoudgil95/root,sirinath/root,mattkretz/root,pspe/root,Duraznos/root,perovic/root,mhuwiler/rootauto,abhinavmoudgil95/root,perovic/root,omazapa/root-old,zzxuanyuan/root-compressor-dummy,karies/root,dfunke/root,veprbl/root,BerserkerTroll/root,cxx-hep/root-cern,Dr15Jones/root,bbockelm/root,simonpf/root,dfunke/root,cxx-hep/root-cern,smarinac/root,smarinac/root,mkret2/root,vukasinmilosevic/root,CristinaCristescu/root,zzxuanyuan/root,esakellari/root,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,mkret2/root,abhinavmoudgil95/root,bbockelm/root,krafczyk/root,esakellari/root,sawenzel/root,Duraznos/root,esakellari/root,veprbl/root,davidlt/root,jrtomps/root,evgeny-boger/root,evgeny-boger/root,davidlt/root,thomaskeck/root,sawenzel/root,Y--/root,karies/root,thomaskeck/root,BerserkerTroll/root,mattkretz/root |
3d7b3ba49dcac501c828eb222ce66ae907540d14 | test/Driver/XRay/xray-instrument-os.c | test/Driver/XRay/xray-instrument-os.c | // RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
// XFAIL: -linux-
// REQUIRES-ANY: amd64, x86_64, x86_64h, arm, aarch64, arm64
typedef int a;
| // RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
// XFAIL: -linux-, -freebsd
// REQUIRES-ANY: amd64, x86_64, x86_64h, arm, aarch64, arm64
typedef int a;
| Fix an XRay test on FreeBSD | [test] Fix an XRay test on FreeBSD
Summary: Fixing clang-test on FreeBSD as a follow-up of https://reviews.llvm.org/D43378 to handle the revert happened in r325749.
Reviewers: devnexen, krytarowski, dberris
Subscribers: emaste, dberris, cfe-commits
Differential Revision: https://reviews.llvm.org/D45002
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@328797 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang |
1a3be280fca9d613e9e1c176b6b930c397f19730 | include/conveyor/job.h | include/conveyor/job.h | // vim:cindent:cino=\:0:et:fenc=utf-8:ff=unix:sw=4:ts=4:
#ifndef CONVEYOR_JOB_H
#define CONVEYOR_JOB_H (1)
#include <QList>
#include <QObject>
#include <QScopedPointer>
#include <QString>
#include <conveyor/fwd.h>
#include <conveyor/jobstatus.h>
namespace conveyor
{
class Job : public QObject
{
Q_OBJECT
public:
~Job (void);
int id (void) const;
QString name (void) const;
JobState state (void) const;
JobConclusion conclusion (void) const;
int currentStepProgress (void) const;
QString currentStepName (void) const;
void cancel (void);
void pause (void);
signals:
void changed (const Job *);
private:
Job (Conveyor * conveyor, int const & id);
QScopedPointer <JobPrivate> m_private;
void emitChanged (void);
friend class Conveyor;
friend class ConveyorPrivate;
friend class JobAddedMethod;
friend class JobChangedMethod;
friend class JobPrivate;
friend class Printer;
friend class PrinterPrivate;
};
}
#endif
| // vim:cindent:cino=\:0:et:fenc=utf-8:ff=unix:sw=4:ts=4:
#ifndef CONVEYOR_JOB_H
#define CONVEYOR_JOB_H (1)
#include <QList>
#include <QObject>
#include <QScopedPointer>
#include <QString>
#include <conveyor/fwd.h>
#include <conveyor/jobstatus.h>
namespace conveyor
{
class Job : public QObject
{
Q_OBJECT
public:
~Job (void);
int id (void) const;
QString name (void) const;
JobState state (void) const;
JobConclusion conclusion (void) const;
int currentStepProgress (void) const;
QString currentStepName (void) const;
public slots:
void cancel (void);
void pause (void);
signals:
void changed (const Job *);
private:
Job (Conveyor * conveyor, int const & id);
QScopedPointer <JobPrivate> m_private;
void emitChanged (void);
friend class Conveyor;
friend class ConveyorPrivate;
friend class JobAddedMethod;
friend class JobChangedMethod;
friend class JobPrivate;
friend class Printer;
friend class PrinterPrivate;
};
}
#endif
| Make Job::cancel and Job::pause public slots | Make Job::cancel and Job::pause public slots
| C | agpl-3.0 | makerbot/conveyor,makerbot/conveyor,makerbot/conveyor,makerbot/conveyor |
4222ba870d2fc3b89d7e78508e2f0ec18f69ca22 | include/cling/UserInterface/CompilationException.h | include/cling/UserInterface/CompilationException.h | //--------------------------------------------------------------------*- C++ -*-
// CLING - the C++ LLVM-based InterpreterG :)
// author: Axel Naumann <[email protected]>
//------------------------------------------------------------------------------
#ifndef CLING_COMPILATIONEXCEPTION_H
#define CLING_COMPILATIONEXCEPTION_H
#include <stdexcept>
#include <string>
#include "cling/Interpreter/RuntimeException.h"
namespace cling {
class Interpreter;
class MetaProcessor;
//\brief Exception pull us out of JIT (llvm + clang) errors.
class CompilationException:
public virtual runtime::InterpreterException,
public virtual std::runtime_error {
public:
CompilationException(const std::string& reason):
std::runtime_error(reason) {}
~CompilationException() throw(); // vtable pinned to UserInterface.cpp
virtual const char* what() const throw() {
return std::runtime_error::what(); }
};
}
#endif // CLING_COMPILATIONEXCEPTION_H
| //--------------------------------------------------------------------*- C++ -*-
// CLING - the C++ LLVM-based InterpreterG :)
// author: Axel Naumann <[email protected]>
//------------------------------------------------------------------------------
#ifndef CLING_COMPILATIONEXCEPTION_H
#define CLING_COMPILATIONEXCEPTION_H
#include <stdexcept>
#include <string>
#include "cling/Interpreter/RuntimeException.h"
namespace cling {
class Interpreter;
class MetaProcessor;
///\brief Exception that pulls cling out of runtime-compilation (llvm + clang)
/// errors.
///
/// If user code provokes an llvm::unreachable it will cause this exception
/// to be thrown. Given that this is at the process's runtime and an
/// interpreter error it inherits from InterpreterException and runtime_error.
/// Note that this exception is *not* thrown during the execution of the
/// user's code but during its compilation (at runtime).
class CompilationException:
public virtual runtime::InterpreterException,
public virtual std::runtime_error {
public:
CompilationException(const std::string& reason):
std::runtime_error(reason) {}
~CompilationException() throw(); // vtable pinned to UserInterface.cpp
virtual const char* what() const throw() {
return std::runtime_error::what(); }
};
}
#endif // CLING_COMPILATIONEXCEPTION_H
| Add more rationale as to how this exception is different from others. | Add more rationale as to how this exception is different from others.
| C | lgpl-2.1 | karies/cling,perovic/cling,root-mirror/cling,marsupial/cling,marsupial/cling,marsupial/cling,karies/cling,root-mirror/cling,marsupial/cling,perovic/cling,karies/cling,karies/cling,root-mirror/cling,perovic/cling,root-mirror/cling,perovic/cling,perovic/cling,karies/cling,root-mirror/cling,root-mirror/cling,karies/cling,marsupial/cling,marsupial/cling |
ed5d70eae8e393b9572ece4bf2a7829a56d67c92 | test/CodeGen/target-builtin-noerror.c | test/CodeGen/target-builtin-noerror.c | // RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -S -o -
#define __MM_MALLOC_H
#include <x86intrin.h>
// No warnings.
extern __m256i a;
int __attribute__((target("avx"))) bar(__m256i a) {
return _mm256_extract_epi32(a, 3);
}
int baz() {
return bar(a);
}
int __attribute__((target("avx"))) qq_avx(__m256i a) {
return _mm256_extract_epi32(a, 3);
}
int qq_noavx() {
return 0;
}
extern __m256i a;
int qq() {
if (__builtin_cpu_supports("avx"))
return qq_avx(a);
else
return qq_noavx();
}
| // REQUIRES: x86-registered-target
// RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -S -o -
#define __MM_MALLOC_H
#include <x86intrin.h>
// No warnings.
extern __m256i a;
int __attribute__((target("avx"))) bar(__m256i a) {
return _mm256_extract_epi32(a, 3);
}
int baz() {
return bar(a);
}
int __attribute__((target("avx"))) qq_avx(__m256i a) {
return _mm256_extract_epi32(a, 3);
}
int qq_noavx() {
return 0;
}
extern __m256i a;
int qq() {
if (__builtin_cpu_supports("avx"))
return qq_avx(a);
else
return qq_noavx();
}
| Mark this test as requiring and x86 registered target. | Mark this test as requiring and x86 registered target.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@250475 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang |
f8f1430ae709c0018a217c77893754f38b3c5b93 | src/include/port/atomics/arch-arm.h | src/include/port/atomics/arch-arm.h | /*-------------------------------------------------------------------------
*
* arch-arm.h
* Atomic operations considerations specific to ARM
*
* Portions Copyright (c) 2013-2017, PostgreSQL Global Development Group
*
* NOTES:
*
* src/include/port/atomics/arch-arm.h
*
*-------------------------------------------------------------------------
*/
/* intentionally no include guards, should only be included by atomics.h */
#ifndef INSIDE_ATOMICS_H
#error "should be included via atomics.h"
#endif
/*
* 64 bit atomics on arm are implemented using kernel fallbacks and might be
* slow, so disable entirely for now.
* XXX: We might want to change that at some point for AARCH64
*/
#define PG_DISABLE_64_BIT_ATOMICS
| /*-------------------------------------------------------------------------
*
* arch-arm.h
* Atomic operations considerations specific to ARM
*
* Portions Copyright (c) 2013-2017, PostgreSQL Global Development Group
*
* NOTES:
*
* src/include/port/atomics/arch-arm.h
*
*-------------------------------------------------------------------------
*/
/* intentionally no include guards, should only be included by atomics.h */
#ifndef INSIDE_ATOMICS_H
#error "should be included via atomics.h"
#endif
/*
* 64 bit atomics on ARM32 are implemented using kernel fallbacks and thus
* might be slow, so disable entirely. On ARM64 that problem doesn't exist.
*/
#if !defined(__aarch64__) && !defined(__aarch64)
#define PG_DISABLE_64_BIT_ATOMICS
#endif /* __aarch64__ || __aarch64 */
| Enable 64 bit atomics on ARM64. | Enable 64 bit atomics on ARM64.
Previously they were disabled due to performance concerns on 32bit
arm, where 64bit atomics are often implemented via kernel traps.
Author: Roman Shaposhnik
Discussion: [email protected]
| C | apache-2.0 | lisakowen/gpdb,greenplum-db/gpdb,xinzweb/gpdb,adam8157/gpdb,50wu/gpdb,adam8157/gpdb,xinzweb/gpdb,greenplum-db/gpdb,lisakowen/gpdb,adam8157/gpdb,adam8157/gpdb,adam8157/gpdb,adam8157/gpdb,50wu/gpdb,adam8157/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,lisakowen/gpdb,xinzweb/gpdb,lisakowen/gpdb,50wu/gpdb,greenplum-db/gpdb,xinzweb/gpdb,50wu/gpdb,greenplum-db/gpdb,lisakowen/gpdb,lisakowen/gpdb,greenplum-db/gpdb,xinzweb/gpdb,50wu/gpdb,xinzweb/gpdb,xinzweb/gpdb,xinzweb/gpdb,50wu/gpdb,50wu/gpdb,lisakowen/gpdb,lisakowen/gpdb,50wu/gpdb,greenplum-db/gpdb,adam8157/gpdb |
f57e180366de9537a25e8454a53705d7c0a05744 | Sources/Tests/DataStructures/Test_DataStructures.c | Sources/Tests/DataStructures/Test_DataStructures.c | #include "unity.h"
#include "unity_fixture.h"
#include "Utils/IO/ArrayIO.h"
#include "Utils/IO/BlockMapIO.h"
#include "Utils/IO/ImageIO.h"
#include "Utils/IO/HistogramIO.h"
#include <stdio.h>
#include <stdlib.h>
bool IsUnderCI = false ;
TEST_GROUP(DataStructures);
TEST_SETUP(DataStructures)
{
IsUnderCI = (getenv("CI") != NULL);
}
TEST_TEAR_DOWN(DataStructures)
{
}
TEST(DataStructures, BlockMap_SanityCheck)
{
BlockMap blockMap = BlockMapIO_ConstructFromFile("DataStructures/101_1.tif.12.Equalize.blocks.dat");
if (!IsUnderCI)
{
BlockMapIO_Printf(&blockMap);
}
}
TEST(DataStructures, Image_SanityCheck)
{
UInt8Array2D image = ImageIO_ConstructFromFile("DataStructures/101_1.tif.12.Equalize.image.dat");
if (!IsUnderCI)
{
ImageIO_Printf(&image);
}
}
TEST(DataStructures, Histogram_SanityCheck)
{
Int16Array3D histogram = HistogramIO_ConstructFromFile("DataStructures/101_1.tif.12.Equalize.histgram.dat");
if (!IsUnderCI)
{
HistogramIO_Printf(&histogram);
}
}
| Rename and don't spit out all the sanity output when running on the CI server. | Rename and don't spit out all the sanity output when running on the CI server.
| C | bsd-3-clause | SimPrints/libAFIS,SimPrints/libAFIS,mjfh/libAFIS,SimPrints/libAFIS,mjfh/libAFIS,mjfh/libAFIS |
|
310116bb0b482518dcd4dd87d94ac8f30e3a2c64 | src/qt/qtipcserver.h | src/qt/qtipcserver.h | #ifndef QTIPCSERVER_H
#define QTIPCSERVER_H
// Define Bitcoin-Qt message queue name
#define BITCOINURI_QUEUE_NAME "BitcoinURI"
void ipcScanRelay(int argc, char *argv[]);
void ipcInit(int argc, char *argv[]);
#endif // QTIPCSERVER_H
| #ifndef QTIPCSERVER_H
#define QTIPCSERVER_H
// Define Bitcoin-Qt message queue name
#define BITCOINURI_QUEUE_NAME "CrainCoinURI"
void ipcScanRelay(int argc, char *argv[]);
void ipcInit(int argc, char *argv[]);
#endif // QTIPCSERVER_H
| Set correct name for boost IPC | Set correct name for boost IPC
| C | mit | graincoin-project/graincoin,graincoin-project/graincoin,graincoin-project/graincoin,graincoin-project/graincoin,graincoin-project/graincoin |
dc89a17613a19e40261745ae41385894d8511a68 | src/hppa/Gglobal.c | src/hppa/Gglobal.c | /* libunwind - a platform-independent unwind library
Copyright (c) 2004-2005 Hewlett-Packard Development Company, L.P.
Contributed by David Mosberger-Tang <[email protected]>
This file is part of libunwind.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "unwind_i.h"
HIDDEN pthread_mutex_t hppa_lock = PTHREAD_MUTEX_INITIALIZER;
HIDDEN int tdep_needs_initialization = 1;
HIDDEN void
tdep_init (void)
{
intrmask_t saved_mask;
sigfillset (&unwi_full_mask);
sigprocmask (SIG_SETMASK, &unwi_full_mask, &saved_mask);
mutex_lock (&hppa_lock);
{
if (!tdep_needs_initialization)
/* another thread else beat us to it... */
goto out;
mi_init ();
dwarf_init ();
#ifndef UNW_REMOTE_ONLY
hppa_local_addr_space_init ();
#endif
tdep_needs_initialization = 0; /* signal that we're initialized... */
}
out:
mutex_unlock (&hppa_lock);
sigprocmask (SIG_SETMASK, &saved_mask, NULL);
}
| Adjust for sigset_t to intrmask_t renaming. | Adjust for sigset_t to intrmask_t renaming.
2004/12/02 00:40:45-08:00 mostang.com!davidm
Add copyright notice.
Provide canonical DWARF-based implementation.
2004/11/30 23:38:42-08:00 mostang.com!davidm
Rename: src/hppa/global.c -> src/hppa/Gglobal.c
(Logical change 1.290)
| C | mit | fillexen/libunwind,rantala/libunwind,adsharma/libunwind,bo-on-software/libunwind,martyone/libunwind,zeldin/platform_external_libunwind,DroidSim/platform_external_libunwind,fdoray/libunwind,zeldin/platform_external_libunwind,frida/libunwind,vegard/libunwind,SyndicateRogue/libunwind,dropbox/libunwind,geekboxzone/lollipop_external_libunwind,krytarowski/libunwind,yuyichao/libunwind,cms-externals/libunwind,SyndicateRogue/libunwind,vtjnash/libunwind,rogwfu/libunwind,zeldin/platform_external_libunwind,maltek/platform_external_libunwind,cms-externals/libunwind,dropbox/libunwind,yuyichao/libunwind,ehsan/libunwind,CyanogenMod/android_external_libunwind,geekboxzone/lollipop_external_libunwind,project-zerus/libunwind,Chilledheart/libunwind,jrmuizel/libunwind,bo-on-software/libunwind,vegard/libunwind,maltek/platform_external_libunwind,fillexen/libunwind,rantala/libunwind,dropbox/libunwind,unkadoug/libunwind,vegard/libunwind,tony/libunwind,0xlab/0xdroid-external_libunwind,Keno/libunwind,atanasyan/libunwind,igprof/libunwind,geekboxzone/lollipop_external_libunwind,0xlab/0xdroid-external_libunwind,geekboxzone/mmallow_external_libunwind,krytarowski/libunwind,dagar/libunwind,0xlab/0xdroid-external_libunwind,igprof/libunwind,maltek/platform_external_libunwind,tronical/libunwind,android-ia/platform_external_libunwind,frida/libunwind,zliu2014/libunwind-tilegx,pathscale/libunwind,project-zerus/libunwind,zliu2014/libunwind-tilegx,CyanogenMod/android_external_libunwind,djwatson/libunwind,evaautomation/libunwind,olibc/libunwind,Keno/libunwind,tronical/libunwind,android-ia/platform_external_libunwind,zliu2014/libunwind-tilegx,dreal-deps/libunwind,dagar/libunwind,atanasyan/libunwind,rantala/libunwind,jrmuizel/libunwind,vtjnash/libunwind,pathscale/libunwind,geekboxzone/mmallow_external_libunwind,ehsan/libunwind,libunwind/libunwind,ehsan/libunwind,mpercy/libunwind,dagar/libunwind,frida/libunwind,unkadoug/libunwind,lat/libunwind,dreal-deps/libunwind,tkelman/libunwind,pathscale/libunwind,cloudius-systems/libunwind,adsharma/libunwind,adsharma/libunwind,Chilledheart/libunwind,wdv4758h/libunwind,tkelman/libunwind,olibc/libunwind,rntz/libunwind,evaautomation/libunwind,mpercy/libunwind,joyent/libunwind,joyent/libunwind,fillexen/libunwind,cloudius-systems/libunwind,libunwind/libunwind,wdv4758h/libunwind,wdv4758h/libunwind,android-ia/platform_external_libunwind,igprof/libunwind,androidarmv6/android_external_libunwind,atanasyan/libunwind,unkadoug/libunwind,joyent/libunwind,atanasyan/libunwind-android,project-zerus/libunwind,mpercy/libunwind,libunwind/libunwind,atanasyan/libunwind-android,Keno/libunwind,atanasyan/libunwind-android,DroidSim/platform_external_libunwind,rogwfu/libunwind,vtjnash/libunwind,CyanogenMod/android_external_libunwind,fdoray/libunwind,rntz/libunwind,djwatson/libunwind,dreal-deps/libunwind,tony/libunwind,androidarmv6/android_external_libunwind,androidarmv6/android_external_libunwind,rntz/libunwind,jrmuizel/libunwind,rogwfu/libunwind,olibc/libunwind,tkelman/libunwind,evaautomation/libunwind,lat/libunwind,martyone/libunwind,fdoray/libunwind,bo-on-software/libunwind,djwatson/libunwind,DroidSim/platform_external_libunwind,geekboxzone/mmallow_external_libunwind,SyndicateRogue/libunwind,tony/libunwind,yuyichao/libunwind,martyone/libunwind,cloudius-systems/libunwind,lat/libunwind,tronical/libunwind,cms-externals/libunwind,Chilledheart/libunwind,krytarowski/libunwind |
|
6d989ccba4d79126c2976c430e53a9dff66943b7 | bst.h | bst.h | #include <stdlib.h>
#ifndef __BST_H__
#define __BST_H__
struct BSTNode;
struct BST;
typedef struct BSTNode BSTNode;
typedef struct BST BST;
BST* BST_Create(void);
BSTNode* BSTNode_Create(void* k);
void BST_Inorder_Tree_Walk(BST* T, void (f)(void*));
#endif | #include <stdlib.h>
#ifndef __BST_H__
#define __BST_H__
struct BSTNode;
struct BST;
typedef struct BSTNode BSTNode;
typedef struct BST BST;
BST* BST_Create(void);
BSTNode* BSTNode_Create(void* k);
void BST_Inorder_Tree_Walk(BST* T, void (f)(void*));
void BST_Preorder_Tree_Walk(BST* T, void (f)(void*));
void BST_Postorder_Tree_Walk(BST* T, void (f)(void*));
#endif | Add BST Pre/Post order walk function declaration | Add BST Pre/Post order walk function declaration
| C | mit | MaxLikelihood/CADT |
107caac8e8ce30c581e350f87ab769bf6c3c3d24 | 433Rx/MessageQueue.h | 433Rx/MessageQueue.h | // Copyright 2014-2016 the project authors as listed in the AUTHORS file.
// All rights reserved. Use of this source code is governed by the
// license that can be found in the LICENSE file.
#ifndef _MESSAGE_QUEUE
#define _MESSAGE_QUEUE
// note that on the arduino we have to be careful of how much memory we
// use so the depth of the message queue needs to be kept small
#define MAX_MESSAGES 8
#define MAX_MESSAGE_TEXT_LENGTH 32
typedef struct Message {
void* device;
int type;
long timestamp;
unsigned long code;
float value;
char text[MAX_MESSAGE_TEXT_LENGTH];
Message* next;
} Message;
class MessageQueue {
private:
Message messages[MAX_MESSAGES];
Message* newMessages;
Message* freeMessages;
public:
MessageQueue(void);
Message* getFreeMessage(void);
void enqueueMessage(Message* message);
Message* dequeueMessages(void);
void returnMessages(Message* messages, Message* lastMessage);
};
#endif
| // Copyright 2014-2016 the project authors as listed in the AUTHORS file.
// All rights reserved. Use of this source code is governed by the
// license that can be found in the LICENSE file.
#ifndef _MESSAGE_QUEUE
#define _MESSAGE_QUEUE
// note that on the arduino we have to be careful of how much memory we
// use so the depth of the message queue needs to be kept small
#define MAX_MESSAGES 8
#define MAX_MESSAGE_TEXT_LENGTH 64
typedef struct Message {
void* device;
int type;
long timestamp;
unsigned long code;
float value;
char text[MAX_MESSAGE_TEXT_LENGTH];
Message* next;
} Message;
class MessageQueue {
private:
Message messages[MAX_MESSAGES];
Message* newMessages;
Message* freeMessages;
public:
MessageQueue(void);
Message* getFreeMessage(void);
void enqueueMessage(Message* message);
Message* dequeueMessages(void);
void returnMessages(Message* messages, Message* lastMessage);
};
#endif
| Extend size of text in Message | Extend size of text in Message
Was seeeing intermittent failures due to memmory corruption
due to exceeding the message size.
| C | mit | mhdawson/arduino-esp8266,mhdawson/arduino-esp8266 |
f7d94cd1d223a1e0ede58bb361e28e0f14ad4ff9 | bandit/failure_formatters/default_failure_formatter.h | bandit/failure_formatters/default_failure_formatter.h | #ifndef BANDIT_DEFAULT_FAILURE_FORMATTER_H
#define BANDIT_DEFAULT_FAILURE_FORMATTER_H
namespace bandit { namespace detail {
struct default_failure_formatter : public failure_formatter
{
std::string format(const assertion_exception& err) const
{
std::stringstream ss;
if(err.file_name().size())
{
ss << err.file_name();
if(err.line_number())
{
ss << ":" << err.line_number();
}
ss << ": ";
}
ss << err.what();
return ss.str();
}
};
}}
#endif
| #ifndef BANDIT_DEFAULT_FAILURE_FORMATTER_H
#define BANDIT_DEFAULT_FAILURE_FORMATTER_H
namespace bandit { namespace detail {
struct default_failure_formatter : public failure_formatter
{
std::string format(const assertion_exception& err) const
{
std::stringstream ss;
if(err.file_name().size())
{
ss << err.file_name();
if(err.line_number())
{
ss << ":" << err.line_number();
}
ss << ": ";
}
ss << std::endl << err.what();
return ss.str();
}
};
}}
#endif
| Add line break in default error formatter | Add line break in default error formatter
| C | mit | ogdf/bandit,ogdf/bandit |
0061b22b7bfe41ca8e5ec39a199fc1c8fa9203d0 | libhfuzz/libhfuzz.h | libhfuzz/libhfuzz.h | #ifdef __cplusplus
extern "C" {
#endif
/*
* buf: input fuzzing data
* len: size of the 'buf' data
*
* Return value: should return 0
*/
int LLVMFuzzerTestOneInput(const uint8_t * buf, size_t len);
/*
* argc: ptr to main's argc
* argv: ptr to main's argv
*
* Return value: ignored
*/
int LLVMFuzzerInitialize(int *argc, char ***argv);
/*
*
* An alternative for LLVMFuzzerTestOneInput()
*
* buf_ptr: will be set to input fuzzing data
* len_ptr: will be set to the size of the input fuzzing data
*/
void HF_ITER(const uint8_t ** buf_ptr, size_t * len_ptr);
#if defined(_HF_ARCH_LINUX)
/*
* Enter Linux namespaces
*
* cloneFlags: see 'man unshare'
*/
bool linuxEnterNs(uintptr_t cloneFlags);
/*
* Bring network interface up
*
* ifacename: name of the interface, typically "lo"
*/
bool linuxIfaceUp(const char *ifacename);
/*
* Mount tmpfs over a mount point
*
* dst: mount point for tmfs
*/
bool linuxMountTmpfs(const char *dst);
#endif /* defined(_HF_ARCH_LINUX) */
#ifdef __cplusplus
} /* extern "C" */
#endif
| #ifdef __cplusplus
extern "C" {
#endif
/*
* buf: input fuzzing data
* len: size of the 'buf' data
*
* Return value: should return 0
*/
int LLVMFuzzerTestOneInput(const uint8_t * buf, size_t len);
/*
* argc: ptr to main's argc
* argv: ptr to main's argv
*
* Return value: ignored
*/
int LLVMFuzzerInitialize(int *argc, char ***argv);
/*
*
* An alternative for LLVMFuzzerTestOneInput()
*
* buf_ptr: will be set to input fuzzing data
* len_ptr: will be set to the size of the input fuzzing data
*/
void HF_ITER(const uint8_t ** buf_ptr, size_t * len_ptr);
#if defined(__linux__)
/*
* Enter Linux namespaces
*
* cloneFlags: see 'man unshare'
*/
bool linuxEnterNs(uintptr_t cloneFlags);
/*
* Bring network interface up
*
* ifacename: name of the interface, typically "lo"
*/
bool linuxIfaceUp(const char *ifacename);
/*
* Mount tmpfs over a mount point
*
* dst: mount point for tmfs
*/
bool linuxMountTmpfs(const char *dst);
#endif /* defined(__linux__) */
#ifdef __cplusplus
} /* extern "C" */
#endif
| Change defined(_HF_ARCH_LINUX) -> defined(__linux__) for public includes | Change defined(_HF_ARCH_LINUX) -> defined(__linux__) for public includes
| C | apache-2.0 | google/honggfuzz,google/honggfuzz,anestisb/honggfuzz,google/honggfuzz |
2f88e41681d84bf6cbe207601f10815dc3b753a2 | listing1/listing1.c | listing1/listing1.c | # include <stdio.h>
# include <libmill.h>
# include <string.h>
coroutine void f(int index)
{
printf("Worker %d\n", index);
}
int main(int argc, char **argv)
{
for(int i=1;i<=10; i++) {
go(f(i));
}
return 0;
}
| # include <stdio.h>
# include <libmill.h>
coroutine void f(int index)
{
printf("Worker %d\n", index);
}
int main(int argc, char **argv)
{
for(int i=1;i<=10; i++) {
go(f(i));
}
return 0;
}
| Remove extraneous string.h from listing 1 | Remove extraneous string.h from listing 1
| C | mit | amitsaha/lj_libmill |
b54ed8ead107fadf4da763ca544e721ca59aa263 | 7segments.c | 7segments.c | #define L for(char*c=a[1],y;*c;)printf("%c%c%c%c",(y="w$]m.k{o"[*c++-48])&u/4?124:32,y&u?95:32,y&u/2?124:32,*c?32:10);u*=8;
main(int u,char**a){u=1;L;L;L} | #define L for(char*c=a[1],y;*c;)printf("%c%c%c%c",(y="w$]m.k{%\177o"[*c++-48])&u/4?124:32,y&u?95:32,y&u/2?124:32,*c?32:10);u*=8;
main(int u,char**a){u=1;L;L;L} | Use \177 instead of a special character inserted with a hex editor | Use \177 instead of a special character inserted with a hex editor
| C | mit | McZonk/7segements,McZonk/7segements |
18a0d3b3babd8e527884358674c1279ab26552cc | test/profile/instrprof-reset-counters.c | test/profile/instrprof-reset-counters.c | // RUN: %clang_profgen -o %t -O3 %s
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
// RUN: llvm-profdata merge -o %t.profdata %t.profraw
// RUN: %clang_profuse=%t.profdata -o - -S -emit-llvm %s | FileCheck %s
void __llvm_profile_reset_counters(void);
void foo(int);
int main(void) {
foo(0);
__llvm_profile_reset_counters();
foo(1);
return 0;
}
void foo(int N) {
// CHECK-LABEL: define{{(dso_local)?}} void @foo(
// CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof ![[FOO:[0-9]+]]
if (N) {}
}
// CHECK: ![[FOO]] = !{!"branch_weights", i32 2, i32 1}
| // RUN: %clang_profgen -o %t -O3 %s
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
// RUN: llvm-profdata merge -o %t.profdata %t.profraw
// RUN: %clang_profuse=%t.profdata -o - -S -emit-llvm %s | FileCheck %s
void __llvm_profile_reset_counters(void);
void foo(int);
int main(void) {
foo(0);
__llvm_profile_reset_counters();
foo(1);
return 0;
}
void foo(int N) {
// CHECK-LABEL: define{{( dso_local)?}} void @foo(
// CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof ![[FOO:[0-9]+]]
if (N) {}
}
// CHECK: ![[FOO]] = !{!"branch_weights", i32 2, i32 1}
| Add space inside the regular expression. | Add space inside the regular expression.
This should now pass on both ppc and x86. Sorry about the noise.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@324556 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
1cd78585f239dce3a08fbdc31129e756903e88e5 | src/util/status_bar_layer.h | src/util/status_bar_layer.h | #pragma once
#include <pebble.h>
#ifndef PBL_PLATFORM_BASALT
typedef struct StatusBarLayer StatusBarLayer;
struct StatusBarLayer;
static inline StatusBarLayer *status_bar_layer_create(void) {
return NULL;
}
static inline void status_bar_layer_destroy(StatusBarLayer *status_bar_layer) {
}
static inline Layer *status_bar_layer_get_layer(StatusBarLayer *status_bar_layer) {
return (Layer *)status_bar_layer;
}
static inline void status_bar_layer_add_to_window(Window *window, StatusBarLayer *status_bar_layer) {
window_set_fullscreen(window, false);
}
static inline void status_bar_layer_remove_from_window(Window *window, StatusBarLayer *status_bar_layer) {
window_set_fullscreen(window, true);
}
#else
static inline void status_bar_layer_add_to_window(Window *window, StatusBarLayer *status_bar_layer) {
layer_add_child(window_get_root_layer(window), status_bar_layer_get_layer(status_bar_layer));
}
static inline void status_bar_layer_remove_from_window(Window *window, StatusBarLayer *status_bar_layer) {
layer_remove_from_parent(status_bar_layer_get_layer(status_bar_layer));
}
#endif
| Add util status bar layer | Add util status bar layer
| C | mit | youtux/PebbleShows,arekom/pebble-github,fletchto99/pebblejs,frizzr/CatchOneBus,zanesalvatore/transit-watcher,ento/pebblejs,dennisdegreef/foober,pebble/pebblejs,carlo-colombo/dublin-bus-pebble,arekom/pebble-github,tbloncar/pebble-sitestatus,frizzr/CatchOneBus,ishepard/TransmissionTorrent,jsfi/pebblejs,fletchto99/pebblejs,bkbilly/Tvheadend-EPG,pebble/pebblejs,lavinjj/pebblejs,sunshineyyy/CatchOneBus,dhpark/pebblejs,dennisdegreef/foober,youtux/PebbleShows,carlo-colombo/dublin-bus-pebble,youtux/pebblejs,jiangege/pebblejs-project,frizzr/CatchOneBus,stephanpavlovic/pebble-kicker-app,carlo-colombo/dublin-bus-pebble,fletchto99/pebblejs,sunshineyyy/CatchOneBus,tbloncar/pebble-sitestatus,robinkam/pebblejs,jsfi/pebblejs,demophoon/Trimet-Tracker,effata/pebblejs,dennisdegreef/foober,daduke/LMSController,zanesalvatore/transit-watcher,daduke/LMSController,zanesalvatore/transit-watcher,robinkam/pebblejs,carlo-colombo/dublin-bus-pebble,bkbilly/Tvheadend-EPG,bkbilly/Tvheadend-EPG,gwijsman/OpenRemotePebble,Scoutski/pebblejs,tbloncar/pebble-sitestatus,ento/pebblejs,stephanpavlovic/pebble-kicker-app,dennisdegreef/foober,ishepard/TransmissionTorrent,youtux/pebblejs,zanesalvatore/transit-watcher,gwijsman/OpenRemotePebble,demophoon/Trimet-Tracker,gwijsman/OpenRemotePebble,zanesalvatore/transit-watcher,stephanpavlovic/pebble-kicker-app,demophoon/Trimet-Tracker,youtux/PebbleShows,effata/pebblejs,robinkam/pebblejs,demophoon/Trimet-Tracker,bkbilly/Tvheadend-EPG,gwijsman/OpenRemotePebble,arekom/pebble-github,pebble/pebblejs,ento/pebblejs,jsfi/pebblejs,jiangege/pebblejs-project,effata/pebblejs,dennisdegreef/foober,ishepard/TransmissionTorrent,fletchto99/pebblejs,arekom/pebble-github,Scoutski/pebblejs,dhpark/pebblejs,sunshineyyy/CatchOneBus,lavinjj/pebblejs,ento/pebblejs,robinkam/pebblejs,carlo-colombo/dublin-bus-pebble,ento/pebblejs,jiangege/pebblejs-project,sunshineyyy/CatchOneBus,demophoon/Trimet-Tracker,Scoutski/pebblejs,Scoutski/pebblejs,daduke/LMSController,arekom/pebble-github,effata/pebblejs,stephanpavlovic/pebble-kicker-app,fletchto99/pebblejs,lavinjj/pebblejs,lavinjj/pebblejs,pebble/pebblejs,ishepard/TransmissionTorrent,robinkam/pebblejs,tbloncar/pebble-sitestatus,Scoutski/pebblejs,youtux/pebblejs,dhpark/pebblejs,sunshineyyy/CatchOneBus,jsfi/pebblejs,youtux/pebblejs,gwijsman/OpenRemotePebble,jiangege/pebblejs-project,youtux/PebbleShows,youtux/pebblejs,frizzr/CatchOneBus,effata/pebblejs,jiangege/pebblejs-project,jsfi/pebblejs,tbloncar/pebble-sitestatus,bkbilly/Tvheadend-EPG,dhpark/pebblejs,lavinjj/pebblejs,daduke/LMSController,ishepard/TransmissionTorrent,pebble/pebblejs,dhpark/pebblejs,robinkam/pebblejs,stephanpavlovic/pebble-kicker-app,daduke/LMSController |
|
bb17b5e7ef14be5e038e938011d7e50981d0e049 | iv/lv5/radio/block_size.h | iv/lv5/radio/block_size.h | #ifndef IV_LV5_RADIO_BLOCK_SIZE_H_
#define IV_LV5_RADIO_BLOCK_SIZE_H_
#include <iv/static_assert.h>
#include <iv/arith.h>
namespace iv {
namespace lv5 {
namespace radio {
class Block;
static const std::size_t kBlockSize = core::Size::KB * 4;
static const uintptr_t kBlockMask = ~static_cast<uintptr_t>(kBlockSize - 1);
// must be 2^n size
IV_STATIC_ASSERT((1 << core::math::detail::CTZ<kBlockSize>::value) == kBlockSize);
} } } // namespace iv::lv5::radio
#endif // IV_LV5_RADIO_BLOCK_SIZE_H_
| #ifndef IV_LV5_RADIO_BLOCK_SIZE_H_
#define IV_LV5_RADIO_BLOCK_SIZE_H_
#include <iv/static_assert.h>
namespace iv {
namespace lv5 {
namespace radio {
namespace detail_block_size {
template<std::size_t x>
struct Is2Power {
static const bool value = x > 1 && (x & (x - 1)) == 0;
};
} // namespace detail_block_size
class Block;
static const std::size_t kBlockSize = core::Size::KB * 4;
static const uintptr_t kBlockMask = ~static_cast<uintptr_t>(kBlockSize - 1);
// must be 2^n size
IV_STATIC_ASSERT(detail_block_size::Is2Power<kBlockSize>::value);
} } } // namespace iv::lv5::radio
#endif // IV_LV5_RADIO_BLOCK_SIZE_H_
| Use Is2Power instead of ctz | Use Is2Power instead of ctz
| C | bsd-2-clause | Constellation/iv,Constellation/iv,Constellation/iv,Constellation/iv |
1b6a606bca13c30f4a6686f0c5e21eca05acfabc | include/error.h | include/error.h | #ifndef CPR_ERROR_H
#define CPR_ERROR_H
#include <string>
#include "cprtypes.h"
#include "defines.h"
namespace cpr {
enum class ErrorCode {
OK = 0,
CONNECTION_FAILURE,
EMPTY_RESPONSE,
HOST_RESOLUTION_FAILURE,
INTERNAL_ERROR,
INVALID_URL_FORMAT,
NETWORK_RECEIVE_ERROR,
NETWORK_SEND_FAILURE,
OPERATION_TIMEDOUT,
PROXY_RESOLUTION_FAILURE,
SSL_CONNECT_ERROR,
SSL_LOCAL_CERTIFICATE_ERROR,
SSL_REMOTE_CERTIFICATE_ERROR,
SSL_CACERT_ERROR,
GENERIC_SSL_ERROR,
UNSUPPORTED_PROTOCOL,
UNKNOWN_ERROR = 1000,
};
ErrorCode getErrorCodeForCurlError(int curlCode); //int so we don't have to include curl.h
class Error {
public:
Error()
: code{ErrorCode::OK}, message{""} {}
template <typename ErrorCodeType, typename TextType>
Error(ErrorCode& p_error_code, TextType&& p_error_message)
: code{p_error_code}, message{CPR_FWD(p_error_message)} {}
ErrorCode code;
std::string message;
//allow easy checking of errors with:
// if(error) { do something; }
explicit operator bool() const {
return code != ErrorCode::OK;
}
};
} // namespace cpr
#endif
| #ifndef CPR_ERROR_H
#define CPR_ERROR_H
#include <string>
#include "cprtypes.h"
#include "defines.h"
namespace cpr {
enum class ErrorCode {
OK = 0,
CONNECTION_FAILURE,
EMPTY_RESPONSE,
HOST_RESOLUTION_FAILURE,
INTERNAL_ERROR,
INVALID_URL_FORMAT,
NETWORK_RECEIVE_ERROR,
NETWORK_SEND_FAILURE,
OPERATION_TIMEDOUT,
PROXY_RESOLUTION_FAILURE,
SSL_CONNECT_ERROR,
SSL_LOCAL_CERTIFICATE_ERROR,
SSL_REMOTE_CERTIFICATE_ERROR,
SSL_CACERT_ERROR,
GENERIC_SSL_ERROR,
UNSUPPORTED_PROTOCOL,
UNKNOWN_ERROR = 1000,
};
ErrorCode getErrorCodeForCurlError(int curl_code); //int so we don't have to include curl.h
class Error {
public:
Error()
: code{ErrorCode::OK}, message{""} {}
template <typename ErrorCodeType, typename TextType>
Error(ErrorCode& p_error_code, TextType&& p_error_message)
: code{p_error_code}, message{CPR_FWD(p_error_message)} {}
ErrorCode code;
std::string message;
//allow easy checking of errors with:
// if(error) { do something; }
explicit operator bool() const {
return code != ErrorCode::OK;
}
};
} // namespace cpr
#endif
| Use lowercase underscore for variable name | Use lowercase underscore for variable name
| C | mit | msuvajac/cpr,msuvajac/cpr,whoshuu/cpr,whoshuu/cpr,whoshuu/cpr,msuvajac/cpr,SuperV1234/cpr,SuperV1234/cpr,SuperV1234/cpr |
75b9cc56c2c0daa501a9f0b78dd7caf9d3c446b5 | kernel/kernel.c | kernel/kernel.c | #include <stddef.h>
#include <stdint.h>
#include "gdt.c"
#include "idt.c"
#include "isr.c"
#include "terminal.h"
/* Check if the compiler thinks if we are targeting the wrong operating system. */
#if defined(__linux__)
#error "You are not using a cross-compiler, you will most certainly run into trouble"
#endif
/* This tutorial will only work for the 32-bit ix86 targets. */
#if !defined(__i386__)
#error "This tutorial needs to be compiled with a ix86-elf compiler"
#endif
void kernel_main()
{
gdt_install();
idt_install();
isrs_install();
term_initialize();
term_writestring("Interrupt?\n");
int i = 5;
i = i / 0;
term_writestring("Hello, Kernel!");
}
| #include <stddef.h>
#include <stdint.h>
#include "gdt.h"
#include "idt.h"
#include "isr.h"
#include "terminal.h"
/* Check if the compiler thinks if we are targeting the wrong operating system. */
#if defined(__linux__)
#error "You are not using a cross-compiler, you will most certainly run into trouble"
#endif
/* This tutorial will only work for the 32-bit ix86 targets. */
#if !defined(__i386__)
#error "This tutorial needs to be compiled with a ix86-elf compiler"
#endif
void kernel_main()
{
gdt_install();
idt_install();
isrs_install();
term_initialize();
term_writestring("Interrupt?\n");
int i = 5;
i = i / 0;
term_writestring("Hello, Kernel!");
}
| Change c files to header files. | Change c files to header files.
| C | mit | awensaunders/kernel-of-truth,awensaunders/kernel-of-truth,Herbstein/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,Herbstein/kernel-of-truth,awensaunders/kernel-of-truth,Herbstein/kernel-of-truth |
ce889a4ce30953e987a1469d130fb753886667bb | test/CodeGen/builtin-clzero.c | test/CodeGen/builtin-clzero.c | // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +clzero -emit-llvm -o - -Wall -Werror | FileCheck %s
#define __MM_MALLOC_H
#include <x86intrin.h>
void test_mm_clzero(void * __m) {
//CHECK-LABEL: @test_mm_clzero
//CHECK: @llvm.x86.clflushopt
_mm_clzero(__m);
}
| // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +clzero -emit-llvm -o - -Wall -Werror | FileCheck %s
#define __MM_MALLOC_H
#include <x86intrin.h>
void test_mm_clzero(void * __m) {
//CHECK-LABEL: @test_mm_clzero
//CHECK: @llvm.x86.clzero
_mm_clzero(__m);
}
| Fix copy and paste bug in clzero test from r294559. | [X86] Fix copy and paste bug in clzero test from r294559.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@294560 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang |
a02fb3a30f820c6573d52a898c5b1055b38f9b91 | php_compat_53.h | php_compat_53.h | #ifndef PHP_FE_END
# define PHP_FE_END { NULL, NULL, NULL }
#endif
#ifndef HASH_KEY_NON_EXISTENT
# define HASH_KEY_NON_EXISTENT HASH_KEY_NON_EXISTANT
#endif
| Isolate all PHP compatability stuff into its own file | Isolate all PHP compatability stuff into its own file
| C | apache-2.0 | jmikola/mongo-php-driver,derickr/mongo-php-driver,serebro/mongo-php-driver-prototype,christkv/phongo,10gen-labs/mongo-php-driver-prototype,derickr/mongo-php-driver-prototype,derickr/mongo-php-driver-prototype,derickr/mongo-php-driver-prototype,jmikola/mongo-php-driver,mongodb-labs/mongo-php-driver-prototype,bjori/mongo-php-driver-prototype,christkv/phongo,jmikola/mongo-php-driver-prototype,10gen-labs/mongo-php-driver-prototype,xplodwild/mongo-php-driver-prototype,jmikola/mongo-php-driver,derickr/mongo-php-driver-prototype,jmikola/mongo-php-driver-prototype,mongodb-labs/mongo-php-driver-prototype,serebro/mongo-php-driver-prototype,10gen-labs/mongo-php-driver-prototype,mongodb-labs/mongo-php-driver-prototype,bjori/mongo-php-driver-prototype,serebro/mongo-php-driver-prototype,jmikola/mongo-php-driver-prototype,jmikola/mongo-php-driver,bjori/mongo-php-driver-prototype,christkv/phongo,jmikola/mongo-php-driver-prototype,christkv/phongo,jmikola/mongo-php-driver-prototype,mongodb/mongo-php-driver,xplodwild/mongo-php-driver-prototype,mongodb-labs/mongo-php-driver-prototype,derickr/mongo-php-driver,10gen-labs/mongo-php-driver-prototype,mongodb/mongo-php-driver,xplodwild/mongo-php-driver-prototype,jmikola/mongo-php-driver,bjori/mongo-php-driver-prototype,10gen-labs/mongo-php-driver-prototype,serebro/mongo-php-driver-prototype,derickr/mongo-php-driver,derickr/mongo-php-driver,mongodb-labs/mongo-php-driver-prototype,mongodb/mongo-php-driver,derickr/mongo-php-driver-prototype,serebro/mongo-php-driver-prototype,xplodwild/mongo-php-driver-prototype,xplodwild/mongo-php-driver-prototype,derickr/mongo-php-driver,mongodb/mongo-php-driver,derickr/mongo-php-driver,bjori/mongo-php-driver-prototype,mongodb/mongo-php-driver |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.