commit
stringlengths 40
40
| old_file
stringlengths 4
237
| new_file
stringlengths 4
237
| old_contents
stringlengths 1
4.24k
| new_contents
stringlengths 1
4.87k
| subject
stringlengths 15
778
| message
stringlengths 15
8.75k
| lang
stringclasses 266
values | license
stringclasses 13
values | repos
stringlengths 5
127k
|
|---|---|---|---|---|---|---|---|---|---|
429d29660bfd271aa842626dc8d705f64f407396
|
include/atoms/numeric/rolling_average.h
|
include/atoms/numeric/rolling_average.h
|
#pragma once
// This file is part of 'Atoms' library - https://github.com/yaqwsx/atoms
// Author: Jan 'yaqwsx' Mrázek
#include <array>
#include <initializer_list>
#include <algorithm>
namespace atoms {
template <class T, size_t SIZE>
class RollingAverage {
public:
RollingAverage() : sum(0), index(0)
{
std::fill(values.begin(), values.end(), T(0));
};
void push(const T& t) {
sum += t - values[index];
values[index] = t;
index++;
if (index == SIZE)
index = 0;
}
T get_average() {
return sum / T(SIZE);
}
T get_sum() {
return sum;
}
void clear(T t = 0) {
std::fill(values.begin(), values.end(), t);
sum = t * SIZE;
}
private:
std::array<T, SIZE> values;
T sum;
size_t index;
};
}
|
#pragma once
// This file is part of 'Atoms' library - https://github.com/yaqwsx/atoms
// Author: Jan 'yaqwsx' Mrázek
#include <array>
#include <initializer_list>
#include <algorithm>
namespace atoms {
template <class T, size_t SIZE>
class RollingAverage {
public:
RollingAverage() : sum(0), index(0)
{
std::fill(begin(), end(), T(0));
};
void push(const T& t) {
sum += t - values[index];
values[index] = t;
index++;
if (index == SIZE)
index = 0;
}
T get_average() {
return sum / T(SIZE);
}
T get_sum() {
return sum;
}
void clear(T t = 0) {
std::fill(begin(), end(), t);
sum = t * SIZE;
}
T *begin() { return values; }
T *end() { return values + SIZE; }
private:
T values[ SIZE ];
T sum;
size_t index;
};
}
|
Remove std::array dependency of RollingAverage
|
Remove std::array dependency of RollingAverage
This makes it compatible with MCUs without STL.
|
C
|
mit
|
yaqwsx/atoms
|
bf3a60b17fa0a12bc7a548e9c659f45684742258
|
test/CodeGen/pointer-signext.c
|
test/CodeGen/pointer-signext.c
|
// RUN: %clang_cc1 -triple x86_64-pc-win32 -emit-llvm -O2 -o - %s | FileCheck %s
// Under Windows 64, int and long are 32-bits. Make sure pointer math doesn't
// cause any sign extensions.
// CHECK: [[P:%.*]] = add i64 %param, -8
// CHECK-NEXT: [[Q:%.*]] = inttoptr i64 [[P]] to [[R:%.*]]
// CHECK-NEXT: {{%.*}} = getelementptr inbounds [[R]] [[Q]], i64 0, i32 0
#define CR(Record, TYPE, Field) \
((TYPE *) ((unsigned char *) (Record) - (unsigned char *) &(((TYPE *) 0)->Field)))
typedef struct _LIST_ENTRY {
struct _LIST_ENTRY *ForwardLink;
struct _LIST_ENTRY *BackLink;
} LIST_ENTRY;
typedef struct {
unsigned long long Signature;
LIST_ENTRY Link;
} MEMORY_MAP;
int test(unsigned long long param)
{
LIST_ENTRY *Link;
MEMORY_MAP *Entry;
Link = (LIST_ENTRY *) param;
Entry = CR (Link, MEMORY_MAP, Link);
return (int) Entry->Signature;
}
|
// RUN: %clang_cc1 -triple x86_64-pc-win32 -emit-llvm -O2 -o - %s | FileCheck %s
// Under Windows 64, int and long are 32-bits. Make sure pointer math doesn't
// cause any sign extensions.
// CHECK: [[P:%.*]] = add i64 %param, -8
// CHECK-NEXT: [[Q:%.*]] = inttoptr i64 [[P]] to [[R:%.*\*]]
// CHECK-NEXT: {{%.*}} = getelementptr inbounds [[R]] [[Q]], i64 0, i32 0
#define CR(Record, TYPE, Field) \
((TYPE *) ((unsigned char *) (Record) - (unsigned char *) &(((TYPE *) 0)->Field)))
typedef struct _LIST_ENTRY {
struct _LIST_ENTRY *ForwardLink;
struct _LIST_ENTRY *BackLink;
} LIST_ENTRY;
typedef struct {
unsigned long long Signature;
LIST_ENTRY Link;
} MEMORY_MAP;
int test(unsigned long long param)
{
LIST_ENTRY *Link;
MEMORY_MAP *Entry;
Link = (LIST_ENTRY *) param;
Entry = CR (Link, MEMORY_MAP, Link);
return (int) Entry->Signature;
}
|
Tweak regex not to accidentally match a trailing \r.
|
Tweak regex not to accidentally match a trailing \r.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@113966 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
|
0e59e34d8ed15480bd61595be1e98b387770676e
|
pywal/templates/colors-wal-st.h
|
pywal/templates/colors-wal-st.h
|
const char *colorname[] = {{
/* 8 normal colors */
[0] = "{color0}", /* black */
[1] = "{color1}", /* red */
[2] = "{color2}", /* green */
[3] = "{color3}", /* yellow */
[4] = "{color4}", /* blue */
[5] = "{color5}", /* magenta */
[6] = "{color6}", /* cyan */
[7] = "{color7}", /* white */
/* 8 bright colors */
[8] = "{color8}", /* black */
[9] = "{color9}", /* red */
[10] = "{color10}", /* green */
[11] = "{color11}", /* yellow */
[12] = "{color12}", /* blue */
[13] = "{color13}", /* magenta */
[14] = "{color14}", /* cyan */
[15] = "{color15}", /* white */
/* special colors */
[256] = "{background}", /* background */
[257] = "{foreground}", /* foreground */
[258] = "{cursor}", /* cursor */
}};
/* Default colors (colorname index)
* foreground, background, cursor */
unsigned int defaultbg = 256;
unsigned int defaultfg = 257;
unsigned int defaultcs = 258;
|
const char *colorname[] = {{
/* 8 normal colors */
[0] = "{color0}", /* black */
[1] = "{color1}", /* red */
[2] = "{color2}", /* green */
[3] = "{color3}", /* yellow */
[4] = "{color4}", /* blue */
[5] = "{color5}", /* magenta */
[6] = "{color6}", /* cyan */
[7] = "{color7}", /* white */
/* 8 bright colors */
[8] = "{color8}", /* black */
[9] = "{color9}", /* red */
[10] = "{color10}", /* green */
[11] = "{color11}", /* yellow */
[12] = "{color12}", /* blue */
[13] = "{color13}", /* magenta */
[14] = "{color14}", /* cyan */
[15] = "{color15}", /* white */
/* special colors */
[256] = "{background}", /* background */
[257] = "{foreground}", /* foreground */
[258] = "{cursor}", /* cursor */
}};
/* Default colors (colorname index)
* foreground, background, cursor */
unsigned int defaultbg = 0;
unsigned int defaultfg = 257;
unsigned int defaultcs = 258;
|
Fix bg color not updating
|
st: Fix bg color not updating
|
C
|
mit
|
dylanaraps/pywal,dylanaraps/pywal,dylanaraps/pywal
|
fc1e9dd5a5b313c06c41e25169127f6deedaf164
|
src/tcp_server.h
|
src/tcp_server.h
|
#ifndef QML_SOCKETS_TCP_SERVER
#define QML_SOCKETS_TCP_SERVER
#include <QtNetwork>
#include "tcp.h"
class TCPServer : public QObject
{
Q_OBJECT
Q_PROPERTY(uint port MEMBER m_port NOTIFY portChanged)
signals:
void portChanged();
void clientRead(TCPSocket* client, const QString &message);
void clientConnected(TCPSocket* client);
void clientDisconnected(TCPSocket* client);
public:
TCPServer()
{
m_server = new QTcpServer(this);
QObject::connect(m_server, &QTcpServer::newConnection,
[=]() {
TCPSocket *client = \
new TCPSocket(m_server->nextPendingConnection());
QObject::connect(client, &TCPSocket::read,
[=](const QString &message) {
emit clientRead(client, message);
});
QObject::connect(client, &TCPSocket::disconnected,
[=]() {
emit clientDisconnected(client);
delete client;
});
emit clientConnected(client);
});
};
~TCPServer()
{
}
public slots:
void listen()
{ m_server->listen(QHostAddress::Any, m_port); }
public:
uint m_port;
QTcpServer *m_server = NULL;
};
#endif
|
#ifndef QML_SOCKETS_TCP_SERVER
#define QML_SOCKETS_TCP_SERVER
#include <QtNetwork>
#include "tcp.h"
class TCPServer : public QObject
{
Q_OBJECT
Q_PROPERTY(uint port MEMBER m_port NOTIFY portChanged)
signals:
void portChanged();
void clientRead(TCPSocket* client, const QString &message);
void clientConnected(TCPSocket* client);
void clientDisconnected(TCPSocket* client);
public:
TCPServer()
{
m_server = new QTcpServer(this);
QObject::connect(m_server, &QTcpServer::newConnection,
[=]() {
TCPSocket *client = \
new TCPSocket(m_server->nextPendingConnection());
QObject::connect(client, &TCPSocket::read,
[=](const QString &message) {
emit clientRead(client, message);
});
QObject::connect(client, &TCPSocket::disconnected,
[=]() {
emit clientDisconnected(client);
delete client;
});
emit clientConnected(client);
});
};
~TCPServer()
{ delete m_server; m_server = NULL; }
public slots:
void listen()
{ m_server->listen(QHostAddress::Any, m_port); }
public:
uint m_port;
QTcpServer *m_server = NULL;
};
#endif
|
Add deletion of m_server from TCPServer in destructor
|
Add deletion of m_server from TCPServer in destructor
--HG--
extra : amend_source : 0364038a316b4f2a036025a5e896379ac29f77c5
|
C
|
mit
|
jemc/qml-sockets,jemc/qml-sockets
|
ea2a841e4ba38300d287052d96cb397d4f4a7cf5
|
jni/shaders/displayFrag.h
|
jni/shaders/displayFrag.h
|
/*
* Copyright (c) 2015 Ivan Valiulin
*
* This file is part of viaVR.
*
* viaVR 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.
*
* viaVR 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 viaVR. If not, see http://www.gnu.org/licenses
*/
R"(#version 300 es
precision mediump float;
uniform sampler2D video;
in vec2 coord;
out vec4 outColor;
void main () {
outColor = texture (video, coord);
})";
|
/*
* Copyright (c) 2015 Ivan Valiulin
*
* This file is part of viaVR.
*
* viaVR 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.
*
* viaVR 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 viaVR. If not, see http://www.gnu.org/licenses
*/
R"(#version 300 es
precision highp float;
uniform sampler2D video;
in vec2 coord;
out vec4 outColor;
void main () {
outColor = texture (video, coord);
})";
|
Switch display fragment shader to highp
|
Switch display fragment shader to highp
|
C
|
lgpl-2.1
|
vivan000/viaVR,vivan000/viaVR
|
9802ec76a7c900a7fffa37df75e68f51c9e1288c
|
test/test_sock.c
|
test/test_sock.c
|
// Copyright (c) 2014-2017, NetApp, Inc.
// 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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.
#include "common.h"
int main(void)
{
init();
io(111111);
cleanup();
}
|
// Copyright (c) 2014-2017, NetApp, Inc.
// 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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.
#include "common.h"
int main(void)
{
init();
io(8);
cleanup();
}
|
Use a saner test size
|
Use a saner test size
|
C
|
bsd-2-clause
|
NTAP/warpcore,NTAP/warpcore,NTAP/warpcore,NTAP/warpcore
|
145358e9c07bad314111000776ea0d42b97461d0
|
MGSFragariaPrefsViewController.h
|
MGSFragariaPrefsViewController.h
|
//
// MGSFragariaPrefsViewController.h
// Fragaria
//
// Created by Jonathan on 22/10/2012.
//
//
#import <Cocoa/Cocoa.h>
/**
* MGSFragariaPrefsViewController provides a base class for other Fragaria
* preferences controllers. It is not implemented directly anywhere.
* @see MGSFragariaFontsAndColorsPrefsViewController.h
* @see MGSFragariaTextEditingPrefsViewController.h
**/
@interface MGSFragariaPrefsViewController : NSViewController <NSTabViewDelegate>
/**
* Commit edits, discarding changes on error.
**/
- (BOOL)commitEditingAndDiscard:(BOOL)discard;
@end
|
//
// MGSFragariaPrefsViewController.h
// Fragaria
//
// Created by Jonathan on 22/10/2012.
//
//
#import <Cocoa/Cocoa.h>
/**
* MGSFragariaPrefsViewController provides a base class for other Fragaria
* preferences controllers. It is not implemented directly anywhere.
* @see MGSFragariaFontsAndColoursPrefsViewController
* @see MGSFragariaTextEditingPrefsViewController
**/
@interface MGSFragariaPrefsViewController : NSViewController <NSTabViewDelegate>
/**
* Commit edits, discarding changes on error.
* @param discard indicates whether or not to discard current uncommitted changes.
**/
- (BOOL)commitEditingAndDiscard:(BOOL)discard;
@end
|
Add @param description for AppleDoc.
|
Add @param description for AppleDoc.
|
C
|
apache-2.0
|
shysaur/Fragaria,shysaur/Fragaria,vakoc/Fragaria,shysaur/Fragaria,shysaur/Fragaria,bitstadium/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,bitstadium/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,shysaur/Fragaria,vakoc/Fragaria
|
ab5bc2ec06f22d90a0529531ae6c2f19a359ad83
|
tests/argparse.c
|
tests/argparse.c
|
#include "common.h"
static void args_empty(void **state) {
args *args = *state;
assert_null(args->opts);
assert_null(args->operands);
}
static void add_option_passed_null(void **state) {
args *args = *state;
assert_int_equal(
ARGPARSE_PASSED_NULL,
args_add_option(args, NULL)
);
}
static void empty_option_fail(void **state) {
args *args = *state;
option *opt = option_new("", "", "");
assert_int_equal(
ARGPARSE_EMPTY_OPTION,
args_add_option(args, opt)
);
option_free(opt);
}
static void add_operand_passed_null(void **state) {
args *args = *state;
assert_int_equal(
ARGPARSE_PASSED_NULL,
args_add_operand(args, NULL)
);
}
int main() {
const struct CMUnitTest tests[] = {
cmocka_unit_test(args_empty),
cmocka_unit_test(add_option_passed_null),
cmocka_unit_test(empty_option_fail),
cmocka_unit_test(add_operand_passed_null),
};
return cmocka_run_group_tests(tests, common_setup, common_teardown);
}
|
#include "common.h"
static void args_empty(void **state) {
args *args = *state;
assert_null(args->opts);
assert_null(args->operands);
}
static void add_option_passed_null(void **state) {
args *args = *state;
assert_int_equal(
ARGPARSE_PASSED_NULL,
args_add_option(args, NULL)
);
}
static void empty_option_fail(void **state) {
args *args = *state;
option *opt = option_new("", "", "");
assert_int_equal(
ARGPARSE_EMPTY_OPTION,
args_add_option(args, opt)
);
option_free(opt);
}
static void add_operand_passed_null(void **state) {
args *args = *state;
assert_int_equal(
ARGPARSE_PASSED_NULL,
args_add_operand(args, NULL)
);
}
int main() {
#define TEST(test) cmocka_unit_test_setup_teardown( \
test, \
common_setup, \
common_teardown \
)
const struct CMUnitTest tests[] = {
TEST(args_empty),
TEST(add_option_passed_null),
TEST(empty_option_fail),
TEST(add_operand_passed_null),
};
return cmocka_run_group_tests(tests, NULL, NULL);
}
|
Use a TEST() macro to run common_{setup,teardown}
|
Use a TEST() macro to run common_{setup,teardown}
|
C
|
mit
|
ntnn/libargparse,ntnn/libargparse
|
c5c547e1faeeb300fb7a7d4976f561bb01496cad
|
libgo/runtime/rtems-task-variable-add.c
|
libgo/runtime/rtems-task-variable-add.c
|
/* rtems-task-variable-add.c -- adding a task specific variable in RTEMS OS.
Copyright 2010 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. */
#include <rtems/error.h>
#include <rtems/system.h>
#include <rtems/rtems/tasks.h>
/* RTEMS does not support GNU TLS extension __thread. */
void
__wrap_rtems_task_variable_add (void **var)
{
rtems_status_code sc = rtems_task_variable_add (RTEMS_SELF, var, NULL);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_error (sc, "rtems_task_variable_add failed");
}
}
|
/* rtems-task-variable-add.c -- adding a task specific variable in RTEMS OS.
Copyright 2010 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. */
#include <assert.h>
#include <rtems/error.h>
#include <rtems/system.h>
#include <rtems/rtems/tasks.h>
/* RTEMS does not support GNU TLS extension __thread. */
void
__wrap_rtems_task_variable_add (void **var)
{
rtems_status_code sc = rtems_task_variable_add (RTEMS_SELF, var, NULL);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_error (sc, "rtems_task_variable_add failed");
assert (0);
}
}
|
Add assert on rtems_task_variable_add error.
|
Add assert on rtems_task_variable_add error.
assert is used so that if rtems_task_variable_add fails, the error
is fatal.
R=iant
CC=gofrontend-dev, joel.sherrill
https://golang.org/cl/1684053
|
C
|
bsd-3-clause
|
qskycolor/gofrontend,golang/gofrontend,golang/gofrontend,anlhord/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,golang/gofrontend,anlhord/gofrontend,golang/gofrontend,anlhord/gofrontend
|
d544c99984735652807614ab04157e180eadfbe6
|
utility/filter.h
|
utility/filter.h
|
#ifndef _FILTER_H
#define _FILTER_H
#include <math.h>
#if (ARDUINO >= 100)
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include "quaternion.h"
#define RAD_TO_DEG (180.0 / PI)
class Filter {
public:
Filter(void);
void setAccelXYZ(const float x, const float y, const float z);
void setCompassXYZ(const float x, const float y, const float z);
void setGyroXYZ(const float x, const float y, const float z);
virtual void process(void) = 0;
protected:
float _accelData[3];
float _compassData[3];
float _gyroData[3];
};
#endif
|
#ifndef _FILTER_H
#define _FILTER_H
#include <math.h>
#if !defined(_FUSION_TEST)
#if (ARDUINO >= 100)
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#else
#define PI (M_PI)
#endif
#include "quaternion.h"
#define RAD_TO_DEG (180.0F / PI)
class Filter {
public:
Filter(void);
void setAccelXYZ(const float x, const float y, const float z);
void setCompassXYZ(const float x, const float y, const float z);
void setGyroXYZ(const float x, const float y, const float z);
virtual void process(void) = 0;
protected:
float _accelData[3];
float _compassData[3];
float _gyroData[3];
};
#endif
|
Allow for native unit testing
|
Allow for native unit testing
|
C
|
mit
|
JCube001/Fusion,JCube001/Fusion
|
3e33a238f6952281cd48308d2b4ad78d2429ab7f
|
src/common/types.h
|
src/common/types.h
|
#ifndef __TYPES_H__
#define __TYPES_H__
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed long int32_t;
typedef unsigned long uint32_t;
typedef signed long long int64_t;
typedef unsigned long uint64_t;
typedef float float32_t;
typedef double float64_t;
typedef int bool_t;
typedef unsigned int size_t;
typedef int32_t error_t;
typedef void* handle_t;
#define TRUE (1)
#define FALSE (0)
#define OK (0)
#define NG (-1)
#define NULL (void*)(0)
#define PACK(a, b, c, d) (uint32_t)(((a)<<24) | ((b)<<16) | ((c)<<8) | (d))
#define NULL_SIGNATURE 0x00000000
#endif /* __TYPES_H__ */
|
#ifndef __TYPES_H__
#define __TYPES_H__
#include <stddef.h>
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed long int32_t;
typedef unsigned long uint32_t;
typedef signed long long int64_t;
typedef unsigned long uint64_t;
typedef float float32_t;
typedef double float64_t;
typedef int bool_t;
typedef int32_t error_t;
typedef void* handle_t;
#define TRUE (1)
#define FALSE (0)
#define OK (0)
#define NG (-1)
#define PACK(a, b, c, d) (uint32_t)(((a)<<24) | ((b)<<16) | ((c)<<8) | (d))
#define NULL_SIGNATURE 0x00000000
#endif /* __TYPES_H__ */
|
Include <stddef.h> for size_t and NULL definitions
|
Include <stddef.h> for size_t and NULL definitions
|
C
|
mit
|
ryochack/emkit,ryochack/emkit
|
45f70c28cd7f507416aa3753f451f9e84531cd4b
|
test/Driver/masm.c
|
test/Driver/masm.c
|
// REQUIRES: x86-registered-target
// RUN: %clang -target i386-unknown-linux -masm=intel %s -S -o - | FileCheck --check-prefix=CHECK-INTEL %s
// RUN: %clang -target i386-unknown-linux -masm=att %s -S -o - | FileCheck --check-prefix=CHECK-ATT %s
// RUN: not %clang -target i386-unknown-linux -masm=somerequired %s -S -o - 2>&1 | FileCheck --check-prefix=CHECK-SOMEREQUIRED %s
// RUN: %clang -target arm-unknown-eabi -masm=intel %s -S -o - 2>&1 | FileCheck --check-prefix=CHECK-ARM %s
int f() {
// CHECK-ATT: movl $0, %eax
// CHECK-INTEL: mov eax, 0
// CHECK-SOMEREQUIRED: error: unsupported argument 'somerequired' to option 'masm='
// CHECK-ARM: warning: argument unused during compilation: '-masm=intel'
return 0;
}
|
// REQUIRES: x86-registered-target
// RUN: %clang -target i386-unknown-linux -masm=intel %s -S -o - | FileCheck --check-prefix=CHECK-INTEL %s
// RUN: %clang -target i386-unknown-linux -masm=att %s -S -o - | FileCheck --check-prefix=CHECK-ATT %s
// RUN: not %clang -target i386-unknown-linux -masm=somerequired %s -S -o - 2>&1 | FileCheck --check-prefix=CHECK-SOMEREQUIRED %s
// REQUIRES: arm-registered-target
// RUN: %clang -target arm-unknown-eabi -masm=intel %s -S -o - 2>&1 | FileCheck --check-prefix=CHECK-ARM %s
int f() {
// CHECK-ATT: movl $0, %eax
// CHECK-INTEL: mov eax, 0
// CHECK-SOMEREQUIRED: error: unsupported argument 'somerequired' to option 'masm='
// CHECK-ARM: warning: argument unused during compilation: '-masm=intel'
return 0;
}
|
Add a requires for the arm-registered-target needed by this test as well.
|
Add a requires for the arm-registered-target needed by this test as
well.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@208722 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
f4e0b21b7318d226591d9410ab3219efa140301e
|
src/ios/ChromeSocketsTcp.h
|
src/ios/ChromeSocketsTcp.h
|
// Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <Foundation/Foundation.h>
#import <Cordova/CDVPlugin.h>
@class GCDAsyncSocket;
@interface ChromeSocketsTcp : CDVPlugin
- (NSUInteger)registerAcceptedSocket:(GCDAsyncSocket*)theSocket;
@end
|
// Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <Foundation/Foundation.h>
#import <Cordova/CDVPlugin.h>
@class GCDAsyncSocket;
@interface ChromeSocketsTcp : CDVPlugin
- (NSUInteger)registerAcceptedSocket:(GCDAsyncSocket*)theSocket;
@end
|
Fix up missing newlines at eof
|
Fix up missing newlines at eof
|
C
|
bsd-3-clause
|
MobileChromeApps/cordova-plugin-chrome-apps-sockets-tcp,iDay/cordova-plugin-chrome-apps-sockets-tcp,MobileChromeApps/cordova-plugin-chrome-apps-sockets-tcp,iDay/cordova-plugin-chrome-apps-sockets-tcp
|
3a5d6ce443bba75acaec05e8a5fe1ba5ad198efc
|
SignificantSpices/SignificantSpices.h
|
SignificantSpices/SignificantSpices.h
|
//
// SignificantSpices.h
// SignificantSpices
//
// Created by Jan Nash on 8/7/17.
// Copyright © 2017 resmio. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for SignificantSpices.
FOUNDATION_EXPORT double SignificantSpicesVersionNumber;
//! Project version string for SignificantSpices.
FOUNDATION_EXPORT const unsigned char SignificantSpicesVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <SignificantSpices/PublicHeader.h>
|
//
// SignificantSpices.h
// SignificantSpices
//
// Created by Jan Nash on 8/7/17.
// Copyright © 2017 resmio. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for SignificantSpices.
FOUNDATION_EXPORT double SignificantSpicesVersionNumber;
//! Project version string for SignificantSpices.
FOUNDATION_EXPORT const unsigned char SignificantSpicesVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <SignificantSpices/PublicHeader.h>
|
Replace UIKit import with Foundation import
|
Replace UIKit import with Foundation import
|
C
|
mit
|
resmio/SignificantSpices,resmio/SignificantSpices,resmio/SignificantSpices,resmio/SignificantSpices
|
8d25dad00bf02b638dba4c901661f8e9b4d6a476
|
src/main.c
|
src/main.c
|
/*
* Copyright 2019 Andrey Terekhov, Victor Y. Fadeev
*
* 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.
*/
#pragma comment(linker, "/STACK:268435456")
#include "compiler.h"
#include "workspace.h"
const char *name = "../tests/executable/floatsign.c";
// "../tests/mips/0test.c";
int main(int argc, const char *argv[])
{
//printf(""); // Not working without using printf
workspace ws = ws_parse_args(argc, argv);
if (argc < 2)
{
ws_add_file(&ws, name);
}
return compile_to_vm(&ws);
}
|
/*
* Copyright 2019 Andrey Terekhov, Victor Y. Fadeev
*
* 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.
*/
#ifdef _MSC_VER
#pragma comment(linker, "/STACK:268435456")
#endif
#include "compiler.h"
#include "workspace.h"
const char *name = "../tests/executable/floatsign.c";
// "../tests/mips/0test.c";
int main(int argc, const char *argv[])
{
//printf(""); // Not working without using printf
workspace ws = ws_parse_args(argc, argv);
if (argc < 2)
{
ws_add_file(&ws, name);
}
return compile_to_vm(&ws);
}
|
Disable STACK resizing for non Visual C\C++ compilers
|
Disable STACK resizing for non Visual C\C++ compilers
|
C
|
apache-2.0
|
andrey-terekhov/RuC,andrey-terekhov/RuC,andrey-terekhov/RuC
|
2f7055c5932ecc02159be375ebda1eee64665d17
|
arch/mips/mipssim/sim_cmdline.c
|
arch/mips/mipssim/sim_cmdline.c
|
/*
* Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved.
*
* This program is free software; you can distribute it and/or modify it
* under the terms of the GNU General Public License (Version 2) as
* published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
*/
#include <linux/init.h>
#include <linux/string.h>
#include <asm/bootinfo.h>
extern char arcs_cmdline[];
char * __init prom_getcmdline(void)
{
return arcs_cmdline;
}
void __init prom_init_cmdline(void)
{
char *cp;
cp = arcs_cmdline;
/* Get boot line from environment? */
*cp = '\0';
}
|
/*
* Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved.
*
* This program is free software; you can distribute it and/or modify it
* under the terms of the GNU General Public License (Version 2) as
* published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
*/
#include <linux/init.h>
#include <linux/string.h>
#include <asm/bootinfo.h>
extern char arcs_cmdline[];
char * __init prom_getcmdline(void)
{
return arcs_cmdline;
}
void __init prom_init_cmdline(void)
{
/* XXX: Get boot line from environment? */
}
|
Fix booting from NFS root
|
[MIPS] MIPSsim: Fix booting from NFS root
MIPSsim probably doesn't have any sort of environment, but writing
a zero in it kills even the compiled in command line. This prevents
booting via NFS root.
Signed-Off-By: Thiemo Seufer <8e77f49f827b66c39fd886f99e6ef704c1fecc26@networkno.de>
Signed-off-by: Ralf Baechle <92f48d309cda194c8eda36aa8f9ae28c488fa208@linux-mips.org>
|
C
|
mit
|
KristFoundation/Programs,KristFoundation/Programs,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,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
|
fdfc0c5d2056f11021d1b5dcdce4e92728d323a4
|
akonadi/resources/openchange/lzfu.h
|
akonadi/resources/openchange/lzfu.h
|
#include <kdemacros.h>
KDE_EXPORT QByteArray lzfuDecompress (const QByteArray &rtfcomp);
|
/*
Copyright (C) Brad Hards <bradh@frogmouth.net> 2007
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.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <kdemacros.h>
KDE_EXPORT QByteArray lzfuDecompress (const QByteArray &rtfcomp);
|
Add license, to help the GPLV3 zealots.
|
Add license, to help the GPLV3 zealots.
svn path=/trunk/KDE/kdepim/; revision=748604
|
C
|
lgpl-2.1
|
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
|
3679a62c59dde625a18416f15aadaa6845bc8cfd
|
NSData+ImageMIMEDetection/NSData+ImageMIMEDetection.h
|
NSData+ImageMIMEDetection/NSData+ImageMIMEDetection.h
|
@interface NSData (ImageMIMEDetection)
@end
|
@interface NSData (ImageMIMEDetection)
/**
Try to deduce the MIME type.
@return string representation of detected MIME type. `nil` if not able to
detect the MIME type.
@see http://en.wikipedia.org/wiki/Internet_media_type
*/
- (NSString *)tdt_MIMEType;
@end
|
Add interface for the category
|
Add interface for the category
|
C
|
bsd-3-clause
|
talk-to/NSData-TDTImageMIMEDetection
|
5210babef0ae86fb3d9dc5bc4991523e5da96117
|
SmartDeviceLink/SDLSoftButton.h
|
SmartDeviceLink/SDLSoftButton.h
|
// SDLSoftButton.h
//
#import "SDLRPCMessage.h"
#import "SDLNotificationConstants.h"
#import "SDLRequestHandler.h"
@class SDLImage;
@class SDLSoftButtonType;
@class SDLSystemAction;
@interface SDLSoftButton : SDLRPCStruct <SDLRequestHandler> {
}
- (instancetype)init;
- (instancetype)initWithHandler:(SDLRPCNotificationHandler)handler;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
- (instancetype)initWithType:(SDLSoftButtonType *)tyle text:(NSString *)text image:(SDLImage *)image highlighted:(BOOL)highlighted buttonId:(UInt16)buttonId systemAction:(SDLSystemAction *)systemAction handler:(SDLRPCNotificationHandler)handler;
@property (copy, nonatomic) SDLRPCNotificationHandler handler;
@property (strong) SDLSoftButtonType *type;
@property (strong) NSString *text;
@property (strong) SDLImage *image;
@property (strong) NSNumber *isHighlighted;
@property (strong) NSNumber *softButtonID;
@property (strong) SDLSystemAction *systemAction;
@end
|
// SDLSoftButton.h
//
#import "SDLRPCMessage.h"
#import "SDLNotificationConstants.h"
#import "SDLRequestHandler.h"
@class SDLImage;
@class SDLSoftButtonType;
@class SDLSystemAction;
@interface SDLSoftButton : SDLRPCStruct <SDLRequestHandler> {
}
- (instancetype)init;
- (instancetype)initWithHandler:(SDLRPCNotificationHandler)handler;
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
- (instancetype)initWithType:(SDLSoftButtonType *)type text:(NSString *)text image:(SDLImage *)image highlighted:(BOOL)highlighted buttonId:(UInt16)buttonId systemAction:(SDLSystemAction *)systemAction handler:(SDLRPCNotificationHandler)handler;
@property (copy, nonatomic) SDLRPCNotificationHandler handler;
@property (strong) SDLSoftButtonType *type;
@property (strong) NSString *text;
@property (strong) SDLImage *image;
@property (strong) NSNumber *isHighlighted;
@property (strong) NSNumber *softButtonID;
@property (strong) SDLSystemAction *systemAction;
@end
|
Fix typo in initializer property name.
|
Fix typo in initializer property name.
|
C
|
bsd-3-clause
|
APCVSRepo/sdl_ios,smartdevicelink/sdl_ios,smartdevicelink/sdl_ios,FordDev/sdl_ios,APCVSRepo/sdl_ios,FordDev/sdl_ios,kshala-ford/sdl_ios,davidswi/sdl_ios,kshala-ford/sdl_ios,kshala-ford/sdl_ios,APCVSRepo/sdl_ios,smartdevicelink/sdl_ios,kshala-ford/sdl_ios,FordDev/sdl_ios,smartdevicelink/sdl_ios,FordDev/sdl_ios,davidswi/sdl_ios,kshala-ford/sdl_ios,APCVSRepo/sdl_ios,davidswi/sdl_ios,FordDev/sdl_ios,davidswi/sdl_ios,APCVSRepo/sdl_ios,smartdevicelink/sdl_ios,davidswi/sdl_ios
|
d4654bbf9f2f710e662e41826f365b294a845fad
|
cmd/lefty/txtview.h
|
cmd/lefty/txtview.h
|
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
/* Lefteris Koutsofios - AT&T Bell Laboratories */
#ifndef _TXTVIEW_H
#define _TXTVIEW_H
void TXTinit(Grect_t);
void TXTterm(void);
int TXTmode(int argc, lvar_t * argv);
int TXTask(int argc, lvar_t * argv);
void TXTprocess(int, char *);
void TXTupdate(void);
void TXTtoggle(int, void *);
#endif /* _TXTVIEW_H */
#ifdef __cplusplus
}
#endif
|
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
/* Lefteris Koutsofios - AT&T Labs Research */
#ifndef _TXTVIEW_H
#define _TXTVIEW_H
void TXTinit (Grect_t);
void TXTterm (void);
int TXTmode (int argc, lvar_t *argv);
int TXTask (int argc, lvar_t *argv);
void TXTprocess (int, char *);
void TXTupdate (void);
void TXTtoggle (int, void *);
#endif /* _TXTVIEW_H */
#ifdef __cplusplus
}
#endif
|
Update with new lefty, fixing many bugs and supporting new features
|
Update with new lefty, fixing many bugs and supporting new features
|
C
|
epl-1.0
|
MjAbuz/graphviz,pixelglow/graphviz,tkelman/graphviz,kbrock/graphviz,BMJHayward/graphviz,ellson/graphviz,tkelman/graphviz,jho1965us/graphviz,kbrock/graphviz,MjAbuz/graphviz,kbrock/graphviz,tkelman/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,ellson/graphviz,pixelglow/graphviz,kbrock/graphviz,MjAbuz/graphviz,tkelman/graphviz,pixelglow/graphviz,BMJHayward/graphviz,ellson/graphviz,pixelglow/graphviz,BMJHayward/graphviz,ellson/graphviz,ellson/graphviz,MjAbuz/graphviz,kbrock/graphviz,MjAbuz/graphviz,jho1965us/graphviz,jho1965us/graphviz,pixelglow/graphviz,jho1965us/graphviz,jho1965us/graphviz,pixelglow/graphviz,tkelman/graphviz,tkelman/graphviz,tkelman/graphviz,jho1965us/graphviz,jho1965us/graphviz,kbrock/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,kbrock/graphviz,ellson/graphviz,MjAbuz/graphviz,ellson/graphviz,BMJHayward/graphviz,ellson/graphviz,jho1965us/graphviz,MjAbuz/graphviz,ellson/graphviz,MjAbuz/graphviz,pixelglow/graphviz,ellson/graphviz,tkelman/graphviz,tkelman/graphviz,BMJHayward/graphviz,kbrock/graphviz,jho1965us/graphviz,ellson/graphviz,MjAbuz/graphviz,tkelman/graphviz,kbrock/graphviz,jho1965us/graphviz,BMJHayward/graphviz,pixelglow/graphviz,BMJHayward/graphviz,pixelglow/graphviz,kbrock/graphviz,BMJHayward/graphviz,pixelglow/graphviz,jho1965us/graphviz,tkelman/graphviz,pixelglow/graphviz,BMJHayward/graphviz,kbrock/graphviz
|
181f2fc186c1580c514a9d86bdc8b07fc0a1a7bf
|
src/imap/cmd-create.c
|
src/imap/cmd-create.c
|
/* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "mail-namespace.h"
#include "commands.h"
bool cmd_create(struct client_command_context *cmd)
{
struct mail_namespace *ns;
const char *mailbox, *full_mailbox;
bool directory;
size_t len;
/* <mailbox> */
if (!client_read_string_args(cmd, 1, &mailbox))
return FALSE;
full_mailbox = mailbox;
ns = client_find_namespace(cmd, &mailbox);
if (ns == NULL)
return TRUE;
len = strlen(full_mailbox);
if (len == 0 || full_mailbox[len-1] != ns->sep)
directory = FALSE;
else {
/* name ends with hierarchy separator - client is just
informing us that it wants to create children under this
mailbox. */
directory = TRUE;
mailbox = t_strndup(mailbox, len-1);
full_mailbox = t_strndup(full_mailbox, strlen(full_mailbox)-1);
}
if (!client_verify_mailbox_name(cmd, full_mailbox, FALSE, TRUE))
return TRUE;
if (mail_storage_mailbox_create(ns->storage, mailbox, directory) < 0)
client_send_storage_error(cmd, ns->storage);
else
client_send_tagline(cmd, "OK Create completed.");
return TRUE;
}
|
/* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "mail-namespace.h"
#include "commands.h"
bool cmd_create(struct client_command_context *cmd)
{
struct mail_namespace *ns;
const char *mailbox, *full_mailbox;
bool directory;
size_t len;
/* <mailbox> */
if (!client_read_string_args(cmd, 1, &mailbox))
return FALSE;
full_mailbox = mailbox;
ns = client_find_namespace(cmd, &mailbox);
if (ns == NULL)
return TRUE;
len = strlen(full_mailbox);
if (len == 0 || full_mailbox[len-1] != ns->sep)
directory = FALSE;
else {
/* name ends with hierarchy separator - client is just
informing us that it wants to create children under this
mailbox. */
directory = TRUE;
mailbox = t_strndup(mailbox, strlen(mailbox)-1);
full_mailbox = t_strndup(full_mailbox, len-1);
}
if (!client_verify_mailbox_name(cmd, full_mailbox, FALSE, TRUE))
return TRUE;
if (mail_storage_mailbox_create(ns->storage, mailbox, directory) < 0)
client_send_storage_error(cmd, ns->storage);
else
client_send_tagline(cmd, "OK Create completed.");
return TRUE;
}
|
CREATE ns_prefix/box/ didn't work right when namespace prefix existed.
|
CREATE ns_prefix/box/ didn't work right when namespace prefix existed.
--HG--
branch : HEAD
|
C
|
mit
|
jwm/dovecot-notmuch,jkerihuel/dovecot,jwm/dovecot-notmuch,jkerihuel/dovecot,jkerihuel/dovecot,jkerihuel/dovecot,jkerihuel/dovecot,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jwm/dovecot-notmuch
|
035e7732b87e04ebf28e342a21c222afd08cbb0f
|
Code/Support/Errors.h
|
Code/Support/Errors.h
|
//
// Errors.h
// RestKit
//
// Created by Blake Watters on 3/25/10.
// Copyright 2010 Two Toasters
//
// 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.
//
// The error domain for RestKit generated errors
extern NSString* const RKRestKitErrorDomain;
extern NSString* const RKObjectMapperErrorObjectsKey;
typedef enum {
RKObjectLoaderRemoteSystemError = 1,
RKRequestBaseURLOfflineError = 2,
RKRequestUnexpectedResponseError = 3,
RKObjectLoaderUnexpectedResponseError = 4
} RKRestKitError;
|
//
// Errors.h
// RestKit
//
// Created by Blake Watters on 3/25/10.
// Copyright 2010 Two Toasters
//
// 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.
//
// The error domain for RestKit generated errors
extern NSString* const RKRestKitErrorDomain;
extern NSString* const RKObjectMapperErrorObjectsKey;
typedef enum {
RKObjectLoaderRemoteSystemError = 1,
RKRequestBaseURLOfflineError = 2,
RKRequestUnexpectedResponseError = 3,
RKObjectLoaderUnexpectedResponseError = 4,
RKRequestConnectionTimeoutError = 5
} RKRestKitError;
|
Add RKRequestConnectionTimeoutError to throw when our connection timeout has been exceeded.
|
Add RKRequestConnectionTimeoutError to throw when our connection timeout has been exceeded.
|
C
|
apache-2.0
|
nett55/RestKit,fedegasp/RestKit,justinyaoqi/RestKit,concreteinteractive/RestKit,moritzh/RestKit,nett55/RestKit,loverbabyz/RestKit,Juraldinio/RestKit,kevmeyer/RestKit,mumer92/RestKit,wireitcollege/RestKit,concreteinteractive/RestKit,DocuSignDev/RestKit,canaydogan/RestKit,ipmobiletech/RestKit,pat2man/RestKit,wangjiangwen/RestKit,antondarki/RestKit,wuxsoft/RestKit,LiuShulong/RestKit,StasanTelnov/RestKit,timbodeit/RestKit,0x73/RestKit,loverbabyz/RestKit,jrtaal/RestKit,kevmeyer/RestKit,adozenlines/RestKit,hanangellove/RestKit,zhenlove/RestKit,0dayZh/RestKit,goldstar/RestKit,RestKit/RestKit,nphkh/RestKit,lucasecf/RestKit,mcfedr/RestKit,aleufms/RestKit,djz-code/RestKit,HYPERHYPER/RestKit2,Gaantz/RestKit,naqi/RestKit,0dayZh/RestKit,coderChrisLee/RestKit,taptaptap/RestKit,lucasecf/RestKit,mumer92/RestKit,vilinskiy-playdayteam/RestKit,DocuSignDev/RestKit,CodewareTechnology/RestKit,braindata/RestKit-1,paperlesspost/RestKit,nalindz/pulpfiction-RestKit,nett55/RestKit,canaydogan/RestKit,zilaiyedaren/RestKit,loverbabyz/RestKit,HYPERHYPER/RestKit2,thomaschristensen/RestKit,apontador/RestKit,gank0326/restkit,canaydogan/RestKit,pbogdanv/RestKit,apontador/RestKit,RestKit/RestKit,qingsong-xu/RestKit,ChinaPicture/RestKit,sachin-khard/NucRestKit,money-alex2006hw/RestKit,cryptojuice/RestKit,cryptojuice/RestKit,coderChrisLee/RestKit,adozenlines/RestKit,nett55/RestKit,sachin-khard/NucleusRestKit,HarrisLee/RestKit,cnbin/RestKit,ForrestAlfred/RestKit,QLGu/RestKit,goldstar/RestKit,hejunbinlan/RestKit,gauravstomar/RestKit,TheFarm/RestKit,zjh171/RestKit,Juraldinio/RestKit,SuPair/RestKit,ForrestAlfred/RestKit,HarrisLee/RestKit,sachin-khard/NucleusRestKit,braindata/RestKit-1,mumer92/RestKit,ppierson/RestKit,ForrestAlfred/RestKit,percysnoodle/RestKit,youssman/RestKit,coderChrisLee/RestKit,sachin-khard/NucleusRestKit,dx285/RestKit,REXLabsInc/RestKit,ppierson/RestKit,imton/RestKit,oye-lionel/GithubTest,jrtaal/RestKit,common2015/RestKit,baumatron/RestKit,LiuShulong/RestKit,timbodeit/RestKit,qingsong-xu/RestKit,paperlesspost/RestKit,concreteinteractive/RestKit,LiuShulong/RestKit,fhchina/RestKit,Papercloud/RestKit,oligriffiths/RestKit,CenterDevice/RestKit,StasanTelnov/RestKit,RyanCodes/RestKit,cfis/RestKit,gank0326/restkit,money-alex2006hw/RestKit,lmirosevic/RestKit,braindata/RestKit-1,qingsong-xu/RestKit,moneytree/RestKit,antondarki/RestKit,imton/RestKit,baumatron/RestKit,sandyway/RestKit,caamorales/RestKit,CenterDevice/RestKit,nphkh/RestKit,common2015/RestKit,lucasecf/RestKit,wangjiangwen/RestKit,dx285/RestKit,damiannz/RestKit,coderChrisLee/RestKit,QLGu/RestKit,Papercloud/RestKit,canaydogan/RestKit,gank0326/restkit,goldstar/RestKit,QLGu/RestKit,hejunbinlan/RestKit,fhchina/RestKit,oligriffiths/RestKit,justinyaoqi/RestKit,damiannz/RestKit,jonesgithub/RestKit,Bogon/RestKit,zhenlove/RestKit,erichedstrom/RestKit,pbogdanv/RestKit,sachin-khard/NucRestKit,DejaMi/RestKit,Bogon/RestKit,wireitcollege/RestKit,mikarun/RestKit,wyzzarz/RestKit,lucasecf/RestKit,moritzh/RestKit,nphkh/RestKit,oligriffiths/RestKit,DejaMi/RestKit,RyanCodes/RestKit,RyanCodes/RestKit,ForrestAlfred/RestKit,jonesgithub/RestKit,DejaMi/RestKit,Livestream/RestKit,imton/RestKit,goldstar/RestKit,sandyway/RestKit,wuxsoft/RestKit,adozenlines/RestKit,zjh171/RestKit,Juraldinio/RestKit,braindata/RestKit,zilaiyedaren/RestKit,ipmobiletech/RestKit,agworld/RestKit,nett55/RestKit,nphkh/RestKit,samanalysis/RestKit,PonderProducts/RestKit,fhchina/RestKit,Papercloud/RestKit,cnbin/RestKit,hejunbinlan/RestKit,cfis/RestKit,coderChrisLee/RestKit,mberube09/RestKit,jrtaal/RestKit,common2015/RestKit,HYPERHYPER/RestKit2,gauravstomar/RestKit,money-alex2006hw/RestKit,Flutterbee/RestKit,Meihualu/RestKit,djz-code/RestKit,Livestream/RestKit,youssman/RestKit,aleufms/RestKit,percysnoodle/RestKit,zaichang/RestKit,wireitcollege/RestKit,jrtaal/RestKit,apontador/RestKit,ppierson/RestKit,CodewareTechnology/RestKit,HYPERHYPER/RestKit2,zjh171/RestKit,zaichang/RestKit,moritzh/RestKit,damiannz/RestKit,timbodeit/RestKit,nalindz/pulpfiction-RestKit,samanalysis/RestKit,HarrisLee/RestKit,cnbin/RestKit,gauravstomar/RestKit,zilaiyedaren/RestKit,oligriffiths/RestKit,gank0326/restkit,cnbin/RestKit,samanalysis/RestKit,qingsong-xu/RestKit,ForrestAlfred/RestKit,antondarki/RestKit,djz-code/RestKit,mberube09/RestKit,wyzzarz/RestKit,canaydogan/RestKit,percysnoodle/RestKit,timbodeit/RestKit,PonderProducts/RestKit,Papercloud/RestKit,kevmeyer/RestKit,dx285/RestKit,timbodeit/RestKit,sandyway/RestKit,Bogon/RestKit,gauravstomar/RestKit,jonesgithub/RestKit,thomaschristensen/RestKit,PonderProducts/RestKit,kevmeyer/RestKit,Flutterbee/RestKit,wangjiangwen/RestKit,RyanCodes/RestKit,hanangellove/RestKit,fedegasp/RestKit,zhenlove/RestKit,lmirosevic/RestKit,REXLabsInc/RestKit,jrtaal/RestKit,wyzzarz/RestKit,zaichang/RestKit,RyanCodes/RestKit,HYPERHYPER/RestKit2,orta/RestKit,oligriffiths/RestKit,hejunbinlan/RestKit,adozenlines/RestKit,fedegasp/RestKit,forcedotcom/RestKit,0x73/RestKit,ipmobiletech/RestKit,moritzh/RestKit,agworld/RestKit,lucasecf/RestKit,Gaantz/RestKit,mumer92/RestKit,DocuSignDev/RestKit,mikarun/RestKit,TwinEngineLabs-Engineering/RestKit-TEL,cryptojuice/RestKit,ipmobiletech/RestKit,TheFarm/RestKit,samkrishna/RestKit,CodewareTechnology/RestKit,taptaptap/RestKit,wireitcollege/RestKit,hanangellove/RestKit,taptaptap/RestKit,samanalysis/RestKit,youssman/RestKit,imton/RestKit,pbogdanv/RestKit,sandyway/RestKit,mberube09/RestKit,antondarki/RestKit,cnbin/RestKit,Meihualu/RestKit,jonesgithub/RestKit,nphkh/RestKit,justinyaoqi/RestKit,wuxsoft/RestKit,HarrisLee/RestKit,Meihualu/RestKit,0x73/RestKit,oye-lionel/GithubTest,ppierson/RestKit,SuPair/RestKit,justinyaoqi/RestKit,sachin-khard/NucRestKit,zjh171/RestKit,money-alex2006hw/RestKit,0dayZh/RestKit,forcedotcom/RestKit,Flutterbee/RestKit,apontador/RestKit,CodewareTechnology/RestKit,QLGu/RestKit,mavericksunny/RestKit,margarina/RestKit-latest,caamorales/RestKit,QLGu/RestKit,nalindz/pulpfiction-RestKit,Livestream/RestKit,0x73/RestKit,wuxsoft/RestKit,0x73/RestKit,moneytree/RestKit,hanangellove/RestKit,loverbabyz/RestKit,SuPair/RestKit,justinyaoqi/RestKit,0dayZh/RestKit,baumatron/RestKit,margarina/RestKit-latest,REXLabsInc/RestKit,fedegasp/RestKit,vilinskiy-playdayteam/RestKit,caamorales/RestKit,Meihualu/RestKit,mcfedr/RestKit,RestKit/RestKit,ipmobiletech/RestKit,samanalysis/RestKit,damiannz/RestKit,cryptojuice/RestKit,Flutterbee/RestKit,wyzzarz/RestKit,gumdal/RestKit,zilaiyedaren/RestKit,Gaantz/RestKit,braindata/RestKit,zaichang/RestKit,concreteinteractive/RestKit,DejaMi/RestKit,paperlesspost/RestKit,zhenlove/RestKit,ChinaPicture/RestKit,lmirosevic/RestKit,djz-code/RestKit,SuPair/RestKit,dx285/RestKit,lmirosevic/RestKit,erichedstrom/RestKit,moneytree/RestKit,hejunbinlan/RestKit,TwinEngineLabs-Engineering/RestKit-TEL,caamorales/RestKit,braindata/RestKit-1,common2015/RestKit,fedegasp/RestKit,ChinaPicture/RestKit,sachin-khard/NucleusRestKit,moneytree/RestKit,ChinaPicture/RestKit,zilaiyedaren/RestKit,forcedotcom/RestKit,braindata/RestKit-1,HarrisLee/RestKit,CenterDevice/RestKit,ppierson/RestKit,StasanTelnov/RestKit,mavericksunny/RestKit,fhchina/RestKit,Livestream/RestKit,pbogdanv/RestKit,oye-lionel/GithubTest,margarina/RestKit-latest,erichedstrom/RestKit,percysnoodle/RestKit,sachin-khard/NucRestKit,nalindz/pulpfiction-RestKit,lmirosevic/RestKit,common2015/RestKit,LiuShulong/RestKit,thomaschristensen/RestKit,youssman/RestKit,thomaschristensen/RestKit,fhchina/RestKit,baumatron/RestKit,sandyway/RestKit,DejaMi/RestKit,Gaantz/RestKit,zhenlove/RestKit,apontador/RestKit,braindata/RestKit,mumer92/RestKit,forcedotcom/RestKit,naqi/RestKit,pat2man/RestKit,gumdal/RestKit,mberube09/RestKit,Bogon/RestKit,REXLabsInc/RestKit,CenterDevice/RestKit,gank0326/restkit,samkrishna/RestKit,braindata/RestKit,mikarun/RestKit,sachin-khard/NucRestKit,TwinEngineLabs-Engineering/RestKit-TEL,aleufms/RestKit,qingsong-xu/RestKit,aleufms/RestKit,moritzh/RestKit,taptaptap/RestKit,agworld/RestKit,dx285/RestKit,cfis/RestKit,money-alex2006hw/RestKit,margarina/RestKit-latest,aleufms/RestKit,mavericksunny/RestKit,loverbabyz/RestKit,zjh171/RestKit,wangjiangwen/RestKit,wuxsoft/RestKit,mavericksunny/RestKit,paperlesspost/RestKit,TheFarm/RestKit,kevmeyer/RestKit,cryptojuice/RestKit,vilinskiy-playdayteam/RestKit,Gaantz/RestKit,antondarki/RestKit,TwinEngineLabs-Engineering/RestKit-TEL,concreteinteractive/RestKit,damiannz/RestKit,oye-lionel/GithubTest,pat2man/RestKit,hanangellove/RestKit,agworld/RestKit,TwinEngineLabs-Engineering/RestKit-TEL,caamorales/RestKit,moneytree/RestKit,pbogdanv/RestKit,sachin-khard/NucleusRestKit,baumatron/RestKit,Bogon/RestKit,orta/RestKit,pat2man/RestKit,pat2man/RestKit,ChinaPicture/RestKit,mikarun/RestKit,CodewareTechnology/RestKit,wireitcollege/RestKit,Meihualu/RestKit,LiuShulong/RestKit,jonesgithub/RestKit,gumdal/RestKit,youssman/RestKit,mikarun/RestKit,Juraldinio/RestKit,adozenlines/RestKit,samkrishna/RestKit,SuPair/RestKit,gauravstomar/RestKit,wangjiangwen/RestKit,naqi/RestKit,Juraldinio/RestKit,vilinskiy-playdayteam/RestKit,naqi/RestKit,PonderProducts/RestKit,oye-lionel/GithubTest,Papercloud/RestKit,imton/RestKit
|
d484040a5fc8d8d8a7a6a0239fc3b34486258181
|
test/CodeGen/2005-07-20-SqrtNoErrno.c
|
test/CodeGen/2005-07-20-SqrtNoErrno.c
|
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
// llvm.sqrt has undefined behavior on negative inputs, so it is
// inappropriate to translate C/C++ sqrt to this.
float sqrtf(float x);
float foo(float X) {
// CHECK: foo
// CHECK: call float @sqrtf(float %tmp) readnone
// Check that this is marked readonly when errno is ignored.
return sqrtf(X);
}
|
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
// llvm.sqrt has undefined behavior on negative inputs, so it is
// inappropriate to translate C/C++ sqrt to this.
float sqrtf(float x);
float foo(float X) {
// CHECK: foo
// CHECK: call float @sqrtf(float %
// Check that this is marked readonly when errno is ignored.
return sqrtf(X);
}
|
Adjust check for release mode.
|
Adjust check for release mode.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@136158 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,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,llvm-mirror/clang
|
3c1245b31011d25f7c660592d456cf9109766195
|
libyaul/math/color.h
|
libyaul/math/color.h
|
#ifndef __libfixmath_color_h__
#define __libfixmath_color_h__
#include "fix16.h"
typedef union {
struct {
unsigned int r:5;
unsigned int g:5;
unsigned int b:5;
unsigned int :1;
} __packed;
uint8_t comp[3];
uint16_t raw;
} __aligned (4) color_rgb_t;
typedef union {
struct {
fix16_t h;
fix16_t s;
fix16_t v;
};
fix16_t comp[3];
} __aligned (4) color_fix16_hsv_t;
typedef union {
struct {
uint8_t h;
uint8_t s;
uint8_t v;
};
uint8_t comp[3];
} __aligned (4) color_uint8_hsv_t;
extern void color_rgb_hsv_convert(const color_rgb_t *,
color_fix16_hsv_t *);
extern void color_hsv_lerp(const color_fix16_hsv_t *, const color_fix16_hsv_t *,
fix16_t, color_fix16_hsv_t *);
#endif /* !__libfixmath_color_h__ */
|
#ifndef __libfixmath_color_h__
#define __libfixmath_color_h__
#include "fix16.h"
typedef union {
struct {
unsigned int :1;
unsigned int b:5;
unsigned int g:5;
unsigned int r:5;
} __packed;
uint8_t comp[3];
uint16_t raw;
} __aligned (4) color_rgb_t;
typedef union {
struct {
fix16_t v;
fix16_t s;
fix16_t h;
};
fix16_t comp[3];
} __aligned (4) color_fix16_hsv_t;
typedef union {
struct {
uint8_t v;
uint8_t s;
uint8_t h;
};
uint8_t comp[3];
} __aligned (4) color_uint8_hsv_t;
extern void color_rgb_hsv_convert(const color_rgb_t *,
color_fix16_hsv_t *);
extern void color_hsv_lerp(const color_fix16_hsv_t *, const color_fix16_hsv_t *,
fix16_t, color_fix16_hsv_t *);
#endif /* !__libfixmath_color_h__ */
|
Change R and B components
|
Change R and B components
|
C
|
mit
|
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
|
5a7a1d9b287813559f13298575dba1de09040900
|
inc/angle.h
|
inc/angle.h
|
#pragma once
#include <boost/math/constants/constants.hpp>
#include "encoder.h"
namespace angle {
template <typename T>
T wrap(T angle) {
angle = std::fmod(angle, boost::math::constants::two_pi<T>());
if (angle >= boost::math::constants::pi<T>()) {
angle -= boost::math::constants::two_pi<T>();
}
if (angle < -boost::math::constants::pi<T>()) {
angle += boost::math::constants::two_pi<T>();
}
return angle;
}
/*
* Get angle from encoder count (enccnt_t is uint32_t)
* Convert angle from enccnt_t (unsigned) to corresponding signed type and use negative
* values for any count over half a revolution.
*/
template <typename T>
T encoder_count(const Encoder& encoder) {
auto position = static_cast<std::make_signed<enccnt_t>::type>(encoder.count());
auto rev = static_cast<std::make_signed<enccnt_t>::type>(encoder.config().counts_per_rev);
if (position > rev / 2) {
position -= rev;
}
return static_cast<T>(position) / rev * boost::math::constants::two_pi<T>();
}
} // namespace angle
|
#pragma once
#include <boost/math/constants/constants.hpp>
#include "encoder.h"
#include "encoderfoaw.h"
namespace angle {
template <typename T>
T wrap(T angle) {
angle = std::fmod(angle, boost::math::constants::two_pi<T>());
if (angle >= boost::math::constants::pi<T>()) {
angle -= boost::math::constants::two_pi<T>();
}
if (angle < -boost::math::constants::pi<T>()) {
angle += boost::math::constants::two_pi<T>();
}
return angle;
}
/*
* Get angle from encoder count (enccnt_t is uint32_t)
* Convert angle from enccnt_t (unsigned) to corresponding signed type and use negative
* values for any count over half a revolution.
*/
template <typename T>
T encoder_count(const Encoder& encoder) {
auto position = static_cast<std::make_signed<enccnt_t>::type>(encoder.count());
auto rev = static_cast<std::make_signed<enccnt_t>::type>(encoder.config().counts_per_rev);
if (position > rev / 2) {
position -= rev;
}
return static_cast<T>(position) / rev * boost::math::constants::two_pi<T>();
}
template <typename T, size_t N>
T encoder_rate(const EncoderFoaw<T, N>& encoder) {
auto rev = static_cast<std::make_signed<enccnt_t>::type>(encoder.config().counts_per_rev);
return static_cast<T>(encoder.velocity()) / rev * boost::math::constants::two_pi<T>();
}
} // namespace angle
|
Add function to obtain encoder angular rate
|
Add function to obtain encoder angular rate
Add function to angle namespace to obtain encoder angular rate in rad/s.
This requires that the encoder object has a velocity() member function
which means only EncoderFoaw for now.
|
C
|
bsd-2-clause
|
oliverlee/phobos,oliverlee/phobos,oliverlee/phobos,oliverlee/phobos
|
03b0df95cdef76fcdbad84bb10817733bd03220f
|
test/CodeGen/unwind-attr.c
|
test/CodeGen/unwind-attr.c
|
// RUN: %clang_cc1 -fexceptions -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck -check-prefix NOEXC %s
int opaque();
// CHECK: define [[INT:i.*]] @test0() {
// CHECK-NOEXC: define [[INT:i.*]] @test0() nounwind {
int test0(void) {
return opaque();
}
// <rdar://problem/8087431>: locally infer nounwind at -O0
// CHECK: define [[INT:i.*]] @test1() nounwind {
// CHECK-NOEXC: define [[INT:i.*]] @test1() nounwind {
int test1(void) {
}
|
// RUN: %clang_cc1 -fexceptions -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck -check-prefix NOEXC %s
int opaque();
// CHECK: define [[INT:i.*]] @test0() {
// CHECK-NOEXC: define [[INT:i.*]] @test0() nounwind {
int test0(void) {
return opaque();
}
// <rdar://problem/8087431>: locally infer nounwind at -O0
// CHECK: define [[INT:i.*]] @test1() nounwind {
// CHECK-NOEXC: define [[INT:i.*]] @test1() nounwind {
int test1(void) {
return 0;
}
|
Fix a warning on a test.
|
Fix a warning on a test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@110165 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
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,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
|
4450bf39371fd17df18f8eee181a5f77303f5eee
|
src/medCore/medDataReaderWriter.h
|
src/medCore/medDataReaderWriter.h
|
#ifndef MED_DATA_READER_WRITER_H
#define MED_DATA_READER_WRITER_H
#include <dtkCore/dtkSmartPointer.h>
#include <dtkCore/dtkAbstractDataReader.h>
#include <dtkCore/dtkAbstractDataWriter.h>
#include <dtkCore/dtkAbstractData.h>
struct medDataReaderWriter {
typedef dtkSmartPointer<dtkAbstractDataReader> Reader;
typedef dtkSmartPointer<dtkAbstractDataWriter> Writer;
typedef dtkSmartPointer<dtkAbstractData> Data;
static Reader reader(const QString& path);
static Writer writer(const QString& path,const dtkAbstractData* data);
static Data read(const QString& path);
static bool write(const QString& path,dtkAbstractData* data);
};
#endif // ! MED_DATA_READER_WRITER_H
|
#ifndef MED_DATA_READER_WRITER_H
#define MED_DATA_READER_WRITER_H
#include <dtkCore/dtkSmartPointer.h>
#include <dtkCore/dtkAbstractDataReader.h>
#include <dtkCore/dtkAbstractDataWriter.h>
#include <dtkCore/dtkAbstractData.h>
#include "medCoreExport.h"
struct MEDCORE_EXPORT medDataReaderWriter {
typedef dtkSmartPointer<dtkAbstractDataReader> Reader;
typedef dtkSmartPointer<dtkAbstractDataWriter> Writer;
typedef dtkSmartPointer<dtkAbstractData> Data;
static Reader reader(const QString& path);
static Writer writer(const QString& path,const dtkAbstractData* data);
static Data read(const QString& path);
static bool write(const QString& path,dtkAbstractData* data);
};
#endif // ! MED_DATA_READER_WRITER_H
|
Correct for windows compilation (exports)
|
Correct for windows compilation (exports)
|
C
|
bsd-3-clause
|
NicolasSchnitzler/medInria-public,aabadie/medInria-public,aabadie/medInria-public,rdebroiz/medInria-public,NicolasSchnitzler/medInria-public,rdebroiz/medInria-public,NicolasSchnitzler/medInria-public,rdebroiz/medInria-public,aabadie/medInria-public
|
7cb013f3d3f72a53c607c45492c26184283ac990
|
examples/ZXSpectrum/cpusimple.c
|
examples/ZXSpectrum/cpusimple.c
|
/*
* ZXSpectrum
*
* Uses Z80 step core built in EDL
* Rest is C for now
*/
#include <stdio.h>
#include <stdint.h>
void STEP(void);
void RESET(void);
void INTERRUPT(uint8_t);
extern uint8_t CYCLES;
void CPU_RESET()
{
RESET();
}
int CPU_STEP(int intClocks,int doDebug)
{
if (intClocks)
{
INTERRUPT(0xFF);
if (CYCLES==0)
{
STEP();
}
}
else
{
STEP();
}
return CYCLES;
}
|
/*
* ZXSpectrum
*
* Uses Z80 step core built in EDL
* Rest is C for now
*/
#include <stdio.h>
#include <stdint.h>
void STEP(void);
void RESET(void);
void INTERRUPT(uint8_t);
extern uint16_t PC;
extern uint8_t CYCLES;
int Disassemble(unsigned int address,int registers);
void CPU_RESET()
{
RESET();
}
int CPU_STEP(int intClocks,int doDebug)
{
if (doDebug)
{
Disassemble(PC,1);
}
if (intClocks)
{
INTERRUPT(0xFF);
if (CYCLES==0)
{
STEP();
}
}
else
{
STEP();
}
return CYCLES;
}
|
Put disassembly into simple core
|
Put disassembly into simple core
|
C
|
mit
|
SavourySnaX/EDL,SavourySnaX/EDL
|
44d20ecaf13cb0245ee562d234939e762b5b0921
|
include/agent.h
|
include/agent.h
|
#ifndef AGENT_CPP_H
#define AGENT_CPP_H
#include <vector>
#include "directive.h"
// forward declaration
namespace Url
{
class Url;
}
namespace Rep
{
class Agent
{
public:
/* The type for the delay. */
typedef float delay_t;
/**
* Construct an agent.
*/
explicit Agent(const std::string& host) :
directives_(), delay_(-1.0), sorted_(true), host_(host) {}
/**
* Add an allowed directive.
*/
Agent& allow(const std::string& query);
/**
* Add a disallowed directive.
*/
Agent& disallow(const std::string& query);
/**
* Set the delay for this agent.
*/
Agent& delay(delay_t value) {
delay_ = value;
return *this;
}
/**
* Return the delay for this agent.
*/
delay_t delay() const { return delay_; }
/**
* A vector of the directives, in priority-sorted order.
*/
const std::vector<Directive>& directives() const;
/**
* Return true if the URL (either a full URL or a path) is allowed.
*/
bool allowed(const std::string& path) const;
std::string str() const;
private:
bool is_external(const Url::Url& url) const;
mutable std::vector<Directive> directives_;
delay_t delay_;
mutable bool sorted_;
std::string host_;
};
}
#endif
|
#ifndef AGENT_CPP_H
#define AGENT_CPP_H
#include <vector>
#include "directive.h"
// forward declaration
namespace Url
{
class Url;
}
namespace Rep
{
class Agent
{
public:
/* The type for the delay. */
typedef float delay_t;
/**
* Default constructor
*/
Agent() : Agent("") {}
/**
* Construct an agent.
*/
explicit Agent(const std::string& host) :
directives_(), delay_(-1.0), sorted_(true), host_(host) {}
/**
* Add an allowed directive.
*/
Agent& allow(const std::string& query);
/**
* Add a disallowed directive.
*/
Agent& disallow(const std::string& query);
/**
* Set the delay for this agent.
*/
Agent& delay(delay_t value) {
delay_ = value;
return *this;
}
/**
* Return the delay for this agent.
*/
delay_t delay() const { return delay_; }
/**
* A vector of the directives, in priority-sorted order.
*/
const std::vector<Directive>& directives() const;
/**
* Return true if the URL (either a full URL or a path) is allowed.
*/
bool allowed(const std::string& path) const;
std::string str() const;
private:
bool is_external(const Url::Url& url) const;
mutable std::vector<Directive> directives_;
delay_t delay_;
mutable bool sorted_;
std::string host_;
};
}
#endif
|
Add back default constructor for Agent.
|
Add back default constructor for Agent.
Previously, this was removed in #28, but the Cython bindings in reppy
*really* want there to be a default constructor, so I'm adding it back
for convenience.
|
C
|
mit
|
seomoz/rep-cpp,seomoz/rep-cpp
|
d799cd9b227334a81c4c98068f09bad8c4be27c1
|
src/libwatcher/watcherGlobalFunctions.h
|
src/libwatcher/watcherGlobalFunctions.h
|
#ifndef WATCHER_GLOBAL_FUNCTIONS
#define WATCHER_GLOBAL_FUNCTIONS
#include <boost/asio/ip/address.hpp>
#include <boost/serialization/split_free.hpp>
BOOST_SERIALIZATION_SPLIT_FREE(boost::asio::ip::address);
namespace boost
{
namespace serialization
{
template<class Archive>
void save(Archive & ar, const boost::asio::ip::address & a, const unsigned int version)
{
std::string tmp=a.to_string();
ar & tmp;
}
template<class Archive>
void load(Archive & ar, boost::asio::ip::address & a, const unsigned int version)
{
std::string tmp;
ar & tmp;
a=boost::asio::ip::address::from_string(tmp);
}
}
}
#endif // WATCHER_GLOBAL_FUNCTIONS
|
#ifndef WATCHER_GLOBAL_FUNCTIONS
#define WATCHER_GLOBAL_FUNCTIONS
#include <boost/serialization/split_free.hpp>
#include "watcherTypes.h"
BOOST_SERIALIZATION_SPLIT_FREE(boost::asio::ip::address);
namespace boost
{
namespace serialization
{
template<class Archive>
void save(Archive & ar, const watcher::NodeIdentifier &a, const unsigned int version)
{
std::string tmp=a.to_string();
ar & tmp;
}
template<class Archive>
void load(Archive & ar, watcher::NodeIdentifier &a, const unsigned int version)
{
std::string tmp;
ar & tmp;
a=boost::asio::ip::address::from_string(tmp);
}
}
}
#endif // WATCHER_GLOBAL_FUNCTIONS
|
Use watcher::NodeIdentifier in place of boost::asio::address
|
Use watcher::NodeIdentifier in place of boost::asio::address
|
C
|
agpl-3.0
|
glawler/watcher-visualization,glawler/watcher-visualization,glawler/watcher-visualization,glawler/watcher-visualization,glawler/watcher-visualization
|
1a78a1e8a8b323fe34ef21e9b4cc8184379809f3
|
src/JpegEnc/stdafx.h
|
src/JpegEnc/stdafx.h
|
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#include "targetver.h"
#include <stdio.h>
#include <tchar.h>
// TODO: reference additional headers your program requires here
|
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#include "targetver.h"
#include <cassert>
|
Remove unused headers and add cassert to PCH.
|
Remove unused headers and add cassert to PCH.
|
C
|
bsd-3-clause
|
dwarfcrank/yolo-dangerzone,dwarfcrank/yolo-dangerzone
|
c723875e377f92710bae4e55fbafb7ba8ea6220c
|
src/boundaryCondition.h
|
src/boundaryCondition.h
|
/***************************************************************************//**
* \file boundaryCondition.h
* \author Krishnan, A. (anush@bu.edu)
* \brief Definition of the class \c boundaryCondition
*/
#pragma once
#include <string>
#include <sstream>
#include "types.h"
#include "parameterDB.h"
/**
* \class boundaryCondition
* \brief Store the boundary conditions for a given system
*/
class boundaryCondition
{
public:
bcType type; ///< type of boundary condition
real value; ///< numerical value associated with the boundary condition
/**
* \brief Constructor of the class \c boundaryCondition.
*
* Initialize with a Dirichlet-type boundary condition
* with a value sets to zero.
*
*/
boundaryCondition() : type(DIRICHLET), value(0) {};
/**
* \brief Other constructor of the class \c boundaryCondition.
*
* Initialize with a given boundary condition type
* and a given value.
*
*/
boundaryCondition(bcType _type, real _value) : type(_type), value(_value) {};
/*const char *print()
{
std::stringstream ss;
ss << toString(this->type);
ss << " : ";
ss << this->value;
std::string st = ss.str();
//std::cout << st << std::endl;
return ss.str().c_str();
}*/
};
|
/***************************************************************************//**
* \file boundaryCondition.h
* \author Anush Krishnan (anush@bu.edu)
* \brief Definition of the class \c boundaryCondition.
*/
#pragma once
#include <string>
#include <sstream>
#include "types.h"
#include "parameterDB.h"
/**
* \class boundaryCondition
* \brief Stores the boundary conditions for a given system.
*/
class boundaryCondition
{
public:
bcType type; ///< type of boundary condition
real value; ///< numerical value associated with the boundary condition
/**
* \brief Constructor of the class \c boundaryCondition.
*
* Boundary condition initialized with a Dirichlet-type with
* with a value sets to zero.
*
*/
boundaryCondition() : type(DIRICHLET), value(0) {};
/**
* \brief Other constructor of the class \c boundaryCondition.
*
* Boundary condition initialized with a given type and a given value.
*
*/
boundaryCondition(bcType _type, real _value) : type(_type), value(_value) {};
/*const char *print()
{
std::stringstream ss;
ss << toString(this->type);
ss << " : ";
ss << this->value;
std::string st = ss.str();
//std::cout << st << std::endl;
return ss.str().c_str();
}*/
};
|
Update Doxygen documentation with conventions
|
Update Doxygen documentation with conventions
|
C
|
mit
|
barbagroup/cuIBM,barbagroup/cuIBM,barbagroup/cuIBM
|
a7e170979205d11da9e41c4d9c0a032a0f9a6b2b
|
src/libevent2-emul.h
|
src/libevent2-emul.h
|
#ifndef EVENT2_EVENT_H
#define EVENT2_EVENT_H
#define SJ_LIBEVENT_EMULATION 1
#include <event.h>
#include <evutil.h>
#include "qt4compat.h"
typedef int evutil_socket_t;
typedef void(*event_callback_fn)(evutil_socket_t, short, void*);
Q_DECL_HIDDEN inline struct event* event_new(struct event_base* base, evutil_socket_t fd, short int events, event_callback_fn callback, void* callback_arg)
{
struct event* e = new struct event;
event_set(e, fd, events, callback, callback_arg);
event_base_set(base, e);
return e;
}
Q_DECL_HIDDEN inline void event_free(struct event* e)
{
delete e;
}
#endif
|
#ifndef EVENT2_EVENT_H
#define EVENT2_EVENT_H
#define SJ_LIBEVENT_EMULATION 1
#include <event.h>
#ifndef EV_H_
// libevent emulation by libev
# include <evutil.h>
#endif
#include "qt4compat.h"
typedef int evutil_socket_t;
typedef void(*event_callback_fn)(evutil_socket_t, short, void*);
Q_DECL_HIDDEN inline struct event* event_new(struct event_base* base, evutil_socket_t fd, short int events, event_callback_fn callback, void* callback_arg)
{
struct event* e = new struct event;
event_set(e, fd, events, callback, callback_arg);
event_base_set(base, e);
return e;
}
Q_DECL_HIDDEN inline void event_free(struct event* e)
{
delete e;
}
#ifdef EV_H_
Q_DECL_HIDDEN inline int event_reinit(struct event_base* base)
{
Q_UNUSED(base);
qWarning("%s emulation is not supported.", Q_FUNC_INFO);
return 1;
}
#define evutil_gettimeofday(tv, tz) gettimeofday((tv), (tz))
#define evutil_timeradd(tvp, uvp, vvp) timeradd((tvp), (uvp), (vvp))
#define evutil_timersub(tvp, uvp, vvp) timersub((tvp), (uvp), (vvp))
#define evutil_timercmp(tvp, uvp, cmp) \
(((tvp)->tv_sec == (uvp)->tv_sec) ? \
((tvp)->tv_usec cmp (uvp)->tv_usec) : \
((tvp)->tv_sec cmp (uvp)->tv_sec))
#endif
#endif
|
Support for libevent emulation with libev
|
Support for libevent emulation with libev
Hello to CentOS where libev-devel cannot coexist with libevent2-devel
|
C
|
mit
|
sjinks/qt_eventdispatcher_libevent,sjinks/qt_eventdispatcher_libevent,sjinks/qt_eventdispatcher_libevent
|
d828e340a80f268a6e51d451a75fb6c2282e17b1
|
include/llvm/ADT/HashExtras.h
|
include/llvm/ADT/HashExtras.h
|
//===-- llvm/ADT/HashExtras.h - Useful functions for STL hash ---*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains some templates that are useful if you are working with the
// STL Hashed containers.
//
// No library is required when using these functinons.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_ADT_HASHEXTRAS_H
#define LLVM_ADT_HASHEXTRAS_H
#include "llvm/ADT/hash_map"
#include <string>
// Cannot specialize hash template from outside of the std namespace.
namespace HASH_NAMESPACE {
template <> struct hash<std::string> {
size_t operator()(std::string const &str) const {
return hash<char const *>()(str.c_str());
}
};
// Provide a hash function for arbitrary pointers...
template <class T> struct hash<T *> {
inline size_t operator()(const T *Val) const {
return reinterpret_cast<size_t>(Val);
}
};
} // End namespace std
#endif
|
//===-- llvm/ADT/HashExtras.h - Useful functions for STL hash ---*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains some templates that are useful if you are working with the
// STL Hashed containers.
//
// No library is required when using these functinons.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_ADT_HASHEXTRAS_H
#define LLVM_ADT_HASHEXTRAS_H
#include "llvm/ADT/hash_map"
#include <string>
// Cannot specialize hash template from outside of the std namespace.
namespace HASH_NAMESPACE {
// Provide a hash function for arbitrary pointers...
template <class T> struct hash<T *> {
inline size_t operator()(const T *Val) const {
return reinterpret_cast<size_t>(Val);
}
};
template <> struct hash<std::string> {
size_t operator()(std::string const &str) const {
return hash<char const *>()(str.c_str());
}
};
} // End namespace std
#endif
|
Define the pointer hash struct before the string one, to improve compatibility with ICC. Patch contributed by Bjørn Wennberg.
|
Define the pointer hash struct before the string one, to improve compatibility
with ICC. Patch contributed by Bjørn Wennberg.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@18663 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap
|
0755c21f72f88bf986ad22c74a31f1c5f610f6c7
|
TelepathyQt4Yell/Farstream/types.h
|
TelepathyQt4Yell/Farstream/types.h
|
/*
* This file is part of TelepathyQt4Yell
*
* Copyright (C) 2011 Collabora Ltd. <http://www.collabora.co.uk/>
*
* 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 St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _TelepathyQt4Yell_Farstream_types_h_HEADER_GUARD_
#define _TelepathyQt4Yell_Farstream_types_h_HEADER_GUARD_
#ifndef IN_TELEPATHY_QT4_YELL_FARSTREAM_HEADER
#error IN_TELEPATHY_QT4_YELL_FARSTREAM_HEADER
#endif
#include <TelepathyQt4/Types>
namespace Tpy
{
class FarstreamChannelFactory;
typedef Tp::SharedPtr<FarstreamChannelFactory> FarstreamChannelFactoryPtr;
} // Tpy
#endif
|
/*
* This file is part of TelepathyQt4Yell
*
* Copyright (C) 2011 Collabora Ltd. <http://www.collabora.co.uk/>
*
* 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 St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _TelepathyQt4Yell_Farstream_types_h_HEADER_GUARD_
#define _TelepathyQt4Yell_Farstream_types_h_HEADER_GUARD_
#ifndef IN_TELEPATHY_QT4_YELL_FARSTREAM_HEADER
#error IN_TELEPATHY_QT4_YELL_FARSTREAM_HEADER
#endif
#include <TelepathyQt4Yell/Types>
namespace Tpy
{
class FarstreamChannelFactory;
typedef Tp::SharedPtr<FarstreamChannelFactory> FarstreamChannelFactoryPtr;
} // Tpy
#endif
|
Include TelepathyQt4Yell/Types instead of TelepathyQt4/Types.
|
Farstream/Types: Include TelepathyQt4Yell/Types instead of TelepathyQt4/Types.
|
C
|
lgpl-2.1
|
freedesktop-unofficial-mirror/telepathy__telepathy-qt4-yell,mck182/telepathy-qt4-yell,mck182/telepathy-qt4-yell,mck182/telepathy-qt4-yell,freedesktop-unofficial-mirror/telepathy__telepathy-qt4-yell,freedesktop-unofficial-mirror/telepathy__telepathy-qt4-yell,mck182/telepathy-qt4-yell,freedesktop-unofficial-mirror/telepathy__telepathy-qt4-yell
|
c13b3fdb2593a7af3281755e2b1ece4dd51ffdb2
|
reporting.h
|
reporting.h
|
/* see LICENSE file for copyright and license details */
/* report errors or warnings */
extern char *argv0;
extern int debug;
extern int interactive_mode;
#define reportprint(E, M, ...) { \
if (debug) \
fprintf(stderr, "%s:%d: %s: " M "\n", __FILE__, __LINE__, \
!E || interactive_mode ? "warning" : "error", ##__VA_ARGS__); \
else \
fprintf(stderr, "%s: " M "\n", argv0, ##__VA_ARGS__); \
}
#define reporterr(M, ...) { \
reportprint(1, M, ##__VA_ARGS__); \
exit(1); \
}
#define _reporterr(M, ...) { \
reportprint(1, M, ##__VA_ARGS__); \
_exit(1); \
}
#define report(M, ...) { \
reportprint(0, M, ##__VA_ARGS__); \
if (!interactive_mode) \
exit(1); \
}
#define reportret(R, M, ...) { \
reportprint(0, M, ##__VA_ARGS__); \
if (!interactive_mode) \
exit(1); \
else \
return R; \
}
#define reportvar(V, M) { \
V = M; \
return NULL; \
}
|
/* see LICENSE file for copyright and license details */
/* report errors or warnings */
extern char *argv0;
extern int debug;
extern int interactive_mode;
#define reportprint(E, M, ...) do { \
if (debug) \
fprintf(stderr, "%s:%d: %s: " M "\n", __FILE__, __LINE__, \
!E || interactive_mode ? "warning" : "error", ##__VA_ARGS__); \
else \
fprintf(stderr, "%s: " M "\n", argv0, ##__VA_ARGS__); \
} while(0)
#define reporterr(M, ...) do { \
reportprint(1, M, ##__VA_ARGS__); \
exit(1); \
} while(0)
#define _reporterr(M, ...) do { \
reportprint(1, M, ##__VA_ARGS__); \
_exit(1); \
} while(0)
#define report(M, ...) do { \
reportprint(0, M, ##__VA_ARGS__); \
if (!interactive_mode) \
exit(1); \
} while(0)
#define reportret(R, M, ...) do { \
reportprint(0, M, ##__VA_ARGS__); \
if (!interactive_mode) \
exit(1); \
else \
return R; \
} while(0)
#define reportvar(V, M) do { \
V = M; \
return NULL; \
} while(0)
|
Fix report macros in if else statements
|
Fix report macros in if else statements
|
C
|
bsd-3-clause
|
rain-1/s,rain-1/s,rain-1/s
|
fd767a1b53b8f2ef3ca484c8bbbcb29ffcc8c3b9
|
src/util/util_version.h
|
src/util/util_version.h
|
/*
* Copyright 2011-2016 Blender Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __UTIL_VERSION_H__
#define __UTIL_VERSION_H__
/* Cycles version number */
CCL_NAMESPACE_BEGIN
#define CYCLES_VERSION_MAJOR 1
#define CYCLES_VERSION_MINOR 11
#define CYCLES_VERSION_PATCH 0
#define CYCLES_MAKE_VERSION_STRING2(a, b, c) #a "." #b "." #c
#define CYCLES_MAKE_VERSION_STRING(a, b, c) CYCLES_MAKE_VERSION_STRING2(a, b, c)
#define CYCLES_VERSION_STRING \
CYCLES_MAKE_VERSION_STRING(CYCLES_VERSION_MAJOR, CYCLES_VERSION_MINOR, CYCLES_VERSION_PATCH)
CCL_NAMESPACE_END
#endif /* __UTIL_VERSION_H__ */
|
/*
* Copyright 2011-2016 Blender Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __UTIL_VERSION_H__
#define __UTIL_VERSION_H__
/* Cycles version number */
CCL_NAMESPACE_BEGIN
#define CYCLES_VERSION_MAJOR 1
#define CYCLES_VERSION_MINOR 12
#define CYCLES_VERSION_PATCH 0
#define CYCLES_MAKE_VERSION_STRING2(a, b, c) #a "." #b "." #c
#define CYCLES_MAKE_VERSION_STRING(a, b, c) CYCLES_MAKE_VERSION_STRING2(a, b, c)
#define CYCLES_VERSION_STRING \
CYCLES_MAKE_VERSION_STRING(CYCLES_VERSION_MAJOR, CYCLES_VERSION_MINOR, CYCLES_VERSION_PATCH)
CCL_NAMESPACE_END
#endif /* __UTIL_VERSION_H__ */
|
Bump version to 1.12, matching blender 2.83 release cycle
|
Bump version to 1.12, matching blender 2.83 release cycle
|
C
|
apache-2.0
|
tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird
|
e0d52710bfa776312443efe3a70e7e0544bb207f
|
src/fs.h
|
src/fs.h
|
// Copyright (c) 2017-2020 The Bitcoin Core developers
// Copyright (c) 2020 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_FS_H
#define BITCOIN_FS_H
#include <stdio.h>
#include <string>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
/** Filesystem operations and types */
namespace fs = boost::filesystem;
/** Bridge operations to C stdio */
namespace fsbridge {
FILE *fopen(const fs::path& p, const char *mode);
FILE *freopen(const fs::path& p, const char *mode, FILE *stream);
};
#endif
|
// Copyright (c) 2017-2020 The Bitcoin Core developers
// Copyright (c) 2020 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_FS_H
#define BITCOIN_FS_H
#include <stdio.h>
#include <string>
#define BOOST_FILESYSTEM_NO_DEPRECATED
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
/** Filesystem operations and types */
namespace fs = boost::filesystem;
/** Bridge operations to C stdio */
namespace fsbridge {
FILE *fopen(const fs::path& p, const char *mode);
FILE *freopen(const fs::path& p, const char *mode, FILE *stream);
};
#endif
|
Enforce that no deprecated boost filesystem methods can be re-introduced
|
Enforce that no deprecated boost filesystem methods can be re-introduced
This macro define will cause compilation errors in the event that any
deprecated are re-introduced to the codebase.
|
C
|
mit
|
PIVX-Project/PIVX,PIVX-Project/PIVX,Darknet-Crypto/Darknet,PIVX-Project/PIVX,PIVX-Project/PIVX,PIVX-Project/PIVX,Darknet-Crypto/Darknet,PIVX-Project/PIVX,Darknet-Crypto/Darknet,Darknet-Crypto/Darknet,PIVX-Project/PIVX,PIVX-Project/PIVX,Darknet-Crypto/Darknet,PIVX-Project/PIVX,Darknet-Crypto/Darknet
|
77f2d3fd9da54cb0398fda96cb795b320145ea37
|
src/array.h
|
src/array.h
|
#ifndef ARRAY_H
#define ARRAY_H
#include <stdlib.h>
#define ARRAY_DECLARE(TYPE) \
typedef struct { \
TYPE *elems; \
size_t allocated, \
nextfree; \
} Array##TYPE
#define ARRAY_INIT(A, TYPE, SIZE) \
(A)->elems = (TYPE*)malloc(SIZE * sizeof(TYPE)); \
(A)->allocated = SIZE; \
(A)->nextfree = 0
#define ARRAY_PUSH(A, TYPE, VALUE) \
if ((A)->allocated == (A)->nextfree) { \
(A)->allocated *= 2; \
(A)->elems = (TYPE*)realloc((A)->elems, (A)->allocated * sizeof(TYPE)); \
} \
(A)->elems[(A)->nextfree] = VALUE; \
(A)->nextfree += 1
#define ARRAY_FREE(A) \
if ((A)->elems != NULL) { \
free((A)->elems); \
}
#endif
|
#ifndef ARRAY_H
#define ARRAY_H
#include <stdlib.h>
#define ARRAY_DECLARE(TYPE) \
typedef struct { \
TYPE *elems; \
size_t allocated, \
nextfree; \
} Array##TYPE
#define ARRAY_INIT(A, TYPE, SIZE) \
(A)->elems = (TYPE*)malloc(SIZE * sizeof(TYPE)); \
(A)->allocated = SIZE; \
(A)->nextfree = 0
#define ARRAY_REALLOC_CHECK(A, TYPE) \
if ((A)->allocated == (A)->nextfree) { \
(A)->allocated *= 2; \
(A)->elems = (TYPE*)realloc((A)->elems, (A)->allocated * sizeof(TYPE)); \
} \
#define ARRAY_PUSH(A, TYPE, VALUE) \
ARRAY_REALLOC_CHECK(A, TYPE); \
(A)->elems[(A)->nextfree] = VALUE; \
(A)->nextfree += 1
#define ARRAY_FREE(A) \
if ((A)->elems != NULL) { \
free((A)->elems); \
}
#endif
|
Create dedicated realloc check macro
|
Create dedicated realloc check macro
|
C
|
mit
|
mhyfritz/goontools,mhyfritz/goontools,mhyfritz/goontools
|
def6ae3782834ccbd07047ca10d7f6bf7ebde449
|
src/yarrar/Util.h
|
src/yarrar/Util.h
|
#pragma once
#include "Types.h"
#include <opencv2/core/types.hpp>
#include <json11.hpp>
#include <algorithm>
#include <iterator>
#include <cstdio>
namespace yarrar {
template<typename Container, typename Value>
bool contains(const Container& c, const Value& v)
{
return std::find(std::begin(c), std::end(c), v) != std::end(c);
}
template<typename... Args>
std::string format(const std::string& format, Args... args)
{
int neededSize = snprintf(nullptr, 0, format.c_str(), args...);
// If there was an error return the original string.
if(neededSize <= 0)
return format;
neededSize += 1;
std::vector<char> buf(static_cast<size_t> (neededSize));
snprintf(&buf.front(), static_cast<size_t> (neededSize), format.c_str(), args...);
return std::string(&buf.front());
}
cv::Size getScaledDownResolution(const int width,
const int height,
const int preferredWidth);
void rotate(const cv::Mat& src, cv::Mat& dst, const yarrar::Rotation90& rotation);
json11::Json loadJson(const std::string& filePath);
}
|
#pragma once
#include "Types.h"
#include <opencv2/core/types.hpp>
#include <json11.hpp>
#include <algorithm>
#include <iterator>
#include <cstdio>
namespace yarrar {
template<typename Container, typename Value>
bool contains(const Container& c, const Value& v)
{
return std::find(std::begin(c), std::end(c), v) != std::end(c);
}
template<typename... Args>
std::string format(const std::string& format, Args... args)
{
int neededSize = snprintf(nullptr, 0, format.c_str(), args...);
// If there was an error return the original string.
if(neededSize <= 0)
return format;
// Accommodate \0
neededSize += 1;
std::string buf;
buf.resize(static_cast<size_t> (neededSize));
snprintf(&buf.front(), static_cast<size_t> (neededSize), format.c_str(), args...);
return buf;
}
cv::Size getScaledDownResolution(const int width,
const int height,
const int preferredWidth);
void rotate(const cv::Mat& src, cv::Mat& dst, const yarrar::Rotation90& rotation);
json11::Json loadJson(const std::string& filePath);
}
|
Use std::string straight instead of vector<char> in format().
|
Use std::string straight instead of vector<char> in format().
|
C
|
mit
|
ndob/yarrar,ndob/yarrar,ndob/yarrar,ndob/yarrar
|
8f2598ac9d730bf0a7c08b9cdb6071fd7b73ba3b
|
utilities/cassandra/merge_operator.h
|
utilities/cassandra/merge_operator.h
|
// Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
#pragma once
#include "rocksdb/merge_operator.h"
#include "rocksdb/slice.h"
namespace rocksdb {
namespace cassandra {
/**
* A MergeOperator for rocksdb that implements Cassandra row value merge.
*/
class CassandraValueMergeOperator : public MergeOperator {
public:
static std::shared_ptr<MergeOperator> CreateSharedInstance();
virtual bool FullMergeV2(const MergeOperationInput& merge_in,
MergeOperationOutput* merge_out) const override;
virtual bool PartialMergeMulti(const Slice& key,
const std::deque<Slice>& operand_list,
std::string* new_value,
Logger* logger) const override;
virtual const char* Name() const override;
};
} // namespace cassandra
} // namespace rocksdb
|
// Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
#pragma once
#include "rocksdb/merge_operator.h"
#include "rocksdb/slice.h"
namespace rocksdb {
namespace cassandra {
/**
* A MergeOperator for rocksdb that implements Cassandra row value merge.
*/
class CassandraValueMergeOperator : public MergeOperator {
public:
static std::shared_ptr<MergeOperator> CreateSharedInstance();
virtual bool FullMergeV2(const MergeOperationInput& merge_in,
MergeOperationOutput* merge_out) const override;
virtual bool PartialMergeMulti(const Slice& key,
const std::deque<Slice>& operand_list,
std::string* new_value,
Logger* logger) const override;
virtual const char* Name() const override;
virtual bool AllowSingleOperand() const override { return true; }
};
} // namespace cassandra
} // namespace rocksdb
|
Enable Cassandra merge operator to be called with a single merge operand
|
Enable Cassandra merge operator to be called with a single merge operand
Summary:
Updating Cassandra merge operator to make use of a single merge operand when needed. Single merge operand support has been introduced in #2721.
Closes https://github.com/facebook/rocksdb/pull/2753
Differential Revision: D5652867
Pulled By: sagar0
fbshipit-source-id: b9fbd3196d3ebd0b752626dbf9bec9aa53e3e26a
|
C
|
bsd-3-clause
|
bbiao/rocksdb,bbiao/rocksdb,Andymic/rocksdb,Andymic/rocksdb,SunguckLee/RocksDB,Andymic/rocksdb,Andymic/rocksdb,SunguckLee/RocksDB,bbiao/rocksdb,SunguckLee/RocksDB,SunguckLee/RocksDB,Andymic/rocksdb,SunguckLee/RocksDB,bbiao/rocksdb,Andymic/rocksdb,bbiao/rocksdb,bbiao/rocksdb,Andymic/rocksdb,Andymic/rocksdb,bbiao/rocksdb,SunguckLee/RocksDB,SunguckLee/RocksDB,SunguckLee/RocksDB,bbiao/rocksdb
|
88674088d10ca2538b2efd2559f6620ade8ec373
|
arch/x86/video/fbdev.c
|
arch/x86/video/fbdev.c
|
/*
* Copyright (C) 2007 Antonino Daplas <adaplas@gmail.com>
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive
* for more details.
*
*/
#include <linux/fb.h>
#include <linux/pci.h>
#include <linux/module.h>
int fb_is_primary_device(struct fb_info *info)
{
struct device *device = info->device;
struct pci_dev *pci_dev = NULL;
struct resource *res = NULL;
int retval = 0;
if (device)
pci_dev = to_pci_dev(device);
if (pci_dev)
res = &pci_dev->resource[PCI_ROM_RESOURCE];
if (res && res->flags & IORESOURCE_ROM_SHADOW)
retval = 1;
return retval;
}
EXPORT_SYMBOL(fb_is_primary_device);
MODULE_LICENSE("GPL");
|
/*
* Copyright (C) 2007 Antonino Daplas <adaplas@gmail.com>
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive
* for more details.
*
*/
#include <linux/fb.h>
#include <linux/pci.h>
#include <linux/module.h>
#include <linux/vgaarb.h>
int fb_is_primary_device(struct fb_info *info)
{
struct device *device = info->device;
struct pci_dev *pci_dev = NULL;
struct pci_dev *default_device = vga_default_device();
struct resource *res = NULL;
if (device)
pci_dev = to_pci_dev(device);
if (!pci_dev)
return 0;
if (default_device) {
if (pci_dev == default_device)
return 1;
else
return 0;
}
res = &pci_dev->resource[PCI_ROM_RESOURCE];
if (res && res->flags & IORESOURCE_ROM_SHADOW)
return 1;
return 0;
}
EXPORT_SYMBOL(fb_is_primary_device);
MODULE_LICENSE("GPL");
|
Use vga_default_device() when determining whether an fb is primary
|
x86: Use vga_default_device() when determining whether an fb is primary
IORESOURCE_ROM_SHADOW is not necessarily an indication that the hardware
is the primary device. Add support for using the vgaarb functions and
fall back if nothing's set them.
Signed-off-by: Matthew Garrett <4cf8d479716eba9bc68e0146d95320fcb138b96b@redhat.com>
Cc: 9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@redhat.com
Acked-by: 8a453bad9912ffe59bc0f0b8abe03df9be19379e@zytor.com
Signed-off-by: Dave Airlie <f2295d84e358395675bc8031be58672073ae065e@redhat.com>
|
C
|
mit
|
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs
|
fdb4244b9caf7c1d3b06912796e4a87f583ed1fa
|
asylo/platform/posix/include/byteswap.h
|
asylo/platform/posix/include/byteswap.h
|
/*
*
* Copyright 2017 Asylo authors
*
* 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 ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_
#define ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
inline uint16_t bswap_16(const uint16_t &n) { return __builtin_bswap16(n); }
inline uint32_t bswap_32(const uint32_t &n) { return __builtin_bswap32(n); }
inline uint64_t bswap_64(const uint64_t &n) { return __builtin_bswap64(n); }
#ifdef __cplusplus
}
#endif
#endif // ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_
|
/*
*
* Copyright 2017 Asylo authors
*
* 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 ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_
#define ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
inline uint16_t bswap_16(uint16_t n) { return __builtin_bswap16(n); }
inline uint32_t bswap_32(uint32_t n) { return __builtin_bswap32(n); }
inline uint64_t bswap_64(uint64_t n) { return __builtin_bswap64(n); }
#ifdef __cplusplus
}
#endif
#endif // ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_
|
Remove pass by reference in bswap functions
|
Remove pass by reference in bswap functions
This is a simple bug fix to make these functions compatible with C
instead of only with C++.
PiperOrigin-RevId: 205919772
|
C
|
apache-2.0
|
google/asylo,google/asylo,google/asylo,google/asylo,google/asylo,google/asylo
|
f381f9302f7b97246101165938b101c3d7050e56
|
qcdevice.h
|
qcdevice.h
|
#ifndef QCDEVICE_H
#define QCDEVICE_H
/* QuickCross Project
* License: APACHE-2.0
* Author: Ben Lau
* Project Site: https://github.com/benlau/quickcross
*
*/
#include <QObject>
class QCDevice : public QObject
{
Q_OBJECT
Q_PROPERTY(QString os READ os)
Q_PROPERTY(bool isAndroid READ isAndroid)
Q_PROPERTY(bool isLinux READ isLinux)
Q_PROPERTY(bool isMac READ isMac)
Q_PROPERTY(bool isIOS READ isIOS)
Q_PROPERTY(bool isWindows READ isWindows)
Q_PROPERTY(qreal dp READ dp)
public:
explicit QCDevice(QObject *parent = 0);
QString os() const;
bool isAndroid() const;
bool isLinux() const;
bool isIOS() const;
bool isMac() const;
bool isWindows() const;
qreal dp() const;
signals:
public slots:
};
#endif // QCDEVICE_H
|
#ifndef QCDEVICE_H
#define QCDEVICE_H
/* QuickCross Project
* License: APACHE-2.0
* Author: Ben Lau
* Project Site: https://github.com/benlau/quickcross
*
*/
#include <QObject>
class QCDevice : public QObject
{
Q_OBJECT
Q_PROPERTY(QString os READ os)
Q_PROPERTY(bool isAndroid READ isAndroid NOTIFY neverEmitChanged)
Q_PROPERTY(bool isLinux READ isLinux NOTIFY neverEmitChanged)
Q_PROPERTY(bool isMac READ isMac NOTIFY neverEmitChanged)
Q_PROPERTY(bool isIOS READ isIOS NOTIFY neverEmitChanged)
Q_PROPERTY(bool isWindows READ isWindows NOTIFY neverEmitChanged)
Q_PROPERTY(qreal dp READ dp NOTIFY neverEmitChanged)
public:
explicit QCDevice(QObject *parent = 0);
QString os() const;
bool isAndroid() const;
bool isLinux() const;
bool isIOS() const;
bool isMac() const;
bool isWindows() const;
qreal dp() const;
signals:
void neverEmitChanged();
public slots:
};
#endif // QCDEVICE_H
|
Add a never emit signal on properties.
|
QCDevice: Add a never emit signal on properties.
|
C
|
apache-2.0
|
benlau/quickcross,benlau/quickcross,benlau/quickcross
|
1237be33a5d1f857ddd488ec1ea7137d00152100
|
win32/PlatWin.h
|
win32/PlatWin.h
|
// Scintilla source code edit control
/** @file PlatWin.h
** Implementation of platform facilities on Windows.
**/
// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
extern bool IsNT();
extern void Platform_Initialise(void *hInstance);
extern void Platform_Finalise();
#if defined(_MSC_VER)
extern bool LoadD2D();
extern ID2D1Factory *pD2DFactory;
extern IDWriteFactory *pIDWriteFactory;
#endif
|
// Scintilla source code edit control
/** @file PlatWin.h
** Implementation of platform facilities on Windows.
**/
// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
extern bool IsNT();
extern void Platform_Initialise(void *hInstance);
extern void Platform_Finalise();
#if defined(USE_D2D)
extern bool LoadD2D();
extern ID2D1Factory *pD2DFactory;
extern IDWriteFactory *pIDWriteFactory;
#endif
|
Allow choice of D2D on compiler command line.
|
Allow choice of D2D on compiler command line.
|
C
|
isc
|
rhaberkorn/scintilla-mirror,rhaberkorn/scintilla-mirror,rhaberkorn/scintilla-mirror,rhaberkorn/scintilla-mirror,rhaberkorn/scintilla-mirror,rhaberkorn/scintilla-mirror,rhaberkorn/scintilla-mirror,rhaberkorn/scintilla-mirror
|
7918fd9c8d9d84cc26e22db2a07fc19f725aadd2
|
gnu/lib/libdialog/notify.c
|
gnu/lib/libdialog/notify.c
|
/*
* File: notify.c
* Author: Marc van Kempen
* Desc: display a notify box with a message
*
* Copyright (c) 1995, Marc van Kempen
*
* All rights reserved.
*
* This software may be used, modified, copied, distributed, and
* sold, in both source and binary form provided that the above
* copyright and these terms are retained, verbatim, as the first
* lines of this file. Under no circumstances is the author
* responsible for the proper functioning of this software, nor does
* the author assume any responsibility for damages incurred with
* its use.
*
*/
#include <dialog.h>
#include <stdio.h>
void
dialog_notify(char *msg)
/*
* Desc: display an error message
*/
{
char *tmphlp;
WINDOW *w;
w = dupwin(newscr);
if (w == NULL) {
endwin();
fprintf(stderr, "\ndupwin(newscr) failed, malloc memory corrupted\n");
exit(1);
}
tmphlp = get_helpline();
use_helpline("Press enter to continue");
dialog_msgbox("Message", msg, -1, -1, TRUE);
restore_helpline(tmphlp);
touchwin(w);
wrefresh(w);
delwin(w);
return;
} /* dialog_notify() */
|
/*
* File: notify.c
* Author: Marc van Kempen
* Desc: display a notify box with a message
*
* Copyright (c) 1995, Marc van Kempen
*
* All rights reserved.
*
* This software may be used, modified, copied, distributed, and
* sold, in both source and binary form provided that the above
* copyright and these terms are retained, verbatim, as the first
* lines of this file. Under no circumstances is the author
* responsible for the proper functioning of this software, nor does
* the author assume any responsibility for damages incurred with
* its use.
*
*/
#include <dialog.h>
#include <stdio.h>
void
dialog_notify(char *msg)
/*
* Desc: display an error message
*/
{
char *tmphlp;
WINDOW *w;
w = dupwin(newscr);
if (w == NULL) {
endwin();
fprintf(stderr, "\ndupwin(newscr) failed, malloc memory corrupted\n");
exit(1);
}
tmphlp = get_helpline();
use_helpline("Press enter to continue");
dialog_mesgbox("Message", msg, -1, -1, TRUE);
restore_helpline(tmphlp);
touchwin(w);
wrefresh(w);
delwin(w);
return;
} /* dialog_notify() */
|
Call mesgbox instead of msgbox for long descriptions
|
Call mesgbox instead of msgbox for long descriptions
|
C
|
bsd-3-clause
|
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
|
219908bec636b75ca0c002af697d801ecbcee418
|
expat/tests/chardata.h
|
expat/tests/chardata.h
|
/* chardata.h
*
*
*/
#ifndef XML_CHARDATA_H
#define XML_CHARDATA_H 1
#ifndef XML_VERSION
#include "expat.h" /* need XML_Char */
#endif
typedef struct {
int count; /* # of chars, < 0 if not set */
XML_Char data[1024];
} CharData;
void CharData_Init(CharData *storage);
void CharData_AppendString(CharData *storage, const char *s);
void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len);
int CharData_CheckString(CharData *storage, const char *s);
int CharData_CheckXMLChars(CharData *storage, const XML_Char *s);
#endif /* XML_CHARDATA_H */
|
/* chardata.h
Interface to some helper routines used to accumulate and check text
and attribute content.
*/
#ifndef XML_CHARDATA_H
#define XML_CHARDATA_H 1
#ifndef XML_VERSION
#include "expat.h" /* need XML_Char */
#endif
typedef struct {
int count; /* # of chars, < 0 if not set */
XML_Char data[1024];
} CharData;
void CharData_Init(CharData *storage);
void CharData_AppendString(CharData *storage, const char *s);
void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len);
int CharData_CheckString(CharData *storage, const char *s);
int CharData_CheckXMLChars(CharData *storage, const XML_Char *s);
#endif /* XML_CHARDATA_H */
|
Add a small comment to tell what this is.
|
Add a small comment to tell what this is.
|
C
|
mit
|
tiran/expat,libexpat/libexpat,libexpat/libexpat,libexpat/libexpat,tiran/expat,libexpat/libexpat,libexpat/libexpat,libexpat/libexpat,tiran/expat,tiran/expat
|
07600df058267e8aaed6d68f0e5e52d7a4cd2ee6
|
exercises/small_tools/categorize_csv.c
|
exercises/small_tools/categorize_csv.c
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Expects 5 arguments not including argv[0]
int main(int argc, char *argv[])
{
if (argc != 6) {
puts("Must enter 5 arguments: two categories and filename for the rest.");
return 1;
}
printf("Received %i categories", (argc - 2) / 2);
FILE *in = fopen("spooky.csv", "r");
FILE *file1 = fopen(argv[2], "w");
FILE *file2 = fopen(argv[4], "w");
FILE *therest = fopen(argv[5], "w");
char line[80];
while (fscanf(in, "%79[^\n]\n", line) == 1) {
if (strstr(line, argv[1])) {
fprintf(file1, "%s\n", line);
}
else if (strstr(line, argv[3])) {
fprintf(file2, "%s\n", line);
}
else {
fprintf(therest, "%s\n", line);
}
}
fclose(file1);
fclose(file2);
fclose(therest);
fclose(in);
return 1;
}
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Expects 5 arguments not including argv[0]
int main(int argc, char *argv[])
{
if (argc != 6) {
puts("Must enter 5 arguments: two categories and filename for the rest.");
return 1;
}
printf("Received %i categories", (argc - 2) / 2);
FILE *in
if (!(in = fopen("spooky.csv", "r"))) {
fprintf(stderr, "Can't open the file 'spooky.csv'.\n");
return 2;
}
FILE *file1 = fopen(argv[2], "w");
FILE *file2 = fopen(argv[4], "w");
FILE *therest = fopen(argv[5], "w");
char line[80];
while (fscanf(in, "%79[^\n]\n", line) == 1) {
if (strstr(line, argv[1])) {
fprintf(file1, "%s\n", line);
}
else if (strstr(line, argv[3])) {
fprintf(file2, "%s\n", line);
}
else {
fprintf(therest, "%s\n", line);
}
}
fclose(file1);
fclose(file2);
fclose(therest);
fclose(in);
return 1;
}
|
Add error checking to opening of csv in small tool
|
Add error checking to opening of csv in small tool
|
C
|
mit
|
WomenWhoCode/CProgrammingCurriculum
|
a002e0f3c38a46d65aa9c16a44d145959593cee1
|
security/nss/macbuild/NSSCommon.h
|
security/nss/macbuild/NSSCommon.h
|
/* Defines common to all versions of NSS */
#define NSPR20 1
|
/* Defines common to all versions of NSS */
#define NSPR20 1
#define MP_API_COMPATIBLE 1
|
Add the MP_API_COMPATIBLE for Mac builds so that MPI libraries build correctly.
|
Add the MP_API_COMPATIBLE for Mac builds so that MPI libraries build
correctly.
|
C
|
mpl-2.0
|
thespooler/nss,thespooler/nss,thespooler/nss,thespooler/nss,thespooler/nss,thespooler/nss,thespooler/nss
|
dab86d05b6a7980c5899cb11ce14abee55ba717c
|
p_libsupport.h
|
p_libsupport.h
|
/* Author: Mo McRoberts <mo.mcroberts@bbc.co.uk>
*
* Copyright 2015 BBC
*/
/*
* Copyright 2013 Mo McRoberts.
*
* 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 P_LIBSUPPORT_H_
# define P_LIBSUPPORT_H_ 1
# define _BSD_SOURCE 1
# define _DARWIN_C_SOURCE 1
# define _FILE_OFFSET_BITS 64
# include <stdio.h>
# include <stdlib.h>
# include <stdarg.h>
# include <string.h>
# include <syslog.h>
# include <unistd.h>
# include <pthread.h>
# include <ctype.h>
# include "iniparser.h"
# include "libsupport.h"
#endif /*!P_LIBSUPPORT_H_*/
|
/* Author: Mo McRoberts <mo.mcroberts@bbc.co.uk>
*
* Copyright 2015 BBC
*/
/*
* Copyright 2013 Mo McRoberts.
*
* 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 P_LIBSUPPORT_H_
# define P_LIBSUPPORT_H_ 1
# include <stdio.h>
# include <stdlib.h>
# include <stdarg.h>
# include <string.h>
# include <syslog.h>
# include <unistd.h>
# include <pthread.h>
# include <ctype.h>
# include "iniparser.h"
# include "libsupport.h"
#endif /*!P_LIBSUPPORT_H_*/
|
Allow config.h or AM_CPPFLAGS to provide libc feature macros
|
Allow config.h or AM_CPPFLAGS to provide libc feature macros
|
C
|
apache-2.0
|
bbcarchdev/libsupport,bbcarchdev/libsupport,bbcarchdev/libsupport
|
b878603f9122d058a3730dd6f716a0c03a7a64e4
|
base/mac/launchd.h
|
base/mac/launchd.h
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_MAC_LAUNCHD_H_
#define BASE_MAC_LAUNCHD_H_
#pragma once
#include <launch.h>
#include <sys/types.h>
#include <string>
namespace base {
namespace mac {
// MessageForJob sends a single message to launchd with a simple dictionary
// mapping |operation| to |job_label|, and returns the result of calling
// launch_msg to send that message. On failure, returns NULL. The caller
// assumes ownership of the returned launch_data_t object.
launch_data_t MessageForJob(const std::string& job_label,
const char* operation);
// Returns the process ID for |job_label| if the job is running, 0 if the job
// is loaded but not running, or -1 on error.
pid_t PIDForJob(const std::string& job_label);
} // namespace mac
} // namespace base
#endif // BASE_MAC_LAUNCHD_H_
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_MAC_LAUNCHD_H_
#define BASE_MAC_LAUNCHD_H_
#pragma once
#include <launch.h>
#include <sys/types.h>
#include <string>
#include "base/base_export.h"
namespace base {
namespace mac {
// MessageForJob sends a single message to launchd with a simple dictionary
// mapping |operation| to |job_label|, and returns the result of calling
// launch_msg to send that message. On failure, returns NULL. The caller
// assumes ownership of the returned launch_data_t object.
BASE_EXPORT
launch_data_t MessageForJob(const std::string& job_label,
const char* operation);
// Returns the process ID for |job_label| if the job is running, 0 if the job
// is loaded but not running, or -1 on error.
BASE_EXPORT
pid_t PIDForJob(const std::string& job_label);
} // namespace mac
} // namespace base
#endif // BASE_MAC_LAUNCHD_H_
|
Add BASE_EXPORT macros to base ... again.
|
Add BASE_EXPORT macros to base ... again.
BUG=90078
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9959092
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@130367 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
adobe/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,adobe/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,ropik/chromium
|
8ba055509f9262fc728fe48414fb955907d5e544
|
source/fiber_tasking_lib/memory.h
|
source/fiber_tasking_lib/memory.h
|
/* FiberTaskingLib - A tasking library that uses fibers for efficient task switching
*
* This library was created as a proof of concept of the ideas presented by
* Christian Gyrling in his 2015 GDC Talk 'Parallelizing the Naughty Dog Engine Using Fibers'
*
* http://gdcvault.com/play/1022186/Parallelizing-the-Naughty-Dog-Engine
*
* FiberTaskingLib is the legal property of Adrian Astley
* Copyright Adrian Astley 2015
*/
#pragma once
#include <cstdint>
#include "fiber_tasking_lib/config.h"
#if (defined( __GNUC__) || defined(__GNUG__)) && __GNUC__ < 5 && !defined(FTL_OS_MAC)
namespace std {
inline void *align(size_t alignment, size_t size, void *start, size_t bufferSize) {
return (void *)((reinterpret_cast<uintptr_t>(start) + static_cast<uintptr_t>(alignment - 1)) & static_cast<uintptr_t>(~(alignment - 1)));
}
} // End of namespace std
#endif
|
/* FiberTaskingLib - A tasking library that uses fibers for efficient task switching
*
* This library was created as a proof of concept of the ideas presented by
* Christian Gyrling in his 2015 GDC Talk 'Parallelizing the Naughty Dog Engine Using Fibers'
*
* http://gdcvault.com/play/1022186/Parallelizing-the-Naughty-Dog-Engine
*
* FiberTaskingLib is the legal property of Adrian Astley
* Copyright Adrian Astley 2015
*/
#pragma once
#include <cstdint>
#include "fiber_tasking_lib/config.h"
// clang also defines __GNUC__ / __GNUG__ for some reason
// So we have to check for it to make sure we have the *real* gcc
#if ((defined(__GNUC__) && __GNUC__ < 5) || (defined(__GNUG__) && __GNUG__ < 5)) && !defined(__clang__)
namespace std {
inline void *align(size_t alignment, size_t size, void *start, size_t bufferSize) {
return (void *)((reinterpret_cast<uintptr_t>(start) + static_cast<uintptr_t>(alignment - 1)) & static_cast<uintptr_t>(~(alignment - 1)));
}
} // End of namespace std
#endif
|
Clarify what systems need std::align definition
|
FIBER_TASKING_LIB: Clarify what systems need std::align definition
|
C
|
apache-2.0
|
jklarowicz/FiberTaskingLib,jklarowicz/FiberTaskingLib,jklarowicz/FiberTaskingLib
|
63b8a434dc46efa3fd53e85bad9121da8f690889
|
tools/gpu/vk/VkTestUtils.h
|
tools/gpu/vk/VkTestUtils.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 VkTestUtils_DEFINED
#define VkTestUtils_DEFINED
#ifdef SK_VULKAN
#include "vk/GrVkDefines.h"
namespace sk_gpu_test {
bool LoadVkLibraryAndGetProcAddrFuncs(PFN_vkGetInstanceProcAddr*, PFN_vkGetDeviceProcAddr*);
}
#endif
#endif
|
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef VkTestUtils_DEFINED
#define VkTestUtils_DEFINED
#include "SkTypes.h"
#ifdef SK_VULKAN
#include "vk/GrVkDefines.h"
namespace sk_gpu_test {
bool LoadVkLibraryAndGetProcAddrFuncs(PFN_vkGetInstanceProcAddr*, PFN_vkGetDeviceProcAddr*);
}
#endif
#endif
|
Fix VkTextUtils to include SkTypes before ifdef
|
Fix VkTextUtils to include SkTypes before ifdef
Bug: skia:
Change-Id: I4286f0e15ee427345d7d793760c85c9743fc4c6c
Reviewed-on: https://skia-review.googlesource.com/70200
Reviewed-by: Derek Sollenberger <d9b232705cad36bae5cfccf14f9650bb292e6c71@google.com>
Commit-Queue: Greg Daniel <39df0a804564ccb6cf75f18db79653821f37c1c5@google.com>
|
C
|
bsd-3-clause
|
rubenvb/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,rubenvb/skia,google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,google/skia,google/skia,rubenvb/skia,rubenvb/skia,rubenvb/skia,HalCanary/skia-hc,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,rubenvb/skia,google/skia,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,google/skia,google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia
|
3057d837d3f50cd1651540e71ff6bbfbb06be9e2
|
src/main.c
|
src/main.c
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "amath.h"
#define BUF_SIZE 1024
int main(int argc, char *argv[])
{
char buffer[BUF_SIZE];
char *content = "";
while (fgets(buffer, BUF_SIZE, stdin))
asprintf(&content, "%s%s", content, buffer);
char *result = amath_to_mathml(content);
printf("<math>%s</math>", result);
if (strlen(result) > 0) free(result);
if (strlen(content) > 0) free(content);
}
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "amath.h"
#define BUF_SIZE 1024
int main(int argc, char *argv[])
{
char buffer[BUF_SIZE];
char *content = "";
while (fgets(buffer, BUF_SIZE, stdin))
asprintf(&content, "%s%s", content, buffer);
char *result = amath_to_mathml(content);
printf("<math xmlns=\"http://www.w3.org/1998/Math/MathML\">%s</math>", result);
if (strlen(result) > 0) free(result);
if (strlen(content) > 0) free(content);
}
|
Add XML namespace to math element
|
Add XML namespace to math element
The MathML XML namespace isn't needed in context of HTML5 (and I find it a bit verbose), but are used in other applications, e.g. LibreOffice's "Import MathML from Clipboard". Probably should be an command line argument.
|
C
|
isc
|
camoy/amath,camoy/amath,camoy/amath
|
957be0e8669162fb7b5718350fff049b2d30b5d7
|
clangd/DocumentStore.h
|
clangd/DocumentStore.h
|
//===--- DocumentStore.h - File contents container --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_DOCUMENTSTORE_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_DOCUMENTSTORE_H
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/StringMap.h"
#include <string>
namespace clang {
namespace clangd {
/// A container for files opened in a workspace, addressed by URI. The contents
/// are owned by the DocumentStore.
class DocumentStore {
public:
/// Add a document to the store. Overwrites existing contents.
void addDocument(StringRef Uri, StringRef Text) { Docs[Uri] = Text; }
/// Delete a document from the store.
void removeDocument(StringRef Uri) { Docs.erase(Uri); }
/// Retrieve a document from the store. Empty string if it's unknown.
StringRef getDocument(StringRef Uri) const { return Docs.lookup(Uri); }
private:
llvm::StringMap<std::string> Docs;
};
} // namespace clangd
} // namespace clang
#endif
|
//===--- DocumentStore.h - File contents container --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_DOCUMENTSTORE_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_DOCUMENTSTORE_H
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/StringMap.h"
#include <string>
namespace clang {
namespace clangd {
/// A container for files opened in a workspace, addressed by URI. The contents
/// are owned by the DocumentStore.
class DocumentStore {
public:
/// Add a document to the store. Overwrites existing contents.
void addDocument(StringRef Uri, StringRef Text) { Docs[Uri] = Text; }
/// Delete a document from the store.
void removeDocument(StringRef Uri) { Docs.erase(Uri); }
/// Retrieve a document from the store. Empty string if it's unknown.
StringRef getDocument(StringRef Uri) const {
auto I = Docs.find(Uri);
return I == Docs.end() ? StringRef("") : StringRef(I->second);
}
private:
llvm::StringMap<std::string> Docs;
};
} // namespace clangd
} // namespace clang
#endif
|
Fix subtle use after return.
|
[clangd] Fix subtle use after return.
I didn't find this because my main development machine still happens to
use libstdc++ with the broken C++11 ABI, which has a global empty
string.
git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@294309 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra
|
21c4bbc85ab4f1ce35152e3a1c769663db23ca3f
|
android/android_api/base/jni/JniOnMQSubscribeListener.h
|
android/android_api/base/jni/JniOnMQSubscribeListener.h
|
/* ****************************************************************
*
* Copyright 2016 Samsung Electronics All Rights Reserved.
*
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************/
#include "JniOcStack.h"
#ifndef _Included_org_iotivity_base_OcResource_OnMQSubscribeListener
#define _Included_org_iotivity_base_OcResource_OnMQSubscribeListener
#define MAX_SEQUENCE_NUMBER 0xFFFFFF
using namespace OC;
class JniOcResource;
class JniOnMQSubscribeListener
{
public:
JniOnMQSubscribeListener(JNIEnv *env, jobject jListener, JniOcResource* owner);
~JniOnMQSubscribeListener();
void onSubscribeCallback(const HeaderOptions headerOptions, const OCRepresentation& rep,
const int& eCode, const int& sequenceNumber);
private:
jweak m_jwListener;
JniOcResource* m_ownerResource;
void checkExAndRemoveListener(JNIEnv *env);
};
#endif
|
/* ****************************************************************
*
* Copyright 2016 Samsung Electronics All Rights Reserved.
*
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************/
#include "JniOcStack.h"
#ifndef _Included_org_iotivity_base_OcResource_OnMQSubscribeListener
#define _Included_org_iotivity_base_OcResource_OnMQSubscribeListener
using namespace OC;
class JniOcResource;
class JniOnMQSubscribeListener
{
public:
JniOnMQSubscribeListener(JNIEnv *env, jobject jListener, JniOcResource* owner);
~JniOnMQSubscribeListener();
void onSubscribeCallback(const HeaderOptions headerOptions, const OCRepresentation& rep,
const int& eCode, const int& sequenceNumber);
private:
jweak m_jwListener;
JniOcResource* m_ownerResource;
void checkExAndRemoveListener(JNIEnv *env);
};
#endif
|
Remove build warning realted MQ in android JNI.
|
Remove build warning realted MQ in android JNI.
There is a redefined proprocessor in JniOnMQSubscribeListener.h
since octypes.h has it. it should be removed
------------------------------warning---------------------------------------
jni/JniOnMQSubscribeListener.h:26:0: warning: "MAX_SEQUENCE_NUMBER" redefined
#define MAX_SEQUENCE_NUMBER 0xFFFFFF
----------------------------------------------------------------------------
Change-Id: If57b79b963d700459a59d2fb8704a60ad019e838
Signed-off-by: jihwan.seo <69598d7552022c520cfdbefd16641727c7ff4ab5@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12857
Tested-by: jenkins-iotivity <09cb29e8a2b473a2c978382eec13ee06fa017bda@opendaylight.org>
Reviewed-by: Larry Sachs <87b901be7a441bcf97cbe259c532df419aac788e@intel.com>
Reviewed-by: Rick Bell <74cf0087f675c7c2d5c6f65986a0832071d4b512@intel.com>
|
C
|
apache-2.0
|
iotivity/iotivity,rzr/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity,rzr/iotivity,rzr/iotivity,rzr/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity,iotivity/iotivity
|
735b05cf0afe8aff15925202b65834d9d81e6498
|
Settings/Controls/Control.h
|
Settings/Controls/Control.h
|
#pragma once
#include <Windows.h>
#include <functional>
#include <string>
class Control {
public:
Control();
Control(int id, HWND parent);
~Control();
RECT Dimensions();
void Enable();
void Disable();
bool Enabled();
void Enabled(bool enabled);
std::wstring Text();
int TextAsInt();
bool Text(std::wstring text);
bool Text(int value);
void WindowExStyle();
void WindowExStyle(long exStyle);
void AddWindowExStyle(long exStyle);
void RemoveWindowExStyle(long exStyle);
/// <summary>Handles WM_COMMAND messages.</summary>
/// <param name="nCode">Control-defined notification code</param>
virtual DLGPROC Command(unsigned short nCode);
/// <summary>Handles WM_NOTIFY messages.</summary>
/// <param name="nHdr">Notification header structure</param>
virtual DLGPROC Notification(NMHDR *nHdr);
protected:
int _id;
HWND _hWnd;
HWND _parent;
protected:
static const int MAX_EDITSTR = 0x4000;
};
|
#pragma once
#include <Windows.h>
#include <functional>
#include <string>
class Control {
public:
Control();
Control(int id, HWND parent);
~Control();
virtual RECT Dimensions();
virtual void Enable();
virtual void Disable();
virtual bool Enabled();
virtual void Enabled(bool enabled);
virtual std::wstring Text();
virtual int TextAsInt();
virtual bool Text(std::wstring text);
virtual bool Text(int value);
void WindowExStyle();
void WindowExStyle(long exStyle);
void AddWindowExStyle(long exStyle);
void RemoveWindowExStyle(long exStyle);
/// <summary>Handles WM_COMMAND messages.</summary>
/// <param name="nCode">Control-defined notification code</param>
virtual DLGPROC Command(unsigned short nCode);
/// <summary>Handles WM_NOTIFY messages.</summary>
/// <param name="nHdr">Notification header structure</param>
virtual DLGPROC Notification(NMHDR *nHdr);
protected:
int _id;
HWND _hWnd;
HWND _parent;
protected:
static const int MAX_EDITSTR = 0x4000;
};
|
Allow some control methods to be overridden
|
Allow some control methods to be overridden
|
C
|
bsd-2-clause
|
malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,malensek/3RVX
|
0b5c508e9e99e80dcab97b0a45bcf3d2cde5fbb5
|
7segments.c
|
7segments.c
|
#define L(u,v)c=a[1];for(;*c;)printf("%c%c%c%c",y&u?124:32,y&v?95:32,(y="|O6VYNnX~^"[*c++-48]+1)&u*2?124:32,c[1]?32:10);
main(int y,int**a){char*L(0,1)L(8,2)L(32,4)}
|
#define L(u)c=a[1];for(;*c;)printf("%c%c%c%c",y&u/4?124:32,y&u?95:32,(y="v#\\l-jz$~n"[*c++-48]+1)&u/2?124:32,c[1]?32:10);
main(int y,int**a){char*L(1)L(8)L(64)}
|
Use an optimized 7 segment table
|
Use an optimized 7 segment table
|
C
|
mit
|
McZonk/7segements,McZonk/7segements
|
d08c45269a965a29bde2f73ab03cbdae45e7dcc8
|
HLT/PHOS/AliHLTPHOSValidCellDataStruct.h
|
HLT/PHOS/AliHLTPHOSValidCellDataStruct.h
|
#ifndef ALIHLTPHOSVALIDCELLDATASTRUCT_H
#define ALIHLTPHOSVALIDCELLDATASTRUCT_H
/***************************************************************************
* Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project. *
* Contributors are mentioned in the code where appropriate. *
* *
* Permission to use, copy, modify and distribute this software and its *
* documentation strictly for non-commercial purposes is hereby granted *
* without fee, provided that the above copyright notice appears in all *
* copies and that both the copyright notice and this permission notice *
* appear in the supporting documentation. The authors make no claims *
* about the suitability of this software for any purpose. It is *
* provided "as is" without express or implied warranty. *
**************************************************************************/
#include "AliHLTDataTypes.h"
struct AliHLTPHOSValidCellDataStruct
{
AliHLTUInt16_t fRow;
AliHLTUInt16_t fCol;
AliHLTUInt16_t fGain;
Float_t fEnergy;
Float_t fTime;
};
#endif
|
#ifndef ALIHLTPHOSVALIDCELLDATASTRUCT_H
#define ALIHLTPHOSVALIDCELLDATASTRUCT_H
/***************************************************************************
* Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project. *
* Contributors are mentioned in the code where appropriate. *
* *
* Permission to use, copy, modify and distribute this software and its *
* documentation strictly for non-commercial purposes is hereby granted *
* without fee, provided that the above copyright notice appears in all *
* copies and that both the copyright notice and this permission notice *
* appear in the supporting documentation. The authors make no claims *
* about the suitability of this software for any purpose. It is *
* provided "as is" without express or implied warranty. *
**************************************************************************/
#include "AliHLTDataTypes.h"
#include "Rtypes.h"
struct AliHLTPHOSValidCellDataStruct
{
// AliHLTUInt16_t fRow;
// AliHLTUInt16_t fCol;
// AliHLTUInt16_t fZ;
// AliHLTUInt16_t fX;
// AliHLTUInt16_t fGain;
// int fZ;
// int fX;
// Int_t fZ;
// Int_t fX;
AliHLTUInt8_t fZ;
AliHLTUInt8_t fX;
// AliHLTUInt16_t fGain;
/// int fGain;
// Int_t fGain;
AliHLTUInt8_t fGain;
Float_t fEnergy;
Float_t fTime;
};
#endif
|
Change of types used for RcuX/Z coordinate.
|
Change of types used for RcuX/Z coordinate.
|
C
|
bsd-3-clause
|
ecalvovi/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,coppedis/AliRoot,shahor02/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,coppedis/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,ecalvovi/AliRoot,miranov25/AliRoot,ecalvovi/AliRoot,miranov25/AliRoot,ecalvovi/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,shahor02/AliRoot,coppedis/AliRoot,miranov25/AliRoot,miranov25/AliRoot,shahor02/AliRoot,sebaleh/AliRoot,jgrosseo/AliRoot,miranov25/AliRoot,mkrzewic/AliRoot,shahor02/AliRoot,shahor02/AliRoot,ALICEHLT/AliRoot,shahor02/AliRoot,ALICEHLT/AliRoot,coppedis/AliRoot,ecalvovi/AliRoot,sebaleh/AliRoot,sebaleh/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,jgrosseo/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,coppedis/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,alisw/AliRoot
|
c1fdc0701a0eb9cfb0a6e64ca80ae5927f017df7
|
doc/dali-adaptor-doc.h
|
doc/dali-adaptor-doc.h
|
#ifndef __DALI_ADAPTOR_DOC_H__
#define __DALI_ADAPTOR_DOC_H__
/**
* @defgroup dali_adaptor DALi Adaptor
*
* @brief This module is a platform adaptation layer. It initializes and sets up DALi appropriately.
* The module provides many platform-related services with its internal module,
* platform abstraction. Several signals can be connected to it to keep you informed when
* certain platform-related activities occur.
*
* @ingroup dali
* @{
* @defgroup dali_adaptor_framework Adaptor Framework
* @brief Classes for the adaption layer.
* @}
*/
#endif /* __DALI_ADAPTOR_DOC_H__ */
|
#ifndef __DALI_ADAPTOR_DOC_H__
#define __DALI_ADAPTOR_DOC_H__
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd.
*
* 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.
*
*/
/**
* @defgroup dali_adaptor DALi Adaptor
*
* @brief DALi Adaptor is a platform adaptation layer.
*
* It initializes and sets up DALi appropriately and
* provides many platform-related services with its internal module,
* platform abstraction. Several signals can be connected to it to keep you informed when
* certain platform-related activities occur.
*
* @section dali_adaptor_overview Overview
*
* DALi Adaptor consists of the following groups of API:
*
* <table>
* <tr>
* <th>API Group</th>
* <th>Description</th>
* </tr>
* <tr>
* <td>@ref dali_adaptor_framework</td>
* <td>Classes for the adaption layer.</td>
* </tr>
* </table>
*
* @ingroup dali
* @{
* @defgroup dali_adaptor_framework Adaptor Framework
* @brief Classes for the adaption layer.
* @}
*/
#endif /* __DALI_ADAPTOR_DOC_H__ */
|
Update doxygen groups and overview description
|
Update doxygen groups and overview description
- Update overview of DALi adaptor
Change-Id: Iede36ea40f2a8a85acf0fbe00ab886aaecdc0af0
|
C
|
apache-2.0
|
dalihub/dali-adaptor,dalihub/dali-adaptor,dalihub/dali-adaptor,dalihub/dali-adaptor,dalihub/dali-adaptor
|
6c4c0708feb40b0474ec83af1402a5483b08086c
|
include/scratch/bits/concurrency/once-flag.h
|
include/scratch/bits/concurrency/once-flag.h
|
#pragma once
#include "scratch/bits/concurrency/condition-variable.h"
#include "scratch/bits/concurrency/mutex.h"
#include "scratch/bits/concurrency/unique-lock.h"
#include <utility>
namespace scratch {
class once_flag {
static constexpr int UNDONE = 0;
static constexpr int IN_PROGRESS = 1;
static constexpr int DONE = 2;
mutex m_mtx;
condition_variable m_cv;
int m_flag;
public:
constexpr once_flag() noexcept : m_flag(UNDONE) {}
template<class F, class... Args>
void call_once(F&& f, Args&&... args)
{
unique_lock<mutex> lk(m_mtx);
while (m_flag == IN_PROGRESS) {
m_cv.wait(lk);
}
if (m_flag == UNDONE) {
m_flag = IN_PROGRESS;
lk.unlock();
try {
std::forward<F>(f)(std::forward<Args>(args)...);
} catch (...) {
lk.lock();
m_flag = UNDONE;
m_cv.notify_one();
throw;
}
lk.lock();
m_flag = DONE;
m_cv.notify_all();
}
}
};
template<class F, class... Args>
void call_once(once_flag& flag, F&& f, Args&&... args)
{
flag.call_once(std::forward<F>(f), std::forward<Args>(args)...);
}
} // namespace scratch
|
#pragma once
#include "scratch/bits/concurrency/linux-futex.h"
#include <atomic>
#include <utility>
namespace scratch {
class once_flag {
static constexpr int UNDONE = 0;
static constexpr int IN_PROGRESS = 1;
static constexpr int DONE = 2;
std::atomic<int> m_futex;
public:
constexpr once_flag() noexcept : m_futex(UNDONE) {}
template<class F, class... Args>
void call_once(F&& f, Args&&... args)
{
int x = UNDONE;
while (!m_futex.compare_exchange_weak(x, IN_PROGRESS)) {
if (x == DONE) return;
futex_wait(&m_futex, IN_PROGRESS);
x = UNDONE;
}
try {
std::forward<F>(f)(std::forward<Args>(args)...);
} catch (...) {
m_futex = UNDONE;
futex_wake_one(&m_futex);
throw;
}
m_futex = DONE;
futex_wake_all(&m_futex);
}
};
template<class F, class... Args>
void call_once(once_flag& flag, F&& f, Args&&... args)
{
flag.call_once(std::forward<F>(f), std::forward<Args>(args)...);
}
} // namespace scratch
|
Reimplement `call_once` in terms of futex.
|
Reimplement `call_once` in terms of futex.
|
C
|
mit
|
Quuxplusone/from-scratch,Quuxplusone/from-scratch,Quuxplusone/from-scratch
|
6f77ba0738ff903bd902312369946c9479f7b1da
|
mainwindow.h
|
mainwindow.h
|
#ifndef WINDOW_H
#define WINDOW_H
#include <QWidget>
#include <QMainWindow>
#include <QDir>
#include <QLineEdit>
#include <QListWidget>
#include <QComboBox>
#include <QtSql>
#include <map>
class QLabel;
class QPushButton;
class SearchBox: public QLineEdit
{
Q_OBJECT
public:
using QLineEdit::QLineEdit;
private:
void keyPressEvent(QKeyEvent *evt);
signals:
void inputText(QString searchText);
private slots:
void recipeFiterChanged(QString newFilter);
};
class Window : public QMainWindow
{
Q_OBJECT
public:
Window(QWidget *parent = 0);
private slots:
void openFile(QListWidgetItem *recipe);
void updateRecipesDiplay(QString searchText);
private:
void resizeEvent(QResizeEvent *event);
void createRecipeList();
void updateDatabase();
void cleanDatabase();
QList<QListWidgetItem*> getRecipeList(QString searchText);
QList<QListWidgetItem*> getAllRecipes();
QList<QListWidgetItem*> getMatchingRecipes(QString searchText);
std::map<double, QStringList> findMatches(QString text);
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
QMenu *optionsMenu;
QAction *updateDb;
QAction *cleanDb;
QWidget *centralWidget;
SearchBox *searchBox;
QDir currentDir;
QListWidget *recipeList;
QComboBox *recipeBox;
QLabel *numResults;
QWebEngineView *webView;
};
#endif
|
#ifndef WINDOW_H
#define WINDOW_H
#include <QWidget>
#include <QMainWindow>
#include <QDir>
#include <QLineEdit>
#include <QListWidget>
#include <QComboBox>
#include <QtSql>
#include <map>
class QLabel;
class QPushButton;
class SearchBox: public QLineEdit
{
Q_OBJECT
public:
using QLineEdit::QLineEdit;
private:
void keyPressEvent(QKeyEvent *evt);
signals:
void inputText(QString searchText);
private slots:
void recipeFiterChanged(QString newFilter);
};
class Window : public QMainWindow
{
Q_OBJECT
public:
Window(QWidget *parent = 0);
private slots:
void openFile(QListWidgetItem *recipe);
void updateRecipesDiplay(QString searchText);
private:
void resizeEvent(QResizeEvent *event);
void createRecipeList();
void updateDatabase();
void cleanDatabase();
QList<QListWidgetItem*> getRecipeList(QString searchText);
QList<QListWidgetItem*> getAllRecipes();
QList<QListWidgetItem*> getMatchingRecipes(QString searchText);
std::map<double, QStringList> findMatches(QString text);
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
QMenu *optionsMenu;
QAction *updateDb;
QAction *cleanDb;
QWidget *centralWidget;
SearchBox *searchBox;
QDir currentDir;
QListWidget *recipeList;
QComboBox *recipeBox;
QLabel *numResults;
};
#endif
|
Remove further references to QWebEngine
|
Remove further references to QWebEngine
|
C
|
mit
|
strangetom/RecipeFinder
|
c24a1c12b24c75827e87e46fd544c63acd648c4d
|
Source/Models/FORMFieldValidation.h
|
Source/Models/FORMFieldValidation.h
|
@import Foundation;
@import CoreGraphics;
@interface FORMFieldValidation : NSObject
@property (nonatomic, getter = isRequired) BOOL required;
@property (nonatomic) NSUInteger minimumLength;
@property (nonatomic) NSInteger maximumLength;
@property (nonatomic) NSString *format;
@property (nonatomic) CGFloat minimumValue;
@property (nonatomic) CGFloat maximumValue;
- (instancetype)initWithDictionary:(NSDictionary *)dictionary;
@end
|
@import Foundation;
@import CoreGraphics;
@interface FORMFieldValidation : NSObject
@property (nonatomic, getter = isRequired) BOOL required;
@property (nonatomic) NSUInteger minimumLength;
@property (nonatomic) NSInteger maximumLength;
@property (nonatomic) NSString *format;
@property (nonatomic) CGFloat minimumValue;
@property (nonatomic) CGFloat maximumValue;
- (instancetype)initWithDictionary:(NSDictionary *)dictionary NS_DESIGNATED_INITIALIZER;
@end
|
Add designated initializer macro to field validation
|
Add designated initializer macro to field validation
|
C
|
mit
|
wangmb/Form,wangmb/Form,kalsariyac/Form,kalsariyac/Form,Jamonek/Form,steve21124/Form,0x73/Form,0x73/Form,Jamonek/Form,KevinJacob/Form,KevinJacob/Form,steve21124/Form,kalsariyac/Form,wangmb/Form,steve21124/Form,fhchina/Form,fhchina/Form,fhchina/Form,Jamonek/Form,KevinJacob/Form
|
0efa7eda72c851959fa7da2bd084cc9aec310a77
|
src/ai/FSMTransition.h
|
src/ai/FSMTransition.h
|
#pragma once
#include "FSMState.h"
#define END_STATE_TABLE {nullptr, 0, false} //!< Append this to the end of your state tables; the init function will recognize it and stop searching the table for states.
namespace ADBLib
{
class FSMTransition
{
public:
FSMState* currentState; //!< The current state.
int input; //!< If this input is recieved and the FSM state is the currentState, transition.
FSMState* nextState; //!< The next state to transition to.
};
}
|
#pragma once
#include "FSMState.h"
#define END_STATE_TABLE {nullptr, 0, nullptr} //!< Append this to the end of your state tables; the init function will recognize it and stop searching the table for states.
namespace ADBLib
{
struct FSMTransition
{
FSMState* currentState; //!< The current state.
int input; //!< If this input is received and the FSM state is the currentState, transition.
FSMState* nextState; //!< The next state to transition to.
};
}
|
Fix END_STATE_TABLE define causing bool -> ptr conversion error
|
Fix END_STATE_TABLE define causing bool -> ptr conversion error
|
C
|
mit
|
Dreadbot/ADBLib,Dreadbot/ADBLib,Sourec/ADBLib,Sourec/ADBLib
|
d8f0276472be810171e1068fccb604765ba55086
|
test/Driver/arclite-link.c
|
test/Driver/arclite-link.c
|
// RUN: touch %t.o
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-ARCLITE-OSX %s
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.8 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s
// RUN: %clang -### -target i386-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s
// CHECK-ARCLITE-OSX: libarclite_macosx.a
// CHECK-ARCLITE-OSX: -lobjc
// CHECK-NOARCLITE-NOT: libarclite
|
// RUN: touch %t.o
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-ARCLITE-OSX %s
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.8 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s
// RUN: %clang -### -target i386-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s
// CHECK-ARCLITE-OSX: libarclite_macosx.a
// CHECK-ARCLITE-OSX: -framework
// CHECK-ARCLITE-OSX: Foundation
// CHECK-ARCLITE-OSX: -lobjc
// CHECK-NOARCLITE-NOT: libarclite
|
Add a test for svn r155263.
|
Add a test for svn r155263.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@155353 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
|
c2fb6d3a8316cdc5b54289548f38e24823722175
|
c24/c24.h
|
c24/c24.h
|
#include "communication/server_stream.h"
#include "communication/stream.h"
#include "communication/stream_backend_interface.h"
#include "communication/stream_tcp.h"
#include "communication/stream_tcp_client.h"
#include "communication/stream_tcp_server.h"
#include "toolbar/print_variables.h"
#include "toolbar/sfgui.h"
|
#include "communication/server_stream.h"
#include "communication/status.h"
#include "communication/stream.h"
#include "communication/stream_backend_interface.h"
#include "communication/stream_tcp.h"
#include "communication/stream_tcp_client.h"
#include "communication/stream_tcp_server.h"
#include "toolbar/print_variables.h"
#include "toolbar/sfgui.h"
|
Add status.h among the included headers.
|
Add status.h among the included headers.
|
C
|
mit
|
simsa-st/contest24,simsa-st/contest24,simsa-st/contest24,simsa-st/contest24
|
acb1a34584a2f31dbe59b77d48f782042293b049
|
include/ieeefp.h
|
include/ieeefp.h
|
/* $NetBSD: ieeefp.h,v 1.4 1998/01/09 08:03:43 perry Exp $ */
/*
* Written by J.T. Conklin, Apr 6, 1995
* Public domain.
*/
#ifndef _IEEEFP_H_
#define _IEEEFP_H_
#include <sys/cdefs.h>
#include <machine/ieeefp.h>
#ifdef __i386__
#include <machine/floatingpoint.h>
#else /* !__i386__ */
extern fp_rnd fpgetround __P((void));
extern fp_rnd fpsetround __P((fp_rnd));
extern fp_except fpgetmask __P((void));
extern fp_except fpsetmask __P((fp_except));
extern fp_except fpgetsticky __P((void));
extern fp_except fpsetsticky __P((fp_except));
#endif /* __i386__ */
#endif /* _IEEEFP_H_ */
|
/* $NetBSD: ieeefp.h,v 1.4 1998/01/09 08:03:43 perry Exp $ */
/*
* Written by J.T. Conklin, Apr 6, 1995
* Public domain.
*/
#ifndef _IEEEFP_H_
#define _IEEEFP_H_
#include <sys/cdefs.h>
#include <machine/ieeefp.h>
#ifdef __i386__
#include <machine/floatingpoint.h>
#else /* !__i386__ */
__BEGIN_DECLS
extern fp_rnd fpgetround __P((void));
extern fp_rnd fpsetround __P((fp_rnd));
extern fp_except fpgetmask __P((void));
extern fp_except fpsetmask __P((fp_except));
extern fp_except fpgetsticky __P((void));
extern fp_except fpsetsticky __P((fp_except));
__END_DECLS
#endif /* __i386__ */
#endif /* _IEEEFP_H_ */
|
Allow fpsetmask(3) and friends to be used from a C++ program on the Alpha.
|
Allow fpsetmask(3) and friends to be used from a C++ program on the Alpha.
Reviewed by: dfr
|
C
|
bsd-3-clause
|
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
|
965703d6abaaf700e4c5307597b7f298843b0e32
|
src/lib-fts/fts-filter-private.h
|
src/lib-fts/fts-filter-private.h
|
#ifndef FTS_FILTER_PRIVATE_H
#define FTS_FILTER_PRIVATE_H
#define FTS_FILTER_CLASSES_NR 3
/*
API that stemming providers (classes) must provide: The register()
function is called when the class is registered via
fts_filter_register() The create() function is called to get an
instance of a registered filter class. The destroy function is
called to destroy an instance of a filter.
*/
struct fts_filter_vfuncs {
int (*create)(const struct fts_language *lang,
const char *const *settings,
struct fts_filter **filter_r,
const char **error_r);
int (*filter)(struct fts_filter *filter, const char **token,
const char **error_r);
void (*destroy)(struct fts_filter *filter);
};
struct fts_filter {
const char *class_name; /* name of the class this is based on */
const struct fts_filter_vfuncs *v;
int refcount;
struct fts_filter *parent;
};
#endif
|
#ifndef FTS_FILTER_PRIVATE_H
#define FTS_FILTER_PRIVATE_H
#define FTS_FILTER_CLASSES_NR 3
/*
API that stemming providers (classes) must provide: The create()
function is called to get an instance of a registered filter class.
The filter() function is called with tokens for the specific filter.
The destroy function is called to destroy an instance of a filter.
*/
struct fts_filter_vfuncs {
int (*create)(const struct fts_language *lang,
const char *const *settings,
struct fts_filter **filter_r,
const char **error_r);
int (*filter)(struct fts_filter *filter, const char **token,
const char **error_r);
void (*destroy)(struct fts_filter *filter);
};
struct fts_filter {
const char *class_name; /* name of the class this is based on */
const struct fts_filter_vfuncs *v;
int refcount;
struct fts_filter *parent;
};
#endif
|
Correct comment in filter internal API.
|
lib-fts: Correct comment in filter internal API.
|
C
|
mit
|
dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot
|
6e40568c6c6297fa0fcc85a6f8116af5bc167f69
|
linkedlist.c
|
linkedlist.c
|
/**
*/
#include "linkedlist.h"
/**
* Create a new empty linked list.
*/
LinkedList* createList(void)
{
LinkedList *list = (LinkedList *) malloc(sizeof(LinkedList));
/*
* If no error in allocating, initialise list contents.
*/
if (list)
list->head = NULL;
return list;
}
/**
* Delete an entire list.
*
* TODO: use double pointer to allow setting to NULL from inside?
*/
void deleteList(LinkedList *list)
{
LinkedListNode *current, *next;
current = list->head;
next = current;
while (next)
{
next = current->next;
free(current);
current = next;
}
free(list);
}
/**
* Add an element to the start.
*
* Precondition: list is a valid pointer
*/
void insertStart(LinkedList *list, LinkedListData data)
{
LinkedListNode *node = (LinkedListNode *) malloc(sizeof(LinkedListNode));
/*
* If no error, proceed to add node to list.
*/
if (node)
{
node->data = data;
node->next = list->head;
list->head = node;
}
}
/**
* Delete an element at the start.
*
* Precondition: list is a valid pointer
*/
void removeStart(LinkedList *list)
{
if (list->head)
{
LinkedListNode *node = list->head;
list->head = node->next;
free(node);
}
}
|
/**
*/
#include "linkedlist.h"
/**
* Create a new empty linked list.
*/
LinkedList* createList(void)
{
LinkedList *list = (LinkedList *) malloc(sizeof(LinkedList));
/*
* If no error in allocating, initialise list contents.
*/
if (list)
list->head = NULL;
return list;
}
/**
* Delete an entire list.
*
* TODO: use double pointer to allow setting to NULL from inside?
*/
void deleteList(LinkedList *list)
{
if (list != NULL)
{
LinkedListNode *current, *next;
current = list->head;
next = current;
while (next)
{
next = current->next;
free(current);
current = next;
}
free(list);
}
}
/**
* Add an element to the start.
*
* Precondition: list is a valid pointer
*/
void insertStart(LinkedList *list, LinkedListData data)
{
LinkedListNode *node = (LinkedListNode *) malloc(sizeof(LinkedListNode));
/*
* If no error, proceed to add node to list.
*/
if (node)
{
node->data = data;
node->next = list->head;
list->head = node;
}
}
/**
* Delete an element at the start.
*
* Precondition: list is a valid pointer
*/
void removeStart(LinkedList *list)
{
if (list->head)
{
LinkedListNode *node = list->head;
list->head = node->next;
free(node);
}
}
|
Add check for null pointer in deleteList()
|
Add check for null pointer in deleteList()
|
C
|
mit
|
jradtilbrook/linkedlist
|
a412123bebbec376d4df8d06a06061d9bd45dd64
|
src/ibmras/common/common.h
|
src/ibmras/common/common.h
|
/*******************************************************************************
* Copyright 2016 IBM Corp.
*
* 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 ibmras_common_common_h
#define ibmras_common_common_h
#include <sstream>
namespace ibmras {
namespace common {
template <class T>
std::string itoa(T t) {
#ifdef _WINDOWS
return std::to_string(static_cast<long long>(t));
#else
std::stringstream s;
s << t;
return s.str();
#endif
std::string ftoa(T t) {
#ifdef _WINDOWS
return std::to_string(static_cast<long double>(t));
#else
std::stringstream s;
s << t;
return s.str();
#endif
}
}
}
#endif /* ibmras_common_common_h */
|
/*******************************************************************************
* Copyright 2016 IBM Corp.
*
* 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 ibmras_common_common_h
#define ibmras_common_common_h
#include <sstream>
namespace ibmras {
namespace common {
template <class T>
std::string itoa(T t) {
#ifdef _WINDOWS
return std::to_string(static_cast<long long>(t));
#else
std::stringstream s;
s << t;
return s.str();
#endif
template <class T>
std::string ftoa(T t) {
#ifdef _WINDOWS
return std::to_string(static_cast<long double>(t));
#else
std::stringstream s;
s << t;
return s.str();
#endif
}
}
}
#endif /* ibmras_common_common_h */
|
Make ftoa a template function
|
Make ftoa a template function
|
C
|
apache-2.0
|
RuntimeTools/omr-agentcore,RuntimeTools/omr-agentcore,RuntimeTools/omr-agentcore,RuntimeTools/omr-agentcore,RuntimeTools/omr-agentcore
|
ac5714bf291199e3d820dacbeabe902aa0fcf769
|
display.h
|
display.h
|
/*******************************************************************************
* Copyright (C) 2010, Linaro Limited.
*
* This file is part of PowerDebug.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Amit Arora <amit.arora@linaro.org> (IBM Corporation)
* - initial API and implementation
*******************************************************************************/
#define VALUE_MAX 16
WINDOW windows[TOTAL_FEATURE_WINS];
#define PT_COLOR_DEFAULT 1
#define PT_COLOR_HEADER_BAR 2
#define PT_COLOR_ERROR 3
#define PT_COLOR_RED 4
#define PT_COLOR_YELLOW 5
#define PT_COLOR_GREEN 6
#define PT_COLOR_BRIGHT 7
#define PT_COLOR_BLUE 8
|
/*******************************************************************************
* Copyright (C) 2010, Linaro Limited.
*
* This file is part of PowerDebug.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Amit Arora <amit.arora@linaro.org> (IBM Corporation)
* - initial API and implementation
*******************************************************************************/
#define PT_COLOR_DEFAULT 1
#define PT_COLOR_HEADER_BAR 2
#define PT_COLOR_ERROR 3
#define PT_COLOR_RED 4
#define PT_COLOR_YELLOW 5
#define PT_COLOR_GREEN 6
#define PT_COLOR_BRIGHT 7
#define PT_COLOR_BLUE 8
|
Remove unused variables and definitions
|
Remove unused variables and definitions
Signed-off-by: Daniel Lezcano <e9fa45941f2ebe89c1b9d6c5f339ab42eadb8567@free.fr>
Signed-off-by: Amit Kucheria <f352f8f7e4567da77f569289775ad284524dea88@linaro.org>
|
C
|
epl-1.0
|
yinquan529/platform-external-powerdebug,yinquan529/platform-external-powerdebug,gromaudio/android_external_powerdebug,gromaudio/android_external_powerdebug
|
f4966e249257bb689d40ba9805a6b0cc8d4d7423
|
src/ApiKey.h
|
src/ApiKey.h
|
// Copyright eeGeo Ltd (2012-2015), All Rights Reserved
#pragma once
#include <string>
namespace ExampleApp
{
//! defines a path to the app config file, which is used to provide the EegeoApiKey and other credentials
static const std::string ApplicationConfigurationPath = "ApplicationConfigs/standard_config.json";
//! REQUIRED: You must obtain an API key for the eeGeo SDK from https://www.eegeo.com/developers/ and set is as the value of "EegeoApiKey" in the config file
//! Optional: If 'useYelp' is true in AppHost you may wish to obtain a Yelp API key from https://www.yelp.com/developers for POI search provision.
//! If so, set credentials using the following keys in the app config file:
//! YelpConsumerKey
//! YelpConsumerSecret
//! YelpOAuthToken
//! YelpOAuthTokenSecret
//! Optional: You may wish to obtain a geonames account key from http://www.geonames.org/export/web-services.html for address/place search provision.
//! Set it as the value of 'GeoNamesUserName' in the app config file:
//! Optional: You may wish to obtain an API key for Flurry from https://developer.yahoo.com/analytics/ for metrics.
//! Set it as the value of 'FlurryApiKey' in the app config file:
}
|
// Copyright eeGeo Ltd (2012-2015), All Rights Reserved
#pragma once
#include <string>
namespace ExampleApp
{
//! defines a path to the app config file, which is used to provide the EegeoApiKey and other credentials
static const std::string ApplicationConfigurationPath = "ApplicationConfigs/standard_config.json";
//! REQUIRED: You must obtain an API key for the WRLD SDK from https://www.wrld3d.com/developers and set it as the value of "EegeoApiKey" in the config file: "ApplicationConfigs/standard_config.json"
//! Optional: If 'useYelp' is true in AppHost you may wish to obtain a Yelp API key from https://www.yelp.com/developers for POI search provision.
//! If so, set credentials using the following keys in the app config file:
//! YelpConsumerKey
//! YelpConsumerSecret
//! YelpOAuthToken
//! YelpOAuthTokenSecret
//! Optional: You may wish to obtain a geonames account key from http://www.geonames.org/export/web-services.html for address/place search provision.
//! Set it as the value of 'GeoNamesUserName' in the app config file:
//! Optional: You may wish to obtain an API key for Flurry from https://developer.yahoo.com/analytics/ for metrics.
//! Set it as the value of 'FlurryApiKey' in the app config file:
}
|
Fix for MPLY-10449 Corrected the message to what the bug report suggests. Buddy: Michael O
|
Fix for MPLY-10449
Corrected the message to what the bug report suggests.
Buddy: Michael O
|
C
|
bsd-2-clause
|
eegeo/eegeo-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app
|
21e818f9426d80edb2cb97188ef33047b0f1f5bf
|
c/boards/arduino_uno/riot_arduino_uno.c
|
c/boards/arduino_uno/riot_arduino_uno.c
|
#include "riot_arduino_uno.h"
#include "utils.h"
riot_arduino_uno_sinks* riot_arduino_uno_sinks_create() {
riot_arduino_uno_sinks *sinks = xmalloc(sizeof(riot_arduino_uno_sinks));
return sinks;
}
riot_arduino_uno_sources* riot_arduino_uno_sources_create() {
riot_arduino_uno_sources *sources = xmalloc(sizeof(riot_arduino_uno_sources));
return sources;
};
int riot_arduino_uno_run(riot_arduino_uno_main main) {
if(main == NULL) {
return -1;
}
riot_arduino_uno_sources *sources = riot_arduino_uno_sources_create();
if(sources == NULL) {
return -2;
}
riot_arduino_uno_sinks *sinks = main(sources);
if(sinks == NULL) {
return -3;
}
while(true) {
// TODO: Read all inputs and map to sources
// TODO: If all sinks/outputs have completed, break
}
return 0;
}
|
#include "riot_arduino_uno.h"
#include "utils.h"
#include<stdbool.h>
riot_arduino_uno_sinks* riot_arduino_uno_sinks_create() {
riot_arduino_uno_sinks *sinks = xmalloc(sizeof(riot_arduino_uno_sinks));
return sinks;
}
riot_arduino_uno_sources* riot_arduino_uno_sources_create() {
riot_arduino_uno_sources *sources = xmalloc(sizeof(riot_arduino_uno_sources));
return sources;
};
void riot_arduino_uno_map_sinks_to_write_outputs(riot_arduino_uno_sinks *sinks) {
// TODO: Map sinks to write outputs
}
void riot_arduino_uno_read_inputs(riot_arduino_uno_sources *sources) {
// TODO: Read all inputs and map to sources
}
bool riot_arduino_uno_is_sinks_empty(riot_arduino_uno_sinks *sinks) {
// TODO: Return true if no streams are present in sink, ie no output is required.
}
int riot_arduino_uno_run(riot_arduino_uno_main main) {
if(main == NULL) {
return -1;
}
riot_arduino_uno_sources *sources = riot_arduino_uno_sources_create();
if(sources == NULL) {
return -2;
}
riot_arduino_uno_sinks *sinks = main(sources);
if(sinks == NULL) {
return -3;
}
riot_arduino_uno_map_sinks_to_write_outputs(sinks);
while (true) {
riot_arduino_uno_read_inputs(sources);
if(riot_arduino_uno_is_sinks_empty(sinks))
break;
}
return 0;
}
|
Add function declarations, usages and TODOs
|
Add function declarations, usages and TODOs
|
C
|
mit
|
artfuldev/RIoT
|
1ce377ab2cf36d8d10b3d0672977dbc63833c745
|
test/CodeGen/available-externally-suppress.c
|
test/CodeGen/available-externally-suppress.c
|
// RUN: %clang_cc1 -emit-llvm -o - -O0 -triple x86_64-apple-darwin10 %s | FileCheck %s
// Ensure that we don't emit available_externally functions at -O0.
int x;
inline void f0(int y) { x = y; }
// CHECK: define void @test()
// CHECK: declare void @f0(i32)
void test() {
f0(17);
}
inline int __attribute__((always_inline)) f1(int x) {
int blarg = 0;
for (int i = 0; i < x; ++i)
blarg = blarg + x * i;
return blarg;
}
int test1(int x) {
// CHECK: br i1
// CHECK-NOT: call
// CHECK: ret i32
return f1(x);
}
|
// RUN: %clang_cc1 -emit-llvm -o - -O0 -triple x86_64-apple-darwin10 %s | FileCheck %s
// Ensure that we don't emit available_externally functions at -O0.
int x;
inline void f0(int y) { x = y; }
// CHECK: define void @test()
// CHECK: declare void @f0(i32)
void test() {
f0(17);
}
inline int __attribute__((always_inline)) f1(int x) {
int blarg = 0;
for (int i = 0; i < x; ++i)
blarg = blarg + x * i;
return blarg;
}
// CHECK: @test1
int test1(int x) {
// CHECK: br i1
// CHECK-NOT: call
// CHECK: ret i32
return f1(x);
}
|
Improve test case. Thanks Eli
|
Improve test case. Thanks Eli
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@108470 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
ec0974bc2f25485f430627e5d170ddf938b1fa56
|
p_liberrno.h
|
p_liberrno.h
|
/*
* Copyright 2013 Mo McRoberts.
*
* 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 P_LIBERRNO_H_
# define P_LIBERRNO_H_ 1
# include <ux/cdefs.h>
# include "errno.h"
# undef errno
int *errno_ux2003(void) UX_SYM03_(errno) UX_WEAK_;
int *errno_global_ux2003(void) UX_SYM03_(errno_global_);
#endif /*!P_LIBERRNO_H_*/
|
/*
* Copyright 2013 Mo McRoberts.
*
* 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 P_LIBERRNO_H_
# define P_LIBERRNO_H_ 1
# include <ux/cdefs.h>
# include "errno.h"
# undef errno
int *errno_ux2003(void) UX_SYM03_(errno) UX_WEAK_;
int *errno_global_ux2003(void) UX_PRIVATE_(errno_global);
#endif /*!P_LIBERRNO_H_*/
|
Mark errno_global as a private symbol.
|
Mark errno_global as a private symbol.
|
C
|
apache-2.0
|
coreux/liberrno,coreux/liberrno
|
2d6749f8c86b6c0ab9bf64f6666ad167f883226e
|
src/platform/3ds/3ds-memory.c
|
src/platform/3ds/3ds-memory.c
|
/* Copyright (c) 2013-2014 Jeffrey Pfau
*
* 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/. */
#include "util/memory.h"
void* anonymousMemoryMap(size_t size) {
return malloc(size);
}
void mappedMemoryFree(void* memory, size_t size) {
free(memory);
}
|
/* Copyright (c) 2013-2014 Jeffrey Pfau
*
* 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/. */
#include "util/memory.h"
#include <3ds.h>
void* anonymousMemoryMap(size_t size) {
return linearAlloc(size);
}
void mappedMemoryFree(void* memory, size_t size) {
UNUSED(size);
linearFree(memory);
}
|
Use linearAlloc instead of malloc
|
3DS: Use linearAlloc instead of malloc
|
C
|
mpl-2.0
|
sergiobenrocha2/mgba,Touched/mgba,AdmiralCurtiss/mgba,Anty-Lemon/mgba,mgba-emu/mgba,iracigt/mgba,jeremyherbert/mgba,cassos/mgba,libretro/mgba,mgba-emu/mgba,libretro/mgba,fr500/mgba,askotx/mgba,Anty-Lemon/mgba,jeremyherbert/mgba,Iniquitatis/mgba,Iniquitatis/mgba,libretro/mgba,mgba-emu/mgba,iracigt/mgba,askotx/mgba,sergiobenrocha2/mgba,fr500/mgba,Anty-Lemon/mgba,askotx/mgba,sergiobenrocha2/mgba,jeremyherbert/mgba,fr500/mgba,cassos/mgba,Iniquitatis/mgba,AdmiralCurtiss/mgba,iracigt/mgba,mgba-emu/mgba,Touched/mgba,MerryMage/mgba,jeremyherbert/mgba,sergiobenrocha2/mgba,libretro/mgba,sergiobenrocha2/mgba,AdmiralCurtiss/mgba,Touched/mgba,MerryMage/mgba,fr500/mgba,cassos/mgba,Anty-Lemon/mgba,iracigt/mgba,askotx/mgba,libretro/mgba,Iniquitatis/mgba,MerryMage/mgba
|
db44ba375371f40754feca8fa14a009d49333c03
|
sys/alpha/include/ieeefp.h
|
sys/alpha/include/ieeefp.h
|
/* $FreeBSD$ */
/* From: NetBSD: ieeefp.h,v 1.2 1997/04/06 08:47:28 cgd Exp */
/*
* Written by J.T. Conklin, Apr 28, 1995
* Public domain.
*/
#ifndef _ALPHA_IEEEFP_H_
#define _ALPHA_IEEEFP_H_
typedef int fp_except;
#define FP_X_INV (1LL << 1) /* invalid operation exception */
#define FP_X_DZ (1LL << 2) /* divide-by-zero exception */
#define FP_X_OFL (1LL << 3) /* overflow exception */
#define FP_X_UFL (1LL << 4) /* underflow exception */
#define FP_X_IMP (1LL << 5) /* imprecise(inexact) exception */
#if 0
#define FP_X_IOV (1LL << 6) /* integer overflow XXX? */
#endif
typedef enum {
FP_RZ=0, /* round to zero (truncate) */
FP_RM=1, /* round toward negative infinity */
FP_RN=2, /* round to nearest representable number */
FP_RP=3 /* round toward positive infinity */
} fp_rnd;
#endif /* _ALPHA_IEEEFP_H_ */
|
/* $FreeBSD$ */
/* From: NetBSD: ieeefp.h,v 1.2 1997/04/06 08:47:28 cgd Exp */
/*
* Written by J.T. Conklin, Apr 28, 1995
* Public domain.
*/
#ifndef _ALPHA_IEEEFP_H_
#define _ALPHA_IEEEFP_H_
typedef int fp_except_t;
#define FP_X_INV (1LL << 1) /* invalid operation exception */
#define FP_X_DZ (1LL << 2) /* divide-by-zero exception */
#define FP_X_OFL (1LL << 3) /* overflow exception */
#define FP_X_UFL (1LL << 4) /* underflow exception */
#define FP_X_IMP (1LL << 5) /* imprecise(inexact) exception */
#if 0
#define FP_X_IOV (1LL << 6) /* integer overflow XXX? */
#endif
typedef enum {
FP_RZ=0, /* round to zero (truncate) */
FP_RM=1, /* round toward negative infinity */
FP_RN=2, /* round to nearest representable number */
FP_RP=3 /* round toward positive infinity */
} fp_rnd;
#endif /* _ALPHA_IEEEFP_H_ */
|
Change floating point exception type to match the i386 one.
|
Change floating point exception type to match the i386 one.
Submitted by: Mark Abene <phiber@radicalmedia.com>
|
C
|
bsd-3-clause
|
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
|
903d83a74a10f6839b2a9a53d5912de9b3038902
|
src/drivers/net/stm32cube/stm32f7cube_eth.h
|
src/drivers/net/stm32cube/stm32f7cube_eth.h
|
/**
* @file
*
* @date 17.03.2017
* @author Anton Bondarev
*/
#ifndef STM32F7CUBE_ETH_H_
#define STM32F7CUBE_ETH_H_
#include <stm32f7xx_hal_conf.h>
#include <stm32f7xx.h>
#include <stm32f7xx_hal.h>
#include <stm32f7xx_hal_eth.h>
#define PHY_ADDRESS 0x00
#endif /* STM32F7CUBE_ETH_H_ */
|
/**
* @file
*
* @date 17.03.2017
* @author Anton Bondarev
*/
#ifndef STM32F7CUBE_ETH_H_
#define STM32F7CUBE_ETH_H_
#include <stm32f7xx_hal.h>
#define PHY_ADDRESS 0x00
#endif /* STM32F7CUBE_ETH_H_ */
|
Build fix eth for stm32 f7
|
drivers: Build fix eth for stm32 f7
|
C
|
bsd-2-clause
|
embox/embox,embox/embox,embox/embox,embox/embox,embox/embox,embox/embox
|
50212adfb401ea0b48a0318675b57c470f1f3de6
|
src/shared.c
|
src/shared.c
|
#include <openssl/conf.h>
#include <openssl/bio.h>
#include <openssl/evp.h>
#include "shared.h"
int un_base64
(char *in, char **out, int **len)
{
BIO *bio, *b64;
}
bool saltystring_is_salty (
|
#include <openssl/conf.h>
#include <openssl/bio.h>
#include <openssl/evp.h>
#include "shared.h"
int un_base64
(char *in, char **out, int **len)
{
BIO *bio, *b64;
}
|
Remove forgotten broken line of code lel
|
Remove forgotten broken line of code lel
|
C
|
bsd-3-clause
|
undesktop/libopkeychain
|
75703388d0f8a32c3c7f15d11106d6815cdce33e
|
AFToolkit/AFToolkit.h
|
AFToolkit/AFToolkit.h
|
//
// Toolkit header to include the main headers of the 'AFToolkit' library.
//
#import "AFDefines.h"
#import "AFLogHelper.h"
#import "AFFileHelper.h"
#import "AFPlatformHelper.h"
#import "AFReachability.h"
#import "AFKVO.h"
#import "AFArray.h"
#import "AFMutableArray.h"
#import "NSBundle+Universal.h"
#import "UITableViewCell+Universal.h"
#import "AFDBClient.h"
#import "AFView.h"
#import "AFViewController.h"
|
//
// Toolkit header to include the main headers of the 'AFToolkit' library.
//
#import "AFDefines.h"
#import "AFLogHelper.h"
#import "AFFileHelper.h"
#import "AFPlatformHelper.h"
#import "AFReachability.h"
#import "AFKVO.h"
#import "AFArray.h"
#import "AFMutableArray.h"
#import "NSBundle+Universal.h"
#import "UITableViewCell+Universal.h"
#import "UIView+Render.h"
#import "AFDBClient.h"
#import "AFView.h"
#import "AFViewController.h"
|
Add UIView+Render header to toolkit include.
|
Add UIView+Render header to toolkit include.
|
C
|
mit
|
mlatham/AFToolkit
|
33bbb00cdc583af343bcabc53acb189252d38b6b
|
caffe2/utils/threadpool/pthreadpool_impl.h
|
caffe2/utils/threadpool/pthreadpool_impl.h
|
/**
* Copyright (c) 2016-present, Facebook, 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 CAFFE2_UTILS_PTHREADPOOL_IMPL_H_
#define CAFFE2_UTILS_PTHREADPOOL_IMPL_H_
#include "ThreadPoolCommon.h"
#ifndef CAFFE2_THREADPOOL_MOBILE
#error "mobile build state not defined"
#endif
#if CAFFE2_THREADPOOL_MOBILE
namespace caffe2 {
struct ThreadPool;
} // namespace caffe2
extern "C" {
// Wrapper for the caffe2 threadpool for the usage of NNPACK
struct pthreadpool {
pthreadpool(caffe2::ThreadPool* pool) : pool_(pool) {}
caffe2::ThreadPool* pool_;
};
} // extern "C"
#endif // CAFFE2_THREADPOOL_MOBILE
#endif // CAFFE2_UTILS_PTHREADPOOL_IMPL_H_
|
/**
* Copyright (c) 2016-present, Facebook, 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 CAFFE2_UTILS_PTHREADPOOL_IMPL_H_
#define CAFFE2_UTILS_PTHREADPOOL_IMPL_H_
#include "ThreadPoolCommon.h"
#ifndef CAFFE2_THREADPOOL_MOBILE
#error "mobile build state not defined"
#endif
#if CAFFE2_THREADPOOL_MOBILE
namespace caffe2 {
class ThreadPool;
} // namespace caffe2
extern "C" {
// Wrapper for the caffe2 threadpool for the usage of NNPACK
struct pthreadpool {
pthreadpool(caffe2::ThreadPool* pool) : pool_(pool) {}
caffe2::ThreadPool* pool_;
};
} // extern "C"
#endif // CAFFE2_THREADPOOL_MOBILE
#endif // CAFFE2_UTILS_PTHREADPOOL_IMPL_H_
|
Fix ThreadPool class/struct forward declaration mixup
|
Fix ThreadPool class/struct forward declaration mixup
Summary: `ThreadPool` is a class, but it is forward-declared as a struct, which produces an error when compiled with clang 5.
Reviewed By: Maratyszcza
Differential Revision: D6399594
fbshipit-source-id: e8e81006f484b38e60389c659e9500ec9cfab731
|
C
|
apache-2.0
|
Yangqing/caffe2,caffe2/caffe2,xzturn/caffe2,davinwang/caffe2,davinwang/caffe2,Yangqing/caffe2,Yangqing/caffe2,davinwang/caffe2,xzturn/caffe2,xzturn/caffe2,xzturn/caffe2,Yangqing/caffe2,Yangqing/caffe2,xzturn/caffe2,davinwang/caffe2,davinwang/caffe2
|
7a6b32904342e3006e6fb1a968068ca9c8e674fb
|
Programs/GUI/Includes/Manager/SoundManager.h
|
Programs/GUI/Includes/Manager/SoundManager.h
|
/*************************************************************************
> File Name: SoundManager.h
> Project Name: Hearthstone++
> Author: Chan-Ho Chris Ohk
> Purpose: Sound manager of Hearthstone++ GUI program.
> Created Time: 2018/06/05
> Copyright (c) 2018, Chan-Ho Chris Ohk
*************************************************************************/
#ifndef HEARTHSTONEPP_GUI_SOUND_MANAGER_H
#define HEARTHSTONEPP_GUI_SOUND_MANAGER_H
#include <SFML/Audio/Music.hpp>
#include <optional>
namespace Hearthstonepp
{
class SoundManager
{
public:
SoundManager(const SoundManager& other) = delete;
~SoundManager() = delete;
static SoundManager* GetInstance();
//! Play Music.
void PlayMusic(const char* musicFileName, bool isForceToPlay = false);
//! Stop Music.
void StopMusic();
//! Returns whether the music is playing.
bool IsMusicPlaying() const;
//! Returns the name of the currently playing music.
std::string GetPlayingMusicName() const;
private:
SoundManager() = default;
static SoundManager* m_instance;
sf::Music m_music;
std::string m_musicName;
};
}
#endif
|
/*************************************************************************
> File Name: SoundManager.h
> Project Name: Hearthstone++
> Author: Chan-Ho Chris Ohk
> Purpose: Sound manager of Hearthstone++ GUI program.
> Created Time: 2018/06/05
> Copyright (c) 2018, Chan-Ho Chris Ohk
*************************************************************************/
#ifndef HEARTHSTONEPP_GUI_SOUND_MANAGER_H
#define HEARTHSTONEPP_GUI_SOUND_MANAGER_H
#include <SFML/Audio/Music.hpp>
namespace Hearthstonepp
{
class SoundManager
{
public:
SoundManager(const SoundManager& other) = delete;
~SoundManager() = delete;
static SoundManager* GetInstance();
//! Play Music.
void PlayMusic(const char* musicFileName, bool isForceToPlay = false);
//! Stop Music.
void StopMusic();
//! Returns whether the music is playing.
bool IsMusicPlaying() const;
//! Returns the name of the currently playing music.
std::string GetPlayingMusicName() const;
private:
SoundManager() = default;
static SoundManager* m_instance;
sf::Music m_music;
std::string m_musicName;
};
}
#endif
|
Fix compile error on MacOS (unsupported <optional>)
|
Fix compile error on MacOS (unsupported <optional>)
|
C
|
mit
|
Hearthstonepp/Hearthstonepp,Hearthstonepp/Hearthstonepp
|
225ed70ce8cda3ba1922063e3bdb95204d30e853
|
v6502/main.c
|
v6502/main.c
|
//
// main.c
// v6502
//
// Created by Daniel Loffgren on H.25/03/28.
// Copyright (c) 平成25年 Hello-Channel, LLC. All rights reserved.
//
#include <stdio.h>
#include "cpu.h"
#include "mem.h"
int main(int argc, const char * argv[])
{
printf("Allocating virtual memory of size 2k…\n");
return 0;
}
|
//
// main.c
// v6502
//
// Created by Daniel Loffgren on H.25/03/28.
// Copyright (c) 平成25年 Hello-Channel, LLC. All rights reserved.
//
#include <stdio.h>
#include <string.h>
#include "cpu.h"
#include "mem.h"
#include "core.h"
int main(int argc, const char * argv[])
{
printf("Creating 1 virtual CPU…\n");
v6502_cpu *cpu = v6502_createCPU();
printf("Allocating virtual memory of size 2k…\n");
cpu->memory = v6502_createMemory(2048);
char command[10];
for (;;) {
printf("] ");
scanf("%s", command);
if (!strncmp(command, "!", 2)) {
v6502_printCpuState(cpu);
}
}
return 0;
}
|
Create a CPU and start REPLing
|
Create a CPU and start REPLing
git-svn-id: dd14d189f2554b0b3f4c2209a95c13d2029e3fe8@6 96dfbd92-d197-e211-9ca9-00110a534b34
|
C
|
mit
|
RyuKojiro/v6502
|
4cc2cf0e8fc8584a8bd564c21f5448433a7f6a31
|
atmel-samd/rgb_led_colors.h
|
atmel-samd/rgb_led_colors.h
|
#define BLACK 0x000000
#define GREEN 0x001000
#define BLUE 0x000010
#define CYAN 0x001010
#define RED 0x100000
#define ORANGE 0x100800
#define YELLOW 0x101000
#define PURPLE 0x100010
#define WHITE 0x101010
#define BOOT_RUNNING BLUE
#define MAIN_RUNNING GREEN
#define SAFE_MODE YELLOW
#define ALL_DONE GREEN
#define REPL_RUNNING WHITE
#define ACTIVE_WRITE 0x200000
#define ALL_GOOD_CYCLE_MS 2000u
#define LINE_NUMBER_TOGGLE_LENGTH 300u
#define EXCEPTION_TYPE_LENGTH_MS 1000u
#define THOUSANDS WHITE
#define HUNDREDS BLUE
#define TENS YELLOW
#define ONES CYAN
#define INDENTATION_ERROR GREEN
#define SYNTAX_ERROR CYAN
#define NAME_ERROR WHITE
#define OS_ERROR ORANGE
#define VALUE_ERROR PURPLE
#define OTHER_ERROR YELLOW
|
#define BLACK 0x000000
#define GREEN 0x003000
#define BLUE 0x000030
#define CYAN 0x003030
#define RED 0x300000
#define ORANGE 0x302000
#define YELLOW 0x303000
#define PURPLE 0x300030
#define WHITE 0x303030
#define BOOT_RUNNING BLUE
#define MAIN_RUNNING GREEN
#define SAFE_MODE YELLOW
#define ALL_DONE GREEN
#define REPL_RUNNING WHITE
#define ACTIVE_WRITE 0x200000
#define ALL_GOOD_CYCLE_MS 2000u
#define LINE_NUMBER_TOGGLE_LENGTH 300u
#define EXCEPTION_TYPE_LENGTH_MS 1000u
#define THOUSANDS WHITE
#define HUNDREDS BLUE
#define TENS YELLOW
#define ONES CYAN
#define INDENTATION_ERROR GREEN
#define SYNTAX_ERROR CYAN
#define NAME_ERROR WHITE
#define OS_ERROR ORANGE
#define VALUE_ERROR PURPLE
#define OTHER_ERROR YELLOW
|
Increase the status LED brightness a bit so that newer DotStars aren't super dim. This will make status NeoPixels a bit bright but one can use samd.set_rgb_status_brightness() to dim them.
|
Increase the status LED brightness a bit so that newer DotStars
aren't super dim. This will make status NeoPixels a bit bright
but one can use samd.set_rgb_status_brightness() to dim them.
|
C
|
mit
|
adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython
|
961166443c193be490106684f3c29e894d21dcfd
|
libevmjit/Common.h
|
libevmjit/Common.h
|
#pragma once
#include <vector>
#include <boost/multiprecision/cpp_int.hpp>
namespace dev
{
namespace eth
{
namespace jit
{
using byte = uint8_t;
using bytes = std::vector<byte>;
using u256 = boost::multiprecision::uint256_t;
using bigint = boost::multiprecision::cpp_int;
struct NoteChannel {}; // FIXME: Use some log library?
enum class ReturnCode
{
Stop = 0,
Return = 1,
Suicide = 2,
BadJumpDestination = 101,
OutOfGas = 102,
StackTooSmall = 103,
BadInstruction = 104,
LLVMConfigError = 201,
LLVMCompileError = 202,
LLVMLinkError = 203,
};
/// Representation of 256-bit value binary compatible with LLVM i256
// TODO: Replace with h256
struct i256
{
uint64_t a;
uint64_t b;
uint64_t c;
uint64_t d;
};
static_assert(sizeof(i256) == 32, "Wrong i265 size");
#define UNTESTED assert(false)
}
}
}
|
#pragma once
#include <vector>
#include <boost/multiprecision/cpp_int.hpp>
namespace dev
{
namespace eth
{
namespace jit
{
using byte = uint8_t;
using bytes = std::vector<byte>;
using u256 = boost::multiprecision::uint256_t;
using bigint = boost::multiprecision::cpp_int;
struct NoteChannel {}; // FIXME: Use some log library?
enum class ReturnCode
{
Stop = 0,
Return = 1,
Suicide = 2,
BadJumpDestination = 101,
OutOfGas = 102,
StackTooSmall = 103,
BadInstruction = 104,
LLVMConfigError = 201,
LLVMCompileError = 202,
LLVMLinkError = 203,
};
/// Representation of 256-bit value binary compatible with LLVM i256
// TODO: Replace with h256
struct i256
{
uint64_t a = 0;
uint64_t b = 0;
uint64_t c = 0;
uint64_t d = 0;
};
static_assert(sizeof(i256) == 32, "Wrong i265 size");
#define UNTESTED assert(false)
}
}
}
|
Fix some GCC initialization warnings
|
Fix some GCC initialization warnings
|
C
|
mit
|
expanse-project/cpp-expanse,vaporry/cpp-ethereum,yann300/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,d-das/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,xeddmc/cpp-ethereum,joeldo/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,vaporry/evmjit,LefterisJP/cpp-ethereum,anthony-cros/cpp-ethereum,subtly/cpp-ethereum-micro,anthony-cros/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,expanse-org/cpp-expanse,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,smartbitcoin/cpp-ethereum,vaporry/webthree-umbrella,karek314/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,xeddmc/cpp-ethereum,karek314/cpp-ethereum,LefterisJP/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,gluk256/cpp-ethereum,eco/cpp-ethereum,eco/cpp-ethereum,expanse-org/cpp-expanse,arkpar/webthree-umbrella,d-das/cpp-ethereum,programonauta/webthree-umbrella,eco/cpp-ethereum,d-das/cpp-ethereum,gluk256/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,anthony-cros/cpp-ethereum,d-das/cpp-ethereum,subtly/cpp-ethereum-micro,expanse-org/cpp-expanse,subtly/cpp-ethereum-micro,johnpeter66/ethminer,d-das/cpp-ethereum,karek314/cpp-ethereum,smartbitcoin/cpp-ethereum,xeddmc/cpp-ethereum,johnpeter66/ethminer,PaulGrey30/go-get--u-github.com-tools-godep,joeldo/cpp-ethereum,xeddmc/cpp-ethereum,joeldo/cpp-ethereum,LefterisJP/cpp-ethereum,expanse-project/cpp-expanse,subtly/cpp-ethereum-micro,expanse-project/cpp-expanse,vaporry/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,anthony-cros/cpp-ethereum,vaporry/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,expanse-project/cpp-expanse,karek314/cpp-ethereum,LefterisJP/cpp-ethereum,xeddmc/cpp-ethereum,expanse-project/cpp-expanse,yann300/cpp-ethereum,eco/cpp-ethereum,smartbitcoin/cpp-ethereum,yann300/cpp-ethereum,yann300/cpp-ethereum,expanse-org/cpp-expanse,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,vaporry/cpp-ethereum,karek314/cpp-ethereum,subtly/cpp-ethereum-micro,smartbitcoin/cpp-ethereum,subtly/cpp-ethereum-micro,d-das/cpp-ethereum,vaporry/cpp-ethereum,smartbitcoin/cpp-ethereum,smartbitcoin/cpp-ethereum,ethers/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,LefterisJP/webthree-umbrella,PaulGrey30/go-get--u-github.com-tools-godep,Sorceror32/go-get--u-github.com-tools-godep,joeldo/cpp-ethereum,LefterisJP/webthree-umbrella,expanse-org/cpp-expanse,gluk256/cpp-ethereum,joeldo/cpp-ethereum,gluk256/cpp-ethereum,eco/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,programonauta/webthree-umbrella,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,ethers/cpp-ethereum,gluk256/cpp-ethereum,xeddmc/cpp-ethereum,expanse-org/cpp-expanse,ethers/cpp-ethereum,karek314/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,ethers/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,joeldo/cpp-ethereum,LefterisJP/cpp-ethereum,LefterisJP/cpp-ethereum,ethers/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,chfast/webthree-umbrella,anthony-cros/cpp-ethereum,vaporry/evmjit,anthony-cros/cpp-ethereum,expanse-project/cpp-expanse,johnpeter66/ethminer,gluk256/cpp-ethereum,yann300/cpp-ethereum,yann300/cpp-ethereum,ethers/cpp-ethereum,eco/cpp-ethereum,vaporry/cpp-ethereum
|
a59be15fe062229e4a5566d930186bf521c4d8c0
|
include/tilck/kernel/debug_utils.h
|
include/tilck/kernel/debug_utils.h
|
/* SPDX-License-Identifier: BSD-2-Clause */
#pragma once
#include <tilck/kernel/paging.h>
#include <tilck/kernel/hal.h>
size_t stackwalk32(void **frames, size_t count,
void *ebp, pdir_t *pdir);
void dump_stacktrace(void);
void dump_regs(regs *r);
void validate_stack_pointer_int(const char *file, int line);
#ifdef DEBUG
# define DEBUG_VALIDATE_STACK_PTR() validate_stack_pointer_int(__FILE__, \
__LINE__)
#else
# define DEBUG_VALIDATE_STACK_PTR()
#endif
void debug_qemu_turn_off_machine(void);
void register_debug_kernel_keypress_handler(void);
void init_extra_debug_features();
void set_sched_alive_thread_enabled(bool enabled);
|
/* SPDX-License-Identifier: BSD-2-Clause */
#pragma once
#include <tilck/kernel/paging.h>
#include <tilck/kernel/hal.h>
size_t stackwalk32(void **frames, size_t count,
void *ebp, pdir_t *pdir);
void dump_stacktrace(void);
void dump_regs(regs *r);
void validate_stack_pointer_int(const char *file, int line);
#if defined(DEBUG) && !defined(UNIT_TEST_ENVIRONMENT)
# define DEBUG_VALIDATE_STACK_PTR() validate_stack_pointer_int(__FILE__, \
__LINE__)
#else
# define DEBUG_VALIDATE_STACK_PTR()
#endif
void debug_qemu_turn_off_machine(void);
void register_debug_kernel_keypress_handler(void);
void init_extra_debug_features();
void set_sched_alive_thread_enabled(bool enabled);
|
Make DEBUG_VALIDATE_STACK_PTR() a no-op in unit tests
|
[debug] Make DEBUG_VALIDATE_STACK_PTR() a no-op in unit tests
|
C
|
bsd-2-clause
|
vvaltchev/experimentOs,vvaltchev/experimentOs,vvaltchev/experimentOs,vvaltchev/experimentOs
|
17bd549d6a85a90837f56b0374564d6b1a18259a
|
list.h
|
list.h
|
#include <stdlib.h>
#ifndef __LIST_H__
#define __LIST_H__
struct ListNode;
struct List;
typedef struct ListNode ListNode;
typedef struct List List;
List* List_Create(void);
void List_Destroy(List* l);
ListNode* ListNode_Create(void *);
void ListNode_Destroy(ListNode* n);
ListNode* List_Search(List* l, void* k, int (f)(void*, void*));
void List_Insert(List* l, ListNode* n);
void List_Delete(List* l, ListNode* n);
#endif
|
#include <stdlib.h>
#ifndef __LIST_H__
#define __LIST_H__
struct ListNode;
struct List;
typedef struct ListNode ListNode;
typedef struct List List;
List* List_Create(void);
void List_Destroy(List* l);
ListNode* ListNode_Create(void * k);
void ListNode_Destroy(ListNode* n);
ListNode* List_Search(List* l, void* k, int (f)(void*, void*));
void List_Insert(List* l, ListNode* n);
void List_Delete(List* l, ListNode* n);
#endif
|
Add missing parameter variable name 'k'
|
Add missing parameter variable name 'k'
|
C
|
mit
|
MaxLikelihood/CADT
|
7214f0aa8bfbe71e69e3340bda1f2f4411db8ff0
|
cuser/acpica/acenv_header.h
|
cuser/acpica/acenv_header.h
|
#define ACPI_MACHINE_WIDTH 64
#define ACPI_SINGLE_THREADED
#define ACPI_USE_LOCAL_CACHE
#define ACPI_INLINE inline
#define ACPI_USE_NATIVE_DIVIDE
#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED
#ifdef ACPI_FULL_DEBUG
#define ACPI_DEBUG_OUTPUT
#define ACPI_DISASSEMBLER
// Depends on threading support
#define ACPI_DEBUGGER
#define ACPI_DBG_TRACK_ALLOCATIONS
#define ACPI_GET_FUNCTION_NAME __FUNCTION__
#else
#define ACPI_GET_FUNCTION_NAME ""
#endif
#define ACPI_PHYS_BASE 0x100000000
#include <stdint.h>
#include <stdarg.h>
#define AcpiOsPrintf printf
#define AcpiOsVprintf vprintf
struct acpi_table_facs;
uint32_t AcpiOsReleaseGlobalLock(struct acpi_table_facs* facs);
uint32_t AcpiOsAcquireGlobalLock(struct acpi_table_facs* facs);
#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acquired) Acquired = AcpiOsAcquireGlobalLock(GLptr)
#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Pending) Pending = AcpiOsReleaseGlobalLock(GLptr)
|
#define ACPI_MACHINE_WIDTH 64
#define ACPI_SINGLE_THREADED
#define ACPI_USE_LOCAL_CACHE
#define ACPI_INLINE inline
#define ACPI_USE_NATIVE_DIVIDE
#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED
#ifdef ACPI_FULL_DEBUG
#define ACPI_DEBUG_OUTPUT
#define ACPI_DISASSEMBLER
// Depends on threading support
#define ACPI_DEBUGGER
//#define ACPI_DBG_TRACK_ALLOCATIONS
#define ACPI_GET_FUNCTION_NAME __FUNCTION__
#else
#define ACPI_GET_FUNCTION_NAME ""
#endif
#define ACPI_PHYS_BASE 0x100000000
#include <stdint.h>
#include <stdarg.h>
#define AcpiOsPrintf printf
#define AcpiOsVprintf vprintf
struct acpi_table_facs;
uint32_t AcpiOsReleaseGlobalLock(struct acpi_table_facs* facs);
uint32_t AcpiOsAcquireGlobalLock(struct acpi_table_facs* facs);
#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acquired) Acquired = AcpiOsAcquireGlobalLock(GLptr)
#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Pending) Pending = AcpiOsReleaseGlobalLock(GLptr)
|
Disable allocation tracking (it appears to be broken)
|
Disable allocation tracking (it appears to be broken)
|
C
|
mit
|
olsner/os,olsner/os,olsner/os,olsner/os
|
4df3463df9e5e50ecab60d9ed1bd969f16d5417b
|
tails_files/securedrop_init.c
|
tails_files/securedrop_init.c
|
#include <unistd.h>
int main(int argc, char* argv) {
setuid(0);
// Use absolute path to the Python binary and execl to avoid $PATH or symlink trickery
execl("/usr/bin/python2.7", "python2.7", "/home/vagrant/tails_files/test.py", (char*)NULL);
return 0;
}
|
#include <unistd.h>
int main(int argc, char* argv) {
setuid(0);
// Use absolute path to the Python binary and execl to avoid $PATH or symlink trickery
execl("/usr/bin/python2.7", "python2.7", "/home/amnesia/Persistent/.securedrop/securedrop_init.py", (char*)NULL);
return 0;
}
|
Fix path in tails_files C wrapper
|
Fix path in tails_files C wrapper
|
C
|
agpl-3.0
|
mark-in/securedrop-prov-upstream,mark-in/securedrop-prov-upstream,mark-in/securedrop-prov-upstream,mark-in/securedrop-prov-upstream
|
585cca1d52aa7e082aaa029c585fef8ea6d25d43
|
modules/example/seed-example.c
|
modules/example/seed-example.c
|
/* -*- mode: C; indent-tabs-mode: t; tab-width: 8; c-basic-offset: 2; -*- */
/*
* This file is part of Seed, the GObject Introspection<->Javascript bindings.
*
* Seed 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 3 of
* the License, or (at your option) any later version.
* Seed 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 Seed. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright (C) Robert Carr 2009 <carrr@rpi.edu>
*/
#include <glib.h>
#include <seed-module.h>
SeedObject
seed_module_init(SeedEngine * eng)
{
g_print("Hello Seed Module World \n");
return seed_make_object (eng->context, NULL, NULL);
}
|
/* -*- mode: C; indent-tabs-mode: t; tab-width: 8; c-basic-offset: 2; -*- */
/*
* This file is part of Seed, the GObject Introspection<->Javascript bindings.
*
* Seed 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 3 of
* the License, or (at your option) any later version.
* Seed 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 Seed. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright (C) Robert Carr 2009 <carrr@rpi.edu>
*/
#include <glib.h>
#include <seed-module.h>
SeedObject
seed_module_init(SeedEngine * eng)
{
g_print("Hello Seed Module World\n");
return seed_make_object (eng->context, NULL, NULL);
}
|
Remove extraneous space in output
|
Remove extraneous space in output
|
C
|
lgpl-2.1
|
danilocesar/seed,danilocesar/seed,danilocesar/seed,danilocesar/seed,danilocesar/seed
|
ab870ba01a18e2228b6b9827dba7e5d2b9c7a8ab
|
International/CIAPIRequest.h
|
International/CIAPIRequest.h
|
//
// CIAPIRequest.h
// International
//
// Created by Dimitry Bentsionov on 7/4/13.
// Copyright (c) 2013 Carnegie Museums. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AFNetworking.h"
#define API_BASE_URL @"http://guidecms.carnegiemuseums.org/"
#define API_TOKEN @"207b0977eb0be992898c7cf102f1bd8b"
#define API_SECRET @"5b2d5ba341d2ded69a4d6cef387951ad"
typedef void (^CIAPIHoursRequestSuccessBlock) (NSArray *hours);
typedef void (^CIAPIRequestSuccessBlock) (NSURLRequest *request, NSHTTPURLResponse *response, id JSON);
typedef void (^CIAPIRequestFailureBlock) (NSURLRequest* request, NSHTTPURLResponse* response, NSError* error, id JSON);
@interface CIAPIRequest : NSObject {
AFJSONRequestOperation *operation;
}
@property (nonatomic, retain) AFJSONRequestOperation *operation;
#pragma mark - API Methods
- (void)syncAll:(BOOL)syncAll
success:(CIAPIRequestSuccessBlock)success
failure:(CIAPIRequestFailureBlock)failure;
- (void)sync;
- (void)syncAll;
- (void)getWeeksHours:(CIAPIHoursRequestSuccessBlock)success
failure:(CIAPIRequestFailureBlock)failure;
- (void)subscribeEmail:(NSString*)email
success:(CIAPIRequestSuccessBlock)success
failure:(CIAPIRequestFailureBlock)failure;
@end
|
//
// CIAPIRequest.h
// International
//
// Created by Dimitry Bentsionov on 7/4/13.
// Copyright (c) 2013 Carnegie Museums. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AFNetworking.h"
#define API_BASE_URL @"http://guidecms.carnegiemuseums.org"
typedef void (^CIAPIHoursRequestSuccessBlock) (NSArray *hours);
typedef void (^CIAPIRequestSuccessBlock) (NSURLRequest *request, NSHTTPURLResponse *response, id JSON);
typedef void (^CIAPIRequestFailureBlock) (NSURLRequest* request, NSHTTPURLResponse* response, NSError* error, id JSON);
@interface CIAPIRequest : NSObject {
AFJSONRequestOperation *operation;
}
@property (nonatomic, retain) AFJSONRequestOperation *operation;
#pragma mark - API Methods
- (void)syncAll:(BOOL)syncAll
success:(CIAPIRequestSuccessBlock)success
failure:(CIAPIRequestFailureBlock)failure;
- (void)sync;
- (void)syncAll;
- (void)getWeeksHours:(CIAPIHoursRequestSuccessBlock)success
failure:(CIAPIRequestFailureBlock)failure;
- (void)subscribeEmail:(NSString*)email
success:(CIAPIRequestSuccessBlock)success
failure:(CIAPIRequestFailureBlock)failure;
@end
|
Remove unused API_TOKEN and API_SECRET
|
Remove unused API_TOKEN and API_SECRET
|
C
|
mit
|
CMP-Studio/cmoa-app-ios,CMP-Studio/cmoa-app-ios
|
f93edabc6295b37955e27384c650487c4689324d
|
src/instruction.h
|
src/instruction.h
|
#ifndef _INC_INSTRUCTION_H
#define _INC_INSTRUCTION_H
#include "basetypes.h"
#include <vector>
#include <map>
typedef std::vector<byte> ByteString;
class BaseCPU;
class Instruction {
public:
Instruction(ByteString opcode, SizeType instructionLength);
virtual void execute(BaseCPU &cpu, const ByteString ¶ms) const = 0;
const ByteString opcode;
const SizeType length;
};
class InstructionSet {
public:
class InstructionComparator {
public:
bool operator()(const Instruction &a, const Instruction &b) const {
return a.opcode < b.opcode;
}
};
int add(const Instruction &instruction);
int remove(const ByteString &opcode);
MOCKABLE int decode(const ByteString &opcode, const Instruction **out) const;
SizeType count() const;
private:
typedef std::pair<ByteString, const Instruction &> InstructionCode;
typedef std::map<ByteString, const Instruction &> Set;
typedef Set::iterator Iterator;
typedef Set::const_iterator ConstIterator;
typedef std::pair<Iterator, bool> Insertion;
Set set;
};
#endif//_INC_INSTRUCTION_H
|
#ifndef _INC_INSTRUCTION_H
#define _INC_INSTRUCTION_H
#include "basetypes.h"
#include <vector>
#include <map>
typedef std::vector<byte> ByteString;
class BaseCPU;
class Instruction {
public:
Instruction(ByteString opcode, SizeType instructionLength);
virtual void execute(BaseCPU &cpu, const ByteString ¶ms) const = 0;
const ByteString opcode;
// FIXME: Total length is opcode.size() + length?
const SizeType length;
};
class InstructionSet {
public:
class InstructionComparator {
public:
bool operator()(const Instruction &a, const Instruction &b) const {
return a.opcode < b.opcode;
}
};
int add(const Instruction &instruction);
int remove(const ByteString &opcode);
MOCKABLE int decode(const ByteString &opcode, const Instruction **out) const;
SizeType count() const;
private:
typedef std::pair<ByteString, const Instruction &> InstructionCode;
typedef std::map<ByteString, const Instruction &> Set;
typedef Set::iterator Iterator;
typedef Set::const_iterator ConstIterator;
typedef std::pair<Iterator, bool> Insertion;
Set set;
};
#endif//_INC_INSTRUCTION_H
|
Add note to fix confusing Instruction lengths
|
Add note to fix confusing Instruction lengths
|
C
|
mit
|
aroxby/cpu,aroxby/cpu
|
39fdbda361ba08ffd09f7632d88d28f6e7e19ba6
|
include/llvm/Analysis/LiveVar/LiveVarMap.h
|
include/llvm/Analysis/LiveVar/LiveVarMap.h
|
/* Title: LiveVarMap.h
Author: Ruchira Sasanka
Date: Jun 30, 01
Purpose: This file contains the class for a map between the BasicBlock class
and the BBLiveVar class, which is a wrapper class of BasicBlock
used for the live variable analysis. The reverse mapping can
be found in the BBLiveVar class (It has a pointer to the
corresponding BasicBlock)
*/
#ifndef LIVE_VAR_MAP_H
#define LIVE_VAR_MAP_H
#include <ext/hash_map>
class BasicBlock;
class BBLiveVar;
struct hashFuncMInst { // sturcture containing the hash function for MInst
inline size_t operator () (const MachineInstr *val) const {
return (size_t) val;
}
};
struct hashFuncBB { // sturcture containing the hash function for BB
inline size_t operator () (const BasicBlock *val) const {
return (size_t) val;
}
};
typedef std::hash_map<const BasicBlock *,
BBLiveVar *, hashFuncBB > BBToBBLiveVarMapType;
typedef std::hash_map<const MachineInstr *, const LiveVarSet *,
hashFuncMInst> MInstToLiveVarSetMapType;
#endif
|
/* Title: LiveVarMap.h -*- C++ -*-
Author: Ruchira Sasanka
Date: Jun 30, 01
Purpose: This file contains the class for a map between the BasicBlock class
and the BBLiveVar class, which is a wrapper class of BasicBlock
used for the live variable analysis. The reverse mapping can
be found in the BBLiveVar class (It has a pointer to the
corresponding BasicBlock)
*/
#ifndef LIVE_VAR_MAP_H
#define LIVE_VAR_MAP_H
#include "Support/HashExtras.h"
class MachineInstr;
class BasicBlock;
class BBLiveVar;
class LiveVarSet;
typedef std::hash_map<const BasicBlock *, BBLiveVar *> BBToBBLiveVarMapType;
typedef std::hash_map<const MachineInstr *, const LiveVarSet *> MInstToLiveVarSetMapType;
#endif
|
Use generic pointer hashes instead of custom ones.
|
Use generic pointer hashes instead of custom ones.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@1684 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap
|
8948e345f5b99784538cac6b305dd78c43e80eb2
|
test/PCH/modified-header-error.c
|
test/PCH/modified-header-error.c
|
// XFAIL: win32
// RUN: mkdir -p %t.dir
// RUN: echo '#include "header2.h"' > %t.dir/header1.h
// RUN: echo > %t.dir/header2.h
// RUN: cp %s %t.dir/t.c
// RUN: %clang_cc1 -x c-header %t.dir/header1.h -emit-pch -o %t.pch
// RUN: echo >> %t.dir/header2.h
// RUN: %clang_cc1 %t.dir/t.c -include-pch %t.pch -fsyntax-only 2>&1 | FileCheck %s
#include "header2.h"
// CHECK: fatal error: file {{.*}} has been modified since the precompiled header was built
|
// RUN: mkdir -p %t.dir
// RUN: echo '#include "header2.h"' > %t.dir/header1.h
// RUN: echo > %t.dir/header2.h
// RUN: cp %s %t.dir/t.c
// RUN: %clang_cc1 -x c-header %t.dir/header1.h -emit-pch -o %t.pch
// RUN: echo >> %t.dir/header2.h
// RUN: %clang_cc1 %t.dir/t.c -include-pch %t.pch -fsyntax-only 2>&1 | FileCheck %s
#include "header2.h"
// CHECK: fatal error: file {{.*}} has been modified since the precompiled header was built
|
Revert r132426; this test passes more often than not, and we don't have a way to mark tests as intermittently failing at the moment.
|
Revert r132426; this test passes more often than not, and we don't have a way to mark tests as intermittently failing at the moment.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@132446 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
|
cec1a48a4138035c6c8462c8baaee699addf0ede
|
AVOS/AVOSCloudLiveQuery/AVSubscription.h
|
AVOS/AVOSCloudLiveQuery/AVSubscription.h
|
//
// AVSubscription.h
// AVOS
//
// Created by Tang Tianyong on 15/05/2017.
// Copyright © 2017 LeanCloud Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AVQuery.h"
#import "AVDynamicObject.h"
NS_ASSUME_NONNULL_BEGIN
@interface AVSubscriptionOptions : AVDynamicObject
@end
@interface AVSubscription : NSObject
@property (nonatomic, strong, readonly) AVQuery *query;
@property (nonatomic, strong, readonly, nullable) AVSubscriptionOptions *options;
- (instancetype)initWithQuery:(AVQuery *)query
options:(nullable AVSubscriptionOptions *)options;
@end
NS_ASSUME_NONNULL_END
|
//
// AVSubscription.h
// AVOS
//
// Created by Tang Tianyong on 15/05/2017.
// Copyright © 2017 LeanCloud Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AVQuery.h"
#import "AVDynamicObject.h"
NS_ASSUME_NONNULL_BEGIN
@protocol AVSubscriptionDelegate <NSObject>
@end
@interface AVSubscriptionOptions : AVDynamicObject
@end
@interface AVSubscription : NSObject
@property (nonatomic, weak, nullable) id<AVSubscriptionDelegate> delegate;
@property (nonatomic, strong, readonly) AVQuery *query;
@property (nonatomic, strong, readonly, nullable) AVSubscriptionOptions *options;
- (instancetype)initWithQuery:(AVQuery *)query
options:(nullable AVSubscriptionOptions *)options;
@end
NS_ASSUME_NONNULL_END
|
Add delegate property for subscription
|
Add delegate property for subscription
|
C
|
apache-2.0
|
leancloud/objc-sdk,leancloud/objc-sdk,leancloud/objc-sdk,leancloud/objc-sdk
|
339d11539a67d2e3c4dce940e364ed7002961377
|
Mac/Compat/sync.c
|
Mac/Compat/sync.c
|
/* The equivalent of the Unix 'sync' system call: FlushVol.
Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
For now, we only flush the default volume
(since that's the only volume written to by MacB). */
#include "macdefs.h"
int
sync(void)
{
if (FlushVol((StringPtr)0, 0) == noErr)
return 0;
else {
errno= ENODEV;
return -1;
}
}
|
/* The equivalent of the Unix 'sync' system call: FlushVol.
Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
For now, we only flush the default volume
(since that's the only volume written to by MacB). */
#include "macdefs.h"
void
sync(void)
{
if (FlushVol((StringPtr)0, 0) == noErr)
return;
else {
errno= ENODEV;
return;
}
}
|
Make the prototype match the declaration in the GUSI header files.
|
Make the prototype match the declaration in the GUSI header files.
|
C
|
mit
|
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
|
39cbe6995ca13a4e24850528c16c33a1bd8f39d5
|
vtStor/CommandHandlerInterface.h
|
vtStor/CommandHandlerInterface.h
|
/*
<License>
Copyright 2015 Virtium Technology
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.
</License>
*/
#ifndef __vtStorCommandHandlerInterface_h__
#define __vtStorCommandHandlerInterface_h__
#pragma once
#include <memory>
#include "ErrorCodes.h"
#include "BufferInterface.h"
#include "ProtocolInterface.h"
#include "vtStorPlatformDefines.h"
namespace vtStor
{
class VTSTOR_API cDriveInterface;
class VTSTOR_API cCommandHandlerInterface
{
public:
cCommandHandlerInterface( std::shared_ptr<Protocol::cProtocolInterface> Protocol );
virtual ~cCommandHandlerInterface();
public:
virtual eErrorCode IssueCommand( std::shared_ptr<const cBufferInterface> CommandDescriptor, std::shared_ptr<cBufferInterface> Data ) = 0;
protected:
std::shared_ptr<Protocol::cProtocolInterface> m_Protocol;
};
}
#endif
|
/*
<License>
Copyright 2015 Virtium Technology
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.
</License>
*/
#ifndef __vtStorCommandHandlerInterface_h__
#define __vtStorCommandHandlerInterface_h__
#pragma once
#include <memory>
#include "ErrorCodes.h"
#include "BufferInterface.h"
#include "ProtocolInterface.h"
#include "vtStorPlatformDefines.h"
namespace vtStor
{
class VTSTOR_API cCommandHandlerInterface
{
public:
cCommandHandlerInterface( std::shared_ptr<Protocol::cProtocolInterface> Protocol );
virtual ~cCommandHandlerInterface();
public:
virtual eErrorCode IssueCommand( std::shared_ptr<const cBufferInterface> CommandDescriptor, std::shared_ptr<cBufferInterface> Data ) = 0;
protected:
std::shared_ptr<Protocol::cProtocolInterface> m_Protocol;
};
}
#endif
|
Remove declare: class VTSTOR_API cDriveInterface
|
Remove declare: class VTSTOR_API cDriveInterface
|
C
|
apache-2.0
|
tranminhtam/vtStor,tranminhtam/vtStor,tranminhtam/vtStor,tranminhtam/vtStor
|
a981815c88aca37a8dcb42f1ce673ed838114251
|
webkit/fileapi/quota_file_util.h
|
webkit/fileapi/quota_file_util.h
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_
#define WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_
#include "webkit/fileapi/file_system_file_util.h"
#include "webkit/fileapi/file_system_operation_context.h"
#pragma once
namespace fileapi {
class QuotaFileUtil : public FileSystemFileUtil {
public:
static QuotaFileUtil* GetInstance();
~QuotaFileUtil() {}
static const int64 kNoLimit;
base::PlatformFileError CopyOrMoveFile(
FileSystemOperationContext* fs_context,
const FilePath& src_file_path,
const FilePath& dest_file_path,
bool copy);
// TODO(dmikurube): Charge some amount of quota for directories.
base::PlatformFileError Truncate(
FileSystemOperationContext* fs_context,
const FilePath& path,
int64 length);
friend struct DefaultSingletonTraits<QuotaFileUtil>;
DISALLOW_COPY_AND_ASSIGN(QuotaFileUtil);
protected:
QuotaFileUtil() {}
};
} // namespace fileapi
#endif // WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_
#define WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_
#include "webkit/fileapi/file_system_file_util.h"
#include "webkit/fileapi/file_system_operation_context.h"
#pragma once
namespace fileapi {
class QuotaFileUtil : public FileSystemFileUtil {
public:
static QuotaFileUtil* GetInstance();
~QuotaFileUtil() {}
static const int64 kNoLimit;
virtual base::PlatformFileError CopyOrMoveFile(
FileSystemOperationContext* fs_context,
const FilePath& src_file_path,
const FilePath& dest_file_path,
bool copy);
// TODO(dmikurube): Charge some amount of quota for directories.
virtual base::PlatformFileError Truncate(
FileSystemOperationContext* fs_context,
const FilePath& path,
int64 length);
friend struct DefaultSingletonTraits<QuotaFileUtil>;
DISALLOW_COPY_AND_ASSIGN(QuotaFileUtil);
protected:
QuotaFileUtil() {}
};
} // namespace fileapi
#endif // WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_
|
Add virtual in QuitaFileUtil to fix the compilation error in r82441.
|
Add virtual in QuitaFileUtil to fix the compilation error in r82441.
TBR=dmikurube,kinuko
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6882112
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@82445 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
gavinp/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,ropik/chromium,ropik/chromium,gavinp/chromium
|
837dabff5245b55bfde5b7c84425416831c039df
|
licharger.c
|
licharger.c
|
#include <avr/io.h>
#include <avr/delay.h>
|
#include <avr/io.h>
int main (void) {
//Set pin 3 as output to source current?
PORTB = 1<<PORTB3;
DDRB = 1<<DDB3;
}
|
Add basic program to turn an LED on
|
Add basic program to turn an LED on
|
C
|
mit
|
Atom058/ArduinoLithiumCharger,Atom058/ArduinoLithiumCharger
|
a318a6ee85491e867edadd155dfa29d793b2ad1f
|
ext/xorcist/xorcist.c
|
ext/xorcist/xorcist.c
|
#include "ruby.h"
VALUE Xorcist = Qnil;
void Init_xorcist();
VALUE xor_in_place(VALUE x, VALUE y, VALUE self);
VALUE xor_in_place(VALUE self, VALUE x, VALUE y) {
const char *src = 0;
char *dest = 0;
size_t len;
size_t y_len;
rb_str_modify(x);
dest = RSTRING_PTR(x);
len = RSTRING_LEN(x);
src = RSTRING_PTR(y);
y_len = RSTRING_LEN(y);
if (y_len < len) {
len = y_len;
}
for (; len--; ++dest, ++src) {
*dest ^= *src;
}
return x;
}
void Init_xorcist() {
Xorcist = rb_define_module("Xorcist");
rb_define_module_function(Xorcist, "xor!", xor_in_place, 2);
}
|
#include <ruby.h>
VALUE Xorcist = Qnil;
void Init_xorcist();
VALUE xor_in_place(VALUE x, VALUE y, VALUE self);
VALUE xor_in_place(VALUE self, VALUE x, VALUE y) {
const char *src = 0;
char *dest = 0;
size_t len;
size_t y_len;
rb_str_modify(x);
dest = RSTRING_PTR(x);
len = RSTRING_LEN(x);
src = RSTRING_PTR(y);
y_len = RSTRING_LEN(y);
if (y_len < len) {
len = y_len;
}
for (; len--; ++dest, ++src) {
*dest ^= *src;
}
return x;
}
void Init_xorcist() {
Xorcist = rb_define_module("Xorcist");
rb_define_module_function(Xorcist, "xor!", xor_in_place, 2);
}
|
Use angle brackets for Ruby include
|
Use angle brackets for Ruby include
|
C
|
mit
|
Teino1978-Corp/Teino1978-Corp-xorcist,fny/xorcist,fny/xorcist,Teino1978-Corp/Teino1978-Corp-xorcist,fny/xorcist,fny/xorcist,Teino1978-Corp/Teino1978-Corp-xorcist,Teino1978-Corp/Teino1978-Corp-xorcist
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.