commit
stringlengths 40
40
| old_file
stringlengths 4
112
| new_file
stringlengths 4
112
| old_contents
stringlengths 0
2.05k
| new_contents
stringlengths 28
3.9k
| subject
stringlengths 17
736
| message
stringlengths 18
4.78k
| lang
stringclasses 1
value | license
stringclasses 13
values | repos
stringlengths 7
111k
|
---|---|---|---|---|---|---|---|---|---|
d51affbc2c78f4370fd73ba3d83b8f129289c9e8 | PerchRTC/PHCredentials.h | PerchRTC/PHCredentials.h | //
// PHCredentials.h
// PerchRTC
//
// Created by Sam Symons on 2015-05-08.
// Copyright (c) 2015 Perch Communications. All rights reserved.
//
#ifndef PerchRTC_PHCredentials_h
#define PerchRTC_PHCredentials_h
#error Please enter your XirSys credentials (http://xirsys.com/pricing/)
static NSString *kPHConnectionManagerDomain = @"";
static NSString *kPHConnectionManagerApplication = @"";
static NSString *kPHConnectionManagerXSUsername = @"";
static NSString *kPHConnectionManagerXSSecretKey = @"";
#ifdef DEBUG
static NSString *kPHConnectionManagerDefaultRoomName = @"";
#else
static NSString *kPHConnectionManagerDefaultRoomName = @"";
#endif
#endif
| //
// PHCredentials.h
// PerchRTC
//
// Created by Sam Symons on 2015-05-08.
// Copyright (c) 2015 Perch Communications. All rights reserved.
//
#ifndef PerchRTC_PHCredentials_h
#define PerchRTC_PHCredentials_h
#error Please enter your XirSys credentials (http://xirsys.com/pricing/)
static NSString *kPHConnectionManagerDomain = @"";
static NSString *kPHConnectionManagerApplication = @"default";
static NSString *kPHConnectionManagerXSUsername = @"";
static NSString *kPHConnectionManagerXSSecretKey = @"";
#ifdef DEBUG
static NSString *kPHConnectionManagerDefaultRoomName = @"default";
#else
static NSString *kPHConnectionManagerDefaultRoomName = @"default";
#endif
#endif
| Use the XirSys defaults for room and application. | Use the XirSys defaults for room and application.
| C | mit | imton/perchrtc,duk42111/perchrtc,duk42111/perchrtc,perchco/perchrtc,imton/perchrtc,perchco/perchrtc,ikonst/perchrtc,ikonst/perchrtc,duk42111/perchrtc,ikonst/perchrtc,ikonst/perchrtc,perchco/perchrtc,duk42111/perchrtc,imton/perchrtc |
71a069a6ebdaea8a2881b5f2837a0e75dcd74351 | test/Index/missing_vfs.c | test/Index/missing_vfs.c | // RUN: c-index-test -test-load-source local %s -ivfsoverlay %t/does-not-exist.yaml &> %t.out
// RUN: FileCheck -check-prefix=STDERR %s < %t.out
// STDERR: fatal error: virtual filesystem overlay file '{{.*}}' not found
// RUN: FileCheck %s < %t.out
// CHECK: missing_vfs.c:[[@LINE+1]]:6: FunctionDecl=foo:[[@LINE+1]]:6
void foo(void);
| // RUN: c-index-test -test-load-source local %s -ivfsoverlay %t/does-not-exist.yaml > %t.stdout 2> %t.stderr
// RUN: FileCheck -check-prefix=STDERR %s < %t.stderr
// STDERR: fatal error: virtual filesystem overlay file '{{.*}}' not found
// RUN: FileCheck %s < %t.stdout
// CHECK: missing_vfs.c:[[@LINE+1]]:6: FunctionDecl=foo:[[@LINE+1]]:6
void foo(void);
| Make test more robust by writing stdout/stderr to different files. | Make test more robust by writing stdout/stderr to different files.
Our internal build bots were failing this test randomly as the stderr
output was emitted to the file in the middle of the stdout output
line that the test was checking.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@359512 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,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,llvm-mirror/clang,apple/swift-clang |
661cc5ce55d7eaed4d6b268ffb3be8a19c02fde3 | pypersonality.c | pypersonality.c | #include <Python.h>
#include <sys/personality.h>
int Cget_personality(void) {
unsigned long int persona = 0xffffffff;
return personality(persona);
}
static PyObject* get_personality(PyObject* self) {
return Py_BuildValue("i", Cget_personality);
}
int Cset_personality(void) {
unsigned long int persona = READ_IMPLIES_EXEC;
return personality(persona);
}
static PyObject* set_personality(PyObject* self) {
return Py_BuildValue("i", Cset_personality);
}
static PyMethodDef personality_methods[] = {
{"get_personality", (PyCFunction)get_personality, METH_NOARGS, "Returns the personality value"},
{"set_personality", (PyCFunction)set_personality, METH_NOARGS, "Sets the personality value"},
/* {"version", (PyCFunction)version, METH_NOARGS, "Returns the version number"}, */
{NULL, NULL, 0, NULL}
};
static struct PyModuleDef pypersonality = {
PyModuleDef_HEAD_INIT,
"personality",
"Module to manipulate process execution domain",
-1,
personality_methods
};
PyMODINIT_FUNC PyInit_pypersonality(void) {
return PyModule_Create(&pypersonality);
}
| #include <Python.h>
#include <sys/personality.h>
#include <stdint.h>
int Cget_personality(void) {
unsigned long persona = 0xffffffffUL;
return personality(persona);
}
static PyObject* get_personality(PyObject* self) {
return Py_BuildValue("i", Cget_personality());
}
int Cset_personality(unsigned long persona) {
return personality(persona);
}
static PyObject* set_personality(PyObject* self, PyObject *args) {
unsigned long persona = READ_IMPLIES_EXEC;
//Py_Args_ParseTuple(args, "i", &persona);
return Py_BuildValue("i", Cset_personality(persona));
}
static PyMethodDef personality_methods[] = {
{"get_personality", (PyCFunction)get_personality, METH_NOARGS, "Returns the personality value"},
{"set_personality", (PyCFunction)set_personality, METH_NOARGS, "Sets the personality value"},
/* {"version", (PyCFunction)version, METH_NOARGS, "Returns the version number"}, */
{NULL, NULL, 0, NULL}
};
static struct PyModuleDef pypersonality = {
PyModuleDef_HEAD_INIT,
"personality",
"Module to manipulate process execution domain",
-1,
personality_methods
};
PyMODINIT_FUNC PyInit_pypersonality(void) {
return PyModule_Create(&pypersonality);
}
| Call the c functions instead of passing a pointer | Call the c functions instead of passing a pointer
| C | mit | PatrickLaban/PythonPersonality,PatrickLaban/PythonPersonality |
5082189fd353102daac5fa40779f91e8974ba8f8 | pg_query.h | pg_query.h | #ifndef PG_QUERY_H
#define PG_QUERY_H
typedef struct {
char* message; // exception message
char* filename; // source of exception (e.g. parse.l)
int lineno; // source of exception (e.g. 104)
int cursorpos; // char in query at which exception occurred
} PgQueryError;
typedef struct {
char* parse_tree;
char* stderr_buffer;
PgQueryError* error;
} PgQueryParseResult;
typedef struct {
char* normalized_query;
PgQueryError* error;
} PgQueryNormalizeResult;
void pg_query_init(void);
PgQueryNormalizeResult pg_query_normalize(char* input);
PgQueryParseResult pg_query_parse(char* input);
#endif
| #ifndef PG_QUERY_H
#define PG_QUERY_H
typedef struct {
char* message; // exception message
char* filename; // source of exception (e.g. parse.l)
int lineno; // source of exception (e.g. 104)
int cursorpos; // char in query at which exception occurred
} PgQueryError;
typedef struct {
char* parse_tree;
char* stderr_buffer;
PgQueryError* error;
} PgQueryParseResult;
typedef struct {
char* normalized_query;
PgQueryError* error;
} PgQueryNormalizeResult;
#ifdef __cplusplus
extern "C" {
#endif
void pg_query_init(void);
PgQueryNormalizeResult pg_query_normalize(char* input);
PgQueryParseResult pg_query_parse(char* input);
#ifdef __cplusplus
}
#endif
#endif
| Make header file compatible with C++ | Make header file compatible with C++
| C | bsd-3-clause | lfittl/libpg_query,lfittl/libpg_query,ranxian/peloton-frontend,ranxian/peloton-frontend,ranxian/peloton-frontend,ranxian/peloton-frontend,lfittl/libpg_query,ranxian/peloton-frontend |
a2fff26fae03cd46562d8d146dde1d6ebd7d9f8d | t/test_helper.h | t/test_helper.h |
#ifndef TEST_HELPER_C
#define TEST_HELPER_C (1)
#include "MMDB.h"
#define MMDB_DEFAULT_DATABASE "/usr/local/share/GeoIP/GeoIP2-City.mmdb"
typedef union {
struct in_addr v4;
struct in6_addr v6;
} in_addrX;
char *get_test_db_fname(void);
void ip_to_num(MMDB_s * mmdb, char *ipstr, in_addrX * dest_ipnum);
int dbl_cmp(double a, double b);
#endif
|
#ifndef TEST_HELPER_C
#define TEST_HELPER_C (1)
#include "MMDB.h"
typedef union {
struct in_addr v4;
struct in6_addr v6;
} in_addrX;
char *get_test_db_fname(void);
void ip_to_num(MMDB_s * mmdb, char *ipstr, in_addrX * dest_ipnum);
int dbl_cmp(double a, double b);
#endif
| Remove superfluous default db definition | Remove superfluous default db definition
| C | apache-2.0 | maxmind/libmaxminddb,maxmind/libmaxminddb,maxmind/libmaxminddb |
457459df300b2c65084cac758b8dc28538da8c06 | include/cpr/timeout.h | include/cpr/timeout.h | #ifndef CPR_TIMEOUT_H
#define CPR_TIMEOUT_H
#include <cstdint>
#include <chrono>
namespace cpr {
class Timeout {
public:
Timeout(const std::chrono::milliseconds& timeout) : ms(timeout) {}
Timeout(const std::int32_t& timeout) : ms(timeout) {}
std::chrono::milliseconds ms;
};
} // namespace cpr
#endif
| #ifndef CPR_TIMEOUT_H
#define CPR_TIMEOUT_H
#include <cstdint>
#include <chrono>
#include <limits>
#include <stdexcept>
namespace cpr {
class Timeout {
public:
Timeout(const std::chrono::milliseconds& duration) : ms{duration} {
if(ms.count() > std::numeric_limits<long>::max()) {
throw std::overflow_error("cpr::Timeout: timeout value overflow.");
}
if(ms.count() < std::numeric_limits<long>::min()) {
throw std::underflow_error("cpr::Timeout: timeout value underflow.");
}
}
Timeout(const std::int32_t& milliseconds)
: Timeout{std::chrono::milliseconds(milliseconds)} {}
std::chrono::milliseconds ms;
};
} // namespace cpr
#endif
| Check for under/overflow in Timeout constructor. Codestyle fixes. | Check for under/overflow in Timeout constructor. Codestyle fixes.
| C | mit | msuvajac/cpr,msuvajac/cpr,whoshuu/cpr,whoshuu/cpr,msuvajac/cpr,whoshuu/cpr |
1ceae27eddb5fd399e58930974638cb1bd367955 | mcrouter/lib/StatsReply.h | mcrouter/lib/StatsReply.h | /*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pragma once
#include <string>
#include <vector>
#include <folly/Conv.h>
namespace facebook { namespace memcache {
class McReply;
namespace cpp2 {
class McStatsReply;
}
template <class ThriftType>
class TypedThriftReply;
class StatsReply {
public:
template <typename V>
void addStat(folly::StringPiece name, V value) {
stats_.push_back(make_pair(name.str(), folly::to<std::string>(value)));
}
McReply getMcReply();
TypedThriftReply<cpp2::McStatsReply> getReply();
private:
std::vector<std::pair<std::string, std::string>> stats_;
};
}} // facebook::memcache
| /*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pragma once
#include <string>
#include <vector>
#include <folly/Conv.h>
namespace facebook { namespace memcache {
class McReply;
namespace cpp2 {
class McStatsReply;
}
template <class ThriftType>
class TypedThriftReply;
class StatsReply {
public:
template <typename V>
void addStat(folly::StringPiece name, V&& value) {
stats_.emplace_back(name.str(),
folly::to<std::string>(std::forward<V>(value)));
}
McReply getMcReply();
TypedThriftReply<cpp2::McStatsReply> getReply();
private:
std::vector<std::pair<std::string, std::string>> stats_;
};
}} // facebook::memcache
| Fix printf format, remove unused variables | Fix printf format, remove unused variables
Summary: title
Differential Revision: D3188505
fb-gh-sync-id: 7f544319c247b8607e058d2ae0c02c272e3c5fe1
fbshipit-source-id: 7f544319c247b8607e058d2ae0c02c272e3c5fe1
| C | mit | yqzhang/mcrouter,facebook/mcrouter,facebook/mcrouter,yqzhang/mcrouter,yqzhang/mcrouter,facebook/mcrouter,yqzhang/mcrouter,facebook/mcrouter |
30f290dac339d621972043be70ae520de128a0d5 | test/FrontendC/2005-07-20-SqrtNoErrno.c | test/FrontendC/2005-07-20-SqrtNoErrno.c | // RUN: %llvmgcc %s -S -o - -fno-math-errno | grep llvm.sqrt
#include <math.h>
float foo(float X) {
// Check that this compiles to llvm.sqrt when errno is ignored.
return sqrtf(X);
}
| // RUN: %llvmgcc %s -S -o - -fno-math-errno | grep llvm.sqrt
// llvm.sqrt has undefined behavior on negative inputs, so it is
// inappropriate to translate C/C++ sqrt to this.
// XFAIL: *
#include <math.h>
float foo(float X) {
// Check that this compiles to llvm.sqrt when errno is ignored.
return sqrtf(X);
}
| Disable test; what it's testing for is wrong. | Disable test; what it's testing for is wrong.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@82658 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm |
1c2d7aaafef7a07c2b088142a57666ff51e5d5c5 | src/aravistest.c | src/aravistest.c | #include <arv.h>
#include <arvgvinterface.h>
int
main (int argc, char **argv)
{
ArvInterface *interface;
ArvDevice *device;
char buffer[1024];
g_type_init ();
interface = arv_gv_interface_get_instance ();
device = arv_interface_get_first_device (interface);
if (device != NULL) {
arv_device_read (device, 0x00014150, 8, buffer);
arv_device_read (device, 0x000000e8, 16, buffer);
arv_device_read (device,
ARV_GVCP_GENICAM_FILENAME_ADDRESS_1,
ARV_GVCP_GENICAM_FILENAME_SIZE, buffer);
arv_device_read (device,
ARV_GVCP_GENICAM_FILENAME_ADDRESS_2,
ARV_GVCP_GENICAM_FILENAME_SIZE, buffer);
arv_device_read (device,
0x00100000, 0x00015904, buffer);
g_object_unref (device);
} else
g_message ("No device found");
g_object_unref (interface);
return 0;
}
| #include <arv.h>
#include <arvgvinterface.h>
int
main (int argc, char **argv)
{
ArvInterface *interface;
ArvDevice *device;
char buffer[100000];
g_type_init ();
interface = arv_gv_interface_get_instance ();
device = arv_interface_get_first_device (interface);
if (device != NULL) {
arv_device_read (device, 0x00014150, 8, buffer);
arv_device_read (device, 0x000000e8, 16, buffer);
arv_device_read (device,
ARV_GVCP_GENICAM_FILENAME_ADDRESS_1,
ARV_GVCP_GENICAM_FILENAME_SIZE, buffer);
arv_device_read (device,
ARV_GVCP_GENICAM_FILENAME_ADDRESS_2,
ARV_GVCP_GENICAM_FILENAME_SIZE, buffer);
arv_device_read (device,
0x00100000, 0x00015904, buffer);
g_file_set_contents ("/tmp/genicam.xml", buffer, 0x00015904, NULL);
g_object_unref (device);
} else
g_message ("No device found");
g_object_unref (interface);
return 0;
}
| Save the genicam file in /tmp/genicam.xml | Save the genicam file in /tmp/genicam.xml
| C | lgpl-2.1 | AravisProject/aravis,AnilRamachandran/aravis,AnilRamachandran/aravis,lu-zero/aravis,AravisProject/aravis,AravisProject/aravis,AnilRamachandran/aravis,AravisProject/aravis,lu-zero/aravis,lu-zero/aravis,AravisProject/aravis,lu-zero/aravis,AnilRamachandran/aravis,lu-zero/aravis,AnilRamachandran/aravis |
901f0f8ffaf24f80a4a4a7ea3a2c64001861705b | src/cassert.h | src/cassert.h | /**
* Thanks to http://stackoverflow.com/users/68204/rberteig
* http://stackoverflow.com/questions/807244/c-compiler-asserts-how-to-implement
*/
/** A compile time assertion check.
*
* Validate at compile time that the predicate is true without
* generating code. This can be used at any point in a source file
* where typedef is legal.
*
* On success, compilation proceeds normally.
*
* On failure, attempts to typedef an array type of negative size. The
* offending line will look like
* typedef assertion_failed_file_h_42[-1]
* where file is the content of the second parameter which should
* typically be related in some obvious way to the containing file
* name, 42 is the line number in the file on which the assertion
* appears, and -1 is the result of a calculation based on the
* predicate failing.
*
* \param predicate The predicate to test. It must evaluate to
* something that can be coerced to a normal C boolean.
*
* \param file A sequence of legal identifier characters that should
* uniquely identify the source file in which this condition appears.
*/
#define CASSERT(predicate, file) _impl_CASSERT_LINE(predicate,__LINE__,file)
#define _impl_PASTE(a,b) a##b
#define _impl_CASSERT_LINE(predicate, line, file) \
typedef char _impl_PASTE(assertion_failed_##file##_,line)[2*!!(predicate)-1];
| Add compile time assert macro | Add compile time assert macro
Credit to Ross Berteig
| C | bsd-3-clause | rbruggem/mqlog,rbruggem/mqlog |
|
937213da82f18318d5f0f0e252d19ce40c7c6498 | src/fdndapplication.h | src/fdndapplication.h | /**************************************************************************************
**
** Copyright (C) 2014 Files Drag & Drop
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**
**************************************************************************************/
#ifndef FDNDAPPLICATION_H
#define FDNDAPPLICATION_H
#include <QObject>
#include "QtSingleApplication/singleapplication/qtsingleapplication.h"
/**
* Application class that will allow to control system event
* as the dock events on the mac
*/
class FDNDApplication : public QtSingleApplication
{
Q_OBJECT
public:
/// Constructor
explicit FDNDApplication(int argc, char *argv[]);
signals:
/**
* Notify that the dock was clicked
*/
void dockClicked();
public slots:
/**
* On mac dock clicked (use the low level objc API)
*/
void onClickOnDock();
};
#endif // FDNDAPPLICATION_H
| /**************************************************************************************
**
** Copyright (C) 2014 Files Drag & Drop
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**
**************************************************************************************/
#ifndef FDNDAPPLICATION_H
#define FDNDAPPLICATION_H
#include <QObject>
#include "qtsingleapplication/singleapplication/qtsingleapplication.h"
/**
* Application class that will allow to control system event
* as the dock events on the mac
*/
class FDNDApplication : public QtSingleApplication
{
Q_OBJECT
public:
/// Constructor
explicit FDNDApplication(int argc, char *argv[]);
signals:
/**
* Notify that the dock was clicked
*/
void dockClicked();
public slots:
/**
* On mac dock clicked (use the low level objc API)
*/
void onClickOnDock();
};
#endif // FDNDAPPLICATION_H
| FIX case sensitive include name (qtsingleapplication) | FIX case sensitive include name (qtsingleapplication)
| C | lgpl-2.1 | filesdnd/filesdnd-qt,filesdnd/filesdnd-qt,filesdnd/filesdnd-qt,filesdnd/filesdnd-qt |
3fcf6ec1e94e43fb8d7df92627fe1963d724e07a | include/llvm/Support/Unique.h | include/llvm/Support/Unique.h | //***************************************************************************
// class Unique:
// Mixin class for classes that should never be copied.
//
// Purpose:
// This mixin disables both the copy constructor and the
// assignment operator. It also provides a default equality operator.
//
// History:
// 09/24/96 - vadve - Created (adapted from dHPF).
//
//***************************************************************************
#ifndef UNIQUE_H
#define UNIQUE_H
#include <assert.h>
class Unique
{
protected:
/*ctor*/ Unique () {}
/*dtor*/ virtual ~Unique () {}
public:
virtual bool operator== (const Unique& u1) const;
virtual bool operator!= (const Unique& u1) const;
private:
//
// Disable the copy constructor and the assignment operator
// by making them both private:
//
/*ctor*/ Unique (Unique&) { assert(0); }
virtual Unique& operator= (const Unique& u1) { assert(0);
return *this; }
};
// Unique object equality.
inline bool
Unique::operator==(const Unique& u2) const
{
return (bool) (this == &u2);
}
// Unique object inequality.
inline bool
Unique::operator!=(const Unique& u2) const
{
return (bool) !(this == &u2);
}
#endif
| //************************************************************-*- C++ -*-
// class Unique:
// Mixin class for classes that should never be copied.
//
// Purpose:
// This mixin disables both the copy constructor and the
// assignment operator. It also provides a default equality operator.
//
// History:
// 09/24/96 - vadve - Created (adapted from dHPF).
//
//***************************************************************************
#ifndef UNIQUE_H
#define UNIQUE_H
#include <assert.h>
class Unique
{
protected:
/*ctor*/ Unique () {}
/*dtor*/ virtual ~Unique () {}
public:
virtual bool operator== (const Unique& u1) const;
virtual bool operator!= (const Unique& u1) const;
private:
//
// Disable the copy constructor and the assignment operator
// by making them both private:
//
/*ctor*/ Unique (Unique&) { assert(0); }
virtual Unique& operator= (const Unique& u1) { assert(0);
return *this; }
};
// Unique object equality.
inline bool
Unique::operator==(const Unique& u2) const
{
return (bool) (this == &u2);
}
// Unique object inequality.
inline bool
Unique::operator!=(const Unique& u2) const
{
return (bool) !(this == &u2);
}
#endif
| Add flag for emacs so it realizes it's C++ code | Add flag for emacs so it realizes it's C++ code
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@269 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap |
edcfd59b7b9e3e114ba66b552a1cca48b7365008 | host-shared/Labels.h | host-shared/Labels.h | /* Chrome Linux plugin
*
* This software is released under either the GNU Library General Public
* License (see LICENSE.LGPL).
*
* Note that the only valid version of the LGPL license as far as this
* project is concerned is the original GNU Library General Public License
* Version 2.1, February 1999
*/
#ifndef LABELS_H
#define LABELS_H
#define USER_CANCEL 1
#define READER_NOT_FOUND 5
#define UNKNOWN_ERROR 5
#define CERT_NOT_FOUND 2
#define INVALID_HASH 17
#define ONLY_HTTPS_ALLOWED 19
#include <map>
#include <string>
#include <vector>
class Labels {
private:
int selectedLanguage;
std::map<std::string,std::string[3]> labels;
std::map<int,std::string[3]> errors;
std::map<std::string, int> languages;
void init();
public:
Labels();
void setLanguage(std::string language);
std::string get(std::string labelKey);
std::string getError(int errorCode);
};
extern Labels l10nLabels;
#endif /* LABELS_H */
| /* Chrome Linux plugin
*
* This software is released under either the GNU Library General Public
* License (see LICENSE.LGPL).
*
* Note that the only valid version of the LGPL license as far as this
* project is concerned is the original GNU Library General Public License
* Version 2.1, February 1999
*/
#ifndef LABELS_H
#define LABELS_H
#define USER_CANCEL 1
#define READER_NOT_FOUND 5
#define UNKNOWN_ERROR 5
#define CERT_NOT_FOUND 2
#define INVALID_HASH 17
#define ONLY_HTTPS_ALLOWED 19
#include <map>
#include <string>
#include <vector>
class Labels {
private:
int selectedLanguage;
std::map<std::string,std::vector<std::string> > labels;
std::map<int,std::vector<std::string> > errors;
std::map<std::string, int> languages;
void init();
public:
Labels();
void setLanguage(std::string language);
std::string get(std::string labelKey);
std::string getError(int errorCode);
};
extern Labels l10nLabels;
#endif /* LABELS_H */
| Fix GCC bug based code (allows to compile with clang) | Fix GCC bug based code (allows to compile with clang)
| C | lgpl-2.1 | metsma/chrome-token-signing,cristiano-andrade/chrome-token-signing,cristiano-andrade/chrome-token-signing,fabiorusso/chrome-token-signing,cristiano-andrade/chrome-token-signing,metsma/chrome-token-signing,metsma/chrome-token-signing,fabiorusso/chrome-token-signing,fabiorusso/chrome-token-signing,cristiano-andrade/chrome-token-signing,open-eid/chrome-token-signing,open-eid/chrome-token-signing,fabiorusso/chrome-token-signing,open-eid/chrome-token-signing,metsma/chrome-token-signing,open-eid/chrome-token-signing,metsma/chrome-token-signing,open-eid/chrome-token-signing |
7512beb75147e357dc4870f42d1088a27f65d1d2 | test/FrontendC/pr4349.c | test/FrontendC/pr4349.c | // RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars2 | grep {\\\[2 x \\\[2 x i8\\\]\\\]}
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars2 | grep {i32 1} | count 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars3 | grep {\\\[2 x i16\\\]}
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars3 | grep {i32 1} | count 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars4 | grep {\\\[2 x \\\[2 x i8\\\]\\\]} | count 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars4 | grep {i32 1, i32 1} | count 1
// PR 4349
union reg
{
unsigned char b[2][2];
unsigned short w[2];
unsigned int d;
};
struct cpu
{
union reg pc;
};
extern struct cpu cpu;
struct svar
{
void *ptr;
};
struct svar svars1[] =
{
{ &((cpu.pc).w[0]) }
};
struct svar svars2[] =
{
{ &((cpu.pc).b[0][1]) }
};
struct svar svars3[] =
{
{ &((cpu.pc).w[1]) }
};
struct svar svars4[] =
{
{ &((cpu.pc).b[1][1]) }
};
| Test for rev 73205 (PR 4349) | Test for rev 73205 (PR 4349)
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@73206 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap |
|
4130b5d7b733c94055c53056b43aa887dc163d99 | arch/powerpc/include/asm/abs_addr.h | arch/powerpc/include/asm/abs_addr.h | #ifndef _ASM_POWERPC_ABS_ADDR_H
#define _ASM_POWERPC_ABS_ADDR_H
#ifdef __KERNEL__
/*
* c 2001 PPC 64 Team, IBM Corp
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/memblock.h>
#include <asm/types.h>
#include <asm/page.h>
#include <asm/prom.h>
/* Convenience macros */
#define virt_to_abs(va) __pa(va)
#define abs_to_virt(aa) __va(aa)
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_ABS_ADDR_H */
| #ifndef _ASM_POWERPC_ABS_ADDR_H
#define _ASM_POWERPC_ABS_ADDR_H
#ifdef __KERNEL__
/*
* c 2001 PPC 64 Team, IBM Corp
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/memblock.h>
#include <asm/types.h>
#include <asm/page.h>
#include <asm/prom.h>
/* Convenience macros */
#define virt_to_abs(va) __pa(va)
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_ABS_ADDR_H */
| Remove abs_to_virt() now all users have been fixed | powerpc: Remove abs_to_virt() now all users have been fixed
Signed-off-by: Michael Ellerman <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
| C | mit | KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas |
396654016649d907ab791777e916745b1bf182ef | Source/Utils/include/Utils/Assert.h | Source/Utils/include/Utils/Assert.h | //
// Created by bentoo on 29.11.16.
//
#ifndef GAME_ASSERT_H
#define GAME_ASSERT_H
#include <assert.h>
#include <cstdio>
#include <cstdlib>
#include <utility>
#include "DebugSourceInfo.h"
#ifdef _MSC_VER
#define YAGE_BREAK __debugbreak()
#elif __MINGW32__
#define YAGE_BREAK __builtin_trap()
#else
#include <signal.h>
#define YAGE_BREAK raise(SIGTRAP)
#endif
#ifndef NDEBUG
#define YAGE_ASSERT(predicate, message, ... ) (predicate) ? ((void)0) \
: (Utils::Assert(DEBUG_SOURCE_INFO, message, ##__VA_ARGS__), YAGE_BREAK, ((void)0))
#else
#define YAGE_ASSERT(predicate, message, ... ) (void(0))
#endif
namespace Utils
{
struct Assert
{
static char buffer[256];
template <typename ... Args>
Assert(Utils::DebugSourceInfo info, const char* message, Args&& ... args)
{
std::snprintf(buffer, sizeof(buffer), message, std::forward<Args>(args)...);
std::fprintf(stderr, "Assert failed!\n\tfile %s, line %zu,\nreason : %s",
info.file, info.line, buffer);
}
};
}
#endif //GAME_ASSERT_H
| //
// Created by bentoo on 29.11.16.
//
#ifndef GAME_ASSERT_H
#define GAME_ASSERT_H
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <utility>
#include "DebugSourceInfo.h"
#ifdef _MSC_VER
#define YAGE_BREAK __debugbreak()
#elif __MINGW32__
#define YAGE_BREAK __builtin_trap()
#else
#include <csignal>
#define YAGE_BREAK raise(SIGTRAP)
#endif
#ifndef NDEBUG
#define YAGE_ASSERT(predicate, message, ... ) (predicate) ? ((void)0) \
: (Utils::Assert(DEBUG_SOURCE_INFO, message, ##__VA_ARGS__), YAGE_BREAK, ((void)0))
#else
#define YAGE_ASSERT(predicate, message, ... ) (void(0))
#endif
namespace Utils
{
struct Assert
{
static char buffer[256];
template <typename ... Args>
Assert(Utils::DebugSourceInfo info, const char* message, Args&& ... args)
{
std::snprintf(buffer, sizeof(buffer), message, std::forward<Args>(args)...);
std::fprintf(stderr, "Assert failed!\n\tfile %s, line %zu,\nreason : %s",
info.file, info.line, buffer);
}
};
}
#endif //GAME_ASSERT_H
| Include std headers instead of C ones | Include std headers instead of C ones
| C | mit | MrJaqbq/YAGE,MrJaqbq/Volkhvy,MrJaqbq/Volkhvy,MrJaqbq/YAGE |
c67d79bb09a7ae4a4704668a5d897ef6c160bf8a | PS_SDP-2xxx/sdp2xxx.h | PS_SDP-2xxx/sdp2xxx.h | #ifndef __SDP2XXX_H___
#define __SDP2XXX_H___
"SESS__\r"
"ENDS__\r"
"CCOM__??\r"
"GCOM__\r"
"GMAX__\r"
"GOVP__\r"
"GETD__\r"
"GETS__\r"
"GETM__\r"
"GETM__?\r"
"GETP__\r"
"GETP__?\r"
"GPAL__\r"
"VOLT__?\r"
"CURR__?\r"
"SOVP__?\r"
"SOUT__1\r"
"SOUT__0\r"
"POWW__?\r"
"POWW__?\r"
"PROM__?\r"
"PROP__?\r"
"RUNM__?\r"
"RUNP__?\r"
"STOP__\r"
#endif
| Add list of functions for SDP power supply | Add list of functions for SDP power supply
Signed-off-by: Jiri Pinkava <[email protected]>
| C | apache-2.0 | pinkavaj/msdptool |
|
a8069e5ae37a255c1f9a97918343728eb0344184 | src/arch/relic_arch_avr.c | src/arch/relic_arch_avr.c | /*
* RELIC is an Efficient LIbrary for Cryptography
* Copyright (C) 2007-2011 RELIC Authors
*
* This file is part of RELIC. RELIC is legal property of its developers,
* whose names are not listed here. Please refer to the COPYRIGHT file
* for contact information.
*
* RELIC is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* RELIC 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 RELIC. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file
*
* Implementation of AVR-dependent routines.
*
* @version $Id$
* @ingroup arch
*/
/*============================================================================*/
/* Public definitions */
/*============================================================================*/
void arch_init(void) {
}
void arch_clean(void) {
}
| Add missing file for ARCH = AVR. | Add missing file for ARCH = AVR. | C | lgpl-2.1 | rajeevakarv/relic-toolkit,rajeevakarv/relic-toolkit,tectronics/relic-toolkit,rajeevakarv/relic-toolkit,tectronics/relic-toolkit,tectronics/relic-toolkit |
|
69379edfcf5414e6df4f9c12c06504ec2a151cab | You-DataStore/datastore.h | You-DataStore/datastore.h | #pragma once
#ifndef YOU_DATASTORE_DATASTORE_H_
#define YOU_DATASTORE_DATASTORE_H_
#include <cstdint>
#include <functional>
#include <unordered_map>
#include "pugixml.hpp"
namespace You {
namespace DataStore {
class DataStore {
public:
/// Test classes
friend class DataStoreAPITest;
/// typedefs
/// typedef for Serialized Task
typedef std::unordered_map<std::wstring, std::wstring> STask;
/// typedef for Task ID
typedef int64_t TaskId;
DataStore() = default;
~DataStore() = default;
/// Insert a task into the datastore
void post(STask);
/// Update the content of a task
void put(TaskId, STask);
/// Get a task
STask get(TaskId);
/// Delete a task
void erase(TaskId);
/// Commits the changes
void commit();
/// Roll back to the last commited changes
void rollback();
/// Get a list of tasks that passes the filter
std::vector<STask> filter(const std::function<bool(STask)>&);
private:
static const std::wstring FILE_PATH;
pugi::xml_document document;
/// Saves the xml object to a file
/// Returns true if operation successful and false otherwise
bool saveData();
/// Loads the xml file into the xml object
void loadData();
};
} // namespace DataStore
} // namespace You
#endif // YOU_DATASTORE_DATASTORE_H_
| #pragma once
#ifndef YOU_DATASTORE_DATASTORE_H_
#define YOU_DATASTORE_DATASTORE_H_
#include <cstdint>
#include <functional>
#include <unordered_map>
#include "pugixml.hpp"
namespace You {
namespace DataStore {
class DataStore {
public:
/// Test classes
friend class DataStoreAPITest;
/// typedefs
/// typedef for Serialized Task
typedef std::unordered_map<std::wstring, std::wstring> STask;
/// typedef for Task ID
typedef int64_t TaskId;
DataStore() = default;
~DataStore() = default;
/// Insert a task into the datastore
void post(STask);
/// Update the content of a task
void put(TaskId, STask);
/// Get a task
STask get(TaskId);
/// Delete a task
void erase(TaskId);
/// Get a list of tasks that passes the filter
std::vector<STask> filter(const std::function<bool(STask)>&);
private:
static const std::wstring FILE_PATH;
pugi::xml_document document;
/// Saves the xml object to a file
/// Returns true if operation successful and false otherwise
bool saveData();
/// Loads the xml file into the xml object
void loadData();
};
} // namespace DataStore
} // namespace You
#endif // YOU_DATASTORE_DATASTORE_H_
| Remove commit and rollback method | Remove commit and rollback method
To be implemented on Transaction class
| C | mit | cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main |
3bb2e8dfc9eae7c6abd8fbec5fa751ffcb495121 | gobject/gobject-autocleanups.h | gobject/gobject-autocleanups.h | /*
* Copyright © 2015 Canonical Limited
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the licence, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
* Author: Ryan Lortie <[email protected]>
*/
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
#error "Only <glib-object.h> can be included directly."
#endif
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitiallyUnowned, g_object_unref)
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_unset)
| /*
* Copyright © 2015 Canonical Limited
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the licence, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
* Author: Ryan Lortie <[email protected]>
*/
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
#error "Only <glib-object.h> can be included directly."
#endif
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitiallyUnowned, g_object_unref)
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_clear)
| Use g_value_clear as clear function | gvalue: Use g_value_clear as clear function
This change allow leaving a scope before g_value_init() has been
called. This would happen if you do:
{
g_auto(GValue) value = G_VALUE_INIT;
}
Or have a return statement (due to failure) before the part of
your code where you set this GValue.
https://bugzilla.gnome.org/show_bug.cgi?id=755766
| C | lgpl-2.1 | johne53/MB3Glib,cention-sany/glib,Distrotech/glib,ieei/glib,tchakabam/glib,ieei/glib,endlessm/glib,cention-sany/glib,Distrotech/glib,tchakabam/glib,tchakabam/glib,johne53/MB3Glib,endlessm/glib,MathieuDuponchelle/glib,Distrotech/glib,johne53/MB3Glib,johne53/MB3Glib,mzabaluev/glib,ieei/glib,mzabaluev/glib,MathieuDuponchelle/glib,MathieuDuponchelle/glib,ieei/glib,mzabaluev/glib,tchakabam/glib,cention-sany/glib,tchakabam/glib,MathieuDuponchelle/glib,endlessm/glib,cention-sany/glib,Distrotech/glib,MathieuDuponchelle/glib,mzabaluev/glib,mzabaluev/glib,Distrotech/glib,ieei/glib,endlessm/glib,cention-sany/glib,johne53/MB3Glib,johne53/MB3Glib,endlessm/glib |
f0ed7363a4aa6acf747a4c49366003b98483795e | models/generic/Generic_RackPinion.h | models/generic/Generic_RackPinion.h | // =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================
// Authors: Radu Serban
// =============================================================================
//
// Generic rack-pinion steering model.
//
// =============================================================================
#ifndef GENERIC_RACKPINION_H
#define GENERIC_RACKPINION_H
#include "subsys/steering/ChRackPinion.h"
class Generic_RackPinion : public chrono::ChRackPinion
{
public:
Generic_RackPinion(const std::string& name) : ChRackPinion(name) {}
~Generic_RackPinion() {}
virtual double GetSteeringLinkMass() const { return 9.0; }
virtual const chrono::ChVector<>& GetSteeringLinkInertia() const { return chrono::ChVector<>(1, 1, 1); }
virtual double GetSteeringLinkCOM() const { return 0.0; }
virtual double GetSteeringLinkRadius() const { return 0.03; }
virtual double GetSteeringLinkLength() const { return 0.896; }
virtual double GetPinionRadius() const { return 0.1; }
virtual double GetMaxAngle() const { return 0.87; }
};
#endif
| Add a generic rack-pinion steering subsystem. | Add a generic rack-pinion steering subsystem.
| C | bsd-3-clause | hsu/chrono-vehicle,hsu/chrono-vehicle,hsu/chrono-vehicle |
|
7355748b062d547e074c192f1eb56f10e0c5eeee | include/config/SkUserConfigManual.h | include/config/SkUserConfigManual.h | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
#define SK_USE_FREETYPE_EMBOLDEN
// Disable these Ganesh features
#define SK_DISABLE_REDUCE_OPLIST_SPLITTING
// Check error is expensive. HWUI historically also doesn't check its allocations
#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
// Legacy flags
#define SK_IGNORE_GPU_DITHER
#define SK_SUPPORT_DEPRECATED_CLIPOPS
// Staging flags
#define SK_LEGACY_PATH_ARCTO_ENDPOINT
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#define SK_DISABLE_DAA // skbug.com/6886
#endif // SkUserConfigManual_DEFINED
| /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
#define SK_USE_FREETYPE_EMBOLDEN
// Disable these Ganesh features
#define SK_DISABLE_REDUCE_OPLIST_SPLITTING
// Check error is expensive. HWUI historically also doesn't check its allocations
#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
// Legacy flags
#define SK_IGNORE_GPU_DITHER
#define SK_SUPPORT_DEPRECATED_CLIPOPS
// Staging flags
#define SK_LEGACY_PATH_ARCTO_ENDPOINT
#define SK_SUPPORT_LEGACY_MATRIX_IMAGEFILTER
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#define SK_DISABLE_DAA // skbug.com/6886
#endif // SkUserConfigManual_DEFINED
| Add flag to stage api change am: f83df73740 | Add flag to stage api change am: f83df73740
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/skia/+/13451544
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ied4b884f3b02f3a7777a6464a996414d3cfdb3d6
| C | bsd-3-clause | aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia |
c2bc5d0a6503f1890fb44f0978639288ec8a6f82 | testing/c-tests/cookie_raw_cookie_hex_should_be_identity.c | testing/c-tests/cookie_raw_cookie_hex_should_be_identity.c | #include <traildb.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
int main(int argc, char** argv)
{
((void) argc);
((void) argv);
for ( int i1 = 0; i1 < 10000; ++i1 )
{
uint8_t hex_uuid[33];
uint8_t hex_uuid2[33];
uint8_t uuid[16];
uint8_t uuid2[16];
for ( int i2 = 0; i2 < 16; ++i2 ) {
uuid[i2] = random();
}
tdb_cookie_hex(uuid, hex_uuid);
tdb_cookie_raw(hex_uuid, uuid2);
assert(!memcmp(uuid, uuid2, 16));
for ( int i2 = 0; i2 < 32; ++i2 ) {
hex_uuid[i2] = random() % 16;
hex_uuid[i2] += '0';
if ( hex_uuid[i2] > '9' ) {
hex_uuid[i2] -= ('9'+1);
hex_uuid[i2] += 'a';
}
}
tdb_cookie_raw(hex_uuid, uuid);
tdb_cookie_hex(uuid, hex_uuid2);
assert(!memcmp(hex_uuid, hex_uuid2, 32));
}
return 0;
}
| #include <traildb.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
int main(int argc, char** argv)
{
((void) argc);
((void) argv);
for ( int i1 = 0; i1 < 10000; ++i1 )
{
uint8_t hex_uuid[33];
uint8_t hex_uuid2[33];
uint8_t uuid[16];
uint8_t uuid2[16];
for ( int i2 = 0; i2 < 16; ++i2 ) {
uuid[i2] = rand();
}
tdb_cookie_hex(uuid, hex_uuid);
tdb_cookie_raw(hex_uuid, uuid2);
assert(!memcmp(uuid, uuid2, 16));
for ( int i2 = 0; i2 < 32; ++i2 ) {
hex_uuid[i2] = rand() % 16;
hex_uuid[i2] += '0';
if ( hex_uuid[i2] > '9' ) {
hex_uuid[i2] -= ('9'+1);
hex_uuid[i2] += 'a';
}
}
tdb_cookie_raw(hex_uuid, uuid);
tdb_cookie_hex(uuid, hex_uuid2);
assert(!memcmp(hex_uuid, hex_uuid2, 32));
}
return 0;
}
| Fix warnings in one of the tests. | Fix warnings in one of the tests.
random() is not as standard as I thought. Use rand() instead.
| C | mit | tuulos/traildb,tuulos/traildb,traildb/traildb,traildb/traildb,tuulos/traildb,tuulos/traildb,traildb/traildb |
e6145240a37ac745f5844963019cb108a747ff64 | ex01-17.c | ex01-17.c | /** Exercise 1.17
* Write a program to print all input lines that are longer than 80 characters.
*/
#include <stdio.h>
#define MINLINE 80
main() {
int i, buffer_printed;
char buffer[MINLINE + 1];
char c;
i = buffer_printed = 0;
buffer[MINLINE] = '\0';
while ((c = getchar()) != EOF) {
if (!buffer_printed) {
buffer[i] = c;
++i;
if (i > MINLINE) {
printf("%s", buffer);
buffer_printed = 1;
}
} else {
putchar(c);
}
if (c == '\n') {
i = 0;
buffer_printed = 0;
}
}
return 0;
}
| Add solution for exercise 17. | Add solution for exercise 17.
| C | unlicense | kdungs/exercises-KnR |
|
83122da713a81c8310bf97de8ff6320497d5f327 | lib/CodeGen/CGBuilder.h | lib/CodeGen/CGBuilder.h | //===-- CGBuilder.h - Choose IRBuilder implementation ----------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef CLANG_CODEGEN_CGBUILDER_H
#define CLANG_CODEGEN_CGBUILDER_H
#include "llvm/Support/IRBuilder.h"
namespace clang {
namespace CodeGen {
// Don't preserve names on values in an optimized build.
#ifdef NDEBUG
typedef llvm::IRBuilder<false> CGBuilderTy;
#else
typedef llvm::IRBuilder<> CGBuilderTy;
#endif
} // end namespace CodeGen
} // end namespace clang
#endif
| //===-- CGBuilder.h - Choose IRBuilder implementation ----------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef CLANG_CODEGEN_CGBUILDER_H
#define CLANG_CODEGEN_CGBUILDER_H
#include "llvm/IRBuilder.h"
namespace clang {
namespace CodeGen {
// Don't preserve names on values in an optimized build.
#ifdef NDEBUG
typedef llvm::IRBuilder<false> CGBuilderTy;
#else
typedef llvm::IRBuilder<> CGBuilderTy;
#endif
} // end namespace CodeGen
} // end namespace clang
#endif
| Update Clang to reflect the new home of IRBuilder.h as of r159421. | Update Clang to reflect the new home of IRBuilder.h as of r159421.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@159422 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang |
07de4cbbbb7c3f5ef9728342a35efc12f6d6080b | src/interfaces/odbc/md5.h | src/interfaces/odbc/md5.h | /* File: connection.h
*
* Description: See "md.h"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 35
/* From c.h */
#ifndef __BEOS__
#ifndef __cplusplus
#ifndef bool
typedef char bool;
#endif
#ifndef true
#define true ((bool) 1)
#endif
#ifndef false
#define false ((bool) 0)
#endif
#endif /* not C++ */
#endif /* __BEOS__ */
/* #if SIZEOF_UINT8 == 0 Can't get this from configure */
typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */
/* #endif */
extern bool EncryptMD5(const char *passwd, const char *salt,
size_t salt_len, char *buf);
#endif
| /* File: connection.h
*
* Description: See "md.h"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 35
/* From c.h */
#ifndef __BEOS__
#ifndef __cplusplus
#ifndef bool
typedef char bool;
#endif
#ifndef true
#define true ((bool) 1)
#endif
#ifndef false
#define false ((bool) 0)
#endif
#endif /* not C++ */
#endif /* __BEOS__ */
/* Also defined in include/c.h */
#if SIZEOF_UINT8 == 0
typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */
#endif /* SIZEOF_UINT8 == 0 */
extern bool EncryptMD5(const char *passwd, const char *salt,
size_t salt_len, char *buf);
#endif
| Add configure result checks on odbc, per Peter E. | Add configure result checks on odbc, per Peter E.
| C | apache-2.0 | adam8157/gpdb,randomtask1155/gpdb,ashwinstar/gpdb,xinzweb/gpdb,ovr/postgres-xl,zeroae/postgres-xl,yazun/postgres-xl,ahachete/gpdb,kmjungersen/PostgresXL,snaga/postgres-xl,rubikloud/gpdb,arcivanov/postgres-xl,ashwinstar/gpdb,jmcatamney/gpdb,techdragon/Postgres-XL,adam8157/gpdb,lintzc/gpdb,yuanzhao/gpdb,ahachete/gpdb,techdragon/Postgres-XL,lisakowen/gpdb,ovr/postgres-xl,foyzur/gpdb,zeroae/postgres-xl,ahachete/gpdb,CraigHarris/gpdb,janebeckman/gpdb,techdragon/Postgres-XL,greenplum-db/gpdb,foyzur/gpdb,lintzc/gpdb,xuegang/gpdb,ovr/postgres-xl,arcivanov/postgres-xl,chrishajas/gpdb,ahachete/gpdb,yuanzhao/gpdb,lisakowen/gpdb,janebeckman/gpdb,arcivanov/postgres-xl,kmjungersen/PostgresXL,foyzur/gpdb,zaksoup/gpdb,Quikling/gpdb,tpostgres-projects/tPostgres,postmind-net/postgres-xl,xuegang/gpdb,edespino/gpdb,zeroae/postgres-xl,cjcjameson/gpdb,postmind-net/postgres-xl,cjcjameson/gpdb,zaksoup/gpdb,zeroae/postgres-xl,cjcjameson/gpdb,50wu/gpdb,lpetrov-pivotal/gpdb,atris/gpdb,rvs/gpdb,tangp3/gpdb,ashwinstar/gpdb,xinzweb/gpdb,rvs/gpdb,randomtask1155/gpdb,jmcatamney/gpdb,tpostgres-projects/tPostgres,edespino/gpdb,zeroae/postgres-xl,yuanzhao/gpdb,cjcjameson/gpdb,pavanvd/postgres-xl,jmcatamney/gpdb,randomtask1155/gpdb,lintzc/gpdb,xinzweb/gpdb,rubikloud/gpdb,cjcjameson/gpdb,lisakowen/gpdb,atris/gpdb,jmcatamney/gpdb,zaksoup/gpdb,ahachete/gpdb,greenplum-db/gpdb,lpetrov-pivotal/gpdb,jmcatamney/gpdb,Chibin/gpdb,edespino/gpdb,tangp3/gpdb,kmjungersen/PostgresXL,lisakowen/gpdb,lintzc/gpdb,0x0FFF/gpdb,yazun/postgres-xl,50wu/gpdb,randomtask1155/gpdb,arcivanov/postgres-xl,oberstet/postgres-xl,tangp3/gpdb,tangp3/gpdb,xuegang/gpdb,lintzc/gpdb,yazun/postgres-xl,foyzur/gpdb,foyzur/gpdb,rubikloud/gpdb,edespino/gpdb,50wu/gpdb,Postgres-XL/Postgres-XL,0x0FFF/gpdb,Chibin/gpdb,kmjungersen/PostgresXL,oberstet/postgres-xl,greenplum-db/gpdb,greenplum-db/gpdb,janebeckman/gpdb,yuanzhao/gpdb,snaga/postgres-xl,rubikloud/gpdb,rubikloud/gpdb,lintzc/gpdb,xinzweb/gpdb,lpetrov-pivotal/gpdb,lisakowen/gpdb,50wu/gpdb,pavanvd/postgres-xl,chrishajas/gpdb,cjcjameson/gpdb,greenplum-db/gpdb,arcivanov/postgres-xl,janebeckman/gpdb,cjcjameson/gpdb,tangp3/gpdb,royc1/gpdb,janebeckman/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,atris/gpdb,randomtask1155/gpdb,0x0FFF/gpdb,lpetrov-pivotal/gpdb,Postgres-XL/Postgres-XL,Chibin/gpdb,ovr/postgres-xl,techdragon/Postgres-XL,edespino/gpdb,Quikling/gpdb,edespino/gpdb,lisakowen/gpdb,chrishajas/gpdb,Quikling/gpdb,edespino/gpdb,techdragon/Postgres-XL,janebeckman/gpdb,postmind-net/postgres-xl,ovr/postgres-xl,royc1/gpdb,50wu/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,tpostgres-projects/tPostgres,CraigHarris/gpdb,adam8157/gpdb,Chibin/gpdb,royc1/gpdb,tpostgres-projects/tPostgres,adam8157/gpdb,royc1/gpdb,kaknikhil/gpdb,Chibin/gpdb,pavanvd/postgres-xl,chrishajas/gpdb,Chibin/gpdb,Quikling/gpdb,rvs/gpdb,adam8157/gpdb,oberstet/postgres-xl,0x0FFF/gpdb,50wu/gpdb,0x0FFF/gpdb,atris/gpdb,janebeckman/gpdb,jmcatamney/gpdb,CraigHarris/gpdb,tangp3/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,Postgres-XL/Postgres-XL,lpetrov-pivotal/gpdb,foyzur/gpdb,atris/gpdb,CraigHarris/gpdb,kaknikhil/gpdb,yazun/postgres-xl,rvs/gpdb,yazun/postgres-xl,CraigHarris/gpdb,CraigHarris/gpdb,xinzweb/gpdb,rvs/gpdb,Quikling/gpdb,tangp3/gpdb,ashwinstar/gpdb,Chibin/gpdb,rubikloud/gpdb,ahachete/gpdb,greenplum-db/gpdb,xuegang/gpdb,lintzc/gpdb,greenplum-db/gpdb,kaknikhil/gpdb,cjcjameson/gpdb,lintzc/gpdb,ahachete/gpdb,xinzweb/gpdb,zaksoup/gpdb,kaknikhil/gpdb,kaknikhil/gpdb,rvs/gpdb,xinzweb/gpdb,kaknikhil/gpdb,lpetrov-pivotal/gpdb,rubikloud/gpdb,xuegang/gpdb,yuanzhao/gpdb,rubikloud/gpdb,royc1/gpdb,Quikling/gpdb,kaknikhil/gpdb,edespino/gpdb,snaga/postgres-xl,xuegang/gpdb,tangp3/gpdb,janebeckman/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,CraigHarris/gpdb,Chibin/gpdb,lisakowen/gpdb,Quikling/gpdb,xuegang/gpdb,50wu/gpdb,randomtask1155/gpdb,yuanzhao/gpdb,zaksoup/gpdb,edespino/gpdb,snaga/postgres-xl,greenplum-db/gpdb,rvs/gpdb,adam8157/gpdb,janebeckman/gpdb,zaksoup/gpdb,edespino/gpdb,atris/gpdb,chrishajas/gpdb,lintzc/gpdb,royc1/gpdb,xuegang/gpdb,snaga/postgres-xl,tpostgres-projects/tPostgres,xuegang/gpdb,0x0FFF/gpdb,kmjungersen/PostgresXL,ashwinstar/gpdb,chrishajas/gpdb,postmind-net/postgres-xl,Chibin/gpdb,ashwinstar/gpdb,xinzweb/gpdb,yuanzhao/gpdb,jmcatamney/gpdb,chrishajas/gpdb,Quikling/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,Postgres-XL/Postgres-XL,rvs/gpdb,royc1/gpdb,atris/gpdb,adam8157/gpdb,rvs/gpdb,atris/gpdb,lisakowen/gpdb,lpetrov-pivotal/gpdb,chrishajas/gpdb,Chibin/gpdb,Quikling/gpdb,zaksoup/gpdb,CraigHarris/gpdb,randomtask1155/gpdb,randomtask1155/gpdb,pavanvd/postgres-xl,0x0FFF/gpdb,oberstet/postgres-xl,royc1/gpdb,adam8157/gpdb,kaknikhil/gpdb,zaksoup/gpdb,janebeckman/gpdb,Quikling/gpdb,foyzur/gpdb,ahachete/gpdb,jmcatamney/gpdb,oberstet/postgres-xl,arcivanov/postgres-xl,ashwinstar/gpdb,foyzur/gpdb,postmind-net/postgres-xl,rvs/gpdb,Postgres-XL/Postgres-XL,50wu/gpdb,lpetrov-pivotal/gpdb |
a8ea76a45a8771245e70e9b603eac8d9df1bcfad | test/CodeGen/builtin-stackaddress.c | test/CodeGen/builtin-stackaddress.c | // RUN: clang -emit-llvm < %s
void* a(unsigned x) {
return __builtin_return_address(0);
}
void* c(unsigned x) {
return __builtin_frame_address(0);
}
// RUN: clang -emit-llvm < %s
void* a(unsigned x) {
return __builtin_return_address(0);
}
void* c(unsigned x) {
return __builtin_frame_address(0);
}
| // RUN: clang -emit-llvm < %s | grep "llvm.returnaddress"
// RUN: clang -emit-llvm < %s | grep "llvm.frameaddress"
void* a(unsigned x) {
return __builtin_return_address(0);
}
void* c(unsigned x) {
return __builtin_frame_address(0);
}
| Fix test (it was incorrectly succeeding). | Fix test (it was incorrectly succeeding).
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@51310 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | 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,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang |
4e1130b196ef44fa1d453c644996239638af325e | Frameworks/include/CGColorInternal.h | Frameworks/include/CGColorInternal.h | //******************************************************************************
//
// Copyright (c) Microsoft. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
//******************************************************************************
#pragma once
#include <CoreGraphics/CGColor.h>
struct __CGColorQuad {
CGFloat r;
CGFloat g;
CGFloat b;
CGFloat a;
bool operator==(const __CGColorQuad& other) const {
return (r == other.r) && (g == other.g) && (b == other.b) && (a == other.a);
}
void Clear() {
r = g = b = a = 0.0f;
}
void SetColorComponents(CGFloat red, CGFloat green, CGFloat blue, CGFloat alpha) {
r = red;
g = green;
b = blue;
a = alpha;
}
};
| Implement internal representation of Color. This will help represent the component values of colors with respect to their colorspace | Implement internal representation of Color.
This will help represent the component values of colors with respect to their colorspace
| C | mit | nathpete-msft/WinObjC,nathpete-msft/WinObjC,nathpete-msft/WinObjC,nathpete-msft/WinObjC,nathpete-msft/WinObjC |
|
7fcd3e596fbeabc0c6388c9f457b267adbb664a5 | OctoKit/OCTClient+Issues.h | OctoKit/OCTClient+Issues.h | //
// OCTClient+Issues.h
// OctoKit
//
// Created by leichunfeng on 15/3/7.
// Copyright (c) 2015年 GitHub. All rights reserved.
//
#import <OctoKit/OctoKit.h>
@interface OCTClient (Issues)
// Creates an issue.
//
// title - The title of the issue. This must not be nil.
// body - The contents of the issue. This can be nil.
// assignee - Login for the user that this issue should be assigned to. NOTE:
// Only users with push access can set the assignee for new issues.
// The assignee is silently dropped otherwise. This can be nil.
// milestone - Milestone to associate this issue with. NOTE: Only users with
// push access can set the milestone for new issues. The milestone
// is silently dropped otherwise. This can be nil.
// labels - Labels to associate with this issue. NOTE: Only users with push
// access can set labels for new issues. Labels are silently dropped
// otherwise. This can be nil.
// repository - The repository in which to create the issue. This must not be nil.
//
// Returns a signal which will send the created `OCTIssue` then complete, or error.
- (RACSignal *)createIssueWithTitle:(NSString *)title body:(NSString *)body assignee:(NSString *)assignee milestone:(NSUInteger)milestone labels:(NSArray *)labels inRepository:(OCTRepository *)repository;
@end
| //
// OCTClient+Issues.h
// OctoKit
//
// Created by leichunfeng on 15/3/7.
// Copyright (c) 2015年 GitHub. All rights reserved.
//
#import <OctoKit/OctoKit.h>
@interface OCTClient (Issues)
/// Creates an issue.
///
/// title - The title of the issue. This must not be nil.
/// body - The contents of the issue. This can be nil.
/// assignee - Login for the user that this issue should be assigned to. NOTE:
/// Only users with push access can set the assignee for new issues.
// The assignee is silently dropped otherwise. This can be nil.
/// milestone - Milestone to associate this issue with. NOTE: Only users with
/// push access can set the milestone for new issues. The milestone
/// is silently dropped otherwise. This can be nil.
/// labels - Labels to associate with this issue. NOTE: Only users with push
/// access can set labels for new issues. Labels are silently dropped
/// otherwise. This can be nil.
/// repository - The repository in which to create the issue. This must not be nil.
///
/// Returns a signal which will send the created `OCTIssue` then complete, or error.
- (RACSignal *)createIssueWithTitle:(NSString *)title body:(NSString *)body assignee:(NSString *)assignee milestone:(NSUInteger)milestone labels:(NSArray *)labels inRepository:(OCTRepository *)repository;
@end
| Use triple /s replace double /s. | Use triple /s replace double /s.
| C | mit | Acidburn0zzz/octokit.objc,xantage/octokit.objc,phatblat/octokit.objc,cnbin/octokit.objc,daemonchen/octokit.objc,daemonchen/octokit.objc,CHNLiPeng/octokit.objc,leichunfeng/octokit.objc,xantage/octokit.objc,wrcj12138aaa/octokit.objc,wrcj12138aaa/octokit.objc,daukantas/octokit.objc,leichunfeng/octokit.objc,GroundControl-Solutions/octokit.objc,Palleas/octokit.objc,Palleas/octokit.objc,Acidburn0zzz/octokit.objc,jonesgithub/octokit.objc,phatblat/octokit.objc,GroundControl-Solutions/octokit.objc,daukantas/octokit.objc,cnbin/octokit.objc,CHNLiPeng/octokit.objc,jonesgithub/octokit.objc |
f14fc9d3af0a098ac8edf43fe494b546471cc029 | SSPSolution/SSPSolution/DoorEntity.h | SSPSolution/SSPSolution/DoorEntity.h | #ifndef SSPAPPLICATION_ENTITIES_DOORENTITY_H
#define SSPAPPLICATION_ENTITIES_DOORENTITY_H
#include "Entity.h"
class DoorEntity :
public Entity
{
private:
bool m_isOpened;
float m_minRotation;
float m_maxRotation;
float m_rotateTime;
float m_rotatePerSec;
public:
DoorEntity();
virtual ~DoorEntity();
int Initialize(int entityID, PhysicsComponent* pComp, GraphicsComponent* gComp, float minRotation, float maxRotation, float rotateTime);
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"
class DoorEntity :
public Entity
{
private:
bool m_isOpened;
float m_minRotation;
float m_maxRotation;
float m_rotateTime;
float m_rotatePerSec;
public:
DoorEntity();
virtual ~DoorEntity();
int Initialize(int entityID, PhysicsComponent* pComp, GraphicsComponent* gComp, float minRotation = 0.0f, float maxRotation = DirectX::XM_PI / 2, float rotateTime = 1.0f);
int Update(float dT, InputHandler* inputHandler);
int React(int entityID, EVENT reactEvent);
bool SetIsOpened(bool isOpened);
bool GetIsOpened();
};
#endif | UPDATE Door.h initialize standard values | UPDATE Door.h initialize standard values
| C | apache-2.0 | Chringo/SSP,Chringo/SSP |
168e25b70e76547af44c3d71f71215abbcafb686 | libcwap.h | libcwap.h | #ifndef LIBCWAP_H
#define LIBCWAP_H
#include <stddef.h>
#include <inttypes.h>
typedef uint32_t time_t;
typedef size_t (*read_function_t)(char *, size_t);
#define CWAP_TIME_REQUEST '\t'
#define CWAP_TIME_SET 'T'
#define CWAP_SET_ALARM_TIMESTAMP 'O'
struct libcwap_functions {
void (*time_request_function)(void);
void (*time_set_function)(time_t);
void (*alarm_set_timestamp)(uint8_t, time_t);
// etc.
};
void libcwap_action(size_t (*)(char *, size_t));
void libcwap_register(struct libcwap_functions *);
#endif
| #ifndef LIBCWAP_H
#define LIBCWAP_H
#include <stddef.h>
#include <inttypes.h>
typedef uint32_t time_t;
typedef size_t (*read_function_t)(char *, size_t);
#define CWAP_TIME_REQUEST '\t'
#define CWAP_TIME_SET 'T'
#define CWAP_SET_ALARM_TIMESTAMP 'O'
struct libcwap_functions {
void (*time_request_function)(void);
void (*time_set_function)(time_t);
void (*alarm_set_timestamp)(uint8_t, time_t);
// etc.
};
void libcwap_action(read_function_t);
void libcwap_register(struct libcwap_functions *);
#endif
| Use the typedef read_function_t for readability | Use the typedef read_function_t for readability
| C | mit | xim/tsoc,xim/tsoc,xim/tsoc,xim/tsoc |
fa91d9afb5167914873fa64a709d41671edd0e91 | libcwap.c | libcwap.c | #include <stdlib.h>
#include "libcwap.h"
struct libcwap_functions * registered_functions = NULL;
void libcwap_action(size_t (*read_function)(char *, size_t)) {
char action;
if (!read_function(&action, 1))
return;
// Remember to increase the buffer if we want to receive larger packets.
char data[4];
switch (action) {
case 'T':
if (!read_function(data, 4))
break;
if (registered_functions->time_set_function != NULL)
registered_functions->time_set_function(*(time_t *) data); // TODO verify these casts
break;
case 'O':
if (!read_function(data, 4))
break;
if (registered_functions->alarm_set_timestamp != NULL)
registered_functions->alarm_set_timestamp(*(time_t *) data);
break;
// etc.
default:
; // Assume the data was garbage.
}
}
void libcwap_register(struct libcwap_functions * funs) {
registered_functions = funs;
}
| #include <stdlib.h>
#include "libcwap.h"
struct libcwap_functions * registered_functions = NULL;
typedef union {
char chars[4];
uint32_t uinteger;
int32_t integer;
} data32_t;
void libcwap_action(size_t (*read_function)(char *, size_t)) {
char action;
if (!read_function(&action, 1))
return;
data32_t data32;
switch (action) {
case 'T':
if (!read_function(data32.chars, 4))
break;
if (registered_functions->time_set_function != NULL)
registered_functions->time_set_function(data32.uinteger); // TODO verify these casts
break;
case 'O':
if (!read_function(data32.chars, 4))
break;
if (registered_functions->alarm_set_timestamp != NULL)
registered_functions->alarm_set_timestamp(data32.uinteger);
break;
// etc.
default:
; // Assume the data was garbage.
}
}
void libcwap_register(struct libcwap_functions * funs) {
registered_functions = funs;
}
| Make a 32bit union for receiving data rather than shady casting | Make a 32bit union for receiving data rather than shady casting
| C | mit | xim/tsoc,xim/tsoc,xim/tsoc,xim/tsoc |
4610137c1c437300551b0e1b92936dc28789d662 | test/Profile/c-generate.c | test/Profile/c-generate.c | // Check that the -fprofile-instr-generate= form works.
// RUN: %clang_cc1 -main-file-name c-generate.c %s -o - -emit-llvm -fprofile-instr-generate=c-generate-test.profraw | FileCheck %s
// CHECK: private constant [24 x i8] c"c-generate-test.profraw\00"
// CHECK: call void @__llvm_profile_set_filename_env_override(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @0, i32 0, i32 0))
// CHECK: declare void @__llvm_profile_set_filename_env_override(i8*)
int main(void) {
return 0;
}
| // Check that the -fprofile-instr-generate= form works.
// RUN: %clang_cc1 -main-file-name c-generate.c %s -o - -emit-llvm -fprofile-instr-generate=c-generate-test.profraw | FileCheck %s
// CHECK: private constant [24 x i8] c"c-generate-test.profraw\00"
// CHECK: call void @__llvm_profile_override_default_filename(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @0, i32 0, i32 0))
// CHECK: declare void @__llvm_profile_override_default_filename(i8*)
int main(void) {
return 0;
}
| Update name of compiler-rt routine for setting filename | InstrProf: Update name of compiler-rt routine for setting filename
Patch by Teresa Johnson.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@237187 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang |
f1e5e9d9db6e8e467d994f6307452147d2becbca | bench/udb2/test-mlib.c | bench/udb2/test-mlib.c | #include "../common.c"
#include "m-dict.h"
static inline bool oor_equal_p(unsigned int k, unsigned char n)
{
return k == (unsigned int)n;
}
static inline void oor_set(unsigned int *k, unsigned char n)
{
*k = (unsigned int)n;
}
DICT_OA_DEF2(dict_oa_uint,
unsigned int, M_OPEXTEND(M_DEFAULT_OPLIST, OOR_EQUAL(oor_equal_p), OOR_SET(oor_set M_IPTR)),
unsigned int, M_DEFAULT_OPLIST)
void test_int(uint32_t n, uint32_t x0)
{
uint32_t i, x, z = 0;
dict_oa_uint_t h;
dict_oa_uint_init(h);
for (i = 0, x = x0; i < n; ++i) {
x = hash32(x);
unsigned int key = get_key(n, x);
unsigned int *ptr = dict_oa_uint_get(h, key);
if (ptr) { (*ptr)++; z+= *ptr; }
else { dict_oa_uint_set_at(h, key, 1); z+=1; }
}
fprintf(stderr, "# unique keys: %d; checksum: %u\n", (int) dict_oa_uint_size(h), z);
dict_oa_uint_clear(h);
}
| #include "../common.c"
#include "m-dict.h"
static inline bool oor_equal_p(unsigned int k, unsigned char n)
{
return k == (unsigned int)n;
}
static inline void oor_set(unsigned int *k, unsigned char n)
{
*k = (unsigned int)n;
}
DICT_OA_DEF2(dict_oa_uint,
unsigned int, M_OPEXTEND(M_DEFAULT_OPLIST, OOR_EQUAL(oor_equal_p), OOR_SET(oor_set M_IPTR)),
unsigned int, M_DEFAULT_OPLIST)
void test_int(uint32_t n, uint32_t x0)
{
uint32_t i, x, z = 0;
dict_oa_uint_t h;
dict_oa_uint_init(h);
for (i = 0, x = x0; i < n; ++i) {
x = hash32(x);
unsigned int key = get_key(n, x);
unsigned int *ptr = dict_oa_uint_get_at(h, key);
(*ptr)++;
z+= *ptr;
}
fprintf(stderr, "# unique keys: %d; checksum: %u\n", (int) dict_oa_uint_size(h), z);
dict_oa_uint_clear(h);
}
| Simplify code to use get_at method with its get & create semantic | Simplify code to use get_at method with its get & create semantic
| C | bsd-2-clause | P-p-H-d/mlib,P-p-H-d/mlib |
714295fdcc9c64721b9f7d4db6fae8f7bdaca55a | X10_Project/Classes/ColliderManager.h | X10_Project/Classes/ColliderManager.h | #pragma once
class StageInformation;
class Collider;
class Bullet;
class Sling;
class ColliderManager
{
public:
ColliderManager() {}
~ColliderManager() {}
void InitBullets(StageInformation* si);
void ResetBullets();
Bullet* GetBulletToShot(Sling* sling);
Vector<Collider*>& GetColliders(){ return colliders; }
bool HasBullet();
void AddExplosion(Collider* explosion);
void EraseCollider(Collider* collider);
private:
Vector<Collider*> colliders;
int curBulletIndex;
int defaultBulletNum;
}; | #pragma once
#include "Collider.h"
class StageInformation;
class Bullet;
class Sling;
class ColliderManager
{
public:
ColliderManager() {}
~ColliderManager() {}
void InitBullets(StageInformation* si);
void ResetBullets();
Bullet* GetBulletToShot(Sling* sling);
Vector<Collider*>& GetColliders(){ return colliders; }
bool HasBullet();
void AddExplosion(Collider* explosion);
void EraseCollider(Collider* collider);
private:
Vector<Collider*> colliders;
int curBulletIndex;
int defaultBulletNum;
}; | Fix file include bug (cocos Vector<T>) | Fix file include bug (cocos Vector<T>)
| C | mit | kimsin3003/X10,kimsin3003/X10,kimsin3003/X10,kimsin3003/X10,kimsin3003/X10 |
94db2b46f8108d0f5e6edc0d65ae20eee40414aa | MdePkg/Include/PiPei.h | MdePkg/Include/PiPei.h | /** @file
Root include file for Mde Package SEC, PEIM, PEI_CORE type modules.
This is the include file for any module of type PEIM. PEIM
modules only use types defined via this include file and can
be ported easily to any environment.
Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __PI_PEI_H__
#define __PI_PEI_H__
#include <Uefi/UefiBaseType.h>
#include <Pi/PiPeiCis.h>
#include <Uefi/UefiMultiPhase.h>
//
// BUGBUG: The EFI_PEI_STARTUP_DESCRIPTOR definition does not follows PI specification.
// After enabling PI for Nt32Pkg and tools generate correct autogen for PEI_CORE,
// the following structure should be removed at once.
//
typedef struct {
UINTN BootFirmwareVolume;
UINTN SizeOfCacheAsRam;
EFI_PEI_PPI_DESCRIPTOR *DispatchTable;
} EFI_PEI_STARTUP_DESCRIPTOR;
#endif
| /** @file
Root include file for Mde Package SEC, PEIM, PEI_CORE type modules.
This is the include file for any module of type PEIM. PEIM
modules only use types defined via this include file and can
be ported easily to any environment.
Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __PI_PEI_H__
#define __PI_PEI_H__
#include <Uefi/UefiBaseType.h>
#include <Pi/PiPeiCis.h>
#include <Uefi/UefiMultiPhase.h>
#endif
| Move the EFI_PEI_STARTUP_DESCRIPTOR into IntelFrameworkPkg. | Move the EFI_PEI_STARTUP_DESCRIPTOR into IntelFrameworkPkg.
git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@4120 6f19259b-4bc3-4df7-8a09-765794883524
| C | bsd-2-clause | MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2 |
9b04b3ca1184556181562ce79e23cf3dfb572396 | includes/libft_trm.h | includes/libft_trm.h | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* libft_trm.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ncoden <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/05/08 09:57:42 by ncoden #+# #+# */
/* Updated: 2015/05/11 18:53:58 by ncoden ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LIBFT_TRM_H
# define LIBFT_TRM_H
# include <term.h>
# include <termios.h>
# include <curses.h>
# include <sys/ioctl.h>
# include <signal.h>
typedef struct s_trm
{
struct termios *opts;
t_ilst_evnt *on_key;
t_evnt *on_resize;
} t_trm;
struct termios *ft_trmget();
t_bool ft_trmset(struct termios *trm);
#endif
| /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* libft_trm.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ncoden <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/05/08 09:57:42 by ncoden #+# #+# */
/* Updated: 2015/05/12 00:42:36 by ncoden ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LIBFT_TRM_H
# define LIBFT_TRM_H
# include <term.h>
# include <termios.h>
# include <curses.h>
# include <sys/ioctl.h>
# include <signal.h>
typedef struct s_trm
{
struct termios *opts;
t_ilst_evnt *on_key_press;
t_evnt *on_resize;
} t_trm;
struct termios *ft_trmget();
t_bool ft_trmset(struct termios *trm);
#endif
| Change on_key term event to on_key_press | Change on_key term event to on_key_press
| C | apache-2.0 | ncoden/libft |
9f2e996500ef58f5ddadfab9ec7e882b9a201933 | include/groonga.h | include/groonga.h | /*
Copyright(C) 2014 Brazil
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef GROONGA_H
#define GROONGA_H
#include <groonga/groonga.h>
#include <groonga/ii.h>
#include <groonga/expr.h>
#include <groonga/util.h>
#endif /* GROONGA_H */
| /*
Copyright(C) 2014 Brazil
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef GROONGA_H
#define GROONGA_H
#include "groonga/groonga.h"
#include "groonga/ii.h"
#include "groonga/expr.h"
#include "groonga/util.h"
#endif /* GROONGA_H */
| Use "..." for ensure including header files in sub directory | Use "..." for ensure including header files in sub directory
| C | lgpl-2.1 | kenhys/groonga,naoa/groonga,hiroyuki-sato/groonga,groonga/groonga,hiroyuki-sato/groonga,hiroyuki-sato/groonga,hiroyuki-sato/groonga,kenhys/groonga,redfigure/groonga,naoa/groonga,redfigure/groonga,kenhys/groonga,komainu8/groonga,hiroyuki-sato/groonga,cosmo0920/groonga,cosmo0920/groonga,redfigure/groonga,naoa/groonga,naoa/groonga,komainu8/groonga,naoa/groonga,komainu8/groonga,naoa/groonga,redfigure/groonga,groonga/groonga,cosmo0920/groonga,groonga/groonga,komainu8/groonga,komainu8/groonga,groonga/groonga,komainu8/groonga,groonga/groonga,kenhys/groonga,cosmo0920/groonga,kenhys/groonga,groonga/groonga,redfigure/groonga,cosmo0920/groonga,cosmo0920/groonga,redfigure/groonga,komainu8/groonga,cosmo0920/groonga,hiroyuki-sato/groonga,kenhys/groonga,groonga/groonga,kenhys/groonga,naoa/groonga,kenhys/groonga,cosmo0920/groonga,redfigure/groonga,redfigure/groonga,groonga/groonga,hiroyuki-sato/groonga,hiroyuki-sato/groonga,naoa/groonga,komainu8/groonga |
3cc87c2958215f031643358719b4fd858eae596a | include/arch/x86/memlayout.h | include/arch/x86/memlayout.h | #ifndef MEMLAYOUT_H
#define MEMLAYOUT_H
#include <stdint.h>
#define KERNEL_START ((uint32_t)&kernel_start)
#define KERNEL_END ((uint32_t)&kernel_end)
#define KERNEL_SIZE (KERNEL_START - KERNEL_END)
#define VIDEO_MEMORY_BEGIN 0xB8000
#define VIDEO_MEMORY_SIZE (80 * 24)
#define VIRTUAL_TO_PHYSICAL(addr) ((uint32_t)(addr) - KERNEL_START)
#define PHYSICAL_TO_VIRTUAL(addr) ((void *)(addr) + KERNEL_START)
#endif
| #ifndef MEMLAYOUT_H
#define MEMLAYOUT_H
#include <stdint.h>
// These two variables are defined by the linker. They are located where you
// would expect based on the names.
extern uint32_t kernel_start;
extern uint32_t kernel_end;
#define KERNEL_END ((uint32_t)&kernel_end)
#define KERNEL_START ((uint32_t)&kernel_start)
#define KERNEL_END ((uint32_t)&kernel_end)
#define KERNEL_SIZE (KERNEL_START - KERNEL_END)
// Paging related
#define PAGE_ALIGN(x) (((uintptr_t)(x)) & ~0xfff)
#define NEXT_PAGE(x) (((uintptr_t)(x)+PAGE_SIZE) & ~0xfff)
#define PAGE_DIRECTORY NEXT_PAGE(KERNEL_END)
// Heap related
#define KHEAP_PHYS_ROOT ((void*)0x100000)
#define KHEAP_PHYS_END ((void*)NEXT_PAGE(KHEAP_PHYS_ROOT))
// Video memory related
#define VIDEO_MEMORY_BEGIN 0xB8000
#define VIDEO_MEMORY_SIZE (80 * 24)
#endif
| Reorganize macros related to memory layout | Reorganize macros related to memory layout
| C | mit | iankronquist/kernel-of-truth,awensaunders/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,awensaunders/kernel-of-truth,Herbstein/kernel-of-truth,awensaunders/kernel-of-truth,Herbstein/kernel-of-truth,iankronquist/kernel-of-truth,Herbstein/kernel-of-truth |
257d42ef1d4c7bcc8b9fed75c86bd7df2d8f6eb3 | organ.c | organ.c | #ifndef F_CPU
#define F_CPU F_OSC
#endif
#include <avr/io.h>
#include <avr/interrupt.h>
#include <ctype.h>
#include <math.h>
#include <stdint.h>
#include <util/delay.h>
#include "config.h"
#include "nco.h"
#include "uart.h"
static void handle_midi(void);
int main(void);
__attribute__((optimize("unroll-loops")))
static void handle_midi(void) {
uint8_t command;
uint8_t channel;
do {
command = rx();
} while(!(command&0x80));
channel = command & 0x0F;
command = (command >> 4) - 8;
uint8_t p1, p2;
if(channel != 0) {
return;
}
switch(command) {
case 0:
p1 = rx();
p2 = rx();
stop_tone(p1, p2);
break;
case 1:
p1 = rx();
p2 = rx();
start_tone(p1, p2);
break;
default:
break;
}
}
int main(void) {
uart_init(38400);
nco_init();
sei();
uint8_t i = 0;
while(1) {
handle_midi();
}
return 0;
}
| #ifndef F_CPU
#define F_CPU F_OSC
#endif
#include <avr/io.h>
#include <avr/interrupt.h>
#include <ctype.h>
#include <math.h>
#include <stdint.h>
#include <util/delay.h>
#include "config.h"
#include "nco.h"
#include "uart.h"
static void handle_midi(void);
int main(void);
__attribute__((optimize("unroll-loops")))
static void handle_midi(void) {
uint8_t command;
uint8_t channel;
do {
command = rx();
} while(!(command&0x80));
channel = command & 0x0F;
command = (command >> 4) - 8;
uint8_t p1, p2;
if(channel != 0) {
return;
}
switch(command) {
case 0:
case 1:
p1 = rx();
p2 = rx();
if(p2 != 0 && command != 0) {
start_tone(p1, p2);
} else {
stop_tone(p1, p2);
}
break;
default:
break;
}
}
int main(void) {
uart_init(38400);
nco_init();
sei();
uint8_t i = 0;
while(1) {
handle_midi();
}
return 0;
}
| Use stop_tone() if velocity set to 0 | Use stop_tone() if velocity set to 0
| C | mit | Cat-Ion/atmega328-midi-synthesizer |
010006bafda486f36725e6b3e0b460faf30c5d7d | libraries/datastruct/hash/walk.c | libraries/datastruct/hash/walk.c | /* --------------------------------------------------------------------------
* Name: walk.c
* Purpose: Associative array implemented as a hash
* ----------------------------------------------------------------------- */
#include <stdlib.h>
#include "base/memento/memento.h"
#include "base/errors.h"
#include "datastruct/hash.h"
#include "impl.h"
error hash_walk(const hash_t *h, hash_walk_callback *cb, void *cbarg)
{
int i;
for (i = 0; i < h->nbins; i++)
{
hash__node_t *n;
hash__node_t *next;
for (n = h->bins[i]; n != NULL; n = next)
{
int r;
next = n->next;
r = cb(&n->item, cbarg);
if (r < 0)
return r;
}
}
return error_OK;
}
| /* --------------------------------------------------------------------------
* Name: walk.c
* Purpose: Associative array implemented as a hash
* ----------------------------------------------------------------------- */
#include <stdlib.h>
#include "base/memento/memento.h"
#include "base/errors.h"
#include "datastruct/hash.h"
#include "impl.h"
error hash_walk(const hash_t *h, hash_walk_callback *cb, void *cbarg)
{
int i;
for (i = 0; i < h->nbins; i++)
{
hash__node_t *n;
hash__node_t *next;
for (n = h->bins[i]; n != NULL; n = next)
{
error r;
next = n->next;
r = cb(&n->item, cbarg);
if (r < 0)
return r;
}
}
return error_OK;
}
| Fix itype int -> error. | Fix itype int -> error.
| C | bsd-2-clause | dpt/Containers,dpt/Containers |
dd600db758c36b02ec97372867ee27cb2ef2b0f6 | trunk/include/SimTKcommon/internal/Array.h | trunk/include/SimTKcommon/internal/Array.h | #ifndef SimTK_SimTKCOMMON_ARRAY_H_
#define SimTK_SimTKCOMMON_ARRAY_H_
/* -------------------------------------------------------------------------- *
* SimTK Core: SimTKcommon *
* -------------------------------------------------------------------------- *
* This is part of the SimTK Core biosimulation toolkit originating from *
* Simbios, the NIH National Center for Physics-Based Simulation of *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2010 Stanford University and the Authors. *
* Authors: Michael Sherman *
* Contributors: *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the "Software"), *
* to deal in the Software without restriction, including without limitation *
* the rights to use, copy, modify, merge, publish, distribute, sublicense, *
* and/or sell copies of the Software, and to permit persons to whom the *
* Software is furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *
* THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
#include "SimTKcommon/internal/common.h"
namespace SimTK {
/**
* Array_<T> is like std::vector<T> but better ...
*/
} // namespace SimTK
#endif // SimTK_SimTKCOMMON_ARRAY_H_
| Add new header (nothing in it yet). | Add new header (nothing in it yet).
| C | apache-2.0 | elkingtonmcb/simbody,robojukie/simbody,chrisdembia/simbody,elen4/simbody,elen4/simbody,robojukie/simbody,simbody/simbody,Gjacquenot/simbody,chrisdembia/simbody,scamille/simbody,Gjacquenot/simbody,scamille/simbody,Gjacquenot/simbody,scamille/simbody,chrisdembia/simbody,simbody/simbody,elkingtonmcb/simbody,robojukie/simbody,elkingtonmcb/simbody |
|
0aeec8d488541f58a74a189972049937e92ea364 | tests/regression/02-base/90-memcpy.c | tests/regression/02-base/90-memcpy.c |
// Test case taken from sqlite3.c
#include <string.h>
typedef unsigned long u64;
# define EXP754 (((u64)0x7ff)<<52)
# define MAN754 ((((u64)1)<<52)-1)
# define IsNaN(X) (((X)&EXP754)==EXP754 && ((X)&MAN754)!=0)
static int sqlite3IsNaN(double x){
int rc; /* The value return */
u64 y;
memcpy(&y,&x,sizeof(y)); // Goblint used to crash here
rc = IsNaN(y);
return rc;
}
int foo(){
int x = 23;
int y;
memcpy(&y, &x, sizeof(int));
__goblint_check(y == 23);
return 0;
}
int main(){
sqlite3IsNaN(23.0);
foo();
return 0;
}
|
// Test case taken from sqlite3.c
#include <string.h>
typedef unsigned long u64;
# define EXP754 (((u64)0x7ff)<<52)
# define MAN754 ((((u64)1)<<52)-1)
# define IsNaN(X) (((X)&EXP754)==EXP754 && ((X)&MAN754)!=0)
static int sqlite3IsNaN(double x){
int rc; /* The value return */
u64 y;
memcpy(&y,&x,sizeof(y)); // Goblint used to crash here
rc = IsNaN(y);
return rc;
}
int foo(){
int x = 23;
int y;
memcpy(&y, &x, sizeof(int));
__goblint_check(y == 23);
return 0;
}
int bar(){
int arr[10];
double y;
for(int i = 0; i < 10; i++){
arr[i] = 0;
}
__goblint_check(arr[0] == 0);
__goblint_check(arr[3] == 0);
memcpy(&arr, &y, sizeof(double));
__goblint_check(arr[0] == 0); //UNKNOWN!
__goblint_check(arr[3] == 0); //UNKNOWN
return 0;
}
int main(){
sqlite3IsNaN(23.0);
foo();
bar();
return 0;
}
| Add test case checking that memcpy into an array invalidates it. | Add test case checking that memcpy into an array invalidates it.
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
642d8cd7b9669111aea0c22ec09530fab383593f | lepton/renderer.h | lepton/renderer.h | /****************************************************************************
*
* Copyright (c) 2008 by Casey Duncan and contributors
* All Rights Reserved.
*
* This software is subject to the provisions of the MIT License
* A copy of the license should accompany this distribution.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
*
****************************************************************************/
/* Renderer shared code
*
* $Id$
*/
#ifndef _RENDERER_H_
#define _RENDERER_H_
typedef struct {
PyObject_HEAD
Py_ssize_t size;
float *data;
} FloatArrayObject;
/* Return true if o is a bon-a-fide FloatArrayObject */
int FloatArrayObject_Check(FloatArrayObject *o);
FloatArrayObject *
FloatArray_new(Py_ssize_t size);
FloatArrayObject *
generate_default_2D_tex_coords(GroupObject *pgroup);
/* Initialize the glew OpenGL extension manager
If glew has already been initialized, do nothing */
int
glew_initialize(void);
#endif
| /****************************************************************************
*
* Copyright (c) 2008 by Casey Duncan and contributors
* All Rights Reserved.
*
* This software is subject to the provisions of the MIT License
* A copy of the license should accompany this distribution.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
*
****************************************************************************/
/* Renderer shared code
*
* $Id$
*/
#ifndef _RENDERER_H_
#define _RENDERER_H_
typedef struct {
PyObject_HEAD
Py_ssize_t size;
float *data;
} FloatArrayObject;
/* Return true if o is a bon-a-fide FloatArrayObject */
int FloatArrayObject_Check(FloatArrayObject *o);
FloatArrayObject *
FloatArray_new(Py_ssize_t size);
FloatArrayObject *
generate_default_2D_tex_coords(GroupObject *pgroup);
/* Initialize the glew OpenGL extension manager
If glew has already been initialized, do nothing */
int
glew_initialize(void);
#endif
// Windows lacks fminf
#ifndef fminf
#define fminf(x, y) (((x) < (y)) ? (x) : (y))
#endif
| Define fminf for platforms that lack it | Define fminf for platforms that lack it
| C | mit | pombreda/py-lepton,caseman/py-lepton,caseman/py-lepton,pombreda/py-lepton |
813af68babfff1c261f491f463b04d5cce28282d | include/ROBASTInit.h | include/ROBASTInit.h | #include "stdio.h"
__attribute__((constructor)) static void PrintReference() {
printf(" ----------------------------------------------------------------------------\n"
"| Welcome to ROBAST https://robast.github.io/ |\n"
"| |\n"
"| Please cite the following paper when you publish your ROBAST simulation. |\n"
"| |\n"
"| Akira Okumura, Koji Noda, Cameron Rulten (2016) |\n"
"| \"ROBAST: Development of a ROOT-Based Ray-Tracing Library for Cosmic-Ray |\n"
"| Telescopes and its Applications in the Cherenkov Telescope Array\" |\n"
"| Astroparticle Physics 76 38-47 |\n"
"| |\n"
"| For support & FAQ, please visit https://robast.github.io/support.html |\n"
"| |\n"
"| ROBAST is developed by Akira Okumura ([email protected]) |\n"
" ----------------------------------------------------------------------------\n");
}
| #include "stdio.h"
__attribute__((constructor)) static void PrintReference() {
printf(" ----------------------------------------------------------------------------\n"
"| Welcome to ROBAST https://robast.github.io/ |\n"
"| |\n"
"| Please cite the following paper when you publish your ROBAST simulation. |\n"
"| |\n"
"| Akira Okumura, Koji Noda, Cameron Rulten (2016) |\n"
"| \"ROBAST: Development of a ROOT-Based Ray-Tracing Library for Cosmic-Ray |\n"
"| Telescopes and its Applications in the Cherenkov Telescope Array\" |\n"
"| \e[3mAstroparticle Physics\e[0m \e[1m76\e[0m 38-47 |\n"
"| |\n"
"| For support & FAQ, please visit https://robast.github.io/support.html |\n"
"| |\n"
"| ROBAST is developed by Akira Okumura ([email protected]) |\n"
" ----------------------------------------------------------------------------\n");
}
| Add escape sequences to make characters italic or bold | Add escape sequences to make characters italic or bold
| C | lgpl-2.1 | ROBAST/ROBAST,ROBAST/ROBAST,ROBAST/ROBAST,ROBAST/ROBAST,ROBAST/ROBAST |
3cf2e242408d0a8a6058f14ab0f6ca9227269049 | libvirt-gconfig/libvirt-gconfig-domain-chardev-source-private.h | libvirt-gconfig/libvirt-gconfig-domain-chardev-source-private.h | /*
* libvirt-gconfig-domain-chardev-source-private.h: libvirt domain chardev configuration
*
* Copyright (C) 2013 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*
* Author: Daniel P. Berrange <[email protected]>
*/
#ifndef __LIBVIRT_GCONFIG_DOMAIN_CHARDEV_SOURCE_PRIVATE_H__
#define __LIBVIRT_GCONFIG_DOMAIN_CHARDEV_SOURCE_PRIVATE_H__
#include <libvirt-gconfig/libvirt-gconfig-xml-doc.h>
G_BEGIN_DECLS
GVirConfigDomainChardevSource *
gvir_config_domain_chardev_source_new_from_tree(GVirConfigXmlDoc *doc,
xmlNodePtr tree);
GVirConfigDomainChardevSource *
gvir_config_domain_chardev_source_pty_new_from_tree(GVirConfigXmlDoc *doc,
xmlNodePtr tree);
G_END_DECLS
#endif /* __LIBVIRT_GCONFIG_DOMAIN_CHARDEV_SOURCE_PRIVATE_H__ */
| Add missing file from previous commit | Add missing file from previous commit
The commit 35a310c62a8bf704aceb3a5b3ecce36c11525914 forgot
to add libvirt-gconfig/libvirt-gconfig-domain-chardev-source-private.h
Signed-off-by: Daniel P. Berrange <[email protected]>
| C | lgpl-2.1 | libvirt/libvirt-glib,libvirt/libvirt-glib,libvirt/libvirt-glib |
|
00f243db13be5124a76d09f6c15ae7ef41de0a94 | include/inicpp/dll.h | include/inicpp/dll.h | #ifndef INICPP_DLL_H
#define INICPP_DLL_H
#ifdef INICPP_DLL
#ifdef INICPP_EXPORT
#define INICPP_API __declspec(dllexport)
#else
#define INICPP_API __declspec(dllimport)
#endif
#else
#define INICPP_API
#endif
// Disable unwanted and not necessary MSVC++ warnings
#pragma warning(disable:4800)
#pragma warning(disable:4251)
#endif // INICPP_DLL_H
| #ifndef INICPP_DLL_H
#define INICPP_DLL_H
#ifdef INICPP_DLL
#ifdef INICPP_EXPORT
#define INICPP_API __declspec(dllexport)
#else
#define INICPP_API __declspec(dllimport)
#endif
#else
#define INICPP_API
#endif
// Disable unwanted and not necessary MSVC++ warnings
#ifdef _MSC_VER
#pragma warning(disable:4800)
#pragma warning(disable:4251)
#endif
#endif // INICPP_DLL_H
| Enable disabling warnings using pragmas only on MSVC++ | Enable disabling warnings using pragmas only on MSVC++
| C | mit | SemaiCZE/inicpp,SemaiCZE/inicpp |
f56aea747c00f3f9275189a33a8f81e9135b1469 | texor.c | texor.c | #include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disableRawMode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enableRawMode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disableRawMode);
struct termios raw = orig_termios;
raw.c_lflag &= ~(ECHO);
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}
int main() {
enableRawMode();
char c;
while (read(STDIN_FILENO, &c, 1) == 1 && c!= 'q');
return 0;
}
| #include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disableRawMode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enableRawMode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disableRawMode);
struct termios raw = orig_termios;
raw.c_lflag &= ~(ECHO | ICANON);
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}
int main() {
enableRawMode();
char c;
while (read(STDIN_FILENO, &c, 1) == 1 && c!= 'q');
return 0;
}
| Disable canonical mode in terminal | Disable canonical mode in terminal
| C | bsd-2-clause | kyletolle/texor |
933d247dcf74b77442a9780fb885e59b60972439 | include/ipv4.h | include/ipv4.h | #ifndef IPV4_H
#define IPV4_H
#include "syshead.h"
#include "netdev.h"
#define IPV4 0x04
#define ICMPV4 0x01
struct iphdr {
uint8_t ihl : 4; /* TODO: Support Big Endian hosts */
uint8_t version : 4;
uint8_t tos;
uint16_t len;
uint16_t id;
uint16_t flags : 3;
uint16_t frag_offset : 13;
uint8_t ttl;
uint8_t proto;
uint16_t csum;
uint32_t saddr;
uint32_t daddr;
} __attribute__((packed));
void ipv4_incoming(struct netdev *netdev, struct eth_hdr *hdr);
#endif
| #ifndef IPV4_H
#define IPV4_H
#include "syshead.h"
#include "netdev.h"
#define IPV4 0x04
#define ICMPV4 0x01
struct iphdr {
uint8_t ihl : 4; /* TODO: Support Big Endian hosts */
uint8_t version : 4;
uint8_t tos;
uint16_t len;
uint16_t id;
uint16_t flags : 3;
uint16_t frag_offset : 13;
uint8_t ttl;
uint8_t proto;
uint16_t csum;
uint32_t saddr;
uint32_t daddr;
uint8_t data[];
} __attribute__((packed));
void ipv4_incoming(struct netdev *netdev, struct eth_hdr *hdr);
#endif
| Add payload field to IPv4 header | Add payload field to IPv4 header
| C | mit | saminiir/level-ip,saminiir/level-ip |
a919944372d887ec6ea094621c4f0d4dc6dbf36a | app/src/unix/command.c | app/src/unix/command.c | #include "../command.h"
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
pid_t cmd_execute(const char *path, const char *const argv[]) {
pid_t pid = fork();
if (pid == -1) {
perror("fork");
return -1;
}
if (pid == 0) {
execvp(path, (char *const *)argv);
perror("exec");
exit(1);
}
return pid;
}
SDL_bool cmd_terminate(pid_t pid) {
return kill(pid, SIGTERM) != -1;
}
SDL_bool cmd_simple_wait(pid_t pid, int *exit_code) {
int status;
int code;
if (waitpid(pid, &status, 0) == -1 || !WIFEXITED(status)) {
// cannot wait, or exited unexpectedly, probably by a signal
code = -1;
} else {
code = WEXITSTATUS(status);
}
if (exit_code) {
*exit_code = code;
}
return !code;
}
| #include "../command.h"
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
pid_t cmd_execute(const char *path, const char *const argv[]) {
pid_t pid = fork();
if (pid == -1) {
perror("fork");
return -1;
}
if (pid == 0) {
execvp(path, (char *const *)argv);
perror("exec");
_exit(1);
}
return pid;
}
SDL_bool cmd_terminate(pid_t pid) {
return kill(pid, SIGTERM) != -1;
}
SDL_bool cmd_simple_wait(pid_t pid, int *exit_code) {
int status;
int code;
if (waitpid(pid, &status, 0) == -1 || !WIFEXITED(status)) {
// cannot wait, or exited unexpectedly, probably by a signal
code = -1;
} else {
code = WEXITSTATUS(status);
}
if (exit_code) {
*exit_code = code;
}
return !code;
}
| Use _exit() instead of exit() in child process | Use _exit() instead of exit() in child process
exit() should not be called from within a child process, since it would
call functions registered with atexit(), and flush stdio streams. Use
_exit() instead.
| C | apache-2.0 | Genymobile/scrcpy,Genymobile/scrcpy,Genymobile/scrcpy |
c25e3541c6cfc06393af108902fa4c3f768d00b2 | src/main.c | src/main.c | #include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <unistd.h>
#include "bmp.h"
#define SIGNATURE_LENGTH 2
const char usage[] = "Usage: %s <filenname>\n";
int main(int argc, char *argv[])
{
if (argc != 2) {
printf(usage, argv[0]);
return 1;
}
int fd = open(argv[1], O_RDONLY);
char buf[SIGNATURE_LENGTH];
ssize_t bytes = read(fd, buf, SIGNATURE_LENGTH);
if (bytes == -1) {
perror("error reading file");
return 1;
}
lseek(fd, 0, SEEK_SET);
switch (buf[0] << 8 | buf[1]) {
case BMP_SIGNATURE:
return print_bmp(fd);
default:
puts("Error: unrecognized file format");
return 1;
}
}
| #include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <unistd.h>
#include "bmp.h"
#define SIGNATURE_LENGTH 2
const char usage[] = "Usage: %s <filenname>\n";
int main(int argc, char *argv[])
{
if (argc != 2) {
printf(usage, argv[0]);
return 1;
}
int fd = open(argv[1], O_RDONLY);
if (fd == -1) {
perror("error opening file");
return 1;
}
char buf[SIGNATURE_LENGTH];
ssize_t bytes = read(fd, buf, SIGNATURE_LENGTH);
if (bytes == -1) {
perror("error reading file");
return 1;
}
lseek(fd, 0, SEEK_SET);
switch (buf[0] << 8 | buf[1]) {
case BMP_SIGNATURE:
return print_bmp(fd);
default:
puts("Error: unrecognized file format");
return 1;
}
}
| Check for error when calling open() | Check for error when calling open()
| C | mit | orodley/imgprint |
daf3a9e2f0ecaca59542decfacacca851264b92f | xmas3.c | xmas3.c | #include <stdlib.h>
#include <stdio.h>
int main(int argc, char*argv[])
{
int length = 8;
for (int i = 0;i<length;i++)
{
for (int j = 0;j<=i;j++)
{
printf("*");
}
printf("\n");
}
return 0;
}
| /*Build: gcc -std=c99 -o xmas3 xmas3.c*/
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char*argv[])
{
if (argc != 2)
{
printf("USAGE: %s [length]\n", argv[0]);
exit(-1);
}
int length = atoi(argv[1]);
for (int i = 0;i<length;i++)
{
for (int j = 0;j<=i;j++)
{
printf("*");
}
printf("\n");
}
return 0;
}
| Add length as a parameter in command line. | Add length as a parameter in command line.
| C | mit | svagionitis/xmas-tree |
9be8dcd2584b09ed00978daadb5ec6b597349b0d | cc2/optm.c | cc2/optm.c |
#include "arch.h"
#include "cc2.h"
Node *
optm(Node *np)
{
Node *dst;
switch (np->op) {
case OJMP:
case OBRANCH:
dst = np->u.sym->u.stmt;
if (dst->op == OJMP)
np->u.sym = dst->u.sym;
break;
}
return np;
}
|
#include <stddef.h>
#include "arch.h"
#include "cc2.h"
Node *
optm(Node *np)
{
Node *p, *dst, *next = np->next;
Symbol *sym, *osym;
switch (np->op) {
case ONOP:
if (next && next->op == ONOP) {
sym = np->u.sym;
osym = next->u.sym;
osym->id = sym->id;
osym->numid = sym->id;
osym->u.stmt = sym->u.stmt;
return NULL;
}
break;
case OJMP:
case OBRANCH:
for (;;) {
dst = np->u.sym->u.stmt;
if (dst->op != OJMP)
break;
np->u.sym = dst->u.sym;
}
for (p = np->next; p; p = p->next) {
if (p == dst)
return NULL;
if (p->op == ONOP ||
p->op == OBLOOP ||
p->op == OELOOP) {
continue;
}
break;
}
break;
}
return np;
}
| Add general tree optimizations for jumps and labels | [cc2] Add general tree optimizations for jumps and labels
These commit adds:
- Remove consecutive labels
- Jump to jump
- Jump to next instruction
| C | isc | k0gaMSX/scc,k0gaMSX/scc,k0gaMSX/scc |
6d4e56790c4d798a66a7dd06fe381f0a2fdb6ae9 | examples/specific/functionOverload.h | examples/specific/functionOverload.h |
//! Function which takes two int arguments
void f(int, int);
//! Function which takes two double arguments
void f(double, double);
namespace test {
//! Another function which takes two int arguments
void g(int, int);
//! Another function which takes two double arguments
void g(double, double);
}
class MyType {};
class MyOtherType {};
//! Another function which takes a custom type
void h(std::string, MyType);
//! Another function which takes another custom type
void h(std::string, MyOtherType);
//! Another function which takes a basic type
void h(std::string, int);
|
//! Non overloaded function
void simplefunc();
//! Function which takes two int arguments
void f(int, int);
//! Function which takes two double arguments
void f(double, double);
namespace test {
//! Another function which takes two int arguments
void g(int, int);
//! Another function which takes two double arguments
void g(double, double);
}
class MyType {};
class MyOtherType {};
//! Another function which takes a custom type
void h(std::string, MyType);
//! Another function which takes another custom type
void h(std::string, MyOtherType);
//! Another function which takes a basic type
void h(std::string, int);
| Add simple function to test domain cpp:func | Add simple function to test domain cpp:func
Probably others in the examples but this does no harm and was useful for
testing.
| C | bsd-3-clause | kirbyfan64/breathe,RR2DO2/breathe,kirbyfan64/breathe,AnthonyTruchet/breathe,RR2DO2/breathe,kirbyfan64/breathe,AnthonyTruchet/breathe,AnthonyTruchet/breathe,kirbyfan64/breathe,AnthonyTruchet/breathe |
c1a763c34ed4726c08a37fd2125e00d2a5a75b6f | nix-test/src/sizes.c | nix-test/src/sizes.c | #include "sys/socket.h"
#include "sys/uio.h"
#define SIZE_OF_T(TYPE) \
do { \
if (0 == strcmp(type, #TYPE)) { \
return sizeof(TYPE); \
} \
} while (0)
#define SIZE_OF_S(TYPE) \
do { \
if (0 == strcmp(type, #TYPE)) { \
return sizeof(struct TYPE); \
} \
} while (0)
size_t
size_of(const char* type) {
// Builtin
SIZE_OF_T(long);
// sys/socket
SIZE_OF_S(sockaddr_storage);
// sys/uio
SIZE_OF_S(iovec);
return 0;
}
| #include <sys/socket.h>
#include <sys/uio.h>
#include <string.h>
#define SIZE_OF_T(TYPE) \
do { \
if (0 == strcmp(type, #TYPE)) { \
return sizeof(TYPE); \
} \
} while (0)
#define SIZE_OF_S(TYPE) \
do { \
if (0 == strcmp(type, #TYPE)) { \
return sizeof(struct TYPE); \
} \
} while (0)
size_t
size_of(const char* type) {
// Builtin
SIZE_OF_T(long);
// sys/socket
SIZE_OF_S(sockaddr_storage);
// sys/uio
SIZE_OF_S(iovec);
return 0;
}
| Fix a compiler warning on FreeBSD | Fix a compiler warning on FreeBSD
| C | mit | berkowski/nix,carllerche/nix-rust,xd009642/nix,kamalmarhubi/nix-rust,xd009642/nix,geofft/nix-rust,posborne/rust-nix,geofft/nix-rust,MarkusJais/nix-rust,nix-rust/nix,kamalmarhubi/nix-rust,posborne/rust-nix,xd009642/nix,carllerche/nix-rust,asomers/nix,MarkusJais/nix-rust,carllerche/nix-rust,berkowski/nix,Susurrus/nix,posborne/rust-nix,kamalmarhubi/nix-rust,MarkusJais/nix-rust,geofft/nix-rust,Susurrus/nix,berkowski/nix,nix-rust/nix,asomers/nix,Susurrus/nix |
dabbb71c281f0e4b0f1466396ace097a8496b45a | some_cipher.h | some_cipher.h | #ifndef SOME_CIPHER_H
#define SOME_CIPHER_H
#include <stdint.h>
#define ROUNDS 7
extern const uint16_t RCONS[];
extern const uint16_t TE0[16], TE1[16], TE2[16], TE3[16], TE4[16];
extern const uint16_t TD0[16], TD1[16], TD2[16], TD3[16], TD4[16];
extern const uint16_t MC_INV_0[16], MC_INV_1[16], MC_INV_2[16], MC_INV_3[16];
void encrypt(const uint16_t *input, uint16_t *output, const uint16_t *key);
void decrypt(const uint16_t *input, uint16_t *output, const uint16_t *key);
#endif
| #ifndef SOME_CIPHER_H
#define SOME_CIPHER_H
#include <stdint.h>
#define ROUNDS 6
extern const uint16_t RCONS[];
extern const uint16_t TE0[16], TE1[16], TE2[16], TE3[16], TE4[16];
extern const uint16_t TD0[16], TD1[16], TD2[16], TD3[16], TD4[16];
extern const uint16_t MC_INV_0[16], MC_INV_1[16], MC_INV_2[16], MC_INV_3[16];
void encrypt(const uint16_t *input, uint16_t *output, const uint16_t *key);
void decrypt(const uint16_t *input, uint16_t *output, const uint16_t *key);
#endif
| Revert "extend to 7 rounds" | Revert "extend to 7 rounds"
This reverts commit 2057f426e6c2e02aa9123e63b4c00bf7c8c0f586.
| C | mit | wei2912/aes-idc,wei2912/aes-idc,wei2912/idc,wei2912/idc,wei2912/idc,wei2912/idc |
9c3ee047dd5168c456c6b2fd6674c99b82aa04fe | cartridge.h | cartridge.h | #pragma once
#include <istream>
#include <memory>
#include <vector>
#include "types.h"
#include "mbc.h"
class Cartridge
{
const static size_t max_rom_size = 0x400000; // 4 MB
std::vector<u8> rom;
std::vector<u8> ram;
std::unique_ptr<MemoryBankController> mbc;
public:
Cartridge() : rom(max_rom_size), ram(0x2000), mbc(new MBC1(rom, ram)) {}
void load_rom(std::istream& src)
{
src.read(reinterpret_cast<char *>(rom.data()), max_rom_size);
}
u8 get8(uint address) const
{
return mbc->get8(address);
}
void set8(uint address, u8 value)
{
mbc->set8(address, value);
}
};
| #pragma once
#include <istream>
#include <memory>
#include <vector>
#include "types.h"
#include "mbc.h"
class Cartridge
{
const static size_t max_rom_size = 0x400000; // 4 MB
std::vector<u8> rom;
std::vector<u8> ram;
std::unique_ptr<MemoryBankController> mbc;
public:
Cartridge() : rom(max_rom_size), ram(0x20000), mbc(new MBC1(rom, ram)) { }
void load_rom(std::istream& src)
{
src.read(reinterpret_cast<char *>(rom.data()), max_rom_size);
}
u8 get8(uint address) const
{
return mbc->get8(address);
}
void set8(uint address, u8 value)
{
mbc->set8(address, value);
}
};
| Make RAM 128KB - big enough for any game | Cartridge: Make RAM 128KB - big enough for any game
| C | mit | alastair-robertson/gameboy,alastair-robertson/gameboy,alastair-robertson/gameboy |
f1d12e7392896f45a76df87b6ad0bf18647922df | include/pci_ids/virtio_gpu_pci_ids.h | include/pci_ids/virtio_gpu_pci_ids.h | CHIPSET(0x0010, VIRTGL, VIRTGL)
| CHIPSET(0x0010, VIRTGL, VIRTGL)
CHIPSET(0x1050, VIRTGL, VIRTGL)
| Add virtio 1.0 PCI ID to driver map | virtio_gpu: Add virtio 1.0 PCI ID to driver map
Add the virtio-gpu PCI ID for virtio 1.0 (according to the
specification, "the PCI Device ID is calculated by adding 0x1040 to the
Virtio Device ID")
Support for virtio 1.0 was added in qemu 2.4 (same time virtio-gpu
landed).
Cc: "11.1 11.2" <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
| C | mit | metora/MesaGLSLCompiler,metora/MesaGLSLCompiler,metora/MesaGLSLCompiler |
1eba4c3d6cbff506ed61c17b93db45bbf196b8d8 | platforms/ios/framework/TangramMap.h | platforms/ios/framework/TangramMap.h | //
// TangramMap.h
// TangramMap
//
// Created by Matt Smollinger on 7/8/16.
//
//
#import <UIKit/UIKit.h>
/// Project version number for TangramMap.
FOUNDATION_EXPORT double TangramMapVersionNumber;
/// Project version string for TangramMap.
FOUNDATION_EXPORT const unsigned char TangramMapVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <TangramMap/PublicHeader.h>
#import <TangramMap/TGMapViewController.h>
| //
// TangramMap.h
// TangramMap
//
// Created by Matt Smollinger on 7/8/16.
// Updated by Karim Naaji on 2/28/17.
// Copyright (c) 2017 Mapzen. All rights reserved.
//
#import <UIKit/UIKit.h>
/// Project version number for TangramMap.
FOUNDATION_EXPORT double TangramMapVersionNumber;
/// Project version string for TangramMap.
FOUNDATION_EXPORT const unsigned char TangramMapVersionString[];
#import <TangramMap/TGMapViewController.h>
#import <TangramMap/TGMapData.h>
#import <TangramMap/TGGeoPoint.h>
#import <TangramMap/TGGeoPolygon.h>
#import <TangramMap/TGGeoPolyline.h>
#import <TangramMap/TGEaseType.h>
#import <TangramMap/TGHttpHandler.h>
#import <TangramMap/TGMarker.h>
#import <TangramMap/TGMapData.h>
#import <TangramMap/TGSceneUpdate.h>
#import <TangramMap/TGMarkerPickResult.h>
#import <TangramMap/TGLabelPickResult.h>
| Update umbrella header with public interface | Update umbrella header with public interface
| C | mit | quitejonny/tangram-es,cleeus/tangram-es,quitejonny/tangram-es,quitejonny/tangram-es,cleeus/tangram-es,cleeus/tangram-es,cleeus/tangram-es,quitejonny/tangram-es,tangrams/tangram-es,quitejonny/tangram-es,cleeus/tangram-es,tangrams/tangram-es,tangrams/tangram-es,tangrams/tangram-es,tangrams/tangram-es,tangrams/tangram-es,quitejonny/tangram-es,tangrams/tangram-es,cleeus/tangram-es |
01a3e9afd47cef7924024e7c56eba732f49cf972 | source/common/typedefs.h | source/common/typedefs.h | /* The Halfling Project - A Graphics Engine and Projects
*
* The Halfling Project is the legal property of Adrian Astley
* Copyright Adrian Astley 2013
*/
#ifndef COMMON_TYPEDEFS_H
#define COMMON_TYPEDEFS_H
typedef unsigned char byte;
typedef unsigned char uint8;
typedef signed char int8;
typedef unsigned short uint16;
typedef signed short int16;
typedef unsigned int uint32;
typedef signed int int32;
typedef unsigned int uint;
typedef __int64 int64;
typedef unsigned __int64 uint64;
#endif
| /* The Halfling Project - A Graphics Engine and Projects
*
* The Halfling Project is the legal property of Adrian Astley
* Copyright Adrian Astley 2013
*/
#ifndef COMMON_TYPEDEFS_H
#define COMMON_TYPEDEFS_H
typedef unsigned char byte;
typedef unsigned char uint8;
typedef signed char int8;
typedef unsigned short uint16;
typedef signed short int16;
typedef unsigned int uint32;
typedef signed int int32;
typedef unsigned int uint;
typedef __int64 int64;
typedef unsigned __int64 uint64;
namespace DisposeAfterUse {
enum Flag { NO, YES };
}
#endif
| Add namespace and enum for signaling auto-disposing | COMMON: Add namespace and enum for signaling auto-disposing
| C | apache-2.0 | RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject |
faf3bc1eabc938b3ed9fa898b08ed8a9c47fb77e | project_config/lmic_project_config.h | project_config/lmic_project_config.h | // project-specific definitions for otaa sensor
//#define CFG_eu868 1
//#define CFG_us915 1
//#define CFG_au921 1
#define CFG_as923 1
#define LMIC_COUNTRY_CODE LMIC_COUNTRY_CODE_JP
//#define CFG_in866 1
#define CFG_sx1276_radio 1
//#define LMIC_USE_INTERRUPTS
#define LMIC_DEBUG_LEVEL 2
#define LMIC_DEBUG_PRINTF_FN lmic_printf
| // project-specific definitions for otaa sensor
//#define CFG_eu868 1
#define CFG_us915 1
//#define CFG_au921 1
//#define CFG_as923 1
//#define CFG_in866 1
#define CFG_sx1276_radio 1
//#define LMIC_USE_INTERRUPTS
| Set project_config back to defaults | Set project_config back to defaults
| C | mit | mcci-catena/arduino-lmic,mcci-catena/arduino-lmic,mcci-catena/arduino-lmic |
2757ab9ebaba347019468e3362abb4deee324140 | ios/RCTOneSignal/RCTOneSignalEventEmitter.h | ios/RCTOneSignal/RCTOneSignalEventEmitter.h | #if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>
#import <React/RCTConvert.h>
#import <React/RCTEventDispatcher.h>
#import <React/RCTUtils.h>
#elif __has_include("RCTBridgeModule.h")
#import "RCTBridgeModule.h"
#import "RCTEventEmitter.h"
#import "RCTConvert.h"
#import "RCTEventDispatcher.h"
#import "RCTUtils.h"
#endif
typedef NS_ENUM(NSInteger, OSNotificationEventTypes) {
NotificationReceived,
NotificationOpened,
IdsAvailable,
EmailSubscriptionChanged
};
#define OSNotificationEventTypesArray @[@"OneSignal-remoteNotificationReceived",@"OneSignal-remoteNotificationOpened",@"OneSignal-idsAvailable",@"OneSignal-emailSubscription"]
#define OSEventString(enum) [OSNotificationEventTypesArray objectAtIndex:enum]
@interface RCTOneSignalEventEmitter : RCTEventEmitter <RCTBridgeModule>
+ (void)sendEventWithName:(NSString *)name withBody:(NSDictionary *)body;
+ (BOOL)hasSetBridge;
@end
| #if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>
#import <React/RCTConvert.h>
#import <React/RCTEventDispatcher.h>
#import <React/RCTUtils.h>
#elif __has_include("RCTBridgeModule.h")
#import "RCTBridgeModule.h"
#import "RCTEventEmitter.h"
#import "RCTConvert.h"
#import "RCTEventDispatcher.h"
#import "RCTUtils.h"
#endif
typedef NS_ENUM(NSInteger, OSNotificationEventTypes) {
NotificationReceived,
NotificationOpened,
IdsAvailable,
EmailSubscriptionChanged,
InAppMessageClicked
};
#define OSNotificationEventTypesArray @[@"OneSignal-remoteNotificationReceived",@"OneSignal-remoteNotificationOpened",@"OneSignal-idsAvailable",@"OneSignal-emailSubscription",@"OneSignal-inAppMessageClicked"]
#define OSEventString(enum) [OSNotificationEventTypesArray objectAtIndex:enum]
@interface RCTOneSignalEventEmitter : RCTEventEmitter <RCTBridgeModule>
+ (void)sendEventWithName:(NSString *)name withBody:(NSDictionary *)body;
+ (BOOL)hasSetBridge;
@end
| Add InAppMessage event to iOS | Add InAppMessage event to iOS
| C | mit | geektimecoil/react-native-onesignal,geektimecoil/react-native-onesignal,geektimecoil/react-native-onesignal |
4aec2351e289f194628e188b103800a08c6e829a | bigtable/api/parse_taq_line.h | bigtable/api/parse_taq_line.h | // Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef parse_taq_line_h
#define parse_taq_line_h
#include "taq.pb.h"
#include <utility>
namespace bigtable_api_samples {
// Parse a line from a TAQ file and convert it to a quote.
Quote parse_taq_line(int lineno, std::string const& line);
} // namespace bigtable_api_samples
#endif // parse_taq_line_h
| // Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef parse_taq_line_h
#define parse_taq_line_h
#include "taq.pb.h"
#include <utility>
namespace bigtable_api_samples {
// Parse a line from a TAQ file and convert it to a quote.
//
// TAQ files are delimiter (using '|' as the delimiter) separated text
// files, using this format:
//
// timestamp|exchange|ticker|bid price|bid qty|offer price|offer qty|...
// 093000123456789|K|GOOG|800.00|100|900.00|200|...
// ...
// END|20161024|78721395|||||||||||||||||||||||||
//
// The first line is a header, it defines the fields, each line
// contains all the data for a quote, in this example we are only
// interested in the first few fields, the last line is indicated by
// the 'END' marker, it contains the date (timestamps are relative to
// midnight on this date), and the total number of lines.
Quote parse_taq_line(int lineno, std::string const& line);
} // namespace bigtable_api_samples
#endif // parse_taq_line_h
| Document the format of the TAQ file. | Document the format of the TAQ file.
| C | apache-2.0 | GoogleCloudPlatform/cpp-samples,GoogleCloudPlatform/cpp-samples,GoogleCloudPlatform/cpp-samples,GoogleCloudPlatform/cpp-samples |
825e37c37ee43710ec48e28915395c571cb42366 | cint/inc/cintdictversion.h | cint/inc/cintdictversion.h | /***********************************************************************
* cint (C/C++ interpreter)
************************************************************************
* CINT header file cintdictversion.h
************************************************************************
* Description:
* definition of the dictionary API version
************************************************************************
* Copyright(c) 1995~2008 Masaharu Goto ([email protected])
*
* For the licensing terms see the file COPYING
*
************************************************************************/
#ifndef INCLUDE_CINTDICTVERSION
#define INCLUDE_CINTDICTVERSION
#define G__CINTDICTVERSION 2008-01-21
#endif /* INCLUDE_CINTDICTVERSION */
| Add a tag (dummy) header file that will be updated whenever CINT's dictionaries need to be regenerated. | Add a tag (dummy) header file that will be updated whenever CINT's dictionaries need to be regenerated.
git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@21793 27541ba8-7e3a-0410-8455-c3a389f83636
| C | lgpl-2.1 | bbannier/ROOT,dawehner/root,dawehner/root,bbannier/ROOT,dawehner/root,bbannier/ROOT,dawehner/root,dawehner/root,dawehner/root,bbannier/ROOT,bbannier/ROOT,dawehner/root,bbannier/ROOT,dawehner/root,bbannier/ROOT |
|
ea1faeed8ecf8780e7b23f07a27b9c8e3e63d82c | swephelp/swhwin.h | swephelp/swhwin.h | /*
Swephelp
Copyright 2007-2014 Stanislas Marquis <[email protected]>
Swephelp is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
Swephelp is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Swephelp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file swhwin.h
** @brief swephelp windowz specific header
*/
#ifndef SWHWIN_H
#define SWHWIN_H
#ifdef WIN32
#define lround(num) \
((long)(num > 0 ? num + 0.5 : ceil(num - 0.5)))
#endif /* WIN32 */
#endif /* SWHWIN_H */
/* vi: set fenc=utf8 ff=unix et sw=4 ts=4 sts=4 : */
| /*
Swephelp
Copyright 2007-2014 Stanislas Marquis <[email protected]>
Swephelp is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
Swephelp is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Swephelp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file swhwin.h
** @brief swephelp windowz specific header
*/
/* define WIN32 for MSVC compilers */
#ifdef _WIN32
#define WIN32
#endif
#ifndef SWHWIN_H
#define SWHWIN_H
#ifdef WIN32
#define lround(num) \
((long)(num > 0 ? num + 0.5 : ceil(num - 0.5)))
#endif /* WIN32 */
#endif /* SWHWIN_H */
/* vi: set fenc=utf8 ff=unix et sw=4 ts=4 sts=4 : */
| Define WIN32 for MSVC compilers | Define WIN32 for MSVC compilers
Microsoft Visual C++ compilers define _WIN32 (with underscore) instead
of WIN32 as gcc does when compiling on Windows. Pyswisseph fails to
compile with MSVC compiler.
This patch forces WIN32 to be defined if _WIN32 is defined by the MSVC
compiler.
| C | agpl-3.0 | astrorigin/pyswisseph,astrorigin/pyswisseph |
f8e8e58902fbaa14e2ea7c8a317747197d53bf37 | src/processes/helpers/image/macros.h | src/processes/helpers/image/macros.h | /*ckwg +5
* Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#ifndef VISTK_PROCESSES_HELPER_IMAGE_MACROS_H
#define VISTK_PROCESSES_HELPER_IMAGE_MACROS_H
#include <boost/cstdint.hpp>
/**
* \file macros.h
*
* \brief Macros to help manage templates.
*/
#define TYPE_CHECK(type, name, function) \
if (pixtype == pixtypes::pixtype_##name()) \
{ \
return &function<type>; \
}
#define SPECIFY_FUNCTION(function) \
TYPE_CHECK(bool, bool, function) \
TYPE_CHECK(uint8_t, byte, function) \
TYPE_CHECK(float, float, function) \
TYPE_CHECK(double, double, function)
#endif // VISTK_PROCESSES_HELPER_IMAGE_MACROS_H
| /*ckwg +5
* Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#ifndef VISTK_PROCESSES_HELPER_IMAGE_MACROS_H
#define VISTK_PROCESSES_HELPER_IMAGE_MACROS_H
#include <boost/cstdint.hpp>
/**
* \file macros.h
*
* \brief Macros to help manage templates.
*/
#define TYPE_CHECK(type, name, function) \
if (pixtype == pixtypes::pixtype_##name()) \
{ \
return &function<type>; \
}
#define SPECIFY_FUNCTION(function) \
TYPE_CHECK(bool, bool, function) \
else TYPE_CHECK(uint8_t, byte, function) \
else TYPE_CHECK(float, float, function) \
else TYPE_CHECK(double, double, function)
#endif // VISTK_PROCESSES_HELPER_IMAGE_MACROS_H
| Use else in comparison chain | Use else in comparison chain
| C | bsd-3-clause | Kitware/sprokit,mathstuf/sprokit,Kitware/sprokit,mathstuf/sprokit,linus-sherrill/sprokit,linus-sherrill/sprokit,Kitware/sprokit,mathstuf/sprokit,linus-sherrill/sprokit,Kitware/sprokit,mathstuf/sprokit,linus-sherrill/sprokit |
f9b5db764f7c403b5b47a546d69bf7c35d6bbfae | test2/arrays/qualified_type_checks.c | test2/arrays/qualified_type_checks.c | // RUN: %ucc -fsyntax-only %s
typedef int array[3];
const array yo; // int const yo[3];
// ^~ no const here
h(array); // int h(int [3]);
i(const array); // int i(int const [3]);
// ^~ no const here
j(int[const]); // int j(int *const);
_Static_assert(_Generic(yo, const int[3]: 1) == 1, "");
_Static_assert(_Generic(&h, int (*)(int[3]): 1) == 1, "");
_Static_assert(_Generic(&h, int (*)(int const[3]): 1, default: 2) == 2, "");
_Static_assert(_Generic(&h, int (*)(int *const): 1) == 1, "");
_Static_assert(_Generic(&h, int (*)(int *): 1) == 1, "");
_Static_assert(_Generic(&i, int (*)(int const[3]): 1) == 1, "");
_Static_assert(_Generic(&i, int (*)(int [3]): 1, default: 2) == 2, "");
_Static_assert(_Generic(&i, int (*)(int const *): 1) == 1, "");
_Static_assert(_Generic(&i, int (*)(int const *const): 1) == 1, "");
_Static_assert(_Generic(&j, int (*)(int *const): 1) == 1, "");
_Static_assert(_Generic(&j, int (*)(int [const]): 1) == 1, "");
_Static_assert(_Generic(&j, int (*)(int const *const): 1, default: 2) == 2, "");
_Static_assert(_Generic(&j, int (*)(int const [const]): 1, default: 2) == 2, "");
| Add function parameter qualifier type tests | Add function parameter qualifier type tests
| C | mit | 8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler |
|
4917024c9485d5ed3362ddcb1a0d0f8ee45dfedc | al/event.h | al/event.h | #ifndef AL_EVENT_H
#define AL_EVENT_H
#include "AL/al.h"
#include "AL/alc.h"
struct EffectState;
enum {
/* End event thread processing. */
EventType_KillThread = 0,
/* User event types. */
EventType_SourceStateChange = 1<<0,
EventType_BufferCompleted = 1<<1,
EventType_Error = 1<<2,
EventType_Performance = 1<<3,
EventType_Deprecated = 1<<4,
EventType_Disconnected = 1<<5,
/* Internal events. */
EventType_ReleaseEffectState = 65536,
};
struct AsyncEvent {
unsigned int EnumType{0u};
union {
char dummy;
struct {
ALuint id;
ALenum state;
} srcstate;
struct {
ALuint id;
ALsizei count;
} bufcomp;
struct {
ALenum type;
ALuint id;
ALuint param;
ALchar msg[1008];
} user;
EffectState *mEffectState;
} u{};
AsyncEvent() noexcept = default;
constexpr AsyncEvent(unsigned int type) noexcept : EnumType{type} { }
};
void StartEventThrd(ALCcontext *ctx);
void StopEventThrd(ALCcontext *ctx);
#endif
| #ifndef AL_EVENT_H
#define AL_EVENT_H
#include "AL/al.h"
#include "AL/alc.h"
struct EffectState;
enum {
/* End event thread processing. */
EventType_KillThread = 0,
/* User event types. */
EventType_SourceStateChange = 1<<0,
EventType_BufferCompleted = 1<<1,
EventType_Error = 1<<2,
EventType_Performance = 1<<3,
EventType_Deprecated = 1<<4,
EventType_Disconnected = 1<<5,
/* Internal events. */
EventType_ReleaseEffectState = 65536,
};
struct AsyncEvent {
unsigned int EnumType{0u};
union {
char dummy;
struct {
ALuint id;
ALenum state;
} srcstate;
struct {
ALuint id;
ALsizei count;
} bufcomp;
struct {
ALenum type;
ALuint id;
ALuint param;
ALchar msg[232];
} user;
EffectState *mEffectState;
} u{};
AsyncEvent() noexcept = default;
constexpr AsyncEvent(unsigned int type) noexcept : EnumType{type} { }
};
void StartEventThrd(ALCcontext *ctx);
void StopEventThrd(ALCcontext *ctx);
#endif
| Reduce the AsyncEvent struct size | Reduce the AsyncEvent struct size
The "user" message length is significantly reduced to fit the struct in 256
bytes, rather than 1KB.
| C | lgpl-2.1 | aaronmjacobs/openal-soft,aaronmjacobs/openal-soft |
f5fe521c850a02ae1f352bfb652e263c0c97d624 | include/mozilla/Compiler.h | include/mozilla/Compiler.h | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Various compiler checks. */
#ifndef mozilla_Compiler_h_
#define mozilla_Compiler_h_
#if !defined(__clang__) && defined(__GNUC__)
/*
* This macro should simplify gcc version checking. For example, to check
* for gcc 4.5.1 or later, check `#ifdef MOZ_GCC_VERSION_AT_LEAST(4, 5, 1)`.
*/
# define MOZ_GCC_VERSION_AT_LEAST(major, minor, patchlevel) \
((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) \
>= ((major) * 10000 + (minor) * 100 + (patchlevel)))
#if !MOZ_GCC_VERSION_AT_LEAST(4, 4, 0)
# error "mfbt (and Gecko) require at least gcc 4.4 to build."
#endif
#endif
#endif /* mozilla_Compiler_h_ */
| /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Various compiler checks. */
#ifndef mozilla_Compiler_h_
#define mozilla_Compiler_h_
#if !defined(__clang__) && defined(__GNUC__)
/*
* This macro should simplify gcc version checking. For example, to check
* for gcc 4.5.1 or later, check `#ifdef MOZ_GCC_VERSION_AT_LEAST(4, 5, 1)`.
*/
# define MOZ_GCC_VERSION_AT_LEAST(major, minor, patchlevel) \
((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) \
>= ((major) * 10000 + (minor) * 100 + (patchlevel)))
#if !MOZ_GCC_VERSION_AT_LEAST(4, 4, 0)
// RBA: Not true for servo!
//# error "mfbt (and Gecko) require at least gcc 4.4 to build."
#endif
#endif
#endif /* mozilla_Compiler_h_ */
| Disable error that forbids builds with gcc 4.2 | Disable error that forbids builds with gcc 4.2
| C | mpl-2.0 | nox/rust-azure,Adenilson/rust-azure,larsbergstrom/rust-azure,Adenilson/rust-azure,notriddle/rust-azure,larsbergstrom/rust-azure,servo/rust-azure,servo/rust-azure,notriddle/rust-azure,nox/rust-azure,brendandahl/rust-azure,servo/rust-azure,pcwalton/rust-azure,mrobinson/rust-azure,notriddle/rust-azure,larsbergstrom/rust-azure,hyowon/rust-azure,hyowon/rust-azure,Adenilson/rust-azure,mbrubeck/rust-azure,akiss77/rust-azure,mrobinson/rust-azure,vvuk/rust-azure,dzbarsky/rust-azure,mmatyas/rust-azure,mbrubeck/rust-azure,akiss77/rust-azure,brendandahl/rust-azure,metajack/rust-azure,dzbarsky/rust-azure,akiss77/rust-azure,vvuk/rust-azure,mbrubeck/rust-azure,Adenilson/rust-azure,mrobinson/rust-azure,metajack/rust-azure,vvuk/rust-azure,dzbarsky/rust-azure,mmatyas/rust-azure,hyowon/rust-azure,pcwalton/rust-azure,notriddle/rust-azure,mmatyas/rust-azure,nox/rust-azure,brendandahl/rust-azure,mbrubeck/rust-azure,servo/rust-azure,mbrubeck/rust-azure,notriddle/rust-azure,pcwalton/rust-azure,pcwalton/rust-azure,mrobinson/rust-azure,pcwalton/rust-azure,larsbergstrom/rust-azure,hyowon/rust-azure,larsbergstrom/rust-azure,metajack/rust-azure,nox/rust-azure,mmatyas/rust-azure,vvuk/rust-azure,mrobinson/rust-azure,Adenilson/rust-azure,mmatyas/rust-azure,hyowon/rust-azure,akiss77/rust-azure,akiss77/rust-azure,dzbarsky/rust-azure,dzbarsky/rust-azure,servo/rust-azure,brendandahl/rust-azure,vvuk/rust-azure,brendandahl/rust-azure,metajack/rust-azure,nox/rust-azure,metajack/rust-azure |
6a6590fbdfd0266f2d5b90552de3279b4b57b24f | ReactCommon/fabric/components/text/text/TextShadowNode.h | ReactCommon/fabric/components/text/text/TextShadowNode.h | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <limits>
#include <react/components/text/BaseTextShadowNode.h>
#include <react/components/text/TextProps.h>
#include <react/components/view/ViewEventEmitter.h>
#include <react/core/ConcreteShadowNode.h>
namespace facebook {
namespace react {
extern const char TextComponentName[];
using TextEventEmitter = TouchEventEmitter;
class TextShadowNode : public ConcreteShadowNode<
TextComponentName,
ShadowNode,
TextProps,
TextEventEmitter>,
public BaseTextShadowNode {
public:
static ShadowNodeTraits BaseTraits() {
auto traits = ConcreteShadowNode::BaseTraits();
#ifdef ANDROID
traits.set(ShadowNodeTraits::Trait::FormsView);
traits.set(ShadowNodeTraits::Trait::FormsStackingContext);
#endif
return traits;
}
using ConcreteShadowNode::ConcreteShadowNode;
#ifdef ANDROID
using BaseShadowNode = ConcreteShadowNode<
TextComponentName,
ShadowNode,
TextProps,
TextEventEmitter>;
TextShadowNode(
ShadowNodeFragment const &fragment,
ShadowNodeFamily::Shared const &family,
ShadowNodeTraits traits)
: BaseShadowNode(fragment, family, traits), BaseTextShadowNode() {
orderIndex_ = std::numeric_limits<decltype(orderIndex_)>::max();
}
#endif
};
} // namespace react
} // namespace facebook
| /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <limits>
#include <react/components/text/BaseTextShadowNode.h>
#include <react/components/text/TextProps.h>
#include <react/components/view/ViewEventEmitter.h>
#include <react/core/ConcreteShadowNode.h>
namespace facebook {
namespace react {
extern const char TextComponentName[];
using TextEventEmitter = TouchEventEmitter;
class TextShadowNode : public ConcreteShadowNode<
TextComponentName,
ShadowNode,
TextProps,
TextEventEmitter>,
public BaseTextShadowNode {
public:
static ShadowNodeTraits BaseTraits() {
auto traits = ConcreteShadowNode::BaseTraits();
#ifdef ANDROID
traits.set(ShadowNodeTraits::Trait::FormsView);
#endif
return traits;
}
using ConcreteShadowNode::ConcreteShadowNode;
#ifdef ANDROID
using BaseShadowNode = ConcreteShadowNode<
TextComponentName,
ShadowNode,
TextProps,
TextEventEmitter>;
TextShadowNode(
ShadowNodeFragment const &fragment,
ShadowNodeFamily::Shared const &family,
ShadowNodeTraits traits)
: BaseShadowNode(fragment, family, traits), BaseTextShadowNode() {
orderIndex_ = std::numeric_limits<decltype(orderIndex_)>::max();
}
#endif
};
} // namespace react
} // namespace facebook
| Fix bug in TextInlineViews when using a deep nested hierarchy of Text and Images | Fix bug in TextInlineViews when using a deep nested hierarchy of Text and Images
Summary:
This fixes a bug in Android TextInlineViews that was reproducible in ActivityLog screen, see T63438920
Since Text are virtual nodes it is not necessary for these kind of views to stack views during diffing.
changelog: [internal]
Reviewed By: shergin
Differential Revision: D20448085
fbshipit-source-id: 2d852975493bf6bcc7840c80c5de5cb5f7890303
| C | mit | pandiaraj44/react-native,facebook/react-native,javache/react-native,exponentjs/react-native,javache/react-native,javache/react-native,janicduplessis/react-native,hoangpham95/react-native,janicduplessis/react-native,hammerandchisel/react-native,hoangpham95/react-native,exponentjs/react-native,janicduplessis/react-native,hammerandchisel/react-native,janicduplessis/react-native,exponent/react-native,pandiaraj44/react-native,hammerandchisel/react-native,hoangpham95/react-native,myntra/react-native,janicduplessis/react-native,facebook/react-native,pandiaraj44/react-native,myntra/react-native,myntra/react-native,exponent/react-native,exponentjs/react-native,janicduplessis/react-native,facebook/react-native,myntra/react-native,exponent/react-native,facebook/react-native,myntra/react-native,exponent/react-native,exponent/react-native,exponent/react-native,arthuralee/react-native,pandiaraj44/react-native,facebook/react-native,hoangpham95/react-native,hammerandchisel/react-native,myntra/react-native,exponent/react-native,javache/react-native,myntra/react-native,arthuralee/react-native,pandiaraj44/react-native,javache/react-native,janicduplessis/react-native,exponentjs/react-native,hoangpham95/react-native,exponent/react-native,hoangpham95/react-native,hammerandchisel/react-native,hammerandchisel/react-native,myntra/react-native,arthuralee/react-native,janicduplessis/react-native,arthuralee/react-native,exponentjs/react-native,exponentjs/react-native,javache/react-native,pandiaraj44/react-native,hammerandchisel/react-native,hoangpham95/react-native,exponentjs/react-native,javache/react-native,hoangpham95/react-native,facebook/react-native,facebook/react-native,pandiaraj44/react-native,facebook/react-native,pandiaraj44/react-native,javache/react-native,myntra/react-native,arthuralee/react-native,hammerandchisel/react-native,exponentjs/react-native,facebook/react-native,javache/react-native |
a13984843e51c317f92843756b2fd5dbcc19b02b | Include/KAI/Platform/GameController.h | Include/KAI/Platform/GameController.h |
#ifndef KAI_PLATFORM_GAME_CONTROLLER_H
#define KAI_PLATFORM_GAME_CONTROLLER_H
#include KAI_PLATFORM_INCLUDE(GameController.h)
#endif // SHATTER_PLATFORM_GAME_CONTROLLER_H
//EOF
|
#ifndef KAI_PLATFORM_GAME_CONTROLLER_H
#define KAI_PLATFORM_GAME_CONTROLLER_H
#include KAI_PLATFORM_INCLUDE(GameController.h)
#endif
//EOF
| Add some color for console output | Add some color for console output
Former-commit-id: 315cc71afe5d5245e60ce4564328619c49310b6a
Former-commit-id: 4afa9ab712a2bdbef25bee286ff0bdcf2a8da2b2 | C | mit | cschladetsch/KAI,cschladetsch/KAI,cschladetsch/KAI |
64635220db85ed16109ee33387884bf5aa42bcaf | Settings/Updater/Version.h | Settings/Updater/Version.h | #pragma once
#include <string>
struct Version {
public:
const int major;
const int minor;
const int revision;
Version(int major, int minor = 0, int revision = 0) :
major(major),
minor(minor),
revision(revision) {
}
std::wstring ToString() {
return std::to_wstring(major)
+ L"."
+ std::to_wstring(minor)
+ L"."
+ std::to_wstring(revision);
}
}; | #pragma once
#include <string>
struct Version {
public:
Version(int major = 0, int minor = 0, int revision = 0) :
_major(major),
_minor(minor),
_revision(revision) {
}
const int Major() { return _major; }
const int Minor() { return _minor; }
const int Revision() { return _revision; }
}
std::wstring ToString() {
return std::to_wstring(_major)
+ L"."
+ std::to_wstring(_minor)
+ L"."
+ std::to_wstring(_revision);
}
private:
int _major;
int _minor;
int _revision;
}; | Update instance variables, add getters | Update instance variables, add getters
| C | bsd-2-clause | malensek/3RVX,malensek/3RVX,malensek/3RVX |
578c65d5f619ede48ee99aa837a8600692d6edd6 | NetKVM/Common/ParaNdis_DebugHistory.h | NetKVM/Common/ParaNdis_DebugHistory.h | #pragma once
//#define ENABLE_HISTORY_LOG
#if !defined(ENABLE_HISTORY_LOG)
void FORCEINLINE ParaNdis_DebugHistory(
PARANDIS_ADAPTER *pContext,
eHistoryLogOperation op,
PVOID pParam1,
ULONG lParam2,
ULONG lParam3,
ULONG lParam4)
{
UNREFERENCED_PARAMETER(pContext);
UNREFERENCED_PARAMETER(op);
UNREFERENCED_PARAMETER(pParam1);
UNREFERENCED_PARAMETER(lParam2);
UNREFERENCED_PARAMETER(lParam3);
UNREFERENCED_PARAMETER(lParam4);
}
#else
void ParaNdis_DebugHistory(
PARANDIS_ADAPTER *pContext,
eHistoryLogOperation op,
PVOID pParam1,
ULONG lParam2,
ULONG lParam3,
ULONG lParam4);
#endif
| #pragma once
//#define ENABLE_HISTORY_LOG
//#define KEEP_PENDING_NBL
#if !defined(KEEP_PENDING_NBL)
void FORCEINLINE ParaNdis_DebugNBLIn(PNET_BUFFER_LIST nbl, ULONG& index)
{
UNREFERENCED_PARAMETER(nbl);
UNREFERENCED_PARAMETER(index);
}
void FORCEINLINE ParaNdis_DebugNBLOut(ULONG index, PNET_BUFFER_LIST nbl)
{
UNREFERENCED_PARAMETER(index);
UNREFERENCED_PARAMETER(nbl);
}
#else
void ParaNdis_DebugNBLIn(PNET_BUFFER_LIST nbl, ULONG& index);
void ParaNdis_DebugNBLOut(ULONG index, PNET_BUFFER_LIST nbl);
#endif
#if !defined(ENABLE_HISTORY_LOG)
void FORCEINLINE ParaNdis_DebugHistory(
PARANDIS_ADAPTER *pContext,
eHistoryLogOperation op,
PVOID pParam1,
ULONG lParam2,
ULONG lParam3,
ULONG lParam4)
{
UNREFERENCED_PARAMETER(pContext);
UNREFERENCED_PARAMETER(op);
UNREFERENCED_PARAMETER(pParam1);
UNREFERENCED_PARAMETER(lParam2);
UNREFERENCED_PARAMETER(lParam3);
UNREFERENCED_PARAMETER(lParam4);
}
#else
void ParaNdis_DebugHistory(
PARANDIS_ADAPTER *pContext,
eHistoryLogOperation op,
PVOID pParam1,
ULONG lParam2,
ULONG lParam3,
ULONG lParam4);
#endif
| Add ability to keep array of pending TX NBLs | netkvm: Add ability to keep array of pending TX NBLs
This debug instrumentation is resolved to nothing in
regular release compilation. To enable it, uncomment
KEEP_PENDING_NBL define in ParaNdis_DebugHistory.h
Signed-off-by: Yuri Benditovich <[email protected]>
| C | bsd-3-clause | vrozenfe/kvm-guest-drivers-windows,ladipro/kvm-guest-drivers-windows,YanVugenfirer/virtio-win-arm,YanVugenfirer/kvm-guest-drivers-windows,YanVugenfirer/virtio-win-arm,virtio-win/kvm-guest-drivers-windows,gnif/kvm-guest-drivers-windows,gnif/kvm-guest-drivers-windows,vrozenfe/kvm-guest-drivers-windows,ladipro/kvm-guest-drivers-windows,ladipro/kvm-guest-drivers-windows,vrozenfe/kvm-guest-drivers-windows,virtio-win/kvm-guest-drivers-windows,ladipro/kvm-guest-drivers-windows,YanVugenfirer/kvm-guest-drivers-windows,gnif/kvm-guest-drivers-windows,daynix/kvm-guest-drivers-windows,daynix/kvm-guest-drivers-windows,YanVugenfirer/kvm-guest-drivers-windows,daynix/kvm-guest-drivers-windows,virtio-win/kvm-guest-drivers-windows,vrozenfe/kvm-guest-drivers-windows,vrozenfe/kvm-guest-drivers-windows,YanVugenfirer/virtio-win-arm,YanVugenfirer/kvm-guest-drivers-windows,YanVugenfirer/virtio-win-arm,virtio-win/kvm-guest-drivers-windows,YanVugenfirer/kvm-guest-drivers-windows,virtio-win/kvm-guest-drivers-windows,gnif/kvm-guest-drivers-windows,daynix/kvm-guest-drivers-windows,daynix/kvm-guest-drivers-windows |
f81d8805b9fb79fcd2a6a9eef61c525e58ef425b | fmpz_mpoly/test/t-init.c | fmpz_mpoly/test/t-init.c | /*
Copyright (C) 2016 William Hart
This file is part of FLINT.
FLINT is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License (LGPL) as published
by the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version. See <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <stdlib.h>
#include <gmp.h>
#include "flint.h"
#include "fmpz.h"
#include "fmpz_mpoly.h"
#include "ulong_extras.h"
int
main(void)
{
int i;
FLINT_TEST_INIT(state);
flint_printf("void....");
fflush(stdout);
/* Check aliasing of a and c */
for (i = 0; i < 1000 * flint_test_multiplier(); i++)
{
}
FLINT_TEST_CLEANUP(state);
flint_printf("PASS\n");
return 0;
}
| Add empty test to prevent build system complaining. | Add empty test to prevent build system complaining.
| C | lgpl-2.1 | fredrik-johansson/flint2,dsroche/flint2,wbhart/flint2,wbhart/flint2,dsroche/flint2,fredrik-johansson/flint2,dsroche/flint2,dsroche/flint2,wbhart/flint2,fredrik-johansson/flint2 |
|
cdef41a6b4889a7e7143053b1806e9c737058b30 | test/FrontendC/2010-05-26-AsmSideEffect.c | test/FrontendC/2010-05-26-AsmSideEffect.c | // RUN: %llvmgcc %s -S -emit-llvm -o - | FileCheck %s
// Radar 8026855
int test (void *src) {
register int w0 asm ("0");
// CHECK: call i32 asm sideeffect
asm ("ldr %0, [%1]": "=r" (w0): "r" (src));
// The asm to read the value of w0 has a sideeffect for a different reason
// (see 2010-05-18-asmsched.c) but that's not what this is testing for.
// CHECK: call i32 asm
return w0;
}
| Add a test for llvm-gcc svn r104726. | Add a test for llvm-gcc svn r104726.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@104805 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm |
|
d6f4a5106bebb23826c0867494ade7f4d7ebd1f3 | examples/common/scpi-def.h | examples/common/scpi-def.h | #ifndef __SCPI_DEF_H_
#define __SCPI_DEF_H_
#include "scpi/scpi.h"
extern scpi_t scpi_context;
size_t SCPI_Write(scpi_t * context, const char * data, size_t len);
int SCPI_Error(scpi_t * context, int_fast16_t err);
scpi_result_t SCPI_Control(scpi_t * context, scpi_ctrl_name_t ctrl, scpi_reg_val_t val);
scpi_result_t SCPI_Reset(scpi_t * context);
scpi_result_t SCPI_Test(scpi_t * context);
scpi_result_t SCPI_Flush(scpi_t * context);
scpi_result_t SCPI_SystemCommTcpipControlQ(scpi_t * context);
#endif // __SCPI_DEF_H_
| #ifndef __SCPI_DEF_H_
#define __SCPI_DEF_H_
#include "scpi/scpi.h"
extern scpi_t scpi_context;
size_t SCPI_Write(scpi_t * context, const char * data, size_t len);
int SCPI_Error(scpi_t * context, int_fast16_t err);
scpi_result_t SCPI_Control(scpi_t * context, scpi_ctrl_name_t ctrl, scpi_reg_val_t val);
scpi_result_t SCPI_Reset(scpi_t * context);
int32_t SCPI_Test(scpi_t * context);
scpi_result_t SCPI_Flush(scpi_t * context);
scpi_result_t SCPI_SystemCommTcpipControlQ(scpi_t * context);
#endif // __SCPI_DEF_H_
| Correct *TST? callback in header file | Correct *TST? callback in header file
| C | bsd-2-clause | j123b567/scpi-parser,koeart/scpi-parser,koeart/scpi-parser,j123b567/scpi-parser,RedPitaya/scpi-parser,RedPitaya/scpi-parser |
1b7c7ce6555ac92929f131aebb3f7e21bef3f0a1 | examples/minimal/minimal.c | examples/minimal/minimal.c | #include <Arika/Arika.h>
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int main(int argc, char** argv)
{
ARFuncs* arFuncs = ar_init("t2-output/macosx-clang-debug-default/libarika-qt.dylib");
if (!arFuncs)
return 0;
arFuncs->window_create_main();
for (;;)
{
if (!arFuncs->update())
break;
}
//arFuncs->close();
return 0;
}
| #include <Arika/Arika.h>
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int main(int argc, char** argv)
{
ARFuncs* arFuncs = ar_init("t2-output/macosx-clang-debug-default/libarika-qt.dylib");
if (!arFuncs)
return 0;
if (!arFuncs->ui_load("examples/minimal/minimal.ar"))
return 0;
//arFuncs->window_create_main();
for (;;)
{
if (!arFuncs->update())
break;
}
//arFuncs->close();
return 0;
}
| Use Lua for creating main window | Use Lua for creating main window
| C | mit | emoon/Arika,emoon/Arika,emoon/Arika,emoon/Arika |
e369bd1813b725ba6d6f2effeaa7bd7cb6013664 | third-party/bsp/st_f4/arch.c | third-party/bsp/st_f4/arch.c | /**
* @file
* @brief
*
* @author Anton Kozlov
* @date 30.10.2014
*/
#include <assert.h>
#include <stdint.h>
#include <system_stm32f4xx.h>
#include <framework/mod/options.h>
#include <module/embox/arch/system.h>
#include <hal/arch.h>
void arch_init(void) {
static_assert(OPTION_MODULE_GET(embox__arch__system, NUMBER, core_freq) == 144000000);
SystemInit();
}
void arch_idle(void) {
}
void arch_shutdown(arch_shutdown_mode_t mode) {
while (1);
}
| /**
* @file
* @brief
*
* @author Anton Kozlov
* @date 30.10.2014
*/
#include <assert.h>
#include <stdint.h>
#include <system_stm32f4xx.h>
#include <framework/mod/options.h>
#include <module/embox/arch/system.h>
#include <hal/arch.h>
#include <stm32f4xx_wwdg.h>
void arch_init(void) {
static_assert(OPTION_MODULE_GET(embox__arch__system, NUMBER, core_freq) == 144000000);
SystemInit();
}
void arch_idle(void) {
}
void arch_shutdown(arch_shutdown_mode_t mode) {
switch (mode) {
case ARCH_SHUTDOWN_MODE_HALT:
case ARCH_SHUTDOWN_MODE_REBOOT:
case ARCH_SHUTDOWN_MODE_ABORT:
default:
NVIC_SystemReset();
}
/* NOTREACHED */
while(1) {
}
}
| Change shutdown to reset the board | stm32: Change shutdown to reset the board
| C | bsd-2-clause | gzoom13/embox,embox/embox,abusalimov/embox,Kakadu/embox,mike2390/embox,mike2390/embox,vrxfile/embox-trik,vrxfile/embox-trik,abusalimov/embox,Kakadu/embox,Kakadu/embox,embox/embox,Kefir0192/embox,Kefir0192/embox,Kefir0192/embox,Kefir0192/embox,gzoom13/embox,vrxfile/embox-trik,gzoom13/embox,abusalimov/embox,vrxfile/embox-trik,Kakadu/embox,gzoom13/embox,Kefir0192/embox,embox/embox,abusalimov/embox,gzoom13/embox,vrxfile/embox-trik,mike2390/embox,gzoom13/embox,gzoom13/embox,Kakadu/embox,mike2390/embox,mike2390/embox,Kakadu/embox,Kakadu/embox,mike2390/embox,mike2390/embox,vrxfile/embox-trik,vrxfile/embox-trik,embox/embox,abusalimov/embox,abusalimov/embox,embox/embox,Kefir0192/embox,embox/embox,Kefir0192/embox |
d49604b9ed52928f8a3b31cc560692f130928014 | src/transaction_data.h | src/transaction_data.h | /*
* the continuation data assigned to each request along side with the functions
* to manipulate them
*
* Vmon: June 2013
*/
#ifndef BANJAX_CONTINUATION_H
#define BANJAX_CONTINUATION_H
#include "banjax.h"
#include "banjax_filter.h"
#include "transaction_muncher.h"
class Banjax;
class TransactionData{
public:
std::shared_ptr<Banjax> banjax;
TSHttpTxn txnp;
TransactionMuncher transaction_muncher;
FilterResponse response_info;
~TransactionData();
/**
Constructor to set the default values
*/
TransactionData(std::shared_ptr<Banjax> banjax, TSHttpTxn cur_txn)
: banjax(std::move(banjax))
, txnp(cur_txn)
, transaction_muncher(cur_txn)
{ }
static
int handle_transaction_change(TSCont contp, TSEvent event, void *edata);
private:
void handle_request();
void handle_response();
void handle_http_close(Banjax::TaskQueue& current_queue);
};
#endif /*banjax_continuation.h*/
| /*
* the continuation data assigned to each request along side with the functions
* to manipulate them
*
* Vmon: June 2013
*/
#ifndef BANJAX_CONTINUATION_H
#define BANJAX_CONTINUATION_H
#include "banjax.h"
#include "banjax_filter.h"
#include "transaction_muncher.h"
class Banjax;
class TransactionData{
public:
/**
Constructor to set the default values
*/
TransactionData(std::shared_ptr<Banjax> banjax, TSHttpTxn cur_txn)
: banjax(std::move(banjax))
, txnp(cur_txn)
, transaction_muncher(cur_txn)
{ }
static
int handle_transaction_change(TSCont contp, TSEvent event, void *edata);
~TransactionData();
private:
std::shared_ptr<Banjax> banjax;
TSHttpTxn txnp;
TransactionMuncher transaction_muncher;
FilterResponse response_info;
private:
void handle_request();
void handle_response();
void handle_http_close(Banjax::TaskQueue& current_queue);
};
#endif /*banjax_continuation.h*/
| Make TransactionData member vars private | Make TransactionData member vars private
| C | agpl-3.0 | equalitie/banjax,equalitie/banjax,equalitie/banjax,equalitie/banjax,equalitie/banjax |
47b545958603fb2f62b945985d191193183caeab | src/math/p_acos.c | src/math/p_acos.c | #include <math.h>
#include <pal.h>
static const float pi_2 = (float) M_PI / 2.f;
/**
*
* Computes the inverse cosine (arc cosine) of the input vector 'a'. Input
* values to acos must be in the range -1 to 1. The result values are in the
* range 0 to pi. The function does not check for illegal input values.
*
* @param a Pointer to input vector
*
* @param c Pointer to output vector
*
* @param n Size of 'a' and 'c' vector.
*
* @return None
*
*/
void p_acos_f32(const float *a, float *c, int n)
{
int i;
float tmp;
/* acos x = pi/2 - asin x */
p_asin_f32(a, c, n);
for (i = 0; i < n; i++) {
tmp = pi_2 - c[i];
c[i] = tmp;
}
}
| #include <pal.h>
#include "p_asin.h"
/**
*
* Computes the inverse cosine (arc cosine) of the input vector 'a'. Input
* values to acos must be in the range -1 to 1. The result values are in the
* range 0 to pi. The function does not check for illegal input values.
*
* @param a Pointer to input vector
*
* @param c Pointer to output vector
*
* @param n Size of 'a' and 'c' vector.
*
* @return None
*
*/
void p_acos_f32(const float *a, float *c, int n)
{
int i;
/* acos x = pi/2 - asin x */
for (i = 0; i < n; i++) {
c[i] = pi_2 - _p_asin(a[i]);
}
}
| Use the inline inverse sine function. | math:acos: Use the inline inverse sine function.
Signed-off-by: Mansour Moufid <[email protected]>
| C | apache-2.0 | parallella/pal,Adamszk/pal3,olajep/pal,olajep/pal,olajep/pal,debug-de-su-ka/pal,mateunho/pal,debug-de-su-ka/pal,parallella/pal,parallella/pal,mateunho/pal,mateunho/pal,debug-de-su-ka/pal,8l/pal,8l/pal,aolofsson/pal,eliteraspberries/pal,aolofsson/pal,debug-de-su-ka/pal,eliteraspberries/pal,Adamszk/pal3,aolofsson/pal,parallella/pal,8l/pal,eliteraspberries/pal,olajep/pal,eliteraspberries/pal,eliteraspberries/pal,aolofsson/pal,Adamszk/pal3,mateunho/pal,mateunho/pal,Adamszk/pal3,8l/pal,debug-de-su-ka/pal,parallella/pal |
bd3b812d2340b724a7844d29f72a26aa20c7edf7 | examples/serial/helloserial.c | examples/serial/helloserial.c | /*-
* Copyright (c) 2008 Benjamin Close <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/**
* This simple program will output hello world to the serial port
* and read back a line of input from the port
*/
#include <stdio.h>
#include <stdlib.h>
#include <wcl/serial.h>
#define DEVICE "/dev/ttyS0"
#define BUFSIZE 4096
use namespace wcl;
int main( int argc, char **args )
{
// Create a serial object
char buffer[BUFSIZE+1] = {0};
Serial s;
// Open the serial port, checking that it opened
if ( s.open( DEVICE, BAUD_115200, /* Use default for all other arguments */) == false ){
printf("Failed to open serial port\n");
exit(EXIT_FAILURE);
}
// Send hello world down the serial line
if ( s.write( "Hello World!") == false ){
printf("Failed to write hello world\n");
exit(EXIT_FAILURE);
}
// Read back a line (about BUFSIZE characters from the port)
if ( s.read( buffer, BUFSIZE )){
printf("Failed to read from device\n");
exit(EXIT_FAILURE);
}
printf("You got a message: %*s\n", buffer )
// Close the serial port and restore the previous state of the port
s.close()
return 0;
}
| Add a simple untested example how to use the basics of the serial port class | Add a simple untested example how to use the basics of the serial port class
| C | bsd-2-clause | WearableComputerLab/LibWCL,WearableComputerLab/LibWCL,WearableComputerLab/LibWCL,WearableComputerLab/LibWCL |
|
cb3e05bc8b912e716811406333c5deedc06824be | src/condor_ckpt/condor_syscalls.h | src/condor_ckpt/condor_syscalls.h | #ifndef _CONDOR_SYSCALLS_H
#define _CONDOR_SYSCALLS_H
typedef int BOOL;
static const int SYS_LOCAL = 1;
static const int SYS_REMOTE = 0;
static const int SYS_RECORDED = 2;
static const int SYS_MAPPED = 2;
static const int SYS_UNRECORDED = 0;
static const int SYS_UNMAPPED = 0;
#if defined(__cplusplus)
extern "C" {
#endif
int SetSyscalls( int mode );
BOOL LocalSysCalls();
BOOL RemoteSysCalls();
BOOL MappingFileDescriptors();
int REMOTE_syscall( int syscall_num, ... );
int syscall( int, ... );
#if defined(__cplusplus)
}
#endif
#endif
| #ifndef _CONDOR_SYSCALLS_H
#define _CONDOR_SYSCALLS_H
#if defined( AIX32)
# include "syscall.aix32.h"
#else
# include <syscall.h>
#endif
typedef int BOOL;
static const int SYS_LOCAL = 1;
static const int SYS_REMOTE = 0;
static const int SYS_RECORDED = 2;
static const int SYS_MAPPED = 2;
static const int SYS_UNRECORDED = 0;
static const int SYS_UNMAPPED = 0;
#if defined(__cplusplus)
extern "C" {
#endif
int SetSyscalls( int mode );
BOOL LocalSysCalls();
BOOL RemoteSysCalls();
BOOL MappingFileDescriptors();
int REMOTE_syscall( int syscall_num, ... );
#if defined(AIX32) && defined(__cplusplus)
int syscall( ... );
#else
int syscall( int, ... );
#endif
#if defined(__cplusplus)
}
#endif
#endif
| Add inclusion of "syscall.aix32.h" or <syscall.h> depending on whether we are on an AIX machine where there is no <syscall.h>. | Add inclusion of "syscall.aix32.h" or <syscall.h> depending on whether
we are on an AIX machine where there is no <syscall.h>.
| C | apache-2.0 | djw8605/htcondor,htcondor/htcondor,clalancette/condor-dcloud,djw8605/condor,zhangzhehust/htcondor,neurodebian/htcondor,mambelli/osg-bosco-marco,neurodebian/htcondor,htcondor/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,htcondor/htcondor,djw8605/condor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,djw8605/htcondor,djw8605/condor,djw8605/condor,djw8605/htcondor,neurodebian/htcondor,clalancette/condor-dcloud,zhangzhehust/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,bbockelm/condor-network-accounting,djw8605/condor,neurodebian/htcondor,clalancette/condor-dcloud,htcondor/htcondor,djw8605/htcondor,djw8605/condor,mambelli/osg-bosco-marco,htcondor/htcondor,clalancette/condor-dcloud,neurodebian/htcondor,djw8605/htcondor,neurodebian/htcondor,clalancette/condor-dcloud,djw8605/htcondor,htcondor/htcondor,neurodebian/htcondor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,mambelli/osg-bosco-marco,neurodebian/htcondor,djw8605/condor,djw8605/htcondor,mambelli/osg-bosco-marco,htcondor/htcondor,bbockelm/condor-network-accounting,zhangzhehust/htcondor,djw8605/condor,mambelli/osg-bosco-marco,clalancette/condor-dcloud,clalancette/condor-dcloud,htcondor/htcondor,zhangzhehust/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,zhangzhehust/htcondor,bbockelm/condor-network-accounting |
6b15d7151f2703ce049ac9ab14b13c8b13122bf8 | http.h | http.h | #ifndef HTTP_H
#define HTTP_H
#include <stddef.h>
#define HTTP_GET 1
#define HTTP_HEAD 2
#define HTTP_POST 3
#define HTTP_PUT 4
#define HTTP_DELETE 5
#define FIELD_HOST 1
#define FIELD_LENGTH 2
#define FIELD_TYPE 3
#define ERR_BAD_REQ 0
#define ERR_NOT_FOUND 1
#define ERR_METHOD 2
#define ERR_FORBIDDEN 3
#define ERR_INTERNAL 4
typedef struct
{
int method; /* request method */
char* path; /* requested path */
char* host; /* hostname field */
char* type; /* content-type */
size_t length; /* content-length */
int flags;
}
http_request;
/* Write an error page (and header). Returns number of bytes written. */
size_t gen_error_page( int fd, int error );
/*
Write 200 Ok header with content length and content type.
Returns the number of bytes written, 0 on failure.
*/
size_t http_ok( int fd, const char* type, unsigned long size );
/* parse a HTTP request, returns non-zero on success, zero on failure */
int http_request_parse( char* buffer, http_request* request );
#endif /* HTTP_H */
| #ifndef HTTP_H
#define HTTP_H
#include <stddef.h>
#define HTTP_GET 1
#define HTTP_HEAD 2
#define HTTP_POST 3
#define HTTP_PUT 4
#define HTTP_DELETE 5
#define FIELD_HOST 1
#define FIELD_LENGTH 2
#define FIELD_TYPE 3
#define ERR_BAD_REQ 0
#define ERR_NOT_FOUND 1
#define ERR_METHOD 2
#define ERR_FORBIDDEN 3
#define ERR_INTERNAL 4
typedef struct
{
int method; /* request method */
char* path; /* requested path */
char* host; /* hostname field */
char* type; /* content-type */
size_t length; /* content-length */
}
http_request;
/* Write an error page (and header). Returns number of bytes written. */
size_t gen_error_page( int fd, int error );
/*
Write 200 Ok header with content length and content type.
Returns the number of bytes written, 0 on failure.
*/
size_t http_ok( int fd, const char* type, unsigned long size );
/* parse a HTTP request, returns non-zero on success, zero on failure */
int http_request_parse( char* buffer, http_request* request );
#endif /* HTTP_H */
| Remove unused flags field from request | Remove unused flags field from request
Signed-off-by: David Oberhollenzer <[email protected]>
| C | agpl-3.0 | AgentD/websrv,AgentD/websrv,AgentD/websrv |
d975e701138799aa01e14c4bc079e82a85da2e10 | myar.c | myar.c | #include <ar.h>
#include <ctype.h>
#include <stdio.h>
#include <sys/types.h>
#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char **argv)
{
int aflag = 0;
int bflag = 0;
char *cvalue = NULL;
int index;
int c;
int opterr = 0;
while ((c = getopt(argc, argv, "abc:")) != -1)
switch (c)
{
case 'a':
aflag = 1;
break;
case 'b':
bflag = 1;
break;
case 'c':
cvalue = optarg;
break;
case '?':
if (optopt == 'c')
fprintf (stderr, "Option -%c requires an argument.\n", optopt);
else if (isprint (optopt))
fprintf (stderr, "Unknown option `-%c'.\n", optopt);
else
fprintf (stderr,
"Unknown option character `\\x%x'.\n",
optopt);
return 1;
default:
abort();
}
printf ("aflag = %d, bflag = %d, cvalue = %s\n",
aflag, bflag, cvalue);
for (index = optind; index < argc; index++)
printf ("Non-option argument %s\n", argv[index]);
return 0;
}
| Add getopt working example from gnu.org | Add getopt working example from gnu.org
| C | unlicense | chancez/ar,ecnahc515/ar |
|
e31dfde23efa02f2f5480904fd0c895ce08acd9b | MONITOR/SORNotifier.h | MONITOR/SORNotifier.h | /**************************************************************************
* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice *
**************************************************************************/
#ifndef SORNOTIFIER_H
#define SORNOTIFIER_H
//______________________________________________________________________________
//
// ECS Start-of-Run notifier
//
// This class "listens" to the SOR coming from the ECS.
//
// DIM
#include <dic.hxx>
class AliOnlineRecoTrigger;
class SORNotifier: public DimUpdatedInfo
{
public:
SORNotifier(AliOnlineRecoTrigger* trigger):
DimUpdatedInfo("/LOGBOOK/SUBSCRIBE/ECS_SOR_PHYSICS", -1), fRun(-1), fTrigger(trigger) {}
void infoHandler();
void errorHandler(int severity, int code, char *msg);
int GetRun() const {return fRun;}
private:
SORNotifier(const SORNotifier& other);
SORNotifier& operator = (const SORNotifier& other);
int fRun;
AliOnlineRecoTrigger* fTrigger;
};
#endif
| /**************************************************************************
* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice *
**************************************************************************/
#ifndef SORNOTIFIER_H
#define SORNOTIFIER_H
//______________________________________________________________________________
//
// ECS Start-of-Run notifier
//
// This class "listens" to the SOR coming from the ECS.
//
// DIM
#include <dic.hxx>
class AliOnlineRecoTrigger;
class SORNotifier: public DimUpdatedInfo
{
public:
SORNotifier(AliOnlineRecoTrigger* trigger):
DimUpdatedInfo("/LOGBOOK/SUBSCRIBE/DAQ_SOR_PHYSICS", -1), fRun(-1), fTrigger(trigger) {}
void infoHandler();
void errorHandler(int severity, int code, char *msg);
int GetRun() const {return fRun;}
private:
SORNotifier(const SORNotifier& other);
SORNotifier& operator = (const SORNotifier& other);
int fRun;
AliOnlineRecoTrigger* fTrigger;
};
#endif
| Correct DIM service is DAQ_SOR_PHYSICS. In this case we get the trigger config from the logbook. | Correct DIM service is DAQ_SOR_PHYSICS. In this case we get the trigger config from the logbook.
| C | bsd-3-clause | miranov25/AliRoot,sebaleh/AliRoot,miranov25/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,coppedis/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,ALICEHLT/AliRoot,coppedis/AliRoot,miranov25/AliRoot,shahor02/AliRoot,coppedis/AliRoot,miranov25/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,alisw/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,alisw/AliRoot,sebaleh/AliRoot,shahor02/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,ALICEHLT/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,jgrosseo/AliRoot,miranov25/AliRoot,alisw/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,miranov25/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,shahor02/AliRoot,coppedis/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,jgrosseo/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,coppedis/AliRoot,coppedis/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,shahor02/AliRoot,alisw/AliRoot |
b2f051ae390432789f2b02fe451aa23ae2698e3d | include/asm-frv/irq.h | include/asm-frv/irq.h | /* irq.h: FRV IRQ definitions
*
* Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
* Written by David Howells ([email protected])
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#ifndef _ASM_IRQ_H_
#define _ASM_IRQ_H_
/* this number is used when no interrupt has been assigned */
#define NO_IRQ (-1)
#define NR_IRQS 48
#define IRQ_BASE_CPU (0 * 16)
#define IRQ_BASE_FPGA (1 * 16)
#define IRQ_BASE_MB93493 (2 * 16)
/* probe returns a 32-bit IRQ mask:-/ */
#define MIN_PROBE_IRQ (NR_IRQS - 32)
#ifndef __ASSEMBLY__
static inline int irq_canonicalize(int irq)
{
return irq;
}
#endif
#endif /* _ASM_IRQ_H_ */
| /* irq.h: FRV IRQ definitions
*
* Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
* Written by David Howells ([email protected])
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#ifndef _ASM_IRQ_H_
#define _ASM_IRQ_H_
#define NR_IRQS 48
#define IRQ_BASE_CPU (0 * 16)
#define IRQ_BASE_FPGA (1 * 16)
#define IRQ_BASE_MB93493 (2 * 16)
/* probe returns a 32-bit IRQ mask:-/ */
#define MIN_PROBE_IRQ (NR_IRQS - 32)
#ifndef __ASSEMBLY__
static inline int irq_canonicalize(int irq)
{
return irq;
}
#endif
#endif /* _ASM_IRQ_H_ */
| Remove bogus NO_IRQ = -1 define | frv: Remove bogus NO_IRQ = -1 define
The old NO_IRQ define some platforms had was long ago declared obsolete
and wrong. FRV should therefore not be re-introducing this, especially as
IRQs are usually unsigned in the kernel. The "no IRQ" case is defined to be
zero and Linus made this rather clear at the time.
arch/frv shows no dependancy on this but it might show up driver fixes
needing doing I guess
Signed-off-by: Alan Cox <[email protected]>
Acked-by: David Howells <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
| C | mit | KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas |
36b7e11186070ed405e73db8666b21c41e55aa5a | prompt.c | prompt.c | #include <stdio.h>
#include <stdlib.h>
/* I am intentionally not doing the Windows portability stuff here
since I am doing this for the language-implementation aspect,
rather than the portability aspect. If it turns out the portability
stuff is a big deal, I will come back and add in that code. -MAW */
#include <editline/readline.h>
int main(int argc, char **argv) {
/* Print Version and Exit information */
puts("Lispy Version 0.0.0.0.1");
puts("Press Ctrl-C to exit\n");
while(1) {
/* prompt: */
char *input = readline("lispy> ");
/* add input to command history */
add_history(input);
printf("No, you're a %s\n", input);
/* input was dynamically allocated */
free(input);
}
return 0;
}
| #include <stdio.h>
#include <stdlib.h>
/* I am intentionally not doing the Windows portability stuff here
since I am doing this for the language-implementation aspect,
rather than the portability aspect. If it turns out the portability
stuff is a big deal, I will come back and add in that code. -MAW */
/* Fun SO link on target platform detection:
http://stackoverflow.com/a/5920028/3435397 */
#include <editline/readline.h>
int main(int argc, char **argv) {
/* Print Version and Exit information */
puts("Lispy Version 0.0.0.0.1");
puts("Press Ctrl-C to exit\n");
while(1) {
/* prompt: */
char *input = readline("lispy> ");
/* add input to command history */
add_history(input);
printf("No, you're a %s\n", input);
/* input was dynamically allocated */
free(input);
}
return 0;
}
| Add a link to an SO answer about platform detection | Add a link to an SO answer about platform detection
| C | mit | MattyDub/my-own-lisp |
51d5be75475f3d03445f02b34dbaf9b5a31174c5 | src/host/os_isfile.c | src/host/os_isfile.c | /**
* \file os_isfile.c
* \brief Returns true if the given file exists on the file system.
* \author Copyright (c) 2002-2008 Jason Perkins and the Premake project
*/
#include <sys/stat.h>
#include "premake.h"
int os_isfile(lua_State* L)
{
const char* filename = luaL_checkstring(L, 1);
lua_pushboolean(L, do_isfile(filename));
return 1;
}
int do_isfile(const char* filename)
{
struct stat buf;
#if PLATFORM_WINDOWS
DWORD attrib = GetFileAttributesA(filename);
if (attrib != INVALID_FILE_ATTRIBUTES)
{
return (attrib & FILE_ATTRIBUTE_DIRECTORY) == 0;
}
#else
if (stat(filename, &buf) == 0)
{
return ((buf.st_mode & S_IFDIR) == 0);
}
#endif
return 0;
}
| /**
* \file os_isfile.c
* \brief Returns true if the given file exists on the file system.
* \author Copyright (c) 2002-2008 Jason Perkins and the Premake project
*/
#include <sys/stat.h>
#include "premake.h"
int os_isfile(lua_State* L)
{
const char* filename = luaL_checkstring(L, 1);
lua_pushboolean(L, do_isfile(filename));
return 1;
}
int do_isfile(const char* filename)
{
#if PLATFORM_WINDOWS
DWORD attrib = GetFileAttributesA(filename);
if (attrib != INVALID_FILE_ATTRIBUTES)
{
return (attrib & FILE_ATTRIBUTE_DIRECTORY) == 0;
}
#else
struct stat buf;
if (stat(filename, &buf) == 0)
{
return ((buf.st_mode & S_IFDIR) == 0);
}
#endif
return 0;
}
| Fix a new Visual Studio unused variable build warning | Fix a new Visual Studio unused variable build warning
| C | bsd-3-clause | LORgames/premake-core,CodeAnxiety/premake-core,bravnsgaard/premake-core,dcourtois/premake-core,CodeAnxiety/premake-core,sleepingwit/premake-core,premake/premake-core,resetnow/premake-core,lizh06/premake-core,TurkeyMan/premake-core,premake/premake-core,Blizzard/premake-core,CodeAnxiety/premake-core,Zefiros-Software/premake-core,aleksijuvani/premake-core,tvandijck/premake-core,mandersan/premake-core,mandersan/premake-core,noresources/premake-core,aleksijuvani/premake-core,aleksijuvani/premake-core,starkos/premake-core,jstewart-amd/premake-core,LORgames/premake-core,mandersan/premake-core,xriss/premake-core,TurkeyMan/premake-core,CodeAnxiety/premake-core,starkos/premake-core,sleepingwit/premake-core,mandersan/premake-core,lizh06/premake-core,noresources/premake-core,tvandijck/premake-core,mendsley/premake-core,jstewart-amd/premake-core,premake/premake-core,soundsrc/premake-core,xriss/premake-core,premake/premake-core,mendsley/premake-core,mendsley/premake-core,dcourtois/premake-core,starkos/premake-core,lizh06/premake-core,dcourtois/premake-core,noresources/premake-core,bravnsgaard/premake-core,dcourtois/premake-core,Blizzard/premake-core,noresources/premake-core,noresources/premake-core,soundsrc/premake-core,resetnow/premake-core,sleepingwit/premake-core,martin-traverse/premake-core,soundsrc/premake-core,mendsley/premake-core,tvandijck/premake-core,CodeAnxiety/premake-core,bravnsgaard/premake-core,bravnsgaard/premake-core,xriss/premake-core,dcourtois/premake-core,starkos/premake-core,TurkeyMan/premake-core,aleksijuvani/premake-core,dcourtois/premake-core,aleksijuvani/premake-core,soundsrc/premake-core,dcourtois/premake-core,Blizzard/premake-core,soundsrc/premake-core,starkos/premake-core,Blizzard/premake-core,Zefiros-Software/premake-core,jstewart-amd/premake-core,resetnow/premake-core,TurkeyMan/premake-core,starkos/premake-core,resetnow/premake-core,tvandijck/premake-core,premake/premake-core,martin-traverse/premake-core,martin-traverse/premake-core,resetnow/premake-core,sleepingwit/premake-core,sleepingwit/premake-core,Zefiros-Software/premake-core,xriss/premake-core,lizh06/premake-core,bravnsgaard/premake-core,Blizzard/premake-core,premake/premake-core,jstewart-amd/premake-core,martin-traverse/premake-core,mendsley/premake-core,LORgames/premake-core,Zefiros-Software/premake-core,premake/premake-core,jstewart-amd/premake-core,xriss/premake-core,noresources/premake-core,LORgames/premake-core,Blizzard/premake-core,LORgames/premake-core,tvandijck/premake-core,TurkeyMan/premake-core,mandersan/premake-core,noresources/premake-core,starkos/premake-core,Zefiros-Software/premake-core |
9a3831ff69c0f341416b38bab7d9f27ebbda2304 | src/imap/cmd-close.c | src/imap/cmd-close.c | /* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */
#include "common.h"
#include "commands.h"
#include "imap-expunge.h"
bool cmd_close(struct client_command_context *cmd)
{
struct client *client = cmd->client;
struct mailbox *mailbox = client->mailbox;
struct mail_storage *storage;
if (!client_verify_open_mailbox(cmd))
return TRUE;
storage = mailbox_get_storage(mailbox);
client->mailbox = NULL;
if (!imap_expunge(mailbox, NULL))
client_send_untagged_storage_error(client, storage);
if (mailbox_close(&mailbox) < 0)
client_send_untagged_storage_error(client, storage);
client_update_mailbox_flags(client, NULL);
client_send_tagline(cmd, "OK Close completed.");
return TRUE;
}
| /* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */
#include "common.h"
#include "commands.h"
#include "imap-expunge.h"
bool cmd_close(struct client_command_context *cmd)
{
struct client *client = cmd->client;
struct mailbox *mailbox = client->mailbox;
struct mail_storage *storage;
if (!client_verify_open_mailbox(cmd))
return TRUE;
storage = mailbox_get_storage(mailbox);
client->mailbox = NULL;
if (!imap_expunge(mailbox, NULL))
client_send_untagged_storage_error(client, storage);
else if (mailbox_sync(mailbox, 0, 0, NULL) < 0)
client_send_untagged_storage_error(client, storage);
if (mailbox_close(&mailbox) < 0)
client_send_untagged_storage_error(client, storage);
client_update_mailbox_flags(client, NULL);
client_send_tagline(cmd, "OK Close completed.");
return TRUE;
}
| Synchronize the mailbox after expunging messages to actually get them expunged. | CLOSE: Synchronize the mailbox after expunging messages to actually get them
expunged.
--HG--
branch : HEAD
| C | mit | dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot |
cefe89625e4728d349d8d3db1b9c81268178449d | lib/GPIOlib.h | lib/GPIOlib.h | #ifndef GPIOLIB_H
#define GPIOLIB_H
#define FORWARD 1
#define BACKWARD 0
namespace GPIO
{
int init();
int controlLeft(int direction,int speed);
int controlRight(int direction,int speed);
int stopLeft();
int stopRight();
int resetCounter();
void getCounter(int *countLeft,int *countRight);
int turnTo(int angle);
void delay(int milliseconds);
}
#endif
| #ifndef GPIOLIB_H
#define GPIOLIB_H
#define FORWARD 1
#define BACKWARD 0
namespace GPIO
{
int init();
//direction is either FORWARD or BACKWARD. speed can be an integer ranging from 0 to 100.
int controlLeft(int direction,int speed);
int controlRight(int direction,int speed);
int stopLeft();
int stopRight();
int resetCounter();
void getCounter(int *countLeft,int *countRight);
//angle is available in the range of -90 to 90.
int turnTo(int angle);
void delay(int milliseconds);
}
#endif
| Add some comments in the header file for understanding | Add some comments in the header file for understanding
| C | mit | miaoxw/EmbeddedSystemNJU2017-Demo |
0052a0243d9c979a06ef273af965508103c456e0 | src/include/utils/hashutils.h | src/include/utils/hashutils.h | /*
* Utilities for working with hash values.
*
* Portions Copyright (c) 2017, PostgreSQL Global Development Group
*/
#ifndef HASHUTILS_H
#define HASHUTILS_H
/*
* Combine two hash values, resulting in another hash value, with decent bit
* mixing.
*
* Similar to boost's hash_combine().
*/
static inline uint32
hash_combine(uint32 a, uint32 b)
{
a ^= b + 0x9e3779b9 + (a << 6) + (a >> 2);
return a;
}
#endif /* HASHUTILS_H */
| Add a hash_combine function for mixing hash values. | Add a hash_combine function for mixing hash values.
This hash function is derived from Boost's function of the same name.
Author: Andres Freund, Thomas Munro
Discussion: https://postgr.es/m/CAEepm%3D3rdgjfxW4cKvJ0OEmya2-34B0qHNG1xV0vK7TGPJGMUQ%40mail.gmail.com
Discussion: https://postgr.es/m/20170731210844.3cwrkmsmbbpt4rjc%40alap3.anarazel.de
| C | apache-2.0 | greenplum-db/gpdb,50wu/gpdb,adam8157/gpdb,lisakowen/gpdb,xinzweb/gpdb,xinzweb/gpdb,50wu/gpdb,50wu/gpdb,adam8157/gpdb,lisakowen/gpdb,adam8157/gpdb,greenplum-db/gpdb,adam8157/gpdb,xinzweb/gpdb,lisakowen/gpdb,greenplum-db/gpdb,xinzweb/gpdb,xinzweb/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,adam8157/gpdb,50wu/gpdb,xinzweb/gpdb,greenplum-db/gpdb,50wu/gpdb,greenplum-db/gpdb,50wu/gpdb,adam8157/gpdb,lisakowen/gpdb,50wu/gpdb,xinzweb/gpdb,xinzweb/gpdb,adam8157/gpdb,50wu/gpdb,lisakowen/gpdb,adam8157/gpdb,lisakowen/gpdb,lisakowen/gpdb,lisakowen/gpdb |
|
fea168823acd6c1c50d3d366798a4314c79e6dc9 | src/backend/port/dynloader/osf.c | src/backend/port/dynloader/osf.c | /* Dummy file used for nothing at this point
*
* see alpha.h
* $PostgreSQL: pgsql/src/backend/port/dynloader/osf.c,v 1.2 2006/03/11 04:38:31 momjian Exp $
*/
| /*
* $PostgreSQL: pgsql/src/backend/port/dynloader/osf.c,v 1.3 2009/04/21 21:05:25 tgl Exp $
*
* Dummy file used for nothing at this point
*
* see osf.h
*/
| Fix obsolete cross-reference (this file isn't called alpha.c anymore) | Fix obsolete cross-reference (this file isn't called alpha.c anymore)
| C | mpl-2.0 | Postgres-XL/Postgres-XL,tpostgres-projects/tPostgres,greenplum-db/gpdb,edespino/gpdb,pavanvd/postgres-xl,tpostgres-projects/tPostgres,edespino/gpdb,ashwinstar/gpdb,oberstet/postgres-xl,jmcatamney/gpdb,arcivanov/postgres-xl,ovr/postgres-xl,yuanzhao/gpdb,50wu/gpdb,adam8157/gpdb,yuanzhao/gpdb,zeroae/postgres-xl,techdragon/Postgres-XL,arcivanov/postgres-xl,yazun/postgres-xl,jmcatamney/gpdb,jmcatamney/gpdb,Chibin/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,snaga/postgres-xl,zeroae/postgres-xl,yazun/postgres-xl,yuanzhao/gpdb,jmcatamney/gpdb,pavanvd/postgres-xl,oberstet/postgres-xl,lisakowen/gpdb,yuanzhao/gpdb,yazun/postgres-xl,arcivanov/postgres-xl,yuanzhao/gpdb,ashwinstar/gpdb,edespino/gpdb,tpostgres-projects/tPostgres,lisakowen/gpdb,ovr/postgres-xl,ashwinstar/gpdb,adam8157/gpdb,50wu/gpdb,50wu/gpdb,Postgres-XL/Postgres-XL,Chibin/gpdb,lisakowen/gpdb,ashwinstar/gpdb,snaga/postgres-xl,snaga/postgres-xl,techdragon/Postgres-XL,postmind-net/postgres-xl,yazun/postgres-xl,xinzweb/gpdb,edespino/gpdb,techdragon/Postgres-XL,pavanvd/postgres-xl,postmind-net/postgres-xl,yuanzhao/gpdb,50wu/gpdb,edespino/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,adam8157/gpdb,jmcatamney/gpdb,Chibin/gpdb,oberstet/postgres-xl,postmind-net/postgres-xl,ashwinstar/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,zeroae/postgres-xl,greenplum-db/gpdb,Chibin/gpdb,yuanzhao/gpdb,pavanvd/postgres-xl,lisakowen/gpdb,oberstet/postgres-xl,xinzweb/gpdb,oberstet/postgres-xl,edespino/gpdb,yuanzhao/gpdb,edespino/gpdb,Chibin/gpdb,pavanvd/postgres-xl,postmind-net/postgres-xl,tpostgres-projects/tPostgres,ovr/postgres-xl,Chibin/gpdb,adam8157/gpdb,jmcatamney/gpdb,lisakowen/gpdb,xinzweb/gpdb,edespino/gpdb,techdragon/Postgres-XL,lisakowen/gpdb,xinzweb/gpdb,50wu/gpdb,lisakowen/gpdb,arcivanov/postgres-xl,greenplum-db/gpdb,xinzweb/gpdb,yazun/postgres-xl,Chibin/gpdb,snaga/postgres-xl,Postgres-XL/Postgres-XL,greenplum-db/gpdb,ovr/postgres-xl,yuanzhao/gpdb,adam8157/gpdb,adam8157/gpdb,yuanzhao/gpdb,postmind-net/postgres-xl,kmjungersen/PostgresXL,techdragon/Postgres-XL,adam8157/gpdb,ashwinstar/gpdb,xinzweb/gpdb,edespino/gpdb,Chibin/gpdb,Chibin/gpdb,arcivanov/postgres-xl,Postgres-XL/Postgres-XL,Postgres-XL/Postgres-XL,arcivanov/postgres-xl,tpostgres-projects/tPostgres,jmcatamney/gpdb,snaga/postgres-xl,50wu/gpdb,zeroae/postgres-xl,ovr/postgres-xl,edespino/gpdb,kmjungersen/PostgresXL,Chibin/gpdb,kmjungersen/PostgresXL,greenplum-db/gpdb,50wu/gpdb,kmjungersen/PostgresXL,50wu/gpdb,zeroae/postgres-xl,xinzweb/gpdb,xinzweb/gpdb,lisakowen/gpdb,adam8157/gpdb,kmjungersen/PostgresXL |
159caac86902add83f4ff3a2d813559144806f98 | src/forces/label_state.h | src/forces/label_state.h | #ifndef SRC_FORCES_LABEL_STATE_H_
#define SRC_FORCES_LABEL_STATE_H_
#include <Eigen/Core>
#include <string>
namespace Forces
{
/**
* \brief
*
*
*/
class LabelState
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
LabelState(int id, std::string text, Eigen::Vector3f anchorPosition);
const int id;
const Eigen::Vector3f anchorPosition;
Eigen::Vector3f labelPosition;
Eigen::Vector2f anchorPosition2D;
Eigen::Vector2f labelPosition2D;
float labelPositionDepth;
private:
std::string text;
};
} // namespace Forces
#endif // SRC_FORCES_LABEL_STATE_H_
| #ifndef SRC_FORCES_LABEL_STATE_H_
#define SRC_FORCES_LABEL_STATE_H_
#include <Eigen/Core>
#include <string>
namespace Forces
{
/**
* \brief
*
*
*/
class LabelState
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
LabelState(int id, std::string text, Eigen::Vector3f anchorPosition);
const int id;
const Eigen::Vector3f anchorPosition;
Eigen::Vector3f labelPosition;
Eigen::Vector2f anchorPosition2D;
Eigen::Vector2f labelPosition2D;
float labelPositionDepth;
const std::string text;
};
} // namespace Forces
#endif // SRC_FORCES_LABEL_STATE_H_
| Make text in LabelState public. | Make text in LabelState public.
| C | mit | Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller |
83bd9b0b1e7de15e9f5c95fdc50b35d0379ce2c8 | 7segments.c | 7segments.c | main(int u,char**a){for(char*c,y;y=u;u*=8)for(c=a[1];*c;)printf("%c%c%c%c",(y="$ֶ<&"[*c++-48])&u/2?33:32,y&u?95:32,y&u/4?33:32,*c?32:10);} | main(int u,char**a){for(char*c,y;y=u;u*=8,puts(""))for(c=a[1];*c;)printf("%c%c%c ",(y="$ֶ<&"[*c++-48])&u/2?33:32,y&u?95:32,y&u/4?33:32);} | Use puts again in a better position, save one byte (143) | Use puts again in a better position, save one byte (143)
| C | mit | McZonk/7segements,McZonk/7segements |
8d240fe14188fbd325749079039b6dd03f968a47 | reflex/test/testDict2/ClassN.h | reflex/test/testDict2/ClassN.h | #ifndef DICT2_CLASSN_H
#define DICT2_CLASSN_H
#include "ClassI.h"
#include "ClassL.h"
class ClassN: /* public ClassI, */ public ClassL {
public:
ClassN() : fN('n') {}
virtual ~ClassN() {}
int n() { return fN; }
void setN(int v) { fN = v; }
private:
int fN;
};
#endif // DICT2_CLASSN_H
| Test class to check for ambiguities in the dictionary source code in case of non virtual diamonds | Test class to check for ambiguities in the dictionary source code in case of
non virtual diamonds
git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@16987 27541ba8-7e3a-0410-8455-c3a389f83636
| C | lgpl-2.1 | gbitzes/root,agarciamontoro/root,mkret2/root,pspe/root,mhuwiler/rootauto,georgtroska/root,CristinaCristescu/root,Duraznos/root,gganis/root,sbinet/cxx-root,veprbl/root,lgiommi/root,omazapa/root-old,abhinavmoudgil95/root,pspe/root,BerserkerTroll/root,pspe/root,buuck/root,krafczyk/root,jrtomps/root,strykejern/TTreeReader,satyarth934/root,lgiommi/root,karies/root,alexschlueter/cern-root,nilqed/root,perovic/root,dfunke/root,olifre/root,mhuwiler/rootauto,tc3t/qoot,esakellari/my_root_for_test,root-mirror/root,sbinet/cxx-root,smarinac/root,mkret2/root,BerserkerTroll/root,Dr15Jones/root,agarciamontoro/root,zzxuanyuan/root-compressor-dummy,mattkretz/root,Y--/root,Dr15Jones/root,buuck/root,mkret2/root,abhinavmoudgil95/root,pspe/root,beniz/root,bbockelm/root,CristinaCristescu/root,bbockelm/root,veprbl/root,ffurano/root5,sirinath/root,georgtroska/root,thomaskeck/root,simonpf/root,vukasinmilosevic/root,perovic/root,BerserkerTroll/root,esakellari/root,omazapa/root-old,satyarth934/root,abhinavmoudgil95/root,sbinet/cxx-root,sbinet/cxx-root,davidlt/root,satyarth934/root,veprbl/root,bbockelm/root,sawenzel/root,sawenzel/root,gbitzes/root,tc3t/qoot,Duraznos/root,dfunke/root,lgiommi/root,krafczyk/root,arch1tect0r/root,cxx-hep/root-cern,perovic/root,buuck/root,olifre/root,kirbyherm/root-r-tools,evgeny-boger/root,beniz/root,root-mirror/root,sirinath/root,jrtomps/root,beniz/root,CristinaCristescu/root,bbockelm/root,simonpf/root,zzxuanyuan/root,karies/root,ffurano/root5,thomaskeck/root,CristinaCristescu/root,Duraznos/root,arch1tect0r/root,kirbyherm/root-r-tools,root-mirror/root,Duraznos/root,arch1tect0r/root,0x0all/ROOT,Duraznos/root,georgtroska/root,pspe/root,ffurano/root5,evgeny-boger/root,abhinavmoudgil95/root,krafczyk/root,abhinavmoudgil95/root,vukasinmilosevic/root,mattkretz/root,zzxuanyuan/root,Dr15Jones/root,zzxuanyuan/root,CristinaCristescu/root,davidlt/root,sbinet/cxx-root,simonpf/root,buuck/root,sawenzel/root,jrtomps/root,arch1tect0r/root,evgeny-boger/root,zzxuanyuan/root-compressor-dummy,dfunke/root,esakellari/my_root_for_test,mattkretz/root,mhuwiler/rootauto,esakellari/root,esakellari/my_root_for_test,omazapa/root-old,olifre/root,simonpf/root,sbinet/cxx-root,davidlt/root,esakellari/root,karies/root,evgeny-boger/root,agarciamontoro/root,omazapa/root-old,mattkretz/root,arch1tect0r/root,gbitzes/root,ffurano/root5,simonpf/root,bbockelm/root,perovic/root,nilqed/root,Dr15Jones/root,omazapa/root,satyarth934/root,nilqed/root,mattkretz/root,olifre/root,evgeny-boger/root,karies/root,nilqed/root,omazapa/root-old,dfunke/root,tc3t/qoot,arch1tect0r/root,lgiommi/root,gbitzes/root,gbitzes/root,zzxuanyuan/root-compressor-dummy,agarciamontoro/root,sirinath/root,zzxuanyuan/root,agarciamontoro/root,Y--/root,sawenzel/root,agarciamontoro/root,alexschlueter/cern-root,beniz/root,CristinaCristescu/root,Duraznos/root,beniz/root,esakellari/root,sawenzel/root,esakellari/root,esakellari/my_root_for_test,gbitzes/root,vukasinmilosevic/root,Duraznos/root,gganis/root,lgiommi/root,kirbyherm/root-r-tools,gganis/root,jrtomps/root,georgtroska/root,root-mirror/root,agarciamontoro/root,buuck/root,davidlt/root,karies/root,kirbyherm/root-r-tools,zzxuanyuan/root-compressor-dummy,evgeny-boger/root,omazapa/root,satyarth934/root,gbitzes/root,krafczyk/root,vukasinmilosevic/root,pspe/root,strykejern/TTreeReader,mhuwiler/rootauto,vukasinmilosevic/root,zzxuanyuan/root,abhinavmoudgil95/root,mkret2/root,simonpf/root,simonpf/root,strykejern/TTreeReader,sirinath/root,vukasinmilosevic/root,vukasinmilosevic/root,zzxuanyuan/root-compressor-dummy,beniz/root,mkret2/root,nilqed/root,satyarth934/root,zzxuanyuan/root,gganis/root,vukasinmilosevic/root,tc3t/qoot,evgeny-boger/root,strykejern/TTreeReader,evgeny-boger/root,agarciamontoro/root,tc3t/qoot,perovic/root,BerserkerTroll/root,BerserkerTroll/root,veprbl/root,omazapa/root-old,cxx-hep/root-cern,root-mirror/root,arch1tect0r/root,satyarth934/root,buuck/root,mkret2/root,sirinath/root,beniz/root,mhuwiler/rootauto,krafczyk/root,strykejern/TTreeReader,veprbl/root,sirinath/root,mattkretz/root,mattkretz/root,arch1tect0r/root,0x0all/ROOT,georgtroska/root,kirbyherm/root-r-tools,alexschlueter/cern-root,alexschlueter/cern-root,bbockelm/root,Duraznos/root,esakellari/my_root_for_test,perovic/root,karies/root,cxx-hep/root-cern,bbockelm/root,Y--/root,sbinet/cxx-root,root-mirror/root,abhinavmoudgil95/root,jrtomps/root,thomaskeck/root,BerserkerTroll/root,perovic/root,krafczyk/root,smarinac/root,satyarth934/root,smarinac/root,olifre/root,krafczyk/root,dfunke/root,root-mirror/root,tc3t/qoot,veprbl/root,buuck/root,gganis/root,mattkretz/root,veprbl/root,Y--/root,tc3t/qoot,beniz/root,esakellari/my_root_for_test,veprbl/root,evgeny-boger/root,nilqed/root,BerserkerTroll/root,omazapa/root-old,nilqed/root,esakellari/my_root_for_test,veprbl/root,karies/root,CristinaCristescu/root,zzxuanyuan/root-compressor-dummy,olifre/root,kirbyherm/root-r-tools,simonpf/root,thomaskeck/root,Y--/root,georgtroska/root,root-mirror/root,nilqed/root,0x0all/ROOT,mattkretz/root,omazapa/root,dfunke/root,agarciamontoro/root,tc3t/qoot,beniz/root,davidlt/root,sirinath/root,krafczyk/root,sawenzel/root,georgtroska/root,BerserkerTroll/root,jrtomps/root,dfunke/root,BerserkerTroll/root,lgiommi/root,mkret2/root,Dr15Jones/root,cxx-hep/root-cern,cxx-hep/root-cern,thomaskeck/root,simonpf/root,davidlt/root,sirinath/root,dfunke/root,dfunke/root,zzxuanyuan/root,veprbl/root,lgiommi/root,pspe/root,olifre/root,zzxuanyuan/root-compressor-dummy,sirinath/root,esakellari/root,cxx-hep/root-cern,agarciamontoro/root,georgtroska/root,omazapa/root,evgeny-boger/root,0x0all/ROOT,jrtomps/root,davidlt/root,esakellari/root,CristinaCristescu/root,agarciamontoro/root,omazapa/root-old,esakellari/root,simonpf/root,ffurano/root5,zzxuanyuan/root,esakellari/my_root_for_test,georgtroska/root,zzxuanyuan/root-compressor-dummy,ffurano/root5,gganis/root,tc3t/qoot,karies/root,sawenzel/root,CristinaCristescu/root,gbitzes/root,dfunke/root,mkret2/root,Dr15Jones/root,omazapa/root,bbockelm/root,0x0all/ROOT,omazapa/root,sbinet/cxx-root,thomaskeck/root,perovic/root,buuck/root,sbinet/cxx-root,sawenzel/root,mhuwiler/rootauto,olifre/root,mhuwiler/rootauto,nilqed/root,gganis/root,Y--/root,alexschlueter/cern-root,buuck/root,karies/root,mkret2/root,satyarth934/root,nilqed/root,esakellari/my_root_for_test,thomaskeck/root,davidlt/root,krafczyk/root,jrtomps/root,evgeny-boger/root,arch1tect0r/root,gbitzes/root,Y--/root,lgiommi/root,jrtomps/root,smarinac/root,abhinavmoudgil95/root,pspe/root,davidlt/root,smarinac/root,beniz/root,zzxuanyuan/root-compressor-dummy,strykejern/TTreeReader,smarinac/root,davidlt/root,tc3t/qoot,georgtroska/root,omazapa/root,esakellari/root,omazapa/root-old,gganis/root,karies/root,smarinac/root,bbockelm/root,strykejern/TTreeReader,lgiommi/root,alexschlueter/cern-root,kirbyherm/root-r-tools,veprbl/root,lgiommi/root,thomaskeck/root,0x0all/ROOT,gganis/root,sirinath/root,georgtroska/root,mattkretz/root,Dr15Jones/root,pspe/root,Y--/root,omazapa/root-old,olifre/root,perovic/root,nilqed/root,arch1tect0r/root,bbockelm/root,smarinac/root,cxx-hep/root-cern,mattkretz/root,ffurano/root5,zzxuanyuan/root,CristinaCristescu/root,sirinath/root,abhinavmoudgil95/root,gganis/root,abhinavmoudgil95/root,mkret2/root,arch1tect0r/root,BerserkerTroll/root,0x0all/ROOT,0x0all/ROOT,jrtomps/root,zzxuanyuan/root,zzxuanyuan/root,smarinac/root,vukasinmilosevic/root,Duraznos/root,gganis/root,BerserkerTroll/root,olifre/root,sawenzel/root,alexschlueter/cern-root,mkret2/root,zzxuanyuan/root-compressor-dummy,Y--/root,krafczyk/root,Y--/root,lgiommi/root,perovic/root,buuck/root,olifre/root,esakellari/my_root_for_test,sawenzel/root,esakellari/root,root-mirror/root,vukasinmilosevic/root,zzxuanyuan/root,beniz/root,esakellari/root,thomaskeck/root,mhuwiler/rootauto,cxx-hep/root-cern,buuck/root,vukasinmilosevic/root,perovic/root,dfunke/root,Duraznos/root,sbinet/cxx-root,karies/root,pspe/root,mhuwiler/rootauto,omazapa/root,Duraznos/root,sawenzel/root,sbinet/cxx-root,gbitzes/root,Y--/root,omazapa/root,root-mirror/root,bbockelm/root,omazapa/root,gbitzes/root,thomaskeck/root,pspe/root,abhinavmoudgil95/root,smarinac/root,satyarth934/root,krafczyk/root,mhuwiler/rootauto,zzxuanyuan/root-compressor-dummy,satyarth934/root,jrtomps/root,mhuwiler/rootauto,omazapa/root,0x0all/ROOT,omazapa/root-old,davidlt/root,simonpf/root,root-mirror/root,CristinaCristescu/root |
|
ecd76f902198765339c7923c2e3f8538a431ac1f | atomic_append.c | atomic_append.c | /* Exercise 5-3 */
#include <unistd.h>
#include <fcntl.h>
#include "tlpi_hdr.h"
int main (int argc, char *argv[]) {
if (argc < 3 || argc > 4) {
usageErr("%s filename num-bytes [x]", argv[0]);
}
long n = getLong(argv[2], GN_NONNEG | GN_ANY_BASE, "num-bytes");
Boolean x = argc == 4 && strcmp(argv[3], "x") == 0;
int flags = O_WRONLY | O_CREAT;
if (!x) { flags |= O_APPEND; }
int fd = open(argv[1], flags, S_IWUSR | S_IRUSR);
if (fd == -1) { errExit("open"); }
while (n-- > 0) {
if (x) {
if (lseek(fd, 0, SEEK_END) == -1) { errExit("seek"); }
}
if (write(fd, "a", 1) == -1) {
errExit("write byte a");
}
}
} | /* Exercise 5-3 */
#include <unistd.h>
#include <fcntl.h>
#include "tlpi_hdr.h"
int main (int argc, char *argv[]) {
if (argc < 3 || argc > 4) {
usageErr("%s filename num-bytes [x]", argv[0]);
}
long n = getLong(argv[2], GN_NONNEG | GN_ANY_BASE, "num-bytes");
Boolean x = argc == 4 && strcmp(argv[3], "x") == 0;
int flags = O_WRONLY | O_CREAT;
if (!x) { flags |= O_APPEND; }
int fd = open(argv[1], flags, S_IWUSR | S_IRUSR);
if (fd == -1) { errExit("open"); }
while (n-- > 0) {
if (x) {
if (lseek(fd, 0, SEEK_END) == -1) { errExit("seek"); }
}
if (write(fd, "a", 1) == -1) {
errExit("write byte a");
}
}
if (close(fd) == -1) {
errExit("close output");
}
exit(EXIT_SUCCESS);
}
| Add missing close for file descriptor | Add missing close for file descriptor
| C | mit | dalleng/tlpi-exercises,timjb/tlpi-exercises,dalleng/tlpi-exercises,timjb/tlpi-exercises |
620383bae31caa246a05bd77a1abdb88c2fb7543 | iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/SKDispatchQueue.h | iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/SKDispatchQueue.h | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*/
#if FB_SONARKIT_ENABLED
#pragma once
#import <dispatch/dispatch.h>
namespace facebook {
namespace flipper {
class DispatchQueue
{
public:
virtual void async(dispatch_block_t block) = 0;
};
class GCDQueue: public DispatchQueue
{
public:
GCDQueue(dispatch_queue_t underlyingQueue)
:_underlyingQueue(underlyingQueue) { }
void async(dispatch_block_t block) override
{
dispatch_async(_underlyingQueue, block);
}
virtual ~GCDQueue() { }
private:
dispatch_queue_t _underlyingQueue;
};
}
}
#endif
| /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*/
#if FB_SONARKIT_ENABLED
#pragma once
#import <dispatch/dispatch.h>
namespace facebook {
namespace flipper {
class DispatchQueue
{
public:
virtual void async(dispatch_block_t block) = 0;
virtual ~DispatchQueue() { }
};
class GCDQueue: public DispatchQueue
{
public:
GCDQueue(dispatch_queue_t underlyingQueue)
:_underlyingQueue(underlyingQueue) { }
void async(dispatch_block_t block) override
{
dispatch_async(_underlyingQueue, block);
}
virtual ~GCDQueue() { }
private:
dispatch_queue_t _underlyingQueue;
};
}
}
#endif
| Add virtual destructor to class with virtual functions but non-virtual destructor | Add virtual destructor to class with virtual functions but non-virtual destructor
Reviewed By: jdthomas
Differential Revision: D16954508
fbshipit-source-id: 958118843687145c1147ac5beeb2857b21332702
| C | mit | facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper |
088a3aedb31e5abdf0113f1259a2ef70eac6ee60 | src/bin/e_int_config_modules.h | src/bin/e_int_config_modules.h | /*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_INT_CONFIG_MODULES_H
#define E_INT_CONFIG_MODULES_H
EAPI E_Config_Dialog *e_int_config_modules(E_Container *con, const char *params __UNUSED__);
#endif
#endif
| /*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_INT_CONFIG_MODULES_H
#define E_INT_CONFIG_MODULES_H
EAPI E_Config_Dialog *e_int_config_modules(E_Container *con, const char *params);
#endif
#endif
| Remove __UNUSED__ as it doesn't make sense here. | Remove __UNUSED__ as it doesn't make sense here.
git-svn-id: 6ac5796aeae0cef97fb47bcc287d4ce899c6fa6e@38188 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
| C | bsd-2-clause | jordemort/e17,jordemort/e17,jordemort/e17 |
5c51a6886e92c6c4fadee9eb484e93ba54b992b9 | ivory-tower-freertos/ivory-freertos-wrapper/freertos_task_wrapper.c | ivory-tower-freertos/ivory-freertos-wrapper/freertos_task_wrapper.c |
#include "freertos_task_wrapper.h"
#include <FreeRTOS.h>
#include <task.h>
void ivory_freertos_task_create(void (*tsk)(void),
uint32_t stacksize, uint8_t priority)
{
xTaskCreate((void (*)(void*)) tsk, /* this cast is undefined behavior */
NULL, stacksize, NULL, priority, NULL);
}
void ivory_freertos_task_delay(uint32_t time_ms)
{ vTaskDelay(time_ms);
}
void ivory_freertos_task_delayuntil(uint32_t *lastwaketime, uint32_t dt)
{
vTaskDelayUntil(lastwaketime, dt);
}
uint32_t ivory_freertos_task_getmilliscount(void) {
return xTaskGetTickCount() / portTICK_RATE_MS;
}
uint32_t ivory_freertos_task_gettickcount(void) {
return xTaskGetTickCount();
}
uint32_t ivory_freertos_millistoticks(uint32_t ms)
{
return time * portTICK_RATE_MS;
}
|
#include "freertos_task_wrapper.h"
#include <FreeRTOS.h>
#include <task.h>
void ivory_freertos_task_create(void (*tsk)(void),
uint32_t stacksize, uint8_t priority)
{
xTaskCreate((void (*)(void*)) tsk, /* this cast is undefined behavior */
NULL, stacksize, NULL, priority, NULL);
}
void ivory_freertos_task_delay(uint32_t time_ms)
{ vTaskDelay(time_ms);
}
void ivory_freertos_task_delayuntil(uint32_t *lastwaketime, uint32_t dt)
{
vTaskDelayUntil(lastwaketime, dt);
}
uint32_t ivory_freertos_task_getmilliscount(void) {
return xTaskGetTickCount() / portTICK_RATE_MS;
}
uint32_t ivory_freertos_task_gettickcount(void) {
return xTaskGetTickCount();
}
uint32_t ivory_freertos_millistoticks(uint32_t ms)
{
return ms * portTICK_RATE_MS;
}
| Fix bug in ivory wrapper. | Fix bug in ivory wrapper.
| C | bsd-3-clause | GaloisInc/ivory-tower-stm32,GaloisInc/tower,GaloisInc/ivory-tower-stm32,GaloisInc/ivory-tower-stm32 |
4890773efaf26e681f53447ede232df6eb5ee809 | alura/c/adivinhacao.c | alura/c/adivinhacao.c | #include <stdio.h>
int main() {
// imprime o cabecalho do nosso jogo
printf("******************************************\n");
printf("* Bem vindo ao nosso jogo de adivinhação *\n");
printf("******************************************\n");
int numerosecreto = 42;
int chute;
for(int i = 1; i <= 3; i++) {
printf("Tentativa %d de 3\n", i);
printf("Qual é o seu chute? ");
scanf("%d", &chute);
printf("Seu chute foi %d\n", chute);
int acertou = chute == numerosecreto;
if(acertou) {
printf("Parabéns! Você acertou!\n");
printf("Jogue de novo, você é um bom jogador!\n");
break;
} else {
int maior = chute > numerosecreto;
if(maior) {
printf("Seu chute foi maior que o número secreto\n");
} else {
printf("Seu chute foi menor que o número secreto\n");
}
printf("Você errou!\n");
printf("Mas não desanime, tente de novo!\n");
}
}
printf("Fim de jogo!\n");
}
| #include <stdio.h>
#define NUMERO_DE_TENTATIVAS 5
int main() {
// imprime o cabecalho do nosso jogo
printf("******************************************\n");
printf("* Bem vindo ao nosso jogo de adivinhação *\n");
printf("******************************************\n");
int numerosecreto = 42;
int chute;
for(int i = 1; i <= NUMERO_DE_TENTATIVAS; i++) {
printf("Tentativa %d de %d\n", i, NUMERO_DE_TENTATIVAS);
printf("Qual é o seu chute? ");
scanf("%d", &chute);
printf("Seu chute foi %d\n", chute);
int acertou = chute == numerosecreto;
if(acertou) {
printf("Parabéns! Você acertou!\n");
printf("Jogue de novo, você é um bom jogador!\n");
break;
} else {
int maior = chute > numerosecreto;
if(maior) {
printf("Seu chute foi maior que o número secreto\n");
} else {
printf("Seu chute foi menor que o número secreto\n");
}
printf("Você errou!\n");
printf("Mas não desanime, tente de novo!\n");
}
}
printf("Fim de jogo!\n");
}
| Update files, Alura, Introdução a C, Aula 2.7 | Update files, Alura, Introdução a C, Aula 2.7
| C | mit | fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.