commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
1
4.87k
subject
stringlengths
15
778
message
stringlengths
15
8.75k
lang
stringclasses
266 values
license
stringclasses
13 values
repos
stringlengths
5
127k
fc3cad92574b76d27c629b704f23c70ef46a2428
core/httpd-platform.h
core/httpd-platform.h
#ifndef HTTPD_PLATFORM_H #define HTTPD_PLATFORM_H void httpdPlatSendData(ConnTypePtr conn, char *buff, int len); void httpdPlatDisconnect(ConnTypePtr conn); void httpdPlatInit(int port, int maxConnCt); #endif
#ifndef HTTPD_PLATFORM_H #define HTTPD_PLATFORM_H int httpdPlatSendData(ConnTypePtr conn, char *buff, int len); void httpdPlatDisconnect(ConnTypePtr conn); void httpdPlatInit(int port, int maxConnCt); #endif
Change to send routine: return status
Change to send routine: return status
C
mpl-2.0
chmorgan/libesphttpd
04e7f7e951bcefbc37e8e127cf268c67f9a20e17
setcapslock.c
setcapslock.c
#include <stdio.h> #include <string.h> #include <X11/Xlib.h> #include <X11/XKBlib.h> #define CAPSLOCK 2 void setcaps(int on) { Display* display = XOpenDisplay(NULL); XkbLockModifiers(display, XkbUseCoreKbd, CAPSLOCK, on ? CAPSLOCK : 0); XCloseDisplay(display); } void usage(const char* program_name) { printf("Usage: %s [on|off]\n\n", program_name); printf("Use '%s' to disable your caps key"); } int main(int argc, char** argv) { if (argc > 2) { usage(argv[0]); return 1; } int on = 1; if (argc == 2) { if (strcmp(argv[1], "on") == 0) { on = 1; } else if (strcmp(argv[1], "off") == 0) { on = 0; } else { usage(argv[0]); return 1; } } setcaps(on); return 0; }
#include <stdio.h> #include <strings.h> #include <X11/Xlib.h> #include <X11/XKBlib.h> #define CAPSLOCK 2 void setcaps(int on) { Display* display = XOpenDisplay(NULL); XkbLockModifiers(display, XkbUseCoreKbd, CAPSLOCK, on ? CAPSLOCK : 0); XCloseDisplay(display); } void usage(const char* program_name) { printf("Usage: %s [on|off]\n\n", program_name); printf("Use '%s' to disable your caps key"); } int main(int argc, char** argv) { if (argc > 2) { usage(argv[0]); return 1; } int on = 1; if (argc == 2) { if (strcasecmp(argv[1], "on") == 0) { on = 1; } else if (strcasecmp(argv[1], "off") == 0) { on = 0; } else { usage(argv[0]); return 1; } } setcaps(on); return 0; }
Make command line argument case insensitive
Make command line argument case insensitive
C
unlicense
coldfix/setcapslock
1bc76e90771befd2be6accd71b32ae2547e98f6a
include/user.c
include/user.c
#include "user.h" #include <stdlib.h> #include <string.h> #include <stdio.h> user_t* NewUser(int fd,char *addr,unsigned short port,char *name){ user_t *user = malloc(sizeof(user_t)); if(user == NULL){ goto ret; } if(fd < 0 || addr == NULL || name == NULL){ free(user); user = NULL; goto ret; } user->fd = fd; strcpy(user->addr,addr); user->port = port; strcpy(user->name,name); user->next = NULL; ret: return user; } void AddUserToList(user_t *root,user_t *newUser){ user_t *cur = root; while(cur->next != NULL){ cur = cur->next; } cur->next = newUser; } int CheckUserValid(user_t *root,char *name){ user_t *cur=root; int len = strlen(name); if(len < 2 || len > 12){ return 0; } if(strcmp(name,"anonymous") == 0){ return 0; } while(cur != NULL){ if(strcmp(cur->name,name) == 0){ return 0; } cur = cur->next; } return 1; }
#include "user.h" #include <stdlib.h> #include <string.h> #include <stdio.h> user_t* NewUser(int fd,char *addr,unsigned short port,char *name){ user_t *user = malloc(sizeof(user_t)); if(user == NULL){ goto ret; } if(fd < 0 || addr == NULL || name == NULL){ free(user); user = NULL; goto ret; } user->fd = fd; strcpy(user->addr,addr); user->port = port; strcpy(user->name,name); user->next = NULL; ret: return user; } void AddUserToList(user_t *root,user_t *newUser){ user_t *cur = root; if(root == NULL){ return; } while(cur->next != NULL){ cur = cur->next; } cur->next = newUser; } int CheckUserValid(user_t *root,char *name){ user_t *cur=root; int len = strlen(name); if(len < 2 || len > 12){ return 0; } if(strcmp(name,"anonymous") == 0){ return 0; } while(cur != NULL){ if(strcmp(cur->name,name) == 0){ return 0; } cur = cur->next; } return 1; }
Fix AddUserToList bug when root is NULL
Fix AddUserToList bug when root is NULL
C
apache-2.0
Billy4195/Simple_Chatroom
a51cfb2c9e02993446f822a491bb9d2910883a19
kmail/kmversion.h
kmail/kmversion.h
// KMail Version Information // #ifndef kmversion_h #define kmversion_h #define KMAIL_VERSION "1.9.8" #endif /*kmversion_h*/
// KMail Version Information // #ifndef kmversion_h #define kmversion_h #define KMAIL_VERSION "1.9.9" #endif /*kmversion_h*/
Increase version number for KDE 3.5.9.
Increase version number for KDE 3.5.9. svn path=/branches/KDE/3.5/kdepim/; revision=771811
C
lgpl-2.1
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
f9d5482c1d20f6724ea6ddb4cd2395db0bdc670a
src/agent/downloader.h
src/agent/downloader.h
// Copyright (c) 2015, Galaxy Authors. All Rights Reserved // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // Author: yuanyi03@baidu.com #ifndef _DOWNLOAD_H #define _DOWNLOAD_H #include <string> namespace galaxy { class Downloader { public: virtual int Fetch(const std::string& uri, const std::string& dir) = 0; virtual void Stop() = 0; }; } // ending namespace galaxy #endif //_DOWNLOAD_H /* vim: set ts=4 sw=4 sts=4 tw=100 */
// Copyright (c) 2015, Galaxy Authors. All Rights Reserved // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // Author: yuanyi03@baidu.com #ifndef _DOWNLOAD_H #define _DOWNLOAD_H #include <string> namespace galaxy { class Downloader { public: virtual ~Downloader() {} virtual int Fetch(const std::string& uri, const std::string& dir) = 0; virtual void Stop() = 0; }; } // ending namespace galaxy #endif //_DOWNLOAD_H /* vim: set ts=4 sw=4 sts=4 tw=100 */
Add virtual deconstructor for abstract class Downloader
Add virtual deconstructor for abstract class Downloader
C
bsd-3-clause
fxsjy/galaxy,fxsjy/galaxy,baidu/galaxy,szxw/galaxy,WangCrystal/galaxy,sdgdsffdsfff/galaxy,May2016/galaxy,ontologyzsy/galaxy,imotai/galaxy,sdgdsffdsfff/galaxy,Kai-Zhang/galaxy,May2016/galaxy,ontologyzsy/galaxy,fxsjy/galaxy,imotai/galaxy,WangCrystal/galaxy,imotai/galaxy,linyvxiang/galaxy,baidu/galaxy,fxsjy/galaxy,imotai/galaxy,bluebore/galaxy,Kai-Zhang/galaxy,ontologyzsy/galaxy,baidu/galaxy,taotaowill/galaxy,ontologyzsy/galaxy,fxsjy/galaxy,bluebore/galaxy,taotaowill/galaxy,linyvxiang/galaxy,sdgdsffdsfff/galaxy,May2016/galaxy,WangCrystal/galaxy,szxw/galaxy,imotai/galaxy,linyvxiang/galaxy,linyvxiang/galaxy,szxw/galaxy,bluebore/galaxy,bluebore/galaxy,fxsjy/galaxy,linyvxiang/galaxy,szxw/galaxy,Kai-Zhang/galaxy,fxsjy/galaxy,bluebore/galaxy,sdgdsffdsfff/galaxy,taotaowill/galaxy,ontologyzsy/galaxy,szxw/galaxy,sdgdsffdsfff/galaxy,linyvxiang/galaxy
f3826a11eb29d54ecc30ed509699aaec7c20a969
luv.c
luv.c
#include <string.h> #include "luv.h" #include "luv_functions.c" int luv_newindex(lua_State* L) { lua_getfenv(L, 1); lua_pushvalue(L, 2); lua_pushvalue(L, 3); lua_rawset(L, -3); lua_pop(L, 1); return 0; } LUALIB_API int luaopen_luv (lua_State *L) { luv_main_thread = L; luaL_newmetatable(L, "luv_handle"); lua_pushcfunction(L, luv_newindex); lua_setfield(L, -2, "__newindex"); lua_pop(L, 1); // Module exports lua_newtable (L); luv_setfuncs(L, luv_functions); return 1; }
#include <string.h> #include "luv.h" #include "luv_functions.c" static int luv_newindex(lua_State* L) { lua_getfenv(L, 1); lua_pushvalue(L, 2); lua_pushvalue(L, 3); lua_rawset(L, -3); lua_pop(L, 1); return 0; } static int luv_index(lua_State* L) { #ifdef LUV_STACK_CHECK int top = lua_gettop(L); #endif lua_getfenv(L, 1); lua_pushvalue(L, 2); lua_rawget(L, -2); lua_remove(L, -2); #ifdef LUV_STACK_CHECK assert(lua_gettop(L) == top + 1); #endif return 1; } LUALIB_API int luaopen_luv (lua_State *L) { luv_main_thread = L; luaL_newmetatable(L, "luv_handle"); lua_pushcfunction(L, luv_newindex); lua_setfield(L, -2, "__newindex"); lua_pushcfunction(L, luv_index); lua_setfield(L, -2, "__index"); lua_pop(L, 1); // Module exports lua_newtable (L); luv_setfuncs(L, luv_functions); return 1; }
Allow reading back callbacks set to handles
Allow reading back callbacks set to handles
C
apache-2.0
leecrest/luv,DBarney/luv,RomeroMalaquias/luv,brimworks/luv,mkschreder/luv,daurnimator/luv,xpol/luv,zhaozg/luv,daurnimator/luv,daurnimator/luv,luvit/luv,RomeroMalaquias/luv,kidaa/luv,brimworks/luv,mkschreder/luv,NanXiao/luv,NanXiao/luv,xpol/luv,joerg-krause/luv,joerg-krause/luv,DBarney/luv,zhaozg/luv,luvit/luv,kidaa/luv,leecrest/luv,RomeroMalaquias/luv
f487686bba37f0a7a22f0f87d915b05115094948
libc/stdio/gets.c
libc/stdio/gets.c
/* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org> * * GNU Library General Public License (LGPL) version 2 or later. * * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. */ #include "_stdio.h" link_warning(gets, "the 'gets' function is dangerous and should not be used.") /* UNSAFE FUNCTION -- do not bother optimizing */ libc_hidden_proto(getchar_unlocked) libc_hidden_proto(__fgetc_unlocked) libc_hidden_proto(__stdin) char *gets(char *s) { register char *p = s; int c; __STDIO_AUTO_THREADLOCK_VAR; __STDIO_AUTO_THREADLOCK(stdin); /* Note: don't worry about performance here... this shouldn't be used! * Therefore, force actual function call. */ while (((c = getchar_unlocked()) != EOF) && ((*p = c) != '\n')) { ++p; } if ((c == EOF) || (s == p)) { s = NULL; } else { *p = 0; } __STDIO_AUTO_THREADUNLOCK(stdin); return s; }
/* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org> * * GNU Library General Public License (LGPL) version 2 or later. * * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. */ #include "_stdio.h" link_warning(gets, "the 'gets' function is dangerous and should not be used.") /* UNSAFE FUNCTION -- do not bother optimizing */ libc_hidden_proto(getchar_unlocked) libc_hidden_proto(__fgetc_unlocked) #ifdef __STDIO_GETC_MACRO libc_hidden_proto(__stdin) #else #define __stdin stdin #endif char *gets(char *s) { register char *p = s; int c; __STDIO_AUTO_THREADLOCK_VAR; __STDIO_AUTO_THREADLOCK(stdin); /* Note: don't worry about performance here... this shouldn't be used! * Therefore, force actual function call. */ while (((c = getchar_unlocked()) != EOF) && ((*p = c) != '\n')) { ++p; } if ((c == EOF) || (s == p)) { s = NULL; } else { *p = 0; } __STDIO_AUTO_THREADUNLOCK(stdin); return s; }
Build if GETC_MACRO use is disabled
Build if GETC_MACRO use is disabled
C
lgpl-2.1
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
da7beedbb4b1f5cfa2b546d6fe41bb158845afe0
src/pch.h
src/pch.h
#pragma once #define NOMINMAX #include <windows.h> #include <streams.h> #include <audioclient.h> #include <comdef.h> #include <malloc.h> #include <mmdeviceapi.h> #include <process.h> #include <algorithm> #include <array> #include <cassert> #include <deque> #include <functional> #include <future> #include <map> #include <memory> #include "Utils.h" namespace SaneAudioRenderer { _COM_SMARTPTR_TYPEDEF(IMMDeviceEnumerator, __uuidof(IMMDeviceEnumerator)); _COM_SMARTPTR_TYPEDEF(IMMDevice, __uuidof(IMMDevice)); _COM_SMARTPTR_TYPEDEF(IAudioClient, __uuidof(IAudioClient)); _COM_SMARTPTR_TYPEDEF(IAudioRenderClient, __uuidof(IAudioRenderClient)); _COM_SMARTPTR_TYPEDEF(IAudioClock, __uuidof(IAudioClock)); _COM_SMARTPTR_TYPEDEF(IMediaSample, __uuidof(IMediaSample)); }
#pragma once #ifndef NOMINMAX # define NOMINMAX #endif #include <windows.h> #include <streams.h> #include <audioclient.h> #include <comdef.h> #include <malloc.h> #include <mmdeviceapi.h> #include <process.h> #include <algorithm> #include <array> #include <cassert> #include <deque> #include <functional> #include <future> #include <map> #include <memory> #include "Utils.h" namespace SaneAudioRenderer { _COM_SMARTPTR_TYPEDEF(IMMDeviceEnumerator, __uuidof(IMMDeviceEnumerator)); _COM_SMARTPTR_TYPEDEF(IMMDevice, __uuidof(IMMDevice)); _COM_SMARTPTR_TYPEDEF(IAudioClient, __uuidof(IAudioClient)); _COM_SMARTPTR_TYPEDEF(IAudioRenderClient, __uuidof(IAudioRenderClient)); _COM_SMARTPTR_TYPEDEF(IAudioClock, __uuidof(IAudioClock)); _COM_SMARTPTR_TYPEDEF(IMediaSample, __uuidof(IMediaSample)); }
Make sure NOMINMAX is not redefined
Make sure NOMINMAX is not redefined
C
lgpl-2.1
kasper93/sanear,kasper93/sanear,alexmarsev/sanear,kasper93/sanear,alexmarsev/sanear
1ec14d4fd52cb05096b46a940d490433635508b4
PWGLF/NUCLEX/Hypernuclei/Vertexer3Body/AliVertexerHyperTriton3Body.h
PWGLF/NUCLEX/Hypernuclei/Vertexer3Body/AliVertexerHyperTriton3Body.h
#ifndef ALIVERTEXERHYPERTRITON3BODY_H #define ALIVERTEXERHYPERTRITON3BODY_H #include <AliVertexerTracks.h> class AliESDVertex; class AliESDtrack; class AliExternalTrackParam; class AliVertexerHyperTriton3Body { public: AliVertexerHyperTriton3Body(); AliESDVertex* GetCurrentVertex() { return mCurrentVertex; } bool FindDecayVertex(AliESDtrack *track1, AliESDtrack *track2, AliESDtrack* track3, float b); static void Find2ProngClosestPoint(AliExternalTrackParam *track1, AliExternalTrackParam *track2, float b, float* pos); void SetMaxDinstanceInit(float maxD) { mMaxDistanceInitialGuesses = maxD; } void SetToleranceGuessCompatibility(int tol) { mToleranceGuessCompatibility = tol; } AliVertexerTracks mVertexerTracks; private: AliESDVertex* mCurrentVertex; float mPosition[3]; float mCovariance[6]; float mMaxDistanceInitialGuesses; int mToleranceGuessCompatibility; }; #endif
#ifndef ALIVERTEXERHYPERTRITON3BODY_H #define ALIVERTEXERHYPERTRITON3BODY_H class TClonesArray; /// This will be removed as soon as alisw/AliRoot#898 is merged and a new tag is available #include <AliVertexerTracks.h> class AliESDVertex; class AliESDtrack; class AliExternalTrackParam; class AliVertexerHyperTriton3Body { public: AliVertexerHyperTriton3Body(); AliESDVertex* GetCurrentVertex() { return mCurrentVertex; } bool FindDecayVertex(AliESDtrack *track1, AliESDtrack *track2, AliESDtrack* track3, float b); static void Find2ProngClosestPoint(AliExternalTrackParam *track1, AliExternalTrackParam *track2, float b, float* pos); void SetMaxDinstanceInit(float maxD) { mMaxDistanceInitialGuesses = maxD; } void SetToleranceGuessCompatibility(int tol) { mToleranceGuessCompatibility = tol; } AliVertexerTracks mVertexerTracks; private: AliESDVertex* mCurrentVertex; float mPosition[3]; float mCovariance[6]; float mMaxDistanceInitialGuesses; int mToleranceGuessCompatibility; }; #endif
Fix for missing forward declaration in AliROOT
Fix for missing forward declaration in AliROOT
C
bsd-3-clause
AMechler/AliPhysics,victor-gonzalez/AliPhysics,kreisl/AliPhysics,hcab14/AliPhysics,pbuehler/AliPhysics,carstooon/AliPhysics,fcolamar/AliPhysics,AMechler/AliPhysics,dmuhlhei/AliPhysics,dmuhlhei/AliPhysics,preghenella/AliPhysics,hcab14/AliPhysics,akubera/AliPhysics,sebaleh/AliPhysics,hcab14/AliPhysics,fbellini/AliPhysics,dmuhlhei/AliPhysics,fbellini/AliPhysics,SHornung1/AliPhysics,victor-gonzalez/AliPhysics,pbuehler/AliPhysics,hzanoli/AliPhysics,amatyja/AliPhysics,nschmidtALICE/AliPhysics,fbellini/AliPhysics,preghenella/AliPhysics,amaringarcia/AliPhysics,adriansev/AliPhysics,hzanoli/AliPhysics,alisw/AliPhysics,amaringarcia/AliPhysics,amatyja/AliPhysics,pchrista/AliPhysics,sebaleh/AliPhysics,preghenella/AliPhysics,carstooon/AliPhysics,alisw/AliPhysics,pchrista/AliPhysics,nschmidtALICE/AliPhysics,btrzecia/AliPhysics,rbailhac/AliPhysics,amatyja/AliPhysics,pchrista/AliPhysics,mpuccio/AliPhysics,btrzecia/AliPhysics,amatyja/AliPhysics,akubera/AliPhysics,mpuccio/AliPhysics,mvala/AliPhysics,nschmidtALICE/AliPhysics,lcunquei/AliPhysics,SHornung1/AliPhysics,mpuccio/AliPhysics,carstooon/AliPhysics,alisw/AliPhysics,hcab14/AliPhysics,alisw/AliPhysics,rihanphys/AliPhysics,hcab14/AliPhysics,preghenella/AliPhysics,SHornung1/AliPhysics,alisw/AliPhysics,sebaleh/AliPhysics,mvala/AliPhysics,kreisl/AliPhysics,rbailhac/AliPhysics,rihanphys/AliPhysics,rbailhac/AliPhysics,rbailhac/AliPhysics,akubera/AliPhysics,kreisl/AliPhysics,mpuccio/AliPhysics,rihanphys/AliPhysics,kreisl/AliPhysics,pbuehler/AliPhysics,btrzecia/AliPhysics,nschmidtALICE/AliPhysics,sebaleh/AliPhysics,akubera/AliPhysics,kreisl/AliPhysics,AMechler/AliPhysics,lcunquei/AliPhysics,adriansev/AliPhysics,kreisl/AliPhysics,hcab14/AliPhysics,carstooon/AliPhysics,victor-gonzalez/AliPhysics,amaringarcia/AliPhysics,SHornung1/AliPhysics,btrzecia/AliPhysics,sebaleh/AliPhysics,akubera/AliPhysics,carstooon/AliPhysics,kreisl/AliPhysics,victor-gonzalez/AliPhysics,rihanphys/AliPhysics,AMechler/AliPhysics,victor-gonzalez/AliPhysics,AMechler/AliPhysics,amaringarcia/AliPhysics,preghenella/AliPhysics,pchrista/AliPhysics,rbailhac/AliPhysics,amaringarcia/AliPhysics,pchrista/AliPhysics,lcunquei/AliPhysics,fcolamar/AliPhysics,lcunquei/AliPhysics,fcolamar/AliPhysics,victor-gonzalez/AliPhysics,btrzecia/AliPhysics,mpuccio/AliPhysics,amatyja/AliPhysics,pchrista/AliPhysics,btrzecia/AliPhysics,SHornung1/AliPhysics,lcunquei/AliPhysics,pbuehler/AliPhysics,amatyja/AliPhysics,adriansev/AliPhysics,preghenella/AliPhysics,hcab14/AliPhysics,adriansev/AliPhysics,fcolamar/AliPhysics,fbellini/AliPhysics,hzanoli/AliPhysics,adriansev/AliPhysics,hzanoli/AliPhysics,AMechler/AliPhysics,fbellini/AliPhysics,akubera/AliPhysics,fcolamar/AliPhysics,hzanoli/AliPhysics,rbailhac/AliPhysics,preghenella/AliPhysics,adriansev/AliPhysics,AMechler/AliPhysics,rihanphys/AliPhysics,hzanoli/AliPhysics,dmuhlhei/AliPhysics,mvala/AliPhysics,carstooon/AliPhysics,amaringarcia/AliPhysics,SHornung1/AliPhysics,lcunquei/AliPhysics,rihanphys/AliPhysics,victor-gonzalez/AliPhysics,pbuehler/AliPhysics,fcolamar/AliPhysics,carstooon/AliPhysics,fcolamar/AliPhysics,dmuhlhei/AliPhysics,nschmidtALICE/AliPhysics,mvala/AliPhysics,pbuehler/AliPhysics,adriansev/AliPhysics,btrzecia/AliPhysics,mpuccio/AliPhysics,rihanphys/AliPhysics,lcunquei/AliPhysics,mvala/AliPhysics,nschmidtALICE/AliPhysics,fbellini/AliPhysics,mvala/AliPhysics,fbellini/AliPhysics,alisw/AliPhysics,amaringarcia/AliPhysics,pbuehler/AliPhysics,hzanoli/AliPhysics,alisw/AliPhysics,amatyja/AliPhysics,akubera/AliPhysics,sebaleh/AliPhysics,dmuhlhei/AliPhysics,dmuhlhei/AliPhysics,sebaleh/AliPhysics,mpuccio/AliPhysics,SHornung1/AliPhysics,rbailhac/AliPhysics,nschmidtALICE/AliPhysics,mvala/AliPhysics,pchrista/AliPhysics
2f40aad6b9d0ed57c32b48854d4b7a4358924738
sys/i386/linux/linux_genassym.c
sys/i386/linux/linux_genassym.c
/* $FreeBSD$ */ #include <sys/param.h> #include <sys/assym.h> #include <i386/linux/linux.h> ASSYM(LINUX_SIGF_HANDLER, offsetof(struct l_sigframe, sf_handler)); ASSYM(LINUX_SIGF_SC, offsetof(struct l_sigframe, sf_sc)); ASSYM(LINUX_SC_GS, offsetof(struct l_sigcontext, sc_gs)); ASSYM(LINUX_SC_EFLAGS, offsetof(struct l_sigcontext, sc_eflags)); ASSYM(LINUX_RT_SIGF_HANDLER, offsetof(struct l_rt_sigframe, sf_handler)); ASSYM(LINUX_RT_SIGF_UC, offsetof(struct l_rt_sigframe, sf_sc));
/* $FreeBSD$ */ #include <sys/param.h> #include <sys/assym.h> #include <sys/systm.h> #include <i386/linux/linux.h> ASSYM(LINUX_SIGF_HANDLER, offsetof(struct l_sigframe, sf_handler)); ASSYM(LINUX_SIGF_SC, offsetof(struct l_sigframe, sf_sc)); ASSYM(LINUX_SC_GS, offsetof(struct l_sigcontext, sc_gs)); ASSYM(LINUX_SC_EFLAGS, offsetof(struct l_sigcontext, sc_eflags)); ASSYM(LINUX_RT_SIGF_HANDLER, offsetof(struct l_rt_sigframe, sf_handler)); ASSYM(LINUX_RT_SIGF_UC, offsetof(struct l_rt_sigframe, sf_sc));
Include <sys/systm.h> for the definition of offsetof() instead of depending on the definition being misplaced in <sys/types.h>. The definition probably belongs in <sys/stddef.h>.
Include <sys/systm.h> for the definition of offsetof() instead of depending on the definition being misplaced in <sys/types.h>. The definition probably belongs in <sys/stddef.h>.
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
175264adfef6d6e050c2ca7caf5e8afddefeceb7
src/Core/RAlloc.h
src/Core/RAlloc.h
#ifndef RUTIL2_RALLOC_H #define RUTIL2_RALLOC_H #include "OO.h" void* RAlloc(int Size); void* RAlign(int Align, int Size); #if defined(__MINGW32__) #define _aligned_malloc __mingw_aligned_malloc #define _aligned_free __mingw_aligned_free #define memalign(align, size) _aligned_malloc(size, align) #endif //For MinGW #define RFree(...) __RFree(__VA_ARGS__, (void*)(- 1)) void __RFree(void* a, ...); #define RAlloc_Class(Name, Size) \ (Name*)__RAlloc_Class(Size, sizeof(Name), _C(__ClassID_, Name, __)); void* __RAlloc_Class(int Size, int UnitSize, int ClassID); #if 0 #include "_RAlloc.h" #endif #ifdef __RUtil2_Install #define _RTAddress "RUtil2/Core/_RAlloc.h" #else #define _RTAddress "Core/_RAlloc.h" #endif #define _ClassName #define _Attr 1 #include "Include_T1AllTypes.h" #endif //RUTIL2_RALLOC_H
#ifndef RUTIL2_RALLOC_H #define RUTIL2_RALLOC_H #include <memory.h> #include "OO.h" void* RAlloc(int Size); void* RAlign(int Align, int Size); #if defined(__MINGW32__) #define _aligned_malloc __mingw_aligned_malloc #define _aligned_free __mingw_aligned_free #define memalign(align, size) _aligned_malloc(size, align) #endif //For MinGW #define RClean(Ptr) memset(Ptr, 0, sizeof(Ptr)); #define RFree(...) __RFree(__VA_ARGS__, (void*)(- 1)) void __RFree(void* a, ...); #define RAlloc_Class(Name, Size) \ (Name*)__RAlloc_Class(Size, sizeof(Name), _C(__ClassID_, Name, __)); void* __RAlloc_Class(int Size, int UnitSize, int ClassID); #if 0 #include "_RAlloc.h" #endif #ifdef __RUtil2_Install #define _RTAddress "RUtil2/Core/_RAlloc.h" #else #define _RTAddress "Core/_RAlloc.h" #endif #define _ClassName #define _Attr 1 #include "Include_T1AllTypes.h" #endif //RUTIL2_RALLOC_H
Add method 'RClean' for clean memory
Add method 'RClean' for clean memory
C
mit
Icenowy/RUtil2,Rocaloid/RUtil2,Rocaloid/RUtil2,Icenowy/RUtil2,Icenowy/RUtil2,Rocaloid/RUtil2
f7daed906287e6141ea04a1097672a544765f105
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
Checkcoin/checkcoin,zemrys/vertcoin,KaSt/equikoin,bitgoldcoin-project/bitgoldcoin,Coinfigli/coinfigli,privatecoin/privatecoin,coinkeeper/2015-06-22_18-51_vertcoin,ohac/sakuracoin,gwangjin2/gwangcoin-core,coinkeeper/2015-04-19_21-20_litecoindark,brightcoin/brightcoin,Czarcoin/czarcoin,kryptokredyt/ProjektZespolowyCoin,degenorate/Deftcoin,chrisfranko/aiden,Rav3nPL/doubloons-08,bitgoldcoin-project/bitgoldcoin,coinkeeper/2015-04-19_21-20_litecoindark,marscoin/marscoin,coinkeeper/2015-06-22_18-46_razor,DrCrypto/darkcoin,zzkt/solarcoin,Ziftr/litecoin,shadowoneau/ozcoin,scamcoinz/scamcoin,netswift/vertcoin,icook/vertcoin,oklink-dev/litecoin_block,mooncoin-project/mooncoin-landann,Electronic-Gulden-Foundation/egulden,mrtexaznl/mediterraneancoin,IlfirinIlfirin/shavercoin,greencoin-dev/greencoin-dev,dakk/soundcoin,oklink-dev/litecoin_block,zebrains/Blotter,IlfirinCano/shavercoin,earthcoinproject/earthcoin,Dajackal/Ronpaulcoin,shadowoneau/ozcoin,okinc/litecoin,IlfirinCano/shavercoin,ronpaulcoin/ronpaulcoin,oklink-dev/litecoin_block,ohac/sakuracoin,CrimeaCoin/crimeacoin,Electronic-Gulden-Foundation/egulden,IlfirinCano/shavercoin,degenorate/Deftcoin,novaexchange/EAC,KaSt/equikoin,KaSt/equikoin,Litecoindark/LTCD,Checkcoin/checkcoin,netswift/vertcoin,vertcoin/eyeglass,shurcoin/shurcoin,wekuiz/wekoin,ohac/sha1coin,kryptokredyt/ProjektZespolowyCoin,ronpaulcoin/ronpaulcoin,Ziftr/litecoin,mooncoin-project/mooncoin-landann,brightcoin/brightcoin,micryon/GPUcoin,scamcoinz/scamcoin,plankton12345/litecoin,jiffe/cosinecoin,icook/vertcoin,cryptcoins/cryptcoin,Litecoindark/LTCD,gwangjin2/gwangcoin-core,ohac/sha1coin,united-scrypt-coin-project/unitedscryptcoin,chrisfranko/aiden,tensaix2j/bananacoin,ohac/sha1coin,united-scrypt-coin-project/unitedscryptcoin,brightcoin/brightcoin,coinkeeper/2015-04-19_21-20_litecoindark,bitgoldcoin-project/bitgoldcoin,plankton12345/litecoin,Ziftr/litecoin,shadowoneau/ozcoin,novaexchange/EAC,Ziftr/litecoin,cryptcoins/cryptcoin,Litecoindark/LTCD,bootycoin-project/bootycoin,privatecoin/privatecoin,zebrains/Blotter,IlfirinCano/shavercoin,shadowoneau/ozcoin,Tetcoin/tetcoin,Coinfigli/coinfigli,bitgoldcoin-project/bitgoldcoin,ohac/sakuracoin,neutrinofoundation/neutrino-digital-currency,DrCrypto/darkcoin,stamhe/litecoin,micryon/GPUcoin,tensaix2j/bananacoin,Czarcoin/czarcoin,richo/dongcoin,scamcoinz/scamcoin,ccoin-project/ccoin,gwangjin2/gwangcoin-core,coinkeeper/2015-04-19_21-20_litecoindark,mrtexaznl/mediterraneancoin,Litecoindark/LTCD,brightcoin/brightcoin,ANCompany/birdcoin-dev,netswift/vertcoin,plankton12345/litecoin,zemrys/vertcoin,scamcoinz/scamcoin,tensaix2j/bananacoin,okinc/litecoin,Dajackal/Ronpaulcoin,neutrinofoundation/neutrino-digital-currency,shurcoin/shurcoin,zebrains/Blotter,tensaix2j/bananacoin,dakk/soundcoin,jiffe/cosinecoin,IlfirinIlfirin/shavercoin,coinkeeper/2015-06-22_18-46_razor,coinkeeper/2015-06-22_18-46_razor,marscoin/marscoin,razor-coin/razor,earthcoinproject/earthcoin,coinkeeper/2015-06-22_18-46_razor,netswift/vertcoin,privatecoin/privatecoin,Electronic-Gulden-Foundation/egulden,marscoin/marscoin,brishtiteveja/sherlockholmescoin,Dajackal/Ronpaulcoin,bootycoin-project/bootycoin,Rav3nPL/doubloons-08,neutrinofoundation/neutrino-digital-currency,oklink-dev/litecoin_block,alexandrcoin/vertcoin,okinc/litecoin,mooncoin-project/mooncoin-landann,brishtiteveja/sherlockholmescoin,ANCompany/birdcoin-dev,coinkeeper/2015-06-22_19-13_florincoin,Dajackal/Ronpaulcoin,greencoin-dev/greencoin-dev,Czarcoin/czarcoin,KaSt/equikoin,coinkeeper/2015-06-22_19-13_florincoin,razor-coin/razor,Coinfigli/coinfigli,gwangjin2/gwangcoin-core,coinkeeper/2015-06-22_19-13_florincoin,shadowoneau/ozcoin,coinkeeper/2015-06-22_19-13_florincoin,koharjidan/litecoin,shapiroisme/datadollar,Cancercoin/Cancercoin,vertcoin/eyeglass,privatecoin/privatecoin,IlfirinIlfirin/shavercoin,jiffe/cosinecoin,razor-coin/razor,Tetcoin/tetcoin,zebrains/Blotter,vertcoin/eyeglass,Coinfigli/coinfigli,koharjidan/litecoin,richo/dongcoin,alexandrcoin/vertcoin,razor-coin/razor,koharjidan/litecoin,micryon/GPUcoin,Tetcoin/tetcoin,shurcoin/shurcoin,brishtiteveja/sherlockholmescoin,stamhe/litecoin,brishtiteveja/sherlockholmescoin,ohac/sha1coin,vertcoin/eyeglass,kryptokredyt/ProjektZespolowyCoin,Cancercoin/Cancercoin,coinkeeper/2015-06-22_18-51_vertcoin,ccoin-project/ccoin,earthcoinproject/earthcoin,zzkt/solarcoin,marscoin/marscoin,koharjidan/litecoin,richo/dongcoin,DrCrypto/darkcoin,brishtiteveja/sherlockholmescoin,novaexchange/EAC,vertcoin/eyeglass,kryptokredyt/ProjektZespolowyCoin,chrisfranko/aiden,bitgoldcoin-project/bitgoldcoin,shurcoin/shurcoin,degenorate/Deftcoin,kryptokredyt/ProjektZespolowyCoin,plankton12345/litecoin,cryptcoins/cryptcoin,alexandrcoin/vertcoin,coinkeeper/2015-06-22_18-51_vertcoin,CrimeaCoin/crimeacoin,Ziftr/litecoin,richo/dongcoin,Tetcoin/tetcoin,degenorate/Deftcoin,micryon/GPUcoin,chrisfranko/aiden,united-scrypt-coin-project/unitedscryptcoin,koharjidan/litecoin,Cancercoin/Cancercoin,icook/vertcoin,zzkt/solarcoin,Checkcoin/checkcoin,ohac/sakuracoin,united-scrypt-coin-project/unitedscryptcoin,novaexchange/EAC,greencoin-dev/greencoin-dev,mrtexaznl/mediterraneancoin,richo/dongcoin,shapiroisme/datadollar,alexandrcoin/vertcoin,stamhe/litecoin,chrisfranko/aiden,CrimeaCoin/crimeacoin,DrCrypto/darkcoin,cryptcoins/cryptcoin,coinkeeper/2015-06-22_18-46_razor,neutrinofoundation/neutrino-digital-currency,cryptcoins/cryptcoin,bootycoin-project/bootycoin,plankton12345/litecoin,earthcoinproject/earthcoin,marscoin/marscoin,Rav3nPL/doubloons-08,zebrains/Blotter,shurcoin/shurcoin,ANCompany/birdcoin-dev,oklink-dev/litecoin_block,Rav3nPL/doubloons-08,zemrys/vertcoin,Electronic-Gulden-Foundation/egulden,IlfirinIlfirin/shavercoin,greencoin-dev/greencoin-dev,Electronic-Gulden-Foundation/egulden,shapiroisme/datadollar,CrimeaCoin/crimeacoin,zzkt/solarcoin,zzkt/solarcoin,Czarcoin/czarcoin,coinkeeper/2015-06-22_18-51_vertcoin,gwangjin2/gwangcoin-core,netswift/vertcoin,IlfirinIlfirin/shavercoin,dakk/soundcoin,ANCompany/birdcoin-dev,mooncoin-project/mooncoin-landann,wekuiz/wekoin,united-scrypt-coin-project/unitedscryptcoin,coinkeeper/2015-06-22_18-51_vertcoin,dakk/soundcoin,okinc/litecoin,coinkeeper/2015-04-19_21-20_litecoindark,Rav3nPL/doubloons-08,netswift/vertcoin,shapiroisme/datadollar,Cancercoin/Cancercoin,wekuiz/wekoin,earthcoinproject/earthcoin,ronpaulcoin/ronpaulcoin,Electronic-Gulden-Foundation/egulden,Litecoindark/LTCD,stamhe/litecoin,Checkcoin/checkcoin,zemrys/vertcoin,Tetcoin/tetcoin,ohac/sha1coin,okinc/litecoin,wekuiz/wekoin,ccoin-project/ccoin,ohac/sakuracoin,novaexchange/EAC,dakk/soundcoin,ronpaulcoin/ronpaulcoin,shapiroisme/datadollar,zemrys/vertcoin,mrtexaznl/mediterraneancoin,razor-coin/razor,mooncoin-project/mooncoin-landann,Cancercoin/Cancercoin,koharjidan/litecoin,CrimeaCoin/crimeacoin,degenorate/Deftcoin,brightcoin/brightcoin,greencoin-dev/greencoin-dev,marscoin/marscoin,IlfirinCano/shavercoin,ccoin-project/ccoin,Czarcoin/czarcoin,ronpaulcoin/ronpaulcoin,scamcoinz/scamcoin,zemrys/vertcoin,icook/vertcoin,privatecoin/privatecoin,bootycoin-project/bootycoin,micryon/GPUcoin,ANCompany/birdcoin-dev,Dajackal/Ronpaulcoin,icook/vertcoin,Coinfigli/coinfigli,KaSt/equikoin,tensaix2j/bananacoin,wekuiz/wekoin,jiffe/cosinecoin,bootycoin-project/bootycoin,Checkcoin/checkcoin,mrtexaznl/mediterraneancoin,coinkeeper/2015-06-22_19-13_florincoin
50d89048e3f9f8e98f0bcaa813bd87a1517e6d05
Cutelyst/cutelyst_global.h
Cutelyst/cutelyst_global.h
#ifndef CUTELYST_GLOBAL_H #define CUTELYST_GLOBAL_H #include <QtCore/QtGlobal> #if defined(CUTELYST_LIBRARY) # define CUTELYST_LIBRARY Q_DECL_EXPORT #else # define CUTELYST_LIBRARY Q_DECL_IMPORT #endif #endif // CUTELYST_GLOBAL_H
#ifndef CUTELYST_GLOBAL_H #define CUTELYST_GLOBAL_H #include <QtCore/QtGlobal> // defined by cmake when building this library #if defined(cutelyst_qt5_EXPORTS) # define CUTELYST_LIBRARY Q_DECL_EXPORT #else # define CUTELYST_LIBRARY Q_DECL_IMPORT #endif #endif // CUTELYST_GLOBAL_H
Make sure export macro is properly set
Make sure export macro is properly set
C
bsd-3-clause
simonaw/cutelyst,cutelyst/cutelyst,buschmann23/cutelyst,buschmann23/cutelyst,cutelyst/cutelyst,cutelyst/cutelyst,buschmann23/cutelyst,simonaw/cutelyst
1f2d0a53e4be19d374b02ac85442ba8ebe20ff30
engine/include/graphics/Vertex.h
engine/include/graphics/Vertex.h
/* * Copyright (c) 2017 Lech Kulina * * This file is part of the Realms Of Steel. * For conditions of distribution and use, see copyright details in the LICENSE file. */ #ifndef ROS_VERTEX_H #define ROS_VERTEX_H #include <glm/vec2.hpp> #include <glm/vec3.hpp> #include <glm/vec4.hpp> #include <core/Common.h> #include <core/Environment.h> namespace ros { struct ROS_API Vertex { glm::vec3 position; glm::vec3 normal; glm::vec3 tangent; glm::vec3 bitangent; glm::vec2 textureCoordinates; glm::vec4 color; }; typedef std::vector<Vertex> VertexVector; typedef std::vector<U32> IndexVector; } #endif // ROS_VERTEX_H
/* * Copyright (c) 2017 Lech Kulina * * This file is part of the Realms Of Steel. * For conditions of distribution and use, see copyright details in the LICENSE file. */ #ifndef ROS_VERTEX_H #define ROS_VERTEX_H #include <glm/vec2.hpp> #include <glm/vec3.hpp> #include <glm/vec4.hpp> #include <core/Common.h> #include <core/Environment.h> namespace ros { struct ROS_API Vertex { static const U32 MAX_COLORS = 3; static const U32 MAX_TEXTURE_COORDS = 3; glm::vec4 colors[MAX_COLORS]; glm::vec3 textureCoords[MAX_TEXTURE_COORDS]; glm::vec3 position; glm::vec3 normal; glm::vec3 tangent; glm::vec3 bitangent; }; typedef std::vector<Vertex> VerticesVector; } #endif // ROS_VERTEX_H
Support several texture coords and colors per vertex
Support several texture coords and colors per vertex
C
apache-2.0
lechkulina/RealmsOfSteel,lechkulina/RealmsOfSteel
3b7b8507444b059534fe4d708ad8fd251b42c0c4
ext/libxml/ruby_xml_namespaces.h
ext/libxml/ruby_xml_namespaces.h
/* $Id: ruby_xml_ns.h 612 2008-11-21 08:01:29Z cfis $ */ /* Please see the LICENSE file for copyright and distribution information */ #ifndef __RXML_NAMESPACES__ #define __RXML_NAMESPACES__ extern VALUE cXMLNamespaces; void ruby_init_xml_namespaces(void); #endif
/* $Id: ruby_xml_ns.h 612 2008-11-21 08:01:29Z cfis $ */ /* Please see the LICENSE file for copyright and distribution information */ #ifndef __RXML_NAMESPACES__ #define __RXML_NAMESPACES__ extern VALUE cXMLNamespaces; void rxml_init_namespaces(void); #endif
Fix up name of init_namespaces method.
Fix up name of init_namespaces method.
C
mit
sferik/libxml-ruby,xml4r/libxml-ruby,sferik/libxml-ruby,increments/libxml-ruby,sferik/libxml-ruby,increments/libxml-ruby,sferik/libxml-ruby,xml4r/libxml-ruby,sferik/libxml-ruby,increments/libxml-ruby,sferik/libxml-ruby,xml4r/libxml-ruby
9339344aec109c94237278e4544c8111cee6b3f4
stdinc/sys/mman.h
stdinc/sys/mman.h
#pragma once #include <uk/mman.h> BEGIN_DECLS void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); int munmap(void *addr, size_t length); int mprotect(void *addr, size_t length, int prot); int madvise(void *addr, size_t length, int advice); END_DECLS
#pragma once #include <sys/types.h> #include <uk/mman.h> BEGIN_DECLS void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); int munmap(void *addr, size_t length); int mprotect(void *addr, size_t length, int prot); int madvise(void *addr, size_t length, int advice); END_DECLS
Fix missing dependency on sys/types.h
stdinc: Fix missing dependency on sys/types.h
C
mit
aclements/sv6,bowlofstew/sv6,bowlofstew/sv6,aclements/sv6,bowlofstew/sv6,aclements/sv6,bowlofstew/sv6,aclements/sv6,aclements/sv6,bowlofstew/sv6
7ae7d98acee75625a8eaaa9074b0bc66deda76bd
main.c
main.c
// // Created by wan on 1/2/16. // #include <stdio.h> int main(void) { printf("Input:"); int a; scanf("%d", &a); if (2016 % a != 0) { printf("No way. Exit.\n"); return 0; } int s = 2016; printf("2016 = "); int flag = 0, b; for (b = 1111; b >= 1; b /= 10) { int t = a * b; for (;;) { if (s >= t) { if (flag == 0) flag = 1; else printf(" + "); printf("%d", t); s -= t; } else break; } } printf("\n"); return 0; }
// // Created by Hexapetalous on 1/1/16. // #include <stdio.h> int main(void) { printf("Input[1]:"); int a; scanf("%d", &a); printf("Input[2]:"); int z; scanf("%d", &z); if (z % a != 0) { printf("No way. Exit.\n"); return 0; } int s = z; printf("%d = ", z); int flag = 0, b; for (b = 1; b < s; b = b * 10 + 1) ; for (b /= 10; b >= 1; b /= 10) { int t = a * b; for (; s >= t;) { if (flag == 0) flag = 1; else printf(" + "); printf("%d", t); s -= t; } } printf("\n"); return 0; }
Support to division every number.
Support to division every number.
C
mit
hxptls/P0000,hxptls/P0000
5e6b427fb951576718f177f837daf81bf02cd721
main.c
main.c
#include "scheme.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> #ifndef DEFAULT_BOOTFILE_PATH # define DEFAULT_BOOTFILE_PATH "./shen.boot" #endif static void custom_init(void) {} int main(int argc, char *argv[]) { int status; char *bfpath = getenv("SHEN_BOOTFILE_PATH"); if (bfpath == NULL) { bfpath = DEFAULT_BOOTFILE_PATH; } if (access(bfpath, F_OK) == -1) { fprintf(stderr, "ERROR: boot file '%s' doesn't exist or is not readable.\n", bfpath); exit(1); } Sscheme_init(NULL); Sregister_boot_file(bfpath); Sbuild_heap(NULL, custom_init); status = Sscheme_start(argc + 1, (const char**)argv - 1); Sscheme_deinit(); exit(status); }
#include "scheme.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <limits.h> #ifndef DEFAULT_BOOTFILE_PATH # define DEFAULT_BOOTFILE_PATH NULL #endif static void custom_init(void) {} int main(int argc, char *argv[]) { int status; char *bfpath = getenv("SHEN_BOOTFILE_PATH"); if (bfpath == NULL) { if (DEFAULT_BOOTFILE_PATH != NULL) { bfpath = DEFAULT_BOOTFILE_PATH; } else { char buf[PATH_MAX]; char *last_slash; realpath(argv[0], buf); last_slash = strrchr(buf, '/') + 1; strlcpy(last_slash, "shen.boot", last_slash - buf); bfpath = buf; } } if (access(bfpath, F_OK) == -1) { fprintf(stderr, "ERROR: boot file '%s' doesn't exist or is not readable.\n", bfpath); exit(1); } Sscheme_init(NULL); Sregister_boot_file(bfpath); Sbuild_heap(NULL, custom_init); status = Sscheme_start(argc + 1, (const char**)argv - 1); Sscheme_deinit(); exit(status); }
Make it so that if no path for the shen boot file is specified, it is looked at the same directory of the shen-scheme executable
Make it so that if no path for the shen boot file is specified, it is looked at the same directory of the shen-scheme executable
C
bsd-3-clause
tizoc/chibi-shen
d7579b98bf36dbb78472aabfc269939e646f73bf
src/essentia/utils/extractor_freesound/extractor_version.h
src/essentia/utils/extractor_freesound/extractor_version.h
#ifndef EXTRACTOR_VERSION_H_ #define EXTRACTOR_VERSION_H_ #define FREESOUND_EXTRACTOR_VERSION "freesound 2.0" #endif /* EXTRACTOR_VERSION_H_ */
#ifndef EXTRACTOR_VERSION_H_ #define EXTRACTOR_VERSION_H_ #define FREESOUND_EXTRACTOR_VERSION "freesound 0.5" #endif /* EXTRACTOR_VERSION_H_ */
Change FreesoundExtractor version to 0.5
Change FreesoundExtractor version to 0.5 After discussion (#582) we decided to keep incrementing 0.4
C
agpl-3.0
MTG/essentia,carthach/essentia,carthach/essentia,MTG/essentia,carthach/essentia,MTG/essentia,carthach/essentia,carthach/essentia,MTG/essentia,MTG/essentia
8ff46ef395b30e1e3f9dd84c08e1b93796ab524d
Classes/AHKNavigationController.h
Classes/AHKNavigationController.h
// Created by Arkadiusz on 01-04-14. #import <UIKit/UIKit.h> /// A UINavigationController subclass allowing the interactive pop gesture when the navigation bar is hidden or a custom back button is used. @interface AHKNavigationController : UINavigationController @end
// Created by Arkadiusz on 01-04-14. #import <UIKit/UIKit.h> /// A UINavigationController subclass allowing the interactive pop gesture when the navigation bar is hidden or a custom back button is used. @interface AHKNavigationController : UINavigationController - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated __attribute__((objc_requires_super)); @end
Add warning when a subclass doesn’t call super on pushViewController:animated:
Add warning when a subclass doesn’t call super on pushViewController:animated: This method is used for keeping an internal state, so calling super is mandatory.
C
mit
viccc/AHKNavigationController,kingiol/AHKNavigationController,MrAPPs-RSM/AHKNavigationController,fastred/AHKNavigationController
afe1e6b8d950fe94627a200cf210a1e387c0c4d7
generic/include/math/clc_ldexp.h
generic/include/math/clc_ldexp.h
_CLC_DEF _CLC_OVERLOAD float __clc_ldexp(float, int); #ifdef cl_khr_fp64 #pragma OPENCL EXTENSION cl_khr_fp64 : enable _CLC_DEF _CLC_OVERLOAD float __clc_ldexp(double, int); #endif
_CLC_DEF _CLC_OVERLOAD float __clc_ldexp(float, int); #ifdef cl_khr_fp64 #pragma OPENCL EXTENSION cl_khr_fp64 : enable _CLC_DEF _CLC_OVERLOAD double __clc_ldexp(double, int); #endif
Fix double precision function return type
ldexp: Fix double precision function return type Fixes ~1200 external calls from nvtpx library. Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> git-svn-id: e7f1ab7c2a259259587475a3e7520e757882f167@315170 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc
bb97296d4b4285e6884e61ceda833af5a453cb91
src/libfuzzymatch/util.h
src/libfuzzymatch/util.h
#include <cstdint> #include <cstring> #include <string> #include <vector> #include "../utf8/utf8.h" /* * Convert UTF-8 string to std::vector<uint32_t> */ void utf8to32(const std::string &s, std::vector<uint32_t> &vec) { vec.assign(utf8::distance(s.cbegin(), s.cend()), 0); utf8::utf8to32(s.cbegin(), s.cend(), vec.data()); } /* * Convert UTF-8 C-string to std::vector<uint32_t> */ void utf8to32(char* const s, std::vector<uint32_t> &vec) { const size_t len(strlen(s)); vec.assign(utf8::distance(s, s+len), 0); utf8::utf8to32(s, s+len, vec.data()); }
#include <cstdint> #include <cstring> #include <string> #include <vector> #include "../utf8/utf8.h" /* * Convert UTF-8 string to std::vector<uint32_t> */ void inline utf8to32(const std::string &s, std::vector<uint32_t> &vec) { vec.assign(utf8::distance(s.cbegin(), s.cend()), 0); utf8::utf8to32(s.cbegin(), s.cend(), vec.data()); } /* * Convert UTF-8 C-string to std::vector<uint32_t> */ void inline utf8to32(char* const s, std::vector<uint32_t> &vec) { const size_t len(strlen(s)); vec.assign(utf8::distance(s, s+len), 0); utf8::utf8to32(s, s+len, vec.data()); }
Use inline as a workaround so that the utf8 functions are not exported
Use inline as a workaround so that the utf8 functions are not exported
C
mit
xhochy/libfuzzymatch,xhochy/libfuzzymatch
fa9ee52556f493e4a896e2570ca1a3102d777d9a
src/policy/rbf.h
src/policy/rbf.h
// Copyright (c) 2016-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_POLICY_RBF_H #define BITCOIN_POLICY_RBF_H #include <txmempool.h> enum class RBFTransactionState { UNKNOWN, REPLACEABLE_BIP125, FINAL }; // Determine whether an in-mempool transaction is signaling opt-in to RBF // according to BIP 125 // This involves checking sequence numbers of the transaction, as well // as the sequence numbers of all in-mempool ancestors. RBFTransactionState IsRBFOptIn(const CTransaction& tx, const CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(pool.cs); RBFTransactionState IsRBFOptInEmptyMempool(const CTransaction& tx); #endif // BITCOIN_POLICY_RBF_H
// Copyright (c) 2016-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_POLICY_RBF_H #define BITCOIN_POLICY_RBF_H #include <txmempool.h> /** The rbf state of unconfirmed transactions */ enum class RBFTransactionState { /** Unconfirmed tx that does not signal rbf and is not in the mempool */ UNKNOWN, /** Either this tx or a mempool ancestor signals rbf */ REPLACEABLE_BIP125, /** Neither this tx nor a mempool ancestor signals rbf */ FINAL, }; /** * Determine whether an unconfirmed transaction is signaling opt-in to RBF * according to BIP 125 * This involves checking sequence numbers of the transaction, as well * as the sequence numbers of all in-mempool ancestors. * * @param tx The unconfirmed transaction * @param pool The mempool, which may contain the tx * * @return The rbf state */ RBFTransactionState IsRBFOptIn(const CTransaction& tx, const CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(pool.cs); RBFTransactionState IsRBFOptInEmptyMempool(const CTransaction& tx); #endif // BITCOIN_POLICY_RBF_H
Add doxygen comment to IsRBFOptIn
doc: Add doxygen comment to IsRBFOptIn
C
mit
MarcoFalke/bitcoin,AkioNak/bitcoin,GroestlCoin/GroestlCoin,dscotese/bitcoin,ElementsProject/elements,litecoin-project/litecoin,anditto/bitcoin,jamesob/bitcoin,EthanHeilman/bitcoin,jambolo/bitcoin,ajtowns/bitcoin,pataquets/namecoin-core,tecnovert/particl-core,sstone/bitcoin,domob1812/namecore,mm-s/bitcoin,jlopp/statoshi,AkioNak/bitcoin,EthanHeilman/bitcoin,ElementsProject/elements,namecoin/namecoin-core,ajtowns/bitcoin,achow101/bitcoin,mruddy/bitcoin,bitcoin/bitcoin,qtumproject/qtum,practicalswift/bitcoin,apoelstra/bitcoin,n1bor/bitcoin,mruddy/bitcoin,qtumproject/qtum,MeshCollider/bitcoin,jlopp/statoshi,pataquets/namecoin-core,lateminer/bitcoin,dscotese/bitcoin,ajtowns/bitcoin,yenliangl/bitcoin,AkioNak/bitcoin,prusnak/bitcoin,jamesob/bitcoin,achow101/bitcoin,andreaskern/bitcoin,bitcoinknots/bitcoin,kallewoof/bitcoin,mruddy/bitcoin,fanquake/bitcoin,cdecker/bitcoin,particl/particl-core,jambolo/bitcoin,practicalswift/bitcoin,MeshCollider/bitcoin,rnicoll/dogecoin,cdecker/bitcoin,MarcoFalke/bitcoin,GroestlCoin/bitcoin,namecoin/namecore,dscotese/bitcoin,prusnak/bitcoin,domob1812/namecore,prusnak/bitcoin,mm-s/bitcoin,practicalswift/bitcoin,rnicoll/bitcoin,namecoin/namecore,bitcoinsSG/bitcoin,cdecker/bitcoin,Sjors/bitcoin,ajtowns/bitcoin,GroestlCoin/GroestlCoin,jamesob/bitcoin,jonasschnelli/bitcoin,alecalve/bitcoin,anditto/bitcoin,GroestlCoin/bitcoin,jonasschnelli/bitcoin,pataquets/namecoin-core,bitcoinknots/bitcoin,JeremyRubin/bitcoin,mruddy/bitcoin,particl/particl-core,jlopp/statoshi,bitcoinsSG/bitcoin,anditto/bitcoin,AkioNak/bitcoin,mm-s/bitcoin,jamesob/bitcoin,MarcoFalke/bitcoin,fujicoin/fujicoin,practicalswift/bitcoin,jlopp/statoshi,prusnak/bitcoin,qtumproject/qtum,MeshCollider/bitcoin,pstratem/bitcoin,fanquake/bitcoin,alecalve/bitcoin,anditto/bitcoin,GroestlCoin/bitcoin,namecoin/namecore,apoelstra/bitcoin,litecoin-project/litecoin,particl/particl-core,namecoin/namecore,jonasschnelli/bitcoin,sstone/bitcoin,MarcoFalke/bitcoin,Xekyo/bitcoin,rnicoll/bitcoin,apoelstra/bitcoin,achow101/bitcoin,bitcoin/bitcoin,yenliangl/bitcoin,ElementsProject/elements,cdecker/bitcoin,sstone/bitcoin,pstratem/bitcoin,bitcoinsSG/bitcoin,kallewoof/bitcoin,rnicoll/dogecoin,namecoin/namecoin-core,instagibbs/bitcoin,rnicoll/bitcoin,yenliangl/bitcoin,lateminer/bitcoin,jlopp/statoshi,jambolo/bitcoin,tecnovert/particl-core,instagibbs/bitcoin,n1bor/bitcoin,domob1812/namecore,Xekyo/bitcoin,n1bor/bitcoin,JeremyRubin/bitcoin,pstratem/bitcoin,prusnak/bitcoin,namecoin/namecoin-core,bitcoin/bitcoin,jnewbery/bitcoin,domob1812/namecore,Xekyo/bitcoin,bitcoin/bitcoin,bitcoinknots/bitcoin,instagibbs/bitcoin,sstone/bitcoin,sipsorcery/bitcoin,yenliangl/bitcoin,apoelstra/bitcoin,dscotese/bitcoin,pstratem/bitcoin,achow101/bitcoin,particl/particl-core,kallewoof/bitcoin,anditto/bitcoin,qtumproject/qtum,MeshCollider/bitcoin,EthanHeilman/bitcoin,JeremyRubin/bitcoin,EthanHeilman/bitcoin,domob1812/bitcoin,apoelstra/bitcoin,pataquets/namecoin-core,ElementsProject/elements,particl/particl-core,bitcoinsSG/bitcoin,andreaskern/bitcoin,instagibbs/bitcoin,litecoin-project/litecoin,jnewbery/bitcoin,yenliangl/bitcoin,JeremyRubin/bitcoin,domob1812/bitcoin,lateminer/bitcoin,AkioNak/bitcoin,GroestlCoin/bitcoin,qtumproject/qtum,MarcoFalke/bitcoin,instagibbs/bitcoin,MarcoFalke/bitcoin,sstone/bitcoin,JeremyRubin/bitcoin,litecoin-project/litecoin,ajtowns/bitcoin,andreaskern/bitcoin,kallewoof/bitcoin,domob1812/bitcoin,sipsorcery/bitcoin,cdecker/bitcoin,mruddy/bitcoin,GroestlCoin/bitcoin,namecoin/namecore,pataquets/namecoin-core,jnewbery/bitcoin,n1bor/bitcoin,Xekyo/bitcoin,ElementsProject/elements,jnewbery/bitcoin,bitcoinsSG/bitcoin,kallewoof/bitcoin,jamesob/bitcoin,particl/particl-core,mm-s/bitcoin,andreaskern/bitcoin,jlopp/statoshi,alecalve/bitcoin,pstratem/bitcoin,achow101/bitcoin,litecoin-project/litecoin,domob1812/namecore,Sjors/bitcoin,Sjors/bitcoin,rnicoll/dogecoin,tecnovert/particl-core,apoelstra/bitcoin,cdecker/bitcoin,tecnovert/particl-core,ElementsProject/elements,andreaskern/bitcoin,Sjors/bitcoin,dscotese/bitcoin,achow101/bitcoin,rnicoll/bitcoin,rnicoll/dogecoin,EthanHeilman/bitcoin,lateminer/bitcoin,GroestlCoin/bitcoin,GroestlCoin/GroestlCoin,rnicoll/dogecoin,alecalve/bitcoin,tecnovert/particl-core,lateminer/bitcoin,alecalve/bitcoin,fanquake/bitcoin,AkioNak/bitcoin,litecoin-project/litecoin,pataquets/namecoin-core,n1bor/bitcoin,Xekyo/bitcoin,dscotese/bitcoin,sipsorcery/bitcoin,practicalswift/bitcoin,rnicoll/bitcoin,andreaskern/bitcoin,bitcoinknots/bitcoin,bitcoin/bitcoin,tecnovert/particl-core,jambolo/bitcoin,domob1812/namecore,mm-s/bitcoin,prusnak/bitcoin,Xekyo/bitcoin,sipsorcery/bitcoin,lateminer/bitcoin,qtumproject/qtum,bitcoin/bitcoin,fanquake/bitcoin,fujicoin/fujicoin,fujicoin/fujicoin,fujicoin/fujicoin,sipsorcery/bitcoin,namecoin/namecoin-core,namecoin/namecoin-core,qtumproject/qtum,bitcoinknots/bitcoin,fujicoin/fujicoin,jambolo/bitcoin,jnewbery/bitcoin,practicalswift/bitcoin,n1bor/bitcoin,fanquake/bitcoin,ajtowns/bitcoin,namecoin/namecore,mruddy/bitcoin,GroestlCoin/GroestlCoin,fujicoin/fujicoin,MeshCollider/bitcoin,domob1812/bitcoin,jamesob/bitcoin,GroestlCoin/GroestlCoin,jambolo/bitcoin,Sjors/bitcoin,kallewoof/bitcoin,pstratem/bitcoin,fanquake/bitcoin,EthanHeilman/bitcoin,alecalve/bitcoin,rnicoll/bitcoin,sstone/bitcoin,jonasschnelli/bitcoin,GroestlCoin/GroestlCoin,namecoin/namecoin-core,JeremyRubin/bitcoin,sipsorcery/bitcoin,bitcoinsSG/bitcoin,anditto/bitcoin,mm-s/bitcoin,domob1812/bitcoin,MeshCollider/bitcoin,yenliangl/bitcoin,domob1812/bitcoin,instagibbs/bitcoin,jonasschnelli/bitcoin
e2cd49be27b0e40467415fbc3318a5a4a5ad9161
AFToolkit/AFToolkit.h
AFToolkit/AFToolkit.h
// // Toolkit header to include the main headers of the 'AFToolkit' library. // #import "AFDefines.h" #import "AFLogHelper.h" #import "AFFileHelper.h" #import "AFPlatformHelper.h" #import "AFKVO.h" #import "AFArray.h" #import "AFMutableArray.h" #import "NSBundle+Universal.h" #import "UITableViewCell+Universal.h" #import "AFDBClient.h" #import "AFView.h" #import "AFViewController.h"
// // Toolkit header to include the main headers of the 'AFToolkit' library. // #import "AFDefines.h" #import "AFLogHelper.h" #import "AFFileHelper.h" #import "AFPlatformHelper.h" #import "AFReachability.h" #import "AFKVO.h" #import "AFArray.h" #import "AFMutableArray.h" #import "NSBundle+Universal.h" #import "UITableViewCell+Universal.h" #import "AFDBClient.h" #import "AFView.h" #import "AFViewController.h"
Add Reachability to toolkit header.
Add Reachability to toolkit header.
C
mit
mlatham/AFToolkit
8ebf7bc9546695c516859093d8db0d300d8bd23c
stdlib/public/SwiftShims/RuntimeStubs.h
stdlib/public/SwiftShims/RuntimeStubs.h
//===--- RuntimeStubs.h -----------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LICENSE.txt for license information // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// // // Misc stubs for functions which should be defined in the core standard // library, but are difficult or impossible to write in Swift at the // moment. // //===----------------------------------------------------------------------===// #ifndef SWIFT_STDLIB_SHIMS_RUNTIMESTUBS_H_ #define SWIFT_STDLIB_SHIMS_RUNTIMESTUBS_H_ #include "LibcShims.h" #ifdef __cplusplus namespace swift { extern "C" { #endif SWIFT_BEGIN_NULLABILITY_ANNOTATIONS __swift_ssize_t swift_stdlib_readLine_stdin(char * _Nullable * _Nonnull LinePtr); SWIFT_END_NULLABILITY_ANNOTATIONS #ifdef __cplusplus }} // extern "C", namespace swift #endif #endif // SWIFT_STDLIB_SHIMS_RUNTIMESTUBS_H_
//===--- RuntimeStubs.h -----------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LICENSE.txt for license information // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// // // Misc stubs for functions which should be defined in the core standard // library, but are difficult or impossible to write in Swift at the // moment. // //===----------------------------------------------------------------------===// #ifndef SWIFT_STDLIB_SHIMS_RUNTIMESTUBS_H_ #define SWIFT_STDLIB_SHIMS_RUNTIMESTUBS_H_ #include "LibcShims.h" #ifdef __cplusplus namespace swift { extern "C" { #endif SWIFT_BEGIN_NULLABILITY_ANNOTATIONS SWIFT_RUNTIME_STDLIB_INTERFACE __swift_ssize_t swift_stdlib_readLine_stdin(char * _Nullable * _Nonnull LinePtr); SWIFT_END_NULLABILITY_ANNOTATIONS #ifdef __cplusplus }} // extern "C", namespace swift #endif #endif // SWIFT_STDLIB_SHIMS_RUNTIMESTUBS_H_
Add export attribute to header declaration.
Add export attribute to header declaration.
C
apache-2.0
gribozavr/swift,djwbrown/swift,xedin/swift,calebd/swift,austinzheng/swift,lorentey/swift,gmilos/swift,shajrawi/swift,tardieu/swift,alblue/swift,roambotics/swift,rudkx/swift,IngmarStein/swift,codestergit/swift,jtbandes/swift,practicalswift/swift,manavgabhawala/swift,brentdax/swift,airspeedswift/swift,aschwaighofer/swift,tjw/swift,jmgc/swift,CodaFi/swift,parkera/swift,ahoppen/swift,practicalswift/swift,gregomni/swift,nathawes/swift,natecook1000/swift,frootloops/swift,gottesmm/swift,jmgc/swift,jckarter/swift,modocache/swift,practicalswift/swift,parkera/swift,gribozavr/swift,milseman/swift,devincoughlin/swift,JGiola/swift,tardieu/swift,gottesmm/swift,karwa/swift,hooman/swift,deyton/swift,practicalswift/swift,ben-ng/swift,shahmishal/swift,amraboelela/swift,ben-ng/swift,deyton/swift,gribozavr/swift,ben-ng/swift,amraboelela/swift,austinzheng/swift,atrick/swift,shahmishal/swift,natecook1000/swift,brentdax/swift,harlanhaskins/swift,bitjammer/swift,austinzheng/swift,jopamer/swift,danielmartin/swift,sschiau/swift,ben-ng/swift,karwa/swift,nathawes/swift,Jnosh/swift,roambotics/swift,jtbandes/swift,tinysun212/swift-windows,harlanhaskins/swift,xedin/swift,JaSpa/swift,bitjammer/swift,uasys/swift,xedin/swift,therealbnut/swift,shajrawi/swift,shahmishal/swift,benlangmuir/swift,parkera/swift,huonw/swift,lorentey/swift,gregomni/swift,manavgabhawala/swift,IngmarStein/swift,therealbnut/swift,alblue/swift,shajrawi/swift,tjw/swift,xwu/swift,benlangmuir/swift,arvedviehweger/swift,atrick/swift,allevato/swift,tjw/swift,bitjammer/swift,natecook1000/swift,swiftix/swift,JaSpa/swift,gmilos/swift,lorentey/swift,aschwaighofer/swift,rudkx/swift,bitjammer/swift,OscarSwanros/swift,milseman/swift,amraboelela/swift,manavgabhawala/swift,brentdax/swift,JGiola/swift,nathawes/swift,xedin/swift,jtbandes/swift,shahmishal/swift,calebd/swift,Jnosh/swift,tinysun212/swift-windows,devincoughlin/swift,russbishop/swift,allevato/swift,dreamsxin/swift,Jnosh/swift,Jnosh/swift,swiftix/swift,allevato/swift,uasys/swift,return/swift,felix91gr/swift,hooman/swift,shajrawi/swift,tinysun212/swift-windows,airspeedswift/swift,benlangmuir/swift,JaSpa/swift,aschwaighofer/swift,arvedviehweger/swift,practicalswift/swift,parkera/swift,sschiau/swift,deyton/swift,harlanhaskins/swift,modocache/swift,kperryua/swift,gregomni/swift,shajrawi/swift,huonw/swift,ken0nek/swift,huonw/swift,natecook1000/swift,return/swift,shajrawi/swift,ken0nek/swift,calebd/swift,bitjammer/swift,JaSpa/swift,sschiau/swift,jopamer/swift,jmgc/swift,parkera/swift,jmgc/swift,felix91gr/swift,sschiau/swift,zisko/swift,shahmishal/swift,lorentey/swift,parkera/swift,IngmarStein/swift,stephentyrone/swift,calebd/swift,devincoughlin/swift,djwbrown/swift,tinysun212/swift-windows,atrick/swift,hooman/swift,swiftix/swift,stephentyrone/swift,frootloops/swift,kperryua/swift,kstaring/swift,austinzheng/swift,ben-ng/swift,ahoppen/swift,stephentyrone/swift,tjw/swift,kstaring/swift,uasys/swift,djwbrown/swift,atrick/swift,modocache/swift,austinzheng/swift,sschiau/swift,stephentyrone/swift,gmilos/swift,practicalswift/swift,JaSpa/swift,gribozavr/swift,glessard/swift,manavgabhawala/swift,IngmarStein/swift,brentdax/swift,milseman/swift,Jnosh/swift,kperryua/swift,huonw/swift,devincoughlin/swift,nathawes/swift,deyton/swift,kstaring/swift,felix91gr/swift,russbishop/swift,jtbandes/swift,codestergit/swift,codestergit/swift,huonw/swift,gribozavr/swift,hughbe/swift,roambotics/swift,swiftix/swift,allevato/swift,sschiau/swift,hooman/swift,uasys/swift,tardieu/swift,frootloops/swift,ken0nek/swift,danielmartin/swift,kstaring/swift,shajrawi/swift,milseman/swift,milseman/swift,practicalswift/swift,karwa/swift,zisko/swift,alblue/swift,ahoppen/swift,codestergit/swift,glessard/swift,glessard/swift,allevato/swift,return/swift,Jnosh/swift,shahmishal/swift,djwbrown/swift,milseman/swift,jmgc/swift,devincoughlin/swift,uasys/swift,milseman/swift,tjw/swift,karwa/swift,natecook1000/swift,karwa/swift,jckarter/swift,rudkx/swift,austinzheng/swift,devincoughlin/swift,ahoppen/swift,xwu/swift,airspeedswift/swift,harlanhaskins/swift,CodaFi/swift,modocache/swift,atrick/swift,therealbnut/swift,JGiola/swift,kperryua/swift,airspeedswift/swift,manavgabhawala/swift,gregomni/swift,aschwaighofer/swift,OscarSwanros/swift,russbishop/swift,parkera/swift,codestergit/swift,natecook1000/swift,russbishop/swift,rudkx/swift,ben-ng/swift,IngmarStein/swift,allevato/swift,zisko/swift,jckarter/swift,CodaFi/swift,gmilos/swift,frootloops/swift,deyton/swift,ken0nek/swift,return/swift,harlanhaskins/swift,gottesmm/swift,kperryua/swift,djwbrown/swift,ahoppen/swift,swiftix/swift,stephentyrone/swift,russbishop/swift,gribozavr/swift,huonw/swift,arvedviehweger/swift,therealbnut/swift,airspeedswift/swift,jtbandes/swift,tkremenek/swift,lorentey/swift,lorentey/swift,OscarSwanros/swift,CodaFi/swift,atrick/swift,Jnosh/swift,tardieu/swift,tkremenek/swift,JGiola/swift,nathawes/swift,airspeedswift/swift,tardieu/swift,benlangmuir/swift,dreamsxin/swift,return/swift,rudkx/swift,gottesmm/swift,swiftix/swift,JGiola/swift,felix91gr/swift,shahmishal/swift,danielmartin/swift,kperryua/swift,devincoughlin/swift,swiftix/swift,lorentey/swift,xedin/swift,russbishop/swift,xwu/swift,calebd/swift,allevato/swift,brentdax/swift,alblue/swift,xwu/swift,karwa/swift,therealbnut/swift,apple/swift,jopamer/swift,roambotics/swift,jmgc/swift,arvedviehweger/swift,devincoughlin/swift,felix91gr/swift,deyton/swift,jopamer/swift,kstaring/swift,hooman/swift,roambotics/swift,danielmartin/swift,modocache/swift,uasys/swift,hughbe/swift,huonw/swift,kstaring/swift,frootloops/swift,nathawes/swift,glessard/swift,jopamer/swift,JaSpa/swift,bitjammer/swift,therealbnut/swift,ken0nek/swift,sschiau/swift,apple/swift,felix91gr/swift,aschwaighofer/swift,gregomni/swift,alblue/swift,codestergit/swift,OscarSwanros/swift,modocache/swift,hughbe/swift,jtbandes/swift,xwu/swift,harlanhaskins/swift,gottesmm/swift,CodaFi/swift,zisko/swift,tinysun212/swift-windows,danielmartin/swift,jckarter/swift,tkremenek/swift,zisko/swift,hooman/swift,benlangmuir/swift,return/swift,apple/swift,karwa/swift,hughbe/swift,hughbe/swift,shahmishal/swift,kperryua/swift,aschwaighofer/swift,gottesmm/swift,apple/swift,jmgc/swift,xedin/swift,xedin/swift,amraboelela/swift,airspeedswift/swift,tinysun212/swift-windows,hughbe/swift,gmilos/swift,stephentyrone/swift,aschwaighofer/swift,IngmarStein/swift,kstaring/swift,jckarter/swift,IngmarStein/swift,CodaFi/swift,nathawes/swift,ahoppen/swift,zisko/swift,parkera/swift,amraboelela/swift,rudkx/swift,deyton/swift,gribozavr/swift,uasys/swift,arvedviehweger/swift,jtbandes/swift,frootloops/swift,jckarter/swift,danielmartin/swift,jckarter/swift,manavgabhawala/swift,tinysun212/swift-windows,gmilos/swift,gmilos/swift,return/swift,brentdax/swift,zisko/swift,tardieu/swift,tjw/swift,benlangmuir/swift,natecook1000/swift,apple/swift,stephentyrone/swift,karwa/swift,danielmartin/swift,arvedviehweger/swift,amraboelela/swift,roambotics/swift,practicalswift/swift,sschiau/swift,arvedviehweger/swift,jopamer/swift,modocache/swift,OscarSwanros/swift,hughbe/swift,alblue/swift,codestergit/swift,therealbnut/swift,felix91gr/swift,djwbrown/swift,tkremenek/swift,tardieu/swift,xwu/swift,JaSpa/swift,xedin/swift,glessard/swift,tjw/swift,OscarSwanros/swift,JGiola/swift,ben-ng/swift,calebd/swift,OscarSwanros/swift,ken0nek/swift,gottesmm/swift,apple/swift,gregomni/swift,austinzheng/swift,tkremenek/swift,jopamer/swift,harlanhaskins/swift,alblue/swift,ken0nek/swift,hooman/swift,russbishop/swift,brentdax/swift,gribozavr/swift,amraboelela/swift,lorentey/swift,bitjammer/swift,djwbrown/swift,tkremenek/swift,CodaFi/swift,manavgabhawala/swift,glessard/swift,frootloops/swift,calebd/swift,xwu/swift,shajrawi/swift,tkremenek/swift
e1559a5b92d6db3880f6226e03aed4f5cc1182e0
src/chip8.c
src/chip8.c
#include <stdlib.h> #include "chip8.h" chip8_t * chip8_new(void) { chip8_t * self = (chip8_t *) malloc(sizeof(chip8_t)); /* The first 512 bytes are used by the interpreter. */ self->program_counter = 0x200; self->index_register = 0; self->stack_pointer = 0; self->opcode = 0; return self; } void chip8_free(chip8_t * self) { free(self); }
#include <stdlib.h> #include "chip8.h" chip8_t * chip8_new(void) { chip8_t * self = (chip8_t *) malloc(sizeof(chip8_t)); /* The first 512 bytes are used by the interpreter. */ self->program_counter = 0x200; self->index_register = 0; self->stack_pointer = 0; self->opcode = 0; return self; } void chip8_free(chip8_t * self) { free(self); }
Define the functions on one line
Define the functions on one line
C
mit
gsamokovarov/chip8.c,gsamokovarov/chip8.c
8f6c32d4d8124bd58caf7886dda3032641416ded
CCMessageWindow/Utils.h
CCMessageWindow/Utils.h
#ifndef StringUtils_h #define StringUtils_h #include <stdio.h> #include <string.h> namespace CCMessageWindow { class Utils { public: static std::string substringUTF8(const char* str, int from, int length); static std::vector<std::string> split(const std::string& input, char delimiter); static std::string replace(std::string base, std::string src, std::string dst); }; } #endif /* StringUtils_hpp */
#ifndef StringUtils_h #define StringUtils_h #include "cocos2d.h" namespace CCMessageWindow { class Utils { public: static std::string substringUTF8(const char* str, int from, int length); static std::vector<std::string> split(const std::string& input, char delimiter); static std::string replace(std::string base, std::string src, std::string dst); }; } #endif /* StringUtils_hpp */
Fix build error on Android
Fix build error on Android
C
mit
giginet/CCMessageWindow,giginet/CCMessageWindow
1a848c2eb37fc488b610ad36f562c705594b7e00
UICountingLabel.h
UICountingLabel.h
#import <Foundation/Foundation.h> #import <UIKit/UIKit.h> typedef enum { UILabelCountingMethodEaseInOut, UILabelCountingMethodEaseIn, UILabelCountingMethodEaseOut, UILabelCountingMethodLinear } UILabelCountingMethod; typedef NSString* (^UICountingLabelFormatBlock)(float value); typedef NSAttributedString* (^UICountingLabelAttributedFormatBlock)(float value); @interface UICountingLabel : UILabel @property (nonatomic, strong) NSString *format; @property (nonatomic, assign) UILabelCountingMethod method; @property (nonatomic, assign) NSTimeInterval animationDuration; @property (nonatomic, copy) UICountingLabelFormatBlock formatBlock; @property (nonatomic, copy) UICountingLabelAttributedFormatBlock attributedFormatBlock; @property (nonatomic, copy) void (^completionBlock)(); -(void)countFrom:(float)startValue to:(float)endValue; -(void)countFrom:(float)startValue to:(float)endValue withDuration:(NSTimeInterval)duration; -(void)countFromCurrentValueTo:(float)endValue; -(void)countFromCurrentValueTo:(float)endValue withDuration:(NSTimeInterval)duration; -(void)countFromZeroTo:(float)endValue; -(void)countFromZeroTo:(float)endValue withDuration:(NSTimeInterval)duration; - (CGFloat)currentValue; @end
#import <Foundation/Foundation.h> #import <UIKit/UIKit.h> typedef NS_ENUM(NSInteger, UILabelCountingMethod) { UILabelCountingMethodEaseInOut, UILabelCountingMethodEaseIn, UILabelCountingMethodEaseOut, UILabelCountingMethodLinear }; typedef NSString* (^UICountingLabelFormatBlock)(float value); typedef NSAttributedString* (^UICountingLabelAttributedFormatBlock)(float value); @interface UICountingLabel : UILabel @property (nonatomic, strong) NSString *format; @property (nonatomic, assign) UILabelCountingMethod method; @property (nonatomic, assign) NSTimeInterval animationDuration; @property (nonatomic, copy) UICountingLabelFormatBlock formatBlock; @property (nonatomic, copy) UICountingLabelAttributedFormatBlock attributedFormatBlock; @property (nonatomic, copy) void (^completionBlock)(); -(void)countFrom:(float)startValue to:(float)endValue; -(void)countFrom:(float)startValue to:(float)endValue withDuration:(NSTimeInterval)duration; -(void)countFromCurrentValueTo:(float)endValue; -(void)countFromCurrentValueTo:(float)endValue withDuration:(NSTimeInterval)duration; -(void)countFromZeroTo:(float)endValue; -(void)countFromZeroTo:(float)endValue withDuration:(NSTimeInterval)duration; - (CGFloat)currentValue; @end
Use NS_ENUM instead of enum makes more clear
Use NS_ENUM instead of enum makes more clear
C
mit
AlexanderMazaletskiy/UICountingLabel,HarrisLee/UICountingLabel,jesseclay/UICountingLabel,flovilmart/UICountingLabel,kalsariyac/UICountingLabel,ElaWorkshop/UICountingLabel,Bogon/UICountingLabel,dataxpress/UICountingLabel
4dc9c4567301f2481b12965bdcf02a7281963b61
tests/utils/core-utils.h
tests/utils/core-utils.h
/* * This file is part of meego-im-framework * * * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * Contact: Nokia Corporation (directui@nokia.com) * * If you have questions regarding the use of this file, please contact * Nokia at directui@nokia.com. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef CORE_UTILS_H__ #define CORE_UTILS_H__ #include <QString> #include <QObject> namespace MaliitTestUtils { bool isTestingInSandbox(); QString getTestPluginPath(); QString getTestDataPath(); void waitForSignal(const QObject* object, const char* signal, int timeout); void waitAndProcessEvents(int waitTime); } #endif // CORE_UTILS_H__
/* * This file is part of meego-im-framework * * * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * Contact: Nokia Corporation (directui@nokia.com) * * If you have questions regarding the use of this file, please contact * Nokia at directui@nokia.com. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef CORE_UTILS_H__ #define CORE_UTILS_H__ #include <QString> #include <QObject> #include "abstractsurfacegroup.h" #include "abstractsurfacegroupfactory.h" namespace MaliitTestUtils { bool isTestingInSandbox(); QString getTestPluginPath(); QString getTestDataPath(); void waitForSignal(const QObject* object, const char* signal, int timeout); void waitAndProcessEvents(int waitTime); class TestSurfaceGroup : public Maliit::Server::AbstractSurfaceGroup { public: TestSurfaceGroup() {} Maliit::Plugins::AbstractSurfaceFactory *factory() { return 0; } void activate() {} void deactivate() {} void setRotation(Maliit::OrientationAngle) {} }; class TestSurfaceGroupFactory : public Maliit::Server::AbstractSurfaceGroupFactory { public: TestSurfaceGroupFactory() {} QSharedPointer<Maliit::Server::AbstractSurfaceGroup> createSurfaceGroup() { return QSharedPointer<Maliit::Server::AbstractSurfaceGroup>(new TestSurfaceGroup); } }; } #endif // CORE_UTILS_H__
Add surface server side implementation for tests
Add surface server side implementation for tests Add a TestSurfaceGroup and TestSurfaceGroupFactory class for tests. RevBy: TrustMe.
C
lgpl-2.1
binlaten/framework,RHawkeyed/framework,jpetersen/framework,Elleo/framework,jpetersen/framework,RHawkeyed/framework,Elleo/framework
15ddd7987b08b24d572ad3c767fd477dfc5a3bd7
inc/m_types.h
inc/m_types.h
/*********************************** LICENSE **********************************\ * Copyright 2017 Morphux * * * * 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 M_TYPES_H # define M_TYPES_H /* Generic types */ typedef signed char s8_t; typedef signed short s16_t; typedef signed int s32_t; typedef signed long long s64_t; typedef unsigned char u8_t; typedef unsigned short u16_t; typedef unsigned int u32_t; typedef unsigned long long u64_t; #endif /* M_TYPES_H */
/*********************************** LICENSE **********************************\ * Copyright 2017 Morphux * * * * 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 M_TYPES_H # define M_TYPES_H /* Generic types */ typedef signed char s8_t; typedef signed short s16_t; typedef signed int s32_t; typedef signed long long s64_t; typedef unsigned char u8_t; typedef unsigned short u16_t; typedef unsigned int u32_t; typedef unsigned long long u64_t; #endif /* M_TYPES_H */
Fix comment style in mtypes
Fix(Comment): Fix comment style in mtypes
C
apache-2.0
Morphux/lib,Morphux/lib
bcd0f03a33b360f54b0223e64bd5dae90d3a0e2c
include/lambdacommon/document/document.h
include/lambdacommon/document/document.h
/* * Copyright © 2017 AperLambda <aper.entertainment@gmail.com> * * This file is part of λcommon. * * Licensed under the MIT license. For more information, * see the LICENSE file. */ #ifndef LAMBDACOMMON_DOCUMENT_H #define LAMBDACOMMON_DOCUMENT_H #include "../lambdacommon.h" #include <map> namespace lambdacommon { class LAMBDACOMMON_API Content {}; class LAMBDACOMMON_API Document {}; } #endif //LAMBDACOMMON_DOCUMENT_H
/* * Copyright © 2017 AperLambda <aper.entertainment@gmail.com> * * This file is part of λcommon. * * Licensed under the MIT license. For more information, * see the LICENSE file. */ #ifndef LAMBDACOMMON_DOCUMENT_H #define LAMBDACOMMON_DOCUMENT_H #include "../lambdacommon.h" #include <map> namespace lambdacommon { class LAMBDACOMMON_API Element {}; class LAMBDACOMMON_API Document {}; } #endif //LAMBDACOMMON_DOCUMENT_H
Change the Content class to the Element class
:floppy_disk: Change the Content class to the Element class
C
mit
AperEntertainment/AperCommon,AperEntertainment/AperCommon
b00e6535be25fca1e9775951bd09542fdb88ce7d
libyaul/common/internal_exception_show.c
libyaul/common/internal_exception_show.c
/* * Copyright (c) 2012-2016 Israel Jacquez * See LICENSE for details. * * Israel Jacquez <mrkotfw@gmail.com> */ #include <stdlib.h> #include <vdp1.h> #include <vdp2.h> #include <vdp2/tvmd.h> #include <vdp2/vram.h> #include <cons.h> void __noreturn internal_exception_show(const char *buffer) { /* Reset the VDP1 */ vdp1_init(); /* Reset the VDP2 */ vdp2_init(); vdp2_tvmd_display_res_set(TVMD_INTERLACE_NONE, TVMD_HORZ_NORMAL_A, TVMD_VERT_224); vdp2_scrn_back_screen_color_set(VRAM_ADDR_4MBIT(0, 0x01FFFE), COLOR_RGB555(0, 7, 0)); vdp2_tvmd_display_set(); cons_init(CONS_DRIVER_VDP2, 40, 28); cons_buffer(buffer); vdp2_tvmd_vblank_out_wait(); vdp2_tvmd_vblank_in_wait(); vdp2_commit(); cons_flush(); abort(); }
/* * Copyright (c) 2012-2016 Israel Jacquez * See LICENSE for details. * * Israel Jacquez <mrkotfw@gmail.com> */ #include <stdlib.h> #include <vdp1.h> #include <vdp2.h> #include <vdp2/tvmd.h> #include <vdp2/vram.h> #include <cons.h> void __noreturn internal_exception_show(const char *buffer) { /* Reset the VDP1 */ vdp1_init(); /* Reset the VDP2 */ vdp2_init(); vdp2_tvmd_display_res_set(TVMD_INTERLACE_NONE, TVMD_HORZ_NORMAL_A, TVMD_VERT_224); vdp2_scrn_back_screen_color_set(VRAM_ADDR_4MBIT(0, 0x01FFFE), COLOR_RGB555(0, 7, 0)); /* Set sprite to type 0 and set its priority to 0 (invisible) */ vdp2_sprite_type_set(0); vdp2_sprite_priority_set(0, 0); vdp2_tvmd_display_set(); cons_init(CONS_DRIVER_VDP2, 40, 28); cons_buffer(buffer); vdp2_tvmd_vblank_out_wait(); vdp2_tvmd_vblank_in_wait(); vdp2_commit(); cons_flush(); abort(); }
Hide VDP1 even if FB hasn't been erased and changed
Hide VDP1 even if FB hasn't been erased and changed
C
mit
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
0773e72754c7ec546ccf0a93bf6b4b321fc7899e
windows/dirent.h
windows/dirent.h
#ifndef _TOKU_DIRENT_H #define _TOKU_DIRENT_H #if defined(__cplusplus) extern "C" { #endif //The DIR functions do not exist in windows, but the Linux API ends up //just using a wrapper. We might convert these into an toku_os_* type api. enum { DT_UNKNOWN = 0, DT_DIR = 4, DT_REG = 8 }; struct dirent { char d_name[_MAX_PATH]; unsigned char d_type; }; struct __toku_windir; typedef struct __toku_windir DIR; DIR *opendir(const char *name); struct dirent *readdir(DIR *dir); int closedir(DIR *dir); #ifndef NAME_MAX #define NAME_MAX 255 #endif #if defined(__cplusplus) }; #endif #endif
#ifndef _TOKU_DIRENT_H #define _TOKU_DIRENT_H #include "toku_os_types.h" #if defined(__cplusplus) extern "C" { #endif //The DIR functions do not exist in windows, but the Linux API ends up //just using a wrapper. We might convert these into an toku_os_* type api. enum { DT_UNKNOWN = 0, DT_DIR = 4, DT_REG = 8 }; struct dirent { char d_name[_MAX_PATH]; unsigned char d_type; }; struct __toku_windir; typedef struct __toku_windir DIR; DIR *opendir(const char *name); struct dirent *readdir(DIR *dir); int closedir(DIR *dir); #ifndef NAME_MAX #define NAME_MAX 255 #endif #if defined(__cplusplus) }; #endif #endif
Fix broken windows build due to r19902 (merge of 2499d branch)
[t:2499] Fix broken windows build due to r19902 (merge of 2499d branch) git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@19935 c7de825b-a66e-492c-adef-691d508d4ae1
C
lgpl-2.1
natsys/mariadb_10.2,natsys/mariadb_10.2,ollie314/server,natsys/mariadb_10.2,kuszmaul/PerconaFT,flynn1973/mariadb-aix,davidl-zend/zenddbi,kuszmaul/PerconaFT-tmp,davidl-zend/zenddbi,ottok/PerconaFT,ollie314/server,slanterns/server,BohuTANG/ft-index,percona/PerconaFT,BohuTANG/ft-index,davidl-zend/zenddbi,ollie314/server,kuszmaul/PerconaFT-tmp,ollie314/server,ollie314/server,natsys/mariadb_10.2,davidl-zend/zenddbi,ollie314/server,BohuTANG/ft-index,flynn1973/mariadb-aix,flynn1973/mariadb-aix,davidl-zend/zenddbi,flynn1973/mariadb-aix,ollie314/server,natsys/mariadb_10.2,davidl-zend/zenddbi,ollie314/server,ottok/PerconaFT,percona/PerconaFT,natsys/mariadb_10.2,davidl-zend/zenddbi,davidl-zend/zenddbi,natsys/mariadb_10.2,kuszmaul/PerconaFT-tmp,natsys/mariadb_10.2,davidl-zend/zenddbi,ollie314/server,ottok/PerconaFT,flynn1973/mariadb-aix,percona/PerconaFT,percona/PerconaFT,flynn1973/mariadb-aix,natsys/mariadb_10.2,flynn1973/mariadb-aix,kuszmaul/PerconaFT-tmp,ottok/PerconaFT,natsys/mariadb_10.2,natsys/mariadb_10.2,flynn1973/mariadb-aix,kuszmaul/PerconaFT,flynn1973/mariadb-aix,kuszmaul/PerconaFT,flynn1973/mariadb-aix,ollie314/server,davidl-zend/zenddbi,davidl-zend/zenddbi,BohuTANG/ft-index,flynn1973/mariadb-aix,ollie314/server,kuszmaul/PerconaFT
05fd893ea40718a0f0f81246425dfcb4b711642c
drivers/auth/mbedtls/mbedtls_common.c
drivers/auth/mbedtls/mbedtls_common.c
/* * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <debug.h> /* mbed TLS headers */ #include <mbedtls/memory_buffer_alloc.h> #include <mbedtls/platform.h> /* * mbed TLS heap */ #if (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_ECDSA) #define MBEDTLS_HEAP_SIZE (14*1024) #elif (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA) #define MBEDTLS_HEAP_SIZE (8*1024) #endif static unsigned char heap[MBEDTLS_HEAP_SIZE]; /* * mbed TLS initialization function */ void mbedtls_init(void) { static int ready; if (!ready) { /* Initialize the mbed TLS heap */ mbedtls_memory_buffer_alloc_init(heap, MBEDTLS_HEAP_SIZE); /* Use reduced version of snprintf to save space. */ mbedtls_platform_set_snprintf(tf_snprintf); ready = 1; } }
/* * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <debug.h> /* mbed TLS headers */ #include <mbedtls/memory_buffer_alloc.h> #include <mbedtls/platform.h> /* * mbed TLS heap */ #if (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_ECDSA) #define MBEDTLS_HEAP_SIZE (14*1024) #elif (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA) #define MBEDTLS_HEAP_SIZE (6*1024) #endif static unsigned char heap[MBEDTLS_HEAP_SIZE]; /* * mbed TLS initialization function */ void mbedtls_init(void) { static int ready; if (!ready) { /* Initialize the mbed TLS heap */ mbedtls_memory_buffer_alloc_init(heap, MBEDTLS_HEAP_SIZE); /* Use reduced version of snprintf to save space. */ mbedtls_platform_set_snprintf(tf_snprintf); ready = 1; } }
Define optimized mbed TLS heap size
mbedtls: Define optimized mbed TLS heap size mbed TLS provides the debug API `mbedtls_memory_buffer_alloc_status()` to analyse the RAM usage of the library. When RSA is selected as algorithm, the maximum heap usage in FVP and Juno has been determined empirically to be approximately 5.5 KiB. However, The default heap size used when RSA is selected is 8 KiB. This patch reduces the buffer from 8 KiB to 6 KiB so that the BSS sections of both BL1 and BL2 are 2 KiB smaller when the firmware is compiled with TBB support. Change-Id: I43878a4e7af50c97be9c8d027c728c8483f24fbf Signed-off-by: Antonio Nino Diaz <5c24ff39be768bf31f4deee44042a11772cfd02a@arm.com>
C
bsd-3-clause
achingupta/arm-trusted-firmware,achingupta/arm-trusted-firmware,lsigithub/arm-trusted-firmware_public,lsigithub/arm-trusted-firmware_public
758d5af6abf26753054ae0662395b27ff4ab2221
src/lz4mt_compat.h
src/lz4mt_compat.h
#ifndef LZ4MT_COMPAT_H #define LZ4MT_COMPAT_H namespace Lz4Mt { unsigned getHardwareConcurrency(); struct launch { #if defined(_MSC_VER) typedef std::launch::launch Type; #else typedef std::launch Type; #endif static const Type deferred; static const Type async; }; } #endif
#ifndef LZ4MT_COMPAT_H #define LZ4MT_COMPAT_H namespace Lz4Mt { unsigned getHardwareConcurrency(); struct launch { #if defined(_MSC_VER) && (_MSC_VER <= 1700) typedef std::launch::launch Type; #else typedef std::launch Type; #endif static const Type deferred; static const Type async; }; } #endif
Fix compile error with VC++2013 preview
Fix compile error with VC++2013 preview
C
bsd-2-clause
rgde/lz4mt,tempbottle/lz4mt,t-mat/lz4mt,t-mat/lz4mt,tempbottle/lz4mt,rgde/lz4mt,t-mat/lz4mt
11fb3304ba88fa84e2349c08f73b4ffaf0a8fd89
OctoKit/OctoKit.h
OctoKit/OctoKit.h
// // OctoKit.h // OctoKit // // Created by Piet Brauer on 25/08/15. // Copyright (c) 2015 nerdish by nature. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for OctoKit. FOUNDATION_EXPORT double OctoKitVersionNumber; //! Project version string for OctoKit. FOUNDATION_EXPORT const unsigned char OctoKitVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <OctoKit/PublicHeader.h>
// // OctoKit.h // OctoKit // // Created by Piet Brauer on 25/08/15. // Copyright (c) 2015 nerdish by nature. All rights reserved. // #import <Foundation/Foundation.h> //! Project version number for OctoKit. FOUNDATION_EXPORT double OctoKitVersionNumber; //! Project version string for OctoKit. FOUNDATION_EXPORT const unsigned char OctoKitVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <OctoKit/PublicHeader.h>
Use Foundation instead of UIKit
Use Foundation instead of UIKit
C
mit
nerdishbynature/octokit.swift,nerdishbynature/octokit.swift,nerdishbynature/octokit.swift,phatblat/octokit.swift,phatblat/octokit.swift
68584771ffe6608ed50dcb8f7e414d9ba6bcafa4
src/api-mock.h
src/api-mock.h
#ifndef APIMOCK_H #define APIMOCK_H #include "core/server.h" #endif
#ifndef APIMOCK_H #define APIMOCK_H #include "core/server.h" #include "core/exceptions.h" #endif
Include exceptions in main header
Include exceptions in main header
C
mit
Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock
4bd45e4d59931a8aa4873f40ddb77b5142fb175f
src/bin/e_signals.c
src/bin/e_signals.c
/* * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 */ #include "e.h" #include <execinfo.h> /* a tricky little devil, requires e and it's libs to be built * with the -rdynamic flag to GCC for any sort of decent output. */ void e_sigseg_act(int x, siginfo_t *info, void *data){ void *array[255]; size_t size; write(2, "**** SEGMENTATION FAULT ****\n", 29); write(2, "**** Printing Backtrace... *****\n\n", 34); size = backtrace(array, 255); backtrace_symbols_fd(array, size, 2); exit(-11); }
/* * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 * NOTE TO FreeBSD users. Install libexecinfo from * ports/devel/libexecinfo and add -lexecinfo to LDFLAGS * to add backtrace support. */ #include "e.h" #include <execinfo.h> /* a tricky little devil, requires e and it's libs to be built * with the -rdynamic flag to GCC for any sort of decent output. */ void e_sigseg_act(int x, siginfo_t *info, void *data){ void *array[255]; size_t size; write(2, "**** SEGMENTATION FAULT ****\n", 29); write(2, "**** Printing Backtrace... *****\n\n", 34); size = backtrace(array, 255); backtrace_symbols_fd(array, size, 2); exit(-11); }
Add note to help FreeBSD users.
Add note to help FreeBSD users.
C
bsd-2-clause
jordemort/e17,jordemort/e17,jordemort/e17
0a2825db5a26372454d53fc20a877e0e0bc82123
libipc/ipcreg_internal.h
libipc/ipcreg_internal.h
//===-- ipcreg_internal.h -------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // Internal types and data for IPC registration logic // //===----------------------------------------------------------------------===// #ifndef _IPCREG_INTERNAL_H_ #define _IPCREG_INTERNAL_H_ #include "ipcd.h" #include <assert.h> typedef enum { STATE_UNOPT = 0, STATE_ID_EXCHANGE, STATE_OPTIMIZED, STATE_LOCALFD } EndpointState; typedef struct { size_t bytes_trans; int localfd; endpoint ep; EndpointState state; bool valid; } ipc_info; // For now, just index directly into pre-allocate table with fd. // We will also need a way to go from nonce to fd! const unsigned TABLE_SIZE = 1 << 10; extern ipc_info IpcDescTable[TABLE_SIZE]; static inline char inbounds_fd(int fd) { return (unsigned)fd <= TABLE_SIZE; } static inline ipc_info *getFDDesc(int fd) { assert(inbounds_fd(fd)); return &IpcDescTable[fd]; } #endif // _IPCREG_INTERNAL_H_
//===-- ipcreg_internal.h -------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // Internal types and data for IPC registration logic // //===----------------------------------------------------------------------===// #ifndef _IPCREG_INTERNAL_H_ #define _IPCREG_INTERNAL_H_ #include "ipcd.h" #include <assert.h> typedef enum { STATE_UNOPT = 0, STATE_ID_EXCHANGE, STATE_OPTIMIZED, STATE_LOCALFD } EndpointState; typedef struct { size_t bytes_trans; int localfd; endpoint ep; EndpointState state; bool valid; } ipc_info; // For now, just index directly into pre-allocate table with fd. // We will also need a way to go from nonce to fd! const unsigned TABLE_SIZE = 1 << 10; extern ipc_info IpcDescTable[TABLE_SIZE]; static inline char inbounds_fd(int fd) { return (unsigned)fd <= TABLE_SIZE; } static inline ipc_info *getFDDesc(int fd) { if (!inbounds_fd(fd)) { ipclog("Attempt to access out-of-bounds fd: %d (TABLE_SIZE=%u)\n", fd, TABLE_SIZE); } assert(inbounds_fd(fd)); return &IpcDescTable[fd]; } #endif // _IPCREG_INTERNAL_H_
Extend assert in getFDDesc to print invalid fd.
Extend assert in getFDDesc to print invalid fd. Helps debug issues like one fixed by previous commit.
C
isc
dtzWill/ipcopter,dtzWill/ipcopter,dtzWill/ipcopter,dtzWill/ipcopter,dtzWill/ipcopter,dtzWill/ipcopter
6521caab4016e59941bb8c97ace364f83b34ba9c
src/modules/conf_randr/e_smart_monitor.h
src/modules/conf_randr/e_smart_monitor.h
#ifdef E_TYPEDEFS #else # ifndef E_SMART_MONITOR_H # define E_SMART_MONITOR_H # endif #endif
#ifdef E_TYPEDEFS #else # ifndef E_SMART_MONITOR_H # define E_SMART_MONITOR_H Evas_Object *e_smart_monitor_add(Evas *evas); # endif #endif
Add header function for creating new monitors.
Add header function for creating new monitors. Signed-off-by: Christopher Michael <cp.michael@samsung.com> SVN revision: 84123
C
bsd-2-clause
rvandegrift/e,tasn/enlightenment,tizenorg/platform.upstream.enlightenment,FlorentRevest/Enlightenment,FlorentRevest/Enlightenment,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment,rvandegrift/e,tasn/enlightenment,tizenorg/platform.upstream.enlightenment,tasn/enlightenment,rvandegrift/e
72caa3963e9d0ef6b47774f9b9a7a0de83634ec4
src/trace_processor/types/version_number.h
src/trace_processor/types/version_number.h
/* * Copyright (C) 2019 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 SRC_TRACE_PROCESSOR_TYPES_VERSION_NUMBER_H_ #define SRC_TRACE_PROCESSOR_TYPES_VERSION_NUMBER_H_ #include <tuple> namespace perfetto { namespace trace_processor { struct VersionNumber { uint32_t major; uint32_t minor; bool operator==(const VersionNumber& other) { return std::tie(major, minor) == std::tie(other.major, other.minor); } bool operator<(const VersionNumber& other) { return std::tie(major, minor) < std::tie(other.major, other.minor); } bool operator>=(const VersionNumber& other) { return std::tie(major, minor) >= std::tie(other.major, other.minor); } }; } // namespace trace_processor } // namespace perfetto #endif // SRC_TRACE_PROCESSOR_TYPES_VERSION_NUMBER_H_
/* * Copyright (C) 2019 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 SRC_TRACE_PROCESSOR_TYPES_VERSION_NUMBER_H_ #define SRC_TRACE_PROCESSOR_TYPES_VERSION_NUMBER_H_ #include <tuple> namespace perfetto { namespace trace_processor { struct VersionNumber { uint32_t major; uint32_t minor; bool operator==(const VersionNumber& other) const { return std::tie(major, minor) == std::tie(other.major, other.minor); } bool operator<(const VersionNumber& other) const { return std::tie(major, minor) < std::tie(other.major, other.minor); } bool operator>=(const VersionNumber& other) const { return std::tie(major, minor) >= std::tie(other.major, other.minor); } }; } // namespace trace_processor } // namespace perfetto #endif // SRC_TRACE_PROCESSOR_TYPES_VERSION_NUMBER_H_
Fix VersionNumber comparison operator constness
Fix VersionNumber comparison operator constness Currently Perfetto builds are broken in Chromium. Change-Id: I09b2e29682667e6dfecc36ea072327dd51f5e071
C
apache-2.0
google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto
0de12dcf3dde407ceaff96b28c2b292a3aa463e2
Classes/APIRouter.h
Classes/APIRouter.h
// // APIRouter.h // APIClient // // Created by Klaas Pieter Annema on 14-09-13. // Copyright (c) 2013 Klaas Pieter Annema. All rights reserved. // #import <Foundation/Foundation.h> #import "APIInflector.h" @protocol APIRouter <NSObject> @property (nonatomic, readonly, strong) id<APIInflector> inflector; - (NSString *)pathForAction:(NSString *)action onResource:(Class)resource; @end @interface APIRouter : NSObject <APIRouter> - (id)initWithInflector:(id<APIInflector>)inflector; - (NSString *)pathForAction:(NSString *)action onResource:(Class)resource; @end
// // APIRouter.h // APIClient // // Created by Klaas Pieter Annema on 14-09-13. // Copyright (c) 2013 Klaas Pieter Annema. All rights reserved. // #import <Foundation/Foundation.h> #import "APIInflector.h" @protocol APIRouter <NSObject> - (NSString *)pathForAction:(NSString *)action onResource:(Class)resource; @end @interface APIRouter : NSObject <APIRouter> @property (nonatomic, readonly, strong) id<APIInflector> inflector; - (id)initWithInflector:(id<APIInflector>)inflector; - (NSString *)pathForAction:(NSString *)action onResource:(Class)resource; @end
Remove the inflector from the router protocol
Remove the inflector from the router protocol
C
mit
klaaspieter/APIClient
8c75289033623c366a6949adfabe4cdcf550d4ac
tests/Tests.h
tests/Tests.h
#pragma once #if defined(_MSC_VER) #define DLL_API __declspec(dllexport) #define STDCALL __stdcall #define CDECL __cdecl #else #define DLL_API __attribute__ ((visibility ("default"))) #define STDCALL __attribute__((stdcall)) #define CDECL __attribute__((cdecl)) #endif #define CS_OUT
#pragma once #if defined(_MSC_VER) #define DLL_API __declspec(dllexport) #ifndef STDCALL #define STDCALL __stdcall #endif #ifndef CDECL #define CDECL __cdecl #endif #else #define DLL_API __attribute__ ((visibility ("default"))) #ifndef STDCALL #define STDCALL __attribute__((stdcall)) #endif #ifndef CDECL #define CDECL __attribute__((cdecl)) #endif #endif #define CS_OUT
Check for defines before defining to get rid of some warnings.
Check for defines before defining to get rid of some warnings.
C
mit
xistoso/CppSharp,mohtamohit/CppSharp,zillemarco/CppSharp,inordertotest/CppSharp,xistoso/CppSharp,imazen/CppSharp,mono/CppSharp,imazen/CppSharp,SonyaSa/CppSharp,Samana/CppSharp,xistoso/CppSharp,genuinelucifer/CppSharp,mohtamohit/CppSharp,mono/CppSharp,ktopouzi/CppSharp,inordertotest/CppSharp,Samana/CppSharp,imazen/CppSharp,ktopouzi/CppSharp,txdv/CppSharp,mydogisbox/CppSharp,genuinelucifer/CppSharp,inordertotest/CppSharp,genuinelucifer/CppSharp,u255436/CppSharp,ddobrev/CppSharp,txdv/CppSharp,SonyaSa/CppSharp,u255436/CppSharp,KonajuGames/CppSharp,inordertotest/CppSharp,nalkaro/CppSharp,xistoso/CppSharp,u255436/CppSharp,imazen/CppSharp,nalkaro/CppSharp,u255436/CppSharp,genuinelucifer/CppSharp,KonajuGames/CppSharp,nalkaro/CppSharp,nalkaro/CppSharp,zillemarco/CppSharp,KonajuGames/CppSharp,mono/CppSharp,Samana/CppSharp,SonyaSa/CppSharp,zillemarco/CppSharp,mono/CppSharp,SonyaSa/CppSharp,mohtamohit/CppSharp,Samana/CppSharp,KonajuGames/CppSharp,ddobrev/CppSharp,zillemarco/CppSharp,mydogisbox/CppSharp,mydogisbox/CppSharp,ddobrev/CppSharp,SonyaSa/CppSharp,u255436/CppSharp,mohtamohit/CppSharp,imazen/CppSharp,txdv/CppSharp,ktopouzi/CppSharp,Samana/CppSharp,mydogisbox/CppSharp,xistoso/CppSharp,KonajuGames/CppSharp,mohtamohit/CppSharp,ddobrev/CppSharp,zillemarco/CppSharp,txdv/CppSharp,mono/CppSharp,ktopouzi/CppSharp,genuinelucifer/CppSharp,mydogisbox/CppSharp,inordertotest/CppSharp,nalkaro/CppSharp,txdv/CppSharp,ktopouzi/CppSharp,mono/CppSharp,ddobrev/CppSharp
846e6f3b71fcf9fca2df36c101e6de2d080dcb83
PHPHub/Constants/SecretConstant.example.h
PHPHub/Constants/SecretConstant.example.h
// // SecretConstant.example.h // PHPHub // // Created by Aufree on 9/30/15. // Copyright (c) 2015 ESTGroup. All rights reserved. // #define Client_id @"kHOugsx4dmcXwvVbmLkd" #define Client_secret @"PuuFCrF94MloSbSkxpwS" #define UMENG_APPKEY @"Set up UMEng App Key" #define UMENG_QQ_ID @"Set up qq id" #define UMENG_QQ_APPKEY @"Set up qq appkey" #define WX_APP_ID @"Set up weixin app id" #define WX_APP_SECRET @"Set up weixin app secret" #define TRACKING_ID @"Set up google anlytics tracking id"
// // SecretConstant.example.h // PHPHub // // Created by Aufree on 9/30/15. // Copyright (c) 2015 ESTGroup. All rights reserved. // #if DEBUG #define Client_id @"kHOugsx4dmcXwvVbmLkd" #define Client_secret @"PuuFCrF94MloSbSkxpwS" #else #define Client_id @"Set up a client id for production env" #define Client_secret @"Set up a client secret for production env" #endif #define UMENG_APPKEY @"Set up UMEng App Key" #define UMENG_QQ_ID @"Set up qq id" #define UMENG_QQ_APPKEY @"Set up qq appkey" #define WX_APP_ID @"Set up weixin app id" #define WX_APP_SECRET @"Set up weixin app secret" #define TRACKING_ID @"Set up google anlytics tracking id"
Set up a client id and a client secret for production environment
Set up a client id and a client secret for production environment
C
mit
Aufree/phphub-ios
b70923c9dc77371c24b3d2183b0573969602eca0
Source/Pester_Prefix.h
Source/Pester_Prefix.h
// // Prefix header for all source files of the 'Pester' target in the 'Pester' project // #import "NJROperatingSystemVersion.h"
// // Prefix header for all source files of the 'Pester' target in the 'Pester' project // #ifdef __OBJC__ #import <Cocoa/Cocoa.h> #import "NJROperatingSystemVersion.h" #endif
Fix Pester prefix header to import Cocoa again.
Fix Pester prefix header to import Cocoa again.
C
bsd-2-clause
ssp/Pester,ssp/Pester,ssp/Pester,ssp/Pester,nriley/Pester,ssp/Pester,nriley/Pester
37a155226210640f16018e1033d4769b2fb36909
gitst.c
gitst.c
#include <stdio.h> #include "lib/proc.h" int main(int argc, char **argv) { char* gitbuff; int out = run_proc(&gitbuff, "git", "branch", "--list", 0); //int out = run_proc(&gitbuff, "ls", "-l", "-h", 0); if (out != 0) { fprintf(stderr, "Error running subprocess:%d\n", out); exit(1); } //printf("run_proc exit code = %d\nresponse= '''%s'''\n", out, gitbuff); char *br; br = gitbuff; putchar('('); while(*br++ != '*') {} // skip the '*' and the space after it br++; while(*br != '\n') { putchar(*br++); } putchar(')'); putchar('\n'); }
#include <stdio.h> #include <string.h> #include "lib/proc.h" int main(int argc, char **argv) { char* gitbuff; int out = run_proc(&gitbuff, "git", "branch", "--list", 0); if (out != 0) { exit(1); } char *token; char *sep=" \r\n"; int next = 0; while((token = strsep(&gitbuff, sep)) != NULL) { if (token[0] == '*') { token = strsep(&gitbuff, sep); printf("(%s)", token); break; } } return 0; }
Use strsep to split output
Use strsep to split output
C
bsd-3-clause
wnh/prompt_utils
0dc3d4785076cad20dfc015c32a6d656ec9b1b68
PodioKit/Common/Core/PKTHTTPClient.h
PodioKit/Common/Core/PKTHTTPClient.h
// // PKTClient.h // PodioKit // // Created by Sebastian Rehnby on 16/01/14. // Copyright (c) 2014 Citrix Systems, Inc. All rights reserved. // #import "PKTRequest.h" #import "PKTResponse.h" #import "PKTRequestSerializer.h" #import "PKTResponseSerializer.h" typedef void(^PKTRequestCompletionBlock)(PKTResponse *response, NSError *error); @interface PKTHTTPClient : NSObject @property (nonatomic, copy, readonly) NSURL *baseURL; @property (nonatomic, strong, readonly) PKTRequestSerializer *requestSerializer; @property (nonatomic, strong, readonly) PKTResponseSerializer *responseSerializer; /** * Controls whether or not to pin the server public key to that of any .cer certificate included in the app bundle. */ @property (nonatomic) BOOL useSSLPinning; - (NSURLSessionTask *)taskForRequest:(PKTRequest *)request completion:(PKTRequestCompletionBlock)completion; @end
// // PKTClient.h // PodioKit // // Created by Sebastian Rehnby on 16/01/14. // Copyright (c) 2014 Citrix Systems, Inc. All rights reserved. // #import "PKTRequest.h" #import "PKTResponse.h" #import "PKTRequestSerializer.h" #import "PKTResponseSerializer.h" typedef void(^PKTRequestCompletionBlock)(PKTResponse *response, NSError *error); @interface PKTHTTPClient : NSObject @property (nonatomic, copy) NSURL *baseURL; @property (nonatomic, strong, readonly) PKTRequestSerializer *requestSerializer; @property (nonatomic, strong, readonly) PKTResponseSerializer *responseSerializer; /** * Controls whether or not to pin the server public key to that of any .cer certificate included in the app bundle. */ @property (nonatomic) BOOL useSSLPinning; - (NSURLSessionTask *)taskForRequest:(PKTRequest *)request completion:(PKTRequestCompletionBlock)completion; @end
Add ability to set base URL
Add ability to set base URL
C
mit
podio/podio-objc,shelsonjava/podio-objc,shelsonjava/podio-objc,podio/podio-objc,shelsonjava/podio-objc,podio/podio-objc
ac11de6c4775bb08fbdfbf35536dc39a425508f0
iserv/cbits/iservmain.c
iserv/cbits/iservmain.c
#include "../rts/PosixSource.h" #include "Rts.h" #include "HsFFI.h" int main (int argc, char *argv[]) { RtsConfig conf = defaultRtsConfig; // We never know what symbols GHC will look up in the future, so // we must retain CAFs for running interpreted code. conf.keep_cafs = 1; extern StgClosure ZCMain_main_closure; hs_main(argc, argv, &ZCMain_main_closure, conf); }
#include "../rts/PosixSource.h" #include "Rts.h" #include "HsFFI.h" int main (int argc, char *argv[]) { RtsConfig conf = defaultRtsConfig; // We never know what symbols GHC will look up in the future, so // we must retain CAFs for running interpreted code. conf.keep_cafs = 1; conf.rts_opts_enabled = RtsOptsAll; extern StgClosure ZCMain_main_closure; hs_main(argc, argv, &ZCMain_main_closure, conf); }
Allow all RTS options to iserv
Allow all RTS options to iserv (cherry picked from commit db121b2ec4596b99fed9781ec2d055f29e0d5b20)
C
bsd-3-clause
GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc
f6de960fb76ab36550a119b1465e8a24e59af219
plat/rpi3/rpi3_stack_protector.c
plat/rpi3/rpi3_stack_protector.c
/* * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <stdint.h> #include <lib/utils.h> #include "rpi3_private.h" /* Get 128 bits of entropy and fuse the values together to form the canary. */ #define TRNG_NBYTES 16U u_register_t plat_get_stack_protector_canary(void) { size_t i; u_register_t buf[TRNG_NBYTES / sizeof(u_register_t)]; u_register_t ret = 0U; rpi3_rng_read(buf, sizeof(buf)); for (i = 0U; i < ARRAY_SIZE(buf); i++) ret ^= buf[i]; return ret; }
/* * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <stdint.h> #include <lib/utils.h> #include <lib/utils_def.h> #include "rpi3_private.h" /* Get 128 bits of entropy and fuse the values together to form the canary. */ #define TRNG_NBYTES 16U u_register_t plat_get_stack_protector_canary(void) { size_t i; u_register_t buf[TRNG_NBYTES / sizeof(u_register_t)]; u_register_t ret = 0U; rpi3_rng_read(buf, sizeof(buf)); for (i = 0U; i < ARRAY_SIZE(buf); i++) ret ^= buf[i]; return ret; }
Fix compilation error when stack protector is enabled
rpi3: Fix compilation error when stack protector is enabled Include necessary header file to use ARRAY_SIZE() macro Change-Id: I5b7caccd02c14c598b7944cf4f347606c1e7a8e7 Signed-off-by: Madhukar Pappireddy <c854e377c0ff08e0fa4357b6357bedff114c98a6@arm.com>
C
bsd-3-clause
achingupta/arm-trusted-firmware,achingupta/arm-trusted-firmware
6dab1e9536c81bb9848c806faf4d0eb80cc48ca4
src/file-events/headers/jni_support.h
src/file-events/headers/jni_support.h
#pragma once #include <jni.h> /** * Support for using JNI in a multi-threaded environment. */ class JniSupport { public: JniSupport(JavaVM* jvm); JniSupport(JNIEnv* env); protected: jclass findClass(const char* className); JNIEnv* getThreadEnv(); protected: JavaVM* jvm; }; /** * Attach a native thread to JNI. */ class JniThreadAttacher : public JniSupport { public: JniThreadAttacher(JavaVM* jvm, const char* name, bool daemon); ~JniThreadAttacher(); };
#pragma once #include <jni.h> #include <stdexcept> /** * Support for using JNI in a multi-threaded environment. */ class JniSupport { public: JniSupport(JavaVM* jvm); JniSupport(JNIEnv* env); protected: jclass findClass(const char* className); JNIEnv* getThreadEnv(); protected: JavaVM* jvm; }; /** * Attach a native thread to JNI. */ class JniThreadAttacher : public JniSupport { public: JniThreadAttacher(JavaVM* jvm, const char* name, bool daemon); ~JniThreadAttacher(); };
Add include necessary on Linux
Add include necessary on Linux
C
apache-2.0
adammurdoch/native-platform,adammurdoch/native-platform,adammurdoch/native-platform,adammurdoch/native-platform
cc74b1067d791ce7f765eba8b67e2d1000c2cfcb
src/condor_c++_util/directory.h
src/condor_c++_util/directory.h
#ifndef DIRECTORY_H #define DIRECTORY_H #if defined (ULTRIX42) || defined(ULTRIX43) /* _POSIX_SOURCE should have taken care of this, */ #define __POSIX /* but for some reason the ULTRIX version of dirent.h */ #endif /* is not POSIX conforming without it... */ #include <dirent.h> class Directory { public: Directory( const char *name ); ~Directory(); void Rewind(); char *Next(); private: DIR *dirp; }; #endif
#ifndef DIRECTORY_H #define DIRECTORY_H #if defined (ULTRIX42) || defined(ULTRIX43) /* _POSIX_SOURCE should have taken care of this, but for some reason the ULTRIX version of dirent.h is not POSIX conforming without it... */ # define __POSIX #endif #include <dirent.h> #if defined(SUNOS41) /* Note that function seekdir() is not required by POSIX, but the sun implementation of rewinddir() (which is required by POSIX) is a macro utilizing seekdir(). Thus we need the prototype. */ extern "C" void seekdir( DIR *dirp, int loc ); #endif class Directory { public: Directory( const char *name ); ~Directory(); void Rewind(); char *Next(); private: DIR *dirp; }; #endif
Add prototype for seekdir() for Suns.
Add prototype for seekdir() for Suns.
C
apache-2.0
htcondor/htcondor,clalancette/condor-dcloud,djw8605/htcondor,djw8605/htcondor,djw8605/condor,mambelli/osg-bosco-marco,neurodebian/htcondor,djw8605/htcondor,djw8605/htcondor,htcondor/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,htcondor/htcondor,zhangzhehust/htcondor,htcondor/htcondor,htcondor/htcondor,djw8605/htcondor,clalancette/condor-dcloud,djw8605/condor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,zhangzhehust/htcondor,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,zhangzhehust/htcondor,djw8605/condor,djw8605/condor,neurodebian/htcondor,mambelli/osg-bosco-marco,clalancette/condor-dcloud,bbockelm/condor-network-accounting,djw8605/htcondor,bbockelm/condor-network-accounting,djw8605/condor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,neurodebian/htcondor,djw8605/htcondor,zhangzhehust/htcondor,djw8605/htcondor,djw8605/htcondor,neurodebian/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,djw8605/condor,neurodebian/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,zhangzhehust/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,djw8605/condor,mambelli/osg-bosco-marco,htcondor/htcondor,clalancette/condor-dcloud,htcondor/htcondor,htcondor/htcondor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,clalancette/condor-dcloud,clalancette/condor-dcloud,djw8605/condor
caceb4cf2704b445379874a36f0274ee54c141eb
src/libreset/util/macros.h
src/libreset/util/macros.h
#ifndef __MACROS_H__ #define __MACROS_H__ /** * @file macros.h * * This file contains simple helper macros */ /** * @addtogroup internal_util_helper_macros "(internal) helper macros" * * This group contains helper macros for internal use only. * * @{ */ /** * Computes the maximum value of the two passed values * * @note Provides compile-time type checking by using temp variables before * doing the comparison. * * @note Opens own scope, so the temp variables do not show up outside of the * macro. */ #define MAX(x,y) \ ((__typeof__(x)) x > (__typeof__(x)) y ? \ (__typeof__(x)) x : (__typeof__(x)) y) /** * Computes the minimum value of the two passed values * * @note Provides compile-time type checking by using temp variables before * doing the comparison. * * @note Opens own scope, so the temp variables do not show up outside of the * macro. */ #define MIN(x,y) \ ({ __typeof__ (x) _x = (x); \ __typeof__ (y) _y = (y); \ _x < _y ? _x : _y; }) /** @} */ #endif //__MACROS_H__
#ifndef __MACROS_H__ #define __MACROS_H__ /** * @file macros.h * * This file contains simple helper macros */ /** * @addtogroup internal_util_helper_macros "(internal) helper macros" * * This group contains helper macros for internal use only. * * @{ */ /** * Computes the maximum value of the two passed values * * @note Provides compile-time type checking by using temp variables before * doing the comparison. * * @note Opens own scope, so the temp variables do not show up outside of the * macro. */ #define MAX(x,y) \ ((__typeof__(x)) x > (__typeof__(x)) y ? \ (__typeof__(x)) x : (__typeof__(x)) y) /** * Computes the minimum value of the two passed values * * @note Provides compile-time type checking by using temp variables before * doing the comparison. * * @note Opens own scope, so the temp variables do not show up outside of the * macro. */ #define MIN(x,y) \ ((__typeof__(x)) x > (__typeof__(x)) y ? \ (__typeof__(x)) y : (__typeof__(x)) x) /** @} */ #endif //__MACROS_H__
Modify MIN(x,y) to not contain a scope
Modify MIN(x,y) to not contain a scope
C
lgpl-2.1
waysome/libreset,waysome/libreset
268fdc1e10931c3a9c0e4c8c6699139516429adc
knode/kngrouppropdlg.h
knode/kngrouppropdlg.h
/* kngrouppropdlg.h KNode, the KDE newsreader Copyright (c) 1999-2001 the KNode authors. See file AUTHORS for details This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US */ #ifndef KNGROUPPROPDLG_H #define KNGROUPPROPDLG_H #include <kdialogbase.h> class QCheckBox; class KLineEdit; class KNGroup; namespace KNConfig { class IdentityWidget; }; class KNGroupPropDlg : public KDialogBase { public: KNGroupPropDlg(KNGroup *group, QWidget *parent=0, const char *name=0); ~KNGroupPropDlg(); bool nickHasChanged() { return n_ickChanged; } protected: KNGroup *g_rp; bool n_ickChanged; KNConfig::IdentityWidget* i_dWidget; KLineEdit *n_ick; QCheckBox *u_seCharset; QComboBox *c_harset; protected slots: void slotOk(); }; #endif
/* kngrouppropdlg.h KNode, the KDE newsreader Copyright (c) 1999-2001 the KNode authors. See file AUTHORS for details This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US */ #ifndef KNGROUPPROPDLG_H #define KNGROUPPROPDLG_H #include <kdialogbase.h> class QCheckBox; class QComboBox; class KLineEdit; class KNGroup; namespace KNConfig { class IdentityWidget; }; class KNGroupPropDlg : public KDialogBase { public: KNGroupPropDlg(KNGroup *group, QWidget *parent=0, const char *name=0); ~KNGroupPropDlg(); bool nickHasChanged() { return n_ickChanged; } protected: KNGroup *g_rp; bool n_ickChanged; KNConfig::IdentityWidget* i_dWidget; KLineEdit *n_ick; QCheckBox *u_seCharset; QComboBox *c_harset; protected slots: void slotOk(); }; #endif
Add forward declaration for QComboBox
Add forward declaration for QComboBox svn path=/trunk/kdenetwork/knode/; revision=144112
C
lgpl-2.1
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
649ae48e2b2c5b9e03379294fa93aa100c850e71
Paystack/Classes/PublicHeaders/Paystack.h
Paystack/Classes/PublicHeaders/Paystack.h
// // Paystack.h // Paystack // // Created by Ibrahim Lawal on 02/02/16. // Copyright (c) 2016 Paystack. All rights reserved. // // The code in this workspace was adapted from https://github.com/stripe/stripe-ios. // Stripe was replaced with Paystack - and STP with PSTCK - to avoid collisions within // apps that are using both Paystack and Stripe. #import <Paystack/PSTCKAPIClient.h> #import <Paystack/PaystackError.h> #import <Paystack/PSTCKCardBrand.h> #import <Paystack/PSTCKCardParams.h> #import <Paystack/PSTCKTransactionParams.h> #import <Paystack/PSTCKCard.h> #import <Paystack/PSTCKCardValidationState.h> #import <Paystack/PSTCKCardValidator.h> #import <Paystack/PSTCKToken.h> #import <Paystack/PSTCKRSA.h> #if TARGET_OS_IPHONE #import <Paystack/PSTCKPaymentCardTextField.h> #endif
// // Paystack.h // Paystack // // Created by Ibrahim Lawal on 02/02/16. // Copyright (c) 2016 Paystack. All rights reserved. // // The code in this workspace was adapted from https://github.com/stripe/stripe-ios. // Stripe was replaced with Paystack - and STP with PSTCK - to avoid collisions within // apps that are using both Paystack and Stripe. #import "PSTCKAPIClient.h" #import "PaystackError.h" #import "PSTCKCardBrand.h" #import "PSTCKCardParams.h" #import "PSTCKTransactionParams.h" #import "PSTCKCard.h" #import "PSTCKCardValidationState.h" #import "PSTCKCardValidator.h" #import "PSTCKToken.h" #import "PSTCKRSA.h" #if TARGET_OS_IPHONE #import "PSTCKPaymentCardTextField.h" #endif
Update umbrella header file declaration
Update umbrella header file declaration
C
mit
PaystackHQ/paystack-ios,PaystackHQ/paystack-ios,PaystackHQ/paystack-ios,PaystackHQ/paystack-ios
06cfb4f02ad9f2561302f21f4f38ec5f5ed4372f
SmartDeviceLink/SDLMacros.h
SmartDeviceLink/SDLMacros.h
// // SDLMacros.h // SmartDeviceLink-iOS // // Created by Muller, Alexander (A.) on 10/17/16. // Copyright © 2016 smartdevicelink. All rights reserved. // #ifndef SDLMacros_h #define SDLMacros_h // Resolves issue of pre-xcode 8 versions due to NS_STRING_ENUM unavailability. #ifndef SDL_SWIFT_ENUM #if __has_attribute(NS_STRING_ENUM) #define SDL_SWIFT_ENUM NS_STRING_ENUM #else #define SDL_SWIFT_ENUM #endif #endif #endif /* SDLMacros_h */
// // SDLMacros.h // SmartDeviceLink-iOS // // Created by Muller, Alexander (A.) on 10/17/16. // Copyright © 2016 smartdevicelink. All rights reserved. // #ifndef SDLMacros_h #define SDLMacros_h // Resolves issue of pre-xcode 8 versions due to NS_STRING_ENUM unavailability. #ifndef SDL_SWIFT_ENUM #if __has_attribute(swift_wrapper) #define SDL_SWIFT_ENUM NS_STRING_ENUM #else #define SDL_SWIFT_ENUM #endif #endif #endif /* SDLMacros_h */
Revert "Changed macro to look specifically for NS_STRING_ENUM"
Revert "Changed macro to look specifically for NS_STRING_ENUM" This reverts commit de01a9f7b3ed63f683604d3595568bacf5f54a5e.
C
bsd-3-clause
APCVSRepo/sdl_ios,FordDev/sdl_ios,FordDev/sdl_ios,kshala-ford/sdl_ios,kshala-ford/sdl_ios,APCVSRepo/sdl_ios,kshala-ford/sdl_ios,APCVSRepo/sdl_ios,FordDev/sdl_ios,kshala-ford/sdl_ios,smartdevicelink/sdl_ios,smartdevicelink/sdl_ios,APCVSRepo/sdl_ios,kshala-ford/sdl_ios,APCVSRepo/sdl_ios,smartdevicelink/sdl_ios,smartdevicelink/sdl_ios,FordDev/sdl_ios,smartdevicelink/sdl_ios,FordDev/sdl_ios
4346c30bae8b1a64acba564f6775cb0bacd026e4
generic/include/clc/integer/definitions.h
generic/include/clc/integer/definitions.h
#define CHAR_BIT 8 #define INT_MAX 2147483647 #define INT_MIN -2147483648 #define LONG_MAX 0x7fffffffffffffffL #define LONG_MIN -0x8000000000000000L #define SCHAR_MAX 127 #define SCHAR_MIN -128 #define CHAR_MAX 127 #define CHAR_MIN -128 #define SHRT_MAX 32767 #define SHRT_MIN -32768 #define UCHAR_MAX 255 #define USHRT_MAX 65535 #define UINT_MAX 0xffffffff #define ULONG_MAX 0xffffffffffffffffUL
#define CHAR_BIT 8 #define INT_MAX 2147483647 #define INT_MIN ((int)(-2147483647 - 1)) #define LONG_MAX 0x7fffffffffffffffL #define LONG_MIN (-0x7fffffffffffffffL - 1) #define CHAR_MAX SCHAR_MAX #define CHAR_MIN SCHAR_MIN #define SCHAR_MAX 127 #define SCHAR_MIN ((char)(-127 - 1)) #define SHRT_MAX 32767 #define SHRT_MIN ((short)(-32767 - 1)) #define UCHAR_MAX 255 #define USHRT_MAX 65535 #define UINT_MAX 0xffffffff #define ULONG_MAX 0xffffffffffffffffUL
Update integer limits to comply with spec
integer: Update integer limits to comply with spec The values for the char/short/integer/long minimums were declared with their actual values, not the definitions from the CL spec (v1.1). As a result, (-2147483648) was actually being treated as a long by the compiler, not an int, which caused issues when trying to add/subtract that value from a vector. Update the definitions to use the values declared by the spec, and also add explicit casts for the char/short/int minimums so that the compiler actually treats them as shorts/chars. Without those casts, they actually end up stored as integers, and the compiler may end up storing the INT_MIN as a long. The compiler can sign extend the values if it needs to convert the char->short, short->int, or int->long v2: Add explicit cast for INT_MIN and fix some type-o's and wrapping in the commit message. Reported-by: Moritz Pflanzer <moritz.pflanzer14@imperial.ac.uk> CC: Moritz Pflanzer <moritz.pflanzer14@imperial.ac.uk> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Aaron Watry <awatry@gmail.com> git-svn-id: e7f1ab7c2a259259587475a3e7520e757882f167@247661 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc
75463d8bb33ca74e64842c871740002fbc32c902
src/ios/BEMServerSyncCommunicationHelper.h
src/ios/BEMServerSyncCommunicationHelper.h
// // DataUtils.h // CFC_Tracker // // Created by Kalyanaraman Shankari on 3/9/15. // Copyright (c) 2015 Kalyanaraman Shankari. All rights reserved. // #import <Foundation/Foundation.h> #import <CoreLocation/CoreLocation.h> @interface BEMServerSyncCommunicationHelper: NSObject // Top level method + (void) backgroundSync:(void (^)(UIBackgroundFetchResult))completionHandler; // Wrappers around the communication methods + (void) pushAndClearUserCache:(void (^)(BOOL))completionHandler; + (void) pullIntoUserCache:(void (^)(BOOL))completionHandler; + (void) pushAndClearStats:(void (^)(BOOL))completionHandler; // Communication methods (copied from communication handler to make it generic) +(void)phone_to_server:(NSArray*) entriesToPush completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; +(void)server_to_phone:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; +(void)setClientStats:(NSDictionary*)statsToSend completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; + (NSInteger)fetchedData:(NSData *)responseData; @end
// // DataUtils.h // CFC_Tracker // // Created by Kalyanaraman Shankari on 3/9/15. // Copyright (c) 2015 Kalyanaraman Shankari. All rights reserved. // #import <Foundation/Foundation.h> #import <CoreLocation/CoreLocation.h> typedef void (^SilentPushCompletionHandler)(UIBackgroundFetchResult); @interface BEMServerSyncCommunicationHelper: NSObject // Top level method + (void) backgroundSync:(SilentPushCompletionHandler)completionHandler; // Wrappers around the communication methods + (void) pushAndClearUserCache:(void (^)(BOOL))completionHandler; + (void) pullIntoUserCache:(void (^)(BOOL))completionHandler; + (void) pushAndClearStats:(void (^)(BOOL))completionHandler; // Communication methods (copied from communication handler to make it generic) +(void)phone_to_server:(NSArray*) entriesToPush completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; +(void)server_to_phone:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; +(void)setClientStats:(NSDictionary*)statsToSend completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; + (NSInteger)fetchedData:(NSData *)responseData; @end
Move the SilentPushCompletionHandler typedef in here
Move the SilentPushCompletionHandler typedef in here Since it is likely to be used as part of background sync
C
bsd-3-clause
e-mission/cordova-server-sync,e-mission/cordova-server-sync,e-mission/cordova-server-sync
43e02f563314f179b1221921034c145887a968fa
include/lyra2.h
include/lyra2.h
#pragma once #include <stdlib.h> #include <stdint.h> #define PHS_NCOLS 64 int lyra2(char *key, uint32_t keylen, const char *pwd, uint32_t pwdlen, const char *salt, uint32_t saltlen, uint32_t R, uint32_t C, uint32_t T); int PHS(void *out, size_t outlen, const void *in, size_t inlen, const void *salt, size_t saltlen, unsigned int t_cost, unsigned int m_cost);
#pragma once #include <stdlib.h> #include <stdint.h> #define PHS_NCOLS 256 int lyra2(char *key, uint32_t keylen, const char *pwd, uint32_t pwdlen, const char *salt, uint32_t saltlen, uint32_t R, uint32_t C, uint32_t T); int PHS(void *out, size_t outlen, const void *in, size_t inlen, const void *salt, size_t saltlen, unsigned int t_cost, unsigned int m_cost);
Use 256 cols when in PHS mode.
Use 256 cols when in PHS mode.
C
mit
guilherme-pg/lyra2,guilherme-pg/lyra2,eggpi/lyra2,eggpi/lyra2,eggpi/lyra2,guilherme-pg/lyra2
c2a85cdcb14b4b04619593261a49c310a8f59185
libsel4/arch_include/x86/sel4/arch/mapping.h
libsel4/arch_include/x86/sel4/arch/mapping.h
/* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #ifndef __LIBSEL4_ARCH_MAPPING #define __LIBSEL4_ARCH_MAPPING #define SEL4_MAPPING_LOOKUP_LEVEL 2 #define SEL4_MAPPING_LOOKUP_NO_PT 22 static inline seL4_Word seL4_MappingFailedLookupLevel() { return seL4_GetMR(SEL4_MAPPING_LOOKUP_LEVEL); } #endif
/* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #ifndef __LIBSEL4_ARCH_MAPPING #define __LIBSEL4_ARCH_MAPPING #include <autoconf.h> #define SEL4_MAPPING_LOOKUP_LEVEL 2 #ifdef CONFIG_PAE_PAGING #define SEL4_MAPPING_LOOKUP_NO_PT 21 #define SEL4_MAPPING_LOOKUP_NO_PD 30 #else #define SEL4_MAPPING_LOOKUP_NO_PT 22 #endif static inline seL4_Word seL4_MappingFailedLookupLevel() { return seL4_GetMR(SEL4_MAPPING_LOOKUP_LEVEL); } #endif
Define different lookup levels for PAE
libsel4: Define different lookup levels for PAE
C
bsd-2-clause
cmr/seL4,zhicheng/seL4,cmr/seL4,cmr/seL4,zhicheng/seL4,zhicheng/seL4
47107014052cf2345f4d22066e236582f4bbc0a9
tests/ssp/main.c
tests/ssp/main.c
/* * Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de> * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @ingroup tests * @{ * * @file * @brief ssp test application * * This test should crash badly when *not* using the ssp module, and panic if * using it. * * @author Kaspar Schleiser <kaspar@schleiser.de> * * @} */ #include <stdio.h> #include <string.h> void test_func(void) { char buf[16]; /* cppcheck-suppress bufferAccessOutOfBounds * (reason: deliberately overflowing stack) */ memset(buf, 0, 32); } int main(void) { puts("calling stack corruption function"); test_func(); puts("back to main"); return 0; }
/* * Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de> * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @ingroup tests * @{ * * @file * @brief ssp test application * * This test should crash badly when *not* using the ssp module, and panic if * using it. * * @author Kaspar Schleiser <kaspar@schleiser.de> * * @} */ #include <stdio.h> #include <string.h> void test_func(void) { char buf[16]; /* clang will detect the buffer overflow * and throw an error if we use `buf` directly */ void *buffer_to_confuse_compiler = buf; /* cppcheck-suppress bufferAccessOutOfBounds * (reason: deliberately overflowing stack) */ memset(buffer_to_confuse_compiler, 0, 32); } int main(void) { puts("calling stack corruption function"); test_func(); puts("back to main"); return 0; }
Fix on macOS while compiling w/ clang
tests/ssp: Fix on macOS while compiling w/ clang On macOS using Apple LLVM version 9.0.0 this test would not compile due to clang detecting the buffer overflow. Since this test is all about having a buffer overflow, I tricked clang into not detecting this anymore. This loosely relates to #6473.
C
lgpl-2.1
mfrey/RIOT,smlng/RIOT,miri64/RIOT,authmillenon/RIOT,miri64/RIOT,rfuentess/RIOT,avmelnikoff/RIOT,jasonatran/RIOT,basilfx/RIOT,LudwigOrtmann/RIOT,roberthartung/RIOT,basilfx/RIOT,biboc/RIOT,rfuentess/RIOT,cladmi/RIOT,jasonatran/RIOT,BytesGalore/RIOT,basilfx/RIOT,toonst/RIOT,biboc/RIOT,smlng/RIOT,toonst/RIOT,immesys/RiSyn,OlegHahm/RIOT,biboc/RIOT,immesys/RiSyn,adrianghc/RIOT,adrianghc/RIOT,kbumsik/RIOT,immesys/RiSyn,RIOT-OS/RIOT,authmillenon/RIOT,yogo1212/RIOT,immesys/RiSyn,immesys/RiSyn,ant9000/RIOT,yogo1212/RIOT,neiljay/RIOT,ant9000/RIOT,kbumsik/RIOT,rfuentess/RIOT,avmelnikoff/RIOT,mfrey/RIOT,mtausig/RIOT,toonst/RIOT,mtausig/RIOT,gebart/RIOT,x3ro/RIOT,neiljay/RIOT,yogo1212/RIOT,jasonatran/RIOT,A-Paul/RIOT,basilfx/RIOT,Josar/RIOT,kYc0o/RIOT,ks156/RIOT,Josar/RIOT,mtausig/RIOT,aeneby/RIOT,toonst/RIOT,smlng/RIOT,biboc/RIOT,ant9000/RIOT,lazytech-org/RIOT,ant9000/RIOT,RIOT-OS/RIOT,kYc0o/RIOT,OlegHahm/RIOT,authmillenon/RIOT,LudwigKnuepfer/RIOT,kaspar030/RIOT,avmelnikoff/RIOT,LudwigOrtmann/RIOT,authmillenon/RIOT,miri64/RIOT,authmillenon/RIOT,josephnoir/RIOT,ks156/RIOT,cladmi/RIOT,miri64/RIOT,roberthartung/RIOT,Josar/RIOT,BytesGalore/RIOT,OlegHahm/RIOT,RIOT-OS/RIOT,aeneby/RIOT,neiljay/RIOT,OTAkeys/RIOT,aeneby/RIOT,LudwigOrtmann/RIOT,smlng/RIOT,A-Paul/RIOT,yogo1212/RIOT,josephnoir/RIOT,gebart/RIOT,aeneby/RIOT,BytesGalore/RIOT,OTAkeys/RIOT,josephnoir/RIOT,miri64/RIOT,gebart/RIOT,ant9000/RIOT,adrianghc/RIOT,cladmi/RIOT,mfrey/RIOT,kaspar030/RIOT,BytesGalore/RIOT,kbumsik/RIOT,x3ro/RIOT,Josar/RIOT,authmillenon/RIOT,kbumsik/RIOT,adrianghc/RIOT,immesys/RiSyn,LudwigOrtmann/RIOT,rfuentess/RIOT,LudwigKnuepfer/RIOT,OTAkeys/RIOT,RIOT-OS/RIOT,lazytech-org/RIOT,jasonatran/RIOT,toonst/RIOT,kaspar030/RIOT,x3ro/RIOT,LudwigOrtmann/RIOT,A-Paul/RIOT,roberthartung/RIOT,A-Paul/RIOT,avmelnikoff/RIOT,roberthartung/RIOT,BytesGalore/RIOT,ks156/RIOT,mtausig/RIOT,gebart/RIOT,RIOT-OS/RIOT,kbumsik/RIOT,neiljay/RIOT,cladmi/RIOT,yogo1212/RIOT,rfuentess/RIOT,OlegHahm/RIOT,biboc/RIOT,gebart/RIOT,roberthartung/RIOT,OTAkeys/RIOT,mtausig/RIOT,ks156/RIOT,kYc0o/RIOT,ks156/RIOT,LudwigKnuepfer/RIOT,mfrey/RIOT,jasonatran/RIOT,x3ro/RIOT,x3ro/RIOT,cladmi/RIOT,mfrey/RIOT,adrianghc/RIOT,smlng/RIOT,lazytech-org/RIOT,OTAkeys/RIOT,lazytech-org/RIOT,avmelnikoff/RIOT,aeneby/RIOT,OlegHahm/RIOT,kYc0o/RIOT,LudwigOrtmann/RIOT,kaspar030/RIOT,Josar/RIOT,LudwigKnuepfer/RIOT,yogo1212/RIOT,josephnoir/RIOT,josephnoir/RIOT,basilfx/RIOT,kaspar030/RIOT,A-Paul/RIOT,neiljay/RIOT,LudwigKnuepfer/RIOT,lazytech-org/RIOT,kYc0o/RIOT
b981ad885a6f4e0a79506451157c1459141320f5
exception_handling_3.c
exception_handling_3.c
/* * Author: NagaChaitanya Vellanki * * TRY/THROW/CATCH/FINALLY - example * Reference: http://www.di.unipi.it/~nids/docs/longjump_try_trow_catch.html * */ #include <stdio.h> #include <stdlib.h> #include <setjmp.h> #define FOO_EXCEPTION (1) #define BAR_EXCEPTION (2) #define GOO_EXCEPTION (3) #define TRY do{ jmp_buf env; switch(setjmp(env)) { case 0: while(1) { #define CATCH(exception) break; case exception: #define FINALLY break; } default: #define END_TRY } }while(0) #define THROW(exception) longjmp(env, exception) int main(int argc, char *argv[]) { TRY { printf("In TRY statement\n"); THROW(GOO_EXCEPTION); printf("not reachable\n"); } CATCH(FOO_EXCEPTION) { printf("FOO exception caught\n"); } CATCH(BAR_EXCEPTION) { printf("BAR exception caught\n"); } CATCH(GOO_EXCEPTION) { printf("GOO exception caught\n"); } FINALLY { printf("Finally \n"); } END_TRY; exit(EXIT_SUCCESS); }
/* * Author: NagaChaitanya Vellanki * * TRY/THROW/CATCH/FINALLY - example * Reference: http://www.di.unipi.it/~nids/docs/longjump_try_trow_catch.html * * use gcc -E -P exception_handling_3.c to see the result of the preprocessing * step */ #include <stdio.h> #include <stdlib.h> #include <setjmp.h> #define FOO_EXCEPTION (1) #define BAR_EXCEPTION (2) #define GOO_EXCEPTION (3) #define TRY do{ jmp_buf env; switch(setjmp(env)) { case 0: while(1) { #define CATCH(exception) break; case exception: #define FINALLY break; } default: #define END_TRY } }while(0) #define THROW(exception) longjmp(env, exception) int main(int argc, char *argv[]) { TRY { printf("In TRY statement\n"); THROW(GOO_EXCEPTION); printf("not reachable\n"); } CATCH(FOO_EXCEPTION) { printf("FOO exception caught\n"); } CATCH(BAR_EXCEPTION) { printf("BAR exception caught\n"); } CATCH(GOO_EXCEPTION) { printf("GOO exception caught\n"); } FINALLY { printf("Finally \n"); } END_TRY; exit(EXIT_SUCCESS); }
Add command to see output of preprocessor
Add command to see output of preprocessor
C
isc
chaitanyav/cprograms,chaitanyav/cprograms
2f5741458f22ed495dd05f989be98b62f18108d9
timer.h
timer.h
#ifndef TIMER_H_ #define TIMER_H_ 1 /* * By default, the timer calls the function a few extra times that aren't * measured to get it into cache and ensure more consistent running times. * Specifying this option in flags will stop this. */ #define TIMER_NO_EXTRA 1 struct timer { unsigned long long ns; unsigned int reps; }; /* * Measures function 'func'. Sets timer->ns to the number of nanoseconds it took, * and timer->reps to the number of repetitions. Uses the existing values of * timer->ns and timer->reps as maximums - it won't do any more repetitions or take * significantly more time than those specify. However, you can set one of them * to 0 to make it unlimited. 0 is returned on success, -1 on failure. */ int timer_measure(void (*func)(void), struct timer *timer, int flags); // These next functions are shortcuts that use timer_measure and use the // default flags. int timer_measure_ms(void (*func)(void), unsigned long long ms, struct timer *timer); int timer_measure_reps(void (*func)(void), unsigned int reps, struct timer *timer); #endif
#ifndef TIMER_H_ #define TIMER_H_ 1 /* * By default, the timer calls the function a few extra times that aren't * measured to get it into cache and ensure more consistent running times. * Specifying this option in flags will stop this. */ #define TIMER_NO_EXTRA 1 /* * By default, each of these functions assumes that the function is single * threaded. Specify this option to make sure that timing is done properly with * multi-threaded functions. */ #define TIMER_MULTI_THREAD 2 /* * The timer might create new processes to isolate the code being timed. * Specifying this flag prevents any new processes from being created. */ #define TIMER_NOPROC 4 /* * The timer might create new threads to isolate the code being timed. * Specifying this flag prevents any new threads from being created. */ #define TIMER_NOTHREAD 8 struct timer { unsigned long long ns; unsigned int reps; }; /* * Measures function 'func'. Sets timer->ns to the number of nanoseconds it took, * and timer->reps to the number of repetitions. Uses the existing values of * timer->ns and timer->reps as maximums - it won't do any more repetitions or take * significantly more time than those specify. However, you can set one of them * to 0 to make it unlimited. 0 is returned on success, -1 on failure. */ int timer_measure(void (*func)(void), struct timer *timer, int flags); // These next functions are shortcuts that use timer_measure and use the // default flags. They just use 'timer' as an out argument. int timer_measure_ms(void (*func)(void), unsigned long long ms, struct timer *timer); int timer_measure_reps(void (*func)(void), unsigned int reps, struct timer *timer); #endif
Add more flags and documentation
Add more flags and documentation
C
mit
joeljk13/Timer,joeljk13/Timer
64286c63308db83935b5112b4adc2524f7c7f28f
chrome/browser/extensions/extension_management_api_constants.h
chrome/browser/extensions/extension_management_api_constants.h
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_ #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_ #pragma once namespace extension_management_api_constants { // Keys used for incoming arguments and outgoing JSON data. extern const char kAppLaunchUrlKey[]; extern const char kDescriptionKey[]; extern const char kEnabledKey[]; extern const char kDisabledReasonKey[]; extern const char kHomepageUrlKey[]; extern const char kHostPermissionsKey[]; extern const char kIconsKey[]; extern const char kIdKey[]; extern const char kIsAppKey[]; extern const char kNameKey[]; extern const char kOfflineEnabledKey[]; extern const char kOptionsUrlKey[]; extern const char kPermissionsKey[]; extern const char kMayDisableKey[]; extern const char kSizeKey[]; extern const char kUpdateUrlKey[]; extern const char kUrlKey[]; extern const char kVersionKey[]; // Values for outgoing JSON data. extern const char kDisabledReasonPermissionsIncrease[]; extern const char kDisabledReasonUnknown[]; // Error messages. extern const char kExtensionCreateError[]; extern const char kGestureNeededForEscalationError[]; extern const char kManifestParseError[]; extern const char kNoExtensionError[]; extern const char kNotAnAppError[]; extern const char kUserCantDisableError[]; extern const char kUserDidNotReEnableError[]; } // namespace extension_management_api_constants #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_ #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_ #pragma once namespace extension_management_api_constants { // Keys used for incoming arguments and outgoing JSON data. extern const char kAppLaunchUrlKey[]; extern const char kDisabledReasonKey[]; extern const char kHostPermissionsKey[]; extern const char kIconsKey[]; extern const char kIsAppKey[]; extern const char kPermissionsKey[]; extern const char kSizeKey[]; extern const char kUpdateUrlKey[]; extern const char kUrlKey[]; // Values for outgoing JSON data. extern const char kDisabledReasonPermissionsIncrease[]; extern const char kDisabledReasonUnknown[]; // Error messages. extern const char kExtensionCreateError[]; extern const char kGestureNeededForEscalationError[]; extern const char kManifestParseError[]; extern const char kNoExtensionError[]; extern const char kNotAnAppError[]; extern const char kUserCantDisableError[]; extern const char kUserDidNotReEnableError[]; } // namespace extension_management_api_constants #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_
Remove leftover constant declarations accidentally left behind by a previous patch.
Remove leftover constant declarations accidentally left behind by a previous patch. BUG=119692 TEST=compile succeeds Review URL: https://chromiumcodereview.appspot.com/9903017 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@129799 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
fujunwei/chromium-crosswalk,littlstar/chromium.src,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,robclark/chromium,robclark/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,mogoweb/chromium-crosswalk,patrickm/chromium.src,junmin-zhu/chromium-rivertrail,littlstar/chromium.src,pozdnyakov/chromium-crosswalk,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,anirudhSK/chromium,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,dednal/chromium.src,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,M4sse/chromium.src,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,ChromiumWebApps/chromium,robclark/chromium,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,ondra-novak/chromium.src,nacl-webkit/chrome_deps,robclark/chromium,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,patrickm/chromium.src,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,keishi/chromium,ChromiumWebApps/chromium,jaruba/chromium.src,jaruba/chromium.src,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,dushu1203/chromium.src,axinging/chromium-crosswalk,markYoungH/chromium.src,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,Jonekee/chromium.src,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,dednal/chromium.src,timopulkkinen/BubbleFish,dednal/chromium.src,dushu1203/chromium.src,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,Just-D/chromium-1,bright-sparks/chromium-spacewalk,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,ltilve/chromium,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,Jonekee/chromium.src,markYoungH/chromium.src,littlstar/chromium.src,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,dushu1203/chromium.src,hujiajie/pa-chromium,dednal/chromium.src,Just-D/chromium-1,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,ltilve/chromium,Chilledheart/chromium,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,anirudhSK/chromium,littlstar/chromium.src,chuan9/chromium-crosswalk,hujiajie/pa-chromium,Just-D/chromium-1,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk-efl,keishi/chromium,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,M4sse/chromium.src,M4sse/chromium.src,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,Jonekee/chromium.src,hujiajie/pa-chromium,anirudhSK/chromium,dushu1203/chromium.src,Jonekee/chromium.src,nacl-webkit/chrome_deps,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,markYoungH/chromium.src,axinging/chromium-crosswalk,markYoungH/chromium.src,M4sse/chromium.src,zcbenz/cefode-chromium,anirudhSK/chromium,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,patrickm/chromium.src,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,robclark/chromium,hujiajie/pa-chromium,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,dushu1203/chromium.src,Just-D/chromium-1,Fireblend/chromium-crosswalk,robclark/chromium,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,axinging/chromium-crosswalk,dushu1203/chromium.src,ltilve/chromium,Jonekee/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,Chilledheart/chromium,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,jaruba/chromium.src,M4sse/chromium.src,Fireblend/chromium-crosswalk,littlstar/chromium.src,keishi/chromium,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,zcbenz/cefode-chromium,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,zcbenz/cefode-chromium,markYoungH/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,keishi/chromium,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,M4sse/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,patrickm/chromium.src,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,jaruba/chromium.src,hujiajie/pa-chromium,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,fujunwei/chromium-crosswalk,robclark/chromium,zcbenz/cefode-chromium,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,dednal/chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk,keishi/chromium,dednal/chromium.src,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,ltilve/chromium,robclark/chromium,zcbenz/cefode-chromium,keishi/chromium,Jonekee/chromium.src,M4sse/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,ltilve/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,dushu1203/chromium.src,keishi/chromium,patrickm/chromium.src,Fireblend/chromium-crosswalk,keishi/chromium,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,patrickm/chromium.src,junmin-zhu/chromium-rivertrail,robclark/chromium,ChromiumWebApps/chromium,anirudhSK/chromium,dednal/chromium.src,littlstar/chromium.src,dushu1203/chromium.src,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,dednal/chromium.src,jaruba/chromium.src,anirudhSK/chromium,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,Just-D/chromium-1,M4sse/chromium.src,Chilledheart/chromium,nacl-webkit/chrome_deps,Chilledheart/chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,Just-D/chromium-1,hujiajie/pa-chromium,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,keishi/chromium,ltilve/chromium,Just-D/chromium-1,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,Just-D/chromium-1,chuan9/chromium-crosswalk,ltilve/chromium,anirudhSK/chromium,nacl-webkit/chrome_deps,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,markYoungH/chromium.src,anirudhSK/chromium,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,anirudhSK/chromium,keishi/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,ChromiumWebApps/chromium,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,dednal/chromium.src,littlstar/chromium.src,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,keishi/chromium,ondra-novak/chromium.src,jaruba/chromium.src,Chilledheart/chromium,littlstar/chromium.src,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,dednal/chromium.src,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,bright-sparks/chromium-spacewalk,jaruba/chromium.src,jaruba/chromium.src,robclark/chromium
3a8985756e68560b5aa84adab988b681e1695f84
generate/templates/manual/include/configurable_class_wrapper.h
generate/templates/manual/include/configurable_class_wrapper.h
#ifndef CALLER_CONFIGURABLE_CLASS_WRAPPER_H #define CALLER_CONFIGURABLE_CLASS_WRAPPER_H #include <memory> #include <nan.h> #include <string> #include "cleanup_handle.h" namespace nodegit { class Context; template<typename Traits> class ConfigurableClassWrapper : public CleanupHandle { public: typedef typename Traits::cType cType; typedef typename Traits::configurableCppClass configurableCppClass; struct v8ConversionResult { v8ConversionResult(std::string _error) : error(std::move(_error)), result(nullptr) {} v8ConversionResult(std::shared_ptr<configurableCppClass> _result) : result(std::move(_result)) {} std::string error; std::shared_ptr<configurableCppClass> result; }; // We copy the entity ConfigurableClassWrapper(nodegit::Context *_nodeGitContext) : nodegitContext(_nodeGitContext), raw(nullptr) {} virtual ~ConfigurableClassWrapper() { if (raw != nullptr) { delete raw; raw = nullptr; } } const Context *nodegitContext = nullptr; cType *GetValue() { return raw; } protected: cType *raw; std::vector<std::shared_ptr<CleanupHandle>> childCleanupVector; }; } #endif
#ifndef CALLER_CONFIGURABLE_CLASS_WRAPPER_H #define CALLER_CONFIGURABLE_CLASS_WRAPPER_H #include <memory> #include <nan.h> #include <string> #include "cleanup_handle.h" namespace nodegit { class Context; template<typename Traits> class ConfigurableClassWrapper : public CleanupHandle { public: typedef typename Traits::cType cType; typedef typename Traits::configurableCppClass configurableCppClass; struct v8ConversionResult { v8ConversionResult(std::string _error) : error(std::move(_error)), result(nullptr) {} v8ConversionResult(std::shared_ptr<configurableCppClass> _result) : result(std::move(_result)) {} std::string error; std::shared_ptr<configurableCppClass> result; }; // We copy the entity ConfigurableClassWrapper(nodegit::Context *_nodeGitContext) : nodegitContext(_nodeGitContext), raw(nullptr) {} ConfigurableClassWrapper(const ConfigurableClassWrapper &) = delete; ConfigurableClassWrapper(ConfigurableClassWrapper &&) = delete; ConfigurableClassWrapper &operator=(const ConfigurableClassWrapper &) = delete; ConfigurableClassWrapper &operator=(ConfigurableClassWrapper &&) = delete; virtual ~ConfigurableClassWrapper() { if (raw != nullptr) { delete raw; raw = nullptr; } } const Context *nodegitContext = nullptr; cType *GetValue() { return raw; } protected: cType *raw; std::vector<std::shared_ptr<CleanupHandle>> childCleanupVector; }; } #endif
Delete copy and move constructors for ConfigurableClassWrapper
Delete copy and move constructors for ConfigurableClassWrapper
C
mit
jmurzy/nodegit,jmurzy/nodegit,nodegit/nodegit,nodegit/nodegit,jmurzy/nodegit,jmurzy/nodegit,nodegit/nodegit,nodegit/nodegit,nodegit/nodegit,jmurzy/nodegit
8e37740dc6b20c6ec044e5db3b23894614c7784f
test/Driver/offloading-interoperability.c
test/Driver/offloading-interoperability.c
// REQUIRES: clang-driver // REQUIRES: powerpc-registered-target // REQUIRES: nvptx-registered-target // // Verify that CUDA device commands do not get OpenMP flags. // // RUN: %clang -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp %s 2>&1 \ // RUN: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE // // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary" "--cuda" "-64" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le--linux-gnu" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ld" "-z" "relro" "--hash-style=gnu" "--eh-frame-hdr" "-m" "elf64lppc"
// REQUIRES: clang-driver // REQUIRES: powerpc-registered-target // REQUIRES: nvptx-registered-target // // Verify that CUDA device commands do not get OpenMP flags. // // RUN: %clang -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp %s 2>&1 \ // RUN: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE // // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary" "--cuda" "-64" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le--linux-gnu" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ld" {{.*}}"-m" "elf64lppc"
Fix link command pattern in offloading interoperability test.
[OpenMP] Fix link command pattern in offloading interoperability test. It was causing a few bots to fail. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@276983 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
14320dcce2895b07e85d11bdbb1d47aaeaad9142
server.h
server.h
#ifndef _SERVER_H #define _SERVER_H #include <time.h> #include <sys/epoll.h> #include "list.h" #include "threadpool.h" int open_listenfd(int port); void* check_connections(void* data); struct http_socket { int fd; /*struct pollfd* poll_fd;*/ struct epoll_event event; char* read_buffer; int read_buffer_size; time_t last_access; struct list_elem elem; }; struct future_elem { struct future* future; struct list_elem elem; }; #endif
#ifndef _SERVER_H #define _SERVER_H #include <time.h> #include <sys/epoll.h> #include "list.h" #include "threadpool.h" struct http_socket; int open_listenfd(int port); void* check_connections(void* data); int watch_read(struct http_socket* http); int watch_write(struct http_socket* http); int destroy_socket(struct http_socket* http); struct http_socket { int fd; /*struct pollfd* poll_fd;*/ struct epoll_event event; char* read_buffer; int read_buffer_size; time_t last_access; struct list_elem elem; }; struct future_elem { struct future* future; struct list_elem elem; }; #endif
Define functions for polling of sockets.
Define functions for polling of sockets.
C
apache-2.0
tbporter/http-server,tbporter/http-server,tbporter/http-server
f9457b88e1be84a0a03f8185d4b86e9f07562506
pblib/pblib/PBMacros.h
pblib/pblib/PBMacros.h
// // PBMacros.h // pblib // // Created by haxpor on 3/5/15. // Copyright (c) 2015 Maethee Chongchitnant. All rights reserved. // #ifndef pblib_PBMacros_h #define pblib_PBMacros_h #define PB_IS_NSNull(obj) ((obj == (id)[NSNull null]) ? YES : NO) #define PB_IS_NIL_OR_NSNull(obj) ((obj == nil) || (obj == (id)[NSNull null]) ? YES : NO) #endif
// // PBMacros.h // pblib // // Created by haxpor on 3/5/15. // Copyright (c) 2015 Maethee Chongchitnant. All rights reserved. // #ifndef pblib_PBMacros_h #define pblib_PBMacros_h /** Check against NSNull. If input obj is NSNull then return YES, otherwise return NO. */ #define PB_IS_NSNull(obj) ((obj == (id)[NSNull null]) ? YES : NO) /** Check against nil or NSNull. If input obj is nil, or NSNull then return YES, otherwise return NO. */ #define PB_IS_NIL_OR_NSNull(obj) ((obj == nil) || (obj == (id)[NSNull null]) ? YES : NO) #endif
Add comment for added macros.
Add comment for added macros.
C
mit
haxpor/playbasis-ios,haxpor/playbasis-ios,playbasis/mobile-sdk-ios
49d804b0623790650086764dfdda15cc36b068e4
pkg/fizhi/fizhi_land_SIZE.h
pkg/fizhi/fizhi_land_SIZE.h
C $Header$ C $Name$ c Land Grid Horizontal Dimension (Number of Tiles) c ------------------------------------------------ integer nchp, maxtyp parameter (maxtyp = 10) c parameter (nchp = sNx*sNy*maxtyp) parameter (nchp = 2048)
C $Header$ C $Name$ c Land Grid Horizontal Dimension (Number of Tiles) c ------------------------------------------------ integer nchp, maxtyp parameter (maxtyp = 10) parameter (nchp = sNx*sNy*maxtyp)
Make sure nchp is big enough for real vegetation tiles
Make sure nchp is big enough for real vegetation tiles
C
mit
altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h,altMITgcm/MITgcm66h
962d09e8e4566fe6780f106e98d8b131542defb5
ui/aura/aura_switches.h
ui/aura/aura_switches.h
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_AURA_AURA_SWITCHES_H_ #define UI_AURA_AURA_SWITCHES_H_ #pragma once namespace switches { extern const char kAuraHostWindowSize[]; extern const char kAuraWindows[]; } // namespace switches #endif // UI_AURA_AURA_SWITCHES_H_
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_AURA_AURA_SWITCHES_H_ #define UI_AURA_AURA_SWITCHES_H_ #pragma once #include "ui/aura/aura_export.h" namespace switches { AURA_EXPORT extern const char kAuraHostWindowSize[]; AURA_EXPORT extern const char kAuraWindows[]; } // namespace switches #endif // UI_AURA_AURA_SWITCHES_H_
Fix shared library build for aura.
Fix shared library build for aura. TBR=ben@chromium.org,derat@chromium.org R=ben@chromium.org,derat@chromium.org BUG=none TEST=none Review URL: http://codereview.chromium.org/8438039 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@108299 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
yitian134/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,adobe/chromium,adobe/chromium
c5f7bcbae9e82ae3e54987510397d063b941d14f
test/CFrontend/2007-05-07-NestedStructReturn.c
test/CFrontend/2007-05-07-NestedStructReturn.c
// RUN: %llvmgcc %s -S -fnested-functions -o - | grep {sret *%agg.result} struct X { int m, n; }; struct X p(int n) { struct X c(int m) { struct X x; x.m = m; x.n = n; return x; } return c(n); }
// RUN: %llvmgcc %s -S -fnested-functions -o - | grep {sret *%agg.result} struct X { int m, n, o, p; }; struct X p(int n) { struct X c(int m) { struct X x; x.m = m; x.n = n; return x; } return c(n); }
Make the struct bigger, in an attempt to get a "struct return" on more platforms.
Make the struct bigger, in an attempt to get a "struct return" on more platforms. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@37489 91177308-0d34-0410-b5e6-96231b3b80d8
C
bsd-2-clause
chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap
5ad831820bf5c3c557f3b49e70c76c54a92e0085
OctoKit/OCTFileContent.h
OctoKit/OCTFileContent.h
// // OCTFileContent.h // OctoKit // // Created by Aron Cedercrantz on 14-07-2013. // Copyright (c) 2013 GitHub. All rights reserved. // #import "OCTContent.h" // A file in a git repository. @interface OCTFileContent : OCTContent // The encoding of the file content. @property (nonatomic, copy, readonly) NSString *encoding; // The raw, encoded, content of the file. // // See encoding for the encoding used. @property (nonatomic, copy, readonly) NSString *content; @end
// // OCTFileContent.h // OctoKit // // Created by Aron Cedercrantz on 14-07-2013. // Copyright (c) 2013 GitHub. All rights reserved. // #import "OCTContent.h" // A file in a git repository. @interface OCTFileContent : OCTContent // The encoding of the file content. @property (nonatomic, copy, readonly) NSString *encoding; // The raw, encoded, content of the file. // // See `encoding` for the encoding used. @property (nonatomic, copy, readonly) NSString *content; @end
Add backticks around the ref to encoding property.
Add backticks around the ref to encoding property. Signed-off-by: Aron Cedercrantz <ce30127eefa07a02d568832e3de6952fb491981c@cedercrantz.se>
C
mit
daukantas/octokit.objc,cnbin/octokit.objc,CHNLiPeng/octokit.objc,phatblat/octokit.objc,cnbin/octokit.objc,GroundControl-Solutions/octokit.objc,yeahdongcn/octokit.objc,jonesgithub/octokit.objc,GroundControl-Solutions/octokit.objc,daemonchen/octokit.objc,CleanShavenApps/octokit.objc,wrcj12138aaa/octokit.objc,xantage/octokit.objc,CHNLiPeng/octokit.objc,Palleas/octokit.objc,daemonchen/octokit.objc,leichunfeng/octokit.objc,wrcj12138aaa/octokit.objc,leichunfeng/octokit.objc,phatblat/octokit.objc,Acidburn0zzz/octokit.objc,daukantas/octokit.objc,Acidburn0zzz/octokit.objc,xantage/octokit.objc,jonesgithub/octokit.objc,Palleas/octokit.objc
09c0f20bb9372909232397300d74329cc793c552
ui/reflectionview.h
ui/reflectionview.h
#pragma once #include <QtGui/QMouseEvent> #include <QtGui/QPaintEvent> #include <QtWidgets/QWidget> #include "binaryninjaapi.h" #include "dockhandler.h" #include "uitypes.h" class ContextMenuManager; class DisassemblyContainer; class Menu; class ViewFrame; class BINARYNINJAUIAPI ReflectionView: public QWidget, public DockContextHandler { Q_OBJECT Q_INTERFACES(DockContextHandler) ViewFrame* m_frame; BinaryViewRef m_data; DisassemblyContainer* m_disassemblyContainer; public: ReflectionView(ViewFrame* frame, BinaryViewRef data); ~ReflectionView(); virtual void notifyOffsetChanged(uint64_t offset) override; virtual void notifyViewChanged(ViewFrame* frame) override; virtual bool shouldBeVisible(ViewFrame* frame) override; protected: virtual void contextMenuEvent(QContextMenuEvent* event) override; };
#pragma once #include <QtGui/QMouseEvent> #include <QtGui/QPaintEvent> #include <QtWidgets/QWidget> #include "binaryninjaapi.h" #include "dockhandler.h" #include "uitypes.h" class ContextMenuManager; class DisassemblyContainer; class Menu; class ViewFrame; class BINARYNINJAUIAPI ReflectionView: public QWidget, public DockContextHandler { Q_OBJECT Q_INTERFACES(DockContextHandler) ViewFrame* m_frame; BinaryViewRef m_data; DisassemblyContainer* m_disassemblyContainer; public: ReflectionView(ViewFrame* frame, BinaryViewRef data); ~ReflectionView(); virtual void notifyOffsetChanged(uint64_t offset) override; virtual void notifyViewChanged(ViewFrame* frame) override; virtual void notifyVisibilityChanged(bool visible) override; virtual bool shouldBeVisible(ViewFrame* frame) override; protected: virtual void contextMenuEvent(QContextMenuEvent* event) override; };
Update reflection view on transition to visible state.
Update reflection view on transition to visible state.
C
mit
Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api
6a5ae45aad7943b8da905f2f1d7c894e412843ea
cli/tests/hello/hello.c
cli/tests/hello/hello.c
#include <stdio.h> #ifndef ENV_NAME # define ENV_NAME "host" #endif int main(int argc, char* argv) { printf("Hello World from Rebuild environment " ENV_NAME "\n"); return 0; }
#include <stdio.h> #ifndef ENV_NAME # define ENV_NAME "host" #endif int main(int argc, char** argv) { printf("Hello World from Rebuild environment " ENV_NAME "\n"); return 0; }
Fix main parameter of the test application
tests: Fix main parameter of the test application [ci skip] Signed-off-by: Yan Vugenfirer <e958ec5a56cd9794647c3623b3aa5a85122e74a5@daynix.com>
C
apache-2.0
rbld/rebuild,daynix/rebuild,rbld/rebuild,daynix/rebuild,daynix/rebuild,rbld/rebuild
04e00705faf26d7d6f009350cdadc5279dd4e72a
Classes/AXTabBar.h
Classes/AXTabBar.h
// // AXTabBar.h // Pods // #import <UIKit/UIKit.h> typedef enum : NSUInteger { AXTabBarStyleDefault = 0, AXTabBarStyleVariableWidthButton, } AXTabBarStyle; @class AXTabBar; @protocol AXTabBarDelegate <NSObject> @optional - (BOOL)tabBar:(AXTabBar *)tabBar shouldSelectItem:(UITabBarItem *)item; - (void)tabBar:(AXTabBar *)tabBar didSelectItem:(UITabBarItem *)item; @end @interface AXTabBar : UIView @property (copy, nonatomic) NSArray *items; @property (assign, nonatomic) UITabBarItem *selectedItem; @property (assign, nonatomic) id<AXTabBarDelegate> delegate; @property (strong, nonatomic) UIFont *tabBarButtonFont; // TODO: implement this style option. //@property (nonatomic) AXTabBarStyle tabBarStyle; @end
// // AXTabBar.h // Pods // #import <UIKit/UIKit.h> typedef enum : NSUInteger { AXTabBarStyleDefault = 0, AXTabBarStyleVariableWidthButton, } AXTabBarStyle; @class AXTabBar; @protocol AXTabBarDelegate <NSObject> @optional - (BOOL)tabBar:(AXTabBar *)tabBar shouldSelectItem:(UITabBarItem *)item; - (void)tabBar:(AXTabBar *)tabBar didSelectItem:(UITabBarItem *)item; @end @interface AXTabBar : UIView @property (copy, nonatomic) NSArray *items; @property (assign, nonatomic) UITabBarItem *selectedItem; @property (assign, nonatomic) id<AXTabBarDelegate> delegate; @property (strong, nonatomic) UIFont *tabBarButtonFont; @property (nonatomic) AXTabBarStyle tabBarStyle; @end
Allow tab bar style property
Allow tab bar style property
C
mit
nickelsberry/AXStretchableHeaderTabViewController,nickelsberry/AXStretchableHeaderTabViewController,nickelsberry/AXStretchableHeaderTabViewController
2cb74a0913f6568a87de9246063e74089c38ea10
Example/BonMot/NSDictionary+BONEquality.h
Example/BonMot/NSDictionary+BONEquality.h
// // NSDictionary+BONEquality.h // BonMot // // Created by Zev Eisenberg on 7/11/15. // Copyright © 2015 Zev Eisenberg. All rights reserved. // @import Foundation; @import CoreGraphics.CGBase; OBJC_EXTERN const CGFloat kBONCGFloatEpsilon; OBJC_EXTERN BOOL BONCGFloatsCloseEnough(CGFloat float1, CGFloat float2); // clang-format off @interface NSDictionary <KeyType, ObjectType> (BONEquality) - (BOOL)bon_isCloseEnoughEqualToDictionary : (NSDictionary<KeyType, ObjectType> *_Nullable)dictionary; @end // clang-format off
// // NSDictionary+BONEquality.h // BonMot // // Created by Zev Eisenberg on 7/11/15. // Copyright © 2015 Zev Eisenberg. All rights reserved. // @import Foundation; @import CoreGraphics.CGBase; OBJC_EXTERN const CGFloat kBONCGFloatEpsilon; OBJC_EXTERN BOOL BONCGFloatsCloseEnough(CGFloat float1, CGFloat float2); // clang-format off @interface NSDictionary <KeyType, ObjectType> (BONEquality) - (BOOL)bon_isCloseEnoughEqualToDictionary : (NSDictionary<KeyType, ObjectType> *_Nullable)dictionary; @end // clang-format on
Fix copypasta to re-enable clang-format.
Fix copypasta to re-enable clang-format.
C
mit
Raizlabs/BonMot,Raizlabs/BonMot,Raizlabs/BonMot
7afb68bf3ea5c1549f10e3bdb7f25ecb51256786
tests.c
tests.c
#include "lua.h" #include "lua_debug.h" int main() { return 0; }
#include "lua.h" #include "lualib.h" #include "lauxlib.h" #include "lua_debug.h" static const luaL_Reg STANDARD_LIBS[] = { { "_G", luaopen_base }, { LUA_TABLIBNAME, luaopen_table }, { LUA_STRLIBNAME, luaopen_string }, { LUA_MATHLIBNAME, luaopen_math }, { LUA_DBLIBNAME, luaopen_debug }, { 0, 0 } }; int main() { lua_State * l = (lua_State *)luaL_newstate(); const luaL_Reg *lib; for (lib = STANDARD_LIBS; lib->func; ++lib) { luaL_requiref(l, lib->name, lib->func, 1); lua_pop(l, 1); } lua_debug_init(l, "/tmp/socket_lua_debug"); return 0; }
Add a test program with a bit more substance.
Add a test program with a bit more substance.
C
mit
laarmen/lua_debug,laarmen/lua_debug
542c416be33f1cc748530f20db2025f43f490b30
content/public/common/resource_devtools_info.h
content/public/common/resource_devtools_info.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_COMMON_RESOURCE_DEVTOOLS_INFO_H_ #define CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_ #include <string> #include <vector> #include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "content/common/content_export.h" namespace content { struct ResourceDevToolsInfo : base::RefCounted<ResourceDevToolsInfo> { typedef std::vector<std::pair<std::string, std::string> > HeadersVector; CONTENT_EXPORT ResourceDevToolsInfo(); int32 http_status_code; std::string http_status_text; HeadersVector request_headers; HeadersVector response_headers; std::string request_headers_text; std::string response_headers_text; private: friend class base::RefCounted<ResourceDevToolsInfo>; CONTENT_EXPORT ~ResourceDevToolsInfo(); }; } // namespace content #endif // CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_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_COMMON_RESOURCE_DEVTOOLS_INFO_H_ #define CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_ #include <string> #include <vector> #include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "base/strings/string_split.h" #include "content/common/content_export.h" namespace content { struct ResourceDevToolsInfo : base::RefCounted<ResourceDevToolsInfo> { typedef base::StringPairs HeadersVector; CONTENT_EXPORT ResourceDevToolsInfo(); int32 http_status_code; std::string http_status_text; HeadersVector request_headers; HeadersVector response_headers; std::string request_headers_text; std::string response_headers_text; private: friend class base::RefCounted<ResourceDevToolsInfo>; CONTENT_EXPORT ~ResourceDevToolsInfo(); }; } // namespace content #endif // CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_
Use base::StringPairs where appropriate from /content
Use base::StringPairs where appropriate from /content Because base/strings/string_split.h defines: typedef std::vector<std::pair<std::string, std::string> > StringPairs; BUG=412250 Review URL: https://codereview.chromium.org/600163003 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#296649}
C
bsd-3-clause
hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,dednal/chromium.src,ltilve/chromium,dednal/chromium.src,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,dednal/chromium.src,M4sse/chromium.src,ltilve/chromium,markYoungH/chromium.src,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,Just-D/chromium-1,fujunwei/chromium-crosswalk,Jonekee/chromium.src,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,Fireblend/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,markYoungH/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,krieger-od/nwjs_chromium.src,jaruba/chromium.src,Chilledheart/chromium,fujunwei/chromium-crosswalk,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,ltilve/chromium,hgl888/chromium-crosswalk,markYoungH/chromium.src,Chilledheart/chromium,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,ltilve/chromium,crosswalk-project/chromium-crosswalk-efl,Just-D/chromium-1,M4sse/chromium.src,M4sse/chromium.src,dednal/chromium.src,Just-D/chromium-1,Just-D/chromium-1,M4sse/chromium.src,Chilledheart/chromium,dushu1203/chromium.src,Jonekee/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,Jonekee/chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswalk,M4sse/chromium.src,dednal/chromium.src,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,markYoungH/chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dednal/chromium.src,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,Chilledheart/chromium,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,dednal/chromium.src,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,Chilledheart/chromium,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,Just-D/chromium-1,jaruba/chromium.src,ltilve/chromium,ltilve/chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,M4sse/chromium.src,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,dednal/chromium.src,jaruba/chromium.src,Fireblend/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,dushu1203/chromium.src,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,markYoungH/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,Just-D/chromium-1,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk
c57a5ce0df04be61bafedc0f3043d568103c7ab5
arch/powerpc/include/uapi/asm/byteorder.h
arch/powerpc/include/uapi/asm/byteorder.h
#ifndef _ASM_POWERPC_BYTEORDER_H #define _ASM_POWERPC_BYTEORDER_H /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #include <linux/byteorder/big_endian.h> #endif /* _ASM_POWERPC_BYTEORDER_H */
#ifndef _ASM_POWERPC_BYTEORDER_H #define _ASM_POWERPC_BYTEORDER_H /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #ifdef __LITTLE_ENDIAN__ #include <linux/byteorder/little_endian.h> #else #include <linux/byteorder/big_endian.h> #endif #endif /* _ASM_POWERPC_BYTEORDER_H */
Include the appropriate endianness header
powerpc: Include the appropriate endianness header This patch will have powerpc include the appropriate generic endianness header depending on what the compiler reports. Signed-off-by: Ian Munsie <2796b2a6f60f1cdadaf10e577f7c9240e2ad3d38@au1.ibm.com> Signed-off-by: Anton Blanchard <14deb5e5e417133e888bf47bb6a3555c9bb7d81c@samba.org> Signed-off-by: Benjamin Herrenschmidt <a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
98c1fbe223dd5469e194a4e772b8e5b181b692ee
src/ui.h
src/ui.h
#pragma once void draw_seconds(GContext *ctx, uint8_t seconds, Layer *layer); void draw_minutes(GContext *ctx, uint8_t minutes, Layer *layer); void draw_hours(GContext *ctx, uint8_t hours, Layer *layer);
#pragma once /* This header file declares drawing methods that are defined in rect.c or round.c, depending on the platform being built. Since the methods share the same function signature, they can share the same header file, even though the implementations of the functions themselves are different. */ void draw_seconds(GContext *ctx, uint8_t seconds, Layer *layer); void draw_minutes(GContext *ctx, uint8_t minutes, Layer *layer); void draw_hours(GContext *ctx, uint8_t hours, Layer *layer);
Add comment to header file about change
Add comment to header file about change
C
mit
NiVZ78/concentricity,pebble-examples/concentricity,NiVZ78/concentricity,pebble-examples/concentricity,pebble-examples/concentricity
93ae893e22571cc61f7d334cf36bb5642460a39c
extensions/ringopengl/opengl11/ring_opengl11.c
extensions/ringopengl/opengl11/ring_opengl11.c
#include "ring.h" /* OpenGL 1.1 Extension Copyright (c) 2017 Mahmoud Fayed <msfclipper@yahoo.com> */ #include <GL/glew.h> #include <GL/glut.h> RING_FUNC(ring_get_gl_zero) { RING_API_RETNUMBER(GL_ZERO); } RING_FUNC(ring_get_gl_false) { RING_API_RETNUMBER(GL_FALSE); } RING_FUNC(ring_get_gl_logic_op) { RING_API_RETNUMBER(GL_LOGIC_OP); } RING_FUNC(ring_get_gl_none) { RING_API_RETNUMBER(GL_NONE); } RING_API void ringlib_init(RingState *pRingState) { ring_vm_funcregister("get_gl_zero",ring_get_gl_zero); ring_vm_funcregister("get_gl_false",ring_get_gl_false); ring_vm_funcregister("get_gl_logic_op",ring_get_gl_logic_op); ring_vm_funcregister("get_gl_none",ring_get_gl_none); }
#include "ring.h" /* OpenGL 1.1 Extension Copyright (c) 2017 Mahmoud Fayed <msfclipper@yahoo.com> */ #include <GL/glew.h> #include <GL/glut.h> RING_FUNC(ring_get_gl_zero) { RING_API_RETNUMBER(GL_ZERO); } RING_FUNC(ring_get_gl_false) { RING_API_RETNUMBER(GL_FALSE); } RING_FUNC(ring_get_gl_logic_op) { RING_API_RETNUMBER(GL_LOGIC_OP); } RING_FUNC(ring_get_gl_none) { RING_API_RETNUMBER(GL_NONE); } RING_FUNC(ring_get_gl_texture_components) { RING_API_RETNUMBER(GL_TEXTURE_COMPONENTS); } RING_API void ringlib_init(RingState *pRingState) { ring_vm_funcregister("get_gl_zero",ring_get_gl_zero); ring_vm_funcregister("get_gl_false",ring_get_gl_false); ring_vm_funcregister("get_gl_logic_op",ring_get_gl_logic_op); ring_vm_funcregister("get_gl_none",ring_get_gl_none); ring_vm_funcregister("get_gl_texture_components",ring_get_gl_texture_components); }
Update RingOpenGL 1.1 - Add Constant (Source Code) : GL_TEXTURE_COMPONENTS
Update RingOpenGL 1.1 - Add Constant (Source Code) : GL_TEXTURE_COMPONENTS
C
mit
ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring
29db01601e61470f99eff92e5191bfefa64f2a7d
src/irc.h
src/irc.h
#ifndef _IRC_H #define _IRC_H #define NICK "slackboat" #define SERVER "irc.what.cd" #define PASSWORD "thisistheonlygoodbot" void irc_notice_event(char *, char *, char *); void irc_welcome_event(void); void irc_privmsg_event(char *, char *, char *); void irc_privmsg(const char *, const char *); void irc_join_channel(const char *); #endif
#ifndef _IRC_H #define _IRC_H #define NICK "slackboat" #define SERVER "irc.what.cd" #define PASSWORD "PASSWORD" void irc_notice_event(char *, char *, char *); void irc_welcome_event(void); void irc_privmsg_event(char *, char *, char *); void irc_privmsg(const char *, const char *); void irc_join_channel(const char *); #endif
Structure the program for minimum coupling
Structure the program for minimum coupling
C
isc
Zlacki/slackboat,Zlacki/slackboat,Zlacki/slackboat,Zlacki/slackboat
35bc38ac4592800a2c3d13b001a0b66679c8f0b7
include/api/ofp_epoll.h
include/api/ofp_epoll.h
/* Copyright (c) 2016, Nokia * Copyright (c) 2016, ENEA Software AB * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #ifndef __OFP_EPOLL_H__ #define __OFP_EPOLL_H__ #include <stdint.h> typedef union ofp_epoll_data { void *ptr; int fd; uint32_t u32; uint64_t u64; } ofp_epoll_data_t; struct ofp_epoll_event { uint32_t events; ofp_epoll_data_t data; }; enum OFP_EPOLL_EVENTS { OFP_EPOLLIN = 0x001, #define OFP_EPOLLIN OFP_EPOLLIN }; #define OFP_EPOLL_CTL_ADD 1 #define OFP_EPOLL_CTL_DEL 2 #define OFP_EPOLL_CTL_MOD 3 int ofp_epoll_create(int size); int ofp_epoll_ctl(int epfd, int op, int fd, struct ofp_epoll_event *event); int ofp_epoll_wait(int epfd, struct ofp_epoll_event *events, int maxevents, int timeout); #endif
/* Copyright (c) 2016, Nokia * Copyright (c) 2016, ENEA Software AB * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #ifndef __OFP_EPOLL_H__ #define __OFP_EPOLL_H__ #include <stdint.h> #if __GNUC__ >= 4 #pragma GCC visibility push(default) #endif typedef union ofp_epoll_data { void *ptr; int fd; uint32_t u32; uint64_t u64; } ofp_epoll_data_t; struct ofp_epoll_event { uint32_t events; ofp_epoll_data_t data; }; enum OFP_EPOLL_EVENTS { OFP_EPOLLIN = 0x001, #define OFP_EPOLLIN OFP_EPOLLIN }; #define OFP_EPOLL_CTL_ADD 1 #define OFP_EPOLL_CTL_DEL 2 #define OFP_EPOLL_CTL_MOD 3 int ofp_epoll_create(int size); int ofp_epoll_ctl(int epfd, int op, int fd, struct ofp_epoll_event *event); int ofp_epoll_wait(int epfd, struct ofp_epoll_event *events, int maxevents, int timeout); #if __GNUC__ >= 4 #pragma GCC visibility pop #endif #endif
Add visibility to epoll headers
Add visibility to epoll headers The odp_epoll_* symbols were not visible in the final library built with GCC. Signed-off-by: Oriol Arcas <a98c9d4e37de3d71db2e1a293b51c579a914c4ae@starflownetworks.com> Reviewed-by: Sorin Vultureanu <8013ba55f8675034bc2ab0d6c3a1c9650437ca36@enea.com>
C
bsd-3-clause
TolikH/ofp,TolikH/ofp,OpenFastPath/ofp,OpenFastPath/ofp,OpenFastPath/ofp,TolikH/ofp,OpenFastPath/ofp
6626332f97efce89d2322a203058b4ab74ffc17b
cmd_start_daemon.c
cmd_start_daemon.c
/* * Copyright (c) 2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in * the LICENSE file in the root directory of this source tree. An * additional grant of patent rights can be found in the PATENTS file * in the same directory. * */ #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <limits.h> #include <arpa/inet.h> #include <string.h> #include "util.h" #include "autocmd.h" #include "fs.h" #include "child.h" #include "net.h" #include "strutil.h" #include "constants.h" FORWARD(start_daemon); #if !FBADB_MAIN #include "stubdaemon.h" int start_daemon_main(const struct cmd_start_daemon_info* info) { struct cmd_stub_info sinfo = { .stub.listen = true, .stub.daemonize = true, .stub.replace = info->start_daemon.replace, }; return stub_main(&sinfo); } #endif
/* * Copyright (c) 2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in * the LICENSE file in the root directory of this source tree. An * additional grant of patent rights can be found in the PATENTS file * in the same directory. * */ #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <limits.h> #include <arpa/inet.h> #include <string.h> #include "util.h" #include "autocmd.h" #include "fs.h" #include "child.h" #include "net.h" #include "strutil.h" #include "constants.h" FORWARD(start_daemon); #if !FBADB_MAIN #include "stubdaemon.h" int start_daemon_main(const struct cmd_start_daemon_info* info) { SCOPED_RESLIST(rl); struct cmd_stub_info sinfo = { .stub.listen = true, .stub.daemonize = true, .stub.replace = info->start_daemon.replace, }; set_prgname(xaprintf("%s stub", xbasename(orig_argv0))); return stub_main(&sinfo); } #endif
Set prgname to stub while in daemon
Set prgname to stub while in daemon
C
bsd-3-clause
JuudeDemos/fb-adb,JuudeDemos/fb-adb,biddyweb/fb-adb,0359xiaodong/fb-adb,0359xiaodong/fb-adb,0359xiaodong/fb-adb,biddyweb/fb-adb,biddyweb/fb-adb,tcmulcahy/fb-adb,tcmulcahy/fb-adb,JuudeDemos/fb-adb,tcmulcahy/fb-adb
31ab70c9b25b7203422c12d18439cfdee95a6d8d
ir/be/test/CallingTest.c
ir/be/test/CallingTest.c
#include <stdio.h> int int_func(void) { return 42; } float float_func(void) { return 13.5f; } int main(int argc, char *argv[]) { printf("calltest.c\n"); printf(" Calling int function: %d\n", int_func()); printf(" Calling float function: %f\n", float_func()); return 0; }
#include <stdio.h> int int_func(void) { return 42; } float float_func(void) { return 13.5f; } double double_func(void) { return 13.5; } int main(int argc, char *argv[]) { printf("calltest.c\n"); printf(" Calling int function: %d\n", int_func()); printf(" Calling float function: %f\n", float_func()); printf(" Calling double function: %f\n", double_func()); return 0; }
Add test for double call
Add test for double call [r15890]
C
lgpl-2.1
libfirm/libfirm,libfirm/libfirm,libfirm/libfirm,jonashaag/libfirm,davidgiven/libfirm,davidgiven/libfirm,jonashaag/libfirm,8l/libfirm,davidgiven/libfirm,MatzeB/libfirm,killbug2004/libfirm,8l/libfirm,MatzeB/libfirm,davidgiven/libfirm,jonashaag/libfirm,killbug2004/libfirm,8l/libfirm,davidgiven/libfirm,jonashaag/libfirm,8l/libfirm,MatzeB/libfirm,8l/libfirm,libfirm/libfirm,libfirm/libfirm,jonashaag/libfirm,MatzeB/libfirm,davidgiven/libfirm,killbug2004/libfirm,jonashaag/libfirm,8l/libfirm,jonashaag/libfirm,MatzeB/libfirm,davidgiven/libfirm,killbug2004/libfirm,MatzeB/libfirm,killbug2004/libfirm,killbug2004/libfirm,killbug2004/libfirm,MatzeB/libfirm,8l/libfirm
0416ae00706748da9fb6a1c716b824aa33cac1a5
hello_world.c
hello_world.c
#include <stdio.h> int main() { printf("hello, world\n"); }
#include <stdio.h> int main() { printf("hello, world\n"); return 0; }
Fix gcc warning when -Wall (implicit return).
Fix gcc warning when -Wall (implicit return). warning: control reaches end of non-void function [-Wreturn-type] } ^
C
mit
learnclang/1-helloworld
394d0cdb020eaf4342d6f0fb31ca85d802f529f9
src/util/dlist/dlist_debug.c
src/util/dlist/dlist_debug.c
/** * @file * @brief Paranoia checks of doubly-linked lists * * @date 05.12.2013 * @author Eldar Abusalimov */ #include <inttypes.h> #include <assert.h> #include <util/dlist.h> #if DLIST_DEBUG_VERSION void __dlist_debug_check(const struct dlist_head *head) { const struct dlist_head *p = head->prev; const struct dlist_head *n = head->next; uintptr_t poison = head->poison; assertf(((!poison || (void *) ~poison == head) && n->prev == head && p->next == head), "\n" "head: %p, poison: %p, ~poison: %p,\n" "n: %p, n->prev: %p,\n" "p: %p, p->next: %p\n", head, (void *)poison, (void *) ~poison, n, n->prev, p, p->next); } #endif
/** * @file * @brief Paranoia checks of doubly-linked lists * * @date 05.12.2013 * @author Eldar Abusalimov */ #include <inttypes.h> #include <assert.h> #include <util/dlist.h> #if DLIST_DEBUG_VERSION void __dlist_debug_check(const struct dlist_head *head) { #ifndef NDEBUG const struct dlist_head *p = head->prev; const struct dlist_head *n = head->next; uintptr_t poison = head->poison; assertf(((!poison || (void *) ~poison == head) && n->prev == head && p->next == head), "\n" "head: %p, poison: %p, ~poison: %p,\n" "n: %p, n->prev: %p,\n" "p: %p, p->next: %p\n", head, (void *)poison, (void *) ~poison, n, n->prev, p, p->next); #endif } #endif
Fix dlist compilation with NDEBUG flag
minor: Fix dlist compilation with NDEBUG flag
C
bsd-2-clause
embox/embox,embox/embox,embox/embox,embox/embox,embox/embox,embox/embox
21882ab7a21eb17f0d23d2d2459fdb3c6e787322
libpkg/pkg_util.h
libpkg/pkg_util.h
#ifndef _PKG_UTIL_H #define _PKG_UTIL_H #include <sys/types.h> #include <sys/sbuf.h> #include <sys/param.h> #define ARRAY_INIT {0, 0, NULL} struct array { size_t cap; size_t len; void **data; }; #define STARTS_WITH(string, needle) (strncasecmp(string, needle, strlen(needle)) == 0) #define ERROR_SQLITE(db) \ EMIT_PKG_ERROR("sqlite: %s", sqlite3_errmsg(db)) int sbuf_set(struct sbuf **, const char *); const char * sbuf_get(struct sbuf *); void sbuf_reset(struct sbuf *); void sbuf_free(struct sbuf *); int mkdirs(const char *path); int file_to_buffer(const char *, char **, off_t *); int format_exec_cmd(char **, const char *, const char *, const char *); int split_chr(char *, char); int file_fetch(const char *, const char *); int is_dir(const char *); int is_conf_file(const char *path, char newpath[MAXPATHLEN]); int sha256_file(const char *, char[65]); void sha256_str(const char *, char[65]); #endif
#ifndef _PKG_UTIL_H #define _PKG_UTIL_H #include <sys/types.h> #include <sys/sbuf.h> #include <sys/param.h> #define STARTS_WITH(string, needle) (strncasecmp(string, needle, strlen(needle)) == 0) #define ERROR_SQLITE(db) \ EMIT_PKG_ERROR("sqlite: %s", sqlite3_errmsg(db)) int sbuf_set(struct sbuf **, const char *); const char * sbuf_get(struct sbuf *); void sbuf_reset(struct sbuf *); void sbuf_free(struct sbuf *); int mkdirs(const char *path); int file_to_buffer(const char *, char **, off_t *); int format_exec_cmd(char **, const char *, const char *, const char *); int split_chr(char *, char); int file_fetch(const char *, const char *); int is_dir(const char *); int is_conf_file(const char *path, char newpath[MAXPATHLEN]); int sha256_file(const char *, char[65]); void sha256_str(const char *, char[65]); #endif
Remove last occurences of the dead struct array
Remove last occurences of the dead struct array
C
bsd-2-clause
en90/pkg,khorben/pkg,en90/pkg,khorben/pkg,Open343/pkg,skoef/pkg,Open343/pkg,skoef/pkg,junovitch/pkg,junovitch/pkg,khorben/pkg
246372f35d6e7025e7ff16ce8d7543e961800a0e
include/llvm/ExecutionEngine/GenericValue.h
include/llvm/ExecutionEngine/GenericValue.h
//===-- GenericValue.h - Represent any type of LLVM value -------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // The GenericValue class is used to represent an LLVM value of arbitrary type. // //===----------------------------------------------------------------------===// #ifndef GENERIC_VALUE_H #define GENERIC_VALUE_H #include "Support/DataTypes.h" namespace llvm { typedef uint64_t PointerTy; union GenericValue { bool BoolVal; unsigned char UByteVal; signed char SByteVal; unsigned short UShortVal; signed short ShortVal; unsigned int UIntVal; signed int IntVal; uint64_t ULongVal; int64_t LongVal; double DoubleVal; float FloatVal; PointerTy PointerVal; unsigned char Untyped[8]; GenericValue() {} GenericValue(void *V) { PointerVal = (PointerTy)(intptr_t)V; } }; inline GenericValue PTOGV(void *P) { return GenericValue(P); } inline void* GVTOP(const GenericValue &GV) { return (void*)(intptr_t)GV.PointerVal; } } // End llvm namespace #endif
//===-- GenericValue.h - Represent any type of LLVM value -------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // The GenericValue class is used to represent an LLVM value of arbitrary type. // //===----------------------------------------------------------------------===// #ifndef GENERIC_VALUE_H #define GENERIC_VALUE_H #include "Support/DataTypes.h" namespace llvm { typedef uintptr_t PointerTy; union GenericValue { bool BoolVal; unsigned char UByteVal; signed char SByteVal; unsigned short UShortVal; signed short ShortVal; unsigned int UIntVal; signed int IntVal; uint64_t ULongVal; int64_t LongVal; double DoubleVal; float FloatVal; PointerTy PointerVal; unsigned char Untyped[8]; GenericValue() {} GenericValue(void *V) { PointerVal = (PointerTy)(intptr_t)V; } }; inline GenericValue PTOGV(void *P) { return GenericValue(P); } inline void* GVTOP(const GenericValue &GV) { return (void*)(intptr_t)GV.PointerVal; } } // End llvm namespace #endif
Use uintptr_t for pointer values in the ExecutionEngine.
Use uintptr_t for pointer values in the ExecutionEngine. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@10425 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm
b841954d3e11a0d626016ca709f4b4fd3ad75e8e
Classes/Categories/NSDate+GTTimeAdditions.h
Classes/Categories/NSDate+GTTimeAdditions.h
// // NSDate+GTTimeAdditions.h // ObjectiveGitFramework // // Created by Danny Greg on 27/03/2013. // Copyright (c) 2013 GitHub, Inc. All rights reserved. // #import <Foundation/Foundation.h> #import "git2.h" @interface NSDate (GTTimeAdditions) // Creates a new `NSDate` from the provided `git_time`. // // time - The `git_time` to base the returned date on. // timeZone - The timezone used by the time passed in. // // Returns an `NSDate` object representing the passed in `time`. + (NSDate *)gt_dateFromGitTime:(git_time)time timeZone:(NSTimeZone **)timeZone; // Converts the date to a `git_time`. // // timeZone - An `NSTimeZone` to describe the time offset. This is optional, if // `nil` the default time zone will be used. - (git_time)gt_gitTimeUsingTimeZone:(NSTimeZone *)timeZone; @end @interface NSTimeZone (GTTimeAdditions) // The difference, in minutes, between the current default timezone and GMT. @property (nonatomic, readonly) int gt_gitTimeOffset; @end
// // NSDate+GTTimeAdditions.h // ObjectiveGitFramework // // Created by Danny Greg on 27/03/2013. // Copyright (c) 2013 GitHub, Inc. All rights reserved. // #import <Foundation/Foundation.h> #import "git2.h" @interface NSDate (GTTimeAdditions) // Creates a new `NSDate` from the provided `git_time`. // // time - The `git_time` to base the returned date on. // timeZone - The timezone used by the time passed in. Optional. // // Returns an `NSDate` object representing the passed in `time`. + (NSDate *)gt_dateFromGitTime:(git_time)time timeZone:(NSTimeZone **)timeZone; // Converts the date to a `git_time`. // // timeZone - An `NSTimeZone` to describe the time offset. This is optional, if // `nil` the default time zone will be used. - (git_time)gt_gitTimeUsingTimeZone:(NSTimeZone *)timeZone; @end @interface NSTimeZone (GTTimeAdditions) // The difference, in minutes, between the current default timezone and GMT. @property (nonatomic, readonly) int gt_gitTimeOffset; @end
Document the timeZone as being optional.
Document the timeZone as being optional.
C
mit
tiennou/objective-git,blackpixel/objective-git,misterfifths/objective-git,javiertoledo/objective-git,Acidburn0zzz/objective-git,0x4a616e/objective-git,phatblat/objective-git,nerdishbynature/objective-git,TOMalley104/objective-git,c9s/objective-git,misterfifths/objective-git,javiertoledo/objective-git,c9s/objective-git,pietbrauer/objective-git,Acidburn0zzz/objective-git,0x4a616e/objective-git,misterfifths/objective-git,tiennou/objective-git,blackpixel/objective-git,dleehr/objective-git,blackpixel/objective-git,alehed/objective-git,nerdishbynature/objective-git,libgit2/objective-git,libgit2/objective-git,TOMalley104/objective-git,phatblat/objective-git,slavikus/objective-git,c9s/objective-git,javiertoledo/objective-git,libgit2/objective-git,Acidburn0zzz/objective-git,slavikus/objective-git,alehed/objective-git,0x4a616e/objective-git,dleehr/objective-git,c9s/objective-git,misterfifths/objective-git,dleehr/objective-git,alehed/objective-git,pietbrauer/objective-git,TOMalley104/objective-git,tiennou/objective-git,slavikus/objective-git,phatblat/objective-git,javiertoledo/objective-git,libgit2/objective-git,TOMalley104/objective-git,nerdishbynature/objective-git,dleehr/objective-git,pietbrauer/objective-git,blackpixel/objective-git,pietbrauer/objective-git,Acidburn0zzz/objective-git
6c1897af9f323a22cf53a195a12168e42985c62e
smallrl.c
smallrl.c
#include <stdlib.h> #include <curses.h> #include <time.h> #include "game.h" #include "ui.h" static void shutdown(void); int main(int argc, char ** argv) { srand(time(NULL)); initscr(); cbreak(); noecho(); curs_set(0); keypad(stdscr, TRUE); start_color(); init_pair(color_black, COLOR_BLACK, COLOR_BLACK); init_pair(color_yellow, COLOR_YELLOW, COLOR_BLACK); init_pair(color_blue, COLOR_BLUE, COLOR_BLACK); init_pair(color_red, COLOR_RED, COLOR_BLACK); init_pair(color_green, COLOR_GREEN, COLOR_BLACK); init_pair(color_cyan, COLOR_CYAN, COLOR_BLACK); init_pair(color_magenta, COLOR_MAGENTA, COLOR_BLACK); if (LINES < 24 || COLS < 80) { shutdown(); printf("Terminal too small."); exit(1); } do { erase(); new_game(); } while (play()); shutdown(); return 0; } static void shutdown(void) { endwin(); return; }
#include <stdlib.h> #include <curses.h> #include <time.h> #include "game.h" #include "ui.h" static void shutdown(void); int main(int argc, char ** argv) { time_t random_seed = time(NULL); printf("Random game #%ld\n", random_seed); srand(random_seed); initscr(); cbreak(); noecho(); curs_set(0); keypad(stdscr, TRUE); start_color(); init_pair(color_black, COLOR_BLACK, COLOR_BLACK); init_pair(color_yellow, COLOR_YELLOW, COLOR_BLACK); init_pair(color_blue, COLOR_BLUE, COLOR_BLACK); init_pair(color_red, COLOR_RED, COLOR_BLACK); init_pair(color_green, COLOR_GREEN, COLOR_BLACK); init_pair(color_cyan, COLOR_CYAN, COLOR_BLACK); init_pair(color_magenta, COLOR_MAGENTA, COLOR_BLACK); if (LINES < 24 || COLS < 80) { shutdown(); printf("Terminal too small."); exit(1); } do { erase(); new_game(); } while (play()); shutdown(); return 0; } static void shutdown(void) { endwin(); return; }
Print random seed for sharing / debugging purposes
Print random seed for sharing / debugging purposes
C
bsd-2-clause
happyponyland/smallrl,happyponyland/smallrl,happyponyland/smallrl
608e78d43eb205fd6bb4755c5495a7d1460a159b
src/tgl.c
src/tgl.c
/* Main program for TGL (Text Generation Language). */ #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> #include <fcntl.h> int main(int argc, char** argv) { printf("hello world\n"); return 0; }
/* Main program for TGL (Text Generation Language). */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> #include <fcntl.h> /* BEGIN: String handling (strings may have NUL bytes within, and are not * NUL-terminated). */ /* Defines a length-prefixed string. * The string contents start at the byte after the struct itself. */ typedef struct string { unsigned len; }* string; typedef unsigned char byte; /* Returns a pointer to the beginning of character data of the given string. */ static inline byte* string_data(string s) { byte* c = (byte*)s; return c + sizeof(struct string); } /* Converts a C string to a TGL string. * The string must be free()d by the caller. */ static string covert_string(char* str) { unsigned int len = strlen(str); string result = malloc(sizeof(struct string) + len); result->len = len; memcpy(string_data(result), str, len); return result; } /* Duplicates the given TGL string. * The string must be free()d by the caller. */ static string dupe_string(string str) { string result = malloc(sizeof(struct string) + str->len); memcpy(result, str, sizeof(struct string) + str->len); return result; } /* END: String handling */ int main(int argc, char** argv) { printf("hello world\n"); return 0; }
Add length-prefixed string handling functions.
Add length-prefixed string handling functions.
C
bsd-3-clause
AltSysrq/tgl,AltSysrq/tgl
536df7c46c031adf1591ed44b5c51c905422e63f
BBBAPI/BBBAPI/Classes/BBASearchSuggestionsResult.h
BBBAPI/BBBAPI/Classes/BBASearchSuggestionsResult.h
// // BBASearchSuggestionsResult.h // BBBAPI // // Created by Owen Worley on 12/01/2015. // Copyright (c) 2015 Blinkbox Entertainment Ltd. All rights reserved. // #import <Foundation/Foundation.h> @class FEMObjectMapping; /** * Represents data returned from the book search suggestions service (search/suggestions) */ @interface BBASearchSuggestionsResult : NSObject @property (nonatomic, copy) NSString *type; @property (nonatomic, copy) NSArray *items; /** * Describes the mapping of server search result data to `BBASearchSuggestionsResult` */ + (FEMObjectMapping *) searchSuggestionsResultMapping; @end
// // BBASearchSuggestionsResult.h // BBBAPI // // Created by Owen Worley on 12/01/2015. // Copyright (c) 2015 Blinkbox Entertainment Ltd. All rights reserved. // #import <Foundation/Foundation.h> @class FEMObjectMapping; /** * Represents data returned from the book search suggestions service (search/suggestions) */ @interface BBASearchSuggestionsResult : NSObject @property (nonatomic, copy) NSString *type; /** * Contains `BBASearchServiceSuggestion` objects */ @property (nonatomic, copy) NSArray *items; /** * Describes the mapping of server search result data to `BBASearchSuggestionsResult` */ + (FEMObjectMapping *) searchSuggestionsResultMapping; @end
Document contents of items array
Document contents of items array
C
mit
blinkboxbooks/blinkbox-network.objc,blinkboxbooks/blinkbox-network.objc
6f81fa70bca7bbf082253c5f2e6cef5b02cb4b7d
x86_64/unix/2.2.4progamain.c
x86_64/unix/2.2.4progamain.c
#include <stdlib.h> #include <stdio.h> typedef struct Poly Poly; struct Poly { int32_t coef; int32_t abc; Poly *link; }; int add(Poly *q, Poly *p); Poly *avail; int main(int argc, char **argv) { Poly *pool, *p; pool = calloc(500, sizeof(*pool)); for(p = pool; p < pool+499; p++) p->link = p+1; p->link = NULL; avail = pool; exit(0); }
#include <stdlib.h> #include <stdio.h> #include <stdint.h> typedef struct Poly Poly; struct Poly { int32_t coef; int32_t abc; Poly *link; }; int add(Poly *q, Poly *p); Poly *avail; Poly* makepoly(void) { Poly *p; if(avail == NULL) return NULL; p = avail; avail = avail->link; p->abc = -1; p->coef = 0; p->link = p; return p; } int addterm(Poly *p, int32_t coef, unsigned char a, unsigned char b, unsigned char c) { Poly *q, *r; int32_t abc; abc = (a << 16) + (b << 8) + c; for(r = p->link; abc < r->abc; r = p->link) p = r; if(abc == r->abc) { r->coef += coef; return 0; } if(avail == NULL) return -1; q = avail; avail = avail->link; q->coef = coef; q->abc = abc; q->link = r; p->link = q; return 0; } int main(int argc, char **argv) { Poly *pool, *p; pool = calloc(500, sizeof(*pool)); for(p = pool; p < pool+499; p++) p->link = p+1; p->link = NULL; avail = pool; exit(0); }
Add infrastructure for constructing polynomials
Add infrastructure for constructing polynomials
C
isc
spewspew/TAOCP,spewspews/TAOCP
abcc32beb01e1beb2f274de94d6917d90aae0ffd
ASFFeedly/ASFRequestBuilder.h
ASFFeedly/ASFRequestBuilder.h
// // ASFRequestBuilder.h // ASFFeedly // // Created by Anton Simakov on 12/12/13. // Copyright (c) 2013 Anton Simakov. All rights reserved. // #import <Foundation/Foundation.h> extern NSURL *ASFURLByAppendingParameters(NSURL *URL, NSDictionary *parameters); extern NSString *ASFQueryFromURL(NSURL *URL); extern NSString *ASFQueryFromParameters(NSDictionary *parameters); extern NSString *ASFURLEncodedString(NSString *string); extern NSString *ASFURLDecodedString(NSString *string); extern NSDictionary *ASFParametersFromQuery(NSString *query); @interface ASFRequestBuilder : NSObject + (NSMutableURLRequest *)requestWithMethod:(NSString *)method URLString:(NSString *)URLString parameters:(NSDictionary *)parameters token:(NSString *)token error:(NSError *__autoreleasing *)error; + (NSMutableURLRequest *)requestWithURL:(NSURL *)URL method:(NSString *)method parameters:(NSDictionary *)parameters error:(NSError *__autoreleasing *)error; @end
// // ASFRequestBuilder.h // ASFFeedly // // Created by Anton Simakov on 12/12/13. // Copyright (c) 2013 Anton Simakov. All rights reserved. // #import <Foundation/Foundation.h> extern NSURL *ASFURLByAppendingParameters(NSURL *URL, NSDictionary *parameters); extern NSString *ASFQueryFromURL(NSURL *URL); extern NSString *ASFQueryFromParameters(NSDictionary *parameters); extern NSString *ASFURLEncodedString(NSString *string); extern NSString *ASFURLDecodedString(NSString *string); extern NSDictionary *ASFParametersFromQuery(NSString *query); @interface ASFRequestBuilder : NSObject + (NSMutableURLRequest *)requestWithMethod:(NSString *)method URLString:(NSString *)URLString parameters:(NSDictionary *)parameters token:(NSString *)token error:(NSError *__autoreleasing *)error; @end
Remove private method from the public interface
Remove private method from the public interface
C
mit
anton-simakov/ASFeedly
7e4e4f0f7ea96059d18b65ffa9fcc3d6f9a5bce3
OCCommunicationLib/OCCommunicationLib/OCErrorMsg.h
OCCommunicationLib/OCCommunicationLib/OCErrorMsg.h
// // OCErrorMsg.h // Owncloud iOs Client // // Copyright (c) 2014 ownCloud (http://www.owncloud.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // #define kOCErrorServerUnauthorized 401 #define kOCErrorServerForbidden 403 #define kOCErrorServerPathNotFound 404 #define kOCErrorProxyAuth 407 #define kOCErrorServerTimeout 408
// // OCErrorMsg.h // Owncloud iOs Client // // Copyright (c) 2014 ownCloud (http://www.owncloud.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // #define kOCErrorServerUnauthorized 401 #define kOCErrorServerForbidden 403 #define kOCErrorServerPathNotFound 404 #define kOCErrorServerMethodNotPermitted 405c #define kOCErrorProxyAuth 407 #define kOCErrorServerTimeout 408
Add error constant for not permmited methods in the server
Add error constant for not permmited methods in the server
C
mit
blueseaguo/ios-library,pd81999/ios-library,owncloud/ios-library
a4d60fe0ef77abcc9d91cdca0c6f276e5a7fb627
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
cinnamoncoin/Feathercoin,nanocoins/mycoin,nanocoins/mycoin,cinnamoncoin/Feathercoin,saydulk/Feathercoin,cinnamoncoin/Feathercoin,nanocoins/mycoin,ghostlander/Feathercoin,enlighter/Feathercoin,saydulk/Feathercoin,cqtenq/Feathercoin,enlighter/Feathercoin,cqtenq/Feathercoin,cinnamoncoin/Feathercoin,nanocoins/mycoin,ghostlander/Feathercoin,enlighter/Feathercoin,ghostlander/Feathercoin,nanocoins/mycoin,enlighter/Feathercoin,cinnamoncoin/Feathercoin,ghostlander/Feathercoin,ghostlander/Feathercoin,enlighter/Feathercoin,cqtenq/Feathercoin,saydulk/Feathercoin,saydulk/Feathercoin,cqtenq/Feathercoin,cqtenq/Feathercoin,saydulk/Feathercoin
c756758fa6f074ca17423326c40c6e298184d997
eval/src/vespa/eval/tensor/test/test_utils.h
eval/src/vespa/eval/tensor/test/test_utils.h
// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/eval/eval/tensor_spec.h> #include <vespa/eval/tensor/default_tensor_engine.h> #include <vespa/vespalib/testkit/test_kit.h> namespace vespalib::tensor::test { template <typename T> std::unique_ptr<T> makeTensor(const vespalib::eval::TensorSpec &spec) { auto value = DefaultTensorEngine::ref().from_spec(spec); const T *tensor = dynamic_cast<const T *>(value->as_tensor()); ASSERT_TRUE(tensor); value.release(); return std::unique_ptr<T>(const_cast<T *>(tensor)); } }
// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/eval/eval/tensor_spec.h> #include <vespa/eval/tensor/default_tensor_engine.h> #include <vespa/vespalib/testkit/test_kit.h> namespace vespalib::tensor::test { template <typename T> std::unique_ptr<const T> makeTensor(const vespalib::eval::TensorSpec &spec) { auto value = DefaultTensorEngine::ref().from_spec(spec); const T *tensor = dynamic_cast<const T *>(value->as_tensor()); ASSERT_TRUE(tensor); value.release(); return std::unique_ptr<const T>(tensor); } }
Return unique pointer to const tensor instead.
Return unique pointer to const tensor instead.
C
apache-2.0
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
fc819be192e956dcd856f6ca7032d766d1b4a6e3
Utilities/ParseOGLExt/Tokenizer.h
Utilities/ParseOGLExt/Tokenizer.h
/*========================================================================= Program: Visualization Toolkit Module: Tokenizer.h Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* * Copyright 2003 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the * U.S. Government. Redistribution and use in source and binary forms, with * or without modification, are permitted provided that this Notice and any * statement of authorship are reproduced on all copies. */ #include <vtkstd/string> class Tokenizer { public: Tokenizer(const char *s, const char *delim = " \t\n"); Tokenizer(const vtkstd::string &s, const char *delim = " \t\n"); vtkstd::string GetNextToken(); vtkstd::string GetRemainingString() const; bool HasMoreTokens() const; void Reset(); private: vtkstd::string FullString; vtkstd::string Delim; vtkstd::string::size_type Position; };
/*========================================================================= Program: Visualization Toolkit Module: Tokenizer.h Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* * Copyright 2003 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the * U.S. Government. Redistribution and use in source and binary forms, with * or without modification, are permitted provided that this Notice and any * statement of authorship are reproduced on all copies. */ #include <vtkstd/string> class Tokenizer { public: Tokenizer(const char *s, const char *delim = " \t\n\r"); Tokenizer(const vtkstd::string &s, const char *delim = " \t\n\r"); vtkstd::string GetNextToken(); vtkstd::string GetRemainingString() const; bool HasMoreTokens() const; void Reset(); private: vtkstd::string FullString; vtkstd::string Delim; vtkstd::string::size_type Position; };
Add carriage return to the list of default delimiters to correctly handle "windows-style" end of line on "unix-style" systems.
BUG: Add carriage return to the list of default delimiters to correctly handle "windows-style" end of line on "unix-style" systems.
C
bsd-3-clause
candy7393/VTK,mspark93/VTK,spthaolt/VTK,biddisco/VTK,demarle/VTK,aashish24/VTK-old,gram526/VTK,spthaolt/VTK,ashray/VTK-EVM,naucoin/VTKSlicerWidgets,spthaolt/VTK,aashish24/VTK-old,mspark93/VTK,Wuteyan/VTK,johnkit/vtk-dev,sgh/vtk,jmerkow/VTK,keithroe/vtkoptix,gram526/VTK,johnkit/vtk-dev,spthaolt/VTK,ashray/VTK-EVM,sankhesh/VTK,gram526/VTK,candy7393/VTK,hendradarwin/VTK,keithroe/vtkoptix,sankhesh/VTK,gram526/VTK,daviddoria/PointGraphsPhase1,hendradarwin/VTK,mspark93/VTK,msmolens/VTK,demarle/VTK,sumedhasingla/VTK,Wuteyan/VTK,aashish24/VTK-old,hendradarwin/VTK,naucoin/VTKSlicerWidgets,hendradarwin/VTK,jeffbaumes/jeffbaumes-vtk,jmerkow/VTK,spthaolt/VTK,ashray/VTK-EVM,gram526/VTK,sgh/vtk,jeffbaumes/jeffbaumes-vtk,jmerkow/VTK,johnkit/vtk-dev,mspark93/VTK,keithroe/vtkoptix,collects/VTK,arnaudgelas/VTK,naucoin/VTKSlicerWidgets,arnaudgelas/VTK,Wuteyan/VTK,sgh/vtk,daviddoria/PointGraphsPhase1,naucoin/VTKSlicerWidgets,demarle/VTK,demarle/VTK,hendradarwin/VTK,cjh1/VTK,jmerkow/VTK,biddisco/VTK,mspark93/VTK,collects/VTK,aashish24/VTK-old,biddisco/VTK,daviddoria/PointGraphsPhase1,biddisco/VTK,spthaolt/VTK,candy7393/VTK,biddisco/VTK,daviddoria/PointGraphsPhase1,gram526/VTK,collects/VTK,ashray/VTK-EVM,jmerkow/VTK,Wuteyan/VTK,berendkleinhaneveld/VTK,biddisco/VTK,johnkit/vtk-dev,jmerkow/VTK,cjh1/VTK,sgh/vtk,jmerkow/VTK,Wuteyan/VTK,msmolens/VTK,collects/VTK,demarle/VTK,msmolens/VTK,sgh/vtk,cjh1/VTK,msmolens/VTK,sumedhasingla/VTK,SimVascular/VTK,sankhesh/VTK,aashish24/VTK-old,berendkleinhaneveld/VTK,candy7393/VTK,gram526/VTK,berendkleinhaneveld/VTK,sankhesh/VTK,keithroe/vtkoptix,sumedhasingla/VTK,cjh1/VTK,daviddoria/PointGraphsPhase1,candy7393/VTK,SimVascular/VTK,ashray/VTK-EVM,Wuteyan/VTK,aashish24/VTK-old,SimVascular/VTK,candy7393/VTK,daviddoria/PointGraphsPhase1,msmolens/VTK,sankhesh/VTK,sumedhasingla/VTK,sumedhasingla/VTK,SimVascular/VTK,jmerkow/VTK,keithroe/vtkoptix,berendkleinhaneveld/VTK,jeffbaumes/jeffbaumes-vtk,candy7393/VTK,msmolens/VTK,ashray/VTK-EVM,keithroe/vtkoptix,cjh1/VTK,demarle/VTK,demarle/VTK,keithroe/vtkoptix,sankhesh/VTK,johnkit/vtk-dev,ashray/VTK-EVM,mspark93/VTK,jeffbaumes/jeffbaumes-vtk,biddisco/VTK,johnkit/vtk-dev,sumedhasingla/VTK,demarle/VTK,collects/VTK,cjh1/VTK,mspark93/VTK,ashray/VTK-EVM,arnaudgelas/VTK,jeffbaumes/jeffbaumes-vtk,SimVascular/VTK,arnaudgelas/VTK,msmolens/VTK,spthaolt/VTK,berendkleinhaneveld/VTK,candy7393/VTK,Wuteyan/VTK,arnaudgelas/VTK,gram526/VTK,SimVascular/VTK,berendkleinhaneveld/VTK,hendradarwin/VTK,arnaudgelas/VTK,berendkleinhaneveld/VTK,keithroe/vtkoptix,SimVascular/VTK,sankhesh/VTK,hendradarwin/VTK,SimVascular/VTK,sgh/vtk,naucoin/VTKSlicerWidgets,mspark93/VTK,sankhesh/VTK,collects/VTK,sumedhasingla/VTK,sumedhasingla/VTK,msmolens/VTK,jeffbaumes/jeffbaumes-vtk,naucoin/VTKSlicerWidgets,johnkit/vtk-dev
70cb60b7ed2a04f3054cffda01b961decbf0827a
edXVideoLocker/OEXRegistrationFieldValidator.h
edXVideoLocker/OEXRegistrationFieldValidator.h
// // OEXRegistrationFieldValidation.h // edXVideoLocker // // Created by Jotiram Bhagat on 03/03/15. // Copyright (c) 2015 edX. All rights reserved. // #import <Foundation/Foundation.h> #import "OEXRegistrationFormField.h" @interface OEXRegistrationFieldValidator : NSObject +(NSString *)validateField:(OEXRegistrationFormField *)field withText:(NSString *)currentValue; @end
// // OEXRegistrationFieldValidation.h // edXVideoLocker // // Created by Jotiram Bhagat on 03/03/15. // Copyright (c) 2015 edX. All rights reserved. // #import <Foundation/Foundation.h> #import "OEXRegistrationFormField.h" @interface OEXRegistrationFieldValidator : NSObject /// Returns an error string, or nil if no error +(NSString *)validateField:(OEXRegistrationFormField *)field withText:(NSString *)currentValue; @end
Add comment for validation method
Add comment for validation method
C
apache-2.0
appsembler/edx-app-ios,chinlam91/edx-app-ios,chinlam91/edx-app-ios,appsembler/edx-app-ios,proversity-org/edx-app-ios,yrchen/edx-app-ios,Ben21hao/edx-app-ios-enterprise-new,nagyistoce/edx-app-ios,ehmadzubair/edx-app-ios,edx/edx-app-ios,knehez/edx-app-ios,edx/edx-app-ios,edx/edx-app-ios,keyeMyria/edx-app-ios,edx/edx-app-ios,proversity-org/edx-app-ios,ehmadzubair/edx-app-ios,Ben21hao/edx-app-ios-new,lovehhf/edx-app-ios,edx/edx-app-ios,yrchen/edx-app-ios,proversity-org/edx-app-ios,nagyistoce/edx-app-ios,lovehhf/edx-app-ios,edx/edx-app-ios,adoosii/edx-app-ios,ehmadzubair/edx-app-ios,appsembler/edx-app-ios,keyeMyria/edx-app-ios,nagyistoce/edx-app-ios,edx/edx-app-ios,adoosii/edx-app-ios,knehez/edx-app-ios,proversity-org/edx-app-ios,proversity-org/edx-app-ios,Ben21hao/edx-app-ios-enterprise-new,proversity-org/edx-app-ios,adoosii/edx-app-ios,yrchen/edx-app-ios,nagyistoce/edx-app-ios,Ben21hao/edx-app-ios-enterprise-new,Ben21hao/edx-app-ios-new,Ben21hao/edx-app-ios-enterprise-new,knehez/edx-app-ios,chinlam91/edx-app-ios,Ben21hao/edx-app-ios-new,appsembler/edx-app-ios,lovehhf/edx-app-ios,ehmadzubair/edx-app-ios,knehez/edx-app-ios,chinlam91/edx-app-ios,keyeMyria/edx-app-ios,Ben21hao/edx-app-ios-enterprise-new,keyeMyria/edx-app-ios,appsembler/edx-app-ios,nagyistoce/edx-app-ios,adoosii/edx-app-ios,Ben21hao/edx-app-ios-new,knehez/edx-app-ios,Ben21hao/edx-app-ios-new,lovehhf/edx-app-ios
d695d87aaabe6bb8e2ca2ba8f1db45d4a62dc7c9
FUState.h
FUState.h
#ifndef FUSTATE_H #define FUSTATE_H #include <SFML/Window/Event.hpp> #include <SFML/System/Time.hpp> #include <SFML/Graphics/RenderWindow.hpp> #include <memory> class FUStateManager; class FUState { public: struct FUContext { FUContext(std::shared_ptr<sf::RenderWindow> window) : renderWindow(window) {} std::shared_ptr<sf::RenderWindow> renderWindow; }; public: FUState(FUContext context); virtual ~FUState(); virtual void handleEvent(sf::Event &event); virtual void update(sf::Time dt); virtual void draw(); virtual void pause(); virtual void resume(); protected: bool mIsPaused; }; #endif // FUSTATE_H
#ifndef FUSTATE_H #define FUSTATE_H #include <SFML/Window/Event.hpp> #include <SFML/System/Time.hpp> #include <SFML/Graphics/RenderWindow.hpp> #include <memory> class FUState { public: struct FUContext { FUContext(std::shared_ptr<sf::RenderWindow> window) : renderWindow(window) {} std::shared_ptr<sf::RenderWindow> renderWindow; }; public: FUState(FUContext context); virtual ~FUState(); virtual void handleEvent(sf::Event &event); virtual void update(sf::Time dt); virtual void draw(); virtual void pause(); virtual void resume(); protected: bool mIsPaused; }; #endif // FUSTATE_H
Delete an unnecessary forward decleration
Delete an unnecessary forward decleration
C
unlicense
Furkanzmc/StateManager