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
|
|---|---|---|---|---|---|---|---|---|---|
392db70fa268f52058018bc3b4fe672576e384e5
|
ReactiveCocoaFramework/ReactiveCocoa/NSUserDefaults+RACSupport.h
|
ReactiveCocoaFramework/ReactiveCocoa/NSUserDefaults+RACSupport.h
|
//
// NSUserDefaults+RACSupport.h
// ReactiveCocoa
//
// Created by Matt Diephouse on 12/19/13.
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@class RACChannelTerminal;
@interface NSUserDefaults (RACSupport)
// Creates and returns a terminal for binding the user defaults key.
//
// key - The user defaults key to create the channel terminal for.
//
// This makes it easy to bind a property to a default by assigning to
// `RACChannelTo`.
//
// The terminal will send the value of the user defaults key upon subscription.
//
// Returns a channel terminal.
- (RACChannelTerminal *)rac_channelTerminalForKey:(NSString *)key;
@end
|
//
// NSUserDefaults+RACSupport.h
// ReactiveCocoa
//
// Created by Matt Diephouse on 12/19/13.
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@class RACChannelTerminal;
@interface NSUserDefaults (RACSupport)
/// Creates and returns a terminal for binding the user defaults key.
///
/// key - The user defaults key to create the channel terminal for.
///
/// This makes it easy to bind a property to a default by assigning to
/// `RACChannelTo`.
///
/// The terminal will send the value of the user defaults key upon subscription.
///
/// Returns a channel terminal.
- (RACChannelTerminal *)rac_channelTerminalForKey:(NSString *)key;
@end
|
Add a third slash for Xcode
|
Add a third slash for Xcode
|
C
|
mit
|
dachaoisme/ReactiveCocoa,almassapargali/ReactiveCocoa,on99/ReactiveCocoa,itschaitanya/ReactiveCocoa,brightcove/ReactiveCocoa,tonyarnold/ReactiveCocoa,chao95957/ReactiveCocoa,zhiwen1024/ReactiveCocoa,Khan/ReactiveCocoa,cnbin/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,bencochran/ReactiveCocoa,jeelun/ReactiveCocoa,leelili/ReactiveCocoa,wpstarnice/ReactiveCocoa,mtxs007/ReactiveCocoa,xiaobing2007/ReactiveCocoa,DreamHill/ReactiveCocoa,beni55/ReactiveCocoa,hbucius/ReactiveCocoa,zhukaixy/ReactiveCocoa,nikita-leonov/ReactiveCocoa,emodeqidao/ReactiveCocoa,dachaoisme/ReactiveCocoa,ohwutup/ReactiveCocoa,hj3938/ReactiveCocoa,FelixYin66/ReactiveCocoa,tonyarnold/ReactiveCocoa,sdhzwm/ReactiveCocoa,Pikdays/ReactiveCocoa,koamac/ReactiveCocoa,Eveian/ReactiveCocoa,gabemdev/ReactiveCocoa,yizzuide/ReactiveCocoa,kevin-zqw/ReactiveCocoa,windgo/ReactiveCocoa,yoichitgy/ReactiveCocoa,ailyanlu/ReactiveCocoa,Farteen/ReactiveCocoa,rpowelll/ReactiveCocoa,yoichitgy/ReactiveCocoa,lixar/ReactiveCocoa,nikita-leonov/ReactiveCocoa,tzongw/ReactiveCocoa,tiger8888/ReactiveCocoa,200895045/ReactiveCocoa,sandyway/ReactiveCocoa,ShawnLeee/ReactiveCocoa,gengjf/ReactiveCocoa,hoanganh6491/ReactiveCocoa,jeelun/ReactiveCocoa,esttorhe/ReactiveCocoa,calebd/ReactiveCocoa,valleyman86/ReactiveCocoa,kevin-zqw/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,andersio/ReactiveCocoa,jaylib/ReactiveCocoa,yonekawa/ReactiveCocoa,DongDongDongDong/ReactiveCocoa,CCOOOOLL/ReactiveCocoa,eyu1988/ReactiveCocoa,xiaoliyang/ReactiveCocoa,cstars135/ReactiveCocoa,KuPai32G/ReactiveCocoa,JohnJin007/ReactiveCocoa,wangqi211/ReactiveCocoa,Pikdays/ReactiveCocoa,SuPair/ReactiveCocoa,bensonday/ReactiveCocoa,wangqi211/ReactiveCocoa,Remitly/ReactiveCocoa,juliangrosshauser/ReactiveCocoa,jackywpy/ReactiveCocoa,tipbit/ReactiveCocoa,mxxiv/ReactiveCocoa,valleyman86/ReactiveCocoa,WEIBP/ReactiveCocoa,richeterre/ReactiveCocoa,zhigang1992/ReactiveCocoa,nickcheng/ReactiveCocoa,Adlai-Holler/ReactiveCocoa,LHDsimon/ReactiveCocoa,ailyanlu/ReactiveCocoa,victorlin/ReactiveCocoa,buildo/ReactiveCocoa,ohwutup/ReactiveCocoa,richeterre/ReactiveCocoa,PSPDFKit-labs/ReactiveCocoa,335g/ReactiveCocoa,koamac/ReactiveCocoa,j364960953/ReactiveCocoa,alvinvarghese/ReactiveCocoa,xiaoliyang/ReactiveCocoa,eyu1988/ReactiveCocoa,ceekayel/ReactiveCocoa,natestedman/ReactiveCocoa,stupidfive/ReactiveCocoa,Pingco/ReactiveCocoa,sugar2010/ReactiveCocoa,huiping192/ReactiveCocoa,zhiwen1024/ReactiveCocoa,chieryw/ReactiveCocoa,howandhao/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,liufeigit/ReactiveCocoa,isghe/ReactiveCocoa,kaylio/ReactiveCocoa,tornade0913/ReactiveCocoa,CQXfly/ReactiveCocoa,kaylio/ReactiveCocoa,jaylib/ReactiveCocoa,ShawnLeee/ReactiveCocoa,esttorhe/ReactiveCocoa,brightcove/ReactiveCocoa,tornade0913/ReactiveCocoa,monkeydbobo/ReactiveCocoa,zzzworm/ReactiveCocoa,isghe/ReactiveCocoa,tzongw/ReactiveCocoa,mattpetters/ReactiveCocoa,tornade0913/ReactiveCocoa,jrmiddle/ReactiveCocoa,OneSmallTree/ReactiveCocoa,terry408911/ReactiveCocoa,KuPai32G/ReactiveCocoa,fhchina/ReactiveCocoa,jsslai/ReactiveCocoa,sujeking/ReactiveCocoa,bscarano/ReactiveCocoa,BrooksWon/ReactiveCocoa,DreamHill/ReactiveCocoa,ericzhou2008/ReactiveCocoa,Rupert-RR/ReactiveCocoa,gabemdev/ReactiveCocoa,BlessNeo/ReactiveCocoa,libiao88/ReactiveCocoa,DongDongDongDong/ReactiveCocoa,loupman/ReactiveCocoa,zzzworm/ReactiveCocoa,loupman/ReactiveCocoa,Ray0218/ReactiveCocoa,stupidfive/ReactiveCocoa,stevielu/ReactiveCocoa,ohwutup/ReactiveCocoa,tipbit/ReactiveCocoa,goodheart/ReactiveCocoa,KJin99/ReactiveCocoa,calebd/ReactiveCocoa,yizzuide/ReactiveCocoa,tonyli508/ReactiveCocoa,kevin-zqw/ReactiveCocoa,sujeking/ReactiveCocoa,llb1119/test,yonekawa/ReactiveCocoa,jianwoo/ReactiveCocoa,zhenlove/ReactiveCocoa,bensonday/ReactiveCocoa,bencochran/ReactiveCocoa,JohnJin007/ReactiveCocoa,goodheart/ReactiveCocoa,jianwoo/ReactiveCocoa,Liquidsoul/ReactiveCocoa,JohnJin007/ReactiveCocoa,icepy/ReactiveCocoa,ericzhou2008/ReactiveCocoa,terry408911/ReactiveCocoa,ShawnLeee/ReactiveCocoa,tiger8888/ReactiveCocoa,takeshineshiro/ReactiveCocoa,dachaoisme/ReactiveCocoa,shuxiashusheng/ReactiveCocoa,CQXfly/ReactiveCocoa,CQXfly/ReactiveCocoa,dskatz22/ReactiveCocoa,victorlin/ReactiveCocoa,natestedman/ReactiveCocoa,Rupert-RR/ReactiveCocoa,yytong/ReactiveCocoa,GuitarPlayer-Ma/ReactiveCocoa,pzw224/ReactiveCocoa,Ricowere/ReactiveCocoa,loupman/ReactiveCocoa,dz1111/ReactiveCocoa,hilllinux/ReactiveCocoa,AlanJN/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,fanghao085/ReactiveCocoa,wangqi211/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,fanghao085/ReactiveCocoa,on99/ReactiveCocoa,ztchena/ReactiveCocoa,ioshger0125/ReactiveCocoa,jrmiddle/ReactiveCocoa,huiping192/ReactiveCocoa,zzzworm/ReactiveCocoa,add715/ReactiveCocoa,CCOOOOLL/ReactiveCocoa,fhchina/ReactiveCocoa,esttorhe/ReactiveCocoa,cogddo/ReactiveCocoa,rpowelll/ReactiveCocoa,tonyli508/ReactiveCocoa,natan/ReactiveCocoa,pzw224/ReactiveCocoa,gengjf/ReactiveCocoa,zhigang1992/ReactiveCocoa,bencochran/ReactiveCocoa,msdgwzhy6/ReactiveCocoa,howandhao/ReactiveCocoa,ikesyo/ReactiveCocoa,ailyanlu/ReactiveCocoa,eyu1988/ReactiveCocoa,cstars135/ReactiveCocoa,jackywpy/ReactiveCocoa,gengjf/ReactiveCocoa,imkerberos/ReactiveCocoa,DreamHill/ReactiveCocoa,mtxs007/ReactiveCocoa,yangyangluoluo/ReactiveCocoa,200895045/ReactiveCocoa,kiurentu/ReactiveCocoa,chao95957/ReactiveCocoa,SmartEncounter/ReactiveCocoa,hbucius/ReactiveCocoa,yoichitgy/ReactiveCocoa,OneSmallTree/ReactiveCocoa,pzw224/ReactiveCocoa,j364960953/ReactiveCocoa,stevielu/ReactiveCocoa,eliperkins/ReactiveCocoa,longv2go/ReactiveCocoa,Juraldinio/ReactiveCocoa,KuPai32G/ReactiveCocoa,brasbug/ReactiveCocoa,lixar/ReactiveCocoa,Juraldinio/ReactiveCocoa,libiao88/ReactiveCocoa,dz1111/ReactiveCocoa,smilypeda/ReactiveCocoa,luerhouhou/ReactiveCocoa,zzqiltw/ReactiveCocoa,ddc391565320/ReactiveCocoa,leichunfeng/ReactiveCocoa,huiping192/ReactiveCocoa,paulyoung/ReactiveCocoa,BlessNeo/ReactiveCocoa,sandyway/ReactiveCocoa,xumaolin/ReactiveCocoa,sandyway/ReactiveCocoa,yangshengchaoios/ReactiveCocoa,leelili/ReactiveCocoa,AllanChen/ReactiveCocoa,jrmiddle/ReactiveCocoa,mattpetters/ReactiveCocoa,jsslai/ReactiveCocoa,jianwoo/ReactiveCocoa,andersio/ReactiveCocoa,msdgwzhy6/ReactiveCocoa,BrooksWon/ReactiveCocoa,juliangrosshauser/ReactiveCocoa,Ray0218/ReactiveCocoa,esttorhe/ReactiveCocoa,towik/ReactiveCocoa,libiao88/ReactiveCocoa,Rupert-RR/ReactiveCocoa,Eveian/ReactiveCocoa,taylormoonxu/ReactiveCocoa,OnTheWay1988/ReactiveCocoa,qq644531343/ReactiveCocoa,ddc391565320/ReactiveCocoa,j364960953/ReactiveCocoa,sdhzwm/ReactiveCocoa,clg0118/ReactiveCocoa,AlanJN/ReactiveCocoa,dullgrass/ReactiveCocoa,dskatz22/ReactiveCocoa,JackLian/ReactiveCocoa,FelixYin66/ReactiveCocoa,mxxiv/ReactiveCocoa,walkingsmarts/ReactiveCocoa,takeshineshiro/ReactiveCocoa,koamac/ReactiveCocoa,bensonday/ReactiveCocoa,zhukaixy/ReactiveCocoa,calebd/ReactiveCocoa,ceekayel/ReactiveCocoa,huiping192/ReactiveCocoa,zxq3220122/ReactiveCocoa,GuitarPlayer-Ma/ReactiveCocoa,WEIBP/ReactiveCocoa,hoanganh6491/ReactiveCocoa,yangshengchaoios/ReactiveCocoa,zhaoguohui/ReactiveCocoa,335g/ReactiveCocoa,on99/ReactiveCocoa,isghe/ReactiveCocoa,tiger8888/ReactiveCocoa,dz1111/ReactiveCocoa,brasbug/ReactiveCocoa,windgo/ReactiveCocoa,ztchena/ReactiveCocoa,JackLian/ReactiveCocoa,Ethan89/ReactiveCocoa,SanChain/ReactiveCocoa,towik/ReactiveCocoa,buildo/ReactiveCocoa,AlanJN/ReactiveCocoa,jackywpy/ReactiveCocoa,AndyZhaoHe/ReactiveCocoa,BrooksWon/ReactiveCocoa,335g/ReactiveCocoa,leichunfeng/ReactiveCocoa,dullgrass/ReactiveCocoa,hj3938/ReactiveCocoa,hilllinux/ReactiveCocoa,longv2go/ReactiveCocoa,OnTheWay1988/ReactiveCocoa,xulibao/ReactiveCocoa,AllanChen/ReactiveCocoa,stupidfive/ReactiveCocoa,liufeigit/ReactiveCocoa,200895045/ReactiveCocoa,Ethan89/ReactiveCocoa,mxxiv/ReactiveCocoa,emodeqidao/ReactiveCocoa,AndyZhaoHe/ReactiveCocoa,bscarano/ReactiveCocoa,add715/ReactiveCocoa,jam891/ReactiveCocoa,ikesyo/ReactiveCocoa,nickcheng/ReactiveCocoa,Liquidsoul/ReactiveCocoa,eliperkins/ReactiveCocoa,Remitly/ReactiveCocoa,Eveian/ReactiveCocoa,dskatz22/ReactiveCocoa,richeterre/ReactiveCocoa,KJin99/ReactiveCocoa,PSPDFKit-labs/ReactiveCocoa,ioshger0125/ReactiveCocoa,SanChain/ReactiveCocoa,icepy/ReactiveCocoa,windgo/ReactiveCocoa,xiaobing2007/ReactiveCocoa,ceekayel/ReactiveCocoa,Carthage/ReactiveCocoa,smilypeda/ReactiveCocoa,Ray0218/ReactiveCocoa,itschaitanya/ReactiveCocoa,luerhouhou/ReactiveCocoa,CCOOOOLL/ReactiveCocoa,cnbin/ReactiveCocoa,stevielu/ReactiveCocoa,towik/ReactiveCocoa,shuxiashusheng/ReactiveCocoa,luerhouhou/ReactiveCocoa,beni55/ReactiveCocoa,shuxiashusheng/ReactiveCocoa,xumaolin/ReactiveCocoa,xulibao/ReactiveCocoa,Khan/ReactiveCocoa,sugar2010/ReactiveCocoa,zzqiltw/ReactiveCocoa,vincentiss/ReactiveCocoa,leichunfeng/ReactiveCocoa,SmartEncounter/ReactiveCocoa,longv2go/ReactiveCocoa,PSPDFKit-labs/ReactiveCocoa,zhiwen1024/ReactiveCocoa,hj3938/ReactiveCocoa,fanghao085/ReactiveCocoa,dullgrass/ReactiveCocoa,ddc391565320/ReactiveCocoa,tonyarnold/ReactiveCocoa,imkerberos/ReactiveCocoa,zhaoguohui/ReactiveCocoa,GuitarPlayer-Ma/ReactiveCocoa,almassapargali/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,leelili/ReactiveCocoa,imkerberos/ReactiveCocoa,OneSmallTree/ReactiveCocoa,yizzuide/ReactiveCocoa,terry408911/ReactiveCocoa,walkingsmarts/ReactiveCocoa,Pikdays/ReactiveCocoa,taylormoonxu/ReactiveCocoa,chao95957/ReactiveCocoa,kiurentu/ReactiveCocoa,msdgwzhy6/ReactiveCocoa,icepy/ReactiveCocoa,almassapargali/ReactiveCocoa,Remitly/ReactiveCocoa,chieryw/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,lixar/ReactiveCocoa,paulyoung/ReactiveCocoa,monkeydbobo/ReactiveCocoa,shaohung001/ReactiveCocoa,bscarano/ReactiveCocoa,BlessNeo/ReactiveCocoa,beni55/ReactiveCocoa,zhigang1992/ReactiveCocoa,zhenlove/ReactiveCocoa,qq644531343/ReactiveCocoa,taylormoonxu/ReactiveCocoa,mtxs007/ReactiveCocoa,FelixYin66/ReactiveCocoa,jeelun/ReactiveCocoa,Farteen/ReactiveCocoa,brasbug/ReactiveCocoa,takeshineshiro/ReactiveCocoa,jaylib/ReactiveCocoa,alvinvarghese/ReactiveCocoa,jam891/ReactiveCocoa,yytong/ReactiveCocoa,zhenlove/ReactiveCocoa,jam891/ReactiveCocoa,zhaoguohui/ReactiveCocoa,paulyoung/ReactiveCocoa,victorlin/ReactiveCocoa,wpstarnice/ReactiveCocoa,xulibao/ReactiveCocoa,xiaoliyang/ReactiveCocoa,sugar2010/ReactiveCocoa,cstars135/ReactiveCocoa,clg0118/ReactiveCocoa,goodheart/ReactiveCocoa,tonyli508/ReactiveCocoa,xumaolin/ReactiveCocoa,natan/ReactiveCocoa,natan/ReactiveCocoa,Adlai-Holler/ReactiveCocoa,nikita-leonov/ReactiveCocoa,JackLian/ReactiveCocoa,Ricowere/ReactiveCocoa,ztchena/ReactiveCocoa,yytong/ReactiveCocoa,AndyZhaoHe/ReactiveCocoa,monkeydbobo/ReactiveCocoa,ericzhou2008/ReactiveCocoa,kaylio/ReactiveCocoa,WEIBP/ReactiveCocoa,sdhzwm/ReactiveCocoa,jsslai/ReactiveCocoa,Farteen/ReactiveCocoa,zhukaixy/ReactiveCocoa,DongDongDongDong/ReactiveCocoa,kiurentu/ReactiveCocoa,cnbin/ReactiveCocoa,shaohung001/ReactiveCocoa,add715/ReactiveCocoa,brightcove/ReactiveCocoa,Adlai-Holler/ReactiveCocoa,valleyman86/ReactiveCocoa,zxq3220122/ReactiveCocoa,natestedman/ReactiveCocoa,cogddo/ReactiveCocoa,nickcheng/ReactiveCocoa,smilypeda/ReactiveCocoa,vincentiss/ReactiveCocoa,KJin99/ReactiveCocoa,tzongw/ReactiveCocoa,wpstarnice/ReactiveCocoa,Carthage/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,jaylib/ReactiveCocoa,hilllinux/ReactiveCocoa,SuPair/ReactiveCocoa,itschaitanya/ReactiveCocoa,fhchina/ReactiveCocoa,cogddo/ReactiveCocoa,OnTheWay1988/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,Ricowere/ReactiveCocoa,Ricowere/ReactiveCocoa,clg0118/ReactiveCocoa,buildo/ReactiveCocoa,qq644531343/ReactiveCocoa,hbucius/ReactiveCocoa,vincentiss/ReactiveCocoa,juliangrosshauser/ReactiveCocoa,xiaobing2007/ReactiveCocoa,liufeigit/ReactiveCocoa,Juraldinio/ReactiveCocoa,rpowelll/ReactiveCocoa,andersio/ReactiveCocoa,sujeking/ReactiveCocoa,llb1119/test,SuPair/ReactiveCocoa,nickcheng/ReactiveCocoa,Pingco/ReactiveCocoa,hoanganh6491/ReactiveCocoa,yangshengchaoios/ReactiveCocoa,zzqiltw/ReactiveCocoa,ioshger0125/ReactiveCocoa,Liquidsoul/ReactiveCocoa,chieryw/ReactiveCocoa,howandhao/ReactiveCocoa,yangyangluoluo/ReactiveCocoa,Carthage/ReactiveCocoa,llb1119/test,eliperkins/ReactiveCocoa,Khan/ReactiveCocoa,walkingsmarts/ReactiveCocoa,yangyangluoluo/ReactiveCocoa,LHDsimon/ReactiveCocoa,alvinvarghese/ReactiveCocoa,zxq3220122/ReactiveCocoa,mattpetters/ReactiveCocoa,Ethan89/ReactiveCocoa,shaohung001/ReactiveCocoa,yonekawa/ReactiveCocoa,LHDsimon/ReactiveCocoa,SanChain/ReactiveCocoa,Pingco/ReactiveCocoa,emodeqidao/ReactiveCocoa
|
e8740f26827c1aed33005aac3862e6e7840ee72d
|
src/Puddle.c
|
src/Puddle.c
|
#include "pebble_os.h"
#include "pebble_app.h"
#include "pebble_fonts.h"
#define MY_UUID { 0xE3, 0x7B, 0xFC, 0xE9, 0x30, 0xD7, 0x4B, 0xC3, 0x96, 0x93, 0x15, 0x0C, 0x35, 0xDC, 0xB8, 0x58 }
PBL_APP_INFO(MY_UUID,
"Template App", "Your Company",
1, 0, /* App version */
DEFAULT_MENU_ICON,
APP_INFO_STANDARD_APP);
Window window;
void handle_init(AppContextRef ctx) {
window_init(&window, "Window Name");
window_stack_push(&window, true /* Animated */);
}
void pbl_main(void *params) {
PebbleAppHandlers handlers = {
.init_handler = &handle_init
};
app_event_loop(params, &handlers);
}
|
#include "pebble_os.h"
#include "pebble_app.h"
#include "pebble_fonts.h"
#define MY_UUID { 0xE3, 0x7B, 0xFC, 0xE9, 0x30, 0xD7, 0x4B, 0xC3, 0x96, 0x93, 0x15, 0x0C, 0x35, 0xDC, 0xB8, 0x58 }
PBL_APP_INFO(MY_UUID,
"Puddle", "Jon Speicher",
0, 1, /* App version */
DEFAULT_MENU_ICON,
APP_INFO_STANDARD_APP);
Window window;
void handle_init(AppContextRef ctx) {
window_init(&window, "Puddle Main");
window_stack_push(&window, true /* Animated */);
}
void pbl_main(void *params) {
PebbleAppHandlers handlers = {
.init_handler = &handle_init
};
app_event_loop(params, &handlers);
}
|
Change framework app name, comopany, version, and window debug
|
Change framework app name, comopany, version, and window debug
|
C
|
mit
|
jonspeicher/Puddle,jonspeicher/Puddle,jonspeicher/Puddle
|
9da39b0de57a9a7dfbc87379948d5c36c2c1078c
|
src/common.h
|
src/common.h
|
// Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved.
// Please see the AUTHORS file for details. Use of this source code is governed
// by a BSD license that can be found in the LICENSE file.
#ifndef SCALLOC_COMMON_H_
#define SCALLOC_COMMON_H_
#define UNLIKELY(x) __builtin_expect((x), 0)
#define LIKELY(x) __builtin_expect((x), 1)
#define cache_aligned __attribute__((aligned(64)))
#define always_inline inline __attribute__((always_inline))
#define no_inline __attribute__((noinline))
always_inline size_t PadSize(size_t size, size_t multiple) {
return (size + multiple - 1) / multiple * multiple;
}
#endif // SCALLOC_COMMON_H_
|
// Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved.
// Please see the AUTHORS file for details. Use of this source code is governed
// by a BSD license that can be found in the LICENSE file.
#ifndef SCALLOC_COMMON_H_
#define SCALLOC_COMMON_H_
#define UNLIKELY(x) __builtin_expect((x), 0)
#define LIKELY(x) __builtin_expect((x), 1)
#define cache_aligned __attribute__((aligned(64)))
#define always_inline inline __attribute__((always_inline))
#define no_inline __attribute__((noinline))
const size_t kSystemPageSize = 4096;
always_inline size_t PadSize(size_t size, size_t multiple) {
return (size + multiple - 1) / multiple * multiple;
}
#endif // SCALLOC_COMMON_H_
|
Add system page size constant.
|
Add system page size constant.
Signed-off-by: Michael Lippautz <0d543840881a2c189b4f7636b15eebd6a8f60ace@gmail.com>
|
C
|
bsd-2-clause
|
cksystemsgroup/scalloc,cksystemsgroup/scalloc,cksystemsgroup/scalloc
|
041a67a595d4afb732a1b5cc97843b0b05d1cff0
|
include/config/SkUserConfigManual.h
|
include/config/SkUserConfigManual.h
|
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
#define SK_USE_FREETYPE_EMBOLDEN
// Disable these Ganesh features
#define SK_DISABLE_REDUCE_OPLIST_SPLITTING
// Check error is expensive. HWUI historically also doesn't check its allocations
#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
// Legacy flags
#define SK_SUPPORT_DEPRECATED_CLIPOPS
// Staging flags
#define SK_LEGACY_PATH_ARCTO_ENDPOINT
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#define SK_DISABLE_DAA // skbug.com/6886
#endif // SkUserConfigManual_DEFINED
|
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
#define SK_USE_FREETYPE_EMBOLDEN
// Disable these Ganesh features
#define SK_DISABLE_REDUCE_OPLIST_SPLITTING
// Check error is expensive. HWUI historically also doesn't check its allocations
#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
// Legacy flags
#define SK_SUPPORT_DEPRECATED_CLIPOPS
// Staging flags
#define SK_LEGACY_PATH_ARCTO_ENDPOINT
#define SK_SUPPORT_STROKEANDFILL
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#define SK_DISABLE_DAA // skbug.com/6886
#endif // SkUserConfigManual_DEFINED
|
Add flag to stage API change
|
Add flag to stage API change
Test: make
Bug: 178700363
Change-Id: I15d678d3896efb896d1b87f11f32df7787a53577
|
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
|
05b95d853c0ba6c4c27755245a5cac26c9fd8937
|
src/dsemem.h
|
src/dsemem.h
|
/* dsemem.h
*
* routines for managing a free list of DataStackEntry structs
*
*/
#ifndef _DSEMEM_H_
#define _DSEMEM_H_
#include "dataStackEntry.h"
DataStackEntry *dse_alloc(void);
void dse_free(DataStackEntry *dse);
#endif /* _DSEMEM_H_ */
|
/*
* Copyright (c) 2013, Court of the University of Glasgow
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of the University of Glasgow nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/* dsemem.h
*
* routines for managing a free list of DataStackEntry structs
*
*/
#ifndef _DSEMEM_H_
#define _DSEMEM_H_
#include "dataStackEntry.h"
DataStackEntry *dse_alloc(void);
void dse_free(DataStackEntry *dse);
#endif /* _DSEMEM_H_ */
|
Add BSD 3-clause open source header
|
Add BSD 3-clause open source header
|
C
|
bsd-3-clause
|
fergul/Cache,jsventek/Cache,jsventek/Cache,jsventek/Cache,fergul/Cache,fergul/Cache
|
e9ee6c8da6a11aed867a9eadefd7a03c3b7e0b82
|
src/sw/settings/include/primitives/sw/sw.settings.program_name.h
|
src/sw/settings/include/primitives/sw/sw.settings.program_name.h
|
#include <primitives/sw/settings_program_name.h>
#if defined(SW_EXECUTABLE)
EXPORT_FROM_EXECUTABLE
std::string getProgramName()
{
// this will trigger build error if executable forget to set
// PackageDefinitions = true;
#ifndef PACKAGE_NAME_CLEAN
#error "Set '.PackageDefinitions = true;' on your target."
#endif
return PACKAGE_NAME_CLEAN;
}
// use gitrev instead?
EXPORT_FROM_EXECUTABLE
std::string getVersionString()
{
std::string s;
s += ::sw::getProgramName();
s += " version ";
s += PACKAGE_VERSION;
s += "\n";
s += "assembled " __DATE__ " " __TIME__;
return s;
}
#endif
|
#include <primitives/sw/settings_program_name.h>
#if defined(SW_EXECUTABLE) && !defined(SW_CUSTOM_PROGRAM_NAME)
EXPORT_FROM_EXECUTABLE
std::string getProgramName()
{
// this will trigger build error if executable forget to set
// PackageDefinitions = true;
#ifndef PACKAGE_NAME_CLEAN
#error "Set '.PackageDefinitions = true;' on your target."
#endif
return PACKAGE_NAME_CLEAN;
}
// use gitrev instead?
EXPORT_FROM_EXECUTABLE
std::string getVersionString()
{
std::string s;
s += ::sw::getProgramName();
s += " version ";
s += PACKAGE_VERSION;
s += "\n";
s += "assembled " __DATE__ " " __TIME__;
return s;
}
#endif
|
Allow to define custom program name.
|
[sw.settings] Allow to define custom program name.
|
C
|
mpl-2.0
|
egorpugin/primitives,egorpugin/primitives
|
3b2a9a00dd4267fcffd370390037001f912347a3
|
src/cxa_atexit.c
|
src/cxa_atexit.c
|
#ifdef __sun__
#include <pthread.h>
#include <stdlib.h>
static struct atexit_handler {
void (*f)(void *);
void *p;
void *d;
struct atexit_handler *next;
} *head;
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
int __cxa_atexit( void (*f)(void *), void *p, void *d) {
pthread_mutex_lock(&lock);
struct atexit_handler *h = malloc(sizeof(*d));
if (!h) {
pthread_mutex_unlock(&lock);
return 1;
}
h->f = f;
h->p = p;
h->d = d;
h->next = head;
head = h;
pthread_mutex_unlock(&lock);
return 0;
}
void __cxa_finalize(void *d ) {
pthread_mutex_lock(&lock);
struct atexit_handler **last = &head;
for (struct atexit_handler *h = head ; h ; h = h->next) {
if ((h->d == d) || (d == 0)) {
*last = h->next;
h->f(h->p);
free(h);
} else {
last = &head->next;
}
}
pthread_mutex_unlock(&lock);
}
#endif
|
#ifdef __sun__
#include <pthread.h>
#include <stdlib.h>
static struct atexit_handler {
void (*f)(void *);
void *p;
void *d;
struct atexit_handler *next;
} *head;
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
int __cxa_atexit( void (*f)(void *), void *p, void *d) {
pthread_mutex_lock(&lock);
struct atexit_handler *h = malloc(sizeof(*h));
if (!h) {
pthread_mutex_unlock(&lock);
return 1;
}
h->f = f;
h->p = p;
h->d = d;
h->next = head;
head = h;
pthread_mutex_unlock(&lock);
return 0;
}
void __cxa_finalize(void *d ) {
pthread_mutex_lock(&lock);
struct atexit_handler **last = &head;
for (struct atexit_handler *h = head ; h ; h = h->next) {
if ((h->d == d) || (d == 0)) {
*last = h->next;
h->f(h->p);
free(h);
} else {
last = &h->next;
}
}
pthread_mutex_unlock(&lock);
}
#endif
|
Fix bugs caused by writing code while half asleep.
|
Fix bugs caused by writing code while half asleep.
|
C
|
bsd-2-clause
|
cemeyer/libcxxrt,xin3liang/platform_external_libcxxrt,sudosurootdev/external_libcxxrt,cemeyer/libcxxrt,xin3liang/platform_external_libcxxrt,vegard/libcxxrt,sudosurootdev/external_libcxxrt,vegard/libcxxrt,sudosurootdev/external_libcxxrt,cemeyer/libcxxrt,xin3liang/platform_external_libcxxrt,vegard/libcxxrt
|
7fc9119df40544c5048308be5a6ff46b61213972
|
src/validation.h
|
src/validation.h
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Dash Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_VALIDATION_H
#define BITCOIN_VALIDATION_H
#include <stdint.h>
#include <string>
static const int64_t DEFAULT_MAX_TIP_AGE = 120; // ~45 blocks behind -> 2 x fork detection time, was 24 * 60 * 60 in bitcoin
extern int64_t nMaxTipAge;
class CBlockIndex;
FILE* OpenBlockFile(unsigned int nFile, unsigned int nBlockPos, const char* pszMode="rb");
FILE* AppendBlockFile(unsigned int& nFileRet);
bool IsInitialBlockDownload();
/** Guess verification progress (as a fraction between 0.0=genesis and 1.0=current tip). */
double GuessVerificationProgress(CBlockIndex* pindex);
#endif // BITCOIN_VALIDATION_H
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Dash Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_VALIDATION_H
#define BITCOIN_VALIDATION_H
#include <stdint.h>
#include <string>
static const int64_t DEFAULT_MAX_TIP_AGE = 1 * 60 * 60; // ~45 blocks behind -> 2 x fork detection time, was 24 * 60 * 60 in bitcoin
extern int64_t nMaxTipAge;
class CBlockIndex;
FILE* OpenBlockFile(unsigned int nFile, unsigned int nBlockPos, const char* pszMode="rb");
FILE* AppendBlockFile(unsigned int& nFileRet);
bool IsInitialBlockDownload();
/** Guess verification progress (as a fraction between 0.0=genesis and 1.0=current tip). */
double GuessVerificationProgress(CBlockIndex* pindex);
#endif // BITCOIN_VALIDATION_H
|
Put back default max tip age
|
Put back default max tip age
|
C
|
mit
|
neutroncoin/neutron,neutroncoin/neutron,neutroncoin/neutron,neutroncoin/neutron
|
08622e9601da87b2c663042a06ba404e6bc1577a
|
Engine/source/gfx/gl/tGL/tGL.h
|
Engine/source/gfx/gl/tGL/tGL.h
|
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// 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 T_GL_H
#define T_GL_H
#include "GL/glew.h"
#define gglHasExtension(EXTENSION) GLEW_##EXTENSION
#endif
|
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// 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 T_GL_H
#define T_GL_H
#include "GL/glew.h"
// Slower but reliably detects extensions
#define gglHasExtension(EXTENSION) glewGetExtension("GL_##EXTENSION")
#endif
|
Use different extension detection mechanism
|
Use different extension detection mechanism
I got this from looking at the code from the glew utility 'glewinfo' on my system it reported the following for GL_ARB_geometry_shader4: OK [MISSING]. This lead me to believe that there are two different ways of determining extensions. The first 'OK' seems to refer to the entrypoint existing while the second one seems to refer to the extension being available.
The difference is this:
The first OK comes from : GLEW_ARB_geometry_shader4 the global whereas the second 'MISSING' comes from glewGetExtension("GL_ARB_geometry_shader4"). By replacing the gglHasExtension I got the desired result.
We may want to implement some caching if we want to keep using GLEW perhaps?
Anyway I suggest this merely as a test, I'm not sure if this is a viable long-term solution.
|
C
|
mit
|
ValtoGameEngines/Torque3D,JeffProgrammer/Torque3D,Will-of-the-Wisp/Torque3D,aaravamudan2014/Torque3D,aaravamudan2014/Torque3D,ValtoGameEngines/Torque3D,Will-of-the-Wisp/Torque3D,GarageGames/Torque3D,lukaspj/Speciality,Azaezel/Torque3D,rextimmy/Torque3D,Duion/Torque3D,JeffProgrammer/Torque3D,John3/Torque3D,Bloodknight/Torque3D,Phantom139/Torque3D,aaravamudan2014/Torque3D,elfprince13/Torque3D,Phantom139/Torque3D,Torque3D-GameEngine/Torque3D,Phantom139/Torque3D,chaigler/Torque3D,elfprince13/Torque3D,chaigler/Torque3D,elfprince13/Torque3D,Will-of-the-Wisp/Torque3D,aaravamudan2014/Torque3D,Duion/Torque3D,Azaezel/Torque3D,lukaspj/Speciality,John3/Torque3D,ValtoGameEngines/Torque3D,FITTeamIndecisive/Torque3D,rextimmy/Torque3D,elfprince13/Torque3D,elfprince13/Torque3D,JeffProgrammer/Torque3D,GarageGames/Torque3D,JeffProgrammer/Torque3D,Bloodknight/Torque3D,Duion/Torque3D,Phantom139/Torque3D,chaigler/Torque3D,Torque3D-GameEngine/Torque3D,Bloodknight/Torque3D,Will-of-the-Wisp/Torque3D,Bloodknight/Torque3D,John3/Torque3D,Phantom139/Torque3D,lukaspj/Speciality,John3/Torque3D,aaravamudan2014/Torque3D,aaravamudan2014/Torque3D,Phantom139/Torque3D,Bloodknight/Torque3D,Phantom139/Torque3D,aaravamudan2014/Torque3D,JeffProgrammer/Torque3D,Azaezel/Torque3D,Torque3D-GameEngine/Torque3D,FITTeamIndecisive/Torque3D,Will-of-the-Wisp/Torque3D,elfprince13/Torque3D,lukaspj/Speciality,ValtoGameEngines/Torque3D,Duion/Torque3D,Phantom139/Torque3D,John3/Torque3D,FITTeamIndecisive/Torque3D,elfprince13/Torque3D,Azaezel/Torque3D,rextimmy/Torque3D,Bloodknight/Torque3D,Will-of-the-Wisp/Torque3D,rextimmy/Torque3D,rextimmy/Torque3D,chaigler/Torque3D,FITTeamIndecisive/Torque3D,JeffProgrammer/Torque3D,lukaspj/Speciality,aaravamudan2014/Torque3D,GarageGames/Torque3D,aaravamudan2014/Torque3D,John3/Torque3D,Azaezel/Torque3D,John3/Torque3D,rextimmy/Torque3D,Bloodknight/Torque3D,GarageGames/Torque3D,Duion/Torque3D,Will-of-the-Wisp/Torque3D,Torque3D-GameEngine/Torque3D,rextimmy/Torque3D,Torque3D-GameEngine/Torque3D,JeffProgrammer/Torque3D,FITTeamIndecisive/Torque3D,Azaezel/Torque3D,chaigler/Torque3D,John3/Torque3D,elfprince13/Torque3D,Phantom139/Torque3D,Azaezel/Torque3D,lukaspj/Speciality,GarageGames/Torque3D,lukaspj/Speciality,John3/Torque3D,ValtoGameEngines/Torque3D,GarageGames/Torque3D,chaigler/Torque3D,lukaspj/Speciality,Azaezel/Torque3D,Torque3D-GameEngine/Torque3D,Will-of-the-Wisp/Torque3D,Will-of-the-Wisp/Torque3D,lukaspj/Speciality,Duion/Torque3D,Torque3D-GameEngine/Torque3D,GarageGames/Torque3D,FITTeamIndecisive/Torque3D,Torque3D-GameEngine/Torque3D,FITTeamIndecisive/Torque3D,ValtoGameEngines/Torque3D,ValtoGameEngines/Torque3D,FITTeamIndecisive/Torque3D,Bloodknight/Torque3D,Azaezel/Torque3D,chaigler/Torque3D,John3/Torque3D,rextimmy/Torque3D,elfprince13/Torque3D,chaigler/Torque3D,Torque3D-GameEngine/Torque3D,Will-of-the-Wisp/Torque3D,ValtoGameEngines/Torque3D,GarageGames/Torque3D,chaigler/Torque3D,rextimmy/Torque3D,Will-of-the-Wisp/Torque3D,Torque3D-GameEngine/Torque3D,elfprince13/Torque3D,rextimmy/Torque3D,JeffProgrammer/Torque3D,Bloodknight/Torque3D,Azaezel/Torque3D,Duion/Torque3D,ValtoGameEngines/Torque3D,Duion/Torque3D,ValtoGameEngines/Torque3D,Phantom139/Torque3D,lukaspj/Speciality,Duion/Torque3D,FITTeamIndecisive/Torque3D,FITTeamIndecisive/Torque3D,aaravamudan2014/Torque3D,Duion/Torque3D,GarageGames/Torque3D
|
f408c35b1716e255634a2a2e9b3366b47eb7b3d7
|
test/Analysis/misc-driver.c
|
test/Analysis/misc-driver.c
|
// RUN: %clang -### --analyze %s 2>&1 | FileCheck %s
// CHECK: -D__clang_analyzer__
|
// RUN: %clang --analyze %s
#ifndef __clang_analyzer__
#error __clang_analyzer__ not defined
#endif
|
Revert "[static analyzer][test] Test directly that driver sets D__clang_analyzer__"
|
Revert "[static analyzer][test] Test directly that driver sets D__clang_analyzer__"
This reverts commit c7541903d72765a38808e9973572a8d50c9d94fb.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@372685 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
1dec7cc40215a7f692987749e15c05062fe11d4f
|
delay.h
|
delay.h
|
#ifndef DELAY_H
#define DELAY_H
#include <stdlib.h>
typedef struct drand48_data delay_t;
static inline void delay_init(delay_t * state, int id)
{
srand48_r(id + 1, state);
}
static inline void delay_exec(delay_t * state)
{
long n;
lrand48_r(state, &n);
int j;
for (j = 50; j < 50 + n % 100; ++j) {
__asm__ ("nop");
}
}
#endif /* end of include guard: DELAY_H */
|
#ifndef DELAY_H
#define DELAY_H
#include <time.h>
#include <stdlib.h>
typedef struct drand48_data delay_t;
static inline void delay_init(delay_t * state, int id)
{
srand48_r(time(NULL) + id, state);
}
static inline void delay_exec(delay_t * state)
{
long n;
lrand48_r(state, &n);
int j;
for (j = 50; j < 50 + n % 100; ++j) {
__asm__ ("nop");
}
}
#endif /* end of include guard: DELAY_H */
|
Use time based seed for generating random numbers.
|
Use time based seed for generating random numbers.
|
C
|
mit
|
chaoran/fast-wait-free-queue,chaoran/fast-wait-free-queue,chaoran/hpc-queue,chaoran/fast-wait-free-queue,chaoran/hpc-queue,chaoran/hpc-queue
|
0aaead5e49315267cd6785ec64d5b5884ae123c2
|
libyaul/scu/bus/b/vdp/vdp1.h
|
libyaul/scu/bus/b/vdp/vdp1.h
|
/*
* Copyright (c) 2012-2016 Israel Jacquez
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com>
*/
#ifndef _VDP1_H_
#define _VDP1_H_
#include <vdp1/cmdt.h>
#include <vdp1/env.h>
#include <vdp1/map.h>
#include <vdp1/vram.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* !_VDP1_H_ */
|
/*
* Copyright (c) 2012-2016 Israel Jacquez
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com>
*/
#ifndef _VDP1_H_
#define _VDP1_H_
#include <vdp1/cmdt.h>
#include <vdp1/env.h>
#include <vdp1/map.h>
#include <vdp1/vram.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
struct vdp1_transfer_status {
union {
struct {
unsigned :14;
unsigned vte_cef:1;
unsigned vte_bef:1;
} __packed;
uint16_t raw;
};
} __packed __aligned(2);
struct vdp1_mode_status {
union {
struct {
unsigned vms_version:4;
unsigned :3;
unsigned vms_ptm1:1;
unsigned vms_eos:1;
unsigned vms_die:1;
unsigned vms_dil:1;
unsigned vms_fcm:1;
unsigned vms_vbe:1;
unsigned vms_tvm:3;
} __packed;
uint16_t raw;
};
} __packed __aligned(2);
static inline void __attribute__ ((always_inline))
vdp1_mode_status_get(struct vdp1_mode_status *status)
{
/* If the structure isn't aligned on a 2-byte boundary, GCC will
* attempt to invoke memcpy() */
*status = *(volatile struct vdp1_mode_status *)VDP1(MODR);
}
static inline void __attribute__ ((always_inline))
vdp1_transfer_status_get(struct vdp1_transfer_status *status)
{
/* If the structure isn't aligned on a 2-byte boundary, GCC will
* attempt to invoke memcpy() */
*status = *(volatile struct vdp1_transfer_status *)VDP1(EDSR);
}
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* !_VDP1_H_ */
|
Add VDP1 status getters for transfer end and mode status
|
Add VDP1 status getters for transfer end and mode status
|
C
|
mit
|
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
|
952171538ce7d5d76dabf8191e15b9ca9c9d958a
|
Source/DSLogger.h
|
Source/DSLogger.h
|
//
// DSLogger.h
// ControlPlane
//
// Created by David Symonds on 22/07/07.
// Modified by Vladimir Beloborodov on 01 Apr 2013.
//
@interface DSLogger : NSObject
+ (void)initialize;
+ (DSLogger *)sharedLogger;
+ (void)logFromFunction:(NSString *)fnName withInfo:(NSString *)info;
- (id)init;
- (void)dealloc;
- (void)logFromFunction:(NSString *)fnName withInfo:(NSString *)info;
- (NSString *)buffer;
#define DSLog(format, ...) \
[DSLogger logFromFunction:[NSString stringWithUTF8String:__PRETTY_FUNCTION__] withInfo:[NSString stringWithFormat:(format),##__VA_ARGS__]]
@end
|
//
// DSLogger.h
// ControlPlane
//
// Created by David Symonds on 22/07/07.
// Modified by Vladimir Beloborodov on 01 Apr 2013.
//
@interface DSLogger : NSObject
+ (void)initialize;
+ (DSLogger *)sharedLogger;
+ (void)logFromFunction:(NSString *)fnName withInfo:(NSString *)info;
- (id)init;
- (void)dealloc;
- (void)logFromFunction:(NSString *)fnName withInfo:(NSString *)info;
- (NSString *)buffer;
#define DSLog(...) \
[DSLogger logFromFunction:@(__PRETTY_FUNCTION__) withInfo:[NSString stringWithFormat:__VA_ARGS__]]
@end
|
Simplify and improve definition of DSLog macro
|
Simplify and improve definition of DSLog macro
|
C
|
bsd-3-clause
|
ajostergaard/ControlPlane,ajostergaard/ControlPlane,ajostergaard/ControlPlane,ajostergaard/ControlPlane
|
062bc13039462e6f3f9baaea835ff9b863a18daf
|
include/cprtypes.h
|
include/cprtypes.h
|
#ifndef CPR_TYPES_H
#define CPR_TYPES_H
#include <map>
#include <string>
namespace cpr {
class CaseInsenstiveCompare {
public:
bool operator()(const std::string& a, const std::string& b) const;
private:
static void char_to_lower(char& c);
static std::string to_lower(const std::string& a);
};
typedef std::map<std::string, std::string, CaseInsenstiveCompare> Header;
typedef std::string Url;
}
#endif
|
#ifndef CPR_TYPES_H
#define CPR_TYPES_H
#include <map>
#include <string>
namespace cpr {
class CaseInsenstiveCompare {
public:
bool operator()(const std::string& a, const std::string& b) const;
private:
static void char_to_lower(char& c);
static std::string to_lower(const std::string& a);
};
using Header = std::map<std::string, std::string, CaseInsenstiveCompare>;
using Url = std::string;
}
#endif
|
Use C++11 `using` instead of `typedef`
|
Use C++11 `using` instead of `typedef`
|
C
|
mit
|
skystrife/cpr,msuvajac/cpr,SuperV1234/cpr,SuperV1234/cpr,skystrife/cpr,msuvajac/cpr,whoshuu/cpr,whoshuu/cpr,msuvajac/cpr,skystrife/cpr,SuperV1234/cpr,whoshuu/cpr
|
4659f32c7023d6c92874e284d3c031418d634728
|
t/04-nativecall/01-argless.c
|
t/04-nativecall/01-argless.c
|
#include <stdio.h>
#include <string.h>
#ifdef WIN32
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT extern
#endif
DLLEXPORT Nothing()
{
/* we don't even print something */
}
DLLEXPORT int Argless()
{
return 2;
}
DLLEXPORT int long_and_complicated_name()
{
return 3;
}
|
#include <stdio.h>
#include <string.h>
#ifdef WIN32
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT extern
#endif
DLLEXPORT void Nothing()
{
/* we don't even print something */
}
DLLEXPORT int Argless()
{
return 2;
}
DLLEXPORT int long_and_complicated_name()
{
return 3;
}
|
Fix compiler warnings on OS X / JVM backend
|
Fix compiler warnings on OS X / JVM backend
|
C
|
artistic-2.0
|
Leont/rakudo,softmoth/rakudo,salortiz/rakudo,skids/rakudo,dankogai/rakudo,laben/rakudo,ugexe/rakudo,ungrim97/rakudo,labster/rakudo,tony-o/deb-rakudodaily,salortiz/rakudo,usev6/rakudo,salortiz/rakudo,tony-o/deb-rakudodaily,teodozjan/rakudo,nbrown/rakudo,rakudo/rakudo,ungrim97/rakudo,MasterDuke17/rakudo,awwaiid/rakudo,zostay/rakudo,tony-o/rakudo,labster/rakudo,nunorc/rakudo,usev6/rakudo,b2gills/rakudo,jonathanstowe/rakudo,salortiz/rakudo,samcv/rakudo,sjn/rakudo,tbrowder/rakudo,zostay/rakudo,softmoth/rakudo,jonathanstowe/rakudo,lucasbuchala/rakudo,Gnouc/rakudo,ab5tract/rakudo,dankogai/rakudo,ugexe/rakudo,b2gills/rakudo,cognominal/rakudo,skids/rakudo,tony-o/deb-rakudodaily,cygx/rakudo,zostay/rakudo,tony-o/rakudo,LLFourn/rakudo,zhuomingliang/rakudo,cognominal/rakudo,ab5tract/rakudo,tony-o/deb-rakudodaily,sergot/rakudo,tony-o/rakudo,MasterDuke17/rakudo,lucasbuchala/rakudo,tony-o/deb-rakudodaily,labster/rakudo,rakudo/rakudo,raydiak/rakudo,raydiak/rakudo,cygx/rakudo,nbrown/rakudo,lucasbuchala/rakudo,azawawi/rakudo,nbrown/rakudo,azawawi/rakudo,Gnouc/rakudo,skids/rakudo,samcv/rakudo,paultcochrane/rakudo,awwaiid/rakudo,LLFourn/rakudo,usev6/rakudo,ugexe/rakudo,skids/rakudo,samcv/rakudo,jonathanstowe/rakudo,paultcochrane/rakudo,niner/rakudo,b2gills/rakudo,laben/rakudo,nbrown/rakudo,ugexe/rakudo,cognominal/rakudo,sjn/rakudo,laben/rakudo,samcv/rakudo,ugexe/rakudo,raydiak/rakudo,LLFourn/rakudo,paultcochrane/rakudo,laben/rakudo,cygx/rakudo,raydiak/rakudo,sergot/rakudo,ab5tract/rakudo,azawawi/rakudo,paultcochrane/rakudo,tbrowder/rakudo,tbrowder/rakudo,nunorc/rakudo,awwaiid/rakudo,rakudo/rakudo,ab5tract/rakudo,usev6/rakudo,labster/rakudo,tony-o/deb-rakudodaily,softmoth/rakudo,tony-o/rakudo,teodozjan/rakudo,niner/rakudo,nunorc/rakudo,zhuomingliang/rakudo,cygx/rakudo,Gnouc/rakudo,azawawi/rakudo,usev6/rakudo,softmoth/rakudo,Gnouc/rakudo,dankogai/rakudo,sergot/rakudo,Gnouc/rakudo,salortiz/rakudo,ab5tract/rakudo,zhuomingliang/rakudo,awwaiid/rakudo,b2gills/rakudo,tony-o/rakudo,sjn/rakudo,labster/rakudo,Gnouc/rakudo,samcv/rakudo,rakudo/rakudo,ungrim97/rakudo,LLFourn/rakudo,ungrim97/rakudo,rakudo/rakudo,tbrowder/rakudo,tbrowder/rakudo,awwaiid/rakudo,Leont/rakudo,tony-o/rakudo,MasterDuke17/rakudo,cognominal/rakudo,azawawi/rakudo,tbrowder/rakudo,dankogai/rakudo,MasterDuke17/rakudo,softmoth/rakudo,labster/rakudo,nbrown/rakudo,Leont/rakudo,lucasbuchala/rakudo,cygx/rakudo,b2gills/rakudo,salortiz/rakudo,sjn/rakudo,cognominal/rakudo,MasterDuke17/rakudo,tony-o/deb-rakudodaily,nunorc/rakudo,paultcochrane/rakudo,nbrown/rakudo,MasterDuke17/rakudo,sergot/rakudo,Leont/rakudo,jonathanstowe/rakudo,zhuomingliang/rakudo,niner/rakudo,skids/rakudo,ungrim97/rakudo,teodozjan/rakudo,teodozjan/rakudo,LLFourn/rakudo,rakudo/rakudo,lucasbuchala/rakudo,dankogai/rakudo,zostay/rakudo,sjn/rakudo,jonathanstowe/rakudo,niner/rakudo
|
0afe6ff5d9626a553163739011c10c68d0a862aa
|
arc/arc/Model/FileObject.h
|
arc/arc/Model/FileObject.h
|
//
// FileObject.h
// arc
//
// Created by Jerome Cheng on 19/3/13.
// Copyright (c) 2013 nus.cs3217. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface FileObject : NSObject {
@private
NSURL* _url;
}
// The name of this object.
@property (strong, nonatomic) NSString* name;
// The full file path of this object.
@property (strong, nonatomic) NSString* path;
// The parent of this object (if any.)
@property (weak, nonatomic) FileObject* parent;
// The contents of this object.
@property id contents;
// Creates a FileObject to represent the given URL.
// url should be an object on the file system.
- (id)initWithURL:(NSURL*)url;
// Creates a FileObject to represent the given URL,
// with its parent set to the given FileObject.
- (id)initWithURL:(NSURL*)url parent:(FileObject*)parent;
// Refreshes the contents of this object by reloading
// them from the file system.
// Returns the contents when done.
- (id)refreshContents;
// Removes this object from the file system.
- (void)remove;
@end
|
//
// FileObject.h
// arc
//
// Created by Jerome Cheng on 19/3/13.
// Copyright (c) 2013 nus.cs3217. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface FileObject : NSObject {
@private
NSURL* _url;
id _contents;
}
// The name of this object.
@property (strong, nonatomic) NSString* name;
// The full file path of this object.
@property (strong, nonatomic) NSString* path;
// The parent of this object (if any.)
@property (weak, nonatomic) FileObject* parent;
// Creates a FileObject to represent the given URL.
// url should be an object on the file system.
- (id)initWithURL:(NSURL*)url;
// Creates a FileObject to represent the given URL,
// with its parent set to the given FileObject.
- (id)initWithURL:(NSURL*)url parent:(FileObject*)parent;
// Refreshes the contents of this object by reloading
// them from the file system.
// Returns the contents when done.
- (id)refreshContents;
// Gets the contents of this object.
- (id)getContents;
// Removes this object from the file system.
- (void)remove;
@end
|
Replace contents property with private array and getter.
|
Replace contents property with private array and getter.
|
C
|
mit
|
BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc
|
9e528bef6f5e4094e9fc497e1be3607341df7b01
|
util/ncgg/main.c
|
util/ncgg/main.c
|
#ifndef NORCSID
static char rcsid[]= "$Header$";
#endif
#include <stdio.h>
char *filename;
main(argc,argv) char **argv; {
extern int nerrors;
extern int code_in_c;
extern int tabledebug;
extern int verbose;
while (argc >1 && argv[1][0]=='-') {
switch(argv[1][1]) {
case 'c':
code_in_c = 0;
break;
case 'd':
tabledebug++;
break;
case 'v':
verbose++;
break;
default:
error("Unknown flag -%c",argv[1][1]);
}
argc--; argv++;
}
if (argc==2) {
if (freopen(argv[1],"r",stdin)==NULL) {
error("Can't open %s",argv[1]);
exit(-1);
}
filename = argv[1];
} else
error("Usage: %s [-c] [-d] [-v] table",argv[0]);
initemhash();
enterkeyw();
initnodes();
initio();
yyparse();
if (nerrors==0) {
finishio();
statistics();
if (verbose)
hallverbose();
} else {
errorexit();
}
return(nerrors==0 ? 0 : -1);
}
|
#ifndef NORCSID
static char rcsid[]= "$Header$";
#endif
#include <stdio.h>
char *filename;
main(argc,argv) char **argv; {
extern int nerrors;
extern int code_in_c;
extern int tabledebug;
extern int verbose;
while (argc >1 && argv[1][0]=='-') {
switch(argv[1][1]) {
case 'c':
code_in_c = 0;
break;
case 'd':
tabledebug++;
break;
case 'v':
verbose++;
break;
default:
error("Unknown flag -%c",argv[1][1]);
}
argc--; argv++;
}
if (argc==2) {
if (freopen(argv[1],"r",stdin)==NULL) {
error("Can't open %s",argv[1]);
exit(-1);
}
filename = argv[1];
}
else if (argc == 1) {
filename = "";
} else
error("Usage: %s [-c] [-d] [-v] [table]",argv[0]);
initemhash();
enterkeyw();
initnodes();
initio();
yyparse();
if (nerrors==0) {
finishio();
statistics();
if (verbose)
hallverbose();
} else {
errorexit();
}
return(nerrors==0 ? 0 : -1);
}
|
Allow reading from standard input
|
Allow reading from standard input
|
C
|
bsd-3-clause
|
Godzil/ack,Godzil/ack,Godzil/ack,Godzil/ack,Godzil/ack
|
c360775fb7ed8352ca26f08c0270d21a6cb19e7f
|
test/Analysis/malloc.c
|
test/Analysis/malloc.c
|
// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-experimental-checks -analyzer-store=region -verify %s
#include <stdlib.h>
void f1() {
int *p = malloc(10);
return; // expected-warning{{Allocated memory never released. Potential memory leak.}}
}
// THIS TEST CURRENTLY FAILS.
void f1_b() {
int *p = malloc(10);
}
void f2() {
int *p = malloc(10);
free(p);
free(p); // expected-warning{{Try to free a memory block that has been released}}
}
// This case tests that storing malloc'ed memory to a static variable which is then returned
// is not leaked. In the absence of known contracts for functions or inter-procedural analysis,
// this is a conservative answer.
int *f3() {
static int *p = 0;
p = malloc(10); // no-warning
return p;
}
// This case tests that storing malloc'ed memory to a static global variable which is then returned
// is not leaked. In the absence of known contracts for functions or inter-procedural analysis,
// this is a conservative answer.
static int *p_f4 = 0;
int *f4() {
p_f4 = malloc(10); // no-warning
return p_f4;
}
|
// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-experimental-checks -analyzer-store=region -verify %s
typedef long unsigned int size_t;
void *malloc(size_t);
void free(void *);
void f1() {
int *p = malloc(10);
return; // expected-warning{{Allocated memory never released. Potential memory leak.}}
}
// THIS TEST CURRENTLY FAILS.
void f1_b() {
int *p = malloc(10);
}
void f2() {
int *p = malloc(10);
free(p);
free(p); // expected-warning{{Try to free a memory block that has been released}}
}
// This case tests that storing malloc'ed memory to a static variable which is then returned
// is not leaked. In the absence of known contracts for functions or inter-procedural analysis,
// this is a conservative answer.
int *f3() {
static int *p = 0;
p = malloc(10); // no-warning
return p;
}
// This case tests that storing malloc'ed memory to a static global variable which is then returned
// is not leaked. In the absence of known contracts for functions or inter-procedural analysis,
// this is a conservative answer.
static int *p_f4 = 0;
int *f4() {
p_f4 = malloc(10); // no-warning
return p_f4;
}
|
Remove test case's dependency on header file.
|
Remove test case's dependency on header file.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@88685 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
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,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,apple/swift-clang,apple/swift-clang
|
a0323adc1a9714c7889137413f7d59b41bfe1665
|
Classes/AXKCollectionViewTools.h
|
Classes/AXKCollectionViewTools.h
|
//
// AXKCollectionViewTools.h
// Alexander Kolov
//
// Created by Alexander Kolov on 30/10/13.
// Copyright (c) 2013 Alexander Kolov. All rights reserved.
//
#import "UICollectionReusableView+ReuseIdentifier.h"
#import "UICollectionViewCell+IndexPath.h"
#import "UICollectionViewCell+ReuseIdentifier.h"
#import "UITableViewCell+IndexPath.h"
#import "UITableViewCell+ReuseIdentifier.h"
|
//
// AXKCollectionViewTools.h
// Alexander Kolov
//
// Created by Alexander Kolov on 30/10/13.
// Copyright (c) 2013 Alexander Kolov. All rights reserved.
//
#import "UICollectionReusableView+ReuseIdentifier.h"
#import "UICollectionViewCell+IndexPath.h"
#import "UICollectionViewCell+ReuseIdentifier.h"
#import "UITableViewCell+IndexPath.h"
#import "UITableViewCell+ReuseIdentifier.h"
#import "UITableViewHeaderFooterView+ReuseIdentifier.h"
|
Add files to the master header
|
Add files to the master header
|
C
|
mit
|
akolov/AXKCollectionViewTools
|
1416089f44fab6fa35e3523aed3408ee30457a7f
|
include/llvm/Bytecode/Reader.h
|
include/llvm/Bytecode/Reader.h
|
//===-- llvm/Bytecode/Reader.h - Reader for VM bytecode files ----*- C++ -*--=//
//
// This functionality is implemented by the lib/BytecodeReader library.
// This library is used to read VM bytecode files from an iostream.
//
// Note that performance of this library is _crucial_ for performance of the
// JIT type applications, so we have designed the bytecode format to support
// quick reading.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_BYTECODE_READER_H
#define LLVM_BYTECODE_READER_H
#include <string>
class Module;
// Parse and return a class...
//
Module *ParseBytecodeFile(const std::string &Filename,
std::string *ErrorStr = 0);
Module *ParseBytecodeBuffer(const char *Buffer, unsigned BufferSize,
std::string *ErrorStr = 0);
#endif
|
//===-- llvm/Bytecode/Reader.h - Reader for VM bytecode files ----*- C++ -*--=//
//
// This functionality is implemented by the lib/BytecodeReader library.
// This library is used to read VM bytecode files from an iostream.
//
// Note that performance of this library is _crucial_ for performance of the
// JIT type applications, so we have designed the bytecode format to support
// quick reading.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_BYTECODE_READER_H
#define LLVM_BYTECODE_READER_H
#include <string>
class Module;
// Parse and return a class...
//
Module *ParseBytecodeFile(const std::string &Filename,
std::string *ErrorStr = 0);
Module *ParseBytecodeBuffer(const char *Buffer, unsigned BufferSize);
#endif
|
Fix prototype to make function.
|
Fix prototype to make function.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@2939 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap
|
2f9f822c764b9635807326d6fff442ce799d4438
|
runtime/platform/utils_win.h
|
runtime/platform/utils_win.h
|
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#ifndef PLATFORM_UTILS_WIN_H_
#define PLATFORM_UTILS_WIN_H_
#include <intrin.h>
namespace dart {
inline int Utils::CountTrailingZeros(uword x) {
uword result;
#if defined(ARCH_IS_32_BIT)
_BitScanReverse(&result, x);
return __builtin_ctzl(x);
#elif defined(ARCH_IS_64_BIT)
_BitScanReverse64(&result, x);
#else
#error Architecture is not 32-bit or 64-bit.
#endif
return static_cast<int>(result);
};
} // namespace dart
#endif // PLATFORM_UTILS_WIN_H_
|
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#ifndef PLATFORM_UTILS_WIN_H_
#define PLATFORM_UTILS_WIN_H_
#include <intrin.h>
namespace dart {
inline int Utils::CountTrailingZeros(uword x) {
unsigned long result; // NOLINT
#if defined(ARCH_IS_32_BIT)
_BitScanReverse(&result, x);
#elif defined(ARCH_IS_64_BIT)
_BitScanReverse64(&result, x);
#else
#error Architecture is not 32-bit or 64-bit.
#endif
return static_cast<int>(result);
};
} // namespace dart
#endif // PLATFORM_UTILS_WIN_H_
|
Fix the build breakage on Windows caused by CountTrailingZeros.
|
Fix the build breakage on Windows caused by CountTrailingZeros.
Review URL: https://chromiumcodereview.appspot.com//10818020
git-svn-id: c93d8a2297af3b929165606efe145742a534bc71@9838 260f80e4-7a28-3924-810f-c04153c831b5
|
C
|
bsd-3-clause
|
dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-lang/sdk
|
4cfaf8cd78fdf46a6a6831e2c5ff4eae34809a34
|
lab_2_brightness/main_window.h
|
lab_2_brightness/main_window.h
|
#ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H
#include <QGroupBox>
#include <QVBoxLayout>
#include <base_window.h>
class MainWindow : public gui::BaseWindow {
public:
MainWindow();
virtual ~MainWindow();
protected:
/**
* Callback for resize window.
*
* @param event[in] Event params.
*/
void resizeEvent(QResizeEvent *event) override;
private:
/** Result image and it's container */
QImage result_image;
QLabel *result_image_label;
};
#endif // MAIN_WINDOW_H
|
#ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H
#include <QGroupBox>
#include <QVBoxLayout>
#include <base_window.h>
class MainWindow : public gui::BaseWindow {
public:
MainWindow();
virtual ~MainWindow();
protected:
/**
* Callback for resize window.
*
* @param event[in] Event params.
*/
void resizeEvent(QResizeEvent *event) override;
private slots:
void fix_color_correct();
void gray_world();
void gamma_correct();
void contrast_correct();
void hist_normalization();
void hist_equalization();
private:
/** Result image and it's container */
QImage result_image;
QLabel *result_image_label;
};
#endif // MAIN_WINDOW_H
|
Add slots for second lab
|
Add slots for second lab
|
C
|
mit
|
Dmitry94/Image_Processing,Dmitry94/Image_Processing,Dmitry94/Image_Processing
|
80d8a396ee09d9117594ce512ba4133a996568ae
|
cras/src/server/cras_volume_curve.c
|
cras/src/server/cras_volume_curve.c
|
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <stddef.h>
/* Default to 1dB per tick. Volume level 100 = 0dB level 0 = -100dB. */
long cras_volume_curve_get_db_for_index(size_t volume)
{
/* dB to cut * 100 */
return (volume - 100) * 100;
}
|
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <stddef.h>
/* Default to 1dB per tick.
* Volume = 100 -> 0dB.
* Volume = 0 -> -100dB. */
long cras_volume_curve_get_db_for_index(size_t volume)
{
/* dB to cut * 100 */
return (volume - 100) * 100;
}
|
Fix poorly worded volume comment.
|
CRAS: Fix poorly worded volume comment.
BUG=none
TEST=none
Change-Id: I7a5854c84bc48a393fa65c374fddd83ce7721f8d
Signed-off-by: Dylan Reid <c791bfe44996c1eed9c7149a0c5f12a86d58eb85@chromium.org>
|
C
|
bsd-3-clause
|
drinkcat/adhd,drinkcat/adhd,drinkcat/adhd,drinkcat/adhd,drinkcat/adhd,drinkcat/adhd
|
bb7e3ee1c8bb59b4fde439565bd1757880cbb8ec
|
xchainer/arithmetic_ops.h
|
xchainer/arithmetic_ops.h
|
#pragma once
#include "xchainer/macro.h"
namespace xchainer {
template <typename T>
class ArithmeticOps {
public:
XCHAINER_HOST_DEVICE static T Add(T lhs, T rhs) { return lhs + rhs; }
XCHAINER_HOST_DEVICE static T Multiply(T lhs, T rhs) { return lhs * rhs; }
XCHAINER_HOST_DEVICE static T Divide(T lhs, T rhs) { return lhs / rhs; }
};
template <>
class ArithmeticOps<bool> {
public:
XCHAINER_HOST_DEVICE static bool Add(bool lhs, bool rhs) { return lhs || rhs; }
XCHAINER_HOST_DEVICE static bool Multiply(bool lhs, bool rhs) { return lhs && rhs; }
XCHAINER_HOST_DEVICE static bool Divide(bool lhs, bool rhs) { return lhs && rhs; }
};
} // namespace xchainer
|
#pragma once
#include "xchainer/macro.h"
namespace xchainer {
template <typename T>
class ArithmeticOps {
public:
XCHAINER_HOST_DEVICE static T Add(T lhs, T rhs) { return lhs + rhs; }
XCHAINER_HOST_DEVICE static T Multiply(T lhs, T rhs) { return lhs * rhs; }
XCHAINER_HOST_DEVICE static T Divide(T lhs, T rhs) { return lhs / rhs; }
};
template <>
class ArithmeticOps<bool> {
public:
XCHAINER_HOST_DEVICE static bool Add(bool lhs, bool rhs) { return lhs || rhs; }
XCHAINER_HOST_DEVICE static bool Multiply(bool lhs, bool rhs) { return lhs && rhs; }
// TODO(beam2d): It's a tentative implementation. Make distinction between TrueDivide and FloorDivide for better NumPy compatibility.
// The current implementation is of boolean FloorDivide except for warnings.
XCHAINER_HOST_DEVICE static bool Divide(bool lhs, bool rhs) { return lhs && rhs; }
};
} // namespace xchainer
|
Add a TODO comment about boolean division
|
Add a TODO comment about boolean division
|
C
|
mit
|
okuta/chainer,pfnet/chainer,hvy/chainer,ktnyt/chainer,okuta/chainer,jnishi/chainer,wkentaro/chainer,keisuke-umezawa/chainer,niboshi/chainer,keisuke-umezawa/chainer,hvy/chainer,ktnyt/chainer,wkentaro/chainer,niboshi/chainer,okuta/chainer,ktnyt/chainer,jnishi/chainer,niboshi/chainer,jnishi/chainer,keisuke-umezawa/chainer,okuta/chainer,chainer/chainer,wkentaro/chainer,chainer/chainer,ktnyt/chainer,hvy/chainer,wkentaro/chainer,tkerola/chainer,hvy/chainer,niboshi/chainer,chainer/chainer,keisuke-umezawa/chainer,jnishi/chainer,chainer/chainer
|
309d7d5860070360f423f25d55cfb1d5a2e9a8ca
|
lib/stdarg.h
|
lib/stdarg.h
|
#ifndef __STDARG_H
#define __STDARG_H
#include "sys/types.h"
typedef void *va_list;
#define va_start(l, arg) l = (void *)&arg
#define va_arg(l, type) (*(type *)(l += __WORDSIZE / 8))
#define va_end(l)
#endif
|
#ifndef __STDARG_H
#define __STDARG_H
#include "sys/types.h"
typedef void *va_list;
#define va_start(l, arg) l = (void *)&arg
/*
* va_arg assumes arguments are promoted to
* machine-word size when pushed onto the stack
*/
#define va_arg(l, type) (*(type *)(l += sizeof *l))
#define va_end(l)
#endif
|
Move by machine word size
|
Move by machine word size
|
C
|
mit
|
8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler
|
afa8074ccfc405d91803f946d4dcc878886620d0
|
WebDriverAgentLib/Utilities/FBConfiguration.h
|
WebDriverAgentLib/Utilities/FBConfiguration.h
|
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/**
Accessors for Global Constants.
*/
@interface FBConfiguration : NSObject
/*! If set to YES will ask TestManagerDaemon for element visibility */
@property (class, nonatomic, assign) BOOL shouldUseTestManagerForVisibilityDetection;
/* The maximum typing frequency for all typing activities */
@property (class, nonatomic, assign) NSUInteger maxTypingFrequency;
/**
Switch for enabling/disabling reporting fake collection view cells by Accessibility framework.
If set to YES it will report also invisible cells.
*/
+ (void)shouldShowFakeCollectionViewCells:(BOOL)showFakeCells;
/**
The range of ports that the HTTP Server should attempt to bind on launch
*/
+ (NSRange)bindingPortRange;
/**
YES if verbose logging is enabled. NO otherwise.
*/
+ (BOOL)verboseLoggingEnabled;
@end
NS_ASSUME_NONNULL_END
|
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/**
Accessors for Global Constants.
*/
@interface FBConfiguration : NSObject
/*! If set to YES will ask TestManagerDaemon for element visibility */
+ (void)setShouldUseTestManagerForVisibilityDetection:(BOOL)value;
+ (BOOL)shouldUseTestManagerForVisibilityDetection;
/* The maximum typing frequency for all typing activities */
+ (void)setMaxTypingFrequency:(NSUInteger)value;
+ (NSUInteger)maxTypingFrequency;
/**
Switch for enabling/disabling reporting fake collection view cells by Accessibility framework.
If set to YES it will report also invisible cells.
*/
+ (void)shouldShowFakeCollectionViewCells:(BOOL)showFakeCells;
/**
The range of ports that the HTTP Server should attempt to bind on launch
*/
+ (NSRange)bindingPortRange;
/**
YES if verbose logging is enabled. NO otherwise.
*/
+ (BOOL)verboseLoggingEnabled;
@end
NS_ASSUME_NONNULL_END
|
Switch from class property to methods
|
Switch from class property to methods
Summary:
Some recent changes use class properties, which break building with Xcode 7. This exposes the same API without the new syntax.
Closes https://github.com/facebook/WebDriverAgent/pull/539
Differential Revision: D4880364
Pulled By: marekcirkos
fbshipit-source-id: dace4b2413cb8c52dd0783da03f216da8a26fc97
|
C
|
bsd-3-clause
|
PiranhaTeam/WebDriverAgent,ymin/WebDriverAgent,PiranhaTeam/WebDriverAgent,PiranhaTeam/WebDriverAgent,ymin/WebDriverAgent,ymin/WebDriverAgent,PiranhaTeam/WebDriverAgent,ymin/WebDriverAgent,PiranhaTeam/WebDriverAgent
|
1b30978d7c553bdb9786286374f02c9e41ebb6bd
|
arch/sgi/include/vmparam.h
|
arch/sgi/include/vmparam.h
|
/* $OpenBSD: vmparam.h,v 1.9 2011/05/30 22:25:22 oga Exp $ */
/* public domain */
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_
#define VM_PHYSSEG_MAX 32 /* Max number of physical memory segments */
/*
* On Origin and Octane families, DMA to 32-bit PCI devices is restricted.
*
* Systems with physical memory after the 2GB boundary need to ensure
* memory which may used for DMA transfers is allocated from the low
* memory range.
*
* Other systems, like the O2, do not have such a restriction, but can not
* have more than 2GB of physical memory, so this doesn't affect them.
*/
#include <mips64/vmparam.h>
#endif /* _MACHINE_VMPARAM_H_ */
|
/* $OpenBSD: vmparam.h,v 1.10 2014/07/13 15:48:32 miod Exp $ */
/* public domain */
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_
#define VM_PHYSSEG_MAX 32 /* Max number of physical memory segments */
#include <mips64/vmparam.h>
#endif /* _MACHINE_VMPARAM_H_ */
|
Remove stale comment which used to explain why we had a special 31-bit freelist for DMA, back when this was applicable.
|
Remove stale comment which used to explain why we had a special 31-bit freelist
for DMA, back when this was applicable.
|
C
|
isc
|
orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars
|
3218e01b76602eaa399a7e43caa219d7330855d7
|
iActiveRecord/Classes/class_getSubclasses.h
|
iActiveRecord/Classes/class_getSubclasses.h
|
//
// class_getSubclasses.h
// iActiveRecord
//
// Created by Alex Denisov on 21.03.12.
// Copyright (c) 2012 okolodev.org. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
static NSArray *class_getSubclasses(Class parentClass) {
int numClasses = objc_getClassList(NULL, 0);
Class classes[sizeof(Class) * numClasses];
numClasses = objc_getClassList(classes, numClasses);
NSMutableArray *result = [NSMutableArray array];
for (NSInteger i = 0; i < numClasses; i++) {
Class superClass = classes[i];
do {
superClass = class_getSuperclass(superClass);
} while (superClass && superClass != parentClass);
if (superClass == nil) {
continue;
}
[result addObject:classes[i]];
}
return result;
}
|
//
// class_getSubclasses.h
// iActiveRecord
//
// Created by Alex Denisov on 21.03.12.
// Copyright (c) 2012 okolodev.org. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
static NSArray *class_getSubclasses(Class parentClass) {
int numClasses = objc_getClassList(NULL, 0);
Class *classes = NULL;
classes = (__unsafe_unretained Class *)malloc(sizeof(Class) * numClasses);
numClasses = objc_getClassList(classes, numClasses);
NSMutableArray *result = [NSMutableArray array];
for (NSInteger i = 0; i < numClasses; i++) {
Class superClass = classes[i];
do {
superClass = class_getSuperclass(superClass);
} while (superClass && superClass != parentClass);
if (superClass == nil) {
continue;
}
[result addObject:classes[i]];
}
free(classes);
return result;
}
|
Fix for crashes in iOS 10
|
Fix for crashes in iOS 10
|
C
|
mit
|
AlexDenisov/iActiveRecord,3dcl/iActiveRecord,3dcl/iActiveRecord,AlexDenisov/iActiveRecord,3dcl/iActiveRecord,AlexDenisov/iActiveRecord,3dcl/iActiveRecord
|
2760cf5a705f1fe853cd163f534f5cc2106cdb8f
|
src/math/p_tanh.c
|
src/math/p_tanh.c
|
#include <pal.h>
/**
*
* Calculates the hyperbolic tangent of the input vector 'a'.
* Angles are specified in radians.
*
* @param a Pointer to input vector
*
* @param c Pointer to output vector
*
* @param n Size of 'a' and 'c' vector.
*
* @return None
*
*/
#include <math.h>
void p_tanh_f32(const float *a, float *c, int n)
{
int i;
for (i = 0; i < n; i++) {
*(c + i) = tanhf(*(a + i));
}
}
|
#include <pal.h>
#include "p_exp.h"
/*
* tanh z = sinh z / cosh z
* = (exp z - exp -z) / (exp z + ezp -z)
* = (exp 2z - 1) / (exp 2z + 1)
*/
static inline float _p_tanh(const float z)
{
float exp_2z = _p_exp(2.f * z);
return (exp_2z - 1.f) / (exp_2z + 1.f);
}
/**
*
* Calculates the hyperbolic tangent of the input vector 'a'.
* Angles are specified in radians.
*
* @param a Pointer to input vector
*
* @param c Pointer to output vector
*
* @param n Size of 'a' and 'c' vector.
*
* @return None
*
*/
void p_tanh_f32(const float *a, float *c, int n)
{
int i;
for (i = 0; i < n; i++) {
c[i] = _p_tanh(a[i]);
}
}
|
Implement the hyperbolic tangent function.
|
math:tanh: Implement the hyperbolic tangent function.
Signed-off-by: Mansour Moufid <ac5f6b12fab5e0d4efa7215e6c2dac9d55ab77dc@gmail.com>
|
C
|
apache-2.0
|
parallella/pal,debug-de-su-ka/pal,parallella/pal,olajep/pal,debug-de-su-ka/pal,mateunho/pal,8l/pal,eliteraspberries/pal,parallella/pal,aolofsson/pal,mateunho/pal,eliteraspberries/pal,olajep/pal,mateunho/pal,parallella/pal,parallella/pal,eliteraspberries/pal,olajep/pal,8l/pal,aolofsson/pal,olajep/pal,debug-de-su-ka/pal,eliteraspberries/pal,8l/pal,debug-de-su-ka/pal,8l/pal,eliteraspberries/pal,aolofsson/pal,aolofsson/pal,debug-de-su-ka/pal,mateunho/pal,mateunho/pal
|
c530ab012c5f8053453e5be3c3c093cc7fba10ed
|
base/inc/Htypes.h
|
base/inc/Htypes.h
|
/* @(#)root/base:$Name: $:$Id: Htypes.h,v 1.1.1.1 2000/05/16 17:00:39 rdm Exp $ */
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_Htypes
#define ROOT_Htypes
//////////////////////////////////////////////////////////////////////////
// //
// Htypes //
// //
// Types used by the histogramming classes. //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif
typedef double Axis_t; //Axis values type
typedef double Stat_t; //Statistics type
#endif
|
/* @(#)root/base:$Name: $:$Id: Htypes.h,v 1.2 2000/06/13 12:25:52 brun Exp $ */
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_Htypes
#define ROOT_Htypes
//////////////////////////////////////////////////////////////////////////
// //
// Htypes //
// //
// Types used by the histogramming classes. //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif
typedef double Axis_t; //Axis values type (double)
typedef double Stat_t; //Statistics type (double)
#endif
|
Add more comments describing Stat_t and Axis_t
|
Add more comments describing Stat_t and Axis_t
git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@3097 27541ba8-7e3a-0410-8455-c3a389f83636
|
C
|
lgpl-2.1
|
nilqed/root,davidlt/root,omazapa/root-old,krafczyk/root,sbinet/cxx-root,zzxuanyuan/root-compressor-dummy,esakellari/root,sirinath/root,zzxuanyuan/root,esakellari/my_root_for_test,pspe/root,karies/root,buuck/root,sbinet/cxx-root,mhuwiler/rootauto,sirinath/root,arch1tect0r/root,perovic/root,veprbl/root,mhuwiler/rootauto,omazapa/root,CristinaCristescu/root,root-mirror/root,abhinavmoudgil95/root,cxx-hep/root-cern,veprbl/root,mattkretz/root,zzxuanyuan/root,satyarth934/root,bbockelm/root,mhuwiler/rootauto,arch1tect0r/root,mhuwiler/rootauto,sawenzel/root,mhuwiler/rootauto,pspe/root,mkret2/root,CristinaCristescu/root,0x0all/ROOT,evgeny-boger/root,bbockelm/root,pspe/root,nilqed/root,sirinath/root,arch1tect0r/root,perovic/root,sawenzel/root,vukasinmilosevic/root,simonpf/root,nilqed/root,zzxuanyuan/root-compressor-dummy,olifre/root,buuck/root,esakellari/root,sirinath/root,omazapa/root-old,smarinac/root,krafczyk/root,buuck/root,nilqed/root,nilqed/root,pspe/root,omazapa/root-old,bbockelm/root,perovic/root,karies/root,0x0all/ROOT,esakellari/root,Duraznos/root,pspe/root,esakellari/root,thomaskeck/root,BerserkerTroll/root,Duraznos/root,krafczyk/root,vukasinmilosevic/root,agarciamontoro/root,ffurano/root5,zzxuanyuan/root-compressor-dummy,Duraznos/root,omazapa/root-old,zzxuanyuan/root-compressor-dummy,nilqed/root,nilqed/root,root-mirror/root,perovic/root,buuck/root,dfunke/root,abhinavmoudgil95/root,pspe/root,dfunke/root,omazapa/root,gbitzes/root,BerserkerTroll/root,perovic/root,evgeny-boger/root,tc3t/qoot,gganis/root,arch1tect0r/root,omazapa/root,arch1tect0r/root,mkret2/root,georgtroska/root,gbitzes/root,ffurano/root5,dfunke/root,beniz/root,vukasinmilosevic/root,CristinaCristescu/root,Duraznos/root,root-mirror/root,perovic/root,BerserkerTroll/root,gbitzes/root,alexschlueter/cern-root,tc3t/qoot,sawenzel/root,root-mirror/root,esakellari/root,davidlt/root,gbitzes/root,satyarth934/root,karies/root,olifre/root,mkret2/root,Dr15Jones/root,cxx-hep/root-cern,evgeny-boger/root,sawenzel/root,jrtomps/root,ffurano/root5,ffurano/root5,bbockelm/root,thomaskeck/root,sbinet/cxx-root,evgeny-boger/root,Y--/root,satyarth934/root,vukasinmilosevic/root,smarinac/root,bbockelm/root,pspe/root,omazapa/root-old,evgeny-boger/root,strykejern/TTreeReader,sawenzel/root,gbitzes/root,beniz/root,davidlt/root,agarciamontoro/root,beniz/root,olifre/root,vukasinmilosevic/root,Dr15Jones/root,mkret2/root,perovic/root,dfunke/root,mhuwiler/rootauto,omazapa/root-old,tc3t/qoot,veprbl/root,smarinac/root,simonpf/root,zzxuanyuan/root-compressor-dummy,tc3t/qoot,zzxuanyuan/root-compressor-dummy,tc3t/qoot,vukasinmilosevic/root,omazapa/root-old,Y--/root,dfunke/root,krafczyk/root,0x0all/ROOT,mkret2/root,alexschlueter/cern-root,BerserkerTroll/root,veprbl/root,perovic/root,simonpf/root,vukasinmilosevic/root,root-mirror/root,gganis/root,mkret2/root,satyarth934/root,mhuwiler/rootauto,krafczyk/root,root-mirror/root,agarciamontoro/root,zzxuanyuan/root,davidlt/root,Dr15Jones/root,nilqed/root,olifre/root,simonpf/root,lgiommi/root,CristinaCristescu/root,thomaskeck/root,simonpf/root,CristinaCristescu/root,mkret2/root,agarciamontoro/root,agarciamontoro/root,gbitzes/root,karies/root,abhinavmoudgil95/root,jrtomps/root,evgeny-boger/root,veprbl/root,sirinath/root,strykejern/TTreeReader,georgtroska/root,zzxuanyuan/root,agarciamontoro/root,gganis/root,esakellari/my_root_for_test,mkret2/root,zzxuanyuan/root,mkret2/root,mattkretz/root,abhinavmoudgil95/root,lgiommi/root,zzxuanyuan/root-compressor-dummy,kirbyherm/root-r-tools,arch1tect0r/root,perovic/root,tc3t/qoot,simonpf/root,agarciamontoro/root,abhinavmoudgil95/root,0x0all/ROOT,perovic/root,karies/root,georgtroska/root,sawenzel/root,tc3t/qoot,BerserkerTroll/root,BerserkerTroll/root,gbitzes/root,nilqed/root,zzxuanyuan/root,zzxuanyuan/root-compressor-dummy,CristinaCristescu/root,thomaskeck/root,cxx-hep/root-cern,alexschlueter/cern-root,omazapa/root-old,BerserkerTroll/root,davidlt/root,esakellari/my_root_for_test,alexschlueter/cern-root,arch1tect0r/root,mattkretz/root,gganis/root,abhinavmoudgil95/root,georgtroska/root,BerserkerTroll/root,sawenzel/root,jrtomps/root,sbinet/cxx-root,mattkretz/root,evgeny-boger/root,veprbl/root,Dr15Jones/root,jrtomps/root,sbinet/cxx-root,omazapa/root-old,esakellari/my_root_for_test,strykejern/TTreeReader,cxx-hep/root-cern,strykejern/TTreeReader,abhinavmoudgil95/root,omazapa/root,root-mirror/root,kirbyherm/root-r-tools,sawenzel/root,krafczyk/root,lgiommi/root,0x0all/ROOT,ffurano/root5,buuck/root,buuck/root,gbitzes/root,zzxuanyuan/root,esakellari/my_root_for_test,bbockelm/root,esakellari/root,pspe/root,sirinath/root,root-mirror/root,jrtomps/root,mhuwiler/rootauto,gbitzes/root,simonpf/root,bbockelm/root,sirinath/root,mattkretz/root,root-mirror/root,veprbl/root,esakellari/root,davidlt/root,smarinac/root,0x0all/ROOT,bbockelm/root,ffurano/root5,karies/root,thomaskeck/root,georgtroska/root,thomaskeck/root,omazapa/root,beniz/root,agarciamontoro/root,vukasinmilosevic/root,evgeny-boger/root,strykejern/TTreeReader,jrtomps/root,arch1tect0r/root,davidlt/root,buuck/root,smarinac/root,beniz/root,thomaskeck/root,davidlt/root,omazapa/root-old,zzxuanyuan/root,smarinac/root,Y--/root,cxx-hep/root-cern,lgiommi/root,smarinac/root,root-mirror/root,thomaskeck/root,krafczyk/root,davidlt/root,kirbyherm/root-r-tools,satyarth934/root,lgiommi/root,Duraznos/root,Duraznos/root,cxx-hep/root-cern,esakellari/my_root_for_test,vukasinmilosevic/root,pspe/root,buuck/root,jrtomps/root,Y--/root,satyarth934/root,agarciamontoro/root,vukasinmilosevic/root,satyarth934/root,tc3t/qoot,omazapa/root,evgeny-boger/root,gganis/root,zzxuanyuan/root-compressor-dummy,Y--/root,veprbl/root,Duraznos/root,CristinaCristescu/root,gganis/root,mattkretz/root,gganis/root,davidlt/root,mhuwiler/rootauto,gganis/root,esakellari/root,zzxuanyuan/root-compressor-dummy,beniz/root,satyarth934/root,omazapa/root,gganis/root,pspe/root,jrtomps/root,gganis/root,omazapa/root,georgtroska/root,gbitzes/root,smarinac/root,abhinavmoudgil95/root,perovic/root,zzxuanyuan/root,satyarth934/root,esakellari/my_root_for_test,CristinaCristescu/root,abhinavmoudgil95/root,thomaskeck/root,buuck/root,agarciamontoro/root,beniz/root,bbockelm/root,Dr15Jones/root,mattkretz/root,sirinath/root,jrtomps/root,karies/root,sbinet/cxx-root,sirinath/root,olifre/root,Duraznos/root,olifre/root,lgiommi/root,sbinet/cxx-root,sawenzel/root,kirbyherm/root-r-tools,olifre/root,BerserkerTroll/root,alexschlueter/cern-root,BerserkerTroll/root,arch1tect0r/root,Y--/root,buuck/root,olifre/root,lgiommi/root,sawenzel/root,georgtroska/root,sbinet/cxx-root,beniz/root,zzxuanyuan/root,mattkretz/root,bbockelm/root,thomaskeck/root,lgiommi/root,dfunke/root,kirbyherm/root-r-tools,esakellari/root,satyarth934/root,jrtomps/root,simonpf/root,strykejern/TTreeReader,evgeny-boger/root,Dr15Jones/root,mhuwiler/rootauto,mattkretz/root,0x0all/ROOT,dfunke/root,olifre/root,davidlt/root,cxx-hep/root-cern,krafczyk/root,simonpf/root,nilqed/root,Duraznos/root,sbinet/cxx-root,krafczyk/root,olifre/root,zzxuanyuan/root-compressor-dummy,smarinac/root,karies/root,buuck/root,beniz/root,zzxuanyuan/root,dfunke/root,Y--/root,CristinaCristescu/root,dfunke/root,krafczyk/root,Duraznos/root,zzxuanyuan/root,omazapa/root-old,alexschlueter/cern-root,satyarth934/root,mattkretz/root,abhinavmoudgil95/root,vukasinmilosevic/root,ffurano/root5,esakellari/my_root_for_test,veprbl/root,omazapa/root,georgtroska/root,Y--/root,mkret2/root,Y--/root,Y--/root,sbinet/cxx-root,sawenzel/root,lgiommi/root,omazapa/root,tc3t/qoot,georgtroska/root,Dr15Jones/root,simonpf/root,omazapa/root,esakellari/my_root_for_test,CristinaCristescu/root,veprbl/root,jrtomps/root,root-mirror/root,mattkretz/root,CristinaCristescu/root,evgeny-boger/root,beniz/root,krafczyk/root,karies/root,georgtroska/root,smarinac/root,0x0all/ROOT,Y--/root,nilqed/root,dfunke/root,arch1tect0r/root,bbockelm/root,pspe/root,tc3t/qoot,dfunke/root,lgiommi/root,0x0all/ROOT,gbitzes/root,abhinavmoudgil95/root,gganis/root,esakellari/root,strykejern/TTreeReader,BerserkerTroll/root,sbinet/cxx-root,veprbl/root,alexschlueter/cern-root,cxx-hep/root-cern,mhuwiler/rootauto,kirbyherm/root-r-tools,esakellari/root,karies/root,arch1tect0r/root,kirbyherm/root-r-tools,sirinath/root,lgiommi/root,esakellari/my_root_for_test,agarciamontoro/root,Duraznos/root,karies/root,beniz/root,georgtroska/root,simonpf/root,sirinath/root,olifre/root,mkret2/root
|
8c5a18cd999cfd0edc1871e5cf797ff5e04ea20e
|
libevmjit/Common.h
|
libevmjit/Common.h
|
#pragma once
#include <vector>
#include <boost/multiprecision/cpp_int.hpp>
namespace dev
{
namespace eth
{
namespace jit
{
using byte = uint8_t;
using bytes = std::vector<byte>;
using u256 = boost::multiprecision::uint256_t;
using bigint = boost::multiprecision::cpp_int;
struct NoteChannel {}; // FIXME: Use some log library?
enum class ReturnCode
{
Stop = 0,
Return = 1,
Suicide = 2,
BadJumpDestination = 101,
OutOfGas = 102,
StackTooSmall = 103,
BadInstruction = 104,
LLVMConfigError = 201,
LLVMCompileError = 202,
LLVMLinkError = 203,
};
/// Representation of 256-bit value binary compatible with LLVM i256
// TODO: Replace with h256
struct i256
{
uint64_t a;
uint64_t b;
uint64_t c;
uint64_t d;
};
static_assert(sizeof(i256) == 32, "Wrong i265 size");
#define UNTESTED assert(false)
}
}
}
|
#pragma once
#include <vector>
#include <boost/multiprecision/cpp_int.hpp>
namespace dev
{
namespace eth
{
namespace jit
{
using byte = uint8_t;
using bytes = std::vector<byte>;
using u256 = boost::multiprecision::uint256_t;
using bigint = boost::multiprecision::cpp_int;
struct NoteChannel {}; // FIXME: Use some log library?
enum class ReturnCode
{
Stop = 0,
Return = 1,
Suicide = 2,
BadJumpDestination = 101,
OutOfGas = 102,
StackTooSmall = 103,
BadInstruction = 104,
LLVMConfigError = 201,
LLVMCompileError = 202,
LLVMLinkError = 203,
};
/// Representation of 256-bit value binary compatible with LLVM i256
// TODO: Replace with h256
struct i256
{
uint64_t a = 0;
uint64_t b = 0;
uint64_t c = 0;
uint64_t d = 0;
};
static_assert(sizeof(i256) == 32, "Wrong i265 size");
#define UNTESTED assert(false)
}
}
}
|
Fix some GCC initialization warnings
|
Fix some GCC initialization warnings
|
C
|
mit
|
debris/evmjit,debris/evmjit,ethcore/evmjit,ethcore/evmjit
|
787355ea64fb4a8967718cb1331b7cd1fa0d02e4
|
test/cases/vla/argument_eval.c
|
test/cases/vla/argument_eval.c
|
// RUN: %ocheck 0 %s
// RUN: %ocheck 0 %s -fstack-protector-all
extern void abort(void);
as, bs, fs;
static int a(){ as++; return 2; }
static int b(){ bs++; return 2; }
static int f(int p[a()][b()])
{
fs++;
return p[0][0] + p[0][1] + p[1][0] + p[1][1];
}
static void assert(_Bool b)
{
if(!b)
abort();
}
int main()
{
int ar[a()][b()];
assert(as == 1);
assert(bs == 1);
assert(fs == 0);
ar[0][0] = 5;
ar[0][1] = 4;
ar[1][0] = 3;
ar[1][1] = 2;
assert(as == 1);
assert(bs == 1);
assert(fs == 0);
assert(f(ar) == 14);
assert(as == 2);
assert(bs == 2);
assert(fs == 1);
return 0;
}
|
// RUN: %ocheck 0 %s
// RUN: %ocheck 0 %s -fstack-protector-all
extern void abort(void);
as, bs, fs;
static int a(){ as++; return 2; }
static int b(){ bs++; return 2; }
static int f(int p[a()][b()])
{
fs++;
return p[0][0] // 5
+ p[0][1] // 4
+ p[1][0] // 3
+ p[1][1] // 2
+ sizeof(p) // sizeof(T (*)[...]) = 8
+ sizeof(p[0]) // 2 * sizeof(int) = 8
+ sizeof(p[1][2]); // sizeof(int) = 4
}
static void assert(_Bool b)
{
if(!b)
abort();
}
int main()
{
int ar[a()][b()];
assert(as == 1);
assert(bs == 1);
assert(fs == 0);
ar[0][0] = 5;
ar[0][1] = 4;
ar[1][0] = 3;
ar[1][1] = 2;
assert(as == 1);
assert(bs == 1);
assert(fs == 0);
assert(f(ar) == 34);
assert(as == 2);
assert(bs == 2);
assert(fs == 1);
return 0;
}
|
Improve checks for vla-argument test
|
Improve checks for vla-argument test
|
C
|
mit
|
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
|
1f4f7b5c2796c5e950457563e6221351791958e6
|
lib/int_util.h
|
lib/int_util.h
|
/* ===-- int_util.h - internal utility functions ----------------------------===
*
* The LLVM Compiler Infrastructure
*
* This file is dual licensed under the MIT and the University of Illinois Open
* Source Licenses. See LICENSE.TXT for details.
*
* ===-----------------------------------------------------------------------===
*
* This file is not part of the interface of this library.
*
* This file defines non-inline utilities which are available for use in the
* library. The function definitions themselves are all contained in int_util.c
* which will always be compiled into any compiler-rt library.
*
* ===-----------------------------------------------------------------------===
*/
#ifndef INT_UTIL_H
#define INT_UTIL_H
/** \brief Trigger a program abort (or panic for kernel code). */
#define compilerrt_abort() compilerrt_abort_impl(__FILE__, __LINE__, \
__FUNCTION__)
void compilerrt_abort_impl(const char *file, int line,
const char *function)
#ifndef KERNEL_USE
__attribute__((weak))
#endif
__attribute__((noreturn)) __attribute__((visibility("hidden")));
#endif /* INT_UTIL_H */
|
/* ===-- int_util.h - internal utility functions ----------------------------===
*
* The LLVM Compiler Infrastructure
*
* This file is dual licensed under the MIT and the University of Illinois Open
* Source Licenses. See LICENSE.TXT for details.
*
* ===-----------------------------------------------------------------------===
*
* This file is not part of the interface of this library.
*
* This file defines non-inline utilities which are available for use in the
* library. The function definitions themselves are all contained in int_util.c
* which will always be compiled into any compiler-rt library.
*
* ===-----------------------------------------------------------------------===
*/
#ifndef INT_UTIL_H
#define INT_UTIL_H
/** \brief Trigger a program abort (or panic for kernel code). */
#define compilerrt_abort() compilerrt_abort_impl(__FILE__, __LINE__, \
__FUNCTION__)
void compilerrt_abort_impl(const char *file, int line,
const char *function) __attribute__((noreturn));
#endif /* INT_UTIL_H */
|
Remove __attribute__((weak)) on function prototype. It has a different meaning on prototypes then it does on definitions. It is not needed on the prototype and causes build failures for static codegen
|
Remove __attribute__((weak)) on function prototype. It has a different meaning on prototypes then it does on definitions. It is not needed on the prototype and causes build failures for static codegen
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@149720 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
|
01cfab200399196583a306ad90e56349caf1925d
|
src/unshield-deobfuscate.c
|
src/unshield-deobfuscate.c
|
#include <stdio.h>
#include <stdlib.h>
#include "../lib/libunshield.h"
int main(int argc, char** argv)
{
unsigned seed = 0;
FILE* input = NULL;
FILE* output = NULL;
size_t size;
unsigned char buffer[16384];
if (argc != 3)
{
fprintf(stderr,
"Syntax:\n"
" %s INPUT-FILE OUTPUT-FILE\n",
argv[0]);
exit(1);
}
input = fopen(argv[1], "r");
if (!input)
{
fprintf(stderr,
"Failed to open %s for reading\n",
argv[1]);
exit(2);
}
output = fopen(argv[2], "w");
if (!output)
{
fprintf(stderr,
"Failed to open %s for writing\n",
argv[2]);
exit(3);
}
while ((size = fread(buffer, 1, sizeof(buffer), input)) != 0)
{
unshield_deobfuscate(buffer, size, &seed);
if (fwrite(buffer, 1, size, output) != size)
{
fprintf(stderr,
"Failed to write %lu bytes to %s\n",
(unsigned long)size, argv[2]);
exit(4);
}
}
fclose(input);
fclose(output);
return 0;
}
|
#include <stdio.h>
#include <stdlib.h>
#include "../lib/libunshield.h"
int main(int argc, char** argv)
{
unsigned seed = 0;
FILE* input = NULL;
FILE* output = NULL;
size_t size;
unsigned char buffer[16384];
if (argc != 3)
{
fprintf(stderr,
"Syntax:\n"
" %s INPUT-FILE OUTPUT-FILE\n",
argv[0]);
exit(1);
}
input = fopen(argv[1], "rb");
if (!input)
{
fprintf(stderr,
"Failed to open %s for reading\n",
argv[1]);
exit(2);
}
output = fopen(argv[2], "wb");
if (!output)
{
fprintf(stderr,
"Failed to open %s for writing\n",
argv[2]);
exit(3);
}
while ((size = fread(buffer, 1, sizeof(buffer), input)) != 0)
{
unshield_deobfuscate(buffer, size, &seed);
if (fwrite(buffer, 1, size, output) != size)
{
fprintf(stderr,
"Failed to write %lu bytes to %s\n",
(unsigned long)size, argv[2]);
exit(4);
}
}
fclose(input);
fclose(output);
return 0;
}
|
Fix for binary files on Windows
|
Fix for binary files on Windows
Thanks @Djamana
Closes #46
|
C
|
mit
|
twogood/unshield,twogood/unshield
|
c0d5a95745e15c8f215a66445cca5e05e46e0c10
|
arc/arc/Controllers/Protocols/FolderViewControllerDelegate.h
|
arc/arc/Controllers/Protocols/FolderViewControllerDelegate.h
|
//
// FolderViewControllerDelegate.h
// arc
//
// Created by Jerome Cheng on 17/4/13.
// Copyright (c) 2013 nus.cs3217. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "File.h"
#import "Folder.h"
@class FolderViewController;
@protocol FolderViewControllerDelegate <NSObject>
- (void)folderViewController:(FolderViewController *)sender selectedFile:(id<File>)file;
- (void)folderViewController:(FolderViewController *)sender selectedFolder:(id<Folder>)folder;
@end
|
//
// FolderViewControllerDelegate.h
// arc
//
// Created by Jerome Cheng on 17/4/13.
// Copyright (c) 2013 nus.cs3217. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "File.h"
#import "Folder.h"
@class FolderViewController;
@protocol FolderViewControllerDelegate <NSObject>
// Allows delegate to know which file or folder was selected in navigation mode.
- (void)folderViewController:(FolderViewController *)sender selectedFile:(id<File>)file;
- (void)folderViewController:(FolderViewController *)sender selectedFolder:(id<Folder>)folder;
// Allows the delegate to know if the controller has entered or left editing mode.
- (void)folderViewController:(FolderViewController *)folderviewController
DidEnterEditModeAnimate:(BOOL)animate;
- (void)folderViewController:(FolderViewController *)folderviewController DidExitEditModeAnimate:(BOOL)animate;
@end
|
Add methods to notify FolderView delegate when edit mode is toggled.
|
Add methods to notify FolderView delegate when edit mode is toggled.
|
C
|
mit
|
BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc
|
56a77a274be12217e07ca8c4b5e2dabdac3c0c2b
|
peertalk/PTPrivate.h
|
peertalk/PTPrivate.h
|
#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (!defined(__IPHONE_6_0) || __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0)) || \
(defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && (!defined(__MAC_10_8) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8))
#define PT_DISPATCH_RETAIN_RELEASE 1
#endif
#if (!defined(PT_DISPATCH_RETAIN_RELEASE))
#define PT_PRECISE_LIFETIME __attribute__((objc_precise_lifetime))
#define PT_PRECISE_LIFETIME_UNUSED __attribute__((objc_precise_lifetime, unused))
#else
#define PT_PRECISE_LIFETIME
#define PT_PRECISE_LIFETIME_UNUSED
#endif
|
#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (!defined(__IPHONE_6_0) || __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0)) || \
(defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && (!defined(__MAC_10_8) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8))
#define PT_DISPATCH_RETAIN_RELEASE 1
#else
#define PT_DISPATCH_RETAIN_RELEASE 0
#endif
#if PT_DISPATCH_RETAIN_RELEASE
#define PT_PRECISE_LIFETIME
#define PT_PRECISE_LIFETIME_UNUSED
#else
#define PT_PRECISE_LIFETIME __attribute__((objc_precise_lifetime))
#define PT_PRECISE_LIFETIME_UNUSED __attribute__((objc_precise_lifetime, unused))
#endif
|
Synchronize logical grouping of defines
|
Synchronize logical grouping of defines
|
C
|
mit
|
rsms/peertalk,rsms/peertalk,rsms/peertalk
|
130f6f3b116db2168b0656d8e1cf4bb7053388ec
|
cuser/acpica/acenv_header.h
|
cuser/acpica/acenv_header.h
|
#define ACPI_MACHINE_WIDTH 64
#define ACPI_SINGLE_THREADED
#define ACPI_DEBUG_OUTPUT
#define ACPI_DISASSEMBLER
#define ACPI_USE_LOCAL_CACHE
#define ACPI_INLINE inline
#define ACPI_USE_NATIVE_DIVIDE
// Depends on threading support
#define ACPI_DEBUGGER
#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED
// Depends on debugger support
//#define ACPI_DBG_TRACK_ALLOCATIONS
#define ACPI_PHYS_BASE 0x100000000
#if 0
#define AcpiException(ModName, Line, Status, Format, ...) \
AcpiOsPrintf(ACPI_MSG_EXCEPTION "%s, " Format, \
AcpiFormatException(Status), \
## __VA_ARGS__)
#endif
#include <stdint.h>
#include <stdarg.h>
#define AcpiOsPrintf printf
#define AcpiOsVprintf vprintf
|
#define ACPI_MACHINE_WIDTH 64
#define ACPI_SINGLE_THREADED
#define ACPI_DEBUG_OUTPUT
#define ACPI_DISASSEMBLER
#define ACPI_USE_LOCAL_CACHE
#define ACPI_INLINE inline
#define ACPI_USE_NATIVE_DIVIDE
// Depends on threading support
#define ACPI_DEBUGGER
#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED
// Depends on debugger support
//#define ACPI_DBG_TRACK_ALLOCATIONS
#define ACPI_PHYS_BASE 0x100000000
#if 0
#define AcpiException(ModName, Line, Status, Format, ...) \
AcpiOsPrintf(ACPI_MSG_EXCEPTION "%s, " Format, \
AcpiFormatException(Status), \
## __VA_ARGS__)
#endif
#define ACPI_GET_FUNCTION_NAME __FUNCTION__
#include <stdint.h>
#include <stdarg.h>
#define AcpiOsPrintf printf
#define AcpiOsVprintf vprintf
|
Use GCC's __FUNCTION__ for ACPI_GET_FUNCTION_NAME
|
Use GCC's __FUNCTION__ for ACPI_GET_FUNCTION_NAME
|
C
|
mit
|
olsner/os,olsner/os,olsner/os,olsner/os
|
1d092135d5973e22550e260c944c2c5e7678923a
|
src/main.c
|
src/main.c
|
#include <stdlib.h>
#include <ncurses.h>
/**
* The main function, called when atcso is started (duh).
*/
int main(int argc, char** argv) {
initscr();
raw(); // Disable line buffering
noecho(); // Don't show things the user is typing
printw("hai wurld");
refresh();
while (getch() != 'q'); // Wait for the user to hit `q' to quit
endwin();
return EXIT_SUCCESS;
}
|
#include <stdlib.h>
#include <ncurses.h>
#include <time.h>
typedef struct {
} AtcsoData;
void mainloop();
WINDOW *createRadarWin();
void updateRadarWin(AtcsoData *data, WINDOW *radarWin);
/**
* The main function, called when atcso is started (duh).
*/
int main(int argc, char **argv) {
initscr();
raw(); // Disable line buffering
noecho(); // Don't show things the user is typing
nodelay(stdscr, TRUE); // Non-blocking getch()
mainloop(); // Start the game!
endwin();
return EXIT_SUCCESS;
}
/**
* The main loop: runs infinitely until the game is ended.
*/
void mainloop() {
// get all our windows
refresh();
WINDOW *radarWin = createRadarWin();
// TODO put this somewhere... better
const int TICK_DELAY = 2;
// the main loop
int ch;
time_t lastTick = time(NULL);
AtcsoData data;
for (;;) {
if (difftime(time(NULL), lastTick) > TICK_DELAY) {
updateRadarWin(&data, radarWin);
lastTick += TICK_DELAY;
}
if ((ch = getch()) != ERR) {
switch (ch) {
case 'q':
case 'Q':
goto cleanup;
}
}
}
cleanup:
delwin(radarWin);
}
/**
* Creates the radar window, the biggest one that has all the planes and stuff.
*/
WINDOW *createRadarWin() {
WINDOW *radarWin = newwin(21, 60, 0, 0);
for (int i = 0; i < 59; ++i) waddch(radarWin, '-');
waddch(radarWin, ' ');
for (int i = 0; i < 19; ++i) {
waddstr(radarWin, "| ");
for (int j = 0; j < 28; ++j) waddstr(radarWin, ". ");
waddstr(radarWin, "| ");
}
for (int i = 0; i < 59; ++i) waddch(radarWin, '-');
waddch(radarWin, ' ');
wrefresh(radarWin);
return radarWin;
}
/**
* Update and refresh the radar window.
*/
void updateRadarWin(AtcsoData *data, WINDOW *radarWin) {
// TODO do stuff
}
|
Implement outline of "radar window"
|
Implement outline of "radar window"
The radar window is simply the "main" window, with all the planes and
stuff.
This commit draws the outline of this window, and it also adds a few
pieces of code that will serve as a framework for future inter-window
communication.
|
C
|
mit
|
KeyboardFire/atcso
|
07eb6bd1593c5e96c68d418ea23706e27874b7e8
|
features/netsocket/nsapi.h
|
features/netsocket/nsapi.h
|
/** \addtogroup netsocket */
/** @{*/
/* nsapi.h - The network socket API
* Copyright (c) 2015 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef NSAPI_H
#define NSAPI_H
// entry point for nsapi types
#include "nsapi_types.h"
#ifdef __cplusplus
// entry point for C++ api
#include "netsocket/SocketAddress.h"
#include "netsocket/NetworkStack.h"
#include "netsocket/NetworkInterface.h"
#include "netsocket/EthInterface.h"
#include "netsocket/WiFiInterface.h"
#include "netsocket/CellularBase.h"
#include "netsocket/MeshInterface.h"
#include "netsocket/Socket.h"
#include "netsocket/UDPSocket.h"
#include "netsocket/TCPSocket.h"
#include "netsocket/TCPServer.h"
#endif
#endif
/** @}*/
|
/** \addtogroup netsocket */
/** @{*/
/* nsapi.h - The network socket API
* Copyright (c) 2015 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef NSAPI_H
#define NSAPI_H
// entry point for nsapi types
#include "nsapi_types.h"
#ifdef __cplusplus
// entry point for C++ api
#include "netsocket/SocketAddress.h"
#include "netsocket/NetworkStack.h"
#include "netsocket/NetworkInterface.h"
#include "netsocket/EthInterface.h"
#include "netsocket/WiFiInterface.h"
#include "netsocket/CellularBase.h"
#include "netsocket/MeshInterface.h"
#include "netsocket/Socket.h"
#include "netsocket/UDPSocket.h"
#include "netsocket/TCPSocket.h"
#include "netsocket/TCPServer.h"
#include "netsocket/TLSSocket.h"
#endif
#endif
/** @}*/
|
Add missing include for TLSSocket
|
Add missing include for TLSSocket
TCP and UDP sockets are automatically available when mbed.h is
included in an application.
This change lets the TLSSocket be used in the same way.
|
C
|
apache-2.0
|
andcor02/mbed-os,andcor02/mbed-os,andcor02/mbed-os,andcor02/mbed-os,andcor02/mbed-os,kjbracey-arm/mbed,kjbracey-arm/mbed,kjbracey-arm/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,kjbracey-arm/mbed,mbedmicro/mbed,andcor02/mbed-os
|
88dd832b22b4927f9d571158c0429df0a50fd6d8
|
sigaltstack.c
|
sigaltstack.c
|
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <assert.h>
#include <stdlib.h>
#include <setjmp.h>
jmp_buf try;
void handler(int sig) {
static int i = 0;
write(2, "stack overflow\n", 15);
longjmp(try, ++i);
_exit(1);
}
unsigned recurse(unsigned x) {
return recurse(x)+1;
}
int main() {
char* stack;
stack = malloc(sizeof(stack) * SIGSTKSZ);
stack_t ss = {
.ss_size = SIGSTKSZ,
.ss_sp = stack,
};
struct sigaction sa = {
.sa_handler = handler,
.sa_flags = SA_ONSTACK
};
sigaltstack(&ss, 0);
sigfillset(&sa.sa_mask);
sigaction(SIGSEGV, &sa, 0);
if (setjmp(try) < 3) {
recurse(0);
} else {
printf("caught exception!\n");
}
return 0;
}
|
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <assert.h>
#include <stdlib.h>
#include <setjmp.h>
jmp_buf try;
void handler(int sig) {
static int i = 0;
printf("stack overflow %d\n", i);
longjmp(try, ++i);
assert(0);
}
unsigned recurse(unsigned x) {
return recurse(x)+1;
}
int main() {
char* stack;
stack = malloc(sizeof(stack) * SIGSTKSZ);
stack_t ss = {
.ss_size = SIGSTKSZ,
.ss_sp = stack,
};
struct sigaction sa = {
.sa_handler = handler,
.sa_flags = SA_ONSTACK
};
sigaltstack(&ss, 0);
sigfillset(&sa.sa_mask);
sigaction(SIGSEGV, &sa, 0);
if (setjmp(try) < 3) {
recurse(0);
} else {
printf("caught exception!\n");
}
return 0;
}
|
Add assert, more print info
|
Add assert, more print info
|
C
|
apache-2.0
|
danluu/setjmp-longjmp-ucontext-snippets,danluu/setjmp-longjmp-ucontext-snippets
|
13bdfcd1c659359289f373052b21fb9f998dcc0b
|
test/Preprocessor/microsoft-import.c
|
test/Preprocessor/microsoft-import.c
|
// RUN: %clang_cc1 -E -fms-compatibility %s 2>&1 | grep 'doh.c:100:2: error: #import of type library is an unsupported Microsoft feature'
// RUN: %clang_cc1 -E -fms-compatibility %s 2>&1 | grep 'doh.c:200:2: error: #import of type library is an unsupported Microsoft feature'
// RUN: %clang_cc1 -E -fms-compatibility %s 2>&1 | grep 'doh.c:300:2: error: #import of type library is an unsupported Microsoft feature'
#line 100 "doh.c"
#import "pp-record.h" // expected-error {{#import of type library is an unsupported Microsoft feature}}
// Test attributes
#line 200 "doh.c"
#import "pp-record.h" no_namespace, auto_rename // expected-error {{#import of type library is an unsupported Microsoft feature}}
// This will also fire the "#import of type library is an unsupported Microsoft feature"
// error, but we can't use -verify because there's no way to put the comment on the proper line
#line 300 "doh.c"
#import "pp-record.h" no_namespace \
auto_rename \
auto_search
|
// RUN: %clang_cc1 -E -verify -fms-compatibility %s
#import "pp-record.h" // expected-error {{#import of type library is an unsupported Microsoft feature}}
// Test attributes
#import "pp-record.h" no_namespace, auto_rename // expected-error {{#import of type library is an unsupported Microsoft feature}}
#import "pp-record.h" no_namespace \
auto_rename \
auto_search
// expected-error@-3 {{#import of type library is an unsupported Microsoft feature}}
|
Migrate a test to -verify
|
Migrate a test to -verify
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@173716 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
49248d85df3037126b8282cae0610f9c499da548
|
tests/compiler/cxx_runtime.h
|
tests/compiler/cxx_runtime.h
|
//
// Copyright 2013 Jeff Bush
//
// 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.
//
//
// Symbols that need to be defined to use C++. These are stubs and don't
// actually do anything
//
namespace __cxxabiv1
{
class __class_type_info
{
public:
__class_type_info() {}
virtual ~__class_type_info() {}
};
class __si_class_type_info
{
public:
__si_class_type_info() {}
virtual ~__si_class_type_info() {}
};
__class_type_info cti;
__si_class_type_info sicti;
}
void operator delete(void *ptr) throw()
{
}
extern "C" void __dso_handle()
{
}
extern "C" void __cxa_atexit()
{
}
|
//
// Copyright 2013 Jeff Bush
//
// 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.
//
//
// Symbols that need to be defined to use C++. These are stubs and don't
// actually do anything
//
namespace __cxxabiv1
{
class __class_type_info
{
public:
__class_type_info() {}
virtual ~__class_type_info() {}
};
class __si_class_type_info
{
public:
__si_class_type_info() {}
virtual ~__si_class_type_info() {}
};
__class_type_info cti;
__si_class_type_info sicti;
}
void operator delete(void *ptr) throw()
{
}
void *__dso_handle;
extern "C" void __cxa_atexit(void (*f)(void *), void *objptr, void *dso)
{
}
|
Make these a bit more correct
|
Make these a bit more correct
|
C
|
apache-2.0
|
FulcronZ/NyuziProcessor,jbush001/NyuziProcessor,FulcronZ/NyuziProcessor,FulcronZ/NyuziProcessor,FulcronZ/NyuziProcessor,jbush001/NyuziProcessor,hoangt/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,hoangt/NyuziProcessor,hoangt/NyuziProcessor,hoangt/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor
|
7fe3a44fbf3767cc27c2c91dd0f328839be714a6
|
src/commands.h
|
src/commands.h
|
#ifndef LACO_COMMANDS_H
#define LACO_COMMANDS_H
struct LacoState;
/**
* Gets passed ever line to see if it matches one of the REPL command. If it
* does, that command will be executed.
*/
void laco_handle_command(struct LacoState* laco, char* line);
#endif /* LACO_COMMANDS_H */
|
#ifndef LACO_COMMANDS_H
#define LACO_COMMANDS_H
struct LacoState;
typedef void (*LacoHandler)(struct LacoState* laco, const char** arguments);
struct LacoCommand {
const char** matches;
LacoHandler handler;
};
/**
* Gets passed ever line to see if it matches one of the REPL command. If it
* does, that command will be executed.
*/
void laco_handle_command(struct LacoState* laco, char* line);
#endif /* LACO_COMMANDS_H */
|
Define data types for structured command handling
|
Define data types for structured command handling
|
C
|
bsd-2-clause
|
sourrust/laco
|
97ccfa599c0479a4ea9b4df9291c564d5afd80e3
|
test/Analysis/inline2.c
|
test/Analysis/inline2.c
|
// RUN: %clang_cc1 -analyze -inline-call -analyzer-store region -analyze-function f2 -verify %s
// Test parameter 'a' is registered to LiveVariables analysis data although it
// is not referenced in the function body.
int f1(int a) {
return 1;
}
void f2() {
int x;
x = f1(1);
}
|
// RUN: %clang_cc1 -analyze -inline-call -analyzer-store region -analyze-function f2 -verify %s
// Test parameter 'a' is registered to LiveVariables analysis data although it
// is not referenced in the function body.
// Before processing 'return 1;', in RemoveDeadBindings(), we query the liveness
// of 'a', because we have a binding for it due to parameter passing.
int f1(int a) {
return 1;
}
void f2() {
int x;
x = f1(1);
}
|
Add comments to test case.
|
Add comments to test case.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@97619 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
|
aee95684b289b3a34702454fbd1fa1bbd4e48d38
|
src/gfx/gl/texture.h
|
src/gfx/gl/texture.h
|
/*
* Copyright (C) 2015 Luke San Antonio
* All rights reserved.
*/
#pragma once
#include "glad/glad.h"
#include "../texture.h"
namespace game { namespace gfx { namespace gl
{
struct GL_Texture : public Texture
{
void allocate_(Vec<int> const&, Image_Format) noexcept override;
inline void blit_data_(Volume<int> const& vol,
Color const* data) noexcept override
{
// Fuck it, it might work.
blit_data_(vol, Data_Type::Integer, data);
}
inline void blit_data_(Volume<int> const& vol,
float const* data) noexcept override
{
blit_data_(vol, Data_Type::Float, data);
}
void blit_data_(Volume<int> const&, Data_Type,
void const*) noexcept override;
GLuint tex_id;
GLenum texture_type;
Image_Format format_;
void bind(unsigned int loc) const noexcept;
};
} } }
|
/*
* Copyright (C) 2015 Luke San Antonio
* All rights reserved.
*/
#pragma once
#include "glad/glad.h"
#include "../texture.h"
namespace game { namespace gfx { namespace gl
{
struct GL_Texture : public Texture
{
void allocate_(Vec<int> const&, Image_Format) noexcept override;
inline void blit_data_(Volume<int> const& vol,
Color const* data) noexcept override
{
// Fuck it, it might work.
static_assert(sizeof(Color) == sizeof(Color::c_t) * 4,
"Color struct must not have any padding.");
blit_data_(vol, Data_Type::Integer, data);
}
inline void blit_data_(Volume<int> const& vol,
float const* data) noexcept override
{
blit_data_(vol, Data_Type::Float, data);
}
void blit_data_(Volume<int> const&, Data_Type,
void const*) noexcept override;
GLuint tex_id;
GLenum texture_type;
Image_Format format_;
void bind(unsigned int loc) const noexcept;
};
} } }
|
Verify array of colors is contigous
|
Verify array of colors is contigous
|
C
|
bsd-3-clause
|
RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine
|
909d0e643ab120ef34344d4b589408ac50d23570
|
src/io/disk.h
|
src/io/disk.h
|
#ifndef DISK_H
#define DISK_H
#include "../process/process.h"
#ifdef __i386__
#define IOPRIO_GET 290
#elif __x86_64__
#define IOPRIO_GET 252
#endif
#define IOPRIO_WHO_PROCESS 1
#define IOPRIO_CLASS_SHIFT (13)
#define IOPRIO_PRIO_MASK ((1UL << IOPRIO_CLASS_SHIFT) - 1)
#define PRIOLEN 8
char *filesystem_type(void);
int ioprio_get(int pid);
char *ioprio_class(int pid);
char *ioprio_class_nice(int pid);
void proc_io(proc_t *procs);
#endif
|
#ifndef DISK_H
#define DISK_H
#include <stdint.h>
#include "../process/process.h"
#ifdef __i386__
#define IOPRIO_GET 290
#elif __x86_64__
#define IOPRIO_GET 252
#endif
#define IOPRIO_WHO_PROCESS 1
#define IOPRIO_CLASS_SHIFT (13)
#define IOPRIO_PRIO_MASK ((1UL << IOPRIO_CLASS_SHIFT) - 1)
#define PRIOLEN 8
char *filesystem_type(void);
int ioprio_get(int pid);
char *ioprio_class(int pid);
char *ioprio_class_nice(int pid);
uint64_t get_process_taskstat_io(int pid, char field);
#endif
|
Adjust declaration for taskstats io call
|
Adjust declaration for taskstats io call
|
C
|
mit
|
tijko/dashboard
|
105129546008a77655b14ed4987baee1401d5058
|
fortune_points/geom/point.h
|
fortune_points/geom/point.h
|
#pragma once
struct Point{
double x,y;
Point();
/*
first double input param: x coordinate.
second double input param: y coordinate.
*/
Point(double,double);
bool operator<(Point)const;
bool operator==(Point)const;
};
double dist(Point a,Point b);
|
#pragma once
class Point{
public:
double x,y;
Point();
/*
first double input param: x coordinate.
second double input param: y coordinate.
*/
Point(double,double);
bool operator<(Point)const;
bool operator==(Point)const;
};
|
Remove deprecated function and use class to define a Point
|
Remove deprecated function and use class to define a Point
|
C
|
mit
|
matheusdallrosa/voronoi-diagram-construction,matheusdallrosa/voronoi-diagram-construction
|
59d679f48e3c528ed883b8d0142b2e5086b2d45c
|
hab/proxr/cb-set-resource.c
|
hab/proxr/cb-set-resource.c
|
#include <string.h>
#include "proxrcmds.h"
#include "sim-hab.h"
void cb_set_resource(bionet_resource_t *resource, bionet_value_t *value)
{
double data;
double content;
int id;
bionet_node_t *node;
bionet_value_get_float(value, &data);
if(data < 0 || data > 255)
return;
node = bionet_resource_get_node(resource);
// get index of resource
//FIXME: probably a better way to do this
for(int i=0; i<16; i++)
{
char buf[5];
char name[24];
strcpy(name, "Potentiometer\0");
sprintf(buf,"%d", i);
int len = strlen(buf);
buf[len] = '\0';
strcat(name, buf);
if(bionet_resource_matches_id(resource, name))
{
id = i;
// command proxr to adjust to new value
set_potentiometer(id, (int)data);
// set resources datapoint to new value
content = data*POT_CONVERSION;
bionet_resource_set_double(resource, content, NULL);
hab_report_datapoints(node);
return;
}
}
}
|
#include <string.h>
#include "proxrcmds.h"
#include "sim-hab.h"
void cb_set_resource(bionet_resource_t *resource, bionet_value_t *value)
{
double data;
double content;
int id;
bionet_node_t *node;
bionet_value_get_double(value, &data);
if(data < 0 || data > 255)
return;
node = bionet_resource_get_node(resource);
// get index of resource
//FIXME: probably a better way to do this
for(int i=0; i<16; i++)
{
char buf[5];
char name[24];
strcpy(name, "Potentiometer\0");
sprintf(buf,"%d", i);
int len = strlen(buf);
buf[len] = '\0';
strcat(name, buf);
if(bionet_resource_matches_id(resource, name))
{
id = i;
// command proxr to adjust to new value
set_potentiometer(id, (int)data);
// set resources datapoint to new value
content = data*POT_CONVERSION;
bionet_resource_set_double(resource, content, NULL);
hab_report_datapoints(node);
return;
}
}
}
|
Change another float to double.
|
Change another float to double.
|
C
|
lgpl-2.1
|
ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead
|
d8aba3bf19073a4a95a31525d049f3675f0b54ff
|
lib/fnv_1a.c
|
lib/fnv_1a.c
|
#include <assert.h>
#include "fnv_1a.h"
uint128_t fnv_1a(const void * restrict const buf,
const size_t len,
const size_t skip_pos,
const size_t skip_len)
{
assert((skip_pos <= len) && (skip_pos + skip_len <= len));
static const uint128_t prime =
(((uint128_t)0x0000000001000000) << 64) | 0x000000000000013B;
uint128_t hash =
(((uint128_t)0x6C62272E07BB0142) << 64) | 0x62B821756295C58D;
// two consecutive loops should be faster than one loop with an "if"
const uint8_t * restrict const bytes = buf;
for (size_t i = 0; i < skip_pos; i++) {
hash ^= bytes[i];
hash *= prime;
}
for (size_t i = skip_pos + skip_len; i < len; i++) {
hash ^= bytes[i];
hash *= prime;
}
return hash;
}
|
#include "fnv_1a.h"
#include "debug.h"
uint128_t fnv_1a(const void * restrict const buf,
const size_t len,
const size_t skip_pos,
const size_t skip_len)
{
assert((skip_pos <= len) && (skip_pos + skip_len <= len),
"len %zu, skip_pos %zu, skip_len %zu", len, skip_pos, skip_len);
static const uint128_t prime =
(((uint128_t)0x0000000001000000) << 64) | 0x000000000000013B;
uint128_t hash =
(((uint128_t)0x6C62272E07BB0142) << 64) | 0x62B821756295C58D;
// two consecutive loops should be faster than one loop with an "if"
const uint8_t * restrict const bytes = buf;
for (size_t i = 0; i < skip_pos; i++) {
hash ^= bytes[i];
hash *= prime;
}
for (size_t i = skip_pos + skip_len; i < len; i++) {
hash ^= bytes[i];
hash *= prime;
}
return hash;
}
|
Use the new assert() macro
|
Use the new assert() macro
|
C
|
bsd-2-clause
|
NTAP/quant,NTAP/quant,NTAP/quant
|
19738ff61fecd49c45e9002bb79ea8c62d58bacb
|
Code/Support/Parsers/XML/RKXMLParserLibXML.h
|
Code/Support/Parsers/XML/RKXMLParserLibXML.h
|
//
// RKXMLParser.h
//
// Created by Jeremy Ellison on 2011-02-28.
// Copyright 2011 RestKit
//
// 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 <Foundation/Foundation.h>
#import "../../RKParser.h"
/**
This is a dead simple XML parser that uses libxml2 to parse an XML document
into a dictionary. It is designed specifically for use with RestKit. It
does not support any fanciness like Namespaces, DTDs, or other nonsense.
It does not save attributes on tags, it only cares about nested content and text.
*/
@interface RKXMLParserLibXML : NSObject <RKParser> {
}
- (NSDictionary*)parseXML:(NSString*)XML;
@end
|
//
// RKXMLParser.h
//
// Created by Jeremy Ellison on 2011-02-28.
// Copyright 2011 RestKit
//
// 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 <Foundation/Foundation.h>
#import "../../RKParser.h"
/**
This is a dead simple XML parser that uses libxml2 to parse an XML document
into a dictionary. It is designed specifically for use with RestKit. It
does not support any fanciness like Namespaces, DTDs, or other nonsense.
It handles text nodes, attributes, and nesting structures and builds key-value
coding compliant representations of the XML structure.
It currently does not support XML generation -- only parsing.
*/
@interface RKXMLParserLibXML : NSObject <RKParser> {
}
- (NSDictionary *)parseXML:(NSString *)XML;
@end
|
Update outdated comments in the XML parser header
|
Update outdated comments in the XML parser header
|
C
|
apache-2.0
|
qingsong-xu/RestKit,dx285/RestKit,fhchina/RestKit,0dayZh/RestKit,pbogdanv/RestKit,zilaiyedaren/RestKit,common2015/RestKit,timbodeit/RestKit,fhchina/RestKit,erichedstrom/RestKit,CodewareTechnology/RestKit,HYPERHYPER/RestKit2,concreteinteractive/RestKit,braindata/RestKit-1,TimeIncOSS/RestKit,naqi/RestKit,oligriffiths/RestKit,oye-lionel/GithubTest,TwinEngineLabs-Engineering/RestKit-TEL,wuxsoft/RestKit,djz-code/RestKit,sachin-khard/NucleusRestKit,LiuShulong/RestKit,TwinEngineLabs-Engineering/RestKit-TEL,StasanTelnov/RestKit,Gaantz/RestKit,TheFarm/RestKit,justinyaoqi/RestKit,damiannz/RestKit,cryptojuice/RestKit,braindata/RestKit-1,hejunbinlan/RestKit,cnbin/RestKit,Meihualu/RestKit,aleufms/RestKit,ChinaPicture/RestKit,jrtaal/RestKit,wireitcollege/RestKit,ppierson/RestKit,sandyway/RestKit,nphkh/RestKit,cfis/RestKit,QLGu/RestKit,margarina/RestKit-latest,TwinEngineLabs-Engineering/RestKit-TEL,adozenlines/RestKit,jrtaal/RestKit,antondarki/RestKit,mcfedr/RestKit,gumdal/RestKit,Papercloud/RestKit,zilaiyedaren/RestKit,ForrestAlfred/RestKit,money-alex2006hw/RestKit,nalindz/pulpfiction-RestKit,gank0326/restkit,wireitcollege/RestKit,antondarki/RestKit,youssman/RestKit,qingsong-xu/RestKit,HYPERHYPER/RestKit2,coderChrisLee/RestKit,nalindz/pulpfiction-RestKit,apontador/RestKit,jrtaal/RestKit,REXLabsInc/RestKit,ipmobiletech/RestKit,jonesgithub/RestKit,sandyway/RestKit,agworld/RestKit,SuPair/RestKit,wuxsoft/RestKit,moneytree/RestKit,timbodeit/RestKit,sachin-khard/NucleusRestKit,hanangellove/RestKit,braindata/RestKit,QLGu/RestKit,samanalysis/RestKit,gank0326/restkit,nphkh/RestKit,nett55/RestKit,lucasecf/RestKit,margarina/RestKit-latest,cryptojuice/RestKit,mumer92/RestKit,concreteinteractive/RestKit,SuPair/RestKit,moritzh/RestKit,moritzh/RestKit,oye-lionel/GithubTest,ChinaPicture/RestKit,money-alex2006hw/RestKit,hejunbinlan/RestKit,zhenlove/RestKit,PonderProducts/RestKit,percysnoodle/RestKit,naqi/RestKit,kevmeyer/RestKit,lmirosevic/RestKit,oye-lionel/GithubTest,SinnerSchraderMobileMirrors/RestKit,baumatron/RestKit,cfis/RestKit,Livestream/RestKit,hejunbinlan/RestKit,fedegasp/RestKit,sachin-khard/NucRestKit,moneytree/RestKit,gank0326/restkit,hanangellove/RestKit,ppierson/RestKit,hejunbinlan/RestKit,zaichang/RestKit,lmirosevic/RestKit,dx285/RestKit,Papercloud/RestKit,sandyway/RestKit,moneytree/RestKit,Livestream/RestKit,0x73/RestKit,oligriffiths/RestKit,Flutterbee/RestKit,sachin-khard/NucleusRestKit,timbodeit/RestKit,mberube09/RestKit,braindata/RestKit,zhenlove/RestKit,cryptojuice/RestKit,taptaptap/RestKit,zjh171/RestKit,jonesgithub/RestKit,paperlesspost/RestKit,pbogdanv/RestKit,REXLabsInc/RestKit,lucasecf/RestKit,lucasecf/RestKit,oligriffiths/RestKit,zjh171/RestKit,wireitcollege/RestKit,mavericksunny/RestKit,cryptojuice/RestKit,adozenlines/RestKit,Juraldinio/RestKit,aleufms/RestKit,ForrestAlfred/RestKit,LiuShulong/RestKit,coderChrisLee/RestKit,adozenlines/RestKit,LiuShulong/RestKit,cnbin/RestKit,CenterDevice/RestKit,vilinskiy-playdayteam/RestKit,REXLabsInc/RestKit,baumatron/RestKit,canaydogan/RestKit,loverbabyz/RestKit,DocuSignDev/RestKit,SuPair/RestKit,RyanCodes/RestKit,justinyaoqi/RestKit,ipmobiletech/RestKit,percysnoodle/RestKit,CodewareTechnology/RestKit,loverbabyz/RestKit,pat2man/RestKit,nett55/RestKit,SinnerSchraderMobileMirrors/RestKit,apontador/RestKit,lmirosevic/RestKit,gumdal/RestKit,braindata/RestKit-1,gauravstomar/RestKit,mikarun/RestKit,lmirosevic/RestKit,moritzh/RestKit,antondarki/RestKit,DejaMi/RestKit,Bogon/RestKit,apontador/RestKit,imton/RestKit,gumdal/RestKit,wireitcollege/RestKit,SuPair/RestKit,hanangellove/RestKit,ppierson/RestKit,loverbabyz/RestKit,money-alex2006hw/RestKit,CodewareTechnology/RestKit,canaydogan/RestKit,taptaptap/RestKit,cnbin/RestKit,DocuSignDev/RestKit,youssman/RestKit,Bogon/RestKit,Juraldinio/RestKit,lucasecf/RestKit,goldstar/RestKit,nalindz/pulpfiction-RestKit,thomaschristensen/RestKit,CenterDevice/RestKit,sachin-khard/NucRestKit,DejaMi/RestKit,0dayZh/RestKit,canaydogan/RestKit,caamorales/RestKit,caamorales/RestKit,CenterDevice/RestKit,apontador/RestKit,common2015/RestKit,gauravstomar/RestKit,qingsong-xu/RestKit,vilinskiy-playdayteam/RestKit,Bogon/RestKit,Juraldinio/RestKit,ForrestAlfred/RestKit,adozenlines/RestKit,thomaschristensen/RestKit,zilaiyedaren/RestKit,kevmeyer/RestKit,imton/RestKit,nalindz/pulpfiction-RestKit,0x73/RestKit,0dayZh/RestKit,mikarun/RestKit,gauravstomar/RestKit,agworld/RestKit,dx285/RestKit,samanalysis/RestKit,mikarun/RestKit,qingsong-xu/RestKit,SinnerSchraderMobileMirrors/RestKit,taptaptap/RestKit,wuxsoft/RestKit,pbogdanv/RestKit,fedegasp/RestKit,oye-lionel/GithubTest,pat2man/RestKit,Flutterbee/RestKit,common2015/RestKit,djz-code/RestKit,djz-code/RestKit,Meihualu/RestKit,jonesgithub/RestKit,goldstar/RestKit,sachin-khard/NucRestKit,taptaptap/RestKit,concreteinteractive/RestKit,braindata/RestKit,QLGu/RestKit,damiannz/RestKit,wangjiangwen/RestKit,nett55/RestKit,ipmobiletech/RestKit,samkrishna/RestKit,fedegasp/RestKit,djz-code/RestKit,canaydogan/RestKit,Gaantz/RestKit,forcedotcom/RestKit,LiuShulong/RestKit,money-alex2006hw/RestKit,Juraldinio/RestKit,justinyaoqi/RestKit,cnbin/RestKit,hejunbinlan/RestKit,TwinEngineLabs-Engineering/RestKit-TEL,wuxsoft/RestKit,Juraldinio/RestKit,HarrisLee/RestKit,QLGu/RestKit,ChinaPicture/RestKit,adozenlines/RestKit,coderChrisLee/RestKit,Meihualu/RestKit,coderChrisLee/RestKit,nphkh/RestKit,jrtaal/RestKit,cryptojuice/RestKit,mberube09/RestKit,money-alex2006hw/RestKit,HYPERHYPER/RestKit2,wyzzarz/RestKit,RyanCodes/RestKit,0x73/RestKit,TheFarm/RestKit,orta/RestKit,HYPERHYPER/RestKit2,braindata/RestKit-1,fhchina/RestKit,oligriffiths/RestKit,zhenlove/RestKit,RestKit/RestKit,aleufms/RestKit,mberube09/RestKit,ipmobiletech/RestKit,jonesgithub/RestKit,dx285/RestKit,percysnoodle/RestKit,dx285/RestKit,Gaantz/RestKit,apontador/RestKit,margarina/RestKit-latest,vilinskiy-playdayteam/RestKit,TimeIncOSS/RestKit,wyzzarz/RestKit,Flutterbee/RestKit,imton/RestKit,sachin-khard/NucleusRestKit,Gaantz/RestKit,RyanCodes/RestKit,LiuShulong/RestKit,CodewareTechnology/RestKit,hanangellove/RestKit,fhchina/RestKit,DocuSignDev/RestKit,zjh171/RestKit,wangjiangwen/RestKit,PonderProducts/RestKit,damiannz/RestKit,lmirosevic/RestKit,mikarun/RestKit,aleufms/RestKit,lucasecf/RestKit,moritzh/RestKit,baumatron/RestKit,orta/RestKit,Livestream/RestKit,paperlesspost/RestKit,youssman/RestKit,thomaschristensen/RestKit,mavericksunny/RestKit,zjh171/RestKit,gauravstomar/RestKit,TheFarm/RestKit,moneytree/RestKit,0x73/RestKit,kevmeyer/RestKit,caamorales/RestKit,HarrisLee/RestKit,imton/RestKit,PonderProducts/RestKit,forcedotcom/RestKit,samkrishna/RestKit,sachin-khard/NucleusRestKit,caamorales/RestKit,qingsong-xu/RestKit,mcfedr/RestKit,baumatron/RestKit,DejaMi/RestKit,HarrisLee/RestKit,wireitcollege/RestKit,timbodeit/RestKit,baumatron/RestKit,ChinaPicture/RestKit,loverbabyz/RestKit,antondarki/RestKit,zjh171/RestKit,jrtaal/RestKit,mavericksunny/RestKit,wuxsoft/RestKit,kevmeyer/RestKit,Meihualu/RestKit,nphkh/RestKit,gank0326/restkit,braindata/RestKit,cnbin/RestKit,forcedotcom/RestKit,loverbabyz/RestKit,sachin-khard/NucRestKit,RestKit/RestKit,pbogdanv/RestKit,moritzh/RestKit,zilaiyedaren/RestKit,TimeIncOSS/RestKit,0x73/RestKit,agworld/RestKit,CenterDevice/RestKit,samanalysis/RestKit,gank0326/restkit,damiannz/RestKit,antondarki/RestKit,coderChrisLee/RestKit,Flutterbee/RestKit,kevmeyer/RestKit,goldstar/RestKit,sandyway/RestKit,Bogon/RestKit,naqi/RestKit,paperlesspost/RestKit,PonderProducts/RestKit,margarina/RestKit-latest,HarrisLee/RestKit,oye-lionel/GithubTest,common2015/RestKit,thomaschristensen/RestKit,zilaiyedaren/RestKit,fhchina/RestKit,wangjiangwen/RestKit,zaichang/RestKit,canaydogan/RestKit,pat2man/RestKit,CodewareTechnology/RestKit,SuPair/RestKit,HYPERHYPER/RestKit2,aleufms/RestKit,mikarun/RestKit,ppierson/RestKit,StasanTelnov/RestKit,pat2man/RestKit,zhenlove/RestKit,wangjiangwen/RestKit,ipmobiletech/RestKit,ForrestAlfred/RestKit,nett55/RestKit,DejaMi/RestKit,paperlesspost/RestKit,wyzzarz/RestKit,sachin-khard/NucRestKit,pat2man/RestKit,TwinEngineLabs-Engineering/RestKit-TEL,wangjiangwen/RestKit,Meihualu/RestKit,fedegasp/RestKit,Gaantz/RestKit,HarrisLee/RestKit,mumer92/RestKit,vilinskiy-playdayteam/RestKit,mumer92/RestKit,ForrestAlfred/RestKit,nphkh/RestKit,jonesgithub/RestKit,erichedstrom/RestKit,mumer92/RestKit,justinyaoqi/RestKit,0dayZh/RestKit,Papercloud/RestKit,concreteinteractive/RestKit,justinyaoqi/RestKit,percysnoodle/RestKit,naqi/RestKit,common2015/RestKit,braindata/RestKit-1,nett55/RestKit,QLGu/RestKit,Livestream/RestKit,erichedstrom/RestKit,RestKit/RestKit,youssman/RestKit,forcedotcom/RestKit,gauravstomar/RestKit,timbodeit/RestKit,fedegasp/RestKit,imton/RestKit,zhenlove/RestKit,Bogon/RestKit,hanangellove/RestKit,Papercloud/RestKit,DejaMi/RestKit,Papercloud/RestKit,mumer92/RestKit,pbogdanv/RestKit,agworld/RestKit,ChinaPicture/RestKit,samanalysis/RestKit,concreteinteractive/RestKit,RyanCodes/RestKit,samkrishna/RestKit,wyzzarz/RestKit,StasanTelnov/RestKit,mavericksunny/RestKit,RyanCodes/RestKit,ppierson/RestKit,mberube09/RestKit,sandyway/RestKit,caamorales/RestKit,oligriffiths/RestKit,zaichang/RestKit,SinnerSchraderMobileMirrors/RestKit,zaichang/RestKit,damiannz/RestKit,goldstar/RestKit,cfis/RestKit,samanalysis/RestKit,moneytree/RestKit,REXLabsInc/RestKit,youssman/RestKit
|
1429550f5d9b6df0693b7cc10de4258982b6251d
|
include/core/SkMilestone.h
|
include/core/SkMilestone.h
|
/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 58
#endif
|
/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 59
#endif
|
Update Skia milestone to 59
|
Update Skia milestone to 59
BUG=skia:
Change-Id: Ifa8fa20a838b2899a1230bf51cea7c4cf28971d8
Reviewed-on: https://skia-review.googlesource.com/9139
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
|
C
|
bsd-3-clause
|
Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,rubenvb/skia,HalCanary/skia-hc,google/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,google/skia,aosp-mirror/platform_external_skia,rubenvb/skia,HalCanary/skia-hc,google/skia,Hikari-no-Tenshi/android_external_skia,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,rubenvb/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,rubenvb/skia,HalCanary/skia-hc,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,rubenvb/skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc
|
d7347c0f845d280f8fdb65d08fffeb2f79903be8
|
src/include/libbad_base.h
|
src/include/libbad_base.h
|
/**
* @file include/libbad_base.h
* @author Bryce Davis
* @date 19 November 2015
* @brief Header file for internal libbad declarations
* @copyright Copyright (c) 2015, Bryce Davis. Released under the MIT License.
* See LICENSE.txt for details.
*/
#ifndef _LIBBAD_BASE_H
#define _LIBBAD_BASE_H
/**
* @typedef A convenience typedef for long long ints.
*/
typedef long long int llint;
/**
* @typedef A convenience typedef for long doubles.
*/
typedef long double ldouble;
/**
* @union DATA
* @brief A data value for libbad data structures.
*
* A DATA can hold either a long long int, a long double, or a pointer. Takes
* up 16 bytes.
*/
typedef union libbad_data_t {
llint data_int;
ldouble data_dbl;
void* data_ptr;
} DATA;
#endif
|
/**
* @file include/libbad_base.h
* @author Bryce Davis
* @date 19 November 2015
* @brief Header file for internal libbad declarations
* @copyright Copyright (c) 2015, Bryce Davis. Released under the MIT License.
* See LICENSE.txt for details.
*/
#ifndef _LIBBAD_BASE_H
#define _LIBBAD_BASE_H
/**
* A convenience typedef for long long ints.
*/
typedef long long int llint;
/**
* A convenience typedef for long doubles.
*/
typedef long double ldouble;
/**
* @union libbad_data_t
* @brief A data value for libbad data structures.
*
* An instance of libbad_data_t can hold either a long long int, a long double,
* or a pointer. Takes up 16 bytes.
*/
union libbad_data_t {
llint data_int; /**< A long long integer value (8 bytes) */
ldouble data_dbl; /**< A long double value (16 bytes) */
void* data_ptr; /**< A pointer value (8 bytes) */
};
/**
* Use DATA instead of "union libbad_data_t"
*/
typedef union libbad_data_t DATA;
#endif
|
Restructure implementation and documentation of DATA/libbad_data_t
|
Restructure implementation and documentation of DATA/libbad_data_t
|
C
|
mit
|
mahimahi42/libbad
|
6f24862a543587f12ad33612ac4c8b29b61ab556
|
include/objects.h
|
include/objects.h
|
#include <vector>
#include <map>
#include <string>
using namespace std;
#ifndef OBJECTS_H
#define OBJECTS_H
union DataValue {
string val_s;
long int val_i;
float val_f;
double val_d;
};
typedef map<string, DataValue> DataMap;
typedef map<string, DataValue>::iterator DataIterator;
class DataInstance {
private:
int weight;
DataMap dataStore;
public:
DataInstance();
~DataInstance();
};
class DataObject {
private:
vector<DataInstance> instances;
public:
DataObject();
~DataObject();
};
#endif
|
#ifndef OBJECTS_H
#define OBJECTS_H
#include <vector>
#include <map>
#include <string>
using namespace std;
class IntDataValue : public DataValue
{
private:
public:
IntDataValue(int val): value(val);
void compareWith(DataValue &I) {
if(I.value < this->value) return -1;
else if(I.value == this->value) return 0;
return 1;
}
void updateTo(DataValue &I) {
this->value = I.value;
}
int value;
};
class DoubleDataValue : public DataValue
{
private:
public:
DoubleDataValue(double val): value(val);
void compareWith(DataValue &I) {
if(this->value < I.value) return -1;
else if(I.value == this->value) return 0;
return 1;
}
void updateTo(DataValue &I) {
this->value = I.value;
}
double value;
};
class DataValue {
public:
DataValue();
// CompareWith(I): return -1 if lesser, 0 if equal, 1 if greater
virtual void compareWith(DataValue &I) = 0;
// UpdateTo(I): updates value of current object to match I
virtual void updateTo(DataValue &I) = 0;
void updateIfLargerThan(DataValue &I) {
/*Implement : check for typeId matching*/
if(this->compareWith(I)==1)
this->updateTo(I);
}
~DataValue();
};
typedef map<string, DataValue> DataMap;
typedef map<string, DataValue>::iterator DataIterator;
class DataInstance {
private:
int weight;
DataMap dataStore;
public:
DataInstance();
DataInstance(DataInstance &instance);
~DataInstance();
};
class DataObject {
private:
vector<DataInstance> instances;
public:
DataObject();
~DataObject();
};
#endif
|
Make an abstract DataValue class, and implement Double and IntegerValues
|
Make an abstract DataValue class, and implement Double and IntegerValues
|
C
|
mit
|
Akshay809/kopSkylines,Akshay809/kopSkylines
|
5d4d638f39d42ef3b1288038f319fc50d254a903
|
user_modules.h
|
user_modules.h
|
// email=foo@bar.com
// branch=master
#ifndef __USER_MODULES_H__
#define __USER_MODULES_H__
#define LUA_USE_BUILTIN_STRING // for string.xxx()
#define LUA_USE_BUILTIN_TABLE // for table.xxx()
#define LUA_USE_BUILTIN_COROUTINE // for coroutine.xxx()
#define LUA_USE_BUILTIN_MATH // for math.xxx(), partially work
// #define LUA_USE_BUILTIN_IO // for io.xxx(), partially work
// #define LUA_USE_BUILTIN_OS // for os.xxx(), not work
// #define LUA_USE_BUILTIN_DEBUG // for debug.xxx(), not work
#define LUA_USE_MODULES
#ifdef LUA_USE_MODULES
#define LUA_USE_MODULES_NODE
#define LUA_USE_MODULES_FILE
#define LUA_USE_MODULES_GPIO
#define LUA_USE_MODULES_WIFI
#define LUA_USE_MODULES_NET
#define LUA_USE_MODULES_PWM
#define LUA_USE_MODULES_I2C
#define LUA_USE_MODULES_SPI
#define LUA_USE_MODULES_TMR
#define LUA_USE_MODULES_ADC
#define LUA_USE_MODULES_UART
#define LUA_USE_MODULES_OW
#define LUA_USE_MODULES_BIT
#define LUA_USE_MODULES_MQTT
#define LUA_USE_MODULES_COAP
#define LUA_USE_MODULES_U8G
#define LUA_USE_MODULES_WS2812
#define LUA_USE_MODULES_CJSON
#endif /* LUA_USE_MODULES */
#endif /* __USER_MODULES_H__ */
|
// email=foo@bar.com
// branch=master
#ifndef __USER_MODULES_H__
#define __USER_MODULES_H__
#define LUA_USE_BUILTIN_STRING // for string.xxx()
#define LUA_USE_BUILTIN_TABLE // for table.xxx()
#define LUA_USE_BUILTIN_COROUTINE // for coroutine.xxx()
#define LUA_USE_BUILTIN_MATH // for math.xxx(), partially work
// #define LUA_USE_BUILTIN_IO // for io.xxx(), partially work
// #define LUA_USE_BUILTIN_OS // for os.xxx(), not work
// #define LUA_USE_BUILTIN_DEBUG // for debug.xxx(), not work
#define LUA_USE_MODULES
#ifdef LUA_USE_MODULES
// user modules
#endif /* LUA_USE_MODULES */
#endif /* __USER_MODULES_H__ */
|
Replace all user modules with token
|
Replace all user modules with token
|
C
|
mit
|
marcelstoer/nodemcu-custom-build
|
cf3299b4a7621128279ec8a6ab928e95fd5848b3
|
ldso/ldso/sh/dl-syscalls.h
|
ldso/ldso/sh/dl-syscalls.h
|
/* We can't use the real errno in ldso, since it has not yet
* been dynamicly linked in yet. */
#include "sys/syscall.h"
extern int _dl_errno;
#undef __set_errno
#define __set_errno(X) {(_dl_errno) = (X);}
|
/* We can't use the real errno in ldso, since it has not yet
* been dynamicly linked in yet. */
#include "sys/syscall.h"
extern int _dl_errno;
#undef __set_errno
#define __set_errno(X) {(_dl_errno) = (X);}
#warning !!! __always_inline redefined waiting for the fixed gcc
#ifdef __always_inline
#undef __always_inline
#define __always_inline inline
#endif
|
Make sh4 build works again adding a temporary work-around iby redefining __always_inline to inline until gcc 4.x.x will get fixed.
|
Make sh4 build works again adding a temporary work-around
iby redefining __always_inline to inline until gcc 4.x.x will get
fixed.
Signed-off-by: Carmelo Amoroso <532378793705a04edd56deb76ad8c0442834d55d@st.com>
|
C
|
lgpl-2.1
|
hjl-tools/uClibc,kraj/uClibc,waweber/uclibc-clang,foss-xtensa/uClibc,atgreen/uClibc-moxie,OpenInkpot-archive/iplinux-uclibc,gittup/uClibc,kraj/uClibc,m-labs/uclibc-lm32,mephi42/uClibc,groundwater/uClibc,atgreen/uClibc-moxie,OpenInkpot-archive/iplinux-uclibc,ysat0/uClibc,brgl/uclibc-ng,ysat0/uClibc,ndmsystems/uClibc,groundwater/uClibc,mephi42/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,groundwater/uClibc,foss-xtensa/uClibc,hwoarang/uClibc,majek/uclibc-vx32,hjl-tools/uClibc,atgreen/uClibc-moxie,hjl-tools/uClibc,groundwater/uClibc,OpenInkpot-archive/iplinux-uclibc,brgl/uclibc-ng,m-labs/uclibc-lm32,kraj/uClibc,skristiansson/uClibc-or1k,mephi42/uClibc,brgl/uclibc-ng,kraj/uclibc-ng,m-labs/uclibc-lm32,atgreen/uClibc-moxie,wbx-github/uclibc-ng,majek/uclibc-vx32,majek/uclibc-vx32,ddcc/klee-uclibc-0.9.33.2,skristiansson/uClibc-or1k,foss-for-synopsys-dwc-arc-processors/uClibc,brgl/uclibc-ng,OpenInkpot-archive/iplinux-uclibc,ddcc/klee-uclibc-0.9.33.2,ddcc/klee-uclibc-0.9.33.2,foss-for-synopsys-dwc-arc-processors/uClibc,waweber/uclibc-clang,skristiansson/uClibc-or1k,kraj/uclibc-ng,groundwater/uClibc,kraj/uClibc,skristiansson/uClibc-or1k,kraj/uclibc-ng,waweber/uclibc-clang,kraj/uclibc-ng,mephi42/uClibc,hwoarang/uClibc,foss-xtensa/uClibc,hjl-tools/uClibc,gittup/uClibc,ffainelli/uClibc,ffainelli/uClibc,czankel/xtensa-uclibc,ndmsystems/uClibc,ddcc/klee-uclibc-0.9.33.2,hjl-tools/uClibc,ysat0/uClibc,czankel/xtensa-uclibc,m-labs/uclibc-lm32,foss-xtensa/uClibc,ffainelli/uClibc,czankel/xtensa-uclibc,wbx-github/uclibc-ng,gittup/uClibc,ysat0/uClibc,wbx-github/uclibc-ng,ndmsystems/uClibc,hwoarang/uClibc,czankel/xtensa-uclibc,ffainelli/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,ffainelli/uClibc,hwoarang/uClibc,ndmsystems/uClibc,waweber/uclibc-clang,wbx-github/uclibc-ng,gittup/uClibc,majek/uclibc-vx32
|
3a80b2f52f5d1e9466b378124d6ebb638734270e
|
source/x86/source_moss/kernel/interrupt/misc.h
|
source/x86/source_moss/kernel/interrupt/misc.h
|
#pragma once
#include "../../includes.h"
namespace MOSS { namespace Interrupts {
void disable_hw_int(void) {
__asm__ __volatile__("cli");
}
void enable_hw_int(void) {
__asm__ __volatile__("sti");
}
/*void fire(int n) {
//Adapted from http://www.brokenthorn.com/Resources/OSDev15.html
//Self-modifying code!
asm(
" movb al, [%0]"
" movb [genint+1], al"
" jmp genint"
"genint:"
" int 0"
: //out
:"n"(n) //in
:"%al" //clobbered
);
}*/
void fire_int13h(void) {
__asm__ __volatile__("int $0x13");
}
}}
|
#pragma once
#include "../../includes.h"
namespace MOSS { namespace Interrupts {
inline void disable_hw_int(void) {
__asm__ __volatile__("cli");
}
inline void enable_hw_int(void) {
__asm__ __volatile__("sti");
}
/*inline void fire(int n) {
//Adapted from http://www.brokenthorn.com/Resources/OSDev15.html
//Self-modifying code!
asm(
" movb al, [%0]"
" movb [genint+1], al"
" jmp genint"
"genint:"
" int 0"
: //out
:"n"(n) //in
:"%al" //clobbered
);
}*/
inline void fire_int13h(void) {
__asm__ __volatile__("int $0x13");
}
}}
|
Make a few things `inline`.
|
Make a few things `inline`.
|
C
|
mit
|
imallett/MOSS,imallett/MOSS,imallett/MOSS,imallett/MOSS
|
2b42cc5ae4eba734498484d54e898a9925bea45e
|
src/zt_path.h
|
src/zt_path.h
|
/*!
* Filename: zt_path.h
* Description: path utils
*
* Author: Jason L. Shiffer <jshiffer@zerotao.org>
* Copyright:
* Copyright (C) 2010-2011, Jason L. Shiffer.
* See file COPYING for details
*/
#ifndef _ZT_PATH_
#define _ZT_PATH_
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif /* HAVE_SYS_STAT_H */
#include <zt.h>
BEGIN_C_DECLS
typedef enum {
zt_mkdir_create_parent = 1,
}zt_mkdir_flags;
int zt_mkdir(char * path, mode_t mode, zt_mkdir_flags flags);
END_C_DECLS
#endif /* _ZT_PATH_ */
|
/*!
* Filename: zt_path.h
* Description: path utils
*
* Author: Jason L. Shiffer <jshiffer@zerotao.org>
* Copyright:
* Copyright (C) 2010-2011, Jason L. Shiffer.
* See file COPYING for details
*/
#ifndef _ZT_PATH_
#define _ZT_PATH_
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
# else
typedef unsigned int mode_t;
#endif /* HAVE_SYS_STAT_H */
#include <zt.h>
BEGIN_C_DECLS
typedef enum {
zt_mkdir_create_parent = 1,
}zt_mkdir_flags;
int zt_mkdir(char * path, mode_t mode, zt_mkdir_flags flags);
END_C_DECLS
#endif /* _ZT_PATH_ */
|
Add mode_t typedef when missing
|
Add mode_t typedef when missing
|
C
|
mit
|
zerotao/libzt,zerotao/libzt,zerotao/libzt,zerotao/libzt
|
5d23eae107c60bd48fb495950ea6da7d2176e4c0
|
src/version.c
|
src/version.c
|
#include "system.h"
#include "sccs.h"
#include "logging.h"
extern int test_release;
extern unsigned build_timet;
int
version_main(int ac, char **av)
{
char buf[100];
float exp;
if (ac == 2 && streq("--help", av[1])) {
system("bk help version");
return (0);
}
if (sccs_cd2root(0, 0) == -1) {
getMsg("version", " ", 0, 0, stdout);
return (0);
}
getMsg("version", bk_model(buf, sizeof(buf)), 0, 0, stdout);
if (test_release) {
exp = ((time_t)build_timet - time(0)) / (24*3600.0) + 14;
if (exp > 0) {
printf("Expires in: %.1f days (test release).\n", exp);
} else {
printf("Expired (test release).\n");
}
}
return (0);
}
|
#include "system.h"
#include "sccs.h"
#include "logging.h"
extern int test_release;
extern unsigned build_timet;
int
version_main(int ac, char **av)
{
char buf[100];
float exp;
if (ac == 2 && streq("--help", av[1])) {
system("bk help version");
return (0);
}
lease_check(0); /* disable lease check */
if (sccs_cd2root(0, 0) == -1) {
getMsg("version", " ", 0, 0, stdout);
return (0);
}
getMsg("version", bk_model(buf, sizeof(buf)), 0, 0, stdout);
if (test_release) {
exp = ((time_t)build_timet - time(0)) / (24*3600.0) + 14;
if (exp > 0) {
printf("Expires in: %.1f days (test release).\n", exp);
} else {
printf("Expired (test release).\n");
}
}
return (0);
}
|
Add some minor cleanups to the lease code.
|
Add some minor cleanups to the lease code.
bk: 3ea98875Om5jc1nUdXM9io0xhbkArA
|
C
|
apache-2.0
|
bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper
|
98c01545822d41366efc6d0af96dbdc6a4ec75e7
|
src/theft_call_internal.h
|
src/theft_call_internal.h
|
#ifndef THEFT_CALL_INTERNAL_H
#define THEFT_CALL_INTERNAL_H
#include "theft_call.h"
#include "theft_bloom.h"
#include <assert.h>
#include <unistd.h>
#include <sys/wait.h>
#include <poll.h>
#include <signal.h>
#include <errno.h>
static enum theft_trial_res
theft_call_inner(struct theft_run_info *run_info, void **args);
static enum theft_trial_res
parent_handle_child_call(struct theft_run_info *run_info,
pid_t pid, int fd);
#endif
|
#ifndef THEFT_CALL_INTERNAL_H
#define THEFT_CALL_INTERNAL_H
#include "theft_call.h"
#include "theft_bloom.h"
#include <assert.h>
#include <unistd.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <poll.h>
#include <signal.h>
#include <errno.h>
static enum theft_trial_res
theft_call_inner(struct theft_run_info *run_info, void **args);
static enum theft_trial_res
parent_handle_child_call(struct theft_run_info *run_info,
pid_t pid, int fd);
#endif
|
Add `sys/types.h` include for `pid_t`.
|
Add `sys/types.h` include for `pid_t`.
|
C
|
isc
|
silentbicycle/theft
|
c45ae4a7d8a7e637ef7e344139b727ab12e9cca7
|
nwg_common_socket_include.h
|
nwg_common_socket_include.h
|
#ifndef NWG_COMMON_SOCKET_INCLUDE_H_
#define NWG_COMMON_SOCKET_INCLUDE_H_
#ifdef __unix__
#include <netinet/in.h>
#include <sys/socket.h>
#endif /* __unix__ */
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
typedef int socklen_t;
#undef FD_SETSIZE
#define FD_SETSIZE 2048
#endif /* _WIN32 */
#include <fcntl.h>
#include <unistd.h>
#endif /* NWG_COMMON_SOCKET_INCLUDE_H_ */
|
#ifndef NWG_COMMON_SOCKET_INCLUDE_H_
#define NWG_COMMON_SOCKET_INCLUDE_H_
#if !defined(__unix__) && (defined(__APPLE__) && defined(__MACH__))
#define __unix__ 1
#endif
#ifdef __unix__
#include <netinet/in.h>
#include <sys/socket.h>
#endif /* __unix__ */
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
typedef int socklen_t;
#undef FD_SETSIZE
#define FD_SETSIZE 2048
#endif /* _WIN32 */
#include <fcntl.h>
#include <unistd.h>
#endif /* NWG_COMMON_SOCKET_INCLUDE_H_ */
|
Add macro to identify apple mac os x as unix
|
Add macro to identify apple mac os x as unix
|
C
|
mit
|
ynov/nwg,ynov/nwg
|
fa33394bb70481412493fcf40d53ebdb2e738058
|
test/CodeGen/ffp-contract-option.c
|
test/CodeGen/ffp-contract-option.c
|
// RUN: %clang_cc1 -O3 -ffp-contract=fast -triple=powerpc-apple-darwin10 -S -o - %s | FileCheck %s
// REQUIRES: powerpc-registered-target
float fma_test1(float a, float b, float c) {
// CHECK: fmadds
float x = a * b;
float y = x + c;
return y;
}
|
// RUN: %clang_cc1 -O3 -ffp-contract=fast -triple=aarch64-apple-darwin -S -o - %s | FileCheck %s
// REQUIRES: aarch64-registered-target
float fma_test1(float a, float b, float c) {
// CHECK: fmadd
float x = a * b;
float y = x + c;
return y;
}
|
Change -ffp-contract=fast test to run on Aarch64
|
Change -ffp-contract=fast test to run on Aarch64
(I don't have powerpc enabled in my build and I am changing
how -ffp-contract=fast works.)
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@298468 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
|
3949c3ba8cec129241ce6c47534f417d619c34e3
|
ios/OAuthManager/OAuthManager.h
|
ios/OAuthManager/OAuthManager.h
|
//
// OAuthManager.h
//
// Created by Ari Lerner on 5/31/16.
// Copyright © 2016 Facebook. All rights reserved.
//
#import <Foundation/Foundation.h>
#if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#else
#import "RCTBridgeModule.h"
#endif
#if __has_include("RCTLinkingManager.h")
#import "RCTLinkingManager.h"
#else
#import <React/RCTLinkingManager.h>
#endif
@class OAuthClient;
static NSString *kAuthConfig = @"OAuthManager";
@interface OAuthManager : NSObject <RCTBridgeModule, UIWebViewDelegate>
+ (instancetype) sharedManager;
+ (BOOL)setupOAuthHandler:(UIApplication *)application;
+ (BOOL)handleOpenUrl:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
- (BOOL) _configureProvider:(NSString *) name andConfig:(NSDictionary *) config;
- (NSDictionary *) getConfigForProvider:(NSString *)name;
@property (nonatomic, strong) NSDictionary *providerConfig;
@property (nonatomic, strong) NSArray *callbackUrls;
@end
|
//
// OAuthManager.h
//
// Created by Ari Lerner on 5/31/16.
// Copyright © 2016 Facebook. All rights reserved.
//
#import <Foundation/Foundation.h>
#if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#else
#import "RCTBridgeModule.h"
#endif
#if __has_include(<React/RCTLinkingManager.h>)
#import <React/RCTLinkingManager.h>
#else
#import "RCTLinkingManager.h"
#endif
@class OAuthClient;
static NSString *kAuthConfig = @"OAuthManager";
@interface OAuthManager : NSObject <RCTBridgeModule, UIWebViewDelegate>
+ (instancetype) sharedManager;
+ (BOOL)setupOAuthHandler:(UIApplication *)application;
+ (BOOL)handleOpenUrl:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
- (BOOL) _configureProvider:(NSString *) name andConfig:(NSDictionary *) config;
- (NSDictionary *) getConfigForProvider:(NSString *)name;
@property (nonatomic, strong) NSDictionary *providerConfig;
@property (nonatomic, strong) NSArray *callbackUrls;
@end
|
Fix duplicate React library import error conflict w/certain pods
|
Fix duplicate React library import error conflict w/certain pods
|
C
|
mit
|
fullstackreact/react-native-oauth,fullstackreact/react-native-oauth,fullstackreact/react-native-oauth
|
9feb800985250c12ed35c3934cde0ef00dc3867e
|
drivers/tty/serial/uart/uart_driver.c
|
drivers/tty/serial/uart/uart_driver.c
|
#include <mikoto/char_driver.h>
#include <mikoto/uart.h>
static int uart_write(const char *s);
static struct char_driver_operations uart_ops = {
.write = uart_write,
};
static struct char_driver uart_driver = {
.name = "UART",
};
void uart_init(void)
{
struct char_driver *uart = get_uart_driver_instance();
uart->ops = &uart_ops;
}
struct char_driver *
get_uart_driver_instance(void)
{
if (!uart_driver.ops)
uart_init();
return &uart_driver;
}
static int
uart_write(const char *s)
{
while (*s) {
while (*(UART0 + UARTFR) & UARTFR_TXFF)
;
*UART0 = *s;
s++;
}
return 0;
}
|
#include <mikoto/char_driver.h>
#include <mikoto/uart.h>
static int uart_write(const char *s);
static struct char_driver_operations uart_ops = {
.write = uart_write,
};
static struct char_driver uart_driver = {
.name = "UART",
};
static void
uart_init(void)
{
uart_driver.ops = &uart_ops;
}
struct char_driver *
get_uart_driver_instance(void)
{
if (!uart_driver.ops)
uart_init();
return &uart_driver;
}
static int
uart_write(const char *s)
{
while (*s) {
while (*(UART0 + UARTFR) & UARTFR_TXFF)
;
*UART0 = *s;
s++;
}
return 0;
}
|
Fix circular reference but in uart_init()
|
Fix circular reference but in uart_init()
Don't call get_uart_driver_instance() from uart_init().
|
C
|
bsd-3-clause
|
masami256/mini-arm-kernel
|
6d1b716753c1cc8a2f5c26338020941aa58ce9d7
|
unknown.c
|
unknown.c
|
#ifdef NO_PORT
#include "mono/interpreter/interp.h"
MonoPIFunc
mono_create_trampoline (MonoMethod *method)
{
g_error ("Unsupported arch");
return NULL;
}
void *
mono_create_method_pointer (MonoMethod *method)
{
g_error ("Unsupported arch");
return NULL;
}
#endif
|
#ifdef NO_PORT
#include "mono/interpreter/interp.h"
MonoPIFunc
mono_create_trampoline (MonoMethodSignature *sig, gboolean string_ctor)
{
g_error ("Unsupported arch");
return NULL;
}
void *
mono_create_method_pointer (MonoMethod *method)
{
g_error ("Unsupported arch");
return NULL;
}
#endif
|
Update to the API change of a while ago.
|
Update to the API change of a while ago.
svn path=/trunk/mono/; revision=10545
|
C
|
bsd-3-clause
|
biotrump/ffts-tec,linkotec/mono_arch,linkotec/mono_arch,biotrump/ffts-tec,linkotec/mono_arch,biotrump/ffts-tec,biotrump/ffts-tec
|
33db8cda15b9aa8004078577063c3ea50c80b102
|
ui/message_center/base_format_view.h
|
ui/message_center/base_format_view.h
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_
#define UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_
#include "ui/message_center/message_view.h"
#include "ui/message_center/notification_list.h"
namespace views {
class ImageView;
}
namespace message_center {
// A comprehensive message view.
class BaseFormatView : public MessageView {
public:
BaseFormatView(NotificationList::Delegate* list_delegate,
const NotificationList::Notification& notification);
virtual ~BaseFormatView();
// MessageView
virtual void SetUpView() OVERRIDE;
// views::ButtonListener
virtual void ButtonPressed(views::Button* sender, const ui::Event& event);
protected:
BaseFormatView();
DISALLOW_COPY_AND_ASSIGN(BaseFormatView);
};
} // namespace message_center
#endif // UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_
#define UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_
#include "ui/message_center/message_view.h"
#include "ui/message_center/notification_list.h"
namespace views {
class ImageView;
}
namespace message_center {
// A comprehensive message view.
class BaseFormatView : public MessageView {
public:
BaseFormatView(NotificationList::Delegate* list_delegate,
const NotificationList::Notification& notification);
virtual ~BaseFormatView();
// MessageView
virtual void SetUpView() OVERRIDE;
// views::ButtonListener
virtual void ButtonPressed(views::Button* sender,
const ui::Event& event) OVERRIDE;
protected:
BaseFormatView();
DISALLOW_COPY_AND_ASSIGN(BaseFormatView);
};
} // namespace message_center
#endif // UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_
|
Add a missing override from r167851. Hopefully this unbreaks the CrOS Clang build.
|
Add a missing override from r167851. Hopefully this unbreaks the CrOS Clang build.
TBR=miket
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@167854 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
dushu1203/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk,markYoungH/chromium.src,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,anirudhSK/chromium,M4sse/chromium.src,hujiajie/pa-chromium,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,nacl-webkit/chrome_deps,Just-D/chromium-1,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,Jonekee/chromium.src,hujiajie/pa-chromium,ChromiumWebApps/chromium,dushu1203/chromium.src,Jonekee/chromium.src,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ltilve/chromium,patrickm/chromium.src,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,dushu1203/chromium.src,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,Chilledheart/chromium,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,dednal/chromium.src,zcbenz/cefode-chromium,anirudhSK/chromium,patrickm/chromium.src,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,dushu1203/chromium.src,hujiajie/pa-chromium,dednal/chromium.src,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,dushu1203/chromium.src,axinging/chromium-crosswalk,hujiajie/pa-chromium,anirudhSK/chromium,Just-D/chromium-1,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,hgl888/chromium-crosswalk,Jonekee/chromium.src,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,anirudhSK/chromium,chuan9/chromium-crosswalk,M4sse/chromium.src,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,Jonekee/chromium.src,hgl888/chromium-crosswalk,ltilve/chromium,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,ltilve/chromium,dednal/chromium.src,ondra-novak/chromium.src,M4sse/chromium.src,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,dushu1203/chromium.src,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,hujiajie/pa-chromium,littlstar/chromium.src,markYoungH/chromium.src,Just-D/chromium-1,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,ondra-novak/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,timopulkkinen/BubbleFish,jaruba/chromium.src,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,mogoweb/chromium-crosswalk,ltilve/chromium,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,markYoungH/chromium.src,markYoungH/chromium.src,timopulkkinen/BubbleFish,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,ltilve/chromium,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,Just-D/chromium-1,markYoungH/chromium.src,ChromiumWebApps/chromium,jaruba/chromium.src,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ltilve/chromium,littlstar/chromium.src,hujiajie/pa-chromium,nacl-webkit/chrome_deps,dednal/chromium.src,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,dednal/chromium.src,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,ondra-novak/chromium.src,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,zcbenz/cefode-chromium,ChromiumWebApps/chromium,dushu1203/chromium.src,patrickm/chromium.src,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,ltilve/chromium,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,anirudhSK/chromium,jaruba/chromium.src,Just-D/chromium-1,hujiajie/pa-chromium,Chilledheart/chromium,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Jonekee/chromium.src,ltilve/chromium,jaruba/chromium.src,ondra-novak/chromium.src,chuan9/chromium-crosswalk,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,Chilledheart/chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,Chilledheart/chromium,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,markYoungH/chromium.src,dednal/chromium.src,dednal/chromium.src,axinging/chromium-crosswalk,littlstar/chromium.src,Jonekee/chromium.src,timopulkkinen/BubbleFish,patrickm/chromium.src,jaruba/chromium.src,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,dushu1203/chromium.src,chuan9/chromium-crosswalk,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,anirudhSK/chromium,fujunwei/chromium-crosswalk,markYoungH/chromium.src,littlstar/chromium.src,patrickm/chromium.src,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,Just-D/chromium-1,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk,ondra-novak/chromium.src,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,littlstar/chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,M4sse/chromium.src,nacl-webkit/chrome_deps,anirudhSK/chromium,timopulkkinen/BubbleFish,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,axinging/chromium-crosswalk,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,Fireblend/chromium-crosswalk,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,krieger-od/nwjs_chromium.src,dednal/chromium.src,anirudhSK/chromium,Chilledheart/chromium,dushu1203/chromium.src,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,dushu1203/chromium.src,dednal/chromium.src,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,littlstar/chromium.src,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk
|
f96642de25cc145286bc35825c3f4ecc4dcb248b
|
ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c
|
ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c
|
#include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA04) },
{ MP_ROM_QSTR(MP_QSTR_POTENTIOMETER), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_TOUCH), MP_ROM_PTR(&pin_PA07) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
#include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA04) },
{ MP_ROM_QSTR(MP_QSTR_POTENTIOMETER), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_TOUCH), MP_ROM_PTR(&pin_PA07) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
Add A0 as alias to pot pin.
|
Add A0 as alias to pot pin.
|
C
|
mit
|
adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython
|
05a03b02ca0a0d80542a74d1e9cc55d794dca595
|
src/chrono/core/ChChrono.h
|
src/chrono/core/ChChrono.h
|
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All rights 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.
//
// =============================================================================
#ifndef CHCHRONO_H
#define CHCHRONO_H
// Definition of the main module and sub-modules in the main Chrono library
/**
@defgroup chrono Chrono::Engine
@brief Core Functionality
@{
@defgroup chrono_physics Physics objects
@defgroup chrono_geometry Geometric objects
@defgroup chrono_collision Collision objects
@defgroup chrono_assets Asset objects
@defgroup chrono_solver Solver
@defgroup chrono_timestepper Time integrators
@defgroup chrono_functions Function objects
@defgroup chrono_particles Particle factory
@defgroup chrono_serialization Serialization
@defgroup chrono_utils Utility classes
@defgroup chrono_fea Finite Element Analysis
@{
@defgroup fea_nodes Nodes
@defgroup fea_elements Elements
@defgroup fea_constraints Constraints
@defgroup fea_contact Contact
@defgroup fea_math Mathematical support
@defgroup fea_utils Utility classes
@}
@}
*/
/// @addtogroup chrono
/// @{
/// This is the main namespace for the Chrono package.
namespace chrono {}
/// @} chrono
#endif
|
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All rights 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.
//
// =============================================================================
#ifndef CHCHRONO_H
#define CHCHRONO_H
// Definition of the main module and sub-modules in the main Chrono library
/**
@defgroup chrono Chrono::Engine
@brief Core Functionality
@{
@defgroup chrono_physics Physics objects
@defgroup chrono_geometry Geometric objects
@defgroup chrono_collision Collision objects
@defgroup chrono_assets Asset objects
@defgroup chrono_solver Solver
@defgroup chrono_timestepper Time integrators
@defgroup chrono_functions Function objects
@defgroup chrono_particles Particle factory
@defgroup chrono_serialization Serialization
@defgroup chrono_utils Utility classes
@defgroup chrono_fea Finite Element Analysis
@{
@defgroup fea_nodes Nodes
@defgroup fea_elements Elements
@defgroup fea_constraints Constraints
@defgroup fea_contact Contact
@defgroup fea_math Mathematical support
@defgroup fea_utils Utility classes
@}
@}
*/
/// @addtogroup chrono
/// @{
/// Main namespace for the Chrono package.
namespace chrono {
/// Namespace for FEA classes.
namespace fea {}
}
/// @} chrono
#endif
|
Add description of the `chrono::fea` namespace
|
Add description of the `chrono::fea` namespace
|
C
|
bsd-3-clause
|
rserban/chrono,projectchrono/chrono,projectchrono/chrono,Milad-Rakhsha/chrono,dariomangoni/chrono,Milad-Rakhsha/chrono,dariomangoni/chrono,rserban/chrono,projectchrono/chrono,rserban/chrono,rserban/chrono,rserban/chrono,dariomangoni/chrono,Milad-Rakhsha/chrono,dariomangoni/chrono,rserban/chrono,projectchrono/chrono,dariomangoni/chrono,projectchrono/chrono,Milad-Rakhsha/chrono,projectchrono/chrono,rserban/chrono,dariomangoni/chrono,Milad-Rakhsha/chrono,Milad-Rakhsha/chrono
|
811907fb84d45caad1376698b43316a18b96ed00
|
src/main.c
|
src/main.c
|
/*
*****************************************************************************
* ___ _ _ _ _
* / _ \ __ _| |_| |__(_) |_ ___
* | (_) / _` | / / '_ \ | _(_-<
* \___/\__,_|_\_\_.__/_|\__/__/
* Copyright (c) 2015 Romain Picard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*****************************************************************************/
#include <stdio.h>
#include "sysflake.h"
int main(void)
{
printf("%016llX", sysflake_generate());
return 0;
}
|
/*
*****************************************************************************
* ___ _ _ _ _
* / _ \ __ _| |_| |__(_) |_ ___
* | (_) / _` | / / '_ \ | _(_-<
* \___/\__,_|_\_\_.__/_|\__/__/
* Copyright (c) 2015 Romain Picard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*****************************************************************************/
#include <stdio.h>
#include "sysflake.h"
int main(void)
{
printf("%016llX\n", sysflake_generate());
return 0;
}
|
Add newline after printing flake
|
Add newline after printing flake
|
C
|
mit
|
MainRo/sysflake,MainRo/sysflake,MainRo/sysflake
|
bcfea9f14002e5a0746ff75469219beb785e3117
|
src/node.h
|
src/node.h
|
#ifndef SRC_NODE_H_
#define SRC_NODE_H_
#include "./render_data.h"
/**
* \brief
*
*
*/
class Node
{
public:
virtual ~Node()
{
}
virtual void render(const RenderData &renderData) = 0;
protected:
Node()
{
}
};
#endif // SRC_NODE_H_
|
#ifndef SRC_NODE_H_
#define SRC_NODE_H_
#include "./render_data.h"
#include <boost/serialization/serialization.hpp>
#include <boost/serialization/access.hpp>
#include <boost/serialization/nvp.hpp>
/**
* \brief
*
*
*/
class Node
{
public:
virtual ~Node()
{
}
virtual void render(const RenderData &renderData) = 0;
protected:
Node()
{
}
private:
friend class boost::serialization::access;
template <class Archive>
void serialize(Archive &ar, unsigned int version) const {};
};
#endif // SRC_NODE_H_
|
Add serialization to Node class.
|
Add serialization to Node class.
|
C
|
mit
|
Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller
|
331895c3947e67098189232b689c7943703988ac
|
CoconutKit/Sources/View/HLSTextView.h
|
CoconutKit/Sources/View/HLSTextView.h
|
//
// HLSTextView.h
// CoconutKit
//
// Created by Samuel Défago on 03.11.11.
// Copyright (c) 2011 Hortis. All rights reserved.
//
// TODO: - move automatically with the keyboard
// - dismiss when tapping outside
@interface HLSTextView : UITextView
/**
* The text to be displayed when the text view is empty. Default is nil
*/
@property (nonatomic, retain) NSString *placeholderText;
/**
* The color of the placeholder text. Default is light gray
*/
@property (nonatomic, retain) UIColor *placeholderTextColor;
@end
|
//
// HLSTextView.h
// CoconutKit
//
// Created by Samuel Défago on 03.11.11.
// Copyright (c) 2011 Hortis. All rights reserved.
//
/**
* Lightweight UITextView subclass providing more functionalities
*/
@interface HLSTextView : UITextView
/**
* The text to be displayed when the text view is empty. Default is nil
*/
@property (nonatomic, retain) NSString *placeholderText;
/**
* The color of the placeholder text. Default is light gray
*/
@property (nonatomic, retain) UIColor *placeholderTextColor;
@end
|
Add a small bit of documentation
|
Add a small bit of documentation
|
C
|
mit
|
cbdr/CoconutKit,cbdr/CoconutKit,cbdr/CoconutKit,cbdr/CoconutKit,cbdr/CoconutKit
|
fdc2808e4c51f5a1126af8906f596d6eb31cf996
|
arch/sgi/dev/iockbcvar.h
|
arch/sgi/dev/iockbcvar.h
|
/* $OpenBSD: iockbcvar.h,v 1.3 2010/12/03 18:29:56 shadchin Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
int iockbc_cnattach();
|
/* $OpenBSD: iockbcvar.h,v 1.4 2010/12/04 11:23:43 jsing Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
int iockbc_cnattach(void);
|
Make sgi port compile again.
|
Make sgi port compile again.
|
C
|
isc
|
orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars
|
efc87d57b802c892907bcadeaf23cd65d597c7ce
|
cbits/fakekey.c
|
cbits/fakekey.c
|
////////////////////////////////////////////////////////////////////////////////
#ifdef __linux__
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/Intrinsic.h>
#include <X11/extensions/XTest.h>
Display *fakekey_dis;
void fakekey_init(void) {
fakekey_dis = XOpenDisplay(NULL);
}
void fakekey_press(int code) {
XTestFakeKeyEvent(fakekey_dis, code, True, 0);
XFlush(fakekey_dis);
}
void fakekey_release(int code) {
XTestFakeKeyEvent(fakekey_dis, code, False, 0);
XFlush(fakekey_dis);
}
#else
void fakekey_init(void) {
}
void fakekey_press(int code) {
}
void fakekey_release(int code) {
}
#endif
|
////////////////////////////////////////////////////////////////////////////////
#ifdef __linux__
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/Intrinsic.h>
#include <X11/extensions/XTest.h>
Display *fakekey_dis;
void fakekey_init(void) {
fakekey_dis = XOpenDisplay(NULL);
}
void fakekey_press(int keysym) {
XTestFakeKeyEvent(fakekey_dis, XKeysymToKeycode(fakekey_dis, keysym), True, 0);
XFlush(fakekey_dis);
}
void fakekey_release(int keysym) {
XTestFakeKeyEvent(fakekey_dis, XKeysymToKeycode(fakekey_dis, keysym), False, 0);
XFlush(fakekey_dis);
}
#else
void fakekey_init(void) {
}
void fakekey_press(int keysym) {
}
void fakekey_release(int keysym) {
}
#endif
|
Use keysym to keycode mapping in C
|
Use keysym to keycode mapping in C
|
C
|
bsd-3-clause
|
bitonic/zurihac-plays,bitonic/zurihac-plays
|
d1c6a8062577f5ce58105afff2d0a1887bfff957
|
include/tgbot/net/TgLongPoll.h
|
include/tgbot/net/TgLongPoll.h
|
#ifndef TGBOT_TGLONGPOLL_H
#define TGBOT_TGLONGPOLL_H
#include "tgbot/Bot.h"
#include "tgbot/Api.h"
#include "tgbot/EventHandler.h"
namespace TgBot {
/**
* @brief This class handles long polling and updates parsing.
*
* @ingroup net
*/
class TgLongPoll {
public:
TgLongPoll(const Api* api, const EventHandler* eventHandler, int32_t, int32_t, const std::shared_ptr<std::vector<std::string>>&);
TgLongPoll(const Bot& bot, int32_t = 100, int32_t = 60, const std::shared_ptr<std::vector<std::string>>& = nullptr);
/**
* @brief Starts long poll. After new update will come, this method will parse it and send to EventHandler which invokes your listeners. Designed to be executed in a loop.
*/
void start();
private:
const Api* _api;
const EventHandler* _eventHandler;
int32_t _lastUpdateId = 0;
int32_t _limit;
int32_t _timeout;
std::shared_ptr<std::vector<std::string>> _allowupdates;
};
}
#endif //TGBOT_TGLONGPOLL_H
|
#ifndef TGBOT_TGLONGPOLL_H
#define TGBOT_TGLONGPOLL_H
#include "tgbot/Bot.h"
#include "tgbot/Api.h"
#include "tgbot/EventHandler.h"
namespace TgBot {
/**
* @brief This class handles long polling and updates parsing.
*
* @ingroup net
*/
class TgLongPoll {
public:
TgLongPoll(const Api* api, const EventHandler* eventHandler, int32_t, int32_t, const std::shared_ptr<std::vector<std::string>>&);
TgLongPoll(const Bot& bot, int32_t = 100, int32_t = 10, const std::shared_ptr<std::vector<std::string>>& = nullptr);
/**
* @brief Starts long poll. After new update will come, this method will parse it and send to EventHandler which invokes your listeners. Designed to be executed in a loop.
*/
void start();
private:
const Api* _api;
const EventHandler* _eventHandler;
int32_t _lastUpdateId = 0;
int32_t _limit;
int32_t _timeout;
std::shared_ptr<std::vector<std::string>> _allowupdates;
};
}
#endif //TGBOT_TGLONGPOLL_H
|
Fix too big timeout in long poller.
|
Fix too big timeout in long poller.
Make it 10 seconds instead of 60. Old timeout made bots irresponsible.
|
C
|
mit
|
reo7sp/tgbot-cpp,JellyBrick/tgbot-cpp,JellyBrick/tgbot-cpp,reo7sp/tgbot-cpp,JellyBrick/tgbot-cpp,reo7sp/tgbot-cpp
|
bf63a3f52e6e47d50b74e9b770d839b2e56f6368
|
ios/RNS3/RNS3TransferUtility.h
|
ios/RNS3/RNS3TransferUtility.h
|
#import "RCTBridgeModule.h"
#import "RCTEventDispatcher.h"
#import <AWSCore/AWSCore.h>
#import <AWSS3/AWSS3.h>
typedef enum {
BASIC, COGNITO
} CredentialType;
@interface RNS3TransferUtility : NSObject <RCTBridgeModule>
+ (NSMutableDictionary*)nativeCredentialsOptions;
+ (CredentialType)credentialType: (NSString *)type;
+ (void)interceptApplication: (UIApplication *)application handleEventsForBackgroundURLSession:(NSString *)identifier completionHandler:(void (^)())completionHandler;
@end
|
#import "RCTBridgeModule.h"
#import "RCTEventDispatcher.h"
#import <AWSCore/AWSCore.h>
#import <AWSS3/AWSS3.h>
typedef NS_ENUM(NSInteger, CredentialType) {
BASIC,
COGNITO
};
@interface RNS3TransferUtility : NSObject <RCTBridgeModule>
+ (NSMutableDictionary*)nativeCredentialsOptions;
+ (CredentialType)credentialType: (NSString *)type;
+ (void)interceptApplication: (UIApplication *)application handleEventsForBackgroundURLSession:(NSString *)identifier completionHandler:(void (^)())completionHandler;
@end
|
Define enum as NSInteger to fix a warning.
|
Define enum as NSInteger to fix a warning.
|
C
|
mit
|
nharlow89/react-native-s3,mybigday/react-native-s3,mybigday/react-native-s3,nharlow89/react-native-s3,mybigday/react-native-s3,mybigday/react-native-s3,nharlow89/react-native-s3,nharlow89/react-native-s3
|
bcd8289a0eb5e4005a2ad4e70216839291896c47
|
MOAspects/MOAspects.h
|
MOAspects/MOAspects.h
|
//
// MOAspects.h
// MOAspects
//
// Created by Hiromi Motodera on 2015/03/15.
// Copyright (c) 2015年 MOAI. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSInteger, MOAspectsPosition)
{
MOAspectsPositionBefore,
MOAspectsPositionAfter
};
typedef NS_ENUM(NSInteger, MOAspectsHookRange)
{
MOAspectsHookRangeAll = -1,
MOAspectsHookRangeTargetOnly = -2
};
@interface MOAspects : NSObject
+ (BOOL)hookInstanceMethodForClass:(Class)clazz
selector:(SEL)selector
aspectsPosition:(MOAspectsPosition)aspectsPosition
usingBlock:(id)block;
+ (BOOL)hookInstanceMethodForClass:(Class)clazz
selector:(SEL)selector
aspectsPosition:(MOAspectsPosition)aspectsPosition
hookLevel:(MOAspectsHookRange)hookLevel
usingBlock:(id)block;
+ (BOOL)hookClassMethodForClass:(Class)clazz
selector:(SEL)selector
aspectsPosition:(MOAspectsPosition)aspectsPosition
usingBlock:(id)block;
+ (BOOL)hookClassMethodForClass:(Class)clazz
selector:(SEL)selector
aspectsPosition:(MOAspectsPosition)aspectsPosition
hookLevel:(MOAspectsHookRange)hookLevel
usingBlock:(id)block;
@end
|
//
// MOAspects.h
// MOAspects
//
// Created by Hiromi Motodera on 2015/03/15.
// Copyright (c) 2015年 MOAI. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSInteger, MOAspectsPosition)
{
MOAspectsPositionBefore,
MOAspectsPositionAfter
};
typedef NS_ENUM(NSInteger, MOAspectsHookRange)
{
MOAspectsHookRangeAll = -1,
MOAspectsHookRangeTargetOnly = -2
};
@interface MOAspects : NSObject
+ (BOOL)hookInstanceMethodForClass:(Class)clazz
selector:(SEL)selector
aspectsPosition:(MOAspectsPosition)aspectsPosition
usingBlock:(id)block;
+ (BOOL)hookInstanceMethodForClass:(Class)clazz
selector:(SEL)selector
aspectsPosition:(MOAspectsPosition)aspectsPosition
hookLevel:(MOAspectsHookRange)hookRange
usingBlock:(id)block;
+ (BOOL)hookClassMethodForClass:(Class)clazz
selector:(SEL)selector
aspectsPosition:(MOAspectsPosition)aspectsPosition
usingBlock:(id)block;
+ (BOOL)hookClassMethodForClass:(Class)clazz
selector:(SEL)selector
aspectsPosition:(MOAspectsPosition)aspectsPosition
hookLevel:(MOAspectsHookRange)hookRange
usingBlock:(id)block;
@end
|
Change hook level parameter name to hookRange
|
Change hook level parameter name to hookRange
|
C
|
mit
|
MO-AI/MOAspects,MO-AI/MOAspects
|
8dcc2a8ce26fd3f97cc818ebf536bb0fe563d835
|
arduino/OpenROV/Settings.h
|
arduino/OpenROV/Settings.h
|
#ifndef __SETTINGS_H_
#define __SETTINGS_H_
#include <Arduino.h>
#include "Device.h"
// This section is for devices and their configuration
//Kit:
#define HAS_STD_LIGHTS (1)
#define LIGHTS_PIN 5
#define HAS_STD_CAPE (1)
#define HAS_STD_2X1_THRUSTERS (1)
#define HAS_STD_PILOT (1)
#define HAS_STD_CAMERAMOUNT (1)
#define CAMERAMOUNT_PIN 3
#define CAPE_VOLTAGE_PIN 0
#define CAPE_CURRENT_PIN 3
//After Market:
#define HAS_STD_CALIBRATIONLASERS (0)
#define CALIBRATIONLASERS_PIN 6
#define HAS_POLOLU_MINIMUV (1)
#define HAS_MS5803_14BA (0)
#define MS5803_14BA_I2C_ADDRESS 0x76
#define MIDPOINT 1500
#define LOGGING (1)
class Settings : public Device {
public:
static int smoothingIncriment; //How aggressive the throttle changes
static int deadZone_min;
static int deadZone_max;
static int capability_bitarray;
Settings():Device(){};
void device_setup();
void device_loop(Command cmd);
};
#endif
|
#ifndef __SETTINGS_H_
#define __SETTINGS_H_
#include <Arduino.h>
#include "Device.h"
// This section is for devices and their configuration
//Kit:
#define HAS_STD_LIGHTS (1)
#define LIGHTS_PIN 5
#define HAS_STD_CAPE (1)
#define HAS_STD_2X1_THRUSTERS (1)
#define HAS_STD_PILOT (1)
#define HAS_STD_CAMERAMOUNT (1)
#define CAMERAMOUNT_PIN 3
#define CAPE_VOLTAGE_PIN 0
#define CAPE_CURRENT_PIN 3
//After Market:
#define HAS_STD_CALIBRATIONLASERS (0)
#define CALIBRATIONLASERS_PIN 6
#define HAS_POLOLU_MINIMUV (0)
#define HAS_MS5803_14BA (0)
#define MS5803_14BA_I2C_ADDRESS 0x76
#define MIDPOINT 1500
#define LOGGING (1)
class Settings : public Device {
public:
static int smoothingIncriment; //How aggressive the throttle changes
static int deadZone_min;
static int deadZone_max;
static int capability_bitarray;
Settings():Device(){};
void device_setup();
void device_loop(Command cmd);
};
#endif
|
Reset default settings to stock kit configuration
|
Reset default settings to stock kit configuration
|
C
|
mit
|
bmvakili/openrov-software,MysteriousChanger/burrito-cockpid,codewithpassion/openrov-software,bmvakili/openrov-software,BrianAdams/openrov-software,codewithpassion/openrov-software,LeeCheongAh/openrov-software,ZonaElka/testOpenROV,bmvakili/openrov-software,MysteriousChanger/burrito-cockpid,bmvakili/openrov-software,bmvakili/openrov-software,codewithpassion/openrov-software,MysteriousChanger/burrito-cockpid,BrianAdams/openrov-software,ChangerR/burrito-cockpid,ChangerR/burrito-cockpid,BrianAdams/openrov-software,ZonaElka/testOpenROV,codewithpassion/openrov-software,ZonaElka/testOpenROV,BrianAdams/openrov-software,ChangerR/burrito-cockpid,LeeCheongAh/openrov-software
|
5f44348e2126e13d50cf4f9f3195ae4979ab63c9
|
include/ethernet.h
|
include/ethernet.h
|
struct eth_hdr
{
unsigned char dst_mac[6];
unsigned char src_mac[6];
short ethertype;
char* payload;
};
struct eth_hdr* init_eth_hdr(char* buf);
void print_eth_hdr(struct eth_hdr *ehdr);
|
#ifndef ETHERNET_H_
#define ETHERNET_H_
#include <linux/if_ether.h>
struct eth_hdr
{
unsigned char dst_mac[6];
unsigned char src_mac[6];
unsigned short ethertype;
unsigned char* payload;
};
struct eth_hdr* init_eth_hdr(char* buf);
void print_eth_hdr(struct eth_hdr *ehdr);
#endif
|
Make eth header fields unsigned
|
Make eth header fields unsigned
|
C
|
mit
|
saminiir/level-ip,saminiir/level-ip
|
88c8743809cccd5d855599a9c37d3b19a849b465
|
percolation/io_helpers.c
|
percolation/io_helpers.c
|
#include "io_helpers.h"
#include <stdio.h>
void print_lattice(int * lattice, int rows, int columns, int with_borders)
{
int i, j;
for (i = 0; i < rows; i++) {
if (with_borders) {
for (j = 0; j < columns; j++) {
printf("------");
}
printf("-\n");
}
for (j = 0; j < columns; j++) {
if (with_borders) {
putchar('|');
putchar(' ');
}
if (lattice[i*columns + j] == 1) {
printf(" x ");
} else if (lattice[i*columns + j] > 1) {
printf("%03d", lattice[i*columns + j]);
} else {
if (with_borders) {
putchar(' ');
putchar(' ');
putchar(' ');
} else {
printf(" o ");
}
}
if (with_borders) {
putchar(' ');
if (j == columns - 1) {
putchar('|');
}
} else {
if (j < columns - 1) {
putchar(' ');
}
}
}
putchar('\n');
}
if (with_borders) {
for (j = 0; j < columns; j++) {
printf("------");
}
printf("-\n");
}
}
|
#include "io_helpers.h"
#include <stdio.h>
void print_lattice(int * lattice, int rows, int columns, int with_borders)
{
int i, j;
for (i = 0; i < rows; i++) {
if (with_borders) {
for (j = 0; j < columns; j++) {
printf("------");
}
printf("-\n");
}
for (j = 0; j < columns; j++) {
if (with_borders) {
putchar('|');
putchar(' ');
}
if (lattice[i*columns + j] == 1) {
printf(" x ");
} else if (lattice[i*columns + j] > 1) {
printf("%03d", lattice[i*columns + j]);
} else {
if (with_borders) {
putchar(' ');
putchar(' ');
putchar(' ');
} else {
printf(" o ");
}
}
if (with_borders) {
putchar(' ');
if (j == columns - 1) {
putchar('|');
}
} else {
if (j < columns - 1) {
putchar(' ');
}
}
}
putchar('\n');
}
if (with_borders) {
for (j = 0; j < columns; j++) {
printf("------");
}
printf("-\n");
} else {
putchar('\n');
}
}
|
Add a newline after printing the lattice
|
[percolation] Add a newline after printing the lattice
|
C
|
mit
|
cerisola/fiscomp,cerisola/fiscomp,cerisola/fiscomp
|
476e707cf2b5192866827e532b10f25f58082a0b
|
src/GSvar/SequencingRunWidget.h
|
src/GSvar/SequencingRunWidget.h
|
#ifndef SEQUENCINGRUNWIDGET_H
#define SEQUENCINGRUNWIDGET_H
#include <QWidget>
#include "NGSD.h"
namespace Ui {
class SequencingRunWidget;
}
class SequencingRunWidget : public QWidget
{
Q_OBJECT
public:
SequencingRunWidget(QWidget* parent, QString run_id);
~SequencingRunWidget();
signals:
void openProcessedSampleTab(QString ps_name);
protected slots:
void updateGUI();
void openSelectedSamples();
private:
Ui::SequencingRunWidget* ui_;
QString run_id_;
NGSD db_;
};
#endif // SEQUENCINGRUNWIDGET_H
|
#ifndef SEQUENCINGRUNWIDGET_H
#define SEQUENCINGRUNWIDGET_H
#include <QWidget>
#include <QAction>
#include "NGSD.h"
namespace Ui {
class SequencingRunWidget;
}
class SequencingRunWidget : public QWidget
{
Q_OBJECT
public:
SequencingRunWidget(QWidget* parent, QString run_id);
~SequencingRunWidget();
signals:
void openProcessedSampleTab(QString ps_name);
protected slots:
void updateGUI();
void openSelectedSamples();
private:
Ui::SequencingRunWidget* ui_;
QString run_id_;
NGSD db_;
};
#endif // SEQUENCINGRUNWIDGET_H
|
Fix missing include under OSX
|
[GSvar] Fix missing include under OSX
|
C
|
mit
|
imgag/ngs-bits,imgag/ngs-bits,imgag/ngs-bits,imgag/ngs-bits,imgag/ngs-bits,imgag/ngs-bits
|
829d693e3d1e519b837587adc51c940871666c13
|
decoder/dict.h
|
decoder/dict.h
|
#ifndef DICT_H_
#define DICT_H_
#include <cassert>
#include <cstring>
#include <tr1/unordered_map>
#include <string>
#include <vector>
#include <boost/functional/hash.hpp>
#include "wordid.h"
class Dict {
typedef std::tr1::unordered_map<std::string, WordID, boost::hash<std::string> > Map;
public:
Dict() : b0_("<bad0>") { words_.reserve(1000); }
inline int max() const { return words_.size(); }
inline WordID Convert(const std::string& word, bool frozen = false) {
Map::iterator i = d_.find(word);
if (i == d_.end()) {
if (frozen)
return 0;
words_.push_back(word);
d_[word] = words_.size();
return words_.size();
} else {
return i->second;
}
}
inline const std::string& Convert(const WordID& id) const {
if (id == 0) return b0_;
assert(id <= words_.size());
return words_[id-1];
}
void clear() { words_.clear(); d_.clear(); }
private:
const std::string b0_;
std::vector<std::string> words_;
Map d_;
};
#endif
|
#ifndef DICT_H_
#define DICT_H_
#include <cassert>
#include <cstring>
#include <tr1/unordered_map>
#include <string>
#include <vector>
#include <boost/functional/hash.hpp>
#include "wordid.h"
class Dict {
typedef std::tr1::unordered_map<std::string, WordID, boost::hash<std::string> > Map;
public:
Dict() : b0_("<bad0>") { words_.reserve(1000); }
inline int max() const { return words_.size(); }
inline WordID Convert(const std::string& word, bool frozen = false) {
Map::iterator i = d_.find(word);
if (i == d_.end()) {
if (frozen)
return 0;
words_.push_back(word);
d_[word] = words_.size();
return words_.size();
} else {
return i->second;
}
}
inline WordID Convert(const std::vector<std::string>& words, bool frozen = false) {
std::string word= "";
for (std::vector<std::string>::const_iterator it=words.begin();
it != words.end(); ++it) {
if (it != words.begin()) word += "__";
word += *it;
}
return Convert(word, frozen);
}
inline const std::string& Convert(const WordID& id) const {
if (id == 0) return b0_;
assert(id <= words_.size());
return words_[id-1];
}
void clear() { words_.clear(); d_.clear(); }
private:
const std::string b0_;
std::vector<std::string> words_;
Map d_;
};
#endif
|
Update utility functions to work with pyp-topics.
|
Update utility functions to work with pyp-topics.
git-svn-id: 357248c53bdac2d7b36f7ee045286eb205fcf757@49 ec762483-ff6d-05da-a07a-a48fb63a330f
|
C
|
apache-2.0
|
carhaas/cdec-semparse,m5w/atools,redpony/cdec,veer66/cdec,veer66/cdec,veer66/cdec,redpony/cdec,carhaas/cdec-semparse,carhaas/cdec-semparse,veer66/cdec,redpony/cdec,m5w/atools,veer66/cdec,pks/cdec-dtrain,pks/cdec-dtrain,carhaas/cdec-semparse,pks/cdec-dtrain,redpony/cdec,redpony/cdec,redpony/cdec,veer66/cdec,pks/cdec-dtrain,pks/cdec-dtrain,carhaas/cdec-semparse,pks/cdec-dtrain,carhaas/cdec-semparse,m5w/atools
|
4e3d4683fedb59f6cdeaeefb04c96fa124463ed4
|
src/abuf.h
|
src/abuf.h
|
#ifndef ABUF_H
#define ABUF_H
#include <string.h>
#define ABUF_INIT { NULL, 0}
struct abuf{
char *b;
int len;
};
void abAppend(struct abuf*, const char*, int);
void abFree(struct abuf*);
#endif
|
#ifndef ABUF_H
#define ABUF_H
#include <stdlib.h>
#include <string.h>
#define ABUF_INIT { NULL, 0}
struct abuf{
char *b;
int len;
};
void abAppend(struct abuf*, const char*, int);
void abFree(struct abuf*);
#endif
|
Include stdlib for free and realloc
|
Include stdlib for free and realloc
|
C
|
bsd-2-clause
|
JordanMajd/t
|
74ba99eab5d87b36e1c7809b395725d83d0ab1d6
|
src/scan.c
|
src/scan.c
|
/*
scan: Esitmate length of a mpeg file and compare to length from exact scan.
copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Thomas Orgis
*/
#include "mpg123.h"
int main(int argc, char **argv)
{
mpg123_handle *m;
int i;
mpg123_init();
m = mpg123_new(NULL, NULL);
for(i = 1; i < argc; ++i)
{
off_t a, b;
mpg123_open(m, argv[i]);
a = mpg123_length(m);
mpg123_scan(m);
b = mpg123_length(m);
printf("File %i: estimated %li vs. scanned %li\n", i, (long)a, (long)b);
}
mpg123_delete(m);
mpg123_exit();
return 0;
}
|
/*
scan: Estimate length (sample count) of a mpeg file and compare to length from exact scan.
copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Thomas Orgis
*/
/* Note the lack of error checking here.
While it would be nicer to inform the user about troubles, libmpg123 is designed _not_ to bite you on operations with invalid handles , etc.
You just jet invalid results on invalid operations... */
#include <stdio.h>
#include "mpg123.h"
int main(int argc, char **argv)
{
mpg123_handle *m;
int i;
mpg123_init();
m = mpg123_new(NULL, NULL);
for(i = 1; i < argc; ++i)
{
off_t a, b;
mpg123_open(m, argv[i]);
a = mpg123_length(m);
mpg123_scan(m);
b = mpg123_length(m);
printf("File %i: estimated %li vs. scanned %li\n", i, (long)a, (long)b);
}
mpg123_delete(m);
mpg123_exit();
return 0;
}
|
Add a note about error checking, fix description and include stdio.h .
|
Add a note about error checking, fix description and include stdio.h .
git-svn-id: 793bb72743a407948e3701719c462b6a765bc435@1145 35dc7657-300d-0410-a2e5-dc2837fedb53
|
C
|
lgpl-2.1
|
Distrotech/mpg123,Distrotech/mpg123,Distrotech/mpg123,Distrotech/mpg123,Distrotech/mpg123,Distrotech/mpg123,Distrotech/mpg123
|
0c617bdade524779a41ecffc85cfb9d261700318
|
dev/database_connection.h
|
dev/database_connection.h
|
#pragma once
#include <string> // std::string
#include <sqlite3.h>
#include <system_error> // std::error_code, std::system_error
#include "error_code.h"
namespace sqlite_orm {
namespace internal {
inline sqlite3 *open_db(std::string const&filename)
{
sqlite3 *result {nullptr};
if(sqlite3_open(filename.c_str(), &result) != SQLITE_OK){
throw std::system_error(std::error_code(sqlite3_errcode(result), get_sqlite_error_category()), get_error_message(result, "opening '", filename, "'. "));
}
return result;
}
struct database_connection {
explicit database_connection(const std::string &filename):
db {open_db(filename) }
{
}
~database_connection() {
sqlite3_close(this->db);
}
sqlite3* get_db() {
return this->db;
}
protected:
sqlite3 *db;
};
}
}
|
#pragma once
#include <string> // std::string
#include <sqlite3.h>
#include <system_error> // std::error_code, std::system_error
#include "error_code.h"
namespace sqlite_orm {
namespace internal {
inline sqlite3 *open_db(std::string const&filename)
{
sqlite3 *result {nullptr};
if(sqlite3_open(filename.c_str(), &result) != SQLITE_OK){
throw_error(result, "opening '", filename, "'. ");
}
return result;
}
struct database_connection {
explicit database_connection(const std::string &filename):
db {open_db(filename) }
{}
~database_connection() {
sqlite3_close(this->db);
}
sqlite3* get_db() {
return this->db;
}
protected:
sqlite3 *db;
};
}
}
|
Use the new throw function
|
Use the new throw function
|
C
|
agpl-3.0
|
fnc12/sqlite_orm,fnc12/sqlite_orm
|
1c719512a25876346c28ebaf0ecdad007fce0a99
|
src/Output/Output_def.h
|
src/Output/Output_def.h
|
/* $Id: Output_def.h,v 1.16 2007-10-18 20:30:58 phruksar Exp $ */
#ifndef _OUTPUT_DEF_H
#define _OUTPUT_DEF_H
#define OUTFMT_HEAD 0
#define OUTFMT_UNITS 1
#define OUTFMT_COMP 2
#define OUTFMT_NUM 4
#define OUTFMT_ACT 8
#define OUTFMT_HEAT 16
#define OUTFMT_ALPHA 32
#define OUTFMT_BETA 64
#define OUTFMT_GAMMA 128
#define OUTFMT_SRC 256
#define OUTFMT_CDOSE 512
#define OUTFMT_ADJ 1024
#define OUTFMT_EXP 2048
#define OUTFMT_WDR 4096
#define OUTNORM_KG -2
#define OUTNORM_G -1
#define OUTNORM_NULL 0
#define OUTNORM_CM3 1
#define OUTNORM_M3 2
#define OUTNORM_VOL_INT 100
#define BQ_CI 2.7027e-11
#define CM3_M3 1e-6
#define G_KG 1e-3
#endif
|
/* $Id: Output_def.h,v 1.17 2008-07-31 18:08:50 phruksar Exp $ */
#ifndef _OUTPUT_DEF_H
#define _OUTPUT_DEF_H
#define OUTFMT_HEAD 0
#define OUTFMT_UNITS 1
#define OUTFMT_COMP 2
#define OUTFMT_NUM 4
#define OUTFMT_ACT 8
#define OUTFMT_HEAT 16
#define OUTFMT_ALPHA 32
#define OUTFMT_BETA 64
#define OUTFMT_GAMMA 128
#define OUTFMT_SRC 256
#define OUTFMT_CDOSE 512
#define OUTFMT_ADJ 1024
#define OUTFMT_EXP 2048
#define OUTFMT_EXP_CYL_VOL 4096
#define OUTFMT_WDR 8192
#define OUTNORM_KG -2
#define OUTNORM_G -1
#define OUTNORM_NULL 0
#define OUTNORM_CM3 1
#define OUTNORM_M3 2
#define OUTNORM_VOL_INT 100
#define BQ_CI 2.7027e-11
#define CM3_M3 1e-6
#define G_KG 1e-3
#endif
|
Define new number for new exposure rate calc
|
Define new number for new exposure rate calc
|
C
|
bsd-3-clause
|
elliottbiondo/ALARA,elliottbiondo/ALARA,elliottbiondo/ALARA,elliottbiondo/ALARA,elliottbiondo/ALARA
|
22ecd57dc0d2fa3e82dc0d2a39250ac0f2a5db4b
|
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
|
BWallet/bwallet-crypto,BWallet/bwallet-crypto,BWallet/bwallet-crypto,BWallet/bwallet-crypto,BWallet/bwallet-crypto
|
a7df3bb7cc898224bc9844fb160164ca29a237ef
|
scanner/scanner.h
|
scanner/scanner.h
|
#ifndef SCANNER_H
#define SCANNER_H
#include <QString>
#include <QChar>
#include <QVector>
#include "token.h"
/**
* @class Scanner
* @brief Class representing a scanner (lexical analyzer). It takes a file path as input and generates tokens, either lazily or as a QVector.
*/
class Scanner
{
public:
Scanner(const QString& sourcePath);
/**
* @brief Accessor to the vecotr of tokens parsed at construction time.
* @return const reference to the vector of tokens.
*/
const QVector<Token>& tokens() const {return _tokens;}
private:
QChar peek() const; //Current character
QChar next() const; //Read next character
void advance();
Token nextToken();
//Utility functions for nextToken().
Token parseAlphaNum(); //Parse an expression that starts with a letter : identifiers, reserved words, bool literals
Token parseStringLiteral();
Token parseCharLiteral();
Token parseNumberLiteral();
void skipComment();
QString fileContent;
QVector<Token> _tokens;
int currentChar = 0;
int currentLine = 1;
int currentRow = 1;
};
#endif // SCANNER_H
|
#ifndef SCANNER_H
#define SCANNER_H
#include <QString>
#include <QChar>
#include <QVector>
#include "token.h"
/**
* @class Scanner
* @brief Class representing a scanner (lexical analyzer). It takes a file path as input and generates tokens, either lazily or as a QVector.
*/
class Scanner
{
public:
Scanner(const QString& sourcePath);
Scanner() = delete;
Scanner(const Scanner& src) = delete;
Scanner(Scanner &&src) = delete;
Scanner& operator= (const Scanner& src) = delete;
Scanner& operator= (Scanner&& src) = delete;
/**
* @brief Accessor to the vecotr of tokens parsed at construction time.
* @return const reference to the vector of tokens.
*/
const QVector<Token>& tokens() const {return _tokens;}
private:
QChar peek() const; //Current character
QChar next() const; //Read next character
void advance();
Token nextToken();
//Utility functions for nextToken().
Token parseAlphaNum(); //Parse an expression that starts with a letter : identifiers, reserved words, bool literals
Token parseStringLiteral();
Token parseCharLiteral();
Token parseNumberLiteral();
void skipComment();
QString fileContent;
QVector<Token> _tokens;
int currentChar = 0;
int currentLine = 1;
int currentRow = 1;
};
#endif // SCANNER_H
|
Set copy/move constructors to deleted
|
Set copy/move constructors to deleted
|
C
|
mit
|
bisthebis/Boboscript,bisthebis/Boboscript
|
501db4b8473b4906f8a78e18f97c9a7c66b180ee
|
Stripe/PublicHeaders/UINavigationBar+Stripe_Theme.h
|
Stripe/PublicHeaders/UINavigationBar+Stripe_Theme.h
|
//
// UINavigationBar+Stripe_Theme.h
// Stripe
//
// Created by Jack Flintermann on 5/17/16.
// Copyright © 2016 Stripe, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "STPTheme.h"
NS_ASSUME_NONNULL_BEGIN
/**
* This allows quickly setting the appearance of a `UINavigationBar` to match your application. This is useful if you're presenting an `STPAddCardViewController` or `STPPaymentMethodsViewController` inside a `UINavigationController`.
*/
@interface UINavigationBar (Stripe_Theme)
/**
* Sets the navigation bar's appearance to the desired theme. This will affect the bar's `tintColor` and `barTintColor` properties, as well as the color of the single-pixel line at the bottom of the navbar.
*
* @param theme the theme to use to style the navigation bar. @see STPTheme.h
*/
- (void)stp_setTheme:(STPTheme *)theme __attribute__((deprecated));
@property (nonatomic, nullable, retain) STPTheme *stp_theme;
@end
NS_ASSUME_NONNULL_END
void linkUINavigationBarThemeCategory(void);
|
//
// UINavigationBar+Stripe_Theme.h
// Stripe
//
// Created by Jack Flintermann on 5/17/16.
// Copyright © 2016 Stripe, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "STPTheme.h"
NS_ASSUME_NONNULL_BEGIN
/**
* This allows quickly setting the appearance of a `UINavigationBar` to match your application. This is useful if you're presenting an `STPAddCardViewController` or `STPPaymentMethodsViewController` inside a `UINavigationController`.
*/
@interface UINavigationBar (Stripe_Theme)
/**
* Sets the navigation bar's appearance to the desired theme. This will affect the bar's `tintColor` and `barTintColor` properties, as well as the color of the single-pixel line at the bottom of the navbar.
*
* @param theme the theme to use to style the navigation bar. @see STPTheme.h
* @deprecated Use the `stp_theme` property instead
*/
- (void)stp_setTheme:(STPTheme *)theme __attribute__((deprecated));
/**
* Sets the navigation bar's appearance to the desired theme. This will affect the bar's `tintColor` and `barTintColor` properties, as well as the color of the single-pixel line at the bottom of the navbar.
* Stripe view controllers will use their navigation bar's theme for their UIBarButtonItems instead of their own theme if it is not nil.
*
* @see STPTheme.h
*/
@property (nonatomic, nullable, retain) STPTheme *stp_theme;
@end
NS_ASSUME_NONNULL_END
void linkUINavigationBarThemeCategory(void);
|
Add documentation for new stp_theme property
|
Add documentation for new stp_theme property
|
C
|
mit
|
stripe/stripe-ios,NewAmsterdamLabs/stripe-ios,NewAmsterdamLabs/stripe-ios,fbernardo/stripe-ios,fbernardo/stripe-ios,fbernardo/stripe-ios,NewAmsterdamLabs/stripe-ios,stripe/stripe-ios,stripe/stripe-ios,stripe/stripe-ios,fbernardo/stripe-ios,stripe/stripe-ios,stripe/stripe-ios,NewAmsterdamLabs/stripe-ios
|
93873731f73e905d8714556f1ebe23acb32de0e1
|
src/math/numbertheory/reducer.h
|
src/math/numbertheory/reducer.h
|
/*
* Modular Reducer
* (C) 1999-2010 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_MODULAR_REDUCER_H__
#define BOTAN_MODULAR_REDUCER_H__
#include <botan/numthry.h>
namespace Botan {
/*
* Modular Reducer
*/
class BOTAN_DLL Modular_Reducer
{
public:
BigInt reduce(const BigInt& x) const;
/**
* Multiply mod p
*/
BigInt multiply(const BigInt& x, const BigInt& y) const
{ return reduce(x * y); }
/**
* Square mod p
*/
BigInt square(const BigInt& x) const
{ return reduce(Botan::square(x)); }
/**
* Cube mod p
*/
BigInt cube(const BigInt& x) const
{ return multiply(x, this->square(x)); }
bool initialized() const { return (mod_words != 0); }
Modular_Reducer() { mod_words = 0; }
Modular_Reducer(const BigInt& mod);
private:
BigInt modulus, modulus_2, mu;
u32bit mod_words, mod2_words, mu_words;
};
}
#endif
|
/*
* Modular Reducer
* (C) 1999-2010 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_MODULAR_REDUCER_H__
#define BOTAN_MODULAR_REDUCER_H__
#include <botan/numthry.h>
namespace Botan {
/*
* Modular Reducer
*/
class BOTAN_DLL Modular_Reducer
{
public:
const BigInt& get_modulus() const { return modulus; }
BigInt reduce(const BigInt& x) const;
/**
* Multiply mod p
*/
BigInt multiply(const BigInt& x, const BigInt& y) const
{ return reduce(x * y); }
/**
* Square mod p
*/
BigInt square(const BigInt& x) const
{ return reduce(Botan::square(x)); }
/**
* Cube mod p
*/
BigInt cube(const BigInt& x) const
{ return multiply(x, this->square(x)); }
bool initialized() const { return (mod_words != 0); }
Modular_Reducer() { mod_words = 0; }
Modular_Reducer(const BigInt& mod);
private:
BigInt modulus, modulus_2, mu;
u32bit mod_words, mod2_words, mu_words;
};
}
#endif
|
Make the modulus visible in Modular_Reducer
|
Make the modulus visible in Modular_Reducer
|
C
|
bsd-2-clause
|
randombit/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan
|
16f44fcb1fabd5f79e3a508f467a7ba9aff71293
|
dashboard.h
|
dashboard.h
|
#ifndef DASHBOARD_H
#define DASHBOARD_H
#include <sys/types.h>
#include "src/process/process.h"
typedef struct {
char *fieldbar;
int max_x;
int max_y;
int prev_x;
int prev_y;
proc_t *process_list;
} board_t;
void print_usage(void);
char set_sort_option(char *opt);
void dashboard_mainloop(char attr_sort);
void get_process_stats(proc_t *process_list, uid_t euid, long memtotal);
#endif
|
#ifndef DASHBOARD_H
#define DASHBOARD_H
#include <sys/types.h>
#include "src/process/process.h"
#define STAT_PATHMAX 32
typedef struct {
uid_t euid;
int max_x;
int max_y;
int prev_x;
int prev_y;
char path[STAT_PATHMAX];
char *fieldbar;
long memtotal;
proc_t *process_list;
} board_t;
void print_usage(void);
char set_sort_option(char *opt);
void dashboard_mainloop(char attr_sort);
void get_process_stats(board_t *dashboard);
#endif
|
Add in path field in board_t
|
Add in path field in board_t
|
C
|
mit
|
tijko/dashboard
|
88a704e430bbbc5d6f179a87e84a498b0d0529e1
|
master/mtypes.h
|
master/mtypes.h
|
#define _MASTERTYPES
#include <inttypes.h>
//Declarations for master types
typedef enum
{
Register = 0,
Coil = 1
} 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
} MODBUSException; //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
MODBUSException 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
|
#define _MASTERTYPES
#include <inttypes.h>
//Declarations for master types
typedef enum
{
Register = 0,
Coil = 1,
DiscreteInput = 2
} 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
} MODBUSException; //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
MODBUSException 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 'DiscreteImput' Modbus data type
|
Add 'DiscreteImput' Modbus data type
|
C
|
mit
|
Jacajack/modlib
|
7b40aa94c5dbe1f583687cf3b03604893b1d3ff1
|
src/tagger.h
|
src/tagger.h
|
#ifndef __TAGGER_H__
#define __TAGGER_H__
#include <v8.h>
#include <node.h>
#include <node_events.h>
#include <mecab.h>
#include <stdio.h>
using namespace v8;
namespace MeCabBinding {
class Tagger : node::ObjectWrap {
public:
static void Initialize(const Handle<Object> target);
bool initialized();
const char* Parse(const char* input);
const mecab_node_t* ParseToNode(const char* input);
Tagger(const char* arg);
~Tagger();
protected:
static Handle<Value> New(const Arguments& args);
static Handle<Value> Parse(const Arguments& args);
static Handle<Value> ParseToNode(const Arguments& args);
static Handle<Value> Version(const Arguments& args);
private:
mecab_t* mecab;
mecab_node_t* mecabNode;
};
} // namespace MeCabBinding
#endif // __TAGGER_H__
|
#ifndef __TAGGER_H__
#define __TAGGER_H__
#include <v8.h>
#include <node.h>
#include <mecab.h>
#include <stdio.h>
using namespace v8;
namespace MeCabBinding {
class Tagger : node::ObjectWrap {
public:
static void Initialize(const Handle<Object> target);
bool initialized();
const char* Parse(const char* input);
const mecab_node_t* ParseToNode(const char* input);
Tagger(const char* arg);
~Tagger();
protected:
static Handle<Value> New(const Arguments& args);
static Handle<Value> Parse(const Arguments& args);
static Handle<Value> ParseToNode(const Arguments& args);
static Handle<Value> Version(const Arguments& args);
private:
mecab_t* mecab;
mecab_node_t* mecabNode;
};
} // namespace MeCabBinding
#endif // __TAGGER_H__
|
Remove dependency to node_events.h. Because it removed from Node since v0.5.2
|
Remove dependency to node_events.h. Because it removed from Node since v0.5.2
|
C
|
mit
|
hakobera/node-mecab-binding,hakobera/node-mecab-binding,hakobera/node-mecab-binding
|
97849a174221f7adc9906e97c0dddf4ee4296615
|
ios/RNSoundPlayer.h
|
ios/RNSoundPlayer.h
|
//
// RNSoundPlayer
//
// Created by Johnson Su on 2018-07-10.
//
#import <React/RCTBridgeModule.h>
#import <AVFoundation/AVFoundation.h>
#import <React/RCTEventEmitter.h>
@interface RNSoundPlayer : RCTEventEmitter <RCTBridgeModule, AVAudioPlayerDelegate>
@property (nonatomic, strong) AVAudioPlayer *player;
@property (nonatomic, strong) AVPlayer *avPlayer;
@property (nonatomic, strong) int loopCount;
@end
|
//
// RNSoundPlayer
//
// Created by Johnson Su on 2018-07-10.
//
#import <React/RCTBridgeModule.h>
#import <AVFoundation/AVFoundation.h>
#import <React/RCTEventEmitter.h>
@interface RNSoundPlayer : RCTEventEmitter <RCTBridgeModule, AVAudioPlayerDelegate>
@property (nonatomic, strong) AVAudioPlayer *player;
@property (nonatomic, strong) AVPlayer *avPlayer;
@property (nonatomic) int loopCount;
@end
|
Remove strong declaration from primitive type
|
Remove strong declaration from primitive type
|
C
|
mit
|
johnsonsu/react-native-sound-player,johnsonsu/react-native-sound-player,johnsonsu/react-native-sound-player
|
a7a006d248135451d1187aa3fe14162159e173a5
|
include/quid.h
|
include/quid.h
|
#ifndef QUID_H_INCLUDED
#define QUID_H_INCLUDED
#define UIDS_PER_TICK 1024 /* Generate identifiers per tick interval */
#define EPOCH_DIFF 11644473600LL /* Conversion needed for EPOCH to UTC */
#define RND_SEED_CYCLE 4096 /* Generate new random seed after interval */
/*
* Identifier structure
*/
struct quid {
unsigned long time_low; /* Time lover half */
unsigned short time_mid; /* Time middle half */
unsigned short time_hi_and_version; /* Time upper half and structure version */
unsigned char clock_seq_hi_and_reserved; /* Clock sequence */
unsigned char clock_seq_low; /* Clock sequence lower half */
unsigned char node[6]; /* Node allocation, filled with random memory data */
} __attribute__((packed));
typedef unsigned long long int cuuid_time_t;
/*
* Create new QUID
*/
void quid_create(struct quid *);
int quidcmp(const struct quid *a, const struct quid *b);
void quidtostr(char *s, struct quid *u);
#endif // QUID_H_INCLUDED
|
#ifndef QUID_H_INCLUDED
#define QUID_H_INCLUDED
#define UIDS_PER_TICK 1024 /* Generate identifiers per tick interval */
#define EPOCH_DIFF 11644473600LL /* Conversion needed for EPOCH to UTC */
#define RND_SEED_CYCLE 4096 /* Generate new random seed after interval */
/*
* Identifier structure
*/
struct quid {
unsigned long time_low; /* Time lover half */
unsigned short time_mid; /* Time middle half */
unsigned short time_hi_and_version; /* Time upper half and structure version */
unsigned char clock_seq_hi_and_reserved; /* Clock sequence */
unsigned char clock_seq_low; /* Clock sequence lower half */
unsigned char node[6]; /* Node allocation, filled with random memory data */
} __attribute__((packed));
typedef unsigned long long int cuuid_time_t;
/*
* Create new QUID
*/
void quid_create(struct quid *);
/*
* Compare to QUID keys
*/
int quidcmp(const struct quid *a, const struct quid *b);
/*
* Convert QUID key to string
*/
void quidtostr(char *s, struct quid *u);
#endif // QUID_H_INCLUDED
|
Add comment to public QUID functions
|
Add comment to public QUID functions
|
C
|
bsd-3-clause
|
yorickdewid/Quantica,yorickdewid/Quantica,yorickdewid/Quantica,yorickdewid/Quantica
|
af86cde8375d92cc310f16fd4bb0c2a87d6c4eb7
|
includes/LinearAllocator.h
|
includes/LinearAllocator.h
|
#include "Allocator.h"
#ifndef LINEARALLOCATOR_H
#define LINEARALLOCATOR_H
class LinearAllocator : public Allocator {
private:
/* Offset from the start of the memory block */
long m_offset;
public:
/* Allocation of real memory */
LinearAllocator(const long totalSize);
/* Frees all memory */
virtual ~LinearAllocator();
/* Allocate virtual memory */
virtual void* Allocate(const std::size_t size, const std::size_t alignment) override;
/* Frees virtual memory */
virtual void Free(void* ptr) override;
/* Frees all virtual memory */
virtual void Reset() override;
};
#endif /* LINEARALLOCATOR_H */
|
#include "Allocator.h"
#ifndef LINEARALLOCATOR_H
#define LINEARALLOCATOR_H
class LinearAllocator : public Allocator {
protected:
/* Offset from the start of the memory block */
long m_offset;
public:
/* Allocation of real memory */
LinearAllocator(const long totalSize);
/* Frees all memory */
virtual ~LinearAllocator();
/* Allocate virtual memory */
virtual void* Allocate(const std::size_t size, const std::size_t alignment) override;
/* Frees virtual memory */
virtual void Free(void* ptr) override;
/* Frees all virtual memory */
virtual void Reset() override;
};
#endif /* LINEARALLOCATOR_H */
|
Make offset a protected var.
|
Make offset a protected var.
|
C
|
mit
|
mtrebi/memory-allocators
|
f673eab257109c23f290e22d472a8c156c2ef340
|
math/vecops/inc/LinkDef.h
|
math/vecops/inc/LinkDef.h
|
/*************************************************************************
* Copyright (C) 1995-2020, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* Author: Danilo Piparo - CERN *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifdef __CLING__
#pragma link C++ namespace ROOT::VecOps;
#pragma link C++ class ROOT::VecOps::RVec<bool>-;
#pragma link C++ class ROOT::VecOps::RVec<float>-;
#pragma link C++ class ROOT::VecOps::RVec<double>-;
#pragma link C++ class ROOT::VecOps::RVec<char>-;
#pragma link C++ class ROOT::VecOps::RVec<short>-;
#pragma link C++ class ROOT::VecOps::RVec<int>-;
#pragma link C++ class ROOT::VecOps::RVec<long>-;
#pragma link C++ class ROOT::VecOps::RVec<long long>-;
#pragma link C++ class ROOT::VecOps::RVec<unsigned char>-;
#pragma link C++ class ROOT::VecOps::RVec<unsigned short>-;
#pragma link C++ class ROOT::VecOps::RVec<unsigned int>-;
#pragma link C++ class ROOT::VecOps::RVec<unsigned long>-;
#pragma link C++ class ROOT::VecOps::RVec<unsigned long long>-;
#endif
|
/*************************************************************************
* Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* Author: Danilo Piparo - CERN *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifdef __CLING__
#pragma link C++ namespace ROOT::VecOps;
#pragma link C++ class ROOT::VecOps::RVec<bool>-;
#pragma link C++ class ROOT::VecOps::RVec<float>-;
#pragma link C++ class ROOT::VecOps::RVec<double>-;
#pragma link C++ class ROOT::VecOps::RVec<char>-;
#pragma link C++ class ROOT::VecOps::RVec<short>-;
#pragma link C++ class ROOT::VecOps::RVec<int>-;
#pragma link C++ class ROOT::VecOps::RVec<long>-;
#pragma link C++ class ROOT::VecOps::RVec<long long>-;
#pragma link C++ class ROOT::VecOps::RVec<unsigned char>-;
#pragma link C++ class ROOT::VecOps::RVec<unsigned short>-;
#pragma link C++ class ROOT::VecOps::RVec<unsigned int>-;
#pragma link C++ class ROOT::VecOps::RVec<unsigned long>-;
#pragma link C++ class ROOT::VecOps::RVec<unsigned long long>-;
#endif
|
Update year in a copyright notice
|
[VecOps][NFC] Update year in a copyright notice
|
C
|
lgpl-2.1
|
olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root
|
ca0d17277fd101ce4878f92b398b6ab71fb2c287
|
arch/sh/include/asm/ftrace.h
|
arch/sh/include/asm/ftrace.h
|
#ifndef __ASM_SH_FTRACE_H
#define __ASM_SH_FTRACE_H
#ifdef CONFIG_FUNCTION_TRACER
#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
#ifndef __ASSEMBLY__
extern void mcount(void);
#define MCOUNT_ADDR ((long)(mcount))
#ifdef CONFIG_DYNAMIC_FTRACE
#define CALLER_ADDR ((long)(ftrace_caller))
#define STUB_ADDR ((long)(ftrace_stub))
#define MCOUNT_INSN_OFFSET ((STUB_ADDR - CALLER_ADDR) >> 1)
struct dyn_arch_ftrace {
/* No extra data needed on sh */
};
#endif /* CONFIG_DYNAMIC_FTRACE */
static inline unsigned long ftrace_call_adjust(unsigned long addr)
{
/* 'addr' is the memory table address. */
return addr;
}
#endif /* __ASSEMBLY__ */
#endif /* CONFIG_FUNCTION_TRACER */
#endif /* __ASM_SH_FTRACE_H */
|
#ifndef __ASM_SH_FTRACE_H
#define __ASM_SH_FTRACE_H
#ifdef CONFIG_FUNCTION_TRACER
#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
#ifndef __ASSEMBLY__
extern void mcount(void);
#define MCOUNT_ADDR ((long)(mcount))
#ifdef CONFIG_DYNAMIC_FTRACE
#define CALL_ADDR ((long)(ftrace_call))
#define STUB_ADDR ((long)(ftrace_stub))
#define MCOUNT_INSN_OFFSET ((STUB_ADDR - CALL_ADDR) - 4)
struct dyn_arch_ftrace {
/* No extra data needed on sh */
};
#endif /* CONFIG_DYNAMIC_FTRACE */
static inline unsigned long ftrace_call_adjust(unsigned long addr)
{
/* 'addr' is the memory table address. */
return addr;
}
#endif /* __ASSEMBLY__ */
#endif /* CONFIG_FUNCTION_TRACER */
#endif /* __ASM_SH_FTRACE_H */
|
Fix the value of MCOUNT_INSN_OFFSET
|
sh: Fix the value of MCOUNT_INSN_OFFSET
It seems that MCOUNT_INSN_OFFSET was calculating the distance between
the wrong functions. The value that should have actually been computed
is the distance between ftrace_call and ftrace_stub. I discovered this
when I added some code to ftrace_caller.
Signed-off-by: Matt Fleming <1fa2ef4755a9226cb9a0a4840bd89b158ac71391@console-pimps.org>
Signed-off-by: Paul Mundt <38b52dbb5f0b63d149982b6c5de788ec93a89032@linux-sh.org>
|
C
|
mit
|
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
|
d9b05e6ae11c5f17590d493ef7bff52239bed3bb
|
test2/type_propagation/expr_if_noreturn.c
|
test2/type_propagation/expr_if_noreturn.c
|
// RUN: %ocheck 0 %s
_Noreturn void exit(int);
void g(int i)
{
}
int f(int p)
{
(p == 5 ? exit : g)(2);
// this shouldn't be thought of as unreachable
return 7;
}
main()
{
f(4);
return 0;
}
|
// RUN: %ucc -fsyntax-only %s
_Noreturn void exit(int);
__attribute((noreturn)) void exit2(int);
void g(int i);
_Static_assert(
!__builtin_has_attribute(g, noreturn),
"");
_Static_assert(
__builtin_has_attribute(exit, noreturn),
"");
_Static_assert(
__builtin_has_attribute(exit2, noreturn),
"");
_Static_assert(
!__builtin_has_attribute(
(1 ? exit : g),
noreturn),
"");
_Static_assert(
!__builtin_has_attribute(
(1 ? exit2 : g),
noreturn),
"");
|
Change noreturn attribute tests into static asserts
|
Change noreturn attribute tests into static asserts
|
C
|
mit
|
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
|
46b69e3de1b7817f4d8ed46fe1975f4bf630f0ec
|
plat/arm/common/arm_err.c
|
plat/arm/common/arm_err.c
|
/*
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch_helpers.h>
#include <board_arm_def.h>
#include <console.h>
#include <debug.h>
#include <errno.h>
#include <norflash.h>
#include <platform.h>
#include <stdint.h>
/*
* ARM common implementation for error handler
*/
void plat_error_handler(int err)
{
int ret;
switch (err) {
case -ENOENT:
case -EAUTH:
/* Image load or authentication error. Erase the ToC */
INFO("Erasing FIP ToC from flash...\n");
nor_unlock(PLAT_ARM_FIP_BASE);
ret = nor_word_program(PLAT_ARM_FIP_BASE, 0);
if (ret != 0) {
ERROR("Cannot erase ToC\n");
} else {
INFO("Done\n");
}
break;
default:
/* Unexpected error */
break;
}
(void)console_flush();
/* Loop until the watchdog resets the system */
for (;;)
wfi();
}
|
/*
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch_helpers.h>
#include <console.h>
#include <debug.h>
#include <errno.h>
#include <norflash.h>
#include <platform.h>
#include <platform_def.h>
#include <stdint.h>
/*
* ARM common implementation for error handler
*/
void plat_error_handler(int err)
{
int ret;
switch (err) {
case -ENOENT:
case -EAUTH:
/* Image load or authentication error. Erase the ToC */
INFO("Erasing FIP ToC from flash...\n");
nor_unlock(PLAT_ARM_FIP_BASE);
ret = nor_word_program(PLAT_ARM_FIP_BASE, 0);
if (ret != 0) {
ERROR("Cannot erase ToC\n");
} else {
INFO("Done\n");
}
break;
default:
/* Unexpected error */
break;
}
(void)console_flush();
/* Loop until the watchdog resets the system */
for (;;)
wfi();
}
|
Include board_arm_def.h through the platform's header
|
Include board_arm_def.h through the platform's header
The board_arm_def.h header file needs to be included via the platform
definition header. Not doing so, results in a redefinition error of
PLAT_ARM_MAX_BL31_SIZE macro, if defined in the platform definition
file.
Change-Id: I1d178f6e8a6a41461e7fbcab9f6813a2faa2d82b
Signed-off-by: Sughosh Ganu <89c5e32bab4ac30865936b46fb918f58cd11fd98@arm.com>
|
C
|
bsd-3-clause
|
achingupta/arm-trusted-firmware,achingupta/arm-trusted-firmware
|
e4be4b7b996cc7fb279d74b5001ab0817b22b6c4
|
audio/null_audio_poller.h
|
audio/null_audio_poller.h
|
/*
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef AUDIO_NULL_AUDIO_POLLER_H_
#define AUDIO_NULL_AUDIO_POLLER_H_
#include "modules/audio_device/include/audio_device_defines.h"
#include "rtc_base/messagehandler.h"
#include "rtc_base/thread_checker.h"
namespace webrtc {
namespace internal {
class NullAudioPoller final : public rtc::MessageHandler {
public:
explicit NullAudioPoller(AudioTransport* audio_transport);
~NullAudioPoller();
protected:
void OnMessage(rtc::Message* msg) override;
private:
rtc::ThreadChecker thread_checker_;
AudioTransport* const audio_transport_;
int64_t reschedule_at_;
};
} // namespace internal
} // namespace webrtc
#endif // AUDIO_NULL_AUDIO_POLLER_H_
|
/*
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef AUDIO_NULL_AUDIO_POLLER_H_
#define AUDIO_NULL_AUDIO_POLLER_H_
#include "modules/audio_device/include/audio_device_defines.h"
#include "rtc_base/messagehandler.h"
#include "rtc_base/thread_checker.h"
namespace webrtc {
namespace internal {
class NullAudioPoller final : public rtc::MessageHandler {
public:
explicit NullAudioPoller(AudioTransport* audio_transport);
~NullAudioPoller();
protected:
void OnMessage(rtc::Message* msg) override;
private:
const rtc::ThreadChecker thread_checker_;
AudioTransport* const audio_transport_;
int64_t reschedule_at_;
};
} // namespace internal
} // namespace webrtc
#endif // AUDIO_NULL_AUDIO_POLLER_H_
|
Revert "Remove const from ThreadChecker in NullAudioPoller."
|
Revert "Remove const from ThreadChecker in NullAudioPoller."
This reverts commit 54e41dd08a06f978a6d123f19f5bbe39370f04ea.
Reason for revert: We are reverting also https://webrtc-review.googlesource.com/c/src/+/16180, so this CL will be included in the re-land of https://webrtc-review.googlesource.com/c/src/+/16180.
Original change's description:
> Remove const from ThreadChecker in NullAudioPoller.
>
> TBR=henrika@webrtc.org,solenberg@webrtc.org
>
> Bug: webrtc:8482
> Change-Id: Ib2738224e776618c692db95cd9473335bc17be15
> Reviewed-on: https://webrtc-review.googlesource.com/17540
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20505}
TBR=terelius@webrtc.org
Change-Id: I27c70ce331043ffdfec676c7e1a51e741d2fe770
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8482
Reviewed-on: https://webrtc-review.googlesource.com/17700
Reviewed-by: Mirko Bonadei <d2c43c210eae6feef04f53bae50885e8152edcca@webrtc.org>
Commit-Queue: Mirko Bonadei <d2c43c210eae6feef04f53bae50885e8152edcca@webrtc.org>
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#20511}
|
C
|
bsd-3-clause
|
ShiftMediaProject/libilbc,TimothyGu/libilbc,ShiftMediaProject/libilbc,TimothyGu/libilbc,TimothyGu/libilbc,ShiftMediaProject/libilbc,ShiftMediaProject/libilbc,ShiftMediaProject/libilbc,TimothyGu/libilbc,TimothyGu/libilbc
|
3759e834f356d5de1f047d85d18ab401d653a7d5
|
source/Loader.h
|
source/Loader.h
|
#include <string>
#include <fstream>
#ifndef LOADER
#define LOADER
namespace lyrics
{
using std::string;
using std::istream;
class Loader
{
public:
bool Load( const string name, char *&data, unsigned int &size )
{
using std::ifstream;
using std::ios;
using std::ios_base;
ifstream input( name, ios::in | ios::binary );
if ( !input )
{
// TODO:
return false;
}
if ( !IStreamSize( input, size ) )
{
// TODO:
return false;
}
data = new char [size];
if ( data == nullptr )
{
// TODO:
return false;
}
input.read( data , size );
input.close();
return true;
}
private:
bool IStreamSize( istream &input, unsigned int &size )
{
using std::ios_base;
using std::streamoff;
streamoff off;
input.seekg( 0, ios_base::end );
off = input.tellg();
input.seekg( 0, ios_base::beg );
if ( off == -1 )
{
return false;
}
size = off;
return true;
}
};
}
#endif
|
#include <string>
#include <fstream>
#ifndef LOADER
#define LOADER
namespace lyrics
{
using std::string;
using std::istream;
class Loader
{
public:
bool Load( const string name, char *&data, unsigned int &size )
{
using std::ifstream;
using std::ios;
using std::ios_base;
ifstream input( name, ios::in | ios::binary );
if ( !input )
{
// TODO:
return false;
}
if ( !IStreamSize( input, size ) )
{
// TODO:
return false;
}
data = new char [size];
if ( data == nullptr )
{
// TODO:
return false;
}
input.read( data , size );
input.close();
return true;
}
private:
bool IStreamSize( istream &input, unsigned int &size )
{
using std::ios_base;
input.seekg( 0, ios_base::end );
auto off = input.tellg();
input.seekg( 0, ios_base::beg );
if ( off == decltype( off )( -1 ) )
{
return false;
}
size = off;
return true;
}
};
}
#endif
|
Return type of tellg() is implementation defined
|
Return type of tellg() is implementation defined
|
C
|
artistic-2.0
|
fullnessfruit/Lyrics
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.