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
6bbc09533e28e0912ac2b1683e3d03cb26ce9fa0
ui/aura/aura_switches.h
ui/aura/aura_switches.h
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_AURA_AURA_SWITCHES_H_ #define UI_AURA_AURA_SWITCHES_H_ #pragma once namespace switches { extern const char kAuraHostWindowSize[]; extern const char kAuraWindows[]; } // namespace switches #endif // UI_AURA_AURA_SWITCHES_H_
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_AURA_AURA_SWITCHES_H_ #define UI_AURA_AURA_SWITCHES_H_ #pragma once #include "ui/aura/aura_export.h" namespace switches { AURA_EXPORT extern const char kAuraHostWindowSize[]; AURA_EXPORT extern const char kAuraWindows[]; } // namespace switches #endif // UI_AURA_AURA_SWITCHES_H_
Fix shared library build for aura.
Fix shared library build for aura. TBR=ben@chromium.org,derat@chromium.org R=ben@chromium.org,derat@chromium.org BUG=none TEST=none Review URL: http://codereview.chromium.org/8438039 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@108299 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,dednal/chromium.src,Just-D/chromium-1,zcbenz/cefode-chromium,keishi/chromium,Chilledheart/chromium,krieger-od/nwjs_chromium.src,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,Chilledheart/chromium,bright-sparks/chromium-spacewalk,dednal/chromium.src,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,ondra-novak/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,markYoungH/chromium.src,Fireblend/chromium-crosswalk,keishi/chromium,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,littlstar/chromium.src,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,hujiajie/pa-chromium,ChromiumWebApps/chromium,jaruba/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,Chilledheart/chromium,anirudhSK/chromium,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,patrickm/chromium.src,rogerwang/chromium,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,ltilve/chromium,markYoungH/chromium.src,keishi/chromium,axinging/chromium-crosswalk,dushu1203/chromium.src,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,littlstar/chromium.src,hgl888/chromium-crosswalk,markYoungH/chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,Jonekee/chromium.src,ltilve/chromium,junmin-zhu/chromium-rivertrail,chuan9/chromium-crosswalk,robclark/chromium,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,keishi/chromium,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,patrickm/chromium.src,rogerwang/chromium,ChromiumWebApps/chromium,rogerwang/chromium,M4sse/chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,Just-D/chromium-1,Chilledheart/chromium,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,keishi/chromium,robclark/chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,zcbenz/cefode-chromium,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,hgl888/chromium-crosswalk,ltilve/chromium,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,dushu1203/chromium.src,mogoweb/chromium-crosswalk,M4sse/chromium.src,M4sse/chromium.src,ltilve/chromium,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,anirudhSK/chromium,nacl-webkit/chrome_deps,dednal/chromium.src,fujunwei/chromium-crosswalk,littlstar/chromium.src,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,dednal/chromium.src,Jonekee/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,keishi/chromium,keishi/chromium,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,bright-sparks/chromium-spacewalk,robclark/chromium,keishi/chromium,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,Just-D/chromium-1,hujiajie/pa-chromium,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,ltilve/chromium,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,ltilve/chromium,markYoungH/chromium.src,littlstar/chromium.src,hujiajie/pa-chromium,jaruba/chromium.src,markYoungH/chromium.src,patrickm/chromium.src,dednal/chromium.src,jaruba/chromium.src,chuan9/chromium-crosswalk,dednal/chromium.src,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,keishi/chromium,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,anirudhSK/chromium,rogerwang/chromium,Chilledheart/chromium,ChromiumWebApps/chromium,ChromiumWebApps/chromium,Jonekee/chromium.src,littlstar/chromium.src,krieger-od/nwjs_chromium.src,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,dushu1203/chromium.src,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,anirudhSK/chromium,rogerwang/chromium,Jonekee/chromium.src,anirudhSK/chromium,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,hujiajie/pa-chromium,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,robclark/chromium,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,jaruba/chromium.src,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,keishi/chromium,markYoungH/chromium.src,robclark/chromium,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,littlstar/chromium.src,ltilve/chromium,TheTypoMaster/chromium-crosswalk,zcbenz/cefode-chromium,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,axinging/chromium-crosswalk,patrickm/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,ChromiumWebApps/chromium,hujiajie/pa-chromium,dednal/chromium.src,littlstar/chromium.src,jaruba/chromium.src,bright-sparks/chromium-spacewalk,Chilledheart/chromium,M4sse/chromium.src,robclark/chromium,ChromiumWebApps/chromium,anirudhSK/chromium,ondra-novak/chromium.src,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,hujiajie/pa-chromium,nacl-webkit/chrome_deps,rogerwang/chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,dednal/chromium.src,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,robclark/chromium,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,littlstar/chromium.src,Chilledheart/chromium,timopulkkinen/BubbleFish,patrickm/chromium.src,robclark/chromium,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,jaruba/chromium.src,markYoungH/chromium.src,ondra-novak/chromium.src,ltilve/chromium,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,ondra-novak/chromium.src,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,Just-D/chromium-1,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,PeterWangIntel/chromium-crosswalk,timopulkkinen/BubbleFish,robclark/chromium,dushu1203/chromium.src,hgl888/chromium-crosswalk,ondra-novak/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,dednal/chromium.src,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,crosswalk-project/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,fujunwei/chromium-crosswalk,rogerwang/chromium,PeterWangIntel/chromium-crosswalk,mogoweb/chromium-crosswalk,patrickm/chromium.src,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,keishi/chromium,M4sse/chromium.src,krieger-od/nwjs_chromium.src,junmin-zhu/chromium-rivertrail,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,M4sse/chromium.src,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,bright-sparks/chromium-spacewalk,patrickm/chromium.src,M4sse/chromium.src,mogoweb/chromium-crosswalk,markYoungH/chromium.src,dednal/chromium.src,robclark/chromium,jaruba/chromium.src,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,Fireblend/chromium-crosswalk,ltilve/chromium,anirudhSK/chromium
b267698e0377126299950113cb864c3d995f32dc
FBTweak/FBTweak+Dictionary.h
FBTweak/FBTweak+Dictionary.h
// // FBTweak+Dictionary.h // FBTweak // // Created by John McIntosh on 11/5/14. // Copyright (c) 2014 Facebook. All rights reserved. // #import <FBTweak/FBTweak.h> /** Implementation works by storing the dictionary in the tweak's `stepValue`. */ @interface FBTweak (Dictionary) @property (nonatomic, copy, readonly) NSArray *allKeys; @property (nonatomic, copy, readonly) NSArray *allValues; @property (nonatomic, copy, readwrite) NSDictionary *dictionaryValue; - (BOOL)isDictionary; @end FBTweakValue FBDictionaryTweak(NSString *categoryName, NSString *collectionName, NSString *tweakName, NSDictionary *dictionary, id defaultKey);
// // FBTweak+Dictionary.h // FBTweak // // Created by John McIntosh on 11/5/14. // Copyright (c) 2014 Facebook. All rights reserved. // #import "FBTweak.h" /** Implementation works by storing the dictionary in the tweak's `stepValue`. */ @interface FBTweak (Dictionary) @property (nonatomic, copy, readonly) NSArray *allKeys; @property (nonatomic, copy, readonly) NSArray *allValues; @property (nonatomic, copy, readwrite) NSDictionary *dictionaryValue; - (BOOL)isDictionary; @end FBTweakValue FBDictionaryTweak(NSString *categoryName, NSString *collectionName, NSString *tweakName, NSDictionary *dictionary, id defaultKey);
Update syntax for import statement
Update syntax for import statement
C
bsd-3-clause
dedelost/Tweaks,MakrisHuang/Tweaks,1yvT0s/Tweaks,1yvT0s/Tweaks,sgl0v/Tweaks,MrWooJ/Tweaks,eyeem/Tweaks,Kingside/Tweaks,programming086/Tweaks,MrWooJ/Tweaks,eyeem/Tweaks,Kingside/Tweaks,DanielAsher/Tweaks,eyeem/Tweaks,dedelost/Tweaks,cuppi/Tweaks,Uberchord/Tweaks,DanielAsher/Tweaks,sgl0v/Tweaks,adamdahan/Tweaks,1yvT0s/Tweaks,adamdahan/Tweaks,cuppi/Tweaks,flovilmart/Tweaks,sgl0v/Tweaks,Uberchord/Tweaks,dedelost/Tweaks,flovilmart/Tweaks,MakrisHuang/Tweaks,programming086/Tweaks,DanielAsher/Tweaks,adamdahan/Tweaks
acb699bec196566a5dba364b97b83ae28a9b1a80
gibbs.c
gibbs.c
#include "nb_simp.c" struct arrayProb* gibbsC_shim(struct arrayProb* topic_prior_b, struct arrayProb* word_prior_c, struct arrayNat* z_d, struct arrayNat* w_e, struct arrayNat* doc_f, unsigned int docUpdate_g) { struct arrayProb* res = (struct arrayProb*)malloc(sizeof(struct arrayProb*)); *res = gibbsC(*topic_prior_b, *word_prior_c, *z_d, *w_e, *doc_f, docUpdate_g); return res; }
#include "nb_simp.c" struct arrayProb* gibbsC_shim(struct arrayProb* topic_prior_b, struct arrayProb* word_prior_c, struct arrayNat* z_d, struct arrayNat* w_e, struct arrayNat* doc_f, unsigned int docUpdate_g) { struct arrayProb* res = (struct arrayProb*)malloc(sizeof(struct arrayProb)); *res = gibbsC(*topic_prior_b, *word_prior_c, *z_d, *w_e, *doc_f, docUpdate_g); return res; }
Fix size error in malloc call
Fix size error in malloc call
C
bsd-3-clause
zaxtax/naive_bayes,zaxtax/naive_bayes,zaxtax/naive_bayes,zaxtax/naive_bayes
f5a798a2aa7fcf68d684c3dc58d9efaabe83b390
Headers/Public/MLMediaLibrary.h
Headers/Public/MLMediaLibrary.h
// // MLMediaLibrary.h // MobileMediaLibraryKit // // Created by Pierre d'Herbemont on 7/14/10. // Copyright 2010 __MyCompanyName__. All rights reserved. // #import <CoreData/CoreData.h> @interface MLMediaLibrary : NSObject { NSManagedObjectContext *_managedObjectContext; NSManagedObjectModel *_managedObjectModel; BOOL _allowNetworkAccess; } + (id)sharedMediaLibrary; - (void)addFilePaths:(NSArray *)filepaths; - (void)updateDatabase; // Removes missing files // May be internal - (NSFetchRequest *)fetchRequestForEntity:(NSString *)entity; - (id)createObjectForEntity:(NSString *)entity; - (NSString *)thumbnailFolderPath; - (void)applicationWillStart; - (void)applicationWillExit; - (void)save; - (void)libraryDidDisappear; - (void)libraryDidAppear; @end
// // MLMediaLibrary.h // MobileMediaLibraryKit // // Created by Pierre d'Herbemont on 7/14/10. // Copyright 2010 __MyCompanyName__. All rights reserved. // #import <CoreData/CoreData.h> @interface MLMediaLibrary : NSObject { NSManagedObjectContext *_managedObjectContext; NSManagedObjectModel *_managedObjectModel; BOOL _allowNetworkAccess; } + (id)sharedMediaLibrary; - (void)addFilePaths:(NSArray *)filepaths; // May be internal - (NSFetchRequest *)fetchRequestForEntity:(NSString *)entity; - (id)createObjectForEntity:(NSString *)entity; - (NSString *)thumbnailFolderPath; - (void)applicationWillStart; - (void)applicationWillExit; - (void)save; - (void)libraryDidDisappear; - (void)libraryDidAppear; @end
Revert "Adding a public method to be able to update the database"
Revert "Adding a public method to be able to update the database" This reverts commit 0c6bfc6ec7f63d468b0222c00ab1e31d69c62d40. Conflicts: Sources/MLMediaLibrary.m
C
lgpl-2.1
TheHungryBu/MediaLibraryKit,TheHungryBu/MediaLibraryKit,TheHungryBu/MediaLibraryKit,larrytin/MediaLibraryKit,TheHungryBu/MediaLibraryKit
0997dbb61cacad042c452b37e03d4de5a0ed82bb
content/common/child_process_messages.h
content/common/child_process_messages.h
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Common IPC messages used for child processes. // Multiply-included message file, hence no include guard. #include "googleurl/src/gurl.h" #include "ipc/ipc_message_macros.h" #define IPC_MESSAGE_START ChildProcessMsgStart // Messages sent from the browser to the child process. // Tells the child process it should stop. IPC_MESSAGE_CONTROL0(ChildProcessMsg_AskBeforeShutdown) // Sent in response to ChildProcessHostMsg_ShutdownRequest to tell the child // process that it's safe to shutdown. IPC_MESSAGE_CONTROL0(ChildProcessMsg_Shutdown) #if defined(IPC_MESSAGE_LOG_ENABLED) // Tell the child process to begin or end IPC message logging. IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetIPCLoggingEnabled, bool /* on or off */) #endif // Messages sent from the child process to the browser. IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ShutdownRequest) // Get the list of proxies to use for |url|, as a semicolon delimited list // of "<TYPE> <HOST>:<PORT>" | "DIRECT". IPC_SYNC_MESSAGE_CONTROL1_2(ChildProcessHostMsg_ResolveProxy, GURL /* url */, int /* network error */, std::string /* proxy list */)
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Common IPC messages used for child processes. // Multiply-included message file, hence no include guard. #include "googleurl/src/gurl.h" #include "ipc/ipc_message_macros.h" #define IPC_MESSAGE_START ChildProcessMsgStart // Messages sent from the browser to the child process. // Tells the child process it should stop. IPC_MESSAGE_CONTROL0(ChildProcessMsg_AskBeforeShutdown) // Sent in response to ChildProcessHostMsg_ShutdownRequest to tell the child // process that it's safe to shutdown. IPC_MESSAGE_CONTROL0(ChildProcessMsg_Shutdown) #if defined(IPC_MESSAGE_LOG_ENABLED) // Tell the child process to begin or end IPC message logging. IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetIPCLoggingEnabled, bool /* on or off */) #endif // Messages sent from the child process to the browser. IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ShutdownRequest) // Get the list of proxies to use for |url|, as a semicolon delimited list // of "<TYPE> <HOST>:<PORT>" | "DIRECT". IPC_SYNC_MESSAGE_CONTROL1_2(ChildProcessHostMsg_ResolveProxy, GURL /* url */, int /* network error */, std::string /* proxy list */)
Add newline at end of file
Add newline at end of file git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@78227 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,rogerwang/chromium,TheTypoMaster/chromium-crosswalk,rogerwang/chromium,dednal/chromium.src,jaruba/chromium.src,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,jaruba/chromium.src,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,M4sse/chromium.src,littlstar/chromium.src,chuan9/chromium-crosswalk,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,dushu1203/chromium.src,dednal/chromium.src,markYoungH/chromium.src,nacl-webkit/chrome_deps,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,patrickm/chromium.src,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,keishi/chromium,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,axinging/chromium-crosswalk,jaruba/chromium.src,markYoungH/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,zcbenz/cefode-chromium,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,timopulkkinen/BubbleFish,markYoungH/chromium.src,hgl888/chromium-crosswalk,M4sse/chromium.src,dushu1203/chromium.src,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,M4sse/chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,robclark/chromium,Fireblend/chromium-crosswalk,keishi/chromium,keishi/chromium,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,robclark/chromium,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,littlstar/chromium.src,Chilledheart/chromium,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,timopulkkinen/BubbleFish,ltilve/chromium,pozdnyakov/chromium-crosswalk,Jonekee/chromium.src,axinging/chromium-crosswalk,rogerwang/chromium,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,anirudhSK/chromium,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,M4sse/chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,littlstar/chromium.src,hujiajie/pa-chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,jaruba/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,dednal/chromium.src,chuan9/chromium-crosswalk,hujiajie/pa-chromium,nacl-webkit/chrome_deps,ltilve/chromium,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,anirudhSK/chromium,Jonekee/chromium.src,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,keishi/chromium,crosswalk-project/chromium-crosswalk-efl,rogerwang/chromium,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,Just-D/chromium-1,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,robclark/chromium,M4sse/chromium.src,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,zcbenz/cefode-chromium,keishi/chromium,hujiajie/pa-chromium,Chilledheart/chromium,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,robclark/chromium,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,littlstar/chromium.src,dednal/chromium.src,timopulkkinen/BubbleFish,Just-D/chromium-1,Jonekee/chromium.src,ChromiumWebApps/chromium,Just-D/chromium-1,dushu1203/chromium.src,zcbenz/cefode-chromium,ltilve/chromium,Fireblend/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,Just-D/chromium-1,dednal/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,keishi/chromium,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,ltilve/chromium,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,jaruba/chromium.src,anirudhSK/chromium,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,robclark/chromium,hgl888/chromium-crosswalk,M4sse/chromium.src,rogerwang/chromium,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,Chilledheart/chromium,hujiajie/pa-chromium,axinging/chromium-crosswalk,hujiajie/pa-chromium,markYoungH/chromium.src,robclark/chromium,dushu1203/chromium.src,rogerwang/chromium,littlstar/chromium.src,dednal/chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,patrickm/chromium.src,Chilledheart/chromium,dednal/chromium.src,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,axinging/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,robclark/chromium,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,timopulkkinen/BubbleFish,anirudhSK/chromium,ondra-novak/chromium.src,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,rogerwang/chromium,keishi/chromium,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,Chilledheart/chromium,robclark/chromium,keishi/chromium,ChromiumWebApps/chromium,jaruba/chromium.src,hgl888/chromium-crosswalk,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,Jonekee/chromium.src,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,ondra-novak/chromium.src,anirudhSK/chromium,mogoweb/chromium-crosswalk,ltilve/chromium,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,M4sse/chromium.src,Fireblend/chromium-crosswalk,Jonekee/chromium.src,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,robclark/chromium,fujunwei/chromium-crosswalk,Just-D/chromium-1,anirudhSK/chromium,hujiajie/pa-chromium,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,dednal/chromium.src,Chilledheart/chromium,rogerwang/chromium,keishi/chromium,dednal/chromium.src,fujunwei/chromium-crosswalk,robclark/chromium,ltilve/chromium,dushu1203/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,Just-D/chromium-1,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,rogerwang/chromium,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,rogerwang/chromium,Just-D/chromium-1,chuan9/chromium-crosswalk,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,ondra-novak/chromium.src,keishi/chromium,M4sse/chromium.src,fujunwei/chromium-crosswalk,markYoungH/chromium.src,patrickm/chromium.src,ltilve/chromium,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium
4d203821876f5e4e87c75417224e79035ecf0641
src/session/manager.h
src/session/manager.h
/* * waysome - wayland based window manager * * Copyright in alphabetical order: * * Copyright (C) 2014-2015 Julian Ganz * Copyright (C) 2014-2015 Manuel Messner * Copyright (C) 2014-2015 Marcel Müller * Copyright (C) 2014-2015 Matthias Beyer * Copyright (C) 2014-2015 Nadja Sommerfeld * * This file is part of waysome. * * waysome is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 2.1 of the License, or (at your option) * any later version. * * waysome is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with waysome. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __WS_SESSION_MANAGER_H__ #define __WS_SESSION_MANAGER_H__ #endif // __WS_SESSION_MANAGER_H__
/* * waysome - wayland based window manager * * Copyright in alphabetical order: * * Copyright (C) 2014-2015 Julian Ganz * Copyright (C) 2014-2015 Manuel Messner * Copyright (C) 2014-2015 Marcel Müller * Copyright (C) 2014-2015 Matthias Beyer * Copyright (C) 2014-2015 Nadja Sommerfeld * * This file is part of waysome. * * waysome is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 2.1 of the License, or (at your option) * any later version. * * waysome is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with waysome. If not, see <http://www.gnu.org/licenses/>. */ /** * @addtogroup session "Session manager" * * @{ */ #ifndef __WS_SESSION_MANAGER_H__ #define __WS_SESSION_MANAGER_H__ #endif // __WS_SESSION_MANAGER_H__ /** * @} */
Add session files to session doc group
Add session files to session doc group
C
lgpl-2.1
waysome/waysome,waysome/waysome
a20f753e2585ef887f7242e7bd8863836df65715
8/platform.h
8/platform.h
#if defined(__APPLE__) && defined(__MACH__) /* for OSX */ # define Fprefix "_" #else /* Default to linux */ # define Fprefix "" #endif #define Assembler "as --32 -g -o %s -"
#if defined(__APPLE__) && defined(__MACH__) /* for OSX */ # define Assembler "as -arch i386 -g -o %s -" # define Fprefix "_" #else /* Default to linux */ # define Assembler "as --32 -g -o %s -" # define Fprefix "" #endif
Use the appropriate assembler for OSX.
Use the appropriate assembler for OSX.
C
mit
8l/myrddin,oridb/mc,oridb/mc,8l/myrddin,oridb/mc,oridb/mc
fa741677fbe2bd4f5ba40268e2418cf7420f5e98
SSPSolution/SSPSolution/DoorEntity.h
SSPSolution/SSPSolution/DoorEntity.h
#ifndef SSPAPPLICATION_ENTITIES_DOORENTITY_H #define SSPAPPLICATION_ENTITIES_DOORENTITY_H #include "Entity.h" #include <vector> class DoorEntity : public Entity { private: struct ElementState { int entityID; EVENT desiredState; bool desiredStateReached; }; std::vector<ElementState> m_elementStates; bool m_isOpened; float m_minRotation; float m_maxRotation; float m_rotateTime; float m_rotatePerSec; public: DoorEntity(); virtual ~DoorEntity(); int Update(float dT, InputHandler* inputHandler); int React(int entityID, EVENT reactEvent); bool SetIsOpened(bool isOpened); bool GetIsOpened(); }; #endif
#ifndef SSPAPPLICATION_ENTITIES_DOORENTITY_H #define SSPAPPLICATION_ENTITIES_DOORENTITY_H #include "Entity.h" #include <vector> class DoorEntity : public Entity { private: struct ElementState { int entityID; EVENT desiredState; bool desiredStateReached; }; std::vector<ElementState> m_elementStates; bool m_isOpened; float m_minRotation; float m_maxRotation; float m_rotateTime; float m_rotatePerSec; public: DoorEntity(); virtual ~DoorEntity(); int Initialize(int entityID, PhysicsComponent* pComp, GraphicsComponent* gComp, float rotateTime = 1.0f, float minRotation = 0.0f, float maxRotation = DirectX::XM_PI / 2.0f); int Update(float dT, InputHandler* inputHandler); int React(int entityID, EVENT reactEvent); bool SetIsOpened(bool isOpened); bool GetIsOpened(); }; #endif
UPDATE Door rotation standard of 90 degrees
UPDATE Door rotation standard of 90 degrees
C
apache-2.0
Chringo/SSP,Chringo/SSP
3ab057f7b9e5f98210eabd53165d74282b5a6bdb
test/PCH/modified-header-error.c
test/PCH/modified-header-error.c
// RUN: mkdir -p %t.dir // RUN: echo '#include "header2.h"' > %t.dir/header1.h // RUN: echo > %t.dir/header2.h // RUN: cp %s %t.dir/t.c // RUN: %clang_cc1 -x c-header %t.dir/header1.h -emit-pch -o %t.pch // RUN: echo >> %t.dir/header2.h // RUN: %clang_cc1 %t.dir/t.c -include-pch %t.pch -fsyntax-only 2>&1 | FileCheck %s #include "header2.h" // CHECK: fatal error: file {{.*}} has been modified since the precompiled header was built // DISABLE: win32
// RUN: mkdir -p %t.dir // RUN: echo '#include "header2.h"' > %t.dir/header1.h // RUN: echo > %t.dir/header2.h // RUN: cp %s %t.dir/t.c // RUN: %clang_cc1 -x c-header %t.dir/header1.h -emit-pch -o %t.pch // RUN: echo >> %t.dir/header2.h // RUN: %clang_cc1 %t.dir/t.c -include-pch %t.pch -fsyntax-only 2>&1 | FileCheck %s #include "header2.h" // CHECK: fatal error: file {{.*}} has been modified since the precompiled header was built // REQUIRES: shell
Disable on Windows, for real.
Disable on Windows, for real. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@143027 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
8b30c206f7da701fa5c609c1100c3957ae22c916
src/Vector3.h
src/Vector3.h
#pragma once #include <math.h> struct Vector3 { union { float v[3]; struct { float x; float y; float z; }; struct { float azimuth; float pitch; float roll; }; }; Vector3() { x = 0; y = 0; z = 0; } float norm() { return sqrt(x*x + y*y + z*z); } void normalize() { float n = norm(); if(n > 0) { x /= n; y /= n; z /= n; } } };
#pragma once #include <math.h> struct Vector3 { union { float v[3]; struct { float x; float y; float z; }; struct { union { float azimuth; float yaw; }; float pitch; float roll; }; }; Vector3() { x = 0; y = 0; z = 0; } float norm() { return sqrt(x*x + y*y + z*z); } void normalize() { float n = norm(); if(n > 0) { x /= n; y /= n; z /= n; } } };
Allow both yaw and azimuth
Allow both yaw and azimuth
C
mit
loopj/i2c-sensor-hal,loopj/i2c-sensor-hal
3e7ab39853701277f637eed91630b4b152212d26
src/slurp.c
src/slurp.c
#include <cgreen/slurp.h> #include <stdlib.h> #include <stdio.h> static char *read_all(FILE *file, int gulp); char *slurp(const char *file_name, int gulp) { FILE *file = fopen(file_name, "r"); if (file == NULL) { return NULL; } char *content = read_all(file, gulp); fclose(file); return content; } static char *read_all(FILE *file, int gulp) { char *content = (char *)malloc((gulp + 1) * sizeof(char)); char *block = content; for ( ; ; ) { if (fgets(block, gulp + 1, file) == NULL) { break; } block += gulp; content = (char *)realloc(content, (block - content + 1) * sizeof(char)); } return content; }
#include <cgreen/slurp.h> #include <stdlib.h> #include <stdio.h> #include <strings.h> static char *read_all(FILE *file, int gulp); char *slurp(const char *file_name, int gulp) { FILE *file = fopen(file_name, "r"); if (file == NULL) { return NULL; } char *content = read_all(file, gulp); fclose(file); return content; } static char *read_all(FILE *file, int gulp) { char *content = (char *)malloc(0); int sblock = (gulp + 1) * sizeof(char); char *block = (char *)malloc(sblock); int len = 0; int add = 0; char *p; for ( ; ; ) { if (fgets(block, sblock, file) == NULL) { break; } len = strlen(block); add += len; p = (char *)realloc(content, add + 1); if (p == NULL) { exit(1); } content = p; strncat(content, block, len); } content[add + 1] = '\0'; free(block); return content; }
Fix read_all and return content without segment fault
Fix read_all and return content without segment fault
C
isc
matthargett/cgreen,gardenia/cgreen,matthargett/cgreen,cgreen-devs/cgreen,gardenia/cgreen,gardenia/cgreen,cgreen-devs/cgreen,cgreen-devs/cgreen,matthargett/cgreen,thoni56/cgreen,gardenia/cgreen,matthargett/cgreen,ykaliuta/cgreen,thoni56/cgreen,cgreen-devs/cgreen,thoni56/cgreen,thoni56/cgreen,ykaliuta/cgreen,ykaliuta/cgreen,cgreen-devs/cgreen,thoni56/cgreen,ykaliuta/cgreen,gardenia/cgreen,matthargett/cgreen,ykaliuta/cgreen
abdcf820d40c063e8542291cfbf51a6eb7e28253
usespace/daemon-one.c
usespace/daemon-one.c
#include <signal.h> #include <unistd.h> #include <stdlib.h> void spawn_again(int signum) { (void) signum; /* unused */ pid_t pid = fork(); if (pid == 0) { setsid(); return; } exit(EXIT_SUCCESS); } int main(int argc, char **argv) { struct sigaction new_action = { 0 }; new_action.sa_handler = &spawn_again; sigaction (SIGTERM, &new_action, NULL); /* do something */ while(1) {}; }
#include <signal.h> #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <sys/shm.h> #define NUMBER_OF_THE_BEAST 666 struct shared { pid_t pid; }; static struct shared *shared; void spawn_again(int signum) { (void) signum; /* unused */ pid_t pid = fork(); if (pid == 0) { /* signalize change of pid ... * don't bother with atomicity here... * */ shared->pid = getpid(); setsid(); return; } exit(EXIT_SUCCESS); } int main(int argc, char **argv) { /* Initialize shard memory */ const int shmid = shmget(NUMBER_OF_THE_BEAST, sizeof(struct shared), IPC_CREAT | 0666); if (shmid == -1) { perror("shmget failed!"); exit(EXIT_FAILURE); } shared = (struct shared*) shmat(shmid, NULL, 0); if (shared == NULL) { perror("shmat failed!"); exit(EXIT_FAILURE); } shared->pid = getpid(); /* Set signal handlers */ struct sigaction new_action = { 0 }; new_action.sa_handler = &spawn_again; sigaction (SIGTERM, &new_action, NULL); /* do something */ while(1) {}; }
Add basic support for shared memory
userspace: Add basic support for shared memory Basic communication protocol between daemons.
C
bsd-3-clause
ClosedHouse/contest,ClosedHouse/contest,ClosedHouse/contest
50e626531255c21434a9680e8c9986edb1ae90f4
tests/noreturn.c
tests/noreturn.c
#include <assert.h> #include <stdio.h> #include <stdlib.h> #include "noreturn.h" // Because assert_fail is marked as noreturn, the call to it is not followed // by another instruction in this function. // This test ensures that "thisFunctionWontReturn is on the dumped stack. int thisFunctionWontReturn(int x) { if (x) { for (int i = 0; i < 10; ++i) { printf("%d green bottles hanging on the wall", 10 - i); } thisFunctionTerminatesTheProcess(); } return 0; } int main() { thisFunctionWontReturn(1); }
#include <assert.h> #include <stdio.h> #include <stdlib.h> #include "noreturn.h" // Because assert_fail is marked as noreturn, the call to it is not followed // by another instruction in this function. // This test ensures that "thisFunctionWontReturn is on the dumped stack. __attribute__((noinline, weak)) // avoid inlining or IPO. int thisFunctionWontReturn(int x) { if (x) { for (int i = 0; i < 10; ++i) { printf("%d green bottles hanging on the wall\n", 10 - i); } thisFunctionTerminatesTheProcess(); } return 0; } int main() { thisFunctionWontReturn(1); }
Make tests work in gcc11/clang
Make tests work in gcc11/clang When inlined, we lose our stackframe for our trampoline function in this test - disallow the optimisations that break the test.
C
bsd-2-clause
peadar/pstack,peadar/pstack,peadar/pstack,peadar/pstack
cd0f72316db95b941ab54a682a7687dbbd83f0a5
test/main.c
test/main.c
#define CGLTF_IMPLEMENTATION #include "../cgltf.h" #include <stdio.h> int main(int argc, char** argv) { if (argc < 2) { printf("err\n"); return -1; } cgltf_options options = {0}; cgltf_data* data = NULL; cgltf_result result = cgltf_parse_file(&options, argv[1], &data); if (result == cgltf_result_success) result = cgltf_load_buffers(&options, data, argv[1]); printf("Result: %d\n", result); if (result == cgltf_result_success) { printf("Type: %u\n", data->file_type); printf("Meshes: %lu\n", data->meshes_count); } cgltf_free(data); return result; }
#define CGLTF_IMPLEMENTATION #include "../cgltf.h" #include <stdio.h> int main(int argc, char** argv) { if (argc < 2) { printf("err\n"); return -1; } cgltf_options options = {0}; cgltf_data* data = NULL; cgltf_result result = cgltf_parse_file(&options, argv[1], &data); if (result == cgltf_result_success) result = cgltf_load_buffers(&options, data, argv[1]); if (result == cgltf_result_success) result = cgltf_validate(data); printf("Result: %d\n", result); if (result == cgltf_result_success) { printf("Type: %u\n", data->file_type); printf("Meshes: %lu\n", data->meshes_count); } cgltf_free(data); return result; }
Add validation to test program
Add validation to test program This makes sure we exercise this code during CI for all test models.
C
mit
jkuhlmann/cgltf,jkuhlmann/cgltf,jkuhlmann/cgltf
9531b2a558971e61047019ad4eaa9ed0830442bd
apps/sensors/main.c
apps/sensors/main.c
#include <firestorm.h> #include <isl29035.h> #include <stdio.h> #include <stdbool.h> void print_intensity(int intensity) { printf("Intensity: %d\n", intensity); } void intensity_cb(int intensity, int unused1, int unused2, void* ud) { print_intensity(intensity); } void temp_callback(int temp_value, int err, int unused, void* ud) { gpio_toggle(LED_0); printf("Current Temp (%d) [0x%X]\n", temp_value, err); } void timer_fired(int arg0, int arg1, int arg2, void* ud) { isl29035_start_intensity_reading(); } int main() { printf("Hello\n"); gpio_enable_output(LED_0); isl29035_subscribe(intensity_cb, NULL); // Setup periodic timer timer_subscribe(timer_fired, NULL); timer_start_repeating(1000); tmp006_start_sampling(0x2, temp_callback, NULL); return 0; }
#include <firestorm.h> #include <isl29035.h> #include <stdio.h> #include <stdbool.h> void print_intensity(int intensity) { printf("Intensity: %d\n", intensity); } void intensity_cb(int intensity, int unused1, int unused2, void* ud) { print_intensity(intensity); } void temp_callback(int temp_value, int err, int unused, void* ud) { printf("Current Temp (%d) [0x%X]\n", temp_value, err); } void timer_fired(int arg0, int arg1, int arg2, void* ud) { isl29035_start_intensity_reading(); } int main() { printf("Hello\n"); isl29035_subscribe(intensity_cb, NULL); // Setup periodic timer timer_subscribe(timer_fired, NULL); timer_start_repeating(1000); tmp006_start_sampling(0x2, temp_callback, NULL); return 0; }
Remove blink functionality from "sensors" app
Remove blink functionality from "sensors" app Now that we can run multiple apps simultaneously, it's easier to test things if the sensors app doesn't clobber the blink app.
C
apache-2.0
google/tock-on-titan,google/tock-on-titan,google/tock-on-titan
e5fc7d47e00c9d375a320b97e19790715c6e8104
liblick/lick.h
liblick/lick.h
/** * @file * @brief A convenience header * * A header which includes all headers needed for a front-end */ #include "boot-loader.h" #include "drives.h" #include "install.h" #include "lickdir.h" #include "llist.h" #include "menu.h" #include "system-info.h" #include "utils.h"
/** * @file * @brief A convenience header * * A header which includes all headers needed for a front-end */ #ifdef __cplusplus extern "C" { #endif #include "boot-loader.h" #include "drives.h" #include "install.h" #include "lickdir.h" #include "llist.h" #include "menu.h" #include "system-info.h" #include "utils.h" #ifdef __cplusplus } #endif
Add `extern "C"' to convenience headers
Add `extern "C"' to convenience headers
C
mit
noryb009/lick,noryb009/lick,noryb009/lick
d53bc3437f941cf01bf709ddd8e9c394db095b7a
libm/s_isnan.c
libm/s_isnan.c
/* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== */ /* * isnan(x) returns 1 is x is nan, else 0; * no branching! */ #include "math.h" #include "math_private.h" int __isnan(double x) { int32_t hx,lx; EXTRACT_WORDS(hx,lx,x); hx &= 0x7fffffff; hx |= (u_int32_t)(lx|(-lx))>>31; hx = 0x7ff00000 - hx; return (int)(((u_int32_t)hx)>>31); } libm_hidden_def(__isnan)
/* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== */ /* * isnan(x) returns 1 is x is nan, else 0; * no branching! */ #include "math.h" #include "math_private.h" int __isnan(double x) { int32_t hx,lx; EXTRACT_WORDS(hx,lx,x); hx &= 0x7fffffff; hx |= (u_int32_t)(lx|(-lx))>>31; hx = 0x7ff00000 - hx; return (int)(((u_int32_t)hx)>>31); } weak_alias(__isnan, isnan) libm_hidden_def(__isnan)
Add isnan weak alias to __isnan
isnan: Add isnan weak alias to __isnan * libm/s_isnan.c: Add isnan weak alias. Signed-off-by: Mickaël Guêné <fd4c850767532186e170673aca49b5c51d48c53c@st.com> Signed-off-by: Christophe Lyon <0ec1b8ee85d9250d253c392c5d5101068ac5d5d3@st.com>
C
lgpl-2.1
kraj/uclibc-ng,wbx-github/uclibc-ng,wbx-github/uclibc-ng,wbx-github/uclibc-ng,kraj/uclibc-ng,wbx-github/uclibc-ng,kraj/uclibc-ng,kraj/uclibc-ng
a99df4d6c91366304dcf55b986d555115e3cc6a6
aimp_dotnet/AIMPPlugin.h
aimp_dotnet/AIMPPlugin.h
#pragma once #include "Services\MenuManager\ServiceMenuManager.h" #include "InternalLogger.h" namespace AIMP { namespace SDK { using namespace System; using namespace AIMP::SDK::Interfaces; public ref class AimpPlugin abstract : public AimpPluginBase { public: AimpPlugin() { } property IAimpCore^ AimpCore { IAimpCore^ get() { return _aimpCore; } } property IAimpPlayer^ Player { IAimpPlayer^ get() { return (IAimpPlayer^) AimpPlayer; } } property AIMP::SDK::Logger::ILogger ^LoggerManager { AIMP::SDK::Logger::ILogger ^get() { return AIMP::SDK::InternalLogger::Instance; } } private: IAimpCore^ _aimpCore; ServiceMenuManager^ _menuManager; }; } }
#pragma once #include "Services\MenuManager\ServiceMenuManager.h" #include "InternalLogger.h" namespace AIMP { namespace SDK { using namespace System; using namespace AIMP::SDK::Interfaces; public ref class AimpPlugin abstract : public AimpPluginBase { public: AimpPlugin() { } property IAimpCore^ AimpCore { IAimpCore^ get() { return Player->Core; } } property IAimpPlayer^ Player { IAimpPlayer^ get() { return (IAimpPlayer^) AimpPlayer; } } property AIMP::SDK::Logger::ILogger ^LoggerManager { AIMP::SDK::Logger::ILogger ^get() { return AIMP::SDK::InternalLogger::Instance; } } private: ServiceMenuManager^ _menuManager; }; } }
Fix AimpPlugin.AimpCore property which was never initialized.
Fix AimpPlugin.AimpCore property which was never initialized. Remove the _aimpCore field and use Player instead.
C
apache-2.0
martin211/aimp_dotnet,martin211/aimp_dotnet,martin211/aimp_dotnet,martin211/aimp_dotnet,martin211/aimp_dotnet
8aba5772afe0e409e2e6d52131433b0a79188f3a
include/response.h
include/response.h
#ifndef CPR_RESPONSE_H #define CPR_RESPONSE_H #include <string> #include "cookies.h" #include "cprtypes.h" namespace cpr { class Response { public: Response(const long& status_code, const std::string& text, const Header& header, const Url& url, const double& elapsed) : status_code{status_code}, text{text}, header{header}, url{url}, elapsed{elapsed} {}; Response(const long& status_code, const std::string& text, const Header& header, const Url& url, const double& elapsed, const Cookies& cookies) : status_code{status_code}, text{text}, header{header}, url{url}, elapsed{elapsed}, cookies{cookies} {}; Response() = default; long status_code; std::string text; Header header; Url url; double elapsed; Cookies cookies; }; } #endif
#ifndef CPR_RESPONSE_H #define CPR_RESPONSE_H #include <string> #include "cookies.h" #include "cprtypes.h" namespace cpr { class Response { public: Response() = default; Response(const long& status_code, const std::string& text, const Header& header, const Url& url, const double& elapsed) : status_code{status_code}, text{text}, header{header}, url{url}, elapsed{elapsed} {}; Response(const long& status_code, const std::string& text, const Header& header, const Url& url, const double& elapsed, const Cookies& cookies) : status_code{status_code}, text{text}, header{header}, url{url}, elapsed{elapsed}, cookies{cookies} {}; long status_code; std::string text; Header header; Url url; double elapsed; Cookies cookies; }; } #endif
Put the default constructor first
Put the default constructor first
C
mit
whoshuu/cpr,SuperV1234/cpr,SuperV1234/cpr,msuvajac/cpr,skystrife/cpr,skystrife/cpr,whoshuu/cpr,msuvajac/cpr,whoshuu/cpr,SuperV1234/cpr,msuvajac/cpr,skystrife/cpr
1b4d49cbf1b05997cd7fe468c06cf78a2a90af43
modules/seed-module.h
modules/seed-module.h
#ifndef _SEED_MODULE_H_ #define _SEED_MODULE_H_ #include "../libseed/seed.h" // TODO: Move [example sqlite canvas Multiprocessing // os sandbox dbus libxml cairo] // towards utilization of this header. // Check that the required number of arguments were passed into a seed callback. // If this is not true, raise an exception and return null. // This requires the callback to use "argument_count", "ctx", and "exception" // as the names of the various function arguments. #define CHECK_ARG_COUNT(name, argnum) \ if ( argument_count != argnum ) \ { \ seed_make_exception (ctx, exception, "ArgumentError", \ "wrong number of arguments; wanted %s, got %Zd", \ #argnum, argument_count); \ return seed_make_undefined (ctx); \ } // Defines a property on holder for the given enum member #define DEFINE_ENUM_MEMBER(holder, member) \ seed_object_set_property(ctx, holder, #member, \ seed_value_from_long(ctx, member, NULL)) // Defines a property on holder for the given enum member, with the given name #define DEFINE_ENUM_MEMBER_EXT(holder, name, val) \ seed_object_set_property(ctx, holder, name, \ seed_value_from_long(ctx, val, NULL)) #endif
#ifndef _SEED_MODULE_H_ #define _SEED_MODULE_H_ #include "../libseed/seed.h" // TODO: Move [example sqlite canvas Multiprocessing // os sandbox dbus libxml cairo] // towards utilization of this header. // Check that the required number of arguments were passed into a seed callback. // If this is not true, raise an exception and return null. // This requires the callback to use "argument_count", "ctx", and "exception" // as the names of the various function arguments. #define CHECK_ARG_COUNT(name, argnum) \ if ( argument_count != argnum ) \ { \ seed_make_exception (ctx, exception, "ArgumentError", \ "wrong number of arguments; expected %s, got %Zd", \ #argnum, argument_count); \ return seed_make_undefined (ctx); \ } // Defines a property on holder for the given enum member #define DEFINE_ENUM_MEMBER(holder, member) \ seed_object_set_property(ctx, holder, #member, \ seed_value_from_long(ctx, member, NULL)) // Defines a property on holder for the given enum member, with the given name #define DEFINE_ENUM_MEMBER_EXT(holder, name, val) \ seed_object_set_property(ctx, holder, name, \ seed_value_from_long(ctx, val, NULL)) #endif
Change wording of argument count check
[modules] Change wording of argument count check
C
lgpl-2.1
danilocesar/seed,danilocesar/seed,danilocesar/seed,danilocesar/seed,danilocesar/seed
4ec209a4c7e1d9c0903f454c5aa3c8e2ed19edb0
cmd/smyrna/topviewdefs.h
cmd/smyrna/topviewdefs.h
#ifndef TOPVIEWDEFS_H #define TOPVIEWDEFS_H #include "smyrnadefs.h" #include "gui.h" #include "tvnodes.h" #include "glcompset.h" #endif
/* vim:set shiftwidth=4 ts=8: */ /********************************************************** * This software is part of the graphviz package * * http://www.graphviz.org/ * * * * Copyright (c) 1994-2004 AT&T Corp. * * and is licensed under the * * Common Public License, Version 1.0 * * by AT&T Corp. * * * * Information and Software Systems Research * * AT&T Research, Florham Park NJ * **********************************************************/ #ifndef TOPVIEWDEFS_H #define TOPVIEWDEFS_H #include "smyrnadefs.h" #include "gui.h" #include "tvnodes.h" #include "glcompset.h" #endif
Clean up smyrna files: remove unnecessary globals modify libraries not to rely on code in cmd/smyrna remove static declarations from .h files remove unnecessary libraries mark unused code and clean up warnings
Clean up smyrna files: remove unnecessary globals modify libraries not to rely on code in cmd/smyrna remove static declarations from .h files remove unnecessary libraries mark unused code and clean up warnings
C
epl-1.0
MjAbuz/graphviz,kbrock/graphviz,pixelglow/graphviz,kbrock/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,kbrock/graphviz,kbrock/graphviz,MjAbuz/graphviz,jho1965us/graphviz,jho1965us/graphviz,BMJHayward/graphviz,pixelglow/graphviz,jho1965us/graphviz,ellson/graphviz,pixelglow/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,pixelglow/graphviz,ellson/graphviz,tkelman/graphviz,ellson/graphviz,jho1965us/graphviz,pixelglow/graphviz,tkelman/graphviz,ellson/graphviz,jho1965us/graphviz,kbrock/graphviz,BMJHayward/graphviz,pixelglow/graphviz,ellson/graphviz,BMJHayward/graphviz,kbrock/graphviz,ellson/graphviz,ellson/graphviz,MjAbuz/graphviz,kbrock/graphviz,tkelman/graphviz,MjAbuz/graphviz,jho1965us/graphviz,jho1965us/graphviz,ellson/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,tkelman/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,kbrock/graphviz,ellson/graphviz,BMJHayward/graphviz,pixelglow/graphviz,ellson/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,tkelman/graphviz,kbrock/graphviz,MjAbuz/graphviz,tkelman/graphviz,pixelglow/graphviz,MjAbuz/graphviz,kbrock/graphviz,pixelglow/graphviz,MjAbuz/graphviz,tkelman/graphviz,tkelman/graphviz,ellson/graphviz,tkelman/graphviz,tkelman/graphviz,pixelglow/graphviz,jho1965us/graphviz,kbrock/graphviz,tkelman/graphviz,pixelglow/graphviz,jho1965us/graphviz,jho1965us/graphviz,jho1965us/graphviz,BMJHayward/graphviz
6854cea3b6c5179fcf84b29194bb70c65aae82e8
core/vulkan/vk_virtual_swapchain/cc/platform.h
core/vulkan/vk_virtual_swapchain/cc/platform.h
/* * Copyright (C) 2018 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef VK_VIRTUAL_SWAPCHAIN_PLATFORM_H_ #define VK_VIRTUAL_SWAPCHAIN_PLATFORM_H_ #include "vulkan/vulkan.h" #include "layer.h" namespace swapchain { void CreateSurface(const InstanceData* functions, VkInstance instance, const void* data, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); } #endif // VK_VIRTUAL_SWAPCHAIN_PLATFORM_H_
/* * Copyright (C) 2018 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef VK_VIRTUAL_SWAPCHAIN_PLATFORM_H_ #define VK_VIRTUAL_SWAPCHAIN_PLATFORM_H_ #include "vulkan/vulkan.h" #include "layer.h" namespace swapchain { void CreateSurface(const InstanceData* functions, VkInstance instance, const void* data, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); } #endif // VK_VIRTUAL_SWAPCHAIN_PLATFORM_H_
Fix clang-format with different clang-format version
Fix clang-format with different clang-format version
C
apache-2.0
google/agi,google/agi,pmuetschard/gapid,Qining/gapid,pmuetschard/gapid,Qining/gapid,pmuetschard/gapid,Qining/gapid,pmuetschard/gapid,pmuetschard/gapid,google/gapid,google/agi,google/agi,google/gapid,Qining/gapid,google/gapid,google/gapid,google/agi,google/agi,pmuetschard/gapid,google/agi,google/gapid,Qining/gapid,google/gapid,pmuetschard/gapid,google/gapid,google/agi,Qining/gapid,google/gapid,Qining/gapid,Qining/gapid,pmuetschard/gapid
98aabdc63f8ef285aadcfff35e582bba69d70bac
SocksLib/protocol/Socks5UDPRequestMessage.h
SocksLib/protocol/Socks5UDPRequestMessage.h
#ifndef SOCKS5UDPREQUESTMESSAGE_H #define SOCKS5UDPREQUESTMESSAGE_H #include <QHostAddress> #include "SocksProtocolMessage.h" class Socks5UDPRequestMessage : public SocksProtocolMessage { public: Socks5UDPRequestMessage(QHostAddress dst, quint16 dstPort, QByteArray data, quint8 fragID=0); Socks5UDPRequestMessage(QString domainName, quint16 dstPort, QByteArray data, quint8 fragID=0); Socks5UDPRequestMessage(); //pure-virtual from SocksProtocolMessage virtual ParseResult parse(QByteArray& bytes,QString * error =0); //pure-virtual from SocksProtocolMessage virtual bool toBytes(QByteArray * output,QString * error=0); //pure-virtual from SocksProtocolMessage virtual qint64 minimumMessageLength() const; SocksProtocolMessage::AddressType addressType() const; QHostAddress address() const; QString domainName() const; quint16 port() const; QByteArray data() const; private: QHostAddress _address; QString _domainName; SocksProtocolMessage::AddressType _addressType; quint16 _port; quint8 _fragID; QByteArray _data; }; #endif // SOCKS5UDPREQUESTMESSAGE_H
#ifndef SOCKS5UDPREQUESTMESSAGE_H #define SOCKS5UDPREQUESTMESSAGE_H #include <QHostAddress> #include "SocksProtocolMessage.h" class Socks5UDPRequestMessage : public SocksProtocolMessage { public: Socks5UDPRequestMessage(QHostAddress dst, quint16 dstPort, QByteArray data, quint8 fragID=0); Socks5UDPRequestMessage(QString domainName, quint16 dstPort, QByteArray data, quint8 fragID=0); Socks5UDPRequestMessage(); //pure-virtual from SocksProtocolMessage virtual ParseResult parse(QByteArray& bytes,QString * error =0); //pure-virtual from SocksProtocolMessage virtual bool toBytes(QByteArray * output,QString * error=0); //pure-virtual from SocksProtocolMessage virtual qint64 minimumMessageLength() const; SocksProtocolMessage::AddressType addressType() const; QHostAddress address() const; QString domainName() const; quint16 port() const; QByteArray data() const; private: QHostAddress _address; QString _domainName; SocksProtocolMessage::AddressType _addressType; quint16 _port; QByteArray _data; quint8 _fragID; }; #endif // SOCKS5UDPREQUESTMESSAGE_H
Fix warning about initialization order (GCC/Clang, -Wreorder)
Fix warning about initialization order (GCC/Clang, -Wreorder)
C
bsd-2-clause
blochbergermax/Qt-Socks-Server,raptorswing/Qt-Socks-Server,blochberger/Qt-Socks-Server,blochberger/Qt-Socks-Server,raptorswing/Qt-Socks-Server,blochbergermax/Qt-Socks-Server
99c06cff63c4dc661b5cffc5a80f79327269684a
c/anagrams.c
c/anagrams.c
#include <stdlib.h> #include <stdio.h> #include <string.h> void swap(char *i, char *j) { char saved = *i; *i = *j; *j = saved; } void generate_permutations(char* a, int n) { if (n == 0) { printf("%s\n", a); } else { for (int i = 0; i < n; i++) { generate_permutations(a, n-1); swap(&a[n % 2 == 0 ? 0 : i], &a[n]); } generate_permutations(a, n-1); } } int main(int argc, const char* argv[]) { if (argc != 2) { fprintf(stderr, "Need exactly one argument!\n"); return 1; } size_t len = strlen(argv[1]); char *word = malloc(len + 1); word = strncpy(word, argv[1], len); generate_permutations(word, len-1); free(word); return 0; }
#include <stdlib.h> #include <stdio.h> #include <string.h> void swap(char *i, char *j) { char saved = *i; *i = *j; *j = saved; } void generate_permutations(char* a, int n) { if (n == 0) { printf("%s\n", a); } else { for (int i = 0; i < n; i++) { generate_permutations(a, n-1); swap(&a[n % 2 == 0 ? 0 : i], &a[n]); } generate_permutations(a, n-1); } } int main(int argc, const char* argv[]) { if (argc != 2) { fprintf(stderr, "Exactly one argument is required\n"); return 1; } size_t len = strlen(argv[1]); char *word = malloc(len + 1); word = strncpy(word, argv[1], len); generate_permutations(word, len-1); free(word); return 0; }
Make the error message consistent with all of the other languages
Make the error message consistent with all of the other languages
C
mit
rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot
1b5fd56466967d0092ba489e45343d7c3317ed95
drivers/scsi/qla2xxx/qla_version.h
drivers/scsi/qla2xxx/qla_version.h
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2014 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.07.00.08-k" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 7 #define QLA_DRIVER_PATCH_VER 0 #define QLA_DRIVER_BETA_VER 0
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2014 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.07.00.16-k" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 7 #define QLA_DRIVER_PATCH_VER 0 #define QLA_DRIVER_BETA_VER 0
Update the driver version to 8.07.00.16-k.
qla2xxx: Update the driver version to 8.07.00.16-k. Signed-off-by: Giridhar Malavali <799b6491fce2c7a80b5fedcf9a728560cc9eb954@qlogic.com> Signed-off-by: Saurav Kashyap <88d6fd94e71a9ac276fc44f696256f466171a3c0@qlogic.com> Signed-off-by: Christoph Hellwig <923f7720577207a44b32e59bbfbea59d27f1ae8e@lst.de>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
9a146e55752f9b84119fcedfabcf0dfca877610b
connection.h
connection.h
int initial_connection(char *ip_addr, int port) { int socket_desc; struct sockaddr_in server; //Create socket socket_desc = socket(AF_INET , SOCK_STREAM , 0); if (socket_desc == -1) { puts("Could not create socket"); return 1; } server.sin_addr.s_addr = inet_addr(ip_addr); // set IP ADDRESS of server server.sin_family = AF_INET; server.sin_port = htons(port); // set port of chat service //Connect to remote server if (connect(socket_desc , (struct sockaddr *)&server , sizeof(server)) < 0) { puts("connect error"); return 1; } }
int initial_connection(char *ip_addr, int port) { int socket_desc; struct sockaddr_in server; //Create socket socket_desc = socket(AF_INET , SOCK_STREAM , 0); if (socket_desc == -1) { puts("Could not create socket"); return 1; } server.sin_addr.s_addr = inet_addr(ip_addr); // set IP ADDRESS of server server.sin_family = AF_INET; server.sin_port = htons(port); // set port of chat service //Connect to remote server if (connect(socket_desc , (struct sockaddr *)&server , sizeof(server)) < 0) { puts("connect error"); return 1; } } int recieve_data(int lenght, char *message_buffer){ char server_reply[lenght]; int read_size; // recieve packet from server read_size = recv(socket_desc, server_reply , lenght , 0); if (read_size > 0) { /* set end point string on last character by calculate read_size In normal, recv don't clear last buffer string So we must set end of string to prevent bug from last buffer string */ server_reply[read_size] = '\0'; strcpy(message_buffer, server_reply); return 1; } else { puts("Receive failed."); return 0; } } int send_data(char *text) { return send(socket_desc , text , strlen(text) , 0) > 0; }
Add function recv and send
Add function recv and send Improve function to use easier
C
mit
chin8628/terminal-s-chat
f1482d1be22da850eee8db1e597f5c555c16e42f
src/common.c
src/common.c
/* $Id$ */ static char const _copyright[] = "Copyright (c) 2006-2013 Pierre Pronchery <khorben@defora.org>"; /* This file is part of DeforaOS Desktop Mailer */ static char const _license[] = "This program is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, version 3 of the License.\n" "\n" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see <http://www.gnu.org/licenses/>.\n"; static char const * _authors[] = { "Pierre Pronchery <khorben@defora.org>", NULL }; static char const * _comments = N_("e-mail client for the DeforaOS desktop");
/* $Id$ */ static char const _copyright[] = "Copyright © 2006-2013 Pierre Pronchery <khorben@defora.org>"; /* This file is part of DeforaOS Desktop Mailer */ static char const _license[] = "This program is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, version 3 of the License.\n" "\n" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see <http://www.gnu.org/licenses/>.\n"; static char const * _authors[] = { "Pierre Pronchery <khorben@defora.org>", NULL }; static char const * _comments = N_("e-mail client for the DeforaOS desktop");
Use the copyright character for the about dialogs
Use the copyright character for the about dialogs
C
bsd-2-clause
DeforaOS/Mailer,DeforaOS/Mailer
99e0edf752302fe27340e16b9d8233cd04bc2029
lib/packet_queue.c
lib/packet_queue.c
#include "packet_queue.h" #include "error.h" #include "radio.h" #include <stdint.h> #include <stdlib.h> #include <string.h> uint32_t packet_queue_init(packet_queue_t * queue) { queue->head = 0; queue->tail = 0; return SUCCESS; } bool packet_queue_is_empty(packet_queue_t * queue) { return queue->head == queue->tail; } bool packet_queue_is_full(packet_queue_t * queue) { return abs(queue->head - queue->tail) == PACKET_QUEUE_SIZE; } uint32_t packet_queue_add(packet_queue_t * queue, radio_packet_t * packet) { if (packet_queue_is_full(queue)) return NO_MEMORY; memcpy(&queue->packets[0], packet, sizeof(*packet)); queue->tail++; return SUCCESS; } uint32_t packet_queue_get(packet_queue_t * queue, radio_packet_t ** packet) { if (packet_queue_is_empty(queue)) return NOT_FOUND; *packet = &queue->packets[queue->head]; queue->head++; return SUCCESS; }
#include "packet_queue.h" #include "error.h" #include "radio.h" #include <stdint.h> #include <stdlib.h> #include <string.h> uint32_t packet_queue_init(packet_queue_t * queue) { queue->head = 0; queue->tail = 0; return SUCCESS; } bool packet_queue_is_empty(packet_queue_t * queue) { return queue->head == queue->tail; } bool packet_queue_is_full(packet_queue_t * queue) { return abs(queue->head - queue->tail) == PACKET_QUEUE_SIZE; } uint32_t packet_queue_add(packet_queue_t * queue, radio_packet_t * packet) { if (packet_queue_is_full(queue)) return NO_MEMORY; memcpy(&queue->packets[queue->tail], packet, sizeof(*packet)); queue->tail = (queue->tail + 1u) % PACKET_QUEUE_SIZE; return SUCCESS; } uint32_t packet_queue_get(packet_queue_t * queue, radio_packet_t ** packet) { if (packet_queue_is_empty(queue)) return NOT_FOUND; *packet = &queue->packets[queue->head]; queue->head = (queue->head + 1u) % PACKET_QUEUE_SIZE; return SUCCESS; }
Increment head and tail properly.
Increment head and tail properly.
C
bsd-3-clause
hlnd/nrf51-simple-radio,hlnd/nrf51-simple-radio
73a7df9ca22086025246f5329826750b46aea81a
source/board/mtconnect04s.c
source/board/mtconnect04s.c
/** * @file mtconnect04s.c * @brief board ID for the MtM MtConnect04S developments board * * DAPLink Interface Firmware * Copyright (c) 2009-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ const char *board_id = "C005"; // URL_NAME and DRIVE_NAME must be 11 characters excluding // the null terminated character // Note - 4 byte alignemnt required as workaround for ARMCC compiler bug with weak references __attribute__((aligned(4))) const char daplink_url_name[11] = "HELP HTM"; __attribute__((aligned(4))) const char daplink_drive_name[11] = "MTCONNEC04S"; __attribute__((aligned(4))) const char *const daplink_target_url = "https://blog.mtmtech.com.tw/mtconnect04s/";
/** * @file mtconnect04s.c * @brief board ID for the MtM MtConnect04S developments board * * DAPLink Interface Firmware * Copyright (c) 2009-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ const char *board_id = "C005"; // URL_NAME and DRIVE_NAME must be 11 characters excluding // the null terminated character // Note - 4 byte alignemnt required as workaround for ARMCC compiler bug with weak references __attribute__((aligned(4))) const char daplink_url_name[11] = "HELP HTM"; __attribute__((aligned(4))) const char daplink_drive_name[11] = "MTCONNEC04S"; __attribute__((aligned(4))) const char *const daplink_target_url = "https://developer.mbed.org/platforms/MtConnect04S/";
Update target page url of MtConnect04S
Update target page url of MtConnect04S
C
apache-2.0
sg-/DAPLink,google/DAPLink-port,sg-/DAPLink,google/DAPLink-port,google/DAPLink-port,google/DAPLink-port,sg-/DAPLink
dbd9075781f1f83ec53841c162ea027902c3742a
queue.c
queue.c
#include "queue.h" struct Queue { size_t head; size_t tail; size_t size; void** e; }; Queue* Queue_Create(size_t n) { Queue* q = (Queue *)malloc(sizeof(Queue)); q->size = n; q->head = q->tail = 1; q->e = (void **)malloc(sizeof(void*) * (n + 1)); return q; } int Queue_Empty(Queue* q) { return (q->head == q->tail); }
#include "queue.h" struct Queue { size_t head; size_t tail; size_t size; void** e; }; Queue* Queue_Create(size_t n) { Queue* q = (Queue *)malloc(sizeof(Queue)); q->size = n; q->head = q->tail = 1; q->e = (void **)malloc(sizeof(void*) * (n + 1)); return q; } int Queue_Empty(Queue* q) { return (q->head == q->tail); } int Queue_Full(Queue* q) { return (q->head == q->tail + 1) || (q->head == 1 && q->tail == q->size); }
Add helper function Queue Full implementation
Add helper function Queue Full implementation
C
mit
MaxLikelihood/CADT
e3cdcbbbfd75cd76d705bee7c01ea07cced618cb
shell.c
shell.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "parsing.h" #include "shutility.h" int main(int argc, char **argv) { int status = 1; int read; size_t len; char *buffer = NULL; printf("----- C O N S O L E\t S I M U L A T I O N -----\n\n"); while (status) { /* Get & display username and hostname */ display_info(); /* Get user input, strtok to remove newline */ read = getline(&buffer, &len, stdin); strtok(buffer, "\n"); status = parsing(buffer); } if (read) free(buffer); return 0; }
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <signal.h> #include "parsing.h" #include "shutility.h" /* void sig_handler(int signo) { if (signo == SIGUSR1) printf("Received SIGUSR1\n"); else if (signo == SIGTERM) printf("Received SIGTERM\n"); else if (signo == SIGINT) printf("Received SIGINT\n"); else if (signo == SIGFPE) printf("Received SIGFPE\n"); else if (signo == SIGABRT) printf("Received SIGABRT\n"); } */ int main(int argc, char **argv) { int status = 1; int read; size_t len; char *buffer = NULL; /* Example of signal handling * *if (signal(SIGUSR1, sig_handler) == SIG_ERR) * printf("\ncan't catch SIGUSR1\n"); *if (signal(SIGTERM, sig_handler) == SIG_ERR) * printf("\ncan't catch SIGTERM\n"); *if (signal(SIGINT, sig_handler) == SIG_ERR) * printf("\ncan't catch SIGINT\n"); *if (signal(SIGFPE, sig_handler) == SIG_ERR) * printf("\ncan't catch SIGFPE\n"); *if (signal(SIGABRT, sig_handler) == SIG_ERR) * printf("\ncan't catch SIGABRT\n"); */ printf("----- C O N S O L E\t S I M U L A T I O N -----\n\n"); while (status) { /* Get & display username and hostname */ display_info(); /* Get user input, strtok to remove newline */ read = getline(&buffer, &len, stdin); strtok(buffer, "\n"); status = parsing(buffer); } if (read) free(buffer); return 0; }
Add example of signal handling
Add example of signal handling
C
mit
Bcoolie/Shell-Simulation
ce8db655cff33b744df07e338e328fb598a5a81c
snake.c
snake.c
#include <stdlib.h> /** * @author: Hendrik Werner */ #define BOARD_HEIGHT 50 #define BOARD_WIDTH 50 typedef struct Position { int row; int col; } Position; int main() { return EXIT_SUCCESS; }
#include <stdlib.h> /** * @author: Hendrik Werner */ #define BOARD_HEIGHT 50 #define BOARD_WIDTH 50 typedef struct Position { int row; int col; } Position; typedef enum Cell { EMPTY ,SNAKE ,FOOD } Cell; int main() { return EXIT_SUCCESS; }
Enumerate possible values for cells.
Enumerate possible values for cells.
C
mit
Hendrikto/Snake
515a641dacc9b445826646263f92bb4148963a25
test/CFrontend/2005-02-20-AggregateSAVEEXPR.c
test/CFrontend/2005-02-20-AggregateSAVEEXPR.c
// RUN: %llvmgcc %s -o /dev/null -S // Note: // We fail this on Sparc because the C library seems to be missing complex.h // and the corresponding C99 complex support. // // We could modify the test to use only GCC extensions, but I don't know if // that would change the nature of the test. // // XFAIL: sparc #include <complex.h> int foo(complex float c) { return creal(c); }
// RUN: %llvmgcc %s -o /dev/null -S // Note: // We fail this on Sparc because the C library seems to be missing complex.h // and the corresponding C99 complex support. // // We could modify the test to use only GCC extensions, but I don't know if // that would change the nature of the test. // // XFAIL: sparc #ifdef __CYGWIN__ #include <mingw/complex.h> #else #include <complex.h> #endif int foo(complex float c) { return creal(c); }
Make this testcase compatible with CYGWIN.
Make this testcase compatible with CYGWIN. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@44353 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm
126b631e22915e43dc41a6a62e6d29c88d9afc19
test/test_parser_empty.c
test/test_parser_empty.c
#include "test_parser_p.h" void empty_success(void **state) { grammar_t *grammar = grammar_init( non_terminal("Start"), rule_init("Start", empty()), 1); parse_t *result = parse("hello", grammar); assert_non_null(result); assert_int_equal(result->length, 0); assert_int_equal(result->n_children, 0); }
#include "test_parser_p.h" void empty_success(void **state) { grammar_t *grammar = grammar_init( non_terminal("Start"), rule_init("Start", empty()), 1); parse_result_t *result = parse("hello", grammar); assert_non_null(result); parse_t *suc = result->data.result; assert_int_equal(suc->length, 0); assert_int_equal(suc->n_children, 0); }
Use new API on empty tests
Use new API on empty tests
C
mit
Baltoli/peggo,Baltoli/peggo
9819e6f6db1beec8053584002d9573c496b17ea7
test/test-file.c
test/test-file.c
#include <glib.h> #include <glib/gstdio.h> #include <uuid/uuid.h> #include <wizbit/file.h> char *work_dir = "/tmp/wizbittest"; int main() { system ("rm -rf /tmp/wizbittest"); mkdir (work_dir,0700); chdir (work_dir); { struct wiz_file *file; wiz_vref vref; FILE *fp; file = wiz_file_open(WIZ_FILE_NEW, 0, 0); fp = wiz_file_get_handle(file); wiz_file_snapshot(file, vref); wiz_file_close(file); } return 0; }
#include <glib.h> #include <glib/gstdio.h> #include <uuid/uuid.h> #include <wizbit/file.h> char *work_dir = "/tmp/wizbittest"; int main() { system ("rm -rf /tmp/wizbittest"); mkdir (work_dir,0700); chdir (work_dir); { struct wiz_file *file; wiz_vref vref; FILE *fp; file = wiz_file_open(WIZ_FILE_NEW, 0, 0); fp = wiz_file_get_handle(file); fprintf(fp, "I BELIEVE"); wiz_file_snapshot(file, vref); wiz_file_close(file); } return 0; }
Test writing to temp file and making a snapshot
Test writing to temp file and making a snapshot
C
lgpl-2.1
wizbit-archive/wizbit,wizbit-archive/wizbit
5c8bed619e318e12f883f2e1df4773be68cae334
src/gamemaps_parser.h
src/gamemaps_parser.h
#ifndef GAMEMAPS_PARSER_H #define GAMEMAPS_PARSER_H #include <stdbool.h> #include <stddef.h> #include <stdint.h> /// /// Parses content of the map header file. /// /// \return `true` if successful, `false` otherwise /// bool parse_map_header( uint8_t *header, ///< [in] The content of the map header file size_t length, ///< [in] The length of the map header file uint32_t *level_pointers, ///< [out] The level pointers array size_t *level_pointers_length ///< [out] The length of the level pointers array ); #endif
#ifndef GAMEMAPS_PARSER_H #define GAMEMAPS_PARSER_H #include <stdbool.h> #include <stddef.h> #include <stdint.h> /// /// A structure representing a plane /// typedef struct { uint16_t *data; ///< Plane data size_t length; ///< The length of the plane data } plane_t; /// /// A structure representing a level /// typedef struct { plane_t *planes; ///< Planes size_t planes_num; ///< The number of planes uint16_t width; ///< The width of the level uint16_t height; ///< The height of the level uint8_t name[16]; ///< The name of the level } level_t; /// /// A structure representing map data /// typedef struct { level_t *levels; ///< Levels size_t levels_num; ///< The number of levels } map_data_t; /// /// Parses content of the map header file. /// /// \return `true` if successful, `false` otherwise /// bool parse_map_header( uint8_t *header, ///< [in] The content of the map header file size_t length, ///< [in] The length of the map header file uint32_t *level_pointers, ///< [out] The level pointers array size_t *level_pointers_length ///< [out] The length of the level pointers array ); /// /// Parses content of the map data file. /// /// \return `true` if successful, `false` otherwise /// bool parse_map_data( uint8_t *data, ///< [in] Raw map data size_t data_length, ///< [in] The length of the raw map data map_data_t *map_data ///< [out] Parsed map data ); #endif
Add some definitions required for parsing map data
Add some definitions required for parsing map data
C
mit
Xiyng/gamemaps-parser,Xiyng/gamemaps-parser
2bc87f4dd510a5d3e7f255de3af0e68042af60e9
messagebox.c
messagebox.c
#include <stdlib.h> #include <stdio.h> #include <errno.h> #include <windows.h> #define URL "https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505\ (v=vs.85).aspx" #define VERSION "0.1.0" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, LPSTR lpCmdLine, int nCmdShow) { LPWSTR *szArgList; int argCount; szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount); if (szArgList == NULL) { fprintf(stderr, "Unable to parse the command line.\n"); return 255; } if (argCount < 3 || argCount > 4) { fprintf(stderr, "Batch MessageBox v" VERSION "\n"); fprintf(stderr, "Usage: %ls message title [type]\n\n", szArgList[0]); fprintf(stderr, "Calls MessageBoxW() with the given arguments. See\n" URL "\nfor the possible values of \"type\". " "ERRORLEVEL is the return value or 255 on\nerror.\n"); return 255; } /* Ignore _wtoi errors. */ int type = _wtoi(szArgList[3]); int button = MessageBoxW(NULL, szArgList[1], szArgList[2], type); LocalFree(szArgList); return button; }
#undef __STRICT_ANSI__ #include <stdlib.h> #include <stdio.h> #include <errno.h> #include <windows.h> #define URL "https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505\ (v=vs.85).aspx" #define VERSION "0.1.0" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, LPSTR lpCmdLine, int nCmdShow) { LPWSTR *szArgList; int argCount; szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount); if (szArgList == NULL) { fprintf(stderr, "Unable to parse the command line.\n"); return 255; } if (argCount < 3 || argCount > 4) { fprintf(stderr, "Batch MessageBox v" VERSION "\n"); fprintf(stderr, "Usage: %ls message title [type]\n\n", szArgList[0]); fprintf(stderr, "Calls MessageBoxW() with the given arguments. See\n" URL "\nfor the possible values of \"type\". " "ERRORLEVEL is the return value or 255 on\nerror.\n"); return 255; } /* Ignore _wtoi errors. */ int type = _wtoi(szArgList[3]); int button = MessageBoxW(NULL, szArgList[1], szArgList[2], type); LocalFree(szArgList); return button; }
Fix warning about implicit declaration of _wtoi()
Fix warning about implicit declaration of _wtoi() Per http://0mg.hatenadiary.jp/entry/2015/08/25/172457.
C
mit
dbohdan/messagebox,dbohdan/messagebox
6888f7293c815a4cd4c313c1a9bf57cc95f7d043
Pod/Classes/MapperMacros/VOKManagedObjectMapperMacros.h
Pod/Classes/MapperMacros/VOKManagedObjectMapperMacros.h
// // VOKManagedObjectMapperMacros.h // Vokoder // // Copyright © 2016 Vokal. // #ifndef VOKManagedObjectMapperMacros_h #define VOKManagedObjectMapperMacros_h #import "VOKManagedObjectMap.h" #import <VOKKeyPathHelper.h> /** * Creates a map with the default date mapper. * * @param inputKeyPath The foreign key to match with the local key. * @param coreDataSelectorSymbol The local selector symbol. * @param klass The class on which the local selector symbol is defined. * * @return A VOKManagedObjectMap */ #ifndef VOKMapForeignToLocalClassProperty # define VOKMapForeignToLocalClassProperty(inputKeyPath, klass, coreDataSelectorSymbol) \ [VOKManagedObjectMap mapWithForeignKeyPath:inputKeyPath coreDataKey:VOKKeyForInstanceOf(klass, coreDataSelectorSymbol)] #endif /** * Creates a map with the default date mapper. * * @param inputKeyPath The foreign key to match with the local key. * @param coreDataSelectorSymbol The local selector symbol on the class of self. * * @return A VOKManagedObjectMap */ #ifndef VOKMapForeignToLocalForSelf # define VOKMapForeignToLocalForSelf(inputKeyPath, coreDataSelectorSymbol) \ [VOKManagedObjectMap mapWithForeignKeyPath:inputKeyPath coreDataKey:VOKKeyForSelf(coreDataSelectorSymbol)] #endif #endif /* VOKManagedObjectMapperMacros_h */
// // VOKManagedObjectMapperMacros.h // Vokoder // // Copyright © 2016 Vokal. // #ifndef VOKManagedObjectMapperMacros_h #define VOKManagedObjectMapperMacros_h #import "VOKManagedObjectMap.h" #import <VOKUtilities/VOKKeyPathHelper.h> /** * Creates a map with the default date mapper. * * @param inputKeyPath The foreign key to match with the local key. * @param coreDataSelectorSymbol The local selector symbol. * @param klass The class on which the local selector symbol is defined. * * @return A VOKManagedObjectMap */ #ifndef VOKMapForeignToLocalClassProperty # define VOKMapForeignToLocalClassProperty(inputKeyPath, klass, coreDataSelectorSymbol) \ [VOKManagedObjectMap mapWithForeignKeyPath:inputKeyPath coreDataKey:VOKKeyForInstanceOf(klass, coreDataSelectorSymbol)] #endif /** * Creates a map with the default date mapper. * * @param inputKeyPath The foreign key to match with the local key. * @param coreDataSelectorSymbol The local selector symbol on the class of self. * * @return A VOKManagedObjectMap */ #ifndef VOKMapForeignToLocalForSelf # define VOKMapForeignToLocalForSelf(inputKeyPath, coreDataSelectorSymbol) \ [VOKManagedObjectMap mapWithForeignKeyPath:inputKeyPath coreDataKey:VOKKeyForSelf(coreDataSelectorSymbol)] #endif #endif /* VOKManagedObjectMapperMacros_h */
Include VOKKeyPathHelper.h as a module header
Include VOKKeyPathHelper.h as a module header
C
mit
vokal/Vokoder,vokal/Vokoder,designatednerd/Vokoder,vokal/Vokoder,designatednerd/Vokoder,brockboland/Vokoder,brockboland/Vokoder,brockboland/Vokoder,designatednerd/Vokoder,vokal/Vokoder,designatednerd/Vokoder,brockboland/Vokoder,brockboland/Vokoder
ad42e08ce166b18f20f0346c5a2bb6a6f107c5fb
integer-multiplication/recursive.c
integer-multiplication/recursive.c
#include <stdlib.h> #include <stdio.h> #include <string.h> int* toInt(char * s, int len){ int * arr = malloc(sizeof(char) * len); int i = 0; for(i = 0; i < len; i++) { arr[i] = s[i] - '0'; } return arr; } int main(int argc, char *argv[]) { int n1_len = strlen(argv[1]); int n2_len = strlen(argv[2]); int * n1 = toInt(argv[1], n1_len); int * n2 = toInt(argv[2], n2_len); free(n2); free(n1); return 0; }
#include <stdlib.h> #include <stdio.h> #include <string.h> int* toInt(char * s, int len){ int * arr = malloc(sizeof(int) * len); int i = 0; for(i = 0; i < len; i++) { arr[i] = s[i] - '0'; } return arr; } int** getabcd(int *arr1, int *arr2, int len1, int len2){ int i,j; int *a = malloc(sizeof(int*) * (len1 / 2)); int *b = malloc(sizeof(int*) * (len1 / 2 + (len1 % 2))); int *c = malloc(sizeof(int*) * (len2 / 2)); int *d = malloc(sizeof(int*) * (len2 / 2 + (len2 % 2))); int **abcd = malloc(sizeof(int*) * 4); for(i = 0; i < len1/2; i++){ a[i] = arr1[i]; b[i] = arr1[i+len1/2]; } if (len1 % 2) { b[i] = arr1[len1 - 1]; } for(i = 0; i < len2/2; i++){ c[i] = arr2[i]; d[i] = arr2[i+len2/2]; } if (len2 % 2) { d[i] = arr2[len2 - 1]; } abcd = (int*[4]){a,b,c,d}; return abcd; } int main(int argc, char *argv[]) { int n1_len = strlen(argv[1]); int n2_len = strlen(argv[2]); int * n1 = toInt(argv[1], n1_len); int * n2 = toInt(argv[2], n2_len); int i,j; int **abcd = getabcd(n1, n2, n1_len, n2_len); free(n2); free(n1); return 0; }
Split int arrays into 4 smaller int arrays
Split int arrays into 4 smaller int arrays Managed to split int arrays into 4 smaller int arrays representing a, b, c, and d, and return as an array of these 4 arrays. Am not sure this is the best way to go about this anymore...
C
mit
timpel/stanford-algs,timpel/stanford-algs
5c110dd17a8e122bf2fe297c41b30e848e934549
src/runtime/main.c
src/runtime/main.c
#include <stdio.h> #include <string.h> #include <time.h> #include <orbit/orbit.h> int main(int argc, const char** argv) { if(argc < 2) { fprintf(stderr, "error: no input module file.\n"); return -1; } OrbitVM* vm = orbit_vmNew(); if(orbit_vmInvoke(vm, argv[1], "main")) { fprintf(stderr, "error: interpreter error\n"); } orbit_vmDealloc(vm); }
#include <stdio.h> #include <string.h> #include <time.h> #include <orbit/orbit.h> int main(int argc, const char** argv) { if(argc < 2) { fprintf(stderr, "error: no input module file.\n"); return -1; } OrbitVM* vm = orbit_vmNew(); if(!orbit_vmInvoke(vm, argv[1], "main")) { fprintf(stderr, "error: interpreter error\n"); } orbit_vmDealloc(vm); }
Fix wrong success check in runtime cli
Fix wrong success check in runtime cli
C
mit
amyinorbit/orbitvm,amyinorbit/orbitvm,cesarparent/orbitvm,amyinorbit/orbitvm,cesarparent/orbitvm
954ca58264801b7a4cac4b3bc53d0bd01feaca92
include/GL.h
include/GL.h
#ifndef _GL_H_ #define _GL_H_ #if defined __APPLE__ #include <OpenGLES/ES3/gl.h> #include <OpenGLES/ES3/glext.h> #elif defined GL_ES #include <GLES3/gl3.h> #include <EGL/egl.h> #include <EGL/eglext.h> #else #define GL_GLEXT_PROTOTYPES #ifdef WIN32 #include <GL/glew.h> #include <windows.h> #endif #ifdef __ANDROID__ #include <GLES3/gl3.h> #include <GLES3/gl3ext.h> #else #include <GL/gl.h> #ifdef _WIN32 #include "../system/win32/glext.h" #else #include <GL/glext.h> #endif #endif #endif #endif
#ifndef _GL_H_ #define _GL_H_ #if defined __APPLE__ #include <OpenGLES/ES2/gl.h> #include <OpenGLES/ES2/glext.h> #elif defined GL_ES #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include <EGL/egl.h> #include <EGL/eglext.h> #include <importgl.h> #else //#define GL_GLEXT_PROTOTYPES #ifdef WIN32 #include <GL/glew.h> #include <windows.h> #endif #ifdef __ANDROID__ #include <importgl.h> #else #include <GL/gl.h> #ifdef _WIN32 #include "../system/win32/glext.h" #else #include <GL/glext.h> #endif #endif #endif #endif
Remove gl includes from __ANDROID__
Remove gl includes from __ANDROID__
C
mit
Sometrik/framework,Sometrik/framework,Sometrik/framework
307265aaabc5d61e1aa3add68f87911e003a85fa
support/c/idris_directory.h
support/c/idris_directory.h
#ifndef __IDRIS_DIRECTORY_H #define __IDRIS_DIRECTORY_H char* idris2_currentDirectory(); int idris2_changeDir(char* dir); int idris2_createDir(char* dir); void* idris2_openDir(char* dir); void idris2_dirClose(void* d); char* idris2_nextDirEntry(void* d); #endif
#ifndef __IDRIS_DIRECTORY_H #define __IDRIS_DIRECTORY_H char* idris2_currentDirectory(); int idris2_changeDir(char* dir); int idris2_createDir(char* dir); void* idris2_openDir(char* dir); void idris2_closeDIr(void* d); int idris2_removeDir(char* path); char* idris2_nextDirEntry(void* d); #endif
Update C support header files
Update C support header files
C
bsd-3-clause
mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm
5b1265c575dcaa7f8d424f7e6cfdb956ee048dff
src/Methcla/Utility/Macros.h
src/Methcla/Utility/Macros.h
// Copyright 2012-2013 Samplecount S.L. // // 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 METHCLA_UTILITY_MACROS_H_INCLUDED #define METHCLA_UTILITY_MACROS_H_INCLUDED #if defined(__GNUC__) # define METHCLA_WITHOUT_WARNINGS_BEGIN \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-private-field\"") # define METHCLA_WITHOUT_WARNINGS_END _Pragma("GCC diagnostic pop") #else # define METHCLA_WITHOUT_WARNINGS_BEGIN # define METHCLA_WITHOUT_WARNINGS_END #endif #endif // METHCLA_UTILITY_MACROS_H_INCLUDED
// Copyright 2012-2013 Samplecount S.L. // // 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 METHCLA_UTILITY_MACROS_H_INCLUDED #define METHCLA_UTILITY_MACROS_H_INCLUDED #if defined(__GNUC__) # if __GNUC__ > 4 # define METHCLA_WITHOUT_WARNINGS_BEGIN \ _Pragma("GCC diagnostic push") _Pragma( \ "GCC diagnostic ignored \"-Wunused-parameter\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-private-field\"") # define METHCLA_WITHOUT_WARNINGS_END _Pragma("GCC diagnostic pop") # else # define METHCLA_WITHOUT_WARNINGS_BEGIN \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") # define METHCLA_WITHOUT_WARNINGS_END _Pragma("GCC diagnostic pop") # endif #else # define METHCLA_WITHOUT_WARNINGS_BEGIN # define METHCLA_WITHOUT_WARNINGS_END #endif #endif // METHCLA_UTILITY_MACROS_H_INCLUDED
Remove -Wunused-private-field from pragma for gcc <= 4
Remove -Wunused-private-field from pragma for gcc <= 4
C
apache-2.0
samplecount/methcla,samplecount/methcla,samplecount/methcla,samplecount/methcla,samplecount/methcla,samplecount/methcla
6bc5a1e26fadb438c8363d60b7d60a790870c3c2
test2/structs/lvalue/cant.c
test2/structs/lvalue/cant.c
// RUN: %check -e %s main() { struct A { int i; } a, b, c; a = b ? : c; // CHECK: error: struct involved in if-expr }
// RUN: %check -e %s main() { struct A { int i; } a, b, c; a = b ? : c; // CHECK: error: struct involved in ?: }
Fix struct if-expression test warning
Fix struct if-expression test warning
C
mit
8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler
793459cf8a68ef3e596211bc81d8003880d1d6ba
Application/MIDASDesktop/GUI/ResourceEdit.h
Application/MIDASDesktop/GUI/ResourceEdit.h
#ifndef __ResourceEdit_H #define __ResourceEdit_H #include "midasLogAware.h" #include "midasResourceDescTable.h" #include <QObject> class midasDatabaseProxy; class QTableWidgetItem; namespace mdo { class Community; class Collection; class Item; class Bitstream; }; class ResourceEdit : public QObject, public midasLogAware { Q_OBJECT public: ResourceEdit(midasDatabaseProxy* database); ~ResourceEdit(); void Save(QTableWidgetItem* row); signals: void DataModified(std::string uuid); protected: void SaveCommunity(mdo::Community*, MIDASFields, std::string data); void SaveCollection(mdo::Collection*, MIDASFields, std::string data); void SaveItem(mdo::Item*, MIDASFields, std::string data); void SaveBitstream(mdo::Bitstream*, MIDASFields, std::string data); midasDatabaseProxy* m_database; }; #endif
#ifndef __ResourceEdit_H #define __ResourceEdit_H #include "midasLogAware.h" #include "MidasResourceDescTable.h" #include <QObject> class midasDatabaseProxy; class QTableWidgetItem; namespace mdo { class Community; class Collection; class Item; class Bitstream; }; class ResourceEdit : public QObject, public midasLogAware { Q_OBJECT public: ResourceEdit(midasDatabaseProxy* database); ~ResourceEdit(); void Save(QTableWidgetItem* row); signals: void DataModified(std::string uuid); protected: void SaveCommunity(mdo::Community*, MIDASFields, std::string data); void SaveCollection(mdo::Collection*, MIDASFields, std::string data); void SaveItem(mdo::Item*, MIDASFields, std::string data); void SaveBitstream(mdo::Bitstream*, MIDASFields, std::string data); midasDatabaseProxy* m_database; }; #endif
Fix wrong case bug causing compile error on unix platforms
BUG: Fix wrong case bug causing compile error on unix platforms SVN-Revision: 2901
C
apache-2.0
cpatrick/MidasClient,cpatrick/MidasClient,cpatrick/MidasClient
5c52d60804ea39834ef024923d4286fb7464eefa
ir/ana/execfreq_t.h
ir/ana/execfreq_t.h
/* * This file is part of libFirm. * Copyright (C) 2012 University of Karlsruhe. */ /** * @file * @brief Compute an estimate of basic block executions. * @author Adam M. Szalkowski * @date 28.05.2006 */ #ifndef FIRM_ANA_EXECFREQ_T_H #define FIRM_ANA_EXECFREQ_T_H #include "execfreq.h" void init_execfreq(void); void exit_execfreq(void); void set_block_execfreq(ir_node *block, double freq); typedef struct ir_execfreq_int_factors { double max; double min_non_zero; double m, b; } ir_execfreq_int_factors; void ir_calculate_execfreq_int_factors(ir_execfreq_int_factors *factors, ir_graph *irg); int get_block_execfreq_int(const ir_execfreq_int_factors *factors, const ir_node *block); #endif
/* * This file is part of libFirm. * Copyright (C) 2012 University of Karlsruhe. */ /** * @file * @brief Compute an estimate of basic block executions. * @author Adam M. Szalkowski * @date 28.05.2006 */ #ifndef FIRM_ANA_EXECFREQ_T_H #define FIRM_ANA_EXECFREQ_T_H #include "execfreq.h" void init_execfreq(void); void exit_execfreq(void); void set_block_execfreq(ir_node *block, double freq); typedef struct ir_execfreq_int_factors { double min_non_zero; double m, b; } ir_execfreq_int_factors; void ir_calculate_execfreq_int_factors(ir_execfreq_int_factors *factors, ir_graph *irg); int get_block_execfreq_int(const ir_execfreq_int_factors *factors, const ir_node *block); #endif
Remove unused attribute max from int_factors.
execfreq: Remove unused attribute max from int_factors.
C
lgpl-2.1
MatzeB/libfirm,jonashaag/libfirm,libfirm/libfirm,killbug2004/libfirm,killbug2004/libfirm,libfirm/libfirm,jonashaag/libfirm,8l/libfirm,jonashaag/libfirm,killbug2004/libfirm,MatzeB/libfirm,davidgiven/libfirm,libfirm/libfirm,davidgiven/libfirm,davidgiven/libfirm,killbug2004/libfirm,killbug2004/libfirm,davidgiven/libfirm,davidgiven/libfirm,MatzeB/libfirm,libfirm/libfirm,killbug2004/libfirm,killbug2004/libfirm,davidgiven/libfirm,8l/libfirm,jonashaag/libfirm,jonashaag/libfirm,MatzeB/libfirm,8l/libfirm,MatzeB/libfirm,libfirm/libfirm,davidgiven/libfirm,8l/libfirm,jonashaag/libfirm,MatzeB/libfirm,8l/libfirm,MatzeB/libfirm,jonashaag/libfirm,8l/libfirm,8l/libfirm
74201b3f0de435b167786fe31159f9217e860a79
Lagrangian/L3TestResult.h
Lagrangian/L3TestResult.h
// L3TestResult.h // Created by Rob Rix on 2012-11-12. // Copyright (c) 2012 Rob Rix. All rights reserved. #import <Foundation/Foundation.h> @interface L3TestResult : NSObject +(instancetype)testResultWithName:(NSString *)name startDate:(NSDate *)startDate; @property (strong, nonatomic) L3TestResult *parent; // this really only exists to make stacks easier; nil it out on pop or you get retain cycles @property (copy, nonatomic, readonly) NSString *name; @property (strong, nonatomic, readonly) NSDate *startDate; @property (assign, nonatomic) NSTimeInterval duration; @property (assign, nonatomic) NSUInteger testCaseCount; @property (assign, nonatomic) NSUInteger assertionCount; @property (assign, nonatomic) NSUInteger assertionFailureCount; @property (assign, nonatomic) NSUInteger exceptionCount; @property (nonatomic, readonly) bool succeeded; @property (nonatomic, readonly) bool failed; @property (nonatomic, readonly) NSArray *testResults; -(void)addTestResult:(L3TestResult *)testResult; @end
// L3TestResult.h // Created by Rob Rix on 2012-11-12. // Copyright (c) 2012 Rob Rix. All rights reserved. #import <Foundation/Foundation.h> @interface L3TestResult : NSObject +(instancetype)testResultWithName:(NSString *)name startDate:(NSDate *)startDate; @property (strong, nonatomic) L3TestResult *parent; // this really only exists to make stacks easier; nil it out on pop or you get retain cycles @property (copy, nonatomic, readonly) NSString *name; @property (strong, nonatomic, readonly) NSDate *startDate; @property (strong, nonatomic) NSDate *endDate; @property (assign, nonatomic) NSTimeInterval duration; @property (assign, nonatomic) NSUInteger testCaseCount; @property (assign, nonatomic) NSUInteger assertionCount; @property (assign, nonatomic) NSUInteger assertionFailureCount; @property (assign, nonatomic) NSUInteger exceptionCount; @property (nonatomic, readonly) bool succeeded; @property (nonatomic, readonly) bool failed; @property (nonatomic, readonly) NSArray *testResults; -(void)addTestResult:(L3TestResult *)testResult; @end
Test results have an end date.
Test results have an end date.
C
bsd-3-clause
ashfurrow/RXCollections,robrix/RXCollections,policp/RXCollections,ashfurrow/RXCollections,robrix/RXCollections,policp/RXCollections,robrix/Lagrangian,robrix/Lagrangian,robrix/RXCollections,robrix/Lagrangian,policp/RXCollections
eebacb19cbe5109354aa877ba4c83b79164cfc5c
examples/foo.h
examples/foo.h
/* -*- C++ -*- */ #ifndef FOO_H_ # define FOO_H_ #include <string> int print_something(const char *message); int print_something_else(const char *message2); class SomeObject { std::string m_prefix; public: SomeObject (std::string const prefix) : m_prefix (prefix) {} int add_prefix (std::string& message) { message = m_prefix + message; return message.size(); } }; #endif /* !FOO_H_ */
// -*- Mode: C++; c-file-style: "stroustrup"; indent-tabs-mode:nil; -*- #ifndef FOO_H_ # define FOO_H_ #include <string> // Yes, this code is stupid, I know; it is only meant as an example! int print_something(const char *message); int print_something_else(const char *message2); class Foo { std::string m_datum; public: Foo () : m_datum ("") {} Foo (std::string datum) : m_datum (datum) {} std::string get_datum () const { return m_datum; } Foo (Foo const & other) : m_datum (other.get_datum ()) {} }; class Bar : public Foo { }; class SomeObject { std::string m_prefix; Foo m_foo_value; Foo *m_foo_ptr; Foo *m_foo_shared_ptr; public: SomeObject (std::string const prefix) : m_prefix (prefix), m_foo_ptr (0), m_foo_shared_ptr (0) {} int add_prefix (std::string& message) { message = m_prefix + message; return message.size (); } // pass by value, direction=in void set_foo_value (Foo foo) { m_foo_value = foo; } // pass by reference, direction=in void set_foo_ref (Foo& foo) { m_foo_value = foo; } // pass by reference, direction=out void peek_foo_ref (Foo& foo) { foo = m_foo_value; } // pass by pointer, direction=in, transfers ownership void set_foo_ptr (Foo *foo) { if (m_foo_ptr) delete m_foo_ptr; m_foo_ptr = foo; } // pass by pointer, direction=in, doesn't transfer ownership void set_foo_shared_ptr (Foo *foo) { m_foo_shared_ptr = foo; } // return value Foo get_foo_value () { return m_foo_value; } // return pointer, caller doesn't own return Foo * get_foo_shared_ptr () { return m_foo_shared_ptr; } // return pointer, caller owns return Foo * get_foo_ptr () { Foo *foo = m_foo_ptr; m_foo_ptr = NULL; return foo; } }; #endif /* !FOO_H_ */
Add example interfaces to test a bunch of new stuff (c++ subclassing, class parameter handling)
Add example interfaces to test a bunch of new stuff (c++ subclassing, class parameter handling)
C
lgpl-2.1
cawka/pybindgen-old,cawka/pybindgen-old,gjcarneiro/pybindgen,gjcarneiro/pybindgen,gjcarneiro/pybindgen,ftalbrecht/pybindgen,gjcarneiro/pybindgen,ftalbrecht/pybindgen,ftalbrecht/pybindgen,ftalbrecht/pybindgen,cawka/pybindgen-old,cawka/pybindgen-old
837f1bd12b5c80446bf0ee243303c66d37c6a69e
ndb/src/common/portlib/NdbSleep.c
ndb/src/common/portlib/NdbSleep.c
/* Copyright (C) 2003 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <ndb_global.h> #include <NdbSleep.h> int NdbSleep_MilliSleep(int milliseconds){ int result = 0; struct timespec sleeptime; sleeptime.tv_sec = milliseconds / 1000; sleeptime.tv_nsec = (milliseconds - (sleeptime.tv_sec * 1000)) * 1000000; result = nanosleep(&sleeptime, NULL); return result; } int NdbSleep_SecSleep(int seconds){ int result = 0; result = sleep(seconds); return result; }
/* Copyright (C) 2003 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <ndb_global.h> #include <my_sys.h> #include <NdbSleep.h> int NdbSleep_MilliSleep(int milliseconds){ my_sleep(milliseconds*1000); return 0; #if 0 int result = 0; struct timespec sleeptime; sleeptime.tv_sec = milliseconds / 1000; sleeptime.tv_nsec = (milliseconds - (sleeptime.tv_sec * 1000)) * 1000000; result = nanosleep(&sleeptime, NULL); return result; #endif } int NdbSleep_SecSleep(int seconds){ int result = 0; result = sleep(seconds); return result; }
Use my_sleep instead of nanosleep for portability
Use my_sleep instead of nanosleep for portability
C
lgpl-2.1
ollie314/server,davidl-zend/zenddbi,flynn1973/mariadb-aix,flynn1973/mariadb-aix,davidl-zend/zenddbi,flynn1973/mariadb-aix,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,ollie314/server,flynn1973/mariadb-aix,davidl-zend/zenddbi,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,flynn1973/mariadb-aix,natsys/mariadb_10.2,flynn1973/mariadb-aix,ollie314/server,flynn1973/mariadb-aix,natsys/mariadb_10.2,flynn1973/mariadb-aix,davidl-zend/zenddbi,ollie314/server,natsys/mariadb_10.2,natsys/mariadb_10.2,davidl-zend/zenddbi,natsys/mariadb_10.2,slanterns/server,ollie314/server,natsys/mariadb_10.2,natsys/mariadb_10.2,flynn1973/mariadb-aix,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,davidl-zend/zenddbi,ollie314/server,flynn1973/mariadb-aix,ollie314/server,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,flynn1973/mariadb-aix,davidl-zend/zenddbi
6380b46ab02851ab8ab0071695f395fc20246f4c
apps/libs/gpio.h
apps/libs/gpio.h
#ifndef _GPIO_H #define _GPIO_H #include <unistd.h> #include "tock.h" #define GPIO_DRIVER_NUM 1 #ifdef __cplusplus extern "C" { #endif // GPIO pin enum is defined externally in platform headers enum GPIO_Pin_enum; typedef enum GPIO_Pin_enum GPIO_Pin_t; typedef enum { PullUp=0, PullDown, PullNone, } GPIO_InputMode_t; typedef enum { Change=0, RisingEdge, FallingEdge, } GPIO_InterruptMode_t; int gpio_enable_output(GPIO_Pin_t pin); int gpio_set(GPIO_Pin_t pin); int gpio_clear(GPIO_Pin_t pin); int gpio_toggle(GPIO_Pin_t pin); int gpio_enable_input(GPIO_Pin_t pin, GPIO_InputMode_t pin_config); int gpio_read(GPIO_Pin_t pin); int gpio_enable_interrupt(GPIO_Pin_t pin, GPIO_InputMode_t pin_config, GPIO_InterruptMode_t irq_config); int gpio_disable_interrupt(GPIO_Pin_t pin); int gpio_disable(GPIO_Pin_t pin); int gpio_interrupt_callback(subscribe_cb callback, void* callback_args); #ifdef __cplusplus } #endif #endif // _GPIO_H
#ifndef _GPIO_H #define _GPIO_H #include <unistd.h> #include "tock.h" #include "firestorm.h" #define GPIO_DRIVER_NUM 1 #ifdef __cplusplus extern "C" { #endif // GPIO pin enum is defined externally in platform headers enum GPIO_Pin_enum; typedef enum GPIO_Pin_enum GPIO_Pin_t; typedef enum { PullUp=0, PullDown, PullNone, } GPIO_InputMode_t; typedef enum { Change=0, RisingEdge, FallingEdge, } GPIO_InterruptMode_t; int gpio_enable_output(GPIO_Pin_t pin); int gpio_set(GPIO_Pin_t pin); int gpio_clear(GPIO_Pin_t pin); int gpio_toggle(GPIO_Pin_t pin); int gpio_enable_input(GPIO_Pin_t pin, GPIO_InputMode_t pin_config); int gpio_read(GPIO_Pin_t pin); int gpio_enable_interrupt(GPIO_Pin_t pin, GPIO_InputMode_t pin_config, GPIO_InterruptMode_t irq_config); int gpio_disable_interrupt(GPIO_Pin_t pin); int gpio_disable(GPIO_Pin_t pin); int gpio_interrupt_callback(subscribe_cb callback, void* callback_args); #ifdef __cplusplus } #endif #endif // _GPIO_H
Make GPIO_Pin_t type work by including firestorm.h
Make GPIO_Pin_t type work by including firestorm.h This isn't good long-term. The gpio driver should not have to depend on a specific platform
C
apache-2.0
google/tock-on-titan,google/tock-on-titan,google/tock-on-titan
4feae9f90bc7a483c54103d5bfdc9b1c231624ca
tests/regression/01-cpa/35-intervals.c
tests/regression/01-cpa/35-intervals.c
// PARAM: --enable ana.int.interval --disable ana.int.def_exc --disable ana.int.enums void main(){ int n = 7; for (; n; n--) { assert(n==1); // UNKNOWN! } int i; if(i-1){ assert(i==2); // UNKNOWN } return; }
// PARAM: --enable ana.int.interval --disable ana.int.def_exc --disable ana.int.enums void main(){ int n = 7; for (; n; n--) { assert(n==1); // UNKNOWN! } int i; if(i-1){ assert(i==2); // UNKNOWN! } return; }
Fix tests 01/35: Any int != 0 evaluates to true
Fix tests 01/35: Any int != 0 evaluates to true
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
39a74c1552c74910eaac60ed8574ef34e5e5ad5c
src/c/main.c
src/c/main.c
/* * Copyright (c) 2016 Jan Hoffmann * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "windows/main_window.h" #include <pebble.h> static void init(void) { main_window_push(); } static void deinit(void) { } int main(void) { init(); app_event_loop(); deinit(); }
/* * Copyright (c) 2016 Jan Hoffmann * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "lib/data.h" #include "windows/main_window.h" #include <pebble.h> static void init(void) { if (data_init_receiver()) { main_window_push(); } } # ifndef PBL_PLATFORM_APLITE static void app_glance_reload_callback(AppGlanceReloadSession *session, size_t limit, void *context) { size_t count = data_get_fast_seller_count(); if (limit < count) { count = limit; } AppGlanceSlice slice = (AppGlanceSlice) {}; slice.layout.icon = APP_GLANCE_SLICE_DEFAULT_ICON; data_fast_seller *fast_seller; for (unsigned int i = 0; i < count; i++) { fast_seller = data_get_fast_seller(i); slice.layout.subtitle_template_string = fast_seller->title; slice.expiration_time = fast_seller->date; AppGlanceResult result = app_glance_add_slice(session, slice); if (result != APP_GLANCE_RESULT_SUCCESS) { APP_LOG(APP_LOG_LEVEL_ERROR, "Failed to add app glance slice: %d", result); } } data_deinit(); } #endif static void deinit(void) { # ifndef PBL_PLATFORM_APLITE if (data_get_fast_seller_count() > 0) { app_glance_reload(app_glance_reload_callback, NULL); } else { data_deinit(); } # else data_deinit(); # endif } int main(void) { init(); app_event_loop(); deinit(); }
Set fast sellers as app glance on supported watches
Set fast sellers as app glance on supported watches
C
mpl-2.0
janh/mensa-stuttgart,janh/mensa-stuttgart,janh/mensa-stuttgart,janh/mensa-stuttgart
14cf94eed81468759bb7b2ab084837f656059407
stdafx.h
stdafx.h
// precompiled header /* * * Author: septimomend (Ivan Chapkailo) * * 27.06.2017 * */ #define _DEFAULT_SOURCE #define _BSD_SOURCE #define _GNU_SOURCE #include <ctype.h> #include <errno.h> #include <fcntl.h> #include <stdio.h> #include <stdarg.h> #include <stdlib.h> #include <string.h> #include <sys/ioctl.h> #include <sys/types.h> #include <termios.h> #include <time.h> #include <unistd.h>
// precompiled header /* * * Author: septimomend (Ivan Chapkailo) * * 27.06.2017 * */ #define _DEFAULT_SOURCE #define _BSD_SOURCE #define _GNU_SOURCE #include <ctype.h> #include <errno.h> #include <fcntl.h> #include <iostream> #include <stdarg.h> #include <cstdlib> #include <string> #include <sys/ioctl.h> #include <sys/types.h> #include <termios.h> #include <ctime> #include <unistd.h> // defines #define SEPT_CPP_EDITOR_VERSION "0.0.1" #define SEPT_TAB_STOP 8 #define SEPT_QUIT_TIMES 2 // click times for exit #define CTRL_KEY(k) ((k) & 0x1f) enum keys { BACKSPACE = 127, ARROW_LEFT = 1000, ARROW_RIGHT, ARROW_UP, ARROW_DOWN, DELETE_KEY, HOME_KEY, END_KEY, PAGE_UP, PAGE_DOWN }; enum colorful { HL_NORMAL = 0, HL_COMMENT, HL_MLCOMMENT, HL_KEYWORD1, HL_KEYWORD2, HL_STRING, HL_NUMBER, HL_MATCH };
Update precompiled header -- added defines
Update precompiled header -- added defines
C
mit
septimomend/UNIX-C-Text-Editor,septimomend/UNIX-C-Text-Editor
7bfdc0e00b77c05fe0de79da3eaa6b0009418926
PWG3/PWG3baseLinkDef.h
PWG3/PWG3baseLinkDef.h
#ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class AliQuarkoniaAcceptance+; #pragma link C++ class AliQuarkoniaEfficiency+; #pragma link C++ class AliD0toKpi+; #pragma link C++ class AliD0toKpiAnalysis+; #pragma link C++ class AliBtoJPSItoEle+; #pragma link C++ class AliBtoJPSItoEleAnalysis+; #pragma link C++ class AliAODRecoDecayHF+; #pragma link C++ class AliAODRecoDecayHF2Prong+; #pragma link C++ class AliAODRecoDecayHF3Prong+; #pragma link C++ class AliAODRecoDecayHF4Prong+; #pragma link C++ class AliAnalysisVertexingHF+; #pragma link C++ class AliAnalysisTaskVertexingHF+; #pragma link C++ class AliAODDimuon+; #pragma link C++ class AliAODEventInfo+; #pragma link C++ class AliAnalysisTaskMuonAODfromGeneral+; #pragma link C++ class AliAnalysisTaskSingleMu+; #endif
#ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class AliQuarkoniaAcceptance+; #pragma link C++ class AliQuarkoniaEfficiency+; #pragma link C++ class AliAODRecoDecayHF+; #pragma link C++ class AliAODRecoDecayHF2Prong+; #pragma link C++ class AliAODRecoDecayHF3Prong+; #pragma link C++ class AliAODRecoDecayHF4Prong+; #pragma link C++ class AliAnalysisVertexingHF+; #pragma link C++ class AliAnalysisTaskVertexingHF+; #pragma link C++ class AliAODDimuon+; #pragma link C++ class AliAODEventInfo+; #pragma link C++ class AliAnalysisTaskMuonAODfromGeneral+; #pragma link C++ class AliAnalysisTaskSingleMu+; #endif
Move AliD0toKpi* and AliBtoJPSI* from libPWG3base to libPWG3 (Andrea)
Move AliD0toKpi* and AliBtoJPSI* from libPWG3base to libPWG3 (Andrea)
C
bsd-3-clause
mkrzewic/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,shahor02/AliRoot,ecalvovi/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,alisw/AliRoot,sebaleh/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot,miranov25/AliRoot,alisw/AliRoot,jgrosseo/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,ecalvovi/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,coppedis/AliRoot,miranov25/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,miranov25/AliRoot,coppedis/AliRoot,mkrzewic/AliRoot,coppedis/AliRoot,shahor02/AliRoot,miranov25/AliRoot,ecalvovi/AliRoot,shahor02/AliRoot,sebaleh/AliRoot,alisw/AliRoot,alisw/AliRoot,shahor02/AliRoot,miranov25/AliRoot,shahor02/AliRoot,ALICEHLT/AliRoot,ALICEHLT/AliRoot,coppedis/AliRoot,alisw/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,ALICEHLT/AliRoot
66122432b36ed35ec40499d2d93fc51fa02c20e0
STRUCT/STRUCTLinkDef.h
STRUCT/STRUCTLinkDef.h
#ifdef __CINT__ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class AliBODY; #pragma link C++ class AliMAG; #pragma link C++ class AliABSO; #pragma link C++ class AliDIPO; #pragma link C++ class AliDIPOv1; #pragma link C++ class AliDIPOv2; #pragma link C++ class AliFRAME; #pragma link C++ class AliFRAMEv0; #pragma link C++ class AliFRAMEv1; #pragma link C++ class AliHALL; #pragma link C++ class AliPIPE; #pragma link C++ class AliPIPEv0; #pragma link C++ class AliPIPEv1; #pragma link C++ class AliPIPEv3; #pragma link C++ class AliSHIL; #endif
#ifdef __CINT__ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class AliBODY; #pragma link C++ class AliMAG; #pragma link C++ class AliABSO; #pragma link C++ class AliABSOv0; #pragma link C++ class AliDIPO; #pragma link C++ class AliDIPOv1; #pragma link C++ class AliDIPOv2; #pragma link C++ class AliFRAME; #pragma link C++ class AliFRAMEv0; #pragma link C++ class AliFRAMEv1; #pragma link C++ class AliHALL; #pragma link C++ class AliPIPE; #pragma link C++ class AliPIPEv0; #pragma link C++ class AliPIPEv1; #pragma link C++ class AliPIPEv3; #pragma link C++ class AliSHIL; #pragma link C++ class AliSHILv0; #endif
Add new classes to LinkDef
Add new classes to LinkDef
C
bsd-3-clause
coppedis/AliRoot,ALICEHLT/AliRoot,coppedis/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,alisw/AliRoot,miranov25/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,ecalvovi/AliRoot,jgrosseo/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,shahor02/AliRoot,coppedis/AliRoot,miranov25/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,sebaleh/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,coppedis/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,ALICEHLT/AliRoot,ecalvovi/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,alisw/AliRoot,shahor02/AliRoot,sebaleh/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,coppedis/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,ecalvovi/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,alisw/AliRoot,jgrosseo/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,alisw/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot
86ee240a4a6a958b4728b3613ce05edd884caf45
sway/commands/floating_modifier.c
sway/commands/floating_modifier.c
#include "strings.h" #include "sway/commands.h" #include "sway/config.h" #include "sway/input/keyboard.h" struct cmd_results *cmd_floating_modifier(int argc, char **argv) { struct cmd_results *error = NULL; if ((error = checkarg(argc, "floating_modifier", EXPECTED_AT_LEAST, 1))) { return error; } uint32_t mod = get_modifier_mask_by_name(argv[0]); if (!mod) { return cmd_results_new(CMD_INVALID, "Invalid modifier"); } if (argc == 1 || strcasecmp(argv[1], "normal") == 0) { config->floating_mod_inverse = false; } else if (strcasecmp(argv[1], "inverse") == 0) { config->floating_mod_inverse = true; } else { return cmd_results_new(CMD_INVALID, "Usage: floating_modifier <mod> [inverse|normal]"); } config->floating_mod = mod; return cmd_results_new(CMD_SUCCESS, NULL); }
#include "strings.h" #include "sway/commands.h" #include "sway/config.h" #include "sway/input/keyboard.h" struct cmd_results *cmd_floating_modifier(int argc, char **argv) { struct cmd_results *error = NULL; if ((error = checkarg(argc, "floating_modifier", EXPECTED_AT_LEAST, 1))) { return error; } if (strcasecmp(argv[0], "none") == 0) { config->floating_mod = 0; return cmd_results_new(CMD_SUCCESS, NULL); } uint32_t mod = get_modifier_mask_by_name(argv[0]); if (!mod) { return cmd_results_new(CMD_INVALID, "Invalid modifier"); } if (argc == 1 || strcasecmp(argv[1], "normal") == 0) { config->floating_mod_inverse = false; } else if (strcasecmp(argv[1], "inverse") == 0) { config->floating_mod_inverse = true; } else { return cmd_results_new(CMD_INVALID, "Usage: floating_modifier <mod> [inverse|normal]"); } config->floating_mod = mod; return cmd_results_new(CMD_SUCCESS, NULL); }
Add ability to remove the floating modifier
Add ability to remove the floating modifier
C
mit
ascent12/sway,1ace/sway,1ace/sway,SirCmpwn/sway,1ace/sway,ascent12/sway,ascent12/sway
2b33ac168c6e252e441f9b0a547d2bf18c153984
Squirrel/SQRLInstaller+Private.h
Squirrel/SQRLInstaller+Private.h
// // SQRLInstaller+Private.h // Squirrel // // Created by Justin Spahr-Summers on 2013-11-19. // Copyright (c) 2013 GitHub. All rights reserved. // #import "SQRLInstaller.h" // A preferences key for the URL where the target bundle has been moved before // installation. // // This is stored in preferences, rather than `SQRLShipItState`, to prevent an // attacker from rewriting the URL during the installation process. // // Note that this key must remain backwards compatible, so ShipIt doesn't fail // confusingly on a newer version. extern NSString * const SQRLInstallerOwnedTargetBundleURLKey; // A preferences key for the URL where the update bundle has been moved before // installation. // // This is stored in preferences, rather than `SQRLShipItState`, to prevent an // attacker from rewriting the URL during the installation process. // // Note that this key must remain backwards compatible, so ShipIt doesn't fail // confusingly on a newer version. extern NSString * const SQRLInstallerOwnedUpdateBundleURLKey; // A preferences key for the code signature that the update _and_ target bundles // must match in order to be valid. // // This is stored in preferences, rather than `SQRLShipItState`, to prevent an // attacker from spoofing the validity requirements. // // Note that this key must remain backwards compatible, so ShipIt doesn't fail // confusingly on a newer version. extern NSString * const SQRLInstallerCodeSignatureKey;
// // SQRLInstaller+Private.h // Squirrel // // Created by Justin Spahr-Summers on 2013-11-19. // Copyright (c) 2013 GitHub. All rights reserved. // #import "SQRLInstaller.h" // A preferences key for the URL where the target bundle has been moved before // installation. // // This is stored in preferences to prevent an attacker from rewriting the URL // during the installation process. // // Note that this key must remain backwards compatible, so ShipIt doesn't fail // confusingly on a newer version. extern NSString * const SQRLInstallerOwnedTargetBundleURLKey; // A preferences key for the URL where the update bundle has been moved before // installation. // // This is stored in preferences to prevent an attacker from rewriting the URL // during the installation process. // // Note that this key must remain backwards compatible, so ShipIt doesn't fail // confusingly on a newer version. extern NSString * const SQRLInstallerOwnedUpdateBundleURLKey; // A preferences key for the code signature that the update _and_ target bundles // must match in order to be valid. // // This is stored in preferences to prevent an attacker from spoofing the // validity requirements. // // Note that this key must remain backwards compatible, so ShipIt doesn't fail // confusingly on a newer version. extern NSString * const SQRLInstallerCodeSignatureKey;
Update docs to reflect that the root prefs aren’t opposed to shipit state
Update docs to reflect that the root prefs aren’t opposed to shipit state ShipIt state is now in the prefs too.
C
mit
EdZava/Squirrel.Mac,EdZava/Squirrel.Mac,Squirrel/Squirrel.Mac,emiscience/Squirrel.Mac,EdZava/Squirrel.Mac,Squirrel/Squirrel.Mac,emiscience/Squirrel.Mac,emiscience/Squirrel.Mac,Squirrel/Squirrel.Mac
c8bb5693469744e0deeb03a552f190faa2146764
tests/integrationtests/fibonacci.c
tests/integrationtests/fibonacci.c
#include <stdio.h> void print_fib(int n) { int a = 0; int b = 1; while (a < n) { printf("%d ", a); int old_a = a; a = b; b = old_a + b; } } int main() { print_fib(500); printf("\n"); return 0; }
#include <stdio.h> void print_fib(int n) { int a = 0; int b = 1; while (a < n) { int old_a = a; printf("%d ", a); a = b; b = old_a + b; } } int main() { print_fib(500); printf("\n"); return 0; }
Fix variable declaration non-conformant to C89
Fix variable declaration non-conformant to C89 Declaring variables on C89 need to be done at the beginning of the function scope. The old code failed on VS2010.
C
bsd-3-clause
webmaster128/clcache,webmaster128/clcache,webmaster128/clcache
fac07f049b1779162101baddf60a331df761e228
cpp/libjoynr/include/joynr/StatusCode.h
cpp/libjoynr/include/joynr/StatusCode.h
/* * #%L * %% * Copyright (C) 2011 - 2017 BMW Car IT GmbH * %% * 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. * #L% */ #ifndef STATUSCODE_H #define STATUSCODE_H #include <cstdint> #include <string> namespace joynr { /** * @brief This struct contains all the possible status codes of a Future. * */ enum class StatusCodeEnum : std::uint8_t { /** * @brief */ SUCCESS = 0, /** * @brief */ IN_PROGRESS = 1, /** * @brief */ ERROR = 2, /** * @brief Future::waitFor() timed out. */ WAIT_TIMED_OUT = 3, }; class StatusCode { public: static std::string toString(StatusCodeEnum enumValue); }; } // namespace joynr #endif // STATUSCODE_H
/* * #%L * %% * Copyright (C) 2011 - 2017 BMW Car IT GmbH * %% * 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. * #L% */ #ifndef STATUSCODE_H #define STATUSCODE_H #include <cstdint> #include <string> namespace joynr { /** * @brief This struct contains all the possible status codes of a Future. * */ enum class StatusCodeEnum : std::uint8_t { /** * @brief The Future was successful and onSuccess was called. */ SUCCESS = 0, /** * @brief The future is still in progress. */ IN_PROGRESS = 1, /** * @brief Either a time-out occured or onError was called. */ ERROR = 2, /** * @brief Future::waitFor() timed out. */ WAIT_TIMED_OUT = 3, }; class StatusCode { public: static std::string toString(StatusCodeEnum enumValue); }; } // namespace joynr #endif // STATUSCODE_H
Improve documentation of Future status codes.
[C++] Improve documentation of Future status codes. Change-Id: I979083e18ea5facec4e6f52fc2ed486b4a18d358
C
apache-2.0
bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr
cd2450371d48da1c548b8894cccc0a67cd8b0e99
asylo/test/util/test_flags.h
asylo/test/util/test_flags.h
/* * * Copyright 2018 Asylo authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef ASYLO_TEST_UTIL_TEST_FLAGS_H_ #define ASYLO_TEST_UTIL_TEST_FLAGS_H_ #include "absl/flags/declare.h" // Location for all temporary test files. ABSL_DECLARE_FLAG(std::string, test_tmpdir); #endif // ASYLO_TEST_UTIL_TEST_FLAGS_H_
/* * * Copyright 2018 Asylo authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef ASYLO_TEST_UTIL_TEST_FLAGS_H_ #define ASYLO_TEST_UTIL_TEST_FLAGS_H_ #include <string> #include "absl/flags/declare.h" // Location for all temporary test files. ABSL_DECLARE_FLAG(std::string, test_tmpdir); #endif // ASYLO_TEST_UTIL_TEST_FLAGS_H_
Add missing include of string
Add missing include of string PiperOrigin-RevId: 317401762 Change-Id: Icbc4d0e2a4e99a9e73a4d8e7ad148e34ee2e9d03
C
apache-2.0
google/asylo,google/asylo,google/asylo,google/asylo,google/asylo,google/asylo
0a6986c0d9b11bf808264239a7d107fecf67dab1
test/functionalities/signal/main.c
test/functionalities/signal/main.c
#include <sys/signal.h> #include <stdio.h> #include <unistd.h> void handler_usr1 (int i) { puts ("got signal usr1"); } void handler_alrm (int i) { puts ("got signal ALRM"); } int main () { int i = 0; signal (SIGUSR1, handler_usr1); signal (SIGALRM, handler_alrm); puts ("Put breakpoint here"); while (i++ < 20) sleep (1); }
#include <signal.h> #include <stdio.h> #include <unistd.h> void handler_usr1 (int i) { puts ("got signal usr1"); } void handler_alrm (int i) { puts ("got signal ALRM"); } int main () { int i = 0; signal (SIGUSR1, handler_usr1); signal (SIGALRM, handler_alrm); puts ("Put breakpoint here"); while (i++ < 20) sleep (1); }
Include signal.h instead of sys/signal.h in the test case.
[TestSendSignal] Include signal.h instead of sys/signal.h in the test case. Summary: Android API-9 does not have sys/signal.h. However, all sys/signal.h has when present is an include of signal.h. Test Plan: dotest.py -p TestSendSignal on linux and Android. Reviewers: chaoren Reviewed By: chaoren Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D9779 git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@237381 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb
b1501a3cde99f68c9c419d9db4ad15b8fed814f3
src/core/SkEdgeBuilder.h
src/core/SkEdgeBuilder.h
#ifndef SkEdgeBuilder_DEFINED #define SkEdgeBuilder_DEFINED #include "SkChunkAlloc.h" #include "SkRect.h" #include "SkTDArray.h" class SkEdge; class SkEdgeClipper; class SkPath; class SkEdgeBuilder { public: SkEdgeBuilder(); int build(const SkPath& path, const SkIRect* clip, int shiftUp); SkEdge** edgeList() { return fList.begin(); } private: SkChunkAlloc fAlloc; SkTDArray<SkEdge*> fList; int fShiftUp; void addLine(const SkPoint pts[]); void addQuad(const SkPoint pts[]); void addCubic(const SkPoint pts[]); void addClipper(SkEdgeClipper*); }; #endif
#ifndef SkEdgeBuilder_DEFINED #define SkEdgeBuilder_DEFINED #include "SkChunkAlloc.h" #include "SkRect.h" #include "SkTDArray.h" struct SkEdge; class SkEdgeClipper; class SkPath; class SkEdgeBuilder { public: SkEdgeBuilder(); int build(const SkPath& path, const SkIRect* clip, int shiftUp); SkEdge** edgeList() { return fList.begin(); } private: SkChunkAlloc fAlloc; SkTDArray<SkEdge*> fList; int fShiftUp; void addLine(const SkPoint pts[]); void addQuad(const SkPoint pts[]); void addCubic(const SkPoint pts[]); void addClipper(SkEdgeClipper*); }; #endif
Fix warning (struct forward-declared as class).
Fix warning (struct forward-declared as class). Review URL: http://codereview.appspot.com/164061 git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@451 2bbb7eff-a529-9590-31e7-b0007b416f81
C
bsd-3-clause
shahrzadmn/skia,houst0nn/external_skia,GladeRom/android_external_skia,MIPS/external-chromium_org-third_party-skia,VRToxin-AOSP/android_external_skia,zhaochengw/platform_external_skia,ench0/external_chromium_org_third_party_skia,MyAOSP/external_chromium_org_third_party_skia,akiss77/skia,fire855/android_external_skia,Infinitive-OS/platform_external_skia,Infinitive-OS/platform_external_skia,FusionSP/android_external_skia,mmatyas/skia,pcwalton/skia,vanish87/skia,xzzz9097/android_external_skia,Pure-Aosp/android_external_skia,Omegaphora/external_chromium_org_third_party_skia,vanish87/skia,scroggo/skia,UBERMALLOW/external_skia,TeslaOS/android_external_skia,FusionSP/external_chromium_org_third_party_skia,wildermason/external_skia,VRToxin-AOSP/android_external_skia,Android-AOSP/external_skia,Fusion-Rom/external_chromium_org_third_party_skia,AOSPU/external_chromium_org_third_party_skia,CyanogenMod/android_external_chromium_org_third_party_skia,aosp-mirror/platform_external_skia,VRToxin-AOSP/android_external_skia,pcwalton/skia,zhaochengw/platform_external_skia,ominux/skia,MinimalOS/android_external_skia,Khaon/android_external_skia,pcwalton/skia,Purity-Lollipop/platform_external_skia,Tesla-Redux/android_external_skia,rubenvb/skia,MinimalOS-AOSP/platform_external_skia,amyvmiwei/skia,vvuk/skia,AOSPU/external_chromium_org_third_party_skia,rubenvb/skia,TeamTwisted/external_skia,shahrzadmn/skia,android-ia/platform_external_skia,MyAOSP/external_chromium_org_third_party_skia,OneRom/external_skia,fire855/android_external_skia,Euphoria-OS-Legacy/android_external_skia,wildermason/external_skia,samuelig/skia,TeamEOS/external_chromium_org_third_party_skia,Hybrid-Rom/external_skia,samuelig/skia,geekboxzone/lollipop_external_skia,F-AOSP/platform_external_skia,xin3liang/platform_external_chromium_org_third_party_skia,android-ia/platform_external_chromium_org_third_party_skia,ench0/external_skia,MyAOSP/external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,xin3liang/platform_external_chromium_org_third_party_skia,mozilla-b2g/external_skia,pacerom/external_skia,nvoron23/skia,NamelessRom/android_external_skia,qrealka/skia-hc,sigysmund/platform_external_skia,BrokenROM/external_skia,xzzz9097/android_external_skia,aospo/platform_external_skia,UBERMALLOW/external_skia,OptiPop/external_skia,Pure-Aosp/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,DARKPOP/external_chromium_org_third_party_skia,OneRom/external_skia,Plain-Andy/android_platform_external_skia,HealthyHoney/temasek_SKIA,nvoron23/skia,HealthyHoney/temasek_SKIA,akiss77/skia,fire855/android_external_skia,Infusion-OS/android_external_skia,nox/skia,FusionSP/external_chromium_org_third_party_skia,vvuk/skia,android-ia/platform_external_skia,nfxosp/platform_external_skia,sudosurootdev/external_skia,Infinitive-OS/platform_external_skia,MIPS/external-chromium_org-third_party-skia,byterom/android_external_skia,Euphoria-OS-Legacy/android_external_skia,ctiao/platform-external-skia,TeslaProject/external_skia,sombree/android_external_skia,SlimSaber/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,noselhq/skia,suyouxin/android_external_skia,xin3liang/platform_external_chromium_org_third_party_skia,w3nd1go/android_external_skia,samuelig/skia,MinimalOS/android_external_chromium_org_third_party_skia,TeamExodus/external_skia,AOSPA-L/android_external_skia,todotodoo/skia,RadonX-ROM/external_skia,Hikari-no-Tenshi/android_external_skia,F-AOSP/platform_external_skia,pcwalton/skia,houst0nn/external_skia,MinimalOS/android_external_chromium_org_third_party_skia,ominux/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,OptiPop/external_chromium_org_third_party_skia,suyouxin/android_external_skia,DiamondLovesYou/skia-sys,OptiPop/external_chromium_org_third_party_skia,AOSP-YU/platform_external_skia,MonkeyZZZZ/platform_external_skia,InfinitiveOS/external_skia,sombree/android_external_skia,AOSPB/external_skia,Jichao/skia,temasek/android_external_skia,google/skia,F-AOSP/platform_external_skia,SlimSaber/android_external_skia,MinimalOS/android_external_skia,aosp-mirror/platform_external_skia,TeamExodus/external_skia,MinimalOS-AOSP/platform_external_skia,TeslaOS/android_external_skia,HalCanary/skia-hc,xin3liang/platform_external_chromium_org_third_party_skia,boulzordev/android_external_skia,houst0nn/external_skia,AsteroidOS/android_external_skia,Hybrid-Rom/external_skia,TeamEOS/external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,noselhq/skia,SlimSaber/android_external_skia,todotodoo/skia,Fusion-Rom/android_external_skia,Omegaphora/external_chromium_org_third_party_skia,YUPlayGodDev/platform_external_skia,codeaurora-unoffical/platform-external-skia,VRToxin-AOSP/android_external_skia,Euphoria-OS-Legacy/android_external_skia,MinimalOS/android_external_skia,MinimalOS/android_external_skia,boulzordev/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,mydongistiny/android_external_skia,Android-AOSP/external_skia,temasek/android_external_skia,TeslaOS/android_external_skia,invisiblek/android_external_skia,TeamExodus/external_skia,sudosurootdev/external_skia,Omegaphora/external_chromium_org_third_party_skia,TeamEOS/external_skia,AOSPB/external_skia,VRToxin-AOSP/android_external_skia,GladeRom/android_external_skia,aospo/platform_external_skia,tmpvar/skia.cc,HalCanary/skia-hc,qrealka/skia-hc,TeslaOS/android_external_skia,pcwalton/skia,AOSP-YU/platform_external_skia,aosp-mirror/platform_external_skia,fire855/android_external_skia,F-AOSP/platform_external_skia,AndroidOpenDevelopment/android_external_skia,Khaon/android_external_skia,Asteroid-Project/android_external_skia,codeaurora-unoffical/platform-external-skia,OptiPop/external_skia,nox/skia,pacerom/external_skia,MinimalOS/external_chromium_org_third_party_skia,Asteroid-Project/android_external_skia,sudosurootdev/external_skia,mmatyas/skia,DesolationStaging/android_external_skia,temasek/android_external_skia,ominux/skia,MyAOSP/external_chromium_org_third_party_skia,MinimalOS/android_external_chromium_org_third_party_skia,Android-AOSP/external_skia,zhaochengw/platform_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,TeamExodus/external_skia,F-AOSP/platform_external_skia,mydongistiny/android_external_skia,Purity-Lollipop/platform_external_skia,BrokenROM/external_skia,temasek/android_external_skia,NamelessRom/android_external_skia,noselhq/skia,byterom/android_external_skia,samuelig/skia,DARKPOP/external_chromium_org_third_party_skia,Fusion-Rom/external_chromium_org_third_party_skia,HealthyHoney/temasek_SKIA,ench0/external_chromium_org_third_party_skia,nox/skia,Fusion-Rom/android_external_skia,larsbergstrom/skia,MinimalOS/external_skia,TeamExodus/external_skia,nvoron23/skia,Tesla-Redux/android_external_skia,nox/skia,FusionSP/android_external_skia,ctiao/platform-external-skia,pacerom/external_skia,NamelessRom/android_external_skia,HalCanary/skia-hc,Pure-Aosp/android_external_skia,ominux/skia,VentureROM-L/android_external_skia,Hybrid-Rom/external_skia,noselhq/skia,ench0/external_skia,VRToxin-AOSP/android_external_skia,Fusion-Rom/android_external_skia,AOSP-YU/platform_external_skia,Igalia/skia,android-ia/platform_external_skia,AOSP-YU/platform_external_skia,MyAOSP/external_chromium_org_third_party_skia,todotodoo/skia,aosp-mirror/platform_external_skia,MinimalOS/android_external_skia,sigysmund/platform_external_skia,scroggo/skia,Tesla-Redux/android_external_skia,OptiPop/external_chromium_org_third_party_skia,AOSPU/external_chromium_org_third_party_skia,Infinitive-OS/platform_external_skia,todotodoo/skia,Omegaphora/external_skia,MinimalOS-AOSP/platform_external_skia,VentureROM-L/android_external_skia,boulzordev/android_external_skia,TeamTwisted/external_skia,sudosurootdev/external_skia,Jichao/skia,mmatyas/skia,MIPS/external-chromium_org-third_party-skia,VentureROM-L/android_external_skia,TeamBliss-LP/android_external_skia,invisiblek/android_external_skia,noselhq/skia,YUPlayGodDev/platform_external_skia,AOSPB/external_skia,chenlian2015/skia_from_google,shahrzadmn/skia,HalCanary/skia-hc,Infinitive-OS/platform_external_skia,aosp-mirror/platform_external_skia,Plain-Andy/android_platform_external_skia,Hikari-no-Tenshi/android_external_skia,Euphoria-OS-Legacy/android_external_skia,AndroidOpenDevelopment/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,shahrzadmn/skia,YUPlayGodDev/platform_external_skia,ominux/skia,mydongistiny/external_chromium_org_third_party_skia,Android-AOSP/external_skia,Plain-Andy/android_platform_external_skia,scroggo/skia,AOSPA-L/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,HalCanary/skia-hc,xzzz9097/android_external_skia,DesolationStaging/android_external_skia,OptiPop/external_skia,nvoron23/skia,sudosurootdev/external_skia,w3nd1go/android_external_skia,android-ia/platform_external_chromium_org_third_party_skia,Khaon/android_external_skia,chenlian2015/skia_from_google,akiss77/skia,sigysmund/platform_external_skia,OptiPop/external_chromium_org_third_party_skia,mydongistiny/external_chromium_org_third_party_skia,CyanogenMod/android_external_chromium_org_third_party_skia,DiamondLovesYou/skia-sys,w3nd1go/android_external_skia,Asteroid-Project/android_external_skia,mydongistiny/android_external_skia,AndroidOpenDevelopment/android_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,MIPS/external-chromium_org-third_party-skia,Infusion-OS/android_external_skia,zhaochengw/platform_external_skia,MinimalOS-AOSP/platform_external_skia,MinimalOS-AOSP/platform_external_skia,Asteroid-Project/android_external_skia,AOSPB/external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,Omegaphora/external_chromium_org_third_party_skia,MinimalOS/external_skia,AsteroidOS/android_external_skia,InfinitiveOS/external_skia,byterom/android_external_skia,PAC-ROM/android_external_skia,codeaurora-unoffical/platform-external-skia,FusionSP/external_chromium_org_third_party_skia,AOSPA-L/android_external_skia,DesolationStaging/android_external_skia,xzzz9097/android_external_skia,Asteroid-Project/android_external_skia,TeamEOS/external_skia,SlimSaber/android_external_skia,MinimalOS/android_external_skia,TeamBliss-LP/android_external_skia,MinimalOS/external_skia,jtg-gg/skia,DiamondLovesYou/skia-sys,geekboxzone/mmallow_external_skia,Jichao/skia,Infinitive-OS/platform_external_skia,DiamondLovesYou/skia-sys,akiss77/skia,MarshedOut/android_external_skia,AOSP-YU/platform_external_skia,MonkeyZZZZ/platform_external_skia,ench0/external_skia,mmatyas/skia,w3nd1go/android_external_skia,Hybrid-Rom/external_skia,FusionSP/android_external_skia,AOSPB/external_skia,google/skia,akiss77/skia,mmatyas/skia,DARKPOP/external_chromium_org_third_party_skia,DesolationStaging/android_external_skia,Plain-Andy/android_platform_external_skia,pcwalton/skia,Pure-Aosp/android_external_skia,houst0nn/external_skia,Euphoria-OS-Legacy/android_external_skia,ench0/external_skia,RadonX-ROM/external_skia,YUPlayGodDev/platform_external_skia,MinimalOS-AOSP/platform_external_skia,android-ia/platform_external_skia,aosp-mirror/platform_external_skia,Android-AOSP/external_skia,ench0/external_skia,AOSPU/external_chromium_org_third_party_skia,scroggo/skia,amyvmiwei/skia,mozilla-b2g/external_skia,Fusion-Rom/android_external_skia,NamelessRom/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,Fusion-Rom/android_external_skia,suyouxin/android_external_skia,FusionSP/external_chromium_org_third_party_skia,TeamTwisted/external_skia,MinimalOS/external_skia,jtg-gg/skia,CyanogenMod/android_external_chromium_org_third_party_skia,xzzz9097/android_external_skia,w3nd1go/android_external_skia,tmpvar/skia.cc,YUPlayGodDev/platform_external_skia,VentureROM-L/android_external_skia,SlimSaber/android_external_skia,MarshedOut/android_external_skia,Pure-Aosp/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,BrokenROM/external_skia,vanish87/skia,MinimalOS/external_skia,zhaochengw/platform_external_skia,Plain-Andy/android_platform_external_skia,akiss77/skia,mozilla-b2g/external_skia,RadonX-ROM/external_skia,Hybrid-Rom/external_skia,YUPlayGodDev/platform_external_skia,mydongistiny/external_chromium_org_third_party_skia,TeamEOS/external_chromium_org_third_party_skia,MonkeyZZZZ/platform_external_skia,noselhq/skia,aospo/platform_external_skia,MIPS/external-chromium_org-third_party-skia,PAC-ROM/android_external_skia,DesolationStaging/android_external_skia,MyAOSP/external_chromium_org_third_party_skia,Omegaphora/external_skia,AOSP-YU/platform_external_skia,VentureROM-L/android_external_skia,Purity-Lollipop/platform_external_skia,SlimSaber/android_external_skia,larsbergstrom/skia,GladeRom/android_external_skia,timduru/platform-external-skia,FusionSP/external_chromium_org_third_party_skia,aospo/platform_external_skia,MarshedOut/android_external_skia,samuelig/skia,ctiao/platform-external-skia,Samsung/skia,DiamondLovesYou/skia-sys,MinimalOS/external_skia,rubenvb/skia,qrealka/skia-hc,OptiPop/external_skia,AndroidOpenDevelopment/android_external_skia,Igalia/skia,amyvmiwei/skia,Fusion-Rom/external_chromium_org_third_party_skia,BrokenROM/external_skia,qrealka/skia-hc,android-ia/platform_external_chromium_org_third_party_skia,GladeRom/android_external_skia,MonkeyZZZZ/platform_external_skia,FusionSP/android_external_skia,MonkeyZZZZ/platform_external_skia,AsteroidOS/android_external_skia,OneRom/external_skia,ench0/external_chromium_org_third_party_skia,larsbergstrom/skia,codeaurora-unoffical/platform-external-skia,MarshedOut/android_external_skia,tmpvar/skia.cc,MonkeyZZZZ/platform_external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,tmpvar/skia.cc,OptiPop/external_chromium_org_third_party_skia,MinimalOS/external_chromium_org_third_party_skia,Omegaphora/external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,Khaon/android_external_skia,TeamExodus/external_skia,Samsung/skia,xzzz9097/android_external_skia,google/skia,spezi77/android_external_skia,amyvmiwei/skia,Tesla-Redux/android_external_skia,AOSPA-L/android_external_skia,fire855/android_external_skia,codeaurora-unoffical/platform-external-skia,VRToxin-AOSP/android_external_skia,OneRom/external_skia,google/skia,TeamTwisted/external_skia,TeamBliss-LP/android_external_skia,suyouxin/android_external_skia,HealthyHoney/temasek_SKIA,rubenvb/skia,TeslaOS/android_external_skia,timduru/platform-external-skia,temasek/android_external_skia,vanish87/skia,chenlian2015/skia_from_google,RadonX-ROM/external_skia,vvuk/skia,nfxosp/platform_external_skia,invisiblek/android_external_skia,android-ia/platform_external_skia,TeamExodus/external_skia,NamelessRom/android_external_skia,mydongistiny/android_external_skia,mydongistiny/external_chromium_org_third_party_skia,TeamBliss-LP/android_external_skia,InfinitiveOS/external_skia,xin3liang/platform_external_chromium_org_third_party_skia,Hybrid-Rom/external_skia,OneRom/external_skia,Euphoria-OS-Legacy/android_external_skia,InfinitiveOS/external_skia,HalCanary/skia-hc,Infusion-OS/android_external_skia,nfxosp/platform_external_skia,aosp-mirror/platform_external_skia,mozilla-b2g/external_skia,wildermason/external_skia,zhaochengw/platform_external_skia,RadonX-ROM/external_skia,AOSP-YU/platform_external_skia,google/skia,Euphoria-OS-Legacy/android_external_skia,HealthyHoney/temasek_SKIA,MonkeyZZZZ/platform_external_skia,Infusion-OS/android_external_skia,aospo/platform_external_skia,MarshedOut/android_external_skia,MinimalOS/external_skia,Jichao/skia,google/skia,byterom/android_external_skia,vanish87/skia,vvuk/skia,Igalia/skia,larsbergstrom/skia,houst0nn/external_skia,tmpvar/skia.cc,Purity-Lollipop/platform_external_skia,Omegaphora/external_chromium_org_third_party_skia,GladeRom/android_external_skia,AsteroidOS/android_external_skia,AOSPA-L/android_external_skia,pcwalton/skia,AsteroidOS/android_external_skia,nfxosp/platform_external_skia,Khaon/android_external_skia,RadonX-ROM/external_skia,AOSPB/external_skia,timduru/platform-external-skia,AOSPU/external_chromium_org_third_party_skia,scroggo/skia,ench0/external_chromium_org_third_party_skia,byterom/android_external_skia,chenlian2015/skia_from_google,Jichao/skia,larsbergstrom/skia,RadonX-ROM/external_skia,AOSPU/external_chromium_org_third_party_skia,invisiblek/android_external_skia,AOSPU/external_chromium_org_third_party_skia,timduru/platform-external-skia,FusionSP/android_external_skia,pacerom/external_skia,nvoron23/skia,AsteroidOS/android_external_skia,sigysmund/platform_external_skia,ench0/external_skia,InfinitiveOS/external_skia,w3nd1go/android_external_skia,Samsung/skia,nox/skia,w3nd1go/android_external_skia,OptiPop/external_chromium_org_third_party_skia,boulzordev/android_external_skia,temasek/android_external_skia,Samsung/skia,MinimalOS/android_external_skia,VentureROM-L/android_external_skia,chenlian2015/skia_from_google,YUPlayGodDev/platform_external_skia,TeamEOS/external_skia,geekboxzone/mmallow_external_skia,OneRom/external_skia,vanish87/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,Plain-Andy/android_platform_external_skia,Igalia/skia,Tesla-Redux/android_external_skia,geekboxzone/mmallow_external_skia,xin3liang/platform_external_chromium_org_third_party_skia,mmatyas/skia,TeslaOS/android_external_skia,BrokenROM/external_skia,rubenvb/skia,MinimalOS/external_chromium_org_third_party_skia,invisiblek/android_external_skia,qrealka/skia-hc,RadonX-ROM/external_skia,ctiao/platform-external-skia,TeslaProject/external_skia,akiss77/skia,Omegaphora/external_skia,ench0/external_chromium_org_third_party_skia,codeaurora-unoffical/platform-external-skia,mmatyas/skia,sombree/android_external_skia,DesolationStaging/android_external_skia,Hybrid-Rom/external_skia,DARKPOP/external_chromium_org_third_party_skia,qrealka/skia-hc,F-AOSP/platform_external_skia,OptiPop/external_skia,byterom/android_external_skia,shahrzadmn/skia,Hikari-no-Tenshi/android_external_skia,MyAOSP/external_chromium_org_third_party_skia,TeamEOS/external_chromium_org_third_party_skia,Pure-Aosp/android_external_skia,timduru/platform-external-skia,Fusion-Rom/android_external_skia,ench0/external_chromium_org_third_party_skia,nox/skia,UBERMALLOW/external_skia,sombree/android_external_skia,Android-AOSP/external_skia,aospo/platform_external_skia,android-ia/platform_external_chromium_org_third_party_skia,TeamEOS/external_skia,geekboxzone/lollipop_external_skia,vvuk/skia,TeamBliss-LP/android_external_skia,MonkeyZZZZ/platform_external_skia,geekboxzone/lollipop_external_skia,sigysmund/platform_external_skia,AOSPA-L/android_external_skia,mozilla-b2g/external_skia,PAC-ROM/android_external_skia,temasek/android_external_skia,TeslaOS/android_external_skia,aosp-mirror/platform_external_skia,Tesla-Redux/android_external_skia,sigysmund/platform_external_skia,jtg-gg/skia,NamelessRom/android_external_skia,Hikari-no-Tenshi/android_external_skia,Khaon/android_external_skia,larsbergstrom/skia,byterom/android_external_skia,FusionSP/external_chromium_org_third_party_skia,Fusion-Rom/android_external_skia,Asteroid-Project/android_external_skia,wildermason/external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,Igalia/skia,geekboxzone/lollipop_external_skia,amyvmiwei/skia,mydongistiny/android_external_skia,shahrzadmn/skia,OptiPop/external_skia,OneRom/external_skia,Asteroid-Project/android_external_skia,PAC-ROM/android_external_skia,AndroidOpenDevelopment/android_external_skia,VentureROM-L/android_external_skia,wildermason/external_skia,vanish87/skia,Pure-Aosp/android_external_skia,nfxosp/platform_external_skia,akiss77/skia,MarshedOut/android_external_skia,MinimalOS/android_external_skia,Asteroid-Project/android_external_skia,pcwalton/skia,nvoron23/skia,noselhq/skia,Infinitive-OS/platform_external_skia,geekboxzone/mmallow_external_skia,MIPS/external-chromium_org-third_party-skia,timduru/platform-external-skia,Tesla-Redux/android_external_skia,TeslaProject/external_skia,nfxosp/platform_external_skia,Plain-Andy/android_platform_external_skia,boulzordev/android_external_skia,todotodoo/skia,codeaurora-unoffical/platform-external-skia,android-ia/platform_external_skia,HealthyHoney/temasek_SKIA,TeamEOS/external_skia,timduru/platform-external-skia,nfxosp/platform_external_skia,chenlian2015/skia_from_google,MinimalOS/external_chromium_org_third_party_skia,Jichao/skia,MinimalOS/external_chromium_org_third_party_skia,ctiao/platform-external-skia,Omegaphora/external_skia,suyouxin/android_external_skia,TeslaProject/external_skia,geekboxzone/lollipop_external_skia,MinimalOS-AOSP/platform_external_skia,TeamBliss-LP/android_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,spezi77/android_external_skia,nox/skia,samuelig/skia,mydongistiny/android_external_skia,w3nd1go/android_external_skia,mozilla-b2g/external_skia,suyouxin/android_external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,NamelessRom/android_external_skia,pacerom/external_skia,UBERMALLOW/external_skia,android-ia/platform_external_skia,xzzz9097/android_external_skia,qrealka/skia-hc,ench0/external_skia,android-ia/platform_external_chromium_org_third_party_skia,nfxosp/platform_external_skia,rubenvb/skia,google/skia,amyvmiwei/skia,AOSPA-L/android_external_skia,sudosurootdev/external_skia,Omegaphora/external_chromium_org_third_party_skia,Purity-Lollipop/platform_external_skia,nox/skia,Infusion-OS/android_external_skia,mozilla-b2g/external_skia,YUPlayGodDev/platform_external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,jtg-gg/skia,Infusion-OS/android_external_skia,spezi77/android_external_skia,xin3liang/platform_external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,GladeRom/android_external_skia,suyouxin/android_external_skia,Omegaphora/external_skia,HalCanary/skia-hc,geekboxzone/lollipop_external_skia,vvuk/skia,Jichao/skia,wildermason/external_skia,AndroidOpenDevelopment/android_external_skia,Hikari-no-Tenshi/android_external_skia,Purity-Lollipop/platform_external_skia,tmpvar/skia.cc,MarshedOut/android_external_skia,houst0nn/external_skia,nvoron23/skia,spezi77/android_external_skia,shahrzadmn/skia,jtg-gg/skia,mydongistiny/external_chromium_org_third_party_skia,mydongistiny/external_chromium_org_third_party_skia,DARKPOP/external_chromium_org_third_party_skia,DARKPOP/external_chromium_org_third_party_skia,ctiao/platform-external-skia,OneRom/external_skia,sigysmund/platform_external_skia,AOSP-YU/platform_external_skia,UBERMALLOW/external_skia,Khaon/android_external_skia,zhaochengw/platform_external_skia,aospo/platform_external_skia,OptiPop/external_chromium_org_third_party_skia,android-ia/platform_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,invisiblek/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,sombree/android_external_skia,DiamondLovesYou/skia-sys,mmatyas/skia,Igalia/skia,GladeRom/android_external_skia,jtg-gg/skia,rubenvb/skia,MinimalOS/external_chromium_org_third_party_skia,mydongistiny/external_chromium_org_third_party_skia,vvuk/skia,todotodoo/skia,amyvmiwei/skia,CyanogenMod/android_external_chromium_org_third_party_skia,google/skia,geekboxzone/mmallow_external_skia,tmpvar/skia.cc,OptiPop/external_chromium_org_third_party_skia,android-ia/platform_external_chromium_org_third_party_skia,MinimalOS/external_skia,UBERMALLOW/external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,MIPS/external-chromium_org-third_party-skia,TeamTwisted/external_skia,Infusion-OS/android_external_skia,nfxosp/platform_external_skia,xzzz9097/android_external_skia,SlimSaber/android_external_skia,MonkeyZZZZ/platform_external_skia,DARKPOP/external_chromium_org_third_party_skia,chenlian2015/skia_from_google,samuelig/skia,spezi77/android_external_skia,Samsung/skia,larsbergstrom/skia,Purity-Lollipop/platform_external_skia,TeamEOS/external_skia,vanish87/skia,boulzordev/android_external_skia,geekboxzone/mmallow_external_skia,ominux/skia,TeslaProject/external_skia,HalCanary/skia-hc,geekboxzone/mmallow_external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,Android-AOSP/external_skia,pcwalton/skia,Samsung/skia,vanish87/skia,android-ia/platform_external_chromium_org_third_party_skia,GladeRom/android_external_skia,android-ia/platform_external_chromium_org_third_party_skia,InfinitiveOS/external_skia,qrealka/skia-hc,pacerom/external_skia,rubenvb/skia,google/skia,invisiblek/android_external_skia,Jichao/skia,byterom/android_external_skia,AOSPB/external_skia,UBERMALLOW/external_skia,MinimalOS/android_external_chromium_org_third_party_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,larsbergstrom/skia,mydongistiny/android_external_skia,Hybrid-Rom/external_skia,AsteroidOS/android_external_skia,MarshedOut/android_external_skia,nvoron23/skia,geekboxzone/mmallow_external_skia,scroggo/skia,boulzordev/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,DesolationStaging/android_external_skia,aosp-mirror/platform_external_skia,Tesla-Redux/android_external_skia,Infusion-OS/android_external_skia,FusionSP/android_external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,InfinitiveOS/external_skia,TeamEOS/external_skia,ench0/external_skia,mydongistiny/external_chromium_org_third_party_skia,fire855/android_external_skia,ench0/external_chromium_org_third_party_skia,nvoron23/skia,mmatyas/skia,Infinitive-OS/platform_external_skia,Pure-Aosp/android_external_skia,YUPlayGodDev/platform_external_skia,VentureROM-L/android_external_skia,TeamExodus/external_skia,fire855/android_external_skia,DesolationStaging/android_external_skia,vvuk/skia,Purity-Lollipop/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Khaon/android_external_skia,mydongistiny/android_external_skia,sombree/android_external_skia,larsbergstrom/skia,AndroidOpenDevelopment/android_external_skia,wildermason/external_skia,todotodoo/skia,TeamTwisted/external_skia,boulzordev/android_external_skia,ctiao/platform-external-skia,MinimalOS-AOSP/platform_external_skia,PAC-ROM/android_external_skia,aosp-mirror/platform_external_skia,tmpvar/skia.cc,sudosurootdev/external_skia,DiamondLovesYou/skia-sys,HealthyHoney/temasek_SKIA,scroggo/skia,Omegaphora/external_skia,SlimSaber/android_external_skia,rubenvb/skia,F-AOSP/platform_external_skia,AsteroidOS/android_external_skia,AOSP-YU/platform_external_skia,sudosurootdev/external_skia,pacerom/external_skia,HealthyHoney/temasek_SKIA,codeaurora-unoffical/platform-external-skia,noselhq/skia,sigysmund/platform_external_skia,vvuk/skia,Hikari-no-Tenshi/android_external_skia,AOSPB/external_skia,w3nd1go/android_external_skia,geekboxzone/lollipop_external_skia,AOSPA-L/android_external_skia,todotodoo/skia,Omegaphora/external_chromium_org_third_party_skia,invisiblek/android_external_skia,F-AOSP/platform_external_skia,TeamTwisted/external_skia,Fusion-Rom/external_chromium_org_third_party_skia,geekboxzone/mmallow_external_skia,OptiPop/external_skia,Jichao/skia,MinimalOS-AOSP/platform_external_skia,amyvmiwei/skia,Omegaphora/external_skia,TeamBliss-LP/android_external_skia,ench0/external_chromium_org_third_party_skia,samuelig/skia,TeslaProject/external_skia,shahrzadmn/skia,TeslaOS/android_external_skia,Samsung/skia,FusionSP/android_external_skia,wildermason/external_skia,zhaochengw/platform_external_skia,Samsung/skia,aospo/platform_external_skia,shahrzadmn/skia,UBERMALLOW/external_skia,google/skia,fire855/android_external_skia,VRToxin-AOSP/android_external_skia,HalCanary/skia-hc,sombree/android_external_skia,TeamTwisted/external_skia,DARKPOP/external_chromium_org_third_party_skia,nox/skia,OneRom/external_skia,UBERMALLOW/external_skia,OptiPop/external_skia,PAC-ROM/android_external_skia,boulzordev/android_external_skia,mozilla-b2g/external_skia,TeamExodus/external_skia,Euphoria-OS-Legacy/android_external_skia,ominux/skia,houst0nn/external_skia,akiss77/skia,temasek/android_external_skia,BrokenROM/external_skia,noselhq/skia,MinimalOS/android_external_chromium_org_third_party_skia,MIPS/external-chromium_org-third_party-skia,HalCanary/skia-hc,BrokenROM/external_skia,tmpvar/skia.cc,ominux/skia,jtg-gg/skia,MyAOSP/external_chromium_org_third_party_skia,Igalia/skia,MarshedOut/android_external_skia,Infinitive-OS/platform_external_skia,geekboxzone/lollipop_external_skia,AOSPB/external_skia,Omegaphora/external_skia,NamelessRom/android_external_skia,InfinitiveOS/external_skia,scroggo/skia,spezi77/android_external_skia,TeslaProject/external_skia,TeamTwisted/external_skia,BrokenROM/external_skia,sombree/android_external_skia,ominux/skia,TeslaProject/external_skia,todotodoo/skia,Fusion-Rom/android_external_skia,Igalia/skia
2c063183a172e9f42e174b2741d532b240effd46
core/meta/inc/TEnumConstant.h
core/meta/inc/TEnumConstant.h
// @(#)root/meta:$Id$ // Author: Bianca-Cristina Cristescu 09/07/13 /************************************************************************* * Copyright (C) 1995-2013, 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_TEnumConstant #define ROOT_TEnumConstant ////////////////////////////////////////////////////////////////////////// // // // TEnumConstant // // // // TEnumConstant class defines a constant in the TEnum type. // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_TGlobal #include "TGlobal.h" #endif class TEnum; class TEnumConstant : public TGlobal { private: const TEnum *fEnum; //the enum type Long64_t fValue; //the value for the constant public: TEnumConstant(): fEnum(0), fValue(-1) {} TEnumConstant(DataMemberInfo_t *info, const char* name, Long64_t value, TEnum* type); virtual ~TEnumConstant(); virtual void *GetAddress() const { return (void*)fValue; } Long64_t GetValue() const { return fValue; } const TEnum *GetType() const { return fEnum; } ClassDef(TEnumConstant,2) //Enum type constant }; #endif
// @(#)root/meta:$Id$ // Author: Bianca-Cristina Cristescu 09/07/13 /************************************************************************* * Copyright (C) 1995-2013, 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_TEnumConstant #define ROOT_TEnumConstant ////////////////////////////////////////////////////////////////////////// // // // TEnumConstant // // // // TEnumConstant class defines a constant in the TEnum type. // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_TGlobal #include "TGlobal.h" #endif class TEnum; class TEnumConstant : public TGlobal { private: const TEnum *fEnum; //the enum type Long64_t fValue; //the value for the constant public: TEnumConstant(): fEnum(0), fValue(-1) {} TEnumConstant(DataMemberInfo_t *info, const char* name, Long64_t value, TEnum* type); virtual ~TEnumConstant(); virtual void *GetAddress() const { return (void*) &fValue; } Long64_t GetValue() const { return fValue; } const TEnum *GetType() const { return fEnum; } ClassDef(TEnumConstant,2) //Enum type constant }; #endif
Implement a GetAddress method that returns the address of the value data member
Implement a GetAddress method that returns the address of the value data member this is different from the one of TGlobal which implies the presence of information in the interpreter. This is done in order to support enum constants which are created in the ROOT typesystem starting from the information in rootpcms. *IMPORTANT NOTE*: the type of the enum constant value is Long64_t.
C
lgpl-2.1
zzxuanyuan/root-compressor-dummy,bbockelm/root,evgeny-boger/root,mattkretz/root,gganis/root,veprbl/root,sirinath/root,agarciamontoro/root,beniz/root,zzxuanyuan/root-compressor-dummy,pspe/root,vukasinmilosevic/root,satyarth934/root,sbinet/cxx-root,davidlt/root,CristinaCristescu/root,bbockelm/root,vukasinmilosevic/root,lgiommi/root,dfunke/root,sbinet/cxx-root,dfunke/root,CristinaCristescu/root,vukasinmilosevic/root,agarciamontoro/root,dfunke/root,esakellari/root,veprbl/root,bbockelm/root,perovic/root,Duraznos/root,davidlt/root,CristinaCristescu/root,esakellari/my_root_for_test,Duraznos/root,omazapa/root,thomaskeck/root,jrtomps/root,sawenzel/root,evgeny-boger/root,CristinaCristescu/root,mhuwiler/rootauto,karies/root,davidlt/root,pspe/root,olifre/root,0x0all/ROOT,root-mirror/root,satyarth934/root,sawenzel/root,BerserkerTroll/root,Duraznos/root,BerserkerTroll/root,gbitzes/root,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root,dfunke/root,davidlt/root,evgeny-boger/root,lgiommi/root,krafczyk/root,simonpf/root,Y--/root,zzxuanyuan/root,esakellari/my_root_for_test,CristinaCristescu/root,mhuwiler/rootauto,evgeny-boger/root,agarciamontoro/root,mhuwiler/rootauto,georgtroska/root,beniz/root,arch1tect0r/root,simonpf/root,dfunke/root,mattkretz/root,Duraznos/root,satyarth934/root,sirinath/root,0x0all/ROOT,sirinath/root,CristinaCristescu/root,abhinavmoudgil95/root,perovic/root,pspe/root,nilqed/root,karies/root,krafczyk/root,agarciamontoro/root,mkret2/root,davidlt/root,perovic/root,mattkretz/root,omazapa/root,davidlt/root,Y--/root,simonpf/root,lgiommi/root,Duraznos/root,jrtomps/root,abhinavmoudgil95/root,mkret2/root,omazapa/root,perovic/root,veprbl/root,sbinet/cxx-root,gbitzes/root,sirinath/root,zzxuanyuan/root,veprbl/root,simonpf/root,root-mirror/root,olifre/root,BerserkerTroll/root,nilqed/root,sirinath/root,vukasinmilosevic/root,simonpf/root,omazapa/root,olifre/root,gganis/root,bbockelm/root,beniz/root,nilqed/root,perovic/root,beniz/root,gbitzes/root,nilqed/root,olifre/root,esakellari/root,buuck/root,perovic/root,sawenzel/root,buuck/root,mattkretz/root,karies/root,georgtroska/root,mhuwiler/rootauto,satyarth934/root,bbockelm/root,nilqed/root,veprbl/root,omazapa/root-old,satyarth934/root,agarciamontoro/root,zzxuanyuan/root-compressor-dummy,satyarth934/root,perovic/root,jrtomps/root,gganis/root,esakellari/root,BerserkerTroll/root,krafczyk/root,olifre/root,karies/root,BerserkerTroll/root,beniz/root,BerserkerTroll/root,nilqed/root,krafczyk/root,dfunke/root,buuck/root,omazapa/root,omazapa/root,bbockelm/root,beniz/root,abhinavmoudgil95/root,lgiommi/root,sirinath/root,esakellari/my_root_for_test,dfunke/root,esakellari/my_root_for_test,mattkretz/root,arch1tect0r/root,vukasinmilosevic/root,pspe/root,veprbl/root,evgeny-boger/root,pspe/root,sawenzel/root,0x0all/ROOT,thomaskeck/root,evgeny-boger/root,davidlt/root,thomaskeck/root,mhuwiler/rootauto,BerserkerTroll/root,agarciamontoro/root,arch1tect0r/root,gganis/root,Y--/root,mkret2/root,arch1tect0r/root,sbinet/cxx-root,esakellari/my_root_for_test,gbitzes/root,gbitzes/root,beniz/root,thomaskeck/root,jrtomps/root,sawenzel/root,sawenzel/root,Y--/root,evgeny-boger/root,beniz/root,zzxuanyuan/root-compressor-dummy,davidlt/root,krafczyk/root,mkret2/root,olifre/root,agarciamontoro/root,krafczyk/root,dfunke/root,perovic/root,arch1tect0r/root,veprbl/root,omazapa/root,BerserkerTroll/root,mattkretz/root,thomaskeck/root,vukasinmilosevic/root,simonpf/root,olifre/root,zzxuanyuan/root-compressor-dummy,satyarth934/root,olifre/root,BerserkerTroll/root,karies/root,mkret2/root,sbinet/cxx-root,jrtomps/root,sbinet/cxx-root,mattkretz/root,lgiommi/root,gganis/root,vukasinmilosevic/root,sawenzel/root,arch1tect0r/root,abhinavmoudgil95/root,Duraznos/root,buuck/root,vukasinmilosevic/root,gganis/root,thomaskeck/root,esakellari/my_root_for_test,davidlt/root,zzxuanyuan/root-compressor-dummy,sirinath/root,agarciamontoro/root,sawenzel/root,davidlt/root,sbinet/cxx-root,vukasinmilosevic/root,mattkretz/root,gbitzes/root,sirinath/root,buuck/root,mkret2/root,zzxuanyuan/root,simonpf/root,karies/root,thomaskeck/root,esakellari/root,buuck/root,jrtomps/root,omazapa/root-old,simonpf/root,root-mirror/root,zzxuanyuan/root,CristinaCristescu/root,omazapa/root,nilqed/root,mhuwiler/rootauto,thomaskeck/root,abhinavmoudgil95/root,esakellari/root,zzxuanyuan/root,Duraznos/root,sawenzel/root,pspe/root,omazapa/root-old,Y--/root,nilqed/root,zzxuanyuan/root,olifre/root,gbitzes/root,omazapa/root,pspe/root,pspe/root,jrtomps/root,mkret2/root,sbinet/cxx-root,0x0all/ROOT,bbockelm/root,satyarth934/root,CristinaCristescu/root,gbitzes/root,buuck/root,beniz/root,lgiommi/root,omazapa/root,simonpf/root,agarciamontoro/root,omazapa/root-old,abhinavmoudgil95/root,mhuwiler/rootauto,nilqed/root,satyarth934/root,sawenzel/root,omazapa/root-old,root-mirror/root,abhinavmoudgil95/root,georgtroska/root,evgeny-boger/root,abhinavmoudgil95/root,gganis/root,zzxuanyuan/root-compressor-dummy,omazapa/root-old,thomaskeck/root,vukasinmilosevic/root,dfunke/root,abhinavmoudgil95/root,Y--/root,lgiommi/root,jrtomps/root,zzxuanyuan/root,beniz/root,root-mirror/root,mhuwiler/rootauto,sbinet/cxx-root,esakellari/root,simonpf/root,bbockelm/root,root-mirror/root,esakellari/my_root_for_test,pspe/root,evgeny-boger/root,Duraznos/root,mhuwiler/rootauto,Y--/root,lgiommi/root,arch1tect0r/root,olifre/root,gbitzes/root,esakellari/my_root_for_test,CristinaCristescu/root,omazapa/root-old,CristinaCristescu/root,root-mirror/root,davidlt/root,gganis/root,esakellari/my_root_for_test,arch1tect0r/root,esakellari/root,nilqed/root,perovic/root,omazapa/root-old,0x0all/ROOT,sirinath/root,perovic/root,karies/root,agarciamontoro/root,omazapa/root-old,mattkretz/root,georgtroska/root,gbitzes/root,esakellari/my_root_for_test,buuck/root,bbockelm/root,karies/root,esakellari/root,krafczyk/root,arch1tect0r/root,jrtomps/root,georgtroska/root,veprbl/root,jrtomps/root,karies/root,bbockelm/root,omazapa/root-old,evgeny-boger/root,esakellari/root,omazapa/root-old,mkret2/root,beniz/root,buuck/root,zzxuanyuan/root-compressor-dummy,veprbl/root,georgtroska/root,sirinath/root,karies/root,root-mirror/root,0x0all/ROOT,CristinaCristescu/root,zzxuanyuan/root,0x0all/ROOT,Y--/root,perovic/root,sbinet/cxx-root,lgiommi/root,abhinavmoudgil95/root,georgtroska/root,bbockelm/root,BerserkerTroll/root,omazapa/root,krafczyk/root,nilqed/root,sirinath/root,esakellari/root,Duraznos/root,olifre/root,mattkretz/root,sawenzel/root,vukasinmilosevic/root,Y--/root,georgtroska/root,sbinet/cxx-root,mhuwiler/rootauto,lgiommi/root,veprbl/root,gganis/root,satyarth934/root,lgiommi/root,zzxuanyuan/root,krafczyk/root,gganis/root,dfunke/root,arch1tect0r/root,mkret2/root,agarciamontoro/root,esakellari/root,pspe/root,satyarth934/root,Duraznos/root,buuck/root,root-mirror/root,root-mirror/root,dfunke/root,mattkretz/root,thomaskeck/root,mhuwiler/rootauto,krafczyk/root,zzxuanyuan/root,pspe/root,jrtomps/root,georgtroska/root,mkret2/root,mkret2/root,zzxuanyuan/root,georgtroska/root,BerserkerTroll/root,simonpf/root,root-mirror/root,evgeny-boger/root,gbitzes/root,buuck/root,0x0all/ROOT,georgtroska/root,Duraznos/root,zzxuanyuan/root-compressor-dummy,arch1tect0r/root,Y--/root,krafczyk/root,karies/root,abhinavmoudgil95/root,Y--/root,veprbl/root,gganis/root,zzxuanyuan/root-compressor-dummy,0x0all/ROOT
72667ea922ed9b703b56a87cd71844b74801cd55
common/c_cpp/src/c/windows/wombat/wUuid.h
common/c_cpp/src/c/windows/wombat/wUuid.h
/* $Id: wUuid.h,v 1.1.2.2 2012/03/20 11:15:17 emmapollock Exp $ * * OpenMAMA: The open middleware agnostic messaging API * Copyright (C) 2011 NYSE Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA */ #ifndef WUUID_H__ #define WUUID_H__ #include "wombat/port.h" typedef int wUuid; COMMONExpDLL void wUuid_generate_time (wUuid myUuid); COMMONExpDLL void wUuid_unparse (wUuid myUuid, char* out); #endif /* WUUID_H__ */
/* $Id: wUuid.h,v 1.1.2.2 2012/03/20 11:15:17 emmapollock Exp $ * * OpenMAMA: The open middleware agnostic messaging API * Copyright (C) 2011 NYSE Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA */ #ifndef WUUID_H__ #define WUUID_H__ #include "wombat/port.h" typedef char* wUuid; COMMONExpDLL void wUuid_generate_time (wUuid myUuid); COMMONExpDLL void wUuid_unparse (wUuid myUuid, char* out); #endif /* WUUID_H__ */
Change uuid to char* from int for Windows
Change uuid to char* from int for Windows Signed-off-by: Mike Schonberg <a0b795d7498c6bea81956c992e86c1008615b63d@nyx.com>
C
lgpl-2.1
MattMulhern/OpenMamaCassandra,jacobraj/MAMA,MattMulhern/OpenMamaCassandra,dmaguire/OpenMAMA,dpauls/OpenMAMA,philippreston/OpenMAMA,jacobraj/MAMA,jacobraj/MAMA,fquinner/OpenMAMA,jacobraj/MAMA,vulcanft/openmama,dmaguire/OpenMAMA,cloudsmith-io/openmama,MattMulhern/OpenMamaCassandra,dmagOM/OpenMAMA-dynamic,dmagOM/OpenMAMA-dynamic,MattMulhern/OpenMamaCassandra,fquinner/OpenMAMA,cloudsmith-io/openmama,dmaguire/OpenMAMA,fquinner/OpenMAMA,cloudsmith-io/openmama,MattMulhern/OpenMAMA,jacobraj/MAMA,fquinner/OpenMAMA,philippreston/OpenMAMA,philippreston/OpenMAMA,dpauls/OpenMAMA,vulcanft/openmama,cloudsmith-io/openmama,kuangtu/OpenMAMA,kuangtu/OpenMAMA,cloudsmith-io/openmama,philippreston/OpenMAMA,dmagOM/OpenMAMA-dynamic,MattMulhern/OpenMAMA,kuangtu/OpenMAMA,vulcanft/openmama,fquinner/OpenMAMA,dpauls/OpenMAMA,vulcanft/openmama,dmaguire/OpenMAMA,MattMulhern/OpenMAMA,MattMulhern/OpenMamaCassandra,MattMulhern/OpenMAMA,philippreston/OpenMAMA,kuangtu/OpenMAMA,vulcanft/openmama,dpauls/OpenMAMA,philippreston/OpenMAMA,fquinner/OpenMAMA,jacobraj/MAMA,cloudsmith-io/openmama,cloudsmith-io/openmama,philippreston/OpenMAMA,MattMulhern/OpenMAMA,dmaguire/OpenMAMA,MattMulhern/OpenMAMA,dmagOM/OpenMAMA-dynamic,dpauls/OpenMAMA,MattMulhern/OpenMamaCassandra,kuangtu/OpenMAMA,kuangtu/OpenMAMA,MattMulhern/OpenMAMA,dmaguire/OpenMAMA,kuangtu/OpenMAMA,dmagOM/OpenMAMA-dynamic,fquinner/OpenMAMA,dmagOM/OpenMAMA-dynamic,dpauls/OpenMAMA,dpauls/OpenMAMA,vulcanft/openmama,vulcanft/openmama,dmaguire/OpenMAMA
588c5e4b6f5fa8e45811d3f4e95d3b94f8f58341
test/tools/llvm-symbolizer/print_context.c
test/tools/llvm-symbolizer/print_context.c
// REQUIRES: x86_64-linux // RUN: %host_cc -O0 -g %s -o %t 2>&1 // RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s #include <stdio.h> int inc(int a) { return a + 1; } int main() { printf("%p\n", inc); return 0; } // CHECK: inc // CHECK: print_context.c:7 // CHECK: 5 : #include // CHECK: 6 : // CHECK: 7 >: int inc // CHECK: 8 : return // CHECK: 9 : }
// REQUIRES: x86_64-linux // RUN: %host_cc -O0 -g %s -o %t 2>&1 // RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s // // See PR31870 for more details on the XFAIL // XFAIL: avr #include <stdio.h> int inc(int a) { return a + 1; } int main() { printf("%p\n", inc); return 0; } // CHECK: inc // CHECK: print_context.c:7 // CHECK: 5 : #include // CHECK: 6 : // CHECK: 7 >: int inc // CHECK: 8 : return // CHECK: 9 : }
Mark a failing symbolizer test as XFAIL
[AVR] Mark a failing symbolizer test as XFAIL git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@309512 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm
c84ea433d725db190e6e2e51344ec055422414fe
src/include/port/win.h
src/include/port/win.h
#define JMP_BUF #define HAS_TEST_AND_SET typedef unsigned char slock_t; #ifndef O_DIROPEN #define O_DIROPEN 0x100000 /* should be in sys/fcntl.h */ #endif
#define JMP_BUF #define HAS_TEST_AND_SET typedef unsigned char slock_t; #ifndef O_DIROPEN #define O_DIROPEN 0x100000 /* should be in sys/fcntl.h */ #endif #define tzname _tzname /* should be in time.h?*/ #define USE_POSIX_TIME #define HAVE_INT_TIMEZONE /* has int _timezone */
Fix from Yutaka Tanida <yutaka@marin.or.jp>
Fix from Yutaka Tanida <yutaka@marin.or.jp>
C
apache-2.0
xuegang/gpdb,ahachete/gpdb,kaknikhil/gpdb,Postgres-XL/Postgres-XL,yuanzhao/gpdb,foyzur/gpdb,CraigHarris/gpdb,janebeckman/gpdb,adam8157/gpdb,chrishajas/gpdb,janebeckman/gpdb,arcivanov/postgres-xl,xinzweb/gpdb,randomtask1155/gpdb,atris/gpdb,atris/gpdb,zaksoup/gpdb,janebeckman/gpdb,lintzc/gpdb,zaksoup/gpdb,zaksoup/gpdb,rubikloud/gpdb,ashwinstar/gpdb,foyzur/gpdb,Chibin/gpdb,Chibin/gpdb,zeroae/postgres-xl,kmjungersen/PostgresXL,50wu/gpdb,lintzc/gpdb,randomtask1155/gpdb,CraigHarris/gpdb,cjcjameson/gpdb,50wu/gpdb,postmind-net/postgres-xl,Quikling/gpdb,ovr/postgres-xl,lisakowen/gpdb,cjcjameson/gpdb,kaknikhil/gpdb,snaga/postgres-xl,edespino/gpdb,arcivanov/postgres-xl,zaksoup/gpdb,Postgres-XL/Postgres-XL,Quikling/gpdb,randomtask1155/gpdb,rvs/gpdb,rubikloud/gpdb,postmind-net/postgres-xl,yuanzhao/gpdb,techdragon/Postgres-XL,atris/gpdb,cjcjameson/gpdb,ahachete/gpdb,greenplum-db/gpdb,xuegang/gpdb,lintzc/gpdb,Postgres-XL/Postgres-XL,ovr/postgres-xl,zeroae/postgres-xl,royc1/gpdb,yazun/postgres-xl,randomtask1155/gpdb,kaknikhil/gpdb,greenplum-db/gpdb,lintzc/gpdb,xinzweb/gpdb,lpetrov-pivotal/gpdb,tangp3/gpdb,royc1/gpdb,kmjungersen/PostgresXL,royc1/gpdb,tangp3/gpdb,Chibin/gpdb,50wu/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,atris/gpdb,CraigHarris/gpdb,50wu/gpdb,ashwinstar/gpdb,edespino/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,janebeckman/gpdb,rvs/gpdb,tpostgres-projects/tPostgres,randomtask1155/gpdb,tangp3/gpdb,xinzweb/gpdb,greenplum-db/gpdb,lpetrov-pivotal/gpdb,Quikling/gpdb,ahachete/gpdb,adam8157/gpdb,edespino/gpdb,foyzur/gpdb,oberstet/postgres-xl,xinzweb/gpdb,lpetrov-pivotal/gpdb,atris/gpdb,yuanzhao/gpdb,edespino/gpdb,lpetrov-pivotal/gpdb,yuanzhao/gpdb,tangp3/gpdb,lpetrov-pivotal/gpdb,lisakowen/gpdb,snaga/postgres-xl,janebeckman/gpdb,ashwinstar/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,foyzur/gpdb,rvs/gpdb,0x0FFF/gpdb,xinzweb/gpdb,xinzweb/gpdb,greenplum-db/gpdb,xuegang/gpdb,lpetrov-pivotal/gpdb,chrishajas/gpdb,kaknikhil/gpdb,royc1/gpdb,greenplum-db/gpdb,tangp3/gpdb,chrishajas/gpdb,lintzc/gpdb,greenplum-db/gpdb,royc1/gpdb,postmind-net/postgres-xl,arcivanov/postgres-xl,adam8157/gpdb,randomtask1155/gpdb,tpostgres-projects/tPostgres,Chibin/gpdb,ovr/postgres-xl,xuegang/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,lisakowen/gpdb,randomtask1155/gpdb,rvs/gpdb,Quikling/gpdb,xuegang/gpdb,greenplum-db/gpdb,50wu/gpdb,adam8157/gpdb,CraigHarris/gpdb,yazun/postgres-xl,ashwinstar/gpdb,Postgres-XL/Postgres-XL,kmjungersen/PostgresXL,royc1/gpdb,rvs/gpdb,kmjungersen/PostgresXL,postmind-net/postgres-xl,oberstet/postgres-xl,0x0FFF/gpdb,postmind-net/postgres-xl,ashwinstar/gpdb,zaksoup/gpdb,yazun/postgres-xl,ashwinstar/gpdb,kaknikhil/gpdb,randomtask1155/gpdb,tangp3/gpdb,foyzur/gpdb,chrishajas/gpdb,kmjungersen/PostgresXL,chrishajas/gpdb,yuanzhao/gpdb,ahachete/gpdb,snaga/postgres-xl,royc1/gpdb,Quikling/gpdb,zaksoup/gpdb,lisakowen/gpdb,adam8157/gpdb,50wu/gpdb,Chibin/gpdb,techdragon/Postgres-XL,yuanzhao/gpdb,xuegang/gpdb,Quikling/gpdb,rubikloud/gpdb,edespino/gpdb,zaksoup/gpdb,oberstet/postgres-xl,Chibin/gpdb,lintzc/gpdb,jmcatamney/gpdb,pavanvd/postgres-xl,jmcatamney/gpdb,jmcatamney/gpdb,cjcjameson/gpdb,Chibin/gpdb,cjcjameson/gpdb,lisakowen/gpdb,0x0FFF/gpdb,techdragon/Postgres-XL,zaksoup/gpdb,chrishajas/gpdb,edespino/gpdb,kaknikhil/gpdb,jmcatamney/gpdb,arcivanov/postgres-xl,jmcatamney/gpdb,0x0FFF/gpdb,xinzweb/gpdb,cjcjameson/gpdb,rvs/gpdb,arcivanov/postgres-xl,CraigHarris/gpdb,0x0FFF/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,kaknikhil/gpdb,xinzweb/gpdb,snaga/postgres-xl,rubikloud/gpdb,edespino/gpdb,Quikling/gpdb,rubikloud/gpdb,xuegang/gpdb,janebeckman/gpdb,Quikling/gpdb,snaga/postgres-xl,rvs/gpdb,ovr/postgres-xl,50wu/gpdb,lintzc/gpdb,chrishajas/gpdb,foyzur/gpdb,lisakowen/gpdb,CraigHarris/gpdb,pavanvd/postgres-xl,atris/gpdb,adam8157/gpdb,adam8157/gpdb,rubikloud/gpdb,pavanvd/postgres-xl,zeroae/postgres-xl,edespino/gpdb,Postgres-XL/Postgres-XL,ahachete/gpdb,lisakowen/gpdb,greenplum-db/gpdb,adam8157/gpdb,tpostgres-projects/tPostgres,atris/gpdb,zeroae/postgres-xl,rubikloud/gpdb,oberstet/postgres-xl,techdragon/Postgres-XL,0x0FFF/gpdb,tangp3/gpdb,techdragon/Postgres-XL,lisakowen/gpdb,yazun/postgres-xl,xuegang/gpdb,arcivanov/postgres-xl,oberstet/postgres-xl,royc1/gpdb,jmcatamney/gpdb,janebeckman/gpdb,zeroae/postgres-xl,lintzc/gpdb,atris/gpdb,yuanzhao/gpdb,yuanzhao/gpdb,xuegang/gpdb,lpetrov-pivotal/gpdb,tpostgres-projects/tPostgres,tpostgres-projects/tPostgres,janebeckman/gpdb,chrishajas/gpdb,Quikling/gpdb,Chibin/gpdb,kaknikhil/gpdb,ahachete/gpdb,lintzc/gpdb,rvs/gpdb,jmcatamney/gpdb,foyzur/gpdb,Chibin/gpdb,cjcjameson/gpdb,edespino/gpdb,kaknikhil/gpdb,lpetrov-pivotal/gpdb,edespino/gpdb,cjcjameson/gpdb,Chibin/gpdb,rvs/gpdb,50wu/gpdb,CraigHarris/gpdb,Quikling/gpdb,tangp3/gpdb,ahachete/gpdb,foyzur/gpdb,jmcatamney/gpdb,yuanzhao/gpdb,yazun/postgres-xl,kaknikhil/gpdb,ahachete/gpdb,rubikloud/gpdb,rvs/gpdb,janebeckman/gpdb,ovr/postgres-xl,janebeckman/gpdb,cjcjameson/gpdb
03b8a58e6b8fbfcdbe8bad02e4d0cda0f372972c
rflags.c
rflags.c
#include <inttypes.h> #include <stdio.h> int main() { uint64_t rflags; __asm__ __volatile__ ("pushf; popq %0" : "=g" (rflags) ::"memory"); printf("rFLAGS: %016llx\n", rflags); #define BIT(name, number) \ printf("\t%s: %d\n", name, rflags & (1 << number) ? 1 : 0) const char* bits[] = { "CF", "Reserved (1)", "PF", "Reserved (0)", "AF", "Reserved (0)", "ZF (Zero)", "SF (Sign)", "TF (Trap)", "IF (Interrupt)", "DF (Direction)", "OF (Overflow)", "IOPL LSB", "IOPL MSB", "NT" }; int i; for (i=0;i<sizeof(bits)/sizeof(*bits);i++) BIT(bits[i], i); }
#include <inttypes.h> #include <stdio.h> int main() { uint64_t rflags; __asm__ __volatile__ ("pushf; popq %0" : "=g" (rflags) ::"memory"); printf("rFLAGS: %016llx\n", (unsigned long long)rflags); #define BIT(name, number) \ printf("\t%s: %d\n", name, rflags & (1 << number) ? 1 : 0) const char* bits[] = { "CF", "Reserved (1)", "PF", "Reserved (0)", "AF", "Reserved (0)", "ZF (Zero)", "SF (Sign)", "TF (Trap)", "IF (Interrupt)", "DF (Direction)", "OF (Overflow)", "IOPL LSB", "IOPL MSB", "NT" }; int i; for (i=0;i<sizeof(bits)/sizeof(*bits);i++) BIT(bits[i], i); }
Fix printf warning when long long is 128-bit.
Fix printf warning when long long is 128-bit.
C
mit
olsner/os,olsner/os,olsner/os,olsner/os
a6ff25d87ab0d21c433390b80b513c46b6570f9c
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_GL_CUSTOM_SETUP_HEADER "gl/GrGLConfig_chrome.h" #define GR_TEST_UTILS 1 #define SK_BUILD_FOR_ANDROID_FRAMEWORK #define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024) #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024) #define SK_USE_FREETYPE_EMBOLDEN // Disable these Ganesh features #define SK_DISABLE_EXPLICIT_GPU_RESOURCE_ALLOCATION #define SK_DISABLE_RENDER_TARGET_SORTING // Legacy flags #define SK_IGNORE_GPU_DITHER #define SK_SUPPORT_DEPRECATED_CLIPOPS #define SK_SUPPORT_LEGACY_PAINT_TEXTMEASURE // 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_A8_MASKBLITTER #define SK_SUPPORT_LEGACY_AAA_CHOICE #endif // SkUserConfigManual_DEFINED
/* * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkUserConfigManual_DEFINED #define SkUserConfigManual_DEFINED #define GR_TEST_UTILS 1 #define SK_BUILD_FOR_ANDROID_FRAMEWORK #define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024) #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024) #define SK_USE_FREETYPE_EMBOLDEN // Disable these Ganesh features #define SK_DISABLE_EXPLICIT_GPU_RESOURCE_ALLOCATION #define SK_DISABLE_RENDER_TARGET_SORTING // Check error is expensive. HWUI historically also doesn't check its allocations #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0 // Legacy flags #define SK_IGNORE_GPU_DITHER #define SK_SUPPORT_DEPRECATED_CLIPOPS #define SK_SUPPORT_LEGACY_PAINT_TEXTMEASURE // 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_A8_MASKBLITTER #define SK_SUPPORT_LEGACY_AAA_CHOICE #endif // SkUserConfigManual_DEFINED
Stop using Chrome config options.
Stop using Chrome config options. These options used to apply some best practices for how to configure Skia but those have been moved to GrContext options and this file is now mostly optimizations specific to the Chrome rendering pipeline. Specifically, we don't want to use VBOs on all classes of GPUs as it can be much more efficient to allocate them on the CPU and pass the allocation to the driver. Bug: 119222339 Test: CTS passes and systrace shows increased performance Change-Id: I1d495a4ae8de99215d6be1ac1e7e01b1263af9f1
C
bsd-3-clause
aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia
ff8d8029fdfa0b28c67012b8fcddb4e2d9a2523d
src/host/os_rmdir.c
src/host/os_rmdir.c
/** * \file os_rmdir.c * \brief Remove a subdirectory. * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project */ #include <stdlib.h> #include "premake.h" int os_rmdir(lua_State* L) { int z; const char* path = luaL_checkstring(L, 1); #if PLATFORM_WINDOWS z = RemoveDirectory(path); #else z = rmdir(path); #endif if (!z) { lua_pushnil(L); lua_pushfstring(L, "unable to remove directory '%s'", path); return 2; } else { lua_pushboolean(L, 1); return 1; } }
/** * \file os_rmdir.c * \brief Remove a subdirectory. * \author Copyright (c) 2002-2013 Jason Perkins and the Premake project */ #include <stdlib.h> #include "premake.h" int os_rmdir(lua_State* L) { int z; const char* path = luaL_checkstring(L, 1); #if PLATFORM_WINDOWS z = RemoveDirectory(path); #else z = (0 == rmdir(path)); #endif if (!z) { lua_pushnil(L); lua_pushfstring(L, "unable to remove directory '%s'", path); return 2; } else { lua_pushboolean(L, 1); return 1; } }
Fix error result handling in os.rmdir()
Fix error result handling in os.rmdir()
C
bsd-3-clause
Yhgenomics/premake-core,felipeprov/premake-core,sleepingwit/premake-core,xriss/premake-core,bravnsgaard/premake-core,grbd/premake-core,PlexChat/premake-core,prapin/premake-core,soundsrc/premake-core,prapin/premake-core,prapin/premake-core,jsfdez/premake-core,sleepingwit/premake-core,resetnow/premake-core,LORgames/premake-core,sleepingwit/premake-core,PlexChat/premake-core,noresources/premake-core,Blizzard/premake-core,soundsrc/premake-core,Meoo/premake-core,lizh06/premake-core,resetnow/premake-core,tvandijck/premake-core,TurkeyMan/premake-core,sleepingwit/premake-core,martin-traverse/premake-core,felipeprov/premake-core,jstewart-amd/premake-core,LORgames/premake-core,jsfdez/premake-core,aleksijuvani/premake-core,mendsley/premake-core,Meoo/premake-core,LORgames/premake-core,martin-traverse/premake-core,soundsrc/premake-core,premake/premake-core,resetnow/premake-core,mandersan/premake-core,lizh06/premake-core,starkos/premake-core,starkos/premake-core,premake/premake-core,mendsley/premake-core,noresources/premake-core,Blizzard/premake-core,alarouche/premake-core,TurkeyMan/premake-core,saberhawk/premake-core,TurkeyMan/premake-core,prapin/premake-core,alarouche/premake-core,Yhgenomics/premake-core,mandersan/premake-core,CodeAnxiety/premake-core,tritao/premake-core,dcourtois/premake-core,mandersan/premake-core,alarouche/premake-core,Meoo/premake-core,mendsley/premake-core,dcourtois/premake-core,Blizzard/premake-core,noresources/premake-core,bravnsgaard/premake-core,Blizzard/premake-core,soundsrc/premake-core,jstewart-amd/premake-core,Blizzard/premake-core,dcourtois/premake-core,dcourtois/premake-core,jsfdez/premake-core,sleepingwit/premake-core,akaStiX/premake-core,premake/premake-core,Tiger66639/premake-core,Zefiros-Software/premake-core,grbd/premake-core,saberhawk/premake-core,aleksijuvani/premake-core,PlexChat/premake-core,CodeAnxiety/premake-core,Zefiros-Software/premake-core,tvandijck/premake-core,alarouche/premake-core,Meoo/premake-core,jsfdez/premake-core,grbd/premake-core,Tiger66639/premake-core,starkos/premake-core,starkos/premake-core,tritao/premake-core,Yhgenomics/premake-core,xriss/premake-core,kankaristo/premake-core,bravnsgaard/premake-core,xriss/premake-core,Zefiros-Software/premake-core,dcourtois/premake-core,saberhawk/premake-core,felipeprov/premake-core,premake/premake-core,premake/premake-core,mandersan/premake-core,grbd/premake-core,akaStiX/premake-core,starkos/premake-core,Tiger66639/premake-core,jstewart-amd/premake-core,tvandijck/premake-core,noresources/premake-core,tritao/premake-core,martin-traverse/premake-core,kankaristo/premake-core,noresources/premake-core,TurkeyMan/premake-core,jstewart-amd/premake-core,resetnow/premake-core,Zefiros-Software/premake-core,aleksijuvani/premake-core,xriss/premake-core,tvandijck/premake-core,saberhawk/premake-core,PlexChat/premake-core,bravnsgaard/premake-core,dcourtois/premake-core,jstewart-amd/premake-core,premake/premake-core,tritao/premake-core,mandersan/premake-core,Zefiros-Software/premake-core,mendsley/premake-core,martin-traverse/premake-core,noresources/premake-core,resetnow/premake-core,CodeAnxiety/premake-core,xriss/premake-core,TurkeyMan/premake-core,CodeAnxiety/premake-core,bravnsgaard/premake-core,felipeprov/premake-core,Tiger66639/premake-core,akaStiX/premake-core,akaStiX/premake-core,LORgames/premake-core,lizh06/premake-core,LORgames/premake-core,soundsrc/premake-core,CodeAnxiety/premake-core,Blizzard/premake-core,premake/premake-core,aleksijuvani/premake-core,starkos/premake-core,starkos/premake-core,kankaristo/premake-core,Yhgenomics/premake-core,dcourtois/premake-core,kankaristo/premake-core,tvandijck/premake-core,noresources/premake-core,mendsley/premake-core,aleksijuvani/premake-core,lizh06/premake-core
f3bbcec5d714f9d457c99032e5b02c75d44b0d70
lib/StaticAnalyzer/Checkers/SelectorExtras.h
lib/StaticAnalyzer/Checkers/SelectorExtras.h
//=== SelectorExtras.h - Helpers for checkers using selectors -----*- C++ -*-=// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_SELECTOREXTRAS_H #define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_SELECTOREXTRAS_H #include "clang/AST/ASTContext.h" namespace clang { namespace ento { template <typename... IdentifierInfos> static inline Selector getKeywordSelector(ASTContext &Ctx, IdentifierInfos *... IIs) { static_assert(sizeof...(IdentifierInfos), "keyword selectors must have at least one argument"); SmallVector<IdentifierInfo *, 10> II{{&Ctx.Idents.get(IIs)...}}; return Ctx.Selectors.getSelector(II.size(), &II[0]); } template <typename... IdentifierInfos> static inline void lazyInitKeywordSelector(Selector &Sel, ASTContext &Ctx, IdentifierInfos *... IIs) { if (!Sel.isNull()) return; Sel = getKeywordSelector(Ctx, IIs...); } static inline void lazyInitNullarySelector(Selector &Sel, ASTContext &Ctx, const char *Name) { if (!Sel.isNull()) return; Sel = GetNullarySelector(Name, Ctx); } } // end namespace ento } // end namespace clang #endif
//=== SelectorExtras.h - Helpers for checkers using selectors -----*- C++ -*-=// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_SELECTOREXTRAS_H #define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_SELECTOREXTRAS_H #include "clang/AST/ASTContext.h" namespace clang { namespace ento { template <typename... IdentifierInfos> static inline Selector getKeywordSelector(ASTContext &Ctx, IdentifierInfos *... IIs) { static_assert(sizeof...(IdentifierInfos), "keyword selectors must have at least one argument"); SmallVector<IdentifierInfo *, 10> II({&Ctx.Idents.get(IIs)...}); return Ctx.Selectors.getSelector(II.size(), &II[0]); } template <typename... IdentifierInfos> static inline void lazyInitKeywordSelector(Selector &Sel, ASTContext &Ctx, IdentifierInfos *... IIs) { if (!Sel.isNull()) return; Sel = getKeywordSelector(Ctx, IIs...); } static inline void lazyInitNullarySelector(Selector &Sel, ASTContext &Ctx, const char *Name) { if (!Sel.isNull()) return; Sel = GetNullarySelector(Name, Ctx); } } // end namespace ento } // end namespace clang #endif
Use clang++-3.5 compatible initializer_list constructor
Use clang++-3.5 compatible initializer_list constructor Otherwise, a warning is issued. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@302654 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
3e5585d5a558396d52380478c2d85aeb954f4b43
src/rtcmix/rtdefs.h
src/rtcmix/rtdefs.h
/* To avoid recursion in certain includes */ #ifndef _RTDEFS_H_ #define _RTDEFS_H_ 1 #define MAXCHANS 4 #define MAX_INPUT_FDS 128 #define AUDIO_DEVICE 9999999 /* definition of input file desc struct used by rtinput */ typedef struct inputdesc { char filename[1024]; int fd; int refcount; #ifdef USE_SNDLIB short header_type; /* e.g., AIFF_sound_file (in sndlib.h) */ short data_format; /* e.g., snd_16_linear (in sndlib.h) */ #else #ifdef sgi void *handle; #endif #endif int data_location; /* offset of sound data start in file */ float dur; } InputDesc; extern float *outbuff; extern float *outbptr; extern short *inbuff; // DT: for use with real-time audio input // NOTE: MAXBUF is a constant in SGI version! extern int MAXBUF; #ifdef _LANGUAGE_C_PLUS_PLUS /* Needed for MIPSpro */ extern "C" { #endif extern float SR; extern int NCHANS; extern int RTBUFSAMPS; #ifdef _LANGUAGE_C_PLUS_PLUS } #endif #endif /* _RTDEFS_H_ */
/* To avoid recursion in certain includes */ #ifndef _RTDEFS_H_ #define _RTDEFS_H_ 1 #define MAXCHANS 4 #define MAX_INPUT_FDS 128 #define AUDIO_DEVICE 9999999 /* definition of input file desc struct used by rtinput */ typedef struct inputdesc { char filename[1024]; int fd; int refcount; #ifdef USE_SNDLIB short header_type; /* e.g., AIFF_sound_file (in sndlib.h) */ short data_format; /* e.g., snd_16_linear (in sndlib.h) */ #else #ifdef sgi void *handle; #endif #endif int data_location; /* offset of sound data start in file */ float dur; } InputDesc; /* for insts - so they don't have to include globals.h */ extern int MAXBUF; extern int NCHANS; extern int RTBUFSAMPS; extern float SR; #endif /* _RTDEFS_H_ */
Move some globals to globals.h.
Move some globals to globals.h.
C
apache-2.0
RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix
8d89c3c0d8b5e9c5aed145d25343e04a4b81c156
driver/fingerprint/fpsensor.h
driver/fingerprint/fpsensor.h
/* Copyright 2019 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. */ #ifndef __CROS_EC_DRIVER_FINGERPRINT_FPSENSOR_H_ #define __CROS_EC_DRIVER_FINGERPRINT_FPSENSOR_H_ #if defined(HAVE_PRIVATE) && !defined(TEST_BUILD) #define HAVE_FP_PRIVATE_DRIVER #include "fpc/fpc_sensor.h" #else /* These values are used by the host (emulator) tests. */ #define FP_SENSOR_IMAGE_SIZE 0 #define FP_SENSOR_RES_X 0 #define FP_SENSOR_RES_Y 0 #define FP_ALGORITHM_TEMPLATE_SIZE 0 #define FP_MAX_FINGER_COUNT 5 #endif #ifdef TEST_BUILD /* This represents the mock of the private */ #define HAVE_FP_PRIVATE_DRIVER #endif #endif /* __CROS_EC_DRIVER_FINGERPRINT_FPSENSOR_H_ */
/* Copyright 2019 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. */ #ifndef __CROS_EC_DRIVER_FINGERPRINT_FPSENSOR_H_ #define __CROS_EC_DRIVER_FINGERPRINT_FPSENSOR_H_ #if defined(HAVE_PRIVATE) && !defined(EMU_BUILD) #define HAVE_FP_PRIVATE_DRIVER #include "fpc/fpc_sensor.h" #else /* These values are used by the host (emulator) tests. */ #define FP_SENSOR_IMAGE_SIZE 0 #define FP_SENSOR_RES_X 0 #define FP_SENSOR_RES_Y 0 #define FP_ALGORITHM_TEMPLATE_SIZE 0 #define FP_MAX_FINGER_COUNT 5 #endif #ifdef TEST_BUILD /* This represents the mock of the private */ #define HAVE_FP_PRIVATE_DRIVER #endif #endif /* __CROS_EC_DRIVER_FINGERPRINT_FPSENSOR_H_ */
Exclude header on emulator build, not test build
driver/fingerprint: Exclude header on emulator build, not test build Now that we run unit tests on device, we want to be able to include the fingerprint sensor headers in test builds. BRANCH=none BUG=b:76037094 TEST=make buildall -j TEST=With dragonclaw v0.2 connected to Segger J-Trace and servo micro: ./test/run_device_tests.py Signed-off-by: Tom Hughes <fc5c12f30a5ed2baa0581f44ee14ad1eb7b20d83@chromium.org> Change-Id: Id406fd6039f1136f2ae8743453ead4a951805db5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2321827 Reviewed-by: Yicheng Li <77a205905d8955597c069555e9569c30512f6bd8@chromium.org>
C
bsd-3-clause
coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec
a3fadc72e797ba8494eb6641a677364e82b08584
list.h
list.h
#include <stdlib.h> #ifndef __LIST_H__ #define __LIST_H__ struct ListNode; struct List; typedef struct ListNode ListNode; typedef struct List List; List* List_Create(void); void List_Destroy(List* l); ListNode* ListNode_Create(void* k); void ListNode_Destroy(ListNode* n); ListNode* List_Search(List* l, void* k, int (f)(void*, void*)); void List_Insert(List* l, ListNode* n); void List_Delete(List* l, ListNode* n); #endif
#include <stdlib.h> #ifndef __LIST_H__ #define __LIST_H__ struct ListNode; struct List; typedef struct ListNode ListNode; typedef struct List List; List* List_Create(void); void List_Destroy(List* l); ListNode* ListNode_Create(void* k); void* ListNode_Retrieve(ListNode* n); void ListNode_Destroy(ListNode* n); ListNode* List_Search(List* l, void* k, int (f)(void*, void*)); void List_Insert(List* l, ListNode* n); void List_Delete(List* l, ListNode* n); #endif
Add List Node Retrieve function declaration
Add List Node Retrieve function declaration Function to retrieve key from any List Node
C
mit
MaxLikelihood/CADT
76c1534e0bd78e9a7662edcf5c994bac63d939fd
drivers/scsi/qla2xxx/qla_version.h
drivers/scsi/qla2xxx/qla_version.h
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2005 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.01.05-k2" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 1 #define QLA_DRIVER_PATCH_VER 5 #define QLA_DRIVER_BETA_VER 0
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2005 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.01.05-k3" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 1 #define QLA_DRIVER_PATCH_VER 5 #define QLA_DRIVER_BETA_VER 0
Update version number to 8.01.05-k3.
[SCSI] qla2xxx: Update version number to 8.01.05-k3. Signed-off-by: Andrew Vasquez <67840a4977006af7f584bdc4c86d7243c1629cad@qlogic.com> Signed-off-by: James Bottomley <407b36959ca09543ccda8f8e06721c791bc53435@SteelEye.com>
C
apache-2.0
TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas
deae63efe7c5469c68e451f30c23296bb67b80d6
www/db.h
www/db.h
/* * db.h * * Copyright (C) 2011 OpenTech Labs * Andrew Clayton <andrew@opentechlabs.co.uk> * Released under the GNU General Public License (GPL) version 3. * See COPYING */ #ifndef _DB_H_ #define _DB_H_ /* For Tokyocabinet (user sessions) */ #include <tcutil.h> #include <tctdb.h> #include <stdbool.h> #include <stdint.h> #include <libgen.h> /* MySQL */ #include <my_global.h> #include <mysql.h> MYSQL *db_conn(void); #endif /* _DB_H_ */
/* * db.h * * Copyright (C) 2011 OpenTech Labs * Andrew Clayton <andrew@opentechlabs.co.uk> * Released under the GNU General Public License (GPL) version 3. * See COPYING */ #ifndef _DB_H_ #define _DB_H_ /* For Tokyocabinet (user sessions) */ #include <tcutil.h> #include <tctdb.h> #include <stdbool.h> #include <stdint.h> #include <libgen.h> /* MySQL */ /* * The FCGI printf function seemed to be causing a conflict here, under F16 * with GCC 4.6.2 * * Just undef printf for the my_global stuff and then define it back again. */ #undef printf #include <my_global.h> #define printf FCGI_printf #include <mysql.h> MYSQL *db_conn(void); #endif /* _DB_H_ */
Fix compiler warnings under F16/GCC 4.6.2
Fix compiler warnings under F16/GCC 4.6.2 When compiling receiptomatic under Fedora 16 with GCC 4.6.2 we were getting the following warnings... gcc -Wall -std=c99 -O2 -g -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fPIE -c receiptomatic-www.c -D_RECEIPTOMATIC_WWW_ -I../../libctemplate `pkg-config --cflags glib-2.0` `pkg-config --cflags gmime-2.0` `mysql_config --cflags` In file included from /usr/include/mysql/my_global.h:1039:0, from db.h:21, from common.h:31, from receiptomatic-www.c:22: /usr/include/mysql/my_dbug.h:59:3: warning: ‘FCGI_printf’ is an unrecognized format function type [-Wformat] This seemed to be a conflict between the FCGI_printf definition and the use of 'ATTRIBUTE_FORMAT(printf, 1, 2)' in my_global.h The workaround seems to be to undef printf before including my_global.h and then defining it back again afterwards. Signed-off-by: Andrew Clayton <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@opentechlabs.co.uk>
C
agpl-3.0
ac000/receiptomatic
7cad08e5c045a002e25c710ccb528f22e21ed835
src/ffi.c
src/ffi.c
#include "mruby.h" #include "mruby/value.h" static mrb_value longsize(mrb_state *mrb, mrb_value self) { uint8_t size = (uint8_t)sizeof(long); return mrb_fixnum_value(size); } /* ruby calls this to load the extension */ void mrb_mruby_rubyffi_compat_gem_init(mrb_state *mrb) { struct RClass *mod = mrb_define_module(mrb, "FFI"); mrb_define_class_method(mrb, mod, "longsize", longsize, ARGS_NONE()); } void mrb_mruby_rubyffi_compat_gem_final(mrb_state *mrb) { }
#include "mruby.h" #include "mruby/value.h" static mrb_value longsize(mrb_state *mrb, mrb_value self) { uint8_t size = (uint8_t)sizeof(long); return mrb_fixnum_value(size); } /* ruby calls this to load the extension */ void mrb_mruby_rubyffi_compat_gem_init(mrb_state *mrb) { struct RClass *mod = mrb_define_module(mrb, "FFI"); mrb_define_class_method(mrb, mod, "longsize", longsize, MRB_ARGS_NONE()); } void mrb_mruby_rubyffi_compat_gem_final(mrb_state *mrb) { }
Fix for "implicit declaration of function 'ARGS_NONE' is invalid" error
Fix for "implicit declaration of function 'ARGS_NONE' is invalid" error
C
mit
schmurfy/mruby-rubyffi-compat,schmurfy/mruby-rubyffi-compat,schmurfy/mruby-rubyffi-compat
296ec37839f1504138b340d785fb9a1fd1fa03a9
include/parrot/string_primitives.h
include/parrot/string_primitives.h
/* string_funcs.h * Copyright (C) 2001-2003, The Perl Foundation. * SVN Info * $Id$ * Overview: * This is the api header for the string subsystem * Data Structure and Algorithms: * History: * Notes: * References: */ #ifndef PARROT_STRING_PRIMITIVES_H_GUARD #define PARROT_STRING_PRIMITIVES_H_GUARD #ifdef PARROT_IN_CORE /* Set the directory where ICU finds its data files (encodings, locales, etc.) */ void string_set_data_directory(const char *dir); /* Convert from any supported encoding, into our internal format */ void string_fill_from_buffer(Interp *interp, const void *buffer, UINTVAL len, const char *encoding_name, STRING *s); /* Utility method which knows how to uwind a single escape sequence */ typedef Parrot_UInt2 (*Parrot_unescape_cb)(Parrot_Int4 offset, void *context); Parrot_UInt4 string_unescape_one(Interp *interp, UINTVAL *offset, STRING *string); UINTVAL Parrot_char_digit_value(Interp *interp, UINTVAL character); #endif /* PARROT_IN_CORE */ #endif /* PARROT_STRING_PRIMITIVES_H_GUARD */ /* * Local variables: * c-file-style: "parrot" * End: * vim: expandtab shiftwidth=4: */
/* string_funcs.h * Copyright (C) 2001-2003, The Perl Foundation. * SVN Info * $Id$ * Overview: * This is the api header for the string subsystem * Data Structure and Algorithms: * History: * Notes: * References: */ #ifndef PARROT_STRING_PRIMITIVES_H_GUARD #define PARROT_STRING_PRIMITIVES_H_GUARD #ifdef PARROT_IN_CORE /* Set the directory where ICU finds its data files (encodings, locales, etc.) */ PARROT_API void string_set_data_directory(const char *dir); /* Convert from any supported encoding, into our internal format */ PARROT_API void string_fill_from_buffer(Interp *interp, const void *buffer, UINTVAL len, const char *encoding_name, STRING *s); /* Utility method which knows how to uwind a single escape sequence */ typedef Parrot_UInt2 (*Parrot_unescape_cb)(Parrot_Int4 offset, void *context); PARROT_API Parrot_UInt4 string_unescape_one(Interp *interp, UINTVAL *offset, STRING *string); PARROT_API UINTVAL Parrot_char_digit_value(Interp *interp, UINTVAL character); #endif /* PARROT_IN_CORE */ #endif /* PARROT_STRING_PRIMITIVES_H_GUARD */ /* * Local variables: * c-file-style: "parrot" * End: * vim: expandtab shiftwidth=4: */
Fix the build on Win32 by making linkage of various symbols consistent again.
Fix the build on Win32 by making linkage of various symbols consistent again. git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@18778 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
C
artistic-2.0
fernandobrito/parrot,gitster/parrot,gagern/parrot,tkob/parrot,tewk/parrot-select,tewk/parrot-select,parrot/parrot,gagern/parrot,fernandobrito/parrot,gagern/parrot,youprofit/parrot,fernandobrito/parrot,fernandobrito/parrot,tewk/parrot-select,FROGGS/parrot,tkob/parrot,gitster/parrot,gagern/parrot,tkob/parrot,tewk/parrot-select,tkob/parrot,FROGGS/parrot,youprofit/parrot,gagern/parrot,youprofit/parrot,youprofit/parrot,parrot/parrot,tkob/parrot,FROGGS/parrot,gitster/parrot,parrot/parrot,FROGGS/parrot,tewk/parrot-select,FROGGS/parrot,tewk/parrot-select,fernandobrito/parrot,tkob/parrot,gitster/parrot,youprofit/parrot,FROGGS/parrot,tewk/parrot-select,youprofit/parrot,fernandobrito/parrot,parrot/parrot,tkob/parrot,gagern/parrot,gitster/parrot,FROGGS/parrot,gagern/parrot,parrot/parrot,FROGGS/parrot,gitster/parrot,youprofit/parrot,fernandobrito/parrot,tkob/parrot,gitster/parrot,youprofit/parrot
0e9ab695770b9c5501b56fb712527e1ed780950d
cc1/tests/test038.c
cc1/tests/test038.c
/* name: TEST038 description: Basic test for tentative definitions output: */ int x; int x = 0; int x; int main(); void * foo() { return &main; } int main() { x = 0; return x; }
/* name: TEST038 description: Basic test for tentative definitions output: test038.c:45: error: redeclaration of 'x' G1 I x ( #I0 ) F2 I E X3 F2 main F4 P E G5 F4 foo { \ r X3 'P } G3 F2 main { \ G1 #I0 :I r G1 } */ int x; int x = 0; int x; int main(); void * foo() { return &main; } int main() { x = 0; return x; } int x = 1;
Add solution for test of tentative declarations
Add solution for test of tentative declarations
C
isc
k0gaMSX/scc,k0gaMSX/kcc,k0gaMSX/scc,k0gaMSX/kcc,k0gaMSX/scc
d1327aec1bceaa7c998dd2eb47ab646f6c5db33d
vpx_ports/msvc.h
vpx_ports/msvc.h
/* * Copyright (c) 2015 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef VPX_PORTS_MSVC_H_ #define VPX_PORTS_MSVC_H_ #ifdef _MSC_VER #include "./vpx_config.h" # if _MSC_VER < 1900 // VS2015 provides snprintf # define snprintf _snprintf # endif // _MSC_VER < 1900 #if _MSC_VER < 1800 // VS2013 provides round #include <math.h> static INLINE double round(double x) { if (x < 0) return ceil(x - 0.5); else return floor(x + 0.5); } #endif // _MSC_VER < 1800 #endif // _MSC_VER #endif // VPX_PORTS_MSVC_H_
/* * Copyright (c) 2015 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef VPX_PORTS_MSVC_H_ #define VPX_PORTS_MSVC_H_ #ifdef _MSC_VER #include "./vpx_config.h" # if _MSC_VER < 1900 // VS2015 provides snprintf # define snprintf _snprintf # endif // _MSC_VER < 1900 #if _MSC_VER < 1800 // VS2013 provides round #include <math.h> static INLINE double round(double x) { if (x < 0) return ceil(x - 0.5); else return floor(x + 0.5); } static INLINE float roundf(float x) { if (x < 0) return (float)ceil(x - 0.5f); else return (float)floor(x + 0.5f); } static INLINE long lroundf(float x) { if (x < 0) return (long)(x - 0.5f); else return (long)(x + 0.5f); } #endif // _MSC_VER < 1800 #endif // _MSC_VER #endif // VPX_PORTS_MSVC_H_
Add roundf and lroundf replacements for VS < 2013.
Add roundf and lroundf replacements for VS < 2013. Change-Id: I25678279ab44672acf680bf04d9c551156e2904b
C
bsd-2-clause
GrokImageCompression/aom,mbebenita/aom,GrokImageCompression/aom,mbebenita/aom,mbebenita/aom,luctrudeau/aom,mbebenita/aom,GrokImageCompression/aom,luctrudeau/aom,GrokImageCompression/aom,luctrudeau/aom,luctrudeau/aom,GrokImageCompression/aom,mbebenita/aom,mbebenita/aom,GrokImageCompression/aom,smarter/aom,smarter/aom,mbebenita/aom,mbebenita/aom,smarter/aom,luctrudeau/aom,luctrudeau/aom,smarter/aom,smarter/aom,mbebenita/aom,smarter/aom
667af78609aef7ce96f22c1727256265280919ae
board.h
board.h
#ifndef __BOARD_H #define __BOARD_H #include <aery32/all.h> #define ADC_VREF 3.0 #define ADC_BITS 10 namespace board { void init(void); inline double cnv_to_volt(unsigned int cnv) { return cnv * (ADC_VREF / (1UL << ADC_BITS)); } } /* end of namespace board */ #endif
#ifndef __BOARD_H #define __BOARD_H #define ADC_VREF 3.0 #define ADC_BITS 10 namespace board { void init(void); inline double cnv_to_volt(unsigned int cnv) { return cnv * (ADC_VREF / (1UL << ADC_BITS)); } } /* end of namespace board */ #endif
Remove unnecessary include of aery32/all.h
Remove unnecessary include of aery32/all.h
C
bsd-3-clause
aery32/aery32,aery32/aery32,denravonska/aery32,denravonska/aery32
52b676ffd7f8665b01f37ebb515b9ba911561fc9
zephyr/test/drivers/common/src/main.c
zephyr/test/drivers/common/src/main.c
/* Copyright 2021 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 <zephyr/zephyr.h> #include <ztest.h> #include "ec_app_main.h" #include "test/drivers/test_state.h" bool drivers_predicate_pre_main(const void *state) { return ((struct test_state *)state)->ec_app_main_run == false; } bool drivers_predicate_post_main(const void *state) { return !drivers_predicate_pre_main(state); } void test_main(void) { struct test_state state = { .ec_app_main_run = false, }; /* Run all the suites that depend on main not being called yet */ ztest_run_test_suites(&state); ec_app_main(); state.ec_app_main_run = true; /* Run all the suites that depend on main being called */ ztest_run_test_suites(&state); /* Check that every suite ran */ ztest_verify_all_test_suites_ran(); }
/* Copyright 2021 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 <zephyr/zephyr.h> #include <ztest.h> #include "ec_app_main.h" #include "test/drivers/test_state.h" bool drivers_predicate_pre_main(const void *state) { return ((struct test_state *)state)->ec_app_main_run == false; } bool drivers_predicate_post_main(const void *state) { return !drivers_predicate_pre_main(state); } void test_main(void) { struct test_state state = { .ec_app_main_run = false, }; /* Run all the suites that depend on main not being called yet */ ztest_run_all(&state); ec_app_main(); state.ec_app_main_run = true; /* Run all the suites that depend on main being called */ ztest_run_all(&state); }
Fix listing of test cases
zephyr: Fix listing of test cases Use correct ZTEST API so test cases can be listed BUG=b:240364238 BRANCH=NONE TEST=./zephyr.exe -list Signed-off-by: Al Semjonovs <c3a2ecb550cad1e7d5a943ca6241377f7b43ffc4@google.com> Change-Id: If3b603ab64421da558228e67a907039a1674ba0b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3789128 Reviewed-by: Yuval Peress <50dc11c009bd4d7e9d9d15a383c1743ce5ee82ef@google.com>
C
bsd-3-clause
coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec
17787f4779ab490398d7ff391230dbfedfa987c5
sbin/md5/global.h
sbin/md5/global.h
/* GLOBAL.H - RSAREF types and constants */ /* PROTOTYPES should be set to one if and only if the compiler supports function argument prototyping. The following makes PROTOTYPES default to 0 if it has not already been defined with C compiler flags. */ #ifndef PROTOTYPES #define PROTOTYPES 0 #endif /* POINTER defines a generic pointer type */ typedef unsigned char *POINTER; /* UINT2 defines a two byte word */ typedef unsigned short int UINT2; /* UINT4 defines a four byte word */ typedef unsigned long int UINT4; /* PROTO_LIST is defined depending on how PROTOTYPES is defined above. If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it returns an empty list. */ #if PROTOTYPES #define PROTO_LIST(list) list #else #define PROTO_LIST(list) () #endif
/* GLOBAL.H - RSAREF types and constants */ /* PROTOTYPES should be set to one if and only if the compiler supports function argument prototyping. The following makes PROTOTYPES default to 0 if it has not already been defined with C compiler flags. */ #ifndef PROTOTYPES #define PROTOTYPES 0 #endif /* POINTER defines a generic pointer type */ typedef unsigned char *POINTER; #if 0 /* UINT2 defines a two byte word */ typedef unsigned short int UINT2; /* UINT4 defines a four byte word */ typedef unsigned long int UINT4; #else #include <sys/types.h> /* UINT2 defines a two byte word */ typedef u_int16_t UINT2; /* UINT4 defines a four byte word */ typedef u_int32_t UINT4; #endif /* 0 */ /* PROTO_LIST is defined depending on how PROTOTYPES is defined above. If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it returns an empty list. */ #if PROTOTYPES #define PROTO_LIST(list) list #else #define PROTO_LIST(list) () #endif
Fix bad assumptions about types. PR: 1649 Reviewed by: phk Submitted by: Jason Thorpe <thorpej@nas.nasa.gov>
Fix bad assumptions about types. PR: 1649 Reviewed by: phk Submitted by: Jason Thorpe <thorpej@nas.nasa.gov>
C
bsd-3-clause
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
3f283a62a22d59028e96d39fdc35c6bd85c2129d
src/modules/conf_randr/e_mod_main.h
src/modules/conf_randr/e_mod_main.h
#ifndef E_MOD_MAIN_H # define E_MOD_MAIN_H # define LOGFNS 1 # ifdef LOGFNS # include <stdio.h> # define LOGFN(fl, ln, fn) printf("-CONF-RANDR: %25s: %5i - %s\n", fl, ln, fn); # else # define LOGFN(fl, ln, fn) # endif # ifndef ECORE_X_RANDR_1_2 # define ECORE_X_RANDR_1_2 ((1 << 16) | 2) # endif # ifndef ECORE_X_RANDR_1_3 # define ECORE_X_RANDR_1_3 ((1 << 16) | 3) # endif # ifndef E_RANDR_12 # define E_RANDR_12 (e_randr_screen_info.rrvd_info.randr_info_12) # endif EAPI extern E_Module_Api e_modapi; EAPI void *e_modapi_init(E_Module *m); EAPI int e_modapi_shutdown(E_Module *m); EAPI int e_modapi_save(E_Module *m); extern const char *mod_dir; /** * @addtogroup Optional_Conf * @{ * * @defgroup Module_Conf_RandR RandR (Screen Resize, Rotate and Mirror) * * Configures size, rotation and mirroring of screen. Uses the X11 * RandR protocol (does not work with NVidia proprietary drivers). * * @} */ #endif
#ifndef E_MOD_MAIN_H # define E_MOD_MAIN_H //# define LOGFNS 1 # ifdef LOGFNS # include <stdio.h> # define LOGFN(fl, ln, fn) printf("-CONF-RANDR: %25s: %5i - %s\n", fl, ln, fn); # else # define LOGFN(fl, ln, fn) # endif EAPI extern E_Module_Api e_modapi; EAPI void *e_modapi_init(E_Module *m); EAPI int e_modapi_shutdown(E_Module *m); EAPI int e_modapi_save(E_Module *m); /** * @addtogroup Optional_Conf * @{ * * @defgroup Module_Conf_RandR RandR (Screen Resize, Rotate and Mirror) * * Configures size, rotation and mirroring of screen. Uses the X11 * RandR protocol (does not work with NVidia proprietary drivers). * * @} */ #endif
Remove useless defines and variables.
Remove useless defines and variables. Signed-off-by: Christopher Michael <cp.michael@samsung.com> SVN revision: 84200
C
bsd-2-clause
tasn/enlightenment,rvandegrift/e,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment,rvandegrift/e,tizenorg/platform.upstream.enlightenment,tasn/enlightenment,rvandegrift/e,FlorentRevest/Enlightenment,tasn/enlightenment,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment
821e790e9f14828382c787ca907ef4c7c86ff1de
src/handler/plparrot.c
src/handler/plparrot.c
#include "postgres.h" #include "executor/spi.h" #include "commands/trigger.h" #include "fmgr.h" #include "access/heapam.h" #include "utils/syscache.h" #include "catalog/pg_proc.h" #include "catalog/pg_type.h" /* Figure out how to include these properly #include "parrot/embed.h" #include "parrot/debugger.h" #include "parrot/runcore_api.h" */ PG_MODULE_MAGIC; Datum plparrot_call_handler(PG_FUNCTION_ARGS); void plparrot_elog(int level, char *message); PG_FUNCTION_INFO_V1(plparrot_call_handler); Datum plparrot_call_handler(PG_FUNCTION_ARGS) { Datum retval; retval = PG_GETARG_DATUM(0); PG_TRY(); { } PG_CATCH(); { } PG_END_TRY(); return retval; } void plparrot_elog(int level, char *message) { elog(level, "%s", message); }
#include "postgres.h" #include "executor/spi.h" #include "commands/trigger.h" #include "fmgr.h" #include "access/heapam.h" #include "utils/syscache.h" #include "utils/builtins.h" #include "catalog/pg_proc.h" #include "catalog/pg_type.h" /* Figure out how to include these properly We need to use "parrot_config includedir" #include "parrot/embed.h" #include "parrot/debugger.h" #include "parrot/runcore_api.h" */ PG_MODULE_MAGIC; int execq(text *sql, int cnt); int execq(text *sql, int cnt) { char *command; int ret; int proc; SPI_connect(); SPI_finish(); //pfree(command); return (proc); } Datum plparrot_call_handler(PG_FUNCTION_ARGS); void plparrot_elog(int level, char *message); PG_FUNCTION_INFO_V1(plparrot_call_handler); Datum plparrot_call_handler(PG_FUNCTION_ARGS) { Datum retval; retval = PG_GETARG_DATUM(0); PG_TRY(); { } PG_CATCH(); { } PG_END_TRY(); return retval; } void plparrot_elog(int level, char *message) { elog(level, "%s", message); }
Add the beginnings of something that does SPI
Add the beginnings of something that does SPI
C
artistic-2.0
leto/plparrot,leto/plparrot,leto/plparrot
2cba4cc585f7dde2b9b582d2ff3c164819697e3b
features/FEATURE_UVISOR/includes/uvisor/api/inc/uvisor_deprecation.h
features/FEATURE_UVISOR/includes/uvisor/api/inc/uvisor_deprecation.h
/* * Copyright (c) 2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __UVISOR_DEPRECATION_H__ #define __UVISOR_DEPRECATION_H__ #if defined(UVISOR_PRESENT) && UVISOR_PRESENT == 1 #warning "Warning: You are using FEATURE_UVISOR, which is unsupported as of Mbed OS 5.9." #endif #endif // __UVISOR_DEPRECATION_H__
/* * Copyright (c) 2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __UVISOR_DEPRECATION_H__ #define __UVISOR_DEPRECATION_H__ #if defined(UVISOR_PRESENT) && UVISOR_PRESENT == 1 #warning "Warning: uVisor is superseded by the Secure Partition Manager (SPM) defined in the ARM Platform Security Architecture (PSA). \ uVisor is deprecated as of Mbed OS 5.9, and being replaced by a native PSA-compliant implementation of SPM." #endif #endif // __UVISOR_DEPRECATION_H__
Edit warning about FEATURE_UVISOR being deprecated
Edit warning about FEATURE_UVISOR being deprecated
C
apache-2.0
mbedmicro/mbed,c1728p9/mbed-os,c1728p9/mbed-os,betzw/mbed-os,andcor02/mbed-os,andcor02/mbed-os,betzw/mbed-os,betzw/mbed-os,betzw/mbed-os,andcor02/mbed-os,kjbracey-arm/mbed,c1728p9/mbed-os,andcor02/mbed-os,andcor02/mbed-os,c1728p9/mbed-os,mbedmicro/mbed,c1728p9/mbed-os,kjbracey-arm/mbed,c1728p9/mbed-os,kjbracey-arm/mbed,kjbracey-arm/mbed,betzw/mbed-os,mbedmicro/mbed,mbedmicro/mbed,betzw/mbed-os,mbedmicro/mbed,andcor02/mbed-os
471c298771351869ac9b520468ae8e392665572e
src/idxgen.h
src/idxgen.h
#ifndef IDXGEN_H #define IDXGEN_H #include "encparams.h" #include "bitstring.h" typedef struct NtruIGFState { int N; int c; int clen; char *Z; int zlen; int rem_len; NtruBitStr buf; int counter; void (*hash)(char[], int, char[]); int hlen; } NtruIGFState; /** * @brief IGF initialization * * Initializes the Index Generation Function. * Based on IGF-2 from IEEE P1363.1 section 8.4.2.1. * * @param seed * @param seed_len * @param params * @param s */ void ntru_IGF_init(char *seed, int seed_len, struct NtruEncParams *params, NtruIGFState *s); /** * @brief IGF next index * * Returns the next index. * Based on IGF-2 from IEEE P1363.1 section 8.4.2.1. * * @param s * @param i */ void ntru_IGF_next(NtruIGFState *s, int *i); #endif /* IDXGEN_H */
#ifndef IDXGEN_H #define IDXGEN_H #include "encparams.h" #include "bitstring.h" typedef struct NtruIGFState { int N; int c; char *Z; int zlen; int rem_len; NtruBitStr buf; int counter; void (*hash)(char[], int, char[]); int hlen; } NtruIGFState; /** * @brief IGF initialization * * Initializes the Index Generation Function. * Based on IGF-2 from IEEE P1363.1 section 8.4.2.1. * * @param seed * @param seed_len * @param params * @param s */ void ntru_IGF_init(char *seed, int seed_len, struct NtruEncParams *params, NtruIGFState *s); /** * @brief IGF next index * * Returns the next index. * Based on IGF-2 from IEEE P1363.1 section 8.4.2.1. * * @param s * @param i */ void ntru_IGF_next(NtruIGFState *s, int *i); #endif /* IDXGEN_H */
Remove an unused struct member
Remove an unused struct member
C
bsd-3-clause
iblumenfeld/libntru,jl777/libntru,jquesnelle/libntru,jquesnelle/libntru,jl777/libntru,jl777/libntru,iblumenfeld/libntru,iblumenfeld/libntru,jquesnelle/libntru
14dd5b240b3b619889aef85184704448c1b05dba
src/skbuff.c
src/skbuff.c
#include "syshead.h" #include "skbuff.h" struct sk_buff *alloc_skb(unsigned int size) { struct sk_buff *skb = malloc(sizeof(struct sk_buff)); memset(skb, 0, sizeof(struct sk_buff)); skb->data = malloc(size); memset(skb->data, 0, size); skb->head = skb->data; skb->tail = skb->data; skb->end = skb->tail + size; return skb; } void free_skb(struct sk_buff *skb) { free(skb->data); free(skb); } void *skb_reserve(struct sk_buff *skb, unsigned int len) { skb->data += len; skb->tail += len; return skb->data; } uint8_t *skb_push(struct sk_buff *skb, unsigned int len) { skb->data -= len; skb->len += len; return skb->data; } void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) { skb->dst = dst; } uint8_t *skb_head(struct sk_buff *skb) { return skb->head; }
#include "syshead.h" #include "skbuff.h" struct sk_buff *alloc_skb(unsigned int size) { struct sk_buff *skb = malloc(sizeof(struct sk_buff)); memset(skb, 0, sizeof(struct sk_buff)); skb->data = malloc(size); memset(skb->data, 0, size); skb->head = skb->data; skb->tail = skb->data; skb->end = skb->tail + size; return skb; } void free_skb(struct sk_buff *skb) { free(skb->head); free(skb); } void *skb_reserve(struct sk_buff *skb, unsigned int len) { skb->data += len; skb->tail += len; return skb->data; } uint8_t *skb_push(struct sk_buff *skb, unsigned int len) { skb->data -= len; skb->len += len; return skb->data; } void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) { skb->dst = dst; } uint8_t *skb_head(struct sk_buff *skb) { return skb->head; }
Fix pointer in skb free routine
Fix pointer in skb free routine You cannot pass a different memory location to malloc than what it was originally allocated with :p
C
mit
saminiir/level-ip,saminiir/level-ip
5eb3562266c5f970ae0943da45dd7740aa7a5747
src/sounds.h
src/sounds.h
/***************************************************************************** * SOUNDS HEADER * * Provides easy access to all sounds. * * See: sdl_snake.c * *****************************************************************************/ #pragma once #ifdef _WIN32 // STUPID WINDOWS #include "SDL_mixer.h" #else #include "SDL/SDL_mixer.h" #endif Mix_Chunk *snd_menu_blip; Mix_Chunk *snd_menu_select; Mix_Chunk *snd_crash; Mix_Chunk *snd_eat; Mix_Chunk *snd_321; Mix_Chunk *snd_go;
/***************************************************************************** * SOUNDS HEADER * * Provides easy access to all sounds. * * See: sdl_snake.c * *****************************************************************************/ #pragma once #if defined _WIN32 || defined __APPLE__ #include "SDL_mixer.h" #else #include "SDL/SDL_mixer.h" #endif Mix_Chunk *snd_menu_blip; Mix_Chunk *snd_menu_select; Mix_Chunk *snd_crash; Mix_Chunk *snd_eat; Mix_Chunk *snd_321; Mix_Chunk *snd_go;
Fix compilation on Mac OS X
Fix compilation on Mac OS X
C
mit
footballhead/sdl-snake,footballhead/sdl-snake,footballhead/sdl-snake
85d984179dc8cd7b3a365229e592811ee592af3a
str/env.h
str/env.h
#ifndef BGLIBS__STR__ENV__H__ #define BGLIBS__STR__ENV__H__ #include <str/str.h> /** \defgroup envstr envstr: Environment variables in a str. \par Calling Convention All functions that allocate memory return \c 0 (false) if the function failed due to being unable to allocate memory, and non-zero (true) otherwise. @{ */ extern const char* envstr_find(const str* env, const char* var, long varlen); extern const char* envstr_get(const str* env, const char* var); extern int envstr_set(str* env, const char* var, const char* val, int overwrite); extern void envstr_unset(str* env, const char* var); extern int envstr_put(str* env, const char* asgn, int overwrite); extern int envstr_from_array(str* env, char** array, int overwrite); extern int envstr_from_string(str* env, const char* s, int overwrite); extern char** envstr_make_array(const str* env); /* @} */ #endif
#ifndef BGLIBS__STR__ENV__H__ #define BGLIBS__STR__ENV__H__ struct str; /** \defgroup envstr envstr: Environment variables in a str. \par Calling Convention All functions that allocate memory return \c 0 (false) if the function failed due to being unable to allocate memory, and non-zero (true) otherwise. @{ */ extern const char* envstr_find(const struct str* env, const char* var, long varlen); extern const char* envstr_get(const struct str* env, const char* var); extern int envstr_set(struct str* env, const char* var, const char* val, int overwrite); extern void envstr_unset(struct str* env, const char* var); extern int envstr_put(struct str* env, const char* asgn, int overwrite); extern int envstr_from_array(struct str* env, char** array, int overwrite); extern int envstr_from_string(struct str* env, const char* s, int overwrite); extern char** envstr_make_array(const struct str* env); /* @} */ #endif
Use a forward struct str declaration to avoid recursive includes.
Use a forward struct str declaration to avoid recursive includes.
C
lgpl-2.1
bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs
cb0a193312f6e50c487ff1b7efebb96ce46df8ef
src/module.h
src/module.h
#include "main.h" enum Priority { PRI_HIGH, PRI_MEDIUM_HIGH, PRI_NORMAL, PRI_MEDIUM_LOW, PRI_LOW }; #define MODULE_SPAWN(modName) extern "C" Module* spawn(std::string moduleName, std::map<std::string, std::string> config, std::string workingDir, unsigned short debugLevel, Base* botptr) {\ return new modName (moduleName, config, workingDir, debugLevel, botptr);\ } typedef bool MsgAction; const bool MSG_CONTINUE = true; const bool MSG_IGNORE = false; class Module { public: Module(std::string modName, std::map<std::string, std::string> conf, std::string workDir, unsigned short debug, Base* botptr); const Priority priority; unsigned int apiVersion() = 0; bool onLoadComplete(); void onRehash(); void onModuleLoad(std::string modName); void onModuleUnload(std::string modName); // TODO: module hooks std::string description(); std::list<std::string> provides(); std::list<std::string> requires(); std::list<std::string> supports(); protected: std::string moduleName; std::map<std::string, std::string> config; std::string workingDir; unsigned short debugLevel; private: Base* bot; };
#include "main.h" enum Priority { PRI_HIGH, PRI_MEDIUM_HIGH, PRI_NORMAL, PRI_MEDIUM_LOW, PRI_LOW }; #define MODULE_SPAWN(modName) extern "C" Module* spawn(std::string moduleName, std::map<std::string, std::string> config, std::string workingDir, unsigned short debugLevel, Base* botptr) {\ return new modName (moduleName, config, workingDir, debugLevel, botptr);\ } typedef bool MsgAction; const bool MSG_CONTINUE = true; const bool MSG_IGNORE = false; class Module { public: Module(std::string modName, std::map<std::string, std::string> conf, std::string workDir, unsigned short debug, Base* botptr); const Priority priority; virtual unsigned int apiVersion() = 0; virtual bool onLoadComplete(); virtual void onRehash(); virtual void onModuleLoad(std::string modName); virtual void onModuleUnload(std::string modName); // TODO: module hooks virtual std::string description(); virtual std::list<std::string> provides(); virtual std::list<std::string> requires(); virtual std::list<std::string> supports(); protected: std::string moduleName; std::map<std::string, std::string> config; std::string workingDir; unsigned short debugLevel; private: Base* bot; };
Make virtual functions that need to be virtual
Make virtual functions that need to be virtual
C
mit
ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo
866bade85dec9a231350201fb147f9381eee55c7
tensorflow/core/platform/default/integral_types.h
tensorflow/core/platform/default/integral_types.h
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_ #define TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_ #include <cstdint> // IWYU pragma: private, include "third_party/tensorflow/core/platform/types.h" // IWYU pragma: friend third_party/tensorflow/core/platform/types.h namespace tensorflow { typedef signed char int8; typedef short int16; typedef int int32; [[deprecated("Use int64_t instead.")]] typedef ::std::int64_t int64; typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; typedef std::uint64_t uint64; } // namespace tensorflow #endif // TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_ #define TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_ #include <cstdint> // IWYU pragma: private, include "third_party/tensorflow/core/platform/types.h" // IWYU pragma: friend third_party/tensorflow/core/platform/types.h namespace tensorflow { typedef signed char int8; typedef short int16; typedef int int32; typedef ::std::int64_t int64; typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; typedef std::uint64_t uint64; } // namespace tensorflow #endif // TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_
Remove deprecation on int64 type.
Remove deprecation on int64 type. I have half a million lines of log-spew in my CI from this and clearly there has been ~no effort in the codebase to actually stop using it. Please do not deprecate such a critical type until at least its own codebase has substantially migrated off of it. PiperOrigin-RevId: 399093429 Change-Id: I807d9e6c79c4c33f4a50f88ba28fe5fda194ddd4
C
apache-2.0
tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,paolodedios/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,karllessard/tensorflow,yongtang/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,Intel-Corporation/tensorflow,Intel-Corporation/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,gautam1858/tensorflow,Intel-Corporation/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,yongtang/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,karllessard/tensorflow,karllessard/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,Intel-Corporation/tensorflow,Intel-Corporation/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,Intel-Corporation/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow
16514de50a7936950845a3851cae8ce571e0c2c2
include/llvm/Transforms/Utils/IntegerDivision.h
include/llvm/Transforms/Utils/IntegerDivision.h
//===- llvm/Transforms/Utils/IntegerDivision.h ------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file contains an implementation of 32bit integer division for targets // that don't have native support. It's largely derived from compiler-rt's // implementation of __udivsi3, but hand-tuned for targets that prefer less // control flow. // //===----------------------------------------------------------------------===// #ifndef TRANSFORMS_UTILS_INTEGERDIVISION_H #define TRANSFORMS_UTILS_INTEGERDIVISION_H namespace llvm { class BinaryOperator; } namespace llvm { bool expandDivision(BinaryOperator* Div); } // End llvm namespace #endif
//===- llvm/Transforms/Utils/IntegerDivision.h ------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file contains an implementation of 32bit integer division for targets // that don't have native support. It's largely derived from compiler-rt's // implementation of __udivsi3, but hand-tuned for targets that prefer less // control flow. // //===----------------------------------------------------------------------===// #ifndef TRANSFORMS_UTILS_INTEGERDIVISION_H #define TRANSFORMS_UTILS_INTEGERDIVISION_H namespace llvm { class BinaryOperator; } namespace llvm { /// Generate code to divide two integers, replacing Div with the generated /// code. This currently generates code similarly to compiler-rt's /// implementations, but future work includes generating more specialized code /// when more information about the operands are known. Currently only /// implements 32bit scalar division, but future work is removing this /// limitation. /// /// @brief Replace Div with generated code. bool expandDivision(BinaryOperator* Div); } // End llvm namespace #endif
Document the interface for integer expansion, using doxygen-style comments
Document the interface for integer expansion, using doxygen-style comments git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@164231 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm
7c0fe28d061b6316017683c31b2e027c2d2f017f
src/lib/src/network/persistent-cookie-jar.h
src/lib/src/network/persistent-cookie-jar.h
#ifndef PERSISTENT_COOKIE_JAR_H #define PERSISTENT_COOKIE_JAR_H #include <QMutex> #include <QNetworkCookieJar> #include <QList> class QNetworkCookie; class QObject; class QUrl; class PersistentCookieJar : public QNetworkCookieJar { Q_OBJECT public: explicit PersistentCookieJar(QString filename, QObject *parent = nullptr); ~PersistentCookieJar(); void clear(); bool insertCookies(const QList<QNetworkCookie> &cookies); virtual QList<QNetworkCookie> cookiesForUrl(const QUrl &url) const override; virtual bool setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, const QUrl &url) override; protected: void save(); void load(); private: QString m_filename; mutable QMutex m_mutex; }; #endif // PERSISTENT_COOKIE_JAR_H
#ifndef PERSISTENT_COOKIE_JAR_H #define PERSISTENT_COOKIE_JAR_H #include <QMutex> #include <QNetworkCookieJar> #include <QList> class QNetworkCookie; class QObject; class QUrl; /** * Network cookie jar which loads and stores cookies on a persistent file on disk. */ class PersistentCookieJar : public QNetworkCookieJar { Q_OBJECT public: /** * Create a new persistent cookie jar. * @param filename The full path of the file to use to load and store cookies. * @param parent The Qt parent object. */ explicit PersistentCookieJar(QString filename, QObject *parent = nullptr); /** * Saves the cookies before destroying the instance. */ ~PersistentCookieJar() override; /** * Remove all cookies from the cookie jar. */ void clear(); /** * Add new cookies to the cookie jar. * @param cookies The list of cookies to add to the cookie jar. * @return Whether all cookies were successfully added to the cookie jar. */ bool insertCookies(const QList<QNetworkCookie> &cookies); QList<QNetworkCookie> cookiesForUrl(const QUrl &url) const override; bool setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, const QUrl &url) override; protected: /** * Save the cookies to the file. */ void save(); /** * Load the cookies from the file. */ void load(); private: QString m_filename; mutable QMutex m_mutex; }; #endif // PERSISTENT_COOKIE_JAR_H
Add documentation comments for PersistentCookieJar
Add documentation comments for PersistentCookieJar
C
apache-2.0
Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber
332d1760db79f9395ccb4f479a21f9abcbf39e97
src/game/assets/recoil_player_id.h
src/game/assets/recoil_player_id.h
#pragma once #include "game/container_sizes.h" namespace assets { enum class recoil_player_id { INVALID, GENERIC, COUNT = MAX_RECOIL_PLAYER_COUNT + 1 }; }
#pragma once #include "game/container_sizes.h" namespace assets { enum class recoil_player_id { INVALID, #if BUILD_TEST_SCENES GENERIC, #endif COUNT = MAX_RECOIL_PLAYER_COUNT + 1 }; }
Fix GENERIC recoil_player conditional building
Fix GENERIC recoil_player conditional building
C
agpl-3.0
TeamHypersomnia/Hypersomnia,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Augmentations,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Augmentations,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Hypersomnia
8df8514dece958af1e810935fe9d4783760b60b1
include/BALL/QSAR/automaticModelCreator.h
include/BALL/QSAR/automaticModelCreator.h
#include <BALL/QSAR/Model.h> #include <BALL/QSAR/QSARData.h> namespace BALL { namespace QSAR { /** A class for automatic creation of the most appropriate QSAR model.\n All available model-types are therefore evaluated using nested cross-validation and several successive feature selection steps. */ class AutomaticModelCreator { public: AutomaticModelCreator(const QSARData* data); /** Start the search for most appropriate QSAR model for the current data. \n All available model-types are therefore evaluated using nested cross-validation and several successive feature selection steps. \n The model that obtained the highest nested prediction quality (>min_quality_) will be returned by this function. \n If no model achieved a quality higher than min_quality_, 0 will be returned. */ Model* generateModel(); void setData(const QSARData* data); void setMinQuality(double min_quality); private: void optimizeParameters(Model* model); void selectFeatures(Model* model); const QSARData* data_; double min_quality_; }; } }
#include <BALL/COMMON/global.h> #include <BALL/QSAR/Model.h> #include <BALL/QSAR/QSARData.h> namespace BALL { namespace QSAR { /** A class for automatic creation of the most appropriate QSAR model.\n All available model-types are therefore evaluated using nested cross-validation and several successive feature selection steps. */ class BALL_EXPORT AutomaticModelCreator { public: AutomaticModelCreator(const QSARData* data); /** Start the search for most appropriate QSAR model for the current data. \n All available model-types are therefore evaluated using nested cross-validation and several successive feature selection steps. \n The model that obtained the highest nested prediction quality (>min_quality_) will be returned by this function. \n If no model achieved a quality higher than min_quality_, 0 will be returned. */ Model* generateModel(); void setData(const QSARData* data); void setMinQuality(double min_quality); private: void optimizeParameters(Model* model); void selectFeatures(Model* model); const QSARData* data_; double min_quality_; }; } }
Add a missing BALL_EXPORT to AutoModelCreator
Add a missing BALL_EXPORT to AutoModelCreator
C
lgpl-2.1
tkemmer/ball,tkemmer/ball,tkemmer/ball,tkemmer/ball,tkemmer/ball,tkemmer/ball
f517d62938681f6f7d010557f3112a132707dcfa
chrome/browser/chromeos/cros/mock_update_library.h
chrome/browser/chromeos/cros/mock_update_library.h
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_ #define CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_ #pragma once #include "base/observer_list.h" #include "chrome/browser/chromeos/cros/update_library.h" #include "testing/gmock/include/gmock/gmock.h" namespace chromeos { class MockUpdateLibrary : public UpdateLibrary { public: MockUpdateLibrary() {} virtual ~MockUpdateLibrary() {} MOCK_METHOD1(AddObserver, void(Observer*)); // NOLINT MOCK_METHOD1(RemoveObserver, void(Observer*)); // NOLINT MOCK_METHOD0(CheckForUpdate, bool(void)); MOCK_METHOD0(RebootAfterUpdate, bool(void)); MOCK_METHOD1(SetReleaseTrack, bool(const std::string&)); MOCK_METHOD1(GetReleaseTrack, std::string()); MOCK_CONST_METHOD0(status, const Status&(void)); private: DISALLOW_COPY_AND_ASSIGN(MockUpdateLibrary); }; } // namespace chromeos #endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_ #define CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_ #pragma once #include "base/observer_list.h" #include "chrome/browser/chromeos/cros/update_library.h" #include "testing/gmock/include/gmock/gmock.h" namespace chromeos { class MockUpdateLibrary : public UpdateLibrary { public: MockUpdateLibrary() {} virtual ~MockUpdateLibrary() {} MOCK_METHOD1(AddObserver, void(Observer*)); // NOLINT MOCK_METHOD1(RemoveObserver, void(Observer*)); // NOLINT MOCK_METHOD0(CheckForUpdate, bool(void)); MOCK_METHOD0(RebootAfterUpdate, bool(void)); MOCK_METHOD1(SetReleaseTrack, bool(const std::string&)); MOCK_METHOD0(GetReleaseTrack, std::string()); MOCK_CONST_METHOD0(status, const Status&(void)); private: DISALLOW_COPY_AND_ASSIGN(MockUpdateLibrary); }; } // namespace chromeos #endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_
Fix the Chrome OS build.
Fix the Chrome OS build. TEST=make -j40 BUILDTYPE=Release browser_tests BUG=chromium-os:6030 Review URL: http://codereview.chromium.org/4129006 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@64027 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
yitian134/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,adobe/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,ropik/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,ropik/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,ropik/chromium
662f8c29cd34b43057b5167b68d2b071633d8324
arc/arc/Model/FileHelper.h
arc/arc/Model/FileHelper.h
// // FileHelper.h // arc // // Created by Jerome Cheng on 24/3/13. // Copyright (c) 2013 nus.cs3217. All rights reserved. // #import <Foundation/Foundation.h> #import "File.h" #import "Folder.h" #import "FileObject.h" @interface FileHelper : NSObject // Used to handle files passed in from other applications through iOS' "Open in..." // Moves the file into a folder named after that application (inside External Applications), // then returns it. - (File*) fileWithURL:(NSURL*)url sourceApplication:(NSString*)application annotation:(id)annotation; @end
// // FileHelper.h // arc // // Created by Jerome Cheng on 24/3/13. // Copyright (c) 2013 nus.cs3217. All rights reserved. // #import <Foundation/Foundation.h> #import "File.h" #import "Folder.h" #import "FileObject.h" @interface FileHelper : NSObject // Used to handle files passed in from other applications through iOS' "Open in..." // Moves the file into a folder named after that application (inside External Applications), // then returns it. + (File*)fileWithURL:(NSURL*)url sourceApplication:(NSString*)application annotation:(id)annotation; @end
Change fileWithURL:sourceApplications:annotation: to be a class method.
Change fileWithURL:sourceApplications:annotation: to be a class method.
C
mit
BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc
92e450372628ceb7c849c394c8e3c307f287974d
server/main.h
server/main.h
#include <fstream> #include <string> #include <vector> #include <pthread.h> #include <sys/epoll.h> #include "../parser.h" #include "connection.h" #include "Db.h" #include "MatrixServer.h" typedef struct Bundle Bundle; struct Bundle { MatrixServer* matrix; Db* db; int epfd; //for init only, not used in the threads int threadNo; //for init only, not used in the threads std::string portNo; //for init only, not used in the threads }; void bundleInit(Bundle& mydata); void bundleClean(Bundle& serverData); void threadsLaunch(Bundle& serverData); void* threadStart(void *arg); void getSocketMsg(std::string& msg, int fd); void rearmFD(int epfd, int fd);
#include <fstream> #include <string> #include <vector> #include <pthread.h> #include <sys/epoll.h> #include "../parser.h" #include "connection.h" #include "Db.h" #include "MatrixServer.h" #include "Bundle.h" //main.cpp void bundleInit(Bundle& mydata); void bundleClean(Bundle& serverData); void threadsLaunch(Bundle& serverData); void* threadStart(void *arg);
Move struct bundle declaration to dedicated header, and threads functions declarations to ThreadFunc.h
Move struct bundle declaration to dedicated header, and threads functions declarations to ThreadFunc.h
C
mit
BTriay/QMessenger,BTriay/QMessenger,BTriay/QMessenger
3132fa5c86cfa9e9a35666829dd6117e84234b5c
base/common.h
base/common.h
// Copyright (c) 2010 Timur Iskhodzhanov and others. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_COMMON_H_ #define BASE_COMMON_H_ #include <assert.h> // Use CHECK instead of assert. // TODO(timurrrr): print stack trace when hitting a CHECK while preserving // "abort trap" feature on both Windows and POSIX. #define CHECK(x) assert(x) #ifdef _DEBUG #define DCHECK(x) do { } while (0 && (x)) #else #define DCHECK(x) CHECK(x) #endif // Use this macro to disable copy constructor and operator= for CLASS_NAME. See // http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Copy_Constructors#Copy_Constructors #define DISALLOW_COPY_AND_ASSIGN(CLASS_NAME) \ CLASS_NAME(const CLASS_NAME &); \ void operator=(const CLASS_NAME &); #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0])) typedef unsigned char uchar; typedef unsigned char byte; typedef unsigned short ushort; typedef unsigned int uint; const uint MAX_UINT = 0xFFFFFFFF; // TODO(timurrrr): add 64-bit and ptr type values when necessary. #endif // BASE_COMMON_H_
// Copyright (c) 2010 Timur Iskhodzhanov and others. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_COMMON_H_ #define BASE_COMMON_H_ #include <assert.h> // Use CHECK instead of assert. // TODO(timurrrr): print stack trace when hitting a CHECK while preserving // "abort trap" feature on both Windows and POSIX. #define CHECK(x) assert(x) #ifdef _DEBUG #define DCHECK(x) CHECK(x) #else #define DCHECK(x) do { } while (0 && (x)) #endif // Use this macro to disable copy constructor and operator= for CLASS_NAME. See // http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Copy_Constructors#Copy_Constructors #define DISALLOW_COPY_AND_ASSIGN(CLASS_NAME) \ CLASS_NAME(const CLASS_NAME &); \ void operator=(const CLASS_NAME &); #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0])) typedef unsigned char uchar; typedef unsigned char byte; typedef unsigned short ushort; typedef unsigned int uint; const uint MAX_UINT = 0xFFFFFFFF; // TODO(timurrrr): add 64-bit and ptr type values when necessary. #endif // BASE_COMMON_H_
Fix a stupid mistake in DCHECK definition
Fix a stupid mistake in DCHECK definition
C
bsd-3-clause
denfromufa/mipt-course,denfromufa/mipt-course,denfromufa/mipt-course,denfromufa/mipt-course
ab401b01a7e87294881ed446903a5fcd33552973
XamoomSDK/classes/XamoomSDK.h
XamoomSDK/classes/XamoomSDK.h
// // XamoomSDK.h // XamoomSDK // // Created by Raphael Seher on 14/01/16. // Copyright © 2016 xamoom GmbH. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for XamoomSDK. FOUNDATION_EXPORT double XamoomSDKVersionNumber; //! Project version string for XamoomSDK. FOUNDATION_EXPORT const unsigned char XamoomSDKVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <XamoomSDK/PublicHeader.h> #import <XamoomSDK/XMMEnduserApi.h>
// // XamoomSDK.h // XamoomSDK // // Created by Raphael Seher on 14/01/16. // Copyright © 2016 xamoom GmbH. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for XamoomSDK. FOUNDATION_EXPORT double XamoomSDKVersionNumber; //! Project version string for XamoomSDK. FOUNDATION_EXPORT const unsigned char XamoomSDKVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <XamoomSDK/PublicHeader.h> #import <XamoomSDK/XMMEnduserApi.h> #import <XamoomSDK/XMMContentBlocks.h>
Add XMMContentBlocks to framwork header file
Add XMMContentBlocks to framwork header file
C
mit
xamoom/xamoom-ios-sdk,xamoom/xamoom-ios-sdk,xamoom/xamoom-ios-sdk