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
|
|---|---|---|---|---|---|---|---|---|---|
dd4a5df6e1e2b17a0f8963674bea6e94cc6c9b0e
|
tools/llvm-c-test/metadata.c
|
tools/llvm-c-test/metadata.c
|
/*===-- object.c - tool for testing libLLVM and llvm-c API ----------------===*\
|* *|
|* The LLVM Compiler Infrastructure *|
|* *|
|* This file is distributed under the University of Illinois Open Source *|
|* License. See LICENSE.TXT for details. *|
|* *|
|*===----------------------------------------------------------------------===*|
|* *|
|* This file implements the --add-named-metadata-operand and --set-metadata *|
|* commands in llvm-c-test. *|
|* *|
\*===----------------------------------------------------------------------===*/
#include "llvm-c-test.h"
#include "llvm-c/Core.h"
int add_named_metadata_operand(void) {
LLVMModuleRef m = LLVMModuleCreateWithName("Mod");
LLVMValueRef values[] = { LLVMConstInt(LLVMInt32Type(), 0, 0) };
// This used to trigger an assertion
LLVMAddNamedMetadataOperand(m, "name", LLVMMDNode(values, 1));
return 0;
}
int set_metadata(void) {
LLVMBuilderRef b = LLVMCreateBuilder();
LLVMValueRef values[] = { LLVMConstInt(LLVMInt32Type(), 0, 0) };
// This used to trigger an assertion
LLVMSetMetadata(
LLVMBuildRetVoid(b),
LLVMGetMDKindID("kind", 4),
LLVMMDNode(values, 1));
return 0;
}
|
/*===-- object.c - tool for testing libLLVM and llvm-c API ----------------===*\
|* *|
|* The LLVM Compiler Infrastructure *|
|* *|
|* This file is distributed under the University of Illinois Open Source *|
|* License. See LICENSE.TXT for details. *|
|* *|
|*===----------------------------------------------------------------------===*|
|* *|
|* This file implements the --add-named-metadata-operand and --set-metadata *|
|* commands in llvm-c-test. *|
|* *|
\*===----------------------------------------------------------------------===*/
#include "llvm-c-test.h"
#include "llvm-c/Core.h"
int add_named_metadata_operand(void) {
LLVMModuleRef m = LLVMModuleCreateWithName("Mod");
LLVMValueRef values[] = { LLVMConstInt(LLVMInt32Type(), 0, 0) };
// This used to trigger an assertion
LLVMAddNamedMetadataOperand(m, "name", LLVMMDNode(values, 1));
LLVMDisposeModule(m);
return 0;
}
int set_metadata(void) {
LLVMBuilderRef b = LLVMCreateBuilder();
LLVMValueRef values[] = { LLVMConstInt(LLVMInt32Type(), 0, 0) };
// This used to trigger an assertion
LLVMSetMetadata(
LLVMBuildRetVoid(b),
LLVMGetMDKindID("kind", 4),
LLVMMDNode(values, 1));
LLVMDisposeBuilder(b);
return 0;
}
|
Fix build breakage caused by memory leaks in llvm-c-test
|
Fix build breakage caused by memory leaks in llvm-c-test
I accidently introduced those in r227319.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@227339 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm
|
d8af9b16eff306c9720964e4fb89be81a7a31eec
|
src/base/file_unit.h
|
src/base/file_unit.h
|
#ifndef FILE_UNIT_H_
#define FILE_UNIT_H_
#include <string>
template <typename T>
class FileUnit
{
public:
std::string filename;
T *file;
FileUnit(std::string& filename);
virtual ~FileUnit();
};
#endif
|
#ifndef FILE_UNIT_H_
#define FILE_UNIT_H_
#include <string>
template <typename T>
class FileUnit
{
public:
FileUnit(std::string& filename);
virtual ~FileUnit();
private:
std::string filename;
T *file;
};
#endif
|
Change privacy to private for the filename and generic representation
|
Change privacy to private for the filename and generic representation
|
C
|
mit
|
stefanmirea/mangler,SilentControl/mangler
|
3f1086d456acca81f5ed6fed1a98d3af92a05bf0
|
src/imap/cmd-close.c
|
src/imap/cmd-close.c
|
/* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */
#include "common.h"
#include "commands.h"
#include "imap-expunge.h"
bool cmd_close(struct client_command_context *cmd)
{
struct client *client = cmd->client;
struct mailbox *mailbox = client->mailbox;
struct mail_storage *storage;
if (!client_verify_open_mailbox(cmd))
return TRUE;
storage = mailbox_get_storage(mailbox);
client->mailbox = NULL;
if (!imap_expunge(mailbox, NULL))
client_send_untagged_storage_error(client, storage);
if (mailbox_close(&mailbox) < 0)
client_send_untagged_storage_error(client, storage);
client_update_mailbox_flags(client, NULL);
client_send_tagline(cmd, "OK Close completed.");
return TRUE;
}
|
/* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */
#include "common.h"
#include "commands.h"
#include "imap-expunge.h"
bool cmd_close(struct client_command_context *cmd)
{
struct client *client = cmd->client;
struct mailbox *mailbox = client->mailbox;
struct mail_storage *storage;
if (!client_verify_open_mailbox(cmd))
return TRUE;
storage = mailbox_get_storage(mailbox);
client->mailbox = NULL;
if (!imap_expunge(mailbox, NULL))
client_send_untagged_storage_error(client, storage);
else if (mailbox_sync(mailbox, 0, 0, NULL) < 0)
client_send_untagged_storage_error(client, storage);
if (mailbox_close(&mailbox) < 0)
client_send_untagged_storage_error(client, storage);
client_update_mailbox_flags(client, NULL);
client_send_tagline(cmd, "OK Close completed.");
return TRUE;
}
|
Synchronize the mailbox after expunging messages to actually get them expunged.
|
CLOSE: Synchronize the mailbox after expunging messages to actually get them
expunged.
|
C
|
mit
|
Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot
|
156ca90ad0861b4ebe467b9ea67edc01b5d73d3d
|
Code/ContentfulDeliveryAPI.h
|
Code/ContentfulDeliveryAPI.h
|
//
// ContentfulDeliveryAPI.h
// ContentfulSDK
//
// Created by Boris Bügling on 04/03/14.
//
//
#import <Foundation/Foundation.h>
#import <ContentfulDeliveryAPI/CDAArray.h>
#import <ContentfulDeliveryAPI/CDAAsset.h>
#import <ContentfulDeliveryAPI/CDAClient.h>
#import <ContentfulDeliveryAPI/CDAConfiguration.h>
#import <ContentfulDeliveryAPI/CDAContentType.h>
#import <ContentfulDeliveryAPI/CDAEntry.h>
#import <ContentfulDeliveryAPI/CDAField.h>
#import <ContentfulDeliveryAPI/CDAPersistenceManager.h>
#import <ContentfulDeliveryAPI/CDARequest.h>
#import <ContentfulDeliveryAPI/CDAResponse.h>
#import <ContentfulDeliveryAPI/CDASpace.h>
#import <ContentfulDeliveryAPI/CDASyncedSpace.h>
#if TARGET_OS_IPHONE
#import <ContentfulDeliveryAPI/CDAEntriesViewController.h>
#import <ContentfulDeliveryAPI/CDAFieldsViewController.h>
#import <ContentfulDeliveryAPI/CDAMapViewController.h>
#import <ContentfulDeliveryAPI/CDAResourceCell.h>
#import <ContentfulDeliveryAPI/CDAResourcesCollectionViewController.h>
#import <ContentfulDeliveryAPI/CDAResourcesViewController.h>
#endif
extern NSString* const CDAErrorDomain;
|
//
// ContentfulDeliveryAPI.h
// ContentfulSDK
//
// Created by Boris Bügling on 04/03/14.
//
//
#import <Foundation/Foundation.h>
#import <ContentfulDeliveryAPI/CDAArray.h>
#import <ContentfulDeliveryAPI/CDAAsset.h>
#import <ContentfulDeliveryAPI/CDAClient.h>
#import <ContentfulDeliveryAPI/CDAConfiguration.h>
#import <ContentfulDeliveryAPI/CDAContentType.h>
#import <ContentfulDeliveryAPI/CDAEntry.h>
#import <ContentfulDeliveryAPI/CDAField.h>
#import <ContentfulDeliveryAPI/CDAPersistenceManager.h>
#import <ContentfulDeliveryAPI/CDARequest.h>
#import <ContentfulDeliveryAPI/CDAResponse.h>
#import <ContentfulDeliveryAPI/CDASpace.h>
#import <ContentfulDeliveryAPI/CDASyncedSpace.h>
#if TARGET_OS_IPHONE
#import <ContentfulDeliveryAPI/CDAEntriesViewController.h>
#import <ContentfulDeliveryAPI/CDAFieldsViewController.h>
#import <ContentfulDeliveryAPI/CDAMapViewController.h>
#import <ContentfulDeliveryAPI/CDAResourceCell.h>
#import <ContentfulDeliveryAPI/CDAResourcesCollectionViewController.h>
#import <ContentfulDeliveryAPI/CDAResourcesViewController.h>
#import <ContentfulDeliveryAPI/UIImageView+CDAAsset.h>
#endif
extern NSString* const CDAErrorDomain;
|
Include image view category in framework header.
|
Include image view category in framework header.
|
C
|
mit
|
contentful/contentful.objc,akfreas/contentful.objc,danieleggert/contentful.objc,akfreas/contentful.objc,davidmdavis/contentful.objc,contentful/contentful.objc,akfreas/contentful.objc,danieleggert/contentful.objc,davidmdavis/contentful.objc,contentful/contentful.objc,danieleggert/contentful.objc,davidmdavis/contentful.objc
|
1a6633da200909e9c71ba7a0c40eebe56746c3f5
|
drivers/scsi/qla4xxx/ql4_version.h
|
drivers/scsi/qla4xxx/ql4_version.h
|
/*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2006 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.01.00-k9"
|
/*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2006 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k1"
|
Update driver version to 5.02.00-k1
|
[SCSI] qla4xxx: Update driver version to 5.02.00-k1
Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com>
Signed-off-by: Ravi Anand <399b6871085291e2c1578e38a71f59e8d20fafc0@qlogic.com>
Reviewed-by: Mike Christie <6fe105eefab41990d7ec714c6c25ade3095cdb48@cs.wisc.edu>
Signed-off-by: James Bottomley <407b36959ca09543ccda8f8e06721c791bc53435@suse.de>
|
C
|
mit
|
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas
|
05b269d5b3f82a64efe9c8d7650803bc181af3a1
|
src/bf_alloc.c
|
src/bf_alloc.c
|
#include <bf_alloc.h>
#include <sys/mman.h>
uint8_t *allocate_executable_space(size_t size) {
uint8_t *memory = (uint8_t*) mmap(
NULL, /* No existing address. */
size, /* At LEAST this size. */
PROT_EXEC|PROT_WRITE, /* Writable and executable memory. */
MAP_PRIVATE|MAP_ANONYMOUS, /* An anonymous mapping; using private
mapping is most portable. */
-1, /* Using fd = -1 is most portable in
conjunction with MAP_ANONYMOUS. */
0 /* Irrelevant for MAP_ANONYMOUS. */
);
if (memory == MAP_FAILED) {
return NULL;
}
return memory;
}
/* TODO: fairly certain this will lead to a memory leak if the mapping is
* larger than the page size... */
bool free_executable_space(uint8_t *space) {
if (munmap(space, 1) == 0) {
return true;
}
return false;
}
|
#include <bf_alloc.h>
/* So that MAP_ANONYMOUS is available on glibc. */
#define _BSD_SOURCE
#include <sys/mman.h>
uint8_t *allocate_executable_space(size_t size) {
uint8_t *memory = (uint8_t*) mmap(
NULL, /* No existing address. */
size, /* At LEAST this size. */
PROT_EXEC|PROT_WRITE, /* Writable and executable memory. */
MAP_PRIVATE|MAP_ANONYMOUS, /* An anonymous mapping; using private
mapping is most portable. */
-1, /* Using fd = -1 is most portable in
conjunction with MAP_ANONYMOUS. */
0 /* Irrelevant for MAP_ANONYMOUS. */
);
if (memory == MAP_FAILED) {
return NULL;
}
return memory;
}
/* TODO: fairly certain this will lead to a memory leak if the mapping is
* larger than the page size... */
bool free_executable_space(uint8_t *space) {
if (munmap(space, 1) == 0) {
return true;
}
return false;
}
|
Add feature-test macro for MAP_ANONYMOUS.
|
Add feature-test macro for MAP_ANONYMOUS.
|
C
|
mit
|
eddieantonio/brainmuk,eddieantonio/brainmuk
|
02013988cb1406f3b557bf05603cc726cc1a1889
|
chrome/gpu/gpu_config.h
|
chrome/gpu/gpu_config.h
|
// Copyright (c) 2010 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_GPU_GPU_CONFIG_H_
#define CHROME_GPU_GPU_CONFIG_H_
// This file declares common preprocessor configuration for the GPU process.
#include "build/build_config.h"
#if defined(OS_LINUX) && !defined(ARCH_CPU_X86)
// Only define GLX support for Intel CPUs for now until we can get the
// proper dependencies and build setup for ARM.
#define GPU_USE_GLX
#endif
#endif // CHROME_GPU_GPU_CONFIG_H_
|
// Copyright (c) 2010 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_GPU_GPU_CONFIG_H_
#define CHROME_GPU_GPU_CONFIG_H_
// This file declares common preprocessor configuration for the GPU process.
#include "build/build_config.h"
#if defined(OS_LINUX) && defined(ARCH_CPU_X86)
// Only define GLX support for Intel CPUs for now until we can get the
// proper dependencies and build setup for ARM.
#define GPU_USE_GLX
#endif
#endif // CHROME_GPU_GPU_CONFIG_H_
|
Fix stupid error for Linux build.
|
Fix stupid error for Linux build.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/555096
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@37093 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,dednal/chromium.src,ltilve/chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,zcbenz/cefode-chromium,keishi/chromium,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,anirudhSK/chromium,markYoungH/chromium.src,rogerwang/chromium,dednal/chromium.src,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,dushu1203/chromium.src,robclark/chromium,chuan9/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,M4sse/chromium.src,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,zcbenz/cefode-chromium,hujiajie/pa-chromium,anirudhSK/chromium,dednal/chromium.src,Just-D/chromium-1,M4sse/chromium.src,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,hujiajie/pa-chromium,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,M4sse/chromium.src,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,ltilve/chromium,M4sse/chromium.src,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,Chilledheart/chromium,ChromiumWebApps/chromium,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,rogerwang/chromium,dushu1203/chromium.src,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,keishi/chromium,jaruba/chromium.src,Chilledheart/chromium,M4sse/chromium.src,keishi/chromium,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,Chilledheart/chromium,zcbenz/cefode-chromium,dednal/chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,dushu1203/chromium.src,patrickm/chromium.src,nacl-webkit/chrome_deps,littlstar/chromium.src,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,robclark/chromium,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,bright-sparks/chromium-spacewalk,dednal/chromium.src,bright-sparks/chromium-spacewalk,littlstar/chromium.src,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,keishi/chromium,hujiajie/pa-chromium,rogerwang/chromium,keishi/chromium,markYoungH/chromium.src,ondra-novak/chromium.src,rogerwang/chromium,pozdnyakov/chromium-crosswalk,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,patrickm/chromium.src,littlstar/chromium.src,jaruba/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,rogerwang/chromium,Jonekee/chromium.src,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,jaruba/chromium.src,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,krieger-od/nwjs_chromium.src,anirudhSK/chromium,patrickm/chromium.src,Just-D/chromium-1,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,anirudhSK/chromium,ondra-novak/chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,timopulkkinen/BubbleFish,keishi/chromium,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,M4sse/chromium.src,hujiajie/pa-chromium,zcbenz/cefode-chromium,Just-D/chromium-1,Fireblend/chromium-crosswalk,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,pozdnyakov/chromium-crosswalk,junmin-zhu/chromium-rivertrail,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,dednal/chromium.src,anirudhSK/chromium,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,robclark/chromium,Jonekee/chromium.src,robclark/chromium,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,Jonekee/chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,patrickm/chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk,anirudhSK/chromium,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,hujiajie/pa-chromium,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,chuan9/chromium-crosswalk,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,Jonekee/chromium.src,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,robclark/chromium,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,robclark/chromium,Jonekee/chromium.src,robclark/chromium,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,jaruba/chromium.src,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,Just-D/chromium-1,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,rogerwang/chromium,robclark/chromium,markYoungH/chromium.src,axinging/chromium-crosswalk,markYoungH/chromium.src,fujunwei/chromium-crosswalk,rogerwang/chromium,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,axinging/chromium-crosswalk,markYoungH/chromium.src,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,markYoungH/chromium.src,jaruba/chromium.src,ondra-novak/chromium.src,rogerwang/chromium,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,ltilve/chromium,anirudhSK/chromium,robclark/chromium,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,rogerwang/chromium,ondra-novak/chromium.src,dushu1203/chromium.src,rogerwang/chromium,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,robclark/chromium,junmin-zhu/chromium-rivertrail,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,jaruba/chromium.src,anirudhSK/chromium,keishi/chromium,timopulkkinen/BubbleFish,dednal/chromium.src,markYoungH/chromium.src,anirudhSK/chromium,Jonekee/chromium.src,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,ltilve/chromium,dushu1203/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,keishi/chromium,Chilledheart/chromium,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,keishi/chromium,Just-D/chromium-1,keishi/chromium,ChromiumWebApps/chromium,hujiajie/pa-chromium,patrickm/chromium.src,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,keishi/chromium,mogoweb/chromium-crosswalk,M4sse/chromium.src,ondra-novak/chromium.src,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,dednal/chromium.src,Fireblend/chromium-crosswalk,littlstar/chromium.src,ChromiumWebApps/chromium,M4sse/chromium.src,Jonekee/chromium.src,Fireblend/chromium-crosswalk,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,Chilledheart/chromium,hujiajie/pa-chromium,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,junmin-zhu/chromium-rivertrail
|
9aeeff90e1fab8a397365ff74c7d814355241a18
|
tests/auto/common/declarativewebutils.h
|
tests/auto/common/declarativewebutils.h
|
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd.
** Contact: Raine Makelainen <raine.makelainen@jolla.com>
**
****************************************************************************/
/* 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/. */
#ifndef DECLARATIVEWEBUTILS_H
#define DECLARATIVEWEBUTILS_H
#include <QObject>
#include <QString>
#include <QColor>
#include <qqml.h>
class DeclarativeWebUtils : public QObject
{
Q_OBJECT
Q_PROPERTY(QString homePage READ homePage NOTIFY homePageChanged FINAL)
public:
explicit DeclarativeWebUtils(QObject *parent = 0);
Q_INVOKABLE int getLightness(QColor color) const;
Q_INVOKABLE QString displayableUrl(QString fullUrl) const;
static DeclarativeWebUtils *instance();
QString homePage() const;
bool firstUseDone() const;
void setFirstUseDone(bool firstUseDone);
signals:
void homePageChanged();
private:
QString m_homePage;
bool m_firstUseDone;
};
QML_DECLARE_TYPE(DeclarativeWebUtils)
#endif
|
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd.
** Contact: Raine Makelainen <raine.makelainen@jolla.com>
**
****************************************************************************/
/* 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/. */
#ifndef DECLARATIVEWEBUTILS_H
#define DECLARATIVEWEBUTILS_H
#include <QObject>
#include <QString>
#include <QColor>
#include <qqml.h>
class DeclarativeWebUtils : public QObject
{
Q_OBJECT
Q_PROPERTY(QString homePage READ homePage NOTIFY homePageChanged FINAL)
Q_PROPERTY(bool firstUseDone READ firstUseDone NOTIFY firstUseDoneChanged FINAL)
public:
explicit DeclarativeWebUtils(QObject *parent = 0);
Q_INVOKABLE int getLightness(QColor color) const;
Q_INVOKABLE QString displayableUrl(QString fullUrl) const;
static DeclarativeWebUtils *instance();
QString homePage() const;
bool firstUseDone() const;
void setFirstUseDone(bool firstUseDone);
signals:
void homePageChanged();
void firstUseDoneChanged();
private:
QString m_homePage;
bool m_firstUseDone;
};
QML_DECLARE_TYPE(DeclarativeWebUtils)
#endif
|
Add missing property for WebUtils mock
|
[sailfish-browser] Add missing property for WebUtils mock
A warning was printed when running unit tests.
|
C
|
mpl-2.0
|
rojkov/sailfish-browser,alinelena/sailfish-browser,alinelena/sailfish-browser,alinelena/sailfish-browser,sailfishos/sailfish-browser,rojkov/sailfish-browser,sailfishos/sailfish-browser,sailfishos/sailfish-browser,rojkov/sailfish-browser,sailfishos/sailfish-browser,alinelena/sailfish-browser,sailfishos/sailfish-browser
|
492c63393fd3429b2c7f9da853241eea322514b1
|
Control/UIButton+PPiAwesome.h
|
Control/UIButton+PPiAwesome.h
|
//
// UIButton+PPiAwesome.h
// PPiAwesomeButton-Demo
//
// Created by Pedro Piñera Buendía on 19/08/13.
// Copyright (c) 2013 PPinera. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "NSString+FontAwesome.h"
#import <QuartzCore/QuartzCore.h>
#import <objc/runtime.h>
typedef enum {
IconPositionRight,
IconPositionLeft,
} IconPosition;
@interface UIButton (PPiAwesome)
+(UIButton*)buttonWithType:(UIButtonType)type text:(NSString*)text icon:(NSString*)icon textAttributes:(NSDictionary*)attributes andIconPosition:(IconPosition)position;
-(id)initWithFrame:(CGRect)frame text:(NSString*)text icon:(NSString*)icon textAttributes:(NSDictionary*)attributes andIconPosition:(IconPosition)position;
-(void)setTextAttributes:(NSDictionary*)attributes forUIControlState:(UIControlState)state;
-(void)setBackgroundColor:(UIColor*)color forUIControlState:(UIControlState)state;
-(void)setIconPosition:(IconPosition)position;
-(void)setButtonText:(NSString*)text;
-(void)setButtonIcon:(NSString*)icon;
-(void)setRadius:(CGFloat)radius;
-(void)setSeparation:(NSUInteger)separation;
@end
|
//
// UIButton+PPiAwesome.h
// PPiAwesomeButton-Demo
//
// Created by Pedro Piñera Buendía on 19/08/13.
// Copyright (c) 2013 PPinera. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "NSString+FontAwesome.h"
#import <QuartzCore/QuartzCore.h>
#import <objc/runtime.h>
typedef enum {
IconPositionRight,
IconPositionLeft,
} IconPosition;
@interface UIButton (PPiAwesome)
+(UIButton*)buttonWithType:(UIButtonType)type text:(NSString*)text icon:(NSString*)icon textAttributes:(NSDictionary*)attributes andIconPosition:(IconPosition)position;
-(id)initWithFrame:(CGRect)frame text:(NSString*)text icon:(NSString*)icon textAttributes:(NSDictionary*)attributes andIconPosition:(IconPosition)position;
-(void)setTextAttributes:(NSDictionary*)attributes forUIControlState:(UIControlState)state;
-(void)setBackgroundColor:(UIColor*)color forUIControlState:(UIControlState)state;
-(void)setIconPosition:(IconPosition)position;
-(void)setButtonText:(NSString*)text;
-(void)setButtonIcon:(NSString*)icon;
-(void)setRadius:(CGFloat)radius;
-(void)setSeparation:(NSUInteger)separation;
-(void)setIsAwesome:(BOOL)isAwesome;
@end
|
Make isAwesome public to convert nib-based buttons.
|
Make isAwesome public to convert nib-based buttons.
|
C
|
mit
|
pepibumur/PPiAwesomeButton
|
25677943d30e2b6a64a8be9628c12bd5a2290c46
|
include/kernel/mbr.h
|
include/kernel/mbr.h
|
#ifndef MBR_H
#define MBR_H
#include <stdint.h>
struct MBREntry {
uint8_t boot_indicator;
uint8_t starting_head;
uint16_t starting_sector : 6;
uint16_t starting_cylinder : 10;
uint8_t system_id;
uint8_t ending_head;
uint16_t ending_sector : 6;
uint16_t ending_cylinder : 10;
uint32_t starting_lba;
uint32_t sector_count;
} __attribute__((packed));
struct MBR {
uint8_t padding[0x1BE];
MBREntry entries[4];
} __attribute__((packed));
MBR mbr_read(void);
#endif
|
#ifndef MBR_H
#define MBR_H
#include <stdint.h>
struct MBREntry {
uint8_t boot_indicator;
uint8_t starting_head;
uint16_t starting_sector : 6;
uint16_t starting_cylinder : 10;
uint8_t system_id;
uint8_t ending_head;
uint16_t ending_sector : 6;
uint16_t ending_cylinder : 10;
uint32_t starting_lba;
uint32_t sector_count;
} __attribute__((packed));
struct MBR {
uint8_t padding[0x1BE];
MBREntry entries[4];
uint16_t boot_signature;
} __attribute__((packed));
MBR mbr_read(void);
#endif
|
Add boot sig to MBR structure
|
Add boot sig to MBR structure
|
C
|
apache-2.0
|
shockkolate/shockk-os,shockkolate/shockk-os,shockkolate/shockk-os
|
11e76e19c17cc102c0e0aff431e4058ba6d3b730
|
YouLocal/Views/Cells/NotificationTableViewCell.h
|
YouLocal/Views/Cells/NotificationTableViewCell.h
|
//
// UINotificationTableViewCell.h
// YouLocal
//
// Created by Mihail Velikov on 5/3/15.
// Copyright (c) 2015 YouLoc.al. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface NotificationTableViewCell : UITableViewCell
@property (nonatomic, weak) UIImageView *avatarImage;
@property (nonatomic, weak) UIImageView *typeImage;
@property (nonatomic, weak) UILabel *authorNameLabel;
@property (nonatomic, weak) UILabel *createdBeforeLabel;
@property (nonatomic, weak) UILabel *messageLabel;
@end
|
//
// UINotificationTableViewCell.h
// YouLocal
//
// Created by Mihail Velikov on 5/3/15.
// Copyright (c) 2015 YouLoc.al. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface NotificationTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIImageView *avatarImage;
@property (weak, nonatomic) IBOutlet UIImageView *typeImage;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *typeLabel;
@property (weak, nonatomic) IBOutlet UILabel *messageLabel;
@property (weak, nonatomic) IBOutlet UILabel *createdBeforeLabel;
@property (weak, nonatomic) IBOutlet UILabel *createdBeforeSign;
@end
|
Add Storyboard outlets in Notifications cell class
|
Add Storyboard outlets in Notifications cell class
|
C
|
mit
|
mvelikov/notifications-ios-app-example
|
b766d280380d5445046232cbb437393949936e5b
|
Magick++/fuzz/encoder_format.h
|
Magick++/fuzz/encoder_format.h
|
class EncoderFormat {
public:
std::string get() { return std::string(_format.begin(), _format.end()); } const
void set(const std::wstring fileName, const std::wstring extension)
{
if (fileName.find(L"clusterfuzz-testcase-") == -1)
{
if (extension.length() > 1)
_format = extension.substr(1, extension.size() - 1);
return;
}
std::wstring format=fileName;
size_t index = format.find(L"_", 0);
if (index == std::wstring::npos)
return;
format=format.substr(index + 1);
index = format.find(L"_", 0);
if (index != std::wstring::npos)
_format=format.substr(0, index);
}
private:
std::wstring _format = L".notset";
};
|
class EncoderFormat {
public:
std::string get() { return std::string(_format.begin(), _format.end()); } const
void set(const std::wstring fileName, const std::wstring extension)
{
if (fileName.find(L"clusterfuzz-testcase-") == -1)
{
if (extension.length() > 1)
_format = extension.substr(1, extension.size() - 1);
return;
}
std::wstring format=fileName;
size_t index = format.find(L"_", 0);
if (index == std::wstring::npos)
return;
format=format.substr(index + 1);
index = format.find(L"_", 0);
if (index != std::wstring::npos)
_format=format.substr(0, index);
else if (extension.length() > 1)
_format=extension.substr(1, extension.size() - 1);
}
private:
std::wstring _format = L".notset";
};
|
Use file extension as fallback.
|
Use file extension as fallback.
|
C
|
apache-2.0
|
Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick
|
78306c6f140c57f45336f77ef72d027887632581
|
src/dyn-register.c
|
src/dyn-register.c
|
#include <libunwind.h>
#ifndef HAVE_CMP8XCHG16
#include <pthread.h>
/* Make it easy to write thread-safe code which may or may not be
linked against libpthread. The macros below can be used
unconditionally and if -lpthread is around, they'll call the
corresponding routines otherwise, they do nothing. */
#pragma weak pthread_rwlock_rdlock
#pragma weak pthread_rwlock_wrlock
#pragma weak pthread_rwlock_unlock
#define rw_rdlock(l) (pthread_rwlock_rdlock ? pthread_rwlock_rdlock (l) : 0)
#define rw_wrlock(l) (pthread_rwlock_wrlock ? pthread_rwlock_wrlock (l) : 0)
#define rw_unlock(l) (pthread_rwlock_unlock ? pthread_rwlock_unlock (l) : 0)
static pthread_rwlock_t registration_lock = PTHREAD_RWLOCK_INITIALIZER;
#endif
extern unw_dyn_info_list_t _U_dyn_info_list;
int
_U_dyn_register (unw_dyn_info_t *di)
{
#ifdef HAVE_CMP8XCHG16
unw_dyn_info_t *old_list_head, *new_list_head;
unsigned long old_gen, new_gen;
do
{
old_gen = _U_dyn_info_list.generation;
old_list_head = _U_dyn_info_list.first;
new_gen = old_gen + 1;
new_list_head = di;
di->next = old_list_head;
}
while (cmp8xchg16 (&_U_dyn_info_list, new_gen, new_list_head) != old_gen);
#else
rw_wrlock (®istration_lock);
{
++_U_dyn_info_list.generation;
di->next = _U_dyn_info_list.first;
_U_dyn_info_list.first = di;
}
rw_unlock (®istration_lock);
#endif
}
|
#include "internal.h"
pthread_mutex_t _U_dyn_info_list_lock = PTHREAD_MUTEX_INITIALIZER;
void
_U_dyn_register (unw_dyn_info_t *di)
{
mutex_lock (&_U_dyn_info_list_lock);
{
++_U_dyn_info_list.generation;
di->next = _U_dyn_info_list.first;
di->prev = NULL;
if (di->next)
di->next->prev = di;
_U_dyn_info_list.first = di;
}
mutex_unlock (&_U_dyn_info_list_lock);
}
|
Move pthread-locking stuff to "internal.h". (_U_dyn_info_list_lock): Rename from "registration_lock" and change from r/w-lock to a simple mutex (spin) lock. (_U_dyn_register): Insert into doubly-linked list.
|
Move pthread-locking stuff to "internal.h".
(_U_dyn_info_list_lock): Rename from "registration_lock" and change from r/w-lock
to a simple mutex (spin) lock.
(_U_dyn_register): Insert into doubly-linked list.
(Logical change 1.30)
|
C
|
mit
|
atanasyan/libunwind,unkadoug/libunwind,unkadoug/libunwind,bo-on-software/libunwind,atanasyan/libunwind,zeldin/platform_external_libunwind,ehsan/libunwind,olibc/libunwind,maltek/platform_external_libunwind,rantala/libunwind,geekboxzone/lollipop_external_libunwind,dreal-deps/libunwind,dropbox/libunwind,Keno/libunwind,wdv4758h/libunwind,geekboxzone/lollipop_external_libunwind,rntz/libunwind,libunwind/libunwind,dagar/libunwind,DroidSim/platform_external_libunwind,Chilledheart/libunwind,olibc/libunwind,CyanogenMod/android_external_libunwind,lat/libunwind,adsharma/libunwind,maltek/platform_external_libunwind,igprof/libunwind,tkelman/libunwind,martyone/libunwind,geekboxzone/mmallow_external_libunwind,yuyichao/libunwind,tony/libunwind,rogwfu/libunwind,rogwfu/libunwind,mpercy/libunwind,rantala/libunwind,Keno/libunwind,zliu2014/libunwind-tilegx,martyone/libunwind,androidarmv6/android_external_libunwind,vegard/libunwind,tkelman/libunwind,project-zerus/libunwind,bo-on-software/libunwind,androidarmv6/android_external_libunwind,igprof/libunwind,cms-externals/libunwind,Chilledheart/libunwind,vegard/libunwind,rantala/libunwind,fillexen/libunwind,dreal-deps/libunwind,jrmuizel/libunwind,0xlab/0xdroid-external_libunwind,tronical/libunwind,tony/libunwind,android-ia/platform_external_libunwind,project-zerus/libunwind,tkelman/libunwind,joyent/libunwind,bo-on-software/libunwind,CyanogenMod/android_external_libunwind,atanasyan/libunwind-android,adsharma/libunwind,dreal-deps/libunwind,igprof/libunwind,atanasyan/libunwind-android,vtjnash/libunwind,Keno/libunwind,unkadoug/libunwind,geekboxzone/lollipop_external_libunwind,lat/libunwind,vegard/libunwind,yuyichao/libunwind,geekboxzone/mmallow_external_libunwind,0xlab/0xdroid-external_libunwind,vtjnash/libunwind,tony/libunwind,frida/libunwind,tronical/libunwind,DroidSim/platform_external_libunwind,fillexen/libunwind,tronical/libunwind,wdv4758h/libunwind,rogwfu/libunwind,dagar/libunwind,pathscale/libunwind,cloudius-systems/libunwind,olibc/libunwind,ehsan/libunwind,android-ia/platform_external_libunwind,CyanogenMod/android_external_libunwind,libunwind/libunwind,martyone/libunwind,krytarowski/libunwind,zeldin/platform_external_libunwind,cloudius-systems/libunwind,evaautomation/libunwind,SyndicateRogue/libunwind,evaautomation/libunwind,atanasyan/libunwind-android,joyent/libunwind,cms-externals/libunwind,maltek/platform_external_libunwind,atanasyan/libunwind,ehsan/libunwind,dropbox/libunwind,geekboxzone/mmallow_external_libunwind,android-ia/platform_external_libunwind,0xlab/0xdroid-external_libunwind,krytarowski/libunwind,rntz/libunwind,frida/libunwind,mpercy/libunwind,SyndicateRogue/libunwind,jrmuizel/libunwind,krytarowski/libunwind,project-zerus/libunwind,fillexen/libunwind,fdoray/libunwind,evaautomation/libunwind,cloudius-systems/libunwind,djwatson/libunwind,fdoray/libunwind,androidarmv6/android_external_libunwind,pathscale/libunwind,jrmuizel/libunwind,dropbox/libunwind,lat/libunwind,frida/libunwind,adsharma/libunwind,dagar/libunwind,joyent/libunwind,libunwind/libunwind,zliu2014/libunwind-tilegx,wdv4758h/libunwind,zeldin/platform_external_libunwind,fdoray/libunwind,yuyichao/libunwind,djwatson/libunwind,mpercy/libunwind,rntz/libunwind,zliu2014/libunwind-tilegx,SyndicateRogue/libunwind,djwatson/libunwind,cms-externals/libunwind,pathscale/libunwind,vtjnash/libunwind,Chilledheart/libunwind,DroidSim/platform_external_libunwind
|
ee912d3abbdcbbde6a46d5a3a3a27008d374710c
|
src/rtpp_module.h
|
src/rtpp_module.h
|
#define MODULE_API_REVISION 1
struct api_version {
int rev;
size_t mi_size;
};
struct moduleinfo {
const char *name;
struct api_version ver;
};
#define MI_VER_INIT(sname) {.rev = MODULE_API_REVISION, .mi_size = sizeof(sname)}
|
#define MODULE_API_REVISION 2
struct rtpp_cfg_stable;
struct rtpp_module_priv;
struct rtpp_accounting;
DEFINE_METHOD(rtpp_cfg_stable, rtpp_module_ctor, struct rtpp_module_priv *);
DEFINE_METHOD(rtpp_module_priv, rtpp_module_dtor, void);
DEFINE_METHOD(rtpp_module_priv, rtpp_module_on_session_end, void,
struct rtpp_accounting *);
struct api_version {
int rev;
size_t mi_size;
};
struct moduleinfo {
const char *name;
struct api_version ver;
rtpp_module_ctor_t ctor;
rtpp_module_dtor_t dtor;
rtpp_module_on_session_end_t on_session_end;
};
#define MI_VER_INIT(sname) {.rev = MODULE_API_REVISION, .mi_size = sizeof(sname)}
#define MI_VER_CHCK(sname, sptr) ((sptr)->ver.rev == MODULE_API_REVISION && \
(sptr)->ver.mi_size == sizeof(sname))
|
Define constructor, destructor and on_session_end methods.
|
Define constructor, destructor and on_session_end methods.
|
C
|
bsd-2-clause
|
sippy/rtpproxy,sippy/rtpproxy,jevonearth/rtpproxy,jevonearth/rtpproxy,dsanders11/rtpproxy,dsanders11/rtpproxy,jevonearth/rtpproxy,sippy/rtpproxy,dsanders11/rtpproxy,synety-jdebp/rtpproxy,synety-jdebp/rtpproxy,synety-jdebp/rtpproxy,jevonearth/rtpproxy,synety-jdebp/rtpproxy
|
e6d46509fa05529bdefd5d5c39544a9b28c7f959
|
Demo-iOS/Demo-iOS-Bridging-Header.h
|
Demo-iOS/Demo-iOS-Bridging-Header.h
|
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import "DetailViewController.h"
#import "LoremIpsum.h"
|
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
// 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 "DetailViewController.h"
#import "LoremIpsum.h"
|
Add license to bridging header
|
Add license to bridging header
|
C
|
apache-2.0
|
Kosoku/Ditko,Kosoku/Ditko,Kosoku/Ditko,Kosoku/Ditko
|
ba289c0ae2bae2199af17ebac18347fbc5026186
|
system/check.c
|
system/check.c
|
#include <clib/dos_protos.h>
#include <inline/dos_protos.h>
#include <proto/dos.h>
#include <proto/exec.h>
#include <proto/graphics.h>
#include <exec/execbase.h>
#include <graphics/gfxbase.h>
#include "system/check.h"
bool SystemCheck() {
bool kickv40 = (SysBase->LibNode.lib_Version >= 40) ? TRUE : FALSE;
bool chipaga = (GfxBase->ChipRevBits0 & (GFXF_AA_ALICE|GFXF_AA_LISA)) ? TRUE : FALSE;
bool cpu68040 = (SysBase->AttnFlags & AFF_68040) ? TRUE : FALSE;
bool fpu68882 = (SysBase->AttnFlags & AFF_68882) ? TRUE : FALSE;
Printf("System check:\n");
Printf(" - Kickstart v40 : %s\n", kickv40 ? "yes" : "no");
Printf(" - ChipSet AGA : %s\n", chipaga ? "yes" : "no");
Printf(" - CPU 68040 : %s\n", cpu68040 ? "yes" : "no");
Printf(" - FPU 68882 : %s\n", fpu68882 ? "yes" : "no");
return (kickv40 && cpu68040 && fpu68882 && chipaga);
}
|
#include <clib/dos_protos.h>
#include <inline/dos_protos.h>
#include <proto/dos.h>
#include <proto/exec.h>
#include <proto/graphics.h>
#include <exec/execbase.h>
#include <graphics/gfxbase.h>
#include "system/check.h"
bool SystemCheck() {
bool kickv40 = SysBase->LibNode.lib_Version >= 40;
bool chipaga = GfxBase->ChipRevBits0 & (GFXF_AA_ALICE|GFXF_AA_LISA);
bool cpu68040 = SysBase->AttnFlags & AFF_68040;
bool fpu68882 = SysBase->AttnFlags & AFF_68882;
Printf("System check:\n");
Printf(" - Kickstart v40 : %s\n", kickv40 ? "yes" : "no");
Printf(" - ChipSet AGA : %s\n", chipaga ? "yes" : "no");
Printf(" - CPU 68040 : %s\n", cpu68040 ? "yes" : "no");
Printf(" - FPU 68882 : %s\n", fpu68882 ? "yes" : "no");
return (kickv40 && cpu68040 && fpu68882 && chipaga);
}
|
Remove explicit conversion to boolean value.
|
Remove explicit conversion to boolean value.
|
C
|
artistic-2.0
|
cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene
|
35aedef6490dae31cb00b09c826c18977c2a9128
|
doc/doxygen.h
|
doc/doxygen.h
|
/**
* @mainpage
*
* This is an automatically generated API documentation for the @c cpp-bencoding project.
*/
|
/**
* @mainpage
*
* This is an automatically generated API documentation for the @c cpp-bencoding project.
*/
// Document the bencoding namespace (there is no better place).
/// @namespace bencoding Main namespace of the bencoding library.
|
Add a documentation for the bencoding namespace.
|
Add a documentation for the bencoding namespace.
|
C
|
bsd-3-clause
|
s3rvac/cpp-bencoding,s3rvac/cpp-bencoding
|
00f536dc1c7711d510e5e88943a39b619ec597f1
|
xchainer/backend.h
|
xchainer/backend.h
|
#pragma once
#include <memory>
#include "xchainer/array.h"
#include "xchainer/device.h"
#include "xchainer/scalar.h"
namespace xchainer {
class Backend {
public:
virtual ~Backend() = default;
virtual std::shared_ptr<void> Allocate(const Device& device, size_t bytesize) = 0;
virtual void MemoryCopy(void* dst_ptr, const void* src_ptr, size_t bytesize) = 0;
virtual std::shared_ptr<void> FromBuffer(const Device& device, const std::shared_ptr<void>& src_ptr, size_t bytesize) = 0;
virtual void Fill(Array& out, Scalar value) = 0;
virtual void Add(const Array& lhs, const Array& rhs, Array& out) = 0;
virtual void Mul(const Array& lhs, const Array& rhs, Array& out) = 0;
virtual void Synchronize() = 0;
};
} // namespace xchainer
|
#pragma once
#include <memory>
#include "xchainer/array.h"
#include "xchainer/device.h"
#include "xchainer/scalar.h"
namespace xchainer {
class Backend {
public:
virtual ~Backend() = default;
// Allocates a memory chunk on the specified device.
virtual std::shared_ptr<void> Allocate(const Device& device, size_t bytesize) = 0;
// Copies the data between two memory chunks.
virtual void MemoryCopy(void* dst_ptr, const void* src_ptr, size_t bytesize) = 0;
// Creates a data buffer filled with the specified data on the specified device.
//
// It may allocate a new memory or return an alias.
// src_ptr is guaranteed to reside in the main RAM.
virtual std::shared_ptr<void> FromBuffer(const Device& device, const std::shared_ptr<void>& src_ptr, size_t bytesize) = 0;
virtual void Fill(Array& out, Scalar value) = 0;
virtual void Add(const Array& lhs, const Array& rhs, Array& out) = 0;
virtual void Mul(const Array& lhs, const Array& rhs, Array& out) = 0;
virtual void Synchronize() = 0;
};
} // namespace xchainer
|
Comment on Backend member functions
|
Comment on Backend member functions
|
C
|
mit
|
jnishi/chainer,jnishi/chainer,hvy/chainer,pfnet/chainer,niboshi/chainer,okuta/chainer,ktnyt/chainer,wkentaro/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,okuta/chainer,okuta/chainer,tkerola/chainer,okuta/chainer,ktnyt/chainer,hvy/chainer,hvy/chainer,wkentaro/chainer,ktnyt/chainer,hvy/chainer,wkentaro/chainer,chainer/chainer,wkentaro/chainer,niboshi/chainer,ktnyt/chainer,chainer/chainer,jnishi/chainer,jnishi/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,chainer/chainer,niboshi/chainer,chainer/chainer,niboshi/chainer
|
b5348f8e51840d03037538e41ef2efd7a59766b5
|
Source/Main/xcode_SourceFileDefinition.h
|
Source/Main/xcode_SourceFileDefinition.h
|
////////////////////////////////////////////////////////////////////////////////
//
// EXPANZ
// Copyright 2008-2011 EXPANZ
// All Rights Reserved.
//
// NOTICE: Expanz permits you to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////
#import <Foundation/Foundation.h>
#import "xcode_AbstractDefinition.h"
#import "XcodeSourceFileType.h"
@interface xcode_SourceFileDefinition : xcode_AbstractDefinition;
@property(nonatomic, strong, readonly) NSString* sourceFileName;
@property(nonatomic, strong, readonly) NSData* data;
@property(nonatomic, readonly) XcodeSourceFileType type;
+ (xcode_SourceFileDefinition*) sourceDefinitionWithName:(NSString*)name text:(NSString*)text
type:(XcodeSourceFileType)type;
+ (xcode_SourceFileDefinition*) sourceDefinitionWithName:(NSString*)name data:(NSData*)data
type:(XcodeSourceFileType)type;
- (id) initWithName:(NSString*)name text:(NSString*)text type:(XcodeSourceFileType)type;
- (id) initWithName:(NSString*)name data:(NSData*)data type:(XcodeSourceFileType)type;
@end
/* ================================================================================================================== */
@compatibility_alias SourceFileDefinition xcode_SourceFileDefinition;
|
////////////////////////////////////////////////////////////////////////////////
//
// EXPANZ
// Copyright 2008-2011 EXPANZ
// All Rights Reserved.
//
// NOTICE: Expanz permits you to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////
#import <Foundation/Foundation.h>
#import "xcode_AbstractDefinition.h"
#import "XcodeSourceFileType.h"
@interface xcode_SourceFileDefinition : xcode_AbstractDefinition {
NSString* _sourceFileName;
XcodeSourceFileType _type;
NSData* _data;
}
@property(nonatomic, strong, readonly) NSString* sourceFileName;
@property(nonatomic, strong, readonly) NSData* data;
@property(nonatomic, readonly) XcodeSourceFileType type;
+ (xcode_SourceFileDefinition*) sourceDefinitionWithName:(NSString*)name text:(NSString*)text
type:(XcodeSourceFileType)type;
+ (xcode_SourceFileDefinition*) sourceDefinitionWithName:(NSString*)name data:(NSData*)data
type:(XcodeSourceFileType)type;
- (id) initWithName:(NSString*)name text:(NSString*)text type:(XcodeSourceFileType)type;
- (id) initWithName:(NSString*)name data:(NSData*)data type:(XcodeSourceFileType)type;
@end
/* ================================================================================================================== */
@compatibility_alias SourceFileDefinition xcode_SourceFileDefinition;
|
Fix to allow compile under 32 bit.
|
Fix to allow compile under 32 bit.
|
C
|
apache-2.0
|
khanhtbh/XcodeEditor,appsquickly/XcodeEditor,JoelGerboreLaser/XcodeEditor,appsquickly/XcodeEditor,JoelGerboreLaser/XcodeEditor,iosdevzone/XcodeEditor,cezheng/XcodeEditor,andyvand/XcodeEditor,service2media/XcodeEditor,appsquickly/XcodeEditor,cezheng/XcodeEditor,khanhtbh/XcodeEditor
|
82b7274cf268372802ee66fb8ce9a11a766cf778
|
include/Map.h
|
include/Map.h
|
#ifndef LAND_H
#define LAND_H
#include <string>
#include "Plant.h"
class Land
{
public:
~Land();
bool put(Plant & plant);
bool getStood()const{return isStood_;}
Plant & getPlant() { return *plant_; }
const Plant & getPlant() const { return *plant_; }
private:
Plant * plant_ = nullptr;
bool isStood_ = false;
};
#endif // LAND_H
#ifndef MAP_H
#define MAP_H
#include <vector>
class Map
{
public:
// with this constructor, you could get a map with [land_num] empty land
Map(int land_num);
Land operator[] (int i) { return lands_[i]; }
const Land operator[] (int i) const { return lands_[i]; }
int size() { return lands_.size(); }
bool put(Plant & plant, int position) { return lands_[position].put(plant); }
private:
constexpr static int max_land_num = 10;
std::vector<Land> lands_;
};
#endif // MAP_H
|
#ifndef LAND_H
#define LAND_H
#include <string>
#include "Plant.h"
class Land
{
public:
~Land();
bool put(Plant & plant);
bool getStood()const{return isStood_;}
Plant * getPlant() { return plant_; }
const Plant * getPlant() const { return plant_; }
private:
Plant * plant_ = nullptr;
bool isStood_ = false;
};
#endif // LAND_H
#ifndef MAP_H
#define MAP_H
#include <vector>
class Map
{
public:
// with this constructor, you could get a map with [land_num] empty land
Map(int land_num);
Land operator[] (int i) { return lands_[i]; }
const Land operator[] (int i) const { return lands_[i]; }
int size() { return lands_.size(); }
bool put(Plant & plant, int position) { return lands_[position].put(plant); }
private:
constexpr static int max_land_num = 10;
std::vector<Land> lands_;
};
#endif // MAP_H
|
Make Land getPlant return pointer
|
Make Land getPlant return pointer
|
C
|
mit
|
wi1d5ky/AP-Team-Project
|
41021611b9bccbc524ababfab256fe7d7f28cf1c
|
src/lib/ems_server.c
|
src/lib/ems_server.c
|
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <Azy.h>
#include "EMS_Config.azy_server.h"
/*============================================================================*
* Local *
*============================================================================*/
/*============================================================================*
* Global *
*============================================================================*/
void ems_server_init(void)
{
Azy_Server *serv;
Azy_Server_Module_Def **mods;
azy_init();
//Define the list of module used by the server.
Azy_Server_Module_Def *modules[] = {
EMS_Config_module_def(),
NULL
};
serv = azy_server_new(EINA_FALSE);
azy_server_addr_set(serv, "0.0.0.0");
azy_server_port_set(serv, 2000);
for (mods = modules; mods && *mods; mods++)
{
if (!azy_server_module_add(serv, *mods))
ERR("Unable to create server\n");
}
INF("Start Azy server");
azy_server_start(serv);
}
/*============================================================================*
* API *
*============================================================================*/
|
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <Azy.h>
#include "EMS_Config.azy_server.h"
/*============================================================================*
* Local *
*============================================================================*/
Azy_Server *_serv;
/*============================================================================*
* Global *
*============================================================================*/
void ems_server_init(void)
{
Azy_Server_Module_Def **mods;
azy_init();
//Define the list of module used by the server.
Azy_Server_Module_Def *modules[] = {
EMS_Config_module_def(),
NULL
};
_serv = azy_server_new(EINA_FALSE);
azy_server_addr_set(_serv, "0.0.0.0");
azy_server_port_set(_serv, ems_config->port);
for (mods = modules; mods && *mods; mods++)
{
if (!azy_server_module_add(_serv, *mods))
ERR("Unable to create server\n");
}
}
void ems_server_run(void)
{
INF("Start Azy server");
azy_server_run(_serv);
}
/*============================================================================*
* API *
*============================================================================*/
|
Use azy_server_run as a replacement for ecore_main_loop_begin
|
Use azy_server_run as a replacement for ecore_main_loop_begin
|
C
|
bsd-2-clause
|
enna-project/Enna-Media-Server,raoulh/Enna-Media-Server,enna-project/Enna-Media-Server,raoulh/Enna-Media-Server,enna-project/Enna-Media-Server,enna-project/Enna-Media-Server,raoulh/Enna-Media-Server,enna-project/Enna-Media-Server,raoulh/Enna-Media-Server,raoulh/Enna-Media-Server
|
a59e4b3c4135a31f15c8cfd4b48ea32c1060a505
|
react/React.h
|
react/React.h
|
//
// react-objc - a library for functional-reactive-like programming
// https://github.com/tconkling/react-objc/blob/master/LICENSE
#import "RAConnection.h"
#import "RAConnectionGroup.h"
#import "RABoolSignal.h"
#import "RABoolValue.h"
#import "RADoubleSignal.h"
#import "RADoubleValue.h"
#import "RAFloatSignal.h"
#import "RAFloatValue.h"
#import "RAIntSignal.h"
#import "RAIntValue.h"
#import "RAObjectSignal.h"
#import "RAObjectValue.h"
#import "RAUnitSignal.h"
#import "RAFuture.h"
#import "RAPromise.h"
#import "RAMultiFailureError.h"
#import "RATry.h"
#import "RAMappedSignal.h"
|
//
// react-objc - a library for functional-reactive-like programming
// https://github.com/tconkling/react-objc/blob/master/LICENSE
#import "RAConnection.h"
#import "RAConnectionGroup.h"
#import "RABoolSignal.h"
#import "RABoolValue.h"
#import "RADoubleSignal.h"
#import "RADoubleValue.h"
#import "RAFloatSignal.h"
#import "RAFloatValue.h"
#import "RAIntSignal.h"
#import "RAIntValue.h"
#import "RAObjectSignal.h"
#import "RAObjectValue.h"
#import "RAStringSignal.h"
#import "RAStringValue.h"
#import "RAUnitSignal.h"
#import "RAFuture.h"
#import "RAPromise.h"
#import "RAMultiFailureError.h"
#import "RATry.h"
#import "RAMappedSignal.h"
|
Add RAStringSignal and RAStringValue to header
|
Add RAStringSignal and RAStringValue to header
|
C
|
bsd-3-clause
|
tconkling/react-objc
|
774d58de16c4a105f4555fd5616a8077cae6c808
|
Assist/InputOutput/rootPath.h
|
Assist/InputOutput/rootPath.h
|
/*
* Copyright (c) 2010-2014, Delft University of Technology
* Copyright (c) 2010-2014, K. Kumar (me@kartikkumar.com)
* All rights reserved.
* See http://bit.ly/1jern3m for license details.
*/
#ifndef ASSIST_INPUT_OUTPUT_H
#define ASSIST_INPUT_OUTPUT_H
#include <string>
namespace assist
{
namespace input_output
{
//! Get root-path for Assist directory.
/*!
* Returns root-path corresponding with root-directory of Assist as a string with
* trailing slash included.
* \return Assist root-path.
*/
static inline std::string getAssistRootPath( )
{
#ifdef ASSIST_CUSTOM_ROOT_PATH
return std::string( ASSIST_CUSTOM_ROOT_PATH );
#else
// Declare file path string assigned to filePath.
// __FILE__ only gives the absolute path in the header file!
std::string filePath_( __FILE__ );
// Strip filename from temporary string and return root-path string.
return filePath_.substr( 0, filePath_.length( ) -
std::string( "InputOutput/rootPath.h" ).length( ) );
#endif
}
} // namespace input_output
} // namespace assist
#endif // ASSIST_INPUT_OUTPUT_H
|
/*
* Copyright (c) 2010-2014, Delft University of Technology
* Copyright (c) 2010-2014, K. Kumar (me@kartikkumar.com)
* All rights reserved.
* See http://bit.ly/1jern3m for license details.
*/
#ifndef ASSIST_ROOT_PATH_H
#define ASSIST_ROOT_PATH_H
#include <string>
namespace assist
{
namespace input_output
{
//! Get root-path for Assist directory.
/*!
* Returns root-path corresponding with root-directory of Assist as a string with
* trailing slash included.
* \return Assist root-path.
*/
static inline std::string getAssistRootPath( )
{
#ifdef ASSIST_CUSTOM_ROOT_PATH
return std::string( ASSIST_CUSTOM_ROOT_PATH );
#else
// Declare file path string assigned to filePath.
// __FILE__ only gives the absolute path in the header file!
std::string filePath_( __FILE__ );
// Strip filename from temporary string and return root-path string.
return filePath_.substr( 0, filePath_.length( ) -
std::string( "InputOutput/rootPath.h" ).length( ) );
#endif
}
} // namespace input_output
} // namespace assist
#endif // ASSIST_ROOT_PATH_H
|
Update header include guard for root-path file.
|
Update header include guard for root-path file.
|
C
|
bsd-3-clause
|
kartikkumar/assist,kartikkumar/assist
|
5e9486e5c6ce931557c1463b381d7f6f03ac9acd
|
c/src/ta_data/ta_adddatasourceparam_priv.h
|
c/src/ta_data/ta_adddatasourceparam_priv.h
|
#ifndef TA_ADDDATASOURCEPARAM_PRIV_H
#define TA_ADDDATASOURCEPARAM_PRIV_H
/* The following is a private copy of the user provided
* parameters for a TA_AddDataSource call.
*
* Code is in 'ta_data_interface.c'
*/
typedef struct
{
TA_SourceId id;
TA_SourceFlag flags;
TA_Period period;
TA_String *location;
TA_String *info;
TA_String *username;
TA_String *password;
TA_String *category;
TA_String *country;
TA_String *exchange;
TA_String *type;
TA_String *symbol;
TA_String *name;
} TA_AddDataSourceParamPriv;
/* Function to alloc/free a TA_AddDataSourceParamPriv. */
TA_AddDataSourceParamPriv *TA_AddDataSourceParamPrivAlloc( const TA_AddDataSourceParam *param );
TA_RetCode TA_AddDataSourceParamPrivFree( TA_AddDataSourceParamPriv *toBeFreed );
#endif
|
#ifndef TA_ADDDATASOURCEPARAM_PRIV_H
#define TA_ADDDATASOURCEPARAM_PRIV_H
/* The following is a private copy of the user provided
* parameters for a TA_AddDataSource call.
*
* Code is in 'ta_data_interface.c'
*/
typedef struct
{
TA_SourceId id;
TA_SourceFlag flags;
TA_Period period;
TA_String *location;
TA_String *info;
TA_String *username;
TA_String *password;
TA_String *category;
TA_String *country;
TA_String *exchange;
TA_String *type;
TA_String *symbol;
TA_String *name;
} TA_AddDataSourceParamPriv;
#endif
|
Remove function prototype that are now static in ta_data_interface.c
|
Remove function prototype that are now static in ta_data_interface.c
git-svn-id: 33305d871a58cfd02b407b81d5206d2a785211eb@618 159cb52c-178a-4f3c-8eb8-d0aff033d058
|
C
|
bsd-3-clause
|
shamanland/ta-lib,shamanland/ta-lib,shamanland/ta-lib,shamanland/ta-lib,shamanland/ta-lib,shamanland/ta-lib
|
0ccd98dff05616696f78572c46bf055dc244a605
|
test/FixIt/fixit-include.c
|
test/FixIt/fixit-include.c
|
// RUN: %clang_cc1 -fsyntax-only -Wall -pedantic -verify %s
// RUN: cp %s %t
// RUN: cp %S/fixit-include.h %T
// RUN: not %clang_cc1 -fsyntax-only -fixit %t
// RUN: %clang_cc1 -Wall -pedantic %t
#include <fixit-include.h> // expected-error {{'fixit-include.h' file not found with <angled> include; use "quotes" instead}}
#pragma does_not_exist // expected-warning {{unknown pragma ignored}}
int main( void ) {
return 0;
}
|
// RUN: %clang_cc1 -fsyntax-only -Wall -pedantic -verify %s
// RUN: cp %s %t
// RUN: cp %S/fixit-include.h %T
// RUN: not %clang_cc1 -fsyntax-only -fixit %t
// RUN: %clang_cc1 -Wall -pedantic %t
#include <fixit-include.h> // expected-error {{'fixit-include.h' file not found with <angled> include; use "quotes" instead}}
#pragma does_not_exist // expected-warning {{unknown pragma ignored}}
int main( void ) {
return 0;
}
|
Remove dos line endings. Please remember to configure your windows SVN clients to default text files to 'eol-native'.
|
Remove dos line endings. Please remember to configure your windows SVN
clients to default text files to 'eol-native'.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@160534 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
|
f78169f840c0a551e90df1c45ef17325263ee95c
|
lab3/mytests/tstworst.c
|
lab3/mytests/tstworst.c
|
#include <stdio.h>
#include <stdlib.h>
#include "../brk.h"
#include <unistd.h>
#include "clock.h"
int main(int argc, char *argv[]) {
int nbytes = 5;
void **ptrs;
long num;
long i;
num = atol(argv[1]);
ptrs = malloc(sizeof(void*) * num);
for(i = 0; i < num; i++) {
ptrs[i] = malloc(nbytes);
malloc(1);
}
for(i = 0; i < num; i++) {
free(ptrs[i]);
}
_reset_clock();
for(i = 0; i < num; i++) {
_resume();
ptrs[i] = malloc(nbytes + 1);
_pause();
}
_print_elapsed_time();
return 0;
}
|
#include <stdio.h>
#include <stdlib.h>
#include "../brk.h"
#include <unistd.h>
#include "clock.h"
#define MIN_ALLOC (1024)
#define HEADER_SIZE (16)
int main(int argc, char *argv[]) {
void **ptrs;
long num;
long i;
int small_malloc = HEADER_SIZE;
int medium_malloc = (MIN_ALLOC - 3) * HEADER_SIZE;
int large_malloc = (MIN_ALLOC - 1) * HEADER_SIZE;
num = atol(argv[1]);
ptrs = malloc(sizeof(void*) * num);
for(i = 0; i < num; i++) {
ptrs[i] = malloc(medium_malloc);
malloc(small_malloc);
}
for(i = 0; i < num; i++) {
free(ptrs[i]);
}
_reset_clock();
for(i = 0; i < num; i++) {
_resume();
ptrs[i] = malloc(large_malloc);
_pause();
}
_print_elapsed_time();
return 0;
}
|
Make worst case actual worst case.
|
Make worst case actual worst case.
|
C
|
mit
|
mbark/os14,mbark/os14,mbark/os14
|
f743432d55d26c1c97b20c2895a479318368d5e8
|
libc/signal/sigsetops.c
|
libc/signal/sigsetops.c
|
/* Define the real-function versions of all inline functions
defined in signal.h (or bits/sigset.h). */
#include <features.h>
#define _EXTERN_INLINE
#ifndef __USE_EXTERN_INLINES
# define __USE_EXTERN_INLINES 1
#endif
#include "signal.h"
|
/* Define the real-function versions of all inline functions
defined in signal.h (or bits/sigset.h). */
#include <features.h>
#define _EXTERN_INLINE
#ifndef __USE_EXTERN_INLINES
# define __USE_EXTERN_INLINES 1
#endif
#include <signal.h>
|
Use <> instead of \"\"
|
Use <> instead of \"\"
|
C
|
lgpl-2.1
|
atgreen/uClibc-moxie,hwoarang/uClibc,brgl/uclibc-ng,brgl/uclibc-ng,kraj/uClibc,majek/uclibc-vx32,majek/uclibc-vx32,gittup/uClibc,ysat0/uClibc,wbx-github/uclibc-ng,klee/klee-uclibc,ndmsystems/uClibc,skristiansson/uClibc-or1k,hwoarang/uClibc,klee/klee-uclibc,hwoarang/uClibc,atgreen/uClibc-moxie,hjl-tools/uClibc,m-labs/uclibc-lm32,ndmsystems/uClibc,ChickenRunjyd/klee-uclibc,ddcc/klee-uclibc-0.9.33.2,waweber/uclibc-clang,ffainelli/uClibc,groundwater/uClibc,groundwater/uClibc,groundwater/uClibc,ysat0/uClibc,czankel/xtensa-uclibc,OpenInkpot-archive/iplinux-uclibc,waweber/uclibc-clang,gittup/uClibc,wbx-github/uclibc-ng,groundwater/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,hjl-tools/uClibc,ffainelli/uClibc,OpenInkpot-archive/iplinux-uclibc,foss-xtensa/uClibc,kraj/uClibc,atgreen/uClibc-moxie,mephi42/uClibc,majek/uclibc-vx32,ysat0/uClibc,brgl/uclibc-ng,ChickenRunjyd/klee-uclibc,foss-for-synopsys-dwc-arc-processors/uClibc,klee/klee-uclibc,kraj/uclibc-ng,kraj/uclibc-ng,kraj/uclibc-ng,wbx-github/uclibc-ng,ffainelli/uClibc,ddcc/klee-uclibc-0.9.33.2,brgl/uclibc-ng,ffainelli/uClibc,klee/klee-uclibc,foss-xtensa/uClibc,ysat0/uClibc,kraj/uclibc-ng,hjl-tools/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,waweber/uclibc-clang,foss-xtensa/uClibc,ChickenRunjyd/klee-uclibc,ndmsystems/uClibc,czankel/xtensa-uclibc,OpenInkpot-archive/iplinux-uclibc,atgreen/uClibc-moxie,OpenInkpot-archive/iplinux-uclibc,mephi42/uClibc,ChickenRunjyd/klee-uclibc,kraj/uClibc,m-labs/uclibc-lm32,czankel/xtensa-uclibc,foss-for-synopsys-dwc-arc-processors/uClibc,hwoarang/uClibc,m-labs/uclibc-lm32,hjl-tools/uClibc,wbx-github/uclibc-ng,kraj/uClibc,skristiansson/uClibc-or1k,groundwater/uClibc,mephi42/uClibc,skristiansson/uClibc-or1k,czankel/xtensa-uclibc,gittup/uClibc,mephi42/uClibc,gittup/uClibc,ndmsystems/uClibc,ffainelli/uClibc,m-labs/uclibc-lm32,hjl-tools/uClibc,ddcc/klee-uclibc-0.9.33.2,ddcc/klee-uclibc-0.9.33.2,majek/uclibc-vx32,waweber/uclibc-clang,skristiansson/uClibc-or1k,foss-xtensa/uClibc
|
5eed19c98a7ea45568360d20b9b4f676a2cc5f15
|
src/lib/serviceRoutines/putIndividualContextEntityAttribute.h
|
src/lib/serviceRoutines/putIndividualContextEntityAttribute.h
|
#ifndef PUT_INDIVIDUAL_CONTEXT_ENTITY_ATTRIBUTE_H
#define PUT_INDIVIDUAL_CONTEXT_ENTITY_ATTRIBUTE_H
/*
*
* Copyright 2013 Telefonica Investigacion y Desarrollo, S.A.U
*
* This file is part of Orion Context Broker.
*
* Orion Context Broker 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.
*
* Orion Context Broker 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 Orion Context Broker. If not, see http://www.gnu.org/licenses/.
*
* For those usages not covered by this license please contact with
* fermin at tid dot es
*
* Author: TID Developer
*/
#include <string>
#include <vector>
#include "rest/ConnectionInfo.h"
#include "ngsi/ParseData.h"
/* ****************************************************************************
*
* putIndividualContextEntityAttribute -
*/
extern std::string putIndividualContextEntityAttribute(ConnectionInfo* ciP, int components, std::vector<std::string> compV, ParseData* parseDataP);
#endif
|
#ifndef PUT_INDIVIDUAL_CONTEXT_ENTITY_ATTRIBUTE_H
#define PUT_INDIVIDUAL_CONTEXT_ENTITY_ATTRIBUTE_H
/*
*
* Copyright 2014 Telefonica Investigacion y Desarrollo, S.A.U
*
* This file is part of Orion Context Broker.
*
* Orion Context Broker 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.
*
* Orion Context Broker 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 Orion Context Broker. If not, see http://www.gnu.org/licenses/.
*
* For those usages not covered by this license please contact with
* fermin at tid dot es
*
* Author: TID Developer
*/
#include <string>
#include <vector>
#include "rest/ConnectionInfo.h"
#include "ngsi/ParseData.h"
/* ****************************************************************************
*
* putIndividualContextEntityAttribute -
*/
extern std::string putIndividualContextEntityAttribute(ConnectionInfo* ciP, int components, std::vector<std::string> compV, ParseData* parseDataP);
#endif
|
Change date of copyright notice
|
Change date of copyright notice
|
C
|
agpl-3.0
|
jmcanterafonseca/fiware-orion,fiwareulpgcmirror/fiware-orion,McMutton/fiware-orion,McMutton/fiware-orion,McMutton/fiware-orion,telefonicaid/fiware-orion,telefonicaid/fiware-orion,jmcanterafonseca/fiware-orion,yalp/fiware-orion,yalp/fiware-orion,pacificIT/fiware-orion,guerrerocarlos/fiware-orion,fortizc/fiware-orion,yalp/fiware-orion,telefonicaid/fiware-orion,Fiware/data.Orion,pacificIT/fiware-orion,gavioto/fiware-orion,McMutton/fiware-orion,Fiware/context.Orion,fortizc/fiware-orion,guerrerocarlos/fiware-orion,jmcanterafonseca/fiware-orion,McMutton/fiware-orion,guerrerocarlos/fiware-orion,yalp/fiware-orion,j1fig/fiware-orion,fiwareulpgcmirror/fiware-orion,pacificIT/fiware-orion,Fiware/context.Orion,j1fig/fiware-orion,pacificIT/fiware-orion,Fiware/context.Orion,gavioto/fiware-orion,Fiware/data.Orion,fiwareulpgcmirror/fiware-orion,fiwareulpgcmirror/fiware-orion,McMutton/fiware-orion,jmcanterafonseca/fiware-orion,j1fig/fiware-orion,fiwareulpgcmirror/fiware-orion,Fiware/data.Orion,telefonicaid/fiware-orion,Fiware/context.Orion,pacificIT/fiware-orion,j1fig/fiware-orion,McMutton/fiware-orion,telefonicaid/fiware-orion,Fiware/data.Orion,Fiware/context.Orion,fiwareulpgcmirror/fiware-orion,yalp/fiware-orion,gavioto/fiware-orion,fortizc/fiware-orion,guerrerocarlos/fiware-orion,fortizc/fiware-orion,jmcanterafonseca/fiware-orion,j1fig/fiware-orion,telefonicaid/fiware-orion,fortizc/fiware-orion,guerrerocarlos/fiware-orion,gavioto/fiware-orion,gavioto/fiware-orion,jmcanterafonseca/fiware-orion,Fiware/data.Orion,Fiware/data.Orion,Fiware/context.Orion,fortizc/fiware-orion
|
240a18f3955c0c2749c867b32c231b19672d83e0
|
src/problem.h
|
src/problem.h
|
#ifndef PROBLEM_H
#define PROBLEM_H
#include "sense.h"
class Problem {
public:
int objcnt; // Number of objectives
double* rhs;
int** objind; // Objective indices
double** objcoef; // Objective coefficients
Sense objsen; // Objective sense. Note that all objectives must have the same
// sense (i.e., either all objectives are to be minimised, or
// all objectives are to be maximised).
int* conind;
char* consense;
~Problem();
};
inline Problem::~Problem() {
for(int j = 0; j < objcnt; ++j) {
delete[] objind[j];
delete[] objcoef[j];
}
delete[] objind;
delete[] objcoef;
delete[] rhs;
delete[] conind;
delete[] consense;
}
#endif /* PROBLEM_H */
|
#ifndef PROBLEM_H
#define PROBLEM_H
#include "sense.h"
class Problem {
public:
int objcnt; // Number of objectives
double* rhs;
int** objind; // Objective indices
double** objcoef; // Objective coefficients
Sense objsen; // Objective sense. Note that all objectives must have the same
// sense (i.e., either all objectives are to be minimised, or
// all objectives are to be maximised).
int* conind;
char* consense;
Problem();
~Problem();
};
inline Problem::Problem() : objcnt(0) { }
inline Problem::~Problem() {
// If objcnt == 0, then no problem has been assigned and no memory allocated
if (objcnt == 0)
return;
for(int j = 0; j < objcnt; ++j) {
delete[] objind[j];
delete[] objcoef[j];
}
delete[] objind;
delete[] objcoef;
delete[] rhs;
delete[] conind;
delete[] consense;
}
#endif /* PROBLEM_H */
|
Fix invalid delete[] calls in ~Problem
|
Fix invalid delete[] calls in ~Problem
If objcnt is 0, then no memory has been allocated.
|
C
|
bsd-2-clause
|
WPettersson/moip_aira,WPettersson/moip_aira,WPettersson/moip_aira,WPettersson/moip_aira
|
759e89dfa1972fdcf84cd0e5eb5dbbd125381cd3
|
src/version.h
|
src/version.h
|
#ifndef _version_h_
# define _version_h_
# define PROGRAM_NAME "xyzzy"
# define PROGRAM_COPYRIGHT "Copyright (C) 1996-2005 T.Kamei"
# define PROGRAM_MAJOR_VERSION 0
# define PROGRAM_MINOR_VERSION 2
# define PROGRAM_MAJOR_REVISION 3
# define PROGRAM_MINOR_REVISION 5
# define PROGRAM_PATCH_LEVEL 0
# define TITLE_BAR_STRING_SIZE 256
extern char TitleBarString[];
extern const char VersionString[];
extern const char DisplayVersionString[];
extern const char ProgramName[];
extern const char ProgramNameWithVersion[];
#endif
|
#ifndef _version_h_
# define _version_h_
# define PROGRAM_NAME "xyzzy"
# define PROGRAM_COPYRIGHT "Copyright (C) 1996-2005 T.Kamei"
# define PROGRAM_MAJOR_VERSION 0
# define PROGRAM_MINOR_VERSION 2
# define PROGRAM_MAJOR_REVISION 3
# define PROGRAM_MINOR_REVISION 5
# define PROGRAM_PATCH_LEVEL 1
# define TITLE_BAR_STRING_SIZE 256
extern char TitleBarString[];
extern const char VersionString[];
extern const char DisplayVersionString[];
extern const char ProgramName[];
extern const char ProgramNameWithVersion[];
#endif
|
Update patch level for update test.
|
Update patch level for update test.
|
C
|
mit
|
NobuoK/xyzzy,NobuoK/xyzzy,NobuoK/xyzzy,NobuoK/xyzzy,NobuoK/xyzzy
|
45731725e296f521e4ae2867742e7ea33a6a2ef6
|
libpkg/pkg_error.h
|
libpkg/pkg_error.h
|
#ifndef _PKG_ERROR_H
#define _PKG_ERROR_H
#ifdef DEBUG
# define pkg_error_set(code, fmt, ...) \
_pkg_error_set(code, fmt " [at %s:%d]", ##__VA_ARGS__, __FILE__, __LINE__)
#else
# define pkg_error_set _pkg_error_set
#endif
#define ERROR_BAD_ARG(name) \
pkg_error_set(EPKG_FATAL, "Bad argument `%s` in %s", name, __FUNCTION__)
#define ERROR_SQLITE(db) \
pkg_error_set(EPKG_FATAL, "%s (sqlite at %s:%d)", sqlite3_errmsg(db), __FILE__, __LINE__)
pkg_error_t _pkg_error_set(pkg_error_t, const char *, ...);
#endif
|
#ifndef _PKG_ERROR_H
#define _PKG_ERROR_H
#ifdef DEBUG
# define pkg_error_set(code, fmt, ...) \
_pkg_error_set(code, fmt " [at %s:%d]", ##__VA_ARGS__, __FILE__, __LINE__)
#else
# define pkg_error_set _pkg_error_set
#endif
#define ERROR_BAD_ARG(name) \
pkg_error_set(EPKG_FATAL, "Bad argument `%s` in %s", name, __FUNCTION__)
#define ERROR_SQLITE(db) \
pkg_error_set(EPKG_FATAL, "%s (sqlite)", sqlite3_errmsg(db))
pkg_error_t _pkg_error_set(pkg_error_t, const char *, ...);
#endif
|
Revert "Indicate the location of sqlite failures."
|
Revert "Indicate the location of sqlite failures."
This reverts commit 2686383409d98488ae7b2c39d531af9ef380e21a.
|
C
|
bsd-2-clause
|
khorben/pkg,junovitch/pkg,skoef/pkg,skoef/pkg,junovitch/pkg,en90/pkg,khorben/pkg,Open343/pkg,en90/pkg,khorben/pkg,Open343/pkg
|
da1c4e94c3cfa8b74ba81c83b91885dc50c857bd
|
test/Sema/arm64-neon-args.c
|
test/Sema/arm64-neon-args.c
|
// RUN: %clang_cc1 -triple arm64-apple-darwin -target-feature +neon -fsyntax-only -ffreestanding -verify %s
#include <arm_neon.h>
// rdar://13527900
void vcopy_reject(float32x4_t vOut0, float32x4_t vAlpha, int t) {
vcopyq_laneq_f32(vOut0, 1, vAlpha, t); // expected-error {{argument to '__builtin_neon_vgetq_lane_f32' must be a constant integer}} expected-error {{initializing 'float32_t' (aka 'float') with an expression of incompatible type 'void'}}
}
// rdar://problem/15256199
float32x4_t test_vmlsq_lane(float32x4_t accum, float32x4_t lhs, float32x2_t rhs) {
return vmlsq_lane_f32(accum, lhs, rhs, 1);
}
|
// RUN: %clang_cc1 -triple arm64-apple-darwin -target-feature +neon -fsyntax-only -ffreestanding -verify %s
// RUN: %clang_cc1 -triple arm64_be-none-linux-gnu -target-feature +neon -fsyntax-only -ffreestanding -verify %s
#include <arm_neon.h>
// rdar://13527900
void vcopy_reject(float32x4_t vOut0, float32x4_t vAlpha, int t) {
vcopyq_laneq_f32(vOut0, 1, vAlpha, t); // expected-error {{argument to '__builtin_neon_vgetq_lane_f32' must be a constant integer}} expected-error {{initializing 'float32_t' (aka 'float') with an expression of incompatible type 'void'}}
}
// rdar://problem/15256199
float32x4_t test_vmlsq_lane(float32x4_t accum, float32x4_t lhs, float32x2_t rhs) {
return vmlsq_lane_f32(accum, lhs, rhs, 1);
}
|
Add a test for big-endian NEON on ARM64.
|
Add a test for big-endian NEON on ARM64.
The enabled test #includes <arm_neon.h>, which is sufficient to test all
the code in r207624.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@207641 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
|
2b8300582a7e62df81ab5a32efee5c0053d61161
|
fw/libs/AdapterBoard/usb_commands.h
|
fw/libs/AdapterBoard/usb_commands.h
|
#ifndef USB_COMMANDS_H
#define USB_COMMANDS_H
#define CMD_ACK 0xAF
#define CMD_RESP 0xBF
#define CMD_BL_ON 0x10
#define CMD_BL_OFF 0x11
#define CMD_BL_LEVEL 0x12
#define CMD_BL_UP 0x13
#define CMD_BL_DOWN 0x14
#define CMD_BL_GET_STATE 0x1F
#define CMD_RGB_SET 0x20
#define CMD_RGB_GET 0x2F
#endif
|
/* USB commands use the first byte as the 'type' variable.
* Subsequent bytes are generally the 'arguments'.
* So host->device usb packets usually look like:
* [command, arg1, arg2, 0, 0, ... , 0, 0]
* to which the device will respond with
* [CMD_ACK, command, 0, 0, 0 ..., 0, 0]
*
* The exception to this, are the commands which 'GET'
* For them host->device generally looks like:
* [command, 0, ..., 0, 0]
* to which the device responds
* [CMD_RESP, command, arg1, arg2, 0, ..., 0, 0]
* */
#ifndef USB_COMMANDS_H
#define USB_COMMANDS_H
#define CMD_ACK 0xAF
#define CMD_RESP 0xBF
#define CMD_BL_ON 0x10
#define CMD_BL_OFF 0x11
#define CMD_BL_LEVEL 0x12
#define CMD_BL_UP 0x13
#define CMD_BL_DOWN 0x14
#define CMD_BL_GET_STATE 0x1F
#define CMD_RGB_SET 0x20
#define CMD_RGB_GET 0x2F
#endif
|
Document the usb protocol (ish)
|
Document the usb protocol (ish)
|
C
|
bsd-3-clause
|
OSCARAdapter/OSCAR,OSCARAdapter/OSCAR
|
7f4a6b31a7c33625be1f3f3aec199c4c0dcc55f6
|
mach/i86/ce/mach.c
|
mach/i86/ce/mach.c
|
#define CODE_EXPANDER
#include <system.h>
#include "back.h"
#include "mach.h"
#ifdef DEBUG
arg_error( s, arg)
char *s;
int arg;
{
fprint( STDERR, "arg_error %s %d\n", s, arg);
}
#endif
int push_waiting = FALSE;
int fit_byte( val)
int val;
{
return( val >= -128 && val <= 127);
}
#include <con_float>
|
#define CODE_EXPANDER
#include <system.h>
#include "back.h"
#include "mach.h"
#ifdef DEBUG
arg_error( s, arg)
char *s;
int arg;
{
fprint( STDERR, "arg_error %s %d\n", s, arg);
}
#endif
int push_waiting = FALSE;
int fit_byte( val)
int val;
{
return( val >= -128 && val <= 127);
}
#define IEEEFLOAT
#define FL_MSL_AT_LOW_ADDRESS 0
#define FL_MSW_AT_LOW_ADDRESS 0
#define FL_MSB_AT_LOW_ADDRESS 0
#include <con_float>
|
Use Intel byte order for floating point
|
Use Intel byte order for floating point
|
C
|
bsd-3-clause
|
Godzil/ack,Godzil/ack,Godzil/ack,Godzil/ack,Godzil/ack
|
2359f8a30abd107f48b2aa0c3fff361da0963ac5
|
lib/win32/wrappers/security_buffer_descriptor.h
|
lib/win32/wrappers/security_buffer_descriptor.h
|
#ifndef SECURITY_BUFFER_DESCRIPTOR_H
#define SECURITY_BUFFER_DESCRIPTOR_H
#include <node.h>
#include <node_object_wrap.h>
#include <v8.h>
#include <windows.h>
#include <sspi.h>
#include "nan.h"
using namespace v8;
using namespace node;
class SecurityBufferDescriptor : public ObjectWrap {
public:
Local<Array> arrayObject;
SecBufferDesc secBufferDesc;
SecurityBufferDescriptor();
SecurityBufferDescriptor(const Persistent<Array>& arrayObjectPersistent);
~SecurityBufferDescriptor();
// Has instance check
static inline bool HasInstance(Handle<Value> val) {
if (!val->IsObject()) return false;
Local<Object> obj = val->ToObject();
return NanNew(constructor_template)->HasInstance(obj);
};
char *toBuffer();
size_t bufferSize();
// Functions available from V8
static void Initialize(Handle<Object> target);
static NAN_METHOD(ToBuffer);
// Constructor used for creating new Long objects from C++
static Persistent<FunctionTemplate> constructor_template;
private:
static NAN_METHOD(New);
};
#endif
|
#ifndef SECURITY_BUFFER_DESCRIPTOR_H
#define SECURITY_BUFFER_DESCRIPTOR_H
#include <node.h>
#include <node_object_wrap.h>
#include <v8.h>
#include <WinSock2.h>
#include <windows.h>
#include <sspi.h>
#include "nan.h"
using namespace v8;
using namespace node;
class SecurityBufferDescriptor : public ObjectWrap {
public:
Local<Array> arrayObject;
SecBufferDesc secBufferDesc;
SecurityBufferDescriptor();
SecurityBufferDescriptor(const Persistent<Array>& arrayObjectPersistent);
~SecurityBufferDescriptor();
// Has instance check
static inline bool HasInstance(Handle<Value> val) {
if (!val->IsObject()) return false;
Local<Object> obj = val->ToObject();
return NanNew(constructor_template)->HasInstance(obj);
};
char *toBuffer();
size_t bufferSize();
// Functions available from V8
static void Initialize(Handle<Object> target);
static NAN_METHOD(ToBuffer);
// Constructor used for creating new Long objects from C++
static Persistent<FunctionTemplate> constructor_template;
private:
static NAN_METHOD(New);
};
#endif
|
Fix windows build issue for node v0.12
|
Fix windows build issue for node v0.12
|
C
|
apache-2.0
|
dmansfield/kerberos,dmansfield/kerberos,artakvg/kerberos,bazineta/kerberos,artakvg/kerberos,bazineta/kerberos,artakvg/kerberos,christkv/kerberos,christkv/kerberos,artakvg/kerberos,christkv/kerberos,bazineta/kerberos,bazineta/kerberos,christkv/kerberos,dmansfield/kerberos,dmansfield/kerberos
|
2cce788361f527358010a60e5e78b731ea21ac3e
|
Programs/scr_hurd.h
|
Programs/scr_hurd.h
|
/*
* BRLTTY - A background process providing access to the console screen (when in
* text mode) for a blind person using a refreshable braille display.
*
* Copyright (C) 1995-2005 by The BRLTTY Team. All rights reserved.
*
* BRLTTY comes with ABSOLUTELY NO WARRANTY.
*
* This is free software, placed under the terms of the
* GNU General Public License, as published by the Free Software
* Foundation. Please see the file COPYING for details.
*
* Web Page: http://mielke.cc/brltty/
*
* This software is maintained by Dave Mielke <dave@mielke.cc>.
*/
#ifndef BRLTTY_INCLUDED_SCR_HURD
#define BRLTTY_INCLUDED_SCR_HURD
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define HURD_CONSDIR "/dev/cons"
#define HURD_VCSDIR "/dev/vcs"
#define HURD_INPUTPATH HURD_VCSDIR "/input"
#define HURD_DISPLAYPATH HURD_VCSDIR "/display"
#define HURD_CURVCSPATH HURD_CONSDIR "/vcs"
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* BRLTTY_INCLUDED_SCR_HURD */
|
/*
* BRLTTY - A background process providing access to the console screen (when in
* text mode) for a blind person using a refreshable braille display.
*
* Copyright (C) 1995-2005 by The BRLTTY Team. All rights reserved.
*
* BRLTTY comes with ABSOLUTELY NO WARRANTY.
*
* This is free software, placed under the terms of the
* GNU General Public License, as published by the Free Software
* Foundation. Please see the file COPYING for details.
*
* Web Page: http://mielke.cc/brltty/
*
* This software is maintained by Dave Mielke <dave@mielke.cc>.
*/
#ifndef BRLTTY_INCLUDED_SCR_HURD
#define BRLTTY_INCLUDED_SCR_HURD
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define HURD_CONSDIR "/dev/cons"
#define HURD_VCSDIR "/dev/vcs"
#define HURD_INPUTPATH HURD_VCSDIR "/%u/input"
#define HURD_DISPLAYPATH HURD_VCSDIR "/%u/display"
#define HURD_CURVCSPATH HURD_CONSDIR "/vcs"
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* BRLTTY_INCLUDED_SCR_HURD */
|
Support access to individual Hurd consoles. (st)
|
Support access to individual Hurd consoles. (st)
git-svn-id: 30a5f035a20f1bc647618dbad7eea2a951b61b7c@1435 91a5dbb7-01b9-0310-9b5f-b28072856b6e
|
C
|
lgpl-2.1
|
brltty/brltty,brltty/brltty,brltty/brltty,brltty/brltty,brltty/brltty,brltty/brltty
|
d369eecbd4599661c420631d60fc357590bfb04a
|
mordor/streams/timeout.h
|
mordor/streams/timeout.h
|
#ifndef __MORDOR_TIMEOUT_STREAM__
#define __MORDOR_TIMEOUT_STREAM__
// Copyright (c) 2010 - Mozy, Inc.
#include "filter.h"
#include "scheduler.h"
namespace Mordor {
class TimerManager;
class Timer;
class TimeoutStream : public FilterStream
{
public:
typedef boost::shared_ptr<TimeoutStream> ptr;
public:
TimeoutStream(Stream::ptr parent, TimerManager &timerManager, bool own = true)
: FilterStream(parent),
m_timerManager(timerManager),
m_readTimeout(~0ull),
m_writeTimeout(~0ull)
{}
unsigned long long readTimeout() const { return m_readTimeout; }
void readTimeout(unsigned long long readTimeout);
unsigned long long writeTimeout() const { return m_writeTimeout; }
void writeTimeout(unsigned long long writeTimeout);
size_t read(Buffer &buffer, size_t length);
size_t write(const Buffer &buffer, size_t length);
private:
TimerManager &m_timerManager;
unsigned long long m_readTimeout, m_writeTimeout;
bool m_readTimedOut, m_writeTimedOut;
boost::shared_ptr<Timer> m_readTimer, m_writeTimer;
FiberMutex m_mutex;
};
}
#endif
|
#ifndef __MORDOR_TIMEOUT_STREAM__
#define __MORDOR_TIMEOUT_STREAM__
// Copyright (c) 2010 - Mozy, Inc.
#include "filter.h"
#include "scheduler.h"
namespace Mordor {
class TimerManager;
class Timer;
class TimeoutStream : public FilterStream
{
public:
typedef boost::shared_ptr<TimeoutStream> ptr;
public:
TimeoutStream(Stream::ptr parent, TimerManager &timerManager, bool own = true)
: FilterStream(parent),
m_timerManager(timerManager),
m_readTimeout(~0ull),
m_writeTimeout(~0ull),
m_readTimedOut(true),
m_writeTimedOut(true)
{}
unsigned long long readTimeout() const { return m_readTimeout; }
void readTimeout(unsigned long long readTimeout);
unsigned long long writeTimeout() const { return m_writeTimeout; }
void writeTimeout(unsigned long long writeTimeout);
size_t read(Buffer &buffer, size_t length);
size_t write(const Buffer &buffer, size_t length);
private:
TimerManager &m_timerManager;
unsigned long long m_readTimeout, m_writeTimeout;
bool m_readTimedOut, m_writeTimedOut;
boost::shared_ptr<Timer> m_readTimer, m_writeTimer;
FiberMutex m_mutex;
};
}
#endif
|
Initialize some vars so we don't register for a timer when there's not a call oustanding
|
Initialize some vars so we don't register for a timer when there's not a call oustanding
Change-Id: I690bc333f35cb5aaa196d4f4bbcc11dfee4083df
Reviewed-on: https://gerrit.dechocorp.com/4912
Reviewed-by: Jeremy Stanley <8cc48e55af0ea00a29d3ccf3190022dccfb4961b@decho.com>
|
C
|
bsd-3-clause
|
cgaebel/mordor,mtanski/mordor,mtanski/mordor,mtanski/mordor,adfin/mordor,adfin/mordor,ccutrer/mordor,mozy/mordor,adfin/mordor,ccutrer/mordor,mozy/mordor,ccutrer/mordor,cgaebel/mordor,mozy/mordor
|
dce2fa5ec185b39846e93204b2e273beae2e7ff6
|
ext/libzdb/connection_pool.c
|
ext/libzdb/connection_pool.c
|
#include <connection_pool.h>
static void deallocate(ConnectionPool_T *pool)
{
ConnectionPool_stop(*pool);
ConnectionPool_free(pool);
}
/*
* Wrap libzdb's connection pool in a ruby object
*/
static VALUE allocate(VALUE klass)
{
ConnectionPool_T *pool;
return Data_Wrap_Struct(klass, NULL, deallocate, pool);
}
static VALUE initialize(VALUE self, VALUE rb_string)
{
Check_Type(rb_string, T_STRING);
ConnectionPool_T *poolPtr;
ConnectionPool_T pool;
URL_T url;
char *url_string;
Data_Get_Struct(self, ConnectionPool_T, poolPtr);
url_string = StringValueCStr(rb_string);
url = URL_new(url_string);
pool = ConnectionPool_new(url);
ConnectionPool_start(pool);
poolPtr = &pool;
URL_free(&url);
return self;
}
VALUE cLibzdbConnectionPool;
void init_connection_pool()
{
VALUE libzdb = rb_define_module("Libzdb");
VALUE klass = rb_define_class_under(libzdb, "ConnectionPool", rb_cObject);
cLibzdbConnectionPool = klass;
rb_define_alloc_func(cLibzdbConnectionPool, allocate);
rb_define_method(cLibzdbConnectionPool, "initialize", initialize, 1);
}
|
#include <connection_pool.h>
static void deallocate(ConnectionPool_T *pool)
{
ConnectionPool_stop(*pool);
ConnectionPool_free(pool);
}
static VALUE allocate(VALUE klass)
{
ConnectionPool_T *pool = malloc(sizeof(ConnectionPool_T));
return Data_Wrap_Struct(klass, NULL, deallocate, pool);
}
static VALUE initialize(VALUE self, VALUE rb_string)
{
Check_Type(rb_string, T_STRING);
ConnectionPool_T *pool;
char *url_string = StringValueCStr(rb_string);
URL_T url = URL_new(url_string);
Data_Get_Struct(self, ConnectionPool_T, pool);
*pool = ConnectionPool_new(url);
ConnectionPool_start(*pool);
URL_free(&url);
return self;
}
VALUE cLibzdbConnectionPool;
void init_connection_pool()
{
VALUE libzdb = rb_define_module("Libzdb");
VALUE klass = rb_define_class_under(libzdb, "ConnectionPool", rb_cObject);
cLibzdbConnectionPool = klass;
rb_define_alloc_func(cLibzdbConnectionPool, allocate);
rb_define_method(cLibzdbConnectionPool, "initialize", initialize, 1);
}
|
Make sure that we allocate something at our pointer and assign our init’d pool to the pointers value.
|
Make sure that we allocate something at our pointer and assign our init’d pool to the pointers value.
|
C
|
mit
|
clowder/libzdb
|
b374c810d36bffa656b626855d79f19efc6dd2ef
|
src/android/AndroidOpenGLInitEvent.h
|
src/android/AndroidOpenGLInitEvent.h
|
#ifndef _ANDROIDOPENGLINITEVENT_H_
#define _ANDROIDOPENGLINITEVENT_H_
#include <OpenGLInitEvent.h>
#include <android/native_window.h>
class AndroidOpenGLInitEvent : public OpenGLInitEvent {
public:
AndroidOpenGLInitEvent(double _timestamp, int _opengl_es_version, ANativeWindow * _window)
: OpenGLInitEvent(_timestamp, _opengl_es_version), window(_window) { }
ANativeWindow * getWindow() { return window; }
std::shared_ptr<EventBase> dup() const { return std::make_shared<AndroidOpenGLInitEvent>(*this); }
void dispatch(Element & element);
private:
ANativeWindow * window = 0;
};
#endif
|
#ifndef _ANDROIDOPENGLINITEVENT_H_
#define _ANDROIDOPENGLINITEVENT_H_
#include <OpenGLInitEvent.h>
#include <android/native_window.h>
class AndroidOpenGLInitEvent : public OpenGLInitEvent {
public:
AndroidOpenGLInitEvent(double _timestamp, int _opengl_es_version, ANativeWindow * _window)
: OpenGLInitEvent(_timestamp, _opengl_es_version), window(_window) { }
ANativeWindow * getWindow() { return window; }
std::shared_ptr<EventBase> dup() const { return std::make_shared<AndroidOpenGLInitEvent>(*this); }
void dispatch(Element & element) { }
private:
ANativeWindow * window = 0;
};
#endif
|
Add Todo implementation to dispatch
|
Add Todo implementation to dispatch
|
C
|
mit
|
Sometrik/framework,Sometrik/framework,Sometrik/framework
|
06e1571bd5cd88cac8f764b0e4e8a48503c737f5
|
src/Walker.h
|
src/Walker.h
|
//! \file Walker.h
#ifndef _WALKER_H
#define _WALKER_H
#include "ArticleCollection.h"
//! Base class for article analyzers
class Walker
{
protected:
//! article collection, used as cache, for walked articles
ArticleCollection articleSet;
};
#endif // _WALKER_H
|
//! \file Walker.h
#ifndef _WALKER_H
#define _WALKER_H
#include "ArticleCollection.h"
//! Base class for article analyzers
class Walker
{
public:
const ArticleCollection& getCollection() const
{
return articleSet;
}
protected:
//! article collection, used as cache, for walked articles
ArticleCollection articleSet;
};
#endif // _WALKER_H
|
Add method to get const article collection in walker
|
Add method to get const article collection in walker
so I don't have to do everything within that class...
|
C
|
mit
|
dueringa/WikiWalker
|
c8d52465f95c4187871f8e65666c07806ca06d41
|
include/linux/compiler-gcc.h
|
include/linux/compiler-gcc.h
|
/* Never include this file directly. Include <linux/compiler.h> instead. */
/*
* Common definitions for all gcc versions go here.
*/
/* Optimization barrier */
/* The "volatile" is due to gcc bugs */
#define barrier() __asm__ __volatile__("": : :"memory")
/* This macro obfuscates arithmetic on a variable address so that gcc
shouldn't recognize the original var, and make assumptions about it */
#define RELOC_HIDE(ptr, off) \
({ unsigned long __ptr; \
__asm__ ("" : "=g"(__ptr) : "0"(ptr)); \
(typeof(ptr)) (__ptr + (off)); })
#define inline inline __attribute__((always_inline))
#define __inline__ __inline__ __attribute__((always_inline))
#define __inline __inline __attribute__((always_inline))
#define __deprecated __attribute__((deprecated))
#define noinline __attribute__((noinline))
#define __attribute_pure__ __attribute__((pure))
#define __attribute_const__ __attribute__((__const__))
|
/* Never include this file directly. Include <linux/compiler.h> instead. */
/*
* Common definitions for all gcc versions go here.
*/
/* Optimization barrier */
/* The "volatile" is due to gcc bugs */
#define barrier() __asm__ __volatile__("": : :"memory")
/* This macro obfuscates arithmetic on a variable address so that gcc
shouldn't recognize the original var, and make assumptions about it */
/*
* Versions of the ppc64 compiler before 4.1 had a bug where use of
* RELOC_HIDE could trash r30. The bug can be worked around by changing
* the inline assembly constraint from =g to =r, in this particular
* case either is valid.
*/
#define RELOC_HIDE(ptr, off) \
({ unsigned long __ptr; \
__asm__ ("" : "=r"(__ptr) : "0"(ptr)); \
(typeof(ptr)) (__ptr + (off)); })
#define inline inline __attribute__((always_inline))
#define __inline__ __inline__ __attribute__((always_inline))
#define __inline __inline __attribute__((always_inline))
#define __deprecated __attribute__((deprecated))
#define noinline __attribute__((noinline))
#define __attribute_pure__ __attribute__((pure))
#define __attribute_const__ __attribute__((__const__))
|
Work around ppc64 compiler bug
|
[PATCH] Work around ppc64 compiler bug
In the process of optimising our per cpu data code, I found a ppc64
compiler bug that has been around forever. Basically the current
RELOC_HIDE can end up trashing r30. Details of the bug can be found at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25572
This bug is present in all compilers before 4.1. It is masked by the
fact that our current per cpu data code is inefficient and causes
other loads that end up marking r30 as used.
A workaround identified by Alan Modra is to use the =r asm constraint
instead of =g.
Signed-off-by: Anton Blanchard <14deb5e5e417133e888bf47bb6a3555c9bb7d81c@samba.org>
[ Verified that this makes no real difference on x86[-64] */
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@osdl.org>
|
C
|
mit
|
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
|
535aa1e979070a2f57d1a7e17e03d2dd1a4aae1e
|
ReQL.h
|
ReQL.h
|
/**
* @author Adam Grandquist
*/
#include "ReQL-ast.h"
#ifndef _REQL_H
#define _REQL_H
struct _ReQL_Conn_s {
int socket;
int error;
char *buf;
unsigned int max_token;
struct _ReQL_Cur_s **cursor;
};
typedef struct _ReQL_Conn_s _ReQL_Conn_t;
struct _ReQL_Cur_s {
};
typedef struct _ReQL_Cur_s _ReQL_Cur_t;
int _reql_connect(_ReQL_Conn_t *conn, unsigned char host_len, char *host, unsigned char port);
int _reql_close_conn(_ReQL_Conn_t *conn);
_ReQL_Cur_t *_reql_run(_ReQL_Op_t *query, _ReQL_Conn_t *conn, _ReQL_Op_t *kwargs);
void _reql_next(_ReQL_Cur_t *cur);
void _reql_close_cur(_ReQL_Cur_t *cur);
#endif
|
/**
* @author Adam Grandquist
*/
#include "ReQL-ast.h"
#ifndef _REQL_H
#define _REQL_H
struct _ReQL_Conn_s {
int socket;
int error;
char *buf;
unsigned int max_token;
struct _ReQL_Cur_s **cursor;
};
typedef struct _ReQL_Conn_s _ReQL_Conn_t;
struct _ReQL_Cur_s {
_ReQL_Conn_t *conn;
unsigned int idx;
_ReQL_Op_t *response;
};
typedef struct _ReQL_Cur_s _ReQL_Cur_t;
int _reql_connect(_ReQL_Conn_t *conn, unsigned char host_len, char *host, unsigned char port);
int _reql_close_conn(_ReQL_Conn_t *conn);
_ReQL_Cur_t *_reql_run(_ReQL_Op_t *query, _ReQL_Conn_t *conn, _ReQL_Op_t *kwargs);
void _reql_next(_ReQL_Cur_t *cur);
void _reql_close_cur(_ReQL_Cur_t *cur);
#endif
|
Add connection and response to cursors.
|
Add connection and response to cursors.
|
C
|
apache-2.0
|
grandquista/ReQL-Core,grandquista/ReQL-Core,grandquista/ReQL-Core,grandquista/ReQL-Core
|
0d16255d093a3292abaf0b07e21ddebc956e7ca3
|
tests/utils.h
|
tests/utils.h
|
#include <string>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/fcntl.h>
using namespace std;
inline string copyFile(const string &filename, const string &ext)
{
string newname = string(tempnam(NULL, NULL)) + ext;
string oldname = string("data/") + filename + ext;
char buffer[4096];
int bytes;
int inf = open(oldname.c_str(), O_RDONLY);
int outf = open(newname.c_str(), O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR);
while((bytes = read(inf, buffer, sizeof(buffer))) > 0)
write(outf, buffer, bytes);
close(outf);
close(inf);
return newname;
}
inline void deleteFile(const string &filename)
{
remove(filename.c_str());
}
class ScopedFileCopy
{
public:
ScopedFileCopy(const string &filename, const string &ext)
{
m_filename = copyFile(filename, ext);
}
~ScopedFileCopy()
{
deleteFile(m_filename);
}
string fileName()
{
return m_filename;
}
private:
string m_filename;
};
|
#ifdef _WIN32
#include <windows.h>
#else
#include <unistd.h>
#include <fcntl.h>
#include <sys/fcntl.h>
#endif
#include <stdio.h>
#include <string>
using namespace std;
inline string copyFile(const string &filename, const string &ext)
{
string newname = string(tempnam(NULL, NULL)) + ext;
string oldname = string("data/") + filename + ext;
#ifdef _WIN32
CopyFile(oldname.c_str(), newname.c_str(), FALSE);
SetFileAttributes(newname.c_str(), GetFileAttributes(newname.c_str()) & ~FILE_ATTRIBUTE_READONLY);
#else
char buffer[4096];
int bytes;
int inf = open(oldname.c_str(), O_RDONLY);
int outf = open(newname.c_str(), O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR);
while((bytes = read(inf, buffer, sizeof(buffer))) > 0)
write(outf, buffer, bytes);
close(outf);
close(inf);
#endif
return newname;
}
inline void deleteFile(const string &filename)
{
remove(filename.c_str());
}
class ScopedFileCopy
{
public:
ScopedFileCopy(const string &filename, const string &ext)
{
m_filename = copyFile(filename, ext);
}
~ScopedFileCopy()
{
deleteFile(m_filename);
}
string fileName()
{
return m_filename;
}
private:
string m_filename;
};
|
Fix compilation fo the test runner on Windows
|
Fix compilation fo the test runner on Windows
Patch by Stephen Hewitt
git-svn-id: 7928e23e4d58c5ca14aa7b47c53aeff82ee1dd0c@1078612 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
|
C
|
lgpl-2.1
|
dlz1123/taglib,black78/taglib,taglib/taglib,davispuh/taglib,pbhd/taglib,videolabs/taglib,videolabs/taglib,TsudaKageyu/taglib,taglib/taglib,MaxLeb/taglib,pbhd/taglib,Distrotech/taglib,pbhd/taglib,crystax/cosp-android-taglib,dlz1123/taglib,crystax/cosp-android-taglib,davispuh/taglib,Distrotech/taglib,dlz1123/taglib,TsudaKageyu/taglib,i80and/taglib,i80and/taglib,TsudaKageyu/taglib,taglib/taglib,i80and/taglib,Distrotech/taglib,videolabs/taglib,MaxLeb/taglib,MaxLeb/taglib,black78/taglib,davispuh/taglib,black78/taglib
|
ffbc0b4a8ff278d4eefd47f4ae0016eaf75641b1
|
framework/Source/iOS/GPUImageView.h
|
framework/Source/iOS/GPUImageView.h
|
#import <UIKit/UIKit.h>
#import "GPUImageContext.h"
typedef enum {
kGPUImageFillModeStretch, // Stretch to fill the full view, which may distort the image outside of its normal aspect ratio
kGPUImageFillModePreserveAspectRatio, // Maintains the aspect ratio of the source image, adding bars of the specified background color
kGPUImageFillModePreserveAspectRatioAndFill // Maintains the aspect ratio of the source image, zooming in on its center to fill the view
} GPUImageFillModeType;
/**
UIView subclass to use as an endpoint for displaying GPUImage outputs
*/
@interface GPUImageView : UIView <GPUImageInput>
{
GPUImageRotationMode inputRotation;
}
/** The fill mode dictates how images are fit in the view, with the default being kGPUImageFillModePreserveAspectRatio
*/
@property(readwrite, nonatomic) GPUImageFillModeType fillMode;
/** This calculates the current display size, in pixels, taking into account Retina scaling factors
*/
@property(readonly, nonatomic) CGSize sizeInPixels;
@property(nonatomic) BOOL enabled;
/** Handling fill mode
@param redComponent Red component for background color
@param greenComponent Green component for background color
@param blueComponent Blue component for background color
@param alphaComponent Alpha component for background color
*/
- (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent;
- (void)setCurrentlyReceivingMonochromeInput:(BOOL)newValue;
@end
|
#import <UIKit/UIKit.h>
#import "GPUImageContext.h"
typedef NS_ENUM(NSUInteger, GPUImageFillModeType) {
kGPUImageFillModeStretch, // Stretch to fill the full view, which may distort the image outside of its normal aspect ratio
kGPUImageFillModePreserveAspectRatio, // Maintains the aspect ratio of the source image, adding bars of the specified background color
kGPUImageFillModePreserveAspectRatioAndFill // Maintains the aspect ratio of the source image, zooming in on its center to fill the view
};
/**
UIView subclass to use as an endpoint for displaying GPUImage outputs
*/
@interface GPUImageView : UIView <GPUImageInput>
{
GPUImageRotationMode inputRotation;
}
/** The fill mode dictates how images are fit in the view, with the default being kGPUImageFillModePreserveAspectRatio
*/
@property(readwrite, nonatomic) GPUImageFillModeType fillMode;
/** This calculates the current display size, in pixels, taking into account Retina scaling factors
*/
@property(readonly, nonatomic) CGSize sizeInPixels;
@property(nonatomic) BOOL enabled;
/** Handling fill mode
@param redComponent Red component for background color
@param greenComponent Green component for background color
@param blueComponent Blue component for background color
@param alphaComponent Alpha component for background color
*/
- (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent;
- (void)setCurrentlyReceivingMonochromeInput:(BOOL)newValue;
@end
|
Update GPUImageFillModeType enum to use NS_ENUM
|
Update GPUImageFillModeType enum to use NS_ENUM
|
C
|
bsd-3-clause
|
wysaid/GPUImage,eighteight/GPUImage,UndaApp/GPUImage,lacyrhoades/GPUImage,wfxiang08/GPUImage,wfxiang08/GPUImage,catbus/GPUImage,eighteight/GPUImage,BradLarson/GPUImage,birthmark/GPUImage,wysaid/GPUImage,PlanetaToBe/GPUImage,lacyrhoades/GPUImage,shi-yan/GPUImage,eighteight/GPUImage,catbus/GPUImage,msfeldstein/GPUImage,jakeva/GPUImage,wysaid/GPUImage,birthmark/GPUImage,PlanetaToBe/GPUImage,msfeldstein/GPUImage,BradLarson/GPUImage,jakeva/GPUImage,BradLarson/GPUImage,shi-yan/GPUImage,UndaApp/GPUImage
|
82ea549661f657e5925808355322ad6606808428
|
rand.h
|
rand.h
|
/**
* Copyright (c) 2013-2014 Tomas Dzetkulic
* Copyright (c) 2013-2014 Pavol Rusnak
*
* 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.
*/
#ifndef __RAND_H__
#define __RAND_H__
#include <stdint.h>
void init_rand(void);
int finalize_rand(void);
uint32_t random32(void);
void random_buffer(uint8_t *buf, size_t len);
#endif
|
/**
* Copyright (c) 2013-2014 Tomas Dzetkulic
* Copyright (c) 2013-2014 Pavol Rusnak
*
* 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.
*/
#ifndef __RAND_H__
#define __RAND_H__
#include <stdlib.h>
#include <stdint.h>
void init_rand(void);
int finalize_rand(void);
uint32_t random32(void);
void random_buffer(uint8_t *buf, size_t len);
#endif
|
Add `stdlib.h` to header. Needed for `size_t`.
|
Add `stdlib.h` to header. Needed for `size_t`.
|
C
|
mit
|
romanz/trezor-crypto,trezor/trezor-crypto,trezor/trezor-crypto,01BTC10/trezor-crypto,trezor/trezor-crypto,trezor/trezor-crypto,runn1ng/trezor-crypto,runn1ng/trezor-crypto,01BTC10/trezor-crypto,trezor/trezor-crypto,jhoenicke/trezor-crypto,romanz/trezor-crypto,romanz/trezor-crypto,runn1ng/trezor-crypto,runn1ng/trezor-crypto,runn1ng/trezor-crypto,romanz/trezor-crypto,jhoenicke/trezor-crypto,romanz/trezor-crypto,jhoenicke/trezor-crypto,01BTC10/trezor-crypto,jhoenicke/trezor-crypto,jhoenicke/trezor-crypto
|
5702f86c31305d5029f8d9d8bff02bb6b727a06a
|
utils/Hash.h
|
utils/Hash.h
|
#ifndef HASH_H
#define HASH_H
#include <unordered_map>
#include <unordered_set>
template <typename K, typename V>
using HashMap = std::unordered_map<K, V>;
template <typename T>
using HashSet = std::unordered_set<T>;
#endif // HASH_H
|
#ifndef HASH_H
#define HASH_H
#include <cstdint>
#include <unordered_map>
#include <unordered_set>
template <typename K, typename V>
using HashMap = std::unordered_map<K, V>;
template <typename T>
using HashSet = std::unordered_set<T>;
// These come from boost
// Copyright 2005-2014 Daniel James.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
static inline uint32_t combineHashes(uint32_t seed, uint32_t value) {
seed ^= value + 0x9e3779b9 + (seed << 6) + (seed >> 2);
return seed;
}
static inline uint64_t combineHashes(uint64_t h, uint64_t k) {
const uint64_t m = 0xc6a4a7935bd1e995UL;
const int r = 47;
k *= m;
k ^= k >> r;
k *= m;
h ^= k;
h *= m;
// Completely arbitrary number, to prevent 0's
// from hashing to 0.
h += 0xe6546b64;
return h;
}
template <typename It>
size_t hashRange(It b, It e) {
size_t h = 0;
for (It it = b; it != e; it++) {
h = combineHashes(h, std::hash<typename It::value_type>()(*it));
}
return h;
}
#endif // HASH_H
|
Add some hashing utility functions
|
Add some hashing utility functions
|
C
|
mit
|
turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo
|
0e2a0195a37b492cfa9bfc1b985d8c82fc957e70
|
src/heap_example.c
|
src/heap_example.c
|
// cc heap_example.c heap.c
#include <assert.h>
#include <stdio.h>
#include "bool.h"
#include "heap.h"
/* heap data comparator: return true if a < b */
bool
cmp(void *a, void *b)
{
return *(int *)a < *(int *)b;
}
int main(int argc, const char *argv[])
{
/* allocate empty heap with comparator */
struct heap *heap = heap(cmp);
/* push data into heap */
int a = 4, b = 1, c = 3, d = 2;
assert(heap_push(heap, &a) == HEAP_OK);
assert(heap_push(heap, &b) == HEAP_OK);
assert(heap_push(heap, &c) == HEAP_OK);
assert(heap_push(heap, &d) == HEAP_OK);
/* get current smallest data */
printf("smallest: %d\n", *(int *)heap_top(heap));
/* pop and print all data (should be in order) */
while (heap_len(heap) != 0)
printf("%d\n", *(int *)heap_pop(heap));
/* free heap */
heap_free(heap);
return 0;
}
|
// cc heap_example.c heap.c
#include <assert.h>
#include <stdio.h>
#include "bool.h"
#include "heap.h"
/* heap data comparator: return true if a < b */
bool
cmp(void *a, void *b)
{
return *(int *)a < *(int *)b;
}
int main(int argc, const char *argv[])
{
/* allocate empty heap with comparator */
struct heap *heap = heap(cmp);
/* push data into heap */
int a = 4, b = 1, c = 3, d = 2, e = 5;
assert(heap_push(heap, &a) == HEAP_OK);
assert(heap_push(heap, &b) == HEAP_OK);
assert(heap_push(heap, &c) == HEAP_OK);
assert(heap_push(heap, &d) == HEAP_OK);
assert(heap_push(heap, &e) == HEAP_OK);
/* get current heap memory capacity (or memory allocated) */
printf("current heap allocated memory: %zu\n", heap_cap(heap));
printf("current heap length: %zu\n", heap_len(heap));
/* get current smallest data */
printf("smallest: %d\n", *(int *)heap_top(heap));
/* pop and print all data (should be in order) */
while (heap_len(heap) != 0)
printf("%d\n", *(int *)heap_pop(heap));
/* free heap */
heap_free(heap);
return 0;
}
|
Add `heap_len` and `heap_cap` to example
|
Add `heap_len` and `heap_cap` to example
|
C
|
bsd-2-clause
|
hit9/C-Snip,hit9/C-Snip
|
48fdf76623cdc40fdf94eae554eb13b5c9c512c9
|
src/mlt++/config.h
|
src/mlt++/config.h
|
/**
* config.h - Convenience header file for all mlt++ objects
* Copyright (C) 2004-2005 Charles Yates
* Author: Charles Yates <charles.yates@pandora.be>
*
* 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 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef MLTPP_CONFIG_H_
#define MLTPP_CONFIG_H_
#ifdef WIN32
#ifdef MLTPP_EXPORTS
#define MLTPP_DECLSPEC __declspec( dllexport )
#else
#define MLTPP_DECLSPEC __declspec( dllimport )
#endif
#else
#define MLTPP_DECLSPEC
#endif
#endif
|
/**
* config.h - Convenience header file for all mlt++ objects
* Copyright (C) 2004-2005 Charles Yates
* Author: Charles Yates <charles.yates@pandora.be>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MLTPP_CONFIG_H_
#define MLTPP_CONFIG_H_
#ifdef WIN32
#ifdef MLTPP_EXPORTS
#define MLTPP_DECLSPEC __declspec( dllexport )
#else
#define MLTPP_DECLSPEC __declspec( dllimport )
#endif
#else
#define MLTPP_DECLSPEC
#endif
#endif
|
Fix license in comment header.
|
Fix license in comment header.
Signed-off-by: Dan Dennedy <2591e5f46f28d303f9dc027d475a5c60d8dea17a@dennedy.org>
|
C
|
lgpl-2.1
|
ttill/MLT-roto-tracking,xzhavilla/mlt,j-b-m/mlt,ttill/MLT-roto-tracking,rayl/MLT,wideioltd/mlt,ttill/MLT-roto-tracking,rayl/MLT,ttill/MLT-roto-tracking,xzhavilla/mlt,wideioltd/mlt,mltframework/mlt,ttill/MLT,xzhavilla/mlt,xzhavilla/mlt,zzhhui/mlt,zzhhui/mlt,xzhavilla/mlt,siddharudh/mlt,ttill/MLT-roto,ttill/MLT-roto,rayl/MLT,wideioltd/mlt,gmarco/mlt-orig,anba8005/mlt,gmarco/mlt-orig,wideioltd/mlt,ttill/MLT-roto-tracking,gmarco/mlt-orig,wideioltd/mlt,ttill/MLT,zzhhui/mlt,ttill/MLT,ttill/MLT-roto,mltframework/mlt,anba8005/mlt,zzhhui/mlt,xzhavilla/mlt,xzhavilla/mlt,ttill/MLT,mltframework/mlt,mltframework/mlt,j-b-m/mlt,ttill/MLT-roto-tracking,anba8005/mlt,gmarco/mlt-orig,rayl/MLT,mltframework/mlt,rayl/MLT,gmarco/mlt-orig,anba8005/mlt,rayl/MLT,ttill/MLT-roto,ttill/MLT,xzhavilla/mlt,j-b-m/mlt,ttill/MLT-roto,ttill/MLT-roto-tracking,ttill/MLT-roto,siddharudh/mlt,j-b-m/mlt,wideioltd/mlt,ttill/MLT-roto,ttill/MLT-roto-tracking,siddharudh/mlt,ttill/MLT-roto-tracking,gmarco/mlt-orig,zzhhui/mlt,ttill/MLT,ttill/MLT,gmarco/mlt-orig,rayl/MLT,ttill/MLT-roto,anba8005/mlt,j-b-m/mlt,zzhhui/mlt,zzhhui/mlt,ttill/MLT,siddharudh/mlt,j-b-m/mlt,zzhhui/mlt,j-b-m/mlt,siddharudh/mlt,siddharudh/mlt,zzhhui/mlt,xzhavilla/mlt,mltframework/mlt,siddharudh/mlt,anba8005/mlt,mltframework/mlt,siddharudh/mlt,ttill/MLT,wideioltd/mlt,mltframework/mlt,mltframework/mlt,rayl/MLT,mltframework/mlt,ttill/MLT-roto,gmarco/mlt-orig,anba8005/mlt,wideioltd/mlt,j-b-m/mlt,j-b-m/mlt,siddharudh/mlt,wideioltd/mlt,anba8005/mlt,gmarco/mlt-orig,j-b-m/mlt,anba8005/mlt
|
1a36fe45121967f5dd2f94e673d6403339cd6e62
|
include/config/SkUserConfigManual.h
|
include/config/SkUserConfigManual.h
|
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
#define SK_USE_FREETYPE_EMBOLDEN
// Disable these Ganesh features
#define SK_DISABLE_EXPLICIT_GPU_RESOURCE_ALLOCATION
#define SK_DISABLE_RENDER_TARGET_SORTING
// Check error is expensive. HWUI historically also doesn't check its allocations
#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
// Legacy flags
#define SK_IGNORE_GPU_DITHER
#define SK_SUPPORT_DEPRECATED_CLIPOPS
#define SK_SUPPORT_LEGACY_DRAWLOOPER
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#define SK_DISABLE_DAA // skbug.com/6886
#endif // SkUserConfigManual_DEFINED
|
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
#define SK_USE_FREETYPE_EMBOLDEN
// Disable these Ganesh features
#define SK_DISABLE_EXPLICIT_GPU_RESOURCE_ALLOCATION
#define SK_DISABLE_RENDER_TARGET_SORTING
// Check error is expensive. HWUI historically also doesn't check its allocations
#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
// Legacy flags
#define SK_IGNORE_GPU_DITHER
#define SK_SUPPORT_DEPRECATED_CLIPOPS
#define SK_SUPPORT_LEGACY_DRAWLOOPER
#define SK_IGNORE_LINEAR_METRICS_FIX
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#define SK_DISABLE_DAA // skbug.com/6886
#endif // SkUserConfigManual_DEFINED
|
Add SK_IGNORE_LINEAR_METRICS_FIX flag for Skia.
|
Add SK_IGNORE_LINEAR_METRICS_FIX flag for Skia.
This will hold out a Skia change to glyph metric calculation until the
framework can be updated to handle it.
Test: Adds build flag, does nothing right now.
Change-Id: Ibce90e396002ea493cdf545857e0b84f13738ff6
|
C
|
bsd-3-clause
|
aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia
|
324a12829b108130e3d3c5ae27cca2f35186e844
|
src/util/logging.c
|
src/util/logging.c
|
#include <stdlib.h>
#include "logging.h"
char out[512];
debug_mask_t debug_mask = 0;
static int debug_init = 0;
char *print_hex(uint8_t *buf, int count)
{
memset(out, 0, count);
int zz;
for(zz = 0; zz < count; zz++) {
sprintf(out + (zz * 2), "%02X", buf[zz]);
}
return out;
}
void debug(char *file, int line, uint32_t mask, const char *format, ...)
{
char *env;
// Only call getenv() once.
if (!debug_init) {
debug_init = 1;
if ((env = getenv("BD_DEBUG_MASK"))) {
debug_mask = atoi(env);
} else {
debug_mask = 0xffff;
}
}
if (mask & debug_mask) {
char buffer[512];
va_list args;
va_start(args, format);
vsprintf(buffer, format, args);
va_end(args);
fprintf(stderr, "%s:%d: %s", file, line, buffer);
}
}
|
#include <stdlib.h>
#include "logging.h"
char out[512];
debug_mask_t debug_mask = 0;
static int debug_init = 0;
char *print_hex(uint8_t *buf, int count)
{
memset(out, 0, sizeof(out));
int zz;
for(zz = 0; zz < count; zz++) {
sprintf(out + (zz * 2), "%02X", buf[zz]);
}
return out;
}
void debug(char *file, int line, uint32_t mask, const char *format, ...)
{
char *env;
// Only call getenv() once.
if (!debug_init) {
debug_init = 1;
if ((env = getenv("BD_DEBUG_MASK"))) {
debug_mask = atoi(env);
} else {
debug_mask = 0xffff;
}
}
if (mask & debug_mask) {
char buffer[512];
va_list args;
va_start(args, format);
vsprintf(buffer, format, args);
va_end(args);
fprintf(stderr, "%s:%d: %s", file, line, buffer);
}
}
|
Fix potential data corruption bug
|
Fix potential data corruption bug
|
C
|
lgpl-2.1
|
mwgoldsmith/aacs,rraptorr/libaacs,ShiftMediaProject/libaacs,ShiftMediaProject/libaacs,mwgoldsmith/aacs,zxlooong/libaacs,rraptorr/libaacs,zxlooong/libaacs
|
16bdf0090336003786974288f7655d8fcd50c900
|
src/trainer/training_failure.h
|
src/trainer/training_failure.h
|
// This file is part of UDPipe <http://github.com/ufal/udpipe/>.
//
// Copyright 2016 Institute of Formal and Applied Linguistics, Faculty of
// Mathematics and Physics, Charles University in Prague, Czech Republic.
//
// 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/.
#pragma once
#include <sstream>
#include <stdexcept>
#include "common.h"
namespace ufal {
namespace udpipe {
class training_error : public runtime_error {
public:
training_error();
static ostringstream message_collector;
};
#define training_failure(message) throw (training_error::message_collector << message, training_error())
} // namespace udpipe
} // namespace ufal
|
// This file is part of UDPipe <http://github.com/ufal/udpipe/>.
//
// Copyright 2016 Institute of Formal and Applied Linguistics, Faculty of
// Mathematics and Physics, Charles University in Prague, Czech Republic.
//
// 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/.
#pragma once
#include <sstream>
#include <stdexcept>
#include "common.h"
namespace ufal {
namespace udpipe {
namespace utils {
class training_error : public runtime_error {
public:
training_error();
static ostringstream message_collector;
};
#define training_failure(message) throw (training_error::message_collector << message, training_error())
} // namespace utils
} // namespace udpipe
} // namespace ufal
|
Add training_error to utils namespace.
|
Add training_error to utils namespace.
The training_error is used by binary_encoder, which includes only
utils/common.h -- that opens std only in utils namespace, not in
whole ufal::udpipe.
|
C
|
mpl-2.0
|
ufal/udpipe,ufal/udpipe,ufal/udpipe,ufal/udpipe,ufal/udpipe,ufal/udpipe,ufal/udpipe,ufal/udpipe,ufal/udpipe,ufal/udpipe
|
8277a4cdfd0904aa78d144716674aa879bc8ddf8
|
src/test-brightness-manager.c
|
src/test-brightness-manager.c
|
#include <dalston/dalston-brightness-manager.h>
static void
_manager_num_levels_changed_cb (DalstonBrightnessManager *manager,
gint num_levels)
{
g_debug (G_STRLOC ": Num levels changed: %d",
num_levels);
}
int
main (int argc,
char **argv)
{
GMainLoop *loop;
DalstonBrightnessManager *manager;
g_type_init ();
loop = g_main_loop_new (NULL, TRUE);
manager = dalston_brightness_manager_new ();
g_signal_connect (manager,
"num-levels-changed",
_manager_num_levels_changed_cb,
NULL);
g_main_loop_run (loop);
}
|
#include <dalston/dalston-brightness-manager.h>
static void
_manager_num_levels_changed_cb (DalstonBrightnessManager *manager,
gint num_levels)
{
g_debug (G_STRLOC ": Num levels changed: %d",
num_levels);
}
static void
_brightness_changed_cb (DalstonBrightnessManager *manager,
gint value)
{
g_debug (G_STRLOC ": Brightness: %d", value);
}
int
main (int argc,
char **argv)
{
GMainLoop *loop;
DalstonBrightnessManager *manager;
g_type_init ();
loop = g_main_loop_new (NULL, TRUE);
manager = dalston_brightness_manager_new ();
g_signal_connect (manager,
"num-levels-changed",
_manager_num_levels_changed_cb,
NULL);
dalston_brightness_manager_start_monitoring (manager);
g_signal_connect (manager,
"brightness-changed",
_brightness_changed_cb,
NULL);
g_main_loop_run (loop);
}
|
Update the test to listen for brightness changed.
|
Update the test to listen for brightness changed.
|
C
|
lgpl-2.1
|
meego-netbook-ux/meego-panel-devices,meego-netbook-ux/meego-panel-devices,meego-netbook-ux/meego-panel-devices
|
7817e2e0a03e4f9d469ae54c89297c413d4d5b01
|
src/unit_VEHICLE/subsys/ChTerrain.h
|
src/unit_VEHICLE/subsys/ChTerrain.h
|
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================
// Authors: Radu Serban
// =============================================================================
//
// Base class for a terrain subsystem.
//
// =============================================================================
#ifndef CH_TERRAIN_H
#define CH_TERRAIN_H
#include "core/ChShared.h"
#include "subsys/ChApiSubsys.h"
namespace chrono {
class CH_SUBSYS_API ChTerrain : public ChShared {
public:
ChTerrain() {}
virtual ~ChTerrain() {}
virtual void Update(double time) {}
virtual void Advance(double step) {}
virtual double GetHeight(double x, double y) const = 0;
};
} // end namespace chrono
#endif
|
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================
// Authors: Radu Serban
// =============================================================================
//
// Base class for a terrain subsystem.
//
// =============================================================================
#ifndef CH_TERRAIN_H
#define CH_TERRAIN_H
#include "core/ChShared.h"
#include "core/ChVector.h"
#include "subsys/ChApiSubsys.h"
namespace chrono {
class CH_SUBSYS_API ChTerrain : public ChShared {
public:
ChTerrain() {}
virtual ~ChTerrain() {}
virtual void Update(double time) {}
virtual void Advance(double step) {}
virtual double GetHeight(double x, double y) const = 0;
//// TODO: make this a pure virtual function...
virtual ChVector<> GetNormal(double x, double y) const { return ChVector<>(0, 0, 1); }
};
} // end namespace chrono
#endif
|
Add normal information to terrain.
|
Add normal information to terrain.
|
C
|
bsd-3-clause
|
Milad-Rakhsha/chrono,amelmquist/chrono,armanpazouki/chrono,rserban/chrono,armanpazouki/chrono,amelmquist/chrono,Milad-Rakhsha/chrono,Milad-Rakhsha/chrono,jcmadsen/chrono,dariomangoni/chrono,projectchrono/chrono,Milad-Rakhsha/chrono,tjolsen/chrono,Bryan-Peterson/chrono,andrewseidl/chrono,rserban/chrono,projectchrono/chrono,tjolsen/chrono,jcmadsen/chrono,rserban/chrono,armanpazouki/chrono,tjolsen/chrono,Milad-Rakhsha/chrono,tjolsen/chrono,jcmadsen/chrono,amelmquist/chrono,rserban/chrono,amelmquist/chrono,amelmquist/chrono,Bryan-Peterson/chrono,andrewseidl/chrono,jcmadsen/chrono,rserban/chrono,projectchrono/chrono,jcmadsen/chrono,andrewseidl/chrono,jcmadsen/chrono,dariomangoni/chrono,dariomangoni/chrono,tjolsen/chrono,projectchrono/chrono,armanpazouki/chrono,Milad-Rakhsha/chrono,dariomangoni/chrono,projectchrono/chrono,armanpazouki/chrono,rserban/chrono,Bryan-Peterson/chrono,jcmadsen/chrono,Bryan-Peterson/chrono,dariomangoni/chrono,andrewseidl/chrono,amelmquist/chrono,rserban/chrono,andrewseidl/chrono,dariomangoni/chrono,Bryan-Peterson/chrono,projectchrono/chrono,armanpazouki/chrono
|
eff661b69750fba61fd49e19c1918eac139f5e7d
|
KSPhotoBrowser/KSPhotoItem.h
|
KSPhotoBrowser/KSPhotoItem.h
|
//
// KSPhotoItem.h
// KSPhotoBrowser
//
// Created by Kyle Sun on 12/25/16.
// Copyright © 2016 Kyle Sun. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface KSPhotoItem : NSObject
@property (nonatomic, strong, readonly) UIView *sourceView;
@property (nonatomic, strong, readonly) UIImage *thumbImage;
@property (nonatomic, strong, readonly) UIImage *image;
@property (nonatomic, strong, readonly) NSURL *imageUrl;
@property (nonatomic, assign) BOOL finished;
- (instancetype)initWithSourceView:(UIView *)view
thumbImage:(UIImage *)image
imageUrl:(NSURL *)url;
- (instancetype)initWithSourceView:(UIImageView *)view
imageUrl:(NSURL *)url;
- (instancetype)initWithSourceView:(UIImageView *)view
image:(UIImage *)image;
+ (instancetype)itemWithSourceView:(UIView *)view
thumbImage:(UIImage *)image
imageUrl:(NSURL *)url;
+ (instancetype)itemWithSourceView:(UIImageView *)view
imageUrl:(NSURL *)url;
+ (instancetype)itemWithSourceView:(UIImageView *)view
image:(UIImage *)image;
@end
NS_ASSUME_NONNULL_END
|
//
// KSPhotoItem.h
// KSPhotoBrowser
//
// Created by Kyle Sun on 12/25/16.
// Copyright © 2016 Kyle Sun. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface KSPhotoItem : NSObject
@property (nonatomic, strong, readonly, nullable) UIView *sourceView;
@property (nonatomic, strong, readonly, nullable) UIImage *thumbImage;
@property (nonatomic, strong, readonly, nullable) UIImage *image;
@property (nonatomic, strong, readonly, nullable) NSURL *imageUrl;
@property (nonatomic, assign) BOOL finished;
- (nonnull instancetype)initWithSourceView:(nullable UIView *)view
thumbImage:(nullable UIImage *)image
imageUrl:(nullable NSURL *)url;
- (nonnull instancetype)initWithSourceView:(nullable UIImageView * )view
imageUrl:(nullable NSURL *)url;
- (nonnull instancetype)initWithSourceView:(nullable UIImageView *)view
image:(nullable UIImage *)image;
+ (nonnull instancetype)itemWithSourceView:(nullable UIView *)view
thumbImage:(nullable UIImage *)image
imageUrl:(nullable NSURL *)url;
+ (nonnull instancetype)itemWithSourceView:(nullable UIImageView *)view
imageUrl:(nullable NSURL *)url;
+ (nonnull instancetype)itemWithSourceView:(nullable UIImageView *)view
image:(nullable UIImage *)image;
@end
|
Support nullable Item sourceView in Swift.
|
Support nullable Item sourceView in Swift.
|
C
|
mit
|
skx926/KSPhotoBrowser
|
a82eba7c6c263e67ad58f5211dbc6d32d3963cb3
|
contrib/bind/port/freebsd/include/port_after.h
|
contrib/bind/port/freebsd/include/port_after.h
|
#define CAN_RECONNECT
#define USE_POSIX
#define POSIX_SIGNALS
#define USE_UTIME
#define USE_WAITPID
#define HAVE_GETRUSAGE
#define HAVE_FCHMOD
#define NEED_PSELECT
#define HAVE_SA_LEN
#define USE_LOG_CONS
#define HAVE_CHROOT
#define CAN_CHANGE_ID
#define _TIMEZONE timezone
#define PORT_NONBLOCK O_NONBLOCK
#define PORT_WOULDBLK EWOULDBLOCK
#define WAIT_T int
#define KSYMS "/kernel"
#define KMEM "/dev/kmem"
#define UDPSUM "udpcksum"
/*
* We need to know the IPv6 address family number even on IPv4-only systems.
* Note that this is NOT a protocol constant, and that if the system has its
* own AF_INET6, different from ours below, all of BIND's libraries and
* executables will need to be recompiled after the system <sys/socket.h>
* has had this type added. The type number below is correct on most BSD-
* derived systems for which AF_INET6 is defined.
*/
#ifndef AF_INET6
#define AF_INET6 24
#endif
|
#define CAN_RECONNECT
#define USE_POSIX
#define POSIX_SIGNALS
#define USE_UTIME
#define USE_WAITPID
#define HAVE_GETRUSAGE
#define HAVE_FCHMOD
#define NEED_PSELECT
#define HAVE_SA_LEN
#define SETPWENT_VOID
#define RLIMIT_TYPE rlim_t
#define RLIMIT_LONGLONG
#define RLIMIT_FILE_INFINITY
#define HAVE_CHROOT
#define CAN_CHANGE_ID
#define _TIMEZONE timezone
#define PORT_NONBLOCK O_NONBLOCK
#define PORT_WOULDBLK EWOULDBLOCK
#define WAIT_T int
#define KSYMS "/kernel"
#define KMEM "/dev/kmem"
#define UDPSUM "udpcksum"
/*
* We need to know the IPv6 address family number even on IPv4-only systems.
* Note that this is NOT a protocol constant, and that if the system has its
* own AF_INET6, different from ours below, all of BIND's libraries and
* executables will need to be recompiled after the system <sys/socket.h>
* has had this type added. The type number below is correct on most BSD-
* derived systems for which AF_INET6 is defined.
*/
#ifndef AF_INET6
#define AF_INET6 24
#endif
|
Update for some -current quirks, and some other things taken from the *bsd bind-8 ports. (our setpwent() was changed to return void, but our setgrent() returns int still!)
|
Update for some -current quirks, and some other things taken from the
*bsd bind-8 ports.
(our setpwent() was changed to return void, but our setgrent() returns
int still!)
|
C
|
bsd-3-clause
|
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
|
41c21c9cfde906d9c3f6521eddbdd7750bbfb92a
|
include/Texture.h
|
include/Texture.h
|
// Copyright 2016 Zheng Xian Qiu
//
#pragma once
#include "Seeker.h"
#ifndef _TEXTURE_H
#define _TEXTURE_H
using std::string;
namespace Seeker {
class Texture : public IResource {
public:
Texture(string path);
Texture(int width, int height, bool alpha = false);
~Texture();
int Width = 0;
int Height = 0;
void Prepare(SDL_Renderer* renderer);
void Draw(int x, int y);
void Draw(int x, int y, int w, int h);
void Destroy();
void AsRenderTarget(SDL_Renderer* renderer);
static string ResourceKey(string filename);
protected:
SDL_Texture* CreateTextureFromSurface(SDL_Renderer* renderer);
SDL_Texture* CreateTexture(SDL_Renderer* renderer);
private:
string filename;
bool alpha = false;
SDL_Texture* texture = nullptr;
};
}
#endif
|
// Copyright 2016 Zheng Xian Qiu
//
#pragma once
#include "Seeker.h"
#ifndef _TEXTURE_H
#define _TEXTURE_H
using std::string;
namespace Seeker {
class Texture : public IResource {
public:
Texture(string path);
Texture(int width, int height, bool alpha = true);
~Texture();
int Width = 0;
int Height = 0;
void Prepare(SDL_Renderer* renderer);
void Draw(int x, int y);
void Draw(int x, int y, int w, int h);
void Destroy();
void AsRenderTarget(SDL_Renderer* renderer);
static string ResourceKey(string filename);
protected:
SDL_Texture* CreateTextureFromSurface(SDL_Renderer* renderer);
SDL_Texture* CreateTexture(SDL_Renderer* renderer);
private:
string filename;
bool alpha = true;
SDL_Texture* texture = nullptr;
};
}
#endif
|
Set empty texture default to transparent
|
Set empty texture default to transparent
|
C
|
apache-2.0
|
elct9620/seeker,elct9620/seeker,elct9620/seeker
|
8557aff3b74bb0bf240fcc05ae73ff05caf1ce97
|
CPPWebFramework/cwf/dbstorage.h
|
CPPWebFramework/cwf/dbstorage.h
|
#include "sqldatabasestorage.h"
CWF_BEGIN_NAMESPACE
namespace DbStorage {
CPPWEBFRAMEWORKSHARED_EXPORT static CWF::SqlDatabaseStorage _storage;
CPPWEBFRAMEWORKSHARED_EXPORT static QString _secret;
}
CWF_END_NAMESPACE
|
#include "sqldatabasestorage.h"
CWF_BEGIN_NAMESPACE
namespace DbStorage {
static CWF::SqlDatabaseStorage _storage;
static QString _secret;
}
CWF_END_NAMESPACE
|
Remove the dll export flag
|
Remove the dll export flag
|
C
|
mit
|
HerikLyma/CPPWebFramework,HerikLyma/CPPWebFramework
|
fe45ca036fe90600a9a6d99bea17a2b36d04a071
|
lib/luwra/common.h
|
lib/luwra/common.h
|
/* Luwra
* Minimal-overhead Lua wrapper for C++
*
* Copyright (C) 2015, Ole Krüger <ole@vprsm.de>
*/
#ifndef LUWRA_COMMON_H_
#define LUWRA_COMMON_H_
#include <lua.hpp>
// Check for proper Lua version
#if defined(LUA_VERSION_NUM)
#if LUA_VERSION_NUM < 503 || LUA_VERSION >= 600
#warning "Luwra has not been tested against your installed version of Lua"
#end
#else
#error "Your Lua library does not define LUA_VERSION_NUM"
#end
#define LUWRA_NS_BEGIN namespace luwra {
#define LUWRA_NS_END }
#endif
|
/* Luwra
* Minimal-overhead Lua wrapper for C++
*
* Copyright (C) 2015, Ole Krüger <ole@vprsm.de>
*/
#ifndef LUWRA_COMMON_H_
#define LUWRA_COMMON_H_
// Check C++ version
#if !defined(__cplusplus) || __cplusplus < 201402L
#error "You need a C++14 compliant compiler"
#endif
#include <lua.hpp>
// Check for proper Lua version
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 503 || LUA_VERSION >= 600
#warning "Luwra has not been tested against your installed version of Lua"
#endif
#define LUWRA_NS_BEGIN namespace luwra {
#define LUWRA_NS_END }
#endif
|
Check for C++14 and Lua version properly
|
Check for C++14 and Lua version properly
|
C
|
bsd-3-clause
|
vapourismo/luwra
|
905a30860e08f0264c746ca7a92d5b405015196c
|
libedataserverui/gtk-compat.h
|
libedataserverui/gtk-compat.h
|
#ifndef __GTK_COMPAT_H__
#define __GTK_COMPAT_H__
#include <gtk/gtk.h>
/* Provide a compatibility layer for accessor functions introduced
* in GTK+ 2.22 which we need to build with sealed GDK.
* That way it is still possible to build with GTK+ 2.20.
*/
#if !GTK_CHECK_VERSION(2,21,2)
#define gdk_drag_context_get_actions(context) (context)->actions
#define gdk_drag_context_get_suggested_action(context) (context)->suggested_action
#define gdk_drag_context_get_selected_action(context) (context)->action
#endif /* GTK_CHECK_VERSION(2, 21, 0) */
#endif /* __GTK_COMPAT_H__ */
|
#ifndef __GTK_COMPAT_H__
#define __GTK_COMPAT_H__
#include <gtk/gtk.h>
/* Provide a compatibility layer for accessor functions introduced
* in GTK+ 2.21.1 which we need to build with sealed GDK.
* That way it is still possible to build with GTK+ 2.20.
*/
#if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 21) \
|| (GTK_MINOR_VERSION == 21 && GTK_MICRO_VERSION < 1)
#define gdk_drag_context_get_actions(context) (context)->actions
#define gdk_drag_context_get_suggested_action(context) (context)->suggested_action
#define gdk_drag_context_get_selected_action(context) (context)->action
#endif
#endif /* __GTK_COMPAT_H__ */
|
Check for gtk version below 2.21.1 for comptability with gseal changes
|
Check for gtk version below 2.21.1 for comptability with gseal changes
|
C
|
lgpl-2.1
|
Distrotech/evolution-data-server,gcampax/evolution-data-server,tintou/evolution-data-server,Distrotech/evolution-data-server,matzipan/evolution-data-server,matzipan/evolution-data-server,gcampax/evolution-data-server,gcampax/evolution-data-server,gcampax/evolution-data-server,matzipan/evolution-data-server,tintou/evolution-data-server,matzipan/evolution-data-server,Distrotech/evolution-data-server,Distrotech/evolution-data-server,matzipan/evolution-data-server,Distrotech/evolution-data-server,tintou/evolution-data-server,tintou/evolution-data-server
|
dd0c830ae3af87e8d354b9848d045bf0acd1d5e9
|
kmail/kmversion.h
|
kmail/kmversion.h
|
// KMail Version Information
//
#ifndef kmversion_h
#define kmversion_h
#define KMAIL_VERSION "1.6.50"
#endif /*kmversion_h*/
|
// KMail Version Information
//
#ifndef kmversion_h
#define kmversion_h
#define KMAIL_VERSION "1.6.51"
#endif /*kmversion_h*/
|
Update the version a tick so that we can tell who has the recently committed critical fixes.
|
Update the version a tick so that we can tell who has the recently
committed critical fixes.
svn path=/trunk/kdepim/; revision=285464
|
C
|
lgpl-2.1
|
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
|
a882990c9d05497540efca385ebb55c200e01e76
|
MUON/mapping/AliMpStationType.h
|
MUON/mapping/AliMpStationType.h
|
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
// $Id$
// $MpId: AliMpStationType.h,v 1.5 2005/10/28 15:05:04 ivana Exp $
/// \ingroup basic
/// \enum AliMpStationType
/// Enumeration for refering to a MUON station
///
/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_STATION_TYPE_H
#define ALI_MP_STATION_TYPE_H
enum AliMpStationType
{
kStationInvalid = -1,///< invalid station
kStation1 = 0, ///< station 1 (quadrants)
kStation2, ///< station 2 (quadrants)
kStation345, ///< station 3,4,5 (slats)
kStationTrigger ///< trigger stations (slats)
};
inline
const char* StationTypeName(AliMpStationType stationType)
{
switch ( stationType )
{
case kStation1:
return "st1";
break;
case kStation2:
return "st2";
break;
case kStation345:
return "slat";
break;
case kStationTrigger:
return "trigger";
break;
case kStationInvalid:
default:
return "unknown";
break;
}
}
#endif //ALI_MP_STATION_TYPE_H
|
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
// $Id$
// $MpId: AliMpStationType.h,v 1.5 2005/10/28 15:05:04 ivana Exp $
/// \ingroup basic
/// \enum AliMpStationType
/// Enumeration for refering to a MUON station
///
/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_STATION_TYPE_H
#define ALI_MP_STATION_TYPE_H
enum AliMpStationType
{
kStationInvalid = -1,///< invalid station
kStation1 = 0, ///< station 1 (quadrants)
kStation2, ///< station 2 (quadrants)
kStation345, ///< station 3,4,5 (slats)
kStationTrigger ///< trigger stations (slats)
};
inline
const char* StationTypeName(AliMpStationType stationType)
{
switch ( stationType )
{
case kStation1:
return "st1";
break;
case kStation2:
return "st2";
break;
case kStation345:
return "slat";
break;
case kStationTrigger:
return "trigger";
break;
case kStationInvalid:
default:
return "invalid";
break;
}
return "unknown";
}
#endif //ALI_MP_STATION_TYPE_H
|
Fix warning from gcc4 (Laurent)
|
Fix warning from gcc4
(Laurent)
|
C
|
bsd-3-clause
|
ALICEHLT/AliRoot,shahor02/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,miranov25/AliRoot,mkrzewic/AliRoot,ecalvovi/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,alisw/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,coppedis/AliRoot,alisw/AliRoot,sebaleh/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,coppedis/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,sebaleh/AliRoot,miranov25/AliRoot,shahor02/AliRoot,shahor02/AliRoot,miranov25/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot,ALICEHLT/AliRoot,ecalvovi/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,alisw/AliRoot,coppedis/AliRoot,coppedis/AliRoot,ALICEHLT/AliRoot,alisw/AliRoot,alisw/AliRoot,coppedis/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,jgrosseo/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,jgrosseo/AliRoot
|
0b4834177de44756b689270394c72a016e0f9c6c
|
MKCommons/MKVersion.h
|
MKCommons/MKVersion.h
|
//
// MKVersion.h
// MKCommons
//
// Created by Michael Kuck on 9/27/13.
// Copyright (c) 2013 Michael Kuck. All rights reserved.
//
extern NSString *const MKApplicationVersion(void);
static NSUInteger const MAJOR = 1;
static NSUInteger const MINOR = 10;
static NSUInteger const PATCH = 4;
|
//
// MKVersion.h
// MKCommons
//
// Created by Michael Kuck on 9/27/13.
// Copyright (c) 2013 Michael Kuck. All rights reserved.
//
extern NSString *const MKApplicationVersion(void);
static NSUInteger const MAJOR = 1;
static NSUInteger const MINOR = 11;
static NSUInteger const PATCH = 0;
|
Increase version number of merge into master
|
Increase version number of merge into master
|
C
|
mit
|
mikumi/mkcommons-obj
|
9d7dfc15495bd6f005b8ede5b33aa10dfa0a8fce
|
Modules/Facilities/Model/FacilitiesRoom.h
|
Modules/Facilities/Model/FacilitiesRoom.h
|
//
// FacilitiesRoom.h
// MIT Mobile
//
// Created by Blake Skinner on 5/11/11.
// Copyright (c) 2011 MIT. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@class FacilitiesLocation;
@interface FacilitiesRoom : NSManagedObject {
@private
}
@property (nonatomic, retain) NSString * floor;
@property (nonatomic, retain) NSString * number;
@property (nonatomic, retain) NSString * building;
- (NSString*)displayString;
- (NSString*)description;
@end
|
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@class FacilitiesLocation;
@interface FacilitiesRoom : NSManagedObject {
@private
}
@property (nonatomic, retain) NSString * floor;
@property (nonatomic, retain) NSString * number;
@property (nonatomic, retain) NSString * building;
- (NSString*)displayString;
- (NSString*)description;
@end
|
Remove the templated copyright statement
|
Remove the templated copyright statement
|
C
|
lgpl-2.1
|
MIT-Mobile/MIT-Mobile-for-iOS,xNUTs/MIT-Mobile-for-iOS,smartcop/MIT-Mobile-for-iOS,MIT-Mobile/MIT-Mobile-for-iOS,xNUTs/MIT-Mobile-for-iOS,smartcop/MIT-Mobile-for-iOS
|
535a3d3a07c7ca63326f35a915a23a4d5b55a353
|
OpenTESArena/src/Game/CardinalDirection.h
|
OpenTESArena/src/Game/CardinalDirection.h
|
#ifndef CARDINAL_DIRECTION_H
#define CARDINAL_DIRECTION_H
#include <string>
#include "../Math/Vector2.h"
#include "../World/VoxelUtils.h"
// North, northeast, southwest, etc..
enum class CardinalDirectionName;
namespace CardinalDirection
{
// Cardinal directions in the XZ plane (bird's eye view).
const NewDouble2 North(-1.0, 0.0);
const NewDouble2 South(1.0, 0.0);
const NewDouble2 East(0.0, -1.0);
const NewDouble2 West(0.0, 1.0);
CardinalDirectionName getDirectionName(const NewDouble2 &direction);
const std::string &toString(CardinalDirectionName directionName);
}
#endif
|
#ifndef CARDINAL_DIRECTION_H
#define CARDINAL_DIRECTION_H
#include <string>
#include "../Math/Vector2.h"
#include "../World/VoxelUtils.h"
// North, northeast, southwest, etc..
enum class CardinalDirectionName;
namespace CardinalDirection
{
// Cardinal directions in the XZ plane (bird's eye view).
const NewDouble2 North(static_cast<double>(VoxelUtils::North.x), static_cast<double>(VoxelUtils::North.y));
const NewDouble2 South(static_cast<double>(VoxelUtils::South.x), static_cast<double>(VoxelUtils::South.y));
const NewDouble2 East(static_cast<double>(VoxelUtils::East.x), static_cast<double>(VoxelUtils::East.y));
const NewDouble2 West(static_cast<double>(VoxelUtils::West.x), static_cast<double>(VoxelUtils::West.y));
CardinalDirectionName getDirectionName(const NewDouble2 &direction);
const std::string &toString(CardinalDirectionName directionName);
}
#endif
|
Make cardinal directions rely on VoxelUtils.
|
Make cardinal directions rely on VoxelUtils.
|
C
|
mit
|
afritz1/OpenTESArena
|
830605fd9a90c933da058be4003da58b7b760e7e
|
test/CoverageMapping/unused_names.c
|
test/CoverageMapping/unused_names.c
|
// RUN: %clang_cc1 -fprofile-instr-generate -fcoverage-mapping -emit-llvm -o - %s | FileCheck %s
// Since foo is never emitted, there should not be a profile name for it.
// CHECK-NOT: @__llvm_profile_name_foo =
// CHECK: @__llvm_profile_name_bar =
// CHECK-NOT: @__llvm_profile_name_foo =
#ifdef IS_SYSHEADER
#pragma clang system_header
inline int foo() { return 0; }
#else
#define IS_SYSHEADER
#include __FILE__
int bar() { return 0; }
#endif
|
// RUN: %clang_cc1 -fprofile-instr-generate -fcoverage-mapping -emit-llvm -main-file-name unused_names.c -o - %s > %t
// RUN: FileCheck -input-file %t %s
// RUN: FileCheck -check-prefix=SYSHEADER -input-file %t %s
// Since foo is never emitted, there should not be a profile name for it.
// CHECK-DAG: @__llvm_profile_name_bar = {{.*}} section "{{.*}}__llvm_prf_names"
// CHECK-DAG: @__llvm_profile_name_baz = {{.*}} section "{{.*}}__llvm_prf_names"
// CHECK-DAG: @"__llvm_profile_name_unused_names.c:qux" = {{.*}} section "{{.*}}__llvm_prf_names"
// SYSHEADER-NOT: @__llvm_profile_name_foo =
#ifdef IS_SYSHEADER
#pragma clang system_header
inline int foo() { return 0; }
#else
#define IS_SYSHEADER
#include __FILE__
int bar() { return 0; }
inline int baz() { return 0; }
static int qux() { return 42; }
#endif
|
Add a test for PR22531
|
InstrProf: Add a test for PR22531
This is a test for the llvm change in r228793. We need to make sure
that names referred to by coverage end up in the right section, or the
coverage tools won't work.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@228794 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
|
4593b1ec0f82913fc5f7f6353d2e3add9de6ff39
|
include/pistache/prototype.h
|
include/pistache/prototype.h
|
/*
Mathieu Stefani, 28 janvier 2016
Simple Prototype design pattern implement
*/
#pragma once
#include <memory>
#include <type_traits>
namespace Pistache
{
/* In a sense, a Prototype is just a class that provides a clone() method */
template <typename Class>
struct Prototype
{
public:
virtual ~Prototype() { }
virtual std::shared_ptr<Class> clone() const = 0;
};
} // namespace Pistache
#define PROTOTYPE_OF(Base, Class) \
public: \
std::shared_ptr<Base> clone() const override \
{ \
return std::make_shared<Class>(*this); \
}\
|
/*
Mathieu Stefani, 28 janvier 2016
Simple Prototype design pattern implement
*/
#pragma once
#include <memory>
#include <type_traits>
namespace Pistache
{
/* In a sense, a Prototype is just a class that provides a clone() method */
template <typename Class>
struct Prototype
{
public:
virtual ~Prototype() { }
virtual std::shared_ptr<Class> clone() const = 0;
};
} // namespace Pistache
#define PROTOTYPE_OF(Base, Class) \
public: \
std::shared_ptr<Base> clone() const override \
{ \
return std::make_shared<Class>(*this); \
}
|
Fix warning: backslash-newline at end of file
|
Fix warning: backslash-newline at end of file
|
C
|
apache-2.0
|
oktal/rest,oktal/rest,oktal/rest,oktal/rest
|
cde246f309cc3c3fc4c5aaef4f1eb9a191b5b4ec
|
JASP-Engine/rbridge.h
|
JASP-Engine/rbridge.h
|
#ifndef RBRIDGE_H
#define RBRIDGE_H
#include <RInside.h>
#include <Rcpp.h>
#include <string>
#include <map>
#include <boost/function.hpp>
#include "../JASP-Common/dataset.h"
#ifdef __WIN32__
#undef Realloc
#undef Free
#endif
//typedef int (*RCallback)(std::string value);
typedef boost::function<int(const std::string &)> RCallback;
void rbridge_init();
void rbridge_setDataSet(DataSet *dataSet);
std::string rbridge_run(const std::string &name, const std::string &options, const std::string &perform = "run", RCallback callback = NULL);
#endif // RBRIDGE_H
|
#ifndef RBRIDGE_H
#define RBRIDGE_H
#include <RInside.h>
#include <Rcpp.h>
#ifdef __WIN32__
#undef Realloc
#undef Free
#endif
#include <string>
#include <map>
#include <boost/function.hpp>
#include "../JASP-Common/dataset.h"
//typedef int (*RCallback)(std::string value);
typedef boost::function<int(const std::string &)> RCallback;
void rbridge_init();
void rbridge_setDataSet(DataSet *dataSet);
std::string rbridge_run(const std::string &name, const std::string &options, const std::string &perform = "run", RCallback callback = NULL);
#endif // RBRIDGE_H
|
Fix to windows build errors
|
Fix to windows build errors
|
C
|
agpl-3.0
|
FransMeerhoff/jasp-desktop,cgvarela/jasp-desktop,AlexanderLyNL/jasp-desktop,tlevine/jasp-desktop,AlexanderLyNL/jasp-desktop,AlexanderLyNL/jasp-desktop,boutinb/jasp-desktop,raviselker/jasp-desktop,fdabl/jasp-desktop,jasp-stats/jasp-desktop,vankesteren/jasp-desktop,vankesteren/jasp-desktop,tlevine/jasp-desktop,boutinb/jasp-desktop,jasp-stats/jasp-desktop,cgvarela/jasp-desktop,aknight1-uva/jasp-desktop,Tahiraj/jasp-desktop,raviselker/jasp-desktop,dropmann/jasp-desktop,TimKDJ/jasp-desktop,Tahiraj/jasp-desktop,FransMeerhoff/jasp-desktop,raviselker/jasp-desktop,AlexanderLyNL/jasp-desktop,FransMeerhoff/jasp-desktop,cgvarela/jasp-desktop,dostodabsi/jasp-desktop,dropmann/jasp-desktop,dostodabsi/jasp-desktop,dropmann/jasp-desktop,AlexanderLyNL/jasp-desktop,FransMeerhoff/jasp-desktop,boutinb/jasp-desktop,boutinb/jasp-desktop,dostodabsi/jasp-desktop,vankesteren/jasp-desktop,vankesteren/jasp-desktop,TimKDJ/jasp-desktop,vankesteren/jasp-desktop,jasp-stats/jasp-desktop,aknight1-uva/jasp-desktop,AlexanderLyNL/jasp-desktop,TimKDJ/jasp-desktop,aknight1-uva/jasp-desktop,dostodabsi/jasp-desktop,fdabl/jasp-desktop,TimKDJ/jasp-desktop,fdabl/jasp-desktop,dropmann/jasp-desktop,vankesteren/jasp-desktop,raviselker/jasp-desktop,boutinb/jasp-desktop,AlexanderLyNL/jasp-desktop,dostodabsi/jasp-desktop,FransMeerhoff/jasp-desktop,dropmann/jasp-desktop,jasp-stats/jasp-desktop,boutinb/jasp-desktop,dostodabsi/jasp-desktop,jasp-stats/jasp-desktop,Tahiraj/jasp-desktop,jasp-stats/jasp-desktop,cgvarela/jasp-desktop,jasp-stats/jasp-desktop,cgvarela/jasp-desktop,vankesteren/jasp-desktop,raviselker/jasp-desktop,TimKDJ/jasp-desktop,TimKDJ/jasp-desktop,raviselker/jasp-desktop,tlevine/jasp-desktop,tlevine/jasp-desktop,aknight1-uva/jasp-desktop,FransMeerhoff/jasp-desktop,FransMeerhoff/jasp-desktop,tlevine/jasp-desktop,jasp-stats/jasp-desktop,vankesteren/jasp-desktop,fdabl/jasp-desktop,raviselker/jasp-desktop,fdabl/jasp-desktop,dostodabsi/jasp-desktop,fdabl/jasp-desktop,aknight1-uva/jasp-desktop,aknight1-uva/jasp-desktop,boutinb/jasp-desktop,aknight1-uva/jasp-desktop,fdabl/jasp-desktop,Tahiraj/jasp-desktop,Tahiraj/jasp-desktop,TimKDJ/jasp-desktop,FransMeerhoff/jasp-desktop,AlexanderLyNL/jasp-desktop,TimKDJ/jasp-desktop,dropmann/jasp-desktop,boutinb/jasp-desktop,dropmann/jasp-desktop
|
3b2deef3a403bbfe1dcb3e22fde3b8fecc3ccd08
|
modules/dcc_chat.h
|
modules/dcc_chat.h
|
class dccChat : public Module {
public:
virtual ~dccChat();
virtual void onDCCReceive(std::string dccid, std::string message);
virtual void onDCCEnd(std::string dccid);
};
class dccSender : public Module {
public:
virtual ~dccSender();
virtual void dccSend(std::string dccid, std::string message);
virtual bool hookDCCMessage(std::string modName, std::string hookMsg);
virtual void unhookDCCSession(std::string modName, std::string dccid);
};
dccChat::~dccChat() {}
void dccChat::onDCCReceive(std::string dccid, std::string message) {}
void dccChat::onDCCEnd(std::string dccid) {}
dccSender::~dccSender() {}
void dccSender::dccSend(std::string dccid, std::string message) {}
bool dccSender::hookDCCMessage(std::string modName, std::string hookMsg) { return false; }
void dccSender::unhookDCCSession(std::string modName, std::string dccid) {}
|
class dccChat : public Module {
public:
virtual ~dccChat();
virtual void onDCCReceive(std::string dccid, std::string message);
virtual void onDCCEnd(std::string dccid);
};
class dccSender : public Module {
public:
virtual ~dccSender();
virtual void dccSend(std::string dccid, std::string message);
virtual bool hookDCCMessage(std::string modName, std::string hookMsg);
virtual void unhookDCCSession(std::string modName, std::string dccid);
virtual std::vector<std::string> getConnections();
virtual void closeDCCConnection(std::string dccid);
};
dccChat::~dccChat() {}
void dccChat::onDCCReceive(std::string dccid, std::string message) {}
void dccChat::onDCCEnd(std::string dccid) {}
dccSender::~dccSender() {}
void dccSender::dccSend(std::string dccid, std::string message) {}
bool dccSender::hookDCCMessage(std::string modName, std::string hookMsg) { return false; }
void dccSender::unhookDCCSession(std::string modName, std::string dccid) {}
|
Add important DCC functions to DCC header for interaction
|
Add important DCC functions to DCC header for interaction
|
C
|
mit
|
ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo
|
4694d1f290fd37bddff9a31c7b6b57a0a0f3d5af
|
token_server/src/main.c
|
token_server/src/main.c
|
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include "httpserv.h"
#include "request.h"
#define PORT 5556
#define BACKLOG 5
int main(int argc, char* argv[]) {
setup_openssl();
req* r = init_request();
char* res = request_kahoot_token(r, "6573712");
printf("%s\n", res);
return 0;
};
|
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include "httpserv.h"
#include "request.h"
#include "kahoot.h"
#define PORT 5556
#define BACKLOG 5
#define HEADERS "HTTP/1.1 200 OK\
Server: openresty/1.11.2.2\
Date: Tue, 28 Mar 2017 14:55:03 GMT\
Content-Type: application/json\
Transfer-Encoding: chunked\
Connection: keep-alive\
Vary: Accept-Encoding\
x-kahoot-session-token: UhMIEhNAWF8LCgRTUSdNKwx+LWBRW39dfjoTTmwAcXBwCDdZDV1qfXcJJwJmLQdFLE0Obh9XW2d1GRB5QVJ6eF5fOU8GUgNvcgV7BW8DDlA5eGBcYG5XYjRmPS1CGGFP\
\
1a4\
{\"twoFactorAuth\":false,\"challenge\":"decode('rX7Rw1SRHxgrZVYKWkGHmVATO4zEGrV8Sl89RKwf3o82PZkT6e5eFjYNlPyu1HOpp724MtdhTGqgXHPLcYxNkBPjuEdarpy0BJJ1'); function decode(message) {var offset = ((67 + 21 * (98 * 54)) + (8 + 98) + 15); console.log(\"Offset derived as:\", offset); return _.replace(message, /./g, function(char, position) {return String.fromCharCode((((char.charCodeAt(0) * position) + offset) % 77) + 48);});}\"}\
0"
int main(int argc, char* argv[]) {
setup_openssl();
//
return 0;
};
|
Add sample headers as a macro
|
Add sample headers as a macro
|
C
|
mit
|
ukahoot/ukahoot,ukahoot/ukahoot.github.io,ukahoot/ukahoot,ukahoot/ukahoot.github.io,ukahoot/ukahoot.github.io,ukahoot/ukahoot,ukahoot/ukahoot
|
b2550d29e716c535c255ddffb5b82cb1379ed491
|
libraries/ModbusIP/ModbusIP.h
|
libraries/ModbusIP/ModbusIP.h
|
/*
ModbusIP.h - Header for Modbus IP Library
Copyright (C) 2015 Andr Sarmento Barbosa
*/
#include <Arduino.h>
#include <Modbus.h>
#include <SPI.h>
#include <Ethernet.h>
#ifndef MODBUSIP_H
#define MODBUSIP_H
#define MODBUSIP_PORT 502
#define MODBUSIP_MAXFRAME 200
class ModbusIP : public Modbus {
private:
EthernetServer _server;
byte _MBAP[7];
public:
ModbusIP();
bool config(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet);
void proc();
};
#endif //MODBUSIP_H
|
/*
ModbusIP.h - Header for Modbus IP Library
Copyright (C) 2015 Andr Sarmento Barbosa
*/
#include <Arduino.h>
#include <Modbus.h>
#include <SPI.h>
#include <Ethernet.h>
#ifndef MODBUSIP_H
#define MODBUSIP_H
#define MODBUSIP_PORT 502
#define MODBUSIP_MAXFRAME 200
class ModbusIP : public Modbus {
private:
EthernetServer _server;
byte _MBAP[7];
public:
ModbusIP();
void config(uint8_t *mac);
void config(uint8_t *mac, IPAddress ip);
void config(uint8_t *mac, IPAddress ip, IPAddress dns);
void config(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway);
void config(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet);
void task();
};
#endif //MODBUSIP_H
|
Change proc() to task() and put overloaded config types.
|
Change proc() to task() and put overloaded config types.
|
C
|
bsd-3-clause
|
unparallel-innovation/Modbus-Slave,andresarmento/modbus-arduino,unparallel-innovation/Modbus-Slave
|
8ad7d79b10b4db785bc4477c206521284ec280ae
|
include/sauce/internal/disposal_deleter.h
|
include/sauce/internal/disposal_deleter.h
|
#ifndef SAUCE_SAUCE_INTERNAL_DISPOSAL_DELETER_H_
#define SAUCE_SAUCE_INTERNAL_DISPOSAL_DELETER_H_
#include <sauce/memory.h>
namespace sauce {
namespace internal {
namespace bindings {
template<typename Dependency, typename Scope>
class NakedBinding;
/**
* A smart pointer deleter that diposes with a given binding.
*/
template<typename Dependency, typename Scope>
class DisposalDeleter {
typedef typename Key<Dependency>::Iface Iface;
typedef sauce::shared_ptr<NakedBinding<Dependency, Scope> > BindingPtr;
friend class NakedBinding<Dependency, Scope>;
BindingPtr binding;
DisposalDeleter(BindingPtr binding):
binding(binding) {}
public:
/**
* Cast and dispose the given Iface instance.
*/
void operator()(Iface * iface) const {
binding->dispose(iface);
}
};
}
}
namespace i = ::sauce::internal;
namespace b = ::sauce::internal::bindings;
}
#endif // SAUCE_SAUCE_INTERNAL_DISPOSAL_DELETER_H_
|
#ifndef SAUCE_SAUCE_INTERNAL_DISPOSAL_DELETER_H_
#define SAUCE_SAUCE_INTERNAL_DISPOSAL_DELETER_H_
#include <sauce/memory.h>
namespace sauce {
namespace internal {
namespace bindings {
template<typename Dependency, typename Scope>
class NakedBinding;
}
namespace b = ::sauce::internal::bindings;
/**
* A smart pointer deleter that diposes with a given binding.
*/
template<typename Dependency, typename Scope>
class DisposalDeleter {
typedef typename Key<Dependency>::Iface Iface;
typedef sauce::shared_ptr<b::NakedBinding<Dependency, Scope> > BindingPtr;
friend class b::NakedBinding<Dependency, Scope>;
BindingPtr binding;
DisposalDeleter(BindingPtr binding):
binding(binding) {}
public:
/**
* Cast and dispose the given Iface instance.
*/
void operator()(Iface * iface) const {
binding->dispose(iface);
}
};
}
namespace i = ::sauce::internal;
}
#endif // SAUCE_SAUCE_INTERNAL_DISPOSAL_DELETER_H_
|
Move DisposalDeleter out of bindings namespace.
|
Move DisposalDeleter out of bindings namespace.
|
C
|
mit
|
phs/sauce,phs/sauce,phs/sauce,phs/sauce
|
f16528c032e344e4e8811c990c2d8736166e586c
|
src/transport.h
|
src/transport.h
|
#ifndef TELEMETRY_TRANSPORT_HPP_
#define TELEMETRY_TRANSPORT_HPP_
#include "HardwareSerial.h"
int32_t read(uint8_t * buf, uint32_t sizeToRead)
{
return Serial.readBytes((char*)(buf), sizeToRead);
}
int32_t write(uint8_t * buf, uint32_t sizeToWrite)
{
Serial.write((char*)(buf),sizeToWrite);
return 0;
}
int32_t readable()
{
return Serial.available();
}
int32_t writeable()
{
return Serial.availableForWrite();
}
#endif
|
#ifndef TELEMETRY_TRANSPORT_HPP_
#define TELEMETRY_TRANSPORT_HPP_
#include "HardwareSerial.h"
#include "Arduino.h"
int32_t read(uint8_t * buf, uint32_t sizeToRead)
{
return Serial.readBytes((char*)(buf), sizeToRead);
}
int32_t write(uint8_t * buf, uint32_t sizeToWrite)
{
Serial.write((char*)(buf),sizeToWrite);
return 0;
}
int32_t readable()
{
return Serial.available();
}
int32_t writeable()
{
return Serial.availableForWrite();
}
#endif
|
Fix missing header error in some boards
|
Fix missing header error in some boards
|
C
|
mit
|
Overdrivr/Telemetry-arduino,Overdrivr/Telemetry-arduino
|
a79ace9c10f52cc7124bd900bca94603978dc561
|
include/tasks/clock_server.h
|
include/tasks/clock_server.h
|
#ifndef __CLOCK_SERVER_H__
#define __CLOCK_SERVER_H__
#include <std.h>
#include <scheduler.h>
extern int clock_server_tid;
typedef enum {
CLOCK_NOTIFY = 1,
CLOCK_DELAY = 2,
CLOCK_TIME = 3,
CLOCK_DELAY_UNTIL = 4
} clock_req_type;
typedef struct {
clock_req_type type;
uint ticks;
} clock_req;
void clock_server(void);
#endif
|
#ifndef __CLOCK_SERVER_H__
#define __CLOCK_SERVER_H__
#include <std.h>
#include <scheduler.h>
extern int clock_server_tid;
typedef enum {
CLOCK_NOTIFY = 1,
CLOCK_DELAY = 2,
CLOCK_TIME = 3,
CLOCK_DELAY_UNTIL = 4
} clock_req_type;
typedef struct {
clock_req_type type;
uint ticks;
} clock_req;
void __attribute__ ((noreturn)) clock_server(void);
#endif
|
Fix warning given by Clang
|
Fix warning given by Clang
|
C
|
mit
|
ferrous26/cs452-flaming-meme,ferrous26/cs452-flaming-meme,ferrous26/cs452-flaming-meme
|
633f65f6eed79b6a13d8fe76cfdb0ac19116e118
|
server/types/JoinableImpl.h
|
server/types/JoinableImpl.h
|
#ifndef JOINABLE_IMPL
#define JOINABLE_IMPL
#include "joinable_types.h"
#include "types/MediaObjectImpl.h"
using ::com::kurento::kms::api::Joinable;
using ::com::kurento::kms::api::Direction;
using ::com::kurento::kms::api::StreamType;
using ::com::kurento::kms::api::MediaSession;
namespace com { namespace kurento { namespace kms {
class JoinableImpl : public Joinable, public virtual MediaObjectImpl {
public:
JoinableImpl(MediaSession &session);
~JoinableImpl() throw() {};
std::vector<StreamType::type> getStreams(const Joinable& joinable);
void join(const JoinableImpl& to, const Direction::type direction);
void unjoin(const JoinableImpl& to);
void join(const JoinableImpl& to, const StreamType::type stream, const Direction::type direction);
void unjoin(const JoinableImpl& to, const StreamType::type stream);
std::vector<Joinable> &getJoinees();
std::vector<Joinable> &getDirectionJoiness(const Direction::type direction);
std::vector<Joinable> &getJoinees(const StreamType::type stream);
std::vector<Joinable> &getDirectionJoiness(const StreamType::type stream, const Direction::type direction);
};
}}} // com::kurento::kms
#endif /* JOINABLE_IMPL */
|
#ifndef JOINABLE_IMPL
#define JOINABLE_IMPL
#include "joinable_types.h"
#include "types/MediaObjectImpl.h"
using ::com::kurento::kms::api::Joinable;
using ::com::kurento::kms::api::Direction;
using ::com::kurento::kms::api::StreamType;
using ::com::kurento::kms::api::MediaSession;
namespace com { namespace kurento { namespace kms {
class JoinableImpl : public Joinable, public virtual MediaObjectImpl {
public:
JoinableImpl(MediaSession &session);
~JoinableImpl() throw() {};
void getStreams(std::vector<StreamType::type> &_return);
void join(const JoinableImpl& to, const Direction::type direction);
void unjoin(const JoinableImpl& to);
void join(const JoinableImpl& to, const StreamType::type stream, const Direction::type direction);
void unjoin(const JoinableImpl& to, const StreamType::type stream);
void getJoinees(std::vector<Joinable> &_return);
void getDirectionJoiness(std::vector<Joinable> &_return, const Direction::type direction);
void getJoinees(std::vector<Joinable> &_return, const StreamType::type stream);
void getDirectionJoiness(std::vector<Joinable> &_return, const StreamType::type stream, const Direction::type direction);
};
}}} // com::kurento::kms
#endif /* JOINABLE_IMPL */
|
Make jonable methods to return vectors via reference
|
Make jonable methods to return vectors via reference
|
C
|
lgpl-2.1
|
mparis/kurento-media-server,Kurento/kurento-media-server,todotobe1/kurento-media-server,TribeMedia/kurento-media-server,lulufei/kurento-media-server,Kurento/kurento-media-server,shelsonjava/kurento-media-server,todotobe1/kurento-media-server,mparis/kurento-media-server,lulufei/kurento-media-server,shelsonjava/kurento-media-server,TribeMedia/kurento-media-server
|
390d2ed51617ed0c5cde961c0bc9daa1caece1fe
|
NavigationReactNative/src/ios/NVSceneController.h
|
NavigationReactNative/src/ios/NVSceneController.h
|
#import <UIKit/UIKit.h>
@interface NVSceneController : UIViewController
@property (nonatomic, copy) void (^boundsDidChangeBlock)(NVSceneController *controller);
@property (nonatomic, assign) UIStatusBarStyle statusBarStyle;
@property (nonatomic, assign) BOOL statusBarHidden;
- (id)initWithScene:(UIView *)view;
@end
@protocol NVScene
@property (nonatomic, assign) BOOL hidesTabBar;
- (void)didPop;
@end
@protocol NVNavigationBar
@property (nonatomic, assign) BOOL isHidden;
@property (nonatomic, assign) BOOL largeTitle;
@property (nonatomic, copy) NSString* title;
@property (nonatomic, copy) NSString *backTitle;
- (void)updateStyle;
@end
@protocol NVSearchBar
@property UISearchController *searchController;
@property (nonatomic, assign) BOOL hideWhenScrolling;
@end
@protocol NVStatusBar
@property (nonatomic, assign) UIStatusBarStyle tintStyle;
@property (nonatomic, assign) BOOL hidden;
- (void)updateStyle;
@end
|
#import <UIKit/UIKit.h>
@interface NVSceneController : UIViewController
@property (nonatomic, copy) void (^boundsDidChangeBlock)(NVSceneController *controller);
@property (nonatomic, assign) UIStatusBarStyle statusBarStyle;
@property (nonatomic, assign) BOOL statusBarHidden;
- (id)initWithScene:(UIView *)view;
@end
@protocol NVScene
@property (nonatomic, assign) BOOL hidesTabBar;
- (void)didPop;
@end
@protocol NVNavigationBar
@property (nonatomic, assign) BOOL isHidden;
@property (nonatomic, assign) BOOL largeTitle;
@property (nonatomic, copy) NSString* title;
@property (nonatomic, copy) NSString *backTitle;
- (void)updateStyle;
@end
@protocol NVSearchBar
@property UISearchController *searchController;
@property (nonatomic, assign) BOOL hideWhenScrolling;
@end
@protocol NVStatusBar
@property (nonatomic, assign) UIStatusBarStyle tintStyle;
@property (nonatomic, assign) BOOL hidden;
- (void)updateStyle;
@end
|
Remove line so file doesn't show in diff
|
Remove line so file doesn't show in diff
|
C
|
apache-2.0
|
grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation
|
8d94846a4443ed99ccd7877bad0a558c73593441
|
src/shutdowncheck.h
|
src/shutdowncheck.h
|
#ifndef QAK_SHUTDOWN_CHECK_H
#define QAK_SHUTDOWN_CHECK_H
#include <QDebug>
#include <QObject>
#include <QStandardPaths>
#include <QFile>
#include <QFileInfo>
#include <QDateTime>
class ShutdownCheck : public QObject
{
Q_OBJECT
public:
enum Status
{
OK,
FAILED,
Error
};
Q_ENUM(Status)
Q_PROPERTY(int status READ status NOTIFY statusChanged)
explicit ShutdownCheck(QObject* parent = 0);
~ShutdownCheck();
int status() const;
void setStatus(int status);
signals:
void statusChanged();
private:
QString _dataPath;
QString _mark;
int _status;
void writeMark();
void removeMark();
bool markExists();
};
#endif // QAK_SHUTDOWN_CHECK_H
|
#ifndef QAK_SHUTDOWN_CHECK_H
#define QAK_SHUTDOWN_CHECK_H
#include <QDebug>
#include <QObject>
#include <QStandardPaths>
#include <QFile>
#include <QFileInfo>
#include <QDateTime>
class ShutdownCheck : public QObject
{
Q_OBJECT
public:
enum Status
{
OK,
FAILED,
Error
};
Q_ENUM(Status)
Q_PROPERTY(int status READ status NOTIFY statusChanged)
explicit ShutdownCheck(QObject* parent = 0);
~ShutdownCheck();
int status() const;
void setStatus(int status);
public slots:
void writeMark();
void removeMark();
bool markExists();
signals:
void statusChanged();
private:
QString _dataPath;
QString _mark;
int _status;
};
#endif // QAK_SHUTDOWN_CHECK_H
|
Allow custom shutdown check cycles by exposing private functions
|
Allow custom shutdown check cycles by exposing private functions
|
C
|
mit
|
Larpon/qak,Larpon/qak,Larpon/qak
|
8b9c56f917399fd11e05f0561c095c275035c095
|
config.h
|
config.h
|
#ifndef CJET_CONFIG_H
#define CJET_CONFIG_H
#define SERVER_PORT 11122
#define LISTEN_BACKLOG 40
/*
* It is somehow beneficial if this size is 32 bit aligned.
*/
#define MAX_MESSAGE_SIZE 512
#define WRITE_BUFFER_CHUNK 512
#define MAX_WRITE_BUFFER_SIZE 10 * WRITE_BUFFER_CHUNK
/* Linux specific configs */
#define MAX_EPOLL_EVENTS 100
#endif
|
#ifndef CJET_CONFIG_H
#define CJET_CONFIG_H
#define SERVER_PORT 11122
#define LISTEN_BACKLOG 40
/*
* It is somehow beneficial if this size is 32 bit aligned.
*/
#define MAX_MESSAGE_SIZE 512
#define WRITE_BUFFER_CHUNK 512
#define MAX_WRITE_BUFFER_SIZE (10 * (WRITE_BUFFER_CHUNK))
/* Linux specific configs */
#define MAX_EPOLL_EVENTS 100
#endif
|
Use some paranthesis around macro parameters.
|
Use some paranthesis around macro parameters.
|
C
|
mit
|
mloy/cjet,gatzka/cjet,gatzka/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,mloy/cjet,mloy/cjet,gatzka/cjet
|
b28d2f877b3c419bb7643a1eadef4ea28057b1e7
|
docs/examples/applications/list_all_groups.c
|
docs/examples/applications/list_all_groups.c
|
#include <opensync/opensync.h>
#include <opensync/opensync-group.h>
int main(int argc, char *argv[]) {
OSyncList *groups, *g;
int i = 0;
osync_bool couldloadgroups;
OSyncGroup *group = NULL;
OSyncGroupEnv *groupenv = NULL;
groupenv = osync_group_env_new(NULL);
/* load groups from default dir */
couldloadgroups = osync_group_env_load_groups(groupenv, NULL, NULL);
if ( !couldloadgroups ) {
/* print error */
printf("Could not load groups.");
return -1;
}
groups = osync_group_env_get_groups(groupenv);
printf("found %i groups\n", osync_list_length(groups));
for (g = groups; g; g = g->next) {
group = (OSyncGroup *) g->data;
printf("group nr. %i is %s\n", i+1, osync_group_get_name(group));
}
/* free env */
osync_group_env_unref(groupenv);
return 0;
}
|
#include <opensync/opensync.h>
#include <opensync/opensync-group.h>
int main(int argc, char *argv[]) {
OSyncList *groups, *g;
int i = 0;
osync_bool couldloadgroups;
OSyncGroup *group = NULL;
OSyncGroupEnv *groupenv = NULL;
groupenv = osync_group_env_new(NULL);
/* load groups from default dir */
couldloadgroups = osync_group_env_load_groups(groupenv, NULL, NULL);
if ( !couldloadgroups ) {
/* print error */
printf("Could not load groups.");
return -1;
}
groups = osync_group_env_get_groups(groupenv);
printf("found %i groups\n", osync_list_length(groups));
for (g = groups; g; g = g->next) {
group = (OSyncGroup *) g->data;
printf("group nr. %i is %s\n", i+1, osync_group_get_name(group));
}
/* Free the list */
osync_list_free(groups);
/* free env */
osync_group_env_unref(groupenv);
return 0;
}
|
Fix potential memory leak - freeing the newly created OSyncList was missing
|
Fix potential memory leak - freeing the newly created OSyncList was
missing
git-svn-id: e31799a7ad59d6ea355ca047c69e0aee8a59fcd3@5736 53f5c7ee-bee3-0310-bbc5-ea0e15fffd5e
|
C
|
lgpl-2.1
|
luizluca/opensync-luizluca,luizluca/opensync-luizluca
|
d21808b5823bdf53fc969019969f700573a8eb69
|
CefSharp.BrowserSubprocess.Core/Messaging/EvaluateScriptDelegate.h
|
CefSharp.BrowserSubprocess.Core/Messaging/EvaluateScriptDelegate.h
|
// Copyright 2010-2015 The CefSharp Project. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#pragma once
#include "../CefSharp.Core/Internals/Messaging/ProcessMessageDelegate.h"
namespace CefSharp
{
class CefAppUnmanagedWrapper;
namespace Internals
{
namespace Messaging
{
//This class handles incoming evaluate script messages and responses to them after fulfillment.
class EvaluateScriptDelegate : public ProcessMessageDelegate
{
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(EvaluateScriptDelegate);
CefRefPtr<CefAppUnmanagedWrapper> _appUnmanagedWrapper;
public:
EvaluateScriptDelegate(CefRefPtr<CefAppUnmanagedWrapper> appUnmanagedWrapper);
virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefProcessId source_process, CefRefPtr<CefProcessMessage> message) override;
};
}
}
}
|
// Copyright 2010-2015 The CefSharp Project. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#pragma once
#include "../CefSharp.Core/Internals/Messaging/ProcessMessageDelegate.h"
namespace CefSharp
{
class CefAppUnmanagedWrapper;
namespace Internals
{
namespace Messaging
{
//This class handles incoming evaluate script messages and responses to them after fulfillment.
class EvaluateScriptDelegate : public ProcessMessageDelegate
{
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(EvaluateScriptDelegate);
CefRefPtr<CefAppUnmanagedWrapper> _appUnmanagedWrapper;
public:
EvaluateScriptDelegate(CefRefPtr<CefAppUnmanagedWrapper> appUnmanagedWrapper);
virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefProcessId sourceProcessId, CefRefPtr<CefProcessMessage> message) override;
};
}
}
}
|
Rename variable to be more .net like
|
Rename variable to be more .net like
|
C
|
bsd-3-clause
|
Haraguroicha/CefSharp,ITGlobal/CefSharp,jamespearce2006/CefSharp,NumbersInternational/CefSharp,zhangjingpu/CefSharp,VioletLife/CefSharp,illfang/CefSharp,windygu/CefSharp,battewr/CefSharp,joshvera/CefSharp,battewr/CefSharp,Haraguroicha/CefSharp,ITGlobal/CefSharp,windygu/CefSharp,jamespearce2006/CefSharp,VioletLife/CefSharp,wangzheng888520/CefSharp,twxstar/CefSharp,gregmartinhtc/CefSharp,Livit/CefSharp,ruisebastiao/CefSharp,wangzheng888520/CefSharp,Haraguroicha/CefSharp,rlmcneary2/CefSharp,ruisebastiao/CefSharp,AJDev77/CefSharp,ITGlobal/CefSharp,joshvera/CefSharp,wangzheng888520/CefSharp,rlmcneary2/CefSharp,Livit/CefSharp,haozhouxu/CefSharp,gregmartinhtc/CefSharp,illfang/CefSharp,illfang/CefSharp,jamespearce2006/CefSharp,dga711/CefSharp,zhangjingpu/CefSharp,yoder/CefSharp,Livit/CefSharp,twxstar/CefSharp,joshvera/CefSharp,NumbersInternational/CefSharp,rlmcneary2/CefSharp,ruisebastiao/CefSharp,windygu/CefSharp,jamespearce2006/CefSharp,windygu/CefSharp,haozhouxu/CefSharp,VioletLife/CefSharp,yoder/CefSharp,Livit/CefSharp,wangzheng888520/CefSharp,illfang/CefSharp,dga711/CefSharp,VioletLife/CefSharp,ruisebastiao/CefSharp,ITGlobal/CefSharp,twxstar/CefSharp,yoder/CefSharp,gregmartinhtc/CefSharp,zhangjingpu/CefSharp,twxstar/CefSharp,zhangjingpu/CefSharp,dga711/CefSharp,haozhouxu/CefSharp,jamespearce2006/CefSharp,dga711/CefSharp,AJDev77/CefSharp,battewr/CefSharp,NumbersInternational/CefSharp,AJDev77/CefSharp,rlmcneary2/CefSharp,haozhouxu/CefSharp,yoder/CefSharp,AJDev77/CefSharp,battewr/CefSharp,joshvera/CefSharp,NumbersInternational/CefSharp,Haraguroicha/CefSharp,gregmartinhtc/CefSharp,Haraguroicha/CefSharp
|
f117facb5ade615965bdd76a870659fe1f62f302
|
test/Analysis/uninit-vals-ps-region.c
|
test/Analysis/uninit-vals-ps-region.c
|
// RUN: clang -checker-simple -analyzer-store-region -verify %s
struct s {
int data;
};
struct s global;
void g(int);
void f4() {
int a;
if (global.data == 0)
a = 3;
if (global.data == 0)
g(a); // no-warning
}
|
// RUN: clang -checker-simple -analyzer-store-region -verify %s
struct s {
int data;
};
struct s global;
void g(int);
void f4() {
int a;
if (global.data == 0)
a = 3;
if (global.data == 0) // The true branch is infeasible.
g(a); // no-warning
}
|
Add comment to test case for documentation.
|
Add comment to test case for documentation.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@60521 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
|
5322ef2006cc93ad76140ff742cd96e74c1ec09b
|
compat/bswap.h
|
compat/bswap.h
|
/*
* Let's make sure we always have a sane definition for ntohl()/htonl().
* Some libraries define those as a function call, just to perform byte
* shifting, bringing significant overhead to what should be a simple
* operation.
*/
/*
* Default version that the compiler ought to optimize properly with
* constant values.
*/
static inline unsigned int default_swab32(unsigned int val)
{
return (((val & 0xff000000) >> 24) |
((val & 0x00ff0000) >> 8) |
((val & 0x0000ff00) << 8) |
((val & 0x000000ff) << 24));
}
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
#define bswap32(x) ({ \
unsigned int __res; \
if (__builtin_constant_p(x)) { \
__res = default_swab32(x); \
} else { \
__asm__("bswap %0" : "=r" (__res) : "0" (x)); \
} \
__res; })
#undef ntohl
#undef htonl
#define ntohl(x) bswap32(x)
#define htonl(x) bswap32(x)
#endif
|
/*
* Let's make sure we always have a sane definition for ntohl()/htonl().
* Some libraries define those as a function call, just to perform byte
* shifting, bringing significant overhead to what should be a simple
* operation.
*/
/*
* Default version that the compiler ought to optimize properly with
* constant values.
*/
static inline uint32_t default_swab32(uint32_t val)
{
return (((val & 0xff000000) >> 24) |
((val & 0x00ff0000) >> 8) |
((val & 0x0000ff00) << 8) |
((val & 0x000000ff) << 24));
}
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
#define bswap32(x) ({ \
uint32_t __res; \
if (__builtin_constant_p(x)) { \
__res = default_swab32(x); \
} else { \
__asm__("bswap %0" : "=r" (__res) : "0" (x)); \
} \
__res; })
#undef ntohl
#undef htonl
#define ntohl(x) bswap32(x)
#define htonl(x) bswap32(x)
#endif
|
Fix some printf format warnings
|
Fix some printf format warnings
commit 51ea551 ("make sure byte swapping is optimal for git"
2009-08-18) introduced a "sane definition for ntohl()/htonl()"
for use on some GNU C platforms. Unfortunately, for some of
these platforms, this results in the introduction of a problem
which is essentially the reverse of a problem that commit 6e1c234
("Fix some warnings (on cygwin) to allow -Werror" 2008-07-3) was
intended to fix.
In particular, on platforms where the uint32_t type is defined
to be unsigned long, the return type of the new ntohl()/htonl()
is causing gcc to issue printf format warnings, such as:
warning: long unsigned int format, unsigned int arg (arg 3)
(nine such warnings, covering six different files). The earlier
commit (6e1c234) needed to suppress these same warnings, except
that the types were in the opposite direction; namely the format
specifier ("%u") was 'unsigned int' and the argument type (ie the
return type of ntohl()) was 'long unsigned int' (aka uint32_t).
In order to suppress these warnings, the earlier commit used the
(C99) PRIu32 format specifier, since the definition of this macro
is suitable for use with the uint32_t type on that platform.
This worked because the return type of the (original) platform
ntohl()/htonl() functions was uint32_t.
In order to suppress these warnings, we change the return type of
the new byte swapping functions in the compat/bswap.h header file
from 'unsigned int' to uint32_t.
Signed-off-by: Ramsay Jones <3e74413778ce9c8bebbbaedfd56741f6850faeaf@ramsay1.demon.co.uk>
Acked-by: Nicolas Pitre <d659c10e27d52b00987b65e85d99bce5480adcae@fluxnic.net>
Signed-off-by: Jeff King <696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net>
|
C
|
mit
|
destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git
|
2c1de29d687dc782897f0e566080cf5d9678893c
|
Sources/cllvm/shim.h
|
Sources/cllvm/shim.h
|
#define _GNU_SOURCE
#define __STDC_CONSTANT_MACROS
#define __STDC_FORMAT_MACROS
#define __STDC_LIMIT_MACROS
#include <llvm-c/Analysis.h>
#include <llvm-c/BitReader.h>
#include <llvm-c/BitWriter.h>
#include <llvm-c/Core.h>
#include <llvm-c/DebugInfo.h>
#include <llvm-c/Disassembler.h>
#include <llvm-c/ErrorHandling.h>
#include <llvm-c/ExecutionEngine.h>
#include <llvm-c/Initialization.h>
#include <llvm-c/IRReader.h>
#include <llvm-c/Linker.h>
#include <llvm-c/LinkTimeOptimizer.h>
#include <llvm-c/lto.h>
#include <llvm-c/Object.h>
#include <llvm-c/OrcBindings.h>
#include <llvm-c/Support.h>
#include <llvm-c/Target.h>
#include <llvm-c/TargetMachine.h>
#include <llvm-c/Transforms/IPO.h>
#include <llvm-c/Transforms/PassManagerBuilder.h>
#include <llvm-c/Transforms/Scalar.h>
#include <llvm-c/Transforms/Vectorize.h>
#include <llvm-c/Types.h>
|
#define _GNU_SOURCE
#define __STDC_CONSTANT_MACROS
#define __STDC_FORMAT_MACROS
#define __STDC_LIMIT_MACROS
#include <llvm-c/Analysis.h>
#include <llvm-c/BitReader.h>
#include <llvm-c/BitWriter.h>
#include <llvm-c/Core.h>
#include <llvm-c/DebugInfo.h>
#include <llvm-c/Disassembler.h>
#include <llvm-c/ErrorHandling.h>
#include <llvm-c/ExecutionEngine.h>
#include <llvm-c/Initialization.h>
#include <llvm-c/IRReader.h>
#include <llvm-c/Linker.h>
#include <llvm-c/LinkTimeOptimizer.h>
#include <llvm-c/lto.h>
#include <llvm-c/Object.h>
#include <llvm-c/OrcBindings.h>
#include <llvm-c/Support.h>
#include <llvm-c/Target.h>
#include <llvm-c/TargetMachine.h>
#include <llvm-c/Transforms/IPO.h>
#include <llvm-c/Transforms/PassManagerBuilder.h>
#include <llvm-c/Transforms/Scalar.h>
#if LLVM_VERSION_MAJOR > 6
// LLVMAddLowerSwitchPass and LLVMAddPromoteMemoryToRegisterPass live here
// as of LLVM 7.0
#include <llvm-c/Transforms/Utils.h>
#endif
#include <llvm-c/Transforms/Vectorize.h>
#include <llvm-c/Types.h>
|
Prepare for LLVM 7.0 migrating some utility passes
|
Prepare for LLVM 7.0 migrating some utility passes
|
C
|
mit
|
trill-lang/LLVMSwift
|
4f6d59a7ad30a4e27be1d3db20f39ad718bfb67a
|
src/vm/moar/ops/perl6_ops.c
|
src/vm/moar/ops/perl6_ops.c
|
#define MVM_SHARED 1
#include "moar.h"
/* Initializes the Perl 6 extension ops. */
static void p6init(MVMThreadContext *tc) {
}
/* Registers the extops with MoarVM. */
void Rakudo_ops_init(MVMThreadContext *tc) {
MVM_ext_register_extop(tc, "p6init", p6init, 0, NULL);
}
|
#define MVM_SHARED 1
#include "moar.h"
/* Initializes the Perl 6 extension ops. */
static void p6init(MVMThreadContext *tc) {
}
/* Registers the extops with MoarVM. */
MVM_DLL_EXPORT void Rakudo_ops_init(MVMThreadContext *tc) {
MVM_ext_register_extop(tc, "p6init", p6init, 0, NULL);
}
|
Make sure to export extops init symbol.
|
Make sure to export extops init symbol.
|
C
|
artistic-2.0
|
Gnouc/rakudo,teodozjan/rakudo,tbrowder/rakudo,sergot/rakudo,nunorc/rakudo,ugexe/rakudo,ab5tract/rakudo,salortiz/rakudo,tony-o/rakudo,zostay/rakudo,MasterDuke17/rakudo,azawawi/rakudo,cygx/rakudo,labster/rakudo,cognominal/rakudo,skids/rakudo,labster/rakudo,sjn/rakudo,tony-o/rakudo,sergot/rakudo,ungrim97/rakudo,samcv/rakudo,tony-o/deb-rakudodaily,LLFourn/rakudo,cygx/rakudo,salortiz/rakudo,cygx/rakudo,jonathanstowe/rakudo,cygx/rakudo,rakudo/rakudo,softmoth/rakudo,zostay/rakudo,azawawi/rakudo,paultcochrane/rakudo,lucasbuchala/rakudo,dankogai/rakudo,softmoth/rakudo,zostay/rakudo,ugexe/rakudo,tony-o/deb-rakudodaily,lucasbuchala/rakudo,tony-o/deb-rakudodaily,awwaiid/rakudo,raydiak/rakudo,niner/rakudo,skids/rakudo,samcv/rakudo,nbrown/rakudo,tony-o/deb-rakudodaily,MasterDuke17/rakudo,awwaiid/rakudo,cognominal/rakudo,MasterDuke17/rakudo,nbrown/rakudo,nunorc/rakudo,teodozjan/rakudo,rakudo/rakudo,LLFourn/rakudo,zhuomingliang/rakudo,jonathanstowe/rakudo,salortiz/rakudo,rakudo/rakudo,paultcochrane/rakudo,sjn/rakudo,azawawi/rakudo,niner/rakudo,tony-o/rakudo,tony-o/rakudo,paultcochrane/rakudo,retupmoca/rakudo,nbrown/rakudo,dankogai/rakudo,rakudo/rakudo,labster/rakudo,MasterDuke17/rakudo,ungrim97/rakudo,jonathanstowe/rakudo,cognominal/rakudo,zhuomingliang/rakudo,usev6/rakudo,Gnouc/rakudo,sergot/rakudo,tbrowder/rakudo,dankogai/rakudo,MasterDuke17/rakudo,tony-o/deb-rakudodaily,niner/rakudo,jonathanstowe/rakudo,b2gills/rakudo,sjn/rakudo,tbrowder/rakudo,b2gills/rakudo,raydiak/rakudo,tbrowder/rakudo,softmoth/rakudo,raydiak/rakudo,dwarring/rakudo,retupmoca/rakudo,cygx/rakudo,usev6/rakudo,tbrowder/rakudo,ab5tract/rakudo,zostay/rakudo,awwaiid/rakudo,ungrim97/rakudo,rakudo/rakudo,zhuomingliang/rakudo,b2gills/rakudo,awwaiid/rakudo,Gnouc/rakudo,softmoth/rakudo,ab5tract/rakudo,laben/rakudo,LLFourn/rakudo,samcv/rakudo,retupmoca/rakudo,niner/rakudo,nbrown/rakudo,nunorc/rakudo,nbrown/rakudo,azawawi/rakudo,b2gills/rakudo,retupmoca/rakudo,skids/rakudo,ugexe/rakudo,samcv/rakudo,LLFourn/rakudo,teodozjan/rakudo,tony-o/deb-rakudodaily,cognominal/rakudo,ungrim97/rakudo,dwarring/rakudo,awwaiid/rakudo,sjn/rakudo,laben/rakudo,nunorc/rakudo,teodozjan/rakudo,usev6/rakudo,zhuomingliang/rakudo,paultcochrane/rakudo,Leont/rakudo,Gnouc/rakudo,paultcochrane/rakudo,usev6/rakudo,nbrown/rakudo,labster/rakudo,labster/rakudo,Leont/rakudo,samcv/rakudo,tony-o/rakudo,dankogai/rakudo,lucasbuchala/rakudo,ab5tract/rakudo,rakudo/rakudo,Gnouc/rakudo,labster/rakudo,lucasbuchala/rakudo,ugexe/rakudo,dwarring/rakudo,cognominal/rakudo,MasterDuke17/rakudo,skids/rakudo,sjn/rakudo,laben/rakudo,raydiak/rakudo,sergot/rakudo,ugexe/rakudo,dwarring/rakudo,Leont/rakudo,skids/rakudo,Leont/rakudo,salortiz/rakudo,jonathanstowe/rakudo,salortiz/rakudo,tbrowder/rakudo,tony-o/deb-rakudodaily,lucasbuchala/rakudo,tony-o/rakudo,laben/rakudo,dankogai/rakudo,ungrim97/rakudo,usev6/rakudo,LLFourn/rakudo,softmoth/rakudo,b2gills/rakudo,ab5tract/rakudo,Gnouc/rakudo,azawawi/rakudo,salortiz/rakudo
|
f679a986df5514bb42e001a5afd149f839ebed03
|
test/Sema/return-noreturn.c
|
test/Sema/return-noreturn.c
|
// RUN: clang-cc %s -fsyntax-only -verify -fblocks -Wmissing-noreturn
int j;
void test1() { // expected-warning {{function could be attribute 'noreturn'}}
^ (void) { while (1) { } }(); // expected-warning {{block could be attribute 'noreturn'}}
^ (void) { if (j) while (1) { } }();
while (1) { }
}
void test2() {
if (j) while (1) { }
}
|
// RUN: clang-cc %s -fsyntax-only -verify -fblocks -Wmissing-noreturn
int j;
void test1() { // expected-warning {{function could be attribute 'noreturn'}}
^ (void) { while (1) { } }(); // expected-warning {{block could be attribute 'noreturn'}}
^ (void) { if (j) while (1) { } }();
while (1) { }
}
void test2() {
if (j) while (1) { }
}
// This test case illustrates that we don't warn about the missing return
// because the function is marked noreturn and there is an infinite loop.
extern int foo_test_3();
__attribute__((__noreturn__)) void* test3(int arg) {
while (1) foo_test_3();
}
__attribute__((__noreturn__)) void* test3_positive(int arg) {
while (0) foo_test_3();
} // expected-warning{{function declared 'noreturn' should not return}}
|
Add two more test cases for attribute 'noreturn'.
|
Add two more test cases for attribute 'noreturn'.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@82841 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
|
d833601615d09c98fdc629e9b07490ffc218ff7d
|
bottleopener/platforms.h
|
bottleopener/platforms.h
|
#pragma once
//#define __PLATFORM_CARRIOTS__ 1
//#define __PLATFORM_INITIALSTATE__ 1
#define __PLATFORM_SHIFTR__ 1
#define __PLATFORM_THINGSPEAK__ 1
|
#pragma once
#define __PLATFORM_CARRIOTS__ 1
//#define __PLATFORM_INITIALSTATE__ 1
//#define __PLATFORM_SHIFTR__ 1
//#define __PLATFORM_THINGSPEAK__ 1
|
Change platform selection to Carriots
|
Change platform selection to Carriots
|
C
|
mit
|
Zenika/bottleopener_iot,Zenika/bottleopener_iot,Zenika/bottleopener_iot,Zenika/bottleopener_iot
|
00aac489636d56fcbe90874fa18e26c617d2d26d
|
3RVX/HotkeyInfo.h
|
3RVX/HotkeyInfo.h
|
#pragma once
#include <map>
#include <vector>
class HotkeyInfo {
public:
enum HotkeyActions {
IncreaseVolume,
DecreaseVolume,
SetVolume,
Mute,
VolumeSlider,
EjectDrive,
EjectLatestDrive,
MediaKey,
RunApp,
Settings,
Exit,
};
static std::vector<std::wstring> ActionNames;
enum MediaKeys {
PlayPause,
Stop,
Next,
Previous,
};
static std::vector<std::wstring> MediaKeyNames;
static std::vector<unsigned short> MediaKeyVKs;
public:
int keyCombination = 0;
int action = -1;
std::vector<std::wstring> args;
int ArgToInt(int argIdx);
double ArgToDouble(int argIdx);
bool HasArgs();
void AllocateArg(unsigned int argIdx);
std::wstring ToString();
private:
std::map<int, int> _intArgs;
std::map<int, double> _doubleArgs;
};
|
#pragma once
#include <map>
#include <vector>
class HotkeyInfo {
public:
enum HotkeyActions {
IncreaseVolume,
DecreaseVolume,
SetVolume,
Mute,
VolumeSlider,
EjectDrive,
EjectLatestDrive,
MediaKey,
RunApp,
Settings,
Exit,
};
static std::vector<std::wstring> ActionNames;
enum MediaKeys {
PlayPause,
Stop,
Next,
Previous,
};
static std::vector<std::wstring> MediaKeyNames;
static std::vector<unsigned short> MediaKeyVKs;
public:
int keyCombination = 0;
int action = -1;
std::vector<std::wstring> args;
/// <summary>
/// Retrieves the argument at the given index and converts it to an integer.
/// Subsequent calls that specify the same index will be cached.
/// </summary>
int ArgToInt(unsigned int argIdx);
/// <summary>
/// Retrieves the argument at the given index and converts it to a double.
/// Subsequent calls that specify the same index will be cached.
/// </summary>
double ArgToDouble(unsigned int argIdx);
bool HasArgs();
void AllocateArg(unsigned int argIdx);
std::wstring ToString();
private:
std::map<int, int> _intArgs;
std::map<int, double> _doubleArgs;
};
|
Add documentation and ensure parameters are unsigned
|
Add documentation and ensure parameters are unsigned
|
C
|
bsd-2-clause
|
Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,malensek/3RVX
|
eed9cdf420ef882a796d9f8e9a233ded25c9becb
|
tests/rtp/codec-discovery.c
|
tests/rtp/codec-discovery.c
|
#include <gst/gst.h>
#include <gst/farsight/fs-codec.h>
#include "fs-rtp-discover-codecs.h"
int main (int argc, char **argv)
{
GList *elements = NULL;
GError *error = NULL;
gst_init (&argc, &argv);
g_debug ("AUDIO STARTING!!");
elements = load_codecs (FS_MEDIA_TYPE_AUDIO, &error);
if (error)
g_debug ("Error: %s", error->message);
g_clear_error (&error);
unload_codecs (FS_MEDIA_TYPE_AUDIO);
g_debug ("AUDIO FINISHED!!");
g_debug ("VIDEO STARTING!!");
elements = load_codecs (FS_MEDIA_TYPE_VIDEO, &error);
if (error)
g_debug ("Error: %s", error->message);
g_clear_error (&error);
unload_codecs (FS_MEDIA_TYPE_VIDEO);
g_debug ("VIDEO FINISHED!!");
return 0;
}
|
#include <gst/gst.h>
#include <gst/farsight/fs-codec.h>
#include "fs-rtp-discover-codecs.h"
int main (int argc, char **argv)
{
GList *elements = NULL;
GError *error = NULL;
gst_init (&argc, &argv);
g_debug ("AUDIO STARTING!!");
elements = fs_rtp_blueprints_get (FS_MEDIA_TYPE_AUDIO, &error);
if (error)
g_debug ("Error: %s", error->message);
g_clear_error (&error);
fs_rtp_blueprints_unref (FS_MEDIA_TYPE_AUDIO);
g_debug ("AUDIO FINISHED!!");
g_debug ("VIDEO STARTING!!");
elements = fs_rtp_blueprints_get (FS_MEDIA_TYPE_VIDEO, &error);
if (error)
g_debug ("Error: %s", error->message);
g_clear_error (&error);
fs_rtp_blueprints_unref (FS_MEDIA_TYPE_VIDEO);
g_debug ("VIDEO FINISHED!!");
return 0;
}
|
Use the new function names for the codec discovery tests
|
Use the new function names for the codec discovery tests
|
C
|
lgpl-2.1
|
tieto/farstream,tieto/farstream,pexip/farstream,ahmedammar/skype_farsight2,pexip/farstream,tieto/farstream,shadeslayer/farstream,pexip/farstream,ahmedammar/skype_farsight2,kakaroto/farstream,ahmedammar/skype_farsight2,pexip/farstream,tieto/farstream,kakaroto/farstream,ahmedammar/skype_farsight2,shadeslayer/farstream,kakaroto/farstream,shadeslayer/farstream,kakaroto/farstream,shadeslayer/farstream,tieto/farstream
|
6fd88d81d55e1199bab54aedc186e01dda4dbc2a
|
libpatlms/include/patlms/type/exception/detail/date_parse_exception.h
|
libpatlms/include/patlms/type/exception/detail/date_parse_exception.h
|
#ifndef INCLUDE_PATLMS_EXCEPTION_DETAIL_DATE_PARSE_EXCEPTION_H
#define INCLUDE_PATLMS_EXCEPTION_DETAIL_DATE_PARSE_EXCEPTION_H
#include <patlms/type/exception/exception.h>
namespace type
{
namespace exception
{
namespace detail
{
class DateParseException : public interface::Exception {
inline char const* what() const throw () override;
};
char const* DateParseException::what() const throw () {
return "Can't parse date.";
}
}
}
}
#endif /* INCLUDE_PATLMS_EXCEPTION_DETAIL_DATE_PARSE_EXCEPTION_H */
|
#ifndef INCLUDE_PATLMS_EXCEPTION_DETAIL_DATE_PARSE_EXCEPTION_H
#define INCLUDE_PATLMS_EXCEPTION_DETAIL_DATE_PARSE_EXCEPTION_H
#include <patlms/type/exception/exception.h>
namespace type
{
namespace exception
{
namespace detail
{
class DateParseException : public interface::Exception {
inline char const* what() const throw () override;
};
char const* DateParseException::what() const throw () {
return "Can't parse date";
}
}
}
}
#endif /* INCLUDE_PATLMS_EXCEPTION_DETAIL_DATE_PARSE_EXCEPTION_H */
|
Remove dot from exception message
|
Remove dot from exception message
|
C
|
mit
|
chyla/pat-lms,chyla/pat-lms,chyla/slas,chyla/slas,chyla/slas,chyla/pat-lms,chyla/slas,chyla/pat-lms,chyla/pat-lms,chyla/pat-lms,chyla/slas,chyla/slas,chyla/pat-lms,chyla/slas
|
269c892039f901b97057614b664e72df31c2c597
|
src/driver_control/dc_dump.c
|
src/driver_control/dc_dump.c
|
void dc_dump() {
static int prev_l = 0, prev_r = 0;
if (!prev_l && vexRT[Btn7L])
dump_set(-80);
if (!prev_r && vexRT[Btn7R])
dump_set(80);
if ((prev_l && !vexRT[Btn7L]) || (prev_r && !vexRT[Btn7R]))
dump_set(0);
prev_l = vexRT[Btn7L];
prev_r = vexRT[Btn7R];
}
|
void dc_dump() {
// TODO: Check direction and change to U and D
static int prev_l = 0, prev_r = 0;
if (!prev_l && vexRT[Btn7L])
dump_set(-127);
if (!prev_r && vexRT[Btn7R])
dump_set(127);
if ((prev_l && !vexRT[Btn7L]) || (prev_r && !vexRT[Btn7R]))
dump_set(0);
prev_l = vexRT[Btn7L];
prev_r = vexRT[Btn7R];
}
|
Change dump power to 127
|
Change dump power to 127
|
C
|
mit
|
qsctr/vex-4194b-2016
|
7d024fbf8348d0e5979c51641a5eec857a0c01e0
|
iOS/PlayPlan/Main/MainViewController.h
|
iOS/PlayPlan/Main/MainViewController.h
|
//
// ViewController.h
// PlayPlan
//
// Created by Zeacone on 15/10/25.
// Copyright © 2015年 Zeacone. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Accelerate/Accelerate.h>
#import "PlayPlan.h"
#import "SideMenu.h"
@interface MainViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
@end
|
//
// ViewController.h
// PlayPlan
//
// Created by Zeacone on 15/10/25.
// Copyright © 2015年 Zeacone. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Accelerate/Accelerate.h>
#import "PlayPlan.h"
#import "SideMenu.h"
@class MainViewController;
@protocol MainDelegate <NSObject>
- (void)dismissViewController:(MainViewController *)mainViewController;
@end
@interface MainViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, assign) id<MainDelegate> delegate;
@end
|
Add delegate for main view controller.
|
Add delegate for main view controller.
|
C
|
mit
|
Zeacone/PlayPlan,Zeacone/PlayPlan
|
3e26416dfc0cbfe6db4d07fb0564300ab538a3cc
|
folly/io/async/ssl/OpenSSLTransportCertificate.h
|
folly/io/async/ssl/OpenSSLTransportCertificate.h
|
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <folly/io/async/AsyncTransportCertificate.h>
#include <folly/portability/OpenSSL.h>
#include <folly/ssl/OpenSSLPtrTypes.h>
namespace folly {
/**
* Generic interface applications may implement to convey self or peer
* certificate related information.
*/
class OpenSSLTransportCertificate : public AsyncTransportCertificate {
public:
virtual ~OpenSSLTransportCertificate() = default;
// TODO: Once all callsites using getX509() perform dynamic casts to this
// OpenSSLTransportCertificate type, we can move that method to be declared
// here instead.
};
} // namespace folly
|
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <folly/io/async/AsyncTransportCertificate.h>
#include <folly/portability/OpenSSL.h>
#include <folly/ssl/OpenSSLPtrTypes.h>
namespace folly {
/**
* Generic interface applications may implement to convey self or peer
* certificate related information.
*/
class OpenSSLTransportCertificate : public AsyncTransportCertificate {
public:
virtual ~OpenSSLTransportCertificate() = default;
// TODO: Once all callsites using getX509() perform dynamic casts to this
// OpenSSLTransportCertificate type, we can move that method to be declared
// here instead.
static ssl::X509UniquePtr tryExtractX509(
const AsyncTransportCertificate* cert) {
auto opensslCert = dynamic_cast<const OpenSSLTransportCertificate*>(cert);
return opensslCert ? opensslCert->getX509() : nullptr;
}
};
} // namespace folly
|
Add static helper to extract X509 from cert
|
Add static helper to extract X509 from cert
Summary:
Since callsites wanting an X509 from an AsyncTransportCertificate will have to
perform a dynamic cast to an OpenSSLTransportCertificiate, we might as well
abstract that away into a static helper.
This makes it potentially a bit easier to change implementation details in the
future without having to update a bunch of existing callsites (and it hides the
ugliness of the dynamic cast).
Reviewed By: yfeldblum, mingtaoy
Differential Revision: D31358948
fbshipit-source-id: 9ed2f81db4cf746a83871961895a0c1f1fb5c297
|
C
|
apache-2.0
|
facebook/folly,facebook/folly,facebook/folly,facebook/folly,facebook/folly
|
dc429dd18745437590ab54bb6041490b86bfb543
|
source/Pictus/imagecache_fileentry.h
|
source/Pictus/imagecache_fileentry.h
|
#ifndef PICTUS_IMAGECACHE_FILEENTRY_H
#define PICTUS_IMAGECACHE_FILEENTRY_H
#include "illa/image.h"
#include "orz/types.h"
#include <boost/date_time.hpp>
#if _WIN32
#define ENABLE_CREATED_TIME
#endif
namespace Img {
namespace Internal {
class FileEntry {
public:
Img::Image::Ptr Image();
const std::string& Name() const;
void Rename(const std::string& newName);
std::time_t DateModified();
std::time_t DateCreated();
std::time_t FileSize();
FileEntry(std::string fullname);
private:
void QueryFile();
Img::Image::Ptr m_image;
std::string m_fullname;
#ifdef ENABLE_CREATED_TIME
std::time_t m_dateCreate;
#endif
std::time_t m_dateModified;
bool m_hasQueriedFile;
uintmax_t m_fileSize;
};
}
}
#endif
|
#ifndef PICTUS_IMAGECACHE_FILEENTRY_H
#define PICTUS_IMAGECACHE_FILEENTRY_H
#include "illa/image.h"
#include "orz/types.h"
#include <boost/date_time.hpp>
#if _WIN32
#define ENABLE_CREATED_TIME
#endif
namespace Img {
namespace Internal {
class FileEntry {
public:
Img::Image::Ptr Image();
const std::string& Name() const;
void Rename(const std::string& newName);
std::time_t DateModified();
std::time_t DateCreated();
FileInt FileSize();
FileEntry(std::string fullname);
private:
void QueryFile();
Img::Image::Ptr m_image;
std::string m_fullname;
#ifdef ENABLE_CREATED_TIME
std::time_t m_dateCreate;
#endif
std::time_t m_dateModified;
bool m_hasQueriedFile;
uintmax_t m_fileSize;
};
}
}
#endif
|
Use correct data type for file size
|
Use correct data type for file size
|
C
|
mit
|
poppeman/Pictus,poppeman/Pictus,poppeman/Pictus
|
47d66020e838b170d10e4e081c8592d2ec3816c4
|
test_case.h
|
test_case.h
|
#ifndef TEST_CASE_H
#define TEST_CASE_H
namespace fs_testing {
class test_case {
public:
virtual ~test_case() {};
virtual int setup() = 0;
virtual int run() = 0;
virtual int check_test() = 0;
};
typedef test_case* create_t();
typedef void destroy_t(test_case*);
} // namespace fs_testing
#endif
|
#ifndef TEST_CASE_H
#define TEST_CASE_H
namespace fs_testing {
class test_case {
public:
virtual ~test_case() {};
virtual int setup() = 0;
virtual int run() = 0;
virtual int check_test() = 0;
};
typedef test_case* test_create_t();
typedef void test_destroy_t(test_case*);
} // namespace fs_testing
#endif
|
Modify to work with dynamic class loader class.
|
Modify to work with dynamic class loader class.
|
C
|
apache-2.0
|
utsaslab/crashmonkey,utsaslab/crashmonkey,utsaslab/crashmonkey,utsaslab/crashmonkey
|
ed7d196ea8ad39186c5fedd21e3a3c135027bc01
|
master/types.h
|
master/types.h
|
//Declarations for master types
typedef enum
{
Register = 0
} MODBUSDataType; //MODBUS data types enum (coil, register, input, etc.)
typedef struct
{
uint8_t Address; //Device address
uint8_t Function; //Function called, in which exception occured
uint8_t Code; //Exception code
} MODBUSExceptionLog; //Parsed exception data
typedef struct
{
uint8_t Address; //Device address
MODBUSDataType DataType; //Data type
uint16_t Register; //Register, coil, input ID
uint16_t Value; //Value of data
} MODBUSData;
typedef struct
{
uint8_t Length; //Length of frame, if it's equal to 0, frame is not ready
uint8_t *Frame; //Request frame content
} MODBUSRequestStatus; //Type containing information about frame that is set up at master side
typedef struct
{
MODBUSData *Data; //Data read from slave
MODBUSExceptionLog Exception; //Optional exception read
MODBUSRequestStatus Request; //Formatted request for slave
uint8_t DataLength; //Count of data type instances read from slave
uint8_t Error; //Have any error occured?
} MODBUSMasterStatus; //Type containing master device configuration data
|
//Declarations for master types
typedef enum
{
Register = 0
} MODBUSDataType; //MODBUS data types enum (coil, register, input, etc.)
typedef struct
{
uint8_t Address; //Device address
uint8_t Function; //Function called, in which exception occured
uint8_t Code; //Exception code
} MODBUSExceptionLog; //Parsed exception data
typedef struct
{
uint8_t Address; //Device address
MODBUSDataType DataType; //Data type
uint16_t Register; //Register, coil, input ID
uint16_t Value; //Value of data
} MODBUSData;
typedef struct
{
uint8_t Length; //Length of frame, if it's equal to 0, frame is not ready
uint8_t *Frame; //Request frame content
} MODBUSRequestStatus; //Type containing information about frame that is set up at master side
typedef struct
{
MODBUSData *Data; //Data read from slave
MODBUSExceptionLog Exception; //Optional exception read
MODBUSRequestStatus Request; //Formatted request for slave
uint8_t DataLength; //Count of data type instances read from slave
uint8_t Error; //Have any error occured?
uint8_t Finished; //Is parsing finished?
} MODBUSMasterStatus; //Type containing master device configuration data
|
Add new member in MODBUSMasterStatus
|
Add new member in MODBUSMasterStatus
|
C
|
mit
|
Jacajack/modlib
|
472c3832f55fc92d866aaafe1ff78e6c548c1bd5
|
core/editline/src/rlcurses.h
|
core/editline/src/rlcurses.h
|
// @(#)root/editline:$Id$
// Author: Axel Naumann, 2009
/*************************************************************************
* Copyright (C) 1995-2009, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifdef __sun
# include R__CURSESHDR
extern "C" {
// cannot #include term.fH because it #defines move() etc
char *tparm(char*, long, long, long, long, long, long, long, long, long);
char *tigetstr(char*);
char *tgoto(char*, int, int);
int tputs(char*, int, int (*)(int));
int tgetflag(char*);
int tgetnum(char*);
char* tgetstr(char*, char**);
int tgetent(char*, const char*);
}
// un-be-lievable.
# undef erase
# undef move
# undef clear
# undef del
# undef key_end
# undef key_clear
# undef key_print
#else
# include R__CURSESHDR
# include <termcap.h>
# include <termcap.h>
extern "C" int setupterm(const char* term, int fd, int* perrcode);
#endif
|
// @(#)root/editline:$Id$
// Author: Axel Naumann, 2009
/*************************************************************************
* Copyright (C) 1995-2009, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifdef __sun
# include R__CURSESHDR
extern "C" {
// cannot #include term.h because it #defines move() etc
char *tparm(char*, long, long, long, long, long, long, long, long, long);
char *tigetstr(char*);
int tigetnum(char*);
char *tgoto(char*, int, int);
int tputs(char*, int, int (*)(int));
int tgetflag(char*);
int tgetnum(char*);
char* tgetstr(char*, char**);
int tgetent(char*, const char*);
}
// un-be-lievable.
# undef erase
# undef move
# undef clear
# undef del
# undef key_end
# undef key_clear
# undef key_print
#else
# include R__CURSESHDR
# include <termcap.h>
# include <termcap.h>
extern "C" int setupterm(const char* term, int fd, int* perrcode);
#endif
|
Fix for solaris: declare tigetnum
|
Fix for solaris: declare tigetnum
git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@30238 27541ba8-7e3a-0410-8455-c3a389f83636
|
C
|
lgpl-2.1
|
bbannier/ROOT,dawehner/root,dawehner/root,dawehner/root,dawehner/root,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,dawehner/root,dawehner/root,bbannier/ROOT,dawehner/root,dawehner/root
|
f2dc5111e65e46a2f7f34fc0117d015749558ec9
|
TDTChocolate/FoundationAdditions/NSProcessInfo+TDTEnvironmentDetection.h
|
TDTChocolate/FoundationAdditions/NSProcessInfo+TDTEnvironmentDetection.h
|
#import <Foundation/Foundation.h>
@interface NSProcessInfo (TDTEnvironmentDetection)
/**
Determine if the current process is running inside a unit test context.
Use case:
When running unit tests on iOS, it is not necessary to fully initialize the
application. The following check can be used to return early in the application
launch process:
\code
- (BOOL)application:(UIApplication *)app didFinishLaunchingWithOptions:(id)options {
#ifdef DEBUG
if ([[NSProcessInfo processInfo] isRunningTests]) return YES;
#endif
...
return YES;
}
\endcode
@return YES if the process has been invoked to run the XCTest bundle.
*/
@property (nonatomic, readonly) BOOL tdt_isRunningTests;
/**
Determine if a debugger is attached to the current process.
This can help decide, for example, whether to redirect standard error
(and hence, everything logged by @p TDTLog) to a file. Usually, when
a process is attached to a debugger, you do not want to redirect
standard error.
Source: Technical Q&A QA1361 "Detecting the Debugger"
@note This method relies on a public but unstable Apple API. It
should not be used in a release build.
*/
- (BOOL)tdt_isDebugged;
@end
|
#import <Foundation/Foundation.h>
@interface NSProcessInfo (TDTEnvironmentDetection)
/**
Determine if the current process is running inside a unit test context.
Use case:
When running unit tests on iOS, it is not necessary to fully initialize the
application. The following check can be used to return early in the application
launch process:
\code
- (BOOL)application:(UIApplication *)app didFinishLaunchingWithOptions:(id)options {
#ifdef DEBUG
if ([[NSProcessInfo processInfo] tdt_isRunningTests]) return YES;
#endif
...
return YES;
}
\endcode
@return YES if the process has been invoked to run the XCTest bundle.
*/
@property (nonatomic, readonly) BOOL tdt_isRunningTests;
/**
Determine if a debugger is attached to the current process.
This can help decide, for example, whether to redirect standard error
(and hence, everything logged by @p TDTLog) to a file. Usually, when
a process is attached to a debugger, you do not want to redirect
standard error.
Source: Technical Q&A QA1361 "Detecting the Debugger"
@note This method relies on a public but unstable Apple API. It
should not be used in a release build.
*/
- (BOOL)tdt_isDebugged;
@end
|
Update method name in documentation
|
Update method name in documentation
|
C
|
bsd-3-clause
|
talk-to/Chocolate,talk-to/Chocolate
|
ac9a5b3f4fb6037e3c75440a22cdda23776bd053
|
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_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);
}
|
#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_FUNC(ring_glActiveTexture)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
glActiveTexture( (GLenum ) (int) RING_API_GETNUMBER(1));
}
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("glaccum",ring_glAccum);
ring_vm_funcregister("glactivetexture",ring_glActiveTexture);
}
|
Update RingOpenGL - Add Function (Source Code) : void glActiveTexture(GLenum texture)
|
Update RingOpenGL - Add Function (Source Code) : void glActiveTexture(GLenum texture)
|
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
|
043f57e09b031bc53b4e2b0837f2d272da8717b5
|
include/canvas/renderer/pipeline_builder.h
|
include/canvas/renderer/pipeline_builder.h
|
#pragma once
#include <nucleus/optional.h>
#include "canvas/renderer/pipeline.h"
#include "canvas/renderer/vertex_definition.h"
#include "canvas/utils/shader_source.h"
namespace ca {
class Renderer;
class PipelineBuilder {
public:
explicit PipelineBuilder(Renderer* renderer);
PipelineBuilder& attribute(nu::StringView name, ComponentType type,
ComponentCount component_count);
PipelineBuilder& vertex_shader(ShaderSource source);
PipelineBuilder& geometry_shader(ShaderSource source);
PipelineBuilder& fragment_shader(ShaderSource source);
NU_NO_DISCARD nu::Optional<Pipeline> build() const;
private:
Renderer* renderer_;
VertexDefinition vertex_definition_;
nu::Optional<ShaderSource> vertex_shader_;
nu::Optional<ShaderSource> geometry_shader_;
nu::Optional<ShaderSource> fragment_shader_;
};
} // namespace ca
|
#pragma once
#include <nucleus/optional.hpp>
#include "canvas/renderer/pipeline.h"
#include "canvas/renderer/vertex_definition.h"
#include "canvas/utils/shader_source.h"
namespace ca {
class Renderer;
class PipelineBuilder {
public:
explicit PipelineBuilder(Renderer* renderer);
PipelineBuilder& attribute(nu::StringView name, ComponentType type,
ComponentCount component_count);
PipelineBuilder& vertex_shader(ShaderSource source);
PipelineBuilder& geometry_shader(ShaderSource source);
PipelineBuilder& fragment_shader(ShaderSource source);
NU_NO_DISCARD nu::Optional<Pipeline> build() const;
private:
Renderer* renderer_;
VertexDefinition vertex_definition_;
nu::Optional<ShaderSource> vertex_shader_;
nu::Optional<ShaderSource> geometry_shader_;
nu::Optional<ShaderSource> fragment_shader_;
};
} // namespace ca
|
Fix compilation error with improved Optional.
|
Fix compilation error with improved Optional.
|
C
|
mit
|
tiaanl/canvas,tiaanl/canvas,tiaanl/canvas
|
e9fbbe52f18826d5e44aaf596a59439cab4f4c60
|
test/CodeGen/2008-07-31-asm-labels.c
|
test/CodeGen/2008-07-31-asm-labels.c
|
// RUN: %clang_cc1 -emit-llvm -o %t %s
// RUN: not grep "@pipe()" %t
// RUN: grep '_thisIsNotAPipe' %t | count 3
// RUN: not grep 'g0' %t
// RUN: grep '_renamed' %t | count 2
// RUN: %clang_cc1 -DUSE_DEF -emit-llvm -o %t %s
// RUN: not grep "@pipe()" %t
// RUN: grep '_thisIsNotAPipe' %t | count 3
// <rdr://6116729>
void pipe() asm("_thisIsNotAPipe");
void f0() {
pipe();
}
void pipe(int);
void f1() {
pipe(1);
}
#ifdef USE_DEF
void pipe(int arg) {
int x = 10;
}
#endif
// PR3698
extern int g0 asm("_renamed");
int f2() {
return g0;
}
|
// RUN: %clang_cc1 -emit-llvm -o %t %s
// RUN: not grep "@pipe()" %t
// RUN: grep '_thisIsNotAPipe' %t | count 3
// RUN: not grep '@g0' %t
// RUN: grep '_renamed' %t | count 2
// RUN: %clang_cc1 -DUSE_DEF -emit-llvm -o %t %s
// RUN: not grep "@pipe()" %t
// RUN: grep '_thisIsNotAPipe' %t | count 3
// <rdr://6116729>
void pipe() asm("_thisIsNotAPipe");
void f0() {
pipe();
}
void pipe(int);
void f1() {
pipe(1);
}
#ifdef USE_DEF
void pipe(int arg) {
int x = 10;
}
#endif
// PR3698
extern int g0 asm("_renamed");
int f2() {
return g0;
}
|
Fix asm label testcase flaw
|
Fix asm label testcase flaw
- Testcase attempts to (not) grep 'g0' in output to ensure asm symbol is
properly renamed, but g0 is too generic and can be part of the
module's path in LLVM IR output.
- Changed to grep '@g0', which is what the proper global symbol name
would be if not using asm.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@338895 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/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,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
|
60b9d099416283d5f13f19fc19a5e7c20fe012e2
|
You-DataStore/datastore.h
|
You-DataStore/datastore.h
|
#pragma once
#ifndef YOU_DATASTORE_DATASTORE_H_
#define YOU_DATASTORE_DATASTORE_H_
#include <memory>
#include "task_typedefs.h"
#include "transaction.h"
namespace You {
namespace DataStore {
namespace UnitTests {}
class DataStore {
public:
Transaction && begin();
// Modifying methods
void post(TaskId, SerializedTask&);
void put(TaskId, SerializedTask&);
void erase(TaskId);
std::vector<SerializedTask> getAllTask();
private:
static DataStore& get();
bool isServing = false;
};
} // namespace DataStore
} // namespace You
#endif // YOU_DATASTORE_DATASTORE_H_
|
#pragma once
#ifndef YOU_DATASTORE_DATASTORE_H_
#define YOU_DATASTORE_DATASTORE_H_
#include <memory>
#include "task_typedefs.h"
#include "transaction.h"
namespace You {
namespace DataStore {
namespace UnitTests {}
class DataStore {
public:
Transaction && begin();
static DataStore& get();
// Modifying methods
void post(TaskId, SerializedTask&);
void put(TaskId, SerializedTask&);
void erase(TaskId);
std::vector<SerializedTask> getAllTask();
private:
bool isServing = false;
};
} // namespace DataStore
} // namespace You
#endif // YOU_DATASTORE_DATASTORE_H_
|
Modify the instance getter of DataStore to public
|
Modify the instance getter of DataStore to public
|
C
|
mit
|
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.