commit
stringlengths
40
40
old_file
stringlengths
4
112
new_file
stringlengths
4
112
old_contents
stringlengths
0
2.05k
new_contents
stringlengths
28
3.9k
subject
stringlengths
17
736
message
stringlengths
18
4.78k
lang
stringclasses
1 value
license
stringclasses
13 values
repos
stringlengths
7
111k
46ea6e5afe0e40ea3cbfceb77bcca01fcdb8df6e
src/evolution.h
src/evolution.h
#ifndef EVOLUTION_H #define EVOLUTION_H #include "fitness.h" #define POPULATION_SIZE 50 #define TOURNAMENT_SIZE 5 // Evolution class EVOLUTION { public: int crossover(int **newPop, int **pop, int index, int tournament1, int tournament2, FITNESS Fitness); int tournamentSelection(int **population, FITNESS Fitness); int evolve(int **population, FITNESS Fitness); }; #endif
#ifndef EVOLUTION_H #define EVOLUTION_H #include "fitness.h" #include "population.h" #define POPULATION_SIZE 50 #define TOURNAMENT_SIZE 5 // Evolution class EVOLUTION { public: int crossover(int **newPop, int **pop, int index, int tournament1, int tournament2, FITNESS Fitness); int tournamentSelection(int **population, FITNESS Fitness); int evolve(int **population, FITNESS Fitness); }; #endif
Update include to header file 'population.h'
Update include to header file 'population.h'
C
mit
wkohlenberg/simple_GA
c49e05ca04116a78b2a960f3a05dce6319582a8f
c/ppb_find.h
c/ppb_find.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 PPAPI_C_PPB_FIND_H_ #define PPAPI_C_PPB_FIND_H_ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_stdint.h" #define PPB_FIND_INTERFACE "PPB_Find;1" typedef struct _ppb_Find { // Updates the number of find results for the current search term. If // there are no matches 0 should be passed in. Only when the plugin has // finished searching should it pass in the final count with finalResult set // to true. void NumberOfFindResultsChanged(PP_Instance instance, int32_t total, bool final_result); // Updates the index of the currently selected search item. void SelectedFindResultChanged(PP_Instance instance, int32_t index); } PPB_Find; #endif // PPAPI_C_PPB_FIND_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 PPAPI_C_PPB_FIND_H_ #define PPAPI_C_PPB_FIND_H_ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_stdint.h" #define PPB_FIND_INTERFACE "PPB_Find;1" typedef struct _ppb_Find { // Updates the number of find results for the current search term. If // there are no matches 0 should be passed in. Only when the plugin has // finished searching should it pass in the final count with finalResult set // to true. void (*NumberOfFindResultsChanged)(PP_Instance instance, int32_t total, bool final_result); // Updates the index of the currently selected search item. void (*SelectedFindResultChanged)(PP_Instance instance, int32_t index); } PPB_Find; #endif // PPAPI_C_PPB_FIND_H_
Structure member should be function pointer
Structure member should be function pointer BUG=none TEST=compiles Review URL: http://codereview.chromium.org/2972004
C
bsd-3-clause
tiaolong/ppapi,lag945/ppapi,nanox/ppapi,CharlesHuimin/ppapi,c1soju96/ppapi,qwop/ppapi,nanox/ppapi,siweilvxing/ppapi,siweilvxing/ppapi,xinghaizhou/ppapi,xiaozihui/ppapi,whitewolfm/ppapi,dingdayong/ppapi,xinghaizhou/ppapi,ruder/ppapi,fubaydullaev/ppapi,xuesongzhu/ppapi,xinghaizhou/ppapi,rise-worlds/ppapi,cacpssl/ppapi,thdtjsdn/ppapi,xiaozihui/ppapi,phisixersai/ppapi,chenfeng8742/ppapi,JustRight/ppapi,lag945/ppapi,xinghaizhou/ppapi,c1soju96/ppapi,HAfsari/ppapi,siweilvxing/ppapi,tonyjoule/ppapi,gwobay/ppapi,huochetou999/ppapi,stefanie924/ppapi,huochetou999/ppapi,YachaoLiu/ppapi,lag945/ppapi,ruder/ppapi,xiaozihui/ppapi,Xelemsta/ppapi,huochetou999/ppapi,cacpssl/ppapi,YachaoLiu/ppapi,thdtjsdn/ppapi,huqingyu/ppapi,dralves/ppapi,dingdayong/ppapi,nanox/ppapi,HAfsari/ppapi,fubaydullaev/ppapi,phisixersai/ppapi,xuesongzhu/ppapi,gwobay/ppapi,JustRight/ppapi,siweilvxing/ppapi,chenfeng8742/ppapi,fubaydullaev/ppapi,YachaoLiu/ppapi,lag945/ppapi,tonyjoule/ppapi,huqingyu/ppapi,huqingyu/ppapi,fubaydullaev/ppapi,qwop/ppapi,chenfeng8742/ppapi,Xelemsta/ppapi,cacpssl/ppapi,dingdayong/ppapi,rise-worlds/ppapi,gwobay/ppapi,dralves/ppapi,thdtjsdn/ppapi,tonyjoule/ppapi,ruder/ppapi,CharlesHuimin/ppapi,YachaoLiu/ppapi,tonyjoule/ppapi,CharlesHuimin/ppapi,JustRight/ppapi,dingdayong/ppapi,CharlesHuimin/ppapi,tiaolong/ppapi,c1soju96/ppapi,gwobay/ppapi,JustRight/ppapi,tonyjoule/ppapi,chenfeng8742/ppapi,xiaozihui/ppapi,rise-worlds/ppapi,xinghaizhou/ppapi,qwop/ppapi,whitewolfm/ppapi,CharlesHuimin/ppapi,phisixersai/ppapi,fubaydullaev/ppapi,tiaolong/ppapi,qwop/ppapi,xuesongzhu/ppapi,YachaoLiu/ppapi,thdtjsdn/ppapi,huochetou999/ppapi,lag945/ppapi,phisixersai/ppapi,HAfsari/ppapi,siweilvxing/ppapi,xuesongzhu/ppapi,dralves/ppapi,stefanie924/ppapi,tiaolong/ppapi,rise-worlds/ppapi,JustRight/ppapi,Xelemsta/ppapi,nanox/ppapi,phisixersai/ppapi,whitewolfm/ppapi,nanox/ppapi,dralves/ppapi,HAfsari/ppapi,qwop/ppapi,HAfsari/ppapi,gwobay/ppapi,stefanie924/ppapi,huochetou999/ppapi,chenfeng8742/ppapi,Xelemsta/ppapi,xuesongzhu/ppapi,cacpssl/ppapi,whitewolfm/ppapi,Xelemsta/ppapi,huqingyu/ppapi,huqingyu/ppapi,ruder/ppapi,ruder/ppapi,rise-worlds/ppapi,tiaolong/ppapi,whitewolfm/ppapi,dingdayong/ppapi,c1soju96/ppapi,c1soju96/ppapi,stefanie924/ppapi,thdtjsdn/ppapi,xiaozihui/ppapi,cacpssl/ppapi,stefanie924/ppapi,dralves/ppapi
bf0aa27340c2364aa4be3549e870c71ce0846d7a
ui/message_center/base_format_view.h
ui/message_center/base_format_view.h
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_ #define UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_ #include "ui/message_center/message_view.h" #include "ui/message_center/notification_list.h" namespace views { class ImageView; } namespace message_center { // A comprehensive message view. class BaseFormatView : public MessageView { public: BaseFormatView(NotificationList::Delegate* list_delegate, const NotificationList::Notification& notification); virtual ~BaseFormatView(); // MessageView virtual void SetUpView() OVERRIDE; // views::ButtonListener virtual void ButtonPressed(views::Button* sender, const ui::Event& event) OVERRIDE; protected: BaseFormatView(); DISALLOW_COPY_AND_ASSIGN(BaseFormatView); }; } // namespace message_center #endif // UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_ #define UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_ #include "ui/message_center/message_view.h" #include "ui/message_center/notification_list.h" namespace views { class ImageView; } namespace message_center { // A comprehensive message view. class BaseFormatView : public MessageView { public: BaseFormatView(NotificationList::Delegate* list_delegate, const NotificationList::Notification& notification); virtual ~BaseFormatView(); // MessageView virtual void SetUpView() OVERRIDE; // views::ButtonListener virtual void ButtonPressed(views::Button* sender, const ui::Event& event); protected: BaseFormatView(); DISALLOW_COPY_AND_ASSIGN(BaseFormatView); }; } // namespace message_center #endif // UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_
Revert 167593 - Add an OVERRIDE keyword This change adds an OVERRIDE keyword to the BaseFormatView::ButtonPressed function to fix a build break on the "Linux ChromiumOS (Clang dbg)" bot.
Revert 167593 - Add an OVERRIDE keyword This change adds an OVERRIDE keyword to the BaseFormatView::ButtonPressed function to fix a build break on the "Linux ChromiumOS (Clang dbg)" bot. The CL this tries to fix is broken. Reverting the fix, so I can revert the CL TBR=miket BUG=none TEST=fix builds on the "Linux ChromiumOS (Clang dbg)" bot and the "Linux Chromium OS ASAN Builder" bot. Review URL: https://codereview.chromium.org/11410077 [email protected] Review URL: https://codereview.chromium.org/11363241 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@167660 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
anirudhSK/chromium,fujunwei/chromium-crosswalk,Chilledheart/chromium,dednal/chromium.src,anirudhSK/chromium,Just-D/chromium-1,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,timopulkkinen/BubbleFish,dednal/chromium.src,hujiajie/pa-chromium,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,Jonekee/chromium.src,Chilledheart/chromium,ChromiumWebApps/chromium,ondra-novak/chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,jaruba/chromium.src,patrickm/chromium.src,markYoungH/chromium.src,jaruba/chromium.src,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,nacl-webkit/chrome_deps,Fireblend/chromium-crosswalk,M4sse/chromium.src,hujiajie/pa-chromium,M4sse/chromium.src,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,markYoungH/chromium.src,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,ltilve/chromium,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,dushu1203/chromium.src,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,littlstar/chromium.src,anirudhSK/chromium,axinging/chromium-crosswalk,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,patrickm/chromium.src,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,dednal/chromium.src,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,ltilve/chromium,dednal/chromium.src,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,littlstar/chromium.src,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,Jonekee/chromium.src,jaruba/chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,zcbenz/cefode-chromium,ltilve/chromium,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,jaruba/chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,hujiajie/pa-chromium,ChromiumWebApps/chromium,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,jaruba/chromium.src,krieger-od/nwjs_chromium.src,Chilledheart/chromium,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,dushu1203/chromium.src,jaruba/chromium.src,hujiajie/pa-chromium,hgl888/chromium-crosswalk,dednal/chromium.src,markYoungH/chromium.src,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,ChromiumWebApps/chromium,dushu1203/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,M4sse/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,Jonekee/chromium.src,anirudhSK/chromium,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,Chilledheart/chromium,nacl-webkit/chrome_deps,ondra-novak/chromium.src,M4sse/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,jaruba/chromium.src,Jonekee/chromium.src,dushu1203/chromium.src,hujiajie/pa-chromium,ltilve/chromium,ChromiumWebApps/chromium,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,littlstar/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,zcbenz/cefode-chromium,dednal/chromium.src,zcbenz/cefode-chromium,Just-D/chromium-1,littlstar/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,littlstar/chromium.src,littlstar/chromium.src,hujiajie/pa-chromium,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,ondra-novak/chromium.src,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,dednal/chromium.src,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,ltilve/chromium,jaruba/chromium.src,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,patrickm/chromium.src,littlstar/chromium.src,ltilve/chromium,krieger-od/nwjs_chromium.src,Chilledheart/chromium,bright-sparks/chromium-spacewalk,Just-D/chromium-1,anirudhSK/chromium,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,anirudhSK/chromium,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,mogoweb/chromium-crosswalk,anirudhSK/chromium,littlstar/chromium.src,dushu1203/chromium.src,patrickm/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,anirudhSK/chromium,dednal/chromium.src,nacl-webkit/chrome_deps,markYoungH/chromium.src,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,M4sse/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,Chilledheart/chromium,mogoweb/chromium-crosswalk,markYoungH/chromium.src,zcbenz/cefode-chromium,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,Chilledheart/chromium,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,timopulkkinen/BubbleFish,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,ondra-novak/chromium.src,ltilve/chromium,Fireblend/chromium-crosswalk,dushu1203/chromium.src,markYoungH/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,anirudhSK/chromium,hujiajie/pa-chromium,M4sse/chromium.src,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium
6eb05c90ea2a1e6068c843bfef2f034a270310bd
serialization/include/SerializationToStream.h
serialization/include/SerializationToStream.h
/// \file /// \brief This header contains functionality needed for serializing and deserealizing to/from a stream #pragma once #include <ISerializable.h> #include <IStorage.h> #include <iostream> /// Contains all the functionality provided by the library. namespace simpson { /// Serialize object to ostream std::ostream& operator<<(std::ostream& outStream, simpson::ISerializable& obj); /// Deserialize object from istream std::istream& operator>>(std::istream& inStream, simpson::ISerializable* obj); } // simpson
/// \file /// \brief This header contains functionality needed for serializing and deserealizing to/from a stream #pragma once #include "ISerializable.h" #include "IStorage.h" #include <iostream> /// Contains all the functionality provided by the library. namespace simpson { /// Serialize object to ostream std::ostream& operator<<(std::ostream& outStream, simpson::ISerializable& obj); /// Deserialize object from istream std::istream& operator>>(std::istream& inStream, simpson::ISerializable* obj); } // simpson
Replace include <> with ""
Replace include <> with ""
C
mit
artem-ogre/simpson,artem-ogre/simpson
f96ca22026ed189f63adc723daff443ff8562ba3
src/common/const.h
src/common/const.h
#ifndef CONST_H #define CONST_H #include <cmath> #include <cstdlib> typedef unsigned long long uint64; namespace Const { constexpr int HASH_BASE = 31415927; constexpr double EPS = 1e-6; constexpr double PI = M_PI; inline int randUInt() { #ifdef _WIN32 return (rand() << 15) | rand(); #else return rand(); #endif } inline uint64 randUInt64() { #ifdef _WIN32 return (((((1ll * rand() << 15) | rand()) << 15) | rand()) << 15) | rand(); #else return (1ll * rand() << 31) | rand(); #endif } inline double randDouble() { #ifdef _WIN32 return 1.0 * randUInt() / (1 << 20); #else return 1.0 * rand() / RAND_MAX; #endif } } #endif // CONST_H
#ifndef CONST_H #define CONST_H #include <cmath> #include <cstdlib> typedef unsigned long long uint64; namespace Const { constexpr int HASH_BASE = 31415927; constexpr double EPS = 1e-6; constexpr double PI = M_PI; inline int randUInt() { #ifdef _WIN32 return (rand() << 15) | rand(); #else return rand(); #endif } inline uint64 randUInt64() { #ifdef _WIN32 return (((((1ll * rand() << 15) | rand()) << 15) | rand()) << 15) | rand(); #else return (1ll * rand() << 31) | rand(); #endif } inline double randDouble() { #ifdef _WIN32 return 1.0 * randUInt() / (1 << 30); #else return 1.0 * rand() / RAND_MAX; #endif } } // namespace Const #endif // CONST_H
Fix randDouble() bug on windows
Fix randDouble() bug on windows
C
mit
equation314/3DRender
456c867d363840b3ab0f16dee605bdccf35130c1
src/modules/inputpayload.c
src/modules/inputpayload.c
// Copyright (c) 2016 Brian Barto // // This program is free software; you can redistribute it and/or modify it // under the terms of the MIT License. See LICENSE for more details. #include <string.h> #include "config.h" // Static Variables static char payload[PAYLOAD_SIZE + 1]; void inputpayload_init(void) { memset(payload, 0, sizeof(PAYLOAD_SIZE + 1)); } void inputpayload_set(char *data) { strncpy(payload, data, PAYLOAD_SIZE); } char *inputpayload_get(void) { return payload; } void inputpayload_parse(char *data) { strncpy(payload, data + COMMAND_SIZE, PAYLOAD_SIZE); }
// Copyright (c) 2016 Brian Barto // // This program is free software; you can redistribute it and/or modify it // under the terms of the MIT License. See LICENSE for more details. #include <string.h> #include "config.h" // Static Variables static char payload[PAYLOAD_SIZE + 1]; void inputpayload_init(void) { memset(payload, 0, sizeof(PAYLOAD_SIZE + 1)); } void inputpayload_set(char *data) { strncpy(payload, data, PAYLOAD_SIZE); } char *inputpayload_get(void) { return payload; } void inputpayload_parse(char *data) { if (strlen(data) > COMMAND_SIZE) strncpy(payload, data + COMMAND_SIZE, PAYLOAD_SIZE); else memset(payload, 0, sizeof(PAYLOAD_SIZE + 1)); }
Make sure we don't increment data array past it's length when parsing payload
Make sure we don't increment data array past it's length when parsing payload modified: src/modules/inputpayload.c
C
mit
bartobri/spring-server,bartobri/spring-server
a9437115ceb0307d8481cbc36ed8dc66d2ebc38b
mbc.c
mbc.c
#include "gameboy.h" #include "memory.h" u8 select_rom_bank(u8 value) { u8 ret = value & 0x1F; switch (mode) { case ROM: break; case MBC1: switch (ret) { case 0: case 0x20: case 0x40: case 0x60: break; default: ret -= 1; } } return ret; } u8 select_ram_bank(u8 value) { return (value & 0x03); } u8 enable_ram(u8 value) { u8 ram_enable; ram_enable = ((value & 0x0A) != 0x0A) ? 0 : 1; return ram_enable; }
#include "gameboy.h" #include "memory.h" u8 select_rom_bank(u8 value) { u8 ret = value & 0x1F; switch (mode) { case ROM: break; case MBC1: switch (ret) { case 0: case 0x20: case 0x40: case 0x60: break; default: ret -= 1; } } return ret; } u8 select_ram_bank(u8 value) { return (value & 0x03); } u8 enable_ram(u8 value) { return ((value & 0x0A) != 0x0A) ? 0 : 1; }
Simplify return of ram_enable value
Simplify return of ram_enable value
C
mit
hoferm/tmpgb,hoferm/tmpgb
3477224c610dda33070204ec8c12e82a5fac6145
test/Driver/darwin-debug-flags.c
test/Driver/darwin-debug-flags.c
// RUN: env RC_DEBUG_OPTIONS=1 %clang -ccc-host-triple i386-apple-darwin9 -g -Os %s -emit-llvm -S -o - | FileCheck %s // <rdar://problem/7256886> // CHECK: !1 = metadata !{ // CHECK: -g -Os // CHECK: -mmacosx-version-min=10.5.0 // CHECK: [ DW_TAG_compile_unit ] int x;
// RUN: env RC_DEBUG_OPTIONS=1 %clang -ccc-host-triple i386-apple-darwin9 -g -Os %s -emit-llvm -S -o - | FileCheck %s // <rdar://problem/7256886> // CHECK: !0 = metadata !{ // CHECK: -g -Os // CHECK: -mmacosx-version-min=10.5.0 // CHECK: [ DW_TAG_compile_unit ] int x;
Update metadata id number in string compare check.
Update metadata id number in string compare check. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@130757 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
a7f816abada5d06054966b209bcba69708854e77
include/parrot/global_setup.h
include/parrot/global_setup.h
/* global_setup.h * Copyright: (When this is determined...it will go here) * CVS Info * $Id$ * Overview: * Contains declarations of global data and the functions * that initialize that data. * Data Structure and Algorithms: * History: * Notes: * References: */ #if !defined(PARROT_GLOBAL_SETUP_H_GUARD) #define PARROT_GLOBAL_SETUP_H_GUARD #include "parrot/config.h" /* Needed because this might get compiled before pmcs have been built */ void Parrot_PerlUndef_class_init(INTVAL); void Parrot_PerlInt_class_init(INTVAL); void Parrot_PerlNum_class_init(INTVAL); void Parrot_PerlString_class_init(INTVAL); void Parrot_PerlArray_class_init(INTVAL); void Parrot_PerlHash_class_init(INTVAL); void Parrot_ParrotPointer_class_init(INTVAL); void Parrot_IntQueue_class_init(INTVAL); void init_world(void); #endif /* * Local variables: * c-indentation-style: bsd * c-basic-offset: 4 * indent-tabs-mode: nil * End: * * vim: expandtab shiftwidth=4: */
/* global_setup.h * Copyright: (When this is determined...it will go here) * CVS Info * $Id$ * Overview: * Contains declarations of global data and the functions * that initialize that data. * Data Structure and Algorithms: * History: * Notes: * References: */ #if !defined(PARROT_GLOBAL_SETUP_H_GUARD) #define PARROT_GLOBAL_SETUP_H_GUARD #include "parrot/config.h" /* Needed because this might get compiled before pmcs have been built */ void Parrot_PerlUndef_class_init(INTVAL); void Parrot_PerlInt_class_init(INTVAL); void Parrot_PerlNum_class_init(INTVAL); void Parrot_PerlString_class_init(INTVAL); void Parrot_Array_class_init(INTVAL); void Parrot_PerlArray_class_init(INTVAL); void Parrot_PerlHash_class_init(INTVAL); void Parrot_ParrotPointer_class_init(INTVAL); void Parrot_IntQueue_class_init(INTVAL); void init_world(void); #endif /* * Local variables: * c-indentation-style: bsd * c-basic-offset: 4 * indent-tabs-mode: nil * End: * * vim: expandtab shiftwidth=4: */
Patch from Jonathan Stowe to prototype Parrot_Array_class_init
Patch from Jonathan Stowe to prototype Parrot_Array_class_init git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@980 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
C
artistic-2.0
FROGGS/parrot,tewk/parrot-select,tkob/parrot,FROGGS/parrot,parrot/parrot,youprofit/parrot,youprofit/parrot,gagern/parrot,tewk/parrot-select,tewk/parrot-select,FROGGS/parrot,tkob/parrot,fernandobrito/parrot,gagern/parrot,fernandobrito/parrot,fernandobrito/parrot,gitster/parrot,parrot/parrot,tkob/parrot,parrot/parrot,fernandobrito/parrot,FROGGS/parrot,tkob/parrot,FROGGS/parrot,tewk/parrot-select,youprofit/parrot,gagern/parrot,gagern/parrot,youprofit/parrot,youprofit/parrot,gagern/parrot,parrot/parrot,gitster/parrot,gitster/parrot,youprofit/parrot,FROGGS/parrot,gitster/parrot,tkob/parrot,youprofit/parrot,FROGGS/parrot,tkob/parrot,gagern/parrot,tewk/parrot-select,tkob/parrot,FROGGS/parrot,tewk/parrot-select,fernandobrito/parrot,gagern/parrot,fernandobrito/parrot,fernandobrito/parrot,tkob/parrot,gitster/parrot,tewk/parrot-select,gitster/parrot,parrot/parrot,youprofit/parrot,gitster/parrot
cfdeb127608ca2501d6e465fd189f6b8a21c1ad1
include/parrot/global_setup.h
include/parrot/global_setup.h
/* global_setup.h * Copyright: (When this is determined...it will go here) * CVS Info * $Id$ * Overview: * Contains declarations of global data and the functions * that initialize that data. * Data Structure and Algorithms: * History: * Notes: * References: */ #if !defined(PARROT_GLOBAL_SETUP_H_GUARD) #define PARROT_GLOBAL_SETUP_H_GUARD #include "parrot/config.h" /* Needed because this might get compiled before pmcs have been built */ void Parrot_PerlUndef_class_init(INTVAL); void Parrot_PerlInt_class_init(INTVAL); void Parrot_PerlNum_class_init(INTVAL); void Parrot_PerlString_class_init(INTVAL); void Parrot_PerlArray_class_init(INTVAL); void Parrot_PerlHash_class_init(INTVAL); void Parrot_ParrotPointer_class_init(INTVAL); void Parrot_IntQueue_class_init(INTVAL); void init_world(void); #endif /* * Local variables: * c-indentation-style: bsd * c-basic-offset: 4 * indent-tabs-mode: nil * End: * * vim: expandtab shiftwidth=4: */
/* global_setup.h * Copyright: (When this is determined...it will go here) * CVS Info * $Id$ * Overview: * Contains declarations of global data and the functions * that initialize that data. * Data Structure and Algorithms: * History: * Notes: * References: */ #if !defined(PARROT_GLOBAL_SETUP_H_GUARD) #define PARROT_GLOBAL_SETUP_H_GUARD #include "parrot/config.h" /* Needed because this might get compiled before pmcs have been built */ void Parrot_PerlUndef_class_init(INTVAL); void Parrot_PerlInt_class_init(INTVAL); void Parrot_PerlNum_class_init(INTVAL); void Parrot_PerlString_class_init(INTVAL); void Parrot_Array_class_init(INTVAL); void Parrot_PerlArray_class_init(INTVAL); void Parrot_PerlHash_class_init(INTVAL); void Parrot_ParrotPointer_class_init(INTVAL); void Parrot_IntQueue_class_init(INTVAL); void init_world(void); #endif /* * Local variables: * c-indentation-style: bsd * c-basic-offset: 4 * indent-tabs-mode: nil * End: * * vim: expandtab shiftwidth=4: */
Patch from Jonathan Stowe to prototype Parrot_Array_class_init
Patch from Jonathan Stowe to prototype Parrot_Array_class_init git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@980 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
C
artistic-2.0
ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot
afdd36bc1c540183ebbcc984bc1a9a33e1d44e40
src/qt/bitcoinaddressvalidator.h
src/qt/bitcoinaddressvalidator.h
#ifndef BITCOINADDRESSVALIDATOR_H #define BITCOINADDRESSVALIDATOR_H #include <QValidator> /** Base48 entry widget validator. Corrects near-miss characters and refuses characters that are no part of base48. */ class BitcoinAddressValidator : public QValidator { Q_OBJECT public: explicit BitcoinAddressValidator(QObject *parent = 0); State validate(QString &input, int &pos) const; static const int MaxAddressLength = 35; }; #endif // BITCOINADDRESSVALIDATOR_H
#ifndef BITCOINADDRESSVALIDATOR_H #define BITCOINADDRESSVALIDATOR_H #include <QValidator> /** Base58 entry widget validator. Corrects near-miss characters and refuses characters that are not part of base58. */ class BitcoinAddressValidator : public QValidator { Q_OBJECT public: explicit BitcoinAddressValidator(QObject *parent = 0); State validate(QString &input, int &pos) const; static const int MaxAddressLength = 35; }; #endif // BITCOINADDRESSVALIDATOR_H
Fix typo in a comment: it's base58, not base48.
Fix typo in a comment: it's base58, not base48.
C
mit
reddink/reddcoin,reddink/reddcoin,ahmedbodi/poscoin,bmp02050/ReddcoinUpdates,Cannacoin-Project/Cannacoin,ahmedbodi/poscoin,coinkeeper/2015-06-22_19-10_cannacoin,joroob/reddcoin,coinkeeper/2015-06-22_19-10_cannacoin,coinkeeper/2015-06-22_18-46_reddcoin,joroob/reddcoin,bmp02050/ReddcoinUpdates,Cannacoin-Project/Cannacoin,joroob/reddcoin,reddink/reddcoin,reddcoin-project/reddcoin,Cannacoin-Project/Cannacoin,coinkeeper/2015-06-22_18-46_reddcoin,reddcoin-project/reddcoin,coinkeeper/2015-06-22_18-46_reddcoin,coinkeeper/2015-06-22_19-10_cannacoin,coinkeeper/2015-06-22_19-10_cannacoin,Cannacoin-Project/Cannacoin,reddcoin-project/reddcoin,bmp02050/ReddcoinUpdates,bmp02050/ReddcoinUpdates,Cannacoin-Project/Cannacoin,coinkeeper/2015-06-22_18-46_reddcoin,ahmedbodi/poscoin,ahmedbodi/poscoin,coinkeeper/2015-06-22_18-46_reddcoin,reddcoin-project/reddcoin,reddcoin-project/reddcoin,reddink/reddcoin,reddink/reddcoin,bmp02050/ReddcoinUpdates,coinkeeper/2015-06-22_19-10_cannacoin,reddcoin-project/reddcoin,joroob/reddcoin,joroob/reddcoin,ahmedbodi/poscoin
e5c567cf5f089755a140df9fa8368f260acd250f
swichCaseExample.c
swichCaseExample.c
#include <stdio.h> #include <math.h> int main() { int userInput = 0; unsigned long number = 0; while(1) { printf("Please enter a number between 1 and 6:"); scanf("%d", &userInput); unsigned long incrementor = 0; switch(userInput) { case 1: incrementor += 5; break; case 2: incrementor += 9; break; case 3: incrementor += 18; break; case 4: incrementor += 34; break; case 5: incrementor += 59; break; case 6: incrementor += 95; break; default: printf("You have inputed incorrect number!\n"); } number += incrementor; printf("Current number : %d \n", number); } return 0; }
Make a program that is incrementing a variable with number based on user input using the following data: If user inputs - increments with : 1 - 5 2 - 9 3 - 18 4 - 34 5 - 59 6 - 95
Make a program that is incrementing a variable with number based on user input using the following data: If user inputs - increments with : 1 - 5 2 - 9 3 - 18 4 - 34 5 - 59 6 - 95
C
mit
Lyuboo/C-Exercises-SoftUni
f6819004e0e04193dfab17b636f266a0f36c2e17
libcef_dll/cef_macros.h
libcef_dll/cef_macros.h
// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. #ifndef CEF_LIBCEF_DLL_CEF_MACROS_H_ #define CEF_LIBCEF_DLL_CEF_MACROS_H_ #pragma once #ifdef BUILDING_CEF_SHARED #include "base/macros.h" #else // !BUILDING_CEF_SHARED // A macro to disallow the copy constructor and operator= functions // This should be used in the private: declarations for a class #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&); \ void operator=(const TypeName&) #endif // !BUILDING_CEF_SHARED #endif // CEF_LIBCEF_DLL_CEF_MACROS_H_ // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. #ifndef CEF_LIBCEF_DLL_CEF_MACROS_H_ #define CEF_LIBCEF_DLL_CEF_MACROS_H_ #pragma once #ifdef BUILDING_CEF_SHARED #include "base/macros.h" #else // !BUILDING_CEF_SHARED // A macro to disallow the copy constructor and operator= functions // This should be used in the private: declarations for a class #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&); \ void operator=(const TypeName&) #endif // !BUILDING_CEF_SHARED #endif // CEF_LIBCEF_DLL_CEF_MACROS_H_
// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. #ifndef CEF_LIBCEF_DLL_CEF_MACROS_H_ #define CEF_LIBCEF_DLL_CEF_MACROS_H_ #pragma once #ifdef BUILDING_CEF_SHARED #include "base/macros.h" #else // !BUILDING_CEF_SHARED // A macro to disallow the copy constructor and operator= functions // This should be used in the private: declarations for a class #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&); \ void operator=(const TypeName&) #endif // !BUILDING_CEF_SHARED #endif // CEF_LIBCEF_DLL_CEF_MACROS_H_
Remove duplicate content in file.
Remove duplicate content in file. git-svn-id: 07c9500005b9a5ecd02aa6a59d3db90a097b7e72@1734 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
C
bsd-3-clause
zmike/cef-rebase,zmike/cef-rebase,zmike/cef-rebase,bkeiren/cef,bkeiren/cef,bkeiren/cef,bkeiren/cef,zmike/cef-rebase,bkeiren/cef,zmike/cef-rebase
28b95d48a51e8cfb1c3807b7fb175c4b89dbbf67
src/libreset/avl.c
src/libreset/avl.c
#include <stdlib.h> #include "avl.h" /* * * * forward declarations * * */ static void destroy_subtree( struct avl_el* node //!< A node to destroy ); /* * * * interface implementation * * */ struct avl* avl_alloc(void) { return calloc(1, sizeof(struct avl)); } int avl_destroy( struct avl* avl //!< The avl tree ) { if (avl && avl->root) { destroy_subtree(avl->root); } free(avl); return 1; } /* * * * implementation of internal functions * * */ static void destroy_subtree( struct avl_el* node //!< A node to destroy ) { if (node->l) { destroy_subtree(node->l); } if (node->r) { destroy_subtree(node->r); } free(node); }
#include <stdlib.h> #include "avl.h" /* * * * forward declarations * * */ static void destroy_subtree( struct avl_el* node //!< A node to destroy ); /** * Rotate a node counter-clockwise * * @return new root or NULL, if the rotation could not be performed */ static struct avl_el* rotate_left( struct avl_el* node //!< The node to rotate ); /** * Rotate a node clockwise * * @return new root or NULL, if the rotation could not be performed */ static struct avl_el* rotate_right( struct avl_el* node //!< The node to rotate ); /* * * * interface implementation * * */ struct avl* avl_alloc(void) { return calloc(1, sizeof(struct avl)); } int avl_destroy( struct avl* avl //!< The avl tree ) { if (avl && avl->root) { destroy_subtree(avl->root); } free(avl); return 1; } /* * * * implementation of internal functions * * */ static void destroy_subtree( struct avl_el* node //!< A node to destroy ) { if (node->l) { destroy_subtree(node->l); } if (node->r) { destroy_subtree(node->r); } free(node); } static struct avl_el* rotate_left( struct avl_el* node ) { return 0; } static struct avl_el* rotate_right( struct avl_el* node ) { return 0; }
Add declaration and stubs for rotations
Add declaration and stubs for rotations
C
lgpl-2.1
waysome/libreset,waysome/libreset
4c26a927a6e0c1669a18d999a3a6dd7897c21f8c
include/private/chromium/GrSlug.h
include/private/chromium/GrSlug.h
/* * Copyright 2021 Google LLC * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef GrSlug_DEFINED #define GrSlug_DEFINED #include "include/private/chromium/Slug.h" // TODO: Update Chrome to use sktext::gpu classes and remove these using GrTextReferenceFrame = sktext::gpu::TextReferenceFrame; using GrSlug = sktext::gpu::Slug; #endif // GrSlug_DEFINED
/* * Copyright 2021 Google LLC * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef GrSlug_DEFINED #define GrSlug_DEFINED #include "include/private/chromium/Slug.h" // TODO: Update Chrome to use sktext::gpu classes and remove these using GrSlug = sktext::gpu::Slug; #endif // GrSlug_DEFINED
Fix compile error on chrome bots
Fix compile error on chrome bots Change-Id: Ie1d94106a741a9cc51dfd13813f143374392489a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543516 Commit-Queue: Herb Derby <[email protected]> Reviewed-by: Greg Daniel <[email protected]>
C
bsd-3-clause
google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia
3fa56b322acd1fc722124f349d155fc29d8500cc
src/opts/SkBlitRow_opts_SSE4.h
src/opts/SkBlitRow_opts_SSE4.h
/* * Copyright 2014 The Android Open Source Project * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkBlitRow_opts_SSE4_DEFINED #define SkBlitRow_opts_SSE4_DEFINED #include "SkBlitRow.h" /* Check if we are able to build assembly code, GCC/AT&T syntax. * Had problems with LLVM-GCC 4.2. * MemorySanitizer cannot handle assembly code. */ #if (defined(__clang__) || (defined(__GNUC__) && !defined(SK_BUILD_FOR_MAC))) \ && !defined(MEMORY_SANITIZER) extern "C" void S32A_Opaque_BlitRow32_SSE4_asm(SkPMColor* SK_RESTRICT dst, const SkPMColor* SK_RESTRICT src, int count, U8CPU alpha); #define SK_ATT_ASM_SUPPORTED #endif #endif
/* * Copyright 2014 The Android Open Source Project * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkBlitRow_opts_SSE4_DEFINED #define SkBlitRow_opts_SSE4_DEFINED #include "SkBlitRow.h" /* Check if we are able to build assembly code, GCC/AT&T syntax: * 1) Clang and GCC are generally OK. OS X's old LLVM-GCC 4.2 can't handle it; * 2) We're intentionally not linking this in even when supported (Clang) on Windows; * 3) MemorySanitizer cannot instrument assembly at all. */ #if /* 1)*/ (defined(__clang__) || (defined(__GNUC__) && !defined(SK_BUILD_FOR_MAC))) \ /* 2)*/ && !defined(SK_BUILD_FOR_WIN) \ /* 3)*/ && !defined(MEMORY_SANITIZER) extern "C" void S32A_Opaque_BlitRow32_SSE4_asm(SkPMColor* SK_RESTRICT dst, const SkPMColor* SK_RESTRICT src, int count, U8CPU alpha); #define SK_ATT_ASM_SUPPORTED #endif #endif
Exclude Clang on Windows too. Comment this up a bit.
Exclude Clang on Windows too. Comment this up a bit. BUG=391016 [email protected], [email protected], [email protected], [email protected] Author: [email protected] Review URL: https://codereview.chromium.org/363983004
C
bsd-3-clause
shahrzadmn/skia,YUPlayGodDev/platform_external_skia,HalCanary/skia-hc,AOSPB/external_skia,todotodoo/skia,MinimalOS/android_external_chromium_org_third_party_skia,ench0/external_chromium_org_third_party_skia,Igalia/skia,nfxosp/platform_external_skia,noselhq/skia,UBERMALLOW/external_skia,MarshedOut/android_external_skia,timduru/platform-external-skia,TeamExodus/external_skia,todotodoo/skia,shahrzadmn/skia,DARKPOP/external_chromium_org_third_party_skia,MIPS/external-chromium_org-third_party-skia,Fusion-Rom/external_chromium_org_third_party_skia,geekboxzone/mmallow_external_skia,MyAOSP/external_chromium_org_third_party_skia,DiamondLovesYou/skia-sys,nfxosp/platform_external_skia,Igalia/skia,android-ia/platform_external_chromium_org_third_party_skia,BrokenROM/external_skia,MIPS/external-chromium_org-third_party-skia,jtg-gg/skia,mydongistiny/external_chromium_org_third_party_skia,nfxosp/platform_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,Jichao/skia,amyvmiwei/skia,nfxosp/platform_external_skia,nvoron23/skia,geekboxzone/mmallow_external_skia,MIPS/external-chromium_org-third_party-skia,Infinitive-OS/platform_external_skia,AOSP-YU/platform_external_skia,amyvmiwei/skia,DARKPOP/external_chromium_org_third_party_skia,pcwalton/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,Hikari-no-Tenshi/android_external_skia,OneRom/external_skia,timduru/platform-external-skia,android-ia/platform_external_chromium_org_third_party_skia,TeamExodus/external_skia,Jichao/skia,VRToxin-AOSP/android_external_skia,scroggo/skia,MyAOSP/external_chromium_org_third_party_skia,nvoron23/skia,jtg-gg/skia,jtg-gg/skia,boulzordev/android_external_skia,HalCanary/skia-hc,VRToxin-AOSP/android_external_skia,w3nd1go/android_external_skia,MinimalOS-AOSP/platform_external_skia,chenlian2015/skia_from_google,AOSPB/external_skia,google/skia,invisiblek/android_external_skia,geekboxzone/mmallow_external_skia,ench0/external_chromium_org_third_party_skia,shahrzadmn/skia,shahrzadmn/skia,AOSPB/external_skia,Hikari-no-Tenshi/android_external_skia,vanish87/skia,DARKPOP/external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,ench0/external_chromium_org_third_party_skia,xin3liang/platform_external_chromium_org_third_party_skia,YUPlayGodDev/platform_external_skia,mydongistiny/external_chromium_org_third_party_skia,BrokenROM/external_skia,amyvmiwei/skia,todotodoo/skia,DiamondLovesYou/skia-sys,MyAOSP/external_chromium_org_third_party_skia,MyAOSP/external_chromium_org_third_party_skia,TeamExodus/external_skia,MinimalOS/external_chromium_org_third_party_skia,tmpvar/skia.cc,FusionSP/external_chromium_org_third_party_skia,MinimalOS-AOSP/platform_external_skia,TeamExodus/external_skia,invisiblek/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,Infinitive-OS/platform_external_skia,Omegaphora/external_chromium_org_third_party_skia,jtg-gg/skia,UBERMALLOW/external_skia,chenlian2015/skia_from_google,ench0/external_chromium_org_third_party_skia,w3nd1go/android_external_skia,DARKPOP/external_chromium_org_third_party_skia,google/skia,google/skia,MinimalOS/android_external_chromium_org_third_party_skia,MarshedOut/android_external_skia,Jichao/skia,OneRom/external_skia,aosp-mirror/platform_external_skia,spezi77/android_external_skia,boulzordev/android_external_skia,Igalia/skia,OneRom/external_skia,FusionSP/external_chromium_org_third_party_skia,ominux/skia,w3nd1go/android_external_skia,amyvmiwei/skia,samuelig/skia,TeamTwisted/external_skia,DiamondLovesYou/skia-sys,samuelig/skia,rubenvb/skia,todotodoo/skia,BrokenROM/external_skia,MIPS/external-chromium_org-third_party-skia,tmpvar/skia.cc,noselhq/skia,todotodoo/skia,timduru/platform-external-skia,TeamExodus/external_skia,noselhq/skia,DiamondLovesYou/skia-sys,todotodoo/skia,AOSPB/external_skia,AOSP-YU/platform_external_skia,spezi77/android_external_skia,samuelig/skia,chenlian2015/skia_from_google,invisiblek/android_external_skia,boulzordev/android_external_skia,samuelig/skia,w3nd1go/android_external_skia,TeamExodus/external_skia,MinimalOS/external_chromium_org_third_party_skia,UBERMALLOW/external_skia,ench0/external_chromium_org_third_party_skia,MinimalOS-AOSP/platform_external_skia,AOSPB/external_skia,UBERMALLOW/external_skia,MinimalOS/external_chromium_org_third_party_skia,android-ia/platform_external_chromium_org_third_party_skia,nfxosp/platform_external_skia,TeamTwisted/external_skia,w3nd1go/android_external_skia,pcwalton/skia,ominux/skia,scroggo/skia,scroggo/skia,VRToxin-AOSP/android_external_skia,nvoron23/skia,MIPS/external-chromium_org-third_party-skia,YUPlayGodDev/platform_external_skia,vanish87/skia,UBERMALLOW/external_skia,nfxosp/platform_external_skia,vanish87/skia,timduru/platform-external-skia,boulzordev/android_external_skia,MonkeyZZZZ/platform_external_skia,chenlian2015/skia_from_google,MonkeyZZZZ/platform_external_skia,MinimalOS/external_chromium_org_third_party_skia,rubenvb/skia,google/skia,Omegaphora/external_chromium_org_third_party_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,OptiPop/external_chromium_org_third_party_skia,vanish87/skia,mydongistiny/external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,rubenvb/skia,FusionSP/external_chromium_org_third_party_skia,Hikari-no-Tenshi/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,Jichao/skia,rubenvb/skia,samuelig/skia,scroggo/skia,xin3liang/platform_external_chromium_org_third_party_skia,pcwalton/skia,aosp-mirror/platform_external_skia,pcwalton/skia,vanish87/skia,tmpvar/skia.cc,Omegaphora/external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,nfxosp/platform_external_skia,mydongistiny/external_chromium_org_third_party_skia,invisiblek/android_external_skia,TeamExodus/external_skia,TeamEOS/external_chromium_org_third_party_skia,MinimalOS/android_external_chromium_org_third_party_skia,MonkeyZZZZ/platform_external_skia,todotodoo/skia,Infinitive-OS/platform_external_skia,TeamEOS/external_chromium_org_third_party_skia,ominux/skia,OneRom/external_skia,TeamExodus/external_skia,YUPlayGodDev/platform_external_skia,ench0/external_chromium_org_third_party_skia,YUPlayGodDev/platform_external_skia,qrealka/skia-hc,geekboxzone/lollipop_external_chromium_org_third_party_skia,google/skia,MinimalOS/external_chromium_org_third_party_skia,MinimalOS/android_external_chromium_org_third_party_skia,xin3liang/platform_external_chromium_org_third_party_skia,rubenvb/skia,MyAOSP/external_chromium_org_third_party_skia,Jichao/skia,nvoron23/skia,Fusion-Rom/external_chromium_org_third_party_skia,mydongistiny/external_chromium_org_third_party_skia,YUPlayGodDev/platform_external_skia,MinimalOS/external_chromium_org_third_party_skia,Omegaphora/external_chromium_org_third_party_skia,jtg-gg/skia,noselhq/skia,UBERMALLOW/external_skia,Infinitive-OS/platform_external_skia,todotodoo/skia,w3nd1go/android_external_skia,MarshedOut/android_external_skia,geekboxzone/mmallow_external_skia,samuelig/skia,OptiPop/external_chromium_org_third_party_skia,AOSP-YU/platform_external_skia,boulzordev/android_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,MarshedOut/android_external_skia,MarshedOut/android_external_skia,aosp-mirror/platform_external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,Infinitive-OS/platform_external_skia,boulzordev/android_external_skia,mydongistiny/external_chromium_org_third_party_skia,Fusion-Rom/external_chromium_org_third_party_skia,MonkeyZZZZ/platform_external_skia,nvoron23/skia,UBERMALLOW/external_skia,MinimalOS/android_external_chromium_org_third_party_skia,w3nd1go/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,shahrzadmn/skia,chenlian2015/skia_from_google,OneRom/external_skia,AOSPB/external_skia,Omegaphora/external_chromium_org_third_party_skia,nfxosp/platform_external_skia,pcwalton/skia,chenlian2015/skia_from_google,spezi77/android_external_skia,BrokenROM/external_skia,vanish87/skia,tmpvar/skia.cc,VRToxin-AOSP/android_external_skia,MonkeyZZZZ/platform_external_skia,Hikari-no-Tenshi/android_external_skia,invisiblek/android_external_skia,Igalia/skia,OneRom/external_skia,TeamEOS/external_chromium_org_third_party_skia,Omegaphora/external_chromium_org_third_party_skia,ench0/external_chromium_org_third_party_skia,google/skia,shahrzadmn/skia,noselhq/skia,HalCanary/skia-hc,noselhq/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,xin3liang/platform_external_chromium_org_third_party_skia,MarshedOut/android_external_skia,amyvmiwei/skia,DARKPOP/external_chromium_org_third_party_skia,DARKPOP/external_chromium_org_third_party_skia,pcwalton/skia,OneRom/external_skia,MinimalOS/external_chromium_org_third_party_skia,ominux/skia,AOSP-YU/platform_external_skia,invisiblek/android_external_skia,VRToxin-AOSP/android_external_skia,MinimalOS-AOSP/platform_external_skia,DiamondLovesYou/skia-sys,AOSPB/external_skia,Jichao/skia,OneRom/external_skia,scroggo/skia,nvoron23/skia,google/skia,Igalia/skia,pcwalton/skia,BrokenROM/external_skia,mydongistiny/external_chromium_org_third_party_skia,Hikari-no-Tenshi/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,TeamTwisted/external_skia,jtg-gg/skia,spezi77/android_external_skia,vanish87/skia,MyAOSP/external_chromium_org_third_party_skia,Omegaphora/external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,AOSP-YU/platform_external_skia,qrealka/skia-hc,HalCanary/skia-hc,OptiPop/external_chromium_org_third_party_skia,shahrzadmn/skia,jtg-gg/skia,MyAOSP/external_chromium_org_third_party_skia,aosp-mirror/platform_external_skia,Infinitive-OS/platform_external_skia,OptiPop/external_chromium_org_third_party_skia,UBERMALLOW/external_skia,Omegaphora/external_chromium_org_third_party_skia,OneRom/external_skia,DARKPOP/external_chromium_org_third_party_skia,aosp-mirror/platform_external_skia,google/skia,vanish87/skia,geekboxzone/mmallow_external_skia,timduru/platform-external-skia,BrokenROM/external_skia,TeamTwisted/external_skia,timduru/platform-external-skia,Jichao/skia,Infinitive-OS/platform_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,Hikari-no-Tenshi/android_external_skia,noselhq/skia,rubenvb/skia,AOSPB/external_skia,YUPlayGodDev/platform_external_skia,xin3liang/platform_external_chromium_org_third_party_skia,w3nd1go/android_external_skia,TeamTwisted/external_skia,MonkeyZZZZ/platform_external_skia,aosp-mirror/platform_external_skia,TeamExodus/external_skia,aosp-mirror/platform_external_skia,ench0/external_chromium_org_third_party_skia,geekboxzone/mmallow_external_skia,ominux/skia,ominux/skia,amyvmiwei/skia,YUPlayGodDev/platform_external_skia,chenlian2015/skia_from_google,DiamondLovesYou/skia-sys,AOSP-YU/platform_external_skia,pcwalton/skia,AOSP-YU/platform_external_skia,AOSP-YU/platform_external_skia,TeamTwisted/external_skia,android-ia/platform_external_chromium_org_third_party_skia,Jichao/skia,rubenvb/skia,nfxosp/platform_external_skia,HalCanary/skia-hc,qrealka/skia-hc,geekboxzone/lollipop_external_chromium_org_third_party_skia,Igalia/skia,MIPS/external-chromium_org-third_party-skia,geekboxzone/mmallow_external_skia,tmpvar/skia.cc,MinimalOS-AOSP/platform_external_skia,OptiPop/external_chromium_org_third_party_skia,TeamTwisted/external_skia,DiamondLovesYou/skia-sys,noselhq/skia,TeamEOS/external_chromium_org_third_party_skia,TeamEOS/external_chromium_org_third_party_skia,Igalia/skia,Infinitive-OS/platform_external_skia,todotodoo/skia,MIPS/external-chromium_org-third_party-skia,MinimalOS-AOSP/platform_external_skia,rubenvb/skia,scroggo/skia,amyvmiwei/skia,qrealka/skia-hc,tmpvar/skia.cc,OptiPop/external_chromium_org_third_party_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,mydongistiny/external_chromium_org_third_party_skia,shahrzadmn/skia,MIPS/external-chromium_org-third_party-skia,tmpvar/skia.cc,aosp-mirror/platform_external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,BrokenROM/external_skia,FusionSP/external_chromium_org_third_party_skia,qrealka/skia-hc,DARKPOP/external_chromium_org_third_party_skia,Hikari-no-Tenshi/android_external_skia,xin3liang/platform_external_chromium_org_third_party_skia,boulzordev/android_external_skia,android-ia/platform_external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,invisiblek/android_external_skia,spezi77/android_external_skia,android-ia/platform_external_chromium_org_third_party_skia,qrealka/skia-hc,tmpvar/skia.cc,samuelig/skia,w3nd1go/android_external_skia,Jichao/skia,UBERMALLOW/external_skia,AOSP-YU/platform_external_skia,TeamTwisted/external_skia,boulzordev/android_external_skia,qrealka/skia-hc,MonkeyZZZZ/platform_external_skia,PAC-ROM/android_external_skia,HalCanary/skia-hc,nvoron23/skia,geekboxzone/mmallow_external_skia,google/skia,FusionSP/external_chromium_org_third_party_skia,OptiPop/external_chromium_org_third_party_skia,TeamEOS/external_chromium_org_third_party_skia,android-ia/platform_external_chromium_org_third_party_skia,nvoron23/skia,MinimalOS-AOSP/platform_external_skia,PAC-ROM/android_external_skia,amyvmiwei/skia,MyAOSP/external_chromium_org_third_party_skia,Igalia/skia,OptiPop/external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,boulzordev/android_external_skia,xin3liang/platform_external_chromium_org_third_party_skia,ominux/skia,nvoron23/skia,MonkeyZZZZ/platform_external_skia,HalCanary/skia-hc,timduru/platform-external-skia,YUPlayGodDev/platform_external_skia,MinimalOS-AOSP/platform_external_skia,pcwalton/skia,MinimalOS-AOSP/platform_external_skia,BrokenROM/external_skia,PAC-ROM/android_external_skia,MarshedOut/android_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,tmpvar/skia.cc,ominux/skia,rubenvb/skia,qrealka/skia-hc,google/skia,ominux/skia,AOSPB/external_skia,MinimalOS/external_chromium_org_third_party_skia,noselhq/skia,geekboxzone/mmallow_external_skia,HalCanary/skia-hc,Fusion-Rom/external_chromium_org_third_party_skia,shahrzadmn/skia,PAC-ROM/android_external_skia,PAC-ROM/android_external_skia,invisiblek/android_external_skia,scroggo/skia,TeamEOS/external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,MarshedOut/android_external_skia,PAC-ROM/android_external_skia,vanish87/skia,VRToxin-AOSP/android_external_skia,Infinitive-OS/platform_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,MonkeyZZZZ/platform_external_skia,scroggo/skia,MarshedOut/android_external_skia,HalCanary/skia-hc,android-ia/platform_external_chromium_org_third_party_skia,spezi77/android_external_skia,TeamTwisted/external_skia,FusionSP/external_chromium_org_third_party_skia,samuelig/skia
6cf9624275da920d283635c43cb39de0bd7b4350
src/modules/conf_randr/e_smart_randr.h
src/modules/conf_randr/e_smart_randr.h
#ifdef E_TYPEDEFS #else # ifndef E_SMART_RANDR_H # define E_SMART_RANDR_H Evas_Object *e_smart_randr_add(Evas *evas); # endif #endif
#ifdef E_TYPEDEFS #else # ifndef E_SMART_RANDR_H # define E_SMART_RANDR_H Evas_Object *e_smart_randr_add(Evas *evas); void e_smart_randr_monitors_create(Evas_Object *obj); # endif #endif
Add header function for monitors_create.
Add header function for monitors_create. Signed-off-by: Christopher Michael <[email protected]> SVN revision: 84126
C
bsd-2-clause
rvandegrift/e,tasn/enlightenment,tizenorg/platform.upstream.enlightenment,FlorentRevest/Enlightenment,rvandegrift/e,FlorentRevest/Enlightenment,tasn/enlightenment,FlorentRevest/Enlightenment,tasn/enlightenment,rvandegrift/e,tizenorg/platform.upstream.enlightenment,tizenorg/platform.upstream.enlightenment
ca1fdf4a443216bed013dc17a0c79d7fd9f1d149
week2/task.c
week2/task.c
#include <stdio.h> #include <fcntl.h> #include <unistd.h> int main() { int fd1, fd2; fd1 = open("f1", O_RDWR); fd2 = open("f1", O_RDWR); lseek(fd1, -5, SEEK_END); lseek(fd2, 4, SEEK_SET); write(fd1, "xyzw", 4); write(fd2, "12", 2); char buff[10]; int count; lseek(fd1, 0, SEEK_SET); while (count = read(fd1, buff, 10)) write(1, buff, count); close(fd1); close(fd2); return 0; }
Add old file from week2
Add old file from week2
C
mit
zdravkoandonov/sysprog
40f76e65693de88f7be915a17c06bd2481820b29
src/streams_registry.h
src/streams_registry.h
#ifndef STREAMSREGISTRY_H #define STREAMSREGISTRY_H namespace TailProduce { class Stream; class StreamsRegistry { public: struct StreamsRegistryEntry { // The pointer to an instance of the stream is owned by TailProduce framework. // * For static frameworks (streams list is fully available at compile time), // these pointers point to existing, statically initialized, members // of the instance of cover TailProduce class. // * For dynamic frameworks, they point to dynamically allocated instances // of per-stream implementations, which are also owned by the instance // of the cover TailProduce class. const Stream* impl; std::string name; std::string entry_type; std::string order_key_type; }; std::vector<StreamsRegistryEntry> streams; std::set<std::string> names; void Add(TailProduce::Stream* impl, const std::string& name, const std::string& entry_type, const std::string& order_key_type) { if (names.find(name) != names.end()) { LOG(FATAL) << "Attempted to register the '" << name << "' stream more than once."; } names.insert(name); streams.push_back(StreamsRegistryEntry{impl, name, entry_type, order_key_type}); } }; struct Stream { Stream(StreamsRegistry& registry, const std::string& stream_name, const std::string& entry_type_name, const std::string& order_key_type_name) { registry.Add(this, stream_name, entry_type_name, order_key_type_name); } }; }; #endif
#ifndef STREAMSREGISTRY_H #define STREAMSREGISTRY_H namespace TailProduce { class Stream; class StreamsRegistry { public: struct StreamsRegistryEntry { // The pointer to an instance of the stream is owned by TailProduce framework. // * For static frameworks (streams list is fully available at compile time), // these pointers point to existing, statically initialized, members // of the instance of cover TailProduce class. // * For dynamic frameworks, they point to dynamically allocated instances // of per-stream implementations, which are also owned by the instance // of the cover TailProduce class. const Stream* impl; std::string name; std::string entry_type; std::string order_key_type; }; std::vector<StreamsRegistryEntry> streams; std::set<std::string> names; void Add(TailProduce::Stream* impl, const std::string& name, const std::string& entry_type, const std::string& order_key_type) { if (names.find(name) != names.end()) { LOG(FATAL) << "Attempted to register the '" << name << "' stream more than once."; } names.insert(name); streams.push_back(StreamsRegistryEntry{impl, name, entry_type, order_key_type}); } }; }; #endif
Remove redundantly declared Stream object
Remove redundantly declared Stream object
C
mit
Staance/tailproduce,Staance/tailproduce
83badd5cf2c7acd266977b8698d548d0de02c5c6
modules/electromagnetics/include/utils/ElkEnums.h
modules/electromagnetics/include/utils/ElkEnums.h
#ifndef ELKENUMS_H #define ELKENUMS_H /** ElkEnums contains various enumerations useful in ELK, such as real/imag component definitions in * Kernels, BCs, etc. */ namespace elk { enum ComponentEnum { REAL, IMAGINARY }; } // namespace elk #endif // ELKENUMS_H
#pragma once /** ElkEnums contains various enumerations useful in ELK, such as real/imag component definitions in * Kernels, BCs, etc. */ namespace elk { enum ComponentEnum { REAL, IMAGINARY }; } // namespace elk
Convert utils to pragma once
Convert utils to pragma once refs #21085
C
lgpl-2.1
idaholab/moose,milljm/moose,andrsd/moose,harterj/moose,lindsayad/moose,milljm/moose,harterj/moose,laagesen/moose,laagesen/moose,idaholab/moose,idaholab/moose,lindsayad/moose,andrsd/moose,dschwen/moose,laagesen/moose,laagesen/moose,idaholab/moose,lindsayad/moose,andrsd/moose,dschwen/moose,harterj/moose,dschwen/moose,milljm/moose,sapitts/moose,dschwen/moose,andrsd/moose,sapitts/moose,laagesen/moose,sapitts/moose,lindsayad/moose,milljm/moose,andrsd/moose,dschwen/moose,milljm/moose,harterj/moose,idaholab/moose,sapitts/moose,harterj/moose,lindsayad/moose,sapitts/moose
1750cd0d3e574fa2c85b9423e58cef5ef1fb1d26
src/tests/stdlib/strtod_test.c
src/tests/stdlib/strtod_test.c
/** * @file * @brief * * @date 26.02.13 * @author Alexander Lapshin */ #include <embox/test.h> #include <stdlib.h> EMBOX_TEST_SUITE("standard library"); TEST_CASE("Check strtod function") { test_assert_equal(0, (int) atof("0.0")); test_assert_equal(10, (int) (10 * atof("1.0"))); test_assert_equal(-10, (int) (10 * atof("-1.0"))); test_assert_equal(11, (int) (10 * atof("1.1"))); test_assert_equal(11, (int) (100 * atof("0.11"))); test_assert_equal(-11, (int) (10 * atof("-1.1"))); test_assert_equal(-110,(int) atof("-1.1E+2")); test_assert_equal(-1, (int) (100 * atof("-0.1e-1"))); test_assert_equal(10, (int) atof("0.1E2")); }
/** * @file * @brief * * @date 26.02.13 * @author Alexander Lapshin */ #include <embox/test.h> #include <stdlib.h> EMBOX_TEST_SUITE("standard library"); TEST_CASE("Check strtod function") { test_assert_equal(0, (int) atof("0.0")); test_assert_equal(10, (int) (10 * atof("1.0"))); test_assert_equal(-10, (int) (10 * atof("-1.0"))); test_assert_equal(11, (int) (10 * atof("1.1"))); test_assert_equal(11, (int) (100 * atof("0.11"))); test_assert_equal(-11, (int) (10 * atof("-1.1"))); test_assert_equal(-110,(int) atof("-1.1E+2")); test_assert_equal(-1, (int) (100 * atof("-0.1e-1"))); test_assert_equal(10, (int) atof("0.1E2")); }
Add test for strtod function
Add test for strtod function
C
bsd-2-clause
Kefir0192/embox,vrxfile/embox-trik,vrxfile/embox-trik,Kakadu/embox,mike2390/embox,abusalimov/embox,Kakadu/embox,gzoom13/embox,embox/embox,vrxfile/embox-trik,abusalimov/embox,Kefir0192/embox,abusalimov/embox,embox/embox,mike2390/embox,Kefir0192/embox,mike2390/embox,embox/embox,Kefir0192/embox,vrxfile/embox-trik,Kakadu/embox,Kefir0192/embox,abusalimov/embox,mike2390/embox,Kakadu/embox,embox/embox,Kakadu/embox,gzoom13/embox,mike2390/embox,gzoom13/embox,gzoom13/embox,mike2390/embox,Kakadu/embox,abusalimov/embox,gzoom13/embox,mike2390/embox,vrxfile/embox-trik,gzoom13/embox,embox/embox,Kefir0192/embox,embox/embox,vrxfile/embox-trik,gzoom13/embox,Kakadu/embox,vrxfile/embox-trik,Kefir0192/embox,abusalimov/embox
8db141ecc09613faa808a8dd6ef15b316d86210a
pair.c
pair.c
#include "pair.h" pair new_pair( const char c, const int freq ) { pair p; p.c = c; p.freq = freq; return p; } int compare_freq( const void *a, const void *b ) { const pair *ia = ( const pair * ) a; const pair *ib = ( const pair * ) b; return ib->freq - ia->freq; }
#include "pair.h" pair new_pair( const char c, const int freq ) { pair p; p.c = c; p.freq = freq; return p; } int compare_freq( const void *a, const void *b ) { const pair *ia = ( const pair * ) a; const pair *ib = ( const pair * ) b; return ia->freq - ib->freq; }
Fix character frequency map to be sorted in ascending order
Fix character frequency map to be sorted in ascending order
C
mit
masriamir/huffman,masriamir/huffman
5acf8d688ec5e75ebf8cdc7f29925b0d21ad90b1
SurgSim/Math/ParticlesShape-inl.h
SurgSim/Math/ParticlesShape-inl.h
// This file is a part of the OpenSurgSim project. // Copyright 2013, SimQuest Solutions 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 SURGSIM_MATH_PARTICLESSHAPE_INL_H #define SURGSIM_MATH_PARTICLESSHAPE_INL_H namespace SurgSim { namespace Math { template <class V> ParticlesShape::ParticlesShape(const SurgSim::DataStructures::Vertices<V>& other) : DataStructures::Vertices<DataStructures::EmptyData>(other) { update(); } template <class V> ParticlesShape& ParticlesShape::operator=(const SurgSim::DataStructures::Vertices<V>& other) { DataStructures::Vertices<DataStructures::EmptyData>::operator=(other); update(); return *this; } }; // namespace Math }; // namespace SurgSim #endif
// This file is a part of the OpenSurgSim project. // Copyright 2013-2016, SimQuest Solutions 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 SURGSIM_MATH_PARTICLESSHAPE_INL_H #define SURGSIM_MATH_PARTICLESSHAPE_INL_H namespace SurgSim { namespace Math { template <class V> ParticlesShape::ParticlesShape(const SurgSim::DataStructures::Vertices<V>& other) : DataStructures::Vertices<DataStructures::EmptyData>(other), m_radius(0.0) { update(); } template <class V> ParticlesShape& ParticlesShape::operator=(const SurgSim::DataStructures::Vertices<V>& other) { DataStructures::Vertices<DataStructures::EmptyData>::operator=(other); update(); return *this; } }; // namespace Math }; // namespace SurgSim #endif
Fix uninitialed member variable in ParticlesShape
Fix uninitialed member variable in ParticlesShape The radius was uninitialized when using the ParticlesShape copy constructor that takes another Vertices type.
C
apache-2.0
simquest/opensurgsim,simquest/opensurgsim,simquest/opensurgsim,simquest/opensurgsim
d660bde85ad87e3309082e9031b77e9e16b5752d
base/checks.h
base/checks.h
/* * Copyright 2006 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ // This module contains some basic debugging facilities. // Originally comes from shared/commandlineflags/checks.h #ifndef WEBRTC_BASE_CHECKS_H_ #define WEBRTC_BASE_CHECKS_H_ namespace rtc { // Prints an error message to stderr and aborts execution. void Fatal(const char* file, int line, const char* format, ...); } // namespace rtc // The UNREACHABLE macro is very useful during development. #define UNREACHABLE() \ rtc::Fatal(__FILE__, __LINE__, "unreachable code") #endif // WEBRTC_BASE_CHECKS_H_
/* * Copyright 2006 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ // This module contains some basic debugging facilities. // Originally comes from shared/commandlineflags/checks.h #ifndef WEBRTC_BASE_CHECKS_H_ #define WEBRTC_BASE_CHECKS_H_ namespace rtc { // Prints an error message to stderr and aborts execution. void Fatal(const char* file, int line, const char* format, ...); } // namespace rtc // Trigger a fatal error (which aborts the process and prints an error // message). FATAL_ERROR_IF may seem a lot like assert, but there's a crucial // difference: it's always "on". This means that it can be used to check for // regular errors that could actually happen, not just programming errors that // supposedly can't happen---but triggering a fatal error will kill the process // in an ugly way, so it's not suitable for catching errors that might happen // in production. #define FATAL_ERROR(msg) do { rtc::Fatal(__FILE__, __LINE__, msg); } while (0) #define FATAL_ERROR_IF(x) do { if (x) FATAL_ERROR("check failed"); } while (0) // The UNREACHABLE macro is very useful during development. #define UNREACHABLE() FATAL_ERROR("unreachable code") #endif // WEBRTC_BASE_CHECKS_H_
Define convenient FATAL_ERROR() and FATAL_ERROR_IF() macros
Define convenient FATAL_ERROR() and FATAL_ERROR_IF() macros [email protected] Review URL: https://webrtc-codereview.appspot.com/16079004 Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc Cr-Mirrored-Commit: 0fa6366ed15f48b3ec227987f21f339180fb4936
C
bsd-3-clause
sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc
3237da3e1b6e77b6d8505bc5941497f63968226b
Common/ErrorCodes.h
Common/ErrorCodes.h
/* <License> Copyright 2015 Virtium Technology 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. </License> */ #ifndef __ErrorCodes_h__ #define __ErrorCodes_h__ namespace vtStor { enum eErrorCode { None = 0, Unknown, Memory, Io, }; enum eOnErrorBehavior { Stop = 0, Continue, }; } #endif __ErrorCodes_h__
/* <License> Copyright 2015 Virtium Technology 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. </License> */ #ifndef __ErrorCodes_h__ #define __ErrorCodes_h__ namespace vtStor { enum eErrorCode { None = 0, Unknown, Memory, Io, Timeout, NoSupport, Invalid, }; enum eOnErrorBehavior { Stop = 0, Continue, }; } #endif __ErrorCodes_h__
Add enum values: Timeout, Invalid, NoSupport to eErrorCode
Add enum values: Timeout, Invalid, NoSupport to eErrorCode
C
apache-2.0
tranminhtam/vtStor,tranminhtam/vtStor,tranminhtam/vtStor,tranminhtam/vtStor
bce3c27bd9b4c8b415ec9301e33d93b5fe8f3705
OrbitLinuxTracing/Logging.h
OrbitLinuxTracing/Logging.h
#ifndef ORBIT_LINUX_TRACING_LOGGING_H_ #define ORBIT_LINUX_TRACING_LOGGING_H_ // TODO: Move logging to OrbitBase once we have clearer plans for such module. #include <cstdio> #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" #define LOG(format, ...) fprintf(stderr, format "\n", ##__VA_ARGS__) #define ERROR(format, ...) LOG("Error: " format, ##__VA_ARGS__) #pragma clang diagnostic pop #endif // ORBIT_LINUX_TRACING_LOGGING_H_
#ifndef ORBIT_LINUX_TRACING_LOGGING_H_ #define ORBIT_LINUX_TRACING_LOGGING_H_ // TODO: Move logging to OrbitBase once we have clearer plans for such module. #include <cstdio> #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" #endif #define LOG(format, ...) fprintf(stderr, format "\n", ##__VA_ARGS__) #define ERROR(format, ...) LOG("Error: " format, ##__VA_ARGS__) #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ORBIT_LINUX_TRACING_LOGGING_H_
Disable clang diagnostics pragma on windows
Disable clang diagnostics pragma on windows Use clang diagnostics pragma only if it project is compiled with clang. Bug: http://b/150575491 Test: ninja
C
bsd-2-clause
google/orbit,pierricgimmig/orbitprofiler,google/orbit,pierricgimmig/orbitprofiler,pierricgimmig/orbitprofiler,google/orbit,pierricgimmig/orbitprofiler,google/orbit
55b09c3417ee963f59d42583e6d5e4b34fa4c856
RecentlyUsedCache.h
RecentlyUsedCache.h
/* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <unordered_map> #include <string> #include <vector> template <class T> class RingBuffer { private: int currentIdx = 0; int count; std::vector<T> data; public: RingBuffer(int fixedSize) : count(fixedSize), data(count) {} const T& at(int i) { return data[(currentIdx - (i % count) + count) % count]; } void add(const T& newValue) { currentIdx = (currentIdx + 1) % count; data[currentIdx] = newValue; } T oldest() { return data[(currentIdx + 1) % count]; } }; template <class T> class RecentlyUsedCache { private: RingBuffer<T> keysByAge = RingBuffer<T>(1000); public: std::unordered_map<std::string, T> data; void add(const std::string& key, const T& value) { std::string old = keysByAge.oldest(); if (!old.empty()) { keysByAge.data.erase(old); } keysByAge[key] = value; } };
/* 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 <unordered_map> #include <string> #include <vector> template <class T> class RingBuffer { private: int currentIdx = 0; int count; std::vector<T> data; public: RingBuffer(int fixedSize) : count(fixedSize), data(count) {} const T& at(int i) { return data[(currentIdx - (i % count) + count) % count]; } void add(const T& newValue) { currentIdx = (currentIdx + 1) % count; data[currentIdx] = newValue; } T oldest() { return data[(currentIdx + 1) % count]; } void clear() { data = std::vector<T>(count); } }; template <class T> class RecentlyUsedCache { private: RingBuffer<T> keysByAge = RingBuffer<T>(1000); public: std::unordered_map<std::string, T> data; void add(const std::string& key, const T& value) { std::string old = keysByAge.oldest(); if (!old.empty()) { keysByAge.data.erase(old); } keysByAge[key] = value; } void clear() { data.clear(); keysByAge.clear(); } };
Add clear() functions to cache
Add clear() functions to cache
C
mpl-2.0
garvankeeley/https-everywhere-cpp,garvankeeley/https-everywhere-cpp
9149bd2c3a9a443367b31bc99c55b69cb60e920b
IRKit/IRKit/IRHTTPJSONOperation.h
IRKit/IRKit/IRHTTPJSONOperation.h
// // IRHTTPJSONOperation.h // IRKit // // Created by Masakazu Ohtsuka on 2013/12/02. // // #import "ISHTTPOperation.h" @interface IRHTTPJSONOperation : ISHTTPOperation @end
// // IRHTTPJSONOperation.h // IRKit // // Created by Masakazu Ohtsuka on 2013/12/02. // // // #import "ISHTTPOperation.h" @import ISHTTPOperation; @interface IRHTTPJSONOperation : ISHTTPOperation @end
Fix again error: include of non-modular header inside framework module
Fix again error: include of non-modular header inside framework module
C
mit
irkit/ios-sdk
728f279f978e5699bb5ade33abb7779cb86b2fab
BRFullTextSearch/CLuceneSearchService.h
BRFullTextSearch/CLuceneSearchService.h
// // CLuceneSearchService.h // BRFullTextSearch // // Created by Matt on 6/28/13. // Copyright (c) 2013 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0. // #import <Foundation/Foundation.h> #import "BRSearchService.h" @interface CLuceneSearchService : NSObject <BRSearchService> // after this many updates, perform an optimize for faster searches @property (nonatomic) NSInteger indexUpdateOptimizeThreshold; // the bundle to load resources such as stop words from; defaults to [NSBundle mainBundle]; // the resource must be named "stop-words.txt" @property (nonatomic, strong) NSBundle *bundle; // the default language to use for text analyzers; defaults to "en" @property (nonatomic, strong ) NSString *defaultAnalyzerLanguage; - (id)initWithIndexPath:(NSString *)indexPath; // can call to reset the cached lucene::search::Searcher, to pick up changes to the index; // only thread safe if called from the main thread; only needed if after indexing you need // to search immediately from the main thread before the searcher is automatically reset on // the next main thread run loop execution. - (void)resetSearcher; // the NSUserDefaults key used to track the number of index updates between optimizations - (NSString *)userDefaultsIndexUpdateCountKey; @end
// // CLuceneSearchService.h // BRFullTextSearch // // Implementation of BRSearchService using CLucene. When indexing, only NSString, or // NSArray/NSSet with NSString values, are supported as field values. // // Created by Matt on 6/28/13. // Copyright (c) 2013 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0. // #import <Foundation/Foundation.h> #import "BRSearchService.h" @interface CLuceneSearchService : NSObject <BRSearchService> // after this many updates, perform an optimize for faster searches @property (nonatomic) NSInteger indexUpdateOptimizeThreshold; // the bundle to load resources such as stop words from; defaults to [NSBundle mainBundle]; // the resource must be named "stop-words.txt" @property (nonatomic, strong) NSBundle *bundle; // the default language to use for text analyzers; defaults to "en" @property (nonatomic, strong ) NSString *defaultAnalyzerLanguage; - (id)initWithIndexPath:(NSString *)indexPath; // can call to reset the cached lucene::search::Searcher, to pick up changes to the index; // only thread safe if called from the main thread; only needed if after indexing you need // to search immediately from the main thread before the searcher is automatically reset on // the next main thread run loop execution. - (void)resetSearcher; // the NSUserDefaults key used to track the number of index updates between optimizations - (NSString *)userDefaultsIndexUpdateCountKey; @end
Add note on supported field value types.
Add note on supported field value types.
C
apache-2.0
Blue-Rocket/BRFullTextSearch,Blue-Rocket/BRFullTextSearch,Blue-Rocket/BRFullTextSearch,Blue-Rocket/BRFullTextSearch
bd447ad74aca67de6ef3b3b203ee172f1bde19c0
game/ufopaedia/ufopaediacategory.h
game/ufopaedia/ufopaediacategory.h
#pragma once #include "framework/stage.h" #include "framework/includes.h" #include "ufopaediaentry.h" namespace OpenApoc { class UfopaediaCategory : public Stage // , public std::enable_shared_from_this<UfopaediaCategory> { private: Form *menuform; StageCmd stageCmd; void SetCatOffset(int Direction); public: UString ID; UString Title; UString BodyInformation; UString BackgroundImageFilename; std::vector<std::shared_ptr<UfopaediaEntry>> Entries; int ViewingEntry; UfopaediaCategory(Framework &fw, tinyxml2::XMLElement *Element); ~UfopaediaCategory(); // Stage control virtual void Begin() override; virtual void Pause() override; virtual void Resume() override; virtual void Finish() override; virtual void EventOccurred(Event *e) override; virtual void Update(StageCmd *const cmd) override; virtual void Render() override; virtual bool IsTransition() override; void SetTopic(int Index); void SetupForm(); void SetPrevCat(); void SetNextCat(); }; }; // namespace OpenApoc
#pragma once #include "framework/stage.h" #include "framework/includes.h" #include "ufopaediaentry.h" namespace OpenApoc { class UfopaediaCategory : public Stage // , public std::enable_shared_from_this<UfopaediaCategory> { private: Form *menuform; StageCmd stageCmd; void SetCatOffset(int Direction); public: UString ID; UString Title; UString BodyInformation; UString BackgroundImageFilename; std::vector<std::shared_ptr<UfopaediaEntry>> Entries; unsigned int ViewingEntry; UfopaediaCategory(Framework &fw, tinyxml2::XMLElement *Element); ~UfopaediaCategory(); // Stage control virtual void Begin() override; virtual void Pause() override; virtual void Resume() override; virtual void Finish() override; virtual void EventOccurred(Event *e) override; virtual void Update(StageCmd *const cmd) override; virtual void Render() override; virtual bool IsTransition() override; void SetTopic(int Index); void SetupForm(); void SetPrevCat(); void SetNextCat(); }; }; // namespace OpenApoc
Fix unsigned/signed comparison in UfopaediaCategory::EventOccurred
Fix unsigned/signed comparison in UfopaediaCategory::EventOccurred
C
mit
FranciscoDA/OpenApoc,AndO3131/OpenApoc,ShadowDancer/OpenApoc,AndO3131/OpenApoc,pmprog/OpenApoc,pmprog/OpenApoc,FranciscoDA/OpenApoc,Istrebitel/OpenApoc,steveschnepp/OpenApoc,ShadowDancer/OpenApoc,AndO3131/OpenApoc,steveschnepp/OpenApoc,FranciscoDA/OpenApoc,Istrebitel/OpenApoc
e54983694bc43a0f1a7ebb4ed0aeb78a1f2d36ab
Alc/backends/base.h
Alc/backends/base.h
#ifndef AL_BACKENDS_BASE_H #define AL_BACKENDS_BASE_H #include "alMain.h" struct ALCbackendVtable; typedef struct ALCbackend { const struct ALCbackendVtable *vtbl; ALCdevice *mDevice; } ALCbackend; struct ALCbackendVtable { void (*const Destruct)(ALCbackend *state); ALCenum (*const open)(ALCbackend*, const ALCchar*); void (*const close)(ALCbackend*); ALCboolean (*reset)(ALCbackend*); ALCboolean (*start)(ALCbackend*); void (*stop)(ALCbackend*); ALint64 (*getLatency)(ALCbackend*); void (*const Delete)(ALCbackend *state); }; #define DEFINE_ALCBACKEND_VTABLE(T) \ static void T##_ALCbackend_Destruct(ALCbackend *obj) \ { T##_Destruct(STATIC_UPCAST(T, ALCbackend, obj)); } \ static ALCenum T##_ALCbackend_open(ALCbackend *obj, const ALCchar *p1) \ { return T##_open(STATIC_UPCAST(T, ALCbackend, obj), p1); } \ static void T##_ALCbackend_close(ALCbackend *obj) \ { T##_close(STATIC_UPCAST(T, ALCbackend, obj)); } \ static ALCboolean T##_ALCbackend_reset(ALCbackend *obj) \ { return T##_reset(STATIC_UPCAST(T, ALCbackend, obj)); } \ static ALCboolean T##_ALCbackend_start(ALCbackend *obj) \ { return T##_start(STATIC_UPCAST(T, ALCbackend, obj)); } \ static void T##_ALCbackend_stop(ALCbackend *obj) \ { T##_stop(STATIC_UPCAST(T, ALCbackend, obj)); } \ static ALint64 T##_ALCbackend_getLatency(ALCbackend *obj) \ { return T##_getLatency(STATIC_UPCAST(T, ALCbackend, obj)); } \ static void T##_ALCbackend_Delete(ALCbackend *obj) \ { T##_Delete(STATIC_UPCAST(T, ALCbackend, obj)); } \ \ static const struct ALCbackendVtable T##_ALCbackend_vtable = { \ T##_ALCbackend_Destruct, \ \ T##_ALCbackend_open, \ T##_ALCbackend_close, \ T##_ALCbackend_reset, \ T##_ALCbackend_start, \ T##_ALCbackend_stop, \ T##_ALCbackend_getLatency, \ \ T##_ALCbackend_Delete, \ } #endif /* AL_BACKENDS_BASE_H */
Add missing header to git
Add missing header to git
C
lgpl-2.1
mmozeiko/OpenAL-Soft,alexxvk/openal-soft,alexxvk/openal-soft,mmozeiko/OpenAL-Soft,arkana-fts/openal-soft,franklixuefei/openal-soft,BeamNG/openal-soft,BeamNG/openal-soft,irungentoo/openal-soft-tox,Wemersive/openal-soft,arkana-fts/openal-soft,aaronmjacobs/openal-soft,irungentoo/openal-soft-tox,franklixuefei/openal-soft,Wemersive/openal-soft,aaronmjacobs/openal-soft
de9b060c9e15245df187379f366894c83333bc6c
src/config_static.h
src/config_static.h
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2010 NorthScale, 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 CONFIG_STATIC_H #define CONFIG_STATIC_H 1 /* The intention of this file is to avoid cluttering the code with #ifdefs */ #include <event.h> #if !defined(_EVENT_NUMERIC_VERSION) || _EVENT_NUMERIC_VERSION < 0x02000000 typedef int evutil_socket_t; #endif #ifndef DEFAULT_ERRORLOG #define DEFAULT_ERRORLOG ERRORLOG_STDERR #endif #if defined(WORDS_BIGENDIAN) && WORDS_BIGENDIAN > 1 #define ENDIAN_BIG 1 #else #define ENDIAN_LITTLE 1 #endif #endif
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2010 NorthScale, 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 CONFIG_STATIC_H #define CONFIG_STATIC_H 1 /* The intention of this file is to avoid cluttering the code with #ifdefs */ #include <event.h> #if (!defined(_EVENT_NUMERIC_VERSION) || _EVENT_NUMERIC_VERSION < 0x02000000) && !defined(WIN32) typedef int evutil_socket_t; #endif #ifndef DEFAULT_ERRORLOG #define DEFAULT_ERRORLOG ERRORLOG_STDERR #endif #if defined(WORDS_BIGENDIAN) && WORDS_BIGENDIAN > 1 #define ENDIAN_BIG 1 #else #define ENDIAN_LITTLE 1 #endif #endif
Fix event test for win32
Fix event test for win32 Change-Id: I74011ed8cdebaf1771bbaadf4c1eba559f240448 Reviewed-on: http://review.couchbase.org/34772 Reviewed-by: Trond Norbye <[email protected]> Tested-by: Trond Norbye <[email protected]>
C
bsd-3-clause
couchbase/moxi,membase/moxi,membase/moxi,couchbase/moxi,membase/moxi,couchbase/moxi,couchbase/moxi,membase/moxi,couchbase/moxi,membase/moxi,couchbase/moxi,membase/moxi
f735e804814b28ef6f6db39aabab61a3566dc237
sys/ia64/include/smp.h
sys/ia64/include/smp.h
/* * $FreeBSD$ */ #ifndef _MACHINE_SMP_H_ #define _MACHINE_SMP_H_ #ifdef _KERNEL /* * Interprocessor interrupts for SMP. The following values are indices * into the IPI vector table. The SAL gives us the vector used for AP * wake-up. Keep the IPI_AP_WAKEUP at index 0. */ #define IPI_AP_WAKEUP 0 #define IPI_AST 1 #define IPI_CHECKSTATE 2 #define IPI_INVLTLB 3 #define IPI_RENDEZVOUS 4 #define IPI_STOP 5 #define IPI_COUNT 6 #ifndef LOCORE extern int mp_hardware; extern int mp_ipi_vector[]; void ipi_all(int ipi); void ipi_all_but_self(int ipi); void ipi_selected(u_int64_t cpus, int ipi); void ipi_self(int ipi); #endif /* !LOCORE */ #endif /* _KERNEL */ #endif /* !_MACHINE_SMP_H */
/* * $FreeBSD$ */ #ifndef _MACHINE_SMP_H_ #define _MACHINE_SMP_H_ #ifdef _KERNEL /* * Interprocessor interrupts for SMP. The following values are indices * into the IPI vector table. The SAL gives us the vector used for AP * wake-up. Keep the IPI_AP_WAKEUP at index 0. */ #define IPI_AP_WAKEUP 0 #define IPI_AST 1 #define IPI_CHECKSTATE 2 #define IPI_INVLTLB 3 #define IPI_RENDEZVOUS 4 #define IPI_STOP 5 #define IPI_TEST 6 #define IPI_COUNT 7 #ifndef LOCORE extern int mp_hardware; extern int mp_ipi_vector[]; void ipi_all(int ipi); void ipi_all_but_self(int ipi); void ipi_selected(u_int64_t cpus, int ipi); void ipi_self(int ipi); #endif /* !LOCORE */ #endif /* _KERNEL */ #endif /* !_MACHINE_SMP_H */
Add an IPI used for testing proper operation of delivering IPIs.
Add an IPI used for testing proper operation of delivering IPIs.
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
8ff86df042ea13514cc3682895b06a1106c29d36
test/tsan/thread_exit.c
test/tsan/thread_exit.c
// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s // Crashes on powerpc64be // XFAIL: target-is-powerpc64be #include "test.h" int var; void *Thread(void *x) { pthread_exit(&var); return 0; } int main() { pthread_t t; pthread_create(&t, 0, Thread, 0); void *retval = 0; pthread_join(t, &retval); if (retval != &var) { fprintf(stderr, "Unexpected return value\n"); exit(1); } fprintf(stderr, "PASS\n"); return 0; } // CHECK-NOT: WARNING: ThreadSanitizer: // CHECK: PASS
// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s // Crashes on powerpc64be // UNSUPPORTED: powerpc64 #include "test.h" int var; void *Thread(void *x) { pthread_exit(&var); return 0; } int main() { pthread_t t; pthread_create(&t, 0, Thread, 0); void *retval = 0; pthread_join(t, &retval); if (retval != &var) { fprintf(stderr, "Unexpected return value\n"); exit(1); } fprintf(stderr, "PASS\n"); return 0; } // CHECK-NOT: WARNING: ThreadSanitizer: // CHECK: PASS
Remove debug logging and disable test on ppc64be
[tsan] Remove debug logging and disable test on ppc64be git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@353624 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
e949bf64e01c9a2de41eb3a4479db0e58cd4caa6
src/allocator.c
src/allocator.c
/* See LICENSE file for copyright and license details. */ #include "internals.h" void libzahl_realloc(z_t a, size_t need) { #if defined(__clang__) /* https://llvm.org/bugs/show_bug.cgi?id=26930 */ volatile size_t j; #else # define j i #endif size_t i, x; zahl_char_t *new; /* Find n such that n is a minimal power of 2 ≥ need. */ if (likely((need & (~need + 1)) != need)) { need |= need >> 1; need |= need >> 2; need |= need >> 4; for (j = sizeof(need), x = 8; j; j >>= 1, x <<= 1) need |= need >> x; need += 1; } i = libzahl_msb_nz_zu(need); if (likely(libzahl_pool_n[i])) { libzahl_pool_n[i]--; new = libzahl_pool[i][libzahl_pool_n[i]]; zmemcpy(new, a->chars, a->alloced); zfree(a); a->chars = new; } else { a->chars = realloc(a->chars, need * sizeof(zahl_char_t)); if (!a->chars) { if (!errno) /* sigh... */ errno = ENOMEM; libzahl_failure(errno); } } a->alloced = need; }
/* See LICENSE file for copyright and license details. */ #include "internals.h" void libzahl_realloc(z_t a, size_t need) { size_t i, x; zahl_char_t *new; /* Find n such that n is a minimal power of 2 ≥ need. */ if (likely((need & (~need + 1)) != need)) { need |= need >> 1; need |= need >> 2; need |= need >> 4; for (i = sizeof(need), x = 8; (i >>= 1); x <<= 1) need |= need >> x; need += 1; } i = libzahl_msb_nz_zu(need); if (likely(libzahl_pool_n[i])) { libzahl_pool_n[i]--; new = libzahl_pool[i][libzahl_pool_n[i]]; zmemcpy(new, a->chars, a->alloced); zfree(a); a->chars = new; } else { a->chars = realloc(a->chars, need * sizeof(zahl_char_t)); if (!a->chars) { if (!errno) /* sigh... */ errno = ENOMEM; libzahl_failure(errno); } } a->alloced = need; }
Fix so that no workaround is required.
Fix so that no workaround is required. Thanks to Alexis Megas. Signed-off-by: Mattias Andrée <[email protected]>
C
isc
maandree/libzahl,maandree/libzahl,maandree/libzahl
a8f8e28d73a49458195a41a4f2983665f8b84e59
config/config_exporter.h
config/config_exporter.h
#ifndef CONFIG_EXPORTER_H #define CONFIG_EXPORTER_H class ConfigClass; class ConfigObject; class ConfigValue; class ConfigExporter { protected: ConfigExporter(void) { } ~ConfigExporter() { } public: virtual void field(const ConfigValue *, const std::string&) = 0; virtual void object(const ConfigClass *, const ConfigObject *) = 0; virtual void value(const ConfigValue *, const std::string&) = 0; }; #endif /* !CONFIG_EXPORTER_H */
#ifndef CONFIG_EXPORTER_H #define CONFIG_EXPORTER_H class ConfigClass; class ConfigObject; class ConfigValue; class ConfigExporter { protected: ConfigExporter(void) { } virtual ~ConfigExporter() { } public: virtual void field(const ConfigValue *, const std::string&) = 0; virtual void object(const ConfigClass *, const ConfigObject *) = 0; virtual void value(const ConfigValue *, const std::string&) = 0; }; #endif /* !CONFIG_EXPORTER_H */
Fix per Noris Datum's E-Mail.
Fix per Noris Datum's E-Mail. git-svn-id: 9e2532540f1574e817ce42f20b9d0fb64899e451@783 4068ffdb-0463-0410-8185-8cc71e3bd399
C
bsd-2-clause
splbio/wanproxy,splbio/wanproxy,diegows/wanproxy,diegows/wanproxy,splbio/wanproxy,diegows/wanproxy
ec7ec4ecf7fb388c8bc6d074acb65e7d5605ff05
runtime/platform/floating_point.h
runtime/platform/floating_point.h
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #ifndef RUNTIME_PLATFORM_FLOATING_POINT_H_ #define RUNTIME_PLATFORM_FLOATING_POINT_H_ #include <cmath> inline double fmod_ieee(double x, double y) { return fmod(x, y); } inline double atan2_ieee(double y, double x) { return atan2(y, x); } #endif // RUNTIME_PLATFORM_FLOATING_POINT_H_
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #ifndef RUNTIME_PLATFORM_FLOATING_POINT_H_ #define RUNTIME_PLATFORM_FLOATING_POINT_H_ #include <math.h> inline double fmod_ieee(double x, double y) { return fmod(x, y); } inline double atan2_ieee(double y, double x) { return atan2(y, x); } #endif // RUNTIME_PLATFORM_FLOATING_POINT_H_
Fix import to fix Flutter build
[gardening] Fix import to fix Flutter build How cmath is included changes whether the symbols are in the std:: namespace or not. This changes it back to how we have it everywhere in the codebase: math.h Follow up of https://dart-review.googlesource.com/c/sdk/+/115707/ Change-Id: I383c1e9de0434d1367dfdb6302a8fb6db2c3062c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115920 Auto-Submit: Daco Harkes <[email protected]> Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Daco Harkes <[email protected]>
C
bsd-3-clause
dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk
170bd62c1002a9f22595af023f0b0f823809c522
include/D_AnimationSheet.h
include/D_AnimationSheet.h
/* Copyright 2015 Ahnaf Siddiqui 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 D_ANIMATION_SHEET_H #define D_ANIMATION_SHEET_H #include "D_typedefs.h" #include "D_Texture.h" namespace Diamond { struct AnimationSheet { Texture *sprite_sheet; /** The length of time in type of tD_delta of one animation frame */ tD_delta frame_length = 100; uint16_t num_frames = 1; uint8_t rows = 1, columns = 1; }; } #endif // D_ANIMATION_SHEET_H
/* Copyright 2015 Ahnaf Siddiqui 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 D_ANIMATION_SHEET_H #define D_ANIMATION_SHEET_H #include "D_typedefs.h" #include "D_Texture.h" namespace Diamond { struct AnimationSheet { Texture *sprite_sheet = nullptr; /** The length of time in type of tD_delta of one animation frame */ tD_delta frame_length = 100; uint16_t num_frames = 1; uint8_t rows = 1, columns = 1; }; } #endif // D_ANIMATION_SHEET_H
Set default nullptr value on animation sheet texture
Set default nullptr value on animation sheet texture
C
apache-2.0
luky1971/Diamond,polymergames/Diamond,polymergames/Diamond,polymergames/Diamond,luky1971/Diamond,polymergames/Diamond,luky1971/Diamond,luky1971/Diamond,polymergames/Diamond,luky1971/Diamond,luky1971/Diamond,polymergames/Diamond
284c177fdc84906dcecc2f4770ac979377255a45
atmega32a/ddr_pin_port_1/main.c
atmega32a/ddr_pin_port_1/main.c
/* * @file main.c * @brief Set PORTC I/O pins using data direction register, * read input from pins and set high PORTC.0 2 and 3 * if input pin PORTC.6 is high. * @date 06 Jun 2016 10:28 PM */ #include <avr/io.h> #include <util/delay.h> #define __DELAY_BACKWARD_COMPATIBLE__ #ifndef F_CPU #define F_CPU 16000000UL /* 16 MHz clock speed */ #endif int main(void) { DDRC = 0x0F; PORTC = 0x0C; /* lets assume a 4V supply comes to PORTC.6 and Vcc = 5V */ if (PINC == 0b01000000) { PORTC = 0x0B; _delay_ms(1000); /* delay 1s */ } else { PORTC = 0x00; } return 0; }
/* * @file main.c * @brief Set PORTC I/O pins using data direction register, * read input from pins and set high PORTC.0 2 and 3 * if input pin PORTC.6 is high. * @date 06 Jun 2016 10:28 PM */ #define __DELAY_BACKWARD_COMPATIBLE__ #ifndef F_CPU #define F_CPU 16000000UL /* 16 MHz clock speed */ #endif #include <avr/io.h> #include <util/delay.h> int main(void) { DDRC = 0x0F; PORTC = 0x0C; /* lets assume a 4V supply comes to PORTC.6 and Vcc = 5V */ if (PINC == 0b01000000) { PORTC = 0x0B; _delay_ms(1000); /* delay 1s */ } else { PORTC = 0x00; } return 0; }
Define clock frequency before includes
Define clock frequency before includes
C
lgpl-2.1
spinlockirqsave/avr
898b1920a67048c1f38bb99777f4cff06380a59a
arch/ppc/platforms/4xx/virtex.h
arch/ppc/platforms/4xx/virtex.h
/* * arch/ppc/platforms/4xx/virtex.h * * Include file that defines the Xilinx Virtex-II Pro processor * * Author: MontaVista Software, Inc. * [email protected] * * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the * terms of the GNU General Public License version 2. This program is licensed * "as is" without any warranty of any kind, whether express or implied. */ #ifdef __KERNEL__ #ifndef __ASM_VIRTEX_H__ #define __ASM_VIRTEX_H__ /* serial defines */ #include <asm/ibm405.h> /* Ugly, ugly, ugly! BASE_BAUD defined here to keep 8250.c happy. */ #if !defined(BASE_BAUD) #define BASE_BAUD (0) /* dummy value; not used */ #endif /* Device type enumeration for platform bus definitions */ #ifndef __ASSEMBLY__ enum ppc_sys_devices { VIRTEX_UART, }; #endif #endif /* __ASM_VIRTEX_H__ */ #endif /* __KERNEL__ */
/* * arch/ppc/platforms/4xx/virtex.h * * Include file that defines the Xilinx Virtex-II Pro processor * * Author: MontaVista Software, Inc. * [email protected] * * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the * terms of the GNU General Public License version 2. This program is licensed * "as is" without any warranty of any kind, whether express or implied. */ #ifdef __KERNEL__ #ifndef __ASM_VIRTEX_H__ #define __ASM_VIRTEX_H__ /* serial defines */ #include <asm/ibm405.h> /* Ugly, ugly, ugly! BASE_BAUD defined here to keep 8250.c happy. */ #if !defined(BASE_BAUD) #define BASE_BAUD (0) /* dummy value; not used */ #endif /* Device type enumeration for platform bus definitions */ #ifndef __ASSEMBLY__ enum ppc_sys_devices { VIRTEX_UART, NUM_PPC_SYS_DEVS, }; #endif #endif /* __ASM_VIRTEX_H__ */ #endif /* __KERNEL__ */
Fix compile error for ML300/403
[PATCH] Fix compile error for ML300/403 Needed due to changes in ppc_sys.c. Signed-off-by: Grant Likely <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
C
mit
KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas
ce5a951499fe9591054c8fa07df5f5fcf61dec59
driver/retimer/anx7491.h
driver/retimer/anx7491.h
/* 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. * * ANX7491:10G USB 3.2 Re-timer (1-Port) */ #ifndef __CROS_EC_USB_RETIMER_ANX7491_H #define __CROS_EC_USB_RETIMER_ANX7491_H /* I2C interface addresses */ #define ANX7491_I2C_ADDR0_FLAGS 0x10 #define ANX7491_I2C_ADDR1_FLAGS 0x14 #define ANX7491_I2C_ADDR2_FLAGS 0x16 #define ANX7491_I2C_ADDR3_FLAGS 0x11 #endif /* __CROS_EC_USB_RETIMER_ANX7491_H */
Add header for ANX7491 retimer
guybrush: Add header for ANX7491 retimer Adding a header to hold register values for ANX7491. ANX7491 should work without configuration. More registers can be added as needed for tuning. BUG=b:184592168 TEST=Build BRANCH=None Signed-off-by: Rob Barnes <[email protected]> Change-Id: If529bfdedff6b151147c8ef02840621b093be672 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2809881 Reviewed-by: Diana Z <[email protected]>
C
bsd-3-clause
coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec
355c5444d721ed0ed3c4fb5ca8286c579c79db69
ios/ReactNativeExceptionHandler.h
ios/ReactNativeExceptionHandler.h
#if __has_include("RCTBridgeModule.h") #import "RCTBridgeModule.h" #else #import <React/RCTBridgeModule.h> #endif #import <UIKit/UIKit.h> #include <libkern/OSAtomic.h> #include <execinfo.h> @interface ReactNativeExceptionHandler : NSObject <RCTBridgeModule> + (void) replaceNativeExceptionHandlerBlock:(void (^)(NSException *exception, NSString *readeableException))nativeCallbackBlock; + (void) releaseExceptionHold; @end
#if __has_include(<React/RCTBridgeModule.h>) #import <React/RCTBridgeModule.h> #else #import "RCTBridgeModule.h" #endif #import <UIKit/UIKit.h> #include <libkern/OSAtomic.h> #include <execinfo.h> @interface ReactNativeExceptionHandler : NSObject <RCTBridgeModule> + (void) replaceNativeExceptionHandlerBlock:(void (^)(NSException *exception, NSString *readeableException))nativeCallbackBlock; + (void) releaseExceptionHold; @end
Change import priority of RCTBridgeModule
Change import priority of RCTBridgeModule This appears to be the accepted fix for this issue: https://github.com/master-atul/react-native-exception-handler/issues/46 per https://github.com/facebook/react-native/issues/15775#issuecomment-326930316 and other posts in the same thread.
C
mit
master-atul/react-native-exception-handler,master-atul/react-native-exception-handler,master-atul/react-native-exception-handler
0b77e6dcf6955ffd783830104c12563a650d3e25
include/utils/string_to_enum.h
include/utils/string_to_enum.h
// The libMesh Finite Element Library. // Copyright (C) 2002-2019 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef LIBMESH_STRING_TO_ENUM_H #define LIBMESH_STRING_TO_ENUM_H // C++ includes #include <string> namespace libMesh { namespace Utility { /** * \returns the enumeration of type \p T which matches the string \p s. */ template <typename T> T string_to_enum (const std::string & s); } // namespace Utility } // namespace libMesh #endif // LIBMESH_STRING_TO_ENUM_H
// The libMesh Finite Element Library. // Copyright (C) 2002-2019 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef LIBMESH_STRING_TO_ENUM_H #define LIBMESH_STRING_TO_ENUM_H // libMesh includes #include "libmesh/enum_to_string.h" // backwards compatibility // C++ includes #include <string> namespace libMesh { namespace Utility { /** * \returns the enumeration of type \p T which matches the string \p s. */ template <typename T> T string_to_enum (const std::string & s); } // namespace Utility } // namespace libMesh #endif // LIBMESH_STRING_TO_ENUM_H
Include new header in old header for backwards compatibility.
Include new header in old header for backwards compatibility.
C
lgpl-2.1
libMesh/libmesh,capitalaslash/libmesh,libMesh/libmesh,capitalaslash/libmesh,roystgnr/libmesh,BalticPinguin/libmesh,capitalaslash/libmesh,capitalaslash/libmesh,roystgnr/libmesh,dschwen/libmesh,capitalaslash/libmesh,libMesh/libmesh,libMesh/libmesh,BalticPinguin/libmesh,jwpeterson/libmesh,dschwen/libmesh,jwpeterson/libmesh,dschwen/libmesh,jwpeterson/libmesh,capitalaslash/libmesh,BalticPinguin/libmesh,BalticPinguin/libmesh,dschwen/libmesh,roystgnr/libmesh,dschwen/libmesh,roystgnr/libmesh,BalticPinguin/libmesh,capitalaslash/libmesh,jwpeterson/libmesh,BalticPinguin/libmesh,jwpeterson/libmesh,jwpeterson/libmesh,BalticPinguin/libmesh,dschwen/libmesh,dschwen/libmesh,capitalaslash/libmesh,roystgnr/libmesh,libMesh/libmesh,BalticPinguin/libmesh,roystgnr/libmesh,dschwen/libmesh,libMesh/libmesh,libMesh/libmesh,roystgnr/libmesh,jwpeterson/libmesh,jwpeterson/libmesh,roystgnr/libmesh,libMesh/libmesh
e5f5221b5ee04eaffdd76c196c32b82ca4b9a332
lib/Target/X86/X86TargetMachine.h
lib/Target/X86/X86TargetMachine.h
//===-- X86TargetMachine.h - Define TargetMachine for the X86 ---*- C++ -*-===// // // This file declares the X86 specific subclass of TargetMachine. // //===----------------------------------------------------------------------===// #ifndef X86TARGETMACHINE_H #define X86TARGETMACHINE_H #include "llvm/Target/TargetMachine.h" #include "X86InstrInfo.h" class X86TargetMachine : public TargetMachine { X86InstrInfo instrInfo; public: X86TargetMachine(); virtual const MachineInstrInfo &getInstrInfo() const { return instrInfo; } virtual const MachineSchedInfo &getSchedInfo() const { abort(); } virtual const MachineRegInfo &getRegInfo() const { abort(); } virtual const MachineFrameInfo &getFrameInfo() const { abort(); } virtual const MachineCacheInfo &getCacheInfo() const { abort(); } virtual const MachineOptInfo &getOptInfo() const { abort(); } /// addPassesToJITCompile - Add passes to the specified pass manager to /// implement a fast dynamic compiler for this target. Return true if this is /// not supported for this target. /// virtual bool addPassesToJITCompile(PassManager &PM); }; #endif
//===-- X86TargetMachine.h - Define TargetMachine for the X86 ---*- C++ -*-===// // // This file declares the X86 specific subclass of TargetMachine. // //===----------------------------------------------------------------------===// #ifndef X86TARGETMACHINE_H #define X86TARGETMACHINE_H #include "llvm/Target/TargetMachine.h" #include "X86InstrInfo.h" class X86TargetMachine : public TargetMachine { X86InstrInfo instrInfo; public: X86TargetMachine(); virtual const MachineInstrInfo &getInstrInfo() const { return instrInfo; } virtual const MachineSchedInfo &getSchedInfo() const { abort(); } virtual const MachineRegInfo &getRegInfo() const { abort(); } virtual const MachineFrameInfo &getFrameInfo() const { abort(); } virtual const MachineCacheInfo &getCacheInfo() const { abort(); } virtual const MachineOptInfo &getOptInfo() const { abort(); } virtual const MRegisterInfo *getRegisterInfo() const { return &instrInfo.getRegisterInfo(); } /// addPassesToJITCompile - Add passes to the specified pass manager to /// implement a fast dynamic compiler for this target. Return true if this is /// not supported for this target. /// virtual bool addPassesToJITCompile(PassManager &PM); }; #endif
Implement the new optional getRegisterInfo
Implement the new optional getRegisterInfo git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@4437 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap
287d81cca3ddb6386c8fb4712a46d7e7cb01e7bd
cc1/tests/test003.c
cc1/tests/test003.c
/* name: TEST003 description: Select function to call inside ternary operator output: */ int foo(void) { return 42; } int bar(void) { return 24; } int main(void) { return (1 ? foo : bar)(); }
Add test for ternary operator
Add test for ternary operator The test is currently failing.
C
isc
k0gaMSX/scc,k0gaMSX/kcc,k0gaMSX/scc,8l/scc,8l/scc,k0gaMSX/kcc,k0gaMSX/scc,8l/scc
e0589df6d57310a9e86c86c006657fef5c801b03
library/src/main/cpp/borders.h
library/src/main/cpp/borders.h
#ifndef BORDERS_H #define BORDERS_H #include <cstdlib> #include <cmath> /** A line will be considered as having content if 0.25% of it is filled. */ const float filledRatioLimit = 0.0025; /** When the threshold is closer to 1, less content will be cropped. **/ #define THRESHOLD 0.65 const uint16_t redThreshold_RGB_565 = ((uint16_t)(31.0 * THRESHOLD)) << (5 + 6); const uint8_t redTreshold_RGB_A8888 = (uint8_t)(255.0 * THRESHOLD); const uint8_t redTreshold_A8 = (uint8_t)(255.0 * THRESHOLD); struct Borders { int left, top, right, bottom; }; Borders findBorders_ARGB_8888(const void *pixels, int width, int height); Borders findBorders_RGB_565(const void *pixels, int width, int height); Borders findBorders_A8(const void *pixels, int width, int height); #endif //BORDERS_H
#ifndef BORDERS_H #define BORDERS_H #include <cstdlib> #include <cmath> /** A line will be considered as having content if 0.25% of it is filled. */ const float filledRatioLimit = 0.0025; /** When the threshold is closer to 1, less content will be cropped. **/ #define THRESHOLD 0.75 const uint16_t redThreshold_RGB_565 = ((uint16_t)(31.0 * THRESHOLD)) << (5 + 6); const uint8_t redTreshold_RGB_A8888 = (uint8_t)(255.0 * THRESHOLD); const uint8_t redTreshold_A8 = (uint8_t)(255.0 * THRESHOLD); struct Borders { int left, top, right, bottom; }; Borders findBorders_ARGB_8888(const void *pixels, int width, int height); Borders findBorders_RGB_565(const void *pixels, int width, int height); Borders findBorders_A8(const void *pixels, int width, int height); #endif //BORDERS_H
Add a bit more threshold
Add a bit more threshold
C
apache-2.0
inorichi/tachimage,inorichi/tachimage,inorichi/tachimage
be7f4b5b23cbdaedac70f2743b1cc0d4f517ef8d
cc1/tests/test015.c
cc1/tests/test015.c
/* name: TEST015 description: Stress namespace mechanism output: test015.c:21: warning: 's1' defined but not used S7 s2 ( M8 I s ) S4 s1 ( M5 I s M9 S7 s2 ) S2 s ( M10 S4 s1 ) G11 S2 s F1 G12 F1 main { - j L2 A3 S2 s2 L4 yI G11 M10 .S4 M5 .I G11 M10 .S4 M9 .S7 M8 .I +I L2 yI A3 M10 .S4 M9 .S7 M8 .I } */ #line 1 struct s { struct s1 { int s; struct s2 { int s; } s2; } s1; } s; int main(void) { goto s2; struct s s2; s1: return s.s1.s + s.s1.s2.s; s2: return s2.s1.s2.s; }
Add test of namespaces and structs/unions
Add test of namespaces and structs/unions
C
mit
k0gaMSX/kcc,8l/scc,k0gaMSX/scc,k0gaMSX/scc,8l/scc,8l/scc,k0gaMSX/scc,k0gaMSX/kcc
032e91ad8a436a424a8364f70f5fea0ab5f6d23d
firmware/src/control_loop-inl.h
firmware/src/control_loop-inl.h
#ifndef CONTROL_LOOP_INL_H #define CONTROL_LOOP_INL_H #include "board.h" #include "bitband.h" namespace hardware { inline bool ControlLoop::hw_button_enabled() { return MEM_ADDR(BITBAND(reinterpret_cast<uint32_t>(&(GPIOF->IDR)), GPIOF_HW_SWITCH_PIN)); } } #endif
#ifndef CONTROL_LOOP_INL_H #define CONTROL_LOOP_INL_H #include "board.h" #include "bitband.h" namespace hardware { inline bool ControlLoop::hw_button_enabled() const { return MEM_ADDR(BITBAND(reinterpret_cast<uint32_t>(&(GPIOF->IDR)), GPIOF_HW_SWITCH_PIN)); } } #endif
Add const to hw_button_enabled() definition.
Add const to hw_button_enabled() definition.
C
bsd-2-clause
hazelnusse/robot.bicycle,hazelnusse/robot.bicycle,hazelnusse/robot.bicycle,hazelnusse/robot.bicycle,hazelnusse/robot.bicycle
ac20dc4cdb3accf492b23c75bcfedfad80bc5c3d
formats/format.h
formats/format.h
#ifndef FORMAT_H #define FORMAT_H #include <cstring> // memmove class Format { public: Format(void *p, size_t s = 0) : fp((char *)p), size(s) {}; size_t Leanify(size_t size_leanified = 0) { if (size_leanified) { memmove(fp - size_leanified, fp, size); fp -= size_leanified; } return size; } protected: // pointer to the file content char *fp; // size of the file size_t size; }; #endif
#ifndef FORMAT_H #define FORMAT_H #include <cstddef> #include <cstring> // memmove class Format { public: Format(void *p, size_t s = 0) : fp((char *)p), size(s) {}; size_t Leanify(size_t size_leanified = 0) { if (size_leanified) { memmove(fp - size_leanified, fp, size); fp -= size_leanified; } return size; } protected: // pointer to the file content char *fp; // size of the file size_t size; }; #endif
Add missing cstddef header for size_t
Add missing cstddef header for size_t
C
mit
yyjdelete/Leanify,JayXon/Leanify,JayXon/Leanify,yyjdelete/Leanify
be0220d554aab34ff409c25cdb2820f1c2ee95fd
vp8/decoder/opencl/vp8_decode_cl.c
vp8/decoder/opencl/vp8_decode_cl.c
#include "vpx_ports/config.h" #include "opencl/vp8_opencl.h" #include "opencl/vp8_decode_cl.h" #include <stdio.h> extern int cl_init_dequant(); extern int cl_destroy_dequant(); int cl_decode_destroy(){ int err; err = cl_destroy_dequant(); return CL_SUCCESS; } int cl_decode_init() { int err; printf("Initializing opencl decoder-specific programs/kernels"); //Initialize programs to null value //Enables detection of if they've been initialized as well. cl_data.dequant_program = NULL; err = cl_init_dequant(); if (err != CL_SUCCESS) return err; printf(" .. done\n"); return CL_SUCCESS; }
#include "vpx_ports/config.h" #include "../../common/opencl/vp8_opencl.h" #include "vp8_decode_cl.h" #include <stdio.h> extern int cl_init_dequant(); extern int cl_destroy_dequant(); int cl_decode_destroy(){ int err; err = cl_destroy_dequant(); return CL_SUCCESS; } int cl_decode_init() { int err; printf("Initializing opencl decoder-specific programs/kernels"); //Initialize programs to null value //Enables detection of if they've been initialized as well. cl_data.dequant_program = NULL; err = cl_init_dequant(); if (err != CL_SUCCESS) return err; return CL_SUCCESS; }
Remove some debug output from decode initialization.
Remove some debug output from decode initialization.
C
bsd-3-clause
awatry/libvpx.opencl,awatry/libvpx.opencl,awatry/libvpx.opencl,awatry/libvpx.opencl
f7a22deb1c15605ae68b34ace8326fcf548427ca
cmd/smyrna/topviewdata.h
cmd/smyrna/topviewdata.h
/* 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 TOPVIEWDATA_H #define TOPVIEWDATA_H #include <gtk/gtk.h> #include "cgraph.h" #include "smyrnadefs.h" #include "tvnodes.h" int prepare_nodes_for_groups(topview * t, topviewdata * td, int groupindex); int load_host_buttons(topview * t, Agraph_t * g, glCompSet * s); int validate_group_node(tv_node * TV_Node, char *regex_string); int click_group_button(int groupindex); void glhost_button_clicked_Slot(void *p); _BB void host_button_clicked_Slot(GtkWidget * widget, gpointer user_data); #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 TOPVIEWDATA_H #define TOPVIEWDATA_H #include <gtk/gtk.h> #include "cgraph.h" #include "smyrnadefs.h" #include "tvnodes.h" int prepare_nodes_for_groups(topview * t, topviewdata * td, int groupindex); int load_host_buttons(topview * t, Agraph_t * g, glCompSet * s); int click_group_button(int groupindex); void glhost_button_clicked_Slot(void *p); _BB void host_button_clicked_Slot(GtkWidget * widget, gpointer user_data); #endif
Integrate topfish and sfdp into main tree, using GTS for triangulation; remove duplicated code
Integrate topfish and sfdp into main tree, using GTS for triangulation; remove duplicated code
C
epl-1.0
kbrock/graphviz,BMJHayward/graphviz,kbrock/graphviz,BMJHayward/graphviz,jho1965us/graphviz,pixelglow/graphviz,jho1965us/graphviz,ellson/graphviz,pixelglow/graphviz,tkelman/graphviz,ellson/graphviz,kbrock/graphviz,jho1965us/graphviz,MjAbuz/graphviz,tkelman/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,pixelglow/graphviz,kbrock/graphviz,jho1965us/graphviz,kbrock/graphviz,BMJHayward/graphviz,jho1965us/graphviz,pixelglow/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,tkelman/graphviz,kbrock/graphviz,BMJHayward/graphviz,ellson/graphviz,ellson/graphviz,tkelman/graphviz,jho1965us/graphviz,MjAbuz/graphviz,tkelman/graphviz,tkelman/graphviz,tkelman/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,jho1965us/graphviz,MjAbuz/graphviz,tkelman/graphviz,jho1965us/graphviz,tkelman/graphviz,ellson/graphviz,kbrock/graphviz,BMJHayward/graphviz,ellson/graphviz,ellson/graphviz,kbrock/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,pixelglow/graphviz,kbrock/graphviz,ellson/graphviz,BMJHayward/graphviz,pixelglow/graphviz,pixelglow/graphviz,jho1965us/graphviz,kbrock/graphviz,ellson/graphviz,pixelglow/graphviz,BMJHayward/graphviz,tkelman/graphviz,jho1965us/graphviz,MjAbuz/graphviz,kbrock/graphviz,ellson/graphviz,BMJHayward/graphviz,pixelglow/graphviz,pixelglow/graphviz,tkelman/graphviz,jho1965us/graphviz,ellson/graphviz,pixelglow/graphviz
d65991d5e2241ee3c1ce67cbaf49cbef3c53b291
src/tool/hpcrun/unwind/generic-libunwind/unw-datatypes-specific.h
src/tool/hpcrun/unwind/generic-libunwind/unw-datatypes-specific.h
// // This software was produced with support in part from the Defense Advanced // Research Projects Agency (DARPA) through AFRL Contract FA8650-09-C-1915. // Nothing in this work should be construed as reflecting the official policy or // position of the Defense Department, the United States government, or // Rice University. // #ifndef UNW_DATATYPES_SPECIFIC_H #define UNW_DATATYPES_SPECIFIC_H #include <libunwind.h> #include <unwind/common/fence_enum.h> #include <hpcrun/loadmap.h> #include <utilities/ip-normalized.h> typedef struct { load_module_t* lm; } intvl_t; typedef struct hpcrun_unw_cursor_t { void* pc_unnorm; fence_enum_t fence; // Details on which fence stopped an unwind unw_cursor_t uc; // normalized ip for first instruction in enclosing function ip_normalized_t the_function; ip_normalized_t pc_norm; } hpcrun_unw_cursor_t; #endif // UNW_DATATYPES_SPECIFIC_H
// // This software was produced with support in part from the Defense Advanced // Research Projects Agency (DARPA) through AFRL Contract FA8650-09-C-1915. // Nothing in this work should be construed as reflecting the official policy or // position of the Defense Department, the United States government, or // Rice University. // #ifndef UNW_DATATYPES_SPECIFIC_H #define UNW_DATATYPES_SPECIFIC_H #include <libunwind.h> #include <unwind/common/fence_enum.h> #include <hpcrun/loadmap.h> #include <utilities/ip-normalized.h> typedef struct { load_module_t* lm; } intvl_t; typedef struct hpcrun_unw_cursor_t { void* pc_unnorm; unw_cursor_t uc; // normalized ip for first instruction in enclosing function ip_normalized_t the_function; ip_normalized_t pc_norm; } hpcrun_unw_cursor_t; #endif // UNW_DATATYPES_SPECIFIC_H
Drop another unused libunw cursor member.
Drop another unused libunw cursor member.
C
bsd-3-clause
HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit
207fc4291d4660ec2ef2deef959cd8ae0f0edbb0
tests/regression/36-octapron/41-threadenter-no-locals.c
tests/regression/36-octapron/41-threadenter-no-locals.c
// SKIP PARAM: --sets ana.activated[+] octApron #include <pthread.h> #include <assert.h> void *t_fun(void *arg) { int x; // threadenter shouldn't pass value for x here assert(x == 3); // UNKNOWN! return NULL; } int main(void) { int x = 3; pthread_t id; pthread_create(&id, NULL, t_fun, NULL); return 0; }
Add octApron test where threadenter doesn't remove locals
Add octApron test where threadenter doesn't remove locals
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
784c65c9589bf4f6f9794a85c35de361012d52f2
include/mqueue.h
include/mqueue.h
/*- * Copyright (c) 2005 David Xu <[email protected]> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _MQUEUE_H_ #define _MQUEUE_H_ #include <sys/types.h> #include <sys/mqueue.h> struct sigevent; struct timespec; int mq_close(mqd_t); int mq_getattr(mqd_t, struct mq_attr *); int mq_notify(mqd_t, const struct sigevent *); mqd_t mq_open(const char *, int, ...); ssize_t mq_receive(mqd_t, char *, size_t, unsigned *); int mq_send(mqd_t, const char *, size_t, unsigned); int mq_setattr(mqd_t, const struct mq_attr *__restrict, struct mq_attr *__restrict); ssize_t mq_timedreceive(mqd_t, char *__restrict, size_t, unsigned *__restrict, const struct timespec *__restrict); int mq_timedsend(mqd_t, const char *, size_t, unsigned, const struct timespec *); int mq_unlink(const char *); #endif
Bring in POSIX message queue header file.
Bring in POSIX message queue header file.
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
e2a17d9b50335e11f6246086ee3ae909c2cc0fd5
parse.c
parse.c
#include <stdint.h> #include <stdio.h> #include "compiler.h" #include "cJSON.h" #include "parse.h" int parse_message(const char *msg, uint32_t length) { cJSON *root; const char *end_parse; root = cJSON_ParseWithOpts(msg, &end_parse, 0); if (unlikely(root == NULL)) { fprintf(stderr, "Could not parse JSON!\n"); return -1; } else { uint32_t parsed_length = end_parse - msg; if (unlikely(parsed_length != length)) { fprintf(stderr, "length of parsed JSON does not match message length!\n"); return -1; } cJSON_Delete(root); return 0; } }
#include <stdint.h> #include <stdio.h> #include <string.h> #include "compiler.h" #include "cJSON.h" #include "parse.h" int parse_message(const char *msg, uint32_t length) { cJSON *root; const char *end_parse; root = cJSON_ParseWithOpts(msg, &end_parse, 0); if (unlikely(root == NULL)) { fprintf(stderr, "Could not parse JSON!\n"); return -1; } else { cJSON *method; const char *method_string; uint32_t parsed_length = end_parse - msg; if (unlikely(parsed_length != length)) { fprintf(stderr, "length of parsed JSON does not match message length!\n"); return -1; } method = cJSON_GetObjectItem(root, "method"); if (unlikely(method == NULL)) { goto no_method; } method_string = method->valuestring; if (unlikely(method_string == NULL)) { goto no_method; } if (strcmp(method_string, "set") == 0) { } else if (strcmp(method_string, "post") == 0) { } else if (strcmp(method_string, "add") == 0) { } else if (strcmp(method_string, "remove") == 0) { } else if (strcmp(method_string, "call") == 0) { } else if (strcmp(method_string, "fetch") == 0) { } else if (strcmp(method_string, "unfetch") == 0) { } else { fprintf(stderr, "Unsupported method: %s!\n", method_string); goto unsupported_method; } cJSON_Delete(root); return 0; no_method: fprintf(stderr, "Can not find supported method!\n"); unsupported_method: cJSON_Delete(root); return -1; } }
Add trampoline code to call function withn respect to the incoming JSON method.
Add trampoline code to call function withn respect to the incoming JSON method.
C
mit
gatzka/cjet,mloy/cjet,gatzka/cjet,mloy/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet
340f3074b49de089e7e8cf9495fd54f67b7f9b8a
third_party/libwebp/webp/config.h
third_party/libwebp/webp/config.h
/* * Copyright 2015 Google, Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ // FIXME: Workaround for skbug.com/4037 // Some of our test machines have an older version of clang that does not // have // __builtin_bswap16 // // But libwebp expects the builtin. We can change that by using this config.h // file, which replaces the checks in endian_inl.h to decide whether we have // particular builtins. #ifdef __builtin_bswap64(x) #define HAVE_BUILTIN_BSWAP64 #endif #ifdef __builtin_bswap32(x) #define HAVE_BUILTIN_BSWAP32 #endif #ifdef __builtin_bswap16(x) #define HAVE_BUILTIN_BSWAP16 #endif
/* * Copyright 2015 Google, Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ // FIXME: Workaround for skbug.com/4037 // Some of our test machines have an older version of clang that does not // have // __builtin_bswap16 // // But libwebp expects the builtin. We can change that by using this config.h // file, which replaces the checks in endian_inl.h to decide whether we have // particular builtins. #ifdef __builtin_bswap64 #define HAVE_BUILTIN_BSWAP64 #endif #ifdef __builtin_bswap32 #define HAVE_BUILTIN_BSWAP32 #endif #ifdef __builtin_bswap16 #define HAVE_BUILTIN_BSWAP16 #endif
Fix webp compile warnings on windows
Fix webp compile warnings on windows This fix was landed with: https://codereview.chromium.org/1280073002/ The above CL was reverted due to an unrelated bug in libwebp. The above CL contains multiple components, and I think that reverting this part of the change was unintentional. BUG=skia: Review URL: https://codereview.chromium.org/1286903003
C
bsd-3-clause
ominux/skia,aosp-mirror/platform_external_skia,qrealka/skia-hc,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,qrealka/skia-hc,Hikari-no-Tenshi/android_external_skia,tmpvar/skia.cc,HalCanary/skia-hc,HalCanary/skia-hc,rubenvb/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,HalCanary/skia-hc,shahrzadmn/skia,rubenvb/skia,ominux/skia,shahrzadmn/skia,rubenvb/skia,tmpvar/skia.cc,tmpvar/skia.cc,ominux/skia,shahrzadmn/skia,rubenvb/skia,qrealka/skia-hc,shahrzadmn/skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,rubenvb/skia,google/skia,shahrzadmn/skia,ominux/skia,qrealka/skia-hc,ominux/skia,aosp-mirror/platform_external_skia,tmpvar/skia.cc,aosp-mirror/platform_external_skia,tmpvar/skia.cc,aosp-mirror/platform_external_skia,ominux/skia,tmpvar/skia.cc,google/skia,tmpvar/skia.cc,google/skia,aosp-mirror/platform_external_skia,shahrzadmn/skia,ominux/skia,HalCanary/skia-hc,shahrzadmn/skia,google/skia,ominux/skia,google/skia,Hikari-no-Tenshi/android_external_skia,qrealka/skia-hc,Hikari-no-Tenshi/android_external_skia,tmpvar/skia.cc,qrealka/skia-hc,shahrzadmn/skia,rubenvb/skia,HalCanary/skia-hc,qrealka/skia-hc,google/skia,qrealka/skia-hc,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,google/skia,Hikari-no-Tenshi/android_external_skia,shahrzadmn/skia,tmpvar/skia.cc,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,ominux/skia,aosp-mirror/platform_external_skia
304b71823aac62adcbf938c23b823f7d0fd369f1
samples/Qt/basic/mythread.h
samples/Qt/basic/mythread.h
#ifndef MYTHREAD_H #define MYTHREAD_H #include <QThread> #include "easylogging++.h" class MyThread : public QThread { Q_OBJECT public: MyThread(int id) : threadId(id) {} private: int threadId; protected: void run() { LINFO <<"Writing from a thread " << threadId; LVERBOSE(2) << "This is verbose level 2 logging from thread #" << threadId; // Following line will be logged only once from second running thread (which every runs second into // this line because of interval 2) LWARNING_EVERY_N(2) << "This will be logged only once from thread who every reaches this line first. Currently running from thread #" << threadId; for (int i = 1; i <= 10; ++i) { LVERBOSE_EVERY_N(2, 3) << "Verbose level 3 log every two times. This is at " << i << " from thread #" << threadId; } // Following line will be logged once with every thread because of interval 1 LINFO_EVERY_N(1) << "This interval log will be logged with every thread, this one is from thread #" << threadId; LINFO_IF(threadId == 2) << "This log is only for thread 2 and is ran by thread #" << threadId; std::vector<std::string> myLoggers; easyloggingpp::Loggers::getAllLogIdentifiers(myLoggers); for (unsigned int i = 0; i < myLoggers.size(); ++i) { std::cout << "Logger ID [" << myLoggers.at(i) << "]"; } easyloggingpp::Configurations c; c.parseFromText("*ALL:\n\nFORMAT = %level"); } }; #endif
#ifndef MYTHREAD_H #define MYTHREAD_H #include <QThread> #include "easylogging++.h" class MyThread : public QThread { Q_OBJECT public: MyThread(int id) : threadId(id) {} private: int threadId; protected: void run() { LINFO <<"Writing from a thread " << threadId; LVERBOSE(2) << "This is verbose level 2 logging from thread #" << threadId; // Following line will be logged only once from second running thread (which every runs second into // this line because of interval 2) LWARNING_EVERY_N(2) << "This will be logged only once from thread who every reaches this line first. Currently running from thread #" << threadId; for (int i = 1; i <= 10; ++i) { LVERBOSE_EVERY_N(2, 3) << "Verbose level 3 log every two times. This is at " << i << " from thread #" << threadId; } // Following line will be logged once with every thread because of interval 1 LINFO_EVERY_N(1) << "This interval log will be logged with every thread, this one is from thread #" << threadId; LINFO_IF(threadId == 2) << "This log is only for thread 2 and is ran by thread #" << threadId; } }; #endif
Remove logger ids loop from sample
Remove logger ids loop from sample
C
mit
spqr33/easyloggingpp,lisong521/easyloggingpp,blankme/easyloggingpp,lisong521/easyloggingpp,blankme/easyloggingpp,arvidsson/easyloggingpp,simonhang/easyloggingpp,chenmusun/easyloggingpp,utiasASRL/easyloggingpp,dreal-deps/easyloggingpp,blankme/easyloggingpp,lisong521/easyloggingpp,chenmusun/easyloggingpp,simonhang/easyloggingpp,hellowshinobu/easyloggingpp,hellowshinobu/easyloggingpp,arvidsson/easyloggingpp,utiasASRL/easyloggingpp,dreal-deps/easyloggingpp,arvidsson/easyloggingpp,chenmusun/easyloggingpp,spthaolt/easyloggingpp,spqr33/easyloggingpp,simonhang/easyloggingpp,hellowshinobu/easyloggingpp,utiasASRL/easyloggingpp,spthaolt/easyloggingpp,spqr33/easyloggingpp,dreal-deps/easyloggingpp,spthaolt/easyloggingpp
58864e0f25384641aef7bd616c6c5b5470656e46
oi_os.h
oi_os.h
#ifndef OI_OS #define OI_OS 1 #if defined(_WIN32) || defined(__WIN32__) # define OI_WIN # ifdef _MSC_VER # define OI_MSVC # else # define OI_GCC # endif # ifndef WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN # endif # include <windows.h> #elif defined(linux) || defined(__linux) # define OI_LINUX # define OI_GCC # ifndef _XOPEN_SOURCE # define _XOPEN_SOURCE 500 # endif # ifndef __USE_UNIX98 # define __USE_UNIX98 # endif #elif defined(__APPLE__) || defined(MACOSX) || defined(macintosh) || defined(Macintosh) # define OI_MAC # define OI_GCC #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) # define OI_FreeBSD # define OI_GCC #else # warning oi does not recognize OS # define OI_UNKNOWN_OS # define OI_UNKNOWN_COMPILER #endif #endif
#ifndef OI_OS #define OI_OS 1 #if defined(__GNUC__) # define OI_GCC #elif defined(_MSC_VER) # define OI_MSVC #else # warning oi does not recognize compiler # define OI_UNKNOWN_CC #endif #if defined(_WIN32) || defined(__WIN32__) # define OI_WIN # # ifndef WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN # endif # # include <windows.h> # #elif defined(linux) || defined(__linux) # define OI_LINUX # # ifndef _XOPEN_SOURCE # define _XOPEN_SOURCE 500 # endif # # ifndef __USE_UNIX98 # define __USE_UNIX98 # endif # #elif defined(__APPLE__) || defined(MACOSX) || defined(macintosh) || defined(Macintosh) # define OI_MAC # #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) # define OI_FreeBSD # #else # warning oi does not recognize OS # define OI_UNKNOWN_OS #endif #endif
Set up actual compiler detections. Only supports gcc and msvc at the moment
Set up actual compiler detections. Only supports gcc and msvc at the moment
C
mit
geky/oi
cb03d892cccf64b647986e07d0773fe0a8d1da29
iobuf/ibuf_refill.c
iobuf/ibuf_refill.c
#include <errno.h> #include <unistd.h> #include "iobuf.h" static const char errmsg[] = "ibuf_refill called with non-empty buffer!\n"; int ibuf_refill(ibuf* in) { iobuf* io; unsigned oldlen; unsigned rd; io = &(in->io); if (io->flags) return 0; if (io->bufstart != 0) { if (io->bufstart < io->buflen) { write(1, errmsg, sizeof errmsg); exit(1); /* io->buflen -= io->bufstart; */ /* memcpy(io->buffer, io->buffer+io->bufstart, io->buflen); */ } else io->buflen = 0; io->bufstart = 0; } oldlen = io->buflen; if(io->buflen < io->bufsize) { if (io->timeout && !iobuf_timeout(io, 0)) return 0; rd = read(io->fd, io->buffer+io->buflen, io->bufsize-io->buflen); if(rd == (unsigned)-1) IOBUF_SET_ERROR(io); else if(rd == 0) io->flags |= IOBUF_EOF; else { io->buflen += rd; io->offset += rd; } } return io->buflen > oldlen; }
#include <errno.h> #include <unistd.h> #include "iobuf.h" static const char errmsg[] = "ibuf_refill called with non-empty buffer!\n"; int ibuf_refill(ibuf* in) { iobuf* io; unsigned oldlen; unsigned rd; io = &(in->io); if (io->flags) return 0; if (io->bufstart != 0) { if (io->bufstart < io->buflen) { write(1, errmsg, sizeof errmsg); _exit(1); /* io->buflen -= io->bufstart; */ /* memcpy(io->buffer, io->buffer+io->bufstart, io->buflen); */ } else io->buflen = 0; io->bufstart = 0; } oldlen = io->buflen; if(io->buflen < io->bufsize) { if (io->timeout && !iobuf_timeout(io, 0)) return 0; rd = read(io->fd, io->buffer+io->buflen, io->bufsize-io->buflen); if(rd == (unsigned)-1) IOBUF_SET_ERROR(io); else if(rd == 0) io->flags |= IOBUF_EOF; else { io->buflen += rd; io->offset += rd; } } return io->buflen > oldlen; }
Call _exit instead of exit on assertion failure.
Call _exit instead of exit on assertion failure.
C
lgpl-2.1
bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs
ada00c025b0cc76e014407bcb7f04e5537b47abd
tools/examples/svnserve-sgid.c
tools/examples/svnserve-sgid.c
/* * Wrapper to run the svnserve process setgid. * The idea is to avoid the problem that some interpreters like bash * invoked by svnserve in hook scripts will reset the effective gid to * the real gid, nuking the effect of an ordinary setgid svnserve binary. * Sadly, to set the real gid portably, you need to be root, if only * for a moment. * Also smashes the environment to something known, so that games * can't be played to try to break the security of the hook scripts, * by setting IFS, PATH, and similar means. */ /* * Written by Perry Metzger, and placed into the public domain. */ #include <stdio.h> #include <unistd.h> #define REAL_PATH "/usr/bin/svnserve.real" char *newenv[] = { "PATH=/bin:/usr/bin", "SHELL=/bin/sh", NULL }; int main(int argc, char **argv) { if (setgid(getegid()) == -1) { perror("setgid(getegid())"); return 1; } if (seteuid(getuid()) == -1) { perror("seteuid(getuid())"); return 1; } execve(REAL_PATH, argv, newenv); perror("attempting to exec " REAL_PATH " failed"); return 1; }
Add Perry Metzger's wrapper to run the svnserve process setgid, since this can be very helpful to svn+ssh users. Quoting from the comments:
Add Perry Metzger's wrapper to run the svnserve process setgid, since this can be very helpful to svn+ssh users. Quoting from the comments: * The idea is to avoid the problem that some interpreters like bash * invoked by svnserve in hook scripts will reset the effective gid to * the real gid, nuking the effect of an ordinary setgid svnserve binary. * Sadly, to set the real gid portably, you need to be root, if only * for a moment. * Also smashes the environment to something known, so that games * can't be played to try to break the security of the hook scripts, * by setting IFS, PATH, and similar means. * tools/examples/svnserve-sgid.c: new file. git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@848920 13f79535-47bb-0310-9956-ffa450edef68
C
apache-2.0
YueLinHo/Subversion,wbond/subversion,wbond/subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion
2d8090ba343ab90bdd7292bc47beb619c95a01d8
src/Application/WebSocketServerModule/WebSocketServerModuleApi.h
src/Application/WebSocketServerModule/WebSocketServerModuleApi.h
// For conditions of distribution and use, see copyright notice in LICENSE #pragma once #if defined (_WINDOWS) #if defined(WEBSOCKET_MODULE_EXPORTS) #define WEBSOCKET_SERVER_MODULE_API __declspec(dllexport) #else #define WEBSOCKET_SERVER_MODULE_API __declspec(dllimport) #endif #else #define WEBSOCKET_MODULE_API #endif
// For conditions of distribution and use, see copyright notice in LICENSE #pragma once #if defined (_WINDOWS) #if defined(WEBSOCKET_MODULE_EXPORTS) #define WEBSOCKET_SERVER_MODULE_API __declspec(dllexport) #else #define WEBSOCKET_SERVER_MODULE_API __declspec(dllimport) #endif #else #define WEBSOCKET_SERVER_MODULE_API #endif
Correct macro spelling to fix Linux build
Correct macro spelling to fix Linux build
C
apache-2.0
pharos3d/tundra,AlphaStaxLLC/tundra,BogusCurry/tundra,pharos3d/tundra,AlphaStaxLLC/tundra,AlphaStaxLLC/tundra,AlphaStaxLLC/tundra,BogusCurry/tundra,AlphaStaxLLC/tundra,BogusCurry/tundra,realXtend/tundra,realXtend/tundra,BogusCurry/tundra,realXtend/tundra,BogusCurry/tundra,pharos3d/tundra,realXtend/tundra,realXtend/tundra,pharos3d/tundra,BogusCurry/tundra,realXtend/tundra,pharos3d/tundra,AlphaStaxLLC/tundra,pharos3d/tundra
a55f6156402a709ea15338d5cf587b4f172c67ff
libc/mbstr/mbschr.c
libc/mbstr/mbschr.c
#include <mbstr.h> #include <stdlib.h> #include "../intern.h" #ifdef __cplusplus extern "C" { #endif char* __mbschr (char* str, mbchar_t c) { if (c < 0x80) { return __strchr(str, c); } else { char buf[sizeof(mbchar_t)+1]; *((mbchar_t*)buf) = c; buf[__min(sizeof(mbchar_t),MBMAXLEN)] = '\0'; return __strstr(str, buf); } } char* mbschr (char* str, mbchar_t c) \ _WEAK_ALIAS_OF("__mbschr"); #ifdef __cplusplus } #endif
#include <mbstr.h> #include <stdlib.h> #include "../intern.h" #ifdef __cplusplus extern "C" { #endif char* __mbschr (char* str, mbchar_t c) { if (c < 0x80) { return __strchr(str, c); } else { char buf[sizeof(mbchar_t)+1]; *((mbchar_t*)buf) = c; buf[__min(sizeof(mbchar_t),(size_t)MBMAXLEN)] = '\0'; return __strstr(str, buf); } } char* mbschr (char* str, mbchar_t c) \ _WEAK_ALIAS_OF("__mbschr"); #ifdef __cplusplus } #endif
Fix compilation error, cast was missing
Fix compilation error, cast was missing
C
mit
kristapsk/reclib,kristapsk/resclib,kristapsk/resclib,kristapsk/reclib
a46108cfddd5e859264290574a47491bbcd6f5a3
firmware/echo_isr.c
firmware/echo_isr.c
// Takes in a character at a time and sends it right back out, // displaying the ASCII value on the LEDs. // Uses interrupt system instead of a blocking read. #include <avr/io.h> #include <avr/interrupt.h> #include <util/delay.h> #include "USART.h" // Single character for serial TX/RX and "byte received" flag volatile char a; volatile uint8_t newbyte; // Run when USART receives a new byte. // Reading from and writing to UDR0 trigger critical side-effects. // UDR0 *must* be read inside this ISR. // Otherwise, RXC0 will not be cleared, and another interrupt will follow. // See 20.7.3 in the datasheet. ISR(USART_RX_vect) { a = UDR0; // Assigning to an lvalue also clears RXC0 UDR0 = a; // Writes to TX shift register (echoes a back out) newbyte = 1; } int main(void) { initUSART(); // Set the RX Complete Interrupt Enable 0 bit UCSR0B |= (1 << RXCIE0); sei(); // All DDRB pins to output mode DDRB = 0xff; newbyte = 0; while (1) { // Light up PORTB in the ASCII binary representation of a if (newbyte) { PORTB = a; newbyte = 0; } } return 0; }
Use ISR for serial loopback instead of a blocking read
Use ISR for serial loopback instead of a blocking read
C
mit
andrewadare/avr-breadboarding,andrewadare/avr-breadboarding
f9f56ea22cfd81dad7c66f78e8a5b5e3965ec16e
UIforETW/Version.h
UIforETW/Version.h
#pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. const float kCurrentVersion = 1.31f;
#pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. const float kCurrentVersion = 1.32f;
Increment version number to 1.32
Increment version number to 1.32
C
apache-2.0
ariccio/UIforETW,MikeMarcin/UIforETW,google/UIforETW,google/UIforETW,google/UIforETW,mwinterb/UIforETW,ariccio/UIforETW,ariccio/UIforETW,MikeMarcin/UIforETW,ariccio/UIforETW,mwinterb/UIforETW,mwinterb/UIforETW,MikeMarcin/UIforETW,google/UIforETW
f8d56baf158ded41a738afb5f0be745b753d86c6
tests/regression/21-casts/04-neg-to-unsigned-invariant.c
tests/regression/21-casts/04-neg-to-unsigned-invariant.c
// PARAM: --enable ana.int.def_exc --enable ana.int.interval // ldv-benchmarks: u__linux-concurrency_safety__drivers---net---ethernet---amd---pcnet32.ko.c #include <assert.h> int main() { int debug_value = -1; if ((unsigned int)debug_value > 31U) assert(1); // reachable else assert(1); // NOWARN (unreachable) return 0; }
Add unsound negative int to unsigned int branch invariant test
Add unsound negative int to unsigned int branch invariant test
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
25ceb6c0fbaa0623bd2f195fd97a33955d2099e5
common/c_cpp/src/cpp/wombat/Lock.h
common/c_cpp/src/cpp/wombat/Lock.h
/* * OpenMAMA: The open middleware agnostic messaging API * Copyright (C) 2011 NYSE Technologies, 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 LockCppH__ #define LockCppH__ #include <memory> namespace Wombat { class COMMONExpDLL Lock { public: Lock (); ~Lock (); void lock (); void unlock (); private: Lock (const Lock& copy); // no copy Lock& operator= (const Lock& rhs); // no assignment struct LockImpl; std::auto_ptr <LockImpl> mImpl; }; } #endif
/* * OpenMAMA: The open middleware agnostic messaging API * Copyright (C) 2011 NYSE Technologies, 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 LockCppH__ #define LockCppH__ #include <memory> #include "wombat/wConfig.h" namespace Wombat { class COMMONExpDLL Lock { public: Lock (); ~Lock (); void lock (); void unlock (); private: Lock (const Lock& copy); // no copy Lock& operator= (const Lock& rhs); // no assignment struct LockImpl; std::auto_ptr <LockImpl> mImpl; }; } #endif
Build error when openmama patch for VS solution files caused Enterprise build fail.
Build error when openmama patch for VS solution files caused Enterprise build fail. Modification to Lock.h to correct build error when openmama patch for Microsoft Visual Studio solution file updates caused Enterprise build to fail. Signed-off-by: A Ambrose <[email protected]>
C
lgpl-2.1
dpauls/OpenMAMA,fquinner/OpenMAMA,philippreston/OpenMAMA,cloudsmith-io/openmama,philippreston/OpenMAMA,philippreston/OpenMAMA,MattMulhern/OpenMAMA,kuangtu/OpenMAMA,philippreston/OpenMAMA,vulcanft/openmama,cloudsmith-io/openmama,kuangtu/OpenMAMA,fquinner/OpenMAMA,vulcanft/openmama,philippreston/OpenMAMA,fquinner/OpenMAMA,fquinner/OpenMAMA,philippreston/OpenMAMA,vulcanft/openmama,MattMulhern/OpenMAMA,cloudsmith-io/openmama,dpauls/OpenMAMA,MattMulhern/OpenMAMA,MattMulhern/OpenMAMA,kuangtu/OpenMAMA,dpauls/OpenMAMA,vulcanft/openmama,vulcanft/openmama,dpauls/OpenMAMA,dpauls/OpenMAMA,MattMulhern/OpenMAMA,kuangtu/OpenMAMA,MattMulhern/OpenMAMA,philippreston/OpenMAMA,kuangtu/OpenMAMA,dpauls/OpenMAMA,dpauls/OpenMAMA,cloudsmith-io/openmama,kuangtu/OpenMAMA,MattMulhern/OpenMAMA,vulcanft/openmama,cloudsmith-io/openmama,kuangtu/OpenMAMA,fquinner/OpenMAMA,fquinner/OpenMAMA,cloudsmith-io/openmama,fquinner/OpenMAMA,vulcanft/openmama,cloudsmith-io/openmama
a6392ad0dff652abebd47b5c2eb0dfc08a44c31c
content/public/browser/devtools_frontend_window.h
content/public/browser/devtools_frontend_window.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 CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_WINDOW_H_ #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_WINDOW_H_ #pragma once class TabContents; namespace content { class DevToolsFrontendWindowDelegate; // Installs delegate for DevTools front-end loaded into |client_tab_contents|. void SetupDevToolsFrontendDelegate( TabContents* client_tab_contents, DevToolsFrontendWindowDelegate* delegate); } #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_WINDOW_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 CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_WINDOW_H_ #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_WINDOW_H_ #pragma once class TabContents; namespace content { class DevToolsFrontendWindowDelegate; // Installs delegate for DevTools front-end loaded into |client_tab_contents|. CONTENT_EXPORT void SetupDevToolsFrontendDelegate( TabContents* client_tab_contents, DevToolsFrontendWindowDelegate* delegate); } #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_WINDOW_H_
Add missing CONTENT_EXPORT to fix Linux shared build after r112415
Add missing CONTENT_EXPORT to fix Linux shared build after r112415 BUG=104625 TEST=None TBR=pfeldman Review URL: http://codereview.chromium.org/8763022 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@112420 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
yitian134/chromium,adobe/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,adobe/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium
ac903d665741e8cc28268da5804c891aea60c681
bluetooth/bdroid_buildcfg.h
bluetooth/bdroid_buildcfg.h
/* * Copyright 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef _BDROID_BUILDCFG_H #define _BDROID_BUILDCFG_H #define BTA_DISABLE_DELAY 100 /* in milliseconds */ #define BLE_VND_INCLUDED TRUE #define BTM_BLE_ADV_TX_POWER {-21, -15, -7, 1, 9} /* Defined if the kernel does not have support for CLOCK_BOOTTIME_ALARM */ #define KERNEL_MISSING_CLOCK_BOOTTIME_ALARM TRUE #endif
/* * Copyright 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef _BDROID_BUILDCFG_H #define _BDROID_BUILDCFG_H #define BTA_DISABLE_DELAY 100 /* in milliseconds */ #define BLE_VND_INCLUDED TRUE #define BTM_BLE_ADV_TX_POWER {-21, -15, -7, 1, 9} #endif
Revert "bluetooth: Our kernel is missing CLOCK_BOOTTIME_ALARM (alarmtimer)"
Revert "bluetooth: Our kernel is missing CLOCK_BOOTTIME_ALARM (alarmtimer)" This reverts commit 69cbe06c3c482cf78fa71b7e89c470ab83626523. Change-Id: I34af7e9f564dd88654e105ea36d4a83d15d9acad
C
apache-2.0
maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead
03ad95c6c78b235b5ef946d0e4f80f161a0a35bd
includes/consolelogger.h
includes/consolelogger.h
// Copyright 2016 Pierre Fourgeaud #ifndef PF_CONSOLELOGGER_H_ #define PF_CONSOLELOGGER_H_ #include <iostream> #include <string> #include "./iloglistener.h" #include "./Logger.h" /** * @brief The FileLogger class * * Logger that will write the ouput to the console (cerr or cout depending on log level) */ class ConsoleLogger : public ILogListener { public: ConsoleLogger() {} /** * Virtual destructor */ virtual ~ConsoleLogger() {} /** * @brief Notify Mandatory method to implement for every log listener. * Will be called everytime there is a new message to ouput it to the console. * * if iLevel Critical or Error, output to cerr, otherwise to cout * * @param iLog The message * @param iLevel The log level */ virtual void Notify(const std::string& iMsg, ELogLevel iLevel) { if (iLevel <= ELogLevel::Error) { std::cerr << iMsg; } else { std::cout << iMsg; } } }; #endif // PF_CONSOLELOGGER_H_
// Copyright 2016 Pierre Fourgeaud #ifndef PF_CONSOLELOGGER_H_ #define PF_CONSOLELOGGER_H_ #include <iostream> #include <string> #include "./iloglistener.h" #include "./logger.h" /** * @brief The FileLogger class * * Logger that will write the ouput to the console (cerr or cout depending on log level) */ class ConsoleLogger : public ILogListener { public: ConsoleLogger() {} /** * Virtual destructor */ virtual ~ConsoleLogger() {} /** * @brief Notify Mandatory method to implement for every log listener. * Will be called everytime there is a new message to ouput it to the console. * * if iLevel Critical or Error, output to cerr, otherwise to cout * * @param iLog The message * @param iLevel The log level */ virtual void Notify(const std::string& iMsg, ELogLevel iLevel) { if (iLevel <= ELogLevel::Error) { std::cerr << iMsg; } else { std::cout << iMsg; } } }; #endif // PF_CONSOLELOGGER_H_
Fix typo in include file
Fix typo in include file
C
mit
pierrefourgeaud/SimpleLogger
9271608c9af71eec13691a5da6458c99791e833c
tests/regression/01-cpa/03-loops.c
tests/regression/01-cpa/03-loops.c
#include<stdio.h> #include<assert.h> int main () { int i,j,k; i = k = 0; j = 7; while (i < 10) { i++; j = 7; k = 5; } assert(i == 10); // UNKNOWN! assert(k); // UNKNOWN! // k is currenlty 0 \sqcup 5, if we unfolded the loops it would be 5 assert(j==7); return 0; }
#include<stdio.h> #include<assert.h> int main () { int i,j,k; i = k = 0; j = 7; while (i < 10) { i++; j = 7; k = 5; } // assert(i == 10); // UNKNOWN! // Removed this assertion as it is specific to flat ints and fails as soon as intervals or octagons correctly determine this assert(k); // UNKNOWN! // k is currenlty 0 \sqcup 5, if we unfolded the loops it would be 5 assert(j==7); return 0; }
Remove assert specific to flat ints that will fail when using more poerful domain
Remove assert specific to flat ints that will fail when using more poerful domain
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
c9038d2b29279027889021bc952c34165e36e306
tests/wocky-xmpp-connection-test.c
tests/wocky-xmpp-connection-test.c
#include <stdio.h> #include <unistd.h> #include <glib.h> #include <wocky/wocky-xmpp-connection.h> #include <wocky/wocky-transport.h> #include "test-transport.h" #include <check.h> START_TEST (test_instantiation) { WockyXmppConnection *connection; TestTransport *transport; g_type_init(); transport = test_transport_new(NULL, NULL); connection = wocky_xmpp_connection_new(WOCKY_TRANSPORT(transport)); fail_if (connection == NULL); connection = wocky_xmpp_connection_new(NULL); fail_if (connection == NULL); } END_TEST TCase * make_wocky_xmpp_connection_tcase (void) { TCase *tc = tcase_create ("XMPP Connection"); tcase_add_test (tc, test_instantiation); return tc; }
Add a testcase for WockyXmppConnection and check its istantiation
Add a testcase for WockyXmppConnection and check its istantiation 20070613140235-f974e-38a23919dc403a05ad6852760c6b13bd9ad2e6f5.gz
C
lgpl-2.1
noonien-d/wocky,noonien-d/wocky,noonien-d/wocky,freedesktop-unofficial-mirror/wocky,freedesktop-unofficial-mirror/wocky,freedesktop-unofficial-mirror/wocky
05a7836593e5b1100dba989a5b0045fed5a38dac
io/pipe_pair_simple.h
io/pipe_pair_simple.h
#ifndef IO_PIPE_PAIR_SIMPLE_H #define IO_PIPE_PAIR_SIMPLE_H #include <io/pipe_simple.h> #include <io/pipe_simple_wrapper.h> class PipePairSimple : public PipePair { PipeSimpleWrapper<PipePairSimple> *incoming_pipe_; PipeSimpleWrapper<PipePairSimple> *outgoing_pipe_; protected: PipePairSimple(void) : incoming_pipe_(NULL), outgoing_pipe_(NULL) { } public: virtual ~PipePairSimple() { if (incoming_pipe_ != NULL) { delete incoming_pipe_; incoming_pipe_ = NULL; } if (outgoing_pipe_ != NULL) { delete outgoing_pipe_; outgoing_pipe_ = NULL; } } protected: virtual bool incoming_process(Buffer *, Buffer *) = 0; virtual bool outgoing_process(Buffer *, Buffer *) = 0; public: Pipe *get_incoming(void) { ASSERT(incoming_pipe_ == NULL); incoming_pipe_ = new PipeSimpleWrapper<PipePairSimple>(this, &PipePairSimple::incoming_process); return (incoming_pipe_); } Pipe *get_outgoing(void) { ASSERT(outgoing_pipe_ == NULL); outgoing_pipe_ = new PipeSimpleWrapper<PipePairSimple>(this, &PipePairSimple::outgoing_process); return (outgoing_pipe_); } }; #endif /* !IO_PIPE_PAIR_SIMPLE_H */
Add PipePairSimple which allows a user to simply construct a single object which implements a PipePair.
Add PipePairSimple which allows a user to simply construct a single object which implements a PipePair.
C
bsd-2-clause
wanproxy/wanproxy,wanproxy/wanproxy,wanproxy/wanproxy
ad32eb7c376d6264b742f7686fffca48c06eb2c5
Source/Main/XcodeEditor.h
Source/Main/XcodeEditor.h
//////////////////////////////////////////////////////////////////////////////// // // JASPER BLUES // Copyright 2012 Jasper Blues // All Rights Reserved. // // NOTICE: Jasper Blues permits you to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // //////////////////////////////////////////////////////////////////////////////// #import "XCAbstractDefinition.h" #import "XCGroup.h" #import "XCClassDefinition.h" #import "XCFileOperationQueue.h" #import "XCFrameworkDefinition.h" #import "XCProject.h" #import "XCSourceFile.h" #import "XCSourceFileDefinition.h" #import "XCSubProjectDefinition.h" #import "XCTarget.h" #import "XCEnumUtils.h" #import "XCXibDefinition.h"
//////////////////////////////////////////////////////////////////////////////// // // JASPER BLUES // Copyright 2012 Jasper Blues // All Rights Reserved. // // NOTICE: Jasper Blues permits you to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // //////////////////////////////////////////////////////////////////////////////// #import "XCAbstractDefinition.h" #import "XCGroup.h" #import "XCClassDefinition.h" #import "XCFileOperationQueue.h" #import "XCFrameworkDefinition.h" #import "XCProject.h" #import "XCSourceFile.h" #import "XCSourceFileDefinition.h" #import "XCSubProjectDefinition.h" #import "XCTarget.h" #import "XCXibDefinition.h"
Remove item from umbrella header.
Remove item from umbrella header.
C
apache-2.0
cezheng/XcodeEditor,service2media/XcodeEditor,appsquickly/XcodeEditor,khanhtbh/XcodeEditor,cezheng/XcodeEditor,khanhtbh/XcodeEditor,JoelGerboreLaser/XcodeEditor,appsquickly/XcodeEditor,appsquickly/XcodeEditor,iosdevzone/XcodeEditor,JoelGerboreLaser/XcodeEditor,andyvand/XcodeEditor
9d7ae5ba4e163fcc593f75d8f2c65ff09cec3d9a
libaacs/src/util/macro.h
libaacs/src/util/macro.h
#ifndef MACRO_H_ #define MACRO_H_ #include <stdio.h> #define HEX_PRINT(X,Y) { int zz; for(zz = 0; zz < Y; zz++) fprintf(stderr, "%02X", X[zz]); fprintf(stderr, "\n"); } #define MKINT_BE16(X) ( (X)[0] << 8 | (X)[1] ) #define MKINT_BE24(X) ( (X)[0] << 16 | (X)[1] << 8 | (X)[2] ) #define MKINT_BE32(X) ( (X)[0] << 24 | (X)[1] << 16 | (X)[2] << 8 | (X)[3] ) #define X_FREE(X) do { if (X) free(X); X = NULL; } while(0) #endif /* MACRO_H_ */
Include required header in source
Include required header in source
C
lgpl-2.1
rraptorr/libaacs,rraptorr/libaacs,mwgoldsmith/aacs,ShiftMediaProject/libaacs,mwgoldsmith/aacs,zxlooong/libaacs,zxlooong/libaacs,ShiftMediaProject/libaacs
0fda9e25449c322478d38e3b6ce6f3613d66fa68
ETA-SDK/API/Model/ETA_ModelObject.h
ETA-SDK/API/Model/ETA_ModelObject.h
// // ETA_ModelObject.h // ETA-SDK // // Created by Laurie Hufford on 7/11/13. // Copyright (c) 2013 eTilbudsavis. All rights reserved. // #import "Mantle.h" #import "NSValueTransformer+ETAPredefinedValueTransformers.h" @interface ETA_ModelObject : MTLModel <MTLJSONSerializing> // setting either uuid or ern will keep the other updated @property (nonatomic, readwrite, strong) NSString* uuid; // will always be lowercase, no matter the input case @property (nonatomic, readwrite, strong) NSString* ern; + (NSString*) APIEndpoint; // base class returns nil. + (NSString*) ernForItemID:(NSString*)itemID; //uses the API Endpoint to generate the ern + (instancetype) objectFromJSONDictionary:(NSDictionary*)JSONDictionary; - (NSDictionary*) JSONDictionary; + (NSArray*) objectsFromJSONArray:(NSArray*)JSONArray; @end
// // ETA_ModelObject.h // ETA-SDK // // Created by Laurie Hufford on 7/11/13. // Copyright (c) 2013 eTilbudsavis. All rights reserved. // #import "Mantle.h" #import "NSValueTransformer+ETAPredefinedValueTransformers.h" @interface ETA_ModelObject : MTLModel <MTLJSONSerializing> // setting either uuid or ern will keep the other updated @property (nonatomic, readwrite, strong, nonnull) NSString* uuid; // will always be lowercase, no matter the input case @property (nonatomic, readwrite, strong, nonnull) NSString* ern; + (nullable NSString*) APIEndpoint; // base class returns nil. + (nullable NSString*) ernForItemID:(nullable NSString*)itemID; //uses the API Endpoint to generate the ern + (nullable instancetype) objectFromJSONDictionary:(nullable NSDictionary*)JSONDictionary; - (nullable NSDictionary*) JSONDictionary; + (nullable NSArray*) objectsFromJSONArray:(nullable NSArray*)JSONArray; @end
Add nullability info to root ModelObject
Add nullability info to root ModelObject
C
mit
shopgun/shopgun-ios-sdk,shopgun/shopgun-ios-sdk,eTilbudsavis/native-ios-eta-sdk
dd9603957944e85b3caa6c31fb4bf5cf39af59c5
bibdesk/BDSKOAIGroupServer.h
bibdesk/BDSKOAIGroupServer.h
// // BDSKOAIGroupServer.h // Bibdesk // // Created by Christiaan Hofman on 1/1/07. // Copyright 2007 __MyCompanyName__. All rights reserved. // #import <Cocoa/Cocoa.h> #import "BDSKSearchGroup.h" @class BDSKServerInfo; @interface BDSKOAIGroupServer : NSObject <BDSKSearchGroupServer> { BDSKSearchGroup *group; BDSKServerInfo *serverInfo; NSString *searchTerm; NSString *resumptionToken; NSArray *sets; NSString *filePath; NSURLDownload *URLDownload; BOOL failedDownload; BOOL isRetrieving; BOOL needsReset; int availableResults; int fetchedResults; } - (void)setServerInfo:(BDSKServerInfo *)info; - (BDSKServerInfo *)serverInfo; - (void)setSearchTerm:(NSString *)string; - (NSString *)searchTerm; - (void)setSets:(NSArray *)newSets; - (NSArray *)sets; - (void)setResumptionToken:(NSString *)newResumptionToken; - (NSString *)resumptionToken; - (void)resetSearch; - (void)fetchSets; - (void)fetch; - (void)startDownloadFromURL:(NSURL *)theURL; @end
Add new header file. (or: xcode is stupid)
Add new header file. (or: xcode is stupid) git-svn-id: cb3fc60f0f557b927b8032d8a94e869b6f9f230b@336 0fceea05-a30d-0410-8a8b-80ef821fb0a1
C
bsd-3-clause
jasongrout/skim,camillobruni/skim,camillobruni/skim,camillobruni/skim,jasongrout/skim,camillobruni/skim
a776e39416cc4580b5a1688c3e44258888955996
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.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
/* * 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.18-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 driver version to 8.07.00.18-k
qla2xxx: Update driver version to 8.07.00.18-k Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: James Bottomley <[email protected]>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
6db46e880792b7133aa6f55c2b90eaa430312ae2
REMarkerClustererExample/REMarkerClustererExample/DemoViewController.h
REMarkerClustererExample/REMarkerClustererExample/DemoViewController.h
// // DemoViewController.h // REMarkerClustererExample // // Created by Roman Efimov on 7/9/12. // Copyright (c) 2012 Roman Efimov. All rights reserved. // #import <UIKit/UIKit.h> #import "REMarkerClusterer.h" @interface DemoViewController : UIViewController <MKMapViewDelegate> @property (strong, readonly, nonatomic) MKMapView *mapView; @property (strong, readonly, nonatomic) REMarkerClusterer *clusterer; @end
// // DemoViewController.h // REMarkerClustererExample // // Created by Roman Efimov on 7/9/12. // Copyright (c) 2012 Roman Efimov. All rights reserved. // #import <UIKit/UIKit.h> #import "REMarkerClusterer.h" @interface DemoViewController : UIViewController <REMarkerClusterDelegate> @property (strong, readonly, nonatomic) MKMapView *mapView; @property (strong, readonly, nonatomic) REMarkerClusterer *clusterer; @end
Rename delegate from MKMapViewDelegate to REMarkerClusterDelegate
Rename delegate from MKMapViewDelegate to REMarkerClusterDelegate
C
mit
romaonthego/REMarkerClusterer,sophallyyi/REMarkerClusterer,takeshineshiro/REMarkerClusterer
c0fdd6bb7488ab9ea1ba2ae326e7e42072d6dc33
sdk/iOS/src/WindowsAzureMobileServices.h
sdk/iOS/src/WindowsAzureMobileServices.h
// ---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // ---------------------------------------------------------------------------- #ifndef WindowsAzureMobileServices_WindowsAzureMobileServices_h #define WindowsAzureMobileServices_WindowsAzureMobileServices_h #import "MSClient.h" #import "MSTable.h" #import "MSQuery.h" #import "MSUser.h" #import "MSFilter.h" #import "MSError.h" #import "MSLoginController.h" #import "MSPush.h" #define WindowsAzureMobileServicesSdkMajorVersion 1 #define WindowsAzureMobileServicesSdkMinorVersion 1 #define WindowsAzureMobileServicesSdkBuildVersion 0 #endif
// ---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // ---------------------------------------------------------------------------- #ifndef WindowsAzureMobileServices_WindowsAzureMobileServices_h #define WindowsAzureMobileServices_WindowsAzureMobileServices_h #import "MSClient.h" #import "MSTable.h" #import "MSQuery.h" #import "MSUser.h" #import "MSFilter.h" #import "MSError.h" #import "MSLoginController.h" #import "MSPush.h" #define WindowsAzureMobileServicesSdkMajorVersion 1 #define WindowsAzureMobileServicesSdkMinorVersion 2 #define WindowsAzureMobileServicesSdkBuildVersion 0 #endif
Update iOS SDK Minor Version
Update iOS SDK Minor Version
C
apache-2.0
cmatskas/azure-mobile-services,jeremy50dj/azure-mobile-services,phvannor/azure-mobile-services,daemun/azure-mobile-services,mauricionr/azure-mobile-services,intellitour/azure-mobile-services,Azure/azure-mobile-services,gb92/azure-mobile-services,marianosz/azure-mobile-services,Azure/azure-mobile-services,Redth/azure-mobile-services,Redth/azure-mobile-services,marianosz/azure-mobile-services,cmatskas/azure-mobile-services,Redth/azure-mobile-services,apuyana/azure-mobile-services,Reminouche/azure-mobile-services,pragnagopa/azure-mobile-services,soninaren/azure-mobile-services,paulbatum/azure-mobile-services,mauricionr/azure-mobile-services,phvannor/azure-mobile-services,Reminouche/azure-mobile-services,yuqiqian/azure-mobile-services,Redth/azure-mobile-services,intellitour/azure-mobile-services,soninaren/azure-mobile-services,daemun/azure-mobile-services,jeremy50dj/azure-mobile-services,pragnagopa/azure-mobile-services,shrishrirang/azure-mobile-services,ysxu/azure-mobile-services,dcristoloveanu/azure-mobile-services,apuyana/azure-mobile-services,marianosz/azure-mobile-services,soninaren/azure-mobile-services,jeremy50dj/azure-mobile-services,ysxu/azure-mobile-services,paulbatum/azure-mobile-services,paulbatum/azure-mobile-services,apuyana/azure-mobile-services,cmatskas/azure-mobile-services,mauricionr/azure-mobile-services,daemun/azure-mobile-services,intellitour/azure-mobile-services,Azure/azure-mobile-services,YOTOV-LIMITED/azure-mobile-services,jeremy50dj/azure-mobile-services,baumatron/azure-mobile-services-baumatron,fabiocav/azure-mobile-services,YOTOV-LIMITED/azure-mobile-services,mauricionr/azure-mobile-services,soninaren/azure-mobile-services,mauricionr/azure-mobile-services,marianosz/azure-mobile-services,marianosz/azure-mobile-services,Redth/azure-mobile-services,baumatron/azure-mobile-services-baumatron,phvannor/azure-mobile-services,ysxu/azure-mobile-services,intellitour/azure-mobile-services,shrishrirang/azure-mobile-services,ysxu/azure-mobile-services,erichedstrom/azure-mobile-services,baumatron/azure-mobile-services-baumatron,daemun/azure-mobile-services,erichedstrom/azure-mobile-services,Reminouche/azure-mobile-services,fabiocav/azure-mobile-services,dhei/azure-mobile-services,dhei/azure-mobile-services,ysxu/azure-mobile-services,dcristoloveanu/azure-mobile-services,cmatskas/azure-mobile-services,fabiocav/azure-mobile-services,fabiocav/azure-mobile-services,Azure/azure-mobile-services,gb92/azure-mobile-services,daemun/azure-mobile-services,baumatron/azure-mobile-services-baumatron,erichedstrom/azure-mobile-services,baumatron/azure-mobile-services-baumatron,dhei/azure-mobile-services,cmatskas/azure-mobile-services,YOTOV-LIMITED/azure-mobile-services,dcristoloveanu/azure-mobile-services,yuqiqian/azure-mobile-services,yuqiqian/azure-mobile-services,Reminouche/azure-mobile-services,YOTOV-LIMITED/azure-mobile-services,fabiocav/azure-mobile-services,baumatron/azure-mobile-services-baumatron,soninaren/azure-mobile-services,apuyana/azure-mobile-services,intellitour/azure-mobile-services,Redth/azure-mobile-services,dcristoloveanu/azure-mobile-services,pragnagopa/azure-mobile-services,baumatron/azure-mobile-services-baumatron,pragnagopa/azure-mobile-services,apuyana/azure-mobile-services,Reminouche/azure-mobile-services,paulbatum/azure-mobile-services,daemun/azure-mobile-services,intellitour/azure-mobile-services,fabiocav/azure-mobile-services,marianosz/azure-mobile-services,shrishrirang/azure-mobile-services,Reminouche/azure-mobile-services,pragnagopa/azure-mobile-services,gb92/azure-mobile-services,gb92/azure-mobile-services,cmatskas/azure-mobile-services,shrishrirang/azure-mobile-services,gb92/azure-mobile-services,ysxu/azure-mobile-services,phvannor/azure-mobile-services,erichedstrom/azure-mobile-services,jeremy50dj/azure-mobile-services,soninaren/azure-mobile-services,phvannor/azure-mobile-services,shrishrirang/azure-mobile-services,Azure/azure-mobile-services,YOTOV-LIMITED/azure-mobile-services,shrishrirang/azure-mobile-services,phvannor/azure-mobile-services,pragnagopa/azure-mobile-services,dcristoloveanu/azure-mobile-services,yuqiqian/azure-mobile-services,erichedstrom/azure-mobile-services,erichedstrom/azure-mobile-services,yuqiqian/azure-mobile-services,yuqiqian/azure-mobile-services,gb92/azure-mobile-services,apuyana/azure-mobile-services,YOTOV-LIMITED/azure-mobile-services,paulbatum/azure-mobile-services,daemun/azure-mobile-services,jeremy50dj/azure-mobile-services,dhei/azure-mobile-services,paulbatum/azure-mobile-services,cmatskas/azure-mobile-services,dcristoloveanu/azure-mobile-services,Azure/azure-mobile-services,dhei/azure-mobile-services,mauricionr/azure-mobile-services,marianosz/azure-mobile-services
97c8ae2e5624cdd8576a9acc9b70a9cb7cb47927
tests/strings_test.c
tests/strings_test.c
#include <stdio.h> #include <stdlib.h> /* for free */ #include <string.h> /* for strcmp */ #include <strings.h> #include <platform/cbassert.h> static void test_asprintf(void) { char *result = 0; (void)asprintf(&result, "test 1"); cb_assert(strcmp(result, "test 1") == 0); free(result); (void)asprintf(&result, "test %d", 2); cb_assert(strcmp(result, "test 2") == 0); free(result); (void)asprintf(&result, "%c%c%c%c %d", 't', 'e', 's', 't', 3); cb_assert(strcmp(result, "test 3") == 0); free(result); } int main(void) { test_asprintf(); return 0; }
#include <stdio.h> #include <stdlib.h> /* for free */ #include <string.h> /* for strcmp */ #include <strings.h> #include <platform/cbassert.h> static void test_asprintf(void) { char *result = 0; cb_assert(asprintf(&result, "test 1") > 0); cb_assert(strcmp(result, "test 1") == 0); free(result); cb_assert(asprintf(&result, "test %d", 2) > 0); cb_assert(strcmp(result, "test 2") == 0); free(result); cb_assert(asprintf(&result, "%c%c%c%c %d", 't', 'e', 's', 't', 3) > 0); cb_assert(strcmp(result, "test 3") == 0); free(result); } int main(void) { test_asprintf(); return 0; }
Check for return value for asprintf
Check for return value for asprintf Change-Id: Ib163468aac1a5e52cef28c59b55be2287dc4ba43 Reviewed-on: http://review.couchbase.org/43023 Reviewed-by: Trond Norbye <[email protected]> Tested-by: Trond Norbye <[email protected]>
C
apache-2.0
vmx/platform,vmx/platform
078841c923075f545c8933b7e957e3f8d5ca26e2
src/clientversion.h
src/clientversion.h
#ifndef CLIENTVERSION_H #define CLIENTVERSION_H // // client versioning and copyright year // // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 8 #define CLIENT_VERSION_REVISION 8 #define CLIENT_VERSION_BUILD 0 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true // Copyright year (2009-this) // Todo: update this when changing our copyright comments in the source #define COPYRIGHT_YEAR 2021 // Converts the parameter X to a string after macro replacement on X has been performed. // Don't merge these into one macro! #define STRINGIZE(X) DO_STRINGIZE(X) #define DO_STRINGIZE(X) #X #endif // CLIENTVERSION_H
#ifndef CLIENTVERSION_H #define CLIENTVERSION_H // // client versioning and copyright year // // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 8 #define CLIENT_VERSION_REVISION 9 #define CLIENT_VERSION_BUILD 0 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true // Copyright year (2009-this) // Todo: update this when changing our copyright comments in the source #define COPYRIGHT_YEAR 2021 // Converts the parameter X to a string after macro replacement on X has been performed. // Don't merge these into one macro! #define STRINGIZE(X) DO_STRINGIZE(X) #define DO_STRINGIZE(X) #X #endif // CLIENTVERSION_H
Mark Devcoin release version 0.8.9.0.
Mark Devcoin release version 0.8.9.0.
C
mit
coinzen/devcoin,coinzen/devcoin,coinzen/devcoin,coinzen/devcoin,coinzen/devcoin,coinzen/devcoin,coinzen/devcoin,coinzen/devcoin
656ff74c7d951712cba7d032c2d0a4d5119aa952
src/lib/mac/mac.h
src/lib/mac/mac.h
/* * Base class for message authentiction codes * (C) 1999-2007 Jack Lloyd * * Botan is released under the Simplified BSD License (see license.txt) */ #ifndef BOTAN_MESSAGE_AUTH_CODE_BASE_H__ #define BOTAN_MESSAGE_AUTH_CODE_BASE_H__ #include <botan/buf_comp.h> #include <botan/sym_algo.h> #include <botan/scan_name.h> #include <string> namespace Botan { /** * This class represents Message Authentication Code (MAC) objects. */ class BOTAN_DLL MessageAuthenticationCode : public Buffered_Computation, public SymmetricAlgorithm { public: /** * Verify a MAC. * @param in the MAC to verify as a byte array * @param length the length of param in * @return true if the MAC is valid, false otherwise */ virtual bool verify_mac(const byte in[], size_t length); /** * Get a new object representing the same algorithm as *this */ virtual MessageAuthenticationCode* clone() const = 0; /** * Get the name of this algorithm. * @return name of this algorithm */ virtual std::string name() const = 0; typedef SCAN_Name Spec; }; } #endif
/* * Base class for message authentiction codes * (C) 1999-2007 Jack Lloyd * * Botan is released under the Simplified BSD License (see license.txt) */ #ifndef BOTAN_MESSAGE_AUTH_CODE_BASE_H__ #define BOTAN_MESSAGE_AUTH_CODE_BASE_H__ #include <botan/buf_comp.h> #include <botan/sym_algo.h> #include <botan/scan_name.h> #include <string> namespace Botan { /** * This class represents Message Authentication Code (MAC) objects. */ class BOTAN_DLL MessageAuthenticationCode : public Buffered_Computation, public SymmetricAlgorithm { public: /** * Verify a MAC. * @param in the MAC to verify as a byte array * @param length the length of param in * @return true if the MAC is valid, false otherwise */ virtual bool verify_mac(const byte in[], size_t length); /** * Get a new object representing the same algorithm as *this */ virtual MessageAuthenticationCode* clone() const = 0; typedef SCAN_Name Spec; }; } #endif
Remove duplicate definition of MessageAuthenticationCode::name()
Remove duplicate definition of MessageAuthenticationCode::name() The original definition is in the base class SymmetricAlgorithm.
C
bsd-2-clause
randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,randombit/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan
87abaffc4ee3c5a694657821e55d66f7520e66cd
src/shake.h
src/shake.h
#ifndef _SHAKE_H_ #define _SHAKE_H_ #include "shake_private.h" struct shakeDev; /* libShake functions */ int shakeInit(); void shakeQuit(); void shakeListDevices(); int shakeNumOfDevices(); shakeDev *shakeOpen(unsigned int id); void shakeClose(shakeDev *dev); int shakeQuery(shakeDev *dev); void shakeSetGain(shakeDev *dev, int gain); void shakeInitEffect(shakeEffect *effect, shakeEffectType type); int shakeUploadEffect(shakeDev *dev, shakeEffect effect); void shakeEraseEffect(shakeDev *dev, int id); void shakePlay(shakeDev *dev, int id); void shakeStop(shakeDev *dev, int id); #endif /* _SHAKE_H_ */
#ifndef _SHAKE_H_ #define _SHAKE_H_ #ifdef __cplusplus extern "C" { #endif #include "shake_private.h" struct shakeDev; /* libShake functions */ int shakeInit(); void shakeQuit(); void shakeListDevices(); int shakeNumOfDevices(); shakeDev *shakeOpen(unsigned int id); void shakeClose(shakeDev *dev); int shakeQuery(shakeDev *dev); void shakeSetGain(shakeDev *dev, int gain); void shakeInitEffect(shakeEffect *effect, shakeEffectType type); int shakeUploadEffect(shakeDev *dev, shakeEffect effect); void shakeEraseEffect(shakeDev *dev, int id); void shakePlay(shakeDev *dev, int id); void shakeStop(shakeDev *dev, int id); #ifdef __cplusplus } #endif #endif /* _SHAKE_H_ */
Use C calling convention when header is included by C++ code
Use C calling convention when header is included by C++ code
C
mit
zear/libShake,ShadowApex/libShake,ShadowApex/libShake,zear/libShake
1fe9573e58a5a3a49edb9dc051532ac98d7d36f4
ADAL.c
ADAL.c
#! /usr/bin/tcc -run #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct slot { ssize_t size; char *row; } slot; slot line; slot *text; char *ptr; int main(void) { ptr = "this is my story"; line.row = ptr; line.size = strlen(ptr); text = malloc(10*sizeof(slot)); text[0] = line; printf("text[0].row = %s\n",text[0].row); ptr = "this is my song"; line.row = ptr; line.size = strlen(ptr); text[1] = line; printf("text[1].row = %s\n",text[1].row); printf("text[0].row = %s\n",text[0].row); ptr = "tell me your song"; line.row = ptr; line.size = strlen(ptr); text[3] = line; printf("text[3].row = %s\n",text[3].row); return 0; }
#! /usr/bin/tcc -run #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct slot { ssize_t size; char *row; } slot; slot line; slot *text; slot *old; slot *new; char *ptr; int main(void) { text = malloc(10*sizeof(slot)); old = malloc(10*sizeof(slot)); new = malloc(10*sizeof(slot)); ptr = "this is my story"; line.row = ptr; line.size = strlen(ptr); text[0] = line; ptr = "this is my song"; line.row = ptr; line.size = strlen(ptr); text[1] = line; ptr = "tell me your song"; line.row = ptr; line.size = strlen(ptr); text[3] = line; printf("text[3].row = %s\n",text[3].row); old = text; int j; for (j = 0; j < 10; j++) {old[j] = text[j];} printf("old[1].row = %s\n",old[1].row); printf("old[3].row = %s\n",old[3].row); slot newline; ptr = "hello world"; newline.row = ptr; newline.size = strlen(ptr); for (j = 0; j < 10; j++) {if (j != 3) {old[j] = text[j];} else {old[j] = newline;} } printf("\n"); printf("old[3].row = %s\n",old[3].row); printf("old[1].row = %s\n",old[1].row); return 0; }
Add replacement functionality following initialization segment
Add replacement functionality following initialization segment
C
bsd-2-clause
eingaeph/pip.imbue.hood,eingaeph/pip.imbue.hood
8666971da6aad40e2a668c4ce10fc44368f53702
src/chemkit/point3.h
src/chemkit/point3.h
/****************************************************************************** ** ** Copyright (C) 2009-2011 Kyle Lutz <[email protected]> ** ** This file is part of chemkit. For more information see ** <http://www.chemkit.org>. ** ** chemkit 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 3 of the License, or ** (at your option) any later version. ** ** chemkit 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 chemkit. If not, see <http://www.gnu.org/licenses/>. ** ******************************************************************************/ #ifndef CHEMKIT_POINT3_H #define CHEMKIT_POINT3_H #include "chemkit.h" #include "genericpoint.h" namespace chemkit { /// A three-dimensional point. typedef GenericPoint<Float> Point3; typedef GenericPoint<float> Point3f; typedef GenericPoint<double> Point3d; } // end chemkit namespace #endif // CHEMKIT_POINT3_H
/****************************************************************************** ** ** Copyright (C) 2009-2011 Kyle Lutz <[email protected]> ** ** This file is part of chemkit. For more information see ** <http://www.chemkit.org>. ** ** chemkit 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 3 of the License, or ** (at your option) any later version. ** ** chemkit 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 chemkit. If not, see <http://www.gnu.org/licenses/>. ** ******************************************************************************/ #ifndef CHEMKIT_POINT3_H #define CHEMKIT_POINT3_H #include "chemkit.h" #include "genericpoint.h" namespace chemkit { /// A three-dimensional point. typedef GenericPoint<Float> Point3; /// A three-dimensional point containing \c float values. typedef GenericPoint<float> Point3f; /// A three-dimensional point containing \c double values. typedef GenericPoint<double> Point3d; } // end chemkit namespace #endif // CHEMKIT_POINT3_H
Add documentation to Point3 typedefs
Add documentation to Point3 typedefs This adds documentation for the Point3f and Point3d typedefs.
C
bsd-3-clause
kylelutz/chemkit,kylelutz/chemkit,kylelutz/chemkit,kylelutz/chemkit
b654d10d3289c45b1fb702378bd4b96afb11c998
libpthread/nptl/sysdeps/unix/sysv/linux/or1k/createthread.c
libpthread/nptl/sysdeps/unix/sysv/linux/or1k/createthread.c
/* Copyright (C) 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 the GNU C Library; see the file COPYING.LIB. If not, see <http://www.gnu.org/licenses/>.  */ /* Value passed to 'clone' for initialization of the thread register. */ #define TLS_VALUE (pd + 1) /* Get the real implementation. */ #include <sysdeps/pthread/createthread.c>
/* Copyright (C) 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 the GNU C Library; see the file COPYING.LIB. If not, see <http://www.gnu.org/licenses/>.  */ /* Value passed to 'clone' for initialization of the thread register. */ #define TLS_VALUE ((void *) (pd) \ + TLS_PRE_TCB_SIZE + TLS_INIT_TCB_SIZE) /* Get the real implementation. */ #include <sysdeps/pthread/createthread.c>
Fix tls value passed during clone
or1k: Fix tls value passed during clone From or1k-glibc from blueCmd, his commit "Fix TLS, removed too much in rebase". Signed-off-by: Stafford Horne <[email protected]>
C
lgpl-2.1
wbx-github/uclibc-ng,wbx-github/uclibc-ng,kraj/uclibc-ng,kraj/uclibc-ng,wbx-github/uclibc-ng,kraj/uclibc-ng,kraj/uclibc-ng,wbx-github/uclibc-ng
fa36679e7d19880c54a222262e6cbd8a46b845cc
src/chicken-o-clock.c
src/chicken-o-clock.c
#include <pebble.h> static void init(){ } static void deinit(){ } int main(void){ init(); app_event_loop(); deinit(); }
#include <pebble.h> static Window *main_window; static void main_window_load(){ } static void main_window_unload(){ } static void init(){ main_window = window_create(); window_set_window_handlers(main_window, (WindowHandlers) { .load = main_window_load, .unload = main_window_unload }); window_stack_push(main_window, true); } static void deinit(){ window_destroy(main_window); } int main(void){ init(); app_event_loop(); deinit(); }
Create an initial blank window
Create an initial blank window
C
mit
dvberkel/chicken-o-clock,dvberkel/chicken-o-clock
4a3104b785f113778fd8d1dcade763b67235c4c9
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
Lusito/premake,annulen/premake,Lusito/premake,warrenseine/premake,Lusito/premake,annulen/premake,warrenseine/premake,warrenseine/premake,Lusito/premake,annulen/premake,annulen/premake
bbda514efc294e9c1235f7dbd3f8aa246c711f87
server/src/apache/analyzer/detail/session_length.h
server/src/apache/analyzer/detail/session_length.h
/* * Copyright 2016 Adam Chyła, [email protected] * All rights reserved. Distributed under the terms of the MIT License. */ #ifndef SRC_APACHE_ANALYZER_DETAIL_SESSION_LENGTH_H #define SRC_APACHE_ANALYZER_DETAIL_SESSION_LENGTH_H namespace apache { namespace analyzer { namespace detail { constexpr int SESSION_LENGTH = 3 * 60; } } } #endif /* SRC_APACHE_ANALYZER_DETAIL_SESSION_LENGTH_H */
/* * Copyright 2016 Adam Chyła, [email protected] * All rights reserved. Distributed under the terms of the MIT License. */ #ifndef SRC_APACHE_ANALYZER_DETAIL_SESSION_LENGTH_H #define SRC_APACHE_ANALYZER_DETAIL_SESSION_LENGTH_H namespace apache { namespace analyzer { namespace detail { constexpr int SESSION_LENGTH = 60; } } } #endif /* SRC_APACHE_ANALYZER_DETAIL_SESSION_LENGTH_H */
Change session length to 60s
Change session length to 60s
C
mit
chyla/pat-lms,chyla/pat-lms,chyla/slas,chyla/pat-lms,chyla/pat-lms,chyla/slas,chyla/slas,chyla/slas,chyla/pat-lms,chyla/pat-lms,chyla/slas,chyla/pat-lms,chyla/slas,chyla/slas
8a397aa96cb515c02e73e69fb30ffbe546f366d0
main.c
main.c
#include <stdio.h> #include <ncurses.h> int main() { // inicializa o ncurses initscr(); // printa para o buffer do ncurses, note que nao foi "renderizado" ainda; printw("Hello World!"); // manda para o console, "print real" refresh(); // espera pelo input to usuario getch(); // para o ncurses endwin(); return 0; }
Add hello world ncurses to augusto/c/trabalhos
Add hello world ncurses to augusto/c/trabalhos
C
mit
MtMercer/ncurses-space-invaders
31c08cd7045eef9e07b47b95c5aad262a91c6a2d
test/testquazip.h
test/testquazip.h
#ifndef QUAZIP_TEST_QUAZIP_H #define QUAZIP_TEST_QUAZIP_H #include <QObject> class TestQuaZip: public QObject { Q_OBJECT private slots: void getFileList_data(); void getFileList(); void getZip(); }; #endif // QUAZIP_TEST_QUAZIP_H
#ifndef QUAZIP_TEST_QUAZIP_H #define QUAZIP_TEST_QUAZIP_H #include <QObject> class TestQuaZip: public QObject { Q_OBJECT private slots: void getFileList_data(); void getFileList(); }; #endif // QUAZIP_TEST_QUAZIP_H
Remove getZip() which got there by mistake
Remove getZip() which got there by mistake git-svn-id: edbdc1cf2cca1c18f0f99391097ecab15c7e2ce6@113 099aeb50-083e-4d2c-9476-aff1b66fa4c7
C
lgpl-2.1
xhochy/quazip-qt5port,xhochy/quazip-qt5port,xhochy/quazip-qt5port
be4ff378b65a1d61189adac411994f4db2819b4d
src/qt-ui/basicui.h
src/qt-ui/basicui.h
#ifndef BASICUI_H_ #define BASICUI_H_ #include <QMainWindow> class MainWidget; class Workspace; class BasicUi: public QMainWindow { Q_OBJECT public: BasicUi(QWidget *parent = 0); void setWorkspace(Workspace *); private: MainWidget *mainWidget; // QGridLayout *layout; // QPushButton *editModeButton; // EditWidget *editWidget; // PlayWidget *playWidget; // bool editMode; // Workspace *wsp; // Controller *controller; }; #endif
#ifndef BASICUI_H_ #define BASICUI_H_ #include <QMainWindow> class MainWidget; class Workspace; class BasicUi: public QMainWindow { Q_OBJECT public: BasicUi(QWidget *parent = 0); void setWorkspace(Workspace *); ~BasicUi(){ if(NULL != mainWidget) delete mainWidget; } private: MainWidget *mainWidget; // QGridLayout *layout; // QPushButton *editModeButton; // EditWidget *editWidget; // PlayWidget *playWidget; // bool editMode; // Workspace *wsp; // Controller *controller; }; #endif
Delete main widget in BasicUi
Delete main widget in BasicUi
C
apache-2.0
jbruggem/jingles-impro,jbruggem/jingles-impro,jbruggem/jingles-impro
622bfc8421b63660e392f8876470e71171fedb67
test/Driver/hello.c
test/Driver/hello.c
// RUN: clang-driver -ccc-echo -o %t %s &> %t.log && // Make sure we used clang. // RUN: grep 'clang" .*hello.c' %t.log && // RUN: %t > %t.out && // RUN: grep "I'm a little driver, short and stout." %t.out #include <stdio.h> int main() { printf("I'm a little driver, short and stout."); return 0; }
Add simple test case to make sure driver can generate executables. - Hopefully Chris can pardon one executable test.
Add simple test case to make sure driver can generate executables. - Hopefully Chris can pardon one executable test. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@67251 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-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
fdedf259d183e523e0f4837cc6a8dd3b4e97a815
core/metautils/src/complexLinkdef.h
core/metautils/src/complexLinkdef.h
#include <complex> #ifndef __hpux using namespace std; #endif #pragma create TClass std::complex<int>+; #pragma create TClass std::complex<long>+; #pragma create TClass std::complex<float>+; #pragma create TClass std::complex<double>+; #ifdef G__NATIVELONGLONG #pragma create TClass std::complex<long long>+; // #pragma create TClass std::complex<long double>+; #endif
Add missing new files for revision 32092
Add missing new files for revision 32092 git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@32093 27541ba8-7e3a-0410-8455-c3a389f83636
C
lgpl-2.1
Y--/root,evgeny-boger/root,Dr15Jones/root,gganis/root,cxx-hep/root-cern,Y--/root,smarinac/root,kirbyherm/root-r-tools,mkret2/root,georgtroska/root,tc3t/qoot,sirinath/root,root-mirror/root,Duraznos/root,pspe/root,davidlt/root,beniz/root,Dr15Jones/root,simonpf/root,sbinet/cxx-root,omazapa/root,thomaskeck/root,gganis/root,gganis/root,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy,mkret2/root,georgtroska/root,lgiommi/root,karies/root,sirinath/root,gbitzes/root,sbinet/cxx-root,alexschlueter/cern-root,krafczyk/root,mhuwiler/rootauto,omazapa/root,BerserkerTroll/root,veprbl/root,olifre/root,lgiommi/root,dfunke/root,satyarth934/root,Duraznos/root,sbinet/cxx-root,lgiommi/root,mattkretz/root,abhinavmoudgil95/root,gganis/root,zzxuanyuan/root-compressor-dummy,vukasinmilosevic/root,beniz/root,dfunke/root,mkret2/root,evgeny-boger/root,satyarth934/root,zzxuanyuan/root,smarinac/root,vukasinmilosevic/root,mkret2/root,omazapa/root,buuck/root,vukasinmilosevic/root,veprbl/root,olifre/root,buuck/root,kirbyherm/root-r-tools,olifre/root,beniz/root,karies/root,simonpf/root,esakellari/root,mattkretz/root,strykejern/TTreeReader,perovic/root,vukasinmilosevic/root,Dr15Jones/root,jrtomps/root,lgiommi/root,Y--/root,omazapa/root-old,esakellari/my_root_for_test,agarciamontoro/root,omazapa/root,jrtomps/root,mattkretz/root,Y--/root,abhinavmoudgil95/root,BerserkerTroll/root,sawenzel/root,nilqed/root,strykejern/TTreeReader,pspe/root,jrtomps/root,mkret2/root,nilqed/root,evgeny-boger/root,BerserkerTroll/root,omazapa/root-old,satyarth934/root,arch1tect0r/root,lgiommi/root,BerserkerTroll/root,evgeny-boger/root,Duraznos/root,gbitzes/root,abhinavmoudgil95/root,veprbl/root,karies/root,tc3t/qoot,davidlt/root,dfunke/root,simonpf/root,evgeny-boger/root,esakellari/my_root_for_test,sirinath/root,agarciamontoro/root,smarinac/root,vukasinmilosevic/root,karies/root,evgeny-boger/root,dfunke/root,buuck/root,sbinet/cxx-root,bbockelm/root,davidlt/root,sbinet/cxx-root,mattkretz/root,sbinet/cxx-root,CristinaCristescu/root,root-mirror/root,veprbl/root,root-mirror/root,abhinavmoudgil95/root,krafczyk/root,veprbl/root,0x0all/ROOT,agarciamontoro/root,zzxuanyuan/root,abhinavmoudgil95/root,olifre/root,evgeny-boger/root,Duraznos/root,gganis/root,cxx-hep/root-cern,agarciamontoro/root,Duraznos/root,perovic/root,perovic/root,esakellari/my_root_for_test,smarinac/root,georgtroska/root,beniz/root,mhuwiler/rootauto,CristinaCristescu/root,evgeny-boger/root,ffurano/root5,sirinath/root,karies/root,dfunke/root,alexschlueter/cern-root,sirinath/root,georgtroska/root,arch1tect0r/root,buuck/root,CristinaCristescu/root,simonpf/root,buuck/root,CristinaCristescu/root,dfunke/root,georgtroska/root,strykejern/TTreeReader,gganis/root,root-mirror/root,nilqed/root,satyarth934/root,lgiommi/root,esakellari/my_root_for_test,arch1tect0r/root,satyarth934/root,arch1tect0r/root,gbitzes/root,smarinac/root,smarinac/root,BerserkerTroll/root,jrtomps/root,satyarth934/root,evgeny-boger/root,Duraznos/root,tc3t/qoot,esakellari/my_root_for_test,pspe/root,cxx-hep/root-cern,bbockelm/root,vukasinmilosevic/root,olifre/root,olifre/root,CristinaCristescu/root,perovic/root,veprbl/root,zzxuanyuan/root,simonpf/root,veprbl/root,bbockelm/root,davidlt/root,mhuwiler/rootauto,esakellari/root,cxx-hep/root-cern,satyarth934/root,cxx-hep/root-cern,omazapa/root-old,tc3t/qoot,cxx-hep/root-cern,root-mirror/root,bbockelm/root,0x0all/ROOT,omazapa/root,sawenzel/root,ffurano/root5,veprbl/root,davidlt/root,thomaskeck/root,thomaskeck/root,mhuwiler/rootauto,gbitzes/root,Duraznos/root,esakellari/my_root_for_test,root-mirror/root,lgiommi/root,krafczyk/root,Y--/root,davidlt/root,pspe/root,jrtomps/root,gganis/root,esakellari/root,beniz/root,gganis/root,pspe/root,satyarth934/root,simonpf/root,Duraznos/root,abhinavmoudgil95/root,gganis/root,davidlt/root,davidlt/root,perovic/root,bbockelm/root,tc3t/qoot,alexschlueter/cern-root,pspe/root,omazapa/root-old,beniz/root,kirbyherm/root-r-tools,alexschlueter/cern-root,esakellari/my_root_for_test,perovic/root,esakellari/root,perovic/root,sbinet/cxx-root,veprbl/root,jrtomps/root,sbinet/cxx-root,abhinavmoudgil95/root,CristinaCristescu/root,gbitzes/root,ffurano/root5,abhinavmoudgil95/root,olifre/root,0x0all/ROOT,sawenzel/root,omazapa/root-old,satyarth934/root,BerserkerTroll/root,buuck/root,thomaskeck/root,ffurano/root5,mhuwiler/rootauto,zzxuanyuan/root-compressor-dummy,agarciamontoro/root,omazapa/root,tc3t/qoot,gbitzes/root,zzxuanyuan/root,Y--/root,smarinac/root,georgtroska/root,zzxuanyuan/root,abhinavmoudgil95/root,agarciamontoro/root,simonpf/root,0x0all/ROOT,buuck/root,kirbyherm/root-r-tools,Duraznos/root,satyarth934/root,olifre/root,sbinet/cxx-root,karies/root,vukasinmilosevic/root,karies/root,agarciamontoro/root,esakellari/root,smarinac/root,Y--/root,esakellari/root,kirbyherm/root-r-tools,esakellari/my_root_for_test,vukasinmilosevic/root,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,beniz/root,tc3t/qoot,agarciamontoro/root,veprbl/root,sirinath/root,gbitzes/root,zzxuanyuan/root-compressor-dummy,root-mirror/root,nilqed/root,Y--/root,Duraznos/root,beniz/root,mattkretz/root,mhuwiler/rootauto,BerserkerTroll/root,beniz/root,georgtroska/root,mhuwiler/rootauto,buuck/root,ffurano/root5,olifre/root,omazapa/root,zzxuanyuan/root,thomaskeck/root,gbitzes/root,esakellari/root,zzxuanyuan/root,sawenzel/root,buuck/root,alexschlueter/cern-root,zzxuanyuan/root-compressor-dummy,gganis/root,cxx-hep/root-cern,zzxuanyuan/root,root-mirror/root,lgiommi/root,0x0all/ROOT,sawenzel/root,jrtomps/root,dfunke/root,zzxuanyuan/root-compressor-dummy,gbitzes/root,root-mirror/root,smarinac/root,omazapa/root-old,mattkretz/root,sirinath/root,perovic/root,simonpf/root,pspe/root,nilqed/root,agarciamontoro/root,kirbyherm/root-r-tools,nilqed/root,krafczyk/root,karies/root,esakellari/root,thomaskeck/root,thomaskeck/root,mhuwiler/rootauto,bbockelm/root,simonpf/root,arch1tect0r/root,Y--/root,Y--/root,karies/root,omazapa/root,strykejern/TTreeReader,arch1tect0r/root,jrtomps/root,krafczyk/root,esakellari/my_root_for_test,mhuwiler/rootauto,nilqed/root,perovic/root,sirinath/root,bbockelm/root,mkret2/root,evgeny-boger/root,esakellari/root,alexschlueter/cern-root,arch1tect0r/root,arch1tect0r/root,dfunke/root,arch1tect0r/root,vukasinmilosevic/root,nilqed/root,pspe/root,zzxuanyuan/root,smarinac/root,thomaskeck/root,tc3t/qoot,krafczyk/root,Dr15Jones/root,davidlt/root,bbockelm/root,mkret2/root,pspe/root,sawenzel/root,Dr15Jones/root,lgiommi/root,CristinaCristescu/root,mhuwiler/rootauto,root-mirror/root,sawenzel/root,mattkretz/root,sirinath/root,zzxuanyuan/root,CristinaCristescu/root,sawenzel/root,omazapa/root-old,mattkretz/root,Y--/root,BerserkerTroll/root,evgeny-boger/root,mattkretz/root,agarciamontoro/root,Duraznos/root,perovic/root,nilqed/root,omazapa/root-old,abhinavmoudgil95/root,beniz/root,davidlt/root,davidlt/root,Dr15Jones/root,bbockelm/root,CristinaCristescu/root,dfunke/root,omazapa/root,mkret2/root,mattkretz/root,mattkretz/root,esakellari/root,karies/root,pspe/root,karies/root,zzxuanyuan/root-compressor-dummy,esakellari/my_root_for_test,mkret2/root,satyarth934/root,omazapa/root-old,dfunke/root,CristinaCristescu/root,lgiommi/root,omazapa/root,mkret2/root,sawenzel/root,beniz/root,agarciamontoro/root,pspe/root,dfunke/root,0x0all/ROOT,alexschlueter/cern-root,veprbl/root,ffurano/root5,perovic/root,thomaskeck/root,bbockelm/root,nilqed/root,sawenzel/root,sirinath/root,omazapa/root,zzxuanyuan/root,krafczyk/root,0x0all/ROOT,zzxuanyuan/root-compressor-dummy,jrtomps/root,olifre/root,georgtroska/root,arch1tect0r/root,mkret2/root,simonpf/root,gganis/root,0x0all/ROOT,omazapa/root-old,ffurano/root5,Dr15Jones/root,BerserkerTroll/root,buuck/root,omazapa/root-old,georgtroska/root,thomaskeck/root,bbockelm/root,cxx-hep/root-cern,tc3t/qoot,root-mirror/root,CristinaCristescu/root,olifre/root,jrtomps/root,gbitzes/root,abhinavmoudgil95/root,jrtomps/root,georgtroska/root,krafczyk/root,strykejern/TTreeReader,georgtroska/root,strykejern/TTreeReader,sbinet/cxx-root,nilqed/root,BerserkerTroll/root,arch1tect0r/root,krafczyk/root,simonpf/root,zzxuanyuan/root-compressor-dummy,strykejern/TTreeReader,0x0all/ROOT,sirinath/root,sawenzel/root,tc3t/qoot,kirbyherm/root-r-tools,zzxuanyuan/root,vukasinmilosevic/root,gbitzes/root,vukasinmilosevic/root,esakellari/root,sbinet/cxx-root,krafczyk/root,mhuwiler/rootauto,lgiommi/root,buuck/root,krafczyk/root
429c93cfa5745a9a37cb453a5fabb3eabf0a99cb
lab1/digenv.c
lab1/digenv.c
#include "pipe.h" #include <stdlib.h> #include <unistd.h> int main(int argc, char *argv[]) { /* Command argument vectors. */ char *more_argv[] = { "more", NULL }; char *less_argv[] = { "less", NULL }; char *pager_argv[] = { getenv("PAGER"), NULL }; char *sort_argv[] = { "sort", NULL }; char *printenv_argv[] = { "printenv", NULL }; char **grep_argv = argv; grep_argv[0] = "grep"; /* Construct pipeline. */ /* file argv err next fallback */ command_t more = { "more", more_argv, 0, NULL, NULL}; command_t less = { "less", less_argv, 0, NULL, &more }; command_t pager = { getenv("PAGER"), pager_argv, 0, NULL, &less }; command_t sort = { "sort", sort_argv, 0, &pager, NULL }; command_t grep = { "grep", grep_argv, 0, &sort, NULL }; command_t printenv = { "printenv", printenv_argv, 0, &sort, NULL }; if (argc > 1) { /* Arguments given: Run grep as well. */ printenv.next = &grep; } /* Run pipeline. */ run_pipeline(&printenv, STDIN_FILENO); return 0; }
#include "pipe.h" #include <stdlib.h> #include <unistd.h> int main(int argc, char *argv[]) { char *pager_env = getenv("PAGER"); /* Construct pipeline. */ /* file argv err next fallback */ command_t more = {"more", (char *[]){"more", NULL}, 0, NULL, NULL}; command_t less = {"less", (char *[]){"less", NULL}, 0, NULL, &more}; command_t pager = {pager_env, (char *[]){pager_env, NULL}, 0, NULL, &less}; command_t sort = {"sort", (char *[]){"sort", NULL}, 0, &pager, NULL}; command_t grep = {"grep", argv, 0, &sort, NULL}; command_t printenv = {"printenv", (char *[]){"printenv", NULL}, 0, &sort, NULL}; if (argc > 1) { /* Arguments given: Run grep as well. */ printenv.next = &grep; argv[0] = "grep"; } /* Run pipeline. */ run_pipeline(&printenv, STDIN_FILENO); return 0; }
Initialize argv vectors using compound literals.
Initialize argv vectors using compound literals.
C
mit
estan/ID2200,estan/ID2200
44b70a9a88bb6a7ef70b4b6a7d011013c5930a0a
src/tests/test_see.c
src/tests/test_see.c
/* Make sure assert is not disabled */ #ifdef NDEBUG #undef NDEBUG #endif #include <stdio.h> #include <assert.h> #include "see.h" #include "fen.h" void test_see() { chess_state_t s; int result; int pos_from = D3; int pos_to = E5; int type = KNIGHT; int capture_type = PAWN; int special = MOVE_CAPTURE; move_t move = pos_from << MOVE_POS_FROM_SHIFT | pos_to << MOVE_POS_TO_SHIFT | type << MOVE_TYPE_SHIFT | capture_type << MOVE_CAPTURE_TYPE_SHIFT | special << MOVE_SPECIAL_FLAGS_SHIFT; assert(FEN_read(&s, "1k1r3q/1ppn3p/p4b2/4p3/8/P2N2P1/1PP1R1BP/2K1Q3 w - -")); result = see(&s, move); assert(result == -225/5); } int main() { BITBOARD_init(); test_see(); return 0; }
/* Make sure assert is not disabled */ #ifdef NDEBUG #undef NDEBUG #endif #include <stdio.h> #include <assert.h> #include "see.h" #include "fen.h" void test_see(const char *fen, short expected_result) { chess_state_t s; int result; int pos_from = D3; int pos_to = E5; int type = KNIGHT; int capture_type = PAWN; int special = MOVE_CAPTURE; move_t move = pos_from << MOVE_POS_FROM_SHIFT | pos_to << MOVE_POS_TO_SHIFT | type << MOVE_TYPE_SHIFT | capture_type << MOVE_CAPTURE_TYPE_SHIFT | special << MOVE_SPECIAL_FLAGS_SHIFT; assert(FEN_read(&s, fen)); result = see(&s, move); printf("%s\n", fen); printf("\tresult %d (%d centipawns)\n", result, result*5); assert(result == expected_result); } int main() { BITBOARD_init(); test_see("1k1r3q/1ppn3p/p4b2/4p3/8/P2N2P1/1PP1R1BP/2K1Q3 w - -", -225/5); return 0; }
Prepare for more SEE tests
Prepare for more SEE tests
C
mit
gustafullberg/drosophila,gustafullberg/drosophila,gustafullberg/drosophila
e14f51a4248fe3c4f031a011b483947bfb2f2f5d
libtock/tock.c
libtock/tock.c
#include <inttypes.h> #include <stdlib.h> #include <unistd.h> #include <stdbool.h> #include "tock.h" #pragma GCC diagnostic ignored "-Wunused-parameter" void yield_for(bool *cond) { while(!*cond) { yield(); } } void yield() { asm volatile("push {lr}\nsvc 0\npop {pc}" ::: "memory", "r0"); } int subscribe(uint32_t driver, uint32_t subscribe, subscribe_cb cb, void* userdata) { asm volatile("svc 1\nbx lr" ::: "memory", "r0"); } int command(uint32_t driver, uint32_t command, int data) { asm volatile("svc 2\nbx lr" ::: "memory", "r0"); } int allow(uint32_t driver, uint32_t allow, void* ptr, size_t size) { asm volatile("svc 3\nbx lr" ::: "memory", "r0"); } int memop(uint32_t op_type, int arg1) { asm volatile("svc 4\nbx lr" ::: "memory", "r0"); } bool driver_exists(uint32_t driver) { int ret = command(driver, 0, 0); return ret >= 0; }
#include <inttypes.h> #include <stdlib.h> #include <unistd.h> #include <stdbool.h> #include "tock.h" #pragma GCC diagnostic ignored "-Wunused-parameter" void yield_for(bool *cond) { while(!*cond) { yield(); } } void yield() { asm volatile("push {lr}\nsvc 0\npop {pc}" ::: "memory", "r0"); } int subscribe(uint32_t driver, uint32_t subscribe, subscribe_cb cb, void* userdata) { register int ret __asm__ ("r0"); asm volatile("svc 1" ::: "memory", "r0"); return ret; } int command(uint32_t driver, uint32_t command, int data) { register int ret __asm__ ("r0"); asm volatile("svc 2\nbx lr" ::: "memory", "r0"); return ret; } int allow(uint32_t driver, uint32_t allow, void* ptr, size_t size) { register int ret __asm__ ("r0"); asm volatile("svc 3\nbx lr" ::: "memory", "r0"); return ret; } int memop(uint32_t op_type, int arg1) { register int ret __asm__ ("r0"); asm volatile("svc 4\nbx lr" ::: "memory", "r0"); return ret; } bool driver_exists(uint32_t driver) { int ret = command(driver, 0, 0); return ret >= 0; }
Resolve 'control reaches end of non-void function'
Resolve 'control reaches end of non-void function' Following http://stackoverflow.com/questions/15927583/
C
apache-2.0
tock/libtock-c,tock/libtock-c,tock/libtock-c
aec97a07b46188ed7ec61600c6068045a18fe142
content/browser/geofencing/geofencing_dispatcher_host.h
content/browser/geofencing/geofencing_dispatcher_host.h
// Copyright 2014 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 CONTENT_BROWSER_GEOFENCING_GEOFENCING_DISPATCHER_HOST_H_ #define CONTENT_BROWSER_GEOFENCING_GEOFENCING_DISPATCHER_HOST_H_ #include "content/public/browser/browser_message_filter.h" namespace blink { struct WebCircularGeofencingRegion; } namespace content { class GeofencingDispatcherHost : public BrowserMessageFilter { public: GeofencingDispatcherHost(); private: virtual ~GeofencingDispatcherHost(); // BrowserMessageFilter implementation. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; void OnRegisterRegion(int thread_id, int request_id, const std::string& region_id, const blink::WebCircularGeofencingRegion& region); void OnUnregisterRegion(int thread_id, int request_id, const std::string& region_id); void OnGetRegisteredRegions(int thread_id, int request_id); DISALLOW_COPY_AND_ASSIGN(GeofencingDispatcherHost); }; } // namespace content #endif // CONTENT_BROWSER_GEOFENCING_GEOFENCING_DISPATCHER_HOST_H_
// Copyright 2014 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 CONTENT_BROWSER_GEOFENCING_GEOFENCING_DISPATCHER_HOST_H_ #define CONTENT_BROWSER_GEOFENCING_GEOFENCING_DISPATCHER_HOST_H_ #include "content/public/browser/browser_message_filter.h" namespace blink { struct WebCircularGeofencingRegion; } namespace content { class GeofencingDispatcherHost : public BrowserMessageFilter { public: GeofencingDispatcherHost(); private: virtual ~GeofencingDispatcherHost(); // BrowserMessageFilter implementation. virtual bool OnMessageReceived(const IPC::Message& message) override; void OnRegisterRegion(int thread_id, int request_id, const std::string& region_id, const blink::WebCircularGeofencingRegion& region); void OnUnregisterRegion(int thread_id, int request_id, const std::string& region_id); void OnGetRegisteredRegions(int thread_id, int request_id); DISALLOW_COPY_AND_ASSIGN(GeofencingDispatcherHost); }; } // namespace content #endif // CONTENT_BROWSER_GEOFENCING_GEOFENCING_DISPATCHER_HOST_H_
Replace OVERRIDE and FINAL with override and final in content/browser/geofencing/[a-s]*
Replace OVERRIDE and FINAL with override and final in content/browser/geofencing/[a-s]* BUG=417463 Review URL: https://codereview.chromium.org/631873002 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#298382}
C
bsd-3-clause
PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,markYoungH/chromium.src,axinging/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk,markYoungH/chromium.src,dushu1203/chromium.src,markYoungH/chromium.src,ltilve/chromium,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,M4sse/chromium.src,ltilve/chromium,jaruba/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,krieger-od/nwjs_chromium.src,jaruba/chromium.src,ltilve/chromium,dushu1203/chromium.src,ltilve/chromium,Jonekee/chromium.src,M4sse/chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,markYoungH/chromium.src,dednal/chromium.src,dushu1203/chromium.src,dednal/chromium.src,Just-D/chromium-1,markYoungH/chromium.src,Jonekee/chromium.src,dushu1203/chromium.src,ltilve/chromium,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,dednal/chromium.src,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,jaruba/chromium.src,M4sse/chromium.src,Just-D/chromium-1,dushu1203/chromium.src,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,M4sse/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,Fireblend/chromium-crosswalk,M4sse/chromium.src,dednal/chromium.src,chuan9/chromium-crosswalk,dednal/chromium.src,markYoungH/chromium.src,markYoungH/chromium.src,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,ltilve/chromium,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,Jonekee/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,ltilve/chromium,chuan9/chromium-crosswalk,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,Chilledheart/chromium,axinging/chromium-crosswalk,axinging/chromium-crosswalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,dednal/chromium.src,axinging/chromium-crosswalk,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,Just-D/chromium-1,M4sse/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,jaruba/chromium.src,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,markYoungH/chromium.src,Jonekee/chromium.src,markYoungH/chromium.src,axinging/chromium-crosswalk,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,M4sse/chromium.src,dushu1203/chromium.src,Just-D/chromium-1,dednal/chromium.src,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium,ltilve/chromium,jaruba/chromium.src,chuan9/chromium-crosswalk,Just-D/chromium-1,krieger-od/nwjs_chromium.src,M4sse/chromium.src,Jonekee/chromium.src,dednal/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,Fireblend/chromium-crosswalk,Chilledheart/chromium,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,fujunwei/chromium-crosswalk,M4sse/chromium.src,fujunwei/chromium-crosswalk
41d9897e9b98ca7a699a241fe35fee66a4c488da
tests/test_hsm.c
tests/test_hsm.c
#include "mbb/test.h" #include "mbb/hsm.h" #include "mbb/debug.h" MHSM_DEFINE_STATE(state_a, NULL); MHSM_DEFINE_STATE(state_a1, &state_a); MHSM_DEFINE_STATE(state_a11, &state_a1); mhsm_state_t *state_a_fun(mhsm_hsm_t *hsm, mhsm_event_t event) { switch (event.id) { case MHSM_EVENT_INITIAL: return &state_a1; } return &state_a; } mhsm_state_t *state_a1_fun(mhsm_hsm_t *hsm, mhsm_event_t event) { switch (event.id) { case MHSM_EVENT_INITIAL: return &state_a11; } return &state_a1; } mhsm_state_t *state_a11_fun(mhsm_hsm_t *hsm, mhsm_event_t event) { switch (event.id) { case MHSM_EVENT_ENTRY: MDBG_PRINT_LN("a11 entry"); break; } return &state_a11; } char *test_initial_transition() { mhsm_hsm_t hsm; mhsm_initialise(&hsm, NULL, &state_a); mhsm_dispatch_event(&hsm, MHSM_EVENT_INITIAL); MUNT_ASSERT(mhsm_current_state(&hsm) == &state_a11); return 0; }
Add first stub for HSM unit test
Add first stub for HSM unit test
C
mit
jawebada/libmbb,jawebada/libmbb,jawebada/libmbb,jawebada/libmbb
04eb41980945926927e8dd22b420182ab7a47bc2
src/interfaces/libpq/pqsignal.c
src/interfaces/libpq/pqsignal.c
/*------------------------------------------------------------------------- * * pqsignal.c * reliable BSD-style signal(2) routine stolen from RWW who stole it * from Stevens... * * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION * $Header: /cvsroot/pgsql/src/interfaces/libpq/pqsignal.c,v 1.15 2002/06/20 20:29:54 momjian Exp $ * * NOTES * This shouldn't be in libpq, but the monitor and some other * things need it... * *------------------------------------------------------------------------- */ #include <stdlib.h> #include <signal.h> #include "pqsignal.h" pqsigfunc pqsignal(int signo, pqsigfunc func) { #if !defined(HAVE_POSIX_SIGNALS) return signal(signo, func); #else struct sigaction act, oact; act.sa_handler = func; sigemptyset(&act.sa_mask); act.sa_flags = 0; if (signo != SIGALRM) act.sa_flags |= SA_RESTART; if (sigaction(signo, &act, &oact) < 0) return SIG_ERR; return oact.sa_handler; #endif /* !HAVE_POSIX_SIGNALS */ }
/*------------------------------------------------------------------------- * * pqsignal.c * reliable BSD-style signal(2) routine stolen from RWW who stole it * from Stevens... * * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION * $Header: /cvsroot/pgsql/src/interfaces/libpq/pqsignal.c,v 1.16 2002/11/04 14:27:21 tgl Exp $ * * NOTES * This shouldn't be in libpq, but the monitor and some other * things need it... * *------------------------------------------------------------------------- */ #include "pqsignal.h" #include <signal.h> pqsigfunc pqsignal(int signo, pqsigfunc func) { #if !defined(HAVE_POSIX_SIGNALS) return signal(signo, func); #else struct sigaction act, oact; act.sa_handler = func; sigemptyset(&act.sa_mask); act.sa_flags = 0; if (signo != SIGALRM) act.sa_flags |= SA_RESTART; if (sigaction(signo, &act, &oact) < 0) return SIG_ERR; return oact.sa_handler; #endif /* !HAVE_POSIX_SIGNALS */ }
Fix inclusion order, per Andreas.
Fix inclusion order, per Andreas.
C
apache-2.0
ahachete/gpdb,lintzc/gpdb,janebeckman/gpdb,zaksoup/gpdb,CraigHarris/gpdb,Quikling/gpdb,kaknikhil/gpdb,kmjungersen/PostgresXL,jmcatamney/gpdb,rubikloud/gpdb,rvs/gpdb,ovr/postgres-xl,greenplum-db/gpdb,kaknikhil/gpdb,randomtask1155/gpdb,randomtask1155/gpdb,techdragon/Postgres-XL,rvs/gpdb,Quikling/gpdb,50wu/gpdb,ahachete/gpdb,snaga/postgres-xl,postmind-net/postgres-xl,xinzweb/gpdb,rubikloud/gpdb,xuegang/gpdb,greenplum-db/gpdb,cjcjameson/gpdb,tangp3/gpdb,Postgres-XL/Postgres-XL,foyzur/gpdb,xinzweb/gpdb,yuanzhao/gpdb,yazun/postgres-xl,Quikling/gpdb,atris/gpdb,yazun/postgres-xl,lintzc/gpdb,xuegang/gpdb,janebeckman/gpdb,cjcjameson/gpdb,CraigHarris/gpdb,Chibin/gpdb,cjcjameson/gpdb,arcivanov/postgres-xl,greenplum-db/gpdb,Chibin/gpdb,adam8157/gpdb,edespino/gpdb,greenplum-db/gpdb,lpetrov-pivotal/gpdb,chrishajas/gpdb,randomtask1155/gpdb,50wu/gpdb,cjcjameson/gpdb,rubikloud/gpdb,lintzc/gpdb,greenplum-db/gpdb,kmjungersen/PostgresXL,yuanzhao/gpdb,lisakowen/gpdb,foyzur/gpdb,Postgres-XL/Postgres-XL,atris/gpdb,ovr/postgres-xl,rvs/gpdb,greenplum-db/gpdb,snaga/postgres-xl,kaknikhil/gpdb,arcivanov/postgres-xl,0x0FFF/gpdb,royc1/gpdb,kmjungersen/PostgresXL,yazun/postgres-xl,postmind-net/postgres-xl,cjcjameson/gpdb,0x0FFF/gpdb,xuegang/gpdb,kaknikhil/gpdb,ahachete/gpdb,janebeckman/gpdb,ahachete/gpdb,royc1/gpdb,xinzweb/gpdb,techdragon/Postgres-XL,kaknikhil/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,xuegang/gpdb,Chibin/gpdb,Chibin/gpdb,lintzc/gpdb,tpostgres-projects/tPostgres,tangp3/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,techdragon/Postgres-XL,tangp3/gpdb,chrishajas/gpdb,zaksoup/gpdb,jmcatamney/gpdb,postmind-net/postgres-xl,Chibin/gpdb,foyzur/gpdb,xuegang/gpdb,tangp3/gpdb,techdragon/Postgres-XL,jmcatamney/gpdb,pavanvd/postgres-xl,tpostgres-projects/tPostgres,ahachete/gpdb,xinzweb/gpdb,tangp3/gpdb,zaksoup/gpdb,CraigHarris/gpdb,jmcatamney/gpdb,foyzur/gpdb,ahachete/gpdb,kmjungersen/PostgresXL,zeroae/postgres-xl,arcivanov/postgres-xl,Quikling/gpdb,yuanzhao/gpdb,tangp3/gpdb,snaga/postgres-xl,atris/gpdb,ashwinstar/gpdb,CraigHarris/gpdb,rvs/gpdb,chrishajas/gpdb,janebeckman/gpdb,CraigHarris/gpdb,Quikling/gpdb,lisakowen/gpdb,adam8157/gpdb,atris/gpdb,0x0FFF/gpdb,ahachete/gpdb,lintzc/gpdb,50wu/gpdb,jmcatamney/gpdb,lpetrov-pivotal/gpdb,50wu/gpdb,zeroae/postgres-xl,yuanzhao/gpdb,chrishajas/gpdb,jmcatamney/gpdb,atris/gpdb,rubikloud/gpdb,royc1/gpdb,tangp3/gpdb,Quikling/gpdb,Chibin/gpdb,adam8157/gpdb,ashwinstar/gpdb,oberstet/postgres-xl,xuegang/gpdb,ashwinstar/gpdb,xuegang/gpdb,xinzweb/gpdb,royc1/gpdb,tpostgres-projects/tPostgres,yuanzhao/gpdb,adam8157/gpdb,atris/gpdb,edespino/gpdb,randomtask1155/gpdb,cjcjameson/gpdb,randomtask1155/gpdb,greenplum-db/gpdb,cjcjameson/gpdb,oberstet/postgres-xl,randomtask1155/gpdb,edespino/gpdb,chrishajas/gpdb,kaknikhil/gpdb,royc1/gpdb,yuanzhao/gpdb,rvs/gpdb,0x0FFF/gpdb,edespino/gpdb,janebeckman/gpdb,adam8157/gpdb,rvs/gpdb,CraigHarris/gpdb,janebeckman/gpdb,randomtask1155/gpdb,janebeckman/gpdb,50wu/gpdb,yuanzhao/gpdb,oberstet/postgres-xl,arcivanov/postgres-xl,Quikling/gpdb,lisakowen/gpdb,jmcatamney/gpdb,chrishajas/gpdb,xuegang/gpdb,foyzur/gpdb,Chibin/gpdb,snaga/postgres-xl,Chibin/gpdb,tpostgres-projects/tPostgres,CraigHarris/gpdb,0x0FFF/gpdb,adam8157/gpdb,chrishajas/gpdb,rubikloud/gpdb,Postgres-XL/Postgres-XL,cjcjameson/gpdb,kaknikhil/gpdb,Chibin/gpdb,lpetrov-pivotal/gpdb,ovr/postgres-xl,xinzweb/gpdb,lisakowen/gpdb,rvs/gpdb,royc1/gpdb,janebeckman/gpdb,xinzweb/gpdb,adam8157/gpdb,yuanzhao/gpdb,edespino/gpdb,arcivanov/postgres-xl,0x0FFF/gpdb,lisakowen/gpdb,royc1/gpdb,CraigHarris/gpdb,adam8157/gpdb,chrishajas/gpdb,pavanvd/postgres-xl,rubikloud/gpdb,CraigHarris/gpdb,yuanzhao/gpdb,lintzc/gpdb,Chibin/gpdb,lintzc/gpdb,zeroae/postgres-xl,Postgres-XL/Postgres-XL,atris/gpdb,tangp3/gpdb,oberstet/postgres-xl,lpetrov-pivotal/gpdb,zaksoup/gpdb,atris/gpdb,zaksoup/gpdb,rvs/gpdb,zaksoup/gpdb,lisakowen/gpdb,xinzweb/gpdb,arcivanov/postgres-xl,lpetrov-pivotal/gpdb,oberstet/postgres-xl,xuegang/gpdb,foyzur/gpdb,50wu/gpdb,techdragon/Postgres-XL,0x0FFF/gpdb,ashwinstar/gpdb,foyzur/gpdb,rubikloud/gpdb,ashwinstar/gpdb,snaga/postgres-xl,lintzc/gpdb,lisakowen/gpdb,randomtask1155/gpdb,pavanvd/postgres-xl,pavanvd/postgres-xl,rvs/gpdb,Quikling/gpdb,edespino/gpdb,zaksoup/gpdb,edespino/gpdb,ahachete/gpdb,zeroae/postgres-xl,edespino/gpdb,Quikling/gpdb,foyzur/gpdb,ovr/postgres-xl,edespino/gpdb,50wu/gpdb,kaknikhil/gpdb,lisakowen/gpdb,ashwinstar/gpdb,janebeckman/gpdb,jmcatamney/gpdb,janebeckman/gpdb,50wu/gpdb,royc1/gpdb,rvs/gpdb,Quikling/gpdb,lpetrov-pivotal/gpdb,kmjungersen/PostgresXL,edespino/gpdb,Postgres-XL/Postgres-XL,lpetrov-pivotal/gpdb,tpostgres-projects/tPostgres,kaknikhil/gpdb,zeroae/postgres-xl,ashwinstar/gpdb,greenplum-db/gpdb,ovr/postgres-xl,zaksoup/gpdb,lintzc/gpdb,cjcjameson/gpdb,postmind-net/postgres-xl,lpetrov-pivotal/gpdb,kaknikhil/gpdb,postmind-net/postgres-xl,rubikloud/gpdb,yazun/postgres-xl,0x0FFF/gpdb,yazun/postgres-xl