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
|
|---|---|---|---|---|---|---|---|---|---|
f4ef4ff9d744adcc8424e6993674b20000c750bf
|
src/clock_posix.c
|
src/clock_posix.c
|
#include <time.h>
#include "clock.h"
#include "clock_type.h"
extern int clock_init(struct Clock **clockp, struct Allocator *allocator)
{
struct timespec res;
if (clock_getres(CLOCK_MONOTONIC, &res) != 0 || res.tv_nsec > 1000) {
/* unknown clock or insufficient resolution */
return -1;
}
return clock_init_base(clockp, allocator, 1, 1000);
}
extern uint64_t clock_ticks(struct Clock const *const clock)
{
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
(void)clock;
return ts.tv_sec * 1000000000LL + ts.tv_nsec;
}
|
#include <time.h>
#include "clock.h"
#include "clock_type.h"
extern int clock_init(struct SPDR_Clock **clockp, struct SPDR_Allocator *allocator)
{
struct timespec res;
if (clock_getres(CLOCK_MONOTONIC, &res) != 0 || res.tv_nsec > 1000) {
/* unknown clock or insufficient resolution */
return -1;
}
return clock_init_base(clockp, allocator, 1, 1000);
}
extern uint64_t clock_ticks(struct SPDR_Clock const *const clock)
{
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
(void)clock;
return ts.tv_sec * 1000000000LL + ts.tv_nsec;
}
|
Fix compilation on posix platforms
|
Fix compilation on posix platforms
|
C
|
mit
|
uucidl/uu.spdr,uucidl/uu.spdr,uucidl/uu.spdr
|
5cd8261adec0f6b5de939ecf826ee8638a5a93e4
|
src/output.c
|
src/output.c
|
#include <format.h>
#include <string.h> /* strlen */
#include <output.h>
#include <unistd.h> /* write */
/* Initially we put data to stdout. */
int cur_out = 1;
/* Put data to current output. */
void putd(const char *data, unsigned long len)
{
(void)write(cur_out,data,len);
}
void put(const char *data)
{
putd(data, strlen(data));
}
void put_ch(char ch)
{
char buf[1];
buf[0] = ch;
putd(buf,1);
}
void put_long(long x)
{
put(format_long(x));
}
void put_ulong(unsigned long x)
{
put(format_ulong(x));
}
void put_double(double x)
{
put(format_double(x));
}
void nl(void)
{
putd("\n",1);
}
void set_output(int fd)
{
fsync(cur_out);
cur_out = fd;
}
void put_to_error(void)
{
set_output(2);
}
|
#include <format.h>
#include <string.h> /* strlen */
#include <output.h>
#include <unistd.h> /* write */
/* Initially we put data to stdout. */
int cur_out = 1;
/* Put data to current output. */
void putd(const char *data, unsigned long len)
{
ssize_t n = write(cur_out,data,len);
(void)n;
}
void put(const char *data)
{
putd(data, strlen(data));
}
void put_ch(char ch)
{
char buf[1];
buf[0] = ch;
putd(buf,1);
}
void put_long(long x)
{
put(format_long(x));
}
void put_ulong(unsigned long x)
{
put(format_ulong(x));
}
void put_double(double x)
{
put(format_double(x));
}
void nl(void)
{
putd("\n",1);
}
void set_output(int fd)
{
fsync(cur_out);
cur_out = fd;
}
void put_to_error(void)
{
set_output(2);
}
|
Work around incompatibility of warn_unused_result on one machine.
|
Work around incompatibility of warn_unused_result on one machine.
On one machine, the call to "write" in output.c gave this compiler error:
ignoring return value of ‘write’, declared with attribute warn_unused_result
To work around that, the code now grabs the return value and ignores it with
(void).
|
C
|
mit
|
chkoreff/Fexl,chkoreff/Fexl
|
7a0ffdc64e8e522035a7bc74ee3cea0bfeb55cd1
|
eval/src/vespa/eval/eval/hamming_distance.h
|
eval/src/vespa/eval/eval/hamming_distance.h
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
namespace vespalib::eval {
inline double hamming_distance(double a, double b) {
uint8_t x = (uint8_t) a;
uint8_t y = (uint8_t) b;
return __builtin_popcount(x ^ y);
}
}
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
namespace vespalib::eval {
inline double hamming_distance(double a, double b) {
uint8_t x = (uint8_t) (int8_t) a;
uint8_t y = (uint8_t) (int8_t) b;
return __builtin_popcount(x ^ y);
}
}
|
Convert from double to signed data type for reference hamming distance.
|
Convert from double to signed data type for reference hamming distance.
|
C
|
apache-2.0
|
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
|
09a2b4f4234f66c2dc89c269743ba04bf78ae8ba
|
src/interfaces/odbc/md5.h
|
src/interfaces/odbc/md5.h
|
/* File: connection.h
*
* Description: See "md.h"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 35
/* From c.h */
#ifndef __BEOS__
#ifndef __cplusplus
#ifndef bool
typedef char bool;
#endif
#ifndef true
#define true ((bool) 1)
#endif
#ifndef false
#define false ((bool) 0)
#endif
#endif /* not C++ */
#endif /* __BEOS__ */
/* Also defined in include/c.h */
#if SIZEOF_UINT8 == 0
typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */
#endif /* SIZEOF_UINT8 == 0 */
extern bool md5_hash(const void *buff, size_t len, char *hexsum);
extern bool EncryptMD5(const char *passwd, const char *salt,
size_t salt_len, char *buf);
#endif
|
/* File: md5.h
*
* Description: See "md5.c"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 35
/* From c.h */
#ifndef __BEOS__
#ifndef __cplusplus
#ifndef bool
typedef char bool;
#endif
#ifndef true
#define true ((bool) 1)
#endif
#ifndef false
#define false ((bool) 0)
#endif
#endif /* not C++ */
#endif /* __BEOS__ */
/* Also defined in include/c.h */
#if SIZEOF_UINT8 == 0
typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */
#endif /* SIZEOF_UINT8 == 0 */
extern bool md5_hash(const void *buff, size_t len, char *hexsum);
extern bool EncryptMD5(const char *passwd, const char *salt,
size_t salt_len, char *buf);
#endif
|
Fix comment at top of file to match file name.
|
Fix comment at top of file to match file name.
|
C
|
apache-2.0
|
Quikling/gpdb,ashwinstar/gpdb,Quikling/gpdb,Chibin/gpdb,tangp3/gpdb,chrishajas/gpdb,yuanzhao/gpdb,zaksoup/gpdb,zaksoup/gpdb,lpetrov-pivotal/gpdb,xinzweb/gpdb,rvs/gpdb,foyzur/gpdb,foyzur/gpdb,rvs/gpdb,yuanzhao/gpdb,edespino/gpdb,lpetrov-pivotal/gpdb,lintzc/gpdb,xinzweb/gpdb,lintzc/gpdb,rubikloud/gpdb,zeroae/postgres-xl,janebeckman/gpdb,zeroae/postgres-xl,foyzur/gpdb,lintzc/gpdb,xuegang/gpdb,ahachete/gpdb,yazun/postgres-xl,techdragon/Postgres-XL,Postgres-XL/Postgres-XL,randomtask1155/gpdb,50wu/gpdb,atris/gpdb,kaknikhil/gpdb,postmind-net/postgres-xl,Quikling/gpdb,kaknikhil/gpdb,royc1/gpdb,zaksoup/gpdb,chrishajas/gpdb,lpetrov-pivotal/gpdb,kmjungersen/PostgresXL,Quikling/gpdb,lisakowen/gpdb,randomtask1155/gpdb,rubikloud/gpdb,Chibin/gpdb,zeroae/postgres-xl,yazun/postgres-xl,yuanzhao/gpdb,0x0FFF/gpdb,0x0FFF/gpdb,tpostgres-projects/tPostgres,yuanzhao/gpdb,randomtask1155/gpdb,lintzc/gpdb,kaknikhil/gpdb,adam8157/gpdb,kmjungersen/PostgresXL,yazun/postgres-xl,cjcjameson/gpdb,tangp3/gpdb,Quikling/gpdb,janebeckman/gpdb,50wu/gpdb,chrishajas/gpdb,arcivanov/postgres-xl,kaknikhil/gpdb,ashwinstar/gpdb,yuanzhao/gpdb,Quikling/gpdb,ovr/postgres-xl,CraigHarris/gpdb,CraigHarris/gpdb,cjcjameson/gpdb,cjcjameson/gpdb,techdragon/Postgres-XL,Quikling/gpdb,lpetrov-pivotal/gpdb,rvs/gpdb,rubikloud/gpdb,xuegang/gpdb,jmcatamney/gpdb,atris/gpdb,CraigHarris/gpdb,snaga/postgres-xl,jmcatamney/gpdb,royc1/gpdb,rvs/gpdb,jmcatamney/gpdb,lisakowen/gpdb,cjcjameson/gpdb,oberstet/postgres-xl,yuanzhao/gpdb,edespino/gpdb,edespino/gpdb,xuegang/gpdb,rvs/gpdb,oberstet/postgres-xl,ashwinstar/gpdb,greenplum-db/gpdb,ahachete/gpdb,janebeckman/gpdb,jmcatamney/gpdb,CraigHarris/gpdb,yuanzhao/gpdb,Chibin/gpdb,kaknikhil/gpdb,ovr/postgres-xl,adam8157/gpdb,randomtask1155/gpdb,chrishajas/gpdb,atris/gpdb,zaksoup/gpdb,kaknikhil/gpdb,Postgres-XL/Postgres-XL,ashwinstar/gpdb,tpostgres-projects/tPostgres,edespino/gpdb,greenplum-db/gpdb,foyzur/gpdb,Chibin/gpdb,snaga/postgres-xl,xuegang/gpdb,kaknikhil/gpdb,cjcjameson/gpdb,edespino/gpdb,tangp3/gpdb,pavanvd/postgres-xl,Quikling/gpdb,ahachete/gpdb,atris/gpdb,chrishajas/gpdb,tpostgres-projects/tPostgres,postmind-net/postgres-xl,yuanzhao/gpdb,adam8157/gpdb,royc1/gpdb,yazun/postgres-xl,janebeckman/gpdb,ashwinstar/gpdb,atris/gpdb,rvs/gpdb,xuegang/gpdb,janebeckman/gpdb,zaksoup/gpdb,ahachete/gpdb,foyzur/gpdb,xinzweb/gpdb,greenplum-db/gpdb,royc1/gpdb,yazun/postgres-xl,0x0FFF/gpdb,Chibin/gpdb,tangp3/gpdb,zaksoup/gpdb,tpostgres-projects/tPostgres,ahachete/gpdb,royc1/gpdb,lisakowen/gpdb,0x0FFF/gpdb,ahachete/gpdb,0x0FFF/gpdb,atris/gpdb,rubikloud/gpdb,rvs/gpdb,lisakowen/gpdb,jmcatamney/gpdb,techdragon/Postgres-XL,arcivanov/postgres-xl,arcivanov/postgres-xl,kmjungersen/PostgresXL,lpetrov-pivotal/gpdb,kaknikhil/gpdb,kmjungersen/PostgresXL,lisakowen/gpdb,lintzc/gpdb,ovr/postgres-xl,kaknikhil/gpdb,0x0FFF/gpdb,cjcjameson/gpdb,edespino/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,xinzweb/gpdb,kaknikhil/gpdb,0x0FFF/gpdb,greenplum-db/gpdb,techdragon/Postgres-XL,xuegang/gpdb,snaga/postgres-xl,xinzweb/gpdb,arcivanov/postgres-xl,ovr/postgres-xl,xinzweb/gpdb,snaga/postgres-xl,rvs/gpdb,janebeckman/gpdb,adam8157/gpdb,pavanvd/postgres-xl,adam8157/gpdb,xuegang/gpdb,ashwinstar/gpdb,postmind-net/postgres-xl,edespino/gpdb,50wu/gpdb,royc1/gpdb,Postgres-XL/Postgres-XL,xuegang/gpdb,randomtask1155/gpdb,50wu/gpdb,tangp3/gpdb,50wu/gpdb,greenplum-db/gpdb,Quikling/gpdb,ovr/postgres-xl,cjcjameson/gpdb,pavanvd/postgres-xl,Quikling/gpdb,Chibin/gpdb,postmind-net/postgres-xl,Chibin/gpdb,zeroae/postgres-xl,zaksoup/gpdb,rubikloud/gpdb,janebeckman/gpdb,lintzc/gpdb,lpetrov-pivotal/gpdb,0x0FFF/gpdb,cjcjameson/gpdb,royc1/gpdb,adam8157/gpdb,xinzweb/gpdb,randomtask1155/gpdb,chrishajas/gpdb,jmcatamney/gpdb,50wu/gpdb,janebeckman/gpdb,50wu/gpdb,Chibin/gpdb,edespino/gpdb,tangp3/gpdb,xuegang/gpdb,snaga/postgres-xl,greenplum-db/gpdb,rubikloud/gpdb,zeroae/postgres-xl,zaksoup/gpdb,cjcjameson/gpdb,janebeckman/gpdb,greenplum-db/gpdb,chrishajas/gpdb,yuanzhao/gpdb,rubikloud/gpdb,Chibin/gpdb,oberstet/postgres-xl,lintzc/gpdb,ashwinstar/gpdb,randomtask1155/gpdb,CraigHarris/gpdb,kmjungersen/PostgresXL,foyzur/gpdb,adam8157/gpdb,techdragon/Postgres-XL,lpetrov-pivotal/gpdb,lpetrov-pivotal/gpdb,atris/gpdb,edespino/gpdb,CraigHarris/gpdb,yuanzhao/gpdb,Postgres-XL/Postgres-XL,xinzweb/gpdb,janebeckman/gpdb,ahachete/gpdb,oberstet/postgres-xl,50wu/gpdb,foyzur/gpdb,arcivanov/postgres-xl,CraigHarris/gpdb,adam8157/gpdb,lintzc/gpdb,tangp3/gpdb,Chibin/gpdb,pavanvd/postgres-xl,randomtask1155/gpdb,chrishajas/gpdb,royc1/gpdb,CraigHarris/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,rvs/gpdb,cjcjameson/gpdb,postmind-net/postgres-xl,rvs/gpdb,Postgres-XL/Postgres-XL,lisakowen/gpdb,pavanvd/postgres-xl,lintzc/gpdb,lisakowen/gpdb,rubikloud/gpdb,oberstet/postgres-xl,tangp3/gpdb,ahachete/gpdb,edespino/gpdb,CraigHarris/gpdb,foyzur/gpdb,lisakowen/gpdb,tpostgres-projects/tPostgres,atris/gpdb,arcivanov/postgres-xl
|
8573926253391f103e73c7b4ec77a6e61b662186
|
src/utils.h
|
src/utils.h
|
#pragma once
#include <memory>
#include <cstdio> // fopen, fclose
#include <openssl/evp.h>
#include <openssl/ec.h>
namespace JWTXX
{
namespace Utils
{
struct FileCloser
{
void operator()(FILE* fp) { fclose(fp); }
};
typedef std::unique_ptr<FILE, FileCloser> FilePtr;
struct EVPKeyDeleter
{
void operator()(EVP_PKEY* key) { EVP_PKEY_free(key); }
};
typedef std::unique_ptr<EVP_PKEY, EVPKeyDeleter> EVPKeyPtr;
struct EVPMDCTXDeleter
{
void operator()(EVP_MD_CTX* ctx) { EVP_MD_CTX_destroy(ctx); }
};
typedef std::unique_ptr<EVP_MD_CTX, EVPMDCTXDeleter> EVPMDCTXPtr;
EVPKeyPtr readPEMPrivateKey(const std::string& fileName);
EVPKeyPtr readPEMPublicKey(const std::string& fileName);
std::string OPENSSLError();
}
}
|
#pragma once
#include <memory>
#include <cstdio> // fopen, fclose
#include <openssl/evp.h>
#include <openssl/ec.h>
namespace JWTXX
{
namespace Utils
{
struct EVPKeyDeleter
{
void operator()(EVP_PKEY* key) { EVP_PKEY_free(key); }
};
typedef std::unique_ptr<EVP_PKEY, EVPKeyDeleter> EVPKeyPtr;
struct EVPMDCTXDeleter
{
void operator()(EVP_MD_CTX* ctx) { EVP_MD_CTX_destroy(ctx); }
};
typedef std::unique_ptr<EVP_MD_CTX, EVPMDCTXDeleter> EVPMDCTXPtr;
EVPKeyPtr readPEMPrivateKey(const std::string& fileName);
EVPKeyPtr readPEMPublicKey(const std::string& fileName);
std::string OPENSSLError();
}
}
|
Move file closer out from public.
|
Move file closer out from public.
|
C
|
mit
|
madf/jwtxx,madf/jwtxx,RealImage/jwtxx,RealImage/jwtxx
|
56f322d7e40c891d396ede91242b0c4a05b7e383
|
bst.c
|
bst.c
|
#include "bst.h"
static void BST_Transplant(BST* T, BSTNode* u, BSTNode* v);
struct BSTNode
{
BSTNode* left;
BSTNode* right;
BSTNode* p;
void* k;
};
struct BST
{
BSTNode* root;
};
|
#include "bst.h"
static void BST_Transplant(BST* T, BSTNode* u, BSTNode* v);
struct BSTNode
{
BSTNode* left;
BSTNode* right;
BSTNode* p;
void* k;
};
struct BST
{
BSTNode* root;
};
BST* BST_Create(void)
{
BST* T = (BST* )malloc(sizeof(BST));
T->root = NULL;
return T;
}
|
Add BST Create function implementation
|
Add BST Create function implementation
|
C
|
mit
|
MaxLikelihood/CADT
|
68bf16f8d1e7c8dff8732f8aae4b4b418054216f
|
test/Driver/darwin-asan-nofortify.c
|
test/Driver/darwin-asan-nofortify.c
|
// Make sure AddressSanitizer disables _FORTIFY_SOURCE on Darwin.
// REQUIRES: system-darwin
// RUN: %clang -faddress-sanitizer %s -E -dM -o - | FileCheck %s
// CHECK: #define _FORTIFY_SOURCE 0
|
// Make sure AddressSanitizer disables _FORTIFY_SOURCE on Darwin.
// RUN: %clang -faddress-sanitizer %s -E -dM -target x86_64-darwin - | FileCheck %s
// CHECK: #define _FORTIFY_SOURCE 0
|
Use an explicit target to test that source fortification is off when building for Darwin with -faddress-sanitizer.
|
Use an explicit target to test that source fortification is off when building for Darwin with -faddress-sanitizer.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@164485 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
|
76879c5d5204ad38a36e183d8a03e20d9dc0ae56
|
src/search/util/timeout.h
|
src/search/util/timeout.h
|
/* -*- mode:linux -*- */
/**
* \file timeout.h
*
*
*
* \author Ethan Burns
* \date 2008-12-16
*/
#define _POSIX_C_SOURCE 200112L
void timeout(unsigned int sec);
|
/* -*- mode:linux -*- */
/**
* \file timeout.h
*
*
*
* \author Ethan Burns
* \date 2008-12-16
*/
void timeout(unsigned int sec);
|
Remove the _POSIX_C_SOURCE def that the sparc doesn't like
|
Remove the _POSIX_C_SOURCE def that the sparc doesn't like
|
C
|
mit
|
eaburns/pbnf,eaburns/pbnf,eaburns/pbnf,eaburns/pbnf
|
43afb1bad3a927217f002bb9c3181a59e38839a7
|
daemon/mcbp_validators.h
|
daemon/mcbp_validators.h
|
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2015 Couchbase, 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.
*/
/*
* memcached binary protocol packet validators
*/
#pragma once
#include <memcached/protocol_binary.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef protocol_binary_response_status (*mcbp_package_validate)(void *packet);
/**
* Get the memcached binary protocol validators
*
* @return the array of 0x100 entries for the package
* validators
*/
mcbp_package_validate *get_mcbp_validators(void);
#ifdef __cplusplus
}
#endif
|
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2015 Couchbase, 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.
*/
/*
* memcached binary protocol packet validators
*/
#pragma once
#include <memcached/protocol_binary.h>
typedef protocol_binary_response_status (*mcbp_package_validate)(void *packet);
/**
* Get the memcached binary protocol validators
*
* @return the array of 0x100 entries for the package
* validators
*/
mcbp_package_validate *get_mcbp_validators(void);
|
Drop C linkage for message validators
|
Drop C linkage for message validators
Change-Id: I5a95a6ddd361ee2009ea399479a7df51733af709
Reviewed-on: http://review.couchbase.org/54979
Tested-by: buildbot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Dave Rigby <a09264da4832c7ff1d3bf1608a19f4b870f93750@couchbase.com>
|
C
|
bsd-3-clause
|
daverigby/kv_engine,owendCB/memcached,owendCB/memcached,daverigby/kv_engine,daverigby/kv_engine,daverigby/memcached,couchbase/memcached,owendCB/memcached,owendCB/memcached,couchbase/memcached,daverigby/memcached,daverigby/memcached,couchbase/memcached,daverigby/memcached,daverigby/kv_engine,couchbase/memcached
|
920a78097ae079fc6a77fb808c989078134479d7
|
DeepLinkKit/Categories/NSObject+DPLJSONObject.h
|
DeepLinkKit/Categories/NSObject+DPLJSONObject.h
|
@import Foundation;
@interface NSObject (DPLJSONObject)
/**
Returns a JSON compatible version of the receiver.
@discussion
- NSDictionary and NSArray will call `DPLJSONObject' on all of their items.
- Objects in an NSDictionary not keyed by an NSString will be removed.
- NSNumbers that are NaN or Inf will be represented by a string.
- NSDate objects will be represented as `timeIntervalSinceReferenceDate'.
- JSON incompatible objects will return their description.
- All NSNulls will be removed because who wants an NSNull.
@see NSJSONSerialization
*/
- (id)DPL_JSONObject;
@end
|
@import Foundation;
@interface NSObject (DPLJSONObject)
/**
Returns a JSON compatible version of the receiver.
@discussion
- NSDictionary and NSArray will call `DPLJSONObject' on all of their items.
- Objects in an NSDictionary not keyed by an NSString will be removed.
- NSNumbers that are NaN or Inf will be represented by a string.
- NSDate objects will be represented as `timeIntervalSinceReferenceDate'.
- JSON incompatible objects will return their description.
- All NSNulls will be removed because who wants an NSNull.
@see NSJSONSerialization
*/
- (id)DPL_JSONObject;
@end
|
Fix warning 'Empty paragraph passed to '@discussion' command'
|
Fix warning 'Empty paragraph passed to '@discussion' command'
|
C
|
mit
|
button/DeepLinkKit,button/DeepLinkKit,button/DeepLinkKit,button/DeepLinkKit
|
436ff08a08318e1f6cb9ce5e1b8517b6ea00c0c0
|
tmcd/decls.h
|
tmcd/decls.h
|
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2000-2003 University of Utah and the Flux Group.
* All rights reserved.
*/
#define TBSERVER_PORT 7777
#define TBSERVER_PORT2 14447
#define MYBUFSIZE 2048
#define BOSSNODE_FILENAME "bossnode"
/*
* As the tmcd changes, incompatable changes with older version of
* the software cause problems. Starting with version 3, the client
* will tell tmcd what version they are. If no version is included,
* assume its DEFAULT_VERSION.
*
* Be sure to update the versions as the TMCD changes. Both the
* tmcc and tmcd have CURRENT_VERSION compiled in, so be sure to
* install new versions of each binary when the current version
* changes. libsetup.pm module also encodes a current version, so be
* sure to change it there too!
*
* Note, this is assumed to be an integer. No need for 3.23.479 ...
* NB: See ron/libsetup.pm. That is version 4! I'll merge that in.
*/
#define DEFAULT_VERSION 2
#define CURRENT_VERSION 8
|
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2000-2003 University of Utah and the Flux Group.
* All rights reserved.
*/
#define TBSERVER_PORT 7777
#define TBSERVER_PORT2 14447
#define MYBUFSIZE 2048
#define BOSSNODE_FILENAME "bossnode"
/*
* As the tmcd changes, incompatable changes with older version of
* the software cause problems. Starting with version 3, the client
* will tell tmcd what version they are. If no version is included,
* assume its DEFAULT_VERSION.
*
* Be sure to update the versions as the TMCD changes. Both the
* tmcc and tmcd have CURRENT_VERSION compiled in, so be sure to
* install new versions of each binary when the current version
* changes. libsetup.pm module also encodes a current version, so be
* sure to change it there too!
*
* Note, this is assumed to be an integer. No need for 3.23.479 ...
* NB: See ron/libsetup.pm. That is version 4! I'll merge that in.
*/
#define DEFAULT_VERSION 2
#define CURRENT_VERSION 9
|
Update to version 9 to match libsetup/tmcd.
|
Update to version 9 to match libsetup/tmcd.
|
C
|
agpl-3.0
|
nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome
|
08a9882cc8cbec97947215a7cdb1f60effe82b15
|
server/gwkv_ht_wrapper.h
|
server/gwkv_ht_wrapper.h
|
#ifndef GWKV_HT_WRAPPER
#define GWKV_HT_WRAPPER
#include <stdlib.h>
typedef enum {
GET,
SET
} method;
/* Defines for result codes */
#define STORED 0
#define NOT_STORED 1
#define EXISTS 2
#define NOT_FOUND 3
struct {
method method_type,
const char* key,
size_t key_length,
const char* value,
size_t value_length
} operation;
/**
* Wrapper function to set a value in the hashtable
* Returns either STORED or NOT_STORED (defined above)
*/
int
gwkv_memcache_set (memcached_st *ptr,
const char *key,
size_t key_length,
const char *value,
size_t value_length);
/**
* Wrapper function to read a value from the hashtable
* Returns the data if sucessful, or NULL on error
* These correspond to the EXISTS and NOT_FOUND codes above
*/
char*
gwkv_memcached_get (memcached_st *ptr,
const char *key,
size_t key_length,
size_t *value_length);
#endif
|
#ifndef GWKV_HT_WRAPPER
#define GWKV_HT_WRAPPER
#include <stdlib.h>
#include "../hashtable/hashtable.h"
typedef enum {
GET,
SET
} method;
/* Defines for result codes */
#define STORED 0
#define NOT_STORED 1
#define EXISTS 2
#define NOT_FOUND 3
struct {
method method_type,
const char* key,
size_t key_length,
const char* value,
size_t value_length
} operation;
/**
* Wrapper function to set a value in the hashtable
* Returns either STORED or NOT_STORED (defined above)
*/
int
gwkv_server_set (memcached_st *ptr,
const char *key,
size_t key_length,
const char *value,
size_t value_length);
/**
* Wrapper function to read a value from the hashtable
* Returns the data if sucessful, or NULL on error
* These correspond to the EXISTS and NOT_FOUND codes above
*/
char*
gwkv_server_get (memcached_st *ptr,
const char *key,
size_t key_length,
size_t *value_length);
#endif
|
Change server set/get function names
|
Change server set/get function names
|
C
|
mit
|
gwAdvNet2015/gw-kv-store
|
e54d4a7ec72354285ba4b8202a45693b83b75835
|
common.h
|
common.h
|
#ifndef _COMMON_H
#define _COMMON_H
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#ifdef _LINUX
#include <bsd/string.h>
#endif
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xmlsave.h>
#include <libxml/encoding.h>
#include <libxml/xmlstring.h>
#include <openssl/bio.h>
#include <openssl/evp.h>
#ifndef _READLINE
#include <histedit.h>
#else
#include <readline/readline.h>
#include <readline/history.h>
#endif
#define USAGE "[-k database file] [-p password file] [-m cipher mode] [-b] [-v] [-h] [-d]"
#define VERSION "kc 2.1"
#ifndef _READLINE
const char *el_prompt_null(void);
#endif
const char *prompt_str(void);
int malloc_check(void *);
char *get_random_str(size_t, char);
void version(void);
void quit(int);
char debug;
#endif
|
#ifndef _COMMON_H
#define _COMMON_H
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#ifdef _LINUX
#include <bsd/string.h>
#endif
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xmlsave.h>
#include <libxml/encoding.h>
#include <libxml/xmlstring.h>
#include <openssl/bio.h>
#include <openssl/evp.h>
#ifndef _READLINE
#include <histedit.h>
#else
#include <readline/readline.h>
#include <readline/history.h>
#endif
#define USAGE "[-k database file] [-p password file] [-m cipher mode] [-b] [-v] [-h] [-d]"
#define VERSION "kc 2.1.1"
#ifndef _READLINE
const char *el_prompt_null(void);
#endif
const char *prompt_str(void);
int malloc_check(void *);
char *get_random_str(size_t, char);
void version(void);
void quit(int);
char debug;
#endif
|
Tag 2.1.1 because of the segfault fix.
|
Tag 2.1.1 because of the segfault fix.
|
C
|
bsd-2-clause
|
levaidaniel/kc,levaidaniel/kc,levaidaniel/kc
|
1d80b38e935401e40bdca2f3faaec4aeba77a716
|
src/random.h
|
src/random.h
|
/**
* @file random.h
* @ingroup CppAlgorithms
* @brief Random utility functions.
*
* Copyright (c) 2013 Sebastien Rombauts (sebastien.rombauts@gmail.com)
*
* Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
* or copy at http://opensource.org/licenses/MIT)
*/
/**
* @brief Random utility functions.
*/
class Random
{
public:
/**
* @brief Generate a printable alphanumeric character.
*/
static char GenChar();
/**
* @brief Generate a printable alphanumeric string.
*/
static void GenString(char* str, size_t len);
};
|
/**
* @file random.h
* @ingroup CppAlgorithms
* @brief Random utility functions.
*
* Copyright (c) 2013 Sebastien Rombauts (sebastien.rombauts@gmail.com)
*
* Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
* or copy at http://opensource.org/licenses/MIT)
*/
#include <cstddef> // size_t
/**
* @brief Random utility functions.
*/
class Random
{
public:
/**
* @brief Generate a printable alphanumeric character.
*/
static char GenChar();
/**
* @brief Generate a printable alphanumeric string.
*/
static void GenString(char* str, size_t len);
};
|
Fix Travis build (missing include for size_t)
|
Fix Travis build (missing include for size_t)
|
C
|
mit
|
SRombauts/cpp-algorithms,SRombauts/cpp-algorithms
|
b1321ce850ae77ea8d4a3fc0958ec58b404ec10d
|
chapter3/GameObject.h
|
chapter3/GameObject.h
|
#ifndef __GAME_OBJECT_H__
#define __GAME_OBJECT_H__
#include<iostream>
#include<SDL2/SDL.h>
class GameObject
{
public:
void load(int pX, int pY, int pWidth, int pHeight, std::string pTextureId);
void draw(SDL_Renderer *renderer);
void update();
void clean() { std::cout << "clean game object"; }
protected:
std::string textureId;
int currentFrame;
int currentRow;
int x;
int y;
int width;
int height;
};
#endif
|
#ifndef __GAME_OBJECT_H__
#define __GAME_OBJECT_H__
#include<iostream>
#include<SDL2/SDL.h>
class GameObject
{
public:
virtual void load(int pX, int pY, int pWidth, int pHeight, std::string pTextureId);
virtual void draw(SDL_Renderer *renderer);
virtual void update();
virtual void clean() {};
protected:
std::string textureId;
int currentFrame;
int currentRow;
int x;
int y;
int width;
int height;
};
#endif
|
Include virtual in all methods.
|
Include virtual in all methods.
|
C
|
bsd-2-clause
|
caiotava/SDLBook
|
b01a4463c1dbd4854f9fba47af8fa30394640375
|
TokenArray.h
|
TokenArray.h
|
#ifndef _EXCELFORMUAL_TOKEN_ARRAY_H__
#define _EXCELFORMUAL_TOKEN_ARRAY_H__
#include <vector>
using std::vector;
namespace ExcelFormula{
class Token;
class TokenArray{
public:
TokenArray();
void toVector(vector<Token*>&);
void fromVector(vector<Token*>&);
size_t size() {return m_tokens.size();}
bool isBOF() {return (m_index <= 0)?true:false;}
bool isEOF() {return (m_index >= m_tokens.size())?true:false;}
Token* getCurrent();
Token* getNext();
Token* getPrevious();
Token* add(Token*);
bool moveNext();
void reset(){m_index = 0;}
void releaseAll();
private:
size_t m_index;
vector<Token*> m_tokens;
};
}
#endif
|
#ifndef _EXCELFORMUAL_TOKEN_ARRAY_H__
#define _EXCELFORMUAL_TOKEN_ARRAY_H__
#include <vector>
#include <cstddef>
using std::vector;
namespace ExcelFormula{
class Token;
class TokenArray{
public:
TokenArray();
void toVector(vector<Token*>&);
void fromVector(vector<Token*>&);
size_t size() {return m_tokens.size();}
bool isBOF() {return (m_index <= 0)?true:false;}
bool isEOF() {return (m_index >= m_tokens.size())?true:false;}
Token* getCurrent();
Token* getNext();
Token* getPrevious();
Token* add(Token*);
bool moveNext();
void reset(){m_index = 0;}
void releaseAll();
private:
size_t m_index;
vector<Token*> m_tokens;
};
}
#endif
|
Add missing include for size_t
|
Add missing include for size_t
Fixes compile error:
[...]
g++ -c -g TokenArray.cpp
In file included from TokenArray.cpp:1:0:
TokenArray.h:20:4: error: ‘size_t’ does not name a type
size_t size() {return m_tokens.size();}
^
TokenArray.h:41:4: error: ‘size_t’ does not name a type
size_t m_index;
^
|
C
|
mit
|
lishen2/Excel_formula_parser_cpp
|
a60af963642a31734c0a628fa79090fa5b7c58b2
|
include/libport/unistd.h
|
include/libport/unistd.h
|
#ifndef LIBPORT_UNISTD_H
# define LIBPORT_UNISTD_H
# include <libport/detect-win32.h>
# include <libport/windows.hh> // Get sleep wrapper
# include <libport/config.h>
// This is traditional Unix file.
# ifdef LIBPORT_HAVE_UNISTD_H
# include <unistd.h>
# endif
// OSX does not have O_LARGEFILE. No information was found whether
// some equivalent flag is needed or not. Other projects simply do as
// follows.
# ifndef O_LARGEFILE
# define O_LARGEFILE 0
# endif
// This seems to be its WIN32 equivalent.
// http://msdn2.microsoft.com/en-us/library/ms811896(d=printer).aspx#ucmgch09_topic7.
# if defined WIN32 || defined LIBPORT_WIN32
# include <io.h>
# endif
# ifdef WIN32
# include <direct.h>
extern "C"
{
int chdir (const char* path)
{
return _chdir(path);
}
}
# endif
# if !defined LIBPORT_HAVE_GETCWD
# if defined LIBPORT_HAVE__GETCWD
# define getcwd _getcwd
# elif defined LIBPORT_URBI_ENV_AIBO
// Will be defined in libport/unistd.cc.
# else
# error I need either getcwd() or _getcwd()
# endif
# endif
#endif // !LIBPORT_UNISTD_H
|
#ifndef LIBPORT_UNISTD_H
# define LIBPORT_UNISTD_H
# include <libport/detect-win32.h>
# include <libport/windows.hh> // Get sleep wrapper
# include <libport/config.h>
// This is traditional Unix file.
# ifdef LIBPORT_HAVE_UNISTD_H
# include <unistd.h>
# endif
// OSX does not have O_LARGEFILE. No information was found whether
// some equivalent flag is needed or not. Other projects simply do as
// follows.
# ifndef O_LARGEFILE
# define O_LARGEFILE 0
# endif
// This seems to be its WIN32 equivalent.
// http://msdn2.microsoft.com/en-us/library/ms811896(d=printer).aspx#ucmgch09_topic7.
# if defined WIN32 || defined LIBPORT_WIN32
# include <io.h>
# endif
# ifdef WIN32
# include <direct.h>
# define chdir _chdir
# endif
# if !defined LIBPORT_HAVE_GETCWD
# if defined LIBPORT_HAVE__GETCWD
# define getcwd _getcwd
# elif defined LIBPORT_URBI_ENV_AIBO
// Will be defined in libport/unistd.cc.
# else
# error I need either getcwd() or _getcwd()
# endif
# endif
#endif // !LIBPORT_UNISTD_H
|
Define chdir as a macro.
|
Define chdir as a macro.
The previous definition was uselessly complicated, and lacked the
proper API declaration.
* include/libport/unistd.h (chdir): Define as "_chdir".
|
C
|
bsd-3-clause
|
aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport
|
5c43c3ef287b4aebdddbbf66a6afcdd4d2c47124
|
TeamSnapSDK/SDK/CollectionJSON/TSDKCollectionJSON.h
|
TeamSnapSDK/SDK/CollectionJSON/TSDKCollectionJSON.h
|
//
// TSDKCollectionJSON.h
// TeamSnapSDK
//
// Created by Jason Rahaim on 1/10/14.
// Copyright (c) 2014 TeamSnap. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface TSDKCollectionJSON : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) NSURL *_Nullable href;
@property (nonatomic, strong) NSString *_Nullable version;
@property (nonatomic, strong) NSString *_Nullable type;
@property (nonatomic, strong) NSString *_Nullable rel;
@property (nonatomic, strong) NSString *_Nullable errorTitle;
@property (nonatomic, strong) NSString *_Nullable errorMessage;
@property (nonatomic, assign) NSInteger errorCode;
@property (nonatomic, strong) NSMutableDictionary *_Nullable links;
@property (nonatomic, strong) NSMutableDictionary *_Nullable data;
@property (nonatomic, strong) NSMutableDictionary *_Nullable commands;
@property (nonatomic, strong) NSMutableDictionary *_Nullable queries;
@property (nonatomic, strong) id _Nullable collection;
+(NSDictionary *_Nullable)dictionaryToCollectionJSON:(NSDictionary *_Nonnull)dictionary;
- (instancetype _Nullable)initWithCoder:(NSCoder *_Nonnull)aDecoder;
- (instancetype _Nullable)initWithJSON:(NSDictionary *_Nonnull)JSON;
+ (instancetype _Nullable)collectionJSONForEncodedData:(NSData *_Nonnull)objectData;
- (NSString *_Nullable)getObjectiveCHeaderSkeleton;
- (NSData *_Nonnull)dataEncodedForSave;
@end
|
//
// TSDKCollectionJSON.h
// TeamSnapSDK
//
// Created by Jason Rahaim on 1/10/14.
// Copyright (c) 2014 TeamSnap. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface TSDKCollectionJSON : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) NSURL *_Nullable href;
@property (nonatomic, strong) NSString *_Nullable version;
@property (nonatomic, strong) NSString *_Nullable type;
@property (nonatomic, strong) NSString *_Nullable rel;
@property (nonatomic, strong) NSString *_Nullable errorTitle;
@property (nonatomic, strong) NSString *_Nullable errorMessage;
@property (nonatomic, assign) NSInteger errorCode;
@property (nonatomic, strong) NSMutableDictionary *_Nullable links;
@property (nonatomic, strong) NSMutableDictionary *_Nullable data;
@property (nonatomic, strong) NSMutableDictionary *_Nullable commands;
@property (nonatomic, strong) NSMutableDictionary *_Nullable queries;
@property (nonatomic, strong) NSMutableArray <TSDKCollectionJSON *> *_Nullable collection;
+ (NSDictionary *_Nullable)dictionaryToCollectionJSON:(NSDictionary *_Nonnull)dictionary;
- (instancetype _Nullable)initWithCoder:(NSCoder *_Nonnull)aDecoder;
- (instancetype _Nullable)initWithJSON:(NSDictionary *_Nonnull)JSON;
+ (instancetype _Nullable)collectionJSONForEncodedData:(NSData *_Nonnull)objectData;
- (NSString *_Nullable)getObjectiveCHeaderSkeleton;
- (NSData *_Nonnull)dataEncodedForSave;
@end
|
Add type to Collection Property
|
Add type to Collection Property
|
C
|
mit
|
teamsnap/teamsnap-SDK-iOS,teamsnap/teamsnap-SDK-iOS,teamsnap/teamsnap-SDK-iOS
|
f2c9e4ef2fd88ddebec6d885eb6a9b40efdea4de
|
simple-examples/static.c
|
simple-examples/static.c
|
#include <stdio.h>
/* Static functions and static global variables are only visible in
* the file that it is declared in. Static variables inside of a
* function have a different meaning and is described below */
void foo()
{
int x = 0;
static int staticx = 0; // initialized once; keeps value between invocations of foo().
x++;
staticx++;
printf("x=%d\n", x);
printf("staticx=%d\n", staticx);
}
int main(void)
{
for(int i=0; i<10; i++)
foo();
}
|
// Scott Kuhl
#include <stdio.h>
/* Static functions and static global variables are only visible in
* the file that it is declared in. Static variables inside of a
* function have a different meaning and is described below */
void foo()
{
int x = 0;
static int staticx = 0; // initialized once; keeps value between invocations of foo().
x++;
staticx++;
printf("x=%d\n", x);
printf("staticx=%d\n", staticx);
}
int main(void)
{
for(int i=0; i<10; i++)
foo();
}
|
Add name to top of file.
|
Add name to top of file.
|
C
|
unlicense
|
skuhl/sys-prog-examples,skuhl/sys-prog-examples,skuhl/sys-prog-examples
|
ce94377523f8e0aeff726e30222974022dfaae59
|
src/config.h
|
src/config.h
|
/******************************
** Tsunagari Tile Engine **
** config.h **
** Copyright 2011 OmegaSDG **
******************************/
#ifndef CONFIG_H
#define CONFIG_H
// === Default Configuration Settings ===
/* Tsunagari config file. -- Command Line */
#define CLIENT_CONF_FILE "./client.conf"
/* Error verbosity level. -- Command Line */
#define MESSAGE_MODE MM_DEBUG
/* Milliseconds of button down before starting persistent input in
roguelike movement mode. -- Move to World Descriptor */
#define ROGUELIKE_PERSIST_DELAY_INIT 500
/* Milliseconds between persistent input sends in roguelike movement
mode. -- Move to World Descriptor */
#define ROGUELIKE_PERSIST_DELAY_CONSECUTIVE 100
/* Time to live in seconds for empty resource cache entries before they
are deleted. -- Command Line */
#define CACHE_EMPTY_TTL 300
// ===
#endif
|
/******************************
** Tsunagari Tile Engine **
** config.h **
** Copyright 2011 OmegaSDG **
******************************/
#ifndef CONFIG_H
#define CONFIG_H
// === Default Configuration Settings ===
/* Tsunagari config file. -- Command Line */
#define CLIENT_CONF_FILE "./client.conf"
/* Error verbosity level. -- Command Line */
#define MESSAGE_MODE MM_DEBUG
/* Milliseconds of button down before starting persistent input in
roguelike movement mode. -- Move to World Descriptor */
#define ROGUELIKE_PERSIST_DELAY_INIT 500
/* Milliseconds between persistent input sends in roguelike movement
mode. -- Move to World Descriptor */
#define ROGUELIKE_PERSIST_DELAY_CONSECUTIVE 100
/* Time to live in seconds for empty resource cache entries before they
are deleted. -- Command Line */
#define CACHE_EMPTY_TTL 300
// ===
// === Compiler Specific Defines ===
/* Fix snprintf for VisualC++. */
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
// ===
#endif
|
Fix snprintf on VisualC++ with a conditional define.
|
Fix snprintf on VisualC++ with a conditional define.
|
C
|
mit
|
pmer/TsunagariC,pariahsoft/Tsunagari,pariahsoft/Tsunagari,pariahsoft/TsunagariC,pariahsoft/Tsunagari,pariahsoft/Tsunagari,pmer/TsunagariC,pariahsoft/TsunagariC,pariahsoft/TsunagariC,pmer/TsunagariC
|
c54058d7b015ad60403f7996a98ba08dc30bf868
|
src/importers/kredbimporter.h
|
src/importers/kredbimporter.h
|
/***************************************************************************
* Copyright © 2004 Jason Kivlighn <jkivlighn@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef KREDBIMPORTER_H
#define KREDBIMPORTER_H
#include <QString>
#include "baseimporter.h"
/** Class to import recipes from any other Krecipes database backend.
* Note: Though independent of database type, the two databases must have the same structure (i.e. be the same version)
* @author Jason Kivlighn
*/
class KreDBImporter : public BaseImporter
{
public:
KreDBImporter( const QString &dbType, const QString &host = QString(), const QString &user = QString(), const QString &pass = QString(), int port = 0 );
virtual ~KreDBImporter();
private:
virtual void parseFile( const QString &file_or_table );
QString dbType;
QString host;
QString user;
QString pass;
int port;
};
#endif //KREDBIMPORTER_H
|
/***************************************************************************
* Copyright © 2004 Jason Kivlighn <jkivlighn@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef KREDBIMPORTER_H
#define KREDBIMPORTER_H
#include <QString>
#include "baseimporter.h"
/** Class to import recipes from any other Krecipes database backend.
* Note: Though independent of database type, the two databases must have the same structure (i.e. be the same version)
* @author Jason Kivlighn
*/
class KreDBImporter : public BaseImporter
{
public:
explicit KreDBImporter( const QString &dbType, const QString &host = QString(), const QString &user = QString(), const QString &pass = QString(), int port = 0 );
virtual ~KreDBImporter();
private:
virtual void parseFile( const QString &file_or_table );
QString dbType;
QString host;
QString user;
QString pass;
int port;
};
#endif //KREDBIMPORTER_H
|
Fix Krazy warnings: explicit - KreDBImporter
|
Fix Krazy warnings: explicit - KreDBImporter
svn path=/trunk/extragear/utils/krecipes/; revision=1119833
|
C
|
lgpl-2.1
|
eliovir/krecipes,eliovir/krecipes,eliovir/krecipes,eliovir/krecipes
|
c1f31e37e3ed046237c04ef0dddcb6587d4f88fb
|
src/libdpdkif/configuration.h
|
src/libdpdkif/configuration.h
|
/*
* Configurables. Adjust these to be appropriate for your system.
*/
/* change blacklist parameters (-b) if necessary */
static const char *ealargs[] = {
"if_dpdk",
"-b 00:00:03.0",
"-c 1",
"-n 1",
};
/* change PORTID to the one your want to use */
#define IF_PORTID 0
/* change to the init method of your NIC driver */
#ifndef PMD_INIT
#define PMD_INIT rte_pmd_init_all
#endif
/* Receive packets in bursts of 16 per read */
#define MAX_PKT_BURST 16
|
/*
* Configurables. Adjust these to be appropriate for your system.
*/
/* change blacklist parameters (-b) if necessary
* If you have more than one interface, you will likely want to blacklist
* at least one of them.
*/
static const char *ealargs[] = {
"if_dpdk",
"-b 00:00:03.0",
"-c 1",
"-n 1",
};
/* change PORTID to the one your want to use */
#define IF_PORTID 0
/* change to the init method of your NIC driver */
#ifndef PMD_INIT
#define PMD_INIT rte_pmd_init_all
#endif
/* Receive packets in bursts of 16 per read */
#define MAX_PKT_BURST 16
|
Add note about blacklisting interfaces
|
Add note about blacklisting interfaces
|
C
|
bsd-2-clause
|
jqyy/drv-netif-dpdk,jqyy/drv-netif-dpdk
|
600d895282d9e8fe6d2505902ec3e3970a9e19f7
|
src/mixal_parser_lib/include/mixal/parser.h
|
src/mixal_parser_lib/include/mixal/parser.h
|
#pragma once
#include <mixal/config.h>
#include <mixal/parsers_utils.h>
namespace mixal {
class MIXAL_PARSER_LIB_EXPORT IParser
{
public:
std::size_t parse_stream(std::string_view str, std::size_t offset = 0);
protected:
~IParser() = default;
virtual void do_clear() = 0;
virtual std::size_t do_parse_stream(std::string_view str, std::size_t offset) = 0;
};
inline std::size_t IParser::parse_stream(std::string_view str, std::size_t offset /*= 0*/)
{
do_clear();
if (offset > str.size())
{
return InvalidStreamPosition();
}
const auto pos = do_parse_stream(str, offset);
if (IsInvalidStreamPosition(pos))
{
// Parser is in undetermined state.
// Put back in default state for free
do_clear();
}
return pos;
}
} // namespace mixal
|
#pragma once
#include <mixal/config.h>
#include <mixal/parsers_utils.h>
namespace mixal {
class MIXAL_PARSER_LIB_EXPORT IParser
{
public:
std::size_t parse_stream(std::string_view str, std::size_t offset = 0);
bool is_valid() const;
std::string_view str() const;
protected:
IParser() = default;
~IParser() = default;
virtual void do_clear() = 0;
virtual std::size_t do_parse_stream(std::string_view str, std::size_t offset) = 0;
private:
void clear();
private:
std::string_view str_;
bool is_valid_{false};
};
inline std::size_t IParser::parse_stream(std::string_view str, std::size_t offset /*= 0*/)
{
clear();
if (offset > str.size())
{
return InvalidStreamPosition();
}
const auto pos = do_parse_stream(str, offset);
if (IsInvalidStreamPosition(pos))
{
// Parser is in undetermined state.
// Put back in default state for free
clear();
return InvalidStreamPosition();
}
is_valid_ = true;
str_ = str.substr(offset, pos - offset);
return pos;
}
inline void IParser::clear()
{
is_valid_ = false;
do_clear();
}
inline bool IParser::is_valid() const
{
return is_valid_;
}
inline std::string_view IParser::str() const
{
return str_;
}
} // namespace mixal
|
Extend IParser interface: remember parse state - succesfull or not; what part of string was parsed
|
Extend IParser interface: remember parse state - succesfull or not; what part of string was parsed
|
C
|
mit
|
grishavanika/mix,grishavanika/mix,grishavanika/mix
|
2924da319e5a0d76d1ce8462c7029e6395884662
|
test/CodeGen/2010-07-14-overconservative-align.c
|
test/CodeGen/2010-07-14-overconservative-align.c
|
// RUN: %clang_cc1 %s -triple x86_64-apple-darwin -emit-llvm -o - | FileCheck %s
// PR 5995
struct s {
int word;
struct {
int filler __attribute__ ((aligned (8)));
};
};
void func (struct s *s)
{
// CHECK: load %struct.s** %s.addr, align 8
s->word = 0;
}
|
// RUN: %clang_cc1 %s -triple x86_64-apple-darwin -emit-llvm -o - | FileCheck %s
// PR 5995
struct s {
int word;
struct {
int filler __attribute__ ((aligned (8)));
};
};
void func (struct s *s)
{
// CHECK: load %struct.s**{{.*}}align 8
s->word = 0;
}
|
Rewrite matching line to be friendlier to misc buildbots.
|
Rewrite matching line to be friendlier to misc buildbots.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@136168 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
|
82050d5da0e4be70b0131eb996873e1f686b8d68
|
ep_testsuite.h
|
ep_testsuite.h
|
#ifndef EP_TESTSUITE_H
#define EP_TESTSUITE_H 1
#include <memcached/engine.h>
#include <memcached/engine_testapp.h>
#ifdef __cplusplus
extern "C" {
#endif
MEMCACHED_PUBLIC_API
engine_test_t* get_tests(void);
MEMCACHED_PUBLIC_API
bool setup_suite(struct test_harness *th);
#ifdef __cplusplus
}
#endif
#endif
|
#ifndef EP_TESTSUITE_H
#define EP_TESTSUITE_H 1
#include <memcached/engine.h>
#include <memcached/engine_testapp.h>
#ifdef __cplusplus
extern "C" {
#endif
MEMCACHED_PUBLIC_API
engine_test_t* get_tests(void);
MEMCACHED_PUBLIC_API
bool setup_suite(struct test_harness *th);
MEMCACHED_PUBLIC_API
bool teardown_suite();
enum test_result prepare(engine_test_t *test);
void cleanup(engine_test_t *test, enum test_result result);
#ifdef __cplusplus
}
#endif
#endif
|
Fix test suite compilation errors
|
Fix test suite compilation errors
This fixes some missing function declaration errors:
CXX ep_testsuite_la-ep_testsuite.lo
cc1plus: warnings being treated as errors
ep_testsuite.cc: In function ‘test_result prepare(engine_test_t*)’:
ep_testsuite.cc:5425: error: no previous declaration for ‘test_result prepare(engine_test_t*)’ [-Wmissing-declarations]
ep_testsuite.cc: In function ‘void cleanup(engine_test_t*, test_result)’:
ep_testsuite.cc:5447: error: no previous declaration for ‘void cleanup(engine_test_t*, test_result)’ [-Wmissing-declarations]
ep_testsuite.cc: In function ‘bool teardown_suite()’:
ep_testsuite.cc:5965: error: no previous declaration for ‘bool teardown_suite()’ [-Wmissing-declarations]
make[2]: *** [ep_testsuite_la-ep_testsuite.lo] Error 1
Change-Id: I2363240c962a09740301a4a85f0559bc04981bcd
Reviewed-on: http://review.couchbase.org/7913
Tested-by: Filipe David Borba Manana <e0fcd583df77ec6c08e6d1257619cc1216ddc994@gmail.com>
Reviewed-by: Dustin Sallings <1c08efb9b3965701be9d700d9a6f481f1ffec3ea@spy.net>
|
C
|
apache-2.0
|
zbase/ep-engine,daverigby/kv_engine,couchbase/ep-engine,abhinavdangeti/ep-engine,hisundar/ep-engine,couchbaselabs/ep-engine,owendCB/ep-engine,daverigby/kv_engine,jimwwalker/ep-engine,abhinavdangeti/ep-engine,couchbaselabs/ep-engine,couchbase/ep-engine,daverigby/kv_engine,sriganes/ep-engine,jimwwalker/ep-engine,couchbase/ep-engine,membase/ep-engine,daverigby/ep-engine,abhinavdangeti/ep-engine,zbase/ep-engine,sriganes/ep-engine,teligent-ru/ep-engine,membase/ep-engine,owendCB/ep-engine,jimwwalker/ep-engine,membase/ep-engine,teligent-ru/ep-engine,owendCB/ep-engine,abhinavdangeti/ep-engine,zbase/ep-engine,hisundar/ep-engine,couchbaselabs/ep-engine,jimwwalker/ep-engine,teligent-ru/ep-engine,hisundar/ep-engine,daverigby/ep-engine,daverigby/ep-engine,daverigby/kv_engine,zbase/ep-engine,zbase/ep-engine,sriganes/ep-engine,membase/ep-engine,couchbase/ep-engine,owendCB/ep-engine,daverigby/ep-engine,sriganes/ep-engine,teligent-ru/ep-engine,couchbaselabs/ep-engine,couchbaselabs/ep-engine,abhinavdangeti/ep-engine,hisundar/ep-engine
|
33b703740fd3ade5192bb61492b14cf5cfcebc2c
|
InputState.h
|
InputState.h
|
#ifndef INPUTSTATE_H
#define INPUTSTATE_H
#include <SDL2/SDL.h>
#undef main
#include <map>
class InputState
{
public:
enum KeyFunction { KF_EXIT, KF_FORWARDS, KF_BACKWARDS, KF_ROTATE_SUN };
InputState();
void readInputState();
bool getKeyState(KeyFunction f);
int getAbsoluteMouseX() { return mouse_x; };
int getAbsoluteMouseY() { return mouse_y; };
float getMouseX() { return (float)mouse_x / (float)w; };
float getMouseY() { return (float)mouse_y / (float)h; };
int w, h;
int mouse_x, mouse_y;
private:
Uint8 *keys;
Uint8 key_function_to_keycode[3];
};
#endif
|
#ifndef INPUTSTATE_H
#define INPUTSTATE_H
#include <SDL2/SDL.h>
#undef main
#include <map>
class InputState
{
public:
enum KeyFunction { KF_EXIT, KF_FORWARDS, KF_BACKWARDS, KF_ROTATE_SUN };
InputState();
void readInputState();
bool getKeyState(KeyFunction f);
int getAbsoluteMouseX() { return mouse_x; };
int getAbsoluteMouseY() { return mouse_y; };
float getMouseX() { return (float)mouse_x / (float)w; };
float getMouseY() { return (float)mouse_y / (float)h; };
int w, h;
int mouse_x, mouse_y;
private:
Uint8 *keys;
Uint8 key_function_to_keycode[4];
};
#endif
|
Fix InputSize symbol array size.
|
Fix InputSize symbol array size.
|
C
|
mit
|
pstiasny/derpengine,pstiasny/derpengine
|
11d45b0090be38423587ef8d1a0215937932223e
|
src/memory.c
|
src/memory.c
|
/*
* Copyright (c) 2009-2012 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2011-2012 Basile Starynkevitch <basile@starynkevitch.net>
*
* Jansson is free software; you can redistribute it and/or modify it
* under the terms of the MIT license. See LICENSE for details.
*/
#include <stdlib.h>
#include <string.h>
#include "jansson.h"
#include "jansson_private.h"
/* memory function pointers */
static json_malloc_t do_malloc = malloc;
static json_free_t do_free = free;
void *jsonp_malloc(size_t size)
{
if(!size)
return NULL;
return (*do_malloc)(size);
}
void jsonp_free(void *ptr)
{
if(!ptr)
return;
(*do_free)(ptr);
}
char *jsonp_strdup(const char *str)
{
char *new_str;
new_str = jsonp_malloc(strlen(str) + 1);
if(!new_str)
return NULL;
strcpy(new_str, str);
return new_str;
}
void json_set_alloc_funcs(json_malloc_t malloc_fn, json_free_t free_fn)
{
do_malloc = malloc_fn;
do_free = free_fn;
}
|
/*
* Copyright (c) 2009-2012 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2011-2012 Basile Starynkevitch <basile@starynkevitch.net>
*
* Jansson is free software; you can redistribute it and/or modify it
* under the terms of the MIT license. See LICENSE for details.
*/
#include <stdlib.h>
#include <string.h>
#include "jansson.h"
#include "jansson_private.h"
/* memory function pointers */
static json_malloc_t do_malloc = malloc;
static json_free_t do_free = free;
void *jsonp_malloc(size_t size)
{
if(!size)
return NULL;
return (*do_malloc)(size);
}
void jsonp_free(void *ptr)
{
if(!ptr)
return;
(*do_free)(ptr);
}
char *jsonp_strdup(const char *str)
{
char *new_str;
size_t len;
len = strlen(str);
if(len == (size_t)-1)
return NULL;
new_str = jsonp_malloc(len + 1);
if(!new_str)
return NULL;
strcpy(new_str, str);
return new_str;
}
void json_set_alloc_funcs(json_malloc_t malloc_fn, json_free_t free_fn)
{
do_malloc = malloc_fn;
do_free = free_fn;
}
|
Fix integer overflow in jsonp_strdup()
|
Fix integer overflow in jsonp_strdup()
Fixes #129.
|
C
|
mit
|
AmesianX/jansson,markalanj/jansson,Vorne/jansson,OlehKulykov/jansson,bstarynk/jansson,simonfojtu/FireSight,markalanj/jansson,firepick1/jansson,chrullrich/jansson,Mephistophiles/jansson,markalanj/jansson,firepick-delta/FireSight,liu3tao/jansson,rogerz/jansson,firepick1/FireSight,liu3tao/jansson,firepick-delta/FireSight,simonfojtu/FireSight,Mephistophiles/jansson,simonfojtu/FireSight,attie/jansson,rogerz/jansson,akheron/jansson,firepick1/FireSight,slackner/jansson,wirebirdlabs/featherweight-jansson,slackner/jansson,firepick-delta/FireSight,OlehKulykov/jansson,wirebirdlabs/featherweight-jansson,attie/jansson,npmccallum/jansson,akheron/jansson,rogerz/jansson,firepick1/jansson,npmccallum/jansson,firepick1/jansson,chrullrich/jansson,bstarynk/jansson,Vorne/jansson,akheron/jansson,AmesianX/jansson,rogerz/jansson,bstarynk/jansson,firepick1/FireSight
|
8f020cf00dff0ae6d40f68ba7f901c1c0f784093
|
ui/base/ime/character_composer.h
|
ui/base/ime/character_composer.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 UI_BASE_IME_CHARACTER_COMPOSER_H_
#define UI_BASE_IME_CHARACTER_COMPOSER_H_
#pragma once
#include <vector>
#include "base/basictypes.h"
#include "base/string_util.h"
namespace ui {
// A class to recognize compose and dead key sequence.
// Outputs composed character.
//
// TODO(hashimoto): support unicode character composition starting with
// Ctrl-Shift-U. http://crosbug.com/15925
class CharacterComposer {
public:
CharacterComposer();
~CharacterComposer();
void Reset();
// Filters keypress.
// Returns true if the keypress is recognized as a part of composition
// sequence.
bool FilterKeyPress(unsigned int keycode);
// Returns a string consisting of composed character.
// Empty string is returned when there is no composition result.
const string16& composed_character() const {
return composed_character_;
}
private:
// Remembers keypresses previously filtered.
std::vector<unsigned int> compose_buffer_;
// A string representing the composed character.
string16 composed_character_;
DISALLOW_COPY_AND_ASSIGN(CharacterComposer);
};
} // namespace ui
#endif // UI_BASE_IME_CHARACTER_COMPOSER_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 UI_BASE_IME_CHARACTER_COMPOSER_H_
#define UI_BASE_IME_CHARACTER_COMPOSER_H_
#pragma once
#include <vector>
#include "base/basictypes.h"
#include "base/string_util.h"
#include "ui/base/ui_export.h"
namespace ui {
// A class to recognize compose and dead key sequence.
// Outputs composed character.
//
// TODO(hashimoto): support unicode character composition starting with
// Ctrl-Shift-U. http://crosbug.com/15925
class UI_EXPORT CharacterComposer {
public:
CharacterComposer();
~CharacterComposer();
void Reset();
// Filters keypress.
// Returns true if the keypress is recognized as a part of composition
// sequence.
bool FilterKeyPress(unsigned int keycode);
// Returns a string consisting of composed character.
// Empty string is returned when there is no composition result.
const string16& composed_character() const {
return composed_character_;
}
private:
// Remembers keypresses previously filtered.
std::vector<unsigned int> compose_buffer_;
// A string representing the composed character.
string16 composed_character_;
DISALLOW_COPY_AND_ASSIGN(CharacterComposer);
};
} // namespace ui
#endif // UI_BASE_IME_CHARACTER_COMPOSER_H_
|
Fix link error when component=shared_library is set
|
Fix link error when component=shared_library is set
BUG=103789
TEST=Manual
Review URL: http://codereview.chromium.org/8515013
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@109554 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
keishi/chromium,chuan9/chromium-crosswalk,ondra-novak/chromium.src,Jonekee/chromium.src,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,keishi/chromium,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,robclark/chromium,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,ChromiumWebApps/chromium,patrickm/chromium.src,ondra-novak/chromium.src,rogerwang/chromium,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,littlstar/chromium.src,dednal/chromium.src,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,ondra-novak/chromium.src,Jonekee/chromium.src,Jonekee/chromium.src,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,axinging/chromium-crosswalk,patrickm/chromium.src,Chilledheart/chromium,keishi/chromium,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,Just-D/chromium-1,rogerwang/chromium,hujiajie/pa-chromium,robclark/chromium,anirudhSK/chromium,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,M4sse/chromium.src,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,robclark/chromium,dednal/chromium.src,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,M4sse/chromium.src,Chilledheart/chromium,bright-sparks/chromium-spacewalk,Just-D/chromium-1,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,robclark/chromium,markYoungH/chromium.src,littlstar/chromium.src,fujunwei/chromium-crosswalk,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,rogerwang/chromium,dednal/chromium.src,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,rogerwang/chromium,zcbenz/cefode-chromium,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,ondra-novak/chromium.src,dednal/chromium.src,anirudhSK/chromium,littlstar/chromium.src,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,zcbenz/cefode-chromium,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,markYoungH/chromium.src,Just-D/chromium-1,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,hujiajie/pa-chromium,hujiajie/pa-chromium,robclark/chromium,anirudhSK/chromium,Just-D/chromium-1,chuan9/chromium-crosswalk,dushu1203/chromium.src,Just-D/chromium-1,Jonekee/chromium.src,ondra-novak/chromium.src,dednal/chromium.src,axinging/chromium-crosswalk,Jonekee/chromium.src,nacl-webkit/chrome_deps,rogerwang/chromium,timopulkkinen/BubbleFish,ondra-novak/chromium.src,dushu1203/chromium.src,ltilve/chromium,mogoweb/chromium-crosswalk,robclark/chromium,keishi/chromium,krieger-od/nwjs_chromium.src,rogerwang/chromium,nacl-webkit/chrome_deps,patrickm/chromium.src,patrickm/chromium.src,axinging/chromium-crosswalk,ChromiumWebApps/chromium,dushu1203/chromium.src,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,ltilve/chromium,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,dushu1203/chromium.src,junmin-zhu/chromium-rivertrail,littlstar/chromium.src,dednal/chromium.src,keishi/chromium,M4sse/chromium.src,dushu1203/chromium.src,hujiajie/pa-chromium,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,anirudhSK/chromium,ondra-novak/chromium.src,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,littlstar/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,littlstar/chromium.src,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,zcbenz/cefode-chromium,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,zcbenz/cefode-chromium,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,dushu1203/chromium.src,littlstar/chromium.src,junmin-zhu/chromium-rivertrail,Pluto-tv/chromium-crosswalk,robclark/chromium,hgl888/chromium-crosswalk,robclark/chromium,krieger-od/nwjs_chromium.src,ltilve/chromium,anirudhSK/chromium,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,hujiajie/pa-chromium,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,rogerwang/chromium,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,hujiajie/pa-chromium,dushu1203/chromium.src,jaruba/chromium.src,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,dednal/chromium.src,Fireblend/chromium-crosswalk,rogerwang/chromium,dednal/chromium.src,ChromiumWebApps/chromium,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,ltilve/chromium,robclark/chromium,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,keishi/chromium,pozdnyakov/chromium-crosswalk,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,robclark/chromium,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,littlstar/chromium.src,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,jaruba/chromium.src,ltilve/chromium,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,anirudhSK/chromium,krieger-od/nwjs_chromium.src,keishi/chromium,axinging/chromium-crosswalk,anirudhSK/chromium,keishi/chromium,axinging/chromium-crosswalk,ltilve/chromium,Jonekee/chromium.src,anirudhSK/chromium,anirudhSK/chromium,ChromiumWebApps/chromium,markYoungH/chromium.src,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,jaruba/chromium.src,Fireblend/chromium-crosswalk,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,junmin-zhu/chromium-rivertrail,ltilve/chromium,markYoungH/chromium.src,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,timopulkkinen/BubbleFish,Chilledheart/chromium,Chilledheart/chromium,markYoungH/chromium.src,M4sse/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,rogerwang/chromium,dushu1203/chromium.src,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,jaruba/chromium.src,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,Chilledheart/chromium,keishi/chromium,patrickm/chromium.src,patrickm/chromium.src,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,keishi/chromium,ltilve/chromium,jaruba/chromium.src,dushu1203/chromium.src,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,keishi/chromium,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,dednal/chromium.src,Jonekee/chromium.src
|
580305a8cda0cb85ee837cf8d8a15ee80ba0c41d
|
cint/include/iosfwd.h
|
cint/include/iosfwd.h
|
#ifndef G__IOSFWD_H
#define G__IOSFWD_H
#include <iostream.h>
typedef basic_streambuf<char, char_traits<char> > streambuf;
#endif
|
#ifndef G__IOSFWD_H
#define G__IOSFWD_H
#include <iostream.h>
#endif
|
Undo change proposed by Philippe. Too many side effects.
|
Undo change proposed by Philippe. Too many side effects.
git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@5468 27541ba8-7e3a-0410-8455-c3a389f83636
|
C
|
lgpl-2.1
|
dawehner/root,dawehner/root,dawehner/root,bbannier/ROOT,bbannier/ROOT,dawehner/root,dawehner/root,bbannier/ROOT,bbannier/ROOT,dawehner/root,bbannier/ROOT,dawehner/root,bbannier/ROOT,dawehner/root,bbannier/ROOT
|
f3d275984b116f79fbb8568e72d1707ef12230c5
|
unix/image.c
|
unix/image.c
|
// 13 september 2016
#include "uipriv_unix.h"
struct uiImage {
uiUnixControl c;
GtkWidget *widget;
};
uiUnixControlAllDefaults(uiImage)
uiImage *uiNewImage(const char *filename)
{
uiImage *img;
uiUnixNewControl(uiImage, img);
img->widget = gtk_image_new_from_file(filename);
return img;
}
|
// 13 september 2016
#include "uipriv_unix.h"
struct uiImage {
uiUnixControl c;
GtkWidget *widget;
};
uiUnixControlAllDefaults(uiImage)
void uiImageSetSize(uiImage *i, unsigned int width, unsigned int height)
{
GdkPixbuf *pixbuf;
pixbuf = gtk_image_get_pixbuf(GTK_IMAGE(i->widget));
pixbuf = gdk_pixbuf_scale_simple(pixbuf,
width,
height,
GDK_INTERP_BILINEAR);
gtk_image_set_from_pixbuf(GTK_IMAGE(i->widget), pixbuf);
g_object_unref(pixbuf);
}
void uiImageGetSize(uiImage *i, unsigned int *width, unsigned int *height)
{
GdkPixbuf *pixbuf;
pixbuf = gtk_image_get_pixbuf(GTK_IMAGE(i->widget));
*width = gdk_pixbuf_get_width(pixbuf);
*height = gdk_pixbuf_get_height(pixbuf);
}
uiImage *uiNewImage(const char *filename)
{
uiImage *img;
uiUnixNewControl(uiImage, img);
img->widget = gtk_image_new_from_file(filename);
return img;
}
|
Implement getting and setting uiImage size in Gtk
|
Implement getting and setting uiImage size in Gtk
|
C
|
mit
|
sclukey/libui,sclukey/libui
|
af7c239ac6629f7bd102b3e648c0dd86c2054407
|
os/gl/gl_context_nsgl.h
|
os/gl/gl_context_nsgl.h
|
// LAF OS Library
// Copyright (C) 2022 Igara Studio S.A.
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef OS_GL_CONTEXT_NSGL_INCLUDED
#define OS_GL_CONTEXT_NSGL_INCLUDED
#pragma once
#include "os/gl/gl_context.h"
namespace os {
class GLContextNSGL : public GLContext {
public:
GLContextNSGL();
~GLContextNSGL();
void setView(id view);
bool isValid() override;
bool createGLContext() override;
void destroyGLContext() override;
void makeCurrent() override;
void swapBuffers() override;
id nsglContext() {
return m_nsgl;
}
private:
id m_nsgl = nil; // NSOpenGLContext
id m_view = nil; // NSView
};
} // namespace os
#endif
|
// LAF OS Library
// Copyright (C) 2022 Igara Studio S.A.
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef OS_GL_CONTEXT_NSGL_INCLUDED
#define OS_GL_CONTEXT_NSGL_INCLUDED
#pragma once
#include "os/gl/gl_context.h"
namespace os {
class GLContextNSGL : public GLContext {
public:
GLContextNSGL();
~GLContextNSGL();
void setView(id view);
bool isValid() override;
bool createGLContext() override;
void destroyGLContext() override;
void makeCurrent() override;
void swapBuffers() override;
id nsglContext() {
return m_nsgl;
}
private:
id m_nsgl = nullptr; // NSOpenGLContext
id m_view = nullptr; // NSView
};
} // namespace os
#endif
|
Replace nil with nullptr in GLContextNSGL to compile correctly
|
[osx] Replace nil with nullptr in GLContextNSGL to compile correctly
|
C
|
mit
|
aseprite/laf,aseprite/laf
|
46e2418fc661eb2d58272c995d8579ec67accf69
|
packages/grpc-native-core/ext/completion_queue.h
|
packages/grpc-native-core/ext/completion_queue.h
|
/*
*
* Copyright 2016 gRPC 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.
*
*/
#include <grpc/grpc.h>
#include <v8.h>
namespace grpc {
namespace node {
grpc_completion_queue *GetCompletionQueue();
void CompletionQueueNext();
void CompletionQueueInit(v8::Local<v8::Object> exports);
} // namespace node
} // namespace grpc
|
/*
*
* Copyright 2016 gRPC 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.
*
*/
#include <grpc/grpc.h>
#include <v8.h>
namespace grpc {
namespace node {
grpc_completion_queue *GetCompletionQueue();
void CompletionQueueNext();
void CompletionQueueInit(v8::Local<v8::Object> exports);
void CompletionQueueForcePoll();
} // namespace node
} // namespace grpc
|
Update completion queue header to match code changes
|
Update completion queue header to match code changes
|
C
|
apache-2.0
|
grpc/grpc-node,grpc/grpc-node,grpc/grpc-node,grpc/grpc-node
|
18442c5cf486e16f4cb418a0d7ef2a2dd9ea7c34
|
Fastor/tensor/ScalarIndexing.h
|
Fastor/tensor/ScalarIndexing.h
|
#ifndef SCALAR_INDEXING_NONCONST_H
#define SCALAR_INDEXING_NONCONST_H
// Scalar indexing non-const
//----------------------------------------------------------------------------------------------------------//
template<typename... Args, typename std::enable_if<sizeof...(Args)==dimension_t::value &&
is_arithmetic_pack<Args...>::value,bool>::type =0>
FASTOR_INLINE T& operator()(Args ... args) {
return _data[get_flat_index(args...)];
}
//----------------------------------------------------------------------------------------------------------//
#endif // SCALAR_INDEXING_NONCONST_H
#ifndef SCALAR_INDEXING_CONST_H
#define SCALAR_INDEXING_CONST_H
// Scalar indexing const
//----------------------------------------------------------------------------------------------------------//
template<typename... Args, typename std::enable_if<sizeof...(Args)==dimension_t::value &&
is_arithmetic_pack<Args...>::value,bool>::type =0>
constexpr FASTOR_INLINE const T& operator()(Args ... args) const {
return _data[get_flat_index(args...)];
}
//----------------------------------------------------------------------------------------------------------//
#endif // SCALAR_INDEXING_CONST_H
|
#ifndef SCALAR_INDEXING_NONCONST_H
#define SCALAR_INDEXING_NONCONST_H
// Scalar indexing non-const
//----------------------------------------------------------------------------------------------------------//
template<typename... Args, typename std::enable_if<sizeof...(Args)==dimension_t::value &&
is_arithmetic_pack<Args...>::value,bool>::type =0>
FASTOR_INLINE T& operator()(Args ... args) {
return _data[get_flat_index(args...)];
}
template<typename Arg, typename std::enable_if<1==dimension_t::value &&
is_arithmetic_pack<Arg>::value,bool>::type =0>
FASTOR_INLINE T& operator[](Arg arg) {
return _data[get_flat_index(arg)];
}
//----------------------------------------------------------------------------------------------------------//
#endif // SCALAR_INDEXING_NONCONST_H
#ifndef SCALAR_INDEXING_CONST_H
#define SCALAR_INDEXING_CONST_H
// Scalar indexing const
//----------------------------------------------------------------------------------------------------------//
template<typename... Args, typename std::enable_if<sizeof...(Args)==dimension_t::value &&
is_arithmetic_pack<Args...>::value,bool>::type =0>
constexpr FASTOR_INLINE const T& operator()(Args ... args) const {
return _data[get_flat_index(args...)];
}
template<typename Arg, typename std::enable_if<1==dimension_t::value &&
is_arithmetic_pack<Arg>::value,bool>::type =0>
constexpr FASTOR_INLINE const T& operator[](Arg arg) const {
return _data[get_flat_index(arg)];
}
//----------------------------------------------------------------------------------------------------------//
#endif // SCALAR_INDEXING_CONST_H
|
Allow indexing by operator[] when dimension is 1
|
Allow indexing by operator[] when dimension is 1
|
C
|
mit
|
romeric/Fastor,romeric/Fastor,romeric/Fastor
|
d7519565d22249fa2c0f2ec4c60a2c0e3981b916
|
features/mbedtls/platform/inc/platform_mbed.h
|
features/mbedtls/platform/inc/platform_mbed.h
|
/**
* Copyright (C) 2006-2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
#if defined(DEVICE_TRNG)
#define MBEDTLS_ENTROPY_HARDWARE_ALT
#endif
#if defined(DEVICE_RTC)
#define MBEDTLS_HAVE_TIME_DATE
#endif
#if defined(MBEDTLS_CONFIG_HW_SUPPORT)
#include "mbedtls_device.h"
#endif
|
/**
* Copyright (C) 2006-2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
#if defined(DEVICE_TRNG)
#define MBEDTLS_ENTROPY_HARDWARE_ALT
#endif
#if defined(MBEDTLS_CONFIG_HW_SUPPORT)
#include "mbedtls_device.h"
#endif
|
Disable MBEDTLS_HAVE_DATE_TIME as ARMCC does not support gmtime
|
Disable MBEDTLS_HAVE_DATE_TIME as ARMCC does not support gmtime
|
C
|
apache-2.0
|
andcor02/mbed-os,andcor02/mbed-os,betzw/mbed-os,mbedmicro/mbed,c1728p9/mbed-os,c1728p9/mbed-os,c1728p9/mbed-os,c1728p9/mbed-os,betzw/mbed-os,andcor02/mbed-os,kjbracey-arm/mbed,betzw/mbed-os,kjbracey-arm/mbed,betzw/mbed-os,kjbracey-arm/mbed,mbedmicro/mbed,andcor02/mbed-os,c1728p9/mbed-os,betzw/mbed-os,andcor02/mbed-os,mbedmicro/mbed,mbedmicro/mbed,andcor02/mbed-os,kjbracey-arm/mbed,mbedmicro/mbed,betzw/mbed-os,c1728p9/mbed-os
|
6ddc15b9ba5b3b0c811a1ad22131005360474692
|
libyaul/scu/bus/b/vdp/vdp2_tvmd_display_clear.c
|
libyaul/scu/bus/b/vdp/vdp2_tvmd_display_clear.c
|
/*
* Copyright (c) 2012-2016 Israel Jacquez
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com>
*/
#include <vdp2/tvmd.h>
#include "vdp-internal.h"
void
vdp2_tvmd_display_clear(void)
{
_state_vdp2()->regs.tvmd &= 0x7FFF;
/* Change the DISP bit during VBLANK */
vdp2_tvmd_vblank_in_wait();
MEMORY_WRITE(16, VDP2(TVMD), _state_vdp2()->regs.tvmd);
}
|
/*
* Copyright (c) 2012-2016 Israel Jacquez
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com>
*/
#include <vdp2/tvmd.h>
#include "vdp-internal.h"
void
vdp2_tvmd_display_clear(void)
{
_state_vdp2()->regs.tvmd &= 0x7EFF;
/* Change the DISP bit during VBLANK */
vdp2_tvmd_vblank_in_wait();
MEMORY_WRITE(16, VDP2(TVMD), _state_vdp2()->regs.tvmd);
}
|
Clear bit when writing to VDP2(TVMD)
|
Clear bit when writing to VDP2(TVMD)
|
C
|
mit
|
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
|
f24e70fa3a204565a656594b48ac84c390aa1e8f
|
libcef_dll/cef_macros.h
|
libcef_dll/cef_macros.h
|
// Copyright (c) 2014 The Chromium Embedded Framework 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 CEF_LIBCEF_DLL_CEF_MACROS_H_
#define CEF_LIBCEF_DLL_CEF_MACROS_H_
#pragma once
#ifdef BUILDING_CEF_SHARED
#include "base/macros.h"
#else // !BUILDING_CEF_SHARED
// A macro to disallow the copy constructor and operator= functions
// This should be used in the private: declarations for a class
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)
#endif // !BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CEF_MACROS_H_
// Copyright (c) 2014 The Chromium Embedded Framework 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 CEF_LIBCEF_DLL_CEF_MACROS_H_
#define CEF_LIBCEF_DLL_CEF_MACROS_H_
#pragma once
#ifdef BUILDING_CEF_SHARED
#include "base/macros.h"
#else // !BUILDING_CEF_SHARED
// A macro to disallow the copy constructor and operator= functions
// This should be used in the private: declarations for a class
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)
#endif // !BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CEF_MACROS_H_
|
// Copyright (c) 2014 The Chromium Embedded Framework 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 CEF_LIBCEF_DLL_CEF_MACROS_H_
#define CEF_LIBCEF_DLL_CEF_MACROS_H_
#pragma once
#ifdef BUILDING_CEF_SHARED
#include "base/macros.h"
#else // !BUILDING_CEF_SHARED
// A macro to disallow the copy constructor and operator= functions
// This should be used in the private: declarations for a class
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)
#endif // !BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CEF_MACROS_H_
|
Remove duplicate content in file.
|
Remove duplicate content in file.
git-svn-id: 66addb63d0c46e75f185859367c4faf62af16cdd@1734 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
|
C
|
bsd-3-clause
|
kuscsik/chromiumembedded,kuscsik/chromiumembedded,kuscsik/chromiumembedded,kuscsik/chromiumembedded
|
f908528a004812c36a27a6705f8d2453cc9084c4
|
sesman/libscp/libscp_init.c
|
sesman/libscp/libscp_init.c
|
/**
* xrdp: A Remote Desktop Protocol server.
*
* Copyright (C) Jay Sorg 2004-2012
*
* 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.
*/
/**
*
* @file libscp_init.c
* @brief libscp initialization code
* @author Simone Fedele
*
*/
#include "libscp_init.h"
//struct log_config* s_log;
/* server API */
int DEFAULT_CC
scp_init()
{
/*
if (0 == log)
{
return 1;
}
*/
//s_log = log;
scp_lock_init();
log_message(LOG_LEVEL_WARNING, "[init:%d] libscp initialized", __LINE__);
return 0;
}
|
/**
* xrdp: A Remote Desktop Protocol server.
*
* Copyright (C) Jay Sorg 2004-2012
*
* 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.
*/
/**
*
* @file libscp_init.c
* @brief libscp initialization code
* @author Simone Fedele
*
*/
#include "libscp_init.h"
//struct log_config* s_log;
/* server API */
int DEFAULT_CC
scp_init()
{
/*
if (0 == log)
{
return 1;
}
*/
//s_log = log;
scp_lock_init();
log_message(LOG_LEVEL_DEBUG, "libscp initialized");
return 0;
}
|
Downgrade "libscp initialized" to LOG_LEVEL_DEBUG, remove line number
|
Downgrade "libscp initialized" to LOG_LEVEL_DEBUG, remove line number
It's a bad style to start the log with a cryptic warning.
|
C
|
apache-2.0
|
metalefty/xrdp,moobyfr/xrdp,itamarjp/xrdp,PKRoma/xrdp,PKRoma/xrdp,jsorg71/xrdp,cocoon/xrdp,ubuntu-xrdp/xrdp,ubuntu-xrdp/xrdp,itamarjp/xrdp,neutrinolabs/xrdp,itamarjp/xrdp,moobyfr/xrdp,proski/xrdp,jsorg71/xrdp,metalefty/xrdp,moobyfr/xrdp,neutrinolabs/xrdp,neutrinolabs/xrdp,cocoon/xrdp,metalefty/xrdp,proski/xrdp,cocoon/xrdp,proski/xrdp,jsorg71/xrdp,ubuntu-xrdp/xrdp,PKRoma/xrdp
|
7359740eaddf6e4c01ccd91fe1044932d019d8e3
|
Settings/Controls/Label.h
|
Settings/Controls/Label.h
|
#pragma once
#include "Control.h"
#include "../../3RVX/Logger.h"
class Label : public Control {
public:
Label() {
}
Label(int id, HWND parent) :
Control(id, parent) {
}
};
|
#pragma once
#include "Control.h"
#include "../../3RVX/Logger.h"
class Label : public Control {
public:
Label() {
}
Label(int id, HWND parent) :
Control(id, parent) {
}
Label(int id, DialogBase &parent, bool translate = true) :
Control(id, parent, false) {
}
};
|
Add a new-style constructor for labels
|
Add a new-style constructor for labels
|
C
|
bsd-2-clause
|
malensek/3RVX,malensek/3RVX,malensek/3RVX
|
4160de1a24f5ca414508e396e43ba756d73f8338
|
Source/PPSSignatureView.h
|
Source/PPSSignatureView.h
|
#import <UIKit/UIKit.h>
#import <GLKit/GLKit.h>
@interface PPSSignatureView : GLKView
@property (assign, nonatomic) UIColor *strokeColor;
@property (assign, nonatomic) BOOL hasSignature;
@property (strong, nonatomic) UIImage *signatureImage;
- (void)erase;
@end
|
#import <UIKit/UIKit.h>
#import <GLKit/GLKit.h>
@interface PPSSignatureView : GLKView
@property (assign, nonatomic) IBInspectable UIColor *strokeColor;
@property (assign, nonatomic) BOOL hasSignature;
@property (strong, nonatomic) UIImage *signatureImage;
- (void)erase;
@end
|
Make stroke color an IBInspectable property.
|
Make stroke color an IBInspectable property.
|
C
|
mit
|
ronaldsmartin/PPSSignatureView
|
e636d645deee9bf088091fba525ca18f55c516c9
|
src/common/angleutils.h
|
src/common/angleutils.h
|
//
// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// angleutils.h: Common ANGLE utilities.
#ifndef COMMON_ANGLEUTILS_H_
#define COMMON_ANGLEUTILS_H_
// A macro to disallow the copy constructor and operator= functions
// This must be used in the private: declarations for a class
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)
template <typename T, unsigned int N>
inline unsigned int ArraySize(T(&)[N])
{
return N;
}
#if defined(_MSC_VER)
#define snprintf _snprintf
#endif
#define VENDOR_ID_AMD 0x1002
#define VENDOR_ID_INTEL 0x8086
#define VENDOR_ID_NVIDIA 0x10DE
#define GL_BGRA4_ANGLEX 0x6ABC
#define GL_BGR5_A1_ANGLEX 0x6ABD
#endif // COMMON_ANGLEUTILS_H_
|
//
// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// angleutils.h: Common ANGLE utilities.
#ifndef COMMON_ANGLEUTILS_H_
#define COMMON_ANGLEUTILS_H_
// A macro to disallow the copy constructor and operator= functions
// This must be used in the private: declarations for a class
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)
template <typename T, unsigned int N>
inline unsigned int ArraySize(T(&)[N])
{
return N;
}
template <typename T, unsigned int N>
void SafeRelease(T (&resourceBlock)[N])
{
for (unsigned int i = 0; i < N; i++)
{
SafeRelease(resourceBlock[i]);
}
}
template <typename T>
void SafeRelease(T& resource)
{
if (resource)
{
resource->Release();
resource = NULL;
}
}
#if defined(_MSC_VER)
#define snprintf _snprintf
#endif
#define VENDOR_ID_AMD 0x1002
#define VENDOR_ID_INTEL 0x8086
#define VENDOR_ID_NVIDIA 0x10DE
#define GL_BGRA4_ANGLEX 0x6ABC
#define GL_BGR5_A1_ANGLEX 0x6ABD
#endif // COMMON_ANGLEUTILS_H_
|
Add helper functions to safely release Windows COM resources, and arrays of COM resources.
|
Add helper functions to safely release Windows COM resources, and arrays of COM resources.
TRAC #22656
Signed-off-by: Nicolas Capens
Signed-off-by: Shannon Woods
Author: Jamie Madill
git-svn-id: 2a1ef23f1c4b6a1dbccd5f9514022461535c55c0@2014 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
C
|
bsd-3-clause
|
ehsan/angle,xuxiandi/angleproject,xin3liang/platform_external_chromium_org_third_party_angle_dx11,MIPS/external-chromium_org-third_party-angle_dx11,shairai/angleproject,MIPS/external-chromium_org-third_party-angle,xin3liang/platform_external_chromium_org_third_party_angle,RepublicMaster/angleproject,vvuk/angle-old,android-ia/platform_external_chromium_org_third_party_angle,KalebDark/angleproject,android-ia/platform_external_chromium_org_third_party_angle,MIPS/external-chromium_org-third_party-angle_dx11,MIPS/external-chromium_org-third_party-angle,geekboxzone/lollipop_external_chromium_org_third_party_angle,jgcaaprom/android_external_chromium_org_third_party_angle,android-ia/platform_external_chromium_org_third_party_angle,jgcaaprom/android_external_chromium_org_third_party_angle,jgcaaprom/android_external_chromium_org_third_party_angle,KTXSoftware/angleproject,cantren/angleproject,MSOpenTech/angle-win8.0,cantren/angleproject,KalebDark/angleproject,ehsan/angle,RepublicMaster/angleproject,vvuk/angle-old,android-ia/platform_external_chromium_org_third_party_angle,MIPS/external-chromium_org-third_party-angle,xin3liang/platform_external_chromium_org_third_party_angle_dx11,themusicgod1/angleproject,MSOpenTech/angle-win8.0,android-ia/platform_external_chromium_org_third_party_angle_dx11,android-ia/platform_external_chromium_org_third_party_angle_dx11,cvsuser-chromium/chromium-third-party_angle_dx11,pombreda/angleproject,themusicgod1/angleproject,xin3liang/platform_external_chromium_org_third_party_angle,MIPS/external-chromium_org-third_party-angle_dx11,KTXSoftware/angleproject,ehsan/angle,geekboxzone/lollipop_external_chromium_org_third_party_angle,themusicgod1/angleproject,xuxiandi/angleproject,stammen/angleproject,MIPS/external-chromium_org-third_party-angle,KTXSoftware/angleproject,KalebDark/angleproject,KTXSoftware/angleproject,xin3liang/platform_external_chromium_org_third_party_angle,pombreda/angleproject,cvsuser-chromium/chromium-third-party_angle_dx11,shairai/angleproject,MIPS/external-chromium_org-third_party-angle_dx11,MSOpenTech/angle-win8.0,shairai/angleproject,RepublicMaster/angleproject,cvsuser-chromium/chromium-third-party_angle_dx11,geekboxzone/lollipop_external_chromium_org_third_party_angle,pombreda/angleproject,RepublicMaster/angleproject,KalebDark/angleproject,cantren/angleproject,pombreda/angleproject,android-ia/platform_external_chromium_org_third_party_angle_dx11,vvuk/angle-old,vvuk/angle-old,ehsan/angle,cantren/angleproject,xuxiandi/angleproject,KTXSoftware/angleproject,geekboxzone/lollipop_external_chromium_org_third_party_angle,cvsuser-chromium/chromium-third-party_angle_dx11,xin3liang/platform_external_chromium_org_third_party_angle,MSOpenTech/angle-win8.0,jgcaaprom/android_external_chromium_org_third_party_angle,xin3liang/platform_external_chromium_org_third_party_angle_dx11,themusicgod1/angleproject,stammen/angleproject,xuxiandi/angleproject,xin3liang/platform_external_chromium_org_third_party_angle_dx11,android-ia/platform_external_chromium_org_third_party_angle_dx11,stammen/angleproject,shairai/angleproject,stammen/angleproject
|
aa18a176915c652969964763a767b00453655423
|
source/system/Array.h
|
source/system/Array.h
|
#ifndef OOC_ARRAY_H_
#define OOC_ARRAY_H_
#define array_malloc(size) calloc(1, (size))
#define array_free free
#include <stdint.h>
#define _lang_array__Array_new(type, size) ((_lang_array__Array) { size, array_malloc((size) * sizeof(type)) });
#if defined(safe)
#define _lang_array__Array_get(array, index, type) ( \
((type*) array.data)[(index < 0 || index >= array.length) ? kean_exception_outOfBoundsException_throw(index, array.length), -1 : index])
#define _lang_array__Array_set(array, index, type, value) \
(((type*) array.data)[(index < 0 || index >= array.length) ? kean_exception_outOfBoundsException_throw(index, array.length), -1 : index] = value)
#else
#define _lang_array__Array_get(array, index, type) ( \
((type*) array.data)[index])
#define _lang_array__Array_set(array, index, type, value) \
(((type*) array.data)[index] = value)
#endif
#define _lang_array__Array_free(array) { array_free(array.data); }
typedef struct {
size_t length;
void* data;
} _lang_array__Array;
#endif
|
#ifndef OOC_ARRAY_H_
#define OOC_ARRAY_H_
#define array_malloc(size) calloc(1, (size))
#define array_free free
#include <stdint.h>
#define _lang_array__Array_new(type, size) ((_lang_array__Array) { size, array_malloc((size) * sizeof(type)) });
#if defined(safe)
#define _lang_array__Array_get(array, index, type) ( \
((type*) array.data)[(index < 0 || index >= array.length) ? kean_exception_outOfBoundsException_throw(index, array.length), -1 : index])
#define _lang_array__Array_set(array, index, type, value) \
(((type*) array.data)[(index < 0 || index >= array.length) ? kean_exception_outOfBoundsException_throw(index, array.length), -1 : index] = value)
#else
#define _lang_array__Array_get(array, index, type) ( \
((type*) array.data)[index])
#define _lang_array__Array_set(array, index, type, value) \
(((type*) array.data)[index] = value)
#endif
#define _lang_array__Array_free(array) { array_free(array.data); array.data = NULL; array.length = 0; }
typedef struct {
size_t length;
void* data;
} _lang_array__Array;
#endif
|
Set pointer to array data to null after free
|
Set pointer to array data to null after free
|
C
|
mit
|
firog/ooc-kean,magic-lang/ooc-kean,thomasfanell/ooc-kean,simonmika/ooc-kean,simonmika/ooc-kean,sebastianbaginski/ooc-kean,sebastianbaginski/ooc-kean,thomasfanell/ooc-kean,fredrikbryntesson/ooc-kean,firog/ooc-kean,fredrikbryntesson/ooc-kean,magic-lang/ooc-kean
|
a7074f2fe3c4f0eac5efb79ea6896319038dbe9f
|
test/asan/TestCases/printf-4.c
|
test/asan/TestCases/printf-4.c
|
// RUN: %clang_asan -O2 %s -o %t
// RUN: %env_asan_opts=check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
// RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
// FIXME: sprintf is not intercepted on Windows yet.
// XFAIL: win32
#include <stdio.h>
int main() {
volatile char c = '0';
volatile int x = 12;
volatile float f = 1.239;
volatile char s[] = "34";
volatile char buf[2];
fputs(stderr, "before sprintf");
sprintf((char *)buf, "%c %d %.3f %s\n", c, x, f, s);
fputs(stderr, "after sprintf");
fputs(stderr, (const char *)buf);
return 0;
// Check that size of output buffer is sanitized.
// CHECK-ON: before sprintf
// CHECK-ON-NOT: after sprintf
// CHECK-ON: stack-buffer-overflow
// CHECK-ON-NOT: 0 12 1.239 34
}
|
// RUN: %clang_asan -O2 %s -o %t
// RUN: %env_asan_opts=check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
// RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
// FIXME: sprintf is not intercepted on Windows yet.
// XFAIL: win32
#include <stdio.h>
int main() {
volatile char c = '0';
volatile int x = 12;
volatile float f = 1.239;
volatile char s[] = "34";
volatile char buf[2];
fputs("before sprintf\n", stderr);
sprintf((char *)buf, "%c %d %.3f %s\n", c, x, f, s);
fputs("after sprintf", stderr);
fputs((const char *)buf, stderr);
return 0;
// Check that size of output buffer is sanitized.
// CHECK-ON: before sprintf
// CHECK-ON-NOT: after sprintf
// CHECK-ON: stack-buffer-overflow
// CHECK-ON-NOT: 0 12 1.239 34
}
|
Fix order of arguments to fputs
|
Fix order of arguments to fputs
This time actually tested on Linux, where the test is not XFAILed.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@263294 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
|
24aa328ddab86fd861961b1d68091d334d773d75
|
slobrok/src/vespa/slobrok/server/reconfigurable_stateserver.h
|
slobrok/src/vespa/slobrok/server/reconfigurable_stateserver.h
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/config/helper/configfetcher.h>
#include <vespa/config/subscription/configuri.h>
#include <vespa/config-stateserver.h>
namespace vespalib {
class HealthProducer;
class MetricsProducer;
class ComponentConfigProducer;
class StateServer;
}
namespace slobrok {
class ReconfigurableStateServer : private config::IFetcherCallback<vespa::config::core::StateserverConfig> {
public:
ReconfigurableStateServer(const config::ConfigUri & configUri,
vespalib::HealthProducer & healt,
vespalib::MetricsProducer & metrics,
vespalib::ComponentConfigProducer & component);
~ReconfigurableStateServer();
private:
void configure(std::unique_ptr<vespa::config::core::StateserverConfig> config) override;
vespalib::HealthProducer & _health;
vespalib::MetricsProducer & _metrics;
vespalib::ComponentConfigProducer & _components;
std::unique_ptr<config::ConfigFetcher> _configFetcher;
std::unique_ptr<vespalib::StateServer> _server;
};
}
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/config/helper/configfetcher.h>
#include <vespa/config/subscription/configuri.h>
#include <vespa/config-stateserver.h>
namespace vespalib {
struct HealthProducer;
struct MetricsProducer;
struct ComponentConfigProducer;
class StateServer;
}
namespace slobrok {
class ReconfigurableStateServer : private config::IFetcherCallback<vespa::config::core::StateserverConfig> {
public:
ReconfigurableStateServer(const config::ConfigUri & configUri,
vespalib::HealthProducer & healt,
vespalib::MetricsProducer & metrics,
vespalib::ComponentConfigProducer & component);
~ReconfigurableStateServer();
private:
void configure(std::unique_ptr<vespa::config::core::StateserverConfig> config) override;
vespalib::HealthProducer & _health;
vespalib::MetricsProducer & _metrics;
vespalib::ComponentConfigProducer & _components;
std::unique_ptr<config::ConfigFetcher> _configFetcher;
std::unique_ptr<vespalib::StateServer> _server;
};
}
|
Adjust forward declarations in slobrok.
|
Adjust forward declarations in slobrok.
|
C
|
apache-2.0
|
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
|
4fe769ebf1a4a71fb90ac7e37a747aadc07052ea
|
numpy/core/src/multiarray/convert_datatype.h
|
numpy/core/src/multiarray/convert_datatype.h
|
#ifndef _NPY_ARRAY_CONVERT_DATATYPE_H_
#define _NPY_ARRAY_CONVERT_DATATYPE_H_
NPY_NO_EXPORT PyObject *
PyArray_CastToType(PyArrayObject *mp, PyArray_Descr *at, int fortran);
#endif
|
#ifndef _NPY_ARRAY_CONVERT_DATATYPE_H_
#define _NPY_ARRAY_CONVERT_DATATYPE_H_
NPY_NO_EXPORT PyObject *
PyArray_CastToType(PyArrayObject *mp, PyArray_Descr *at, int fortran);
NPY_NO_EXPORT int
PyArray_CastTo(PyArrayObject *out, PyArrayObject *mp);
NPY_NO_EXPORT PyArray_VectorUnaryFunc *
PyArray_GetCastFunc(PyArray_Descr *descr, int type_num);
NPY_NO_EXPORT int
PyArray_CanCastSafely(int fromtype, int totype);
NPY_NO_EXPORT Bool
PyArray_CanCastTo(PyArray_Descr *from, PyArray_Descr *to);
NPY_NO_EXPORT int
PyArray_ObjectType(PyObject *op, int minimum_type);
NPY_NO_EXPORT PyArrayObject **
PyArray_ConvertToCommonType(PyObject *op, int *retn);
NPY_NO_EXPORT int
PyArray_ValidType(int type);
#endif
|
Add API for datatype conversion.
|
Add API for datatype conversion.
|
C
|
bsd-3-clause
|
rgommers/numpy,WarrenWeckesser/numpy,larsmans/numpy,ssanderson/numpy,numpy/numpy-refactor,rudimeier/numpy,Dapid/numpy,tynn/numpy,ddasilva/numpy,sigma-random/numpy,dimasad/numpy,githubmlai/numpy,skymanaditya1/numpy,BMJHayward/numpy,chatcannon/numpy,numpy/numpy-refactor,Yusa95/numpy,hainm/numpy,ewmoore/numpy,ogrisel/numpy,grlee77/numpy,gmcastil/numpy,NextThought/pypy-numpy,nbeaver/numpy,dwillmer/numpy,empeeu/numpy,leifdenby/numpy,SunghanKim/numpy,nbeaver/numpy,chatcannon/numpy,rajathkumarmp/numpy,andsor/numpy,abalkin/numpy,tynn/numpy,ChanderG/numpy,yiakwy/numpy,Linkid/numpy,numpy/numpy,astrofrog/numpy,jorisvandenbossche/numpy,gmcastil/numpy,Srisai85/numpy,sinhrks/numpy,grlee77/numpy,ssanderson/numpy,jankoslavic/numpy,musically-ut/numpy,rmcgibbo/numpy,mortada/numpy,BabeNovelty/numpy,mingwpy/numpy,jschueller/numpy,mattip/numpy,endolith/numpy,argriffing/numpy,mattip/numpy,mhvk/numpy,WillieMaddox/numpy,jonathanunderwood/numpy,pizzathief/numpy,dch312/numpy,kirillzhuravlev/numpy,mhvk/numpy,dwf/numpy,Srisai85/numpy,jorisvandenbossche/numpy,groutr/numpy,BMJHayward/numpy,ddasilva/numpy,behzadnouri/numpy,pdebuyl/numpy,mattip/numpy,GaZ3ll3/numpy,MaPePeR/numpy,shoyer/numpy,ekalosak/numpy,pizzathief/numpy,felipebetancur/numpy,naritta/numpy,KaelChen/numpy,MichaelAquilina/numpy,mindw/numpy,dwf/numpy,sigma-random/numpy,tdsmith/numpy,Yusa95/numpy,Anwesh43/numpy,madphysicist/numpy,dimasad/numpy,GaZ3ll3/numpy,dimasad/numpy,endolith/numpy,skymanaditya1/numpy,drasmuss/numpy,skymanaditya1/numpy,drasmuss/numpy,CMartelLML/numpy,ViralLeadership/numpy,endolith/numpy,dwf/numpy,dwillmer/numpy,naritta/numpy,ContinuumIO/numpy,ChristopherHogan/numpy,stuarteberg/numpy,njase/numpy,brandon-rhodes/numpy,ESSS/numpy,immerrr/numpy,mortada/numpy,githubmlai/numpy,dato-code/numpy,jakirkham/numpy,WillieMaddox/numpy,rgommers/numpy,musically-ut/numpy,yiakwy/numpy,ahaldane/numpy,naritta/numpy,dimasad/numpy,larsmans/numpy,sigma-random/numpy,astrofrog/numpy,mortada/numpy,dato-code/numpy,sinhrks/numpy,andsor/numpy,pizzathief/numpy,simongibbons/numpy,madphysicist/numpy,stuarteberg/numpy,bmorris3/numpy,pelson/numpy,NextThought/pypy-numpy,Dapid/numpy,nbeaver/numpy,Eric89GXL/numpy,stefanv/numpy,pelson/numpy,seberg/numpy,pizzathief/numpy,trankmichael/numpy,cjermain/numpy,musically-ut/numpy,drasmuss/numpy,argriffing/numpy,kirillzhuravlev/numpy,WillieMaddox/numpy,pelson/numpy,numpy/numpy,SiccarPoint/numpy,ajdawson/numpy,tacaswell/numpy,tynn/numpy,larsmans/numpy,pdebuyl/numpy,sonnyhu/numpy,ogrisel/numpy,naritta/numpy,utke1/numpy,mindw/numpy,grlee77/numpy,moreati/numpy,seberg/numpy,madphysicist/numpy,Srisai85/numpy,MSeifert04/numpy,ContinuumIO/numpy,anntzer/numpy,jakirkham/numpy,MSeifert04/numpy,WarrenWeckesser/numpy,ekalosak/numpy,rudimeier/numpy,rgommers/numpy,abalkin/numpy,chiffa/numpy,bertrand-l/numpy,hainm/numpy,githubmlai/numpy,b-carter/numpy,rhythmsosad/numpy,larsmans/numpy,MichaelAquilina/numpy,dch312/numpy,AustereCuriosity/numpy,immerrr/numpy,argriffing/numpy,rgommers/numpy,embray/numpy,numpy/numpy,bringingheavendown/numpy,dwf/numpy,yiakwy/numpy,joferkington/numpy,CMartelLML/numpy,endolith/numpy,dwillmer/numpy,MSeifert04/numpy,trankmichael/numpy,immerrr/numpy,mwiebe/numpy,bertrand-l/numpy,ChanderG/numpy,grlee77/numpy,sinhrks/numpy,groutr/numpy,madphysicist/numpy,moreati/numpy,hainm/numpy,kirillzhuravlev/numpy,KaelChen/numpy,pbrod/numpy,WarrenWeckesser/numpy,rajathkumarmp/numpy,gfyoung/numpy,skymanaditya1/numpy,ChristopherHogan/numpy,rhythmsosad/numpy,jankoslavic/numpy,skwbc/numpy,matthew-brett/numpy,behzadnouri/numpy,GaZ3ll3/numpy,BabeNovelty/numpy,rhythmsosad/numpy,Yusa95/numpy,simongibbons/numpy,mhvk/numpy,hainm/numpy,pdebuyl/numpy,has2k1/numpy,MSeifert04/numpy,cjermain/numpy,MaPePeR/numpy,Srisai85/numpy,moreati/numpy,trankmichael/numpy,sinhrks/numpy,mwiebe/numpy,GrimDerp/numpy,sigma-random/numpy,Anwesh43/numpy,Anwesh43/numpy,cjermain/numpy,trankmichael/numpy,mathdd/numpy,ekalosak/numpy,stefanv/numpy,numpy/numpy-refactor,SunghanKim/numpy,anntzer/numpy,WarrenWeckesser/numpy,mindw/numpy,rudimeier/numpy,rherault-insa/numpy,anntzer/numpy,gmcastil/numpy,cowlicks/numpy,ChanderG/numpy,njase/numpy,rmcgibbo/numpy,nguyentu1602/numpy,rajathkumarmp/numpy,felipebetancur/numpy,stefanv/numpy,ChanderG/numpy,AustereCuriosity/numpy,chatcannon/numpy,CMartelLML/numpy,andsor/numpy,ChristopherHogan/numpy,ahaldane/numpy,numpy/numpy-refactor,AustereCuriosity/numpy,joferkington/numpy,pyparallel/numpy,SiccarPoint/numpy,groutr/numpy,has2k1/numpy,njase/numpy,leifdenby/numpy,embray/numpy,simongibbons/numpy,astrofrog/numpy,pbrod/numpy,Anwesh43/numpy,bringingheavendown/numpy,jakirkham/numpy,mingwpy/numpy,bertrand-l/numpy,cowlicks/numpy,mingwpy/numpy,GaZ3ll3/numpy,joferkington/numpy,astrofrog/numpy,ahaldane/numpy,Linkid/numpy,kiwifb/numpy,solarjoe/numpy,BMJHayward/numpy,mathdd/numpy,seberg/numpy,tacaswell/numpy,grlee77/numpy,skwbc/numpy,maniteja123/numpy,KaelChen/numpy,ajdawson/numpy,NextThought/pypy-numpy,pbrod/numpy,solarjoe/numpy,Dapid/numpy,simongibbons/numpy,ahaldane/numpy,ewmoore/numpy,matthew-brett/numpy,brandon-rhodes/numpy,mattip/numpy,Linkid/numpy,Yusa95/numpy,dato-code/numpy,cowlicks/numpy,jschueller/numpy,jankoslavic/numpy,nguyentu1602/numpy,jorisvandenbossche/numpy,ViralLeadership/numpy,Eric89GXL/numpy,githubmlai/numpy,immerrr/numpy,behzadnouri/numpy,mwiebe/numpy,NextThought/pypy-numpy,SunghanKim/numpy,charris/numpy,bmorris3/numpy,bringingheavendown/numpy,has2k1/numpy,pbrod/numpy,has2k1/numpy,nguyentu1602/numpy,anntzer/numpy,MSeifert04/numpy,jorisvandenbossche/numpy,empeeu/numpy,shoyer/numpy,shoyer/numpy,nguyentu1602/numpy,musically-ut/numpy,solarjoe/numpy,GrimDerp/numpy,rhythmsosad/numpy,charris/numpy,dwillmer/numpy,seberg/numpy,ogrisel/numpy,ESSS/numpy,MaPePeR/numpy,rmcgibbo/numpy,SiccarPoint/numpy,pyparallel/numpy,Eric89GXL/numpy,stefanv/numpy,ewmoore/numpy,maniteja123/numpy,tacaswell/numpy,jankoslavic/numpy,matthew-brett/numpy,jakirkham/numpy,MichaelAquilina/numpy,mhvk/numpy,jschueller/numpy,matthew-brett/numpy,rherault-insa/numpy,ewmoore/numpy,joferkington/numpy,mathdd/numpy,matthew-brett/numpy,pyparallel/numpy,ESSS/numpy,numpy/numpy-refactor,pdebuyl/numpy,embray/numpy,kirillzhuravlev/numpy,shoyer/numpy,KaelChen/numpy,ViralLeadership/numpy,rudimeier/numpy,jorisvandenbossche/numpy,ajdawson/numpy,madphysicist/numpy,sonnyhu/numpy,mingwpy/numpy,numpy/numpy,ogrisel/numpy,bmorris3/numpy,mindw/numpy,sonnyhu/numpy,charris/numpy,dch312/numpy,ChristopherHogan/numpy,dch312/numpy,charris/numpy,tdsmith/numpy,astrofrog/numpy,simongibbons/numpy,rherault-insa/numpy,bmorris3/numpy,shoyer/numpy,b-carter/numpy,mortada/numpy,sonnyhu/numpy,rmcgibbo/numpy,tdsmith/numpy,dwf/numpy,utke1/numpy,andsor/numpy,embray/numpy,kiwifb/numpy,Eric89GXL/numpy,jakirkham/numpy,Linkid/numpy,felipebetancur/numpy,pelson/numpy,ddasilva/numpy,gfyoung/numpy,ajdawson/numpy,pizzathief/numpy,MichaelAquilina/numpy,MaPePeR/numpy,GrimDerp/numpy,ogrisel/numpy,leifdenby/numpy,pbrod/numpy,WarrenWeckesser/numpy,chiffa/numpy,stuarteberg/numpy,GrimDerp/numpy,SunghanKim/numpy,kiwifb/numpy,ekalosak/numpy,ssanderson/numpy,jschueller/numpy,b-carter/numpy,empeeu/numpy,embray/numpy,brandon-rhodes/numpy,SiccarPoint/numpy,jonathanunderwood/numpy,rajathkumarmp/numpy,mhvk/numpy,stefanv/numpy,abalkin/numpy,cowlicks/numpy,mathdd/numpy,CMartelLML/numpy,skwbc/numpy,tdsmith/numpy,gfyoung/numpy,pelson/numpy,dato-code/numpy,brandon-rhodes/numpy,maniteja123/numpy,cjermain/numpy,stuarteberg/numpy,jonathanunderwood/numpy,ContinuumIO/numpy,utke1/numpy,yiakwy/numpy,ewmoore/numpy,BabeNovelty/numpy,empeeu/numpy,chiffa/numpy,felipebetancur/numpy,BabeNovelty/numpy,ahaldane/numpy,BMJHayward/numpy
|
05375b10cfd6e060242c9786fb7887dcd3850ebc
|
Wangscape/noise/module/codecs/NoiseQualityCodec.h
|
Wangscape/noise/module/codecs/NoiseQualityCodec.h
|
#pragma once
#include <spotify/json.hpp>
#include <noise/noise.h>
namespace spotify
{
namespace json
{
template<>
struct default_codec_t<noise::NoiseQuality>
{
using NoiseQuality = noise::NoiseQuality;
static codec::enumeration_t<NoiseQuality, codec::string_t> codec()
{
auto codec = codec::enumeration<NoiseQuality, std::string>({
{NoiseQuality::QUALITY_FAST, "Fast"},
{NoiseQuality::QUALITY_STD, "Standard"},
{NoiseQuality::QUALITY_BEST, "Best"}
});
return codec;
}
};
}
}
|
#pragma once
#include <spotify/json.hpp>
#include <noise/noise.h>
namespace spotify
{
namespace json
{
template<>
struct default_codec_t<noise::NoiseQuality>
{
using NoiseQuality = noise::NoiseQuality;
static codec::one_of_t<
codec::enumeration_t<NoiseQuality, codec::number_t<int>>,
codec::enumeration_t<NoiseQuality, codec::string_t>> codec()
{
auto codec_str = codec::enumeration<NoiseQuality, std::string>({
{NoiseQuality::QUALITY_FAST, "Fast"},
{NoiseQuality::QUALITY_STD, "Standard"},
{NoiseQuality::QUALITY_BEST, "Best"}
});
auto codec_int = codec::enumeration<NoiseQuality, int>({
{NoiseQuality::QUALITY_FAST, 0},
{NoiseQuality::QUALITY_STD, 1},
{NoiseQuality::QUALITY_BEST, 2}
});
return codec::one_of(codec_int, codec_str);
}
};
}
}
|
Allow specification of NoiseQuality with an int
|
Allow specification of NoiseQuality with an int
|
C
|
mit
|
Wangscape/Wangscape,Wangscape/Wangscape,Wangscape/Wangscape,serin-delaunay/Wangscape,serin-delaunay/Wangscape
|
23439b2341320a973b1c135abc541236de6550bf
|
hack_malloc.c
|
hack_malloc.c
|
#define _GNU_SOURCE
#include <stdio.h>
#include <stddef.h>
#include <unistd.h>
#include <sys/mman.h>
void* malloc(size_t size) {
printf("malloc... ");
size += sizeof(size_t);
int page_size = getpagesize();
int rem = size % page_size;
if (rem > 0) {
size += page_size - rem;
}
void* addr = mmap(0, size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
if (addr == MAP_FAILED) {
printf("fail\n");
return NULL;
}
printf("ok\n");
*(size_t*)addr = size;
return (size_t*)addr + 1;
}
void free (void *ptr) {
printf("free... ");
size_t* real_ptr = (size_t*)ptr - 1;
if (!munmap(real_ptr, *real_ptr)) {
printf("ok\n");
} else {
printf("fail\n");
}
}
|
#define _GNU_SOURCE
#include <stdio.h>
#include <stddef.h>
#include <unistd.h>
#include <sys/mman.h>
void* malloc(size_t size) {
write(STDOUT_FILENO, "malloc... ", 10);
size += sizeof(size_t);
int page_size = getpagesize();
int rem = size % page_size;
if (rem > 0) {
size += page_size - rem;
}
void* addr = mmap(0, size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
if (addr == MAP_FAILED) {
write(STDOUT_FILENO, "fail\n", 5);
return NULL;
}
write(STDOUT_FILENO, "ok\n", 3);
*(size_t*)addr = size;
return (size_t*)addr + 1;
}
void free (void *ptr) {
write(STDOUT_FILENO, "free... ", 8);
size_t* real_ptr = (size_t*)ptr - 1;
if (!munmap(real_ptr, *real_ptr)) {
write(STDOUT_FILENO, "ok\n", 3);
} else {
write(STDOUT_FILENO, "fail\n", 5);
}
}
|
Replace printf with safe write to stdout
|
Replace printf with safe write to stdout
|
C
|
mit
|
vmarkovtsev/hack_malloc,vmarkovtsev/hack_malloc
|
500af378f68af6e6438ad7375d933b0b788e8142
|
src/plugins/test_swap.c
|
src/plugins/test_swap.c
|
#include <glib/gprintf.h>
int main (int argc, char **argv) {
gboolean succ = FALSE;
gchar *err_msg = NULL;
succ = bd_swap_mkswap ("/dev/xd1", "SWAP", &err_msg);
if (succ)
puts ("Succeded.");
else
g_printf ("Not succeded: %s\n", err_msg);
succ = bd_swap_swapon ("/dev/xd1", 5, &err_msg);
if (succ)
puts ("Succeded.");
else
g_printf ("Not succeded: %s\n", err_msg);
return 0;
}
|
#include <glib/gprintf.h>
int main (int argc, char **argv) {
gboolean succ = FALSE;
gchar *err_msg = NULL;
succ = bd_swap_mkswap ("/dev/xd1", "SWAP", &err_msg);
if (succ)
puts ("Succeded.");
else
g_printf ("Not succeded: %s", err_msg);
succ = bd_swap_swapon ("/dev/xd1", 5, &err_msg);
if (succ)
puts ("Succeded.");
else
g_printf ("Not succeded: %s", err_msg);
return 0;
}
|
Remove newlines from the swap test outputs
|
Remove newlines from the swap test outputs
They are already included in the utility's output.
|
C
|
lgpl-2.1
|
atodorov/libblockdev,snbueno/libblockdev,rhinstaller/libblockdev,atodorov/libblockdev,atodorov/libblockdev,vpodzime/libblockdev,dashea/libblockdev,rhinstaller/libblockdev,rhinstaller/libblockdev,snbueno/libblockdev,vpodzime/libblockdev,vpodzime/libblockdev,dashea/libblockdev
|
41b1df604617bdde59bb722b9247c16fa4677d94
|
lib/memzip/lexermemzip.c
|
lib/memzip/lexermemzip.c
|
#include <stdlib.h>
#include "py/lexer.h"
#include "memzip.h"
mp_lexer_t *mp_lexer_new_from_file(const char *filename)
{
void *data;
size_t len;
if (memzip_locate(filename, &data, &len) != MZ_OK) {
return NULL;
}
return mp_lexer_new_from_str_len(qstr_from_str(filename), (const char *)data, (mp_uint_t)len, 0);
}
|
#include <stdlib.h>
#include "py/lexer.h"
#include "py/runtime.h"
#include "py/mperrno.h"
#include "memzip.h"
mp_lexer_t *mp_lexer_new_from_file(const char *filename)
{
void *data;
size_t len;
if (memzip_locate(filename, &data, &len) != MZ_OK) {
mp_raise_OSError(MP_ENOENT);
}
return mp_lexer_new_from_str_len(qstr_from_str(filename), (const char *)data, (mp_uint_t)len, 0);
}
|
Make lexer constructor raise exception when file not found.
|
lib/memzip: Make lexer constructor raise exception when file not found.
|
C
|
mit
|
blazewicz/micropython,cwyark/micropython,infinnovation/micropython,selste/micropython,cwyark/micropython,bvernoux/micropython,PappaPeppar/micropython,pozetroninc/micropython,chrisdearman/micropython,henriknelson/micropython,AriZuu/micropython,MrSurly/micropython,micropython/micropython-esp32,torwag/micropython,Peetz0r/micropython-esp32,MrSurly/micropython-esp32,pramasoul/micropython,alex-robbins/micropython,deshipu/micropython,toolmacher/micropython,adafruit/circuitpython,deshipu/micropython,adafruit/circuitpython,adafruit/circuitpython,hiway/micropython,ryannathans/micropython,selste/micropython,adafruit/circuitpython,infinnovation/micropython,dmazzella/micropython,toolmacher/micropython,HenrikSolver/micropython,adafruit/circuitpython,tobbad/micropython,oopy/micropython,MrSurly/micropython-esp32,MrSurly/micropython-esp32,Peetz0r/micropython-esp32,adafruit/micropython,micropython/micropython-esp32,torwag/micropython,henriknelson/micropython,AriZuu/micropython,kerneltask/micropython,micropython/micropython-esp32,pozetroninc/micropython,toolmacher/micropython,torwag/micropython,HenrikSolver/micropython,AriZuu/micropython,swegener/micropython,lowRISC/micropython,alex-robbins/micropython,bvernoux/micropython,swegener/micropython,HenrikSolver/micropython,SHA2017-badge/micropython-esp32,pramasoul/micropython,chrisdearman/micropython,micropython/micropython-esp32,deshipu/micropython,kerneltask/micropython,puuu/micropython,AriZuu/micropython,tralamazza/micropython,alex-robbins/micropython,infinnovation/micropython,torwag/micropython,selste/micropython,henriknelson/micropython,trezor/micropython,oopy/micropython,pfalcon/micropython,puuu/micropython,Peetz0r/micropython-esp32,alex-robbins/micropython,oopy/micropython,AriZuu/micropython,puuu/micropython,cwyark/micropython,blazewicz/micropython,henriknelson/micropython,hiway/micropython,adafruit/micropython,trezor/micropython,PappaPeppar/micropython,hiway/micropython,TDAbboud/micropython,swegener/micropython,Timmenem/micropython,PappaPeppar/micropython,infinnovation/micropython,SHA2017-badge/micropython-esp32,MrSurly/micropython,pfalcon/micropython,infinnovation/micropython,trezor/micropython,pfalcon/micropython,Peetz0r/micropython-esp32,Timmenem/micropython,trezor/micropython,tralamazza/micropython,swegener/micropython,blazewicz/micropython,ryannathans/micropython,SHA2017-badge/micropython-esp32,micropython/micropython-esp32,kerneltask/micropython,SHA2017-badge/micropython-esp32,TDAbboud/micropython,lowRISC/micropython,adafruit/circuitpython,pozetroninc/micropython,adafruit/micropython,ryannathans/micropython,lowRISC/micropython,tobbad/micropython,pramasoul/micropython,bvernoux/micropython,MrSurly/micropython-esp32,kerneltask/micropython,adafruit/micropython,bvernoux/micropython,Timmenem/micropython,tralamazza/micropython,selste/micropython,puuu/micropython,deshipu/micropython,MrSurly/micropython,hiway/micropython,blazewicz/micropython,dmazzella/micropython,torwag/micropython,Timmenem/micropython,TDAbboud/micropython,swegener/micropython,tobbad/micropython,pfalcon/micropython,kerneltask/micropython,Peetz0r/micropython-esp32,chrisdearman/micropython,TDAbboud/micropython,MrSurly/micropython,cwyark/micropython,SHA2017-badge/micropython-esp32,oopy/micropython,pfalcon/micropython,hiway/micropython,HenrikSolver/micropython,ryannathans/micropython,henriknelson/micropython,lowRISC/micropython,PappaPeppar/micropython,chrisdearman/micropython,toolmacher/micropython,lowRISC/micropython,pozetroninc/micropython,pozetroninc/micropython,blazewicz/micropython,MrSurly/micropython,ryannathans/micropython,pramasoul/micropython,toolmacher/micropython,puuu/micropython,chrisdearman/micropython,tobbad/micropython,deshipu/micropython,pramasoul/micropython,TDAbboud/micropython,trezor/micropython,PappaPeppar/micropython,HenrikSolver/micropython,dmazzella/micropython,MrSurly/micropython-esp32,dmazzella/micropython,oopy/micropython,cwyark/micropython,Timmenem/micropython,alex-robbins/micropython,selste/micropython,bvernoux/micropython,tralamazza/micropython,adafruit/micropython,tobbad/micropython
|
67d9df24bf6ac9d6a3397971605cb563fb35c54d
|
src/roman_convert_to_int.c
|
src/roman_convert_to_int.c
|
#include <string.h>
#include <stdbool.h>
#include "roman_convert_to_int.h"
#include "roman_clusters.h"
static const int ERROR = -1;
static bool starts_with(const char *str, RomanCluster cluster);
int roman_convert_to_int(const char *numeral)
{
if (!numeral) return ERROR;
int total = 0;
for (int cluster_index = 0; cluster_index < ROMAN_CLUSTERS_LENGTH; cluster_index++)
{
const RomanCluster cluster = ROMAN_CLUSTERS[cluster_index];
while (starts_with(numeral, cluster))
{
total += cluster.value;
numeral += cluster.length;
}
}
return *numeral ? ERROR : total;
}
static bool starts_with(const char *str, RomanCluster cluster)
{
return strncmp(str, cluster.letters, cluster.length) == 0;
}
|
#include <string.h>
#include <stdbool.h>
#include "roman_convert_to_int.h"
#include "roman_clusters.h"
static const int ERROR = -1;
static bool starts_with(const char *str, RomanCluster cluster);
int roman_convert_to_int(const char *numeral)
{
if (!numeral) return ERROR;
int total = 0;
for (const RomanCluster *cluster = roman_cluster_largest();
cluster;
cluster = roman_cluster_next_smaller(cluster)
)
{
while (starts_with(numeral, *cluster))
{
total += cluster->value;
numeral += cluster->length;
}
}
return *numeral ? ERROR : total;
}
static bool starts_with(const char *str, RomanCluster cluster)
{
return strncmp(str, cluster.letters, cluster.length) == 0;
}
|
Use cluster iterator in to_int function
|
Use cluster iterator in to_int function
|
C
|
mit
|
greghaskins/roman-calculator.c
|
2c0f601424bb82be02e2334c54b2b6ccb0cae9bc
|
Wangscape/codecs/OptionsCodec.h
|
Wangscape/codecs/OptionsCodec.h
|
#pragma once
#include <spotify/json.hpp>
#include "Options.h"
#include "metaoutput/codecs/FilenamesCodec.h"
#include "TerrainSpecCodec.h"
#include "TileFormatCodec.h"
using namespace spotify::json::codec;
namespace spotify
{
namespace json
{
template<>
struct default_codec_t<Options>
{
static object_t<Options> codec()
{
auto codec = object<Options>();
codec.required("OutputDirectory", &Options::outputDirectory);
codec.required("Terrains", &Options::terrains);
codec.required("TileFormat", &Options::tileFormat);
codec.required("Cliques", &Options::cliques);
codec.required("MetaOutput", &Options::outputFilenames);
codec.required("CalculatorMode", &Options::CalculatorMode,
codec::enumeration<tilegen::alpha::CalculatorMode, std::string>({
{tilegen::alpha::CalculatorMode::Max, "Max"},
{tilegen::alpha::CalculatorMode::Linear, "Linear"}}));
return codec;
}
};
}
}
|
#pragma once
#include <spotify/json.hpp>
#include "Options.h"
#include "metaoutput/codecs/FilenamesCodec.h"
#include "TerrainSpecCodec.h"
#include "TileFormatCodec.h"
using namespace spotify::json::codec;
namespace spotify
{
namespace json
{
template<>
struct default_codec_t<Options>
{
static object_t<Options> codec()
{
auto codec = object<Options>();
codec.required("OutputDirectory", &Options::outputDirectory);
codec.required("Terrains", &Options::terrains);
codec.required("TileFormat", &Options::tileFormat);
codec.required("Cliques", &Options::cliques);
codec.required("MetaOutput", &Options::outputFilenames);
codec.required("AlphaCalculatorMode", &Options::CalculatorMode,
codec::enumeration<tilegen::alpha::CalculatorMode, std::string>({
{tilegen::alpha::CalculatorMode::Max, "Max"},
{tilegen::alpha::CalculatorMode::Linear, "Linear"}}));
return codec;
}
};
}
}
|
Revert to AlphaCalculatorMode in options codec
|
Revert to AlphaCalculatorMode in options codec
|
C
|
mit
|
Wangscape/Wangscape,serin-delaunay/Wangscape,Wangscape/Wangscape,serin-delaunay/Wangscape,Wangscape/Wangscape
|
6dee7b6820ee89ef41561a005645f0ecda59c2ea
|
kernel/port/data.c
|
kernel/port/data.c
|
#include <stddef.h>
#include <kernel/port/data.h>
void enq(Queue *q, List *item) {
item->next = NULL;
if(!q->tail) {
q->head = item;
q->tail = item;
} else {
q->tail->next = item;
}
}
List *deq(Queue *q) {
if(!q->head) {
return NULL;
}
List *ret = q->head;
q->head = q->head->next;
if(!q->head) {
q->tail = NULL;
}
ret->next = NULL;
return ret;
}
|
#include <stddef.h>
#include <kernel/port/data.h>
void enq(Queue *q, List *item) {
item->next = NULL;
if(!q->tail) {
q->head = item;
q->tail = item;
} else {
q->tail->next = item;
q->tail = item;
}
}
List *deq(Queue *q) {
if(!q->head) {
return NULL;
}
List *ret = q->head;
q->head = q->head->next;
if(!q->head) {
q->tail = NULL;
}
ret->next = NULL;
return ret;
}
|
Fix a bug in the queue implementation
|
Fix a bug in the queue implementation
Unfortunately this was not the problem with the scheduler. For some
reason we're never getting a second timer interrupt.
|
C
|
isc
|
zenhack/zero,zenhack/zero,zenhack/zero
|
b58c6841e09d91905747830d2d4471f55392765d
|
libevmjit/CompilerHelper.h
|
libevmjit/CompilerHelper.h
|
#pragma once
#include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/IRBuilder.h>
#include "preprocessor/llvm_includes_end.h"
namespace dev
{
namespace eth
{
namespace jit
{
class RuntimeManager;
/// Base class for compiler helpers like Memory, GasMeter, etc.
class CompilerHelper
{
protected:
CompilerHelper(llvm::IRBuilder<>& _builder);
CompilerHelper(const CompilerHelper&) = delete;
CompilerHelper& operator=(CompilerHelper) = delete;
/// Reference to the IR module being compiled
llvm::Module* getModule();
/// Reference to the main module function
llvm::Function* getMainFunction();
/// Reference to parent compiler IR builder
llvm::IRBuilder<>& m_builder;
llvm::IRBuilder<>& getBuilder() { return m_builder; }
llvm::CallInst* createCall(llvm::Function* _func, std::initializer_list<llvm::Value*> const& _args);
friend class RuntimeHelper;
};
/// Compiler helper that depends on runtime data
class RuntimeHelper : public CompilerHelper
{
protected:
RuntimeHelper(RuntimeManager& _runtimeManager);
RuntimeManager& getRuntimeManager() { return m_runtimeManager; }
private:
RuntimeManager& m_runtimeManager;
};
using InsertPointGuard = llvm::IRBuilderBase::InsertPointGuard;
}
}
}
|
#pragma once
#include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/IRBuilder.h>
#include "preprocessor/llvm_includes_end.h"
namespace dev
{
namespace eth
{
namespace jit
{
class RuntimeManager;
/// Base class for compiler helpers like Memory, GasMeter, etc.
class CompilerHelper
{
protected:
CompilerHelper(llvm::IRBuilder<>& _builder);
CompilerHelper(const CompilerHelper&) = delete;
CompilerHelper& operator=(CompilerHelper) = delete;
/// Reference to the IR module being compiled
llvm::Module* getModule();
/// Reference to the main module function
llvm::Function* getMainFunction();
/// Reference to parent compiler IR builder
llvm::IRBuilder<>& m_builder;
llvm::IRBuilder<>& getBuilder() { return m_builder; }
llvm::CallInst* createCall(llvm::Function* _func, std::initializer_list<llvm::Value*> const& _args);
friend class RuntimeHelper;
};
/// Compiler helper that depends on runtime data
class RuntimeHelper : public CompilerHelper
{
protected:
RuntimeHelper(RuntimeManager& _runtimeManager);
RuntimeManager& getRuntimeManager() { return m_runtimeManager; }
private:
RuntimeManager& m_runtimeManager;
};
struct InsertPointGuard
{
explicit InsertPointGuard(llvm::IRBuilderBase& _builder): m_builder(_builder), m_insertPoint(_builder.saveIP()) {}
~InsertPointGuard() { m_builder.restoreIP(m_insertPoint); }
private:
llvm::IRBuilderBase& m_builder;
decltype(m_builder.saveIP()) m_insertPoint;
};
}
}
}
|
Reimplement InsertPointGuard to avoid LLVM ABI incompatibility.
|
Reimplement InsertPointGuard to avoid LLVM ABI incompatibility.
In general, the NDEBUG flag should match cpp-ethereum and LLVM builds. But this is hard to satisfy as we usually have one system-wide build of LLVM and different builds of cpp-ethereum. This ABI incompatibility hit OSX only in release builds as LLVM is built by homebrew with assertions by default.
|
C
|
mit
|
ethereum/evmjit,ethereum/evmjit,ethereum/evmjit
|
f4836c754a5b37064d49220e1be97d46a28b9d8b
|
include/llvm/Intrinsics.h
|
include/llvm/Intrinsics.h
|
//===-- llvm/Instrinsics.h - LLVM Intrinsic Function Handling ---*- C++ -*-===//
//
// This file defines a set of enums which allow processing of intrinsic
// functions. Values of these enum types are returned by
// Function::getIntrinsicID.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_INTRINSICS_H
#define LLVM_INTRINSICS_H
/// LLVMIntrinsic Namespace - This namespace contains an enum with a value for
/// every intrinsic/builtin function known by LLVM. These enum values are
/// returned by Function::getIntrinsicID().
///
namespace LLVMIntrinsic {
enum ID {
not_intrinsic = 0, // Must be zero
va_start, // Used to represent a va_start call in C
va_end, // Used to represent a va_end call in C
va_copy, // Used to represent a va_copy call in C
setjmp, // Used to represent a setjmp call in C
longjmp, // Used to represent a longjmp call in C
};
}
#endif
|
//===-- llvm/Instrinsics.h - LLVM Intrinsic Function Handling ---*- C++ -*-===//
//
// This file defines a set of enums which allow processing of intrinsic
// functions. Values of these enum types are returned by
// Function::getIntrinsicID.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_INTRINSICS_H
#define LLVM_INTRINSICS_H
/// LLVMIntrinsic Namespace - This namespace contains an enum with a value for
/// every intrinsic/builtin function known by LLVM. These enum values are
/// returned by Function::getIntrinsicID().
///
namespace LLVMIntrinsic {
enum ID {
not_intrinsic = 0, // Must be zero
va_start, // Used to represent a va_start call in C
va_end, // Used to represent a va_end call in C
va_copy, // Used to represent a va_copy call in C
setjmp, // Used to represent a setjmp call in C
longjmp, // Used to represent a longjmp call in C
//===------------------------------------------------------------------===//
// This section defines intrinsic functions used to represent Alpha
// instructions...
//
alpha_ctlz, // CTLZ (count leading zero): counts the number of leading
// zeros in the given ulong value
alpha_cttz, // CTTZ (count trailing zero): counts the number of trailing
// zeros in the given ulong value
alpha_ctpop, // CTPOP (count population): counts the number of ones in
// the given ulong value
alpha_umulh, // UMULH (unsigned multiply quadword high): Takes two 64-bit
// (ulong) values, and returns the upper 64 bits of their
// 128 bit product as a ulong
};
}
#endif
|
Add alpha intrinsics, contributed by Rahul Joshi
|
Add alpha intrinsics, contributed by Rahul Joshi
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@7372 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
bsd-2-clause
|
dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm
|
68c4d8ab89f17d621f69786cbb751976afce72f4
|
lib/assert2.h
|
lib/assert2.h
|
#pragma once
#include <cassert>
#include <string>
#define assert2(expr, str) \
((expr) \
? __ASSERT_VOID_CAST (0)\
: __assert_fail ((std::string(__STRING(expr)) + "; " + (str)).c_str(), __FILE__, __LINE__, __ASSERT_FUNCTION))
|
#pragma once
#include <cassert>
#include <string>
#if __GNUC__
#define assert2(expr, str) \
((expr) \
? __ASSERT_VOID_CAST (0)\
: __assert_fail ((std::string(__STRING(expr)) + "; " + (str)).c_str(), __FILE__, __LINE__, __ASSERT_FUNCTION))
#elif __clang__
#define assert2(expr, str) \
((expr) \
? (void)(0)\
: __assert_rtn ((std::string(__STRING(expr)) + "; " + (str)).c_str(), __FILE__, __LINE__, __func__))
#else
#define assert2(expr, str) assert(expr)
#endif
|
Work better on various versions of clang.
|
Work better on various versions of clang.
|
C
|
mit
|
tewalds/morat,yotomyoto/morat,tewalds/morat,tewalds/morat,yotomyoto/morat,yotomyoto/morat
|
359ce984aa895a88248856bb338f7c5484da1443
|
crypto/openssh/version.h
|
crypto/openssh/version.h
|
/* $OpenBSD: version.h,v 1.37 2003/04/01 10:56:46 markus Exp $ */
/* $FreeBSD$ */
#ifndef SSH_VERSION
#define SSH_VERSION (ssh_version_get())
#define SSH_VERSION_BASE "OpenSSH_3.6.1p1"
#define SSH_VERSION_ADDENDUM "FreeBSD-20030423"
const char *ssh_version_get(void);
void ssh_version_set_addendum(const char *add);
#endif /* SSH_VERSION */
|
/* $OpenBSD: version.h,v 1.37 2003/04/01 10:56:46 markus Exp $ */
/* $FreeBSD$ */
#ifndef SSH_VERSION
#define SSH_VERSION (ssh_version_get())
#define SSH_VERSION_BASE "OpenSSH_3.6.1p1"
#define SSH_VERSION_ADDENDUM "FreeBSD-20030916"
const char *ssh_version_get(void);
void ssh_version_set_addendum(const char *add);
#endif /* SSH_VERSION */
|
Update the OpenSSH addendum string for the buffer handling fix.
|
Update the OpenSSH addendum string for the buffer handling fix.
|
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
|
77a03785213b62287c316cf819430457078f713f
|
src/condor_ckpt/fcntl.h
|
src/condor_ckpt/fcntl.h
|
#if defined(AIX32) && defined(__cplusplus )
# include "fix_gnu_fcntl.h"
#elif defined(AIX32) && !defined(__cplusplus )
typedef unsigned short ushort;
# include <fcntl.h>
#elif defined(ULTRIX42) && defined(__cplusplus )
# include "fix_gnu_fcntl.h"
#else
# include <fcntl.h>
#endif
|
#if defined(__cplusplus) && !defined(OSF1) /* GNU G++ */
# include "fix_gnu_fcntl.h"
#elif defined(AIX32) /* AIX bsdcc */
# typedef unsigned short ushort;
# include <fcntl.h>
#else /* Everybody else */
# include <fcntl.h>
#endif
|
Make things depend on the compiler (G++, bsdcc, others) rather than on specific platforms.
|
Make things depend on the compiler (G++, bsdcc, others) rather than
on specific platforms.
|
C
|
apache-2.0
|
djw8605/condor,djw8605/condor,zhangzhehust/htcondor,htcondor/htcondor,bbockelm/condor-network-accounting,clalancette/condor-dcloud,bbockelm/condor-network-accounting,neurodebian/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,htcondor/htcondor,djw8605/condor,zhangzhehust/htcondor,bbockelm/condor-network-accounting,zhangzhehust/htcondor,bbockelm/condor-network-accounting,neurodebian/htcondor,clalancette/condor-dcloud,djw8605/htcondor,htcondor/htcondor,djw8605/htcondor,djw8605/condor,zhangzhehust/htcondor,htcondor/htcondor,neurodebian/htcondor,mambelli/osg-bosco-marco,djw8605/htcondor,neurodebian/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,djw8605/condor,djw8605/htcondor,djw8605/condor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,djw8605/htcondor,djw8605/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,clalancette/condor-dcloud,djw8605/htcondor,bbockelm/condor-network-accounting,djw8605/condor,neurodebian/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco,htcondor/htcondor,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,djw8605/condor,htcondor/htcondor,zhangzhehust/htcondor,zhangzhehust/htcondor,htcondor/htcondor,bbockelm/condor-network-accounting,neurodebian/htcondor,neurodebian/htcondor,clalancette/condor-dcloud,neurodebian/htcondor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,zhangzhehust/htcondor,htcondor/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco
|
3bbe9e5aab0bcd51b95b3f718cb790807931d82b
|
chrome/browser/extensions/extension_message_handler.h
|
chrome/browser/extensions/extension_message_handler.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 CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_HANDLER_H_
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_HANDLER_H_
#pragma once
#include "content/browser/renderer_host/render_view_host_observer.h"
class Profile;
struct ExtensionHostMsg_DomMessage_Params;
// Filters and dispatches extension-related IPC messages that arrive from
// renderer/extension processes. This object is created for renderers and also
// ExtensionHost/BackgroundContents. Contrast this with ExtensionTabHelper,
// which is only created for TabContents.
class ExtensionMessageHandler : public RenderViewHostObserver {
public:
// |sender| is guaranteed to outlive this object.
explicit ExtensionMessageHandler(RenderViewHost* render_view_host);
virtual ~ExtensionMessageHandler();
// RenderViewHostObserver overrides.
virtual bool OnMessageReceived(const IPC::Message& message);
private:
// Message handlers.
void OnPostMessage(int port_id, const std::string& message);
void OnRequest(const ExtensionHostMsg_DomMessage_Params& params);
DISALLOW_COPY_AND_ASSIGN(ExtensionMessageHandler);
};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_HANDLER_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 CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_HANDLER_H_
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_HANDLER_H_
#pragma once
#include "content/browser/renderer_host/render_view_host_observer.h"
class Profile;
struct ExtensionHostMsg_DomMessage_Params;
// Filters and dispatches extension-related IPC messages that arrive from
// renderers. There is one of these objects for each RenderViewHost in Chrome.
// Contrast this with ExtensionTabHelper, which is only created for TabContents.
class ExtensionMessageHandler : public RenderViewHostObserver {
public:
// |sender| is guaranteed to outlive this object.
explicit ExtensionMessageHandler(RenderViewHost* render_view_host);
virtual ~ExtensionMessageHandler();
// RenderViewHostObserver overrides.
virtual bool OnMessageReceived(const IPC::Message& message);
private:
// Message handlers.
void OnPostMessage(int port_id, const std::string& message);
void OnRequest(const ExtensionHostMsg_DomMessage_Params& params);
DISALLOW_COPY_AND_ASSIGN(ExtensionMessageHandler);
};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_HANDLER_H_
|
Clarify class comment for ExtensionMessageHandler.
|
Clarify class comment for ExtensionMessageHandler.
TBR=jam@chromium.org
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@82674 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
yitian134/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,ropik/chromium,ropik/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,gavinp/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,ropik/chromium
|
f978f33427f4f3d5273f5b13b776bfbab9e66f16
|
ReactiveAlamofire/ReactiveAlamofire.h
|
ReactiveAlamofire/ReactiveAlamofire.h
|
//
// ReactiveAlamofire.h
// ReactiveAlamofire
//
// Created by Srdan Rasic on 23/04/16.
// Copyright © 2016 ReactiveKit. All rights reserved.
//
//! Project version number for ReactiveAlamofire.
FOUNDATION_EXPORT double ReactiveAlamofireVersionNumber;
//! Project version string for ReactiveAlamofire.
FOUNDATION_EXPORT const unsigned char ReactiveAlamofireVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <ReactiveAlamofire/PublicHeader.h>
|
//
// ReactiveAlamofire.h
// ReactiveAlamofire
//
// Created by Srdan Rasic on 23/04/16.
// Copyright © 2016 ReactiveKit. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for ReactiveAlamofire.
FOUNDATION_EXPORT double ReactiveAlamofireVersionNumber;
//! Project version string for ReactiveAlamofire.
FOUNDATION_EXPORT const unsigned char ReactiveAlamofireVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <ReactiveAlamofire/PublicHeader.h>
|
Use Foundation framework instead of UIKit.
|
Use Foundation framework instead of UIKit.
|
C
|
mit
|
ReactiveKit/ReactiveAlamofire,ReactiveKit/ReactiveAlamofire
|
e2971406eb3b2ecdd211b9e7403fa02ae725b115
|
misc/miscfn.h
|
misc/miscfn.h
|
#ifndef H_MISCFN
#define H_MISCFN
#include "config.h"
#if HAVE_FNMATCH_H
#include <fnmatch.h>
#else
#include "misc-fnmatch.h"
#endif
#if HAVE_GLOB_H
#include <glob.h>
#else
#include "misc-glob.h"
#endif
#if ! HAVE_S_IFSOCK
#define S_IFSOCK (0)
#endif
#if ! HAVE_S_ISLNK
#define S_ISLNK(mode) ((mode) & S_IFLNK)
#endif
#if ! HAVE_S_ISSOCK
#define S_ISSOCK(mode) ((mode) & S_IFSOCK)
#endif
#if NEED_STRINGS_H
#include <strings.h>
#endif
#if ! HAVE_REALPATH
char *realpath(const char *path, char resolved_path []);
#endif
#if NEED_TIMEZONE
#include <sys/stdtypes.h>
extern time_t timezone;
#endif
#if NEED_MYREALLOC
#include <sys/stdtypes.h>
#define realloc(ptr,size) myrealloc(ptr,size)
extern void *myrealloc(void *, size_t);
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#endif
|
#ifndef H_MISCFN
#define H_MISCFN
#include "config.h"
#if HAVE_FNMATCH_H
#include <fnmatch.h>
#else
#include "misc-fnmatch.h"
#endif
#if HAVE_GLOB_H
#include <glob.h>
#else
#include "misc-glob.h"
#endif
#if ! HAVE_S_IFSOCK
#define S_IFSOCK (0)
#endif
#if ! HAVE_S_ISLNK
#define S_ISLNK(mode) ((mode) & S_IFLNK)
#endif
#if ! HAVE_S_ISSOCK
#define S_ISSOCK(mode) ((mode) & S_IFSOCK)
#endif
#if NEED_STRINGS_H
#include <strings.h>
#endif
#if ! HAVE_REALPATH
char *realpath(const char *path, char resolved_path []);
#endif
#if NEED_TIMEZONE
#include <sys/stdtypes.h>
extern time_t timezone;
#endif
#if NEED_MYREALLOC
#include <sys/stdtypes.h>
#define realloc(ptr,size) myrealloc(ptr,size)
extern void *myrealloc(void *, size_t);
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if HAVE_LIMITS_H
#include <limits.h>
#endif
#endif
|
Include <limits.h> if it's available.
|
Include <limits.h> if it's available.
|
C
|
lgpl-2.1
|
devzero2000/RPM5,devzero2000/RPM5,devzero2000/RPM5,devzero2000/RPM5,devzero2000/RPM5,devzero2000/RPM5,devzero2000/RPM5
|
971068ecfa82cea5b21a3ccc962e95b7cdb5f38d
|
app/tx/main.c
|
app/tx/main.c
|
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "nrf51.h"
#include "nrf_delay.h"
#include "error.h"
#include "gpio.h"
#include "leds.h"
#include "radio.h"
void error_handler(uint32_t err_code, uint32_t line_num, char * file_name)
{
while (1)
{
for (uint8_t i = LED_START; i < LED_STOP; i++)
{
led_toggle(i);
nrf_delay_us(50000);
}
}
}
void radio_evt_handler(radio_evt_t * evt)
{
}
int main(void)
{
uint8_t i = 0;
uint32_t err_code;
leds_init();
radio_packet_t packet;
packet.len = 4;
packet.flags.ack = 0;
radio_init(radio_evt_handler);
while (1)
{
packet.data[0] = i++;
packet.data[1] = 0x12;
err_code = radio_send(&packet);
ASSUME_SUCCESS(err_code);
packet.data[0] = i++;
packet.data[1] = 0x12;
err_code = radio_send(&packet);
ASSUME_SUCCESS(err_code);
led_toggle(LED0);
nrf_delay_us(1000000);
}
}
|
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "nrf51.h"
#include "nrf_delay.h"
#include "error.h"
#include "gpio.h"
#include "leds.h"
#include "radio.h"
void error_handler(uint32_t err_code, uint32_t line_num, char * file_name)
{
while (1)
{
for (uint8_t i = LED_START; i < LED_STOP; i++)
{
led_toggle(i);
nrf_delay_us(50000);
}
}
}
void radio_evt_handler(radio_evt_t * evt)
{
}
int main(void)
{
uint8_t i = 0;
uint32_t err_code;
leds_init();
radio_packet_t packet;
packet.len = 4;
packet.flags.ack = 0;
radio_init(radio_evt_handler);
while (1)
{
packet.data[0] = i++;
packet.data[1] = 0x12;
err_code = radio_send(&packet);
ASSUME_SUCCESS(err_code);
led_toggle(LED0);
nrf_delay_us(1000000);
}
}
|
Send only one packet at a time.
|
Send only one packet at a time.
|
C
|
bsd-3-clause
|
hlnd/nrf51-simple-radio,hlnd/nrf51-simple-radio
|
922128855ca81ca6d5cad13df91eb312e81057b9
|
GITBlob.h
|
GITBlob.h
|
//
// GITBlob.h
// CocoaGit
//
// Created by Geoffrey Garside on 29/06/2008.
// Copyright 2008 ManicPanda.com. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "GITObject.h"
@interface GITBlob : GITObject {
NSData * data;
}
#pragma mark -
#pragma mark Properties
@property(retain) NSData * data;
#pragma mark -
#pragma mark Init Methods
- (id)initWithContentsOfFile:(NSString*)filePath;
- (id)initWithData:(NSData*)dataContent;
#pragma mark -
#pragma mark Instance Methods
- (BOOL)write;
- (BOOL)writeWithError:(NSError**)errorPtr;
@end
|
//
// GITBlob.h
// CocoaGit
//
// Created by Geoffrey Garside on 29/06/2008.
// Copyright 2008 ManicPanda.com. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "GITObject.h"
@interface GITBlob : GITObject {
NSData * data;
}
#pragma mark -
#pragma mark Properties
@property(retain) NSData * data;
#pragma mark -
#pragma mark Reading existing Blob objects
- (id)initFromHash:(NSString*)objectHash;
#pragma mark -
#pragma mark Creating new Blob objects
- (id)initWithData:(NSData*)dataContent;
- (id)initWithContentsOfFile:(NSString*)filePath;
#pragma mark -
#pragma mark Instance Methods
- (BOOL)write;
- (BOOL)writeWithError:(NSError**)errorPtr;
@end
|
Add pragmas to differentiate init method types
|
Add pragmas to differentiate init method types
|
C
|
mit
|
schacon/cocoagit,schacon/cocoagit,geoffgarside/cocoagit,geoffgarside/cocoagit
|
e9d6b3358ac35901ccc6a4a5a317670fa469db25
|
arch/arm/include/asm/smp_scu.h
|
arch/arm/include/asm/smp_scu.h
|
#ifndef __ASMARM_ARCH_SCU_H
#define __ASMARM_ARCH_SCU_H
#define SCU_PM_NORMAL 0
#define SCU_PM_DORMANT 2
#define SCU_PM_POWEROFF 3
#ifndef __ASSEMBLER__
unsigned int scu_get_core_count(void __iomem *);
void scu_enable(void __iomem *);
int scu_power_mode(void __iomem *, unsigned int);
#endif
#endif
|
#ifndef __ASMARM_ARCH_SCU_H
#define __ASMARM_ARCH_SCU_H
#define SCU_PM_NORMAL 0
#define SCU_PM_DORMANT 2
#define SCU_PM_POWEROFF 3
#ifndef __ASSEMBLER__
#include <asm/cputype.h>
static inline bool scu_a9_has_base(void)
{
return read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9;
}
static inline unsigned long scu_a9_get_base(void)
{
unsigned long pa;
asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (pa));
return pa;
}
unsigned int scu_get_core_count(void __iomem *);
void scu_enable(void __iomem *);
int scu_power_mode(void __iomem *, unsigned int);
#endif
#endif
|
Add API to detect SCU base address from CP15
|
ARM: Add API to detect SCU base address from CP15
Add API to detect SCU base address from CP15.
Signed-off-by: Hiroshi Doyu <7e37d737f0c384c0dce297667d084735fade9098@nvidia.com>
Acked-by: Russell King <f6aa0246ff943bfa8602cdf60d40c481b38ed232@arm.linux.org.uk>
Signed-off-by: Stephen Warren <5ef2a23ba3aff51d1cfc8c113c1ec34b608b3b13@nvidia.com>
|
C
|
apache-2.0
|
TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,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,TeamVee-Kanas/android_kernel_samsung_kanas
|
65dd7026a906f7a70ef326f18540c0b648a0ffed
|
include/asm-mips/mach-ip22/cpu-feature-overrides.h
|
include/asm-mips/mach-ip22/cpu-feature-overrides.h
|
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 2003 Ralf Baechle
*/
#ifndef __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H
#define __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H
/*
* IP22 with a variety of processors so we can't use defaults for everything.
*/
#define cpu_has_mips16 0
#define cpu_has_divec 0
#define cpu_has_cache_cdex_p 1
#define cpu_has_prefetch 0
#define cpu_has_mcheck 0
#define cpu_has_ejtag 0
#define cpu_has_llsc 1
#define cpu_has_vtag_icache 0 /* Needs to change for R8000 */
#define cpu_has_dc_aliases (PAGE_SIZE < 0x4000)
#define cpu_has_ic_fills_f_dc 0
#define cpu_has_dsp 0
#define cpu_has_nofpuex 0
#define cpu_has_64bits 1
#endif /* __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H */
|
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 2003 Ralf Baechle
*/
#ifndef __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H
#define __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H
/*
* IP22 with a variety of processors so we can't use defaults for everything.
*/
#define cpu_has_tlb 1
#define cpu_has_4kex 1
#define cpu_has_4ktlb 1
#define cpu_has_fpu 1
#define cpu_has_32fpr 1
#define cpu_has_counter 1
#define cpu_has_mips16 0
#define cpu_has_divec 0
#define cpu_has_cache_cdex_p 1
#define cpu_has_prefetch 0
#define cpu_has_mcheck 0
#define cpu_has_ejtag 0
#define cpu_has_llsc 1
#define cpu_has_vtag_icache 0 /* Needs to change for R8000 */
#define cpu_has_dc_aliases (PAGE_SIZE < 0x4000)
#define cpu_has_ic_fills_f_dc 0
#define cpu_has_dsp 0
#define cpu_has_nofpuex 0
#define cpu_has_64bits 1
#endif /* __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H */
|
Define some more common ip22 CPU features.
|
Define some more common ip22 CPU features.
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,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
|
b191a0b5165cd6b4f8103c71719058e7b1869c0e
|
src/net/cearth_network.c
|
src/net/cearth_network.c
|
#include "cearth_network.h"
void
blob_init(blob *b)
{
b->size = 0;
}
void
blob_add_int8(blob *b, int8_t i)
{
b->data[b->size] = i;
b->size++;
}
void
blob_add_str(blob *b, char *str)
{
int len = strlen(str);
strcpy((char *)b->data+b->size, str);
b->size += len;
}
|
#include "cearth_network.h"
|
Remove all trace functions from pre 0.0.1 prototyping
|
Remove all trace functions from pre 0.0.1 prototyping
|
C
|
mit
|
nyanpasu/cearth
|
c162af7b20680c4b1ff45cfb245a2dd8a507c29a
|
ruby/rpm-rb.h
|
ruby/rpm-rb.h
|
#ifndef H_RPM_RB
#define H_RPM_RB
/**
* \file ruby/rpm-rb.h
* \ingroup rb_c
*
* RPM Ruby bindings "RPM" module
*/
#include "system.h"
#include <rpmiotypes.h>
#include <rpmtypes.h>
#include <rpmtag.h>
#undef xmalloc
#undef xcalloc
#undef xrealloc
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
#include <ruby.h>
#pragma GCC diagnostic warning "-Wstrict-prototypes"
/**
* The "RPM" Ruby module.
*/
extern VALUE rpmModule;
#ifdef __cplusplus
extern "C" {
#endif
/**
* Defines the "RPM" Ruby module and makes it known to the Interpreter.
*/
void Init_rpm(void);
/**
* Raises a Ruby exception (RPM::Error).
*
* @param error The return code leading to the exception
* @param message A message to include in the exception.
*/
void rpm_rb_raise(rpmRC error, char *message);
#ifdef __cplusplus
}
#endif
#endif /* H_RPM_RB */
|
#ifndef H_RPM_RB
#define H_RPM_RB
/**
* \file ruby/rpm-rb.h
* \ingroup rb_c
*
* RPM Ruby bindings "RPM" module
*/
#include "system.h"
#include <rpmiotypes.h>
#include <rpmtypes.h>
#include <rpmtag.h>
/**
* The "RPM" Ruby module.
*/
extern VALUE rpmModule;
#ifdef __cplusplus
extern "C" {
#endif
/**
* Defines the "RPM" Ruby module and makes it known to the Interpreter.
*/
void Init_rpm(void);
/**
* Raises a Ruby exception (RPM::Error).
*
* @param error The return code leading to the exception
* @param message A message to include in the exception.
*/
void rpm_rb_raise(rpmRC error, char *message);
#ifdef __cplusplus
}
#endif
#endif /* H_RPM_RB */
|
Fix header file inclusion/define problems with xmalloc & Co and ruby
|
Fix header file inclusion/define problems with xmalloc & Co and ruby
|
C
|
lgpl-2.1
|
devzero2000/RPM5,devzero2000/RPM5,devzero2000/RPM5,devzero2000/RPM5,devzero2000/RPM5,devzero2000/RPM5,devzero2000/RPM5
|
697549c5dc3f200b4bc13971fe4cc19aa4bd2c74
|
include/rsa.h
|
include/rsa.h
|
#ifndef _RSA_H_
#define _RSA_H_
#include "mpi.h"
/* Everything must be kept private except for n and e.
* (n,e) is the public key, (n,d) is the private key. */
typedef struct {
mpi_t n; /* modulus n = pq */
mpi_t phi; /* phi = (p-1)(q-1) */
mpi_t e; /* public exponent 1 < e < phi s.t. gcd(e,phi)=1 */
mpi_t d; /* secret exponent 1 < d < phi s.t. ed=1 (mod phi) */
} rsa_ctx;
void rsa_init(rsa_ctx *rsa, unsigned bits, mp_rand_ctx *rand_ctx);
void rsa_free(rsa_ctx *rsa);
/* Transform cleartext into encrypted data. */
void rsa_encrypt(rsa_ctx *ctx, const void *input, unsigned input_size,
void *output, unsigned *output_size);
/* Transform encrypted data back to cleartext. */
void rsa_decrypt(rsa_ctx *ctx, const void *input, unsigned input_size,
void *output, unsigned *output_size);
#endif /* !_RSA_H_ */
|
#ifndef _RSA_H_
#define _RSA_H_
#include "mpi.h"
/* Everything must be kept private except for n and e.
* (n,e) is the public key, (n,d) is the private key. */
typedef struct {
mpi_t n; /* modulus n = pq */
mpi_t phi; /* phi = (p-1)(q-1) */
mpi_t e; /* public exponent 1 < e < phi s.t. gcd(e,phi)=1 */
mpi_t d; /* secret exponent 1 < d < phi s.t. ed=1 (mod phi) */
} rsa_ctx;
void rsa_init(rsa_ctx *rsa, unsigned bits, mt64_context *rand_ctx);
void rsa_free(rsa_ctx *rsa);
/* Transform cleartext into encrypted data. */
void rsa_encrypt(rsa_ctx *ctx, const void *input, unsigned input_size,
void *output, unsigned *output_size);
/* Transform encrypted data back to cleartext. */
void rsa_decrypt(rsa_ctx *ctx, const void *input, unsigned input_size,
void *output, unsigned *output_size);
#endif /* !_RSA_H_ */
|
Use mt64_context instead of mp_rand_ctx
|
Use mt64_context instead of mp_rand_ctx
|
C
|
bsd-2-clause
|
fmela/weecrypt,fmela/weecrypt
|
c06b5c5985127d50d137673e5862909e07b590a6
|
inspector/ios-inspector/ForgeModule/file/file_API.h
|
inspector/ios-inspector/ForgeModule/file/file_API.h
|
//
// file_API.h
// Forge
//
// Copyright (c) 2020 Trigger Corp. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface file_API : NSObject
+ (void)getImage:(ForgeTask*)task;
+ (void)getVideo:(ForgeTask*)task;
+ (void)getFileFromSourceDirectory:(ForgeTask*)task resource:(NSString*)resource;
+ (void)getURLFromSourceDirectory:(ForgeTask*)task resource:(NSString*)resource;
+ (void)getScriptPath:(ForgeTask*)task file:(NSDictionary*)file;
+ (void)getScriptURL:(ForgeTask*)task file:(NSDictionary*)file;
+ (void)isFile:(ForgeTask*)task file:(NSDictionary*)file;
+ (void)info:(ForgeTask*)task file:(NSDictionary*)file;
+ (void)base64:(ForgeTask*)task file:(NSDictionary*)file;
+ (void)string:(ForgeTask*)task file:(NSDictionary*)file;
+ (void)remove:(ForgeTask*)task file:(NSDictionary*)file;
+ (void)cacheURL:(ForgeTask*)task url:(NSString*)url;
+ (void)saveURL:(ForgeTask*)task url:(NSString*)url;
+ (void)clearCache:(ForgeTask*)task;
+ (void)getStorageSizeInformation:(ForgeTask*)task;
@end
|
//
// file_API.h
// Forge
//
// Copyright (c) 2020 Trigger Corp. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface file_API : NSObject
+ (void)getImage:(ForgeTask*)task;
+ (void)getVideo:(ForgeTask*)task;
+ (void)getFileFromSourceDirectory:(ForgeTask*)task resource:(NSString*)resource;
+ (void)getURLFromSourceDirectory:(ForgeTask*)task resource:(NSString*)resource;
+ (void)getScriptPath:(ForgeTask*)task file:(NSDictionary*)file;
+ (void)getScriptURL:(ForgeTask*)task file:(NSDictionary*)file;
+ (void)exists:(ForgeTask*)task file:(NSDictionary*)file;
+ (void)info:(ForgeTask*)task file:(NSDictionary*)file;
+ (void)base64:(ForgeTask*)task file:(NSDictionary*)file;
+ (void)string:(ForgeTask*)task file:(NSDictionary*)file;
+ (void)remove:(ForgeTask*)task file:(NSDictionary*)file;
+ (void)cacheURL:(ForgeTask*)task url:(NSString*)url;
+ (void)saveURL:(ForgeTask*)task url:(NSString*)url;
+ (void)clearCache:(ForgeTask*)task;
+ (void)getStorageSizeInformation:(ForgeTask*)task;
@end
|
Rename isFile -> exists in header file too
|
Rename isFile -> exists in header file too
|
C
|
bsd-2-clause
|
trigger-corp/trigger.io-file,trigger-corp/trigger.io-file
|
7603c10e309db118e06cef5c998d7d16c0218e98
|
src/models/src/NIMutableTableViewModel+Private.h
|
src/models/src/NIMutableTableViewModel+Private.h
|
//
// Copyright 2011-2014 NimbusKit
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#import "NIMutableTableViewModel.h"
@interface NIMutableTableViewModel (Private)
@property (nonatomic, strong) NSMutableArray* sections; // Array of NITableViewModelSection
@property (nonatomic, strong) NSMutableArray* sectionIndexTitles;
@property (nonatomic, strong) NSMutableDictionary* sectionPrefixToSectionIndex;
@end
@interface NITableViewModelSection (Mutable)
- (NSMutableArray *)mutableRows;
@end
|
//
// Copyright 2011-2014 NimbusKit
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#import "NIMutableTableViewModel.h"
#import "NITableViewModel+Private.h"
@interface NIMutableTableViewModel (Private)
@property (nonatomic, strong) NSMutableArray* sections; // Array of NITableViewModelSection
@property (nonatomic, strong) NSMutableArray* sectionIndexTitles;
@property (nonatomic, strong) NSMutableDictionary* sectionPrefixToSectionIndex;
@end
@interface NITableViewModelSection (Mutable)
- (NSMutableArray *)mutableRows;
@end
|
Add proper import for NIMutableViewModel
|
Add proper import for NIMutableViewModel
|
C
|
apache-2.0
|
kisekied/nimbus,chanffdavid/nimbus,quyixia/nimbus,panume/nimbus,JyHu/nimbus,Arcank/nimbus,bangquangvn/nimbus,bogardon/nimbus,michaelShab/nimbus,marcobgoogle/nimbus,dmishe/nimbus,dachaoisme/nimbus,dmishe/nimbus,zilaiyedaren/nimbus,bangquangvn/nimbus,Arcank/nimbus,panume/nimbus,zilaiyedaren/nimbus,quyixia/nimbus,dachaoisme/nimbus,bogardon/nimbus,chanffdavid/nimbus,marcobgoogle/nimbus,kisekied/nimbus,dmishe/nimbus,quyixia/nimbus,dachaoisme/nimbus,jverkoey/nimbus,bogardon/nimbus,JyHu/nimbus,Arcank/nimbus,bangquangvn/nimbus,michaelShab/nimbus,kisekied/nimbus,compositeprimes/nimbus,WeeTom/nimbus,zilaiyedaren/nimbus,marcobgoogle/nimbus,dmishe/nimbus,marcobgoogle/nimbus,jverkoey/nimbus,WeeTom/nimbus,compositeprimes/nimbus,zilaiyedaren/nimbus,bangquangvn/nimbus,Arcank/nimbus,quyixia/nimbus,dachaoisme/nimbus,JyHu/nimbus,panume/nimbus,panume/nimbus,WeeTom/nimbus,michaelShab/nimbus,bogardon/nimbus,quyixia/nimbus,jverkoey/nimbus,quyixia/nimbus,panume/nimbus,compositeprimes/nimbus,bangquangvn/nimbus,JyHu/nimbus,bogardon/nimbus,WeeTom/nimbus,JyHu/nimbus,marcobgoogle/nimbus,WeeTom/nimbus,dmishe/nimbus,jverkoey/nimbus,jverkoey/nimbus,bogardon/nimbus,JyHu/nimbus,compositeprimes/nimbus,Arcank/nimbus,jverkoey/nimbus,chanffdavid/nimbus,chanffdavid/nimbus,compositeprimes/nimbus,kisekied/nimbus,chanffdavid/nimbus,marcobgoogle/nimbus,chanffdavid/nimbus,compositeprimes/nimbus,Arcank/nimbus,quyixia/nimbus,panume/nimbus,marcobgoogle/nimbus,kisekied/nimbus,Arcank/nimbus,dachaoisme/nimbus,michaelShab/nimbus,michaelShab/nimbus,bogardon/nimbus,kisekied/nimbus,bangquangvn/nimbus,michaelShab/nimbus,dmishe/nimbus,zilaiyedaren/nimbus,JyHu/nimbus,compositeprimes/nimbus,WeeTom/nimbus,zilaiyedaren/nimbus,jverkoey/nimbus,dachaoisme/nimbus
|
230ea3b21a8daabde9b2e0dcd93dedb5b5a87003
|
ppapi/native_client/src/shared/ppapi_proxy/ppruntime.h
|
ppapi/native_client/src/shared/ppapi_proxy/ppruntime.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 NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PPRUNTIME_H_
#define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PPRUNTIME_H_
#include "native_client/src/include/portability.h"
#include "native_client/src/untrusted/irt/irt_ppapi.h"
EXTERN_C_BEGIN
// Initialize srpc connection to the browser. Some APIs like manifest file
// opening do not need full ppapi initialization and so can be used after
// this function returns.
int IrtInit(void);
// The entry point for the main thread of the PPAPI plugin process.
int PpapiPluginMain(void);
void PpapiPluginRegisterThreadCreator(
const struct PP_ThreadFunctions* new_funcs);
EXTERN_C_END
#endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PPRUNTIME_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 NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PPRUNTIME_H_
#define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PPRUNTIME_H_
#include "native_client/src/include/portability.h"
#include "native_client/src/untrusted/irt/irt_ppapi.h"
EXTERN_C_BEGIN
// The entry point for the main thread of the PPAPI plugin process.
int PpapiPluginMain(void);
void PpapiPluginRegisterThreadCreator(
const struct PP_ThreadFunctions* new_funcs);
EXTERN_C_END
#endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PPRUNTIME_H_
|
Remove declaration of IrtInit(), which is no longer defined anywhere
|
NaCl: Remove declaration of IrtInit(), which is no longer defined anywhere
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3186
TEST=build
Review URL: https://codereview.chromium.org/157803004
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@250121 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
Jonekee/chromium.src,jaruba/chromium.src,Jonekee/chromium.src,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,patrickm/chromium.src,littlstar/chromium.src,Fireblend/chromium-crosswalk,Chilledheart/chromium,dushu1203/chromium.src,Fireblend/chromium-crosswalk,dednal/chromium.src,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,patrickm/chromium.src,M4sse/chromium.src,M4sse/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,M4sse/chromium.src,anirudhSK/chromium,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,dushu1203/chromium.src,ltilve/chromium,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,axinging/chromium-crosswalk,patrickm/chromium.src,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,ltilve/chromium,M4sse/chromium.src,chuan9/chromium-crosswalk,patrickm/chromium.src,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,patrickm/chromium.src,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,Chilledheart/chromium,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,ltilve/chromium,M4sse/chromium.src,jaruba/chromium.src,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,Just-D/chromium-1,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,krieger-od/nwjs_chromium.src,anirudhSK/chromium,Just-D/chromium-1,chuan9/chromium-crosswalk,dednal/chromium.src,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,markYoungH/chromium.src,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,patrickm/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,dushu1203/chromium.src,Jonekee/chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,dushu1203/chromium.src,littlstar/chromium.src,chuan9/chromium-crosswalk,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,ondra-novak/chromium.src,ltilve/chromium,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,dednal/chromium.src,axinging/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,fujunwei/chromium-crosswalk,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,dushu1203/chromium.src,littlstar/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,bright-sparks/chromium-spacewalk,Chilledheart/chromium,Chilledheart/chromium,ondra-novak/chromium.src,markYoungH/chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,chuan9/chromium-crosswalk,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,littlstar/chromium.src,anirudhSK/chromium,littlstar/chromium.src,jaruba/chromium.src,ltilve/chromium,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,hgl888/chromium-crosswalk,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,ltilve/chromium,Chilledheart/chromium,markYoungH/chromium.src,jaruba/chromium.src,anirudhSK/chromium,Chilledheart/chromium,chuan9/chromium-crosswalk,ondra-novak/chromium.src,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,fujunwei/chromium-crosswalk,jaruba/chromium.src,ondra-novak/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,Jonekee/chromium.src,anirudhSK/chromium,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,anirudhSK/chromium,Just-D/chromium-1,patrickm/chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,littlstar/chromium.src,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,dednal/chromium.src,ondra-novak/chromium.src,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Just-D/chromium-1,Just-D/chromium-1,ondra-novak/chromium.src,M4sse/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk
|
af7220c2bebbcc2f1c49ec190d26724a0c4aed25
|
drivers/sds011/sds011_saul.c
|
drivers/sds011/sds011_saul.c
|
/*
* Copyright (C) 2018 HAW-Hamburg
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*
*/
/**
* @ingroup drivers_sds011
* @{
*
* @file
* @brief SAUL adaption for SDS011 sensor
*
* @author Michel Rottleuthner <michel.rottleuthner@haw-hamburg.de>
*
* @}
*/
#include <string.h>
#include "saul.h"
#include "sds011.h"
#include "xtimer.h"
static int _read(const void *dev, phydat_t *res)
{
sds011_data_t data;
if (sds011_read((sds011_t *)dev, &data) == SDS011_OK) {
res->val[0] = data.pm_2_5;
res->val[1] = data.pm_10;
res->unit = UNIT_GPM3;
res->scale = -7;
return 2;
}
return ECANCELED;
}
const saul_driver_t sds011_saul_driver = {
.read = _read,
.write = saul_notsup,
.type = SAUL_SENSE_PM
};
|
/*
* Copyright (C) 2018 HAW-Hamburg
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*
*/
/**
* @ingroup drivers_sds011
* @{
*
* @file
* @brief SAUL adaption for SDS011 sensor
*
* @author Michel Rottleuthner <michel.rottleuthner@haw-hamburg.de>
*
* @}
*/
#include <string.h>
#include "saul.h"
#include "sds011.h"
#include "xtimer.h"
static int _read(const void *dev, phydat_t *res)
{
sds011_data_t data;
if (sds011_read((sds011_t *)dev, &data) == SDS011_OK) {
res->val[0] = data.pm_2_5;
res->val[1] = data.pm_10;
res->unit = UNIT_GPM3;
res->scale = -7;
return 2;
}
return -ECANCELED;
}
const saul_driver_t sds011_saul_driver = {
.read = _read,
.write = saul_notsup,
.type = SAUL_SENSE_PM
};
|
Fix SAUL read error return
|
drivers/sds011: Fix SAUL read error return
|
C
|
lgpl-2.1
|
RIOT-OS/RIOT,cladmi/RIOT,OlegHahm/RIOT,authmillenon/RIOT,authmillenon/RIOT,rfuentess/RIOT,josephnoir/RIOT,yogo1212/RIOT,smlng/RIOT,josephnoir/RIOT,mfrey/RIOT,cladmi/RIOT,x3ro/RIOT,A-Paul/RIOT,mtausig/RIOT,BytesGalore/RIOT,smlng/RIOT,toonst/RIOT,mfrey/RIOT,RIOT-OS/RIOT,OlegHahm/RIOT,yogo1212/RIOT,kaspar030/RIOT,ant9000/RIOT,rfuentess/RIOT,aeneby/RIOT,OlegHahm/RIOT,toonst/RIOT,x3ro/RIOT,yogo1212/RIOT,kYc0o/RIOT,A-Paul/RIOT,ant9000/RIOT,mtausig/RIOT,toonst/RIOT,BytesGalore/RIOT,authmillenon/RIOT,A-Paul/RIOT,kaspar030/RIOT,mfrey/RIOT,cladmi/RIOT,mtausig/RIOT,josephnoir/RIOT,josephnoir/RIOT,miri64/RIOT,kYc0o/RIOT,smlng/RIOT,BytesGalore/RIOT,ant9000/RIOT,miri64/RIOT,lazytech-org/RIOT,kYc0o/RIOT,cladmi/RIOT,kYc0o/RIOT,rfuentess/RIOT,jasonatran/RIOT,rfuentess/RIOT,OlegHahm/RIOT,basilfx/RIOT,authmillenon/RIOT,cladmi/RIOT,jasonatran/RIOT,lazytech-org/RIOT,toonst/RIOT,lazytech-org/RIOT,OTAkeys/RIOT,RIOT-OS/RIOT,yogo1212/RIOT,jasonatran/RIOT,aeneby/RIOT,ant9000/RIOT,kaspar030/RIOT,basilfx/RIOT,authmillenon/RIOT,mtausig/RIOT,A-Paul/RIOT,x3ro/RIOT,josephnoir/RIOT,OTAkeys/RIOT,x3ro/RIOT,kaspar030/RIOT,mfrey/RIOT,toonst/RIOT,basilfx/RIOT,lazytech-org/RIOT,yogo1212/RIOT,aeneby/RIOT,OTAkeys/RIOT,aeneby/RIOT,miri64/RIOT,RIOT-OS/RIOT,jasonatran/RIOT,basilfx/RIOT,jasonatran/RIOT,RIOT-OS/RIOT,authmillenon/RIOT,kYc0o/RIOT,OTAkeys/RIOT,A-Paul/RIOT,OlegHahm/RIOT,OTAkeys/RIOT,x3ro/RIOT,rfuentess/RIOT,smlng/RIOT,miri64/RIOT,yogo1212/RIOT,mtausig/RIOT,smlng/RIOT,basilfx/RIOT,BytesGalore/RIOT,miri64/RIOT,aeneby/RIOT,kaspar030/RIOT,mfrey/RIOT,BytesGalore/RIOT,lazytech-org/RIOT,ant9000/RIOT
|
07bf91bd54bf71c4431072091b725f7b2efcea4c
|
mcp2515_dfs.h
|
mcp2515_dfs.h
|
#ifndef MCP2515_LIB_DEFINITIONS_H_
#define MCP2515_LIB_DEFINITIONS_H_
/*******************************************************************************
SPI Commands
*******************************************************************************/
#define SPI_READ 0x03
/*******************************************************************************
Register Addresses - specific info about each register can be found in the
datasheet.
*******************************************************************************/
#define CANINTF 0x2C
/*******************************************************************************
Interrupt Flag Bit Masks - each bit mask aligns with a position in the CANINTF
register. Specific info about each flag can be found in the datasheet.
*******************************************************************************/
#define MERRF 0x80
#define WAKIF 0x40
#define ERRIF 0x20
#define TX2IF 0x10
#define TX1IF 0x08
#define TX0IF 0x04
#define RX1IF 0x02
#define RX0IF 0x01
/*******************************************************************************
Flag Test Macro - determines whether the specified flag is set.
- flags: a value read from the CANINTF register
- bit_mask: one of the Interrupt Flag Bit Masks
*******************************************************************************/
#define IS_FLAG_SET(flags, bit_mask) (flags & bit_mask)
#endif
|
#ifndef MCP2515_LIB_DEFINITIONS_H_
#define MCP2515_LIB_DEFINITIONS_H_
/*******************************************************************************
SPI Commands
*******************************************************************************/
#define SPI_READ 0x03
#define SPI_BIT_MODIFY 0x05
/*******************************************************************************
Register Addresses - specific info about each register can be found in the
datasheet.
*******************************************************************************/
#define CANINTF 0x2C
/*******************************************************************************
Interrupt Flag Bit Masks - each bit mask aligns with a position in the CANINTF
register. Specific info about each flag can be found in the datasheet.
*******************************************************************************/
#define MERRF 0x80
#define WAKIF 0x40
#define ERRIF 0x20
#define TX2IF 0x10
#define TX1IF 0x08
#define TX0IF 0x04
#define RX1IF 0x02
#define RX0IF 0x01
/*******************************************************************************
Flag Test Macro - determines whether the specified flag is set.
- flags: a value read from the CANINTF register
- bit_mask: one of the Interrupt Flag Bit Masks
*******************************************************************************/
#define IS_FLAG_SET(flags, bit_mask) (flags & bit_mask)
#endif
|
Add SPI bit modify command definition
|
Add SPI bit modify command definition
|
C
|
apache-2.0
|
jnod/mcp2515_lib,jnod/mcp2515_lib
|
67189e4682c9f0a3b7aeffdea5d05cd39ec5f5c5
|
cmd/gvedit/csettings.h
|
cmd/gvedit/csettings.h
|
#ifndef CSETTINGS_H
#define CSETTINGS_H
class MdiChild;
#include <QDialog>
#include <QString>
#include "ui_settings.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gvc.h"
#include "gvio.h"
class CFrmSettings : public QDialog
{
Q_OBJECT
public:
CFrmSettings();
int runSettings(MdiChild* m);
int showSettings(MdiChild* m);
int cur;
int drawGraph();
MdiChild* getActiveWindow();
QString graphData;
private slots:
void outputSlot();
void addSlot();
void helpSlot();
void cancelSlot();
void okSlot();
void newSlot();
void openSlot();
void saveSlot();
private:
//Actions
Agraph_t* graph;
MdiChild* activeWindow;
GVC_t* gvc;
QAction* outputAct;
QAction* addAct;
QAction* helpAct;
QAction* cancelAct;
QAction* okAct;
QAction* newAct;
QAction* openAct;
QAction* saveAct;
//METHODS
QString buildOutputFile(QString _fileName);
void addAttribute(QString _scope,QString _name,QString _value);
bool loadLayouts();
bool loadRenderers();
void refreshContent();
void saveContent();
void setActiveWindow(MdiChild* m);
bool loadGraph(MdiChild* m);
bool createLayout();
bool renderLayout();
};
#endif
|
#ifndef CSETTINGS_H
#define CSETTINGS_H
class MdiChild;
#include <QDialog>
#include <QString>
#include "ui_settings.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gvc.h"
/* #include "gvio.h" */
class CFrmSettings : public QDialog
{
Q_OBJECT
public:
CFrmSettings();
int runSettings(MdiChild* m);
int showSettings(MdiChild* m);
int cur;
int drawGraph();
MdiChild* getActiveWindow();
QString graphData;
private slots:
void outputSlot();
void addSlot();
void helpSlot();
void cancelSlot();
void okSlot();
void newSlot();
void openSlot();
void saveSlot();
private:
//Actions
Agraph_t* graph;
MdiChild* activeWindow;
GVC_t* gvc;
QAction* outputAct;
QAction* addAct;
QAction* helpAct;
QAction* cancelAct;
QAction* okAct;
QAction* newAct;
QAction* openAct;
QAction* saveAct;
//METHODS
QString buildOutputFile(QString _fileName);
void addAttribute(QString _scope,QString _name,QString _value);
bool loadLayouts();
bool loadRenderers();
void refreshContent();
void saveContent();
void setActiveWindow(MdiChild* m);
bool loadGraph(MdiChild* m);
bool createLayout();
bool renderLayout();
};
#endif
|
Comment out unnecessary use of gvio.h
|
Comment out unnecessary use of gvio.h
|
C
|
epl-1.0
|
jho1965us/graphviz,pixelglow/graphviz,MjAbuz/graphviz,pixelglow/graphviz,MjAbuz/graphviz,jho1965us/graphviz,kbrock/graphviz,BMJHayward/graphviz,tkelman/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,jho1965us/graphviz,jho1965us/graphviz,MjAbuz/graphviz,pixelglow/graphviz,BMJHayward/graphviz,tkelman/graphviz,ellson/graphviz,jho1965us/graphviz,tkelman/graphviz,ellson/graphviz,MjAbuz/graphviz,tkelman/graphviz,tkelman/graphviz,jho1965us/graphviz,BMJHayward/graphviz,ellson/graphviz,tkelman/graphviz,kbrock/graphviz,tkelman/graphviz,jho1965us/graphviz,ellson/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,kbrock/graphviz,kbrock/graphviz,jho1965us/graphviz,pixelglow/graphviz,jho1965us/graphviz,BMJHayward/graphviz,pixelglow/graphviz,ellson/graphviz,pixelglow/graphviz,ellson/graphviz,kbrock/graphviz,MjAbuz/graphviz,pixelglow/graphviz,kbrock/graphviz,BMJHayward/graphviz,ellson/graphviz,ellson/graphviz,pixelglow/graphviz,BMJHayward/graphviz,kbrock/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,ellson/graphviz,kbrock/graphviz,tkelman/graphviz,tkelman/graphviz,pixelglow/graphviz,kbrock/graphviz,ellson/graphviz,jho1965us/graphviz,tkelman/graphviz,kbrock/graphviz,MjAbuz/graphviz,pixelglow/graphviz,jho1965us/graphviz,MjAbuz/graphviz,ellson/graphviz,kbrock/graphviz,tkelman/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,pixelglow/graphviz,MjAbuz/graphviz
|
861e37ad5969f764574722f4cfc0734511cbac7f
|
include/asm-arm/mach/flash.h
|
include/asm-arm/mach/flash.h
|
/*
* linux/include/asm-arm/mach/flash.h
*
* Copyright (C) 2003 Russell King, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef ASMARM_MACH_FLASH_H
#define ASMARM_MACH_FLASH_H
struct mtd_partition;
/*
* map_name: the map probe function name
* name: flash device name (eg, as used with mtdparts=)
* width: width of mapped device
* init: method called at driver/device initialisation
* exit: method called at driver/device removal
* set_vpp: method called to enable or disable VPP
* parts: optional array of mtd_partitions for static partitioning
* nr_parts: number of mtd_partitions for static partitoning
*/
struct flash_platform_data {
const char *map_name;
const char *name;
unsigned int width;
int (*init)(void);
void (*exit)(void);
void (*set_vpp)(int on);
struct mtd_partition *parts;
unsigned int nr_parts;
};
#endif
|
/*
* linux/include/asm-arm/mach/flash.h
*
* Copyright (C) 2003 Russell King, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef ASMARM_MACH_FLASH_H
#define ASMARM_MACH_FLASH_H
struct mtd_partition;
struct mtd_info;
/*
* map_name: the map probe function name
* name: flash device name (eg, as used with mtdparts=)
* width: width of mapped device
* init: method called at driver/device initialisation
* exit: method called at driver/device removal
* set_vpp: method called to enable or disable VPP
* mmcontrol: method called to enable or disable Sync. Burst Read in OneNAND
* parts: optional array of mtd_partitions for static partitioning
* nr_parts: number of mtd_partitions for static partitoning
*/
struct flash_platform_data {
const char *map_name;
const char *name;
unsigned int width;
int (*init)(void);
void (*exit)(void);
void (*set_vpp)(int on);
void (*mmcontrol)(struct mtd_info *mtd, int sync_read);
struct mtd_partition *parts;
unsigned int nr_parts;
};
#endif
|
Add memory control method to support OneNAND sync burst read
|
[ARM] 3057/1: Add memory control method to support OneNAND sync burst read
Patch from Kyungmin Park
This patch is required for OneNAND MTD to passing the OneNAND sync. burst read
Signed-off-by: Kyungmin Park
Signed-off-by: Russell King <f6aa0246ff943bfa8602cdf60d40c481b38ed232@arm.linux.org.uk>
|
C
|
apache-2.0
|
TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
|
6dcac4a16d43bc76b5e4492233cd170699f30875
|
CollapsibleTable/GWCollapsibleTable/GWCollapsibleTable.h
|
CollapsibleTable/GWCollapsibleTable/GWCollapsibleTable.h
|
//
// GWCollapsibleTable.h
// CollapsibleTable
//
// Created by Greg Wang on 13-1-3.
// Copyright (c) 2013年 Greg Wang. All rights reserved.
//
@protocol GWCollapsibleTableDataSource <NSObject>
- (BOOL)tableView:(UITableView *)tableView canCollapseSection:(NSInteger)section;
- (UITableViewCell *)tableView:(UITableView *)tableView headerCellForCollapsibleSection:(NSInteger)section;
- (UITableViewCell *)tableView:(UITableView *)tableView bodyCellForRowAtIndexPath:(NSIndexPath *)indexPath;
- (NSInteger)tableView:(UITableView *)tableView numberOfBodyRowsInSection:(NSInteger)section;
// TODO: Support Editing & Reordering Methods
@end
@protocol GWCollapsibleTableDelegate <NSObject>
- (void)tableView:(UITableView *)tableView didSelectBodyRowAtIndexPath:(NSIndexPath *)indexPath;
// TODO: Support Extra Selection Management Methods
// TODO: Support Editing & Reordering Methods
@end
|
//
// GWCollapsibleTable.h
// CollapsibleTable
//
// Created by Greg Wang on 13-1-3.
// Copyright (c) 2013年 Greg Wang. All rights reserved.
//
#import "NSObject+GWCollapsibleTable.h"
#import "UITableView+GWCollapsibleTable.h"
@protocol GWCollapsibleTableDataSource <NSObject>
- (BOOL)tableView:(UITableView *)tableView canCollapseSection:(NSInteger)section;
- (UITableViewCell *)tableView:(UITableView *)tableView headerCellForCollapsibleSection:(NSInteger)section;
- (UITableViewCell *)tableView:(UITableView *)tableView bodyCellForRowAtIndexPath:(NSIndexPath *)indexPath;
- (NSInteger)tableView:(UITableView *)tableView numberOfBodyRowsInSection:(NSInteger)section;
// TODO: Support Editing & Reordering Methods
@end
@protocol GWCollapsibleTableDelegate <NSObject>
- (void)tableView:(UITableView *)tableView didSelectBodyRowAtIndexPath:(NSIndexPath *)indexPath;
@optional
- (void)tableView:(UITableView *)tableView willExpandSection:(NSInteger)section;
- (void)tableView:(UITableView *)tableView willCollapseSection:(NSInteger)section;
// TODO: Support Extra Selection Management Methods
// TODO: Support Editing & Reordering Methods
@end
|
Add necessary interfaces Add optional delegate methods
|
Add necessary interfaces
Add optional delegate methods
|
C
|
mit
|
yocaminobien/GWCollapsibleTable,gregwym/GWCollapsibleTable
|
61768b0b8e04f3a2c8353db4c2e332b499a5c03a
|
Test/MathLib.h
|
Test/MathLib.h
|
#pragma once
//MathLib.h
#ifndef _MATHLIB_
#define _MATHLIB_
#endif
|
#pragma once
//MathLib.h
#ifndef _MATHLIB_
#define _MATHLIB_
//Make some change to check if new branch is created.
#endif
|
Make some change to check if new branch is created.
|
Make some change to check if new branch is created.
|
C
|
mit
|
mrlitong/fpsgame,mrlitong/fpsgame,mrlitong/Game-Engine-Development-Usage,mrlitong/fpsgame
|
7fb448ae7e6ad876b225f67d8ef064a0f93e0988
|
src/medida/reporting/abstract_polling_reporter.h
|
src/medida/reporting/abstract_polling_reporter.h
|
//
// Copyright (c) 2012 Daniel Lundin
//
#ifndef MEDIDA_REPORTING_ABSTRACT_POLLING_REPORTER_H_
#define MEDIDA_REPORTING_ABSTRACT_POLLING_REPORTER_H_
#include <memory>
#include "medida/types.h"
namespace medida {
namespace reporting {
class AbstractPollingReporter {
public:
AbstractPollingReporter();
virtual ~AbstractPollingReporter();
virtual void Shutdown();
virtual void Start(Clock::duration period = std::chrono::seconds(5));
virtual void Run();
private:
class Impl;
std::unique_ptr<Impl> impl_;
};
}
}
#endif // MEDIDA_REPORTING_ABSTRACT_POLLING_REPORTER_H_
|
//
// Copyright (c) 2012 Daniel Lundin
//
#ifndef MEDIDA_REPORTING_ABSTRACT_POLLING_REPORTER_H_
#define MEDIDA_REPORTING_ABSTRACT_POLLING_REPORTER_H_
#include <memory>
#include "medida/types.h"
namespace medida {
namespace reporting {
class AbstractPollingReporter {
public:
AbstractPollingReporter();
virtual ~AbstractPollingReporter();
virtual void Shutdown();
// start should never be called after calling shutdown on this class
// (behavior if start after shutdown is undefined).
virtual void Start(Clock::duration period = std::chrono::seconds(5));
virtual void Run();
private:
class Impl;
std::unique_ptr<Impl> impl_;
};
}
}
#endif // MEDIDA_REPORTING_ABSTRACT_POLLING_REPORTER_H_
|
Comment on abstract-polling-reporter to handle the shutdown followed by start racing to modify thread before it can be joined, it is not a valid usecase anyway, so handling it thru comment.
|
Comment on abstract-polling-reporter to handle the shutdown followed by start racing to modify thread before it can be joined, it is not a valid usecase anyway, so handling it thru comment.
|
C
|
apache-2.0
|
janmejay/medida,janmejay/medida,janmejay/medida,janmejay/medida
|
6e8f38b090c65c05dbcd4496081c5b4a09e0e375
|
include/zephyr/CExport.h
|
include/zephyr/CExport.h
|
#ifndef ZEPHYR_CEXPORT_H
#define ZEPHYR_CEXPORT_H
#ifdef __cplusplus
#define Z_VAR(ns, n) n
#else
#define Z_VAR(ns, n) ns ## _ ## n
#endif
#ifdef __cplusplus
#define Z_NS_START(n) namespace n {
#define Z_NS_END }
#else
#define Z_NS_START(n)
#define Z_NS_END
#endif
#ifdef __cplusplus
#define Z_ENUM_CLASS(ns, n) enum class n
#else
#define Z_ENUM_CLASS(ns, n) enum Z_VAR(ns, n)
#endif
#ifdef __cplusplus
#define Z_ENUM(ns, n) enum n
#else
#define Z_ENUM(ns, n) enum Z_VAR(ns, n)
#endif
#ifdef __cplusplus
#define Z_STRUCT(ns, n) struct n
#else
#define Z_STRUCT(ns, n) struct Z_VAR(ns, n)
#endif
#endif
|
#ifndef ZEPHYR_CEXPORT_H
#define ZEPHYR_CEXPORT_H
/* declare a namespaced name */
#ifdef __cplusplus
#define ZD(ns)
#else
#define ZD(ns) ns_
#endif
/* use a namespaced name */
#ifdef __cplusplus
#define ZU(ns) ns::
#else
#define ZU(ns) ns_
#endif
/* declare a namespace */
#ifdef __cplusplus
#define Z_NS_START(n) namespace n {
#define Z_NS_END }
#else
#define Z_NS_START(n)
#define Z_NS_END
#endif
/* enum class vs enum */
#ifdef __cplusplus
#define Z_ENUM_CLASS enum class
#else
#define Z_ENUM_CLASS enum
#endif
#endif
|
Move to namespace include/use model
|
Move to namespace include/use model
Now if you want to declare a namespaced name, use ZD()
If you want to use a namesapce name, use ZU()
|
C
|
mit
|
DeonPoncini/zephyr
|
000ad953336509328f3540237d568f1387511943
|
include/graph.h
|
include/graph.h
|
#ifndef __GRAPH_H__
#define __GRAPH_H__
#include "resources.h"
class graph {
private: //For data structures
struct vertex;
struct edge {
vertex *endpoint;
edge *opposite_edge, *next_edge;
double direction;
bool in_tree;
uint index;
conductor_info elect_info;
edge();
};
struct vertex {
edge *first_edge;
bool bfs_mark;
vertex();
};
vertex *vertex_memory_pool;
edge *edge_memory_pool;
uint vertex_number, edge_number;
private: //For internal functions
void add_edge(edge *, vertex *, vertex *, conductor_info, char, uint);
void find_tree_path(vertex *, vertex *, std::vector<edge *> &);
arma::cx_rowvec flow_conservation_equation(vertex *);
std::pair<arma::cx_rowvec, comp> circular_equation(vertex *, edge *);
void bfs(vertex *, arma::cx_mat &, arma::cx_vec &, uint &);
void find_all_circular(arma::cx_mat &, arma::cx_vec &, uint &);
public: //For user ports
graph(uint, const std::vector<conductor> &);
void get_current(std::vector<comp> &);
~graph();
};
#endif
|
#ifndef __GRAPH_H__
#define __GRAPH_H__
#include "resources.h"
class graph {
private: //For data structures
struct vertex;
struct edge {
vertex *endpoint;
edge *opposite_edge, *next_edge;
double direction;
bool in_tree;
uint index;
conductor_info elect_info;
edge();
};
struct vertex {
edge *first_edge;
bool bfs_mark;
vertex();
};
vertex *vertex_memory_pool;
edge *edge_memory_pool;
uint vertex_number, edge_number;
private: //For internal functions
void add_edge(edge *, vertex *, vertex *, conductor_info, char, uint);
void find_tree_path(uint, vertex *, vertex *, std::vector<edge *> &);
arma::cx_rowvec flow_conservation_equation(vertex *);
std::pair<arma::cx_rowvec, comp> circular_equation(vertex *, edge *);
void bfs(vertex *, arma::cx_mat &, arma::cx_vec &, uint &);
void find_all_circular(arma::cx_mat &, arma::cx_vec &, uint &);
public: //For user ports
graph(uint, const std::vector<conductor> &);
void get_current(std::vector<comp> &);
~graph();
};
#endif
|
Change the function of find_tree_path
|
Change the function of find_tree_path
|
C
|
mit
|
try-skycn/PH116-FinalProject
|
9d0b2b728b9a431546b11252793844bf7506ec84
|
test/Headers/arm-neon-header.c
|
test/Headers/arm-neon-header.c
|
// RUN: %clang_cc1 -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -Wvector-conversions -verify %s
// RUN: %clang_cc1 -x c++ -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -Wvector-conversions -verify %s
#include <arm_neon.h>
// Radar 8228022: Should not report incompatible vector types.
int32x2_t test(int32x2_t x) {
return vshr_n_s32(x, 31);
}
|
// RUN: %clang_cc1 -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -Wvector-conversions -verify %s
// RUN: %clang_cc1 -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -fno-lax-vector-conversions -verify %s
// RUN: %clang_cc1 -x c++ -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -Wvector-conversions -verify %s
#include <arm_neon.h>
// Radar 8228022: Should not report incompatible vector types.
int32x2_t test(int32x2_t x) {
return vshr_n_s32(x, 31);
}
|
Test use of arm_neon.h with -fno-lax-vector-conversions.
|
Test use of arm_neon.h with -fno-lax-vector-conversions.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@120642 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
|
ab2f0f4bc9ca50ccd01cb67194249b5a18b755eb
|
include/jive/vsdg/types.h
|
include/jive/vsdg/types.h
|
#ifndef JIVE_VSDG_TYPES_H
#define JIVE_VSDG_TYPES_H
#include <jive/vsdg/basetype.h>
#include <jive/vsdg/statetype.h>
#include <jive/vsdg/controltype.h>
#endif
|
#ifndef JIVE_VSDG_TYPES_H
#define JIVE_VSDG_TYPES_H
#include <jive/vsdg/basetype.h>
#include <jive/vsdg/statetype.h>
#include <jive/vsdg/controltype.h>
#include <jive/vsdg/valuetype.h>
#endif
|
Add valuetype as "standard" type
|
Add valuetype as "standard" type
Add to vsdg/types.h header to make it available as "standard"
type.
|
C
|
lgpl-2.1
|
phate/jive,phate/jive,phate/jive
|
274b3426db25b8d63cbf25475e728ce1ee6caebd
|
include/net/netevent.h
|
include/net/netevent.h
|
#ifndef _NET_EVENT_H
#define _NET_EVENT_H
/*
* Generic netevent notifiers
*
* Authors:
* Tom Tucker <tom@opengridcomputing.com>
* Steve Wise <swise@opengridcomputing.com>
*
* Changes:
*/
#ifdef __KERNEL__
#include <net/dst.h>
struct netevent_redirect {
struct dst_entry *old;
struct dst_entry *new;
};
enum netevent_notif_type {
NETEVENT_NEIGH_UPDATE = 1, /* arg is struct neighbour ptr */
NETEVENT_PMTU_UPDATE, /* arg is struct dst_entry ptr */
NETEVENT_REDIRECT, /* arg is struct netevent_redirect ptr */
};
extern int register_netevent_notifier(struct notifier_block *nb);
extern int unregister_netevent_notifier(struct notifier_block *nb);
extern int call_netevent_notifiers(unsigned long val, void *v);
#endif
#endif
|
#ifndef _NET_EVENT_H
#define _NET_EVENT_H
/*
* Generic netevent notifiers
*
* Authors:
* Tom Tucker <tom@opengridcomputing.com>
* Steve Wise <swise@opengridcomputing.com>
*
* Changes:
*/
#ifdef __KERNEL__
struct dst_entry;
struct netevent_redirect {
struct dst_entry *old;
struct dst_entry *new;
};
enum netevent_notif_type {
NETEVENT_NEIGH_UPDATE = 1, /* arg is struct neighbour ptr */
NETEVENT_PMTU_UPDATE, /* arg is struct dst_entry ptr */
NETEVENT_REDIRECT, /* arg is struct netevent_redirect ptr */
};
extern int register_netevent_notifier(struct notifier_block *nb);
extern int unregister_netevent_notifier(struct notifier_block *nb);
extern int call_netevent_notifiers(unsigned long val, void *v);
#endif
#endif
|
Remove unnecessary inclusion of dst.h
|
[NET]: Remove unnecessary inclusion of dst.h
The file net/netevent.h only refers to struct dst_entry * so it
doesn't need to include dst.h. I've replaced it with a forward
declaration.
Signed-off-by: Herbert Xu <ef65de1c7be0aa837fe7b25ba9a7739905af6a55@gondor.apana.org.au>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>
|
C
|
mit
|
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs
|
020bf65a067d187bdb2dd54a118f7b3f461535a1
|
include/log.h
|
include/log.h
|
#ifndef LOG_H
#define LOG_H
#include "types.h"
#include <fstream>
class Statement;
class Exp;
class LocationSet;
class RTL;
class Log
{
public:
Log() { }
virtual Log &operator<<(const char *str) = 0;
virtual Log &operator<<(Statement *s);
virtual Log &operator<<(Exp *e);
virtual Log &operator<<(RTL *r);
virtual Log &operator<<(int i);
virtual Log &operator<<(char c);
virtual Log &operator<<(double d);
virtual Log &operator<<(ADDRESS a);
virtual Log &operator<<(LocationSet *l);
Log &operator<<(std::string& s) {return operator<<(s.c_str());}
virtual ~Log() {};
virtual void tail();
};
class FileLogger : public Log {
protected:
std::ofstream out;
public:
FileLogger(); // Implemented in boomerang.cpp
void tail();
virtual Log &operator<<(const char *str) {
out << str << std::flush;
return *this;
}
virtual ~FileLogger() {};
};
#endif
|
#ifndef LOG_H
#define LOG_H
#include "types.h"
#include <fstream>
class Statement;
class Exp;
class LocationSet;
class RTL;
class Log
{
public:
Log() { }
virtual Log &operator<<(const char *str) = 0;
virtual Log &operator<<(Statement *s);
virtual Log &operator<<(Exp *e);
virtual Log &operator<<(RTL *r);
virtual Log &operator<<(int i);
virtual Log &operator<<(char c);
virtual Log &operator<<(double d);
virtual Log &operator<<(ADDRESS a);
virtual Log &operator<<(LocationSet *l);
Log &operator<<(std::string& s) {return operator<<(s.c_str());}
virtual ~Log() {};
virtual void tail();
};
class FileLogger : public Log {
protected:
std::ofstream out;
public:
FileLogger(); // Implemented in boomerang.cpp
void tail();
virtual Log &operator<<(const char *str) {
out << str << std::flush;
return *this;
}
virtual ~FileLogger() {};
};
// For older MSVC compilers
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
static std::ostream& operator<<(std::ostream& s, QWord val)
{
char szTmp[42]; // overkill, but who counts
sprintf(szTmp, "%I64u", val);
s << szTmp;
return s;
}
#endif
#endif
|
Fix for older MSVC compilers without operator<< for long longs (not tested on MSVC6)
|
Fix for older MSVC compilers without operator<< for long longs (not tested on MSVC6)
|
C
|
bsd-3-clause
|
xujun10110/boomerang,xujun10110/boomerang,nemerle/boomerang,nemerle/boomerang,nemerle/boomerang,xujun10110/boomerang,TambourineReindeer/boomerang,TambourineReindeer/boomerang,nemerle/boomerang,nemerle/boomerang,nemerle/boomerang,nemerle/boomerang,xujun10110/boomerang,TambourineReindeer/boomerang,TambourineReindeer/boomerang,xujun10110/boomerang,xujun10110/boomerang,TambourineReindeer/boomerang,xujun10110/boomerang,TambourineReindeer/boomerang,TambourineReindeer/boomerang,TambourineReindeer/boomerang,xujun10110/boomerang,nemerle/boomerang
|
2eb40cde2d22b44b9d459da008fa9dcf8c39d3f2
|
StateMachine/StateMachine.h
|
StateMachine/StateMachine.h
|
#ifndef StateMachine_StateMachine_h
#define StateMachine_StateMachine_h
#import "LSStateMachine.h"
#import "LSEvent.h"
#import "LSTransition.h"
#import "LSStateMachineMacros.h"
#endif
|
#ifndef StateMachine_StateMachine_h
#define StateMachine_StateMachine_h
#import "LSStateMachine.h"
#import "LSStateMachineMacros.h"
#endif
|
Remove private headers from global public header
|
Remove private headers from global public header
|
C
|
mit
|
sergiou87/StateMachine,luisobo/StateMachine,sergiou87/StateMachine,brynbellomy/StateMachine-GCDThreadsafe,luisobo/StateMachine,brynbellomy/StateMachine-GCDThreadsafe
|
28504f18175b27a474e076bc7f07ae70cd9798e7
|
sandboxed_api/sandbox2/syscall_defs.h
|
sandboxed_api/sandbox2/syscall_defs.h
|
#ifndef SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
#define SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
#include <sys/types.h>
#include <cstdint>
#include <string>
#include <vector>
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "sandboxed_api/config.h"
#include "sandboxed_api/sandbox2/syscall.h"
namespace sandbox2 {
namespace syscalls {
constexpr int kMaxArgs = 6;
} // namespace syscalls
class SyscallTable {
public:
struct Entry;
// Returns the syscall table for the architecture.
static SyscallTable get(sapi::cpu::Architecture arch);
int size() { return data_.size(); }
absl::string_view GetName(int syscall) const;
std::vector<std::string> GetArgumentsDescription(
int syscall, const uint64_t values[syscalls::kMaxArgs], pid_t pid) const;
private:
constexpr SyscallTable() = default;
explicit constexpr SyscallTable(absl::Span<const Entry> data) : data_(data) {}
const absl::Span<const Entry> data_;
};
} // namespace sandbox2
#endif // SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
|
#ifndef SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
#define SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
#include <sys/types.h>
#include <cstdint>
#include <string>
#include <vector>
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "sandboxed_api/config.h"
#include "sandboxed_api/sandbox2/syscall.h"
namespace sandbox2 {
namespace syscalls {
constexpr int kMaxArgs = 6;
} // namespace syscalls
class SyscallTable {
public:
struct Entry;
// Returns the syscall table for the architecture.
static SyscallTable get(sapi::cpu::Architecture arch);
int size() { return data_.size(); }
absl::string_view GetName(int syscall) const;
std::vector<std::string> GetArgumentsDescription(int syscall,
const uint64_t values[],
pid_t pid) const;
private:
constexpr SyscallTable() = default;
explicit constexpr SyscallTable(absl::Span<const Entry> data) : data_(data) {}
const absl::Span<const Entry> data_;
};
} // namespace sandbox2
#endif // SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
|
Make code not have a -Warray-parameter warning.
|
Make code not have a -Warray-parameter warning.
PiperOrigin-RevId: 467842322
Change-Id: Ic262a3f98fa823ef524ac02d08b2f5b8f4adf71d
|
C
|
apache-2.0
|
google/sandboxed-api,google/sandboxed-api,google/sandboxed-api,google/sandboxed-api
|
60ea97b28f20e5a191cdae6ff1bde978cdcad85e
|
src/TantechEngine/observer.h
|
src/TantechEngine/observer.h
|
#ifndef TE_OBSERVER_H
#define TE_OBSERVER_H
namespace te
{
template <class EventType>
class Observer
{
public:
virtual ~Observer() {}
virtual void onNotify(const EventType& evt) = 0;
};
}
#endif
|
#ifndef TE_OBSERVER_H
#define TE_OBSERVER_H
#include <vector>
#include <memory>
#include <cassert>
namespace te
{
template <class EventType>
class Observer
{
public:
virtual ~Observer() {}
virtual void onNotify(const EventType& evt) = 0;
};
template <class EventType>
class Notifier
{
public:
virtual ~Notifier() {}
void addObserver(std::shared_ptr<Observer<EventType>> newObserver)
{
assert(newObserver);
if (std::find(mObservers.begin(), mObservers.end(), newObserver) == mObservers.end()) {
mObservers.push_back(newObserver);
}
}
protected:
void notify(const EventType& evt)
{
std::for_each(std::begin(mObservers), std::end(mObservers), [&evt](std::shared_ptr<Observer<EventType>>& pObserver) {
pObserver->onNotify(evt);
});
}
private:
std::vector<std::shared_ptr<Observer<EventType>>> mObservers;
};
}
#endif
|
Add Notifier base class, complements Observer
|
Add Notifier base class, complements Observer
|
C
|
mit
|
evinstk/TantechEngine,evinstk/TantechEngine,evinstk/TantechEngine,evinstk/TantechEngine,evinstk/TantechEngine,evinstk/TantechEngine
|
749cfdeebb9f9706d8705ea46ed29bd3d9b1e834
|
src/altera.c
|
src/altera.c
|
#include "mruby.h"
extern void altera_piocore_init(mrb_state *mrb);
extern void altera_piocore_final(mrb_state *mrb);
void
mrb_embed_altera_gem_init(mrb_state *mrb)
{
struct RClass *mod;
mod = mrb_define_module(mrb, "Altera")
altera_piocore_init(mrb, mod);
}
void
mrb_embed_altera_gem_final(mrb_state *mrb)
{
altera_piocore_final(mrb);
}
|
#include "mruby.h"
extern void altera_piocore_init(mrb_state *mrb, struct RClass *mod);
extern void altera_piocore_final(mrb_state *mrb);
void
mrb_embed_altera_gem_init(mrb_state *mrb)
{
struct RClass *mod;
mod = mrb_define_module(mrb, "Altera");
altera_piocore_init(mrb, mod);
}
void
mrb_embed_altera_gem_final(mrb_state *mrb)
{
altera_piocore_final(mrb);
}
|
Fix prototype and syntax mistake
|
Fix prototype and syntax mistake
|
C
|
mit
|
kimushu/mruby-altera,kimushu/mruby-altera
|
a5f0f5dc4ba0d3f1d257db7542e7dedc7627c462
|
Settings/Controls/Slider.h
|
Settings/Controls/Slider.h
|
// Copyright (c) 2015, Matthew Malensek.
// Distributed under the BSD 2-Clause License (see LICENSE.txt for details)
#pragma once
#include <Windows.h>
#include <CommCtrl.h>
#include "Control.h"
class Slider : public Control {
public:
Slider(int id, DialogBase &parent) :
Control(id, parent, false) {
}
void Buddy(Control *buddy, bool bottomOrRight = true);
int Position();
void Position(int position);
/// <summary>Sets the range (min, max) for the slider control.</summary>
/// <param name="lo">Lower bound for the slider.</param>
/// <param name="hi">Upper bound for the slider.</param>
void Range(int lo, int hi);
virtual BOOL CALLBACK Notification(NMHDR *nHdr);
private:
HWND _buddyWnd;
public:
/* Event Handlers */
std::function<void(NMTRBTHUMBPOSCHANGING *pc)> OnSlide;
};
|
// Copyright (c) 2015, Matthew Malensek.
// Distributed under the BSD 2-Clause License (see LICENSE.txt for details)
#pragma once
#include <Windows.h>
#include <CommCtrl.h>
#include "Control.h"
class Slider : public Control {
public:
Slider(int id, DialogBase &parent) :
Control(id, parent, false) {
}
void Buddy(Control *buddy, bool bottomOrRight = true);
int Position();
void Position(int position);
/// <summary>Sets the range (min, max) for the slider control.</summary>
/// <param name="lo">Lower bound for the slider.</param>
/// <param name="hi">Upper bound for the slider.</param>
void Range(int lo, int hi);
virtual BOOL CALLBACK Notification(NMHDR *nHdr);
private:
HWND _buddyWnd;
public:
/* Event Handlers */
std::function<bool()> OnSlide;
};
|
Update slide event method definition
|
Update slide event method definition
|
C
|
bsd-2-clause
|
malensek/3RVX,malensek/3RVX,malensek/3RVX
|
acad4e8f9653beb8ffde0d516251dbf206bb375f
|
bluetooth/bdroid_buildcfg.h
|
bluetooth/bdroid_buildcfg.h
|
/*
* Copyright 2013 The Android Open Source Project
*
* 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 _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H
#define BTA_DISABLE_DELAY 100 /* in milliseconds */
#endif
|
/*
* Copyright 2013 The Android Open Source Project
*
* 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 _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H
#define BTA_DISABLE_DELAY 100 /* in milliseconds */
#define BTM_WBS_INCLUDED TRUE
#define BTIF_HF_WBS_PREFERRED TRUE
#endif
|
Add WBS support on Bluedroid (1/6)
|
Add WBS support on Bluedroid (1/6)
Bug 13764086
Change-Id: Ib861d94b752561392e315ab8f459c30588075a46
|
C
|
apache-2.0
|
maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead
|
44dfccfeb025f4eb61c9f31af287c00a46a37a0d
|
fastlib/branches/fastlib-stl/fastlib/fx/option_impl.h
|
fastlib/branches/fastlib-stl/fastlib/fx/option_impl.h
|
#ifndef MLPACK_IO_OPTION_IMPL_H
#define MLPACK_IO_OPTION_IMPL_H
#include "io.h"
namespace mlpack {
/*
* @brief Registers a parameter with IO.
* This allows the registration of parameters at program start.
*/
template<typename N>
Option<N>::Option(bool ignoreTemplate,
N defaultValue,
const char* identifier,
const char* description,
const char* parent,
bool required) {
if (ignoreTemplate)
IO::Add(identifier, description, parent, required);
else {
IO::Add<N>(identifier, description, parent, required);
//Create the full pathname.
std::string pathname = IO::SanitizeString(parent) + std::string(identifier);
IO::GetParam<N>(pathname.c_str()) = defaultValue;
}
}
/*
* @brief Registers a flag parameter with IO.
*/
template<typename N>
Option<N>::Option(const char* identifier,
const char* description,
const char* parent) {
IO::AddFlag(identifier, description, parent);
}
}; // namespace mlpack
#endif
|
#ifndef MLPACK_IO_OPTION_IMPL_H
#define MLPACK_IO_OPTION_IMPL_H
#include "io.h"
namespace mlpack {
/*
* @brief Registers a parameter with IO.
* This allows the registration of parameters at program start.
*/
template<typename N>
Option<N>::Option(bool ignoreTemplate,
N defaultValue,
const char* identifier,
const char* description,
const char* parent,
bool required) {
if (ignoreTemplate)
IO::Add(identifier, description, parent, required);
else {
IO::Add<N>(identifier, description, parent, required);
// Create the full pathname to set the default value.
std::string pathname = IO::SanitizeString(parent) + std::string(identifier);
IO::GetParam<N>(pathname.c_str()) = defaultValue;
}
}
/*
* @brief Registers a flag parameter with IO.
*/
template<typename N>
Option<N>::Option(const char* identifier,
const char* description,
const char* parent) {
IO::AddFlag(identifier, description, parent);
// Set the default value (false).
std::string pathname = IO::SanitizeString(parent) + std::string(identifier);
IO::GetParam<bool>(pathname.c_str()) = false;
}
}; // namespace mlpack
#endif
|
Set a default value for boolean options (false).
|
Set a default value for boolean options (false).
|
C
|
bsd-3-clause
|
minhpqn/mlpack,palashahuja/mlpack,Azizou/mlpack,ajjl/mlpack,minhpqn/mlpack,ranjan1990/mlpack,bmswgnp/mlpack,lezorich/mlpack,ranjan1990/mlpack,theranger/mlpack,thirdwing/mlpack,trungda/mlpack,stereomatchingkiss/mlpack,chenmoshushi/mlpack,BookChan/mlpack,darcyliu/mlpack,ersanliqiao/mlpack,stereomatchingkiss/mlpack,datachand/mlpack,thirdwing/mlpack,lezorich/mlpack,bmswgnp/mlpack,stereomatchingkiss/mlpack,bmswgnp/mlpack,datachand/mlpack,theranger/mlpack,trungda/mlpack,erubboli/mlpack,ranjan1990/mlpack,ajjl/mlpack,palashahuja/mlpack,darcyliu/mlpack,ajjl/mlpack,chenmoshushi/mlpack,lezorich/mlpack,datachand/mlpack,BookChan/mlpack,minhpqn/mlpack,chenmoshushi/mlpack,ersanliqiao/mlpack,erubboli/mlpack,theranger/mlpack,BookChan/mlpack,trungda/mlpack,thirdwing/mlpack,palashahuja/mlpack,Azizou/mlpack,ersanliqiao/mlpack,erubboli/mlpack,Azizou/mlpack,darcyliu/mlpack
|
61e076548c04d626edd4fb9a2d67bc69ac73ced8
|
source/board/nina_b1.c
|
source/board/nina_b1.c
|
/**
* @file nina_b1.c
* @brief board ID for the u-blox NINA-B1 EVA maker board
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "target_config.h"
const char *board_id = "1238";
void prerun_board_config(void)
{
// NINA-B1 is based on nrf52
extern target_cfg_t target_device_nrf52;
target_device = target_device_nrf52;
}
|
/**
* @file nina_b1.c
* @brief board ID for the u-blox NINA-B1 EVA maker board
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "target_config.h"
const char *board_id = "1238";
void prerun_board_config(void)
{
// NINA-B1 is based on nrf52
extern target_cfg_t target_device_nrf52;
target_device = target_device_nrf52;
}
|
Convert line endings to unix format
|
Convert line endings to unix format
Convert the line endings for nina_b1.c to unix format. This matches
the rest of the codebase. This also fixes strange git behavior which
cause this file to show up as modified even when no changes have
been made.
|
C
|
apache-2.0
|
google/DAPLink-port,sg-/DAPLink,sg-/DAPLink,google/DAPLink-port,sg-/DAPLink,google/DAPLink-port,google/DAPLink-port
|
7210b0870c273abcd45c9d7663623242a846e256
|
mc/inc/LinkDef.h
|
mc/inc/LinkDef.h
|
// @(#)root/mc:$Name: $:$Id: LinkDef.h,v 1.2 2002/04/26 08:46:10 brun Exp $
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ global gMC;
#pragma link C++ enum PDG_t;
#pragma link C++ enum TMCProcess;
#pragma link C++ class TVirtualMC+;
#pragma link C++ class TVirtualMCApplication+;
#pragma link C++ class TVirtualMCStack+;
#pragma link C++ class TVirtualMCDecayer+;
#endif
|
// @(#)root/mc:$Name: $:$Id: LinkDef.h,v 1.2 2002/04/26 09:25:02 brun Exp $
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ global gMC;
#pragma link C++ enum PDG_t;
#pragma link C++ enum TMCProcess;
#pragma link C++ class TVirtualMC+;
#pragma link C++ class TVirtualMCApplication+;
#pragma link C++ class TVirtualMCStack+;
#pragma link C++ class TVirtualMCDecayer+;
#pragma link C++ class TMCVerbose+;
#endif
|
Add TMCVerbose to the list of mc classes
|
Add TMCVerbose to the list of mc classes
git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@6190 27541ba8-7e3a-0410-8455-c3a389f83636
|
C
|
lgpl-2.1
|
satyarth934/root,dfunke/root,tc3t/qoot,georgtroska/root,georgtroska/root,perovic/root,sawenzel/root,alexschlueter/cern-root,kirbyherm/root-r-tools,arch1tect0r/root,abhinavmoudgil95/root,zzxuanyuan/root-compressor-dummy,cxx-hep/root-cern,agarciamontoro/root,nilqed/root,abhinavmoudgil95/root,zzxuanyuan/root-compressor-dummy,olifre/root,root-mirror/root,sirinath/root,smarinac/root,simonpf/root,lgiommi/root,davidlt/root,krafczyk/root,mattkretz/root,sirinath/root,bbockelm/root,karies/root,sawenzel/root,tc3t/qoot,CristinaCristescu/root,omazapa/root,Y--/root,sawenzel/root,gganis/root,vukasinmilosevic/root,esakellari/root,gbitzes/root,beniz/root,nilqed/root,abhinavmoudgil95/root,mattkretz/root,zzxuanyuan/root-compressor-dummy,lgiommi/root,root-mirror/root,Y--/root,sirinath/root,smarinac/root,Y--/root,beniz/root,nilqed/root,CristinaCristescu/root,omazapa/root-old,zzxuanyuan/root,olifre/root,agarciamontoro/root,alexschlueter/cern-root,veprbl/root,mattkretz/root,agarciamontoro/root,zzxuanyuan/root,esakellari/root,0x0all/ROOT,perovic/root,pspe/root,esakellari/root,smarinac/root,esakellari/root,jrtomps/root,karies/root,dfunke/root,pspe/root,sirinath/root,zzxuanyuan/root,CristinaCristescu/root,evgeny-boger/root,gbitzes/root,zzxuanyuan/root-compressor-dummy,arch1tect0r/root,smarinac/root,esakellari/my_root_for_test,kirbyherm/root-r-tools,davidlt/root,sawenzel/root,arch1tect0r/root,karies/root,pspe/root,sbinet/cxx-root,cxx-hep/root-cern,gbitzes/root,mattkretz/root,Duraznos/root,BerserkerTroll/root,olifre/root,omazapa/root-old,jrtomps/root,zzxuanyuan/root-compressor-dummy,veprbl/root,gbitzes/root,0x0all/ROOT,sbinet/cxx-root,sawenzel/root,buuck/root,Dr15Jones/root,BerserkerTroll/root,abhinavmoudgil95/root,buuck/root,abhinavmoudgil95/root,veprbl/root,sirinath/root,vukasinmilosevic/root,gbitzes/root,tc3t/qoot,krafczyk/root,mkret2/root,gbitzes/root,simonpf/root,agarciamontoro/root,cxx-hep/root-cern,smarinac/root,CristinaCristescu/root,esakellari/root,CristinaCristescu/root,root-mirror/root,evgeny-boger/root,omazapa/root-old,mattkretz/root,Y--/root,krafczyk/root,mkret2/root,omazapa/root,satyarth934/root,nilqed/root,Dr15Jones/root,vukasinmilosevic/root,Duraznos/root,georgtroska/root,abhinavmoudgil95/root,krafczyk/root,buuck/root,beniz/root,nilqed/root,thomaskeck/root,esakellari/root,sbinet/cxx-root,perovic/root,gganis/root,georgtroska/root,esakellari/root,gganis/root,olifre/root,mkret2/root,smarinac/root,ffurano/root5,root-mirror/root,omazapa/root,agarciamontoro/root,lgiommi/root,davidlt/root,beniz/root,esakellari/my_root_for_test,zzxuanyuan/root-compressor-dummy,ffurano/root5,dfunke/root,buuck/root,nilqed/root,tc3t/qoot,mhuwiler/rootauto,sirinath/root,Duraznos/root,mkret2/root,olifre/root,BerserkerTroll/root,simonpf/root,buuck/root,sbinet/cxx-root,zzxuanyuan/root-compressor-dummy,omazapa/root-old,root-mirror/root,buuck/root,0x0all/ROOT,georgtroska/root,Y--/root,zzxuanyuan/root,bbockelm/root,gganis/root,tc3t/qoot,evgeny-boger/root,perovic/root,abhinavmoudgil95/root,arch1tect0r/root,vukasinmilosevic/root,sbinet/cxx-root,jrtomps/root,root-mirror/root,arch1tect0r/root,Duraznos/root,karies/root,omazapa/root-old,simonpf/root,beniz/root,thomaskeck/root,buuck/root,krafczyk/root,nilqed/root,omazapa/root,gganis/root,gbitzes/root,vukasinmilosevic/root,cxx-hep/root-cern,davidlt/root,Dr15Jones/root,simonpf/root,vukasinmilosevic/root,satyarth934/root,georgtroska/root,beniz/root,sbinet/cxx-root,BerserkerTroll/root,dfunke/root,sirinath/root,Duraznos/root,esakellari/my_root_for_test,perovic/root,zzxuanyuan/root,zzxuanyuan/root-compressor-dummy,olifre/root,gbitzes/root,tc3t/qoot,sbinet/cxx-root,mhuwiler/rootauto,simonpf/root,sawenzel/root,alexschlueter/cern-root,sbinet/cxx-root,BerserkerTroll/root,bbockelm/root,thomaskeck/root,Duraznos/root,sirinath/root,mkret2/root,buuck/root,karies/root,evgeny-boger/root,agarciamontoro/root,davidlt/root,gbitzes/root,perovic/root,satyarth934/root,veprbl/root,smarinac/root,jrtomps/root,mhuwiler/rootauto,zzxuanyuan/root-compressor-dummy,thomaskeck/root,lgiommi/root,cxx-hep/root-cern,agarciamontoro/root,Dr15Jones/root,arch1tect0r/root,zzxuanyuan/root-compressor-dummy,veprbl/root,0x0all/ROOT,pspe/root,smarinac/root,CristinaCristescu/root,0x0all/ROOT,pspe/root,sbinet/cxx-root,ffurano/root5,arch1tect0r/root,Duraznos/root,strykejern/TTreeReader,krafczyk/root,zzxuanyuan/root,sirinath/root,sawenzel/root,evgeny-boger/root,zzxuanyuan/root,arch1tect0r/root,omazapa/root,esakellari/root,vukasinmilosevic/root,mhuwiler/rootauto,pspe/root,0x0all/ROOT,tc3t/qoot,lgiommi/root,Dr15Jones/root,Duraznos/root,mhuwiler/rootauto,Duraznos/root,mattkretz/root,ffurano/root5,evgeny-boger/root,abhinavmoudgil95/root,olifre/root,gganis/root,pspe/root,esakellari/root,dfunke/root,Y--/root,nilqed/root,smarinac/root,BerserkerTroll/root,omazapa/root-old,veprbl/root,omazapa/root,vukasinmilosevic/root,thomaskeck/root,karies/root,lgiommi/root,buuck/root,BerserkerTroll/root,davidlt/root,agarciamontoro/root,evgeny-boger/root,cxx-hep/root-cern,kirbyherm/root-r-tools,veprbl/root,Duraznos/root,sawenzel/root,esakellari/my_root_for_test,thomaskeck/root,ffurano/root5,dfunke/root,gbitzes/root,perovic/root,esakellari/my_root_for_test,sbinet/cxx-root,agarciamontoro/root,bbockelm/root,satyarth934/root,olifre/root,satyarth934/root,evgeny-boger/root,bbockelm/root,tc3t/qoot,mhuwiler/rootauto,lgiommi/root,gganis/root,sirinath/root,Y--/root,karies/root,CristinaCristescu/root,jrtomps/root,vukasinmilosevic/root,buuck/root,veprbl/root,dfunke/root,sawenzel/root,krafczyk/root,davidlt/root,CristinaCristescu/root,beniz/root,zzxuanyuan/root,sbinet/cxx-root,nilqed/root,esakellari/my_root_for_test,dfunke/root,strykejern/TTreeReader,veprbl/root,kirbyherm/root-r-tools,lgiommi/root,olifre/root,davidlt/root,omazapa/root-old,arch1tect0r/root,omazapa/root,mhuwiler/rootauto,0x0all/ROOT,Y--/root,0x0all/ROOT,mkret2/root,kirbyherm/root-r-tools,Dr15Jones/root,vukasinmilosevic/root,omazapa/root,jrtomps/root,perovic/root,Duraznos/root,agarciamontoro/root,veprbl/root,cxx-hep/root-cern,omazapa/root,Y--/root,Y--/root,mhuwiler/rootauto,buuck/root,strykejern/TTreeReader,pspe/root,veprbl/root,omazapa/root-old,esakellari/root,olifre/root,evgeny-boger/root,gbitzes/root,lgiommi/root,ffurano/root5,tc3t/qoot,CristinaCristescu/root,mhuwiler/rootauto,arch1tect0r/root,krafczyk/root,beniz/root,gganis/root,davidlt/root,alexschlueter/cern-root,jrtomps/root,thomaskeck/root,BerserkerTroll/root,CristinaCristescu/root,sawenzel/root,pspe/root,karies/root,sawenzel/root,alexschlueter/cern-root,omazapa/root-old,strykejern/TTreeReader,perovic/root,olifre/root,esakellari/my_root_for_test,satyarth934/root,krafczyk/root,pspe/root,strykejern/TTreeReader,mattkretz/root,georgtroska/root,dfunke/root,bbockelm/root,karies/root,esakellari/root,lgiommi/root,perovic/root,mkret2/root,zzxuanyuan/root,agarciamontoro/root,mkret2/root,omazapa/root-old,mattkretz/root,omazapa/root-old,0x0all/ROOT,root-mirror/root,omazapa/root,simonpf/root,mattkretz/root,bbockelm/root,zzxuanyuan/root-compressor-dummy,mkret2/root,mkret2/root,jrtomps/root,kirbyherm/root-r-tools,zzxuanyuan/root,ffurano/root5,pspe/root,gganis/root,abhinavmoudgil95/root,davidlt/root,smarinac/root,gganis/root,jrtomps/root,georgtroska/root,strykejern/TTreeReader,BerserkerTroll/root,davidlt/root,nilqed/root,dfunke/root,sirinath/root,gganis/root,root-mirror/root,root-mirror/root,bbockelm/root,satyarth934/root,kirbyherm/root-r-tools,vukasinmilosevic/root,esakellari/my_root_for_test,mkret2/root,thomaskeck/root,simonpf/root,georgtroska/root,thomaskeck/root,mhuwiler/rootauto,esakellari/my_root_for_test,strykejern/TTreeReader,simonpf/root,bbockelm/root,karies/root,Dr15Jones/root,Y--/root,krafczyk/root,krafczyk/root,arch1tect0r/root,jrtomps/root,georgtroska/root,root-mirror/root,cxx-hep/root-cern,karies/root,jrtomps/root,bbockelm/root,omazapa/root,satyarth934/root,thomaskeck/root,tc3t/qoot,evgeny-boger/root,zzxuanyuan/root,simonpf/root,bbockelm/root,dfunke/root,simonpf/root,satyarth934/root,esakellari/my_root_for_test,mattkretz/root,alexschlueter/cern-root,beniz/root,CristinaCristescu/root,zzxuanyuan/root,georgtroska/root,evgeny-boger/root,root-mirror/root,mhuwiler/rootauto,mattkretz/root,beniz/root,abhinavmoudgil95/root,abhinavmoudgil95/root,perovic/root,lgiommi/root,BerserkerTroll/root,satyarth934/root,BerserkerTroll/root,beniz/root,nilqed/root,alexschlueter/cern-root
|
d6631b5abcdb414436c0a90bc11ba0cd4808eda0
|
inc/fftw_hao.h
|
inc/fftw_hao.h
|
#ifndef FFTW_HAO_H
#define FFTW_HAO_H
#include "fftw_define.h"
class FFTServer
{
int dimen;
int* n;
int L;
std::complex<double>* inforw;
std::complex<double>* outforw;
std::complex<double>* inback;
std::complex<double>* outback;
fftw_plan planforw;
fftw_plan planback;
public:
FFTServer();
FFTServer(int Dc, const int* Nc, char format); //'C' Column-major: fortran style; 'R' Row-major: c style;
FFTServer(const FFTServer& x);
~FFTServer();
FFTServer& operator = (const FFTServer& x);
std::complex<double>* fourier_forw(const std::complex<double>* inarray);
std::complex<double>* fourier_back(const std::complex<double>* inarray);
friend void FFTServer_void_construction_test();
friend void FFTServer_param_construction_test();
friend void FFTServer_equal_construction_test();
friend void FFTServer_equal_test();
};
#endif
|
#ifndef FFTW_HAO_H
#define FFTW_HAO_H
#include "fftw_define.h"
class FFTServer
{
public:
int dimen;
int* n;
int L;
std::complex<double>* inforw;
std::complex<double>* outforw;
std::complex<double>* inback;
std::complex<double>* outback;
fftw_plan planforw;
fftw_plan planback;
FFTServer();
FFTServer(int Dc, const int* Nc, char format); //'C' Column-major: fortran style; 'R' Row-major: c style;
FFTServer(const FFTServer& x);
~FFTServer();
FFTServer& operator = (const FFTServer& x);
std::complex<double>* fourier_forw(const std::complex<double>* inarray);
std::complex<double>* fourier_back(const std::complex<double>* inarray);
};
#endif
|
Remove friend function in FFTServer.
|
Remove friend function in FFTServer.
|
C
|
mit
|
hshi/fftw_lib_hao,hshi/fftw_lib_hao
|
9150976b9768c6f92fdf56d50f5f02e0b226b2ee
|
cuser/acpica/acenv_header.h
|
cuser/acpica/acenv_header.h
|
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#define ACPI_MACHINE_WIDTH __INTPTR_WIDTH__
#define ACPI_SINGLE_THREADED
#define ACPI_USE_LOCAL_CACHE
#define ACPI_USE_NATIVE_DIVIDE
#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED
#undef ACPI_GET_FUNCTION_NAME
#ifdef ACPI_FULL_DEBUG
//#define ACPI_DBG_TRACK_ALLOCATIONS
#define ACPI_GET_FUNCTION_NAME __FUNCTION__
#else
#define ACPI_GET_FUNCTION_NAME ""
#endif
static const uintptr_t ACPI_PHYS_BASE = 0x1000000;
#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 COMPILER_DEPENDENT_UINT64 uint64_t
#define COMPILER_DEPENDENT_UINT32 uint32_t
|
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#define ACPI_MACHINE_WIDTH __INTPTR_WIDTH__
#define ACPI_SINGLE_THREADED
#define ACPI_USE_LOCAL_CACHE
#define ACPI_USE_NATIVE_DIVIDE
#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED
#undef ACPI_GET_FUNCTION_NAME
#ifdef ACPI_FULL_DEBUG
//#define ACPI_DBG_TRACK_ALLOCATIONS
#define ACPI_GET_FUNCTION_NAME __FUNCTION__
#else
#define ACPI_GET_FUNCTION_NAME ""
#endif
static const uint64_t ACPI_PHYS_BASE = 0x100000000;
#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 COMPILER_DEPENDENT_UINT64 uint64_t
#define COMPILER_DEPENDENT_UINT32 uint32_t
|
Remove some of ACPICA's x32 support
|
Remove some of ACPICA's x32 support
To actually work properly in x32, it would need to manage mappings of
physical memory into the lower 4GB. Let's just require that you build it
in 64-bit mode...
|
C
|
mit
|
olsner/os,olsner/os,olsner/os,olsner/os
|
8323e87f08a46398ae1ca4103e92b2cfe07c94a1
|
src/client.h
|
src/client.h
|
#ifndef _client_h_
#define _client_h_
#define DEFAULT_PORT 4080
void client_enable();
void client_disable();
int get_client_enabled();
void client_connect(char *hostname, int port);
void client_start();
void client_stop();
void client_send(char *data);
char *client_recv();
void client_version(int version);
void client_login(const char *username, const char *identity_token);
void client_position(float x, float y, float z, float rx, float ry);
void client_chunk(int p, int q, int key);
void client_block(int x, int y, int z, int w);
void client_light(int x, int y, int z, int w);
void client_sign(int x, int y, int z, int face, const char *text);
void client_talk(const char *text);
#endif
|
#ifndef _client_h_
#define _client_h_
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#define DEFAULT_PORT 4080
void client_enable();
void client_disable();
int get_client_enabled();
void client_connect(char *hostname, int port);
void client_start();
void client_stop();
void client_send(char *data);
char *client_recv();
void client_version(int version);
void client_login(const char *username, const char *identity_token);
void client_position(float x, float y, float z, float rx, float ry);
void client_chunk(int p, int q, int key);
void client_block(int x, int y, int z, int w);
void client_light(int x, int y, int z, int w);
void client_sign(int x, int y, int z, int face, const char *text);
void client_talk(const char *text);
#endif
|
Add Visual Studio 2013 fix from omnus
|
Add Visual Studio 2013 fix from omnus
|
C
|
mit
|
DanielOaks/Craft,naxIO/magebattle,naxIO/magebattle,DanielOaks/Craft
|
e1050535819445459bb97a5c690b20780b5a3b5f
|
include/machine/hardware.h
|
include/machine/hardware.h
|
/*
* Copyright 2014, General Dynamics C4 Systems
*
* This software may be distributed and modified according to the terms of
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
* See "LICENSE_GPLv2.txt" for details.
*
* @TAG(GD_GPL)
*/
#ifndef __MACHINE_HARDWARE_H
#define __MACHINE_HARDWARE_H
#include <types.h>
#include <arch/machine/hardware.h>
#include <plat/machine/hardware.h>
#include <plat/machine.h>
void handleReservedIRQ(irq_t irq);
void handleSpuriousIRQ(void);
/** MODIFIES: [*] */
void ackInterrupt(irq_t irq);
/** MODIFIES: [*] */
irq_t getActiveIRQ(void);
/** MODIFIES: [*] */
bool_t isIRQPending(void);
/** MODIFIES: [*] */
void maskInterrupt(bool_t enable, irq_t irq);
#endif
|
/*
* Copyright 2014, General Dynamics C4 Systems
*
* This software may be distributed and modified according to the terms of
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
* See "LICENSE_GPLv2.txt" for details.
*
* @TAG(GD_GPL)
*/
#ifndef __MACHINE_HARDWARE_H
#define __MACHINE_HARDWARE_H
#include <types.h>
#include <arch/machine/hardware.h>
#include <plat/machine/hardware.h>
#include <plat/machine.h>
void handleReservedIRQ(irq_t irq);
void handleSpuriousIRQ(void);
/** MODIFIES: [*] */
void ackInterrupt(irq_t irq);
/** MODIFIES: [*] */
irq_t getActiveIRQ(void);
/** MODIFIES: [*] */
bool_t isIRQPending(void);
/** MODIFIES: [*] */
void maskInterrupt(bool_t disable, irq_t irq);
#endif
|
Update prototype of maskInterrupt to match implementations.
|
Update prototype of maskInterrupt to match implementations.
The prototype will ultimately be removed, but the mismatch is presently
breaking verification.
|
C
|
bsd-2-clause
|
cmr/seL4,cmr/seL4,cmr/seL4
|
ab42abde834a306787fee9b66f6e482501395e3b
|
parser_tests.c
|
parser_tests.c
|
#include "parser.h"
#include "ast.h"
#include "tests.h"
void test_parse_number();
int main() {
test_parse_number();
return 0;
}
struct token *make_token(enum token_type tk_type, char* str, double dbl,
int number) {
struct token *tk = malloc(sizeof(struct token));
tk->type = tk_type;
if (tk_type == tok_dbl) {
tk->value.dbl = dbl;
} else if (tk_type == tok_number) {
tk->value.num = number;
} else {
tk->value.string = str;
}
return tk;
}
void test_parse_number() {
struct token_list *tkl = make_token_list();
tkl.append(make_token(tok_number, NULL, 0.0, 42);
struct ast_node *result = parse_number(tkl);
EXPECT_EQ(result->val, tkl->head);
EXPECT_EQ(result->num_children, 0);
destroy_token_list(tkl);
}
|
#include "parser.h"
#include "ast.h"
#include "tests.h"
void test_parse_number();
int main() {
test_parse_number();
return 0;
}
struct token *make_token(enum token_type tk_type, char* str, double dbl,
int number) {
struct token *tk = malloc(sizeof(struct token));
tk->type = tk_type;
if (tk_type == tok_dbl) {
tk->value.dbl = dbl;
} else if (tk_type == tok_number) {
tk->value.num = number;
} else {
tk->value.string = str;
}
return tk;
}
void test_parse_number() {
struct token_list *tkl = make_token_list();
struct token *tk = make_token(tok_number, NULL, 0.0, 42);
append_token_list(tkl, tk);
struct ast_node *result = parse_number(tkl);
EXPECT_EQ(result->val, tk);
EXPECT_EQ(result->num_children, 0);
destroy_token_list(tkl);
}
|
Fix bug in parser tests
|
Fix bug in parser tests
The act of parsing the ast pops the token from the token list, so we need
a pointer to the token for our assertion.
|
C
|
mit
|
iankronquist/yaz,iankronquist/yaz
|
b5b27a8a3401ba739778049c258aa8cd52c65d80
|
client_encoder/win/dshow_util.h
|
client_encoder/win/dshow_util.h
|
// Copyright (c) 2012 The WebM project authors. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS. All contributing project authors may
// be found in the AUTHORS file in the root of the source tree.
#ifndef CLIENT_ENCODER_WIN_DSHOW_UTIL_H_
#define CLIENT_ENCODER_WIN_DSHOW_UTIL_H_
#include <ios>
#include "webmdshow/common/hrtext.hpp"
#include "webmdshow/common/odbgstream.hpp"
// Extracts error from the HRESULT, and outputs its hex and decimal values.
#define HRLOG(X) \
" {" << #X << "=" << X << "/" << std::hex << X << std::dec << " (" << \
hrtext(X) << ")}"
#endif // CLIENT_ENCODER_WIN_DSHOW_UTIL_H_
|
// Copyright (c) 2012 The WebM project authors. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS. All contributing project authors may
// be found in the AUTHORS file in the root of the source tree.
#ifndef CLIENT_ENCODER_WIN_DSHOW_UTIL_H_
#define CLIENT_ENCODER_WIN_DSHOW_UTIL_H_
#include <ios>
#include "webmdshow/common/odbgstream.hpp" // NOLINT
// Above include NOLINT'd because it *must always* come before hrtext.
#include "webmdshow/common/hrtext.hpp"
// Extracts error from the HRESULT, and outputs its hex and decimal values.
#define HRLOG(X) \
" {" << #X << "=" << X << "/" << std::hex << X << std::dec << " (" << \
hrtext(X) << ")}"
#endif // CLIENT_ENCODER_WIN_DSHOW_UTIL_H_
|
Fix release mode compile error.
|
Fix release mode compile error.
odbgstream must always be included before hrtext.
Change-Id: I184e8e9ec61c51b8f7e3f5d38135dfa85405d69e
|
C
|
bsd-3-clause
|
kim42083/webm.webmlive,iniwf/webm.webmlive,Acidburn0zzz/webm.webmlive,abwiz0086/webm.webmlive,Maria1099/webm.webmlive,abwiz0086/webm.webmlive,reimaginemedia/webm.webmlive,kalli123/webm.webmlive,iniwf/webm.webmlive,felipebetancur/webmlive,kleopatra999/webm.webmlive,felipebetancur/webmlive,kalli123/webm.webmlive,gshORTON/webm.webmlive,gshORTON/webm.webmlive,kalli123/webm.webmlive,Maria1099/webm.webmlive,Maria1099/webm.webmlive,abwiz0086/webm.webmlive,reimaginemedia/webm.webmlive,altogother/webm.webmlive,felipebetancur/webmlive,webmproject/webmlive,matanbs/webm.webmlive,matanbs/webm.webmlive,felipebetancur/webmlive,gshORTON/webm.webmlive,kim42083/webm.webmlive,Suvarna1488/webm.webmlive,abwiz0086/webm.webmlive,Suvarna1488/webm.webmlive,altogother/webm.webmlive,kleopatra999/webm.webmlive,Maria1099/webm.webmlive,reimaginemedia/webm.webmlive,iniwf/webm.webmlive,altogother/webm.webmlive,Acidburn0zzz/webm.webmlive,ericmckean/webm.webmlive,reimaginemedia/webm.webmlive,iniwf/webm.webmlive,webmproject/webmlive,ericmckean/webm.webmlive,webmproject/webmlive,altogother/webm.webmlive,ericmckean/webm.webmlive,webmproject/webmlive,Suvarna1488/webm.webmlive,kleopatra999/webm.webmlive,matanbs/webm.webmlive,kim42083/webm.webmlive,kleopatra999/webm.webmlive,matanbs/webm.webmlive,Acidburn0zzz/webm.webmlive,kalli123/webm.webmlive,webmproject/webmlive,kim42083/webm.webmlive,Acidburn0zzz/webm.webmlive,felipebetancur/webmlive,gshORTON/webm.webmlive,Suvarna1488/webm.webmlive,ericmckean/webm.webmlive
|
41bde8c2fb193aaa8ebefe7d42b32fb0e12626e9
|
test/CodeGen/code-coverage.c
|
test/CodeGen/code-coverage.c
|
// RUN: %clang -O0 -S -mno-red-zone -fprofile-arcs -ftest-coverage -emit-llvm %s -o - | FileCheck %s
// <rdar://problem/12843084>
int test1(int a) {
switch (a % 2) {
case 0:
++a;
case 1:
a /= 2;
}
return a;
}
// Check tha the `-mno-red-zone' flag is set here on the generated functions.
// CHECK: void @__llvm_gcov_indirect_counter_increment(i32* %{{.*}}, i64** %{{.*}}) unnamed_addr noinline noredzone
// CHECK: void @__llvm_gcov_writeout() unnamed_addr noinline noredzone
// CHECK: void @__llvm_gcov_init() unnamed_addr noinline noredzone
// CHECK: void @__gcov_flush() unnamed_addr noinline noredzone
|
// RUN: %clang_cc1 -O0 -emit-llvm -disable-red-zone -femit-coverage-notes -femit-coverage-data %s -o - | FileCheck %s
// <rdar://problem/12843084>
int test1(int a) {
switch (a % 2) {
case 0:
++a;
case 1:
a /= 2;
}
return a;
}
// Check tha the `-mno-red-zone' flag is set here on the generated functions.
// CHECK: void @__llvm_gcov_indirect_counter_increment(i32* %{{.*}}, i64** %{{.*}}) unnamed_addr noinline noredzone
// CHECK: void @__llvm_gcov_writeout() unnamed_addr noinline noredzone
// CHECK: void @__llvm_gcov_init() unnamed_addr noinline noredzone
// CHECK: void @__gcov_flush() unnamed_addr noinline noredzone
|
Use correct flags for this test.
|
Use correct flags for this test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@169768 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
|
318d87ddc093ded8e70bb41204079c45e73b4e5e
|
os/atTime.h
|
os/atTime.h
|
#ifndef AT_TIME_H
#define AT_TIME_H
// Under Windows, define the gettimeofday() function with corresponding types
#ifdef _MSC_VER
#include <windows.h>
#include <time.h>
// TYPES
struct timezone
{
int tz_minuteswest;
int tz_dsttime;
};
// FUNCTIONS
int gettimeofday(struct timeval * tv, struct timezone * tz);
#else
#include <sys/time.h>
#endif
#endif
|
#ifndef AT_TIME_H
#define AT_TIME_H
// Under Windows, define the gettimeofday() function with corresponding types
#ifdef _MSC_VER
#include <windows.h>
#include <time.h>
#include "atSymbols.h"
// TYPES
struct timezone
{
int tz_minuteswest;
int tz_dsttime;
};
// FUNCTIONS
ATLAS_SYM int gettimeofday(struct timeval * tv, struct timezone * tz);
#else
#include <sys/time.h>
#endif
#endif
|
Add the atSymbols to this so the getTimeOfDay function was usable outside of the windows dll.
|
Add the atSymbols to this so the getTimeOfDay function was usable outside of the windows dll.
|
C
|
apache-2.0
|
ucfistirl/atlas,ucfistirl/atlas
|
44b9b99aaa607272a4e90ae42d4aba051b85fb22
|
3RVX/VolumeSlider.h
|
3RVX/VolumeSlider.h
|
#pragma once
#include "OSD\OSD.h"
#include "MeterWnd\MeterWnd.h"
class VolumeSlider : public OSD {
public:
VolumeSlider(HINSTANCE hInstance, Settings &settings);
void Hide();
private:
MeterWnd _mWnd;
};
|
#pragma once
#include "OSD\OSD.h"
#include "SliderWnd.h"
class VolumeSlider : public OSD {
public:
VolumeSlider(HINSTANCE hInstance, Settings &settings);
void Hide();
private:
SliderWnd _sWnd;
};
|
Use a sliderwnd instance to implement the volume slider
|
Use a sliderwnd instance to implement the volume slider
|
C
|
bsd-2-clause
|
malensek/3RVX,malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.