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
|
|---|---|---|---|---|---|---|---|---|---|
0f4cfc0a19d5225ffe18695b81dc28bb2ee664d9
|
kernel/stdnoreturn.h
|
kernel/stdnoreturn.h
|
/*
* Copyright (c) 2011-2013 Graham Edgecombe <graham@grahamedgecombe.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef STDNORETURN_H
#define STDNORETURN_H
#define noreturn _Noreturn
#endif
|
/*
* Copyright (c) 2011-2013 Graham Edgecombe <graham@grahamedgecombe.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef STDNORETURN_H
#define STDNORETURN_H
#if defined(__clang__) && __clang_major__ == 3 && __clang_minor__ == 0
#define noreturn
#else
#define noreturn _Noreturn
#endif
#endif
|
Fix lack of _Noreturn support in Clang 3.0.
|
Fix lack of _Noreturn support in Clang 3.0.
|
C
|
isc
|
grahamedgecombe/arc,grahamedgecombe/arc,grahamedgecombe/arc
|
28726b93b0b9ae221f54ab7cc297d09a9af6843a
|
src/lib/pubkey/rfc6979/rfc6979.h
|
src/lib/pubkey/rfc6979/rfc6979.h
|
/*
* RFC 6979 Deterministic Nonce Generator
* (C) 2014 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_RFC6979_GENERATOR__
#define BOTAN_RFC6979_GENERATOR__
#include <botan/bigint.h>
#include <string>
namespace Botan {
/**
* @param x the secret (EC)DSA key
* @param q the group order
* @param h the message hash already reduced mod q
* @param hash the hash function used to generate h
*/
BigInt BOTAN_DLL generate_rfc6979_nonce(const BigInt& x,
const BigInt& q,
const BigInt& h,
const std::string& hash);
}
#endif
|
/*
* RFC 6979 Deterministic Nonce Generator
* (C) 2014 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_RFC6979_GENERATOR_H__
#define BOTAN_RFC6979_GENERATOR_H__
#include <botan/bigint.h>
#include <string>
namespace Botan {
/**
* @param x the secret (EC)DSA key
* @param q the group order
* @param h the message hash already reduced mod q
* @param hash the hash function used to generate h
*/
BigInt BOTAN_DLL generate_rfc6979_nonce(const BigInt& x,
const BigInt& q,
const BigInt& h,
const std::string& hash);
}
#endif
|
Fix header guard for amalgamation
|
Fix header guard for amalgamation
|
C
|
bsd-2-clause
|
randombit/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,webmaster128/botan,webmaster128/botan
|
ea154d7d98f4c6d1ded69031ff583b4f4c47118b
|
src/core/internal/kms-utils.h
|
src/core/internal/kms-utils.h
|
#ifndef __KMS_UTILS_H__
#define __KMS_UTILS_H__
#include <gst/gst.h>
GstElement* kms_get_pipeline();
void kms_dynamic_connection(GstElement *orig, GstElement *dest, const gchar *name);
GstElement* kms_utils_get_element_for_caps(GstElementFactoryListType type,
GstRank rank, const GstCaps *caps,
GstPadDirection direction, gboolean subsetonly,
const gchar *name);
#endif /* __KMS_UTILS_H__ */
|
#ifndef __KMS_UTILS_H__
#define __KMS_UTILS_H__
#include <gst/gst.h>
#define KMS_DEBUG_PIPE(name) GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS( \
GST_BIN(kms_get_pipeline()), \
GST_DEBUG_GRAPH_SHOW_ALL, name); \
GstElement* kms_get_pipeline();
void kms_dynamic_connection(GstElement *orig, GstElement *dest, const gchar *name);
GstElement* kms_utils_get_element_for_caps(GstElementFactoryListType type,
GstRank rank, const GstCaps *caps,
GstPadDirection direction, gboolean subsetonly,
const gchar *name);
#endif /* __KMS_UTILS_H__ */
|
Create a macro for pipeline debugging
|
Create a macro for pipeline debugging
|
C
|
lgpl-2.1
|
lulufei/kurento-media-server,shelsonjava/kurento-media-server,shelsonjava/kurento-media-server,mparis/kurento-media-server,todotobe1/kurento-media-server,Kurento/kurento-media-server,Kurento/kurento-media-server,mparis/kurento-media-server,TribeMedia/kurento-media-server,TribeMedia/kurento-media-server,lulufei/kurento-media-server,todotobe1/kurento-media-server
|
ec313ebc744efcab09f2782aa86067cbeec8a424
|
[42]_Bleichenbacher_s_e3_RSA_Attack/rsa_sign_constants.h
|
[42]_Bleichenbacher_s_e3_RSA_Attack/rsa_sign_constants.h
|
#ifndef _RSA_SIGN_CONSTANTS_H_
#define _RSA_SIGN_CONSTANTS_H_
/*
* RSA Block length. Used to determine the modulo's size.
*/
#define RSA_SIGN_BLOCK_LEN (1024)
#define RSA_SIGN_HASH_METHOD_SHA_1 ("sha1")
#define RSA_SIGN_HASH_METHOD_SHA_256 ("sha256")
/*
* Supported Hashing methods for RSA signature validation
*/
enum rsa_sign_hash_method {SHA1, SHA256 };
#endif /* _RSA_SIGN_CONSTANTS_H_ */
|
#ifndef _RSA_SIGN_CONSTANTS_H_
#define _RSA_SIGN_CONSTANTS_H_
/*
* RSA Block length. Used to determine the modulo's size.
*/
#define RSA_SIGN_BLOCK_LEN (RSA_SIGN_KEY_BITSIZE/8)
#define RSA_SIGN_KEY_BITSIZE (1024)
#define RSA_SIGN_HASH_METHOD_SHA_1 ("sha1")
#define RSA_SIGN_HASH_METHOD_SHA_256 ("sha256")
/*
* Supported Hashing methods for RSA signature validation
*/
enum rsa_sign_hash_method {SHA1, SHA256 };
#endif /* _RSA_SIGN_CONSTANTS_H_ */
|
Add RSA byte length constant
|
Add RSA byte length constant
A RSA byte length define was added to disambiguate RSA_KEY_BITLENGTH
(typically 1024 here) from the RSA byte block length.
|
C
|
mit
|
lucasg/Cryptopals,lucasg/Cryptopals,lucasg/Cryptopals,lucasg/Cryptopals
|
55af85fb1da9a202d6ca6f437c30b927d4153c39
|
Include/KAI/Platform/GameController.h
|
Include/KAI/Platform/GameController.h
|
#ifndef KAI_PLATFORM_GAME_CONTROLLER_H
#define KAI_PLATFORM_GAME_CONTROLLER_H
#include KAI_PLATFORM_INCLUDE(GameController.h)
#endif // SHATTER_PLATFORM_GAME_CONTROLLER_H
//EOF
|
#ifndef KAI_PLATFORM_GAME_CONTROLLER_H
#define KAI_PLATFORM_GAME_CONTROLLER_H
#include KAI_PLATFORM_INCLUDE(GameController.h)
#endif
//EOF
|
Add some color for console output
|
Add some color for console output
Former-commit-id: 315cc71afe5d5245e60ce4564328619c49310b6a
Former-commit-id: 4afa9ab712a2bdbef25bee286ff0bdcf2a8da2b2
|
C
|
mit
|
cschladetsch/KAI,cschladetsch/KAI,cschladetsch/KAI
|
296a1a19d14a6bf5d97e66370d89f0b64da87175
|
iree/compiler/Translation/SPIRV/LinalgToSPIRV/Passes.h
|
iree/compiler/Translation/SPIRV/LinalgToSPIRV/Passes.h
|
// Copyright 2020 Google LLC
//
// 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
//
// https://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 IREE_COMPILER_TRANSLATION_SPIRV_LINALGTOSPIRV_PASSES_H
#define IREE_COMPILER_TRANSLATION_SPIRV_LINALGTOSPIRV_PASSES_H
#include "mlir/Pass/Pass.h"
namespace mlir {
namespace iree_compiler {
/// Pass to get gpu.module from a gpu.launch operation.
std::unique_ptr<OpPassBase<FuncOp>> createIREEGpuKernelOutliningPass();
} // namespace iree_compiler
} // namespace mlir
#endif
|
// Copyright 2020 Google LLC
//
// 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
//
// https://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 IREE_COMPILER_TRANSLATION_SPIRV_LINALGTOSPIRV_PASSES_H
#define IREE_COMPILER_TRANSLATION_SPIRV_LINALGTOSPIRV_PASSES_H
#include "mlir/Pass/Pass.h"
namespace mlir {
namespace iree_compiler {
/// Pass to get gpu.module from a gpu.launch operation.
std::unique_ptr<OpPassBase<ModuleOp>> createIREEGpuKernelOutliningPass();
} // namespace iree_compiler
} // namespace mlir
#endif
|
Fix mismatch in function signature and implementation.
|
Fix mismatch in function signature and implementation.
PiperOrigin-RevId: 299956663
|
C
|
apache-2.0
|
google/iree,iree-org/iree,iree-org/iree,iree-org/iree,iree-org/iree,google/iree,google/iree,google/iree,iree-org/iree,iree-org/iree,iree-org/iree,google/iree,google/iree,google/iree
|
2307eb88c7452b5a83f7a7931bdf2a0a0435f5f8
|
test/input/replace_minus.c
|
test/input/replace_minus.c
|
#include <string.h>
#include "../../input.h"
int main(void)
{
char before[64] = "-2+1";
char after[64] = "(0-2.000000)+1";
replace_minus(before);
if (strcmp(before, after) == 0){
return (0);
}
else {
return (-1);
}
}
|
#include <string.h>
#include "../../input.h"
int main(void)
{
// a case removable
char before1[64] = "-2+1";
char after1[64] = "(0-2.000000)+1";
replace_minus(before1);
if (strcmp(before1, after1) != 0){
return (-1);
}
// a case not removable
char before2[64] = "3-2";
char after2[64] = "3-2";
replace_minus(before2);
if (strcmp(before2, after2) != 0){
return (-1);
}
return (0);
}
|
Add new test to remove_minus
|
Add new test to remove_minus
|
C
|
mit
|
Roadagain/Calculator,Roadagain/Calculator
|
40225798d32b3b36bf03583865fe88bfee2f31bc
|
lib/Common/Memory/MarkContextWrapper.h
|
lib/Common/Memory/MarkContextWrapper.h
|
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "core/RecyclerHeapMarkingContext.h"
// Class used to wrap a MarkContext so that calls to MarkObjects during IRecyclerVisitedObject::Trace
// can mark with the correct contextual template parameters
template<bool parallel>
class MarkContextWrapper : public IRecyclerHeapMarkingContext
{
public:
MarkContextWrapper(MarkContext* context) : markContext(context) {}
void __stdcall MarkObjects(void** objects, size_t count, void* parent) override
{
for (size_t i = 0; i < count; i++)
{
// We pass true for interior, since we expect a majority of the pointers being marked by
// external objects to themselves be external (and thus candidates for interior pointers).
markContext->Mark<parallel, /*interior*/true, /*doSpecialMark*/ false>(objects[i], parent);
}
}
private:
// Should only be created on the stack
void* operator new(size_t);
MarkContext* markContext;
};
|
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "Core/RecyclerHeapMarkingContext.h"
// Class used to wrap a MarkContext so that calls to MarkObjects during IRecyclerVisitedObject::Trace
// can mark with the correct contextual template parameters
template<bool parallel>
class MarkContextWrapper : public IRecyclerHeapMarkingContext
{
public:
MarkContextWrapper(MarkContext* context) : markContext(context) {}
void __stdcall MarkObjects(void** objects, size_t count, void* parent) override
{
for (size_t i = 0; i < count; i++)
{
// We pass true for interior, since we expect a majority of the pointers being marked by
// external objects to themselves be external (and thus candidates for interior pointers).
markContext->Mark<parallel, /*interior*/true, /*doSpecialMark*/ false>(objects[i], parent);
}
}
private:
// Should only be created on the stack
void* operator new(size_t);
MarkContext* markContext;
};
|
Fix casing for relatively included header to fix Linux builds
|
Fix casing for relatively included header to fix Linux builds
|
C
|
mit
|
mrkmarron/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore
|
5284cde440e54c6a841efb6a5864afdf3a0aa78e
|
sdl2cubes/tests/test_mesh.c
|
sdl2cubes/tests/test_mesh.c
|
#include "../src/mesh_obj.h"
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *args[]) {
if(argc < 2) {
printf("test_mesh test-mesh-name.obj\n");
return 0;
}
// read mesh from standard input, push into obj parser
Mesh *mesh = meshReadOBJ(args[1]);
if(!mesh) {
return 0;
}
unsigned numFloats = meshGetNumFloats(mesh);
unsigned numVertices = meshGetNumVertices(mesh);
float *buf = malloc(sizeof(float) * numFloats);
meshPackVertices(mesh, buf);
meshClose(mesh);
return 0;
}
|
#include "../src/mesh_obj.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *args[]) {
if(argc < 2) {
printf("usage: test_mesh filename.obj\n");
printf(" pass - (a dash character) as filename to read from stdin\n");
return 0;
}
Mesh *mesh;
// read mesh from standard input or file, push into obj parser
if(!strcmp("-", args[1])) {
mesh = meshReadOBJF(stdin, "(stdin)");
} else {
mesh = meshReadOBJ(args[1]);
}
if(!mesh) {
return 0;
}
unsigned numFloats = meshGetNumFloats(mesh);
unsigned numVertices = meshGetNumVertices(mesh);
float *buf = malloc(sizeof(float) * numFloats);
meshPackVertices(mesh, buf);
meshClose(mesh);
free(buf);
return 0;
}
|
Make mesh loader actually read stdin
|
tests: Make mesh loader actually read stdin
|
C
|
unlicense
|
teistiz/instanssi-samples
|
adcbe2a70a34603eba67d5048b37132804472cda
|
src/libidaten/cuda/cudainit.h
|
src/libidaten/cuda/cudainit.h
|
#pragma once
#include <cuda.h>
#include "cuda/cudautil.h"
namespace idaten {
void initCuda()
{
checkCudaErrors(cuInit(0));
}
}
|
#pragma once
#include <cuda.h>
#include "cuda/cudautil.h"
namespace idaten {
inline void initCuda()
{
checkCudaErrors(cuInit(0));
}
}
|
Fix a bug that not inlined.
|
Fix a bug that not inlined.
|
C
|
mit
|
nakdai/aten,nakdai/aten
|
fa458a1f7c574c0fe8d40dff4c1af418c365b8ad
|
src/main.c
|
src/main.c
|
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include "basic.h"
#include "tuntap_if.h"
#include "utils.h"
int main(int argc, char** argv) {
int tun_fd;
char buf[100];
char *dev = calloc(10, 1);
CLEAR(buf);
tun_fd = tun_alloc(dev);
if (set_if_up(dev) != 0) {
printf("ERROR when setting up if\n");
}
if (set_if_address(dev, "10.0.0.5/24") != 0) {
printf("ERROR when setting address for if\n");
};
if (set_if_route(dev, "10.0.0.0/24") != 0) {
printf("ERROR when setting route for if\n");
}
read(tun_fd, buf, 100);
print_hexdump(buf, 100);
free(dev);
}
|
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include "basic.h"
#include "tuntap_if.h"
#include "utils.h"
int main(int argc, char** argv) {
int tun_fd;
char buf[100];
char *dev = calloc(10, 1);
CLEAR(buf);
tun_fd = tun_alloc(dev);
if (set_if_up(dev) != 0) {
printf("ERROR when setting up if\n");
}
if (set_if_address(dev, "10.0.0.5/24") != 0) {
printf("ERROR when setting address for if\n");
};
if (set_if_route(dev, "10.0.0.0/24") != 0) {
printf("ERROR when setting route for if\n");
}
while (1) {
read(tun_fd, buf, 100);
print_hexdump(buf, 100);
}
free(dev);
}
|
Read from tun buffer and print hexdump in loop
|
Read from tun buffer and print hexdump in loop
|
C
|
mit
|
saminiir/level-ip,saminiir/level-ip
|
d222c00f6c4fe1aea3bf4afe45582af8977d6d59
|
Sensorama/Sensorama/SRDataModel.h
|
Sensorama/Sensorama/SRDataModel.h
|
//
// SRDataModel.h
// Sensorama
//
// Created by Wojciech Adam Koszek (h) on 19/04/2016.
// Copyright © 2016 Wojciech Adam Koszek. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Realm/Realm.h"
@interface SRDataPoint : RLMObject
@property NSNumber<RLMInt> *accX;
@property NSNumber<RLMInt> *accY;
@property NSNumber<RLMInt> *accZ;
@property NSNumber<RLMInt> *magX;
@property NSNumber<RLMInt> *magY;
@property NSNumber<RLMInt> *magZ;
@property NSNumber<RLMInt> *gyroX;
@property NSNumber<RLMInt> *gyroY;
@property NSNumber<RLMInt> *gyroZ;
@property NSInteger fileId;
@property NSInteger curTime;
@end
@interface SRDataFile : RLMObject
@property NSString *username;
@property NSString *desc;
/* need to do something about device_info */
@property NSInteger sampleInterval;
@property BOOL accEnabled;
@property BOOL magEnabled;
@property BOOL gyroEnabled;
@property NSDate *dateStart;
@property NSDate *dateEnd;
@property NSInteger fileId;
@end
|
//
// SRDataModel.h
// Sensorama
//
// Created by Wojciech Adam Koszek (h) on 19/04/2016.
// Copyright © 2016 Wojciech Adam Koszek. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Realm/Realm.h"
@interface SRDataPoint : RLMObject
@property NSNumber<RLMInt> *accX;
@property NSNumber<RLMInt> *accY;
@property NSNumber<RLMInt> *accZ;
@property NSNumber<RLMInt> *magX;
@property NSNumber<RLMInt> *magY;
@property NSNumber<RLMInt> *magZ;
@property NSNumber<RLMInt> *gyroX;
@property NSNumber<RLMInt> *gyroY;
@property NSNumber<RLMInt> *gyroZ;
@property NSInteger fileId;
@property NSInteger curTime;
@end
@interface SRDataFile : RLMObject
@property NSString *username;
@property NSString *desc;
@property NSString *timezone;
/* need to do something about device_info */
@property NSInteger sampleInterval;
@property BOOL accEnabled;
@property BOOL magEnabled;
@property BOOL gyroEnabled;
@property NSDate *dateStart;
@property NSDate *dateEnd;
@property NSInteger fileId;
@end
|
Add the timezone to the data model.
|
Add the timezone to the data model.
|
C
|
bsd-2-clause
|
wkoszek/sensorama-ios,wkoszek/sensorama-ios,wkoszek/sensorama-ios,wkoszek/sensorama-ios
|
f6392137118661add2ab7fc98be42a0c8748bb1d
|
lib/enable_execute_stack.c
|
lib/enable_execute_stack.c
|
//===-- enable_execute_stack.c - Implement __enable_execute_stack ---------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <stdint.h>
#include <sys/mman.h>
//
// The compiler generates calls to __enable_execute_stack() when creating
// trampoline functions on the stack for use with nested functions.
// It is expected to mark the page(s) containing the address
// and the next 48 bytes as executable. Since the stack is normally rw-
// that means changing the protection on those page(s) to rwx.
//
void __enable_execute_stack(void* addr)
{
#if __APPLE__
// On Darwin, pagesize is always 4096 bytes
const uintptr_t pageSize = 4096;
#else
// FIXME: We should have a configure check for this.
const uintptr_t pagesize = getpagesize();
#endif
const uintptr_t pageAlignMask = ~(pageSize-1);
uintptr_t p = (uintptr_t)addr;
unsigned char* startPage = (unsigned char*)(p & pageAlignMask);
unsigned char* endPage = (unsigned char*)((p+48+pageSize) & pageAlignMask);
mprotect(startPage, endPage-startPage, PROT_READ | PROT_WRITE | PROT_EXEC);
}
|
//===-- enable_execute_stack.c - Implement __enable_execute_stack ---------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <stdint.h>
#include <sys/mman.h>
#ifndef __APPLE__
#include <unistd.h>
#endif
//
// The compiler generates calls to __enable_execute_stack() when creating
// trampoline functions on the stack for use with nested functions.
// It is expected to mark the page(s) containing the address
// and the next 48 bytes as executable. Since the stack is normally rw-
// that means changing the protection on those page(s) to rwx.
//
void __enable_execute_stack(void* addr)
{
#if __APPLE__
// On Darwin, pagesize is always 4096 bytes
const uintptr_t pageSize = 4096;
#else
// FIXME: We should have a configure check for this.
const uintptr_t pageSize = getpagesize();
#endif
const uintptr_t pageAlignMask = ~(pageSize-1);
uintptr_t p = (uintptr_t)addr;
unsigned char* startPage = (unsigned char*)(p & pageAlignMask);
unsigned char* endPage = (unsigned char*)((p+48+pageSize) & pageAlignMask);
mprotect(startPage, endPage-startPage, PROT_READ | PROT_WRITE | PROT_EXEC);
}
|
Add missing include for getpagesize, and fix a typo.
|
Add missing include for getpagesize, and fix a typo.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@74588 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
|
a683ed193b85656e90ca7ee54298106fa6a313e4
|
tests/regression/36-octapron/17-traces-rpb-litmus.c
|
tests/regression/36-octapron/17-traces-rpb-litmus.c
|
// SKIP PARAM: --sets ana.activated[+] octApron
#include <pthread.h>
#include <assert.h>
int g = 42; // matches write in t_fun
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
// pthread_mutex_lock(&A);
// pthread_mutex_lock(&B);
// g = 42;
// pthread_mutex_unlock(&B);
// pthread_mutex_unlock(&A);
return NULL;
}
int main(void) {
int r, t;
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
pthread_mutex_lock(&A);
pthread_mutex_lock(&B);
if (r * r) {
g = 17;
pthread_mutex_unlock(&B); // publish to g#prot
pthread_mutex_lock(&B);
}
// locally written g is only in one branch, g == g#prot should be forgotten!
t = g;
assert(t == 17); // UNKNOWN!
pthread_mutex_unlock(&B);
pthread_mutex_unlock(&A);
return 0;
}
|
// SKIP PARAM: --sets ana.activated[+] octApron
#include <pthread.h>
#include <assert.h>
int g = 42; // matches write in t_fun
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
pthread_mutex_lock(&A);
pthread_mutex_lock(&B);
g = 42;
pthread_mutex_unlock(&B);
pthread_mutex_unlock(&A);
return NULL;
}
int main(void) {
int r, t;
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
pthread_mutex_lock(&A);
pthread_mutex_lock(&B);
if (r) {
g = 17;
pthread_mutex_unlock(&B); // publish to g#prot
pthread_mutex_lock(&B);
}
// locally written g is only in one branch, g == g#prot should be forgotten!
t = g;
assert(t == 17); // UNKNOWN!
pthread_mutex_unlock(&B);
pthread_mutex_unlock(&A);
return 0;
}
|
Remove debugging changes from 36/17
|
Remove debugging changes from 36/17
|
C
|
mit
|
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
|
4e1124d7c68bc85cc6b6f1adceb63034d4bfe812
|
src/REvent.h
|
src/REvent.h
|
#ifndef __INCLUDED_6FCA43F2953F11E6AA6EA088B4D1658C
#define __INCLUDED_6FCA43F2953F11E6AA6EA088B4D1658C
#include <RTypes.h>
class REvent
{
public:
REvent();
virtual
~REvent();
void
accept();
void
ignore();
bool
isAccepted() const;
void
setAccepted(bool accepted);
virtual rcount
type() const;
static rcount
registerEventType();
private:
bool mIsAccepted;
};
/**
* An easy wrapper template for generate type() method and provide auto
* registered static type variable. So that you could focus on the
* implementation of event class.
*/
template <class DerivedType, class BaseType>
class TypeRegisteredEvent : public BaseType
{
public:
rcount
type() const
{
return sType;
}
static inline rcount
staticType()
{
return sType;
}
private:
static const rcount sType;
};
template <class DerivedType, class BaseType>
const rcount TypeRegisteredEvent<DerivedType,
BaseType>::sType = REvent::registerEventType();
#endif // __INCLUDED_6FCA43F2953F11E6AA6EA088B4D1658C
|
#ifndef __INCLUDED_6FCA43F2953F11E6AA6EA088B4D1658C
#define __INCLUDED_6FCA43F2953F11E6AA6EA088B4D1658C
#include <RTypes.h>
class REvent
{
public:
REvent();
virtual
~REvent();
void
accept();
void
ignore();
bool
isAccepted() const;
void
setAccepted(bool accepted);
virtual rcount
type() const;
static rcount
registerEventType();
private:
bool mIsAccepted;
};
/**
* An easy wrapper template for generate type() method and provide auto
* registered static type variable. So that you could focus on the
* implementation of event class.
*/
template <class DerivedType, class BaseType = REvent>
class TypeRegisteredEvent : public BaseType
{
public:
// Inherit all constructors
template <class ... ParamTypes>
TypeRegisteredEvent(ParamTypes ... params)
: BaseType(params ...)
{
}
rcount
type() const
{
return sType;
}
static inline rcount
staticType()
{
return sType;
}
private:
static const rcount sType;
};
template <class DerivedType, class BaseType>
const rcount TypeRegisteredEvent<DerivedType,
BaseType>::sType = REvent::registerEventType();
#endif // __INCLUDED_6FCA43F2953F11E6AA6EA088B4D1658C
|
Support inhert constructors from BaseType
|
Support inhert constructors from BaseType
|
C
|
mit
|
starofrainnight/ArduinoRabirdTookit,starofrainnight/ArduinoRabirdToolkit,starofrainnight/ArduinoRabirdToolkit
|
6f24c8ade6012005ceb41b4a2cc70a021d7f1d64
|
src/trusted/service_runtime/linux/arm/sel_segments.c
|
src/trusted/service_runtime/linux/arm/sel_segments.c
|
/*
* Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <stdint.h>
#include "native_client/src/trusted/service_runtime/sel_util.h"
uint32_t NaClGetStackPtr(void) {
uint32_t sp;
asm("mov %0, %%sp" : "=r" (sp));
return sp;
}
|
/*
* Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <stdint.h>
#include "native_client/src/trusted/service_runtime/sel_util.h"
uint32_t NaClGetStackPtr(void) {
uint32_t sp;
asm("mov %0, sp" : "=r" (sp));
return sp;
}
|
Make sel build with clang's built-in assembler.
|
arm: Make sel build with clang's built-in assembler.
clang's integrated assembler only supports UAL, where sp is spelled
sp and not %sp. Fixes the following error when building with clang's
integrated assembler enabled:
../../native_client/src/trusted/service_runtime/linux/arm/sel_segments.c:13:7: error: unexpected token in operand
asm("mov %0, %%sp" : "=r" (sp));
^
<inline asm>:1:10: note: instantiated into assembly here
mov r0, %sp
^
1 error generated.
BUG=chromium:124610
Review URL: https://codereview.chromium.org/1485143002
|
C
|
bsd-3-clause
|
sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client
|
0f00cf915c8c590d1b00e89ac5e883fe3bfd1213
|
main.c
|
main.c
|
#include <stdio.h>
#include <stdlib.h>
#include "src/headers.h"
int main()
{
char* taskfilepath = "D:\\zz_exp\\testinggrounds\\tasks.txt";
task_list* list = gettasks(taskfilepath);
task_list* traveller = list;
while ( traveller != NULL ) {
task_t* task = traveller -> task;
result_t* result = deliver(task);
printf("MESSAGE: %s\n", result -> message);
traveller = traveller -> next;
}
return 0;
}
|
#include <stdio.h>
#include <stdlib.h>
#include "src/headers.h"
int main(int argc, char** argv)
{
for ( int x = 0; x < argc; x++ ) {
char* taskfilepath = argv[x];
task_list* list = gettasks(taskfilepath);
task_list* traveller = list;
while ( traveller != NULL ) {
task_t* task = traveller -> task;
result_t* result = deliver(task);
printf("MESSAGE: %s\n", result -> message);
traveller = traveller -> next;
}
}
return 0;
}
|
Allow user to indicate filepaths of taskfiles
|
v2.0.1: Allow user to indicate filepaths of taskfiles
User can now usee multiple taskfiles and specify via arguments the
location of taskfiles to be used
|
C
|
mit
|
DanerJimenez/File-Delivery-Truck
|
ab1766cc27f548384b400de3b2417c598da3b503
|
src/hello_zproto_selftest.c
|
src/hello_zproto_selftest.c
|
/* =========================================================================
hello_zproto_selftest - run self tests
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
=========================================================================
*/
#include "../include/hello_zproto.h"
int main (int argc, char *argv [])
{
bool verbose;
if (argc == 2 && streq (argv [1], "-v"))
verbose = true;
else
verbose = false;
printf ("Running self tests...\n");
hello_zproto_msg_test (verbose);
citizen_msg_test (verbose);
printf ("Tests passed OK\n");
return 0;
}
|
/* =========================================================================
hello_zproto_selftest - run self tests
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
=========================================================================
*/
#include "../include/hello_zproto.h"
int main (int argc, char *argv [])
{
bool verbose;
if (argc == 2 && streq (argv [1], "-v"))
verbose = true;
else
verbose = false;
printf ("Running self tests...\n");
hello_zproto_msg_test (verbose);
citizen_msg_test (verbose);
citizen_server_test (verbose);
printf ("Tests passed OK\n");
return 0;
}
|
Add citizen_server self test to overall self test
|
Add citizen_server self test to overall self test
|
C
|
mit
|
jemc/hello_zproto,jemc/hello_zproto,jemc/hello_zproto,jemc/hello_zproto
|
d786eea17f6d55643ba7df12859d1e60e0c6cb39
|
textdocument/lib/grantlee_gui_export.h
|
textdocument/lib/grantlee_gui_export.h
|
/*
This file is part of the Grantlee template system.
Copyright (c) 2010 Stephen Kelly <steveire@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License version 3 only, as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License version 3 for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRANTLEE_GUI_EXPORT_H
#define GRANTLEE_GUI_EXPORT_H
#if defined(_WIN32) || defined(_WIN64)
# ifndef GRANTLEE_GUI_EXPORT
# if defined(GRANTLEE_GUI_LIB_MAKEDLL)
# define GRANTLEE_GUI_EXPORT __declspec(dllexport)
# else
# define GRANTLEE_GUI_EXPORT __declspec(dllimport)
# endif
# endif
#else
# define GRANTLEE_GUI_EXPORT __attribute__((visibility("default")))
#endif
#endif
|
/*
This file is part of the Grantlee template system.
Copyright (c) 2010 Stephen Kelly <steveire@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either version
2.1 of the Licence, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRANTLEE_GUI_EXPORT_H
#define GRANTLEE_GUI_EXPORT_H
#if defined(_WIN32) || defined(_WIN64)
# ifndef GRANTLEE_GUI_EXPORT
# if defined(GRANTLEE_GUI_LIB_MAKEDLL)
# define GRANTLEE_GUI_EXPORT __declspec(dllexport)
# else
# define GRANTLEE_GUI_EXPORT __declspec(dllimport)
# endif
# endif
#else
# define GRANTLEE_GUI_EXPORT __attribute__((visibility("default")))
#endif
#endif
|
Fix license header in the export header.
|
Fix license header in the export header.
|
C
|
lgpl-2.1
|
simonwagner/grantlee,simonwagner/grantlee,cutelyst/grantlee,cutelyst/grantlee,simonwagner/grantlee,simonwagner/grantlee,simonwagner/grantlee,simonwagner/grantlee,cutelyst/grantlee,cutelyst/grantlee,cutelyst/grantlee
|
0c5c3b93d8b9b1821c3e128c731ff7788eaf1238
|
lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.h
|
lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.h
|
//===-- AMDGPUCodeEmitter.h - AMDGPU Code Emitter interface -----------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
/// \file
/// \brief CodeEmitter interface for R600 and SI codegen.
//
//===----------------------------------------------------------------------===//
#ifndef AMDGPUCODEEMITTER_H
#define AMDGPUCODEEMITTER_H
#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/Support/raw_ostream.h"
namespace llvm {
class MCInst;
class MCOperand;
class MCSubtargetInfo;
class AMDGPUMCCodeEmitter : public MCCodeEmitter {
virtual void anchor();
public:
uint64_t getBinaryCodeForInstr(const MCInst &MI,
SmallVectorImpl<MCFixup> &Fixups,
const MCSubtargetInfo &STI) const;
virtual uint64_t getMachineOpValue(const MCInst &MI, const MCOperand &MO,
SmallVectorImpl<MCFixup> &Fixups,
const MCSubtargetInfo &STI) const {
return 0;
}
};
} // End namespace llvm
#endif // AMDGPUCODEEMITTER_H
|
//===-- AMDGPUCodeEmitter.h - AMDGPU Code Emitter interface -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
/// \file
/// \brief CodeEmitter interface for R600 and SI codegen.
//
//===----------------------------------------------------------------------===//
#ifndef AMDGPUCODEEMITTER_H
#define AMDGPUCODEEMITTER_H
#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/Support/raw_ostream.h"
namespace llvm {
class MCInst;
class MCOperand;
class MCSubtargetInfo;
class AMDGPUMCCodeEmitter : public MCCodeEmitter {
virtual void anchor();
public:
uint64_t getBinaryCodeForInstr(const MCInst &MI,
SmallVectorImpl<MCFixup> &Fixups,
const MCSubtargetInfo &STI) const;
virtual uint64_t getMachineOpValue(const MCInst &MI, const MCOperand &MO,
SmallVectorImpl<MCFixup> &Fixups,
const MCSubtargetInfo &STI) const {
return 0;
}
};
} // End namespace llvm
#endif // AMDGPUCODEEMITTER_H
|
Fix missing C++ mode comment
|
Fix missing C++ mode comment
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@203133 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm
|
f1d4393eb8cedeec0214c497c73a528806ae2118
|
src/protocols/rdp/compat/winpr-stream.c
|
src/protocols/rdp/compat/winpr-stream.c
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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 "config.h"
#include "winpr-stream.h"
#include "winpr-wtypes.h"
/*
* NOTE: Because the old API did not support local allocation of the buffer
* for each stream, these compatibility implementations ignore
* the parameters of Stream_New() and Stream_Free() that provide them.
*/
wStream* Stream_New(BYTE* buffer, size_t size) {
return stream_new(size);
}
void Stream_Free(wStream* s, BOOL bFreeBuffer) {
stream_free(s);
}
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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 "config.h"
#include "winpr-stream.h"
#include "winpr-wtypes.h"
wStream* Stream_New(BYTE* buffer, size_t size) {
/* If no buffer is provided, allocate a new stream of the given size */
if (buffer == NULL)
return stream_new(size);
/* Otherwise allocate an empty stream and assign the given buffer */
wStream* stream = stream_new(0);
stream_attach(stream, buffer, size);
return stream;
}
void Stream_Free(wStream* s, BOOL bFreeBuffer) {
/* Disassociate buffer if it will be freed externally */
if (!bFreeBuffer)
stream_detach(s);
stream_free(s);
}
|
Implement buffer attachment in Stream_New() and Stream_Free() compatibility functions.
|
GUACAMOLE-25: Implement buffer attachment in Stream_New() and Stream_Free() compatibility functions.
|
C
|
apache-2.0
|
mike-jumper/incubator-guacamole-server,apache/guacamole-server,mike-jumper/incubator-guacamole-server,mike-jumper/incubator-guacamole-server,glyptodon/guacamole-server,apache/guacamole-server,glyptodon/guacamole-server,glyptodon/guacamole-server,mike-jumper/incubator-guacamole-server,apache/guacamole-server
|
5d55abcfb068c87366329eae8f0502781145b57d
|
library/context.c
|
library/context.c
|
#include <stdlib.h>
#include <mqtt3.h>
mqtt3_context *mqtt3_context_init(int sock)
{
mqtt3_context *context;
context = malloc(sizeof(mqtt3_context));
if(!context) return NULL;
context->next = NULL;
context->sock = sock;
context->last_msg_in = time(NULL);
context->last_msg_out = time(NULL);
context->keepalive = 60; /* Default to 60s */
context->last_mid = 0;
context->id = NULL;
context->messages = NULL;
return context;
}
void mqtt3_context_cleanup(mqtt3_context *context)
{
if(!context) return;
if(context->sock != -1){
mqtt3_socket_close(context);
}
if(context->id) free(context->id);
/* FIXME - clean messages and subscriptions */
free(context);
}
|
#include <stdlib.h>
#include <mqtt3.h>
mqtt3_context *mqtt3_context_init(int sock)
{
mqtt3_context *context;
context = malloc(sizeof(mqtt3_context));
if(!context) return NULL;
context->next = NULL;
context->sock = sock;
context->last_msg_in = time(NULL);
context->last_msg_out = time(NULL);
context->keepalive = 60; /* Default to 60s */
context->last_mid = 0;
context->id = NULL;
context->messages = NULL;
return context;
}
void mqtt3_context_cleanup(mqtt3_context *context)
{
if(!context) return;
if(context->sock != -1){
mqtt3_socket_close(context);
}
if(context->clean_start){
mqtt3_db_subs_clean_start(context);
mqtt3_db_client_delete(context);
}
if(context->id) free(context->id);
/* FIXME - clean messages and subscriptions */
free(context);
}
|
Delete client info / subscription info on disconnect for clean_start == true.
|
Delete client info / subscription info on disconnect for clean_start == true.
|
C
|
bsd-3-clause
|
zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto
|
b17244b8aaacaa4bdd06d076f16831ad76b6fb9f
|
src/new/autonomous.c
|
src/new/autonomous.c
|
/* ======================================================================================================
___________________________________________________________________________________________________
| __ __ ________ __ __ __ ______ __ __ _________ ________ |
| \ \ / / | _____| \ \ / / / \ | _ \ \ \ / / |___ ___| | _____| |
| \ \ / / | |_____ \ \_/ / / /\ \ | |_| / \ \_/ / | | | |_____ |
| \ \ / / | _____| ) _ ( / /__\ \ | _ | \ / | | | _____| |
| \ \/ / | |_____ / / \ \ / ______ \ | |_| \ | | | | | |_____ |
| \__/ |________| /_/ \_\ /_/ \_\ |______/ |_| |_| |________| |
|___________________________________________________________________________________________________|
====================================================================================================== */
void pre_auton()
{
}
task autonomous()
{
}
|
/* ======================================================================================================
___________________________________________________________________________________________________
| __ __ ________ __ __ __ ______ __ __ _________ ________ |
| \ \ / / | _____| \ \ / / / \ | _ \ \ \ / / |___ ___| | _____| |
| \ \ / / | |_____ \ \_/ / / /\ \ | |_| / \ \_/ / | | | |_____ |
| \ \ / / | _____| ) _ ( / /__\ \ | _ | \ / | | | _____| |
| \ \/ / | |_____ / / \ \ / ______ \ | |_| \ | | | | | |_____ |
| \__/ |________| /_/ \_\ /_/ \_\ |______/ |_| |_| |________| |
|___________________________________________________________________________________________________|
====================================================================================================== */
static void a_base_encoders_reset(void);
void pre_auton()
{
a_base_encoders_reset();
}
task autonomous()
{
}
static void a_base_encoders_reset()
{
resetMotorEncoder(mBaseFL);
resetMotorEncoder(mBaseFR);
resetMotorEncoder(mBaseBL);
resetMotorEncoder(mBaseBR);
}
|
Reset motor encoders in pre_auton
|
Reset motor encoders in pre_auton
|
C
|
mit
|
qsctr/vex-4194b-2016
|
30b0db38ab47bbfcf3c12ec6c8907931ee33b247
|
src/engine/render/RenderSystem.h
|
src/engine/render/RenderSystem.h
|
#ifndef ENGINE_RENDER_RENDERSYSTEM_H
#define ENGINE_RENDER_RENDERSYSTEM_H
#include "engine/scene/SceneSystem.h"
#include "engine/UI/UISystem.h"
#include "engine/math/vec3.h"
namespace engine {
namespace render {
/**
* RenderSystem is a parent class for the actual rendering systems.
*
* RenderSystem gets pointers to the sceneSystem and uiSystem and will build the visuals from that.
*/
class RenderSystem : public EngineSystem {
protected:
vec3 cameraPos;
public:
~RenderSystem() {};
vec3 getCameraPos(){
return cameraPos;
}
void setCameraPos(vec3 pos){
cameraPos = pos;
}
};
}
}
#endif
|
#ifndef ENGINE_RENDER_RENDERSYSTEM_H
#define ENGINE_RENDER_RENDERSYSTEM_H
#include "engine/scene/SceneSystem.h"
#include "engine/UI/UISystem.h"
#include "engine/math/vec3.h"
namespace engine {
namespace render {
/**
* RenderSystem is a parent class for the actual rendering systems.
*
* RenderSystem gets pointers to the sceneSystem and uiSystem and will build the visuals from that.
*/
class RenderSystem : public EngineSystem {
protected:
vec3 cameraPos;
public:
~RenderSystem() {};
vec3 getCameraPos(){
return cameraPos;
}
void setCameraPos(vec3 pos){
cameraPos = pos;
}
virtual void uninit() = 0;
virtual void update() = 0;
};
}
}
#endif
|
Update is an abstract base function.
|
Update is an abstract base function.
|
C
|
bsd-2-clause
|
LauriM/ProjectIce,LauriM/ProjectIce
|
9d9c1caaee69f3f00743f5a2da14e9f2a7a57ede
|
core/alsp_src/generic/dfltsys.h
|
core/alsp_src/generic/dfltsys.h
|
/*==================================================================*
| dfltsys.h
| Copyright (c) 1995, Applied Logic Systems, Inc.
|
| -- Default system settings for property tags
|
| Author: Ken Bowen
| Date: 04/10/95
*==================================================================*/
#define BCINTER 1
#define LIBBRK 1
#define SYS_OBP 1
#define HASH 1
#define GENSYM 1
#define OSACCESS 1
#define REXEC 1
#define WINIOBASIS 1
#define XPANDTM 1
#define FSACCESS 1
#define OLDLEXAN 1
#define OLDFIO 1
#define OLDCIO 1
#define OLDCLOAD 1
#define PRIM_DBG 1
#undef OLDCONSULT
#define FREEZE 0
|
/*==================================================================*
| dfltsys.h
| Copyright (c) 1995, Applied Logic Systems, Inc.
|
| -- Default system settings for property tags
|
| Author: Ken Bowen
| Date: 04/10/95
*==================================================================*/
#define BCINTER 1
#define LIBBRK 1
#define SYS_OBP 1
#define HASH 1
#define GENSYM 1
#define OSACCESS 1
#define REXEC 1
#define WINIOBASIS 1
#define XPANDTM 1
#define FSACCESS 1
#define OLDLEXAN 1
#define OLDFIO 1
#define OLDCIO 1
#define OLDCLOAD 1
#define PRIM_DBG 1
#undef OLDCONSULT
#define FREEZE 1
|
Reset FREEZE to 1 to avoid confusion
|
Reset FREEZE to 1 to avoid confusion
Back in 1998, there was clearly confusion about #if vs #ifdef when FREEZE got set to 0, which is a no-op because FREEZE is always used with #ifdef. Offending commit: 62f68f19fc8f64b7e3003001ee2710d0c90e2554
|
C
|
mit
|
AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog
|
72b8f788149de5d667a0f76b674685bbd82dfc46
|
test/Sema/c11-typedef-redef.c
|
test/Sema/c11-typedef-redef.c
|
// RUN: %clang_cc1 -std=c11 %s -verify
typedef int type;
typedef type type;
typedef int type;
void f(int N) {
typedef int type2;
typedef type type2;
typedef int type2;
typedef int vla[N]; // expected-note{{previous definition is here}}
typedef int vla[N]; // expected-error{{redefinition of typedef for variably-modified type 'int [N]'}}
}
|
// RUN: %clang_cc1 -std=c11 %s -verify
typedef int type;
typedef type type;
typedef int type;
void f(int N) {
typedef int type2;
typedef type type2;
typedef int type2;
typedef int vla[N]; // expected-note{{previous definition is here}}
typedef int vla[N]; // expected-error{{redefinition of typedef for variably-modified type 'int [N]'}}
typedef int vla2[N];
typedef vla2 vla3; // expected-note{{previous definition is here}}
typedef vla2 vla3; // expected-error{{redefinition of typedef for variably-modified type 'vla2' (aka 'int [N]')}}
}
|
Extend test-case as requested by Eli
|
Extend test-case as requested by Eli
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@147974 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
|
32906dc26611ed18710c338b93136c2a487ada3b
|
testsuite/tests/unboxed-primitive-args/test_common.c
|
testsuite/tests/unboxed-primitive-args/test_common.c
|
/**************************************************************************/
/* */
/* OCaml */
/* */
/* Jeremie Dimino, Jane Street Europe */
/* */
/* Copyright 2015 Institut National de Recherche en Informatique et */
/* en Automatique. */
/* */
/* All rights reserved. This file is distributed under the terms of */
/* the GNU Lesser General Public License version 2.1, with the */
/* special exception on linking described in the file LICENSE. */
/* */
/**************************************************************************/
#include <caml/mlvalues.h>
#include <bigarray.h>
char *ocaml_buffer;
char *c_buffer;
value test_set_buffers(value v_ocaml_buffer, value v_c_buffer)
{
ocaml_buffer = Caml_ba_data_val(v_ocaml_buffer);
c_buffer = Caml_ba_data_val(v_c_buffer);
return Val_unit;
}
value test_cleanup_normal(void)
{
return Val_int(0);
}
double test_cleanup_float(void)
{
return 0.;
}
|
/**************************************************************************/
/* */
/* OCaml */
/* */
/* Jeremie Dimino, Jane Street Europe */
/* */
/* Copyright 2015 Institut National de Recherche en Informatique et */
/* en Automatique. */
/* */
/* All rights reserved. This file is distributed under the terms of */
/* the GNU Lesser General Public License version 2.1, with the */
/* special exception on linking described in the file LICENSE. */
/* */
/**************************************************************************/
#include <caml/mlvalues.h>
#include <caml/bigarray.h>
char *ocaml_buffer;
char *c_buffer;
value test_set_buffers(value v_ocaml_buffer, value v_c_buffer)
{
ocaml_buffer = Caml_ba_data_val(v_ocaml_buffer);
c_buffer = Caml_ba_data_val(v_c_buffer);
return Val_unit;
}
value test_cleanup_normal(void)
{
return Val_int(0);
}
double test_cleanup_float(void)
{
return 0.;
}
|
Update tests/unboxed-primitive-args: bigarray.h is now in caml/
|
Update tests/unboxed-primitive-args: bigarray.h is now in caml/
|
C
|
lgpl-2.1
|
gerdstolpmann/ocaml,gerdstolpmann/ocaml,gerdstolpmann/ocaml,gerdstolpmann/ocaml,gerdstolpmann/ocaml
|
0315072ff2ad7dc4707504901c9bcbf2dd77f75e
|
apps/Mcp9700aTemperatureSensor/Mcp9700aAppComponent/mcp9700aOnWp.c
|
apps/Mcp9700aTemperatureSensor/Mcp9700aAppComponent/mcp9700aOnWp.c
|
#include "legato.h"
#include "interfaces.h"
#include "mcp970x.h"
static int WpAdcFunction(int32_t *valueUv)
{
return le_adc_ReadValue("EXT_ADC0", valueUv);
}
le_result_t mangOH_ambientTemperature_Read(double *temperature)
{
int32_t tempInt;
int res = mcp970x_read_temperature(MCP970X_CHIP_9700A, WpAdcFunction, &tempInt);
if (res != 0)
{
return LE_FAULT;
}
*temperature = tempInt / 1000.0;
return LE_OK;
}
COMPONENT_INIT
{
}
|
#include "legato.h"
#include "interfaces.h"
#include "mcp970x.h"
static int WpAdcFunction(int32_t *valueUv)
{
int32_t valueMv;
le_result_t res = le_adc_ReadValue("EXT_ADC0", &valueMv);
if (res == LE_OK)
{
*valueUv = valueMv * 1000;
}
LE_DEBUG("Read %d uV from the ADC during ambient temperature measurement", *valueUv);
return res;
}
le_result_t mangOH_ambientTemperature_Read(double *temperature)
{
int32_t tempInt;
int res = mcp970x_read_temperature(MCP970X_CHIP_9700A, WpAdcFunction, &tempInt);
if (res != 0)
{
return LE_FAULT;
}
*temperature = tempInt / 1000.0;
LE_DEBUG("Read ambient temperature %f C", *temperature);
return LE_OK;
}
COMPONENT_INIT
{
}
|
Add in some logs for the MCP9700A
|
Add in some logs for the MCP9700A
The temperatures being read back are higher than expected. Add some
logs until the issue is resolved.
|
C
|
mpl-2.0
|
mangOH/mangOH,mangOH/mangOH,mangOH/mangOH,mangOH/mangOH
|
eb6f229e66a6d86499b00a806297a8610620f9cb
|
tests/check-gibber-xmpp-node.c
|
tests/check-gibber-xmpp-node.c
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <gibber/gibber-xmpp-node.h>
#include <check.h>
START_TEST (test_instantiation)
{
GibberXmppNode *node;
node = gibber_xmpp_node_new ("test");
fail_unless (node != NULL);
}
END_TEST
TCase *
make_gibber_xmpp_node_tcase (void)
{
TCase *tc = tcase_create ("XMPP Node");
tcase_add_test (tc, test_instantiation);
return tc;
}
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <gibber/gibber-xmpp-node.h>
#include <check.h>
START_TEST (test_instantiation)
{
GibberXmppNode *node;
node = gibber_xmpp_node_new ("test");
fail_unless (node != NULL);
node = gibber_xmpp_node_new (NULL);
fail_unless (node != NULL);
}
END_TEST
START_TEST (test_language)
{
GibberXmppNode *node;
const gchar *lang;
node = gibber_xmpp_node_new ("test");
lang = gibber_xmpp_node_get_language (node);
fail_unless (lang == NULL);
gibber_xmpp_node_set_language (node, "us");
lang = gibber_xmpp_node_get_language (node);
fail_unless (strcmp(lang, "us") == 0);
}
END_TEST
TCase *
make_gibber_xmpp_node_tcase (void)
{
TCase *tc = tcase_create ("XMPP Node");
tcase_add_test (tc, test_instantiation);
tcase_add_test (tc, test_language);
return tc;
}
|
Test gibber_xmpp_node_[gs]et_language() and node creation with a NULL name
|
Test gibber_xmpp_node_[gs]et_language() and node creation with a NULL name
20070609084741-f974e-602d6f3a4ba28432895c80518d5ea7daa5c85389.gz
|
C
|
lgpl-2.1
|
freedesktop-unofficial-mirror/telepathy__telepathy-salut,freedesktop-unofficial-mirror/telepathy__telepathy-salut,freedesktop-unofficial-mirror/telepathy__telepathy-salut,freedesktop-unofficial-mirror/telepathy__telepathy-salut
|
d71e81285378e9b1d6a902d970d28730156868d4
|
japlay.h
|
japlay.h
|
#ifndef _JAPLAY_H_
#define _JAPLAY_H_
#include <stdbool.h> /* bool */
struct song;
struct playlist_entry;
struct playlist;
struct playlist_entry *get_cursor(void);
extern struct playlist *japlay_queue, *japlay_history;
int get_song_info(struct song *song);
struct playlist_entry *add_file_playlist(struct playlist *playlist,
const char *filename);
int add_dir_or_file_playlist(struct playlist *playlist, const char *path);
int load_playlist(struct playlist *playlist, const char *filename);
void japlay_play(void);
void japlay_set_autovol(bool enabled);
void japlay_seek_relative(long msecs);
void japlay_seek(long msecs);
void japlay_stop(void);
void japlay_pause(void);
void japlay_skip(void);
int japlay_init(int *argc, char **argv);
void japlay_exit(void);
#endif
|
#ifndef _JAPLAY_H_
#define _JAPLAY_H_
#include <stdbool.h> /* bool */
struct song;
struct playlist_entry;
struct playlist;
struct playlist_entry *get_cursor(void);
extern struct playlist *japlay_queue, *japlay_history;
int get_song_info(struct song *song);
struct playlist_entry *add_file_playlist(struct playlist *playlist,
const char *filename);
int add_dir_or_file_playlist(struct playlist *playlist, const char *path);
int load_playlist(struct playlist *playlist, const char *filename);
void start_playlist_scan(void);
void japlay_play(void);
void japlay_set_autovol(bool enabled);
void japlay_seek_relative(long msecs);
void japlay_seek(long msecs);
void japlay_stop(void);
void japlay_pause(void);
void japlay_skip(void);
int japlay_init(int *argc, char **argv);
void japlay_exit(void);
#endif
|
Add missing declaration for start_playlist_scan()
|
Add missing declaration for start_playlist_scan() [CORRECTIVE]
|
C
|
bsd-3-clause
|
japeq/japlay
|
63f811c3a90072f8c71d6cb0ef4890f5e66b04f6
|
os/atOSDefs.h
|
os/atOSDefs.h
|
#ifndef AT_OS_DEFS_H
#define AT_OS_DEFS_H
// Include the window files if this is the windows version.
#ifdef _MSC_VER
#include <windows.h>
#endif
// Include other files to give OS-independent interfaces
#include "atSleep.h"
#include "atStrCaseCmp.h"
#include "atSymbols.h"
#include "atTime.h"
#endif
|
#ifndef AT_OS_DEFS_H
#define AT_OS_DEFS_H
// Include the window files if this is the windows version.
#ifdef _MSC_VER
#include <windows.h>
#endif
// Include other files to give OS-independent interfaces
#include "atSleep.h"
#include "atStr.h"
#include "atSymbols.h"
#include "atTime.h"
#endif
|
Change to new name atStr.h.
|
Change to new name atStr.h.
|
C
|
apache-2.0
|
ucfistirl/atlas,ucfistirl/atlas
|
77be7b4696b2dca4ea562f4b273d4ed4e5175df2
|
doc/tutorial_src/side_effect.c
|
doc/tutorial_src/side_effect.c
|
#include <cgreen/cgreen.h>
#include <cgreen/mocks.h>
static int reader(void *stream) {
return (int)mock(stream);
}
static void writer(void *stream, char *paragraph) {
mock(stream, paragraph);
}
char *read_paragraph(int (*read)(void *), void *stream);
void by_paragraph(int (*read)(void *), void *in, void (*write)(void *, char *), void *out) {
while (1) {
char *line = read_paragraph(read, in);
if ((line == NULL) || (strlen(line) == 0)) {
return;
}
(*write)(out, line);
free(line);
}
}
static int stub_stream(void *stream) {
return (int)mock(stream);
}
static void update_counter(void * counter) {
*(int*)counter = *(int*)counter + 1;
}
Ensure(using_side_effect) {
int number_of_times_reader_was_called = 0;
expect(reader, will_return('\n'));
always_expect(reader,
will_return(EOF),
with_side_effect(&update_counter,
&number_of_times_reader_was_called));
expect_never(writer);
by_paragraph(&reader, NULL, &writer, NULL);
assert_that(number_of_times_reader_was_called, is_equal_to(1));
}
|
#include <cgreen/cgreen.h>
#include <cgreen/mocks.h>
static int reader(void *stream) {
return (int)mock(stream);
}
static void writer(void *stream, char *paragraph) {
mock(stream, paragraph);
}
char *read_paragraph(int (*read)(void *), void *stream);
void by_paragraph(int (*read)(void *), void *in, void (*write)(void *, char *), void *out) {
while (1) {
char *line = read_paragraph(read, in);
if ((line == NULL) || (strlen(line) == 0)) {
return;
}
(*write)(out, line);
free(line);
}
}
static int stub_stream(void *stream) {
return (int)mock(stream);
}
static void update_counter(void * counter) {
*(int*)counter = *(int*)counter + 1;
}
Ensure(using_side_effect) {
int number_of_times_reader_was_called = 0;
expect(reader, will_return('\n'));
always_expect(reader,
will_return(EOF),
with_side_effect(&update_counter,
&number_of_times_reader_was_called));
never_expect(writer);
by_paragraph(&reader, NULL, &writer, NULL);
assert_that(number_of_times_reader_was_called, is_equal_to(1));
}
|
Update expect_never -> never_expect in doc
|
[doc] Update expect_never -> never_expect in doc
The file of side_effect.c in the tutorial used the old version of
`never_expect` function. This commit updates the side-effect file to
have the new version of the function.
|
C
|
isc
|
cgreen-devs/cgreen,cgreen-devs/cgreen,cgreen-devs/cgreen,cgreen-devs/cgreen,cgreen-devs/cgreen
|
3afe5ce3b656cc41fe116c3d2c455d2131fba2b3
|
include/perfetto/protozero/contiguous_memory_range.h
|
include/perfetto/protozero/contiguous_memory_range.h
|
/*
* Copyright (C) 2017 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 INCLUDE_PERFETTO_PROTOZERO_CONTIGUOUS_MEMORY_RANGE_H_
#define INCLUDE_PERFETTO_PROTOZERO_CONTIGUOUS_MEMORY_RANGE_H_
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
namespace protozero {
// Keep this struct trivially constructible (no ctors, no default initializers).
struct ContiguousMemoryRange {
uint8_t* begin;
uint8_t* end; // STL style: one byte past the end of the buffer.
inline bool is_valid() const { return begin != nullptr; }
inline void reset() { begin = nullptr; }
inline size_t size() { return static_cast<size_t>(end - begin); }
};
} // namespace protozero
#endif // INCLUDE_PERFETTO_PROTOZERO_CONTIGUOUS_MEMORY_RANGE_H_
|
/*
* Copyright (C) 2017 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 INCLUDE_PERFETTO_PROTOZERO_CONTIGUOUS_MEMORY_RANGE_H_
#define INCLUDE_PERFETTO_PROTOZERO_CONTIGUOUS_MEMORY_RANGE_H_
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
namespace protozero {
// Keep this struct trivially constructible (no ctors, no default initializers).
struct ContiguousMemoryRange {
uint8_t* begin;
uint8_t* end; // STL style: one byte past the end of the buffer.
inline bool is_valid() const { return begin != nullptr; }
inline void reset() { begin = nullptr; }
inline size_t size() const { return static_cast<size_t>(end - begin); }
};
} // namespace protozero
#endif // INCLUDE_PERFETTO_PROTOZERO_CONTIGUOUS_MEMORY_RANGE_H_
|
Mark ContiguousMemoryRange::size as const. am: f2c28cd765 am: 1b5ab79b0b am: 69614c4761 am: e447d8a1c2 am: b0149a850e
|
Mark ContiguousMemoryRange::size as const. am: f2c28cd765 am: 1b5ab79b0b am: 69614c4761 am: e447d8a1c2 am: b0149a850e
Change-Id: If4c99f80ffc05a66167073f15cf83e73e7329f4b
|
C
|
apache-2.0
|
google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto
|
462cf17a56979aafaead2e19ea8bc0e82df66a3d
|
src/OI.h
|
src/OI.h
|
#ifndef OI_H
#define OI_H
#include "WPILib.h"
#include "RobotMap.h"
#include <math.h>
class OI
{
private:
Joystick Joystick;
public:
OI();
inline float GetStickX(){ return FractionOmitted(Joystick.GetX()); }
inline float GetStickY(){ return FractionOmitted(Joystick.GetY()); }
inline float GetStickZ(){ return FractionOmitted(Joystick.GetZ()); }
inline float FractionOmitted(float original){
if(fabsf(original) < 0.01 ){
original = 0;
}
return original;
}
};
#endif
|
#ifndef OI_H
#define OI_H
#include "WPILib.h"
#include "RobotMap.h"
#include <math.h>
class OI
{
private:
Joystick Joystick;
public:
OI();
inline float GetXplusY(){
float val;
val = FractionOmitted(Joystick.GetY() + Joystick.GetX());
if(val > 1.2) val = 1.2;
if(val < -1.2) val = -1.2;
return val;
}
inline float GetXminusY(){
float val;
val = FractionOmitted(Joystick.GetY() - Joystick.GetX());
if(val > 1.2) val = 1.2;
if(val < -1.2) val = -1.2;
return val;
}
inline float GetStickX(){ return FractionOmitted(Joystick.GetX()); }
inline float GetStickY(){ return FractionOmitted(Joystick.GetY()); }
inline float GetStickZ(){ return FractionOmitted(Joystick.GetZ()); }
inline float FractionOmitted(float original){
if(fabsf(original) < 0.01 ){
original = 0;
}
return original;
}
};
#endif
|
Create GetXplusY function and GetXminusY function
|
Create GetXplusY function and GetXminusY function
|
C
|
epl-1.0
|
tokyotechnicalsamurai/shougun
|
fd0f406fea93d14c53f056bfcae8f6a6a2952b26
|
unittests/asm_mocks.c
|
unittests/asm_mocks.c
|
// Defining some necessary symbols just to make the linker happy.
void kernel_yield() { }
void arch_specific_new_task_setup() { }
void arch_specific_free_task() { }
|
#include <common/basic_defs.h>
// Defining some necessary symbols just to make the linker happy.
void *kernel_initial_stack = NULL;
void kernel_yield() { NOT_REACHED(); }
void arch_specific_new_task_setup() { NOT_REACHED(); }
void arch_specific_free_task() { NOT_REACHED(); }
void switch_to_initial_kernel_stack() { NOT_REACHED(); }
|
Fix build error (missing mocks)
|
[gtests] Fix build error (missing mocks)
|
C
|
bsd-2-clause
|
vvaltchev/experimentOs,vvaltchev/experimentOs,vvaltchev/experimentOs,vvaltchev/experimentOs
|
f90fdb4570d97e7970ec72e0715a5924ab1da95c
|
include/ygo/data/CardData.h
|
include/ygo/data/CardData.h
|
#ifndef YGO_DATA_CARDDATA_H
#define YGO_DATA_CARDDATA_H
#include <string>
#include "CardType.h"
namespace ygo
{
namespace data
{
struct StaticCardData
{
std::string name;
CardType cardType;
// monster only
Attribute attribute;
MonsterType monsterType;
Type type;
MonsterType monsterAbility;
int level;
int attack;
int defense;
int lpendulum;
int rpendulum;
// spell and trap only
SpellType spellType;
TrapType trapType;
};
}
}
#endif
|
#ifndef YGO_DATA_CARDDATA_H
#define YGO_DATA_CARDDATA_H
#include <string>
#include "CardType.h"
namespace ygo
{
namespace data
{
struct StaticCardData
{
std::string name;
CardType cardType;
// monster only
Attribute attribute;
MonsterType monsterType;
Type type;
MonsterType monsterAbility;
int level;
int attack;
int defense;
int lpendulum;
int rpendulum;
// spell and trap only
SpellType spellType;
TrapType trapType;
std::string text;
};
}
}
#endif
|
Add text to static card data
|
Add text to static card data
|
C
|
mit
|
DeonPoncini/ygodata
|
34438e0e5eb32764691044269b8f3557f8c39668
|
FreeRTOS/src/select.c
|
FreeRTOS/src/select.c
|
#include "sys/select.h"
#include "bits/mac_esp8266.h"
#include <stdio.h>
#include "usart.h"
int select(SOCKET nfds, fd_set *__readfds, fd_set *__writefds,
fd_set *__exceptfds, struct timeval *__timeout) {
SOCKET i;
int c;
c = 0;
/* Go through interested sockets. */
for(i = SOCKET_BASE; i < nfds; i++) {
if((__readfds != NULL) && FD_ISSET(i, __readfds)) {
if(IsSocketReady2Read(i)) {
/* The interested socket is ready to be read. */
c++;
}
else {
/* The interested socket is not ready to be read. */
FD_CLR(i, __readfds);
}
}
if((__writefds != NULL) && FD_ISSET(i, __writefds)) {
if(IsSocketReady2Write(i)) {
/* The interested socket is ready to be written. */
c++;
}
else {
/* The interested socket is not ready to be written. */
FD_CLR(i, __writefds);
}
}
if((__exceptfds != NULL) && FD_ISSET(i, __exceptfds)) {
// To do: List exception sockets.
/* Zero __exceptfds for now. */
FD_ZERO(__exceptfds);
}
}
return c;
}
|
#include "sys/select.h"
#include "bits/mac_esp8266.h"
#include <stdio.h>
#include "usart.h"
int select(SOCKET nfds, fd_set *__readfds, fd_set *__writefds,
fd_set *__exceptfds, struct timeval *__timeout) {
SOCKET i;
/* Count the ready socket. */
int count;
count = 0;
/* Go through interested sockets. */
for(i = SOCKET_BASE; i < nfds; i++) {
if((__readfds != NULL) && FD_ISSET(i, __readfds)) {
if(IsSocketReady2Read(i)) {
/* The interested socket is ready to be read. */
count++;
}
else {
/* The interested socket is not ready to be read. */
FD_CLR(i, __readfds);
}
}
if((__writefds != NULL) && FD_ISSET(i, __writefds)) {
if(IsSocketReady2Write(i)) {
/* The interested socket is ready to be written. */
count++;
}
else {
/* The interested socket is not ready to be written. */
FD_CLR(i, __writefds);
}
}
if((__exceptfds != NULL) && FD_ISSET(i, __exceptfds)) {
// To do: List exception sockets.
/* Zero __exceptfds for now. */
FD_ZERO(__exceptfds);
}
}
return count;
}
|
Change the variable name for more meaningful.
|
Change the variable name for more meaningful.
|
C
|
bsd-3-clause
|
starnight/MicroHttpServer,starnight/MicroHttpServer,starnight/MicroHttpServer,starnight/MicroHttpServer
|
d1b04ae45801d4c87302f40692ef8c191fb64197
|
UnixPkg/Include/Guid/UnixSystemConfig.h
|
UnixPkg/Include/Guid/UnixSystemConfig.h
|
/**@file
Setup Variable data structure for Unix platform.
Copyright (c) 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __UNIX_SYSTEM_CONFIGUE_H__
#define __UNIX_SYSTEM_CONFIGUE_H__
#define EFI_UXIX_SYSTEM_CONFIG_GUID \
{0x375ea976, 0x3ccd, 0x4e74, {0xa8, 0x45, 0x26, 0xb9, 0xb3, 0x24, 0xb1, 0x3c}}
#pragma pack(1)
typedef struct {
//
// Console output mode
//
UINT32 ConOutColumn;
UINT32 ConOutRow;
} WIN_NT_SYSTEM_CONFIGURATION;
#pragma pack()
extern EFI_GUID gEfiUnixSystemConfigGuid;
#endif
|
/**@file
Setup Variable data structure for Unix platform.
Copyright (c) 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __UNIX_SYSTEM_CONFIGUE_H__
#define __UNIX_SYSTEM_CONFIGUE_H__
#define EFI_UXIX_SYSTEM_CONFIG_GUID \
{0x375ea976, 0x3ccd, 0x4e74, {0xa8, 0x45, 0x26, 0xb9, 0xb3, 0x24, 0xb1, 0x3c}}
#pragma pack(1)
typedef struct {
//
// Console output mode
//
UINT32 ConOutColumn;
UINT32 ConOutRow;
} UNIX_SYSTEM_CONFIGURATION;
#pragma pack()
extern EFI_GUID gEfiUnixSystemConfigGuid;
#endif
|
Fix typo in data structure
|
Fix typo in data structure
git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@7589 6f19259b-4bc3-4df7-8a09-765794883524
|
C
|
bsd-2-clause
|
MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2
|
3699f58d3f06fee8b4b0e096f32b699c518d9baf
|
C++/sorting/bubblesort.h
|
C++/sorting/bubblesort.h
|
#include <iostream>
#include <vector>
#include <stdlib.h>
template <typename T>
void swap(T& a, T& b) {
T tmp = b;
b = a;
a = tmp;
}
template <typename T>
void bubblesort(T& vec) {
auto f = vec.begin();
auto s = vec.begin();
++s;
bool swapped = false;
while (s != vec.end()) {
if (*f > *s) {
swap(*f, *s);
swapped = true;
}
++f; ++s;
}
if (swapped) {
bubblesort(vec);
}
}
|
#include <iostream>
#include <vector>
#include <stdlib.h>
template <typename T>
void swap(T& a, T& b) {
T tmp = b;
b = a;
a = tmp;
}
template <typename T>
T bubblesort(T& vec) {
auto f = vec.begin();
auto s = vec.begin();
++s;
bool swapped = false;
while (s != vec.end()) {
if (*f > *s) {
swap(*f, *s);
swapped = true;
}
++f; ++s;
}
if (swapped) {
bubblesort(vec);
}
return vec;
}
|
Return the sorted object as well as sort it in-place
|
Bubblesort: Return the sorted object as well as sort it in-place
|
C
|
bsd-3-clause
|
AeroNotix/algostructure,AeroNotix/algostructure,AeroNotix/algostructure,AeroNotix/algostructure,AeroNotix/algostructure,AeroNotix/algostructure
|
19b614ac69a19e6e7fc7ff48fa80594cf47d63d7
|
STEER/AliMisAligner.h
|
STEER/AliMisAligner.h
|
#ifndef ALI_MISALIGNER_H
#define ALI_MISALIGNER_H
#include "TObject.h"
#include "TString.h"
#include "AliCDBMetaData.h"
class TClonesArray;
class AliCDBManager;
// Base class for creating a TClonesArray of simulated misalignment objects
// for a given subdetector of type ideal,residual or full
//
class AliMisAligner : public TObject {
public:
AliMisAligner();
virtual TClonesArray* MakeAlObjsArray() const =0;
virtual AliCDBMetaData* GetCDBMetaData() const =0;
void SetMisalType(const char* misalType)
{
fMisalType=misalType;
}
const char* GetMisalType() const
{
return fMisalType.Data();
}
protected:
TString fMisalType;
private:
ClassDef(AliMisAligner,0);
};
#endif
|
#ifndef ALI_MISALIGNER_H
#define ALI_MISALIGNER_H
#include "TObject.h"
#include "TString.h"
#include "AliCDBMetaData.h"
class TClonesArray;
class AliCDBManager;
// Base class for creating a TClonesArray of simulated misalignment objects
// for a given subdetector of type ideal,residual or full
//
class AliMisAligner : public TObject {
public:
AliMisAligner();
virtual TClonesArray* MakeAlObjsArray() =0;
virtual AliCDBMetaData* GetCDBMetaData() const =0;
void SetMisalType(const char* misalType)
{
fMisalType=misalType;
}
const char* GetMisalType() const
{
return fMisalType.Data();
}
protected:
TString fMisalType;
private:
ClassDef(AliMisAligner,0);
};
#endif
|
Allow methods called inside MakeAlObjsArray to modify data members
|
Allow methods called inside MakeAlObjsArray to modify data members
|
C
|
bsd-3-clause
|
shahor02/AliRoot,ecalvovi/AliRoot,shahor02/AliRoot,coppedis/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,ecalvovi/AliRoot,shahor02/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,jgrosseo/AliRoot,miranov25/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,shahor02/AliRoot,shahor02/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,sebaleh/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,sebaleh/AliRoot,alisw/AliRoot,alisw/AliRoot,miranov25/AliRoot,ecalvovi/AliRoot,coppedis/AliRoot,mkrzewic/AliRoot,coppedis/AliRoot,coppedis/AliRoot,coppedis/AliRoot,shahor02/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,ALICEHLT/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,coppedis/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,ALICEHLT/AliRoot
|
f5cf45ab37c8c4771681a2bfb85194e48086026e
|
src/debug.h
|
src/debug.h
|
#ifndef __DEBUG_H
#define __DEBUG_H
#ifdef DEBUG
extern bool debug;
extern bool debug_z;
#define DBG if (debug)
#define MSG(x) DBG msg x
#else
#define DBG if (0)
#define MSG(x)
#endif
#if defined(DEBUG) || defined(PRECON)
#define PRECONDITION(x) if (x); else precondition( #x , __FILE__, __LINE__)
#else
#define PRECONDITION(x) // nothing
#endif
#endif
|
#ifndef __DEBUG_H
#define __DEBUG_H
#ifdef DEBUG
extern bool debug;
extern bool debug_z;
#define DBG if (debug)
#define MSG(x) DBG tlog x
#else
#define DBG if (0)
#define MSG(x)
#endif
#if defined(DEBUG) || defined(PRECON)
#define PRECONDITION(x) if (x); else precondition( #x , __FILE__, __LINE__)
#else
#define PRECONDITION(x) // nothing
#endif
#endif
|
Use tlog for MSG reports.
|
Use tlog for MSG reports.
|
C
|
lgpl-2.1
|
dicej/icewm,dicej/icewm,dicej/icewm,dicej/icewm
|
4e0d6d864d3632a820d8bf3dd89ff333b9bbd34d
|
src/revwalk.h
|
src/revwalk.h
|
#ifndef INCLUDE_revwalk_h__
#define INCLUDE_revwalk_h__
#include "git/common.h"
#include "git/revwalk.h"
struct git_revpool {
git_odb *db;
git_commit_list iterator;
git_commit *(*next_commit)(git_commit_list *);
git_commit_list roots;
git_revpool_table *commits;
unsigned walking:1;
unsigned char sorting;
};
void gitrp__prepare_walk(git_revpool *pool);
int gitrp__enroot(git_revpool *pool, git_commit *commit);
#endif /* INCLUDE_revwalk_h__ */
|
#ifndef INCLUDE_revwalk_h__
#define INCLUDE_revwalk_h__
#include "git/common.h"
#include "git/revwalk.h"
struct git_revpool {
git_odb *db;
git_commit_list iterator;
git_commit *(*next_commit)(git_commit_list *);
git_commit_list roots;
git_revpool_table *commits;
unsigned walking:1;
unsigned int sorting;
};
void gitrp__prepare_walk(git_revpool *pool);
int gitrp__enroot(git_revpool *pool, git_commit *commit);
#endif /* INCLUDE_revwalk_h__ */
|
Fix an "conversion, loss of data" compiler warning
|
msvc: Fix an "conversion, loss of data" compiler warning
In particular, the compiler issues the following warning:
src/revwalk.c(61) : warning C4244: '=' : conversion from \
'unsigned int' to 'unsigned char', possible loss of data
In order to suppress the warning, we change the type of the
sorting "enum" field of the git_revpool structure to be consistent
with the sort_mode parameter of the gitrp_sorting() function.
Note that if the size of the git_revpool structure is an issue,
then we could change the type of the sort_mode parameter instead.
Signed-off-by: Ramsay Jones <3e74413778ce9c8bebbbaedfd56741f6850faeaf@ramsay1.demon.co.uk>
Signed-off-by: Andreas Ericsson <1eabdaf488b3a3682bbca94c5f468f065cdfaf13@op5.se>
|
C
|
lgpl-2.1
|
jflesch/libgit2-mariadb,Tousiph/Demo1,since2014/libgit2,saurabhsuniljain/libgit2,chiayolin/libgit2,Tousiph/Demo1,mhp/libgit2,leoyanggit/libgit2,mingyaaaa/libgit2,sim0629/libgit2,sim0629/libgit2,jamieleecool/ptest,zodiac/libgit2.js,Aorjoa/libgit2_maked_lib,dleehr/libgit2,mrksrm/Mingijura,Corillian/libgit2,raybrad/libit2,linquize/libgit2,claudelee/libgit2,leoyanggit/libgit2,kissthink/libgit2,Corillian/libgit2,Tousiph/Demo1,joshtriplett/libgit2,rcorre/libgit2,maxiaoqian/libgit2,yongthecoder/libgit2,magnus98/TEST,yosefhackmon/libgit2,kenprice/libgit2,iankronquist/libgit2,Tousiph/Demo1,ardumont/libgit2,Corillian/libgit2,claudelee/libgit2,KTXSoftware/libgit2,oaastest/libgit2,KTXSoftware/libgit2,raybrad/libit2,mcanthony/libgit2,Tousiph/Demo1,linquize/libgit2,KTXSoftware/libgit2,amyvmiwei/libgit2,evhan/libgit2,sim0629/libgit2,since2014/libgit2,mcanthony/libgit2,iankronquist/libgit2,whoisj/libgit2,yongthecoder/libgit2,mhp/libgit2,falqas/libgit2,falqas/libgit2,Aorjoa/libgit2_maked_lib,nacho/libgit2,jamieleecool/ptest,kenprice/libgit2,claudelee/libgit2,JIghtuse/libgit2,stewid/libgit2,swisspol/DEMO-libgit2,skabel/manguse,mingyaaaa/libgit2,stewid/libgit2,iankronquist/libgit2,magnus98/TEST,jamieleecool/ptest,sim0629/libgit2,rcorre/libgit2,oaastest/libgit2,mrksrm/Mingijura,swisspol/DEMO-libgit2,nacho/libgit2,yosefhackmon/libgit2,chiayolin/libgit2,JIghtuse/libgit2,mingyaaaa/libgit2,mingyaaaa/libgit2,joshtriplett/libgit2,dleehr/libgit2,leoyanggit/libgit2,spraints/libgit2,dleehr/libgit2,skabel/manguse,Corillian/libgit2,magnus98/TEST,ardumont/libgit2,jeffhostetler/public_libgit2,ardumont/libgit2,claudelee/libgit2,falqas/libgit2,MrHacky/libgit2,Snazz2001/libgit2,mhp/libgit2,since2014/libgit2,t0xicCode/libgit2,whoisj/libgit2,t0xicCode/libgit2,jflesch/libgit2-mariadb,yosefhackmon/libgit2,mcanthony/libgit2,kissthink/libgit2,KTXSoftware/libgit2,magnus98/TEST,kenprice/libgit2,rcorre/libgit2,t0xicCode/libgit2,nokiddin/libgit2,chiayolin/libgit2,leoyanggit/libgit2,Aorjoa/libgit2_maked_lib,spraints/libgit2,nokiddin/libgit2,yosefhackmon/libgit2,spraints/libgit2,MrHacky/libgit2,Tousiph/Demo1,saurabhsuniljain/libgit2,maxiaoqian/libgit2,jeffhostetler/public_libgit2,kissthink/libgit2,rcorre/libgit2,since2014/libgit2,JIghtuse/libgit2,maxiaoqian/libgit2,chiayolin/libgit2,Aorjoa/libgit2_maked_lib,raybrad/libit2,iankronquist/libgit2,sygool/libgit2,jeffhostetler/public_libgit2,whoisj/libgit2,t0xicCode/libgit2,jflesch/libgit2-mariadb,raybrad/libit2,jflesch/libgit2-mariadb,chiayolin/libgit2,mhp/libgit2,evhan/libgit2,skabel/manguse,leoyanggit/libgit2,yongthecoder/libgit2,iankronquist/libgit2,maxiaoqian/libgit2,rcorre/libgit2,mhp/libgit2,t0xicCode/libgit2,jeffhostetler/public_libgit2,whoisj/libgit2,zodiac/libgit2.js,stewid/libgit2,jflesch/libgit2-mariadb,maxiaoqian/libgit2,saurabhsuniljain/libgit2,mrksrm/Mingijura,stewid/libgit2,JIghtuse/libgit2,sygool/libgit2,saurabhsuniljain/libgit2,falqas/libgit2,claudelee/libgit2,leoyanggit/libgit2,mrksrm/Mingijura,whoisj/libgit2,nacho/libgit2,saurabhsuniljain/libgit2,spraints/libgit2,kenprice/libgit2,skabel/manguse,mhp/libgit2,saurabhsuniljain/libgit2,mrksrm/Mingijura,zodiac/libgit2.js,zodiac/libgit2.js,jeffhostetler/public_libgit2,swisspol/DEMO-libgit2,sygool/libgit2,nokiddin/libgit2,nokiddin/libgit2,Aorjoa/libgit2_maked_lib,nokiddin/libgit2,dleehr/libgit2,Snazz2001/libgit2,raybrad/libit2,amyvmiwei/libgit2,sim0629/libgit2,sygool/libgit2,joshtriplett/libgit2,kenprice/libgit2,oaastest/libgit2,amyvmiwei/libgit2,since2014/libgit2,yongthecoder/libgit2,linquize/libgit2,dleehr/libgit2,Snazz2001/libgit2,KTXSoftware/libgit2,oaastest/libgit2,ardumont/libgit2,oaastest/libgit2,mcanthony/libgit2,joshtriplett/libgit2,magnus98/TEST,chiayolin/libgit2,dleehr/libgit2,mrksrm/Mingijura,sygool/libgit2,kissthink/libgit2,falqas/libgit2,yosefhackmon/libgit2,yongthecoder/libgit2,jamieleecool/ptest,t0xicCode/libgit2,KTXSoftware/libgit2,Snazz2001/libgit2,linquize/libgit2,mcanthony/libgit2,rcorre/libgit2,mingyaaaa/libgit2,stewid/libgit2,jflesch/libgit2-mariadb,amyvmiwei/libgit2,skabel/manguse,joshtriplett/libgit2,skabel/manguse,evhan/libgit2,Corillian/libgit2,joshtriplett/libgit2,linquize/libgit2,evhan/libgit2,JIghtuse/libgit2,kissthink/libgit2,mcanthony/libgit2,since2014/libgit2,kenprice/libgit2,Snazz2001/libgit2,yongthecoder/libgit2,stewid/libgit2,linquize/libgit2,iankronquist/libgit2,amyvmiwei/libgit2,yosefhackmon/libgit2,mingyaaaa/libgit2,whoisj/libgit2,kissthink/libgit2,MrHacky/libgit2,JIghtuse/libgit2,swisspol/DEMO-libgit2,magnus98/TEST,sygool/libgit2,Snazz2001/libgit2,claudelee/libgit2,spraints/libgit2,MrHacky/libgit2,Corillian/libgit2,sim0629/libgit2,amyvmiwei/libgit2,falqas/libgit2,MrHacky/libgit2,oaastest/libgit2,ardumont/libgit2,zodiac/libgit2.js,maxiaoqian/libgit2,nokiddin/libgit2,swisspol/DEMO-libgit2,ardumont/libgit2,jeffhostetler/public_libgit2,swisspol/DEMO-libgit2,MrHacky/libgit2,nacho/libgit2,spraints/libgit2
|
02a17c281d68aa9ba0d951f70ab1716a72d7b4b1
|
src/vast/query/parser/skipper.h
|
src/vast/query/parser/skipper.h
|
#ifndef VAST_QUERY_PARSER_SKIPPER_H
#define VAST_QUERY_PARSER_SKIPPER_H
#include <boost/spirit/include/qi.hpp>
namespace vast {
namespace query {
namespace parser {
namespace qi = boost::spirit::qi;
namespace ascii = boost::spirit::ascii;
template <typename Iterator>
struct skipper : qi::grammar<Iterator>
{
skipper()
: skipper::base_type(start)
{
qi::char_type char_;
ascii::space_type space;
start =
char_ // Tab, space, CR, LF
| "/*" >> *(space - "*/") >> "*/" // C-style comments
;
}
qi::rule<Iterator> start;
};
} // namespace ast
} // namespace query
} // namespace vast
#endif
|
#ifndef VAST_QUERY_PARSER_SKIPPER_H
#define VAST_QUERY_PARSER_SKIPPER_H
#include <boost/spirit/include/qi.hpp>
namespace vast {
namespace query {
namespace parser {
namespace qi = boost::spirit::qi;
namespace ascii = boost::spirit::ascii;
template <typename Iterator>
struct skipper : qi::grammar<Iterator>
{
skipper()
: skipper::base_type(start)
{
qi::char_type char_;
ascii::space_type space;
start =
space // Tab, space, CR, LF
| "/*" >> *(char_ - "*/") >> "*/" // C-style comments
;
}
qi::rule<Iterator> start;
};
} // namespace ast
} // namespace query
} // namespace vast
#endif
|
Fix skip grammar of query parser.
|
Fix skip grammar of query parser.
|
C
|
bsd-3-clause
|
mavam/vast,mavam/vast,pmos69/vast,vast-io/vast,mavam/vast,vast-io/vast,vast-io/vast,mavam/vast,vast-io/vast,vast-io/vast,pmos69/vast,pmos69/vast,pmos69/vast
|
7351b1e11f4806d4a6c1ee30253f28aab3f8ab2a
|
slave/stypes.h
|
slave/stypes.h
|
#define _SLAVETYPES
#include <inttypes.h>
//Declarations for slave types
typedef struct
{
uint8_t Length; //Length of frame, if it's equal to 0, frame is not ready
uint8_t *Frame; //Response frame content
} MODBUSResponseStatus; //Type containing information about frame that is set up at slave side
typedef struct
{
uint8_t Address; //Slave address
uint16_t *Registers; //Slave holding registers
uint16_t RegisterCount; //Slave register count
uint8_t *RegisterMask; //Masks for write protection (bit of value 1 - write protection)
uint16_t RegisterMaskLength; //Masks length (each mask covers 8 registers)
MODBUSResponseStatus Response; //Slave response formatting status
} MODBUSSlaveStatus; //Type containing slave device configuration data
|
#define _SLAVETYPES
#include <inttypes.h>
//Declarations for slave types
typedef struct
{
uint8_t Length; //Length of frame, if it's equal to 0, frame is not ready
uint8_t *Frame; //Response frame content
} MODBUSResponseStatus; //Type containing information about frame that is set up at slave side
typedef struct
{
uint8_t Address; //Slave address
uint16_t *Registers; //Slave holding registers
uint16_t RegisterCount; //Slave register count
uint8_t *Coils; //Slave coils
uint16_t CoilCount; //Slave coil count
uint8_t *RegisterMask; //Masks for write protection (bit of value 1 - write protection)
uint16_t RegisterMaskLength; //Masks length (each mask covers 8 registers)
MODBUSResponseStatus Response; //Slave response formatting status
} MODBUSSlaveStatus; //Type containing slave device configuration data
|
Add coil variables to type definitions
|
Add coil variables to type definitions
|
C
|
mit
|
Jacajack/modlib
|
197a1ec9be32f0fa4e4ea2d16a3a00b905c90489
|
Common/Categories/MITAdditions.h
|
Common/Categories/MITAdditions.h
|
#ifndef MIT_Mobile_MITAdditions_h
#define MIT_Mobile_MITAdditions_h
#import "Foundations+MITAdditions.h"
#import "UIKit+MITAdditions.h"
#import "CoreLocation+MITAdditions.h"
#import "UIImage+Resize.h"
#import "NSDateFormatter+RelativeString.h"
#import "MFMailComposeController+RFC2368.h"
#import "NSData+MGTwitterBase64.h"
#import "NSMutableAttributedString+MITAdditions.h"
#endif
|
#ifndef MIT_Mobile_MITAdditions_h
#define MIT_Mobile_MITAdditions_h
#import "Foundation+MITAdditions.h"
#import "UIKit+MITAdditions.h"
#import "CoreLocation+MITAdditions.h"
#import "UIImage+Resize.h"
#import "NSDateFormatter+RelativeString.h"
#import "MFMailComposeViewController+RFC2368.h"
#import "NSData+MGTwitterBase64.h"
#import "NSMutableAttributedString+MITAdditions.h"
#endif
|
Fix up the header names as several are not correct
|
Fix up the header names as several are not correct
|
C
|
lgpl-2.1
|
MIT-Mobile/MIT-Mobile-for-iOS,MIT-Mobile/MIT-Mobile-for-iOS,smartcop/MIT-Mobile-for-iOS,xNUTs/MIT-Mobile-for-iOS,smartcop/MIT-Mobile-for-iOS,xNUTs/MIT-Mobile-for-iOS
|
af495684820a0f34bbccfefb3bce784c3dc6b327
|
ReactCommon/fabric/components/image/ImageComponentDescriptor.h
|
ReactCommon/fabric/components/image/ImageComponentDescriptor.h
|
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <fabric/components/image/ImageShadowNode.h>
#include <fabric/core/ConcreteComponentDescriptor.h>
#include <fabric/imagemanager/ImageManager.h>
#include <fabric/uimanager/ContextContainer.h>
namespace facebook {
namespace react {
/*
* Descriptor for <Image> component.
*/
class ImageComponentDescriptor final:
public ConcreteComponentDescriptor<ImageShadowNode> {
public:
ImageComponentDescriptor(SharedEventDispatcher eventDispatcher, const SharedContextContainer &contextContainer):
ConcreteComponentDescriptor(eventDispatcher),
imageManager_(contextContainer->getInstance<SharedImageManager>()) {}
void adopt(UnsharedShadowNode shadowNode) const override {
ConcreteComponentDescriptor::adopt(shadowNode);
assert(std::dynamic_pointer_cast<ImageShadowNode>(shadowNode));
auto imageShadowNode = std::static_pointer_cast<ImageShadowNode>(shadowNode);
// `ImageShadowNode` uses `ImageManager` to initiate image loading and
// communicate the loading state and results to mounting layer.
imageShadowNode->setImageManager(imageManager_);
}
private:
const SharedImageManager imageManager_;
};
} // namespace react
} // namespace facebook
|
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <fabric/components/image/ImageShadowNode.h>
#include <fabric/core/ConcreteComponentDescriptor.h>
#include <fabric/imagemanager/ImageManager.h>
#include <fabric/uimanager/ContextContainer.h>
namespace facebook {
namespace react {
/*
* Descriptor for <Image> component.
*/
class ImageComponentDescriptor final:
public ConcreteComponentDescriptor<ImageShadowNode> {
public:
ImageComponentDescriptor(SharedEventDispatcher eventDispatcher, const SharedContextContainer &contextContainer):
ConcreteComponentDescriptor(eventDispatcher),
imageManager_(contextContainer->getInstance<SharedImageManager>()) {}
void adopt(UnsharedShadowNode shadowNode) const override {
ConcreteComponentDescriptor::adopt(shadowNode);
assert(std::dynamic_pointer_cast<ImageShadowNode>(shadowNode));
auto imageShadowNode = std::static_pointer_cast<ImageShadowNode>(shadowNode);
// `ImageShadowNode` uses `ImageManager` to initiate image loading and
// communicate the loading state and results to mounting layer.
imageShadowNode->setImageManager(imageManager_);
}
private:
const SharedImageManager imageManager_;
};
} // namespace react
} // namespace facebook
|
Implement the update of props in the MountingManager layer
|
Implement the update of props in the MountingManager layer
Summary: This diff implements the update of props in Fabric C++. The props values are passed to java in a ReadableMap and they are integrated into the current implementation of ViewManagers. In the fututre we will replace the ReadableMap for typed objects.
Reviewed By: shergin
Differential Revision: D9093560
fbshipit-source-id: da58326cfadb0665dac3349a8cf24cde2d401aaa
|
C
|
bsd-3-clause
|
exponent/react-native,pandiaraj44/react-native,hammerandchisel/react-native,hammerandchisel/react-native,myntra/react-native,javache/react-native,pandiaraj44/react-native,hammerandchisel/react-native,hoangpham95/react-native,facebook/react-native,javache/react-native,hammerandchisel/react-native,hoangpham95/react-native,pandiaraj44/react-native,myntra/react-native,arthuralee/react-native,janicduplessis/react-native,hoangpham95/react-native,exponentjs/react-native,javache/react-native,exponent/react-native,javache/react-native,facebook/react-native,pandiaraj44/react-native,javache/react-native,arthuralee/react-native,pandiaraj44/react-native,hoangpham95/react-native,myntra/react-native,facebook/react-native,exponentjs/react-native,hoangpham95/react-native,janicduplessis/react-native,exponent/react-native,exponent/react-native,exponent/react-native,myntra/react-native,exponentjs/react-native,javache/react-native,janicduplessis/react-native,exponentjs/react-native,facebook/react-native,janicduplessis/react-native,hammerandchisel/react-native,javache/react-native,myntra/react-native,exponentjs/react-native,janicduplessis/react-native,exponent/react-native,myntra/react-native,hammerandchisel/react-native,myntra/react-native,facebook/react-native,arthuralee/react-native,javache/react-native,facebook/react-native,hoangpham95/react-native,janicduplessis/react-native,pandiaraj44/react-native,exponent/react-native,hoangpham95/react-native,facebook/react-native,pandiaraj44/react-native,facebook/react-native,exponentjs/react-native,hammerandchisel/react-native,myntra/react-native,exponentjs/react-native,hammerandchisel/react-native,arthuralee/react-native,arthuralee/react-native,exponentjs/react-native,hoangpham95/react-native,exponent/react-native,janicduplessis/react-native,facebook/react-native,javache/react-native,myntra/react-native,janicduplessis/react-native,pandiaraj44/react-native
|
87b5f56bd4f5454659956bf1034849a60c463714
|
tests/sv-comp/observer/path_nofun_true-unreach-call.c
|
tests/sv-comp/observer/path_nofun_true-unreach-call.c
|
extern void __VERIFIER_error() __attribute__ ((__noreturn__));
extern int __VERIFIER_nondet_int();
int main()
{
int x, y;
if (__VERIFIER_nondet_int())
{
x = 0;
y = 1;
}
else
{
x = 1;
y = 0;
}
// if (!(x + y == 1))
if (x + y != 1)
__VERIFIER_error();
return 0;
}
// ./goblint --enable ana.sv-comp --enable ana.wp --enable exp.uncilwitness --disable ana.int.trier --enable ana.int.interval --set ana.activated '["base"]' --set phases '[{}, {"ana": {"activated": ["base", "observer"], "path_sens": ["observer"]}}]' --html tests/sv-comp/observer/path_nofun_true-unreach-call.c
|
extern void __VERIFIER_error() __attribute__ ((__noreturn__));
extern int __VERIFIER_nondet_int();
int main()
{
int x, y;
if (__VERIFIER_nondet_int())
{
x = 0;
y = 1;
}
else
{
x = 1;
y = 0;
}
// if (!(x + y == 1))
if (x + y != 1)
__VERIFIER_error();
return 0;
}
// ./goblint --enable ana.sv-comp --enable ana.wp --enable exp.uncilwitness --disable ana.int.def_exc --enable ana.int.interval --set ana.activated '["base"]' --set phases '[{}, {"ana": {"activated": ["base", "observer"], "path_sens": ["observer"]}}]' --html tests/sv-comp/observer/path_nofun_true-unreach-call.c
|
Fix trier -> def_exc in observer test comment
|
Fix trier -> def_exc in observer test comment
|
C
|
mit
|
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
|
9abc56ec060ec6366878a829fa9554cde28e8925
|
Settings/Tab.h
|
Settings/Tab.h
|
#pragma once
#include <Windows.h>
#include <vector>
class UIContext;
/// <summary>
/// Abstract class that encapsulates functionality for dealing with
/// property sheet pages (tabs).
/// </summary>
class Tab {
public:
Tab();
~Tab();
/// <summary>Processes messages sent to the tab page.</summary>
virtual DLGPROC TabProc(
HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
/// <summary>Persists changes made on the tab page</summary>
virtual void SaveSettings() = 0;
protected:
HWND _hWnd;
UIContext *_ctxt;
/// <summary>
/// Performs intitialization for the tab page, similar to a constructor.
/// Since tab page windows are created on demand, this method could be
/// called much later than the constructor for the tab.
/// </summary>
virtual void Initialize() = 0;
/// <summary>Applies the current settings state to the tab page.</summary>
virtual void LoadSettings() = 0;
/// <summary>Handles WM_COMMAND messages.</summary>
/// <param name="nCode">Control-defined notification code</param>
/// <param name="ctrlId">Control identifier</param>
virtual DLGPROC Command(unsigned short nCode, unsigned short ctrlId) = 0;
/// <summary>Handles WM_NOTIFY messages.</summary>
/// <param name="nHdr">Notification header structure</param>
virtual DLGPROC Notification(NMHDR *nHdr) = 0;
};
|
#pragma once
#include <Windows.h>
#include <vector>
#include "Control.h"
class UIContext;
/// <summary>
/// Abstract class that encapsulates functionality for dealing with
/// property sheet pages (tabs).
/// </summary>
class Tab {
public:
Tab();
~Tab();
/// <summary>Processes messages sent to the tab page.</summary>
virtual DLGPROC TabProc(
HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
/// <summary>Persists changes made on the tab page</summary>
virtual void SaveSettings() = 0;
protected:
/// <summary>Window handle of this tab.</summary>
HWND _hWnd;
UIContext *_ctxt;
/// <summary>A vector of all the controls present on this tab.</summary>
std::vector<Control *> _controls;
/// <summary>
/// Performs intitialization for the tab page, similar to a constructor.
/// Since tab page windows are created on demand, this method could be
/// called much later than the constructor for the tab.
/// </summary>
virtual void Initialize() = 0;
/// <summary>Applies the current settings state to the tab page.</summary>
virtual void LoadSettings() = 0;
/// <summary>Handles WM_COMMAND messages.</summary>
/// <param name="nCode">Control-defined notification code</param>
/// <param name="ctrlId">Control identifier</param>
virtual DLGPROC Command(unsigned short nCode, unsigned short ctrlId) = 0;
/// <summary>Handles WM_NOTIFY messages.</summary>
/// <param name="nHdr">Notification header structure</param>
virtual DLGPROC Notification(NMHDR *nHdr) = 0;
};
|
Add vector to keep track of controls
|
Add vector to keep track of controls
|
C
|
bsd-2-clause
|
Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,malensek/3RVX
|
823c535f2169b755a77a413d5f957e9457c22cb3
|
drivers/scsi/qla2xxx/qla_version.h
|
drivers/scsi/qla2xxx/qla_version.h
|
/*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2013 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
/*
* Driver version
*/
#define QLA2XXX_VERSION "8.06.00.12-k"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 6
#define QLA_DRIVER_PATCH_VER 0
#define QLA_DRIVER_BETA_VER 0
|
/*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2013 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
/*
* Driver version
*/
#define QLA2XXX_VERSION "8.07.00.02-k"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 7
#define QLA_DRIVER_PATCH_VER 0
#define QLA_DRIVER_BETA_VER 0
|
Update the driver version to 8.07.00.02-k.
|
[SCSI] qla2xxx: Update the driver version to 8.07.00.02-k.
Signed-off-by: Saurav Kashyap <88d6fd94e71a9ac276fc44f696256f466171a3c0@qlogic.com>
Signed-off-by: Giridhar Malavali <799b6491fce2c7a80b5fedcf9a728560cc9eb954@qlogic.com>
Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
|
C
|
mit
|
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
|
335d26b27d238cca9b4447a46d187d4c6f573d3a
|
ports/stm32/boards/STM32L476DISC/bdev.c
|
ports/stm32/boards/STM32L476DISC/bdev.c
|
#include "storage.h"
// External SPI flash uses standard SPI interface
const mp_soft_spi_obj_t soft_spi_bus = {
.delay_half = MICROPY_HW_SOFTSPI_MIN_DELAY,
.polarity = 0,
.phase = 0,
.sck = MICROPY_HW_SPIFLASH_SCK,
.mosi = MICROPY_HW_SPIFLASH_MOSI,
.miso = MICROPY_HW_SPIFLASH_MISO,
};
const mp_spiflash_config_t spiflash_config = {
.bus_kind = MP_SPIFLASH_BUS_SPI,
.bus.u_spi.cs = MICROPY_HW_SPIFLASH_CS,
.bus.u_spi.data = (void*)&soft_spi_bus,
.bus.u_spi.proto = &mp_soft_spi_proto,
};
spi_bdev_t spi_bdev;
|
#include "storage.h"
// External SPI flash uses standard SPI interface
STATIC const mp_soft_spi_obj_t soft_spi_bus = {
.delay_half = MICROPY_HW_SOFTSPI_MIN_DELAY,
.polarity = 0,
.phase = 0,
.sck = MICROPY_HW_SPIFLASH_SCK,
.mosi = MICROPY_HW_SPIFLASH_MOSI,
.miso = MICROPY_HW_SPIFLASH_MISO,
};
STATIC mp_spiflash_cache_t spi_bdev_cache;
const mp_spiflash_config_t spiflash_config = {
.bus_kind = MP_SPIFLASH_BUS_SPI,
.bus.u_spi.cs = MICROPY_HW_SPIFLASH_CS,
.bus.u_spi.data = (void*)&soft_spi_bus,
.bus.u_spi.proto = &mp_soft_spi_proto,
.cache = &spi_bdev_cache,
};
spi_bdev_t spi_bdev;
|
Update SPI flash config for cache change.
|
stm32/boards/STM32L476DISC: Update SPI flash config for cache change.
|
C
|
mit
|
pozetroninc/micropython,MrSurly/micropython,pramasoul/micropython,henriknelson/micropython,pfalcon/micropython,adafruit/circuitpython,bvernoux/micropython,pfalcon/micropython,MrSurly/micropython,bvernoux/micropython,pozetroninc/micropython,henriknelson/micropython,swegener/micropython,pozetroninc/micropython,tralamazza/micropython,henriknelson/micropython,trezor/micropython,trezor/micropython,pfalcon/micropython,pramasoul/micropython,pozetroninc/micropython,tralamazza/micropython,selste/micropython,swegener/micropython,tobbad/micropython,tralamazza/micropython,tralamazza/micropython,henriknelson/micropython,selste/micropython,MrSurly/micropython,trezor/micropython,tobbad/micropython,pfalcon/micropython,tobbad/micropython,kerneltask/micropython,selste/micropython,henriknelson/micropython,bvernoux/micropython,tobbad/micropython,pozetroninc/micropython,kerneltask/micropython,pramasoul/micropython,adafruit/micropython,trezor/micropython,kerneltask/micropython,selste/micropython,adafruit/circuitpython,adafruit/micropython,tobbad/micropython,bvernoux/micropython,MrSurly/micropython,pfalcon/micropython,adafruit/micropython,adafruit/circuitpython,pramasoul/micropython,trezor/micropython,swegener/micropython,swegener/micropython,adafruit/circuitpython,MrSurly/micropython,swegener/micropython,kerneltask/micropython,adafruit/micropython,adafruit/circuitpython,kerneltask/micropython,adafruit/circuitpython,selste/micropython,pramasoul/micropython,bvernoux/micropython,adafruit/micropython
|
9eb0c374b3459264d3180f59f033cf9490c0e1ea
|
src/platform/posix/memory.c
|
src/platform/posix/memory.c
|
/* Copyright (c) 2013-2014 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <mgba-util/memory.h>
#include <sys/mman.h>
void* anonymousMemoryMap(size_t size) {
return mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
}
void mappedMemoryFree(void* memory, size_t size) {
munmap(memory, size);
}
|
/* Copyright (c) 2013-2014 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <mgba-util/memory.h>
#ifndef DISABLE_ANON_MMAP
#ifdef __SANITIZE_ADDRESS__
#define DISABLE_ANON_MMAP
#elif defined(__has_feature)
#if __has_feature(address_sanitizer)
#define DISABLE_ANON_MMAP
#endif
#endif
#endif
#ifndef DISABLE_ANON_MMAP
#include <sys/mman.h>
void* anonymousMemoryMap(size_t size) {
return mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
}
void mappedMemoryFree(void* memory, size_t size) {
munmap(memory, size);
}
#else
void* anonymousMemoryMap(size_t size) {
return calloc(1, size);
}
void mappedMemoryFree(void* memory, size_t size) {
UNUSED(size);
free(memory);
}
#endif
|
Disable mmap allocator when running under address sanitizer
|
Util: Disable mmap allocator when running under address sanitizer
|
C
|
mpl-2.0
|
Iniquitatis/mgba,libretro/mgba,libretro/mgba,libretro/mgba,Iniquitatis/mgba,mgba-emu/mgba,mgba-emu/mgba,libretro/mgba,libretro/mgba,mgba-emu/mgba,mgba-emu/mgba,Iniquitatis/mgba,Iniquitatis/mgba
|
7ee90d0d9ecd6010bb6c7ad252d04b32f07877d5
|
include/clang/Basic/TypeTraits.h
|
include/clang/Basic/TypeTraits.h
|
//===--- TypeTraits.h - C++ Type Traits Support Enumerations ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines enumerations for the type traits support.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TYPETRAITS_H
#define LLVM_CLANG_TYPETRAITS_H
namespace clang {
/// UnaryTypeTrait - Names for the unary type traits.
enum UnaryTypeTrait {
UTT_HasNothrowAssign,
UTT_HasNothrowCopy,
UTT_HasNothrowConstructor,
UTT_HasTrivialAssign,
UTT_HasTrivialCopy,
UTT_HasTrivialConstructor,
UTT_HasTrivialDestructor,
UTT_HasVirtualDestructor,
UTT_IsAbstract,
UTT_IsClass,
UTT_IsEmpty,
UTT_IsEnum,
UTT_IsPOD,
UTT_IsPolymorphic,
UTT_IsUnion,
UTT_IsLiteral
};
/// BinaryTypeTrait - Names for the binary type traits.
enum BinaryTypeTrait {
BTT_IsBaseOf,
};
}
#endif
|
//===--- TypeTraits.h - C++ Type Traits Support Enumerations ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines enumerations for the type traits support.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TYPETRAITS_H
#define LLVM_CLANG_TYPETRAITS_H
namespace clang {
/// UnaryTypeTrait - Names for the unary type traits.
enum UnaryTypeTrait {
UTT_HasNothrowAssign,
UTT_HasNothrowCopy,
UTT_HasNothrowConstructor,
UTT_HasTrivialAssign,
UTT_HasTrivialCopy,
UTT_HasTrivialConstructor,
UTT_HasTrivialDestructor,
UTT_HasVirtualDestructor,
UTT_IsAbstract,
UTT_IsClass,
UTT_IsEmpty,
UTT_IsEnum,
UTT_IsPOD,
UTT_IsPolymorphic,
UTT_IsUnion,
UTT_IsLiteral
};
/// BinaryTypeTrait - Names for the binary type traits.
enum BinaryTypeTrait {
BTT_IsBaseOf
};
}
#endif
|
Fix compile error: comma at end of enumerator list.
|
Fix compile error: comma at end of enumerator list.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@121075 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-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,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
|
f6640d28e09979825b63abb619da29bf17ca4819
|
test/CodeGen/ubsan-null.c
|
test/CodeGen/ubsan-null.c
|
// RUN: %clang_cc1 -fsanitize=null -emit-llvm %s -o - | FileCheck %s
struct A {
int a[2];
int b;
};
// CHECK-LABEL: @f1
int *f1() {
// CHECK-NOT: __ubsan_handle_type_mismatch
// CHECK: ret
// CHECK-SAME: getelementptr inbounds (%struct.A, %struct.A* null, i32 0, i32 1)
return &((struct A *)0)->b;
}
// CHECK-LABEL: @f2
int f2() {
// CHECK: __ubsan_handle_type_mismatch
// CHECK: load
// CHECK-SAME: getelementptr inbounds (%struct.A, %struct.A* null, i32 0, i32 1)
// CHECK: ret
return ((struct A *)0)->b;
}
|
// RUN: %clang_cc1 -fsanitize=null -emit-llvm %s -o - | FileCheck %s
struct A {
int a[2];
int b;
};
// CHECK-LABEL: @f1
int *f1() {
// CHECK-NOT: __ubsan_handle_type_mismatch
// CHECK: ret
// CHECK-SAME: getelementptr inbounds (%struct.A, %struct.A* null, i32 0, i32 1)
return &((struct A *)0)->b;
}
|
Make a test compatible with r300508
|
[ubsan] Make a test compatible with r300508
|
C
|
apache-2.0
|
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
|
787fde3532ce508e9c1bad24e0edfcfe969615aa
|
sticks.c
|
sticks.c
|
#include <stdio.h>
typedef struct {
int hands[2][2];
int turn;
} Sticks;
void sticks_create(Sticks *sticks) {
sticks->hands[0][0] = 1;
sticks->hands[0][1] = 1;
sticks->hands[1][0] = 1;
sticks->hands[1][1] = 1;
sticks->turn = 0;
}
void sticks_play(Sticks *sticks, int actor, int target) {
sticks->hands[!sticks->turn][target] += sticks->hands[sticks->turn][actor];
if (sticks->hands[!sticks->turn][target] >= 5) {
sticks->hands[!sticks->turn][target] = 0;
}
sticks->turn = !sticks->turn;
}
int main(void) {
Sticks sticks;
sticks_create(&sticks);
printf("%d\n", sticks.hands[0][0]);
printf("%d\n", sticks.turn);
sticks_play(&sticks, 0, 1);
printf("%d\n", sticks.hands[1][1]);
printf("%d\n", sticks.turn);
}
|
#include <stdio.h>
typedef struct {
int hands[2][2];
int turn;
} Sticks;
void sticks_create(Sticks *sticks) {
sticks->hands[0][0] = 1;
sticks->hands[0][1] = 1;
sticks->hands[1][0] = 1;
sticks->hands[1][1] = 1;
sticks->turn = 0;
}
void sticks_play(Sticks *sticks, int x, int y) {
sticks->hands[!sticks->turn][y] += sticks->hands[sticks->turn][x];
if (sticks->hands[!sticks->turn][y] >= 5) {
sticks->hands[!sticks->turn][y] = 0;
}
sticks->turn = !sticks->turn;
}
int main(void) {
Sticks sticks;
sticks_create(&sticks);
printf("%d\n", sticks.hands[0][0]);
printf("%d\n", sticks.turn);
sticks_play(&sticks, 0, 1);
printf("%d\n", sticks.hands[1][1]);
printf("%d\n", sticks.turn);
}
|
Rename actor/target to x/y to allow for shifting
|
Rename actor/target to x/y to allow for shifting
|
C
|
mit
|
tysonzero/c-ann
|
69bee79575bfe1ef4b213fd962cc0aaeb66e7b28
|
wizard-basic-runtime/main.c
|
wizard-basic-runtime/main.c
|
#include <stdio.h>
typedef enum ValueType {
NULL_VALUE,
NUMBER,
ARRAY,
STRUCTURE
} ValueType;
typedef double Number;
struct Value;
typedef struct Value* Array;
typedef struct ArrayData {
size_t size;
Array array;
} ArrayData;
typedef struct StructureData {
char* name;
void* structure;
} StructureData;
typedef union ValueStorage {
Number number;
ArrayData array;
StructureData structure;
} ValueStorage;
typedef struct Value {
ValueType type;
ValueStorage storage;
} Value, *ValuePointer;
int main(void) {
puts("Test.");
}
|
#include <stdio.h>
typedef enum ValueType {
NULL_VALUE,
NUMBER,
ARRAY,
STRUCTURE
} ValueType;
typedef double Number;
struct Value;
typedef struct Value* Array;
typedef struct ArrayData {
size_t size;
Array array;
} ArrayData;
typedef struct StructureData {
char* name;
void* structure;
} StructureData;
typedef union ValueStorage {
Number number;
ArrayData array;
StructureData structure;
} ValueStorage;
typedef struct Value {
ValueType type;
ValueStorage storage;
} Value, *ValuePointer;
ValuePointer CreateValue(void) {
return (ValuePointer)malloc(sizeof(Value));
}
ValuePointer CreateNull(void) {
ValuePointer value = CreateValue();
value->type = NULL_VALUE;
return value;
}
ValuePointer CreateNumber(Number number) {
ValuePointer value = CreateValue();
value->type = NUMBER;
value->storage.number = number;
return value;
}
int main(void) {
puts("Test.");
}
|
Add runtime types creating function.
|
Add runtime types creating function.
|
C
|
mit
|
thewizardplusplus/wizard-basic-3,thewizardplusplus/wizard-basic-3
|
da91d0278e5790d212cfc0748238e711cb150af9
|
Modules/getbuildinfo.c
|
Modules/getbuildinfo.c
|
#include <stdio.h>
#ifndef DATE
#ifdef __DATE__
#define DATE __DATE__
#else
#define DATE "xx/xx/xx"
#endif
#endif
#ifndef TIME
#ifdef __TIME__
#define TIME __TIME__
#else
#define TIME "xx:xx:xx"
#endif
#endif
#ifndef BUILD
#define BUILD 0
#endif
const char *
Py_GetBuildInfo()
{
static char buildinfo[40];
sprintf(buildinfo, "#%d, %.12s, %.8s", BUILD, DATE, TIME);
return buildinfo;
}
|
#include "config.h"
#include <stdio.h>
#ifndef DATE
#ifdef __DATE__
#define DATE __DATE__
#else
#define DATE "xx/xx/xx"
#endif
#endif
#ifndef TIME
#ifdef __TIME__
#define TIME __TIME__
#else
#define TIME "xx:xx:xx"
#endif
#endif
#ifndef BUILD
#define BUILD 0
#endif
const char *
Py_GetBuildInfo()
{
static char buildinfo[40];
sprintf(buildinfo, "#%d, %.12s, %.8s", BUILD, DATE, TIME);
return buildinfo;
}
|
Include config.h so it can define const away for K&R.
|
Include config.h so it can define const away for K&R.
|
C
|
mit
|
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
|
030077869192bb6474149d4e8a6fec6c07084f0d
|
VisualPractice/types.h
|
VisualPractice/types.h
|
#ifndef TE_TYPES_H
#define TE_TYPES_H
namespace te
{
struct Vector2f
{
float x;
float y;
Vector2f(float x, float y);
Vector2f operator+(Vector2f o);
Vector2f operator-(Vector2f o);
};
struct Vector2i
{
int x;
int y;
Vector2i(int x, int y);
Vector2i operator+(Vector2i o);
Vector2i operator-(Vector2i o);
};
}
#endif
|
#ifndef TE_TYPES_H
#define TE_TYPES_H
namespace te
{
struct Vector2f
{
float x;
float y;
Vector2f(float x = 0, float y = 0);
Vector2f operator+(Vector2f o);
Vector2f operator-(Vector2f o);
};
struct Vector2i
{
int x;
int y;
Vector2i(int x = 0, int y = 0);
Vector2i operator+(Vector2i o);
Vector2i operator-(Vector2i o);
};
}
#endif
|
Add default constructors to vectors
|
Add default constructors to vectors
|
C
|
mit
|
evinstk/TantechEngine,evinstk/TantechEngineOriginal,evinstk/TantechEngineOriginal,evinstk/TantechEngineOriginal,evinstk/TantechEngine,evinstk/TantechEngineOriginal,evinstk/TantechEngineOriginal,evinstk/TantechEngineOriginal,evinstk/TantechEngine,evinstk/TantechEngine,evinstk/TantechEngine,evinstk/TantechEngine
|
e704bfde67fdb6c736e133d4cdaf25af6a58c6ea
|
DCTOAuth/DCTOAuthAccount.h
|
DCTOAuth/DCTOAuthAccount.h
|
//
// DCTOAuthAccount.h
// DTOAuth
//
// Created by Daniel Tull on 09.07.2010.
// Copyright 2010 Daniel Tull. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface DCTOAuthAccount : NSObject
+ (DCTOAuthAccount *)OAuthAccountWithType:(NSString *)type
requestTokenURL:(NSURL *)requestTokenURL
authorizeURL:(NSURL *)authorizeURL
accessTokenURL:(NSURL *)accessTokenURL
consumerKey:(NSString *)consumerKey
consumerSecret:(NSString *)consumerSecret;
+ (DCTOAuthAccount *)OAuth2AccountWithType:(NSString *)type
authorizeURL:(NSURL *)authorizeURL
accessTokenURL:(NSURL *)accessTokenURL
clientID:(NSString *)clientID
clientSecret:(NSString *)clientSecret
scopes:(NSArray *)scopes;
@property (nonatomic, readonly) NSString *type;
@property (nonatomic, readonly) NSString *identifier;
@property (nonatomic, copy) NSURL *callbackURL;
- (void)authenticateWithHandler:(void(^)(NSDictionary *returnedValues))handler;
- (void)renewCredentialsWithHandler:(void(^)(BOOL success, NSError *error))handler;
@end
|
//
// DCTOAuthAccount.h
// DTOAuth
//
// Created by Daniel Tull on 09.07.2010.
// Copyright 2010 Daniel Tull. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface DCTOAuthAccount : NSObject
+ (DCTOAuthAccount *)OAuthAccountWithType:(NSString *)type
requestTokenURL:(NSURL *)requestTokenURL
authorizeURL:(NSURL *)authorizeURL
accessTokenURL:(NSURL *)accessTokenURL
consumerKey:(NSString *)consumerKey
consumerSecret:(NSString *)consumerSecret;
+ (DCTOAuthAccount *)OAuth2AccountWithType:(NSString *)type
authorizeURL:(NSURL *)authorizeURL
accessTokenURL:(NSURL *)accessTokenURL
clientID:(NSString *)clientID
clientSecret:(NSString *)clientSecret
scopes:(NSArray *)scopes;
@property (nonatomic, readonly) NSString *type;
@property (nonatomic, readonly) NSString *identifier;
@property (nonatomic, copy) NSURL *callbackURL;
- (void)authenticateWithHandler:(void(^)(NSDictionary *returnedValues))handler;
//- (void)renewCredentialsWithHandler:(void(^)(BOOL success, NSError *error))handler;
@end
|
Comment out this method, it does nothing right now
|
Comment out this method, it does nothing right now
|
C
|
bsd-3-clause
|
danielctull/DCTAuth,danielctull/DCTAuth
|
0a4405ba53d70b4955e3ef1a2624a2d967b32e7c
|
libkleo/libkleo_export.h
|
libkleo/libkleo_export.h
|
/* This file is part of the KDE project
Copyright (C) 2007 David Faure <faure@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef LIBKLEO_EXPORT_H
#define LIBKLEO_EXPORT_H
/* needed for KDE_EXPORT and KDE_IMPORT macros */
#include <kdemacros.h>
#ifndef KLEO_EXPORT
# if defined(MAKE_LIBKLEO_LIB)
/* We are building this library */
# define KLEO_EXPORT KDE_EXPORT
# else
/* We are using this library */
# define KLEO_EXPORT KDE_IMPORT
# endif
#endif
# ifndef KLEO_EXPORT_DEPRECATED
# define KLEO_EXPORT_DEPRECATED KDE_DEPRECATED KLEO_EXPORT
# endif
#endif
|
/* This file is part of the KDE project
Copyright (C) 2007 David Faure <faure@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef LIBKLEO_EXPORT_H
#define LIBKLEO_EXPORT_H
/* needed for KDE_EXPORT and KDE_IMPORT macros */
#include <kdemacros.h>
#ifdef Q_WS_WIN
#ifndef KLEO_EXPORT
# ifdef MAKE_KLEO_LIB
# define KLEO_EXPORT KDE_EXPORT
# else
# define KLEO_EXPORT KDE_IMPORT
# endif
#endif
#else // not windows
#define KLEO_EXPORT KDE_EXPORT
#endif /* not windows */
# ifndef KLEO_EXPORT_DEPRECATED
# define KLEO_EXPORT_DEPRECATED KDE_DEPRECATED KLEO_EXPORT
# endif
#endif
|
Fix typo MAKE_KLEO_LIB not MAKE_LIBKLEO_LIB and make it more coherent with other export files
|
Fix typo MAKE_KLEO_LIB not MAKE_LIBKLEO_LIB and make it more coherent with
other export files
svn path=/trunk/KDE/kdepim/libkleo/; revision=674385
|
C
|
lgpl-2.1
|
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
|
fe174f601a9730f2161f8586b66519a71bfe8e45
|
phong-su.c
|
phong-su.c
|
/*
* A simple setuid binary that runs /usr/bin/phong.py
*/
#include <sys/types.h>
#include <unistd.h>
#ifndef PHONG_PATH
#define PHONG_PATH "/usr/bin/phong.py"
#endif
int main(int argc, char** argv)
{
int i;
char **newArgv;
newArgv = calloc (sizeof (char*), argc+1);
newArgv[0] = strdup (PHONG_PATH);
newArgv[1] = strdup ("sudo");
for (i = 1; i < argc; i++) {
newArgv[i+1] = strdup(argv[i]);
}
newArgv[argc+1] = NULL;
setuid (0);
return execv (newArgv[0], newArgv);
}
|
/*
* A simple setuid binary that runs /usr/bin/phong.py
*/
#include <sys/types.h>
#include <unistd.h>
#ifndef PHONG_PATH
#define PHONG_PATH "/usr/bin/phong.py"
#endif
int main(int argc, char** argv)
{
int i;
char **newArgv;
newArgv = calloc (sizeof (char*), argc+1);
newArgv[0] = strdup (PHONG_PATH);
newArgv[1] = strdup ("sudo");
for (i = 1; i < argc; i++) {
newArgv[i+1] = strdup(argv[i]);
}
newArgv[argc+1] = NULL;
setreuid (geteuid (), getuid ());
return execv (newArgv[0], newArgv);
}
|
Swap euid and uid in sudo helper
|
Swap euid and uid in sudo helper
|
C
|
agpl-3.0
|
phrobo/phong,phrobo/phong
|
784a5edc4bc7d9d7c9b4119c8d5e4c52962cf1c4
|
ports/raspberrypi/boards/adafruit_kb2040/mpconfigboard.h
|
ports/raspberrypi/boards/adafruit_kb2040/mpconfigboard.h
|
#define MICROPY_HW_BOARD_NAME "Adafruit KB2040"
#define MICROPY_HW_MCU_NAME "rp2040"
#define MICROPY_HW_NEOPIXEL (&pin_GPIO17)
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO12)
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO13)
#define DEFAULT_UART_BUS_TX (&pin_GPIO0)
#define DEFAULT_UART_BUS_RX (&pin_GPIO1)
|
#define MICROPY_HW_BOARD_NAME "Adafruit KB2040"
#define MICROPY_HW_MCU_NAME "rp2040"
#define MICROPY_HW_NEOPIXEL (&pin_GPIO17)
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO12)
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO13)
#define DEFAULT_UART_BUS_TX (&pin_GPIO0)
#define DEFAULT_UART_BUS_RX (&pin_GPIO1)
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO18)
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO19)
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO20)
|
Define default SPI pins on kb2040
|
Define default SPI pins on kb2040
Fixes #5875
|
C
|
mit
|
adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython
|
ef2d72f6dfe59851aacc9fc0de4a743393b7615c
|
src/config.h
|
src/config.h
|
/*
* StatZone 1.0.1
* Copyright (c) 2012-2020, Frederic Cambus
* https://www.statdns.com
*
* Created: 2012-02-13
* Last Updated: 2019-01-03
*
* StatZone is released under the BSD 2-Clause license
* See LICENSE file for details.
*/
#ifndef CONFIG_H
#define CONFIG_H
#define VERSION "StatZone 1.0.1"
#define LINE_LENGTH_MAX 65536
struct results {
uint64_t processedLines;
uint64_t a;
uint64_t aaaa;
uint64_t ds;
uint64_t ns;
uint64_t domains;
uint64_t idn;
double runtime;
};
#endif /* CONFIG_H */
|
/*
* StatZone 1.0.1
* Copyright (c) 2012-2020, Frederic Cambus
* https://www.statdns.com
*
* Created: 2012-02-13
* Last Updated: 2019-01-03
*
* StatZone is released under the BSD 2-Clause license
* See LICENSE file for details.
*/
#ifndef CONFIG_H
#define CONFIG_H
#define VERSION "StatZone 1.0.1"
#define LINE_LENGTH_MAX 65536
struct results {
uint64_t processedLines;
uint64_t a;
uint64_t aaaa;
uint64_t ds;
uint64_t ns;
uint64_t domains;
uint64_t idn;
};
#endif /* CONFIG_H */
|
Remove now useless runtime member from the results structure.
|
Remove now useless runtime member from the results structure.
|
C
|
bsd-2-clause
|
fcambus/statzone
|
7a7251c3693e01b85109856d00c9d455d60ca84b
|
src/broker.h
|
src/broker.h
|
#ifndef BROKER_H_
#define BROKER_H_
#include <map>
#include <string>
#include <zmq.hpp>
#include "client.h"
#include "topic.h"
#include "message.h"
class Broker {
public:
Broker(std::string bind, std::string private_key) :
bind_(bind), private_key_(private_key) {}
void main_loop();
private:
void handleMessage(const Message& message);
void sendMessage(Client &client, std::vector<std::string> frames);
std::string readPrivateKey(std::string path);
std::map<std::string,Client> clients_;
std::map<std::string,Topic> topics_;
zmq::socket_t* socket_;
size_t recv_ = 0;
size_t sent_ = 0;
std::string bind_;
std::string private_key_;
};
#endif
|
#ifndef BROKER_H_
#define BROKER_H_
#include <unordered_map>
#include <string>
#include <zmq.hpp>
#include "client.h"
#include "topic.h"
#include "message.h"
class Broker {
public:
Broker(std::string bind, std::string private_key) :
bind_(bind), private_key_(private_key) {}
void main_loop();
private:
void handleMessage(const Message& message);
void sendMessage(Client &client, std::vector<std::string> frames);
std::string readPrivateKey(std::string path);
std::unordered_map<std::string,Client> clients_;
std::unordered_map<std::string,Topic> topics_;
zmq::socket_t* socket_;
size_t recv_ = 0;
size_t sent_ = 0;
std::string bind_;
std::string private_key_;
};
#endif
|
Use unordered_map rather than map
|
Use unordered_map rather than map
`unordered_map` containers are faster than map containers to
access individual elements by their key, although they are
generally less efficient for range iteration through a subset
of their elements.
http://www.cplusplus.com/reference/unordered_map/unordered_map/
Which is fine, because we never do range iteration on these maps,
so use the tiny bit faster one.
|
C
|
apache-2.0
|
puppetlabs/mc0d,puppetlabs/mc0d
|
356293bc7ee39e1bb78bd159187664ffa8d45d1a
|
drivers/scsi/qla4xxx/ql4_version.h
|
drivers/scsi/qla4xxx/ql4_version.h
|
/*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2010 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k16"
|
/*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2010 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k17"
|
Update driver version to 5.02.00-k17
|
[SCSI] qla4xxx: Update driver version to 5.02.00-k17
Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com>
Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
|
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,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas
|
6b278656f26707d410778d42cd6f789b5c53c41b
|
drivers/scsi/qla4xxx/ql4_version.h
|
drivers/scsi/qla4xxx/ql4_version.h
|
/*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2010 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k6"
|
/*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2010 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k7"
|
Update driver version to 5.02.00-k7
|
[SCSI] qla4xxx: Update driver version to 5.02.00-k7
Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com>
Signed-off-by: James Bottomley <91e2c378bdc9ac58358cd03ebb6c74f7db9aa049@parallels.com>
|
C
|
mit
|
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,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,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas
|
a664f6516a1d90147c84d64eaacea8d799b00e83
|
src/Renamer.h
|
src/Renamer.h
|
#pragma once
#include <map>
#include <string>
#include "ClassFile.h"
using namespace std;
struct SourceId
{
bool isMethod; // otherwise, field
string className;
string name;
bool operator < (SourceId const& other) const
{
if(isMethod < other.isMethod)
return true;
if(className < other.className)
return true;
if(name < other.name)
return true;
return false;
}
};
extern map<string, string> classRemap;
extern map<SourceId, string> memberRemap;
void doRenamings(ClassFile& class_);
|
#pragma once
#include <map>
#include <string>
#include "ClassFile.h"
using namespace std;
struct SourceId
{
bool isMethod; // otherwise, field
string className;
string name;
bool operator < (SourceId const& other) const
{
if(isMethod < other.isMethod)
return true;
if(isMethod > other.isMethod)
return false;
if(className < other.className)
return true;
if(className > other.className)
return false;
return name < other.name;
}
};
extern map<string, string> classRemap;
extern map<SourceId, string> memberRemap;
void doRenamings(ClassFile& class_);
|
Fix implementation of '<' operator
|
Fix implementation of '<' operator
|
C
|
agpl-3.0
|
Ace17/jaremap,Ace17/jaremap,Ace17/jaremap,Ace17/jaremap
|
2908999b320714a97fe5223d0f51237554392e48
|
framework/Source/GPUImageFilterPipeline.h
|
framework/Source/GPUImageFilterPipeline.h
|
#import <Foundation/Foundation.h>
#import "GPUImageFilter.h"
@interface GPUImageFilterPipeline : NSObject
@property (strong) NSMutableArray *filters;
@property (strong) GPUImageOutput *input;
@property (strong) id <GPUImageInput> output;
- (id) initWithOrderedFilters:(NSArray*) filters input:(GPUImageOutput*)input output:(id <GPUImageInput>)output;
- (id) initWithConfiguration:(NSDictionary*) configuration input:(GPUImageOutput*)input output:(id <GPUImageInput>)output;
- (id) initWithConfigurationFile:(NSURL*) configuration input:(GPUImageOutput*)input output:(id <GPUImageInput>)output;
- (void) addFilter:(GPUImageFilter*)filter;
- (void) addFilter:(GPUImageFilter*)filter atIndex:(NSUInteger)insertIndex;
- (void) replaceFilterAtIndex:(NSUInteger)index withFilter:(GPUImageFilter*)filter;
- (void) replaceAllFilters:(NSArray*) newFilters;
- (void) removeFilterAtIndex:(NSUInteger)index;
- (void) removeAllFilters;
- (UIImage *) currentFilteredFrame;
@end
|
#import <Foundation/Foundation.h>
#import "GPUImageFilter.h"
@interface GPUImageFilterPipeline : NSObject
@property (strong) NSMutableArray *filters;
@property (strong) GPUImageOutput *input;
@property (strong) id <GPUImageInput> output;
- (id) initWithOrderedFilters:(NSArray*) filters input:(GPUImageOutput*)input output:(id <GPUImageInput>)output;
- (id) initWithConfiguration:(NSDictionary*) configuration input:(GPUImageOutput*)input output:(id <GPUImageInput>)output;
- (id) initWithConfigurationFile:(NSURL*) configuration input:(GPUImageOutput*)input output:(id <GPUImageInput>)output;
- (void) addFilter:(GPUImageFilter*)filter;
- (void) addFilter:(GPUImageFilter*)filter atIndex:(NSUInteger)insertIndex;
- (void) replaceFilterAtIndex:(NSUInteger)index withFilter:(GPUImageFilter*)filter;
- (void) replaceAllFilters:(NSArray*) newFilters;
- (void) removeFilterAtIndex:(NSUInteger)index;
- (void) removeAllFilters;
- (UIImage *) currentFilteredFrame;
- (CGImageRef) newCGImageFromCurrentFilteredFrame;
@end
|
Make pipeline work for CGImage processing (missed out the header file)
|
Bugfix: Make pipeline work for CGImage processing (missed out the header file)
|
C
|
bsd-3-clause
|
HSFGitHub/GPUImage,stelabouras/GPUImage,Creolophus/GPUImage,Kevin775263419/GPUImage,jimydotorg/GGGPUImage,StratAguilar/GPUImage,tuo/GPUImage,3drobotics/GPUImage,yshiga/GPUImage,geowarsong/GPUImage,Matzo/GPUImage,rromanchuk/GPUImage,hgl888/GPUImage,mingming1986/GPUImage,BradLarson/GPUImage,ozetadev/GPUImage,powerhome/GPUImage,tuo/GPUImage,lauraskelton/GPUImage,drewwilson/GPUImage,AmiaoCat/GPUImage,BradLarson/GPUImage,njucsyyh/GPUImage,BlessNeo/GPUImage,u-engine/GPUImage,liduanw/GPUImage,dachaoisme/GPUImage,Naithar/GPUImage,alex-learn/GPUImage,evfemist/GPUImage,cesare-montresor/GPUImage,cnbin/GPUImage,hgl888/GPUImage,powerhome/GPUImage,lydonchandra/GPUImage,agan112/GPUImage,LIQC/GPUImage,jimydotorg/GGGPUImage,jsharp83/GPUImage,msfeldstein/GPUImage,kalsariyac/GPUImage,hanton/GPUImage,stelabouras/GPUImage,cesare-montresor/GPUImage,wfxiang08/GPUImage,silvansky/GPUImage,lauraskelton/GPUImage,AskaCai/GPUImage,dachaoisme/GPUImage,PlanetaToBe/GPUImage,efremidze/GPUImage,hanangellove/GPUImage,sujeking/GPUImage,0x4d52/GPUImage,BlessNeo/GPUImage,lily4ever/GPUImage,zhengfuzhe2013/GPUImage,xingyuniu/GPUImage,KBvsMJ/GPUImage,cocologics/GPUImage,YuAo/GPUImage,hanangellove/GPUImage,liduanw/GPUImage,jianwoo/GPUImage,Slin/GPUImage,pheed/GPUImage,SinnerSchraderMobileMirrors/GPUImage,rtsbtx/GPUImage,mattwymore/GPUImage,zzhhui/GPUImage,sujeking/GPUImage,kalsariyac/GPUImage,alex-learn/GPUImage,birthmark/GPUImage,Dexterp37/GPUImage,3drobotics/GPUImage,jianwoo/GPUImage,howandhao/GPUImage,sdonly/GPUImage,0x4d52/GPUImage,FiftyThree/GPUImage,rtsbtx/GPUImage,mervekeles/repo,lydonchandra/GPUImage,wangwei1237/GPUImage,evfemist/GPUImage,ohad7/GPUImage,picmonkey/GPUImage,BradLarson/GPUImage,pheed/GPUImage,xqz001/GPUImage,pengleelove/GPUImage,TimorCan/GPUImage,lacyrhoades/GPUImage,SanChain/GPUImage,zzhhui/GPUImage,SanChain/GPUImage,wangwei1237/GPUImage,powerhome/GPUImage,AlanJN/GPUImage,wfxiang08/GPUImage,pheed/GPUImage,hgl888/GPUImage,wysaid/GPUImage,appone/GPUImage,lacyrhoades/GPUImage,duanhjlt/GPUImage,duanhjlt/GPUImage,sansuiso/GPUImage,zilaiyedaren/GPUImage,mervekeles/GPUImage,TuSDK/GPUImage,ashishgabani/GPUImage,appone/GPUImage,wjszf/GPUImage,sansuiso/GPUImage,hoanganhx86/GPUImage,AlanJN/GPUImage,pcKanso/GPUImage,njucsyyh/GPUImage,ozetadev/GPUImage,bragil-massoud/GPUImage,jakeva/GPUImage,drewwilson/GPUImage,devluyy/GPUImage,nickplee/GPUImage,devluyy/GPUImage,KBvsMJ/GPUImage,pheed/GPUImage,Slin/GPUImage,Matzo/GPUImage,jackeychens/GPUImage,shi-yan/GPUImage,hanangellove/GPUImage,cocologics/GPUImage,denivip/GPUImage,thinkrad/GPUImage,zhengfuzhe2013/GPUImage,geowarsong/GPUImage,jackeychens/GPUImage,haikusw/GPUImage,xingyuniu/GPUImage,SuPair/GPUImage,yaoxiaoyong/GPUImage,mumer92/GPUImage,inb4ohnoes/GPUImage,zakinaeem/GPUImage,Kevin775263419/GPUImage,eighteight/GPUImage,FiftyThree/GPUImage,nonoBruce/GPUImage,937447974/GPUImage,jackeychens/GPUImage,shi-yan/GPUImage,ashishgabani/GPUImage,ask-fm/GPUImage,rocklive/GPUImage,ramoslin02/GPUImage,RavishankarDuMCA10/GPUImage,YuAo/GPUImage,loi32456/GPUImage,jimydotorg/GGGPUImage,mervekeles/repo,hakanw/GPUImage,sprint84/GPUImage,mattwymore/GPUImage,levyleo/LGPUImage,Learn-IOS/GPUImage,zakinaeem/GPUImage,drewwilson/GPUImage,mumer92/GPUImage,DavidWangTM/GPUImage,somegeekintn/GPUImage,java02014/GPUImage,yimouleng/GPUImage,mad102190/GPUImage,stelabouras/GPUImage,hakanw/GPUImage,headupinclouds/GPUImage,skonb/GPUImage,Slin/GPUImage,eighteight/GPUImage,FiftyThree/GPUImage,rFlex/GPUImage,lily4ever/GPUImage,YuAo/GPUImage,zhengfuzhe2013/GPUImage,AmiaoCat/GPUImage,horaceho/GPUImage,cocologics/GPUImage,DepositDev/GPUImage,AskaCai/GPUImage,Lcarvajal/GPUImage,SanjoDeundiak/GPUImage,java02014/GPUImage,silvansky/GPUImage,DavidWangTM/GPUImage,937447974/GPUImage,stelabouras/GPUImage,zakinaeem/GPUImage,sansuiso/GPUImage,faceleg/GPUImage,ohad7/GPUImage,111minutes/GPUImage,nickplee/GPUImage,tastyone/GPUImage,liduanw/GPUImage,kalsariyac/GPUImage,faceleg/GPUImage,cookov/GPUImage,gank0326/GPUImage,yshiga/GPUImage,UltravisualApp/GPUImage,odyth/GPUImage,SuPair/GPUImage,gank0326/GPUImage,mervekeles/GPUImage,jsharp83/GPUImage,mad102190/GPUImage,wysaid/GPUImage,jianwoo/GPUImage,StratAguilar/GPUImage,hyperconnect/GPUImage,jakeva/GPUImage,RavishankarDuMCA10/GPUImage,mtxs007/GPUImage,cocologics/GPUImage,ask-fm/GPUImage,jsharp83/GPUImage,pengleelove/GPUImage,wjszf/GPUImage,bragil-massoud/GPUImage,rromanchuk/GPUImage,csjlengxiang/GPUImage,lauraskelton/GPUImage,SanjoDeundiak/GPUImage,PlanetaToBe/GPUImage,hoanganhx86/GPUImage,mumer92/GPUImage,howandhao/GPUImage,hanton/GPUImage,efremidze/GPUImage,loi32456/GPUImage,SanChain/GPUImage,cookov/GPUImage,bgulanowski/GPUImage,mtxs007/GPUImage,Amnysia/GPUImage,bgulanowski/GPUImage,nickplee/GPUImage,UndaApp/GPUImage,r3mus/GPUImage,msfeldstein/GPUImage,mingming1986/GPUImage,pengleelove/GPUImage,birthmark/GPUImage,Matzo/GPUImage,tastyone/GPUImage,picmonkey/GPUImage,SinnerSchraderMobileMirrors/GPUImage,ramoslin02/GPUImage,dawangjiaowolaixunshan/GPUImage,j364960953/GPUImage,hakanw/GPUImage,pevasquez/GPUImage,SinnerSchraderMobileMirrors/GPUImage,silvansky/GPUImage,BlessNeo/GPUImage,wjszf/GPUImage,FiftyThree/GPUImage,Learn-IOS/GPUImage,skonb/GPUImage,cesare-montresor/GPUImage,dawangjiaowolaixunshan/GPUImage,Lcarvajal/GPUImage,smule/GPUImage,pcKanso/GPUImage,sprint84/GPUImage,sprint84/GPUImage,denivip/GPUImage,IncredibleDucky/GPUImage,r3mus/GPUImage,yaoxiaoyong/GPUImage,hyperconnect/GPUImage,TuSDK/GPUImage,eunmin/GPUImage,3drobotics/GPUImage,Hybridity/GPUImage,tastyone/GPUImage,catbus/GPUImage,inb4ohnoes/GPUImage,pevasquez/GPUImage,appone/GPUImage,agan112/GPUImage,headupinclouds/GPUImage,levyleo/LGPUImage,eighteight/GPUImage,DavidWangTM/GPUImage,thinkrad/GPUImage,PodRepo/GPUImage,Naithar/GPUImage,odyth/GPUImage,SinnerSchraderMobileMirrors/GPUImage,tuo/GPUImage,rromanchuk/GPUImage,appone/GPUImage,ohad7/GPUImage,njucsyyh/GPUImage,somegeekintn/GPUImage,0x4d52/GPUImage,hoanganhx86/GPUImage,xingyuniu/GPUImage,Creolophus/GPUImage,headupinclouds/GPUImage,cesare-montresor/GPUImage,sdonly/GPUImage,UltravisualApp/GPUImage,zilaiyedaren/GPUImage,Creolophus/GPUImage,catbus/GPUImage,jimydotorg/GGGPUImage,HSFGitHub/GPUImage,u-engine/GPUImage,horaceho/GPUImage,yimouleng/GPUImage,howandhao/GPUImage,LIQC/GPUImage,bragil-massoud/GPUImage,csjlengxiang/GPUImage,u-engine/GPUImage,KBvsMJ/GPUImage,j364960953/GPUImage,IncredibleDucky/GPUImage,lauraskelton/GPUImage,Hybridity/GPUImage,DepositDev/GPUImage,lauraskelton/GPUImage,mad102190/GPUImage,agan112/GPUImage,picmonkey/GPUImage,TimorCan/GPUImage,Learn-IOS/GPUImage,eunmin/GPUImage,faceleg/GPUImage,rocklive/GPUImage,skonb/GPUImage,SanjoDeundiak/GPUImage,odyth/GPUImage,haikusw/GPUImage,cnbin/GPUImage,nonoBruce/GPUImage,gank0326/GPUImage,IncredibleDucky/GPUImage,Amnysia/GPUImage,smule/GPUImage,xqz001/GPUImage,Dexterp37/GPUImage,rtsbtx/GPUImage,PodRepo/GPUImage,UndaApp/GPUImage,wysaid/GPUImage,bgulanowski/GPUImage
|
d2ebdda3f26a149dffac466d734eaf783b53d6d9
|
pkg/exf/exf_ad_check_lev4_dir.h
|
pkg/exf/exf_ad_check_lev4_dir.h
|
#ifdef ALLOW_EXF
CADJ STORE StoreForcing1 = tapelev4, key = ilev_4
CADJ STORE StoreForcing2 = tapelev4, key = ilev_4
CADJ STORE StoreCTRLS1 = tapelev4, key = ilev_4
# ifdef ALLOW_HFLUX_CONTROL
CADJ STORE xx_hflux0 = tapelev4, key = ilev_4
CADJ STORE xx_hflux1 = tapelev4, key = ilev_4
# endif
# ifdef ALLOW_SFLUX_CONTROL
CADJ STORE xx_sflux0 = tapelev4, key = ilev_4
CADJ STORE xx_sflux1 = tapelev4, key = ilev_4
# endif
# ifdef ALLOW_USTRESS_CONTROL
CADJ STORE xx_tauu0 = tapelev4, key = ilev_4
CADJ STORE xx_tauu1 = tapelev4, key = ilev_4
# endif
# ifdef ALLOW_VSTRESS_CONTROL
CADJ STORE xx_tauv0 = tapelev4, key = ilev_4
CADJ STORE xx_tauv1 = tapelev4, key = ilev_4
# endif
#endif /* ALLOW_EXF */
|
#ifdef ALLOW_EXF
CADJ STORE StoreEXF1 = tapelev4, key = ilev_4
CADJ STORE StoreEXF2 = tapelev4, key = ilev_4
CADJ STORE StoreCTRLS1 = tapelev4, key = ilev_4
# ifdef ALLOW_HFLUX_CONTROL
CADJ STORE xx_hflux0 = tapelev4, key = ilev_4
CADJ STORE xx_hflux1 = tapelev4, key = ilev_4
# endif
# ifdef ALLOW_SFLUX_CONTROL
CADJ STORE xx_sflux0 = tapelev4, key = ilev_4
CADJ STORE xx_sflux1 = tapelev4, key = ilev_4
# endif
# ifdef ALLOW_USTRESS_CONTROL
CADJ STORE xx_tauu0 = tapelev4, key = ilev_4
CADJ STORE xx_tauu1 = tapelev4, key = ilev_4
# endif
# ifdef ALLOW_VSTRESS_CONTROL
CADJ STORE xx_tauv0 = tapelev4, key = ilev_4
CADJ STORE xx_tauv1 = tapelev4, key = ilev_4
# endif
#endif /* ALLOW_EXF */
|
Fix store field for tapelev4 (rarely used).
|
Fix store field for tapelev4 (rarely used).
|
C
|
mit
|
altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h
|
0dc9990c39043e77c3097cba0d1d26ecd02338c1
|
engine/mesh.h
|
engine/mesh.h
|
#ifndef __ENGINE_MESH_H__
#define __ENGINE_MESH_H__
#include "std/types.h"
#include "gfx/vector3d.h"
typedef struct Triangle {
uint16_t p1, p2, p3;
} TriangleT;
typedef struct IndexArray {
uint16_t count;
uint16_t *index;
} IndexArrayT;
typedef struct IndexMap {
IndexArrayT *vertex;
uint16_t *indices;
} IndexMapT;
typedef struct Mesh {
size_t vertexNum;
size_t polygonNum;
Vector3D *vertex;
TriangleT *polygon;
Vector3D *surfaceNormal;
Vector3D *vertexNormal;
IndexMapT vertexToPoly;
} MeshT;
MeshT *NewMesh(size_t vertices, size_t triangles);
MeshT *NewMeshFromFile(const char *fileName);
void DeleteMesh(MeshT *mesh);
void NormalizeMeshSize(MeshT *mesh);
void CenterMeshPosition(MeshT *mesh);
void AddSurfaceNormals(MeshT *mesh);
void AddVertexToPolygonMap(MeshT *mesh);
void AddVertexNormals(MeshT *mesh);
#define RSC_MESH_FILE(NAME, FILENAME) \
AddRscSimple(NAME, NewMeshFromFile(FILENAME), (FreeFuncT)DeleteMesh)
#endif
|
#ifndef __ENGINE_MESH_H__
#define __ENGINE_MESH_H__
#include "std/types.h"
#include "gfx/vector3d.h"
typedef struct Triangle {
uint16_t p1, p2, p3;
} TriangleT;
typedef struct IndexArray {
uint16_t count;
uint16_t *index;
} IndexArrayT;
typedef struct IndexMap {
IndexArrayT *vertex;
uint16_t *indices;
} IndexMapT;
typedef struct Mesh {
size_t vertexNum;
size_t polygonNum;
Vector3D *vertex;
TriangleT *polygon;
/* map from vertex index to list of polygon indices */
IndexMapT vertexToPoly;
/* useful for lighting and backface culling */
Vector3D *surfaceNormal;
Vector3D *vertexNormal;
} MeshT;
MeshT *NewMesh(size_t vertices, size_t triangles);
MeshT *NewMeshFromFile(const char *fileName);
void DeleteMesh(MeshT *mesh);
void NormalizeMeshSize(MeshT *mesh);
void CenterMeshPosition(MeshT *mesh);
void AddSurfaceNormals(MeshT *mesh);
void AddVertexToPolygonMap(MeshT *mesh);
void AddVertexNormals(MeshT *mesh);
#define RSC_MESH_FILE(NAME, FILENAME) \
AddRscSimple(NAME, NewMeshFromFile(FILENAME), (FreeFuncT)DeleteMesh)
#endif
|
Add some comments about expected purpose.
|
Add some comments about expected purpose.
|
C
|
artistic-2.0
|
cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene
|
72727bfb04499b60ca8ed91398fbabf0d88fe4cf
|
include/parrot/string_primitives.h
|
include/parrot/string_primitives.h
|
/* string_funcs.h
* Copyright (C) 2001-2003, The Perl Foundation.
* SVN Info
* $Id$
* Overview:
* This is the api header for the string subsystem
* Data Structure and Algorithms:
* History:
* Notes:
* References:
*/
#ifndef PARROT_STRING_PRIMITIVES_H_GUARD
#define PARROT_STRING_PRIMITIVES_H_GUARD
#ifdef PARROT_IN_CORE
/* Set the directory where ICU finds its data files (encodings,
locales, etc.) */
void string_set_data_directory(const char *dir);
/* Convert from any supported encoding, into our internal format */
void string_fill_from_buffer(Interp *interp,
const void *buffer, UINTVAL len, const char *encoding_name, STRING *s);
/* Utility method which knows how to uwind a single escape sequence */
typedef Parrot_UInt2 (*Parrot_unescape_cb)(Parrot_Int4 offset, void *context);
Parrot_UInt4
string_unescape_one(Interp *interp, UINTVAL *offset, STRING *string);
UINTVAL
Parrot_char_digit_value(Interp *interp, UINTVAL character);
#endif /* PARROT_IN_CORE */
#endif /* PARROT_STRING_PRIMITIVES_H_GUARD */
/*
* Local variables:
* c-file-style: "parrot"
* End:
* vim: expandtab shiftwidth=4:
*/
|
/* string_funcs.h
* Copyright (C) 2001-2003, The Perl Foundation.
* SVN Info
* $Id$
* Overview:
* This is the api header for the string subsystem
* Data Structure and Algorithms:
* History:
* Notes:
* References:
*/
#ifndef PARROT_STRING_PRIMITIVES_H_GUARD
#define PARROT_STRING_PRIMITIVES_H_GUARD
#ifdef PARROT_IN_CORE
/* Set the directory where ICU finds its data files (encodings,
locales, etc.) */
PARROT_API void string_set_data_directory(const char *dir);
/* Convert from any supported encoding, into our internal format */
PARROT_API void string_fill_from_buffer(Interp *interp,
const void *buffer, UINTVAL len, const char *encoding_name, STRING *s);
/* Utility method which knows how to uwind a single escape sequence */
typedef Parrot_UInt2 (*Parrot_unescape_cb)(Parrot_Int4 offset, void *context);
PARROT_API Parrot_UInt4
string_unescape_one(Interp *interp, UINTVAL *offset, STRING *string);
PARROT_API UINTVAL
Parrot_char_digit_value(Interp *interp, UINTVAL character);
#endif /* PARROT_IN_CORE */
#endif /* PARROT_STRING_PRIMITIVES_H_GUARD */
/*
* Local variables:
* c-file-style: "parrot"
* End:
* vim: expandtab shiftwidth=4:
*/
|
Fix the build on Win32 by making linkage of various symbols consistent again.
|
Fix the build on Win32 by making linkage of various symbols consistent again.
git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@18778 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
|
C
|
artistic-2.0
|
ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot
|
134480cb1b2270251aa12e87fff32ec391d8d8f6
|
test/CFrontend/2003-08-18-StructAsValue.c
|
test/CFrontend/2003-08-18-StructAsValue.c
|
typedef struct {
int op;
} event_t;
event_t test(int X) {
event_t foo, bar;
return X ? foo : bar;
}
|
typedef struct {
int op;
} event_t;
event_t test(int X) {
event_t foo = { 1 }, bar = { 2 };
return X ? foo : bar;
}
|
Make the testcase more interesting
|
Make the testcase more interesting
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@7961 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm
|
9854b0bc628fd7b8cce8459629ad8df1f042bc7e
|
testmud/mud/home/Text/sys/verb/ooc/quit.c
|
testmud/mud/home/Text/sys/verb/ooc/quit.c
|
/*
* This file is part of Kotaka, a mud library for DGD
* http://github.com/shentino/kotaka
*
* Copyright (C) 2012 Raymond Jennings
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <kotaka/paths.h>
#include <text/paths.h>
inherit LIB_RAWVERB;
void main(object actor, string args)
{
if (query_user()->query_body()) {
query_user()->set_body(nil);
} else {
query_user()->quit();
}
}
|
/*
* This file is part of Kotaka, a mud library for DGD
* http://github.com/shentino/kotaka
*
* Copyright (C) 2012 Raymond Jennings
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <kotaka/paths.h>
#include <text/paths.h>
#include <kotaka/assert.h>
inherit LIB_RAWVERB;
void main(object actor, string args)
{
object body;
object user;
user = query_user();
body = user->query_body();
if (body) {
object *mobiles;
ASSERT(actor == body);
mobiles = body->query_property("mobiles");
body->set_property("mobiles", mobiles - ({ nil, user }));
} else {
query_user()->quit();
}
}
|
Remove user from mobile list when disinhabiting
|
Remove user from mobile list when disinhabiting
|
C
|
agpl-3.0
|
shentino/kotaka,shentino/kotaka,shentino/kotaka
|
6ac45b405fd7f929d73eb03395f713d8667b2941
|
include/nstl.h
|
include/nstl.h
|
/*!
* Master header of the nstl library.
*
* @author Louis Dionne
*/
#ifndef NSTL_H
#define NSTL_H
#include <nstl/operator.h>
#include <nstl/type.h>
#include <nstl/primitive.h>
#include <nstl/pair.h>
#include <nstl/algorithm.h>
#include <nstl/vector.h>
#endif /* !NSTL_H */
|
/*!
* Master header of the nstl library.
*
* @author Louis Dionne
*/
#ifndef NSTL_H
#define NSTL_H
#include <nstl/algorithm.h>
#include <nstl/operator.h>
#include <nstl/pair.h>
#include <nstl/primitive.h>
#include <nstl/type.h>
#include <nstl/vector.h>
#endif /* !NSTL_H */
|
Reorder the includes of the master include in alphabetical order.
|
Reorder the includes of the master include in alphabetical order.
|
C
|
mit
|
ldionne/nstl,ldionne/nstl
|
4db6dd114fde94aac12d4a2f01ca23032cc8cc61
|
ARAnalyticalProvider.h
|
ARAnalyticalProvider.h
|
@class UINavigationController, UIViewController;
@interface ARAnalyticalProvider : NSObject
/// Init
- (id)initWithIdentifier:(NSString *)identifier;
/// Set a per user property
- (void)identifyUserWithID:(NSString *)userID andEmailAddress:(NSString *)email;
- (void)setUserProperty:(NSString *)property toValue:(NSString *)value;
/// Submit user events
- (void)event:(NSString *)event withProperties:(NSDictionary *)properties;
- (void)incrementUserProperty:(NSString *)counterName byInt:(NSNumber *)amount;
/// Submit errors
- (void)error:(NSError *)error withMessage:(NSString *)message;
/// Monitor Navigation changes as page view
- (void)monitorNavigationViewController:(UINavigationController *)controller;
/// Submit an event with a time interval
- (void)logTimingEvent:(NSString *)event withInterval:(NSNumber *)interval;
/// Submit an event with a time interval and extra properties
/// @warning the properites must not contain the key string `length`.
- (void)logTimingEvent:(NSString *)event withInterval:(NSNumber *)interval properties:(NSDictionary *)properties;
/// Pass a specific event for showing a page
- (void)didShowNewPageView:(NSString *)pageTitle;
/// Submit a string to the provider's logging system
- (void)remoteLog:(NSString *)parsedString;
- (void)localLog:(NSString *)message;
- (NSArray *)messagesForProcessID:(NSUInteger)processID;
@end
|
@class UINavigationController, UIViewController;
@interface ARAnalyticalProvider : NSObject
/// Init
- (id)initWithIdentifier:(NSString *)identifier;
/// Set a per user property
- (void)identifyUserWithID:(NSString *)userID andEmailAddress:(NSString *)email;
- (void)setUserProperty:(NSString *)property toValue:(NSString *)value;
/// Submit user events
- (void)event:(NSString *)event withProperties:(NSDictionary *)properties;
- (void)incrementUserProperty:(NSString *)counterName byInt:(NSNumber *)amount;
/// Submit errors
- (void)error:(NSError *)error withMessage:(NSString *)message;
/// Monitor Navigation changes as page view
- (void)monitorNavigationViewController:(UINavigationController *)controller;
/// Submit an event with a time interval
- (void)logTimingEvent:(NSString *)event withInterval:(NSNumber *)interval;
/// Submit an event with a time interval and extra properties
/// @warning the properites must not contain the key string `length`.
- (void)logTimingEvent:(NSString *)event withInterval:(NSNumber *)interval properties:(NSDictionary *)properties;
/// Pass a specific event for showing a page
- (void)didShowNewPageView:(NSString *)pageTitle;
/// Submit a string to the provider's logging system
- (void)remoteLog:(NSString *)parsedString;
/// Submit a string to the local persisted logging system
- (void)localLog:(NSString *)message;
/// Retrieve messages provided to the local persisted logging system originating from a specified process.
- (NSArray *)messagesForProcessID:(NSUInteger)processID;
@end
|
Document local persisted logging API.
|
Document local persisted logging API.
|
C
|
mit
|
ed-at-work/ARAnalytics,ashfurrow/ARAnalytics,sgtsquiggs/ARAnalytics,sp3esu/ARAnalytics,AlexanderBabchenko/ARAnalytics,orta/ARAnalytics,levigroker/ARAnalytics,arbesfeld/ARAnalytics,segiddins/ARAnalytics,sodastsai/ARAnalytics,HelloZhu/ARAnalytics,indiegogo/ARAnalytics,KBvsMJ/ARAnalytics,wzs/ARAnalytics,ftvs/ARAnalytics,imclean/ARAnalytics,diogot/ARAnalytics,BamX/ARAnalytics,skeeet/ARAnalytics,modulexcite/ARAnalytics,sunfei/ARAnalytics,natan/ARAnalytics,rinatkhanov/ARAnalytics
|
939663cc8143eefe4446241af24628fb1d0957c6
|
ext/bindex/cruby.c
|
ext/bindex/cruby.c
|
#include "bindex.h"
VALUE bx_mBindex;
static VALUE
bx_current_bindings(VALUE self)
{
return current_bindings();
}
static VALUE
bx_exc_set_backtrace(VALUE self, VALUE bt)
{
/* rb_check_backtrace can raise an exception, if the input arguments are not
* to its likings. Set the bindings afterwards, so we don't waste when not
* needed. */
VALUE backtrace = rb_iv_set(self, "bt", rb_check_backtrace(bt));
rb_iv_set(self, "bindings", current_bindings());
return backtrace;
}
static VALUE
bx_exc_bindings(VALUE self, VALUE bt)
{
VALUE bindings;
bindings = rb_iv_get(self, "bindings");
if (NIL_P(bindings)) {
bindings = rb_ary_new();
}
return bindings;
}
void
Init_cruby(void)
{
bx_mBindex = rb_define_module("Bindex");
rb_define_singleton_method(bx_mBindex, "current_bindings", bx_current_bindings, 0);
rb_define_method(rb_eException, "set_backtrace", bx_exc_set_backtrace, 1);
rb_define_method(rb_eException, "bindings", bx_exc_bindings, 0);
}
|
#include "bindex.h"
VALUE bx_mBindex;
static VALUE
bx_current_bindings(VALUE self)
{
return current_bindings();
}
static VALUE
bx_exc_set_backtrace(VALUE self, VALUE bt)
{
/* rb_check_backtrace can raise an exception, if the input arguments are not
* to its likings. Set the bindings afterwards, so we don't waste when not
* needed. */
VALUE backtrace = rb_iv_set(self, "bt", rb_check_backtrace(bt));
rb_iv_set(self, "bindings", current_bindings());
return backtrace;
}
static VALUE
bx_exc_bindings(VALUE self)
{
VALUE bindings;
bindings = rb_iv_get(self, "bindings");
if (NIL_P(bindings)) {
bindings = rb_ary_new();
}
return bindings;
}
void
Init_cruby(void)
{
bx_mBindex = rb_define_module("Bindex");
rb_define_singleton_method(bx_mBindex, "current_bindings", bx_current_bindings, 0);
rb_define_method(rb_eException, "set_backtrace", bx_exc_set_backtrace, 1);
rb_define_method(rb_eException, "bindings", bx_exc_bindings, 0);
}
|
Clean unused argument in bx_exc_bindings
|
CRuby: Clean unused argument in bx_exc_bindings
|
C
|
mit
|
gsamokovarov/bindex,gsamokovarov/bindex,gsamokovarov/bindex
|
7d0c8651ffc96bf8d1f08b1a482105514301e16b
|
Code/RestKit.h
|
Code/RestKit.h
|
//
// RestKit.h
// RestKit
//
// Created by Blake Watters on 2/19/10.
// Copyright (c) 2009-2012 RestKit. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#import "ObjectMapping.h"
#import "Network.h"
#import "Support.h"
#import "CoreData.h"
/**
Set the App logging component. This header
file is generally only imported by apps that
are pulling in all of RestKit. By setting the
log component to App here, we allow the app developer
to use RKLog() in their own app.
*/
#undef RKLogComponent
#define RKLogComponent RKlcl_cApp
|
//
// RestKit.h
// RestKit
//
// Created by Blake Watters on 2/19/10.
// Copyright (c) 2009-2012 RestKit. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef _RESTKIT_
#define _RESTKIT_
#import "ObjectMapping.h"
#import "Network.h"
#import "Support.h"
#import "CoreData.h"
/**
Set the App logging component. This header
file is generally only imported by apps that
are pulling in all of RestKit. By setting the
log component to App here, we allow the app developer
to use RKLog() in their own app.
*/
#undef RKLogComponent
#define RKLogComponent RKlcl_cApp
#endif /* _RESTKIT_ */
|
Add global __RESTKIT__ define for aiding conditional compilation
|
Add global __RESTKIT__ define for aiding conditional compilation
|
C
|
apache-2.0
|
mavericksunny/RestKit,loverbabyz/RestKit,braindata/RestKit,timbodeit/RestKit,caamorales/RestKit,oligriffiths/RestKit,agworld/RestKit,LiuShulong/RestKit,imton/RestKit,margarina/RestKit-latest,jonesgithub/RestKit,QLGu/RestKit,loverbabyz/RestKit,Bogon/RestKit,coderChrisLee/RestKit,agworld/RestKit,RestKit/RestKit,baumatron/RestKit,jrtaal/RestKit,braindata/RestKit,cfis/RestKit,moneytree/RestKit,qingsong-xu/RestKit,erichedstrom/RestKit,antondarki/RestKit,goldstar/RestKit,timbodeit/RestKit,hanangellove/RestKit,nett55/RestKit,ppierson/RestKit,Juraldinio/RestKit,QLGu/RestKit,baumatron/RestKit,baumatron/RestKit,naqi/RestKit,nphkh/RestKit,HarrisLee/RestKit,lucasecf/RestKit,kevmeyer/RestKit,0x73/RestKit,pbogdanv/RestKit,sandyway/RestKit,dx285/RestKit,Gaantz/RestKit,LiuShulong/RestKit,zjh171/RestKit,jrtaal/RestKit,lucasecf/RestKit,fedegasp/RestKit,0x73/RestKit,ForrestAlfred/RestKit,lmirosevic/RestKit,youssman/RestKit,QLGu/RestKit,common2015/RestKit,nphkh/RestKit,RyanCodes/RestKit,qingsong-xu/RestKit,Gaantz/RestKit,jrtaal/RestKit,oye-lionel/GithubTest,PonderProducts/RestKit,hejunbinlan/RestKit,antondarki/RestKit,sachin-khard/NucleusRestKit,cnbin/RestKit,imton/RestKit,jrtaal/RestKit,cnbin/RestKit,fhchina/RestKit,LiuShulong/RestKit,fedegasp/RestKit,hejunbinlan/RestKit,money-alex2006hw/RestKit,money-alex2006hw/RestKit,hanangellove/RestKit,timbodeit/RestKit,pat2man/RestKit,vilinskiy-playdayteam/RestKit,hejunbinlan/RestKit,0dayZh/RestKit,wangjiangwen/RestKit,pbogdanv/RestKit,gank0326/restkit,coderChrisLee/RestKit,goldstar/RestKit,oligriffiths/RestKit,hejunbinlan/RestKit,sachin-khard/NucRestKit,adozenlines/RestKit,pbogdanv/RestKit,braindata/RestKit-1,djz-code/RestKit,mberube09/RestKit,apontador/RestKit,PonderProducts/RestKit,REXLabsInc/RestKit,youssman/RestKit,timbodeit/RestKit,mumer92/RestKit,djz-code/RestKit,ForrestAlfred/RestKit,cryptojuice/RestKit,damiannz/RestKit,fedegasp/RestKit,Juraldinio/RestKit,lucasecf/RestKit,lmirosevic/RestKit,Livestream/RestKit,braindata/RestKit-1,RestKit/RestKit,money-alex2006hw/RestKit,DejaMi/RestKit,sachin-khard/NucleusRestKit,gauravstomar/RestKit,caamorales/RestKit,wireitcollege/RestKit,ForrestAlfred/RestKit,naqi/RestKit,canaydogan/RestKit,gauravstomar/RestKit,erichedstrom/RestKit,Meihualu/RestKit,taptaptap/RestKit,nphkh/RestKit,mavericksunny/RestKit,naqi/RestKit,DejaMi/RestKit,fhchina/RestKit,wuxsoft/RestKit,youssman/RestKit,dx285/RestKit,djz-code/RestKit,ppierson/RestKit,ChinaPicture/RestKit,Papercloud/RestKit,coderChrisLee/RestKit,ppierson/RestKit,nphkh/RestKit,wyzzarz/RestKit,djz-code/RestKit,TheFarm/RestKit,apontador/RestKit,canaydogan/RestKit,mumer92/RestKit,sandyway/RestKit,canaydogan/RestKit,sachin-khard/NucleusRestKit,ppierson/RestKit,cnbin/RestKit,REXLabsInc/RestKit,erichedstrom/RestKit,dx285/RestKit,qingsong-xu/RestKit,sachin-khard/NucRestKit,wangjiangwen/RestKit,0dayZh/RestKit,REXLabsInc/RestKit,wyzzarz/RestKit,oye-lionel/GithubTest,zilaiyedaren/RestKit,StasanTelnov/RestKit,percysnoodle/RestKit,sandyway/RestKit,gank0326/restkit,aleufms/RestKit,cryptojuice/RestKit,imton/RestKit,StasanTelnov/RestKit,loverbabyz/RestKit,ChinaPicture/RestKit,percysnoodle/RestKit,moneytree/RestKit,ppierson/RestKit,oye-lionel/GithubTest,ipmobiletech/RestKit,hejunbinlan/RestKit,gauravstomar/RestKit,loverbabyz/RestKit,loverbabyz/RestKit,0x73/RestKit,SuPair/RestKit,pbogdanv/RestKit,nphkh/RestKit,samkrishna/RestKit,goldstar/RestKit,pat2man/RestKit,wangjiangwen/RestKit,fhchina/RestKit,Papercloud/RestKit,percysnoodle/RestKit,apontador/RestKit,jonesgithub/RestKit,damiannz/RestKit,gank0326/restkit,gank0326/restkit,wuxsoft/RestKit,common2015/RestKit,SuPair/RestKit,zhenlove/RestKit,ChinaPicture/RestKit,DejaMi/RestKit,RyanCodes/RestKit,cryptojuice/RestKit,youssman/RestKit,youssman/RestKit,Gaantz/RestKit,Papercloud/RestKit,SuPair/RestKit,cryptojuice/RestKit,Gaantz/RestKit,ChinaPicture/RestKit,Juraldinio/RestKit,zilaiyedaren/RestKit,Flutterbee/RestKit,zjh171/RestKit,wangjiangwen/RestKit,damiannz/RestKit,damiannz/RestKit,lmirosevic/RestKit,canaydogan/RestKit,justinyaoqi/RestKit,mavericksunny/RestKit,adozenlines/RestKit,nett55/RestKit,DejaMi/RestKit,jonesgithub/RestKit,LiuShulong/RestKit,jrtaal/RestKit,canaydogan/RestKit,LiuShulong/RestKit,fhchina/RestKit,sachin-khard/NucRestKit,jonesgithub/RestKit,kevmeyer/RestKit,ChinaPicture/RestKit,imton/RestKit,wangjiangwen/RestKit,wyzzarz/RestKit,dx285/RestKit,money-alex2006hw/RestKit,oye-lionel/GithubTest,gank0326/restkit,zilaiyedaren/RestKit,RyanCodes/RestKit,Meihualu/RestKit,REXLabsInc/RestKit,PonderProducts/RestKit,wuxsoft/RestKit,common2015/RestKit,antondarki/RestKit,TheFarm/RestKit,aleufms/RestKit,pat2man/RestKit,RyanCodes/RestKit,wyzzarz/RestKit,percysnoodle/RestKit,gauravstomar/RestKit,CodewareTechnology/RestKit,mberube09/RestKit,sachin-khard/NucleusRestKit,goldstar/RestKit,cryptojuice/RestKit,wireitcollege/RestKit,braindata/RestKit-1,QLGu/RestKit,common2015/RestKit,Papercloud/RestKit,mberube09/RestKit,money-alex2006hw/RestKit,justinyaoqi/RestKit,mberube09/RestKit,Bogon/RestKit,margarina/RestKit-latest,Meihualu/RestKit,SuPair/RestKit,mumer92/RestKit,Papercloud/RestKit,CodewareTechnology/RestKit,apontador/RestKit,nett55/RestKit,qingsong-xu/RestKit,HarrisLee/RestKit,caamorales/RestKit,nett55/RestKit,samkrishna/RestKit,HarrisLee/RestKit,kevmeyer/RestKit,taptaptap/RestKit,taptaptap/RestKit,Meihualu/RestKit,mumer92/RestKit,coderChrisLee/RestKit,lucasecf/RestKit,hanangellove/RestKit,gauravstomar/RestKit,zjh171/RestKit,ipmobiletech/RestKit,braindata/RestKit-1,zjh171/RestKit,zjh171/RestKit,nett55/RestKit,TheFarm/RestKit,mumer92/RestKit,fedegasp/RestKit,hanangellove/RestKit,aleufms/RestKit,Flutterbee/RestKit,moneytree/RestKit,samanalysis/RestKit,Bogon/RestKit,justinyaoqi/RestKit,fhchina/RestKit,taptaptap/RestKit,CodewareTechnology/RestKit,0x73/RestKit,justinyaoqi/RestKit,damiannz/RestKit,caamorales/RestKit,sandyway/RestKit,sachin-khard/NucRestKit,samanalysis/RestKit,aleufms/RestKit,oye-lionel/GithubTest,sandyway/RestKit,braindata/RestKit,caamorales/RestKit,braindata/RestKit,justinyaoqi/RestKit,lucasecf/RestKit,Gaantz/RestKit,Flutterbee/RestKit,dx285/RestKit,timbodeit/RestKit,Flutterbee/RestKit,zilaiyedaren/RestKit,sachin-khard/NucRestKit,SuPair/RestKit,zilaiyedaren/RestKit,naqi/RestKit,sachin-khard/NucleusRestKit,oligriffiths/RestKit,samanalysis/RestKit,cfis/RestKit,aleufms/RestKit,zhenlove/RestKit,antondarki/RestKit,kevmeyer/RestKit,adozenlines/RestKit,wireitcollege/RestKit,CodewareTechnology/RestKit,zhenlove/RestKit,DejaMi/RestKit,fedegasp/RestKit,pat2man/RestKit,margarina/RestKit-latest,pbogdanv/RestKit,Livestream/RestKit,oligriffiths/RestKit,coderChrisLee/RestKit,ipmobiletech/RestKit,QLGu/RestKit,cnbin/RestKit,ForrestAlfred/RestKit,cnbin/RestKit,apontador/RestKit,baumatron/RestKit,0x73/RestKit,wireitcollege/RestKit,RestKit/RestKit,adozenlines/RestKit,zhenlove/RestKit,RyanCodes/RestKit,Meihualu/RestKit,agworld/RestKit,HarrisLee/RestKit,margarina/RestKit-latest,ipmobiletech/RestKit,cfis/RestKit,PonderProducts/RestKit,samkrishna/RestKit,Juraldinio/RestKit,lmirosevic/RestKit,adozenlines/RestKit,0dayZh/RestKit,braindata/RestKit-1,zhenlove/RestKit,imton/RestKit,0dayZh/RestKit,pat2man/RestKit,HarrisLee/RestKit,oligriffiths/RestKit,common2015/RestKit,qingsong-xu/RestKit,kevmeyer/RestKit,vilinskiy-playdayteam/RestKit,wireitcollege/RestKit,Bogon/RestKit,Bogon/RestKit,hanangellove/RestKit,samanalysis/RestKit,antondarki/RestKit,vilinskiy-playdayteam/RestKit,wuxsoft/RestKit,Juraldinio/RestKit,jonesgithub/RestKit,CodewareTechnology/RestKit,ipmobiletech/RestKit,moneytree/RestKit,lmirosevic/RestKit,vilinskiy-playdayteam/RestKit,samanalysis/RestKit,moneytree/RestKit,wuxsoft/RestKit,baumatron/RestKit,Livestream/RestKit,mavericksunny/RestKit,StasanTelnov/RestKit,agworld/RestKit,Livestream/RestKit,ForrestAlfred/RestKit
|
85e2b7bbeecbae82e17051c1095642988a26de43
|
TDTHotChocolate/FoundationAdditions/TDTSuppressPerformSelectorLeakWarning.h
|
TDTHotChocolate/FoundationAdditions/TDTSuppressPerformSelectorLeakWarning.h
|
// http://stackoverflow.com/a/7933931/141220
#define TDTSuppressPerformSelectorLeakWarning(CODE) \
do { \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") \
CODE; \
_Pragma("clang diagnostic pop") \
} while (0)
|
// http://stackoverflow.com/a/7933931/141220
#define TDTSuppressPerformSelectorLeakWarning(code) \
do { \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") \
code; \
_Pragma("clang diagnostic pop") \
} while (0)
|
Revert to lowercase macro arguments
|
Revert to lowercase macro arguments
They match the convention in `TDTAssert.h`
|
C
|
bsd-3-clause
|
talk-to/Chocolate,talk-to/Chocolate
|
3b688a0ffa73cb7694f3b6aaf25d2c4cf9a7bf44
|
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
|
3f274880fb1720b82e449a9b4d86ec0dab336d7c
|
Sensorama/Sensorama/SRDebug.h
|
Sensorama/Sensorama/SRDebug.h
|
//
// SRDebug.h
// Sensorama
//
// Created by Wojciech Adam Koszek (h) on 09/04/2016.
// Copyright © 2016 Wojciech Adam Koszek. All rights reserved.
//
#ifndef SRDebug_h
#define SRDebug_h
#define SRPROBE0() do { \
NSLog(@"%s", __func__); \
} while (0)
#define SRPROBE1(x1) do { \
NSLog(@"%s %s=%@", __func__, #x1, (x1)); \
} while (0)
#define SRPROBE2(x1, x2) do { \
NSLog(@"%s %s=%@ %s=%@", __func__, #x1, (x1), #x2, (x2)); \
} while (0)
#define SRDEBUG if (1) NSLog
#endif /* SRDebug_h */
|
//
// SRDebug.h
// Sensorama
//
// Created by Wojciech Adam Koszek (h) on 09/04/2016.
// Copyright © 2016 Wojciech Adam Koszek. All rights reserved.
//
#ifndef SRDebug_h
#define SRDebug_h
#define SRPROBE0() do { \
NSLog(@"%s", __func__); \
} while (0)
#define SRPROBE1(x1) do { \
NSLog(@"%s %s=%@", __func__, #x1, (x1)); \
} while (0)
#define SRPROBE2(x1, x2) do { \
NSLog(@"%s %s=%@ %s=%@", __func__, #x1, (x1), #x2, (x2)); \
} while (0)
#define SRPROBE3(x1, x2, x3) do { \
NSLog(@"%s %s=%@ %s=%@ %s=%@", __func__, #x1, (x1), #x2, (x2), #x3, (x3)); \
} while (0)
#define SRDEBUG if (1) NSLog
#endif /* SRDebug_h */
|
Add 1 more macro for debugging 3 things.
|
Add 1 more macro for debugging 3 things.
|
C
|
bsd-2-clause
|
wkoszek/sensorama-ios,wkoszek/sensorama-ios,wkoszek/sensorama-ios,wkoszek/sensorama-ios
|
2e8abb7a804ed24013202b53784c31f7e1131429
|
c_solutions_31-40/Euler_31.c
|
c_solutions_31-40/Euler_31.c
|
#include <stdio.h>
#define CAP 8
const int currency[CAP] = {1, 2, 5, 10, 20, 50, 100, 200};
int total[CAP] = {0, 0, 0, 0, 0, 0, 0, 0};
const int limit = 200;
static inline int calculate_total(void)
{
int sum = 0;
for (int i=0; i < CAP; i++)
sum += total[i];
return sum;
}
int main(int argc, char *argv[])
{
int ways = 0;
int idx = 0;
while (total[idx] <= limit && (idx != CAP)) {
total[idx] += currency[idx];
int sum = calculate_total();
if (sum == limit)
ways++;
if (total[idx] < limit)
idx = 0;
else if (total[idx] >= limit) {
total[idx] = 0;
idx++;
}
}
printf("Answer: %d\n", ways);
return 0;
}
|
#include <stdio.h>
#define CAP 8
const int currency[CAP] = {1, 2, 5, 10, 20, 50, 100, 200};
int total[CAP] = {0, 0, 0, 0, 0, 0, 0, 0};
const int limit = 200;
static inline int calculate_total(void)
{
int sum = 0;
for (int i=0; i < CAP; i++)
sum += total[i];
return sum;
}
int main(int argc, char *argv[])
{
int ways = 0;
int idx = 0;
while (total[idx] <= limit && (idx != CAP)) {
total[idx] += currency[idx];
int sum = calculate_total();
if (sum < limit)
idx = 0;
else {
if (sum == limit)
ways++;
total[idx] = 0;
idx++;
}
}
printf("Answer: %d\n", ways);
return 0;
}
|
Check against sum, 30 second improvement
|
Check against sum, 30 second improvement
|
C
|
mit
|
tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler
|
53cd39088decb09998153455d9b00938115a322e
|
src/brainfuck-interpreter.c
|
src/brainfuck-interpreter.c
|
/*
* A simple Brainfuck interpreter.
*
* This file was written by Damien Dart, <damiendart@pobox.com>. This is free
* and unencumbered software released into the public domain. For more
* information, please refer to the accompanying "UNLICENCE" file.
*/
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "brainfuck.h"
int main(void)
{
char character = 0;
char *commands = NULL;
uint32_t number_of_commands = 0;
while((character = getchar()) != EOF) {
if ((character == '>') || (character == '<') || (character == '+') ||
(character == '-') || (character == '.') || (character == ',') ||
(character == '[') || (character == ']')) {
char *temp = realloc(commands, ++number_of_commands * sizeof(char));
if (temp == NULL) {
free(commands);
perror("Unable to create command list");
exit(EXIT_FAILURE);
}
commands = temp;
commands[number_of_commands - 1] = character;
}
}
commands = realloc(commands, ++number_of_commands * sizeof(char));
commands[number_of_commands - 1] = '\0';
brainfuck_evaluate(commands);
free(commands);
return EXIT_SUCCESS;
}
|
/*
* A simple Brainfuck interpreter.
*
* This file was written by Damien Dart, <damiendart@pobox.com>. This is free
* and unencumbered software released into the public domain. For more
* information, please refer to the accompanying "UNLICENCE" file.
*/
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "brainfuck.h"
void *realloc2(void *, size_t);
int main(void)
{
char character = 0;
char *commands = NULL;
uint32_t number_of_commands = 0;
while((character = getchar()) != EOF) {
commands = realloc2(commands, ++number_of_commands * sizeof(char));
commands[number_of_commands - 1] = character;
}
commands = realloc2(commands, ++number_of_commands * sizeof(char));
commands[number_of_commands - 1] = '\0';
brainfuck_evaluate(commands);
free(commands);
return EXIT_SUCCESS;
}
void *realloc2(void *ptr, size_t size)
{
char *new_obj = realloc(ptr, size);
if (new_obj == NULL) {
free(ptr);
strerror(errno);
exit(EXIT_FAILURE);
}
return new_obj;
}
|
Handle instances when "realloc()" fails.
|
Handle instances when "realloc()" fails.
|
C
|
unlicense
|
damiendart/brainfuck
|
674f0d242855b8f901dd29b6fe077aafc67593e4
|
src/qt/bitcoinaddressvalidator.h
|
src/qt/bitcoinaddressvalidator.h
|
#ifndef BITCOINADDRESSVALIDATOR_H
#define BITCOINADDRESSVALIDATOR_H
#include <QValidator>
/** Base48 entry widget validator.
Corrects near-miss characters and refuses characters that are no part of base48.
*/
class BitcoinAddressValidator : public QValidator
{
Q_OBJECT
public:
explicit BitcoinAddressValidator(QObject *parent = 0);
State validate(QString &input, int &pos) const;
static const int MaxAddressLength = 35;
};
#endif // BITCOINADDRESSVALIDATOR_H
|
#ifndef BITCOINADDRESSVALIDATOR_H
#define BITCOINADDRESSVALIDATOR_H
#include <QValidator>
/** Base58 entry widget validator.
Corrects near-miss characters and refuses characters that are not part of base58.
*/
class BitcoinAddressValidator : public QValidator
{
Q_OBJECT
public:
explicit BitcoinAddressValidator(QObject *parent = 0);
State validate(QString &input, int &pos) const;
static const int MaxAddressLength = 35;
};
#endif // BITCOINADDRESSVALIDATOR_H
|
Fix typo in a comment: it's base58, not base48.
|
Fix typo in a comment: it's base58, not base48.
|
C
|
mit
|
syscoin/syscoin,Crowndev/crowncoin,Infernoman/crowncoin,domob1812/crowncoin,Infernoman/crowncoin,Infernoman/crowncoin,domob1812/crowncoin,Infernoman/crowncoin,syscoin/syscoin,Infernoman/crowncoin,syscoin/syscoin,domob1812/crowncoin,Crowndev/crowncoin,Crowndev/crowncoin,domob1812/crowncoin,Crowndev/crowncoin,syscoin/syscoin,Crowndev/crowncoin,Infernoman/crowncoin,domob1812/crowncoin,syscoin/syscoin,domob1812/crowncoin,Crowndev/crowncoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin
|
db769b79cf99203a93c441bcfe98c993aa0ca3b5
|
Sources/Cinput/input.c
|
Sources/Cinput/input.c
|
#include "input.h"
inline int input_event_get_sec(struct input_event event) {
return event.input_event_sec;
}
inline int input_event_get_usec(struct input_event event) {
return event.input_event_usec;
}
|
#include "input.h"
inline int input_event_get_sec(struct input_event event) {
#ifdef input_event_sec
return event.input_event_sec;
#else
return event.time.tv_sec
#endif
}
inline int input_event_get_usec(struct input_event event) {
#ifdef input_event_usec
return event.input_event_usec;
#else
return event.time.tv_usec
#endif
}
|
Fix compilation on older linux kernels
|
Fix compilation on older linux kernels
|
C
|
apache-2.0
|
sersoft-gmbh/DeviceInput,sersoft-gmbh/DeviceInput
|
84b255f9771bd80788195c5b702761ee42ca5f2f
|
bindings/ocaml/transforms/utils/transform_utils_ocaml.c
|
bindings/ocaml/transforms/utils/transform_utils_ocaml.c
|
/*===-- vectorize_ocaml.c - LLVM OCaml Glue ---------------------*- C++ -*-===*\
|* *|
|* The LLVM Compiler Infrastructure *|
|* *|
|* This file is distributed under the University of Illinois Open Source *|
|* License. See LICENSE.TXT for details. *|
|* *|
|*===----------------------------------------------------------------------===*|
|* *|
|* This file glues LLVM's OCaml interface to its C interface. These functions *|
|* are by and large transparent wrappers to the corresponding C functions. *|
|* *|
|* Note that these functions intentionally take liberties with the CAMLparamX *|
|* macros, since most of the parameters are not GC heap objects. *|
|* *|
\*===----------------------------------------------------------------------===*/
#include "llvm-c/Core.h"
#include "caml/mlvalues.h"
#include "caml/misc.h"
/*
* Do not move directly into external. This function is here to pull in
* -lLLVMTransformUtils, which would otherwise be not linked on static builds,
* as ld can't see the reference from OCaml code.
*/
/* llmodule -> llmodule */
CAMLprim LLVMModuleRef llvm_clone_module(LLVMModuleRef M) {
return LLVMCloneModule(M);
}
|
/*===-- transform_utils_ocaml.c - LLVM OCaml Glue ---------------*- C++ -*-===*\
|* *|
|* The LLVM Compiler Infrastructure *|
|* *|
|* This file is distributed under the University of Illinois Open Source *|
|* License. See LICENSE.TXT for details. *|
|* *|
|*===----------------------------------------------------------------------===*|
|* *|
|* This file glues LLVM's OCaml interface to its C interface. These functions *|
|* are by and large transparent wrappers to the corresponding C functions. *|
|* *|
|* Note that these functions intentionally take liberties with the CAMLparamX *|
|* macros, since most of the parameters are not GC heap objects. *|
|* *|
\*===----------------------------------------------------------------------===*/
#include "llvm-c/Core.h"
#include "caml/mlvalues.h"
#include "caml/misc.h"
/*
* Do not move directly into external. This function is here to pull in
* -lLLVMTransformUtils, which would otherwise be not linked on static builds,
* as ld can't see the reference from OCaml code.
*/
/* llmodule -> llmodule */
CAMLprim LLVMModuleRef llvm_clone_module(LLVMModuleRef M) {
return LLVMCloneModule(M);
}
|
Fix copy paste error in file header
|
[NFC][OCaml] Fix copy paste error in file header
Summary: Just copypasta resulting in the wrong file name in the header.
Reviewers: whitequark
Reviewed By: whitequark
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52215
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@342437 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm
|
0ac74df81c5ca4213f8d7acbc0fb30c64cde06d3
|
chrome/browser/extensions/extension_management_api_constants.h
|
chrome/browser/extensions/extension_management_api_constants.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 CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_
#pragma once
namespace extension_management_api_constants {
// Keys used for incoming arguments and outgoing JSON data.
extern const char kAppLaunchUrlKey[];
extern const char kDescriptionKey[];
extern const char kEnabledKey[];
extern const char kDisabledReasonKey[];
extern const char kHomepageUrlKey[];
extern const char kHostPermissionsKey[];
extern const char kIconsKey[];
extern const char kIdKey[];
extern const char kIsAppKey[];
extern const char kNameKey[];
extern const char kOfflineEnabledKey[];
extern const char kOptionsUrlKey[];
extern const char kPermissionsKey[];
extern const char kMayDisableKey[];
extern const char kSizeKey[];
extern const char kUpdateUrlKey[];
extern const char kUrlKey[];
extern const char kVersionKey[];
// Values for outgoing JSON data.
extern const char kDisabledReasonPermissionsIncrease[];
extern const char kDisabledReasonUnknown[];
// Error messages.
extern const char kExtensionCreateError[];
extern const char kGestureNeededForEscalationError[];
extern const char kManifestParseError[];
extern const char kNoExtensionError[];
extern const char kNotAnAppError[];
extern const char kUserCantDisableError[];
extern const char kUserDidNotReEnableError[];
} // namespace extension_management_api_constants
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_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 CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_
#pragma once
namespace extension_management_api_constants {
// Keys used for incoming arguments and outgoing JSON data.
extern const char kAppLaunchUrlKey[];
extern const char kDisabledReasonKey[];
extern const char kHostPermissionsKey[];
extern const char kIconsKey[];
extern const char kIsAppKey[];
extern const char kPermissionsKey[];
extern const char kSizeKey[];
extern const char kUpdateUrlKey[];
extern const char kUrlKey[];
// Values for outgoing JSON data.
extern const char kDisabledReasonPermissionsIncrease[];
extern const char kDisabledReasonUnknown[];
// Error messages.
extern const char kExtensionCreateError[];
extern const char kGestureNeededForEscalationError[];
extern const char kManifestParseError[];
extern const char kNoExtensionError[];
extern const char kNotAnAppError[];
extern const char kUserCantDisableError[];
extern const char kUserDidNotReEnableError[];
} // namespace extension_management_api_constants
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_
|
Remove leftover constant declarations accidentally left behind by a previous patch.
|
Remove leftover constant declarations accidentally left behind by a previous patch.
BUG=119692
TEST=compile succeeds
Review URL: https://chromiumcodereview.appspot.com/9903017
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@129799 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
adobe/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,ropik/chromium,ropik/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,ropik/chromium
|
7343eabc6b4054b7ca2f4455361d5f891f482626
|
test/Driver/metadata-with-dots.c
|
test/Driver/metadata-with-dots.c
|
// REQUIRES: shell
// RUN: mkdir -p out.dir
// RUN: cat %s > out.dir/test.c
// RUN: %clang -E -MMD %s -o out.dir/test
// RUN: test ! -f %out.d
// RUN: test -f out.dir/test.d
// RUN: rm -rf out.dir/test.d out.dir/ out.d
int main (void)
{
return 0;
}
|
// REQUIRES: shell
// RUN: mkdir -p %t/out.dir
// RUN: cat %s > %t/out.dir/test.c
// RUN: %clang -E -MMD %s -o %t/out.dir/test
// RUN: test ! -f %out.d
// RUN: test -f %t/out.dir/test.d
// RUN: rm -rf %t/out.dir/test.d %t/out.dir/ out.d
int main (void)
{
return 0;
}
|
Fix test to use %t for newly created files.
|
Fix test to use %t for newly created files.
This is both for consistency with other `mkdir`s in tests, and
fixing permission issues with the non-temporary cwd during testing (they
are not always writable).
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@371897 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
e9568c12ccd1390854b4a700dcfaaa2cbf342e91
|
cpp/codearea.h
|
cpp/codearea.h
|
#ifndef LOCATION_OPENLOCATIONCODE_CODEAREA_H_
#define LOCATION_OPENLOCATIONCODE_CODEAREA_H_
#include <cstdlib>
namespace openlocationcode {
struct LatLng {
double latitude;
double longitude;
};
class CodeArea {
public:
CodeArea(double latitude_lo, double longitude_lo, double latitude_hi,
double longitude_hi, size_t code_length);
double GetLatitudeLo() const;
double GetLongitudeLo() const;
double GetLatitudeHi() const;
double GetLongitudeHi() const;
size_t GetCodeLength() const;
LatLng GetCenter() const;
private:
double latitude_lo_;
double longitude_lo_;
double latitude_hi_;
double longitude_hi_;
size_t code_length_;
};
} // namespace openlocationcode
#endif // LOCATION_OPENLOCATIONCODE_CODEAREA_H_
|
#ifndef LOCATION_OPENLOCATIONCODE_CODEAREA_H_
#define LOCATION_OPENLOCATIONCODE_CODEAREA_H_
#include <cstdlib>
namespace openlocationcode {
struct LatLng {
double latitude;
double longitude;
};
class CodeArea {
public:
CodeArea(double latitude_lo, double longitude_lo, double latitude_hi,
double longitude_hi, size_t code_length);
double GetLatitudeLo() const;
double GetLongitudeLo() const;
double GetLatitudeHi() const;
double GetLongitudeHi() const;
size_t GetCodeLength() const;
LatLng GetCenter() const;
private:
double latitude_lo_;
double longitude_lo_;
double latitude_hi_;
double longitude_hi_;
size_t code_length_;
};
} // namespace openlocationcode
#endif // LOCATION_OPENLOCATIONCODE_CODEAREA_H_
|
Add newline to remove compiler warning.
|
Add newline to remove compiler warning.
As some projects treat warnings as errors.
|
C
|
apache-2.0
|
bocops/open-location-code,google/open-location-code,google/open-location-code,zongweil/open-location-code,zongweil/open-location-code,bocops/open-location-code,bocops/open-location-code,zongweil/open-location-code,google/open-location-code,google/open-location-code,bocops/open-location-code,bocops/open-location-code,google/open-location-code,zongweil/open-location-code,bocops/open-location-code,google/open-location-code,zongweil/open-location-code,bocops/open-location-code,bocops/open-location-code,bocops/open-location-code,google/open-location-code,zongweil/open-location-code,google/open-location-code,google/open-location-code,zongweil/open-location-code,google/open-location-code,zongweil/open-location-code,zongweil/open-location-code,google/open-location-code,zongweil/open-location-code,bocops/open-location-code,bocops/open-location-code,zongweil/open-location-code
|
4b87142aba52c76ff9ed7c9c2fe0067bd935a2f4
|
test/CodeGen/x86_64-arguments.c
|
test/CodeGen/x86_64-arguments.c
|
// RUN: clang -triple x86_64-unknown-unknown -emit-llvm -o %t %s &&
// RUN: grep 'define signext i8 @f0()' %t &&
// RUN: grep 'define signext i16 @f1()' %t &&
// RUN: grep 'define i32 @f2()' %t &&
// RUN: grep 'define float @f3()' %t &&
// RUN: grep 'define double @f4()' %t &&
// RUN: grep 'define x86_fp80 @f5()' %t &&
// RUN: grep 'define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8\* %a4)' %t &&
// RUN: grep 'define void @f7(i32 %a0)' %t
char f0(void) {
}
short f1(void) {
}
int f2(void) {
}
float f3(void) {
}
double f4(void) {
}
long double f5(void) {
}
void f6(char a0, short a1, int a2, long long a3, void *a4) {
}
typedef enum { A, B, C } E;
void f7(E a0) {
}
|
// RUN: clang -triple x86_64-unknown-unknown -emit-llvm -o %t %s &&
// RUN: grep 'define signext i8 @f0()' %t &&
// RUN: grep 'define signext i16 @f1()' %t &&
// RUN: grep 'define i32 @f2()' %t &&
// RUN: grep 'define float @f3()' %t &&
// RUN: grep 'define double @f4()' %t &&
// RUN: grep 'define x86_fp80 @f5()' %t &&
// RUN: grep 'define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8\* %a4)' %t &&
// RUN: grep 'define void @f7(i32 %a0)' %t
char f0(void) {
}
short f1(void) {
}
int f2(void) {
}
float f3(void) {
}
double f4(void) {
}
long double f5(void) {
}
void f6(char a0, short a1, int a2, long long a3, void *a4) {
}
typedef enum { A, B, C } E;
void f7(E a0) {
}
|
Add end of line at end.
|
Add end of line at end.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@65557 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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
a89c5c9841242970d7ade4f239397ea4131b8646
|
libutil/include/xsys.h
|
libutil/include/xsys.h
|
#if !defined(XV6_USER)
#include <sys/wait.h>
#define xfork() fork()
static inline void xwait()
{
int status;
if (wait(&status) < 0)
edie("wait");
if (!WIFEXITED(status))
die("bad status %u", status);
}
#define mtenable(x) do { } while(0)
#define mtenable_type(x, y) do { } while (0)
#define mtdisable(x) do { } while(0)
#define xpthread_join(tid) pthread_join(tid, nullptr);
#define xthread_create(ptr, x, fn, arg) \
pthread_create((ptr), 0, (fn), (arg))
#else // Must be xv6
#define xfork() fork(0)
#define xwait() wait(-1)
#define xpthread_join(tid) wait(tid)
#endif
|
#pragma once
#include "libutil.h"
#if !defined(XV6_USER)
#include <sys/wait.h>
#define xfork() fork()
static inline int xwait()
{
int status;
if (wait(&status) < 0)
edie("wait");
if (!WIFEXITED(status))
die("bad status %u", status);
return WEXITSTATUS(status);
}
#define mtenable(x) do { } while(0)
#define mtenable_type(x, y) do { } while (0)
#define mtdisable(x) do { } while(0)
#define xpthread_join(tid) pthread_join(tid, nullptr);
#define xthread_create(ptr, x, fn, arg) \
pthread_create((ptr), 0, (fn), (arg))
#else // Must be xv6
extern "C" int wait(int);
#define xfork() fork(0)
static inline int xwait()
{
if (wait(-1) < 0)
edie("wait");
return 0;
}
#define xpthread_join(tid) wait(tid)
#endif
|
Make xwait return exit status
|
libutil: Make xwait return exit status
Fake a 0 status for xv6.
|
C
|
mit
|
bowlofstew/sv6,bowlofstew/sv6,aclements/sv6,bowlofstew/sv6,aclements/sv6,bowlofstew/sv6,aclements/sv6,aclements/sv6,bowlofstew/sv6,aclements/sv6
|
cc7f863707262a74a3eab35efaac9d3e0e39aa72
|
common/flatpak-utils-base-private.h
|
common/flatpak-utils-base-private.h
|
/*
* Copyright © 2019 Red Hat, Inc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Authors:
* Alexander Larsson <alexl@redhat.com>
*/
#ifndef __FLATPAK_UTILS_BASE_H__
#define __FLATPAK_UTILS_BASE_H__
#include <glib.h>
char *flatpak_get_timezone (void);
char * flatpak_readlink (const char *path,
GError **error);
char * flatpak_resolve_link (const char *path,
GError **error);
char * flatpak_canonicalize_filename (const char *path);
void flatpak_close_fds_workaround (int start_fd);
#endif /* __FLATPAK_UTILS_BASE_H__ */
|
/*
* Copyright © 2019 Red Hat, Inc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Authors:
* Alexander Larsson <alexl@redhat.com>
*/
#ifndef __FLATPAK_UTILS_BASE_H__
#define __FLATPAK_UTILS_BASE_H__
#include <glib.h>
#include <gio/gio.h>
#ifndef G_DBUS_METHOD_INVOCATION_HANDLED
# define G_DBUS_METHOD_INVOCATION_HANDLED TRUE
# define G_DBUS_METHOD_INVOCATION_UNHANDLED FALSE
#endif
char *flatpak_get_timezone (void);
char * flatpak_readlink (const char *path,
GError **error);
char * flatpak_resolve_link (const char *path,
GError **error);
char * flatpak_canonicalize_filename (const char *path);
void flatpak_close_fds_workaround (int start_fd);
#endif /* __FLATPAK_UTILS_BASE_H__ */
|
Add a backport of G_DBUS_METHOD_INVOCATION_HANDLED
|
common: Add a backport of G_DBUS_METHOD_INVOCATION_HANDLED
This is syntactic sugar added in GLib 2.67.0, which makes it more clearly
correct when we return TRUE after a GDBus error.
Signed-off-by: Simon McVittie <0e1aea601907c1a85c2dc96e5ea37e23c58d2e9b@collabora.com>
|
C
|
lgpl-2.1
|
flatpak/flatpak,flatpak/flatpak,flatpak/flatpak,flatpak/flatpak,flatpak/flatpak
|
31810dca7c6aec8eaaaf4e690f24d126c7ac917c
|
src/system/sys_stats.h
|
src/system/sys_stats.h
|
#ifndef SYSSTATS_H
#define SYSSTATS_H
#include <stdbool.h>
#include <ncurses.h>
#include <sys/timerfd.h>
#include "../util/file_utils.h"
#define MAXTOT 16
#define BASE 1024
#define MAXPIDS "/proc/sys/kernel/pid_max"
#define MEMFREE "MemFree:"
#define SECS 60
#define TIME_READ_DEFAULT 0
#define SYS_TIMER_EXPIRED_SEC 0
#define SYS_TIMER_EXPIRED_NSEC 0
#define SYS_TIMER_LENGTH 1
#define PTY_BUFFER_SZ 64
#define NRPTYS "/proc/sys/kernel/pty/nr"
typedef struct {
char *fstype;
uid_t euid;
int max_pids;
long memtotal;
char **current_pids;
} sysaux;
void build_sys_info(WINDOW *system_window, char *fstype);
char *mem_avail(unsigned long memory, unsigned long base);
void current_uptime(WINDOW *system_window, unsigned long seconds, int y, int x);
int nr_ptys(void);
bool is_sysfield_timer_expired(int sys_timer_fd);
int set_sys_timer(struct itimerspec *sys_timer);
int max_pids(void);
#endif
|
#ifndef SYSSTATS_H
#define SYSSTATS_H
#include <stdbool.h>
#include <ncurses.h>
#include <sys/timerfd.h>
#include "../util/file_utils.h"
#define MAXTOT 16
#define BASE 1024
#define MAXPIDS "/proc/sys/kernel/pid_max"
#define MEMFREE "MemAvailable:"
#define SECS 60
#define TIME_READ_DEFAULT 0
#define SYS_TIMER_EXPIRED_SEC 0
#define SYS_TIMER_EXPIRED_NSEC 0
#define SYS_TIMER_LENGTH 1
#define PTY_BUFFER_SZ 64
#define NRPTYS "/proc/sys/kernel/pty/nr"
typedef struct {
char *fstype;
uid_t euid;
int max_pids;
long memtotal;
char **current_pids;
} sysaux;
void build_sys_info(WINDOW *system_window, char *fstype);
char *mem_avail(unsigned long memory, unsigned long base);
void current_uptime(WINDOW *system_window, unsigned long seconds, int y, int x);
int nr_ptys(void);
bool is_sysfield_timer_expired(int sys_timer_fd);
int set_sys_timer(struct itimerspec *sys_timer);
int max_pids(void);
#endif
|
Use MemAvailable for "free mem"
|
Use MemAvailable for "free mem"
|
C
|
mit
|
tijko/dashboard
|
9bd3e9df43b18b917c5510f1ce113e0000008b65
|
webvtt.h
|
webvtt.h
|
/* WebVTT parser
Copyright 2011 Mozilla Foundation
*/
#ifndef _WEBVTT_H_
#define _WEBVTT_H_
/* webvtt files are a sequence of cues
each cue has a start and end time for presentation
and some text content (which my be marked up)
there may be other attributes, but we ignore them
we store these in a linked list */
struct webvtt_cue {
char *text; /** text value of the cue */
long start, end; /** timestamps in milliseconds */
struct cue *next; /** pointer to the next cue */
};
typedef struct webvtt_cue webvtt_cue;
/* context structure for our parser */
typedef struct webvtt_parser webvtt_parser;
/* allocate and initialize a parser context */
webvtt_parser *webvtt_parse_new(void);
/* shut down and release a parser context */
void webvtt_parse_free(webvtt_parser *ctx);
/* read a webvtt file from an open file */
struct webvtt_cue *
webvtt_parse_file(webvtt_parser *ctx, FILE *in);
/* read a webvtt file from a named file */
struct webvtt_cue *
webvtt_parse_filename(webvtt_parser *ctx, const char *filename);
#endif /* _WEBVTT_H_ */
|
/* WebVTT parser
Copyright 2011 Mozilla Foundation
*/
#ifndef _WEBVTT_H_
#define _WEBVTT_H_
/* webvtt files are a sequence of cues
each cue has a start and end time for presentation
and some text content (which my be marked up)
there may be other attributes, but we ignore them
we store these in a linked list */
typedef struct webvtt_cue webvtt_cue;
struct webvtt_cue {
char *text; /** text value of the cue */
long start, end; /** timestamps in milliseconds */
webvtt_cue *next; /** pointer to the next cue */
};
/* context structure for our parser */
typedef struct webvtt_parser webvtt_parser;
/* allocate and initialize a parser context */
webvtt_parser *webvtt_parse_new(void);
/* shut down and release a parser context */
void webvtt_parse_free(webvtt_parser *ctx);
/* read a webvtt file from an open file */
struct webvtt_cue *
webvtt_parse_file(webvtt_parser *ctx, FILE *in);
/* read a webvtt file from a named file */
struct webvtt_cue *
webvtt_parse_filename(webvtt_parser *ctx, const char *filename);
#endif /* _WEBVTT_H_ */
|
Use the correct type for the linked list pointer.
|
Use the correct type for the linked list pointer.
|
C
|
bsd-2-clause
|
mafidchao/webvtt
|
875a794dd1d9c3e183b456b8fe826c04874bbf55
|
Classes/YTConnector.h
|
Classes/YTConnector.h
|
//
// YTConnector.h
// AKYouTube
//
// Created by Anton Pomozov on 10.09.13.
// Copyright (c) 2013 Akademon Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@class YTConnector;
@protocol YTLoginViewControllerInterface <NSObject>
@property (nonatomic, strong, readonly) UIWebView *webView;
@property (nonatomic, assign) BOOL shouldPresentCloseButton;
@property (nonatomic, strong) UIImage *closeButtonImageName;
@end
@protocol YTConnectorDelegate <NSObject>
- (void)presentLoginViewControler:(UIViewController<YTLoginViewControllerInterface> *)loginViewController;
- (void)connectionEstablished;
- (void)connectionDidFailWithError:(NSError *)error;
- (void)appDidFailAuthorize;
- (void)userRejectedApp;
@end
@interface YTConnector : NSObject
@property (nonatomic, weak) id<YTConnectorDelegate> delegate;
+ (YTConnector *)sharedInstance;
- (void)connectWithClientId:(NSString *)clientId andClientSecret:(NSString *)clientSecret;
- (void)authorizeAppWithScopesList:(NSString *)scopesList
inLoginViewController:(UIViewController<YTLoginViewControllerInterface> *)loginViewController;
@end
|
//
// YTConnector.h
// AKYouTube
//
// Created by Anton Pomozov on 10.09.13.
// Copyright (c) 2013 Akademon Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@class YTConnector;
@protocol YTLoginViewControllerInterface <NSObject>
@property (nonatomic, strong, readonly) UIWebView *webView;
@optional
@property (nonatomic, assign) BOOL shouldPresentCloseButton;
@property (nonatomic, strong) UIImage *closeButtonImageName;
@end
@protocol YTConnectorDelegate <NSObject>
- (void)presentLoginViewControler:(UIViewController<YTLoginViewControllerInterface> *)loginViewController;
- (void)connectionEstablished;
- (void)connectionDidFailWithError:(NSError *)error;
- (void)appDidFailAuthorize;
- (void)userRejectedApp;
@end
@interface YTConnector : NSObject
@property (nonatomic, weak) id<YTConnectorDelegate> delegate;
+ (YTConnector *)sharedInstance;
- (void)connectWithClientId:(NSString *)clientId andClientSecret:(NSString *)clientSecret;
- (void)authorizeAppWithScopesList:(NSString *)scopesList
inLoginViewController:(UIViewController<YTLoginViewControllerInterface> *)loginViewController;
@end
|
Make close button properties optional.
|
[Mod]: Make close button properties optional.
|
C
|
mit
|
pomozoff/AKYouTube,pomozoff/AKYouTube,pomozoff/AKYouTube
|
9bcc53dba29ec430925dc6cd9676ad46ddf72461
|
FunctionDeclaration.h
|
FunctionDeclaration.h
|
#ifndef FUNCTION_DECLARATION_H
#define FUNCTION_DECLARATION_H
#include "AstNode.h"
namespace liquid {
class FunctionDeclaration : public Statement
{
friend class ClassDeclaration;
Identifier* type;
Identifier* id;
VariableList* arguments;
Block* block;
YYLTYPE location;
public:
FunctionDeclaration( Identifier* type, Identifier* id, VariableList* arguments, Block* block, YYLTYPE loc )
: type( type ), id( id ), arguments( arguments ), block( block ), location( loc )
{}
FunctionDeclaration( Identifier* id, VariableList* arguments, Block* block, YYLTYPE loc )
: type( new Identifier( "var", location ) ), id( id ), arguments( arguments ), block( block ), location( loc )
{}
virtual ~FunctionDeclaration();
virtual llvm::Value* codeGen( CodeGenContext& context );
NodeType getType() { return NodeType::function; }
Identifier* getId() { return id; }
virtual std::string toString();
virtual void Accept( Visitor& v ) { v.VisitFunctionDeclaration( this ); }
virtual VariableList* getParameter() { return arguments; }
virtual Block* getBody() { return block; }
virtual Identifier* getRetType() { return type; }
YYLTYPE getlocation() { return location; }
};
}
#endif // FUNCTION_DECLARATION_H
|
#ifndef FUNCTION_DECLARATION_H
#define FUNCTION_DECLARATION_H
#include "AstNode.h"
namespace liquid {
class FunctionDeclaration : public Statement
{
friend class ClassDeclaration;
Identifier* type;
Identifier* id;
VariableList* arguments;
Block* block;
YYLTYPE location;
public:
FunctionDeclaration( Identifier* type, Identifier* id, VariableList* arguments, Block* block, YYLTYPE loc )
: type( type ), id( id ), arguments( arguments ), block( block ), location( loc )
{}
FunctionDeclaration( Identifier* id, VariableList* arguments, Block* block, YYLTYPE loc )
: type(new Identifier("var", loc)), id(id), arguments(arguments), block(block), location(loc)
{}
virtual ~FunctionDeclaration();
virtual llvm::Value* codeGen( CodeGenContext& context );
NodeType getType() { return NodeType::function; }
Identifier* getId() { return id; }
virtual std::string toString();
virtual void Accept( Visitor& v ) { v.VisitFunctionDeclaration( this ); }
virtual VariableList* getParameter() { return arguments; }
virtual Block* getBody() { return block; }
virtual Identifier* getRetType() { return type; }
YYLTYPE getlocation() { return location; }
};
}
#endif // FUNCTION_DECLARATION_H
|
Fix crash wrong order of member initialization.
|
Fix crash wrong order of member initialization.
|
C
|
mit
|
xkbeyer/liquid,xkbeyer/liquid
|
6ed183cf0022fdc65b0bfcd883dd3a9c4e231a19
|
library/mps/common.h
|
library/mps/common.h
|
/*
* Copyright The Mbed TLS Contributors
* 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)
*/
/**
* \file common.h
*
* \brief Common functions and macros used by MPS
*/
#ifndef MBEDTLS_MPS_COMMON_H
#define MBEDTLS_MPS_COMMON_H
/* To be populated */
#endif /* MBEDTLS_MPS_COMMON_H */
|
/*
* Copyright The Mbed TLS Contributors
* 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)
*/
/**
* \file common.h
*
* \brief Common functions and macros used by MPS
*/
#ifndef MBEDTLS_MPS_COMMON_H
#define MBEDTLS_MPS_COMMON_H
/**
* \name SECTION: MPS Configuration
*
* \{
*/
/*! This flag enables/disables assertions on the internal state of MPS.
*
* Assertions are sanity checks that should never trigger when MPS
* is used within the bounds of its API and preconditions.
*
* Enabling this increases security by limiting the scope of
* potential bugs, but comes at the cost of increased code size.
*
* Note: So far, there is no guiding principle as to what
* expected conditions merit an assertion, and which don't.
*
* Comment this to disable assertions.
*/
#define MBEDTLS_MPS_ENABLE_ASSERTIONS
/* \} name SECTION: MPS Configuration */
#endif /* MBEDTLS_MPS_COMMON_H */
|
Add MPS compile time option for enabling/disabling assertions
|
Add MPS compile time option for enabling/disabling assertions
This commit adds the compile-time option MBEDTLS_MPS_ENABLE_ASSERTIONS
which controls the presence of runtime assertions in MPS code.
See the documentation in the header for more information.
Signed-off-by: Hanno Becker <4d488caff78d6184f59bbe6e137e34d4606b9fe8@arm.com>
|
C
|
apache-2.0
|
Mbed-TLS/mbedtls,Mbed-TLS/mbedtls,NXPmicro/mbedtls,ARMmbed/mbedtls,ARMmbed/mbedtls,Mbed-TLS/mbedtls,ARMmbed/mbedtls,ARMmbed/mbedtls,NXPmicro/mbedtls,NXPmicro/mbedtls,NXPmicro/mbedtls,Mbed-TLS/mbedtls
|
ad33daeea09dc2e346031093d6b4d4e9d4615de0
|
src/qpdf/utils.h
|
src/qpdf/utils.h
|
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright (C) 2017, James R. Barlow (https://github.com/jbarlow83/)
*/
#pragma once
#include "pikepdf.h"
py::object fspath(py::object filename);
FILE *portable_fopen(py::object filename, const char* mode);
void portable_unlink(py::object filename);
|
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright (C) 2017, James R. Barlow (https://github.com/jbarlow83/)
*/
#pragma once
#include "pikepdf.h"
py::object fspath(py::object filename);
FILE *portable_fopen(py::object filename, const char* mode);
|
Remove signature of deleted function
|
Remove signature of deleted function
|
C
|
mpl-2.0
|
pikepdf/pikepdf,pikepdf/pikepdf,pikepdf/pikepdf
|
37f29b3dab6e53443f3f8b0cc37b40d821e97440
|
src/tbd/symbol.h
|
src/tbd/symbol.h
|
//
// src/tbd/symbol.h
// tbd
//
// Created by inoahdev on 4/24/17.
// Copyright © 2017 inoahdev. All rights reserved.
//
#pragma once
#include <mach-o/arch.h>
#include <string>
#include "flags.h"
class symbol {
public:
explicit symbol(const char *string, bool weak, int flags_length) noexcept;
void add_architecture(int number) noexcept;
inline const bool weak() const noexcept { return weak_; }
inline const char *string() const noexcept { return string_; }
inline const flags &flags() const noexcept { return flags_; }
inline const bool operator==(const char *string) const noexcept { return strcmp(string_, string) == 0; }
inline const bool operator==(const symbol &symbol) const noexcept { return strcmp(string_, symbol.string_) == 0; }
inline const bool operator!=(const char *string) const noexcept { return strcmp(string_, string) != 0; }
inline const bool operator!=(const symbol &symbol) const noexcept { return strcmp(string_, symbol.string_) != 0; }
private:
const char *string_;
bool weak_;
class flags flags_;
};
|
//
// src/tbd/symbol.h
// tbd
//
// Created by inoahdev on 4/24/17.
// Copyright © 2017 inoahdev. All rights reserved.
//
#pragma once
#include <string>
#include "flags.h"
class symbol {
public:
explicit symbol(const char *string, bool weak, int flags_length) noexcept;
void add_architecture(int number) noexcept;
inline const bool weak() const noexcept { return weak_; }
inline const char *string() const noexcept { return string_; }
inline const flags &flags() const noexcept { return flags_; }
inline const bool operator==(const char *string) const noexcept { return strcmp(string_, string) == 0; }
inline const bool operator==(const symbol &symbol) const noexcept { return strcmp(string_, symbol.string_) == 0; }
inline const bool operator!=(const char *string) const noexcept { return strcmp(string_, string) != 0; }
inline const bool operator!=(const symbol &symbol) const noexcept { return strcmp(string_, symbol.string_) != 0; }
private:
const char *string_;
bool weak_;
class flags flags_;
};
|
Remove unnecessary import for 'mach-o/arch.h'
|
Remove unnecessary import for 'mach-o/arch.h'
|
C
|
mit
|
inoahdev/tbd,inoahdev/tbd
|
f0e863ead86a3ea0edb502d7c21bb1fc872712c5
|
include/sauce/internal/implicit_bindings.h
|
include/sauce/internal/implicit_bindings.h
|
#ifndef SAUCE_SAUCE_INTERNAL_IMPLICIT_BINDINGS_H_
#define SAUCE_SAUCE_INTERNAL_IMPLICIT_BINDINGS_H_
// #include <sauce/internal/bindings/all.h>
namespace sauce {
namespace internal {
/**
* Attempts to supply a Binding to Bindings when none is found for a dependency.
*/
struct ImplicitBindings {};
}
namespace i = ::sauce::internal;
}
#endif // SAUCE_SAUCE_INTERNAL_IMPLICIT_BINDINGS_H_
|
#ifndef SAUCE_SAUCE_INTERNAL_IMPLICIT_BINDINGS_H_
#define SAUCE_SAUCE_INTERNAL_IMPLICIT_BINDINGS_H_
#include <sauce/internal/bindings/all.h>
namespace sauce {
namespace internal {
/**
* Attempts to supply a Binding to Bindings when none is found for a dependency.
*/
struct ImplicitBindings {};
}
namespace i = ::sauce::internal;
}
#endif // SAUCE_SAUCE_INTERNAL_IMPLICIT_BINDINGS_H_
|
Enable including all bindings in implicit bindings
|
Enable including all bindings in implicit bindings
|
C
|
mit
|
phs/sauce,phs/sauce,phs/sauce,phs/sauce
|
e263b70f1126b4fdb1ade836aacd547ad0e3e3b2
|
extensions/ringopengl/ring_opengl21.c
|
extensions/ringopengl/ring_opengl21.c
|
#include "ring.h"
/*
OpenGL 2.1 Extension
Copyright (c) 2017 Mahmoud Fayed <msfclipper@yahoo.com>
*/
#include <GL/glew.h>
#include <GL/glut.h>
RING_API void ringlib_init(RingState *pRingState)
{
}
|
#include "ring.h"
/*
OpenGL 2.1 Extension
Copyright (c) 2017 Mahmoud Fayed <msfclipper@yahoo.com>
*/
#include <GL/glew.h>
#include <GL/glut.h>
RING_FUNC(ring_glAccum)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
glAccum( (GLenum ) (int) RING_API_GETNUMBER(1), (GLfloat ) RING_API_GETNUMBER(2));
}
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("glaccum",ring_glAccum);
}
|
Update RingOpenGL - Add Function (Source Code) : void glAccum(GLenum op,GLfloat value)
|
Update RingOpenGL - Add Function (Source Code) : void glAccum(GLenum op,GLfloat value)
|
C
|
mit
|
ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring
|
36b989cb6ffc12f7291e25bbb710e9a1d6e22203
|
src/Common/Version.h
|
src/Common/Version.h
|
#define MAJOR_VERSION 3
#define MINOR_VERSION 1
#define BUILD_VERSION 0
#define BUILD_REVISION 5172
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
#define REVISION_STRING MACRO_STRINGIFY(BUILD_REVISION)
#define VERSION_STRING MACRO_STRINGIFY(MAJOR_VERSION) "." MACRO_STRINGIFY(MINOR_VERSION) "." MACRO_STRINGIFY(BUILD_VERSION) "." MACRO_STRINGIFY(BUILD_REVISION)
|
#define MAJOR_VERSION 3
#define MINOR_VERSION 2
#define BUILD_VERSION 6
#define BUILD_REVISION 45159
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
#define REVISION_STRING MACRO_STRINGIFY(BUILD_REVISION)
#define VERSION_STRING MACRO_STRINGIFY(MAJOR_VERSION) "." MACRO_STRINGIFY(MINOR_VERSION) "." MACRO_STRINGIFY(BUILD_VERSION) "." MACRO_STRINGIFY(BUILD_REVISION)
|
Update the version number of release.
|
Update the version number of release.
|
C
|
apache-2.0
|
google/swiftshader,google/swiftshader,google/swiftshader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.