commit
stringlengths 40
40
| old_file
stringlengths 4
237
| new_file
stringlengths 4
237
| old_contents
stringlengths 1
4.24k
| new_contents
stringlengths 1
4.87k
| subject
stringlengths 15
778
| message
stringlengths 15
8.75k
| lang
stringclasses 266
values | license
stringclasses 13
values | repos
stringlengths 5
127k
|
|---|---|---|---|---|---|---|---|---|---|
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 <thiago@vettatech.com>
* Andre Senna <senna@vettalabs.com>
*
* 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 <thiago@vettatech.com>
* Andre Senna <senna@vettalabs.com>
*
* 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
|
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
|
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
|
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
|
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, adam@chyla.org
* 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, adam@chyla.org
* 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
|
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 <0d543840881a2c189b4f7636b15eebd6a8f60ace@gmail.com>
|
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
|
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
|
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
|
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
|
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 <73675debcd8a436be48ec22211dcf44fe0df0a64@decadent.org.uk>
Cc: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>
Cc: Mike Galbraith <3cfa3897b7f55b5396b7a47c83b66325184bc9b4@gmx.de>
Cc: Peter Zijlstra <3fddac958924aef220f202ca567388ddab3f14a8@infradead.org>
Cc: Thomas Gleixner <00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de>
Cc: 2578944098299abf708b08eff6fcf60565553586@vger.kernel.org
Link: 1a33e98b5ba0bc803f6f34527d38fce92e88714d@decadent.org.uk
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@kernel.org>
|
C
|
mit
|
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
|
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
|
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 <axel@cern.ch>
//------------------------------------------------------------------------------
#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 <axel@cern.ch>
//------------------------------------------------------------------------------
#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: 3cd39cbacb0d69a21809879b1660e5325a970d65@mail.gmail.com
|
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
|
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
|
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
|
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
|
3f150a8d8b571ca3f072d3ced1b3272aa82b9ea9
|
lib/MetaProcessor/Display.h
|
lib/MetaProcessor/Display.h
|
//--------------------------------------------------------------------*- C++ -*-
// CLING - the C++ LLVM-based InterpreterG :)
// version: $Id$
// author: Timur Pocheptsov <Timur.Pocheptsov@cern.ch>
//------------------------------------------------------------------------------
#ifndef CLING_DISPLAY_H
#define CLING_DISPLAY_H
#include <string>
namespace llvm {
class raw_ostream;
}
namespace cling {
void DisplayClasses(llvm::raw_ostream &stream,
const class Interpreter *interpreter, bool verbose);
void DisplayClass(llvm::raw_ostream &stream,
const Interpreter *interpreter, const char *className,
bool verbose);
void DisplayGlobals(llvm::raw_ostream &stream, const Interpreter *interpreter);
void DisplayGlobal(llvm::raw_ostream &stream, const Interpreter *interpreter,
const std::string &name);
}
#endif
|
//--------------------------------------------------------------------*- C++ -*-
// CLING - the C++ LLVM-based InterpreterG :)
// version: $Id$
// author: Timur Pocheptsov <Timur.Pocheptsov@cern.ch>
//------------------------------------------------------------------------------
#ifndef CLING_DISPLAY_H
#define CLING_DISPLAY_H
#include <string>
namespace llvm {
class raw_ostream;
}
namespace cling {
class Interpreter;
void DisplayClasses(llvm::raw_ostream &stream,
const Interpreter *interpreter, bool verbose);
void DisplayClass(llvm::raw_ostream &stream,
const Interpreter *interpreter, const char *className,
bool verbose);
void DisplayGlobals(llvm::raw_ostream &stream, const Interpreter *interpreter);
void DisplayGlobal(llvm::raw_ostream &stream, const Interpreter *interpreter,
const std::string &name);
}
#endif
|
Fix fwd decl for windows.
|
Fix fwd decl for windows.
git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@47814 27541ba8-7e3a-0410-8455-c3a389f83636
|
C
|
lgpl-2.1
|
karies/cling,marsupial/cling,karies/cling,perovic/cling,marsupial/cling,marsupial/cling,perovic/cling,root-mirror/cling,marsupial/cling,perovic/cling,root-mirror/cling,marsupial/cling,perovic/cling,karies/cling,karies/cling,root-mirror/cling,karies/cling,root-mirror/cling,perovic/cling,marsupial/cling,root-mirror/cling,karies/cling,root-mirror/cling
|
50c59dac186f1e0de702c5b2f761c1ede995f084
|
indra/llcommon/llversionviewer.h
|
indra/llcommon/llversionviewer.h
|
/**
* @file llversionviewer.h
* @brief
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_LLVERSIONVIEWER_H
#define LL_LLVERSIONVIEWER_H
const S32 LL_VERSION_MAJOR = 2;
const S32 LL_VERSION_MINOR = 1;
const S32 LL_VERSION_PATCH = 2;
const S32 LL_VERSION_BUILD = 0;
const char * const LL_CHANNEL = "Second Life Developer";
#endif
|
/**
* @file llversionviewer.h
* @brief
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_LLVERSIONVIEWER_H
#define LL_LLVERSIONVIEWER_H
const S32 LL_VERSION_MAJOR = 2;
const S32 LL_VERSION_MINOR = 2;
const S32 LL_VERSION_PATCH = 1;
const S32 LL_VERSION_BUILD = 0;
const char * const LL_CHANNEL = "Second Life Developer";
#endif
|
Increment version number since we forked for beta.
|
Increment version number since we forked for beta.
|
C
|
lgpl-2.1
|
gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm
|
3983d4d1d363412b863aabd1219676c589d9ed41
|
src/binary.c
|
src/binary.c
|
#include <binary.h>
#include <assert.h>
#include <crc32.h>
/* API ************************************************************************/
Binary *binary_new(Scope *scope, size_t size) {
Binary *binary = scope_alloc(scope, sizeof(Binary) + size);
binary->size = size;
binary->header = ref_header(TYPEID_BINARY, 0);
memset(binary->data, 0, binary->size);
return binary;
}
Binary *binary(Scope *scope, const uint8_t *data, size_t size) {
Binary *binary = scope_alloc(scope, sizeof(Binary) + size);
binary->size = size;
binary->header = ref_header(TYPEID_BINARY, 0);
memcpy(binary->data, data, size);
return binary;
}
uint32_t binary_hash32(uint32_t hash, Binary *binary) {
assert(binary != NULL);
return crc32(hash, binary->data, binary->size);
}
|
#include <binary.h>
#include <assert.h>
#include <crc32.h>
/* API ************************************************************************/
Binary *binary_new(Scope *scope, size_t size) {
Binary *binary = scope_alloc(scope, sizeof(Binary) + size + 1);
binary->size = size;
binary->header = ref_header(TYPEID_BINARY, 0);
memset(binary->data, 0, binary->size + 1);
return binary;
}
Binary *binary(Scope *scope, const uint8_t *data, size_t size) {
Binary *binary = scope_alloc(scope, sizeof(Binary) + size + 1);
binary->size = size;
binary->header = ref_header(TYPEID_BINARY, 0);
memcpy(binary->data, data, size + 1);
return binary;
}
uint32_t binary_hash32(uint32_t hash, Binary *binary) {
assert(binary != NULL);
return crc32(hash, binary->data, binary->size);
}
|
Add ending null-byte to binaries
|
Add ending null-byte to binaries
|
C
|
apache-2.0
|
samuelotter/slang,samuelotter/slang
|
c22cda86143d517da8147fca81f45f595023a8ad
|
src/Classes/IMapEventListener.h
|
src/Classes/IMapEventListener.h
|
#ifndef MAP_EVENT_LISTENER_H
#define MAP_EVENT_LISTENER_H
#include "cocos2d.h"
namespace tsg {
namespace map {
class IMapEventListener {
public:
virtual void onMapLoad(cocos2d::TMXTiledMap *) = 0;
virtual void onViewCoordinatesChanged(cocos2d::Vec2) =0;
virtual void onNightTime() =0;
virtual void onDayTime() =0;
virtual void onGameHourPassed() =0;
virtual ~IMapEventListener(){};
};
}
}
#endif
|
#ifndef MAP_EVENT_LISTENER_H
#define MAP_EVENT_LISTENER_H
#include "cocos2d.h"
namespace tsg {
namespace map {
class IMapEventListener {
public:
virtual void onMapLoad(cocos2d::TMXTiledMap *) = 0;
virtual void onViewCoordinatesChanged(cocos2d::Vec2) = 0;
virtual void onNightTime() = 0;
virtual void onDayTime() = 0;
virtual void onGameHourPassed() = 0;
virtual ~IMapEventListener(){};
};
}
}
#endif
|
Format previos commit with clang-formatter
|
Format previos commit with clang-formatter
|
C
|
apache-2.0
|
TopSecretGames/game,apocarteres/game
|
3c5ab51a235a400427b364a608e679d91390f96a
|
Quick/Quick.h
|
Quick/Quick.h
|
#import <Foundation/Foundation.h>
//! Project version number for Quick.
FOUNDATION_EXPORT double QuickVersionNumber;
//! Project version string for Quick.
FOUNDATION_EXPORT const unsigned char QuickVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <Quick/PublicHeader.h>
#import <Quick/QuickSpec.h>
#import <Quick/QCKDSL.h>
#import <Quick/QuickConfiguration.h>
|
#import <Foundation/Foundation.h>
//! Project version number for Quick.
FOUNDATION_EXPORT double QuickVersionNumber;
//! Project version string for Quick.
FOUNDATION_EXPORT const unsigned char QuickVersionString[];
#import <Quick/QuickSpec.h>
|
Remove public headers from umbrella header
|
Remove public headers from umbrella header
This seems to be the root cause for new projects created in Xcode 7.1
to report "Include of non-modular header inside framework Module
'Quick'".
Infer: It seems like the swift compiler in Xcode 7.1 now prevents
non-modular includes in umbrella header files. The public headers are
assumed to be imported in modules.
|
C
|
apache-2.0
|
marciok/Quick,Quick/Quick,phatblat/Quick,paulyoung/Quick,DanielAsher/Quick,Quick/Quick,DanielAsher/Quick,phatblat/Quick,jeffh/Quick,ikesyo/Quick,jasonchaffee/Quick,mokagio/Quick,jeffh/Quick,dgdosen/Quick,Quick/Quick,jasonchaffee/Quick,ikesyo/Quick,phatblat/Quick,dgdosen/Quick,Quick/Quick,paulyoung/Quick,marciok/Quick,ashfurrow/Quick,phatblat/Quick,mokagio/Quick,ikesyo/Quick,paulyoung/Quick,jasonchaffee/Quick,marciok/Quick,mokagio/Quick,dgdosen/Quick,jeffh/Quick,ashfurrow/Quick
|
2376316b36f4d6bdbdb82bea519b6296763bb2f2
|
MORK/ORKTaskResult+MORK.h
|
MORK/ORKTaskResult+MORK.h
|
//
// ORKCollectionResult+MORK.h
// MORK
//
// Created by Nolan Carroll on 4/23/15.
// Copyright (c) 2015 Medidata Solutions. All rights reserved.
//
#import "ORKResult.h"
@interface ORKTaskResult (MORK)
@property (readonly) NSArray *mork_fieldDataFromResults;
@end
|
//
// ORKCollectionResult+MORK.h
// MORK
//
// Created by Nolan Carroll on 4/23/15.
// Copyright (c) 2015 Medidata Solutions. All rights reserved.
//
#import "ORKResult.h"
@interface ORKTaskResult (MORK)
- (NSArray *)mork_getFieldDataFromResults;
@end
|
Put method declaration back into category header
|
Put method declaration back into category header
|
C
|
mit
|
mdsol/MORK,mdsol/MORK
|
4dd9b0481fedd5fb2386865525e4e186cd88b10a
|
cores/esp8266/core_esp8266_noniso.c
|
cores/esp8266/core_esp8266_noniso.c
|
#include <stdlib.h>
#include "stdlib_noniso.h"
long atol_internal(const char* s)
{
return 0;
}
float atof_internal(const char* s)
{
return 0;
}
char * itoa (int val, char *s, int radix)
{
*s = 0;
return s;
}
char * ltoa (long val, char *s, int radix)
{
*s = 0;
return s;
}
char * utoa (unsigned int val, char *s, int radix)
{
*s = 0;
return s;
}
char * ultoa (unsigned long val, char *s, int radix)
{
*s = 0;
return s;
}
char * dtostre (double __val, char *__s, unsigned char __prec, unsigned char __flags)
{
*__s = 0;
return __s;
}
char * dtostrf (double __val, signed char __width, unsigned char __prec, char *__s)
{
*__s = 0;
return __s;
}
|
#include <stdlib.h>
#include "stdlib_noniso.h"
extern int ets_sprintf(char*, const char*, ...);
#define sprintf ets_sprintf
long atol_internal(const char* s)
{
long result = 0;
return result;
}
float atof_internal(const char* s)
{
float result = 0;
return result;
}
char * itoa (int val, char *s, int radix)
{
// todo: radix
sprintf(s, "%d", val);
return s;
}
char * ltoa (long val, char *s, int radix)
{
sprintf(s, "%ld", val);
return s;
}
char * utoa (unsigned int val, char *s, int radix)
{
sprintf(s, "%u", val);
return s;
}
char * ultoa (unsigned long val, char *s, int radix)
{
sprintf(s, "%lu", val);
return s;
}
char * dtostre (double __val, char *__s, unsigned char __prec, unsigned char __flags)
{
*__s = 0;
return __s;
}
char * dtostrf (double __val, signed char __width, unsigned char __prec, char *__s)
{
*__s = 0;
return __s;
}
|
Add stubs for itoa, ltoa
|
Add stubs for itoa, ltoa
|
C
|
lgpl-2.1
|
gguuss/Arduino,NullMedia/Arduino,gguuss/Arduino,edog1973/Arduino,jes/Arduino,NullMedia/Arduino,Links2004/Arduino,Links2004/Arduino,me-no-dev/Arduino,gguuss/Arduino,Adam5Wu/Arduino,quertenmont/Arduino,esp8266/Arduino,KaloNK/Arduino,quertenmont/Arduino,quertenmont/Arduino,me-no-dev/Arduino,NullMedia/Arduino,NextDevBoard/Arduino,Adam5Wu/Arduino,martinayotte/ESP8266-Arduino,wemos/Arduino,martinayotte/ESP8266-Arduino,me-no-dev/Arduino,chrisfraser/Arduino,chrisfraser/Arduino,lrmoreno007/Arduino,CanTireInnovations/Arduino,sticilface/Arduino,Juppit/Arduino,NextDevBoard/Arduino,KaloNK/Arduino,Cloudino/Arduino,Adam5Wu/Arduino,toastedcode/esp8266-Arduino,lrmoreno007/Arduino,CanTireInnovations/Arduino,Cloudino/Cloudino-Arduino-IDE,Cloudino/Cloudino-Arduino-IDE,sticilface/Arduino,chrisfraser/Arduino,KaloNK/Arduino,Lan-Hekary/Arduino,CanTireInnovations/Arduino,jes/Arduino,Adam5Wu/Arduino,hallard/Arduino,me-no-dev/Arduino,Lan-Hekary/Arduino,hallard/Arduino,CanTireInnovations/Arduino,martinayotte/ESP8266-Arduino,Cloudino/Arduino,hallard/Arduino,lrmoreno007/Arduino,hallard/Arduino,Links2004/Arduino,jes/Arduino,sticilface/Arduino,Juppit/Arduino,jes/Arduino,Cloudino/Cloudino-Arduino-IDE,wemos/Arduino,NextDevBoard/Arduino,gguuss/Arduino,NextDevBoard/Arduino,Cloudino/Arduino,quertenmont/Arduino,sticilface/Arduino,jes/Arduino,NullMedia/Arduino,sticilface/Arduino,toastedcode/esp8266-Arduino,Cloudino/Cloudino-Arduino-IDE,martinayotte/ESP8266-Arduino,KaloNK/Arduino,quertenmont/Arduino,Cloudino/Cloudino-Arduino-IDE,gguuss/Arduino,edog1973/Arduino,Lan-Hekary/Arduino,CanTireInnovations/Arduino,NullMedia/Arduino,Juppit/Arduino,Cloudino/Arduino,Links2004/Arduino,martinayotte/ESP8266-Arduino,Lan-Hekary/Arduino,esp8266/Arduino,lrmoreno007/Arduino,Cloudino/Cloudino-Arduino-IDE,toastedcode/esp8266-Arduino,KaloNK/Arduino,Cloudino/Arduino,Lan-Hekary/Arduino,Juppit/Arduino,toastedcode/esp8266-Arduino,lrmoreno007/Arduino,hallard/Arduino,esp8266/Arduino,Juppit/Arduino,wemos/Arduino,toastedcode/esp8266-Arduino,CanTireInnovations/Arduino,CanTireInnovations/Arduino,wemos/Arduino,Adam5Wu/Arduino,chrisfraser/Arduino,edog1973/Arduino,chrisfraser/Arduino,edog1973/Arduino,me-no-dev/Arduino,esp8266/Arduino,wemos/Arduino,Cloudino/Arduino,Links2004/Arduino,esp8266/Arduino,NextDevBoard/Arduino,Cloudino/Cloudino-Arduino-IDE,edog1973/Arduino,Cloudino/Arduino
|
afb88aaf4f3b358e4ba93894c7e462a949ffd80e
|
elang/compiler/ast/with_modifiers.h
|
elang/compiler/ast/with_modifiers.h
|
// Copyright 2014-2015 Project Vogue. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ELANG_COMPILER_AST_WITH_MODIFIERS_H_
#define ELANG_COMPILER_AST_WITH_MODIFIERS_H_
#include "elang/compiler/modifiers.h"
namespace elang {
namespace compiler {
namespace ast {
//////////////////////////////////////////////////////////////////////
//
// WithModifiers
//
class WithModifiers {
public:
Modifiers modifiers() const { return modifiers_; }
protected:
explicit WithModifiers(Modifiers modifiers);
~WithModifiers();
private:
Modifiers modifiers_;
DISALLOW_COPY_AND_ASSIGN(WithModifiers);
};
} // namespace ast
} // namespace compiler
} // namespace elang
#endif // ELANG_COMPILER_AST_WITH_MODIFIERS_H_
|
// Copyright 2014-2015 Project Vogue. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ELANG_COMPILER_AST_WITH_MODIFIERS_H_
#define ELANG_COMPILER_AST_WITH_MODIFIERS_H_
#include "elang/compiler/modifiers.h"
namespace elang {
namespace compiler {
namespace ast {
//////////////////////////////////////////////////////////////////////
//
// WithModifiers
//
class WithModifiers {
public:
Modifiers modifiers() const { return modifiers_; }
#define V(name, string, details) \
bool Has##name() const { return modifiers_.Has##name(); }
FOR_EACH_MODIFIER(V)
#undef V
protected:
explicit WithModifiers(Modifiers modifiers);
~WithModifiers();
private:
Modifiers modifiers_;
DISALLOW_COPY_AND_ASSIGN(WithModifiers);
};
} // namespace ast
} // namespace compiler
} // namespace elang
#endif // ELANG_COMPILER_AST_WITH_MODIFIERS_H_
|
Introduce |HasPartial()|, |HasPublic()|, and so on in |WithModifiers| class for ease of accessing modifiers.
|
elang/compiler: Introduce |HasPartial()|, |HasPublic()|, and so on in |WithModifiers| class for ease of accessing modifiers.
|
C
|
apache-2.0
|
eval1749/elang,eval1749/elang,eval1749/elang,eval1749/elang,eval1749/elang
|
9f0a75104da58dd1c8a88e825ff3a7815d8ca7f8
|
src/dump.h
|
src/dump.h
|
/**
* File: dump.h
* Author: Scott Bennett
*/
#ifndef DUMP_H
#define DUMP_H
void dumpMemory();
void dumpProgramRegisters();
void dumpProcessorRegisters();
#endif /* DUMP_H */
|
/*
* File: dump.h
* Author: Scott Bennett
*/
#ifndef DUMP_H
#define DUMP_H
void dumpMemory();
void dumpProgramRegisters();
void dumpProcessorRegisters();
#endif /* DUMP_H */
|
Change header to C style.
|
Change header to C style.
|
C
|
isc
|
sbennett1990/YESS,sbennett1990/YESS,sbennett1990/YESS
|
c27178386eaed213ca1eb798cc479408ad03a298
|
src/main.c
|
src/main.c
|
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/uio.h>
#define SERVER "127.0.0.1"
#define BUFLEN 512 // max length of buffer
#define PORT 3000 // destination port
void die(const char *s) {
perror(s);
exit(1);
}
int main() {
struct sockaddr_in si_other;
int s, slen = sizeof(si_other);
char buf[BUFLEN];
if ((s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) {
die("socket");
}
memset((char*)&si_other, 0, sizeof(si_other));
si_other.sin_family = AF_INET;
si_other.sin_port = htons(PORT);
if (inet_aton(SERVER, &si_other.sin_addr) == 0) {
fprintf(stderr, "inet_aton() failed\n");
exit(1);
}
while (1) {
printf("Enter message:\n");
const char* msg = "hello";
if (sendto(s, msg, strlen(msg), 0, (struct sockaddr*) &si_other, slen) == -1) {
die("sendto()");
}
memset(buf, '\0', BUFLEN);
break;
}
close(s);
return 0;
}
|
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <sys/socket.h>
#include <netinet/in.h>
__attribute__((noreturn))
void failed(const char* s) {
perror(s);
exit(1);
}
int main() {
int s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (s == -1) {
failed("socket()");
}
}
|
Remove broken prototype, starting out clean
|
Remove broken prototype, starting out clean
|
C
|
mit
|
darthdeus/dit,darthdeus/dit,darthdeus/dit
|
29f659dfcfde7adb191065b3c2929ac9f86c4147
|
src/main.c
|
src/main.c
|
#include <config.h>
#include "utest.h"
int __attribute__((weak)) main (void)
{
return ut_run_all_tests() == 0;
}
|
#include <config.h>
#include "utest.h"
#include <unistd.h>
#include <getopt.h>
#include <stdio.h>
static struct option options[] = {
{ "help", no_argument, NULL, 'h' },
{ "version", no_argument, NULL, 'V' },
{ NULL, 0, 0, 0 }
};
int __attribute__((weak)) main (int argc, char **argv)
{
int c;
while (1) {
int option_index;
c = getopt_long(argc, argv, "hV", options, &option_index);
if (c == -1) {
break;
}
switch (c) {
case 'h':
printf("Help!\n");
break;
case 'V':
printf("Version!\n");
break;
}
}
return ut_run_all_tests() == 0;
}
|
Add basic cmd options handling
|
Add basic cmd options handling
|
C
|
bsd-3-clause
|
lubomir/libutest,lubomir/libutest,lubomir/libutest
|
d041cc813bcfcd04f077acdcea855f08b7d55577
|
test/Driver/solaris-ld.c
|
test/Driver/solaris-ld.c
|
// Test ld invocation on Solaris targets.
// Check sparc-sun-solaris2.1
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=sparc-sun-solaris2.11 \
// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/sparc-sun-solaris2.11 \
// RUN: | FileCheck %s
// CHECK: "-cc1" "-triple" "sparc-sun-solaris2.11"
// CHECK: ld{{.*}}"
// CHECK: "--dynamic-linker" "{{.*}}/usr/lib/ld.so.1"
// CHECK: "{{.*}}/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2/crt1.o"
// CHECK: "{{.*}}/usr/lib/crti.o"
// CHECK: "{{.*}}/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2/crtbegin.o"
// CHECK: "{{.*}}/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2/crtend.o"
// CHECK: "{{.*}}/usr/lib/crtn.o"
|
// Test ld invocation on Solaris targets.
// Check sparc-sun-solaris2.1
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=sparc-sun-solaris2.11 \
// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/sparc-sun-solaris2.11 \
// RUN: | FileCheck %s
// CHECK: "-cc1" "-triple" "sparc-sun-solaris2.11"
// CHECK: ld{{.*}}"
// CHECK: "--dynamic-linker" "{{.*}}/usr/lib/ld.so.1"
// CHECK: "{{.*}}/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2{{/|\\\\}}crt1.o"
// CHECK: "{{.*}}/usr/lib/crti.o"
// CHECK: "{{.*}}/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2{{/|\\\\}}crtbegin.o"
// CHECK: "{{.*}}/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2{{/|\\\\}}crtend.o"
// CHECK: "{{.*}}/usr/lib/crtn.o"
|
Fix path seperator for Windows.
|
Fix path seperator for Windows.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@246520 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
|
7bdf334b2c0524d4654bf1c63a2bfcba636b6cab
|
test/lex.c
|
test/lex.c
|
// Copyright 2012 Rui Ueyama <rui314@gmail.com>
// This program is free software licensed under the MIT license.
#include "test.h"
#define stringify(x) #x
void digraph(void) {
expect_string("[", stringify(<:));
expect_string("]", stringify(:>));
expect_string("{", stringify(<%));
expect_string("}", stringify(%>));
expect_string("#", stringify(%:));
expect_string("% :", stringify(% :));
expect_string("##", stringify(%:%:));
expect_string("#%", stringify(%:%));
}
void testmain(void) {
print("lexer");
digraph();
}
|
// Copyright 2012 Rui Ueyama <rui314@gmail.com>
// This program is free software licensed under the MIT license.
#include "test.h"
#define stringify(x) #x
void digraph(void) {
expect_string("[", stringify(<:));
expect_string("]", stringify(:>));
expect_string("{", stringify(<%));
expect_string("}", stringify(%>));
expect_string("#", stringify(%:));
expect_string("% :", stringify(% :));
expect_string("##", stringify(%:%:));
expect_string("#%", stringify(%:%));
}
void escape(void) {
int value = 10;
expect(10, val\
ue);
}
void testmain(void) {
print("lexer");
digraph();
escape();
}
|
Add a test for line continuation.
|
Add a test for line continuation.
|
C
|
mit
|
8l/8cc,8l/8cc,jtramm/8cc,vastin/8cc,gergo-/8cc,nobody1986/8cc,vastin/8cc,abc00/8cc,jtramm/8cc,rui314/8cc,abc00/8cc,8l/8cc,cpjreynolds/8cc,abc00/8cc,andrewchambers/8cc,gergo-/8cc,rui314/8cc,nobody1986/8cc,abc00/8cc,cpjreynolds/8cc,andrewchambers/8cc,rui314/8cc,vastin/8cc,vastin/8cc,nobody1986/8cc,cpjreynolds/8cc,gergo-/8cc,cpjreynolds/8cc,andrewchambers/8cc,andrewchambers/8cc,rui314/8cc,jtramm/8cc,jtramm/8cc,8l/8cc,nobody1986/8cc
|
5b40dbec30817266ae2c7833ea2599f4ba6d265d
|
src/TriangleStripGLWidget.h
|
src/TriangleStripGLWidget.h
|
#ifndef TRIANGLESTRIPGLWIDGET_H
#define TRIANGLESTRIPGLWIDGET_H
#include "GLWidget.h"
#include <cmath>
/**
* Draws a trapezoid on screen using a triangle strip. Strips can be thought of
* lists of vertices, where each triangle in the list is composed of some
* adjacent group of three vertices. The vertices are colored for easy viewing.
*
* @author Aaron Faanes, ported by Brett Langford
*
*/
class TriangleStripGLWidget : public GLWidget
{
public:
TriangleStripGLWidget(QWidget* parent = 0);
protected:
void render();
};
TriangleStripGLWidget::TriangleStripGLWidget(QWidget* parent) : GLWidget(parent) {}
void TriangleStripGLWidget::render()
{
glBegin(GL_TRIANGLE_STRIP);
glColor3f(1, 0, 0);
glVertex2f(0, 0);
glColor3f(1, 1, 0);
glVertex2f(50, 0);
glColor3f(0, 1, 0);
glVertex2f(25, 50);
glColor3f(0, 1, 1);
glVertex2f(75, 50);
glColor3f(0, 0, 1);
glVertex2f(50, 100);
glEnd();
}
#endif // TRIANGLESTRIPGLWIDGET_H
|
#ifndef TRIANGLESTRIPGLWIDGET_H
#define TRIANGLESTRIPGLWIDGET_H
#include "GLWidget.h"
#include <cmath>
/**
* Draws a trapezoid on screen using a triangle strip. Strips can be thought of
* lists of vertices, where each triangle in the list is composed of some
* adjacent group of three vertices. The vertices are colored for easy viewing.
*
* @author Aaron Faanes, ported by Brett Langford
*
*/
class TriangleStripGLWidget : public GLWidget
{
public:
TriangleStripGLWidget(QWidget* parent = 0);
protected:
void render();
};
TriangleStripGLWidget::TriangleStripGLWidget(QWidget* parent) : GLWidget(parent) {}
void TriangleStripGLWidget::render()
{
glBegin(GL_TRIANGLE_STRIP);
glColor3f(1, 0, 0);
glVertex2f(0, 0);
glColor3f(1, 1, 0);
glVertex2f(50, 0);
glColor3f(0, 1, 0);
glVertex2f(25, 50);
glColor3f(0, 1, 1);
glVertex2f(75, 50);
glColor3f(0, 0, 1);
glVertex2f(50, 100);
glEnd();
}
#endif // TRIANGLESTRIPGLWIDGET_H
|
Put comment right next to class def
|
Put comment right next to class def
It's convention to have these without intervening spaces.
|
C
|
mit
|
dafrito/alpha,dafrito/alpha,dafrito/alpha
|
6e1b9916f3416fbfbda38f720bd01040532fd062
|
src/modules/conf_randr/e_smart_randr.h
|
src/modules/conf_randr/e_smart_randr.h
|
#ifdef E_TYPEDEFS
#else
# ifndef E_SMART_RANDR_H
# define E_SMART_RANDR_H
Evas_Object *e_smart_randr_add(Evas *evas);
void e_smart_randr_current_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
void e_smart_randr_monitors_create(Evas_Object *obj);
void e_smart_randr_monitor_add(Evas_Object *obj, Evas_Object *mon);
void e_smart_randr_monitor_del(Evas_Object *obj, Evas_Object *mon);
# endif
#endif
|
#ifdef E_TYPEDEFS
#else
# ifndef E_SMART_RANDR_H
# define E_SMART_RANDR_H
Evas_Object *e_smart_randr_add(Evas *evas);
void e_smart_randr_current_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
void e_smart_randr_monitors_create(Evas_Object *obj);
void e_smart_randr_monitor_add(Evas_Object *obj, Evas_Object *mon);
void e_smart_randr_monitor_del(Evas_Object *obj, Evas_Object *mon);
Eina_Bool e_smart_randr_changed_get(Evas_Object *obj);
void e_smart_randr_changes_apply(Evas_Object *obj, Ecore_X_Window root);
# endif
#endif
|
Add prototypes for randr_changed_get and randr_changes_apply functions.
|
Add prototypes for randr_changed_get and randr_changes_apply functions.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>
SVN revision: 81104
|
C
|
bsd-2-clause
|
tizenorg/platform.upstream.enlightenment,rvandegrift/e,FlorentRevest/Enlightenment,rvandegrift/e,tizenorg/platform.upstream.enlightenment,rvandegrift/e,tasn/enlightenment,tasn/enlightenment,tasn/enlightenment,FlorentRevest/Enlightenment,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment
|
e1be62f3f580c1147088d58c03775603082e56d2
|
src/condor_includes/condor_constants.h
|
src/condor_includes/condor_constants.h
|
#ifndef CONSTANTS_H
#define CONSTANTS_H
#if !defined(__STDC__) && !defined(__cplusplus)
#define const
#endif
/*
Set up a boolean variable type. Since this definition could conflict
with other reasonable definition of BOOLEAN, i.e. using an enumeration,
it is conditional.
*/
#ifndef BOOLEAN_TYPE_DEFINED
typedef int BOOLEAN;
#endif
#ifndef TRUE
static const int TRUE = 1;
static const int FALSE = 0;
#endif
/*
Useful constants for turning seconds into larger units of time. Since
these constants may have already been defined elsewhere, they are
conditional.
*/
#ifndef TIME_CONSTANTS_DEFINED
static const int MINUTE = 60;
static const int HOUR = 60 * 60;
static const int DAY = 24 * 60 * 60;
#endif
/*
This is for use with strcmp() and related functions which will return
0 upon a match.
*/
#ifndef MATCH
static const int MATCH = 0;
#endif
#endif
|
#ifndef CONSTANTS_H
#define CONSTANTS_H
#if !defined(__STDC__) && !defined(__cplusplus)
#define const
#endif
/*
Set up a boolean variable type. Since this definition could conflict
with other reasonable definition of BOOLEAN, i.e. using an enumeration,
it is conditional.
*/
#ifndef BOOLEAN_TYPE_DEFINED
typedef int BOOLEAN;
#endif
#if defined(TRUE)
# undef TRUE
# undef FALSE
#endif
static const int TRUE = 1;
static const int FALSE = 0;
/*
Useful constants for turning seconds into larger units of time. Since
these constants may have already been defined elsewhere, they are
conditional.
*/
#ifndef TIME_CONSTANTS_DEFINED
static const int MINUTE = 60;
static const int HOUR = 60 * 60;
static const int DAY = 24 * 60 * 60;
#endif
/*
This is for use with strcmp() and related functions which will return
0 upon a match.
*/
#ifndef MATCH
static const int MATCH = 0;
#endif
#endif
|
Make sure "TRUE" and "FALSE" are undefined before setting them up as constant int's.
|
Make sure "TRUE" and "FALSE" are undefined before setting them up as
constant int's.
|
C
|
apache-2.0
|
zhangzhehust/htcondor,clalancette/condor-dcloud,zhangzhehust/htcondor,zhangzhehust/htcondor,clalancette/condor-dcloud,djw8605/htcondor,neurodebian/htcondor,bbockelm/condor-network-accounting,zhangzhehust/htcondor,zhangzhehust/htcondor,djw8605/htcondor,htcondor/htcondor,bbockelm/condor-network-accounting,htcondor/htcondor,clalancette/condor-dcloud,neurodebian/htcondor,clalancette/condor-dcloud,clalancette/condor-dcloud,djw8605/condor,neurodebian/htcondor,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,djw8605/htcondor,zhangzhehust/htcondor,clalancette/condor-dcloud,djw8605/htcondor,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,neurodebian/htcondor,zhangzhehust/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,htcondor/htcondor,htcondor/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,htcondor/htcondor,djw8605/condor,htcondor/htcondor,mambelli/osg-bosco-marco,neurodebian/htcondor,djw8605/condor,bbockelm/condor-network-accounting,djw8605/condor,bbockelm/condor-network-accounting,neurodebian/htcondor,djw8605/htcondor,bbockelm/condor-network-accounting,neurodebian/htcondor,djw8605/htcondor,htcondor/htcondor,djw8605/condor,djw8605/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,mambelli/osg-bosco-marco,djw8605/condor,djw8605/condor,djw8605/condor,djw8605/htcondor,clalancette/condor-dcloud,htcondor/htcondor,mambelli/osg-bosco-marco
|
65c761a0d8dd7a84c9fbf9c108dafc1b8b690ac6
|
php_shmt.h
|
php_shmt.h
|
#ifndef PHP_SHMT_H
#define PHP_SHMT_H
#define PHP_SHMT_EXTNAME "SHMT"
#define PHP_SHMT_EXTVER "1.0.1"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
extern zend_module_entry shmt_module_entry;
#define phpext_shmt_ptr &shmt_module_entry;
#endif /* PHP_SHMT_H */
|
#ifndef PHP_SHMT_H
#define PHP_SHMT_H
#define PHP_SHMT_EXTNAME "SHMT"
#define PHP_SHMT_EXTVER "1.0.2dev"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
extern zend_module_entry shmt_module_entry;
#define phpext_shmt_ptr &shmt_module_entry;
#endif /* PHP_SHMT_H */
|
Update the version after tagging
|
Update the version after tagging
|
C
|
mit
|
sevenval/SHMT,sevenval/SHMT
|
3d2c4486a552db9d97ea32fd2235b2cc1358893a
|
src/shkutil/include/util/raii_helper.h
|
src/shkutil/include/util/raii_helper.h
|
#pragma once
#include <utility>
namespace shk {
template<
typename T,
typename Return,
Return (Free)(T),
T EmptyValue = nullptr>
class RAIIHelper {
public:
RAIIHelper(T obj)
: _obj(obj) {}
RAIIHelper(const RAIIHelper &) = delete;
RAIIHelper &operator=(const RAIIHelper &) = delete;
RAIIHelper(RAIIHelper &&other)
: _obj(other._obj) {
other._obj = EmptyValue;
}
~RAIIHelper() {
if (_obj != EmptyValue) {
Free(_obj);
}
}
explicit operator bool() const {
return _obj != EmptyValue;
}
T get() const {
return _obj;
}
private:
T _obj;
};
} // namespace shk
|
#pragma once
#include <utility>
namespace shk {
template<
typename T,
typename Return,
Return (Free)(T),
T EmptyValue = nullptr>
class RAIIHelper {
public:
explicit RAIIHelper(T obj)
: _obj(obj) {}
RAIIHelper(const RAIIHelper &) = delete;
RAIIHelper &operator=(const RAIIHelper &) = delete;
RAIIHelper(RAIIHelper &&other)
: _obj(other._obj) {
other._obj = EmptyValue;
}
~RAIIHelper() {
if (_obj != EmptyValue) {
Free(_obj);
}
}
explicit operator bool() const {
return _obj != EmptyValue;
}
T get() const {
return _obj;
}
private:
T _obj;
};
} // namespace shk
|
Make it harder to accidentally steal ownership of a RAIIHelper resource
|
Make it harder to accidentally steal ownership of a RAIIHelper resource
|
C
|
apache-2.0
|
per-gron/shuriken,per-gron/shuriken,per-gron/shuriken,per-gron/shuriken
|
1f52f05b9d74c601e7642ec9bd64eb38cf1452f0
|
Pod/Classes/VOKMappableModel.h
|
Pod/Classes/VOKMappableModel.h
|
//
// VOKMappableModel.h
// VOKCoreData
//
#import "VOKCoreDataManager.h"
/**
* Any models that conform to this protocol will be automatically registered for mapping with the shared instance
* of VOKCoreDataManager.
*/
@protocol VOKMappableModel <NSObject>
///@return an array of VOKManagedObjectMap objects mapping foreign keys to local keys.
+ (NSArray *)coreDataMaps;
///@return the key name to use to uniquely compare two instances of a class.
+ (NSString *)uniqueKey;
// If an optional method isn't defined, the default VOKManagedObjectMap behavior/value will be used.
@optional
///@return whether to ignore remote null/nil values are ignored when updating.
+ (BOOL)ignoreNullValueOverwrites;
///@return whether to warn about incorrect class types when receiving null/nil values for optional properties.
+ (BOOL)ignoreOptionalNullValues;
///@return completion block to run after importing each foreign dictionary.
+ (VOKPostImportBlock)importCompletionBlock;
@end
|
//
// VOKMappableModel.h
// VOKCoreData
//
#import "VOKCoreDataManager.h"
/**
* Any models that conform to this protocol will be automatically registered for mapping with the shared instance
* of VOKCoreDataManager.
*
* Note that runtime protocol-conformance is based on declared conformance (the angle-bracketed protocol name appended
* to the interface) and not by checking that the required methods are implemented. If you ignore the compiler
* warnings about failing to implement required methods, your app will crash.
*/
@protocol VOKMappableModel <NSObject>
///@return an array of VOKManagedObjectMap objects mapping foreign keys to local keys.
+ (NSArray *)coreDataMaps;
///@return the key name to use to uniquely compare two instances of a class.
+ (NSString *)uniqueKey;
// If an optional method isn't defined, the default VOKManagedObjectMap behavior/value will be used.
@optional
///@return whether to ignore remote null/nil values are ignored when updating.
+ (BOOL)ignoreNullValueOverwrites;
///@return whether to warn about incorrect class types when receiving null/nil values for optional properties.
+ (BOOL)ignoreOptionalNullValues;
///@return completion block to run after importing each foreign dictionary.
+ (VOKPostImportBlock)importCompletionBlock;
@end
|
Add note about how protocol conformance checking works.
|
Add note about how protocol conformance checking works.
|
C
|
mit
|
seanwolter/Vokoder,vokal-isaac/Vokoder,seanwolter/Vokoder,vokal/Vokoder,seanwolter/Vokoder,chillpop/Vokoder,seanwolter/Vokoder,vokal/Vokoder,chillpop/Vokoder,designatednerd/Vokoder,vokal-isaac/Vokoder,chillpop/Vokoder,vokal-isaac/Vokoder,vokal/Vokoder,designatednerd/Vokoder,brockboland/Vokoder,designatednerd/Vokoder,vokal-isaac/Vokoder,designatednerd/Vokoder,vokal/Vokoder,brockboland/Vokoder,vokal-isaac/Vokoder,brockboland/Vokoder,chillpop/Vokoder,seanwolter/Vokoder,brockboland/Vokoder,chillpop/Vokoder,seanwolter/Vokoder,brockboland/Vokoder
|
d11c53b1a6573cccb0283a187ef3938614089621
|
test/Driver/unknown-arg.c
|
test/Driver/unknown-arg.c
|
// RUN: not %clang_cc1 %s -cake-is-lie -%0 -%d 2> %t.log
// RUN: FileCheck %s -input-file=%t.log
// CHECK: unknown argument
// CHECK: unknown argument
// CHECK: unknown argument
// RUN: %clang -S %s -o %t.s -funknown-to-clang-option -Wunknown-to-clang-option -munknown-to-clang-optio
// IGNORED: warning: argument unused during compilation: '-funknown-to-clang-option'
// IGNORED: warning: argument unused during compilation: '-munknown-to-clang-option'
// IGNORED: warning: unknown warning option '-Wunknown-to-clang-option'
|
// RUN: not %clang_cc1 %s -cake-is-lie -%0 -%d 2> %t.log
// RUN: FileCheck %s -input-file=%t.log
// CHECK: unknown argument
// CHECK: unknown argument
// CHECK: unknown argument
// RUN: %clang -S %s -o %t.s -funknown-to-clang-option -Wunknown-to-clang-option -munknown-to-clang-option 2>&1 | FileCheck --check-prefix=IGNORED %s
// IGNORED: warning: argument unused during compilation: '-funknown-to-clang-option'
// IGNORED: warning: argument unused during compilation: '-munknown-to-clang-option'
// IGNORED: warning: unknown warning option '-Wunknown-to-clang-option'
|
Fix an incomplete copy and paste in my previous patch.
|
Fix an incomplete copy and paste in my previous patch.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@191245 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
|
26536e69151d5f8e083d8165421039b409c93ee3
|
src/rt/rust_unwind.h
|
src/rt/rust_unwind.h
|
// Unwinding stuff missing on some architectures (Mac OS X).
#ifndef RUST_UNWIND_H
#define RUST_UNWIND_H
#ifdef __APPLE__
#include <libunwind.h>
typedef int _Unwind_Action;
typedef void _Unwind_Context;
typedef void _Unwind_Exception;
typedef int _Unwind_Reason_Code;
#else
#include <unwind.h>
#endif
#endif
|
// Unwinding stuff missing on some architectures (Mac OS X).
#ifndef RUST_UNWIND_H
#define RUST_UNWIND_H
#ifdef __APPLE__
#include <libunwind.h>
typedef void _Unwind_Context;
typedef int _Unwind_Reason_Code;
#else
#include <unwind.h>
#endif
#if (defined __APPLE__) || (defined __clang__)
typedef int _Unwind_Action;
typedef void _Unwind_Exception;
#endif
#endif
|
Fix build with clang on non-Mac
|
rt: Fix build with clang on non-Mac
|
C
|
apache-2.0
|
carols10cents/rust,fabricedesre/rust,bombless/rust,erickt/rust,michaelballantyne/rust-gpu,P1start/rust,erickt/rust,pczarn/rust,rohitjoshi/rust,waynenilsen/rand,jroesch/rust,AerialX/rust,GrahamDennis/rand,SiegeLord/rust,jroesch/rust,dinfuehr/rust,nham/rust,ktossell/rust,robertg/rust,zachwick/rust,richo/rust,servo/rust,GBGamer/rust,krzysz00/rust,kimroen/rust,avdi/rust,dwillmer/rust,AerialX/rust,quornian/rust,richo/rust,dwillmer/rust,l0kod/rust,j16r/rust,mitsuhiko/rust,kmcallister/rust,mvdnes/rust,zubron/rust,servo/rust,rprichard/rust,aepsil0n/rust,omasanori/rust,zaeleus/rust,mdinger/rust,KokaKiwi/rust,defuz/rust,philyoon/rust,vhbit/rust,GBGamer/rust,zubron/rust,miniupnp/rust,vhbit/rust,victorvde/rust,mvdnes/rust,omasanori/rust,0x73/rust,ebfull/rust,nham/rust,0x73/rust,fabricedesre/rust,mitsuhiko/rust,bombless/rust-docs-chinese,aneeshusa/rust,bombless/rust,pshc/rust,kwantam/rust,omasanori/rust,pythonesque/rust,philyoon/rust,jbclements/rust,jashank/rust,fabricedesre/rust,aturon/rust,jroesch/rust,robertg/rust,michaelballantyne/rust-gpu,quornian/rust,SiegeLord/rust,Ryman/rust,nham/rust,rohitjoshi/rust,l0kod/rust,barosl/rust,aidancully/rust,kmcallister/rust,l0kod/rust,richo/rust,nham/rust,zubron/rust,XMPPwocky/rust,aturon/rust,carols10cents/rust,ejjeong/rust,jbclements/rust,KokaKiwi/rust,aepsil0n/rust,jbclements/rust,robertg/rust,P1start/rust,quornian/rust,XMPPwocky/rust,aneeshusa/rust,stepancheg/rust-ide-rust,krzysz00/rust,mvdnes/rust,quornian/rust,barosl/rust,aidancully/rust,hauleth/rust,reem/rust,pczarn/rust,mahkoh/rust,seanrivera/rust,jbclements/rust,mahkoh/rust,andars/rust,victorvde/rust,graydon/rust,j16r/rust,XMPPwocky/rust,stepancheg/rust-ide-rust,mdinger/rust,pshc/rust,mahkoh/rust,omasanori/rust,emk/rust,emk/rust,GBGamer/rust,aneeshusa/rust,vhbit/rust,erickt/rust,jroesch/rust,rohitjoshi/rust,pshc/rust,kwantam/rust,aturon/rust,XMPPwocky/rust,jashank/rust,SiegeLord/rust,mahkoh/rust,pshc/rust,retep998/rand,jbclements/rust,LeoTestard/rust,kimroen/rust,emk/rust,ejjeong/rust,kmcallister/rust,dwillmer/rust,pythonesque/rust,mdinger/rust,nwin/rust,0x73/rust,j16r/rust,jbclements/rust,michaelballantyne/rust-gpu,LeoTestard/rust,aneeshusa/rust,aepsil0n/rust,aepsil0n/rust,dinfuehr/rust,stepancheg/rust-ide-rust,TheNeikos/rust,zaeleus/rust,pczarn/rust,XMPPwocky/rust,mvdnes/rust,kmcallister/rust,zubron/rust,KokaKiwi/rust,seanrivera/rust,jbclements/rust,ebfull/rust,avdi/rust,victorvde/rust,mdinger/rust,zachwick/rust,philyoon/rust,jroesch/rust,vhbit/rust,reem/rust,zachwick/rust,gifnksm/rust,omasanori/rust,sae-bom/rust,dwillmer/rust,emk/rust,kimroen/rust,andars/rust,barosl/rust,aneeshusa/rust,l0kod/rust,jashank/rust,andars/rust,avdi/rust,Ryman/rust,kwantam/rust,servo/rust,zaeleus/rust,l0kod/rust,zubron/rust,erickt/rust,pczarn/rust,zubron/rust,michaelballantyne/rust-gpu,P1start/rust,omasanori/rust,pshc/rust,cllns/rust,stepancheg/rust-ide-rust,mihneadb/rust,untitaker/rust,GBGamer/rust,servo/rust,aturon/rust,bhickey/rand,robertg/rust,rohitjoshi/rust,servo/rust,stepancheg/rust-ide-rust,hauleth/rust,P1start/rust,seanrivera/rust,AerialX/rust-rt-minimal,mitsuhiko/rust,krzysz00/rust,Ryman/rust,richo/rust,gifnksm/rust,jroesch/rust,mihneadb/rust,LeoTestard/rust,rprichard/rust,carols10cents/rust,KokaKiwi/rust,mihneadb/rust,pelmers/rust,pythonesque/rust,stepancheg/rust-ide-rust,XMPPwocky/rust,sarojaba/rust-doc-korean,zaeleus/rust,untitaker/rust,rprichard/rust,fabricedesre/rust,seanrivera/rust,AerialX/rust,ejjeong/rust,richo/rust,erickt/rust,dinfuehr/rust,quornian/rust,graydon/rust,zaeleus/rust,mdinger/rust,ktossell/rust,dwillmer/rust,kimroen/rust,defuz/rust,cllns/rust,Ryman/rust,0x73/rust,P1start/rust,cllns/rust,kmcallister/rust,gifnksm/rust,quornian/rust,LeoTestard/rust,kmcallister/rust,ktossell/rust,zachwick/rust,dinfuehr/rust,hauleth/rust,defuz/rust,pythonesque/rust,LeoTestard/rust,jashank/rust,bluss/rand,pczarn/rust,defuz/rust,ebfull/rust,AerialX/rust,cllns/rust,nwin/rust,GBGamer/rust,l0kod/rust,zubron/rust,SiegeLord/rust,kimroen/rust,GBGamer/rust,bombless/rust,ruud-v-a/rust,AerialX/rust,pythonesque/rust,philyoon/rust,Ryman/rust,dinfuehr/rust,andars/rust,krzysz00/rust,michaelballantyne/rust-gpu,aturon/rust,huonw/rand,mihneadb/rust,nwin/rust,richo/rust,barosl/rust,AerialX/rust-rt-minimal,ktossell/rust,pshc/rust,pythonesque/rust,sarojaba/rust-doc-korean,rohitjoshi/rust,michaelballantyne/rust-gpu,sae-bom/rust,achanda/rand,erickt/rust,aturon/rust,reem/rust,aidancully/rust,reem/rust,mitsuhiko/rust,arthurprs/rand,TheNeikos/rust,pelmers/rust,pelmers/rust,gifnksm/rust,TheNeikos/rust,dwillmer/rust,ebfull/rust,miniupnp/rust,kwantam/rust,avdi/rust,victorvde/rust,seanrivera/rust,LeoTestard/rust,fabricedesre/rust,AerialX/rust-rt-minimal,miniupnp/rust,rprichard/rust,ebfull/rust,SiegeLord/rust,fabricedesre/rust,rohitjoshi/rust,LeoTestard/rust,sae-bom/rust,KokaKiwi/rust,jashank/rust,reem/rust,ebfull/rust,aidancully/rust,hauleth/rust,defuz/rust,mdinger/rust,jashank/rust,pczarn/rust,philyoon/rust,jroesch/rust,carols10cents/rust,AerialX/rust-rt-minimal,cllns/rust,servo/rust,andars/rust,sae-bom/rust,nham/rust,barosl/rust,bombless/rust,krzysz00/rust,GBGamer/rust,cllns/rust,hauleth/rust,avdi/rust,sae-bom/rust,Ryman/rust,untitaker/rust,mihneadb/rust,ejjeong/rust,zachwick/rust,fabricedesre/rust,reem/rust,hauleth/rust,SiegeLord/rust,untitaker/rust,sarojaba/rust-doc-korean,dinfuehr/rust,barosl/rust,KokaKiwi/rust,seanrivera/rust,nwin/rust,mvdnes/rust,andars/rust,bombless/rust,0x73/rust,nwin/rust,servo/rust,graydon/rust,l0kod/rust,dwillmer/rust,miniupnp/rust,TheNeikos/rust,ejjeong/rust,j16r/rust,j16r/rust,pelmers/rust,AerialX/rust-rt-minimal,jbclements/rust,ejjeong/rust,pelmers/rust,defuz/rust,pshc/rust,nwin/rust,pythonesque/rust,shepmaster/rand,jroesch/rust,miniupnp/rust,j16r/rust,Ryman/rust,pelmers/rust,untitaker/rust,zaeleus/rust,nwin/rust,aneeshusa/rust,rprichard/rust,michaelballantyne/rust-gpu,kmcallister/rust,ebfull/rand,ruud-v-a/rust,kimroen/rust,rprichard/rust,kwantam/rust,dwillmer/rust,j16r/rust,victorvde/rust,AerialX/rust-rt-minimal,krzysz00/rust,graydon/rust,TheNeikos/rust,mvdnes/rust,mihneadb/rust,vhbit/rust,SiegeLord/rust,robertg/rust,quornian/rust,bombless/rust,pshc/rust,jashank/rust,gifnksm/rust,nwin/rust,kimroen/rust,carols10cents/rust,mitsuhiko/rust,vhbit/rust,mitsuhiko/rust,AerialX/rust,emk/rust,ruud-v-a/rust,miniupnp/rust,graydon/rust,stepancheg/rust-ide-rust,robertg/rust,aepsil0n/rust,jashank/rust,aidancully/rust,pczarn/rust,barosl/rust,mahkoh/rust,emk/rust,vhbit/rust,philyoon/rust,0x73/rust,aidancully/rust,sae-bom/rust,l0kod/rust,nham/rust,P1start/rust,gifnksm/rust,ruud-v-a/rust,sarojaba/rust-doc-korean,emk/rust,sarojaba/rust-doc-korean,miniupnp/rust,graydon/rust,zubron/rust,carols10cents/rust,victorvde/rust,P1start/rust,GBGamer/rust,kwantam/rust,sarojaba/rust-doc-korean,avdi/rust,sarojaba/rust-doc-korean,untitaker/rust,mahkoh/rust,vhbit/rust,ruud-v-a/rust,nham/rust,aepsil0n/rust,TheNeikos/rust,mitsuhiko/rust,ktossell/rust,aturon/rust,0x73/rust,miniupnp/rust,ruud-v-a/rust,ktossell/rust,ktossell/rust,erickt/rust,jbclements/rust,zachwick/rust
|
28f190e88bf324798276e4e8d4f5792cf6919fa6
|
Location/BackgroundTaskManager.h
|
Location/BackgroundTaskManager.h
|
//
// BackgroundTaskManager.h
//
// Created by Puru Shukla on 20/02/13.
// Copyright (c) 2013 Puru Shukla. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface BackgroundTaskManager : NSObject
+(instancetype)sharedBackgroundTaskManager;
-(UIBackgroundTaskIdentifier)beginNewBackgroundTask;
@end
|
//
// BackgroundTaskManager.h
//
// Created by Puru Shukla on 20/02/13.
// Copyright (c) 2013 Puru Shukla. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface BackgroundTaskManager : NSObject
+(instancetype)sharedBackgroundTaskManager;
-(UIBackgroundTaskIdentifier)beginNewBackgroundTask;
-(void)endAllBackgroundTasks;
@end
|
Add endAllBackgroundTasks to the Public API
|
Add endAllBackgroundTasks to the Public API
|
C
|
mit
|
kevinnguy/Location
|
1656855c0467348823d4decdbd4131875381d2c9
|
searchcore/src/vespa/searchcore/bmcluster/bm_node_stats_reporter.h
|
searchcore/src/vespa/searchcore/bmcluster/bm_node_stats_reporter.h
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/vespalib/util/threadstackexecutor.h>
#include <chrono>
#include <mutex>
#include <condition_variable>
namespace search::bmcluster {
class BmCluster;
class BmNodeStatsReporter {
BmCluster& _cluster;
vespalib::ThreadStackExecutor _executor;
std::mutex _mutex;
std::condition_variable _cond;
uint32_t _pending_report;
bool _started;
bool _stop;
void report();
void run_report_loop(std::chrono::milliseconds interval);
public:
BmNodeStatsReporter(BmCluster& cluster);
~BmNodeStatsReporter();
void start(std::chrono::milliseconds interval);
void stop();
void report_now();
};
}
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/vespalib/util/threadstackexecutor.h>
#include <chrono>
#include <mutex>
#include <condition_variable>
namespace search::bmcluster {
class BmCluster;
/*
* Class handling background reporting of node stats during feed or
* document redistribution.
*/
class BmNodeStatsReporter {
BmCluster& _cluster;
vespalib::ThreadStackExecutor _executor;
std::mutex _mutex;
std::condition_variable _cond;
uint32_t _pending_report;
bool _started;
bool _stop;
void report();
void run_report_loop(std::chrono::milliseconds interval);
public:
BmNodeStatsReporter(BmCluster& cluster);
~BmNodeStatsReporter();
void start(std::chrono::milliseconds interval);
void stop();
void report_now();
};
}
|
Add class comment for BmNodeStatsReporter.
|
Add class comment for BmNodeStatsReporter.
|
C
|
apache-2.0
|
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
|
cd845e38761b52497ff4ad02d32490d2c7a4ac24
|
include/dirbrowserformaction.h
|
include/dirbrowserformaction.h
|
#ifndef NEWSBOAT_DIRBROWSERFORMACTION_H
#define NEWSBOAT_DIRBROWSERFORMACTION_H
#include <grp.h>
#include "configcontainer.h"
#include "formaction.h"
namespace newsboat {
class DirBrowserFormAction : public FormAction {
public:
DirBrowserFormAction(View*, std::string formstr, ConfigContainer* cfg);
~DirBrowserFormAction() override;
void prepare() override;
void init() override;
KeyMapHintEntry* get_keymap_hint() override;
void set_dir(const std::string& d)
{
dir = d;
}
std::string id() const override
{
return "filebrowser";
}
std::string title() override;
private:
void process_operation(Operation op,
bool automatic = false,
std::vector<std::string>* args = nullptr) override;
std::string add_directory(std::string dirname);
std::string get_rwx(unsigned short val);
std::string get_owner(uid_t uid);
std::string get_group(gid_t gid);
std::string
get_formatted_dirname(std::string dirname, char ftype, mode_t mode);
std::string cwd;
std::string dir;
};
} // namespace newsboat
#endif //NEWSBOAT_DIRBROWSERFORMACTION_H
|
#ifndef NEWSBOAT_DIRBROWSERFORMACTION_H
#define NEWSBOAT_DIRBROWSERFORMACTION_H
#include <sys/stat.h>
#include <grp.h>
#include "configcontainer.h"
#include "formaction.h"
namespace newsboat {
class DirBrowserFormAction : public FormAction {
public:
DirBrowserFormAction(View*, std::string formstr, ConfigContainer* cfg);
~DirBrowserFormAction() override;
void prepare() override;
void init() override;
KeyMapHintEntry* get_keymap_hint() override;
void set_dir(const std::string& d)
{
dir = d;
}
std::string id() const override
{
return "filebrowser";
}
std::string title() override;
private:
void process_operation(Operation op,
bool automatic = false,
std::vector<std::string>* args = nullptr) override;
std::string add_directory(std::string dirname);
std::string get_rwx(unsigned short val);
std::string get_owner(uid_t uid);
std::string get_group(gid_t gid);
std::string
get_formatted_dirname(std::string dirname, char ftype, mode_t mode);
std::string cwd;
std::string dir;
};
} // namespace newsboat
#endif //NEWSBOAT_DIRBROWSERFORMACTION_H
|
Fix DirBrowserFormAction build on FreeBSD
|
Fix DirBrowserFormAction build on FreeBSD
|
C
|
mit
|
der-lyse/newsboat,newsboat/newsboat,newsboat/newsboat,der-lyse/newsboat,newsboat/newsboat,der-lyse/newsboat,der-lyse/newsboat,der-lyse/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat,der-lyse/newsboat,der-lyse/newsboat,newsboat/newsboat,der-lyse/newsboat
|
87c0785d81c31a969bbf8029363ea042fdd82587
|
src/tileset.h
|
src/tileset.h
|
#ifndef _TILESET_H_
#define _TILESET_H_
#include <SDL.h>
//#define TILESET_ROW_LENGTH 8
typedef struct tileset
{
SDL_Surface *image;
SDL_Rect *clip;
int length;
} tileset;
int tilesetLoad(tileset *tSet, char *fileName, int width, int height, int rowLen, int length);
void tilesetUnload(tileset *tSet);
#endif /* _TILESET_H_ */
|
#ifndef _TILESET_H_
#define _TILESET_H_
#include <SDL.h>
typedef struct tileset
{
SDL_Surface *image;
SDL_Rect *clip;
int length;
} tileset;
int tilesetLoad(tileset *tSet, char *fileName, int width, int height, int rowLen, int length);
void tilesetUnload(tileset *tSet);
#endif /* _TILESET_H_ */
|
Remove redundant commended out code
|
Remove redundant commended out code
|
C
|
mit
|
zear/shisen-seki,zear/shisen-seki
|
34f818ebe0539bf77576f7b45d28a70160271754
|
program.c
|
program.c
|
/* Preprocessor defines added by opencl compiler
* #define CONFIGS_PER_PROC
*/
__kernel void start_trampoline(__global char *match_configs,
__global char *output)
{
__private unsigned int i;
for (i = 0; i < 256; i++) {
output[i] = CONFIGS_PER_PROC;
}
write_mem_fence(CLK_GLOBAL_MEM_FENCE);
return;
}
|
/* Preprocessor defines added by opencl compiler
* #define CONFIGS_PER_PROC
*/
__kernel void start_trampoline(__global char *match_configs,
__global char *output)
{
__private unsigned int i, startloc;
// Per worker match configs.
__private char local_match_configs[CONFIGS_PER_PROC * sizeof(char) * 4];
// Read in per worker match configs
startloc = get_local_id(0) * CONFIGS_PER_PROC * 4;
for (i = 0; i < CONFIGS_PER_PROC * 4; i++)
local_match_configs[i] = match_configs[startloc + i];
for (i = 0; i < 256; i++) {
output[i] = CONFIGS_PER_PROC;
}
write_mem_fence(CLK_GLOBAL_MEM_FENCE);
return;
}
|
Load match configs into each local proc.
|
Load match configs into each local proc.
|
C
|
bsd-2-clause
|
jmorse/worms,jmorse/worms
|
0b4900a73fb6206ad82511b2054843baec172618
|
gpm/spinner.c
|
gpm/spinner.c
|
// Calculates the 45th Fibonacci number with a visual indicator.
#include <stdio.h>
#include <assert.h>
#include <libdill.h>
// Calculates Fibonacci of x.
static int fib(int x)
{
// Need to yield or spinner will not have any time to spin.
int rc = yield();
assert(rc == 0);
if (x < 2) return x;
return fib(x - 1) + fib(x - 2);
}
coroutine void spinner(int delay)
{
const char spinChars[] = {'-', '\\', '|', '/'};
while (1) {
for (int i = 0; i < sizeof(spinChars); i++) {
printf("\r%c", spinChars[i]);
msleep(now() + delay);
}
}
}
int main()
{
// Turn off buffering on stdout otherwise we won't see the spinner.
setbuf(stdout, NULL);
int rc = go(spinner(100));
assert(rc != -1);
const int n = 45;
int fibN = fib(n);
printf("\rFibonacci(%d) = %d\n", n, fibN);
}
|
// Calculates the 45th Fibonacci number with a visual indicator.
// Note: using yield() in fib() may allow the spinner to actually spin, but
// fib() takes a lot longer to complete. E.g. Over 2 minutes with yield()
// vs. 10 seconds without it.
#include <stdio.h>
#include <assert.h>
#include <libdill.h>
// Calculates Fibonacci of x.
static int fib(int x)
{
// Need to yield or spinner will not have any time to spin.
int rc = yield();
assert(rc == 0);
if (x < 2) return x;
return fib(x - 1) + fib(x - 2);
}
coroutine void spinner(int delay)
{
const char spinChars[] = {'-', '\\', '|', '/'};
while (1) {
for (int i = 0; i < sizeof(spinChars); i++) {
printf("\r%c", spinChars[i]);
msleep(now() + delay);
}
}
}
int main()
{
// Turn off buffering on stdout otherwise we won't see the spinner.
setbuf(stdout, NULL);
int rc = go(spinner(500));
assert(rc != -1);
const int n = 45;
int fibN = fib(n);
printf("\rFibonacci(%d) = %d\n", n, fibN);
}
|
Add note about using yield().
|
Add note about using yield().
|
C
|
mit
|
jppunnett/libdill-tutorial
|
64c9fe48234cd49ae730f3d2f80a0b7eb3c6d897
|
Josh_Zane_Sebastian/src/parser/parser.c
|
Josh_Zane_Sebastian/src/parser/parser.c
|
#include <stdlib.h>
#include <stdio.h>
#include types.c
#include <string.h>
/* We can:
Set something equal to something
Function calls
Function definitions
Returning things -- delimiter '<'
Printing things
Iffing */
struct call parseCall(char* statement);
struct function parseFunction(char* statement);
char* fixSpacing(char* code) {
char* fixedCode = calloc(sizeof(char), strlen(code) + 1);
fixedCode = strcpy(fixedCode, code);
char* doubleSpace = strstr(fixedCode, " ");
char* movingIndex;
for( ; doubleSpace; doubleSpace = strstr(fixedCode, " ")) {
for(movingIndex = doubleSpace; movingIndex&; movingIndex++) {
movingIndex[0] = movingIndex[1];
}
}
return fixedCode;
}
struct statement* parse(char* code) {
char* regCode = fixSpacing(code);
int n = 0;
int i;
for(i = 0; regCode[i]; i++) {
if(regCode[i] == ' ') {
n++;
}
}
char** spcTokens = calloc(sizeof(char*), n+1);
|
#include <stdlib.h>
#include <stdio.h>
#include types.c
#include <string.h>
/* We can:
Set something equal to something
Function calls
Function definitions
Returning things -- delimiter '<'
Printing things
Iffing */
struct call parseCall(char* statement);
struct function parseFunction(char* statement);
char* fixSpacing(char* code) {
char* fixedCode = malloc(sizeof(char) * (strlen(code) + 1));
fixedCode = strcpy(fixedCode, code);
char* doubleSpace = strstr(fixedCode, " ");
char* movingIndex;
for( ; doubleSpace; doubleSpace = strstr(fixedCode, " ")) {
for(movingIndex = doubleSpace; movingIndex&; movingIndex++) {
movingIndex[0] = movingIndex[1];
}
}
return fixedCode;
}
char** spcTokenize(char* regCode) {
int n = 0;
int i;
for(i = 0; regCode[i]; i++) {
if(regCode[i] == ' ') {
n++;
}
}
char** spcTokens = malloc(sizeof(char*) * (n+1));
int k;
for(i = 0; i < n+1; i++) {
k = strchr(regCode, ' ') - regCode;
regCode[k] = NULL;
spcTokens[i] = regCode + k + 1;
}
}
|
Refactor the space tokenizer to be its own function; parse() no longer exists.
|
Refactor the space tokenizer to be its own function; parse() no longer exists.
|
C
|
mit
|
aacoppa/final,aacoppa/final
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.